diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-19 00:30:40 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-11-19 00:32:03 +0100 |
commit | d49f1c5e9400c6b5d6dc205b4dadad2fa21f6eb0 (patch) | |
tree | f2c7241e3e4443e2de92af595bee898d8465eecf /CMakeLists.txt | |
parent | d526ebc603b0a83a7a1602ed4ddcf1b483077cf4 (diff) | |
download | cmake-d49f1c5e9400c6b5d6dc205b4dadad2fa21f6eb0.tar.gz |
Build CMake with most-recent available language dialect.
When CMake is built with CMake 3.1 or later, appropriate -std=
options will be added for GNU and Clang compilers while building
C and CXX code.
This allows taking advantage of 'hidden' language features such
as move-constructors, and allows the standard library to enable
the use of more-advanced features too, where available.
This does not change CMake host compiler requirements.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 58e0a1f220..90fc1a2e76 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,10 @@ if("${CMake_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") endmacro() endif() +# Use most-recent available language dialects with GNU and Clang +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) + # option to set the internal encoding of CMake to UTF-8 option(CMAKE_ENCODING_UTF8 "Use UTF-8 encoding internally (experimental)." OFF) mark_as_advanced(CMAKE_ENCODING_UTF8) |