diff options
author | Brad King <brad.king@kitware.com> | 2018-01-24 15:28:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-24 19:31:53 (GMT) |
commit | e342e4100a597dc8a7f94c55409e619a4848754f (patch) | |
tree | b8af1b5cdf45d12da95f38025efe7c8bd83d8dd3 /Source/cmMakefileTargetGenerator.cxx | |
parent | 05e9cdb81ecddba496f21d0c9e35e9536261337f (diff) | |
download | CMake-e342e4100a597dc8a7f94c55409e619a4848754f.zip CMake-e342e4100a597dc8a7f94c55409e619a4848754f.tar.gz CMake-e342e4100a597dc8a7f94c55409e619a4848754f.tar.bz2 |
Makefile,Ninja: Use tool-specific response file flag for include dirs
When we use a response file for `-I` flags, not all compilers support
the `@<file>` syntax. Define `CMAKE_<LANG>_RESPONSE_FILE_FLAG` to
specify tool-specific flag, just as we do for linking already via
`CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG`.
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 002cc0f..aba69d0 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1625,10 +1625,17 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags, } if (useResponseFile) { + std::string const responseFlagVar = + "CMAKE_" + lang + "_RESPONSE_FILE_FLAG"; + std::string responseFlag = + this->Makefile->GetSafeDefinition(responseFlagVar); + if (responseFlag.empty()) { + responseFlag = "@"; + } std::string name = "includes_"; name += lang; name += ".rsp"; - std::string arg = "@" + + std::string arg = std::move(responseFlag) + this->CreateResponseFile(name.c_str(), includeFlags, this->FlagFileDepends[lang]); this->LocalGenerator->AppendFlags(flags, arg); |