Add options to build CMake without any language dialects
If CMake_NO_<LANG>_STANDARD is set, do not set CMAKE_<LANG>_STANDARD. This will allow users to build with their own -std= flags without CMake adding any itself.
This commit is contained in:
parent
1a8e4c8692
commit
77534e84b2
|
@ -37,10 +37,10 @@ if("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
|||
endif()
|
||||
|
||||
# Use most-recent available language dialects with GNU and Clang
|
||||
if(NOT DEFINED CMAKE_C_STANDARD)
|
||||
if(NOT DEFINED CMAKE_C_STANDARD AND NOT CMake_NO_C_STANDARD)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
if(NOT DEFINED CMAKE_CXX_STANDARD AND NOT CMake_NO_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue