diff options
author | Fred Baksik <frodak17@gmail.com> | 2019-01-05 16:01:23 (GMT) |
---|---|---|
committer | Fred Baksik <frodak17@gmail.com> | 2019-01-16 15:41:45 (GMT) |
commit | 80443184317e97999da63d71549aa1b89997dc3d (patch) | |
tree | 91bfdbe5d7218bcede4236fcace2a0b29d2b1ea8 /Source/cmGhsMultiTargetGenerator.cxx | |
parent | 73092b2213495e06ef2ecfbf5fcca850874d6c88 (diff) | |
download | CMake-80443184317e97999da63d71549aa1b89997dc3d.zip CMake-80443184317e97999da63d71549aa1b89997dc3d.tar.gz CMake-80443184317e97999da63d71549aa1b89997dc3d.tar.bz2 |
GHS: Add support for some of the source file properties
-- INCLUDE_DIRECTORIES, COMPILE_DEFINITIONS, and COMPILE_OPTIONS
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.cxx')
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 72f308a..8da21c6 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -367,6 +367,21 @@ void cmGhsMultiTargetGenerator::WriteCustomCommandsHelper( } } +void cmGhsMultiTargetGenerator::WriteSourceProperty(std::ostream& fout, + const cmSourceFile* sf, + std::string propName, + std::string propFlag) +{ + const char* prop = sf->GetProperty(propName); + if (prop) { + std::vector<std::string> list; + cmSystemTools::ExpandListArgument(prop, list); + for (auto& p : list) { + fout << " " << propFlag << p << std::endl; + } + } +} + void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj) { /* vector of all sources for this target */ @@ -494,6 +509,11 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj) "bsp" != si->GetExtension()) { this->WriteObjectLangOverride(*fout, si); } + + this->WriteSourceProperty(*fout, si, "INCLUDE_DIRECTORIES", "-I"); + this->WriteSourceProperty(*fout, si, "COMPILE_DEFINITIONS", "-D"); + this->WriteSourceProperty(*fout, si, "COMPILE_OPTIONS", ""); + /* to avoid clutter in the gui only print out the objectName if it has * been renamed */ std::string objectName = this->GeneratorTarget->GetObjectName(si); |