Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Oct 20, 2023
1 parent e011039 commit b275c9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions singleheader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ if (Python3_Interpreter_FOUND)
add_library(ada-singleheader-source INTERFACE)
target_sources(ada-singleheader-source INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/ada.cpp>)
target_link_libraries(ada-singleheader-source INTERFACE ada-singleheader-include-source)
add_library(ada-singleheader-lib STATIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/ada.cpp>)

if (BUILD_TESTING)
add_executable(demo $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/demo.cpp>)
target_link_libraries(demo ada-singleheader-include-source)

add_test(demo demo)

add_executable(cdemo $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/demo.c>)
target_link_libraries(cdemo ada)

target_link_libraries(cdemo ada-singleheader-lib)
add_test(cdemo cdemo)
endif()
else()
Expand Down

0 comments on commit b275c9a

Please sign in to comment.