27 lines
822 B
CMake
27 lines
822 B
CMake
cmake_minimum_required(VERSION 4.2)
|
|
|
|
# Enable C++23 Modules + (optional) `import std;` with experimental std module.
|
|
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "d0edc3af-4c50-42ea-a356-e2862fe7a444")
|
|
|
|
project(app LANGUAGES C CXX)
|
|
|
|
set(CMAKE_CXX_SCAN_FOR_MODULES ON)
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_CXX_MODULE_STD 1)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
# Toolchain-specific flags (libc++/runtime/linker/etc) should come from your Conan toolchain/profile.
|
|
|
|
# Example: entrypoint built from main.cc; modules live in .cppm files.
|
|
add_executable(app main.cc)
|
|
|
|
# If you use C++ Modules, list module interface units explicitly and keep this in sync:
|
|
#
|
|
# target_sources(app
|
|
# PRIVATE
|
|
# FILE_SET cxx_modules TYPE CXX_MODULES FILES
|
|
# modules/app.cppm
|
|
# )
|