summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-21 13:25:27 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-21 13:25:27 (GMT)
commit4f640afc1aa571a4a1a9083b62e3d2787db84bf3 (patch)
tree3c5cf71b90f4ebd92524f17949f01872fdb07473 /Source
parent82a0c7be3f6a00119f3ba00b0d1a4f73cbbb140c (diff)
parent109a7a245acf0c367ac092f6c9a20661e7a31529 (diff)
downloadCMake-4f640afc1aa571a4a1a9083b62e3d2787db84bf3.zip
CMake-4f640afc1aa571a4a1a9083b62e3d2787db84bf3.tar.gz
CMake-4f640afc1aa571a4a1a9083b62e3d2787db84bf3.tar.bz2
Merge topic 'ninja-refactor-msvc-deps'
109a7a24 Ninja: Detect MSVC /showIncludes prefix with compiler flags (#15596) 828c05b9 Ninja: Refactor lookup of cmcldeps location c73fbda6 CMakeDetermineCompilerId: Drop unused code path
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx2
-rw-r--r--Source/cmSystemTools.cxx14
-rw-r--r--Source/cmSystemTools.h1
3 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 752c8a7..f46c5b9 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -371,7 +371,7 @@ cmNinjaTargetGenerator
mf->GetSafeDefinition("CMAKE_C_COMPILER") :
mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
cldeps = "\"";
- cldeps += mf->GetSafeDefinition("CMAKE_CMCLDEPS_EXECUTABLE");
+ cldeps += cmSystemTools::GetCMClDepsCommand();
cldeps += "\" " + lang + " $in \"$DEP_FILE\" $out \"";
cldeps += mf->GetSafeDefinition("CMAKE_CL_SHOWINCLUDES_PREFIX");
cldeps += "\" \"" + cl + "\" ";
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 005a803..2675066 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -2216,6 +2216,7 @@ static std::string cmSystemToolsCTestCommand;
static std::string cmSystemToolsCPackCommand;
static std::string cmSystemToolsCMakeCursesCommand;
static std::string cmSystemToolsCMakeGUICommand;
+static std::string cmSystemToolsCMClDepsCommand;
static std::string cmSystemToolsCMakeRoot;
void cmSystemTools::FindCMakeResources(const char* argv0)
{
@@ -2308,6 +2309,13 @@ void cmSystemTools::FindCMakeResources(const char* argv0)
{
cmSystemToolsCMakeCursesCommand = "";
}
+ cmSystemToolsCMClDepsCommand = exe_dir;
+ cmSystemToolsCMClDepsCommand += "/cmcldeps";
+ cmSystemToolsCMClDepsCommand += cmSystemTools::GetExecutableExtension();
+ if(!cmSystemTools::FileExists(cmSystemToolsCMClDepsCommand.c_str()))
+ {
+ cmSystemToolsCMClDepsCommand = "";
+ }
#ifdef CMAKE_BUILD_WITH_CMAKE
// Install tree has "<prefix>/bin/cmake" and "<prefix><CMAKE_DATA_DIR>".
@@ -2375,6 +2383,12 @@ std::string const& cmSystemTools::GetCMakeGUICommand()
}
//----------------------------------------------------------------------------
+std::string const& cmSystemTools::GetCMClDepsCommand()
+{
+ return cmSystemToolsCMClDepsCommand;
+}
+
+//----------------------------------------------------------------------------
std::string const& cmSystemTools::GetCMakeRoot()
{
return cmSystemToolsCMakeRoot;
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index d14897f..e88170a 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -426,6 +426,7 @@ public:
static std::string const& GetCMakeCommand();
static std::string const& GetCMakeGUICommand();
static std::string const& GetCMakeCursesCommand();
+ static std::string const& GetCMClDepsCommand();
static std::string const& GetCMakeRoot();
/** Echo a message in color using KWSys's Terminal cprintf. */