diff options
author | Shane Parris <shane.lee.parris@gmail.com> | 2018-02-14 16:34:35 (GMT) |
---|---|---|
committer | Shane Parris <shane.lee.parris@gmail.com> | 2018-04-02 03:16:12 (GMT) |
commit | 3f4b81f54096a90e2887ece75fff6cf4a8b93541 (patch) | |
tree | 74f9d65fc34122a46e02c2cc7190f5b803cd1065 /Source/cmLocalUnixMakefileGenerator3.cxx | |
parent | ca0befc2e10da59d2b82e4143ad913eb8322290f (diff) | |
download | CMake-3f4b81f54096a90e2887ece75fff6cf4a8b93541.zip CMake-3f4b81f54096a90e2887ece75fff6cf4a8b93541.tar.gz CMake-3f4b81f54096a90e2887ece75fff6cf4a8b93541.tar.bz2 |
Add glob verify support to XCode, VS, Ninja, and Makefile generators
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index c9237a8..cf2a7b9 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -763,6 +763,14 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom( if (!this->GlobalGenerator->GlobalSettingIsOn( "CMAKE_SUPPRESS_REGENERATION")) { // Build command to run CMake to check if anything needs regenerating. + std::vector<std::string> commands; + cmake* cm = this->GlobalGenerator->GetCMakeInstance(); + if (cm->DoWriteGlobVerifyTarget()) { + std::string rescanRule = "$(CMAKE_COMMAND) -P "; + rescanRule += this->ConvertToOutputFormat(cm->GetGlobVerifyScript(), + cmOutputConverter::SHELL); + commands.push_back(rescanRule); + } std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash(); cmakefileName += "Makefile.cmake"; std::string runRule = @@ -773,7 +781,6 @@ void cmLocalUnixMakefileGenerator3::WriteSpecialTargetsBottom( runRule += " 0"; std::vector<std::string> no_depends; - std::vector<std::string> commands; commands.push_back(std::move(runRule)); if (!this->IsRootMakefile()) { this->CreateCDCommand(commands, this->GetBinaryDirectory(), @@ -1666,6 +1673,13 @@ void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( // write the depend rule, really a recompute depends rule depends.clear(); commands.clear(); + cmake* cm = this->GlobalGenerator->GetCMakeInstance(); + if (cm->DoWriteGlobVerifyTarget()) { + std::string rescanRule = "$(CMAKE_COMMAND) -P "; + rescanRule += this->ConvertToOutputFormat(cm->GetGlobVerifyScript(), + cmOutputConverter::SHELL); + commands.push_back(rescanRule); + } std::string cmakefileName = cmake::GetCMakeFilesDirectoryPostSlash(); cmakefileName += "Makefile.cmake"; { |