Skip to content

Commit

Permalink
Enable -Wthread-safety for Clang and CMake. (#1403)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGrupp authored and pifon2a committed Oct 19, 2018
1 parent 6ad7b87 commit d034863
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ macro(google_initialize_cartographer_project)
google_add_flag(GOOG_CXX_FLAGS "-Werror=switch")
google_add_flag(GOOG_CXX_FLAGS "-Werror=uninitialized")

if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
google_add_flag(GOOG_CXX_FLAGS "-Wthread-safety")
endif()

if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE Release)
endif()
Expand Down

0 comments on commit d034863

Please sign in to comment.