[Cmake-commits] CMake branch, next, updated. v2.8.12.1-6149-g8d32f93
Alexander Neundorf
neundorf at kde.org
Tue Dec 10 17:41:04 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 8d32f9302671f3ff0378998154c6c5ec800f33d1 (commit)
via bd177f5c96364b5480d3ec5c6c8b0c7ae8d67887 (commit)
via a7b64058256673762f43b2e3d0331468ba9200f0 (commit)
via a2489ce49c0cbf5582a29ef8c4a0d9728994f465 (commit)
from 48aa0728067ab0a10c22e4ac44936f5eb7d9a80d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8d32f9302671f3ff0378998154c6c5ec800f33d1
commit 8d32f9302671f3ff0378998154c6c5ec800f33d1
Merge: 48aa072 bd177f5
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Tue Dec 10 17:41:01 2013 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 10 17:41:01 2013 -0500
Merge topic 'KateFixNinja' into next
bd177f5 kate: fix ninja support
a7b6405 Kate: remove unused function
a2489ce CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bd177f5c96364b5480d3ec5c6c8b0c7ae8d67887
commit bd177f5c96364b5480d3ec5c6c8b0c7ae8d67887
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Dec 10 22:52:15 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Dec 10 22:52:15 2013 +0100
kate: fix ninja support
ninja needs to be run from the toplevel build dir,
not from the target dir, as make
Alex
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index 340ffba..177ef8d 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -52,6 +52,8 @@ void cmExtraKateGenerator::Generate()
this->ProjectName = this->GenerateProjectName(mf->GetProjectName(),
mf->GetSafeDefinition("CMAKE_BUILD_TYPE"),
this->GetPathBasename(mf->GetHomeOutputDirectory()));
+ this->UseNinja = (strcmp(this->GlobalGenerator->GetName(), "Ninja")==0);
+
this->CreateKateProjectFile(mf);
this->CreateDummyKateProjectFile(mf);
}
@@ -95,11 +97,12 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
const std::string makeArgs = mf->GetSafeDefinition(
"CMAKE_KATE_MAKE_ARGUMENTS");
+ const char* homeOutputDir = mf->GetHomeOutputDirectory();
this->AppendTarget(fout, "all", make, makeArgs,
- mf->GetHomeOutputDirectory());
+ homeOutputDir, homeOutputDir);
this->AppendTarget(fout, "clean", make, makeArgs,
- mf->GetHomeOutputDirectory());
+ homeOutputDir, homeOutputDir);
// add all executable and library targets and some of the GLOBAL
// and UTILITY targets
@@ -143,7 +146,8 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
}
if (insertTarget)
{
- this->AppendTarget(fout, ti->first, make, makeArgs, currentDir);
+ this->AppendTarget(fout, ti->first, make, makeArgs,
+ currentDir, homeOutputDir);
}
}
break;
@@ -158,7 +162,8 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
break;
}
- this->AppendTarget(fout, ti->first, make, makeArgs, currentDir);
+ this->AppendTarget(fout, ti->first, make, makeArgs,
+ currentDir, homeOutputDir);
break;
case cmTarget::EXECUTABLE:
case cmTarget::STATIC_LIBRARY:
@@ -166,10 +171,12 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
case cmTarget::MODULE_LIBRARY:
case cmTarget::OBJECT_LIBRARY:
{
- this->AppendTarget(fout, ti->first, make, makeArgs, currentDir);
+ this->AppendTarget(fout, ti->first, make, makeArgs,
+ currentDir, homeOutputDir);
std::string fastTarget = ti->first;
fastTarget += "/fast";
- this->AppendTarget(fout, fastTarget, make, makeArgs, currentDir);
+ this->AppendTarget(fout, fastTarget, make, makeArgs,
+ currentDir, homeOutputDir);
}
break;
@@ -185,7 +192,7 @@ cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
fit != objectFileTargets.end();
++fit)
{
- this->AppendTarget(fout, *fit, make, makeArgs, currentDir);
+ this->AppendTarget(fout, *fit, make, makeArgs, currentDir,homeOutputDir);
}
}
@@ -199,14 +206,18 @@ cmExtraKateGenerator::AppendTarget(cmGeneratedFileStream& fout,
const std::string& target,
const std::string& make,
const std::string& makeArgs,
- const std::string& path) const
+ const std::string& path,
+ const char* homeOutputDir
+ ) const
{
static char JsonSep = ' ';
fout <<
"\t\t\t" << JsonSep << "{\"name\":\"" << target << "\", "
- "\"build_cmd\":\"" << make << " -C " << path << " " << makeArgs << " "
- << target << "\"}\n";
+ "\"build_cmd\":\"" << make
+ << " -C " << (this->UseNinja ? homeOutputDir : path.c_str())
+ << " " << makeArgs << " "
+ << target << "\"}\n";
JsonSep = ',';
}
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
index 37a6886..6ced5fe 100644
--- a/Source/cmExtraKateGenerator.h
+++ b/Source/cmExtraKateGenerator.h
@@ -46,7 +46,8 @@ private:
const std::string& target,
const std::string& make,
const std::string& makeArgs,
- const std::string& path) const;
+ const std::string& path,
+ const char* homeOutputDir) const;
std::string GenerateFilesString(const cmMakefile* mf) const;
std::string GetPathBasename(const std::string& path) const;
@@ -55,6 +56,7 @@ private:
const std::string& path) const;
std::string ProjectName;
+ bool UseNinja;
};
#endif
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7b64058256673762f43b2e3d0331468ba9200f0
commit a7b64058256673762f43b2e3d0331468ba9200f0
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Tue Dec 10 22:37:11 2013 +0100
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Tue Dec 10 22:37:11 2013 +0100
Kate: remove unused function
Alex
diff --git a/Source/cmExtraKateGenerator.cxx b/Source/cmExtraKateGenerator.cxx
index f020ddb..340ffba 100644
--- a/Source/cmExtraKateGenerator.cxx
+++ b/Source/cmExtraKateGenerator.cxx
@@ -326,47 +326,3 @@ std::string cmExtraKateGenerator::GetPathBasename(const std::string& path)const
return outputBasename;
}
-
-
-// Create the command line for building the given target using the selected
-// make
-std::string cmExtraKateGenerator::BuildMakeCommand(const std::string& make,
- const char* makefile, const char* target) const
-{
- std::string command = make;
- if (strcmp(this->GlobalGenerator->GetName(), "NMake Makefiles")==0)
- {
- std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
- command += " /NOLOGO /f "";
- command += makefileName;
- command += "" ";
- command += " VERBOSE=1 ";
- command += target;
- }
- else if (strcmp(this->GlobalGenerator->GetName(), "MinGW Makefiles")==0)
- {
- // no escaping of spaces in this case, see
- // http://public.kitware.com/Bug/view.php?id=10014
- std::string makefileName = makefile;
- command += " -f "";
- command += makefileName;
- command += "" ";
- command += " VERBOSE=1 ";
- command += target;
- }
- else if (strcmp(this->GlobalGenerator->GetName(), "Ninja")==0)
- {
- command += " -v ";
- command += target;
- }
- else
- {
- std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile);
- command += " -f "";
- command += makefileName;
- command += "" ";
- command += " VERBOSE=1 ";
- command += target;
- }
- return command;
-}
diff --git a/Source/cmExtraKateGenerator.h b/Source/cmExtraKateGenerator.h
index 4979eff..37a6886 100644
--- a/Source/cmExtraKateGenerator.h
+++ b/Source/cmExtraKateGenerator.h
@@ -53,8 +53,6 @@ private:
std::string GenerateProjectName(const std::string& name,
const std::string& type,
const std::string& path) const;
- std::string BuildMakeCommand(const std::string& make,
- const char* makefile, const char* target) const;
std::string ProjectName;
};
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/cmExtraKateGenerator.cxx | 75 +++++++++++----------------------------
Source/cmExtraKateGenerator.h | 6 ++--
3 files changed, 25 insertions(+), 58 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list