Mentions légales du service

Skip to content
Snippets Groups Projects

Fix basic cmake example

1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
``` C++17
``` C++17
// CMakeLists.txt
# CMakeLists.txt
 
# Ensure the cmake used is compatible with the CMake functions that are used
 
# As CMAKE_CXX_STANDARD was introduced in CMake 3.1
 
cmake_minimum_required(VERSION 3.1)
 
 
# A project name is mandatory, preferably right after cmake_minimum_required call
 
project(Hello)
 
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard; at least 17 is expected.")
add_executable(hello
add_executable(hello
Loading