diff options
author | Brad King <brad.king@kitware.com> | 2001-03-09 15:53:32 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-03-09 15:53:32 (GMT) |
commit | 5fc83004761394476f22d38fb75ed69bd6d7b16d (patch) | |
tree | 98765948d265b50366e992f1e40883fb0c7a5381 /Source/cmUtilitySourceCommand.cxx | |
parent | 60507258c786eb7b04f9248825659b47dc617c63 (diff) | |
download | CMake-5fc83004761394476f22d38fb75ed69bd6d7b16d.zip CMake-5fc83004761394476f22d38fb75ed69bd6d7b16d.tar.gz CMake-5fc83004761394476f22d38fb75ed69bd6d7b16d.tar.bz2 |
ENH: Added utility dependency support. Now a project can depend on other executables as well as link libraries.
Diffstat (limited to 'Source/cmUtilitySourceCommand.cxx')
-rw-r--r-- | Source/cmUtilitySourceCommand.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmUtilitySourceCommand.cxx b/Source/cmUtilitySourceCommand.cxx index 32506d0..0cb83dd 100644 --- a/Source/cmUtilitySourceCommand.cxx +++ b/Source/cmUtilitySourceCommand.cxx @@ -60,13 +60,18 @@ bool cmUtilitySourceCommand::Invoke(std::vector<std::string>& args) { return true; } } - // The source exists. Construct the cache entry for the executable's - // location. + // The source exists. std::string cmakeCFGout = m_Makefile->GetDefinition("CMAKE_CFG_OUTDIR"); - std::string utilityExecutable = m_Makefile->GetCurrentOutputDirectory(); - utilityExecutable = - (utilityExecutable+"/"+relativeSource+"/"+cmakeCFGout+"/" - +utilityName+cmSystemTools::GetExecutableExtension()); + std::string utilityDirectory = m_Makefile->GetCurrentOutputDirectory(); + utilityDirectory += "/"+relativeSource; + + // Tell the makefile where to look for this utility. + m_Makefile->AddUtilityDirectory(utilityDirectory.c_str()); + + // Construct the cache entry for the executable's location. + std::string utilityExecutable = + utilityDirectory+"/"+cmakeCFGout+"/" + +utilityName+cmSystemTools::GetExecutableExtension(); // Enter the value into the cache. cmCacheManager::GetInstance()->AddCacheEntry(cacheEntry.c_str(), |