Only set C++11 explicitly for old versions of GCC. (#1724)
Starting with GCC 6.1, C++14 became the default. Signed-off-by: Wolfgang Hess <whess@lyft.com>master
parent
a62fb739af
commit
3611b52e90
|
@ -76,7 +76,11 @@ macro(google_initialize_cartographer_project)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# TODO turn on equivalent warnings on Windows
|
# TODO turn on equivalent warnings on Windows
|
||||||
else()
|
else()
|
||||||
set(GOOG_CXX_FLAGS "-pthread -std=c++11 -fPIC ${GOOG_CXX_FLAGS}")
|
set(GOOG_CXX_FLAGS "-pthread -fPIC ${GOOG_CXX_FLAGS}")
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
|
||||||
|
google_add_flag(GOOG_CXX_FLAGS "-std=c++11")
|
||||||
|
endif()
|
||||||
|
|
||||||
google_add_flag(GOOG_CXX_FLAGS "-Wall")
|
google_add_flag(GOOG_CXX_FLAGS "-Wall")
|
||||||
google_add_flag(GOOG_CXX_FLAGS "-Wpedantic")
|
google_add_flag(GOOG_CXX_FLAGS "-Wpedantic")
|
||||||
|
|
Loading…
Reference in New Issue