Commit d49f1c5e authored by Stephen Kelly's avatar Stephen Kelly
Browse files

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.
parent d526ebc6
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment