summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx3
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.cxx30
-rw-r--r--Source/CTest/cmCTestMemCheckHandler.h2
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx5
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx30
-rw-r--r--Source/cmLocalGenerator.cxx14
7 files changed, 52 insertions, 34 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index aad6371..6e0a944 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 19)
-set(CMake_VERSION_PATCH 20201116)
+set(CMake_VERSION_PATCH 20201118)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index 560e5c1..6f21d87 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -507,7 +507,8 @@ int cmCPackDebGenerator::PackageOnePack(std::string const& initialTopLevel,
this->GetOption("GEN_CPACK_OUTPUT_FILE_NAME"));
packageFileNames.push_back(std::move(packageFileName));
- if (this->IsOn("GEN_CPACK_DEBIAN_DEBUGINFO_PACKAGE")) {
+ if (this->IsOn("GEN_CPACK_DEBIAN_DEBUGINFO_PACKAGE") &&
+ this->GetOption("GEN_DBGSYMDIR")) {
cmsys::Glob gl;
std::string findExpr(this->GetOption("GEN_DBGSYMDIR"));
findExpr += "/*";
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index 73bf764..8a30dc0 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -326,8 +326,8 @@ void cmCTestMemCheckHandler::GenerateDartOutput(cmXMLWriter& xml)
case cmCTestMemCheckHandler::BOUNDS_CHECKER:
xml.Attribute("Checker", "BoundsChecker");
break;
- case cmCTestMemCheckHandler::CUDA_MEMCHECK:
- xml.Attribute("Checker", "CudaMemcheck");
+ case cmCTestMemCheckHandler::CUDA_SANITIZER:
+ xml.Attribute("Checker", "CudaSanitizer");
break;
case cmCTestMemCheckHandler::ADDRESS_SANITIZER:
xml.Attribute("Checker", "AddressSanitizer");
@@ -470,7 +470,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
} else if (testerName.find("cuda-memcheck") != std::string::npos ||
testerName.find("compute-sanitizer") != std::string::npos) {
- this->MemoryTesterStyle = cmCTestMemCheckHandler::CUDA_MEMCHECK;
+ this->MemoryTesterStyle = cmCTestMemCheckHandler::CUDA_SANITIZER;
} else {
this->MemoryTesterStyle = cmCTestMemCheckHandler::UNKNOWN;
}
@@ -492,10 +492,10 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->CTest->GetCTestConfiguration("BoundsCheckerCommand");
this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER;
} else if (cmSystemTools::FileExists(
- this->CTest->GetCTestConfiguration("CudaMemcheckCommand"))) {
+ this->CTest->GetCTestConfiguration("CudaSanitizerCommand"))) {
this->MemoryTester =
- this->CTest->GetCTestConfiguration("CudaMemcheckCommand");
- this->MemoryTesterStyle = cmCTestMemCheckHandler::CUDA_MEMCHECK;
+ this->CTest->GetCTestConfiguration("CudaSanitizerCommand");
+ this->MemoryTesterStyle = cmCTestMemCheckHandler::CUDA_SANITIZER;
}
if (this->CTest->GetCTestConfiguration("MemoryCheckType") ==
"AddressSanitizer") {
@@ -539,8 +539,8 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterStyle = cmCTestMemCheckHandler::VALGRIND;
} else if (checkType == "DrMemory") {
this->MemoryTesterStyle = cmCTestMemCheckHandler::DRMEMORY;
- } else if (checkType == "CudaMemcheck") {
- this->MemoryTesterStyle = cmCTestMemCheckHandler::CUDA_MEMCHECK;
+ } else if (checkType == "CudaSanitizer") {
+ this->MemoryTesterStyle = cmCTestMemCheckHandler::CUDA_SANITIZER;
}
}
if (this->MemoryTester.empty()) {
@@ -566,10 +566,10 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
.empty()) {
memoryTesterOptions =
this->CTest->GetCTestConfiguration("DrMemoryCommandOptions");
- } else if (!this->CTest->GetCTestConfiguration("CudaMemcheckCommandOptions")
+ } else if (!this->CTest->GetCTestConfiguration("CudaSanitizerCommandOptions")
.empty()) {
memoryTesterOptions =
- this->CTest->GetCTestConfiguration("CudaMemcheckCommandOptions");
+ this->CTest->GetCTestConfiguration("CudaSanitizerCommandOptions");
}
this->MemoryTesterOptions =
cmSystemTools::ParseArguments(memoryTesterOptions);
@@ -703,8 +703,8 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
this->MemoryTesterOptions.emplace_back("/M");
break;
}
- case cmCTestMemCheckHandler::CUDA_MEMCHECK: {
- // cuda-memcheck separates flags from arguments by spaces
+ case cmCTestMemCheckHandler::CUDA_SANITIZER: {
+ // cuda sanitizer separates flags from arguments by spaces
if (this->MemoryTesterOptions.empty()) {
this->MemoryTesterOptions.emplace_back("--tool");
this->MemoryTesterOptions.emplace_back("memcheck");
@@ -800,7 +800,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckOutput(const std::string& str,
return this->ProcessMemCheckSanitizerOutput(str, log, results);
case cmCTestMemCheckHandler::BOUNDS_CHECKER:
return this->ProcessMemCheckBoundsCheckerOutput(str, log, results);
- case cmCTestMemCheckHandler::CUDA_MEMCHECK:
+ case cmCTestMemCheckHandler::CUDA_SANITIZER:
return this->ProcessMemCheckCudaOutput(str, log, results);
default:
log.append("\nMemory checking style used was: ");
@@ -1188,7 +1188,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckCudaOutput(
if (memcheckLine.find(lines[cc])) {
cmCTestOptionalLog(this->CTest, DEBUG,
- "cuda-memcheck line " << lines[cc] << std::endl,
+ "cuda sanitizer line " << lines[cc] << std::endl,
this->Quiet);
int failure = -1;
auto& line = lines[cc];
@@ -1219,7 +1219,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckCudaOutput(
nonMemcheckOutput.push_back(cc);
}
}
- // Now put all all the non cuda-memcheck output into the test output
+ // Now put all all the non cuda sanitizer output into the test output
// This should be last in case it gets truncated by the output
// limiting code
for (std::string::size_type i : nonMemcheckOutput) {
diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h
index 6ef5d20..7ab00db 100644
--- a/Source/CTest/cmCTestMemCheckHandler.h
+++ b/Source/CTest/cmCTestMemCheckHandler.h
@@ -45,7 +45,7 @@ private:
DRMEMORY,
BOUNDS_CHECKER,
// checkers after here do not use the standard error list
- CUDA_MEMCHECK,
+ CUDA_SANITIZER,
ADDRESS_SANITIZER,
LEAK_SANITIZER,
THREAD_SANITIZER,
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index c6c540b..9c3a533 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -589,6 +589,11 @@ cmGlobalUnixMakefileGenerator3::GenerateBuildCommand(
}
makeCommand.Add(this->SelectMakeProgram(makeProgram));
+ // Explicitly tell the make tool to use the Makefile written by
+ // cmLocalUnixMakefileGenerator3::WriteLocalMakefile
+ makeCommand.Add("-f");
+ makeCommand.Add("Makefile");
+
if (jobs != cmake::NO_BUILD_PARALLEL_LEVEL) {
if (jobs == cmake::DEFAULT_BUILD_PARALLEL_LEVEL) {
makeCommand.Add("-j");
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 91f8c2b..026e96c 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3441,10 +3441,16 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
if (!libTarget) {
if (libItem->IsPath) {
// Get or create a direct file ref in the root project
- auto it = this->ExternalLibRefs.find(libItem->Value.Value);
+ auto cleanPath = libItem->Value.Value;
+ if (cmSystemTools::FileIsFullPath(cleanPath)) {
+ // Some arguments are reported as paths, but they are actually not,
+ // so we can't collapse them, and neither can we collapse relative
+ // paths
+ cleanPath = cmSystemTools::CollapseFullPath(cleanPath);
+ }
+ auto it = this->ExternalLibRefs.find(cleanPath);
if (it == this->ExternalLibRefs.end()) {
- buildFile = CreateXCodeBuildFileFromPath(libItem->Value.Value, gt,
- "", nullptr);
+ buildFile = CreateXCodeBuildFileFromPath(cleanPath, gt, "", nullptr);
if (!buildFile) {
// Add this library item back to a regular linker flag list
for (const auto& conf : configItemMap) {
@@ -3452,7 +3458,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
}
continue;
}
- this->ExternalLibRefs.emplace(libItem->Value.Value, buildFile);
+ this->ExternalLibRefs.emplace(cleanPath, buildFile);
} else {
buildFile = it->second;
}
@@ -3584,7 +3590,11 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
for (auto const& libItem : configItemMap[configName]) {
auto const& libName = *libItem;
if (libName.IsPath) {
- const auto libPath = GetLibraryOrFrameworkPath(libName.Value.Value);
+ auto cleanPath = libName.Value.Value;
+ if (cmSystemTools::FileIsFullPath(cleanPath)) {
+ cleanPath = cmSystemTools::CollapseFullPath(cleanPath);
+ }
+ const auto libPath = GetLibraryOrFrameworkPath(cleanPath);
if (cmSystemTools::StringEndsWith(libPath.c_str(), ".framework")) {
const auto fwName =
cmSystemTools::GetFilenameWithoutExtension(libPath);
@@ -3592,17 +3602,17 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
libPaths.Add("-F " + this->XCodeEscapePath(fwDir));
libPaths.Add("-framework " + fwName);
} else {
- libPaths.Add(this->XCodeEscapePath(libName.Value.Value));
+ libPaths.Add(this->XCodeEscapePath(cleanPath));
}
if ((!libName.Target || libName.Target->IsImported()) &&
IsLinkPhaseLibraryExtension(libPath)) {
// Create file reference for embedding
- auto it = this->ExternalLibRefs.find(libName.Value.Value);
+ auto it = this->ExternalLibRefs.find(cleanPath);
if (it == this->ExternalLibRefs.end()) {
- auto* buildFile = this->CreateXCodeBuildFileFromPath(
- libName.Value.Value, gt, "", nullptr);
+ auto* buildFile =
+ this->CreateXCodeBuildFileFromPath(cleanPath, gt, "", nullptr);
if (buildFile) {
- this->ExternalLibRefs.emplace(libName.Value.Value, buildFile);
+ this->ExternalLibRefs.emplace(cleanPath, buildFile);
}
}
}
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2054200..8a3f285 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2607,14 +2607,16 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
// Add pchHeader to source files, which will
// be grouped as "Precompile Header File"
auto pchHeader_sf = this->Makefile->GetOrCreateSource(
- pchHeader, true, cmSourceFileLocationKind::Known);
+ pchHeader, false, cmSourceFileLocationKind::Known);
std::string err;
pchHeader_sf->ResolveFullPath(&err);
-
- // The pch file is generated, but mark it as not generated
- // so that a clean operation will not remove it from disk
- pchHeader_sf->SetProperty("GENERATED", "0");
-
+ if (!err.empty()) {
+ std::ostringstream msg;
+ msg << "Unable to resolve full path of PCH-header '" << pchHeader
+ << "' assigned to target " << target->GetName()
+ << ", although its path is supposed to be known!";
+ this->IssueMessage(MessageType::FATAL_ERROR, msg.str());
+ }
target->AddSource(pchHeader);
}
}