diff --git a/CMakeLists.txt b/CMakeLists.txt index a199a9a..5ac11ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,6 +267,7 @@ install(EXPORT AthenaTargets DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT athena) ################ add_subdirectory(atdna) +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) # Test target add_executable(atdna-test atdna/test.cpp atdna/test.hpp) target_atdna(atdna-test atdna_test.cpp atdna/test.hpp) @@ -276,6 +277,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Switch") else() target_link_libraries(atdna-test athena-core) endif() +endif() ######### # CPack # diff --git a/atdna/CMakeLists.txt b/atdna/CMakeLists.txt index 085bb9f..e67272c 100644 --- a/atdna/CMakeLists.txt +++ b/atdna/CMakeLists.txt @@ -192,9 +192,11 @@ install(EXPORT atdnaTargets DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT atdna) # CTest # ######### +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) enable_testing() add_test(NAME test-dna COMMAND $ -o test.cpp "-I${ATHENA_INCLUDE_DIR}" ${CMAKE_SOURCE_DIR}/test.hpp) +endif() endif()