diff options
50 files changed, 129 insertions, 41 deletions
diff --git a/Help/manual/cmake-cxxmodules.7.rst b/Help/manual/cmake-cxxmodules.7.rst index a082f58..5776421 100644 --- a/Help/manual/cmake-cxxmodules.7.rst +++ b/Help/manual/cmake-cxxmodules.7.rst @@ -27,7 +27,7 @@ following queries. The first query that provides a yes/no answer is used. - If the :prop_tgt:`CXX_SCAN_FOR_MODULES` target property is set, its value will be used. Set the :variable:`CMAKE_CXX_SCAN_FOR_MODULES` variable to initialize this property on all targets as they are created. -- Otherwise the source will be scanned. +- Otherwise, the source file will be scanned. See policy :policy:`CMP0155`. Compiler Support ================ diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index dff4f34..047dfd1 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.28 .. toctree:: :maxdepth: 1 + CMP0155: C++ sources in targets with at least C++20 are scanned for imports. </policy/CMP0155> CMP0154: Generated files are private by default in targets using file sets. </policy/CMP0154> CMP0153: The exec_program command should not be called. </policy/CMP0153> CMP0152: file(REAL_PATH) resolves symlinks before collapsing ../ components. </policy/CMP0152> diff --git a/Help/policy/CMP0155.rst b/Help/policy/CMP0155.rst new file mode 100644 index 0000000..2dafadf --- /dev/null +++ b/Help/policy/CMP0155.rst @@ -0,0 +1,26 @@ +CMP0155 +------- + +.. versionadded:: 3.28 + +C++ sources in targets with at least C++20 are scanned for imports. + +CMake 3.27 and below assume that C++ sources do not ``import`` modules. +CMake 3.28 and above prefer to assume that C++ sources in targets using C++20 +or higher might ``import`` modules, and must be scanned before compiling, +unless explicitly disabled. This policy provides compatibility for projects +that use C++20 or higher, without modules, that have not been updated to turn +off scanning, e.g., via the :variable:`CMAKE_CXX_SCAN_FOR_MODULES` variable. +See the :manual:`cmake-cxxmodules(7)` manual for more details on C++ module +support. + +The ``OLD`` behavior for this policy is to assume that C++ 20 and newer +sources do not import modules. The ``NEW`` behavior for this policy is to +assume that C++ 20 and newer files may import modules, and need to be scanned. + +This policy was introduced in CMake version 3.28. Use the +:command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly. +Unlike many policies, CMake version |release| does *not* warn +when this policy is not set and simply uses ``OLD`` behavior. + +.. include:: DEPRECATED.txt diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 6ca0e14..67462f5 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -871,6 +871,13 @@ cm::optional<cmTryCompileResult> cmCoreTryCompile::TryCompileCode( ? "NEW" : "OLD"); + /* Set the appropriate policy information for C++ module support */ + fprintf(fout, "cmake_policy(SET CMP0155 %s)\n", + this->Makefile->GetPolicyStatus(cmPolicies::CMP0155) == + cmPolicies::NEW + ? "NEW" + : "OLD"); + // Workaround for -Wl,-headerpad_max_install_names issue until we can avoid // adding that flag in the platform and compiler language files fprintf(fout, diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 22092b1..96fcf7e 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -9261,7 +9261,22 @@ bool cmGeneratorTarget::NeedDyndepForSource(std::string const& lang, if (tgtProp.IsSet()) { return tgtProp.IsOn(); } - return true; + + bool policyAnswer = false; + switch (this->GetPolicyStatusCMP0155()) { + case cmPolicies::WARN: + case cmPolicies::OLD: + // The OLD behavior is to not scan the source. + policyAnswer = false; + break; + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::NEW: + // The NEW behavior is to scan the source. + policyAnswer = true; + break; + } + return policyAnswer; } void cmGeneratorTarget::BuildFileSetInfoCache(std::string const& config) const diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index e894073..1ea2ce2 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -469,6 +469,10 @@ class cmMakefile; SELECT( \ POLICY, CMP0154, \ "Generated files are private by default in targets using file sets.", 3, \ + 28, 0, cmPolicies::WARN) \ + SELECT( \ + POLICY, CMP0155, \ + "C++ sources in targets with at least C++20 are scanned for imports", 3, \ 28, 0, cmPolicies::WARN) #define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1) @@ -508,7 +512,8 @@ class cmMakefile; F(CMP0119) \ F(CMP0131) \ F(CMP0142) \ - F(CMP0154) + F(CMP0154) \ + F(CMP0155) #define CM_FOR_EACH_CUSTOM_COMMAND_POLICY(F) \ F(CMP0116) \ diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt b/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt b/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt new file mode 100644 index 0000000..39575d4 --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW-stderr.txt @@ -0,0 +1,8 @@ +(CMake Error in CMakeLists.txt: +( The target named "cmp0155-new" has C\+\+ sources that use modules but the + compiler does not provide a way to discover the import graph dependencies +| The target named "cmp0155-new" contains C\+\+ sources that use modules which + is not supported by the generator +) +)* +CMake Generate step failed. Build files cannot be regenerated correctly. diff --git a/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake new file mode 100644 index 0000000..bea858b --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-NEW.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +unset(CMAKE_CXX_SCANDEP_SOURCE) + +cmake_policy(SET CMP0155 NEW) + +add_executable(cmp0155-new + sources/module-use.cxx) +set_target_properties(cmp0155-new + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON) diff --git a/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake b/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake new file mode 100644 index 0000000..201598e --- /dev/null +++ b/Tests/RunCMake/CXXModules/CMP0155-OLD.cmake @@ -0,0 +1,11 @@ +enable_language(CXX) +unset(CMAKE_CXX_SCANDEP_SOURCE) + +cmake_policy(SET CMP0155 OLD) + +add_executable(cmp0155-old + sources/module-use.cxx) +set_target_properties(cmp0155-old + PROPERTIES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED ON) diff --git a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake index a697659..8b22687 100644 --- a/Tests/RunCMake/CXXModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModules/RunCMakeTest.cmake @@ -17,6 +17,8 @@ if ("cxx_std_20" IN_LIST CMAKE_CXX_COMPILE_FEATURES) run_cmake(NoScanningSourceFileProperty) run_cmake(NoScanningTargetProperty) + run_cmake(CMP0155-OLD) + run_cmake(CMP0155-NEW) endif () if (RunCMake_GENERATOR MATCHES "Ninja") diff --git a/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt index 4d1997c..c1b000e 100644 --- a/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/circular/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_circular CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt index 78a1d0b..153a2df 100644 --- a/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/deep-chain/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_deep_chain CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt index 27be7a8..51ad167 100644 --- a/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/duplicate/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_duplicate CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt index 71e7b62..cbe8fb7 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_bmi_and_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt index e23cefe..0666ff1 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-build/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_bmi_and_interfaces REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt index e675507..c8679d6 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_bmi_and_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt index eb6c19c..36b0e8b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-bmi-and-interface-install/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_bmi_and_interfaces REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt index 2eb4d5f..b9c7bb3 100644 --- a/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-compile-commands/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_compile_commands CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt index bc2ae7f..560994e 100644 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_include_directories CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt index 444882d..3d4e687 100644 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_include_directories CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt index 9cdb7ff..12a533b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-include-directories-install/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) set(CMAKE_EXPERIMENTAL_CXX_MODULE_CMAKE_API "ac01f462-0f5f-432a-86aa-acef252918a6") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt index 136e885..df471af 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt index 2e6d603..95fb6e8 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-build/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_interfaces REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt index df87980..019ae4a 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt index a2c51b0..725090e 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-install/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_interfaces REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt index a93e3a4..decadf7 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces_no_properties CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt index 4b4fe04..cd8d1df 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-build/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_interfaces_no_properties REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt index 99e67e7..be32ecd 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt index 4b4fe04..cd8d1df 100644 --- a/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-interface-no-properties-install/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_interfaces_no_properties REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt index 86a608b..a58e287 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-build/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_usage CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt index 4a6728b..c84153d 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-build/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_usage REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt index 11f53b0..3d7d67b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-install/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_export_usage CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt index 28ff3bd..ceb428b 100644 --- a/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/export-usage-install/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library NONE) find_package(export_usage REQUIRED) diff --git a/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt index 9a8da3d..efa825a 100644 --- a/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/generated/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_generated CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt index 946792c..8e1db5d 100644 --- a/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/import-modules/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_import_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt index efaca0e..0beb672 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi-and-interfaces/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_install_bmi_and_interfaces CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt index 4e039f9..4047612 100644 --- a/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/install-bmi/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_install_bmi CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt index f5e9d94..bf99f7c 100644 --- a/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/internal-partitions/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_internal_partitions CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt index 27fd94f..97d2325 100644 --- a/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/library/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_library CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt index 238e30a..c858b3e 100644 --- a/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/object-library/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_objlib CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt index 3a7b0d4..07d32ae 100644 --- a/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/partitions/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_partitions CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt index 600fec4..f59f237 100644 --- a/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/public-req-private/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_public_req_private CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt index 910c515..68da617 100644 --- a/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/req-private-other-target/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.26) +cmake_minimum_required(VERSION 3.26...3.28) project(req_private_other_target CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt index 997bbb1..8a47b0c 100644 --- a/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/same-src-name/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.27) +cmake_minimum_required(VERSION 3.27...3.28) project(cxx_modules_same_src_name CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt index d53acfc..f5e5da6 100644 --- a/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/scan_properties/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(scan_properties CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt index 442e425..43f425a 100644 --- a/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/simple/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_simple CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt index dee61f1..66c32ba 100644 --- a/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/try-compile/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_try_compile CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt b/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt index fb03571..9480d74 100644 --- a/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt +++ b/Tests/RunCMake/CXXModules/examples/try-run/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.24) +cmake_minimum_required(VERSION 3.24...3.28) project(cxx_modules_try_run CXX) include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake") diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index 7e91b76..c2187ae 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -38,6 +38,7 @@ \* CMP0131 \* CMP0142 \* CMP0154 + \* CMP0155 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) |