Skip to content

Commit 3b0298f

Browse files
committed
cmake: claim knowledge of CMake 3.29
This is true because the code considers 3.29 in the next block. Of particular importance, this sets CMP0115 which scans C++20 sources by default. This allows tests to use `add_executable(t uses_module.cpp)` without having to explicitly say "I want to use `import ctre;`". In the non-module build, explicitly turn off scanning since it is not used.
1 parent 08909b5 commit 3b0298f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.14.0)
1+
cmake_minimum_required(VERSION 3.14...3.29)
22

33
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.29.20240416")
44
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "0e5b6991-d74f-4b3d-a41c-cf096e0b2508")
@@ -113,6 +113,7 @@ else()
113113
endif()
114114

115115
target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_${CTRE_CXX_STANDARD})
116+
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_SCAN_FOR_MODULES 0)
116117

117118
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-targets)
118119
endif()

0 commit comments

Comments
 (0)