diff options
author | Brad King <brad.king@kitware.com> | 2015-07-13 14:35:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-07-13 14:49:46 (GMT) |
commit | c736de7b284ecc93bac48106e88417e0e6c92ad6 (patch) | |
tree | 4b543faa599c34bdc7db464cd26b53c9cb8737bb /Source/cmNinjaTargetGenerator.cxx | |
parent | 6f94b03c976088d177891ff69a9fad88de42e420 (diff) | |
download | CMake-c736de7b284ecc93bac48106e88417e0e6c92ad6.zip CMake-c736de7b284ecc93bac48106e88417e0e6c92ad6.tar.gz CMake-c736de7b284ecc93bac48106e88417e0e6c92ad6.tar.bz2 |
Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables
Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
placeholder instead of putting -I in <FLAGS>. Update our values for
CMAKE_<LANG>_COMPILE_OBJECT,
CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE
to place <INCLUDES> just before <FLAGS>.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index a72bc72..3441149 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -315,6 +315,7 @@ cmNinjaTargetGenerator vars.Source = "$in"; vars.Object = "$out"; vars.Defines = "$DEFINES"; + vars.Includes = "$INCLUDES"; vars.TargetPDB = "$TARGET_PDB"; vars.TargetCompilePDB = "$TARGET_COMPILE_PDB"; vars.ObjectDir = "$OBJECT_DIR"; @@ -592,6 +593,7 @@ cmNinjaTargetGenerator cmNinjaVars vars; vars["FLAGS"] = this->ComputeFlagsForObject(source, language); vars["DEFINES"] = this->ComputeDefines(source, language); + vars["INCLUDES"] = this->GetIncludes(language); if (!this->NeedDepTypeMSVC(language)) { vars["DEP_FILE"] = cmGlobalNinjaGenerator::EncodeDepfileSpace(objectFileName + ".d"); @@ -637,6 +639,7 @@ cmNinjaTargetGenerator compileObjectVars.ObjectFileDir = objectFileDir.c_str(); compileObjectVars.Flags = vars["FLAGS"].c_str(); compileObjectVars.Defines = vars["DEFINES"].c_str(); + compileObjectVars.Includes = vars["INCLUDES"].c_str(); // Rule for compiling object file. std::string compileCmdVar = "CMAKE_"; |