diff options
author | Brad King <brad.king@kitware.com> | 2015-03-10 18:49:40 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-03-10 18:49:40 (GMT) |
commit | 77534e84b27701e371ccee780be5acffe7cced59 (patch) | |
tree | 922e195b897e4e3fe52d2bc65b7c377ec11d75ef /CMakeLists.txt | |
parent | 1a8e4c86921e8b018be950924dc54c532134feb5 (diff) | |
download | CMake-77534e84b27701e371ccee780be5acffe7cced59.zip CMake-77534e84b27701e371ccee780be5acffe7cced59.tar.gz CMake-77534e84b27701e371ccee780be5acffe7cced59.tar.bz2 |
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1250a94..d86ae96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() |