CMake/Tests/CxxDialect/CMakeLists.txt
Stephen Kelly 913394af24 cmTarget: Add CXX_STANDARD and CXX_EXTENSION target properties.
These are used to determine whether to add -std=c++11, -std=gnu++11
etc flags on the compile line.
2014-04-07 16:48:44 +02:00

15 lines
530 B
CMake

cmake_minimum_required(VERSION 2.8.12)
cmake_policy(SET CMP0025 NEW)
project(CxxDialect)
add_executable(use_typeof use_typeof.cxx)
set_property(TARGET use_typeof PROPERTY CXX_STANDARD 98)
set_property(TARGET use_typeof PROPERTY CXX_EXTENSIONS ON)
add_executable(use_constexpr use_constexpr.cxx)
set_property(TARGET use_constexpr PROPERTY CXX_STANDARD 11)
add_executable(CxxDialect use_constexpr_and_typeof.cxx)
set_property(TARGET CxxDialect PROPERTY CXX_STANDARD 11)
set_property(TARGET CxxDialect PROPERTY CXX_EXTENSIONS ON)