commit 24c2261f7830bc36dda35a2846e746d180761090 parent 01f4b6869b8f614221044470f6537d63f6aea468 Author: Vincent Forest <vincent.forest@meso-star.com> Date: Wed, 16 Jun 2021 10:08:40 +0200 Update how sumv_voxelize_sth is handled by the build system Diffstat:
| M | cmake/CMakeLists.txt | | | 15 | ++++++++++----- |
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt @@ -26,7 +26,9 @@ option(NO_TEST "Do not build tests" OFF) find_package(Embree 3.6 REQUIRED) find_package(RCMake 0.4 REQUIRED) find_package(RSys 0.12 REQUIRED) -find_package(StarTetraHedra) +if(NOT NO_TEST) + find_package(StarTetraHedra) +endif() set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${RCMAKE_SOURCE_DIR}) include(rcmake) @@ -98,11 +100,14 @@ if(NOT NO_TEST) new_test(test_suvm_device) new_test(test_suvm_volume) new_test(test_suvm_primitive_intersection) -endif() -if(StarTetraHedra_FOUND) - add_executable(suvm_voxelize ${SUVM_SOURCE_DIR}/suvm_voxelize_sth.c) - target_link_libraries(suvm_voxelize RSys StarTetraHedra suvm) + if(StarTetraHedra_FOUND) + add_executable(suvm_voxelize ${SUVM_SOURCE_DIR}/suvm_voxelize_sth.c) + target_link_libraries(suvm_voxelize RSys StarTetraHedra suvm) + else() + message(STATUS "Star-TetraHedra was not found. " + "The suvm_voxelize_sth program will not be build.") + endif() endif() ################################################################################