25 lines
786 B
CMake
Executable File
25 lines
786 B
CMake
Executable File
cmake_minimum_required(VERSION 3.10)
|
|
project(PorygonLang)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
include_directories(extern)
|
|
|
|
file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.hpp")
|
|
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
|
|
|
add_library(PorygonLang SHARED ${SRC_FILES})
|
|
add_executable(PorygonLangTests
|
|
${SRC_FILES}
|
|
${TEST_FILES})
|
|
|
|
target_link_libraries(PorygonLang -static-libgcc -static-libstdc++)
|
|
target_link_libraries(PorygonLangTests -static-libgcc -static-libstdc++)
|
|
|
|
if (WINDOWS)
|
|
target_link_libraries(PorygonLang -static -static-libgcc -static-libstdc++)
|
|
target_link_libraries(PorygonLangTests -static -static-libgcc -static-libstdc++)
|
|
endif(WINDOWS)
|
|
|
|
target_compile_definitions(PorygonLangTests PRIVATE TESTS_BUILD) |