Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
2f2b5b25
Commit
2f2b5b25
authored
Mar 08, 2007
by
Brad King
Browse files
ENH: SetupPathConversions is now called automatically on demand.
parent
9a5a051f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Source/cmGlobalUnixMakefileGenerator3.cxx
View file @
2f2b5b25
...
...
@@ -597,7 +597,6 @@ std::string cmGlobalUnixMakefileGenerator3
lg
->
GetMakefile
()
->
MakeStartDirectoriesCurrent
();
}
lg
->
SetupPathConversions
();
makeCommand
+=
"
\"
"
;
std
::
string
tname
=
targetName
;
if
(
fast
)
...
...
Source/cmLocalGenerator.cxx
View file @
2f2b5b25
...
...
@@ -48,6 +48,7 @@ cmLocalGenerator::cmLocalGenerator()
this
->
Configured
=
false
;
this
->
EmitUniversalBinaryFlags
=
true
;
this
->
RelativePathsConfigured
=
false
;
this
->
PathConversionsSetup
=
false
;
}
cmLocalGenerator
::~
cmLocalGenerator
()
...
...
@@ -80,9 +81,7 @@ void cmLocalGenerator::Configure()
this
->
Makefile
->
ConfigureSubDirectory
(
*
sdi
);
}
}
this
->
SetupPathConversions
();
// Check whether relative paths should be used for optionally
// relative paths.
this
->
UseRelativePaths
=
this
->
Makefile
->
IsOn
(
"CMAKE_USE_RELATIVE_PATHS"
);
...
...
@@ -2014,6 +2013,13 @@ std::string cmLocalGenerator::Convert(const char* source,
OutputFormat
output
,
bool
optional
)
{
// Make sure the relative path conversion components are set.
if
(
!
this
->
PathConversionsSetup
)
{
this
->
SetupPathConversions
();
this
->
PathConversionsSetup
=
true
;
}
// Convert the path to a relative path.
std
::
string
result
=
source
;
...
...
Source/cmLocalGenerator.h
View file @
2f2b5b25
...
...
@@ -102,9 +102,6 @@ public:
OutputFormat
output
=
UNCHANGED
,
bool
optional
=
false
);
///! Call this prior to using Convert
void
SetupPathConversions
();
/**
* Convert the given path to an output path that is optionally
* relative based on the cache option CMAKE_USE_RELATIVE_PATHS. The
...
...
@@ -279,6 +276,7 @@ protected:
void
ConfigureRelativePaths
();
std
::
string
FindRelativePathTopSource
();
std
::
string
FindRelativePathTopBinary
();
void
SetupPathConversions
();
cmMakefile
*
Makefile
;
cmGlobalGenerator
*
GlobalGenerator
;
...
...
@@ -314,6 +312,7 @@ protected:
std
::
string
RelativePathTopSource
;
std
::
string
RelativePathTopBinary
;
bool
RelativePathsConfigured
;
bool
PathConversionsSetup
;
};
#endif
Source/cmake.cxx
View file @
2f2b5b25
...
...
@@ -1210,7 +1210,6 @@ int cmake::ExecuteCMakeCommand(std::vector<std::string>& args)
lgd
->
GetMakefile
()
->
SetStartDirectory
(
startDir
.
c_str
());
lgd
->
GetMakefile
()
->
SetStartOutputDirectory
(
startOutDir
.
c_str
());
lgd
->
GetMakefile
()
->
MakeStartDirectoriesCurrent
();
lgd
->
SetupPathConversions
();
// Actually scan dependencies.
return
lgd
->
ScanDependencies
(
depInfo
.
c_str
())
?
0
:
2
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment