summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-19 12:26:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-19 12:27:14 (GMT)
commitc3b95b5a9a6cf2d3fefd17b5c071c89f44b56b9c (patch)
tree4f399396cf6cede52594aaa525effa5a0866d6b4 /Source
parent60299bc6f057da13230551a56bf35a9c9825c036 (diff)
parent334c8ba7a4da445732858162dc430200891f0433 (diff)
downloadCMake-c3b95b5a9a6cf2d3fefd17b5c071c89f44b56b9c.zip
CMake-c3b95b5a9a6cf2d3fefd17b5c071c89f44b56b9c.tar.gz
CMake-c3b95b5a9a6cf2d3fefd17b5c071c89f44b56b9c.tar.bz2
Merge topic 'codelite-project-settings'
334c8ba7a4 CodeLite: Prefer CMAKE_RUNTIME_OUTPUT_DIRECTORY for output path acd322ebe4 CodeLite: Use project Makefile instead of workspace Makefile. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1840
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 4dbaa3f..c7c780c 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -408,7 +408,6 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries(
const std::string& projectPath, const cmMakefile* mf,
const std::string& projectType, const std::string& targetName)
{
-
cmXMLWriter& xml(*_xml);
FindMatchingHeaderfiles(cFiles, otherFiles);
// Create 2 virtual folders: src and include
@@ -469,10 +468,14 @@ void cmExtraCodeLiteGenerator::CreateProjectSourceEntries(
xml.EndElement(); // ResourceCompiler
xml.StartElement("General");
- std::string outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
+ std::string outputPath =
+ mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY");
+ if (outputPath.empty()) {
+ outputPath = mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH");
+ }
std::string relapath;
if (!outputPath.empty()) {
- relapath = cmSystemTools::RelativePath(this->WorkspacePath, outputPath);
+ relapath = cmSystemTools::RelativePath(projectPath, outputPath);
xml.Attribute("OutputFile", relapath + "/$(ProjectName)");
} else {
xml.Attribute("OutputFile", "$(IntermediateDirectory)/$(ProjectName)");
@@ -635,7 +638,7 @@ std::string cmExtraCodeLiteGenerator::GetBuildCommand(
if (generator == "NMake Makefiles" || generator == "Ninja") {
ss << make;
} else if (generator == "MinGW Makefiles" || generator == "Unix Makefiles") {
- ss << make << " -j " << this->CpuCount;
+ ss << make << " -f$(ProjectPath)/Makefile -j " << this->CpuCount;
}
if (!targetName.empty()) {
ss << " " << targetName;