Skip to content

Commit 236310c

Browse files
Resolves 3646: Update CMAKE_COMPILER_IS_GNUCXX (#3662)
* Resolves 3646: Update CMAKE_COMPILER_IS_GNUCXX * Update CMakeLists.txt
1 parent af7e9b5 commit 236310c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nav2_common/cmake/nav2_package.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ macro(nav2_package)
3636
endif()
3737
endif()
3838

39-
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
39+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
4040
add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wdeprecated -fPIC -Wshadow -Wnull-dereference)
4141
add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wnon-virtual-dtor>")
4242
endif()

nav2_rviz_plugins/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if(NOT CMAKE_CXX_STANDARD)
66
set(CMAKE_CXX_STANDARD 17)
77
endif()
88

9-
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
9+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1010
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
1111
endif()
1212

0 commit comments

Comments
 (0)