summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2017-02-18 19:12:27 (GMT)
committerGregor Jasny <gjasny@googlemail.com>2017-02-22 16:05:17 (GMT)
commit33a1d727d5aafeaa0d9e729119d7d43ea9fcb370 (patch)
tree547d8658c95029be6ece913237cfbe17703f3406 /Source/cmMakefile.cxx
parent96b6afdc4289a3f04983ee5f5af82c83b422c583 (diff)
downloadCMake-33a1d727d5aafeaa0d9e729119d7d43ea9fcb370.zip
CMake-33a1d727d5aafeaa0d9e729119d7d43ea9fcb370.tar.gz
CMake-33a1d727d5aafeaa0d9e729119d7d43ea9fcb370.tar.bz2
Makefile: Allow adding post-build rules to object libraries
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index bdaca97..7f9e6ef 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -684,7 +684,8 @@ void cmMakefile::AddCustomCommandToTarget(
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type,
const char* comment, const char* workingDir, bool escapeOldStyle,
- bool uses_terminal, const std::string& depfile, bool command_expand_lists)
+ bool uses_terminal, const std::string& depfile, bool command_expand_lists,
+ ObjectLibraryCommands objLibraryCommands)
{
// Find the target to which to add the custom command.
cmTargets::iterator ti = this->Targets.find(target);
@@ -724,7 +725,8 @@ void cmMakefile::AddCustomCommandToTarget(
return;
}
- if (ti->second.GetType() == cmStateEnums::OBJECT_LIBRARY) {
+ if (objLibraryCommands == RejectObjectLibraryCommands &&
+ ti->second.GetType() == cmStateEnums::OBJECT_LIBRARY) {
std::ostringstream e;
e << "Target \"" << target
<< "\" is an OBJECT library "