File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 2727 - name : Setup build environment
2828 uses : lukka/get-cmake@latest
2929 with :
30- cmakeVersion : " ~3.28.0 "
31- ninjaVersion : " ^1.11.1 "
30+ cmakeVersion : latest
31+ ninjaVersion : latest
3232 - name : Setup MSVC
3333 if : startsWith(matrix.presets.platform, 'windows')
3434 uses : TheMrMilchmann/setup-msvc-dev@v3
8080 - name : Install Ninja
8181 uses : lukka/get-cmake@latest
8282 with :
83- cmakeVersion : " ~4.0.0 "
84- ninjaVersion : " ^1.11.1 "
83+ cmakeVersion : latest
84+ ninjaVersion : latest
8585 - name : Setup MSVC
8686 if : startsWith(matrix.platform.os, 'windows')
8787 uses : TheMrMilchmann/setup-msvc-dev@v3
@@ -139,8 +139,8 @@ jobs:
139139 - name : Setup build environment
140140 uses : lukka/get-cmake@latest
141141 with :
142- cmakeVersion : " ~3.28.0 "
143- ninjaVersion : " ^1.11.1 "
142+ cmakeVersion : latest
143+ ninjaVersion : latest
144144 - name : Print installed softwares
145145 run : |
146146 cmake --version
@@ -183,8 +183,8 @@ jobs:
183183 - name : Setup build environment
184184 uses : lukka/get-cmake@latest
185185 with :
186- cmakeVersion : " ~4.0.0 "
187- ninjaVersion : " ^1.11.1 "
186+ cmakeVersion : latest
187+ ninjaVersion : latest
188188 - name : Install Compiler
189189 id : install-compiler
190190 run : |
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
22
3- if (CMAKE_CXX_STANDARD STREQUAL 26 )
3+ if (CMAKE_CXX_STANDARD GREATER_EQUAL 23 )
44 if (CMAKE_CXX_MODULE_STD)
55 set (CMAKE_CXX_SCAN_FOR_MODULES 1)
6+ # for cmake version 4.0.2
67 set (CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
7- "d0edc3af-4c50-42ea-a356-e2862fe7a444 "
8+ "a9e1cf81-9932-4810-974b-6eccaf14e457 "
89 )
910 add_definitions (-DHAS_STDLIB_MODULES)
1011 endif ()
1112 set (CMAKE_CXX_STANDARD_REQUIRED OFF )
1213endif ()
1314
14- cmake_minimum_required (VERSION 3.28... 4.0)
15+ cmake_minimum_required (VERSION 4.0)
1516
1617project (
1718 beman.scope
@@ -43,6 +44,7 @@ endif()
4344
4445include (CMakePrintHelpers)
4546cmake_print_variables(
47+ CMAKE_CXX_STANDARD
4648 CMAKE_CXX_SCAN_FOR_MODULES
4749 CMAKE_CXX_MODULE_STD
4850 CMAKE_CXX_COMPILER_IMPORT_STD
@@ -84,6 +86,7 @@ if(CMAKE_CXX_SCAN_FOR_MODULES)
8486 BASE_DIRS include
8587 FILES include /beman/scope/beman.scope.cppm
8688 )
89+ target_compile_features (beman.scope PUBLIC cxx_std_23)
8790else ()
8891 add_library (beman.scope INTERFACE )
8992 target_sources (
9396 BASE_DIRS include
9497 FILES include /beman/scope/scope.hpp
9598 )
99+ # prevent "not include "cxx_std_20" (or newer) among its `target_compile_features`; no C++ standard found"
100+ target_compile_features (beman.scope PUBLIC cxx_std_20)
96101endif ()
97102
98103add_library (beman::scope ALIAS beman.scope)
You can’t perform that action at this time.
0 commit comments