summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake6
-rw-r--r--Source/CPack/IFW/cmCPackIFWRepository.cxx4
-rw-r--r--Source/CPack/cmCPackGenerator.cxx3
-rw-r--r--Source/QtDialog/CMakeSetup.cxx34
-rw-r--r--Source/cmCoreTryCompile.cxx8
-rw-r--r--Source/cmDependsFortran.cxx6
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx18
-rw-r--r--Source/cmFindBase.cxx6
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx2
-rw-r--r--Source/cmNinjaTargetGenerator.cxx6
-rw-r--r--Source/cmQtAutoGeneratorInitializer.cxx120
-rw-r--r--Source/cmQtAutoGenerators.cxx79
-rw-r--r--Source/cmQtAutoGenerators.h5
-rw-r--r--Source/cmTarget.cxx12
-rw-r--r--Source/cmVS14CLFlagTable.h1
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
16 files changed, 123 insertions, 196 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 6c81449..c1395e5 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
-set(CMake_VERSION_MINOR 5)
-set(CMake_VERSION_PATCH 20160601)
-#set(CMake_VERSION_RC 1)
+set(CMake_VERSION_MINOR 6)
+set(CMake_VERSION_PATCH 1)
+#set(CMake_VERSION_RC 0)
diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx
index b149f81..45b47cd 100644
--- a/Source/CPack/IFW/cmCPackIFWRepository.cxx
+++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx
@@ -299,8 +299,8 @@ void cmCPackIFWRepository::WriteRepositoryUpdate(cmXMLWriter& xout)
if (Update == Add || Update == Remove) {
xout.Attribute("url", Url);
} else if (Update == Replace) {
- xout.Attribute("oldurl", OldUrl);
- xout.Attribute("newurl", NewUrl);
+ xout.Attribute("oldUrl", OldUrl);
+ xout.Attribute("newUrl", NewUrl);
}
// Enabled
if (!Enabled.empty()) {
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index c8b075d..f46d145 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -625,7 +625,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
cmGlobalGenerator gg(&cm);
cmsys::auto_ptr<cmMakefile> mf(
new cmMakefile(&gg, cm.GetCurrentSnapshot()));
- if (!installSubDirectory.empty() && installSubDirectory != "/") {
+ if (!installSubDirectory.empty() && installSubDirectory != "/" &&
+ installSubDirectory != ".") {
tempInstallDirectory += installSubDirectory;
}
if (componentInstall) {
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx
index c3c1468..c849d52 100644
--- a/Source/QtDialog/CMakeSetup.cxx
+++ b/Source/QtDialog/CMakeSetup.cxx
@@ -19,6 +19,7 @@
#include <QApplication>
#include <QDir>
#include <QLocale>
+#include <QString>
#include <QTextCodec>
#include <QTranslator>
#include <cmsys/CommandLineArguments.hxx>
@@ -40,6 +41,7 @@ static const char* cmDocumentationOptions[][2] = { { 0, 0 } };
#if defined(Q_OS_MAC)
static int cmOSXInstall(std::string dir);
+static void cmAddPluginPath();
#endif
int main(int argc, char** argv)
@@ -81,6 +83,15 @@ int main(int argc, char** argv)
}
#endif
+// When we are on OSX and we are launching cmake-gui from a symlink, the
+// application will fail to launch as it can't find the qt.conf file which
+// tells it what the name of the plugin folder is. We need to add this path
+// BEFORE the application is constructed as that is what triggers the
+// searching for the platform plugins
+#if defined(Q_OS_MAC)
+ cmAddPluginPath();
+#endif
+
QApplication app(argc, argv);
setlocale(LC_NUMERIC, "C");
@@ -215,4 +226,27 @@ static int cmOSXInstall(std::string dir)
? 0
: 1;
}
+
+// Locate the PlugIns directory and add it to the QApplication library paths.
+// We need to resolve all symlinks so we have a known relative path between
+// MacOS/CMake and the PlugIns directory.
+//
+// Note we are using cmSystemTools since Qt can't provide the path to the
+// executable before the QApplication is created, and that is when plugin
+// searching occurs.
+static void cmAddPluginPath()
+{
+ std::string const& path = cmSystemTools::GetCMakeGUICommand();
+ if (path.empty()) {
+ return;
+ }
+ std::string const& realPath = cmSystemTools::GetRealPath(path);
+ QFileInfo appPath(QString::fromLocal8Bit(realPath.c_str()));
+ QDir pluginDir = appPath.dir();
+ bool const foundPluginDir = pluginDir.cd("../PlugIns");
+ if (foundPluginDir) {
+ QApplication::addLibraryPath(pluginDir.path());
+ }
+}
+
#endif
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 0149fdf..75d0e9e 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -333,14 +333,6 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}"
" ${COMPILE_DEFINITIONS}\")\n",
li->c_str(), li->c_str());
- static std::string const cfgDefault = "DEBUG";
- std::string const cfg =
- !tcConfig.empty() ? cmSystemTools::UpperCase(tcConfig) : cfgDefault;
- std::string const langFlagsCfg = "CMAKE_" + *li + "_FLAGS_" + cfg;
- const char* flagsCfg = this->Makefile->GetDefinition(langFlagsCfg);
- fprintf(
- fout, "set(%s %s)\n", langFlagsCfg.c_str(),
- cmOutputConverter::EscapeForCMake(flagsCfg ? flagsCfg : "").c_str());
}
switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0056)) {
case cmPolicies::WARN:
diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx
index 38e319d..4608b5a 100644
--- a/Source/cmDependsFortran.cxx
+++ b/Source/cmDependsFortran.cxx
@@ -677,6 +677,12 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile,
const char seq[2] = { '\n', '\0' };
const int seqlen = 2;
+ // Skip the leading byte which appears to be a version number.
+ // We do not need to check for an error because the sequence search
+ // below will fail in that case.
+ finModFile.get();
+ finStampFile.get();
+
if (!cmFortranStreamContainsSequence(finModFile, seq, seqlen)) {
// The module is of unexpected format. Assume it is different.
std::cerr << compilerId << " fortran module " << modFile
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index 2070b1f..589bf53 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -578,19 +578,20 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
}
// the include directories for this target
- std::set<std::string> uniqIncludeDirs;
+ std::vector<std::string> allIncludeDirs;
std::vector<std::string> includes;
lg->GetIncludeDirectories(includes, target, "C", buildType);
- uniqIncludeDirs.insert(includes.begin(), includes.end());
+ allIncludeDirs.insert(allIncludeDirs.end(), includes.begin(),
+ includes.end());
std::string systemIncludeDirs = makefile->GetSafeDefinition(
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
if (!systemIncludeDirs.empty()) {
std::vector<std::string> dirs;
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
- uniqIncludeDirs.insert(dirs.begin(), dirs.end());
+ allIncludeDirs.insert(allIncludeDirs.end(), dirs.begin(), dirs.end());
}
systemIncludeDirs = makefile->GetSafeDefinition(
@@ -598,13 +599,16 @@ void cmExtraCodeBlocksGenerator::AppendTarget(
if (!systemIncludeDirs.empty()) {
std::vector<std::string> dirs;
cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
- uniqIncludeDirs.insert(dirs.begin(), dirs.end());
+ allIncludeDirs.insert(allIncludeDirs.end(), dirs.begin(), dirs.end());
}
- for (std::set<std::string>::const_iterator dirIt = uniqIncludeDirs.begin();
- dirIt != uniqIncludeDirs.end(); ++dirIt) {
+ std::vector<std::string>::const_iterator end =
+ cmRemoveDuplicates(allIncludeDirs);
+
+ for (std::vector<std::string>::const_iterator i = allIncludeDirs.begin();
+ i != end; ++i) {
xml.StartElement("Add");
- xml.Attribute("directory", *dirIt);
+ xml.Attribute("directory", *i);
xml.EndElement();
}
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 082bbf0..c785e6c 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -226,12 +226,10 @@ void cmFindBase::FillSystemEnvironmentPath()
paths.AddEnvPath(this->EnvironmentPath);
#if defined(_WIN32) || defined(__CYGWIN__)
paths.AddEnvPrefixPath("PATH", true);
- paths.AddEnvPath("PATH");
#endif
- } else {
- // Add PATH
- paths.AddEnvPath("PATH");
}
+ // Add PATH
+ paths.AddEnvPath("PATH");
paths.AddSuffixes(this->SearchPathSuffixes);
}
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 3e91545..1386a04 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -354,7 +354,7 @@ static int calculateCommandLineLengthLimit(int linkRuleLength)
size_t const arrSz = cmArraySize(limits);
int const sz = *std::min_element(limits, limits + arrSz);
if (sz == std::numeric_limits<int>::max()) {
- return -1;
+ return 0;
}
return sz - linkRuleLength;
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 1aa2ddb..bad5e2f 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -316,7 +316,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
std::string rspcontent;
std::string responseFlag;
- if (this->ForceResponseFile()) {
+ if (lang != "RC" && this->ForceResponseFile()) {
rspfile = "$RSP_FILE";
responseFlag = "@" + rspfile;
rspcontent = " $DEFINES $INCLUDES $FLAGS";
@@ -593,7 +593,9 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
this->SetMsvcTargetPdbVariable(vars);
- int const commandLineLengthLimit = this->ForceResponseFile() ? -1 : 0;
+ bool const isRC = (language == "RC");
+ int const commandLineLengthLimit =
+ ((!isRC && this->ForceResponseFile())) ? -1 : 0;
std::string const rspfile = objectFileName + ".rsp";
this->GetGlobalGenerator()->WriteBuild(
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx
index dd19760..70c8a65 100644
--- a/Source/cmQtAutoGeneratorInitializer.cxx
+++ b/Source/cmQtAutoGeneratorInitializer.cxx
@@ -25,79 +25,6 @@
#include "cmGlobalVisualStudioGenerator.h"
#endif
-static std::string GetAutogenTargetName(cmGeneratorTarget const* target)
-{
- std::string autogenTargetName = target->GetName();
- autogenTargetName += "_automoc";
- return autogenTargetName;
-}
-
-static std::string GetAutogenTargetDir(cmGeneratorTarget const* target)
-{
- cmMakefile* makefile = target->Target->GetMakefile();
- std::string targetDir = makefile->GetCurrentBinaryDirectory();
- targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
- targetDir += "/";
- targetDir += GetAutogenTargetName(target);
- targetDir += ".dir/";
- return targetDir;
-}
-
-static std::string GetAutogenTargetBuildDir(cmGeneratorTarget const* target)
-{
- cmMakefile* makefile = target->Target->GetMakefile();
- std::string targetDir = makefile->GetCurrentBinaryDirectory();
- targetDir += "/";
- targetDir += GetAutogenTargetName(target);
- targetDir += ".dir/";
- return targetDir;
-}
-
-static std::string GetSourceRelativePath(cmGeneratorTarget const* target,
- const std::string& fileName)
-{
- std::string pathRel;
- // Test if the file is child to any of the known directories
- {
- const std::string fileNameReal = cmsys::SystemTools::GetRealPath(fileName);
- std::string parentDirectory;
- bool match(false);
- {
- std::string testDirs[4];
- {
- cmMakefile* makefile = target->Target->GetMakefile();
- testDirs[0] = makefile->GetCurrentSourceDirectory();
- testDirs[1] = makefile->GetCurrentBinaryDirectory();
- testDirs[2] = makefile->GetHomeDirectory();
- testDirs[3] = makefile->GetHomeOutputDirectory();
- }
- for (int ii = 0; ii != sizeof(testDirs) / sizeof(std::string); ++ii) {
- const ::std::string testDir =
- cmsys::SystemTools::GetRealPath(testDirs[ii]);
- if (!testDir.empty() &&
- cmsys::SystemTools::IsSubDirectory(fileNameReal, testDir)) {
- parentDirectory = testDir;
- match = true;
- break;
- }
- }
- }
- // Use root as fallback parent directory
- if (!match) {
- cmsys::SystemTools::SplitPathRootComponent(fileNameReal,
- &parentDirectory);
- }
- pathRel = cmsys::SystemTools::RelativePath(
- parentDirectory, cmsys::SystemTools::GetParentDirectory(fileNameReal));
- }
- // Sanitize relative path
- if (!pathRel.empty()) {
- pathRel += '/';
- cmSystemTools::ReplaceString(pathRel, "..", "__");
- }
- return pathRel;
-}
-
static void SetupSourceFiles(cmGeneratorTarget const* target,
std::vector<std::string>& skipMoc,
std::vector<std::string>& mocSources,
@@ -128,16 +55,13 @@ static void SetupSourceFiles(cmGeneratorTarget const* target,
if (target->GetPropertyAsBool("AUTORCC")) {
if (ext == "qrc" &&
!cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) {
-
- std::string rcc_output_dir = GetAutogenTargetBuildDir(target);
- rcc_output_dir += GetSourceRelativePath(target, absFile);
- cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
-
std::string basename =
cmsys::SystemTools::GetFilenameWithoutLastExtension(absFile);
+ std::string rcc_output_dir = target->GetSupportDirectory();
+ cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
std::string rcc_output_file = rcc_output_dir;
- rcc_output_file += "qrc_" + basename + ".cpp";
+ rcc_output_file += "/qrc_" + basename + ".cpp";
makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
rcc_output_file.c_str(), false);
makefile->GetOrCreateSource(rcc_output_file, true);
@@ -441,6 +365,24 @@ static void MergeRccOptions(std::vector<std::string>& opts,
opts.insert(opts.end(), extraOpts.begin(), extraOpts.end());
}
+std::string GetAutogenTargetName(cmGeneratorTarget const* target)
+{
+ std::string autogenTargetName = target->GetName();
+ autogenTargetName += "_automoc";
+ return autogenTargetName;
+}
+
+std::string GetAutogenTargetDir(cmGeneratorTarget const* target)
+{
+ cmMakefile* makefile = target->Target->GetMakefile();
+ std::string targetDir = makefile->GetCurrentBinaryDirectory();
+ targetDir += makefile->GetCMakeInstance()->GetCMakeFilesDirectory();
+ targetDir += "/";
+ targetDir += GetAutogenTargetName(target);
+ targetDir += ".dir/";
+ return targetDir;
+}
+
static void copyTargetProperty(cmTarget* destinationTarget,
cmTarget* sourceTarget,
const std::string& propertyName)
@@ -803,18 +745,14 @@ void cmQtAutoGeneratorInitializer::InitializeAutogenTarget(
if (target->GetPropertyAsBool("AUTORCC")) {
if (ext == "qrc" &&
!cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC"))) {
-
- {
- std::string rcc_output_dir = GetAutogenTargetBuildDir(target);
- rcc_output_dir += GetSourceRelativePath(target, absFile);
- cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
-
- std::string basename =
- cmsys::SystemTools::GetFilenameWithoutLastExtension(absFile);
- std::string rcc_output_file = rcc_output_dir;
- rcc_output_file += "qrc_" + basename + ".cpp";
- rcc_output.push_back(rcc_output_file);
- }
+ std::string basename =
+ cmsys::SystemTools::GetFilenameWithoutLastExtension(absFile);
+
+ std::string rcc_output_dir = target->GetSupportDirectory();
+ cmSystemTools::MakeDirectory(rcc_output_dir.c_str());
+ std::string rcc_output_file = rcc_output_dir;
+ rcc_output_file += "/qrc_" + basename + ".cpp";
+ rcc_output.push_back(rcc_output_file);
if (!cmSystemTools::IsOn(sf->GetPropertyForUser("GENERATED"))) {
if (qtMajorVersion == "5") {
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index ac64397..3677a28 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -358,12 +358,11 @@ void cmQtAutoGenerators::WriteOldMocDefinitionsFile(
void cmQtAutoGenerators::Init()
{
- this->TargetBuildSubDir = this->TargetName;
- this->TargetBuildSubDir += ".dir/";
-
this->OutMocCppFilenameRel = this->TargetName;
this->OutMocCppFilenameRel += ".cpp";
- this->OutMocCppFilenameAbs = this->Builddir + this->OutMocCppFilenameRel;
+
+ this->OutMocCppFilename = this->Builddir;
+ this->OutMocCppFilename += this->OutMocCppFilenameRel;
std::vector<std::string> cdefList;
cmSystemTools::ExpandListArgument(this->MocCompileDefinitionsStr, cdefList);
@@ -440,7 +439,7 @@ static std::string ReadAll(const std::string& filename)
bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
{
- if (!cmsys::SystemTools::FileExists(this->OutMocCppFilenameAbs.c_str()) ||
+ if (!cmsys::SystemTools::FileExists(this->OutMocCppFilename.c_str()) ||
(this->OldCompileSettingsStr != this->CurrentCompileSettingsStr)) {
this->GenerateAll = true;
}
@@ -948,13 +947,12 @@ void cmQtAutoGenerators::ParseHeaders(
this->LogInfo(err.str());
}
+ const std::string basename =
+ cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName);
+
+ const std::string currentMoc = "moc_" + basename + ".cpp";
std::string macroName;
if (requiresMocing(contents, macroName)) {
- const std::string parentDir =
- this->TargetBuildSubDir + this->SourceRelativePath(headerName);
- const std::string basename =
- cmsys::SystemTools::GetFilenameWithoutLastExtension(headerName);
- const std::string currentMoc = parentDir + "moc_" + basename + ".cpp";
notIncludedMocs[headerName] = currentMoc;
}
}
@@ -1032,7 +1030,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
// check if we even need to update _automoc.cpp
if (!automocCppChanged) {
// compare contents of the _automoc.cpp file
- const std::string oldContents = ReadAll(this->OutMocCppFilenameAbs);
+ const std::string oldContents = ReadAll(this->OutMocCppFilename);
if (oldContents == automocSource) {
// nothing changed: don't touch the _automoc.cpp file
if (this->Verbose) {
@@ -1055,7 +1053,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
}
{
cmsys::ofstream outfile;
- outfile.open(this->OutMocCppFilenameAbs.c_str(), std::ios::trunc);
+ outfile.open(this->OutMocCppFilename.c_str(), std::ios::trunc);
outfile << automocSource;
outfile.close();
}
@@ -1264,10 +1262,8 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
if (ext == ".qrc") {
std::string basename =
cmsys::SystemTools::GetFilenameWithoutLastExtension(*si);
- std::string qrcOutputFile = this->TargetBuildSubDir +
- this->SourceRelativePath(*si) + "qrc_" + basename + ".cpp";
- // std::string qrcOutputFile = "CMakeFiles/" + this->OriginTargetName
- // + ".dir/qrc_" + basename + ".cpp";
+ std::string qrcOutputFile = "CMakeFiles/" + this->OriginTargetName +
+ ".dir/qrc_" + basename + ".cpp";
qrcGenMap[*si] = qrcOutputFile;
}
}
@@ -1302,10 +1298,8 @@ bool cmQtAutoGenerators::GenerateQrcFiles()
bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
const std::string& qrcOutputFile)
{
- std::string relName = this->SourceRelativePath(qrcInputFile);
- std::replace(relName.begin(), relName.end(), '/', '_');
- relName += cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile);
-
+ const std::string basename =
+ cmsys::SystemTools::GetFilenameWithoutLastExtension(qrcInputFile);
const ::std::string qrcBuildFile = this->Builddir + qrcOutputFile;
int sourceNewerThanQrc = 0;
@@ -1332,7 +1326,7 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
}
command.push_back("-name");
- command.push_back(relName);
+ command.push_back(basename);
command.push_back("-o");
command.push_back(qrcBuildFile);
command.push_back(qrcInputFile);
@@ -1357,49 +1351,6 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
return true;
}
-std::string cmQtAutoGenerators::SourceRelativePath(const std::string& filename)
-{
- std::string pathRel;
-
- // Test if the file is child to any of the known directories
- {
- std::string fileNameReal = cmsys::SystemTools::GetRealPath(filename);
- std::string parentDirectory;
- bool match(false);
- {
- const ::std::string* testDirs[4];
- testDirs[0] = &(this->Srcdir);
- testDirs[1] = &(this->Builddir);
- testDirs[2] = &(this->ProjectSourceDir);
- testDirs[3] = &(this->ProjectBinaryDir);
- for (int ii = 0; ii != sizeof(testDirs) / sizeof(const ::std::string*);
- ++ii) {
- const ::std::string testDir =
- cmsys::SystemTools::GetRealPath(*(testDirs[ii]));
- if (cmsys::SystemTools::IsSubDirectory(fileNameReal, testDir)) {
- parentDirectory = testDir;
- match = true;
- break;
- }
- }
- }
- // Use root as fallback parent directory
- if (!match) {
- cmsys::SystemTools::SplitPathRootComponent(fileNameReal,
- &parentDirectory);
- }
- pathRel = cmsys::SystemTools::RelativePath(
- parentDirectory, cmsys::SystemTools::GetParentDirectory(fileNameReal));
- }
-
- // Sanitize relative path
- if (!pathRel.empty()) {
- pathRel += '/';
- cmSystemTools::ReplaceString(pathRel, "..", "__");
- }
- return pathRel;
-}
-
/**
* @brief Collects name collisions as output/input pairs
* @return True if there were collisions
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index 5e7fab5..86913f0 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -83,8 +83,6 @@ private:
void Init();
- std::string SourceRelativePath(const std::string& filename);
-
bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
std::multimap<std::string, std::string>& collisions);
void NameCollisionLog(
@@ -125,9 +123,8 @@ private:
std::string CurrentCompileSettingsStr;
std::string OldCompileSettingsStr;
- std::string TargetBuildSubDir;
std::string OutMocCppFilenameRel;
- std::string OutMocCppFilenameAbs;
+ std::string OutMocCppFilename;
std::list<std::string> MocIncludes;
std::list<std::string> MocDefinitions;
std::vector<std::string> MocOptions;
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5e0d2b7..f435a1d 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1131,7 +1131,9 @@ const char* cmTarget::GetProperty(const std::string& prop,
// target because the configuration type may not be known at
// CMake time.
cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
- gg->CreateGenerationObjects();
+ if (!gg->GetConfigureDoneCMP0026()) {
+ gg->CreateGenerationObjects();
+ }
cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName());
this->Properties.SetProperty(propLOCATION, gt->GetLocationForBuild());
}
@@ -1150,7 +1152,9 @@ const char* cmTarget::GetProperty(const std::string& prop,
prop, this->ImportedGetFullPath(configName, false).c_str());
} else {
cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
- gg->CreateGenerationObjects();
+ if (!gg->GetConfigureDoneCMP0026()) {
+ gg->CreateGenerationObjects();
+ }
cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName());
this->Properties.SetProperty(
prop, gt->GetFullPath(configName, false).c_str());
@@ -1168,7 +1172,9 @@ const char* cmTarget::GetProperty(const std::string& prop,
prop, this->ImportedGetFullPath(configName, false).c_str());
} else {
cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator();
- gg->CreateGenerationObjects();
+ if (!gg->GetConfigureDoneCMP0026()) {
+ gg->CreateGenerationObjects();
+ }
cmGeneratorTarget* gt = gg->FindGeneratorTarget(this->GetName());
this->Properties.SetProperty(
prop, gt->GetFullPath(configName, false).c_str());
diff --git a/Source/cmVS14CLFlagTable.h b/Source/cmVS14CLFlagTable.h
index 4243f30..5812e79 100644
--- a/Source/cmVS14CLFlagTable.h
+++ b/Source/cmVS14CLFlagTable.h
@@ -16,7 +16,6 @@ static cmVS7FlagTable cmVS14CLFlagTable[] = {
{ "Optimization", "", "Custom", "Custom", 0 },
{ "Optimization", "Od", "Disabled", "Disabled", 0 },
- { "Optimization", "Os", "Minimize Size", "MinSize", 0 },
{ "Optimization", "O1", "Minimize Size", "MinSpace", 0 },
{ "Optimization", "O2", "Maximize Speed", "MaxSpeed", 0 },
{ "Optimization", "Ox", "Full Optimization", "Full", 0 },
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 7e17818..1999397 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -185,13 +185,12 @@ cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator(
this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
this->Platform = gg->GetPlatformName();
this->NsightTegra = gg->IsNsightTegra();
- for (int i =
- sscanf(gg->GetNsightTegraVersion().c_str(), "%u.%u.%u.%u",
- &this->NsightTegraVersion[0], &this->NsightTegraVersion[1],
- &this->NsightTegraVersion[2], &this->NsightTegraVersion[3]);
- i < 4; ++i) {
+ for (int i = 0; i < 4; ++i) {
this->NsightTegraVersion[i] = 0;
}
+ sscanf(gg->GetNsightTegraVersion().c_str(), "%u.%u.%u.%u",
+ &this->NsightTegraVersion[0], &this->NsightTegraVersion[1],
+ &this->NsightTegraVersion[2], &this->NsightTegraVersion[3]);
this->MSTools = !this->NsightTegra;
this->TargetCompileAsWinRT = false;
this->BuildFileStream = 0;