File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.9)
2- project (sonar_scanner_example)
1+ cmake_minimum_required (VERSION 3.30)
2+
3+ # `import std;` is not supported yet by libstdc++
4+ set (CMAKE_CXX_COMPILER clang++)
5+ set (CMAKE_C_COMPILER clang)
6+
7+ project (sonar_scanner_example LANGUAGES CXX)
8+
9+ set (CMAKE_CXX_STANDARD 20)
10+ set (CMAKE_CXX_STANDARD_REQUIRED ON )
11+ set (CMAKE_CXX_EXTENSIONS OFF )
12+ set (CMAKE_CXX_MODULE_STD 1)
13+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -Wpedantic" )
314
4- set (CMAKE_CXX_STANDARD 17)
515set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
616
717add_executable (sonar_scanner_example src/main.cpp)
8-
18+ target_compile_features (sonar_scanner_example
19+ INTERFACE cxx_std_20)
20+ target_sources (sonar_scanner_example
21+ PRIVATE
22+ FILE_SET CXX_MODULES FILES src/args.cppm
23+ )
Original file line number Diff line number Diff line change 1+ export module args;
You can’t perform that action at this time.
0 commit comments