summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-04-07 17:39:13 (GMT)
committerBrad King <brad.king@kitware.com>2008-04-07 17:39:13 (GMT)
commit1829bed8b5dd4c1d3b622a14160d3a6706bcc16e (patch)
tree4facf9909369e1ccb4aa854f5a611ec82eaf6906 /Source/cmTarget.cxx
parentfcd09ca90ff052fbb560d8b1eff3e465066bb13b (diff)
downloadCMake-1829bed8b5dd4c1d3b622a14160d3a6706bcc16e.zip
CMake-1829bed8b5dd4c1d3b622a14160d3a6706bcc16e.tar.gz
CMake-1829bed8b5dd4c1d3b622a14160d3a6706bcc16e.tar.bz2
BUG: Do not create target output directory in cmTarget. Let the generators do it.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx22
1 files changed, 3 insertions, 19 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index aa4c403..9c10e36 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1653,7 +1653,7 @@ const char* cmTarget::NormalGetDirectory(const char* config, bool implib)
if(config && *config)
{
// Do not create the directory when config is given:
- this->Directory = this->GetAndCreateOutputDir(implib, true);
+ this->Directory = this->GetOutputDir(implib);
// Add the configuration's subdirectory.
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()->
AppendDirectoryForConfig("/", config, "", this->Directory);
@@ -2845,7 +2845,7 @@ std::string cmTarget::GetInstallNameDirForInstallTree(const char*)
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetAndCreateOutputDir(bool implib, bool create)
+const char* cmTarget::GetOutputDir(bool implib)
{
// The implib option is only allowed for shared libraries, module
// libraries, and executables.
@@ -2862,7 +2862,7 @@ const char* cmTarget::GetAndCreateOutputDir(bool implib, bool create)
if(implib &&
!this->Makefile->GetDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX"))
{
- std::string msg = "GetAndCreateOutputDir, imlib set but there is no "
+ std::string msg = "GetOutputDir, imlib set but there is no "
"CMAKE_IMPORT_LIBRARY_SUFFIX for target: ";
msg += this->GetName();
this->GetMakefile()->
@@ -2987,28 +2987,12 @@ const char* cmTarget::GetAndCreateOutputDir(bool implib, bool create)
out += this->GetFullName(0, implib);
out += ".framework";
}
-
- // Optionally make sure the output path exists on disk.
- if(create)
- {
- if(!cmSystemTools::MakeDirectory(out.c_str()))
- {
- cmSystemTools::Error("Error failed to create output directory: ",
- out.c_str());
- }
- }
}
return out.c_str();
}
//----------------------------------------------------------------------------
-const char* cmTarget::GetOutputDir(bool implib)
-{
- return this->GetAndCreateOutputDir(implib, true);
-}
-
-//----------------------------------------------------------------------------
const char* cmTarget::GetExportMacro()
{
// Define the symbol for targets that export symbols.