Skip to content

Commit

Permalink
upgrade C++ standard to 17
Browse files Browse the repository at this point in the history
  • Loading branch information
daizhirui committed Sep 28, 2023
1 parent 3f3d98a commit 198cb26
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ add_subdirectory(include/fcl)

set(PKG_DESC "Flexible Collision Library")

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

configure_file(fcl.pc.in fcl.pc @ONLY)

Expand Down
10 changes: 5 additions & 5 deletions CMakeModules/CompilerSettings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@

# GCC
if(CMAKE_COMPILER_IS_GNUCXX)
add_definitions(-std=c++11 -W -Wall -Wextra -Wpedantic)
add_definitions(-W -Wall -Wextra -Wpedantic)
if(FCL_TREAT_WARNINGS_AS_ERRORS)
add_definitions(-Werror)
endif()
endif()

# Clang
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_definitions(-std=c++11 -W -Wall -Wextra)
add_definitions(-W -Wall -Wextra)
if(FCL_TREAT_WARNINGS_AS_ERRORS)
add_definitions(-Werror)
endif()
Expand All @@ -53,7 +53,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
message(FATAL_ERROR "AppleClang version must be at least 6.1!")
endif()
add_definitions(-std=c++11 -W -Wall -Wextra)
add_definitions(-W -Wall -Wextra)
if(FCL_TREAT_WARNINGS_AS_ERRORS)
add_definitions(-Werror)
endif()
Expand All @@ -77,7 +77,7 @@ else()
set(IS_ICPC 0)
endif()
if(IS_ICPC)
add_definitions(-std=c++11 -wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196)
add_definitions(-wd191 -wd411 -wd654 -wd1125 -wd1292 -wd1565 -wd1628 -wd2196)
set(CMAKE_AR "xiar" CACHE STRING "Intel archiver" FORCE)
set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "Default compile flags" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG"
Expand All @@ -97,7 +97,7 @@ else()
set(IS_XLC 0)
endif()
if(IS_XLC)
add_definitions(-std=c++11 -qpic -q64 -qmaxmem=-1)
add_definitions(-qpic -q64 -qmaxmem=-1)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -q64")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -q64")
endif()
Expand Down

0 comments on commit 198cb26

Please sign in to comment.