File tree Expand file tree Collapse file tree 2 files changed +26
-4
lines changed
Expand file tree Collapse file tree 2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -4,5 +4,16 @@ add_executable(inkcpp_cl inkcpp_cl.cpp test.h test.cpp)
44# Include compiler and runtime libraries
55target_link_libraries (inkcpp_cl PUBLIC inkcpp inkcpp_compiler)
66
7+ # For https://en.cppreference.com/w/cpp/filesystem#Notes
8+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
9+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1" )
10+ target_link_libraries (inkcpp_cl PRIVATE stdc++fs)
11+ endif ()
12+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
13+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" )
14+ target_link_libraries (inkcpp_cl PRIVATE stdc++fs)
15+ endif ()
16+ endif ()
17+
718# Install
8- install (TARGETS inkcpp_cl DESTINATION bin)
19+ install (TARGETS inkcpp_cl DESTINATION bin)
Original file line number Diff line number Diff line change @@ -4,13 +4,24 @@ add_executable(inkcpp_test catch.hpp Main.cpp
44 Stack.cpp
55 Callstack.cpp
66 Restorable.cpp
7- Value .cpp
8- Globals.cpp
9- Tags.cpp
7+ Value .cpp
8+ Globals.cpp
9+ Tags.cpp
1010 )
1111
1212target_link_libraries (inkcpp_test PUBLIC inkcpp inkcpp_compiler)
1313
14+ # For https://en.cppreference.com/w/cpp/filesystem#Notes
15+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
16+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1" )
17+ target_link_libraries (inkcpp_test PRIVATE stdc++fs)
18+ endif ()
19+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
20+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0" )
21+ target_link_libraries (inkcpp_test PRIVATE stdc++fs)
22+ endif ()
23+ endif ()
24+
1425add_test (NAME UnitTests COMMAND $<TARGET_FILE:inkcpp_test>)
1526set (source "${CMAKE_CURRENT_SOURCE_DIR} /ink" )
1627set (destination "${CMAKE_CURRENT_BINARY_DIR} /ink" )
You can’t perform that action at this time.
0 commit comments