diff options
| -rw-r--r-- | .gitlab-ci.yml | 12 | ||||
| -rwxr-xr-x | .gitlab/ci/cmake.ps1 | 4 | ||||
| -rwxr-xr-x | .gitlab/ci/cmake.sh | 8 | ||||
| -rw-r--r-- | .gitlab/os-windows.yml | 55 | ||||
| -rw-r--r-- | Help/command/FIND_XXX_REGISTRY_VIEW.txt | 32 | ||||
| -rw-r--r-- | Help/command/ctest_test.rst | 7 | ||||
| -rw-r--r-- | Help/command/find_package.rst | 6 | ||||
| -rw-r--r-- | Help/manual/cmake-language.7.rst | 14 | ||||
| -rw-r--r-- | Help/manual/cmake-policies.7.rst | 2 | ||||
| -rw-r--r-- | Help/policy/CMP0134.rst | 5 | ||||
| -rw-r--r-- | Modules/FindBoost.cmake | 4 | ||||
| -rw-r--r-- | Modules/FindCUDAToolkit.cmake | 2 | ||||
| -rw-r--r-- | Source/cmGeneratorTarget.cxx | 2 | ||||
| -rw-r--r-- | Source/cmQtAutoMocUic.cxx | 3 | ||||
| -rw-r--r-- | Source/cmSourceGroup.cxx | 15 | ||||
| -rw-r--r-- | Source/cmSourceGroup.h | 6 | ||||
| -rw-r--r-- | Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake | 3 | ||||
| -rw-r--r-- | Tests/RunCMake/VS10Project/RunCMakeTest.cmake | 1 | ||||
| -rw-r--r-- | Tests/RunCMake/VS10Project/SourceGroupFileSet-check.cmake | 13 | ||||
| -rw-r--r-- | Tests/RunCMake/VS10Project/SourceGroupFileSet.cmake | 3 | ||||
| -rw-r--r-- | Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake | 5 | ||||
| -rw-r--r-- | Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake | 4 |
22 files changed, 137 insertions, 69 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8f26508..65bcd5f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1032,7 +1032,7 @@ b:windows-x86_64-package: - .windows_x86_64_package - .cmake_build_windows - .cmake_build_package_artifacts - - .windows_tags_nonconcurrent_vs2022 + - .windows_tags_x86_64_package - .run_only_for_package dependencies: - p:doc-package @@ -1046,7 +1046,7 @@ k:windows-x86_64-package: - .windows_x86_64_package - .cmake_package_windows - .cmake_release_artifacts - - .windows_tags_nonconcurrent_vs2022 + - .windows_tags_x86_64_package - .run_only_for_package dependencies: - b:windows-x86_64-package @@ -1069,7 +1069,7 @@ b:windows-i386-package: - .windows_i386_package - .cmake_build_windows - .cmake_build_package_artifacts - - .windows_tags_nonconcurrent_vs2022 + - .windows_tags_x86_64_package - .run_only_for_package dependencies: - p:doc-package @@ -1083,7 +1083,7 @@ k:windows-i386-package: - .windows_i386_package - .cmake_package_windows - .cmake_release_artifacts - - .windows_tags_nonconcurrent_vs2022 + - .windows_tags_x86_64_package - .run_only_for_package dependencies: - b:windows-i386-package @@ -1106,7 +1106,7 @@ b:windows-arm64-package: - .windows_arm64_package - .cmake_build_windows - .cmake_build_package_artifacts - - .windows_tags_nonconcurrent_vs2022_arm64 + - .windows_tags_arm64_package - .run_only_for_package dependencies: - p:doc-package @@ -1120,7 +1120,7 @@ k:windows-arm64-package: - .windows_arm64_package - .cmake_package_windows - .cmake_release_artifacts - - .windows_tags_nonconcurrent_vs2022_arm64 + - .windows_tags_arm64_package - .run_only_for_package dependencies: - b:windows-arm64-package diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index bea3286..98aeae3 100755 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -1,7 +1,7 @@ $erroractionpreference = "stop" -$version = "3.24.0-rc1" -$sha256sum = "8D075F5C663263713008FB77E31956C808D3A30074C3655F16EB76A0800F99D6" +$version = "3.24.1" +$sha256sum = "C1B17431A16337D517F7BA78C7067B6F143A12686CB8087F3DD32F3FA45F5AAE" $filename = "cmake-$version-windows-x86_64" $tarball = "$filename.zip" diff --git a/.gitlab/ci/cmake.sh b/.gitlab/ci/cmake.sh index 0d52e19..137da06 100755 --- a/.gitlab/ci/cmake.sh +++ b/.gitlab/ci/cmake.sh @@ -2,22 +2,22 @@ set -e -readonly version="3.24.0-rc1" +readonly version="3.24.1" case "$(uname -s)-$(uname -m)" in Linux-x86_64) shatool="sha256sum" - sha256sum="183ff011a2177d0a683e81d645d02c0ed8ff790449158522928ef069775091cc" + sha256sum="827bf068cfaa23a9fb95f990c9f8a7ed8f2caeb3af62b5c0a2fed7a8dd6dde3e" platform="linux-x86_64" ;; Linux-aarch64) shatool="sha256sum" - sha256sum="f26642d5bc503de6bf7dd2d06afb8777d5862aa44e556cdf4155fec60e534d04" + sha256sum="d50c40135df667ed659f8e4eb7cf7d53421250304f7b3e1a70af9cf3d0f2ab18" platform="linux-aarch64" ;; Darwin-*) shatool="shasum -a 256" - sha256sum="417fde30f2cf96f53eaf27b1e510924ce441f0449e53974f2156cb19d32978b9" + sha256sum="71bb8db69826d74c395a3c3bbf8b773dbe9f54a2c7331266ba70da303e9c97a1" platform="macos-universal" ;; *) diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index b9b91fb..282cf1e 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -35,15 +35,27 @@ variables: VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" VCVARSPLATFORM: "x64" - VCVARSVERSION: "14.32.31326" + VCVARSVERSION: "14.33.31629" .windows_vcvarsall_vs2022_x86: variables: VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" VCVARSPLATFORM: "x86" + VCVARSVERSION: "14.33.31629" + +.windows_vcvarsall_vs2022_x64_package: + variables: + VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" + VCVARSPLATFORM: "x64" + VCVARSVERSION: "14.32.31326" + +.windows_vcvarsall_vs2022_x86_package: + variables: + VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" + VCVARSPLATFORM: "x86" VCVARSVERSION: "14.32.31326" -.windows_vcvarsall_vs2022_x64_arm64: +.windows_vcvarsall_vs2022_x64_arm64_package: variables: VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat" VCVARSPLATFORM: "x64_arm64" @@ -68,7 +80,7 @@ .windows_x86_64_package: extends: - .windows_package - - .windows_vcvarsall_vs2022_x64 + - .windows_vcvarsall_vs2022_x64_package variables: CMAKE_CONFIGURATION: windows_x86_64_package @@ -76,7 +88,7 @@ .windows_i386_package: extends: - .windows_package - - .windows_vcvarsall_vs2022_x86 + - .windows_vcvarsall_vs2022_x86_package variables: CMAKE_CONFIGURATION: windows_i386_package @@ -84,7 +96,7 @@ .windows_arm64_package: extends: - .windows_package - - .windows_vcvarsall_vs2022_x64_arm64 + - .windows_vcvarsall_vs2022_x64_arm64_package variables: CMAKE_CONFIGURATION: windows_arm64_package @@ -98,7 +110,7 @@ CMAKE_CONFIGURATION: windows_vs2022_x64 CMAKE_GENERATOR: "Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM: "x64" - CMAKE_GENERATOR_TOOLSET: "v143,version=14.32.31326" + CMAKE_GENERATOR_TOOLSET: "v143,version=14.33.31629" CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" .windows_vs2019_x64: @@ -232,16 +244,7 @@ - windows - shell - vs2022 - - msvc-19.32 - - nonconcurrent - -.windows_tags_nonconcurrent_vs2022_arm64: - tags: - - cmake # Since this is a bare runner, pin to a project. - - windows - - shell - - vs2022 - - msvc-19.32-arm64 + - msvc-19.33 - nonconcurrent .windows_tags_concurrent_vs2022: @@ -250,7 +253,7 @@ - windows - shell - vs2022 - - msvc-19.32 + - msvc-19.33 - concurrent .windows_tags_concurrent_vs2019: @@ -269,6 +272,24 @@ - shell - concurrent +.windows_tags_x86_64_package: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows + - shell + - vs2022 + - msvc-19.32 + - nonconcurrent + +.windows_tags_arm64_package: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows + - shell + - vs2022 + - msvc-19.32-arm64 + - nonconcurrent + ## Windows-specific scripts .before_script_windows: &before_script_windows diff --git a/Help/command/FIND_XXX_REGISTRY_VIEW.txt b/Help/command/FIND_XXX_REGISTRY_VIEW.txt index 39b156f..6cab1d1 100644 --- a/Help/command/FIND_XXX_REGISTRY_VIEW.txt +++ b/Help/command/FIND_XXX_REGISTRY_VIEW.txt @@ -1,15 +1,15 @@ Specify which registry views must be queried. This option is only meaningful -on ``Windows`` platform and will be ignored on other ones. When not -specified, |FIND_XXX_REGISTRY_VIEW_DEFAULT| view is used when :policy:`CMP0134` -policy is ``NEW``. Refer to :policy:`CMP0134` policy for default view when -policy is ``OLD`` or undefined. +on ``Windows`` platforms and will be ignored on other ones. When not +specified, the |FIND_XXX_REGISTRY_VIEW_DEFAULT| view is used when the +:policy:`CMP0134` policy is ``NEW``. Refer to :policy:`CMP0134` for the +default view when the policy is ``OLD``. ``64`` - Query the 64bit registry. On ``32bit Windows``, returns always the string + Query the 64-bit registry. On 32-bit Windows, it always returns the string ``/REGISTRY-NOTFOUND``. ``32`` - Query the 32bit registry. + Query the 32-bit registry. ``64_32`` Query both views (``64`` and ``32``) and generate a path for each. @@ -18,24 +18,24 @@ policy is ``OLD`` or undefined. Query both views (``32`` and ``64``) and generate a path for each. ``HOST`` - Query the registry matching the architecture of the host: ``64`` on ``64bit - Windows`` and ``32`` on ``32bit Windows``. + Query the registry matching the architecture of the host: ``64`` on 64-bit + Windows and ``32`` on 32-bit Windows. ``TARGET`` - Query the registry matching the architecture specified by - :variable:`CMAKE_SIZEOF_VOID_P` variable. If not defined, fallback to + Query the registry matching the architecture specified by the + :variable:`CMAKE_SIZEOF_VOID_P` variable. If not defined, fall back to ``HOST`` view. ``BOTH`` - Query both views (``32`` and ``64``). The order depends of the following - rules: If :variable:`CMAKE_SIZEOF_VOID_P` variable is defined. Use the - following view depending of the content of this variable: + Query both views (``32`` and ``64``). The order depends on the following + rules: If the :variable:`CMAKE_SIZEOF_VOID_P` variable is defined, use the + following view depending on the content of this variable: * ``8``: ``64_32`` * ``4``: ``32_64`` - If :variable:`CMAKE_SIZEOF_VOID_P` variable is not defined, rely on + If the :variable:`CMAKE_SIZEOF_VOID_P` variable is not defined, rely on the architecture of the host: - * ``64bit``: ``64_32`` - * ``32bit``: ``32`` + * 64-bit: ``64_32`` + * 32-bit: ``32`` diff --git a/Help/command/ctest_test.rst b/Help/command/ctest_test.rst index 11ebdbd..65f82d7 100644 --- a/Help/command/ctest_test.rst +++ b/Help/command/ctest_test.rst @@ -174,7 +174,10 @@ The options are: See also the :variable:`CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE`, :variable:`CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE` and -:variable:`CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variables. +:variable:`CTEST_CUSTOM_TEST_OUTPUT_TRUNCATION` variables, along with their +corresponding :manual:`ctest(1)` command line options +``--test-output-size-passed``, ``--test-output-size-failed``, and +``--test-output-truncation``. .. _`Additional Test Measurements`: @@ -236,7 +239,7 @@ The following example demonstrates how to upload test images to CDash. "/dir/to/valid_img.gif</CTestMeasurementFile>" << std::endl; std::cout << - "<CTestMeasurementFile type=\"image/png\" name=\"AlgoResult\"> << + "<CTestMeasurementFile type=\"image/png\" name=\"AlgoResult\">" << "/dir/to/img.png</CTestMeasurementFile>" << std::endl; diff --git a/Help/command/find_package.rst b/Help/command/find_package.rst index ea0e817..c96d84e 100644 --- a/Help/command/find_package.rst +++ b/Help/command/find_package.rst @@ -142,9 +142,9 @@ should find all components, no components or some well-defined subset of the available components. .. versionadded:: 3.24 - The ``REGISTRY_VIEW`` keyword enables to specify which registry views must be - queried. This keyword is only meaningful on ``Windows`` platform and will be - ignored on all other ones. Formally, it is up to the target package how to + The ``REGISTRY_VIEW`` keyword specifies which registry views should be + queried. This keyword is only meaningful on ``Windows`` platforms and will + be ignored on all others. Formally, it is up to the target package how to interpret the registry view information given to it. .. versionadded:: 3.24 diff --git a/Help/manual/cmake-language.7.rst b/Help/manual/cmake-language.7.rst index 02cfa7e..16917ff 100644 --- a/Help/manual/cmake-language.7.rst +++ b/Help/manual/cmake-language.7.rst @@ -391,8 +391,8 @@ Variable References A *variable reference* has the form ``${<variable>}`` and is evaluated inside a `Quoted Argument`_ or an `Unquoted Argument`_. -A variable reference is replaced by the value of the variable, -or by the empty string if the variable is not set. +A variable reference is replaced by the value of the specified +variable or cache entry, or if neither is set, by the empty string. Variable references can nest and are evaluated from the inside out, e.g. ``${outer_${inner_variable}_variable}``. @@ -408,14 +408,16 @@ and how their values are set. An *environment variable reference* has the form ``$ENV{<variable>}``. See the `Environment Variables`_ section for more information. -A *cache variable reference* has the form ``$CACHE{<variable>}``. +A *cache variable reference* has the form ``$CACHE{<variable>}``, +and is replaced by the value of the specified cache entry without +checking for a normal variable of the same name. If the cache +entry does not exist, it is replaced by the empty string. See :variable:`CACHE` for more information. The :command:`if` command has a special condition syntax that allows for variable references in the short form ``<variable>`` -instead of ``${<variable>}``. -However, environment and cache variables always need to be -referenced as ``$ENV{<variable>}`` or ``$CACHE{<variable>}``. +instead of ``${<variable>}``. However, environment variables +always need to be referenced as ``$ENV{<variable>}``. Comments -------- diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 43eb200..f6ab0c7 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -63,7 +63,7 @@ Policies Introduced by CMake 3.24 CMP0137: try_compile() passes platform variables in project mode. </policy/CMP0137> CMP0136: Watcom runtime library flags are selected by an abstraction. </policy/CMP0136> CMP0135: ExternalProject ignores timestamps in archives by default for the URL download method. </policy/CMP0135> - CMP0134: Fallback to \"HOST\" Windows registry view when \"TARGET\" view is not usable. </policy/CMP0134> + CMP0134: Fallback to "HOST" Windows registry view when "TARGET" view is not usable. </policy/CMP0134> CMP0133: The CPack module disables SLA by default in the CPack DragNDrop Generator. </policy/CMP0133> CMP0132: Do not set compiler environment variables on first run. </policy/CMP0132> CMP0131: LINK_LIBRARIES supports the LINK_ONLY generator expression. </policy/CMP0131> diff --git a/Help/policy/CMP0134.rst b/Help/policy/CMP0134.rst index 2b562bc..a94012c 100644 --- a/Help/policy/CMP0134.rst +++ b/Help/policy/CMP0134.rst @@ -31,9 +31,6 @@ The ``NEW`` behavior for this policy is to use registry views ``TARGET`` and This policy was introduced in CMake version 3.24. Use the :command:`cmake_policy` command to set this policy to ``OLD`` or ``NEW`` explicitly. Unlike many policies, CMake version |release| does *not* warn -by default when this policy is not set and simply uses ``OLD`` behavior. -See documentation of the -:variable:`CMAKE_POLICY_WARNING_CMP0133 <CMAKE_POLICY_WARNING_CMP<NNNN>>` -variable to control the warning. +when this policy is not set and simply uses ``OLD`` behavior. .. include:: DEPRECATED.txt diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 0f407c8..0cea239 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -1380,7 +1380,7 @@ function(_Boost_COMPONENT_DEPENDENCIES component _ret) set(_Boost_TIMER_DEPENDENCIES chrono) set(_Boost_WAVE_DEPENDENCIES filesystem serialization thread chrono atomic) set(_Boost_WSERIALIZATION_DEPENDENCIES serialization) - if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.80.0 AND NOT Boost_NO_WARN_NEW_VERSIONS) + if(Boost_VERSION_STRING VERSION_GREATER_EQUAL 1.81.0 AND NOT Boost_NO_WARN_NEW_VERSIONS) message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets") endif() endif() @@ -1653,7 +1653,7 @@ else() # _Boost_COMPONENT_HEADERS. See the instructions at the top of # _Boost_COMPONENT_DEPENDENCIES. set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} - "1.79.0" "1.79" + "1.80.0" "1.80" "1.79.0" "1.79" "1.78.0" "1.78" "1.77.0" "1.77" "1.76.0" "1.76" "1.75.0" "1.75" "1.74.0" "1.74" "1.73.0" "1.73" "1.72.0" "1.72" "1.71.0" "1.71" "1.70.0" "1.70" "1.69.0" "1.69" "1.68.0" "1.68" "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65" diff --git a/Modules/FindCUDAToolkit.cmake b/Modules/FindCUDAToolkit.cmake index 538e132..edad44a 100644 --- a/Modules/FindCUDAToolkit.cmake +++ b/Modules/FindCUDAToolkit.cmake @@ -980,7 +980,7 @@ if(CUDAToolkit_FOUND) find_path(CUDAToolkit_CUPTI_INCLUDE_DIR cupti.h PATHS "${CUDAToolkit_ROOT_DIR}/extras/CUPTI/include" "${CUDAToolkit_INCLUDE_DIR}/../extras/CUPTI/include" - "${CUDATookit_INCLUDE_DIR}" + "${CUDAToolkit_INCLUDE_DIR}" NO_DEFAULT_PATH) if(CUDAToolkit_CUPTI_INCLUDE_DIR) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 0c351ad..99afee9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1702,7 +1702,7 @@ void addFileSetEntry(cmGeneratorTarget const* headTarget, } bool found = false; for (auto const& sg : headTarget->Makefile->GetSourceGroups()) { - if (sg.MatchesFiles(path)) { + if (sg.MatchChildrenFiles(path)) { found = true; break; } diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 8c09b56..8adaa6c 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -2183,6 +2183,9 @@ void cmQtAutoMocUicT::JobMocsCompilationT::Process() content += "// No files found that require moc or the moc files are " "included\n" "void " + + functionName + + "();\n" + "void " + functionName + "() {}\n"; } else { // Valid content diff --git a/Source/cmSourceGroup.cxx b/Source/cmSourceGroup.cxx index 155068cb..6019de1 100644 --- a/Source/cmSourceGroup.cxx +++ b/Source/cmSourceGroup.cxx @@ -124,6 +124,21 @@ cmSourceGroup* cmSourceGroup::MatchChildrenFiles(const std::string& name) return nullptr; } +const cmSourceGroup* cmSourceGroup::MatchChildrenFiles( + const std::string& name) const +{ + if (this->MatchesFiles(name)) { + return this; + } + for (const cmSourceGroup& group : this->Internal->GroupChildren) { + const cmSourceGroup* result = group.MatchChildrenFiles(name); + if (result) { + return result; + } + } + return nullptr; +} + cmSourceGroup* cmSourceGroup::MatchChildrenRegex(const std::string& name) { for (cmSourceGroup& group : this->Internal->GroupChildren) { diff --git a/Source/cmSourceGroup.h b/Source/cmSourceGroup.h index 295240d..9ce71c7 100644 --- a/Source/cmSourceGroup.h +++ b/Source/cmSourceGroup.h @@ -80,6 +80,12 @@ public: cmSourceGroup* MatchChildrenFiles(const std::string& name); /** + * Check if the given name matches this group's explicit file list + * in children. + */ + const cmSourceGroup* MatchChildrenFiles(const std::string& name) const; + + /** * Check if the given name matches this group's regex in children. */ cmSourceGroup* MatchChildrenRegex(const std::string& name); diff --git a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake index e5bfac4..58a111a 100644 --- a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake +++ b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake @@ -1,5 +1,8 @@ include(RunCMake) +# Do not let ccache modify paths checked by the test cases. +unset(ENV{CCACHE_BASEDIR}) + function(run_symlink_test_case) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/CMakeCache.txt" diff --git a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake index ee8821a..e540b9f 100644 --- a/Tests/RunCMake/VS10Project/RunCMakeTest.cmake +++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake @@ -16,6 +16,7 @@ run_cmake(NoImpLib) run_cmake(RuntimeLibrary) run_cmake(SourceGroupCMakeLists) run_cmake(SourceGroupTreeCMakeLists) +run_cmake(SourceGroupFileSet) run_cmake(VsConfigurationType) run_cmake(VsTargetsFileReferences) run_cmake(VsCustomProps) diff --git a/Tests/RunCMake/VS10Project/SourceGroupFileSet-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupFileSet-check.cmake new file mode 100644 index 0000000..fb2eecc --- /dev/null +++ b/Tests/RunCMake/VS10Project/SourceGroupFileSet-check.cmake @@ -0,0 +1,13 @@ +cmake_policy(SET CMP0011 NEW) + +set(vcFiltersFile "${RunCMake_TEST_BINARY_DIR}/SourceGroupFileSet.vcxproj.filters") +if(NOT EXISTS "${vcFiltersFile}") + set(RunCMake_TEST_FAILED "Filters file ${vcFiltersFile} does not exist.") + return() +endif() + +file(STRINGS "${vcFiltersFile}" lines) + +include(${RunCMake_TEST_SOURCE_DIR}/SourceGroupHelpers.cmake) + +find_source_group("${lines}" "Header Files\\SourceGroupFileSet") diff --git a/Tests/RunCMake/VS10Project/SourceGroupFileSet.cmake b/Tests/RunCMake/VS10Project/SourceGroupFileSet.cmake new file mode 100644 index 0000000..9541687 --- /dev/null +++ b/Tests/RunCMake/VS10Project/SourceGroupFileSet.cmake @@ -0,0 +1,3 @@ +add_library(SourceGroupFileSet INTERFACE) +target_sources(SourceGroupFileSet PUBLIC FILE_SET HEADERS FILES iface.h) +source_group("Header Files/SourceGroupFileSet" FILES iface.h) diff --git a/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake b/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake index c82a66e..3a5d2e7 100644 --- a/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake +++ b/Tests/RunCMake/VS10Project/SourceGroupHelpers.cmake @@ -1,8 +1,9 @@ function(find_source_group LINES NAME) set(foundFileFilter 0) set(foundFilter 0) + string(REPLACE "\\" "\\\\" regexName "${NAME}") foreach(line IN LISTS LINES) - if(line MATCHES "<Filter>${NAME}</Filter>") + if(line MATCHES "<Filter>${regexName}</Filter>") if(foundFileFilter) set(RunCMake_TEST_FAILED "Multiple files listed with filter for ${NAME}." PARENT_SCOPE) set(FILTER_FOUND 0 PARENT_SCOPE) @@ -10,7 +11,7 @@ function(find_source_group LINES NAME) endif() set(foundFileFilter 1) endif() - if(line MATCHES "<Filter.*Include=\"${NAME}\"") + if(line MATCHES "<Filter.*Include=\"${regexName}\"") if(foundFilter) set(RunCMake_TEST_FAILED "Multiple copies of ${NAME} filter listed." PARENT_SCOPE) set(FILTER_FOUND 0 PARENT_SCOPE) diff --git a/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake index ee0c412..28d0d29 100644 --- a/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake +++ b/Tests/RunCMake/VS10Project/SourceGroupTreeCMakeLists-check.cmake @@ -18,9 +18,9 @@ set(SOURCE_GROUPS_TO_FIND "SourcesPrefix\\PrefixedNested" ) -foreach(GROUP_NAME IN LISTS ${SOURCE_GROUPS_TO_FIND}) +foreach(GROUP_NAME IN LISTS SOURCE_GROUPS_TO_FIND) find_source_group("${lines}" ${GROUP_NAME}) - if(NOT ${FILTER_FOUND}) + if(NOT FILTER_FOUND) return() endif() endforeach() |
