diff options
author | Marc Chevrier <marc.chevrier@sap.com> | 2018-04-19 12:58:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-20 13:28:13 (GMT) |
commit | cb83314e659ccb6396b897d8c7301f758b415fc1 (patch) | |
tree | d739605b4d2f44844f20b2a47d4beaae1abe2e1a /Source/cmAddCompileDefinitionsCommand.cxx | |
parent | 38d854dccff6ddeb69c217252dd9ed9f87fe1b19 (diff) | |
download | CMake-cb83314e659ccb6396b897d8c7301f758b415fc1.zip CMake-cb83314e659ccb6396b897d8c7301f758b415fc1.tar.gz CMake-cb83314e659ccb6396b897d8c7301f758b415fc1.tar.bz2 |
add_compile_definitions: add new command
This command manages preprocessor definitions at directory level and
supports generator expressions.
Fixes: #15374
Diffstat (limited to 'Source/cmAddCompileDefinitionsCommand.cxx')
-rw-r--r-- | Source/cmAddCompileDefinitionsCommand.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmAddCompileDefinitionsCommand.cxx b/Source/cmAddCompileDefinitionsCommand.cxx new file mode 100644 index 0000000..0474819 --- /dev/null +++ b/Source/cmAddCompileDefinitionsCommand.cxx @@ -0,0 +1,20 @@ +/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying + file Copyright.txt or https://cmake.org/licensing for details. */ +#include "cmAddCompileDefinitionsCommand.h" + +#include "cmMakefile.h" + +class cmExecutionStatus; + +bool cmAddCompileDefinitionsCommand::InitialPass( + std::vector<std::string> const& args, cmExecutionStatus&) +{ + if (args.empty()) { + return true; + } + + for (std::string const& i : args) { + this->Makefile->AddCompileDefinition(i); + } + return true; +} |