ferencd@0: cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR) ferencd@0: project(Cxx11Features CXX) ferencd@0: ferencd@0: list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules") ferencd@0: ferencd@0: include(CheckCXX11Features) ferencd@0: ferencd@0: foreach (flag IN ITEMS ferencd@0: HAS_CXX11_AUTO ferencd@0: HAS_CXX11_AUTO_RET_TYPE ferencd@0: HAS_CXX11_CLASS_OVERRIDE ferencd@0: HAS_CXX11_CONSTEXPR ferencd@0: HAS_CXX11_CSTDINT_H ferencd@0: HAS_CXX11_DECLTYPE ferencd@0: HAS_CXX11_FUNC ferencd@0: HAS_CXX11_INITIALIZER_LIST ferencd@0: HAS_CXX11_LAMBDA ferencd@0: HAS_CXX11_LIB_REGEX ferencd@0: HAS_CXX11_LONG_LONG ferencd@0: HAS_CXX11_NULLPTR ferencd@0: HAS_CXX11_RVALUE_REFERENCES ferencd@0: HAS_CXX11_SIZEOF_MEMBER ferencd@0: HAS_CXX11_STATIC_ASSERT ferencd@0: HAS_CXX11_VARIADIC_TEMPLATES ferencd@0: ) ferencd@0: if (${flag}) ferencd@0: add_definitions("-D${flag}") ferencd@0: message(STATUS "Compiler C++11 support flag ${flag} set") ferencd@0: endif () ferencd@0: endforeach (flag) ferencd@0: ferencd@0: set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ${CXX11_COMPILER_FLAGS}) ferencd@0: add_executable(CXX11Features cxx11features.cxx)