diff options
author | Betsy McPhail <betsy.mcphail@kitware.com> | 2017-06-23 16:12:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-07-10 20:25:18 (GMT) |
commit | d385962419ea3109dd21093c2368379f5fb51722 (patch) | |
tree | 8c6a4fa9ff3383309844abeb8038a83baf701857 /Source/cmLocalGenerator.cxx | |
parent | d08ec4d25a8113388092bf342002f3859f6b8de4 (diff) | |
download | CMake-d385962419ea3109dd21093c2368379f5fb51722.zip CMake-d385962419ea3109dd21093c2368379f5fb51722.tar.gz CMake-d385962419ea3109dd21093c2368379f5fb51722.tar.bz2 |
Add directory property 'LABELS' and CMAKE_DIRECTORY_LABELS variable
The specified LABELS will be passed down to subdirectories as well as
any targets or tests in the directory.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9049a42..be5b206 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -277,6 +277,25 @@ void cmLocalGenerator::GenerateTestFiles() outP = cmOutputConverter::EscapeForCMake(outP); fout << "subdirs(" << outP << ")" << std::endl; } + + // Add directory labels property + const char* directoryLabels = + this->Makefile->GetDefinition("CMAKE_DIRECTORY_LABELS"); + const char* labels = this->Makefile->GetProperty("LABELS"); + + if (labels || directoryLabels) { + fout << "set_directory_properties(PROPERTIES LABELS "; + if (labels) { + fout << cmOutputConverter::EscapeForCMake(labels); + } + if (labels && directoryLabels) { + fout << ";"; + } + if (directoryLabels) { + fout << cmOutputConverter::EscapeForCMake(directoryLabels); + } + fout << ")" << std::endl; + } } void cmLocalGenerator::CreateEvaluationFileOutputs(std::string const& config) @@ -327,6 +346,7 @@ void cmLocalGenerator::GenerateInstallRules() { // Compute the install prefix. const char* prefix = this->Makefile->GetDefinition("CMAKE_INSTALL_PREFIX"); + #if defined(_WIN32) && !defined(__CYGWIN__) std::string prefix_win32; if (!prefix) { |