Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion inkcpp_cl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,16 @@ add_executable(inkcpp_cl inkcpp_cl.cpp test.h test.cpp)
# Include compiler and runtime libraries
target_link_libraries(inkcpp_cl PUBLIC inkcpp inkcpp_compiler)

# For https://en.cppreference.com/w/cpp/filesystem#Notes
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
target_link_libraries(inkcpp_cl PRIVATE stdc++fs)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
target_link_libraries(inkcpp_cl PRIVATE stdc++fs)
endif()
endif()

# Install
install(TARGETS inkcpp_cl DESTINATION bin)
install(TARGETS inkcpp_cl DESTINATION bin)
17 changes: 14 additions & 3 deletions inkcpp_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@ add_executable(inkcpp_test catch.hpp Main.cpp
Stack.cpp
Callstack.cpp
Restorable.cpp
Value.cpp
Globals.cpp
Tags.cpp
Value.cpp
Globals.cpp
Tags.cpp
)

target_link_libraries(inkcpp_test PUBLIC inkcpp inkcpp_compiler)

# For https://en.cppreference.com/w/cpp/filesystem#Notes
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
target_link_libraries(inkcpp_test PRIVATE stdc++fs)
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
target_link_libraries(inkcpp_test PRIVATE stdc++fs)
endif()
endif()

add_test(NAME UnitTests COMMAND $<TARGET_FILE:inkcpp_test>)
set (source "${CMAKE_CURRENT_SOURCE_DIR}/ink")
set (destination "${CMAKE_CURRENT_BINARY_DIR}/ink")
Expand Down