From 5d9961d02cfbe1303e1e289ee8a3b3761e4d0ae9 Mon Sep 17 00:00:00 2001 From: Joana Niermann Date: Thu, 19 Sep 2024 17:17:24 +0200 Subject: [PATCH] Rename host build flag --- .github/workflows/builds.yml | 2 +- .gitlab-ci.yml | 4 ++-- CMakeLists.txt | 2 +- tests/benchmarks/CMakeLists.txt | 2 +- tests/integration_tests/CMakeLists.txt | 2 +- tests/tools/src/CMakeLists.txt | 2 +- tests/unit_tests/CMakeLists.txt | 2 +- tutorials/src/CMakeLists.txt | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index d85541136..e75ac95fb 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -159,7 +159,7 @@ jobs: -DDETRAY_BUILD_INTEGRATIONTESTS=ON \ -DDETRAY_BUILD_BENCHMARKS=ON \ -DDETRAY_BUILD_TUTORIALS=ON \ - -DDETRAY_NO_HOST_BUILD=ON \ + -DDETRAY_BUILD_HOST=OFF \ -DDETRAY_FAIL_ON_WARNINGS=ON \ -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \ -DDETRAY_CUSTOM_SCALARTYPE=${{ matrix.SCALAR_TYPE }} \ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbac9a447..ee50e7d4b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,7 +30,7 @@ build_cuda: -DDETRAY_BUILD_INTEGRATIONTESTS=ON -DDETRAY_BUILD_BENCHMARKS=ON -DDETRAY_BUILD_TUTORIALS=ON - -DDETRAY_NO_HOST_BUILD=ON + -DDETRAY_BUILD_HOST=OFF -DDETRAY_FAIL_ON_WARNINGS=ON - cmake --build build @@ -76,7 +76,7 @@ build_sycl: -DDETRAY_BUILD_INTEGRATIONTESTS=ON -DDETRAY_BUILD_BENCHMARKS=OFF -DDETRAY_BUILD_TUTORIALS=OFF - -DDETRAY_NO_HOST_BUILD=ON + -DDETRAY_BUILD_HOST=OFF -DDETRAY_FAIL_ON_WARNINGS=ON - cmake --build build diff --git a/CMakeLists.txt b/CMakeLists.txt index a4ef34451..adb7916eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,13 +60,13 @@ option( DETRAY_SVG_DISPLAY "Build ActSVG display module" OFF) option( DETRAY_BUILD_SYCL "Build the SYCL sources included in detray" OFF ) option( DETRAY_BUILD_CUDA "Build the CUDA sources included in detray" ${DETRAY_BUILD_CUDA_DEFAULT} ) +cmake_dependent_option(DETRAY_BUILD_HOST "Build the host sources included in detray" ON "DETRAY_BUILD_CUDA OR DETRAY_BUILD_SYCL" ON) option( DETRAY_BUILD_TEST_UTILS "Build the test utility library of Detray" OFF ) option( DETRAY_BUILD_UNITTESTS "Build the unit tests of Detray" OFF ) option( DETRAY_BUILD_INTEGRATIONTESTS "Build the integration tests of Detray" OFF ) option( DETRAY_BUILD_BENCHMARKS "Build the benchmark tests" OFF ) option( DETRAY_BUILD_TUTORIALS "Build the tutorial executables of Detray" OFF ) -cmake_dependent_option(DETRAY_NO_HOST_BUILD "Do not build host targets" OFF "DETRAY_BUILD_CUDA OR DETRAY_BUILD_SYCL" OFF) option( DETRAY_FAIL_ON_WARNINGS "Make the build fail on compiler/linker warnings" FALSE ) diff --git a/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt index 414460ea7..12c7bb3fa 100644 --- a/tests/benchmarks/CMakeLists.txt +++ b/tests/benchmarks/CMakeLists.txt @@ -5,7 +5,7 @@ # Mozilla Public License Version 2.0 # Set up the host/cpu benchmarks. -if( NOT DETRAY_NO_HOST_BUILD ) +if( DETRAY_BUILD_HOST ) add_subdirectory( cpu ) endif() diff --git a/tests/integration_tests/CMakeLists.txt b/tests/integration_tests/CMakeLists.txt index 0404d9fc6..d7a809cd1 100644 --- a/tests/integration_tests/CMakeLists.txt +++ b/tests/integration_tests/CMakeLists.txt @@ -5,7 +5,7 @@ # Mozilla Public License Version 2.0 # Set up all of the "host" tests. -if( NOT DETRAY_NO_HOST_BUILD ) +if( DETRAY_BUILD_HOST ) message(STATUS "Building detray host integration tests") add_subdirectory( cpu ) diff --git a/tests/tools/src/CMakeLists.txt b/tests/tools/src/CMakeLists.txt index 6cf31de3c..2e0027941 100644 --- a/tests/tools/src/CMakeLists.txt +++ b/tests/tools/src/CMakeLists.txt @@ -4,7 +4,7 @@ # # Mozilla Public License Version 2.0 -if( NOT DETRAY_NO_HOST_BUILD ) +if( DETRAY_BUILD_HOST ) add_subdirectory( cpu ) endif() diff --git a/tests/unit_tests/CMakeLists.txt b/tests/unit_tests/CMakeLists.txt index 84b00088c..14f49f891 100644 --- a/tests/unit_tests/CMakeLists.txt +++ b/tests/unit_tests/CMakeLists.txt @@ -5,7 +5,7 @@ # Mozilla Public License Version 2.0 # Set up all of the "host" tests. -if( NOT DETRAY_NO_HOST_BUILD ) +if( DETRAY_BUILD_HOST ) message(STATUS "Building detray host unit tests") add_subdirectory( covfie ) diff --git a/tutorials/src/CMakeLists.txt b/tutorials/src/CMakeLists.txt index be59b4e4b..b0cb158cb 100644 --- a/tutorials/src/CMakeLists.txt +++ b/tutorials/src/CMakeLists.txt @@ -5,7 +5,7 @@ # Mozilla Public License Version 2.0 # Set up all of the "host" tutorials. -if( NOT DETRAY_NO_HOST_BUILD ) +if( DETRAY_BUILD_HOST ) add_subdirectory( cpu ) endif()