From 661aac270a5496cb334e53f25f10c036699e6801 Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Sat, 3 Feb 2024 12:42:41 -0700 Subject: [PATCH] Stop using deprecated CMAKE_COMPILER_IS_GNUCXX * Switch to CMAKE_CXX_COMPILER_ID * https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html Signed-off-by: Ryan Friedman --- grid_map_cmake_helpers/cmake/grid_map_package.cmake | 2 +- grid_map_demos/CMakeLists.txt | 2 +- grid_map_filters/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/grid_map_cmake_helpers/cmake/grid_map_package.cmake b/grid_map_cmake_helpers/cmake/grid_map_package.cmake index f91e8dacb..10928442a 100644 --- a/grid_map_cmake_helpers/cmake/grid_map_package.cmake +++ b/grid_map_cmake_helpers/cmake/grid_map_package.cmake @@ -17,7 +17,7 @@ macro(grid_map_package) set(CMAKE_CXX_STANDARD 17) endif() - if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wdeprecated -fPIC) endif() diff --git a/grid_map_demos/CMakeLists.txt b/grid_map_demos/CMakeLists.txt index f00c076f4..e64cf57ee 100644 --- a/grid_map_demos/CMakeLists.txt +++ b/grid_map_demos/CMakeLists.txt @@ -201,7 +201,7 @@ set(targets_list ) foreach(target ${targets_list}) - if(CMAKE_COMPILER_IS_GNUCXX) + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") target_compile_options(${target} PRIVATE "SHELL:--param ggc-min-expand=1") target_compile_options(${target} PRIVATE "SHELL:--param ggc-min-heapsize=32768") endif() diff --git a/grid_map_filters/CMakeLists.txt b/grid_map_filters/CMakeLists.txt index 7cba0b1ad..9d0cba5a5 100644 --- a/grid_map_filters/CMakeLists.txt +++ b/grid_map_filters/CMakeLists.txt @@ -87,7 +87,7 @@ foreach(lib_name ${filter_libs}) ${dependencies} ) - if(CMAKE_COMPILER_IS_GNUCXX) + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") target_compile_options(${lib_name} PRIVATE "SHELL:--param ggc-min-expand=1") target_compile_options(${lib_name} PRIVATE "SHELL:--param ggc-min-heapsize=32768") endif()