summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmParseJacocoCoverage.cxx1
-rw-r--r--Source/cmCoreTryCompile.cxx17
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx5
-rw-r--r--Source/cmFindProgramCommand.cxx2
-rw-r--r--Source/cmGlobalVisualStudioVersionedGenerator.cxx15
5 files changed, 33 insertions, 7 deletions
diff --git a/Source/CTest/cmParseJacocoCoverage.cxx b/Source/CTest/cmParseJacocoCoverage.cxx
index 61c5dcb..b78142a 100644
--- a/Source/CTest/cmParseJacocoCoverage.cxx
+++ b/Source/CTest/cmParseJacocoCoverage.cxx
@@ -29,6 +29,7 @@ protected:
this->PackageName = atts[1];
this->PackagePath.clear();
} else if (name == "sourcefile") {
+ this->FilePath.clear();
std::string fileName = atts[1];
if (this->PackagePath.empty()) {
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index eb52895..3892011 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -123,6 +123,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
std::string targetName;
std::vector<std::string> cmakeFlags(1, "CMAKE_FLAGS"); // fake argv[0]
std::vector<std::string> compileDefs;
+ std::string cmakeInternal;
std::string outputVariable;
std::string copyFile;
std::string copyFileError;
@@ -174,7 +175,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
DoingCExtensions,
DoingCxxExtensions,
DoingCudaExtensions,
- DoingSources
+ DoingSources,
+ DoingCMakeInternal
};
Doing doing = useSources ? DoingSources : DoingNone;
for (size_t i = 3; i < argv.size(); ++i) {
@@ -223,6 +225,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
} else if (argv[i] == "CUDA_EXTENSIONS") {
doing = DoingCudaExtensions;
didCudaExtensions = true;
+ } else if (argv[i] == "__CMAKE_INTERNAL") {
+ doing = DoingCMakeInternal;
} else if (doing == DoingCMakeFlags) {
cmakeFlags.push_back(argv[i]);
} else if (doing == DoingCompileDefinitions) {
@@ -296,6 +300,9 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
doing = DoingNone;
} else if (doing == DoingSources) {
sources.push_back(argv[i]);
+ } else if (doing == DoingCMakeInternal) {
+ cmakeInternal = argv[i];
+ doing = DoingNone;
} else if (i == 3) {
this->SrcFileSignature = false;
projectName = argv[i].c_str();
@@ -508,6 +515,14 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
}
}
fprintf(fout, "project(CMAKE_TRY_COMPILE%s)\n", projectLangs.c_str());
+ if (cmakeInternal == "ABI") {
+ // This is the ABI detection step, also used for implicit includes.
+ // Erase any include_directories() calls from the toolchain file so
+ // that we do not see them as implicit. Our ABI detection source
+ // does not include any system headers anyway.
+ fprintf(fout,
+ "set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES \"\")\n");
+ }
fprintf(fout, "set(CMAKE_VERBOSE_MAKEFILE 1)\n");
for (std::string const& li : testLangs) {
std::string langFlags = "CMAKE_" + li + "_FLAGS";
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 30067b7..e05f74b 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -845,6 +845,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
const std::vector<cmGeneratorTarget*>& targets =
lgen->GetGeneratorTargets();
for (cmGeneratorTarget* target : targets) {
+ if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ continue;
+ }
std::vector<std::string> includeDirs;
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
lgen->GetIncludeDirectories(includeDirs, target, "C", config);
@@ -971,6 +974,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
virtDir, "", "");
}
} break;
+ case cmStateEnums::INTERFACE_LIBRARY:
+ break;
default:
break;
}
diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx
index db34077..782f746 100644
--- a/Source/cmFindProgramCommand.cxx
+++ b/Source/cmFindProgramCommand.cxx
@@ -77,7 +77,7 @@ struct cmFindProgramHelper
this->TestNameExt = name;
this->TestNameExt += ext;
this->TestPath =
- cmSystemTools::CollapseCombinedPath(path, this->TestNameExt);
+ cmSystemTools::CollapseFullPath(this->TestNameExt, path);
if (cmSystemTools::FileExists(this->TestPath, true)) {
this->BestPath = this->TestPath;
diff --git a/Source/cmGlobalVisualStudioVersionedGenerator.cxx b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
index 4d74e32..f52abd0 100644
--- a/Source/cmGlobalVisualStudioVersionedGenerator.cxx
+++ b/Source/cmGlobalVisualStudioVersionedGenerator.cxx
@@ -18,8 +18,15 @@
#elif defined(_M_IA64)
# define HOST_PLATFORM_NAME "Itanium"
# define HOST_TOOLS_ARCH ""
+#elif defined(_WIN64)
+# define HOST_PLATFORM_NAME "x64"
+# define HOST_TOOLS_ARCH "x64"
#else
-# include "cmsys/SystemInformation.hxx"
+static bool VSIsWow64()
+{
+ BOOL isWow64 = false;
+ return IsWow64Process(GetCurrentProcess(), &isWow64) && isWow64;
+}
#endif
static std::string VSHostPlatformName()
@@ -27,8 +34,7 @@ static std::string VSHostPlatformName()
#ifdef HOST_PLATFORM_NAME
return HOST_PLATFORM_NAME;
#else
- cmsys::SystemInformation info;
- if (info.Is64Bits()) {
+ if (VSIsWow64()) {
return "x64";
} else {
return "Win32";
@@ -41,8 +47,7 @@ static std::string VSHostArchitecture()
#ifdef HOST_TOOLS_ARCH
return HOST_TOOLS_ARCH;
#else
- cmsys::SystemInformation info;
- if (info.Is64Bits()) {
+ if (VSIsWow64()) {
return "x64";
} else {
return "x86";