Skip to content

Commit

Permalink
teqpc_bench and teqpc_demo should only be included if top level
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhbell committed Jan 8, 2025
1 parent 40005e1 commit 77c5a69
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -333,16 +333,19 @@ if (TEQP_TEQPC)
COMMAND dumpbin /EXPORTS $<TARGET_FILE:teqpc> > ${CMAKE_CURRENT_BINARY_DIR}/exports.txt)
endif()

# And a little testing harness for extern "C" library
add_executable(teqpc_demo "${CMAKE_CURRENT_SOURCE_DIR}/interface/C/demo.cpp")
target_link_libraries(teqpc_demo PRIVATE teqpc PRIVATE teqpinterface)

# And a little benchmarking harness for extern "C" library
add_executable(teqpc_bench "${CMAKE_CURRENT_SOURCE_DIR}/interface/C/teqpc_bench.cpp")
target_link_libraries(teqpc_bench PRIVATE Catch2WithMain PRIVATE teqpc)
if(UNIX)
target_link_libraries (teqpc_bench PRIVATE ${CMAKE_DL_LIBS})
if (PROJECT_IS_TOP_LEVEL)

# And a little testing harness for extern "C" library
add_executable(teqpc_demo "${CMAKE_CURRENT_SOURCE_DIR}/interface/C/demo.cpp")
target_link_libraries(teqpc_demo PRIVATE teqpc PRIVATE teqpinterface)

# And a little benchmarking harness for extern "C" library
add_executable(teqpc_bench "${CMAKE_CURRENT_SOURCE_DIR}/interface/C/teqpc_bench.cpp")
target_link_libraries(teqpc_bench PRIVATE Catch2WithMain PRIVATE teqpc)
if(UNIX)
target_link_libraries (teqpc_bench PRIVATE ${CMAKE_DL_LIBS})
endif()
endif()
endif()

### TARGETS from src folder
Expand Down

0 comments on commit 77c5a69

Please sign in to comment.