Merge topic 'normalize-install-path'

0f1ba8f6bb install: Normalize DESTINATION `.`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !11755
This commit is contained in:
Brad King
2026-03-04 09:31:42 -05:00
committed by Kitware Robot
4 changed files with 8 additions and 0 deletions
+4
View File
@@ -217,6 +217,10 @@ bool cmInstallGenerator::InstallsForConfig(std::string const& config)
std::string cmInstallGenerator::ConvertToAbsoluteDestination(
std::string const& dest)
{
if (dest == ".") {
return "${CMAKE_INSTALL_PREFIX}";
}
std::string result;
if (!dest.empty() && !cmSystemTools::FileIsFullPath(dest)) {
result = "${CMAKE_INSTALL_PREFIX}/";
@@ -0,0 +1,2 @@
-- Installing: [^
]+/Tests/RunCMake/install/FILES-DESTINATION-dot-build/root-all/empty\.c
@@ -0,0 +1 @@
install(FILES empty.c DESTINATION ".")
@@ -127,6 +127,7 @@ if(CMake_TEST_ISPC)
run_install_test(FILES-EXTRA_ISPC_TARGET_OBJECTS)
endif()
run_install_test(FILES-DESTINATION-dot)
run_install_test(TARGETS-InstallFromSubDir)
run_install_test(TARGETS-OPTIONAL)