mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 04:14:34 +03:00
17 lines
506 B
CMake
17 lines
506 B
CMake
# Set the minimum version of CMake that can be used
|
|
# To find the cmake version run
|
|
# $ cmake --version
|
|
cmake_minimum_required(VERSION 3.1)
|
|
|
|
# Set the project name
|
|
project (hello_cpp11)
|
|
|
|
# Add an executable
|
|
add_executable(hello_cpp11 main.cpp)
|
|
|
|
# set the C++ standard to the appropriate standard for using auto
|
|
target_compile_features(hello_cpp11 PUBLIC cxx_auto_type)
|
|
|
|
# Print the list of known compile features for this version of CMake
|
|
message("List of compile features: ${CMAKE_CXX_COMPILE_FEATURES}")
|