summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorShannon Booth <shannon.ml.booth@gmail.com>2020-12-23 18:16:34 (GMT)
committerShannon Booth <shannon.ml.booth@gmail.com>2021-01-05 22:51:39 (GMT)
commita742b5d137d0855430a044dc4237de5aabfb08b4 (patch)
treec99ce00905019f35d142bab20816c87dd8c0cb2f /Source/cmNinjaTargetGenerator.cxx
parentce8bb12f72766e45ad96d98d9e1d259815dc126a (diff)
downloadCMake-a742b5d137d0855430a044dc4237de5aabfb08b4.zip
CMake-a742b5d137d0855430a044dc4237de5aabfb08b4.tar.gz
CMake-a742b5d137d0855430a044dc4237de5aabfb08b4.tar.bz2
CMAKE_EXPORT_COMPILE_COMMANDS: allow configuration per target
The new target property `EXPORT_COMPILE_COMMANDS` associated with the existing global variable can be used to optionally configure targets for their compile commands to be exported. Fixes: #19462
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 9075563..22df5d6 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1532,7 +1532,7 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
std::string const& objectFileDir, std::string const& flags,
std::string const& defines, std::string const& includes)
{
- if (!this->Makefile->IsOn("CMAKE_EXPORT_COMPILE_COMMANDS")) {
+ if (!this->GeneratorTarget->GetPropertyAsBool("EXPORT_COMPILE_COMMANDS")) {
return;
}