Skip to content

Commit

Permalink
Merge pull request #3341 from vicentebolea/disable-cxx-extensions
Browse files Browse the repository at this point in the history
CMAKE: CMAKE_CXX_EXTENSIONS=OFF
  • Loading branch information
vicentebolea committed Sep 14, 2022
2 parents 583a85f + 60536fd commit d3be169
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Expand Up @@ -92,9 +92,10 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE)
endif()

# Force C++11 and C99
# Force C++11 (No extensions) and C99
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_CXX_EXTENSIONS OFF)
if(NOT MSVC)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED True)
Expand Down

0 comments on commit d3be169

Please sign in to comment.