mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-25 15:49:08 -05:00
VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators
Drop the "Modules/CMakeVS*FindMake.cmake" files. Override the cmGlobalGenerator::FindMakeProgram method for VS generators to use their internal APIs to locate the build tool. Set the CMAKE_MAKE_PROGRAM as a normal variable for use by project code, but do not cache it. This will allow CMake and CTest to select the proper tool at build time.
This commit is contained in:
@@ -499,6 +499,19 @@ void cmGlobalVisualStudioGenerator::ComputeVSTargetDepends(cmTarget& target)
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudioGenerator::FindMakeProgram(cmMakefile* mf)
|
||||
{
|
||||
// Visual Studio generators know how to lookup their build tool
|
||||
// directly instead of needing a helper module to do it, so we
|
||||
// do not actually need to put CMAKE_MAKE_PROGRAM into the cache.
|
||||
if(cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM")))
|
||||
{
|
||||
mf->AddDefinition("CMAKE_MAKE_PROGRAM",
|
||||
this->GetVSMakeProgram().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGlobalVisualStudioGenerator::AddPlatformDefinitions(cmMakefile* mf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user