From 83871b050988bd77c0208e63494a01731a611940 Mon Sep 17 00:00:00 2001 From: Kenzo Lobos-Tsunekawa Date: Wed, 4 Dec 2024 09:26:15 +0900 Subject: [PATCH] chore: fixed the order of the cuda check in the cmakelist Signed-off-by: Kenzo Lobos-Tsunekawa --- .../CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/perception/autoware_probabilistic_occupancy_grid_map/CMakeLists.txt b/perception/autoware_probabilistic_occupancy_grid_map/CMakeLists.txt index 6342ada0b976a..9e6881a5e3a75 100644 --- a/perception/autoware_probabilistic_occupancy_grid_map/CMakeLists.txt +++ b/perception/autoware_probabilistic_occupancy_grid_map/CMakeLists.txt @@ -9,6 +9,11 @@ find_package(eigen3_cmake_module REQUIRED) find_package(Eigen3 REQUIRED) find_package(PCL REQUIRED) +if(NOT ${CUDA_FOUND}) + message(WARNING "cuda was not found, so the autoware_probabilistic_occupancy_grid_map package will not be built.") + return() +endif() + include_directories( include SYSTEM @@ -17,11 +22,6 @@ include_directories( ${grid_map_ros_INCLUDE_DIRS} ) -if(NOT ${CUDA_FOUND}) - message(WARNING "cuda was not found, so the autoware_probabilistic_occupancy_grid_map package will not be built.") - return() -endif() - # cSpell: ignore expt list(APPEND CUDA_NVCC_FLAGS --expt-relaxed-constexpr -diag-suppress 20012 --compiler-options -fPIC) set(CUDA_SEPARABLE_COMPILATION ON)