1
0
This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
modern_cpp_tutorial/CMakeLists.txt

22 lines
543 B
CMake

cmake_minimum_required(VERSION 3.20)
project(
hello
VERSION 0.1.0
LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(CMAKE_EXPORT_COMPILE_COMMANDS)
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES})
endif()
configure_file("${PROJECT_SOURCE_DIR}/include/version.h.in"
"${PROJECT_BINARY_DIR}/include/version.h")
add_executable(hello src/main.cpp)
target_compile_features(hello PUBLIC cxx_std_20)
target_include_directories(hello PRIVATE "${PROJECT_BINARY_DIR}/include")