ENH: move EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH initial creation to after the CMakeLists.txt files have been parsed
This commit is contained in:
parent
37c072b324
commit
145fac96fc
|
@ -134,19 +134,6 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
|
|||
cmSystemTools::ConvertToUnixSlashes(cMakeSelf);
|
||||
cMakeSelf = cmSystemTools::FindProgram(cMakeSelf.c_str());
|
||||
|
||||
if(!cmCacheManager::GetInstance()->GetCacheValue("LIBRARY_OUTPUT_PATH"))
|
||||
{
|
||||
cmCacheManager::GetInstance()->AddCacheEntry("LIBRARY_OUTPUT_PATH", "",
|
||||
"Single output directory for building all libraries.",
|
||||
cmCacheManager::PATH);
|
||||
}
|
||||
if(!cmCacheManager::GetInstance()->GetCacheValue("EXECUTABLE_OUTPUT_PATH"))
|
||||
{
|
||||
cmCacheManager::GetInstance()->AddCacheEntry("EXECUTABLE_OUTPUT_PATH", "",
|
||||
"Single output directory for building all executables.",
|
||||
cmCacheManager::PATH);
|
||||
}
|
||||
|
||||
// Save the value in the cache
|
||||
cmCacheManager::GetInstance()->AddCacheEntry
|
||||
("CMAKE_COMMAND",
|
||||
|
@ -242,6 +229,25 @@ int cmake::Generate(const std::vector<std::string>& args)
|
|||
return -1;
|
||||
}
|
||||
mf.GenerateMakefile();
|
||||
|
||||
// Before saving the cache
|
||||
// if the project did not define LIBRARY_OUTPUT_PATH and
|
||||
// EXECUTABLE_OUTPUT_PATH, add them now, so users
|
||||
// can edit the values in the cache.
|
||||
if(!cmCacheManager::GetInstance()->GetCacheValue("LIBRARY_OUTPUT_PATH"))
|
||||
{
|
||||
cmCacheManager::GetInstance()->AddCacheEntry("LIBRARY_OUTPUT_PATH", "",
|
||||
"Single output directory for building all libraries.",
|
||||
cmCacheManager::PATH);
|
||||
}
|
||||
if(!cmCacheManager::GetInstance()->GetCacheValue("EXECUTABLE_OUTPUT_PATH"))
|
||||
{
|
||||
cmCacheManager::GetInstance()->AddCacheEntry("EXECUTABLE_OUTPUT_PATH", "",
|
||||
"Single output directory for building all executables.",
|
||||
cmCacheManager::PATH);
|
||||
}
|
||||
|
||||
|
||||
cmCacheManager::GetInstance()->SaveCache(&mf);
|
||||
|
||||
if(m_Verbose)
|
||||
|
|
Loading…
Reference in New Issue