diff options
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 10 | ||||
-rw-r--r-- | Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index b752c41..1e6624e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -4695,10 +4695,12 @@ std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake( std::string cmGlobalXCodeGenerator::RelativeToSource(const std::string& p) { - // We force conversion because Xcode breakpoints do not work unless - // they are in a file named relative to the source tree. - return cmSystemTools::ForceToRelativePath( - this->CurrentRootGenerator->GetCurrentSourceDirectory(), p); + std::string const& rootSrc = + this->CurrentRootGenerator->GetCurrentSourceDirectory(); + if (cmSystemTools::IsSubDirectory(p, rootSrc)) { + return cmSystemTools::ForceToRelativePath(rootSrc, p); + } + return p; } std::string cmGlobalXCodeGenerator::RelativeToBinary(const std::string& p) diff --git a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake index 304e9de..3f3aafe 100644 --- a/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake +++ b/Tests/RunCMake/SymlinkTrees/RunCMakeTest.cmake @@ -82,12 +82,6 @@ function (run_symlink_test case src bin src_from_bin bin_from_src) message(STATUS "${case}-exe-build - SKIPPED") return() endif() - if(case MATCHES "^(different|asymmetric)-src_in_bin$" AND RunCMake_GENERATOR STREQUAL "Xcode") - # FIXME: The Xcode generator computes an incorrect relative path. - message(STATUS "${case}-exe - SKIPPED") - message(STATUS "${case}-exe-build - SKIPPED") - return() - endif() unset(RunCMake_TEST_VARIANT_DESCRIPTION) run_symlink_test_case("${case}-exe" -S "${src}" -B "${bin}") if (RunCMake_GENERATOR MATCHES "Xcode") |