Skip to content

Commit

Permalink
Stop using deprecated CMAKE_COMPILER_IS_GNUCXX
Browse files Browse the repository at this point in the history
* Switch to CMAKE_CXX_COMPILER_ID
* https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_ID.html

Signed-off-by: Ryan Friedman <[email protected]>
  • Loading branch information
Ryanf55 committed Feb 3, 2024
1 parent 4f2eaa6 commit 661aac2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion grid_map_cmake_helpers/cmake/grid_map_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion grid_map_demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion grid_map_filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 661aac2

Please sign in to comment.