summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst5
-rw-r--r--Help/variable/CMAKE_USE_RELATIVE_PATHS.rst9
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx24
-rw-r--r--Source/cmLocalGenerator.cxx9
-rw-r--r--Source/cmLocalGenerator.h4
-rw-r--r--Source/cmMakefileTargetGenerator.cxx8
-rw-r--r--Source/cmake.cxx14
7 files changed, 13 insertions, 60 deletions
diff --git a/Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst b/Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst
new file mode 100644
index 0000000..dd52ace
--- /dev/null
+++ b/Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst
@@ -0,0 +1,5 @@
+remove-CMAKE_USE_RELATIVE_PATHS
+-------------------------------
+
+* The :variable:`CMAKE_USE_RELATIVE_PATHS` variable no longer has any
+ effect. Previously it was partially implemented and unreliable.
diff --git a/Help/variable/CMAKE_USE_RELATIVE_PATHS.rst b/Help/variable/CMAKE_USE_RELATIVE_PATHS.rst
index af6f08c..06fe0fb 100644
--- a/Help/variable/CMAKE_USE_RELATIVE_PATHS.rst
+++ b/Help/variable/CMAKE_USE_RELATIVE_PATHS.rst
@@ -1,10 +1,5 @@
CMAKE_USE_RELATIVE_PATHS
------------------------
-Use relative paths (May not work!).
-
-If this is set to TRUE, then CMake will use relative paths between the
-source and binary tree. This option does not work for more
-complicated projects, and relative paths are used when possible. In
-general, it is not possible to move CMake generated makefiles to a
-different location regardless of the value of this variable.
+This variable has no effect. The partially implemented effect it
+had in previous releases was removed in CMake 3.4.
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7464e90..1301e3e 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3804,33 +3804,13 @@ void cmGlobalXCodeGenerator::GetDocumentation(cmDocumentationEntry& entry)
//----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator::ConvertToRelativeForMake(const char* p)
{
- if ( !this->CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") )
- {
- return cmSystemTools::ConvertToOutputPath(p);
- }
- else
- {
- std::string ret =
- this->CurrentLocalGenerator->
- ConvertToRelativePath(this->CurrentOutputDirectoryComponents, p);
- return cmSystemTools::ConvertToOutputPath(ret.c_str());
- }
+ return cmSystemTools::ConvertToOutputPath(p);
}
//----------------------------------------------------------------------------
std::string cmGlobalXCodeGenerator::ConvertToRelativeForXCode(const char* p)
{
- if ( !this->CurrentMakefile->IsOn("CMAKE_USE_RELATIVE_PATHS") )
- {
- return cmSystemTools::ConvertToOutputPath(p);
- }
- else
- {
- std::string ret =
- this->CurrentLocalGenerator->
- ConvertToRelativePath(this->ProjectOutputDirectoryComponents, p);
- return cmSystemTools::ConvertToOutputPath(ret.c_str());
- }
+ return cmSystemTools::ConvertToOutputPath(p);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index eb6b871..84461b1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -59,7 +59,6 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg,
this->Makefile = new cmMakefile(this);
this->LinkScriptShell = false;
- this->UseRelativePaths = false;
this->Configured = false;
this->EmitUniversalBinaryFlags = true;
this->BackwardsCompatibility = 0;
@@ -137,10 +136,6 @@ void cmLocalGenerator::Configure()
this->Makefile->AddCMakeDependFilesFromUser();
- // Check whether relative paths should be used for optionally
- // relative paths.
- this->UseRelativePaths = this->Makefile->IsOn("CMAKE_USE_RELATIVE_PATHS");
-
this->ComputeObjectMaxPath();
this->Configured = true;
@@ -2705,7 +2700,7 @@ std::string cmLocalGenerator::Convert(const std::string& source,
// Convert the path to a relative path.
std::string result = source;
- if (!optional || this->UseRelativePaths)
+ if (!optional)
{
switch (relative)
{
@@ -2786,7 +2781,7 @@ std::string cmLocalGenerator::Convert(RelativeRoot remote,
// The relative root must have a path (i.e. not FULL or NONE)
assert(remotePath != 0);
- if(!local.empty() && (!optional || this->UseRelativePaths))
+ if(!local.empty() && !optional)
{
std::vector<std::string> components;
cmSystemTools::SplitPath(local, components);
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 32b17f5..03fe9ba 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -127,8 +127,7 @@ public:
const char* GetRelativeRootPath(RelativeRoot relroot);
/**
- * Convert the given path to an output path that is optionally
- * relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The
+ * Convert the given path to an output path. The
* remote path must use forward slashes and not already be escaped
* or quoted.
*/
@@ -460,7 +459,6 @@ protected:
std::set<cmTarget const*> WarnCMP0063;
bool LinkScriptShell;
- bool UseRelativePaths;
bool Configured;
bool EmitUniversalBinaryFlags;
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 7b88bc7..d422e28 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -614,13 +614,7 @@ cmMakefileTargetGenerator
}
// Get the output paths for source and object files.
- std::string sourceFile = source.GetFullPath();
- if(this->LocalGenerator->UseRelativePaths)
- {
- sourceFile = this->Convert(sourceFile,
- cmLocalGenerator::START_OUTPUT);
- }
- sourceFile = this->Convert(sourceFile,
+ std::string sourceFile = this->Convert(source.GetFullPath(),
cmLocalGenerator::NONE,
cmLocalGenerator::SHELL);
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 23803ef..e3fec5f 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1437,20 +1437,6 @@ int cmake::ActualConfigure()
cmState::PATH);
}
}
- if(!this->State
- ->GetInitializedCacheValue("CMAKE_USE_RELATIVE_PATHS"))
- {
- this->State->AddCacheEntry
- ("CMAKE_USE_RELATIVE_PATHS", "OFF",
- "If true, cmake will use relative paths in makefiles and projects.",
- cmState::BOOL);
- if (!this->State->GetCacheEntryProperty("CMAKE_USE_RELATIVE_PATHS",
- "ADVANCED"))
- {
- this->State->SetCacheEntryProperty("CMAKE_USE_RELATIVE_PATHS",
- "ADVANCED", "1");
- }
- }
if(cmSystemTools::GetFatalErrorOccured())
{