2019-06-06 20:15:45 +02:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
2019-05-18 20:35:51 +02:00
|
|
|
project(PorygonLang)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
2019-06-18 14:45:44 +02:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2019-05-19 14:42:45 +02:00
|
|
|
include_directories(extern)
|
2019-05-18 20:35:51 +02:00
|
|
|
|
2019-05-21 17:23:56 +02:00
|
|
|
file(GLOB_RECURSE SRC_FILES "src/*.cpp" "src/*.hpp")
|
|
|
|
file(GLOB_RECURSE TEST_FILES "tests/*.cpp" "tests/*.hpp")
|
2019-05-21 13:05:17 +02:00
|
|
|
|
2019-06-05 17:46:46 +02:00
|
|
|
add_library(PorygonLang SHARED ${SRC_FILES})
|
2019-05-21 13:05:17 +02:00
|
|
|
add_executable(PorygonLangTests
|
|
|
|
${SRC_FILES}
|
2019-05-21 17:23:56 +02:00
|
|
|
${TEST_FILES})
|
2019-05-18 20:35:51 +02:00
|
|
|
|
2019-08-25 17:58:57 +02:00
|
|
|
target_link_libraries(PorygonLang -static-libgcc -static-libstdc++)
|
|
|
|
target_link_libraries(PorygonLangTests -static-libgcc -static-libstdc++)
|
|
|
|
|
2019-08-11 16:05:14 +02:00
|
|
|
if (WINDOWS)
|
2019-08-18 10:57:34 +02:00
|
|
|
target_link_libraries(PorygonLang -static -static-libgcc -static-libstdc++)
|
|
|
|
target_link_libraries(PorygonLangTests -static -static-libgcc -static-libstdc++)
|
2019-08-11 16:05:14 +02:00
|
|
|
endif(WINDOWS)
|
|
|
|
|
2019-06-05 17:46:46 +02:00
|
|
|
target_compile_definitions(PorygonLangTests PRIVATE TESTS_BUILD)
|