Merge topic 'file-download-no-save'
fed7d8f76d file(DOWNLOAD): Make file argument optional
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5060
diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml
index 96b95c8..88756eb 100644
--- a/.gitlab/rules.yml
+++ b/.gitlab/rules.yml
@@ -12,7 +12,7 @@
.run_automatically:
rules:
- if: '$CI_PROJECT_PATH == "cmake/cmake"'
- when: always
+ when: on_success
- if: '$CI_MERGE_REQUEST_ID'
- when: always
+ when: on_success
- when: never
diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst
index c0677d2..a77ba37 100644
--- a/Help/command/add_test.rst
+++ b/Help/command/add_test.rst
@@ -10,9 +10,8 @@
[WORKING_DIRECTORY <dir>]
[COMMAND_EXPAND_LISTS])
-Adds a test called ``<name>``. The test name may contain arbitrary
-characters except for double-quotes. However, if it contains spaces
-or semicolons it must be enclosed in double-quotes. The options are:
+Adds a test called ``<name>``. The test name may not contain spaces,
+quotes, or other characters special in CMake syntax. The options are:
``COMMAND``
Specify the test command-line. If ``<command>`` specifies an
diff --git a/Help/release/3.18.rst b/Help/release/3.18.rst
index 427840e..ba80d2b 100644
--- a/Help/release/3.18.rst
+++ b/Help/release/3.18.rst
@@ -332,3 +332,10 @@
architecture (the Xcode ``ARCHS`` setting). This is needed for Xcode 12
to select the host's architecture, which older versions of Xcode did
by default.
+
+* In CMake 3.18.0 the :command:`add_test` command learned to support
+ special characters in test names. This was accidentally left out of
+ its release notes. Unfortunately the fix breaks existing projects
+ that were using manual quoting or escaping to work around the prior
+ limitation. This fix has been reverted in 3.18.1, but may be
+ re-introduced in future versions of CMake with a policy for compatibility.
diff --git a/Help/release/dev/EXCLUDE_FROM_ALL-genex.rst b/Help/release/dev/EXCLUDE_FROM_ALL-genex.rst
new file mode 100644
index 0000000..4d5a83c
--- /dev/null
+++ b/Help/release/dev/EXCLUDE_FROM_ALL-genex.rst
@@ -0,0 +1,5 @@
+EXCLUDE_FROM_ALL-genex
+----------------------
+
+* The :prop_tgt:`EXCLUDE_FROM_ALL` target property gained support for
+ :manual:`generator expressions <cmake-generator-expressions(7)>`.
diff --git a/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake
index 7cd7c47..cb1ab1d 100644
--- a/Modules/CMakeDetermineCompiler.cmake
+++ b/Modules/CMakeDetermineCompiler.cmake
@@ -140,7 +140,9 @@
OUTPUT_VARIABLE _cmake_sysroot_run_out
ERROR_VARIABLE _cmake_sysroot_run_err)
- if(_cmake_sysroot_run_out AND NOT _cmake_sysroot_run_err AND IS_DIRECTORY "${_cmake_sysroot_run_out}/usr")
+ if(_cmake_sysroot_run_out AND NOT _cmake_sysroot_run_err
+ AND NOT _cmake_sysroot_run_out STREQUAL "/"
+ AND IS_DIRECTORY "${_cmake_sysroot_run_out}/usr")
file(TO_CMAKE_PATH "${_cmake_sysroot_run_out}/usr" _cmake_sysroot_run_out_usr)
set(CMAKE_${lang}_COMPILER_SYSROOT "${_cmake_sysroot_run_out_usr}" PARENT_SCOPE)
else()
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 3a47090..aecc00b 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1124,7 +1124,11 @@
message(FATAL_ERROR "Tag for git checkout should not be empty.")
endif()
- set(git_clone_options "--no-checkout")
+ if(GIT_VERSION_STRING VERSION_LESS 2.20 OR 2.21 VERSION_LESS_EQUAL GIT_VERSION_STRING)
+ set(git_clone_options "--no-checkout")
+ else()
+ set(git_clone_options)
+ endif()
if(git_shallow)
if(NOT GIT_VERSION_STRING VERSION_LESS 1.7.10)
list(APPEND git_clone_options "--depth 1 --no-single-branch")
diff --git a/Modules/FindXalanC.cmake b/Modules/FindXalanC.cmake
index ca9195c..a7fb766 100644
--- a/Modules/FindXalanC.cmake
+++ b/Modules/FindXalanC.cmake
@@ -49,9 +49,9 @@
function(_XalanC_GET_VERSION version_hdr)
file(STRINGS ${version_hdr} _contents REGEX "^[ \t]*#define XALAN_VERSION_.*")
if(_contents)
- string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" XalanC_MAJOR "${_contents}")
- string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" XalanC_MINOR "${_contents}")
- string(REGEX REPLACE "[^*]*#define XALAN_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" XalanC_PATCH "${_contents}")
+ string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MAJOR[ \t(]+([0-9]+).*" "\\1" XalanC_MAJOR "${_contents}")
+ string(REGEX REPLACE "[^*]*#define XALAN_VERSION_MINOR[ \t(]+([0-9]+).*" "\\1" XalanC_MINOR "${_contents}")
+ string(REGEX REPLACE "[^*]*#define XALAN_VERSION_REVISION[ \t(]+([0-9]+).*" "\\1" XalanC_PATCH "${_contents}")
if(NOT XalanC_MAJOR MATCHES "^[0-9]+$")
message(FATAL_ERROR "Version parsing failed for XALAN_VERSION_MAJOR!")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 0fea915..1dced9a 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 18)
-set(CMake_VERSION_PATCH 20200724)
+set(CMake_VERSION_PATCH 20200728)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx
index db426b2..a18cbb4 100644
--- a/Source/CTest/cmCTestBuildAndTestHandler.cxx
+++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx
@@ -182,10 +182,9 @@
std::vector<std::string> extraPaths;
std::vector<std::string> failed;
fullPath = cmCTestTestHandler::FindExecutable(
- this->CTest, this->ConfigSample.c_str(), resultingConfig, extraPaths,
- failed);
+ this->CTest, this->ConfigSample, resultingConfig, extraPaths, failed);
if (!fullPath.empty() && !resultingConfig.empty()) {
- this->CTest->SetConfigType(resultingConfig.c_str());
+ this->CTest->SetConfigType(resultingConfig);
}
out << "Using config sample with results: " << fullPath << " and "
<< resultingConfig << std::endl;
@@ -296,9 +295,8 @@
extraPaths.push_back(tempPath);
}
std::vector<std::string> failed;
- fullPath =
- cmCTestTestHandler::FindExecutable(this->CTest, this->TestCommand.c_str(),
- resultingConfig, extraPaths, failed);
+ fullPath = cmCTestTestHandler::FindExecutable(
+ this->CTest, this->TestCommand, resultingConfig, extraPaths, failed);
if (!cmSystemTools::FileExists(fullPath)) {
out << "Could not find path to executable, perhaps it was not built: "
diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx
index 44fdc29..f33bdc4 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -12,6 +12,7 @@
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -38,10 +39,9 @@
this->Handler = handler;
- const char* ctestBuildCommand =
- this->Makefile->GetDefinition("CTEST_BUILD_COMMAND");
- if (ctestBuildCommand && *ctestBuildCommand) {
- this->CTest->SetCTestConfiguration("MakeCommand", ctestBuildCommand,
+ cmProp ctestBuildCommand = this->Makefile->GetDef("CTEST_BUILD_COMMAND");
+ if (cmNonempty(ctestBuildCommand)) {
+ this->CTest->SetCTestConfiguration("MakeCommand", *ctestBuildCommand,
this->Quiet);
} else {
const char* cmakeGeneratorName =
@@ -108,7 +108,7 @@
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"SetMakeCommand:" << buildCommand << "\n",
this->Quiet);
- this->CTest->SetCTestConfiguration("MakeCommand", buildCommand.c_str(),
+ this->CTest->SetCTestConfiguration("MakeCommand", buildCommand,
this->Quiet);
} else {
std::ostringstream ostr;
@@ -123,16 +123,15 @@
}
}
- if (const char* useLaunchers =
- this->Makefile->GetDefinition("CTEST_USE_LAUNCHERS")) {
- this->CTest->SetCTestConfiguration("UseLaunchers", useLaunchers,
+ if (cmProp useLaunchers = this->Makefile->GetDef("CTEST_USE_LAUNCHERS")) {
+ this->CTest->SetCTestConfiguration("UseLaunchers", *useLaunchers,
this->Quiet);
}
- if (const char* labelsForSubprojects =
- this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) {
+ if (cmProp labelsForSubprojects =
+ this->Makefile->GetDef("CTEST_LABELS_FOR_SUBPROJECTS")) {
this->CTest->SetCTestConfiguration("LabelsForSubprojects",
- labelsForSubprojects, this->Quiet);
+ *labelsForSubprojects, this->Quiet);
}
handler->SetQuiet(this->Quiet);
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index f42c3f1..8716b31 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -12,6 +12,7 @@
#include "cmCTestConfigureHandler.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmake.h"
@@ -38,12 +39,12 @@
return nullptr;
}
- const char* ctestConfigureCommand =
- this->Makefile->GetDefinition("CTEST_CONFIGURE_COMMAND");
+ cmProp ctestConfigureCommand =
+ this->Makefile->GetDef("CTEST_CONFIGURE_COMMAND");
- if (ctestConfigureCommand && *ctestConfigureCommand) {
+ if (cmNonempty(ctestConfigureCommand)) {
this->CTest->SetCTestConfiguration("ConfigureCommand",
- ctestConfigureCommand, this->Quiet);
+ *ctestConfigureCommand, this->Quiet);
} else {
const char* cmakeGeneratorName =
this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR");
@@ -125,8 +126,8 @@
cmakeConfigureCommand += source_dir;
cmakeConfigureCommand += "\"";
- this->CTest->SetCTestConfiguration(
- "ConfigureCommand", cmakeConfigureCommand.c_str(), this->Quiet);
+ this->CTest->SetCTestConfiguration("ConfigureCommand",
+ cmakeConfigureCommand, this->Quiet);
} else {
this->SetError(
"Configure command is not specified. If this is a "
@@ -136,10 +137,10 @@
}
}
- if (const char* labelsForSubprojects =
- this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) {
+ if (cmProp labelsForSubprojects =
+ this->Makefile->GetDef("CTEST_LABELS_FOR_SUBPROJECTS")) {
this->CTest->SetCTestConfiguration("LabelsForSubprojects",
- labelsForSubprojects, this->Quiet);
+ *labelsForSubprojects, this->Quiet);
}
cmCTestConfigureHandler* handler = this->CTest->GetConfigureHandler();
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index b839c10..093b2d1 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -469,8 +469,8 @@
}
const std::string fileName = cmSystemTools::GetFilenameName(fullFileName);
- std::string shortFileName =
- this->CTest->GetShortPathToFile(fullFileName.c_str());
+ const std::string shortFileName =
+ this->CTest->GetShortPathToFile(fullFileName);
const cmCTestCoverageHandlerContainer::SingleFileCoverageVector& fcov =
file.second;
covLogXML.StartElement("File");
@@ -538,7 +538,7 @@
covSumXML.StartElement("File");
covSumXML.Attribute("Name", fileName);
covSumXML.Attribute("FullPath",
- this->CTest->GetShortPathToFile(fullFileName.c_str()));
+ this->CTest->GetShortPathToFile(fullFileName));
covSumXML.Attribute("Covered", tested + untested > 0 ? "true" : "false");
covSumXML.Element("LOCTested", tested);
covSumXML.Element("LOCUnTested", untested);
@@ -1887,8 +1887,8 @@
// start the file output
covLogXML.StartElement("File");
covLogXML.Attribute("Name", i->first);
- covLogXML.Attribute(
- "FullPath", this->CTest->GetShortPathToFile(i->second.c_str()));
+ covLogXML.Attribute("FullPath",
+ this->CTest->GetShortPathToFile(i->second));
covLogXML.StartElement("Report");
// write the bullseye header
line = 0;
@@ -2064,8 +2064,7 @@
total_untested += (totalFunctions - functionsCalled);
std::string fileName = cmSystemTools::GetFilenameName(file);
- std::string shortFileName =
- this->CTest->GetShortPathToFile(file.c_str());
+ std::string shortFileName = this->CTest->GetShortPathToFile(file);
float cper = static_cast<float>(percentBranch + percentFunction);
if (totalBranches > 0) {
@@ -2266,7 +2265,7 @@
// is the end of the target-wide labels.
inTarget = false;
- source = this->CTest->GetShortPathToFile(line.c_str());
+ source = this->CTest->GetShortPathToFile(line);
// Label the source with the target labels.
LabelSet& labelSet = this->SourceLabels[source];
@@ -2320,7 +2319,7 @@
// The source is filtered out if it does not have any labels in
// common with the filter set.
- std::string shortSrc = this->CTest->GetShortPathToFile(source.c_str());
+ std::string shortSrc = this->CTest->GetShortPathToFile(source);
auto li = this->SourceLabels.find(shortSrc);
if (li != this->SourceLabels.end()) {
return !this->IntersectsFilter(li->second);
@@ -2342,14 +2341,14 @@
std::vector<std::string> files = gl.GetFiles();
for (std::string const& f : files) {
if (this->ShouldIDoCoverage(f, cont->SourceDir, cont->BinaryDir)) {
- extraMatches.insert(this->CTest->GetShortPathToFile(f.c_str()));
+ extraMatches.insert(this->CTest->GetShortPathToFile(f));
}
}
}
if (!extraMatches.empty()) {
for (auto const& i : cont->TotalCoverage) {
- std::string shortPath = this->CTest->GetShortPathToFile(i.first.c_str());
+ std::string shortPath = this->CTest->GetShortPathToFile(i.first);
extraMatches.erase(shortPath);
}
}
diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx
index cc0b4ed..a71f550 100644
--- a/Source/CTest/cmCTestGenericHandler.cxx
+++ b/Source/CTest/cmCTestGenericHandler.cxx
@@ -100,7 +100,7 @@
<< std::endl);
return false;
}
- this->CTest->AddSubmitFile(part, ostr.str().c_str());
+ this->CTest->AddSubmitFile(part, ostr.str());
return true;
}
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx
index a755632..03b7173 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -14,6 +14,7 @@
#include "cmExecutionStatus.h"
#include "cmMakefile.h"
#include "cmMessageType.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmWorkingDirectory.h"
@@ -125,23 +126,21 @@
// CTEST_CONFIGURATION_TYPE script variable if it is defined.
// The current script value trumps the -C argument on the command
// line.
- const char* ctestConfigType =
- this->Makefile->GetDefinition("CTEST_CONFIGURATION_TYPE");
+ cmProp ctestConfigType = this->Makefile->GetDef("CTEST_CONFIGURATION_TYPE");
if (ctestConfigType) {
- this->CTest->SetConfigType(ctestConfigType);
+ this->CTest->SetConfigType(*ctestConfigType);
}
if (!this->Build.empty()) {
this->CTest->SetCTestConfiguration(
- "BuildDirectory", cmSystemTools::CollapseFullPath(this->Build).c_str(),
+ "BuildDirectory", cmSystemTools::CollapseFullPath(this->Build),
this->Quiet);
} else {
std::string const& bdir =
this->Makefile->GetSafeDefinition("CTEST_BINARY_DIRECTORY");
if (!bdir.empty()) {
this->CTest->SetCTestConfiguration(
- "BuildDirectory", cmSystemTools::CollapseFullPath(bdir).c_str(),
- this->Quiet);
+ "BuildDirectory", cmSystemTools::CollapseFullPath(bdir), this->Quiet);
} else {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"CTEST_BINARY_DIRECTORY not set" << std::endl;);
@@ -151,20 +150,18 @@
cmCTestLog(this->CTest, DEBUG,
"Set source directory to: " << this->Source << std::endl);
this->CTest->SetCTestConfiguration(
- "SourceDirectory", cmSystemTools::CollapseFullPath(this->Source).c_str(),
+ "SourceDirectory", cmSystemTools::CollapseFullPath(this->Source),
this->Quiet);
} else {
this->CTest->SetCTestConfiguration(
"SourceDirectory",
cmSystemTools::CollapseFullPath(
- this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY"))
- .c_str(),
+ this->Makefile->GetSafeDefinition("CTEST_SOURCE_DIRECTORY")),
this->Quiet);
}
- if (const char* changeId =
- this->Makefile->GetDefinition("CTEST_CHANGE_ID")) {
- this->CTest->SetCTestConfiguration("ChangeId", changeId, this->Quiet);
+ if (cmProp changeId = this->Makefile->GetDef("CTEST_CHANGE_ID")) {
+ this->CTest->SetCTestConfiguration("ChangeId", *changeId, this->Quiet);
}
cmCTestLog(this->CTest, DEBUG, "Initialize handler" << std::endl;);
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx
index d2772a7..822049e 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -354,7 +354,7 @@
cmCTestMemCheckHandler::TestResultsVector::size_type cc;
for (cmCTestTestResult const& result : this->TestResults) {
std::string testPath = result.Path + "/" + result.Name;
- xml.Element("Test", this->CTest->GetShortPathToFile(testPath.c_str()));
+ xml.Element("Test", this->CTest->GetShortPathToFile(testPath));
}
xml.EndElement(); // TestList
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
diff --git a/Source/CTest/cmCTestReadCustomFilesCommand.cxx b/Source/CTest/cmCTestReadCustomFilesCommand.cxx
index ed14d06..a25cca4 100644
--- a/Source/CTest/cmCTestReadCustomFilesCommand.cxx
+++ b/Source/CTest/cmCTestReadCustomFilesCommand.cxx
@@ -15,7 +15,7 @@
}
for (std::string const& arg : args) {
- this->CTest->ReadCustomConfigurationFileTree(arg.c_str(), this->Makefile);
+ this->CTest->ReadCustomConfigurationFileTree(arg, this->Makefile);
}
return true;
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 2c8e385..4d65c9b 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -619,11 +619,11 @@
cmCTestMemCheckHandler* handler =
static_cast<cmCTestMemCheckHandler*>(this->TestHandler);
this->ActualCommand = handler->MemoryTester;
- this->TestProperties->Args[1] = this->TestHandler->FindTheExecutable(
- this->TestProperties->Args[1].c_str());
+ this->TestProperties->Args[1] =
+ this->TestHandler->FindTheExecutable(this->TestProperties->Args[1]);
} else {
- this->ActualCommand = this->TestHandler->FindTheExecutable(
- this->TestProperties->Args[1].c_str());
+ this->ActualCommand =
+ this->TestHandler->FindTheExecutable(this->TestProperties->Args[1]);
++j; // skip the executable (it will be actualCommand)
}
std::string testCommand =
diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx
index fe68406..6398d66 100644
--- a/Source/CTest/cmCTestStartCommand.cxx
+++ b/Source/CTest/cmCTestStartCommand.cxx
@@ -94,10 +94,9 @@
std::string sourceDir = cmSystemTools::CollapseFullPath(src_dir);
std::string binaryDir = cmSystemTools::CollapseFullPath(bld_dir);
- this->CTest->SetCTestConfiguration("SourceDirectory", sourceDir.c_str(),
+ this->CTest->SetCTestConfiguration("SourceDirectory", sourceDir,
this->Quiet);
- this->CTest->SetCTestConfiguration("BuildDirectory", binaryDir.c_str(),
- this->Quiet);
+ this->CTest->SetCTestConfiguration("BuildDirectory", binaryDir, this->Quiet);
if (smodel) {
cmCTestOptionalLog(this->CTest, HANDLER_OUTPUT,
diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx
index 279216e..026e98f 100644
--- a/Source/CTest/cmCTestSubmitCommand.cxx
+++ b/Source/CTest/cmCTestSubmitCommand.cxx
@@ -35,12 +35,12 @@
cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
{
- const char* submitURL = !this->SubmitURL.empty()
- ? this->SubmitURL.c_str()
- : this->Makefile->GetDefinition("CTEST_SUBMIT_URL");
+ const std::string* submitURL = !this->SubmitURL.empty()
+ ? &this->SubmitURL
+ : this->Makefile->GetDef("CTEST_SUBMIT_URL");
if (submitURL) {
- this->CTest->SetCTestConfiguration("SubmitURL", submitURL, this->Quiet);
+ this->CTest->SetCTestConfiguration("SubmitURL", *submitURL, this->Quiet);
} else {
this->CTest->SetCTestConfigurationFromCMakeVariable(
this->Makefile, "DropMethod", "CTEST_DROP_METHOD", this->Quiet);
@@ -108,7 +108,7 @@
if (this->PartsMentioned) {
auto parts =
cmMakeRange(this->Parts).transform([this](std::string const& arg) {
- return this->CTest->GetPartFromName(arg.c_str());
+ return this->CTest->GetPartFromName(arg);
});
handler->SelectParts(std::set<cmCTest::Part>(parts.begin(), parts.end()));
}
@@ -177,7 +177,7 @@
!this->Files.empty() || cm::contains(keywords, "FILES");
cm::erase_if(this->Parts, [this](std::string const& arg) -> bool {
- cmCTest::Part p = this->CTest->GetPartFromName(arg.c_str());
+ cmCTest::Part p = this->CTest->GetPartFromName(arg);
if (p == cmCTest::PartCount) {
std::ostringstream e;
e << "Part name \"" << arg << "\" is invalid.";
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index ea36df5..5b54573 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -797,7 +797,7 @@
gfile = gfile.substr(glen);
cmCTestOptionalLog(this->CTest, DEBUG,
"Glob file: " << gfile << std::endl, this->Quiet);
- this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfile.c_str());
+ this->CTest->AddSubmitFile(cmCTest::PartCoverage, gfile);
}
} else {
cmCTestLog(this->CTest, ERROR_MESSAGE, "Problem globbing" << std::endl);
diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx
index c71b409..07ea912 100644
--- a/Source/CTest/cmCTestTestCommand.cxx
+++ b/Source/CTest/cmCTestTestCommand.cxx
@@ -13,6 +13,7 @@
#include "cmCTestTestHandler.h"
#include "cmDuration.h"
#include "cmMakefile.h"
+#include "cmProperty.h"
#include "cmStringAlgorithms.h"
void cmCTestTestCommand::BindArguments()
@@ -134,10 +135,10 @@
}
handler->SetTestLoad(testLoad);
- if (const char* labelsForSubprojects =
- this->Makefile->GetDefinition("CTEST_LABELS_FOR_SUBPROJECTS")) {
+ if (cmProp labelsForSubprojects =
+ this->Makefile->GetDef("CTEST_LABELS_FOR_SUBPROJECTS")) {
this->CTest->SetCTestConfiguration("LabelsForSubprojects",
- labelsForSubprojects, this->Quiet);
+ *labelsForSubprojects, this->Quiet);
}
handler->SetQuiet(this->Quiet);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index d0dbaae..70e84ee 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1374,7 +1374,7 @@
xml.StartElement("TestList");
for (cmCTestTestResult const& result : this->TestResults) {
std::string testPath = result.Path + "/" + result.Name;
- xml.Element("Test", this->CTest->GetShortPathToFile(testPath.c_str()));
+ xml.Element("Test", this->CTest->GetShortPathToFile(testPath));
}
xml.EndElement(); // TestList
for (cmCTestTestResult& result : this->TestResults) {
@@ -1483,8 +1483,8 @@
}
std::string testPath = result.Path + "/" + result.Name;
xml.Element("Name", result.Name);
- xml.Element("Path", this->CTest->GetShortPathToFile(result.Path.c_str()));
- xml.Element("FullName", this->CTest->GetShortPathToFile(testPath.c_str()));
+ xml.Element("Path", this->CTest->GetShortPathToFile(result.Path));
+ xml.Element("FullName", this->CTest->GetShortPathToFile(testPath));
xml.Element("FullCommandLine", result.FullCommandLine);
}
@@ -1546,12 +1546,12 @@
}
// Find the appropriate executable to run for a test
-std::string cmCTestTestHandler::FindTheExecutable(const char* exe)
+std::string cmCTestTestHandler::FindTheExecutable(const std::string& exe)
{
std::string resConfig;
std::vector<std::string> extraPaths;
std::vector<std::string> failedPaths;
- if (strcmp(exe, "NOT_AVAILABLE") == 0) {
+ if (exe == "NOT_AVAILABLE") {
return exe;
}
return cmCTestTestHandler::FindExecutable(this->CTest, exe, resConfig,
@@ -1607,7 +1607,7 @@
// Find the appropriate executable to run for a test
std::string cmCTestTestHandler::FindExecutable(
- cmCTest* ctest, const char* testCommand, std::string& resultingConfig,
+ cmCTest* ctest, const std::string& testCommand, std::string& resultingConfig,
std::vector<std::string>& extraPaths, std::vector<std::string>& failed)
{
// now run the compiled test if we can find it
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 0d88c30..b26f8a6 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -198,7 +198,8 @@
std::string filepath, std::string& filename);
// full signature static method to find an executable
- static std::string FindExecutable(cmCTest* ctest, const char* testCommand,
+ static std::string FindExecutable(cmCTest* ctest,
+ const std::string& testCommand,
std::string& resultingConfig,
std::vector<std::string>& extraPaths,
std::vector<std::string>& failed);
@@ -309,7 +310,7 @@
/**
* Find the executable for a test
*/
- std::string FindTheExecutable(const char* exe);
+ std::string FindTheExecutable(const std::string& exe);
std::string GetTestStatus(cmCTestTestResult const&);
void ExpandTestsToRunInformation(size_t numPossibleTests);
diff --git a/Source/CTest/cmCTestUpdateCommand.cxx b/Source/CTest/cmCTestUpdateCommand.cxx
index 673eb9a..95cae13 100644
--- a/Source/CTest/cmCTestUpdateCommand.cxx
+++ b/Source/CTest/cmCTestUpdateCommand.cxx
@@ -11,14 +11,13 @@
{
if (!this->Source.empty()) {
this->CTest->SetCTestConfiguration(
- "SourceDirectory", cmSystemTools::CollapseFullPath(this->Source).c_str(),
+ "SourceDirectory", cmSystemTools::CollapseFullPath(this->Source),
this->Quiet);
} else {
this->CTest->SetCTestConfiguration(
"SourceDirectory",
cmSystemTools::CollapseFullPath(
- this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY"))
- .c_str(),
+ this->Makefile->GetDefinition("CTEST_SOURCE_DIRECTORY")),
this->Quiet);
}
std::string source_dir =
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index a549117..9ee1c17 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -545,17 +545,17 @@
# endif
# ifdef SIGABRT
case SIGABRT:
- exception_str = "Child aborted";
+ exception_str = "Subprocess aborted";
break;
# endif
# ifdef SIGKILL
case SIGKILL:
- exception_str = "Child killed";
+ exception_str = "Subprocess killed";
break;
# endif
# ifdef SIGTERM
case SIGTERM:
- exception_str = "Child terminated";
+ exception_str = "Subprocess terminated";
break;
# endif
# ifdef SIGHUP
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 4254e2e..a5fde89 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -394,7 +394,7 @@
return this->Impl->CompressTestOutput;
}
-cmCTest::Part cmCTest::GetPartFromName(const char* name)
+cmCTest::Part cmCTest::GetPartFromName(const std::string& name)
{
// Look up by lower-case to make names case-insensitive.
std::string lower_name = cmSystemTools::LowerCase(name);
@@ -458,8 +458,7 @@
cm.GetCurrentSnapshot().SetDefaultDefinitions();
cmGlobalGenerator gg(&cm);
cmMakefile mf(&gg, cm.GetCurrentSnapshot());
- if (!this->ReadCustomConfigurationFileTree(this->Impl->BinaryDir.c_str(),
- &mf)) {
+ if (!this->ReadCustomConfigurationFileTree(this->Impl->BinaryDir, &mf)) {
cmCTestOptionalLog(
this, DEBUG, "Cannot find custom configuration file tree" << std::endl,
quiet);
@@ -523,7 +522,7 @@
std::string model;
if (cmSystemTools::GetLineFromStream(tfin, model) &&
!this->Impl->Parts[PartStart] && !command) {
- this->Impl->TestModel = GetTestModelFromString(model.c_str());
+ this->Impl->TestModel = GetTestModelFromString(model);
}
tfin.close();
}
@@ -579,7 +578,7 @@
cmSystemTools::GetLineFromStream(tfin, tag);
cmSystemTools::GetLineFromStream(tfin, group);
if (cmSystemTools::GetLineFromStream(tfin, modelStr)) {
- model = GetTestModelFromString(modelStr.c_str());
+ model = GetTestModelFromString(modelStr);
}
tfin.close();
}
@@ -793,7 +792,7 @@
return this->Impl->TestModel;
}
-bool cmCTest::SetTest(const char* ttype, bool report)
+bool cmCTest::SetTest(const std::string& ttype, bool report)
{
if (cmSystemTools::LowerCase(ttype) == "all") {
for (Part p = PartStart; p != PartCount; p = Part(p + 1)) {
@@ -856,7 +855,7 @@
return true;
}
-bool cmCTest::AddIfExists(Part part, const char* file)
+bool cmCTest::AddIfExists(Part part, const std::string& file)
{
if (this->CTestFileExists(file)) {
this->AddSubmitFile(part, file);
@@ -1008,7 +1007,7 @@
if (this->Impl->Parts[PartNotes]) {
this->UpdateCTestConfiguration();
if (!this->Impl->NotesFiles.empty()) {
- this->GenerateNotesFile(this->Impl->NotesFiles.c_str());
+ this->GenerateNotesFile(this->Impl->NotesFiles);
}
}
if (this->Impl->Parts[PartSubmit]) {
@@ -1037,9 +1036,9 @@
return "Experimental";
}
-int cmCTest::GetTestModelFromString(const char* str)
+int cmCTest::GetTestModelFromString(const std::string& str)
{
- if (!str) {
+ if (str.empty()) {
return cmCTest::EXPERIMENTAL;
}
std::string rstr = cmSystemTools::LowerCase(str);
@@ -1565,9 +1564,9 @@
return 0;
}
-int cmCTest::GenerateNotesFile(const char* cfiles)
+int cmCTest::GenerateNotesFile(const std::string& cfiles)
{
- if (!cfiles) {
+ if (cfiles.empty()) {
return 1;
}
@@ -1650,14 +1649,14 @@
<< std::endl;);
return false;
}
- this->AddSubmitFile(PartExtraFiles, file.c_str());
+ this->AddSubmitFile(PartExtraFiles, file);
}
return true;
}
-bool cmCTest::SubmitExtraFiles(const char* cfiles)
+bool cmCTest::SubmitExtraFiles(const std::string& cfiles)
{
- if (!cfiles) {
+ if (cfiles.empty()) {
return true;
}
@@ -1941,7 +1940,7 @@
else if (this->CheckArgument(arg, "-C"_s, "--build-config") &&
i < args.size() - 1) {
i++;
- this->SetConfigType(args[i].c_str());
+ this->SetConfigType(args[i]);
}
else if (this->CheckArgument(arg, "--debug"_s)) {
@@ -2016,7 +2015,7 @@
else if (this->CheckArgument(arg, "-O"_s, "--output-log") &&
i < args.size() - 1) {
i++;
- this->SetOutputLogFileName(args[i].c_str());
+ this->SetOutputLogFileName(args[i]);
}
else if (this->CheckArgument(arg, "--tomorrow-tag"_s)) {
@@ -2048,7 +2047,7 @@
this->Impl->ProduceXML = true;
this->SetTest("Notes");
i++;
- this->SetNotesFiles(args[i].c_str());
+ this->SetNotesFiles(args[i]);
return true;
}
@@ -2305,7 +2304,7 @@
this->Impl->ProduceXML = true;
this->SetTest("Submit");
i++;
- if (!this->SubmitExtraFiles(args[i].c_str())) {
+ if (!this->SubmitExtraFiles(args[i])) {
return 0;
}
}
@@ -2376,7 +2375,7 @@
(i < args.size() - 1)) {
this->Impl->ProduceXML = true;
i++;
- if (!this->SetTest(args[i].c_str(), false)) {
+ if (!this->SetTest(args[i], false)) {
success = false;
cmCTestLog(this, ERROR_MESSAGE,
"CTest -T called with incorrect option: " << args[i]
@@ -2491,11 +2490,8 @@
return retv;
}
-void cmCTest::SetNotesFiles(const char* notes)
+void cmCTest::SetNotesFiles(const std::string& notes)
{
- if (!notes) {
- return;
- }
this->Impl->NotesFiles = notes;
}
@@ -2561,7 +2557,8 @@
this->Impl->ScheduleType = type;
}
-int cmCTest::ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf)
+int cmCTest::ReadCustomConfigurationFileTree(const std::string& dir,
+ cmMakefile* mf)
{
bool found = false;
cmCTestLog(this, DEBUG,
@@ -2648,7 +2645,7 @@
val = atoi(dval);
}
-std::string cmCTest::GetShortPathToFile(const char* cfname)
+std::string cmCTest::GetShortPathToFile(const std::string& cfname)
{
const std::string& sourceDir = cmSystemTools::CollapseFullPath(
this->GetCTestConfiguration("SourceDirectory"));
@@ -2712,18 +2709,17 @@
this->Impl->CTestConfiguration.clear();
}
-void cmCTest::SetCTestConfiguration(const char* name, const char* value,
+void cmCTest::SetCTestConfiguration(const char* name, const std::string& value,
bool suppress)
{
cmCTestOptionalLog(this, HANDLER_VERBOSE_OUTPUT,
- "SetCTestConfiguration:"
- << name << ":" << (value ? value : "(null)") << "\n",
+ "SetCTestConfiguration:" << name << ":" << value << "\n",
suppress);
if (!name) {
return;
}
- if (!value) {
+ if (value.empty()) {
this->Impl->CTestConfiguration.erase(name);
return;
}
@@ -2928,7 +2924,7 @@
return this->Impl->BuildID;
}
-void cmCTest::AddSubmitFile(Part part, const char* name)
+void cmCTest::AddSubmitFile(Part part, const std::string& name)
{
this->Impl->Parts[part].SubmitFiles.emplace_back(name);
}
@@ -2964,9 +2960,9 @@
this->Impl->CTestConfigurationOverwrites[key] = value;
}
-void cmCTest::SetConfigType(const char* ct)
+void cmCTest::SetConfigType(const std::string& ct)
{
- this->Impl->ConfigType = ct ? ct : "";
+ this->Impl->ConfigType = ct;
cmSystemTools::ReplaceString(this->Impl->ConfigType, ".\\", "");
std::string confTypeEnv = "CMAKE_CONFIG_TYPE=" + this->Impl->ConfigType;
cmSystemTools::PutEnv(confTypeEnv);
@@ -2976,8 +2972,7 @@
cmMakefile* mf, const char* dconfig, const std::string& cmake_var,
bool suppress)
{
- const char* ctvar;
- ctvar = mf->GetDefinition(cmake_var);
+ cmProp ctvar = mf->GetDef(cmake_var);
if (!ctvar) {
return false;
}
@@ -2985,7 +2980,7 @@
"SetCTestConfigurationFromCMakeVariable:"
<< dconfig << ":" << cmake_var << std::endl,
suppress);
- this->SetCTestConfiguration(dconfig, ctvar, suppress);
+ this->SetCTestConfiguration(dconfig, *ctvar, suppress);
return true;
}
@@ -3086,9 +3081,9 @@
return result;
}
-void cmCTest::SetOutputLogFileName(const char* name)
+void cmCTest::SetOutputLogFileName(const std::string& name)
{
- if (name) {
+ if (!name.empty()) {
this->Impl->OutputLogFile = cm::make_unique<cmGeneratedFileStream>(name);
} else {
this->Impl->OutputLogFile.reset();
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index a39b8fe..1e0fb8c 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -64,7 +64,7 @@
/** Get a testing part id from its string name. Returns PartCount
if the string does not name a valid part. */
- Part GetPartFromName(const char* name);
+ Part GetPartFromName(const std::string& name);
/** Process Command line arguments */
int Run(std::vector<std::string>&, std::string* output = nullptr);
@@ -127,12 +127,12 @@
* Check if CTest file exists
*/
bool CTestFileExists(const std::string& filename);
- bool AddIfExists(Part part, const char* file);
+ bool AddIfExists(Part part, const std::string& file);
/**
* Set the cmake test
*/
- bool SetTest(const char*, bool report = true);
+ bool SetTest(const std::string&, bool report = true);
/**
* Set the cmake test mode (experimental, nightly, continuous).
@@ -141,11 +141,11 @@
int GetTestModel() const;
std::string GetTestModelString();
- static int GetTestModelFromString(const char* str);
+ static int GetTestModelFromString(const std::string& str);
static std::string CleanString(const std::string& str,
std::string::size_type spos = 0);
std::string GetCTestConfiguration(const std::string& name);
- void SetCTestConfiguration(const char* name, const char* value,
+ void SetCTestConfiguration(const char* name, const std::string& value,
bool suppress = false);
void EmptyCTestConfiguration();
@@ -161,7 +161,7 @@
cmCTest& operator=(const cmCTest&) = delete;
/** Set the notes files to be created. */
- void SetNotesFiles(const char* notes);
+ void SetNotesFiles(const std::string& notes);
void PopulateCustomVector(cmMakefile* mf, const std::string& definition,
std::vector<std::string>& vec);
@@ -272,7 +272,7 @@
* This means if the file is in binary or
* source directory, it will become /.../relative/path/to/file
*/
- std::string GetShortPathToFile(const char* fname);
+ std::string GetShortPathToFile(const std::string& fname);
enum
{
@@ -354,14 +354,14 @@
int GenerateDoneFile();
/** Submit extra files to the server */
- bool SubmitExtraFiles(const char* files);
+ bool SubmitExtraFiles(const std::string& files);
bool SubmitExtraFiles(std::vector<std::string> const& files);
/** Set the output log file name */
- void SetOutputLogFileName(const char* name);
+ void SetOutputLogFileName(const std::string& name);
/** Set the visual studio or Xcode config type */
- void SetConfigType(const char* ct);
+ void SetConfigType(const std::string& ct);
/** Various log types */
enum
@@ -399,14 +399,14 @@
std::string GetBuildID() const;
/** Add file to be submitted */
- void AddSubmitFile(Part part, const char* name);
+ void AddSubmitFile(Part part, const std::string& name);
std::vector<std::string> const& GetSubmitFiles(Part part) const;
void ClearSubmitFiles(Part part);
/**
* Read the custom configuration files and apply them to the current ctest
*/
- int ReadCustomConfigurationFileTree(const char* dir, cmMakefile* mf);
+ int ReadCustomConfigurationFileTree(const std::string& dir, cmMakefile* mf);
std::vector<std::string>& GetInitialCommandLineArguments();
@@ -462,7 +462,7 @@
void SetRunCurrentScript(bool value);
private:
- int GenerateNotesFile(const char* files);
+ int GenerateNotesFile(const std::string& files);
void BlockTestErrorDiagnostics();
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 6b4d110..06ad64d 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -184,7 +184,7 @@
{
// Get the depender.
cmGeneratorTarget const* depender = this->Targets[depender_index];
- if (depender->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!depender->IsInBuildSystem()) {
return;
}
@@ -198,16 +198,18 @@
std::vector<std::string> const& configs =
depender->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig);
for (std::string const& it : configs) {
- cmLinkImplementation const* impl = depender->GetLinkImplementation(it);
-
// A target should not depend on itself.
emitted.insert(cmLinkItem(depender, false, cmListFileBacktrace()));
emitted.insert(cmLinkItem(depender, true, cmListFileBacktrace()));
- for (cmLinkImplItem const& lib : impl->Libraries) {
- // Don't emit the same library twice for this target.
- if (emitted.insert(lib).second) {
- this->AddTargetDepend(depender_index, lib, true, false);
- this->AddInterfaceDepends(depender_index, lib, it, emitted);
+
+ if (cmLinkImplementation const* impl =
+ depender->GetLinkImplementation(it)) {
+ for (cmLinkImplItem const& lib : impl->Libraries) {
+ // Don't emit the same library twice for this target.
+ if (emitted.insert(lib).second) {
+ this->AddTargetDepend(depender_index, lib, true, false);
+ this->AddInterfaceDepends(depender_index, lib, it, emitted);
+ }
}
}
@@ -356,10 +358,9 @@
int depender_index, cmGeneratorTarget const* dependee,
cmListFileBacktrace const& dependee_backtrace, bool linking, bool cross)
{
- if (dependee->IsImported() ||
- dependee->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
- // Skip IMPORTED and INTERFACE targets but follow their utility
- // dependencies.
+ if (!dependee->IsInBuildSystem()) {
+ // Skip targets that are not in the buildsystem but follow their
+ // utility dependencies.
std::set<cmLinkItem> const& utils = dependee->GetUtilityItems();
for (cmLinkItem const& i : utils) {
if (cmGeneratorTarget const* transitive_dependee = i.Target) {
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b10ce89..64d4ec4 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1089,6 +1089,27 @@
return this->Target->GetPostBuildCommands();
}
+bool cmGeneratorTarget::IsInBuildSystem() const
+{
+ if (this->IsImported()) {
+ return false;
+ }
+ switch (this->Target->GetType()) {
+ case cmStateEnums::EXECUTABLE:
+ case cmStateEnums::STATIC_LIBRARY:
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::OBJECT_LIBRARY:
+ case cmStateEnums::UTILITY:
+ case cmStateEnums::GLOBAL_TARGET:
+ return true;
+ case cmStateEnums::INTERFACE_LIBRARY:
+ case cmStateEnums::UNKNOWN_LIBRARY:
+ break;
+ }
+ return false;
+}
+
bool cmGeneratorTarget::IsImported() const
{
return this->Target->IsImported();
@@ -1099,6 +1120,11 @@
return this->Target->IsImportedGloballyVisible();
}
+bool cmGeneratorTarget::CanCompileSources() const
+{
+ return this->Target->CanCompileSources();
+}
+
const std::string& cmGeneratorTarget::GetLocationForBuild() const
{
static std::string location;
@@ -1365,7 +1391,7 @@
for (const cmLinkImplItem& library : libraries->Libraries) {
if (const cmGeneratorTarget* dependency = library.Target) {
- if (dependency->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!dependency->IsInBuildSystem()) {
continue;
}
if (cm::contains(dependency->GetAllConfigCompileLanguages(),
@@ -2441,6 +2467,12 @@
cmGeneratorTarget::LinkClosure const* cmGeneratorTarget::GetLinkClosure(
const std::string& config) const
{
+ // There is no link implementation for targets that cannot compile sources.
+ if (!this->CanCompileSources()) {
+ static LinkClosure const empty = { {}, {} };
+ return ∅
+ }
+
std::string key(cmSystemTools::UpperCase(config));
auto i = this->LinkClosureMap.find(key);
if (i == this->LinkClosureMap.end()) {
@@ -2757,6 +2789,12 @@
cmGeneratorTarget::GetLinkImplementationClosure(
const std::string& config) const
{
+ // There is no link implementation for targets that cannot compile sources.
+ if (!this->CanCompileSources()) {
+ static std::vector<const cmGeneratorTarget*> const empty;
+ return empty;
+ }
+
LinkImplClosure& tgts = this->LinkImplClosureMap[config];
if (!tgts.Done) {
tgts.Done = true;
@@ -2764,6 +2802,7 @@
cmLinkImplementationLibraries const* impl =
this->GetLinkImplementationLibraries(config);
+ assert(impl);
for (cmLinkImplItem const& lib : impl->Libraries) {
processILibs(config, this, lib,
@@ -2813,29 +2852,26 @@
this->CurrentEntry = nullptr;
// Queue all the source files already specified for the target.
- if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
- std::set<cmSourceFile*> emitted;
- std::vector<std::string> const& configs =
- this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig);
- for (std::string const& c : configs) {
- std::vector<cmSourceFile*> sources;
- this->GeneratorTarget->GetSourceFiles(sources, c);
- for (cmSourceFile* sf : sources) {
- const std::set<cmGeneratorTarget const*> tgts =
- this->GlobalGenerator->GetFilenameTargetDepends(sf);
- if (cm::contains(tgts, this->GeneratorTarget)) {
- std::ostringstream e;
- e << "Evaluation output file\n \"" << sf->ResolveFullPath()
- << "\"\ndepends on the sources of a target it is used in. This "
- "is a dependency loop and is not allowed.";
- this->GeneratorTarget->LocalGenerator->IssueMessage(
- MessageType::FATAL_ERROR, e.str());
- return;
- }
- if (emitted.insert(sf).second &&
- this->SourcesQueued.insert(sf).second) {
- this->SourceQueue.push(sf);
- }
+ std::set<cmSourceFile*> emitted;
+ std::vector<std::string> const& configs =
+ this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig);
+ for (std::string const& c : configs) {
+ std::vector<cmSourceFile*> sources;
+ this->GeneratorTarget->GetSourceFiles(sources, c);
+ for (cmSourceFile* sf : sources) {
+ const std::set<cmGeneratorTarget const*> tgts =
+ this->GlobalGenerator->GetFilenameTargetDepends(sf);
+ if (cm::contains(tgts, this->GeneratorTarget)) {
+ std::ostringstream e;
+ e << "Evaluation output file\n \"" << sf->ResolveFullPath()
+ << "\"\ndepends on the sources of a target it is used in. This "
+ "is a dependency loop and is not allowed.";
+ this->GeneratorTarget->LocalGenerator->IssueMessage(
+ MessageType::FATAL_ERROR, e.str());
+ return;
+ }
+ if (emitted.insert(sf).second && this->SourcesQueued.insert(sf).second) {
+ this->SourceQueue.push(sf);
}
}
}
@@ -3413,23 +3449,24 @@
&dagChecker, entries);
if (this->Makefile->IsOn("APPLE")) {
- cmLinkImplementationLibraries const* impl =
- this->GetLinkImplementationLibraries(config);
- for (cmLinkImplItem const& lib : impl->Libraries) {
- std::string libDir = cmSystemTools::CollapseFullPath(
- lib.AsStr(), this->Makefile->GetHomeOutputDirectory());
+ if (cmLinkImplementationLibraries const* impl =
+ this->GetLinkImplementationLibraries(config)) {
+ for (cmLinkImplItem const& lib : impl->Libraries) {
+ std::string libDir = cmSystemTools::CollapseFullPath(
+ lib.AsStr(), this->Makefile->GetHomeOutputDirectory());
- static cmsys::RegularExpression frameworkCheck(
- "(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
- if (!frameworkCheck.find(libDir)) {
- continue;
+ static cmsys::RegularExpression frameworkCheck(
+ "(.*\\.framework)(/Versions/[^/]+)?/[^/]+$");
+ if (!frameworkCheck.find(libDir)) {
+ continue;
+ }
+
+ libDir = frameworkCheck.match(1);
+
+ EvaluatedTargetPropertyEntry ee(lib, cmListFileBacktrace());
+ ee.Values.emplace_back(std::move(libDir));
+ entries.Entries.emplace_back(std::move(ee));
}
-
- libDir = frameworkCheck.match(1);
-
- EvaluatedTargetPropertyEntry ee(lib, cmListFileBacktrace());
- ee.Values.emplace_back(std::move(libDir));
- entries.Entries.emplace_back(std::move(ee));
}
}
@@ -6524,15 +6561,20 @@
iface.HadHeadSensitiveCondition,
iface.HadContextSensitiveCondition,
iface.HadLinkLanguageSensitiveCondition);
- } else if (!cmp0022NEW)
+ return;
+ }
+
// If CMP0022 is NEW then the plain tll signature sets the
// INTERFACE_LINK_LIBRARIES, so if we get here then the project
// cleared the property explicitly and we should not fall back
// to the link implementation.
- {
- // The link implementation is the default link interface.
- cmLinkImplementationLibraries const* impl =
- this->GetLinkImplementationLibrariesInternal(config, headTarget);
+ if (cmp0022NEW) {
+ return;
+ }
+
+ // The link implementation is the default link interface.
+ if (cmLinkImplementationLibraries const* impl =
+ this->GetLinkImplementationLibrariesInternal(config, headTarget)) {
iface.Libraries.insert(iface.Libraries.end(), impl->Libraries.begin(),
impl->Libraries.end());
if (this->GetPolicyStatusCMP0022() == cmPolicies::WARN &&
@@ -6826,8 +6868,8 @@
const cmLinkImplementation* cmGeneratorTarget::GetLinkImplementation(
const std::string& config, bool secondPass) const
{
- // There is no link implementation for imported targets.
- if (this->IsImported()) {
+ // There is no link implementation for targets that cannot compile sources.
+ if (!this->CanCompileSources()) {
return nullptr;
}
@@ -6990,6 +7032,11 @@
void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages,
const std::string& config) const
{
+ // Targets that do not compile anything have no languages.
+ if (!this->CanCompileSources()) {
+ return;
+ }
+
std::vector<cmSourceFile*> sourceFiles;
this->GetSourceFiles(sourceFiles, config);
for (cmSourceFile* src : sourceFiles) {
@@ -7085,8 +7132,8 @@
cmGeneratorTarget::GetLinkImplementationLibrariesInternal(
const std::string& config, cmGeneratorTarget const* head) const
{
- // There is no link implementation for imported targets.
- if (this->IsImported()) {
+ // There is no link implementation for targets that cannot compile sources.
+ if (!this->CanCompileSources()) {
return nullptr;
}
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index 08aa015..4a03f65 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -45,8 +45,10 @@
cmGlobalGenerator* GetGlobalGenerator() const;
+ bool IsInBuildSystem() const;
bool IsImported() const;
bool IsImportedGloballyVisible() const;
+ bool CanCompileSources() const;
const std::string& GetLocation(const std::string& config) const;
std::vector<cmCustomCommand> const& GetPreBuildCommands() const;
diff --git a/Source/cmGlobalCommonGenerator.cxx b/Source/cmGlobalCommonGenerator.cxx
index 5eff3b8..9e5bbca 100644
--- a/Source/cmGlobalCommonGenerator.cxx
+++ b/Source/cmGlobalCommonGenerator.cxx
@@ -42,12 +42,7 @@
// for all targets in the directory.
for (const auto& gt : lg->GetGeneratorTargets()) {
cmStateEnums::TargetType const type = gt->GetType();
- if (type != cmStateEnums::EXECUTABLE &&
- type != cmStateEnums::STATIC_LIBRARY &&
- type != cmStateEnums::SHARED_LIBRARY &&
- type != cmStateEnums::MODULE_LIBRARY &&
- type != cmStateEnums::OBJECT_LIBRARY &&
- type != cmStateEnums::UTILITY) {
+ if (type == cmStateEnums::GLOBAL_TARGET || !gt->IsInBuildSystem()) {
continue;
}
DirectoryTarget::Target t;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 5c07e31..eff6665 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -302,9 +302,7 @@
bool failed = false;
for (const auto& localGen : this->LocalGenerators) {
for (const auto& target : localGen->GetGeneratorTargets()) {
- if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
- target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
- target->GetType() == cmStateEnums::TargetType::UTILITY ||
+ if (!target->CanCompileSources() ||
cmIsOn(target->GetProperty("ghs_integrity_app"))) {
continue;
}
@@ -358,9 +356,7 @@
bool failed = false;
for (const auto& generator : this->LocalGenerators) {
for (const auto& target : generator->GetGeneratorTargets()) {
- if (target->GetType() == cmStateEnums::TargetType::GLOBAL_TARGET ||
- target->GetType() == cmStateEnums::TargetType::INTERFACE_LIBRARY ||
- target->GetType() == cmStateEnums::TargetType::UTILITY ||
+ if (!target->CanCompileSources() ||
cmIsOn(target->GetProperty("ghs_integrity_app"))) {
continue;
}
@@ -1595,9 +1591,7 @@
for (const auto& lg : this->LocalGenerators) {
lg->CreateEvaluationFileOutputs();
for (const auto& gt : lg->GetGeneratorTargets()) {
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
- gt->GetType() == cmStateEnums::UTILITY ||
- gt->GetType() == cmStateEnums::GLOBAL_TARGET) {
+ if (!gt->CanCompileSources()) {
continue;
}
lg->AddUnityBuild(gt.get());
@@ -1609,9 +1603,7 @@
}
for (const auto& lg : this->LocalGenerators) {
for (const auto& gt : lg->GetGeneratorTargets()) {
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
- gt->GetType() == cmStateEnums::UTILITY ||
- gt->GetType() == cmStateEnums::GLOBAL_TARGET) {
+ if (!gt->CanCompileSources()) {
continue;
}
// Handle targets that re-use a PCH from an above-handled target.
@@ -2165,7 +2157,7 @@
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
const cmGeneratorTarget* target) const
{
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
return true;
}
cmMakefile* mf = root->GetMakefile();
@@ -2189,7 +2181,7 @@
// configurations.
if (trueCount && falseCount) {
std::ostringstream e;
- e << "The EXCLUDED_FROM_ALL property of target \"" << target->GetName()
+ e << "The EXCLUDE_FROM_ALL property of target \"" << target->GetName()
<< "\" varies by configuration. This is not supported by the \""
<< root->GetGlobalGenerator()->GetName() << "\" generator.";
mf->IssueMessage(MessageType::FATAL_ERROR, e.str());
@@ -3054,7 +3046,7 @@
for (const auto& lg : this->LocalGenerators) {
for (const auto& tgt : lg->GetGeneratorTargets()) {
- if (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!tgt->IsInBuildSystem()) {
continue;
}
this->WriteSummary(tgt.get());
diff --git a/Source/cmGlobalGhsMultiGenerator.cxx b/Source/cmGlobalGhsMultiGenerator.cxx
index 1664dd0..9969465 100644
--- a/Source/cmGlobalGhsMultiGenerator.cxx
+++ b/Source/cmGlobalGhsMultiGenerator.cxx
@@ -467,7 +467,7 @@
this->ProjectTargets.push_back(t);
}
for (cmGeneratorTarget const* t : sortedProjectTargets) {
- if (t->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!t->IsInBuildSystem()) {
continue;
}
if (!IsExcluded(t->GetLocalGenerator(), t)) {
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 786cde7..2ef202d 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -1105,8 +1105,9 @@
break;
}
- default:
- return;
+ case cmStateEnums::INTERFACE_LIBRARY:
+ case cmStateEnums::UNKNOWN_LIBRARY:
+ break;
}
}
@@ -1128,7 +1129,7 @@
cmNinjaDeps outs;
for (cmTargetDepend const& targetDep :
this->GetTargetDirectDepends(target)) {
- if (targetDep->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!targetDep->IsInBuildSystem()) {
continue;
}
if (targetDep.IsCross()) {
@@ -1170,7 +1171,7 @@
cmNinjaOuts this_outs; // this will be the new cache entry
for (auto const& dep_target : this->GetTargetDirectDepends(target)) {
- if (dep_target->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
+ if (!dep_target->IsInBuildSystem() ||
(this->EnableCrossConfigBuild() && !dep_target.IsCross())) {
continue;
}
@@ -1189,7 +1190,7 @@
// finally generate the outputs of the target itself, if applicable
cmNinjaDeps outs;
if (!omit_self) {
- this->AppendTargetOutputs(target, outs, config);
+ this->AppendTargetOutputs(target, outs, config, DependOnTargetArtifact);
}
outputs.insert(outs.begin(), outs.end());
}
@@ -1201,7 +1202,7 @@
std::string outputPath = this->NinjaOutputPath(alias);
std::string buildAlias = this->BuildAlias(outputPath, config);
cmNinjaDeps outputs;
- this->AppendTargetOutputs(target, outputs, config);
+ this->AppendTargetOutputs(target, outputs, config, DependOnTargetArtifact);
// Mark the target's outputs as ambiguous to ensure that no other target
// uses the output as an alias.
for (std::string const& output : outputs) {
@@ -1267,11 +1268,12 @@
if (ta.second.Config == "all") {
for (auto const& config : this->CrossConfigs) {
this->AppendTargetOutputs(ta.second.GeneratorTarget,
- build.ExplicitDeps, config);
+ build.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
} else {
this->AppendTargetOutputs(ta.second.GeneratorTarget, build.ExplicitDeps,
- ta.second.Config);
+ ta.second.Config, DependOnTargetArtifact);
}
this->WriteBuild(this->EnableCrossConfigBuild() &&
(ta.second.Config == "all" ||
@@ -1299,7 +1301,8 @@
build.Outputs.front() = ta.first;
build.ExplicitDeps.clear();
this->AppendTargetOutputs(ta.second.GeneratorTarget,
- build.ExplicitDeps, config);
+ build.ExplicitDeps, config,
+ DependOnTargetArtifact);
this->WriteBuild(*this->GetConfigFileStream(config), build);
}
}
@@ -1321,7 +1324,8 @@
build.ExplicitDeps.clear();
for (auto const& config : this->DefaultConfigs) {
this->AppendTargetOutputs(ta.second.GeneratorTarget,
- build.ExplicitDeps, config);
+ build.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
this->WriteBuild(*this->GetDefaultFileStream(), build);
}
@@ -1358,7 +1362,8 @@
configDeps.emplace_back(build.Outputs.front());
for (DirectoryTarget::Target const& t : dt.Targets) {
if (!IsExcludedFromAllInConfig(t, config)) {
- this->AppendTargetOutputs(t.GT, build.ExplicitDeps, config);
+ this->AppendTargetOutputs(t.GT, build.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
}
for (DirectoryTarget::Dir const& d : dt.Children) {
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 44e632f..10f5cf6 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -318,14 +318,13 @@
virtual std::string OrderDependsTargetForTarget(
cmGeneratorTarget const* target, const std::string& config) const;
- void AppendTargetOutputs(
- cmGeneratorTarget const* target, cmNinjaDeps& outputs,
- const std::string& config,
- cmNinjaTargetDepends depends = DependOnTargetArtifact);
- void AppendTargetDepends(
- cmGeneratorTarget const* target, cmNinjaDeps& outputs,
- const std::string& config, const std::string& fileConfig,
- cmNinjaTargetDepends depends = DependOnTargetArtifact);
+ void AppendTargetOutputs(cmGeneratorTarget const* target,
+ cmNinjaDeps& outputs, const std::string& config,
+ cmNinjaTargetDepends depends);
+ void AppendTargetDepends(cmGeneratorTarget const* target,
+ cmNinjaDeps& outputs, const std::string& config,
+ const std::string& fileConfig,
+ cmNinjaTargetDepends depends);
void AppendTargetDependsClosure(cmGeneratorTarget const* target,
cmNinjaDeps& outputs,
const std::string& config);
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 1764429..ebc90b6 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -845,8 +845,7 @@
for (const auto& gt : lg->GetGeneratorTargets()) {
cmLocalGenerator* tlg = gt->GetLocalGenerator();
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY ||
- IsExcluded(lg.get(), gt.get())) {
+ if (!gt->IsInBuildSystem() || IsExcluded(lg.get(), gt.get())) {
continue;
}
@@ -881,7 +880,7 @@
if (emitted.insert(target).second) {
count = this->ProgressMap[target].Marks.size();
for (cmTargetDepend const& depend : this->GetTargetDirectDepends(target)) {
- if (depend->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!depend->IsInBuildSystem()) {
continue;
}
count += this->CountProgressMarksInTarget(depend, emitted);
@@ -938,7 +937,7 @@
for (cmTargetDepend const& i : this->GetTargetDirectDepends(target)) {
// Create the target-level dependency.
cmGeneratorTarget const* dep = i;
- if (dep->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!dep->IsInBuildSystem()) {
continue;
}
cmLocalUnixMakefileGenerator3* lg3 =
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index c851eea..f8b438a 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -339,7 +339,7 @@
// loop over again and write out configurations for each target
// in the solution
for (cmGeneratorTarget const* target : projectTargets) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
cmProp expath = target->GetProperty("EXTERNAL_MSPROJECT");
@@ -369,7 +369,7 @@
std::string rootBinaryDir = root->GetCurrentBinaryDirectory();
for (cmGeneratorTarget const* target : projectTargets) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
bool written = false;
@@ -436,7 +436,7 @@
std::ostream& fout, OrderedTargetDependSet const& projectTargets)
{
for (cmGeneratorTarget const* target : projectTargets) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
cmProp vcprojName = target->GetProperty("GENERATOR_FILE_NAME");
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 29ca154..fcdfc50 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -325,7 +325,7 @@
TargetDependSet const& unordered = this->GetTargetDirectDepends(gt);
OrderedTargetDependSet depends(unordered, std::string());
for (cmTargetDepend const& i : depends) {
- if (i->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!i->IsInBuildSystem()) {
continue;
}
std::string guid = this->GetGUID(i->GetName());
@@ -341,7 +341,7 @@
if (cmGeneratorTarget* depTarget =
target->GetLocalGenerator()->FindGeneratorTargetToUse(
ui.Value.first)) {
- if (depTarget->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
+ if (depTarget->IsInBuildSystem() &&
depTarget->GetProperty("EXTERNAL_MSPROJECT")) {
// This utility dependency names an external .vcproj target.
// We use LinkLibraryDependencies="true" to link to it without
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index b31d069..001d876 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -368,7 +368,7 @@
void cmGlobalVisualStudioGenerator::FollowLinkDepends(
const cmGeneratorTarget* target, std::set<const cmGeneratorTarget*>& linked)
{
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
return;
}
if (linked.insert(target).second &&
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e54de5d..26f0bec 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1199,7 +1199,7 @@
return true;
}
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gtgt->IsInBuildSystem()) {
return true;
}
@@ -1845,7 +1845,7 @@
cmXCodeObject* buildSettings,
const std::string& configName)
{
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gtgt->IsInBuildSystem()) {
return;
}
@@ -2678,7 +2678,7 @@
cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeTarget(
cmGeneratorTarget* gtgt, cmXCodeObject* buildPhases)
{
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gtgt->IsInBuildSystem()) {
return nullptr;
}
cmXCodeObject* target = this->CreateObject(cmXCodeObject::PBXNativeTarget);
@@ -2821,7 +2821,7 @@
cmSystemTools::Error("Error no target on xobject\n");
return;
}
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gt->IsInBuildSystem()) {
return;
}
@@ -3113,13 +3113,9 @@
// end up with (empty anyhow) ZERO_CHECK, install, or test source
// groups:
//
- if (gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) {
- continue;
- }
- if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
- continue;
- }
- if (gtgt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
+ if (!gtgt->IsInBuildSystem() ||
+ gtgt->GetType() == cmStateEnums::GLOBAL_TARGET ||
+ gtgt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
continue;
}
@@ -3753,6 +3749,8 @@
if (this->XcodeVersion >= 100) {
xout.Element("key", "BuildSystemType");
xout.Element("string", "Original");
+ xout.Element("key", "DisableBuildSystemDeprecationWarning");
+ xout.Element("true");
}
if (hasGeneratedSchemes) {
xout.Element("key",
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 028053d..646cf5e 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -284,7 +284,7 @@
// Generate the rule files for each target.
const auto& targets = this->GetGeneratorTargets();
for (const auto& target : targets) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
target->TraceDependencies();
@@ -760,7 +760,7 @@
// Add our targets to the manifest for each configuration.
const auto& targets = this->GetGeneratorTargets();
for (const auto& target : targets) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
for (std::string const& c : configNames) {
@@ -797,7 +797,7 @@
// Now that C/C++ _STANDARD values have been computed
// set the values to ObjC/ObjCXX _STANDARD variables
- if (target->GetType() != cmStateEnums::INTERFACE_LIBRARY) {
+ if (target->CanCompileSources()) {
for (std::string const& c : configNames) {
target->ComputeCompileFeatures(c, inferredEnabledLanguages);
}
diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx
index 098fa5a..a23ad57 100644
--- a/Source/cmLocalGhsMultiGenerator.cxx
+++ b/Source/cmLocalGhsMultiGenerator.cxx
@@ -11,7 +11,6 @@
#include "cmGhsMultiTargetGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmSourceFile.h"
-#include "cmStateTypes.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
@@ -33,7 +32,7 @@
void cmLocalGhsMultiGenerator::GenerateTargetsDepthFirst(
cmGeneratorTarget* target, std::vector<cmGeneratorTarget*>& remaining)
{
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
return;
}
// Find this target in the list of remaining targets.
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index aee7f45..ef34953 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -90,7 +90,7 @@
}
for (const auto& target : this->GetGeneratorTargets()) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
auto tg = cmNinjaTargetGenerator::New(target.get());
@@ -102,9 +102,10 @@
this->GetGlobalGenerator()->IsMultiConfig()) {
cmNinjaBuild phonyAlias("phony");
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.Outputs, "");
+ target.get(), phonyAlias.Outputs, "", DependOnTargetArtifact);
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.ExplicitDeps, config);
+ target.get(), phonyAlias.ExplicitDeps, config,
+ DependOnTargetArtifact);
this->GetGlobalNinjaGenerator()->WriteBuild(
*this->GetGlobalNinjaGenerator()->GetConfigFileStream(config),
phonyAlias);
@@ -115,11 +116,12 @@
if (!this->GetGlobalNinjaGenerator()->GetDefaultConfigs().empty()) {
cmNinjaBuild phonyAlias("phony");
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.Outputs, "");
+ target.get(), phonyAlias.Outputs, "", DependOnTargetArtifact);
for (auto const& config :
this->GetGlobalNinjaGenerator()->GetDefaultConfigs()) {
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.ExplicitDeps, config);
+ target.get(), phonyAlias.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
this->GetGlobalNinjaGenerator()->WriteBuild(
*this->GetGlobalNinjaGenerator()->GetDefaultFileStream(),
@@ -127,10 +129,11 @@
}
cmNinjaBuild phonyAlias("phony");
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.Outputs, "all");
+ target.get(), phonyAlias.Outputs, "all", DependOnTargetArtifact);
for (auto const& config : this->GetConfigNames()) {
this->GetGlobalNinjaGenerator()->AppendTargetOutputs(
- target.get(), phonyAlias.ExplicitDeps, config);
+ target.get(), phonyAlias.ExplicitDeps, config,
+ DependOnTargetArtifact);
}
this->GetGlobalNinjaGenerator()->WriteBuild(
*this->GetGlobalNinjaGenerator()->GetDefaultFileStream(),
@@ -355,8 +358,8 @@
cmNinjaDeps& outputs,
const std::string& config)
{
- this->GetGlobalNinjaGenerator()->AppendTargetOutputs(target, outputs,
- config);
+ this->GetGlobalNinjaGenerator()->AppendTargetOutputs(target, outputs, config,
+ DependOnTargetArtifact);
}
void cmLocalNinjaGenerator::AppendTargetDepends(cmGeneratorTarget* target,
diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h
index ef160e7..73c0cde 100644
--- a/Source/cmLocalNinjaGenerator.h
+++ b/Source/cmLocalNinjaGenerator.h
@@ -66,10 +66,10 @@
void AppendTargetOutputs(cmGeneratorTarget* target, cmNinjaDeps& outputs,
const std::string& config);
- void AppendTargetDepends(
- cmGeneratorTarget* target, cmNinjaDeps& outputs, const std::string& config,
- const std::string& fileConfig,
- cmNinjaTargetDepends depends = DependOnTargetArtifact);
+ void AppendTargetDepends(cmGeneratorTarget* target, cmNinjaDeps& outputs,
+ const std::string& config,
+ const std::string& fileConfig,
+ cmNinjaTargetDepends depends);
void AddCustomCommandTarget(cmCustomCommand const* cc,
cmGeneratorTarget* target);
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index df4bf6a..23e2a94 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -101,7 +101,7 @@
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
for (const auto& target : this->GetGeneratorTargets()) {
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
continue;
}
std::unique_ptr<cmMakefileTargetGenerator> tg(
@@ -137,7 +137,7 @@
std::map<std::string, LocalObjectInfo>& localObjectFiles)
{
for (const auto& gt : this->GetGeneratorTargets()) {
- if (gt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!gt->CanCompileSources()) {
continue;
}
std::vector<cmSourceFile const*> objectSources;
diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx
index 9076e26..6c7d6c6 100644
--- a/Source/cmLocalVisualStudio10Generator.cxx
+++ b/Source/cmLocalVisualStudio10Generator.cxx
@@ -69,7 +69,7 @@
void cmLocalVisualStudio10Generator::GenerateTargetsDepthFirst(
cmGeneratorTarget* target, std::vector<cmGeneratorTarget*>& remaining)
{
- if (target->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!target->IsInBuildSystem()) {
return;
}
// Find this target in the list of remaining targets.
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index ad61ad3..fec6a9d 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -66,7 +66,7 @@
// Now create GUIDs for targets
const auto& tgts = this->GetGeneratorTargets();
for (const auto& l : tgts) {
- if (l->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!l->IsInBuildSystem()) {
continue;
}
cmProp path = l->GetProperty("EXTERNAL_MSPROJECT");
@@ -129,7 +129,7 @@
// Create the project file for each target.
for (const auto& l : tgts) {
- if (l->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!l->IsInBuildSystem()) {
continue;
}
// INCLUDE_EXTERNAL_MSPROJECT command only affects the workspace
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index de68371..924a44e 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -743,7 +743,8 @@
// Gather order-only dependencies.
this->GetLocalGenerator()->AppendTargetDepends(
- this->GetGeneratorTarget(), build.OrderOnlyDeps, config, config);
+ this->GetGeneratorTarget(), build.OrderOnlyDeps, config, config,
+ DependOnTargetArtifact);
// Write the build statement for this target.
bool usedResponseFile = false;
@@ -1168,8 +1169,8 @@
globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
// Gather order-only dependencies.
- this->GetLocalGenerator()->AppendTargetDepends(gt, linkBuild.OrderOnlyDeps,
- config, fileConfig);
+ this->GetLocalGenerator()->AppendTargetDepends(
+ gt, linkBuild.OrderOnlyDeps, config, fileConfig, DependOnTargetArtifact);
// Add order-only dependencies on versioning symlinks of shared libs we link.
if (!this->GeneratorTarget->IsDLLPlatform()) {
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 8d863c3..9508bb9 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -101,7 +101,8 @@
lg->AppendTargetOutputs(genTarget, gg->GetByproductsForCleanTarget(),
config);
}
- lg->AppendTargetDepends(genTarget, deps, config, config);
+ lg->AppendTargetDepends(genTarget, deps, config, config,
+ DependOnTargetArtifact);
if (commands.empty()) {
phonyBuild.Comment = "Utility command for " + this->GetTargetName();
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index aec9afa..70bffa6 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -272,8 +272,7 @@
};
// Setup default property values.
- if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
- this->GetType() != cmStateEnums::UTILITY) {
+ if (this->CanCompileSources()) {
initProp("ANDROID_API");
initProp("ANDROID_API_MIN");
initProp("ANDROID_ARCH");
@@ -343,10 +342,12 @@
initProp("C_STANDARD");
initProp("C_STANDARD_REQUIRED");
initProp("C_EXTENSIONS");
+ initProp("C_VISIBILITY_PRESET");
initProp("OBJC_COMPILER_LAUNCHER");
initProp("OBJC_STANDARD");
initProp("OBJC_STANDARD_REQUIRED");
initProp("OBJC_EXTENSIONS");
+ initProp("OBJC_VISIBILITY_PRESET");
initProp("CXX_CLANG_TIDY");
initProp("CXX_COMPILER_LAUNCHER");
initProp("CXX_CPPLINT");
@@ -355,10 +356,12 @@
initProp("CXX_STANDARD");
initProp("CXX_STANDARD_REQUIRED");
initProp("CXX_EXTENSIONS");
+ initProp("CXX_VISIBILITY_PRESET");
initProp("OBJCXX_COMPILER_LAUNCHER");
initProp("OBJCXX_STANDARD");
initProp("OBJCXX_STANDARD_REQUIRED");
initProp("OBJCXX_EXTENSIONS");
+ initProp("OBJCXX_VISIBILITY_PRESET");
initProp("CUDA_STANDARD");
initProp("CUDA_STANDARD_REQUIRED");
initProp("CUDA_EXTENSIONS");
@@ -367,6 +370,11 @@
initProp("CUDA_RESOLVE_DEVICE_SYMBOLS");
initProp("CUDA_RUNTIME_LIBRARY");
initProp("CUDA_ARCHITECTURES");
+ initProp("CUDA_VISIBILITY_PRESET");
+ initProp("VISIBILITY_INLINES_HIDDEN");
+ initProp("JOB_POOL_COMPILE");
+ initProp("JOB_POOL_LINK");
+ initProp("JOB_POOL_PRECOMPILE_HEADER");
initProp("LINK_SEARCH_START_STATIC");
initProp("LINK_SEARCH_END_STATIC");
initProp("Swift_LANGUAGE_VERSION");
@@ -410,7 +418,8 @@
}
// Setup per-configuration property default values.
- if (this->GetType() != cmStateEnums::UTILITY) {
+ if (this->GetType() != cmStateEnums::UTILITY &&
+ this->GetType() != cmStateEnums::GLOBAL_TARGET) {
static const auto configProps = {
/* clang-format needs this comment to break after the opening brace */
"ARCHIVE_OUTPUT_DIRECTORY_", "LIBRARY_OUTPUT_DIRECTORY_",
@@ -487,16 +496,6 @@
impl->Makefile->GetLinkDirectoriesBacktraces());
}
- if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
- this->GetType() != cmStateEnums::UTILITY) {
- initProp("C_VISIBILITY_PRESET");
- initProp("CXX_VISIBILITY_PRESET");
- initProp("OBJC_VISIBILITY_PRESET");
- initProp("OBJCXX_VISIBILITY_PRESET");
- initProp("CUDA_VISIBILITY_PRESET");
- initProp("VISIBILITY_INLINES_HIDDEN");
- }
-
if (impl->TargetType == cmStateEnums::EXECUTABLE) {
initProp("ANDROID_GUI");
initProp("CROSSCOMPILING_EMULATOR");
@@ -505,6 +504,8 @@
if (impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
impl->TargetType == cmStateEnums::MODULE_LIBRARY) {
this->SetProperty("POSITION_INDEPENDENT_CODE", "True");
+ } else if (this->CanCompileSources()) {
+ initProp("POSITION_INDEPENDENT_CODE");
}
if (impl->TargetType == cmStateEnums::SHARED_LIBRARY ||
impl->TargetType == cmStateEnums::EXECUTABLE) {
@@ -512,11 +513,6 @@
initProp("WINDOWS_EXPORT_ALL_SYMBOLS");
}
- if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
- this->GetType() != cmStateEnums::UTILITY) {
- initProp("POSITION_INDEPENDENT_CODE");
- }
-
// Record current policies for later use.
impl->Makefile->RecordPolicies(impl->PolicyMap);
@@ -528,13 +524,6 @@
impl->PolicyMap.Set(cmPolicies::CMP0022, cmPolicies::NEW);
}
- if (this->GetType() != cmStateEnums::INTERFACE_LIBRARY &&
- this->GetType() != cmStateEnums::UTILITY) {
- initProp("JOB_POOL_COMPILE");
- initProp("JOB_POOL_LINK");
- initProp("JOB_POOL_PRECOMPILE_HEADER");
- }
-
if (impl->TargetType <= cmStateEnums::GLOBAL_TARGET) {
initProp("DOTNET_TARGET_FRAMEWORK");
initProp("DOTNET_TARGET_FRAMEWORK_VERSION");
@@ -1917,6 +1906,27 @@
return impl->PerConfig;
}
+bool cmTarget::CanCompileSources() const
+{
+ if (this->IsImported()) {
+ return false;
+ }
+ switch (this->GetType()) {
+ case cmStateEnums::EXECUTABLE:
+ case cmStateEnums::STATIC_LIBRARY:
+ case cmStateEnums::SHARED_LIBRARY:
+ case cmStateEnums::MODULE_LIBRARY:
+ case cmStateEnums::OBJECT_LIBRARY:
+ return true;
+ case cmStateEnums::UTILITY:
+ case cmStateEnums::INTERFACE_LIBRARY:
+ case cmStateEnums::GLOBAL_TARGET:
+ case cmStateEnums::UNKNOWN_LIBRARY:
+ break;
+ }
+ return false;
+}
+
const char* cmTarget::GetSuffixVariableInternal(
cmStateEnums::ArtifactType artifact) const
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 7a16de8..43f1887 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -196,6 +196,7 @@
bool IsImported() const;
bool IsImportedGloballyVisible() const;
bool IsPerConfig() const;
+ bool CanCompileSources() const;
bool GetMappedConfig(std::string const& desired_config, cmProp& loc,
cmProp& imp, std::string& suffix) const;
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index 7c0ce71..78b230c 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -77,7 +77,7 @@
cmGeneratorExpression ge(this->Test->GetBacktrace());
// Start the test command.
- os << indent << "add_test(\"" << this->Test->GetName() << "\" ";
+ os << indent << "add_test(" << this->Test->GetName() << " ";
// Evaluate command line arguments
std::vector<std::string> argv =
@@ -127,8 +127,8 @@
os << ")\n";
// Output properties for the test.
- os << indent << "set_tests_properties(\"" << this->Test->GetName()
- << "\" PROPERTIES ";
+ os << indent << "set_tests_properties(" << this->Test->GetName()
+ << " PROPERTIES ";
for (auto const& i : this->Test->GetProperties().GetList()) {
os << " " << i.first << " "
<< cmOutputConverter::EscapeForCMake(
@@ -140,8 +140,7 @@
void cmTestGenerator::GenerateScriptNoConfig(std::ostream& os, Indent indent)
{
- os << indent << "add_test(\"" << this->Test->GetName()
- << "\" NOT_AVAILABLE)\n";
+ os << indent << "add_test(" << this->Test->GetName() << " NOT_AVAILABLE)\n";
}
bool cmTestGenerator::NeedsScriptNoConfig() const
@@ -161,8 +160,9 @@
std::string exe = command[0];
cmSystemTools::ConvertToUnixSlashes(exe);
- fout << indent << "add_test(\"" << this->Test->GetName() << "\" \"" << exe
- << "\"";
+ fout << indent;
+ fout << "add_test(";
+ fout << this->Test->GetName() << " \"" << exe << "\"";
for (std::string const& arg : cmMakeRange(command).advance(1)) {
// Just double-quote all arguments so they are re-parsed
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index f291cbd..6369c1f 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2919,6 +2919,12 @@
clOptions.RemoveFlag("SpectreMitigation");
}
+ // Remove any target-wide -TC or -TP flag added by the project.
+ // Such flags are unnecessary and break our model of language selection.
+ if (langForClCompile == "C" || langForClCompile == "CXX") {
+ clOptions.RemoveFlag("CompileAs");
+ }
+
this->ClOptions[configName] = std::move(pOptions);
return true;
}
@@ -4138,7 +4144,7 @@
Elem e1(e0, "ItemGroup");
e1.SetHasElements();
for (cmGeneratorTarget const* dt : depends) {
- if (dt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ if (!dt->IsInBuildSystem()) {
continue;
}
// skip fortran targets as they can not be processed by MSBuild
diff --git a/Source/kwsys/Glob.hxx.in b/Source/kwsys/Glob.hxx.in
index b5a34d5..e8474e2 100644
--- a/Source/kwsys/Glob.hxx.in
+++ b/Source/kwsys/Glob.hxx.in
@@ -126,8 +126,8 @@
bool RecurseListDirs;
private:
- Glob(const Glob&); // Not implemented.
- void operator=(const Glob&); // Not implemented.
+ Glob(const Glob&) = delete;
+ void operator=(const Glob&) = delete;
};
} // namespace @KWSYS_NAMESPACE@
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
index cc45529..e1e7721 100644
--- a/Source/kwsys/ProcessUNIX.c
+++ b/Source/kwsys/ProcessUNIX.c
@@ -2128,17 +2128,17 @@
#endif
#ifdef SIGABRT
case SIGABRT:
- KWSYSPE_CASE(Other, "Child aborted");
+ KWSYSPE_CASE(Other, "Subprocess aborted");
break;
#endif
#ifdef SIGKILL
case SIGKILL:
- KWSYSPE_CASE(Other, "Child killed");
+ KWSYSPE_CASE(Other, "Subprocess killed");
break;
#endif
#ifdef SIGTERM
case SIGTERM:
- KWSYSPE_CASE(Other, "Child terminated");
+ KWSYSPE_CASE(Other, "Subprocess terminated");
break;
#endif
#ifdef SIGHUP
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index 25705ea..2c39b91 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -1453,7 +1453,7 @@
bool SystemTools::Touch(const std::string& filename, bool create)
{
- if (!SystemTools::PathExists(filename)) {
+ if (!SystemTools::FileExists(filename)) {
if (create) {
FILE* file = Fopen(filename, "a+b");
if (file) {
diff --git a/Source/kwsys/testProcess.c b/Source/kwsys/testProcess.c
index 0c658f5..eed770c 100644
--- a/Source/kwsys/testProcess.c
+++ b/Source/kwsys/testProcess.c
@@ -450,24 +450,25 @@
printf("The process is still executing.\n");
break;
case kwsysProcess_State_Expired:
- printf("Child was killed when timeout expired.\n");
+ printf("Subprocess was killed when timeout expired.\n");
break;
case kwsysProcess_State_Exited:
- printf("Child exited with value = %d\n", kwsysProcess_GetExitValue(kp));
+ printf("Subprocess exited with value = %d\n",
+ kwsysProcess_GetExitValue(kp));
result = ((exception != kwsysProcess_GetExitException(kp)) ||
(value != kwsysProcess_GetExitValue(kp)));
break;
case kwsysProcess_State_Killed:
- printf("Child was killed by parent.\n");
+ printf("Subprocess was killed by parent.\n");
break;
case kwsysProcess_State_Exception:
- printf("Child terminated abnormally: %s\n",
+ printf("Subprocess terminated abnormally: %s\n",
kwsysProcess_GetExceptionString(kp));
result = ((exception != kwsysProcess_GetExitException(kp)) ||
(value != kwsysProcess_GetExitValue(kp)));
break;
case kwsysProcess_State_Disowned:
- printf("Child was disowned.\n");
+ printf("Subprocess was disowned.\n");
break;
case kwsysProcess_State_Error:
printf("Error in administrating child process: [%s]\n",
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx
index 1d34614..cfa420d 100644
--- a/Source/kwsys/testSystemTools.cxx
+++ b/Source/kwsys/testSystemTools.cxx
@@ -422,6 +422,28 @@
res = false;
}
+#if !defined(_WIN32)
+ std::string const testBadSymlink(testNewDir + "/badSymlink.txt");
+ std::string const testBadSymlinkTgt(testNewDir + "/missing/symlinkTgt.txt");
+ if (!kwsys::SystemTools::CreateSymlink(testBadSymlinkTgt, testBadSymlink)) {
+ std::cerr << "Problem with CreateSymlink for: " << testBadSymlink << " -> "
+ << testBadSymlinkTgt << std::endl;
+ res = false;
+ }
+
+ if (!kwsys::SystemTools::Touch(testBadSymlink, false)) {
+ std::cerr << "Problem with Touch (no create) for: " << testBadSymlink
+ << std::endl;
+ res = false;
+ }
+#endif
+
+ if (!kwsys::SystemTools::Touch(testNewDir, false)) {
+ std::cerr << "Problem with Touch (no create) for: " << testNewDir
+ << std::endl;
+ res = false;
+ }
+
kwsys::SystemTools::Touch(testNewFile, true);
if (!kwsys::SystemTools::RemoveADirectory(testNewDir)) {
std::cerr << "Problem with RemoveADirectory for: " << testNewDir
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 19aa4c4..4a774dd 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2906,7 +2906,7 @@
PASS_REGULAR_EXPRESSION "Failed")
else()
set_tests_properties(CTestTestCrash PROPERTIES
- PASS_REGULAR_EXPRESSION "(Illegal|SegFault|Child aborted)")
+ PASS_REGULAR_EXPRESSION "(Illegal|SegFault|Subprocess aborted)")
endif()
configure_file(
diff --git a/Tests/RunCMake/AndroidTestUtilities/check.cmake b/Tests/RunCMake/AndroidTestUtilities/check.cmake
index c24a3cd..ccd4d74 100644
--- a/Tests/RunCMake/AndroidTestUtilities/check.cmake
+++ b/Tests/RunCMake/AndroidTestUtilities/check.cmake
@@ -13,7 +13,7 @@
endfunction()
function(check_for_setup_test)
- file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" output_var REGEX "add_test\\(\"setup_test\".*")
+ file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" output_var REGEX "add_test\\(setup_test.*")
if(NOT output_var)
set(RunCMake_TEST_FAILED "Could not find the test: setup_test" PARENT_SCOPE)
endif()
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 36b016f..4d2a53c 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -289,7 +289,6 @@
add_RunCMake_test(add_executable)
add_RunCMake_test(add_library)
add_RunCMake_test(add_subdirectory)
-add_RunCMake_test(add_test)
add_RunCMake_test(build_command)
add_executable(exit_code exit_code.c)
set(execute_process_ARGS -DEXIT_CODE_EXE=$<TARGET_FILE:exit_code>)
diff --git a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
index 3cbbc07..588b77b 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
@@ -7,22 +7,22 @@
set(error_details "There is a problem with generated test file: ${testfile}")
-if(testfile_contents MATCHES "add_test[(][\"]DoesNotUseEmulator[\"] [^\n]+pseudo_emulator[^\n]+\n")
+if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulator [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
-if(NOT testfile_contents MATCHES "add_test[(][\"]UsesEmulator[\"] [^\n]+pseudo_emulator[^\n]+\n")
+if(NOT testfile_contents MATCHES "add_test[(]UsesEmulator [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}")
endif()
-if(testfile_contents MATCHES "add_test[(][\"]DoesNotUseEmulatorWithGenex[\"] [^\n]+pseudo_emulator[^\n]+\n")
+if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulatorWithGenex [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
-if(NOT testfile_contents MATCHES "add_test[(][\"]UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex[\"] [^\n]+pseudo_emulator[^\n]+\n")
+if(NOT testfile_contents MATCHES "add_test[(]UsesEmulatorWithExecTargetFromSubdirAddedWithoutGenex [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Did not use emulator when it should be used. ${error_details}")
endif()
-if(testfile_contents MATCHES "add_test[(][\"]DoesNotUseEmulatorWithExecTargetFromSubdirAddedWithGenex[\"] [^\n]+pseudo_emulator[^\n]+\n")
+if(testfile_contents MATCHES "add_test[(]DoesNotUseEmulatorWithExecTargetFromSubdirAddedWithGenex [^\n]+pseudo_emulator[^\n]+\n")
message(SEND_ERROR "Used emulator when it should not be used. ${error_details}")
endif()
diff --git a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
index 25201e4..2b4fc89 100644
--- a/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ExcludeFromAll/RunCMakeTest.cmake
@@ -9,7 +9,7 @@
-DCMAKE_BUILD_TYPE=${config}
-DTOOL_EXCLUDE_FROM_ALL=${exclude_from_all_value})
set(RunCMake_TEST_NO_CLEAN 1)
- include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake)
+ include(${RunCMake_TEST_BINARY_DIR}/target_files_${config}.cmake)
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config ${config})
endfunction()
diff --git a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
index eee5278..6dc785f 100644
--- a/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
+++ b/Tests/RunCMake/ExcludeFromAll/error-on-mixed-config-stderr.txt
@@ -1,3 +1,3 @@
CMake Error in CMakeLists.txt:
- The EXCLUDED_FROM_ALL property of target "release_only_tool" varies by
+ The EXCLUDE_FROM_ALL property of target "release_only_tool" varies by
configuration. This is not supported by the "[^"]+"
diff --git a/Tests/RunCMake/ExcludeFromAll/main.c b/Tests/RunCMake/ExcludeFromAll/main.c
index 5047a34..f8b643a 100644
--- a/Tests/RunCMake/ExcludeFromAll/main.c
+++ b/Tests/RunCMake/ExcludeFromAll/main.c
@@ -1,3 +1,4 @@
int main()
{
+ return 0;
}
diff --git a/Tests/RunCMake/ExcludeFromAll/single-config.cmake b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
index 71a9f06..aa49c21 100644
--- a/Tests/RunCMake/ExcludeFromAll/single-config.cmake
+++ b/Tests/RunCMake/ExcludeFromAll/single-config.cmake
@@ -2,10 +2,6 @@
add_executable(tool main.c)
set_property(TARGET tool PROPERTY EXCLUDE_FROM_ALL "${TOOL_EXCLUDE_FROM_ALL}")
-include(../NinjaMultiConfig/Common.cmake)
-set(orig_CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES})
-if("${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
- set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
-endif()
-generate_output_files(tool)
-set(CMAKE_CONFIGURATION_TYPES ${orig_CMAKE_CONFIGURATION_TYPES})
+file(GENERATE OUTPUT "${CMAKE_BINARY_DIR}/target_files_$<CONFIG>.cmake" CONTENT [[
+set(TARGET_FILE_tool_$<CONFIG> [==[$<TARGET_FILE:tool>]==])
+]])
diff --git a/Tests/RunCMake/add_test/CMakeLists.txt.in b/Tests/RunCMake/add_test/CMakeLists.txt.in
deleted file mode 100644
index 495240d..0000000
--- a/Tests/RunCMake/add_test/CMakeLists.txt.in
+++ /dev/null
@@ -1,27 +0,0 @@
-if (NOT DEFINED RUN_AS_SCRIPT)
-
- cmake_minimum_required(VERSION 3.7)
- project(@CASE_NAME@ NONE)
- include(CTest)
-
- # Two fallback tests for set_tests_properties.
- add_test(NAME PrefixTest COMMAND "${CMAKE_COMMAND}" --version)
- add_test(NAME SuffixTest COMMAND "${CMAKE_COMMAND}" --version)
-
- add_test(
- NAME @CASE_CMAKELISTS_NAME_1@
- COMMAND "${CMAKE_COMMAND}" -D RUN_AS_SCRIPT=1 -P "${CMAKE_CURRENT_LIST_FILE}"
- )
- set_tests_properties(
- @CASE_CMAKELISTS_NAME_2@
- PROPERTIES
- ENVIRONMENT CMAKE_add_test_ENVVAR=1
- )
-
-else()
-
- if(NOT DEFINED ENV{CMAKE_add_test_ENVVAR})
- message(FATAL_ERROR "Setting property on test did not succeed!")
- endif()
-
-endif()
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt
deleted file mode 100644
index 00865d0..0000000
--- a/Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \[=\[BracketArgument;SuffixTest\]=\] \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt
deleted file mode 100644
index a744beb..0000000
--- a/Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: BracketArgument;SuffixTest \.+[ ]+Passed
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt
deleted file mode 100644
index 32c2112..0000000
--- a/Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Error\(s\) when configuring the project
-No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt b/Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt
deleted file mode 100644
index 32c2112..0000000
--- a/Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Error\(s\) when configuring the project
-No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt
deleted file mode 100644
index 0661945..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt
deleted file mode 100644
index 4875409..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt
deleted file mode 100644
index 0661945..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt
deleted file mode 100644
index 4875409..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt
deleted file mode 100644
index 0661945..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt
deleted file mode 100644
index 4875409..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt
deleted file mode 100644
index 0661945..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt
+++ /dev/null
@@ -1 +0,0 @@
-Unable to find executable: SuffixTest
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt
deleted file mode 100644
index 4875409..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: EscapedQuote \.+\*\*\*Not Run
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt
deleted file mode 100644
index 80435b6..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt
deleted file mode 100644
index 80435b6..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt
deleted file mode 100644
index 80435b6..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt b/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt
deleted file mode 100644
index 80435b6..0000000
--- a/Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \(\) # \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt
deleted file mode 100644
index 172ff99..0000000
--- a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt
deleted file mode 100644
index 172ff99..0000000
--- a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt
deleted file mode 100644
index 172ff99..0000000
--- a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt b/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt
deleted file mode 100644
index 172ff99..0000000
--- a/Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: \$<BOOL:0> \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt
deleted file mode 100644
index 83e3f86..0000000
--- a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt
deleted file mode 100644
index 83e3f86..0000000
--- a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt
deleted file mode 100644
index 83e3f86..0000000
--- a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt b/Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt
deleted file mode 100644
index 83e3f86..0000000
--- a/Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: !§\$%&/ü:\*😤~ \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt b/Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt
deleted file mode 100644
index 0fbf486..0000000
--- a/Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: PrefixTest;SuffixTest \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt b/Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt b/Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt
deleted file mode 100644
index 32c2112..0000000
--- a/Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Error\(s\) when configuring the project
-No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt b/Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt
deleted file mode 100644
index c5ab1d8..0000000
--- a/Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-3/3 Test #3: PrefixTest;SuffixTest \.+\*\*\*Failed.*
-CMake Error at .+/CMakeLists.txt:[0-9]+ \(message\):
-[ ]*Setting property on test did not succeed!
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt b/Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt b/Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt
deleted file mode 100644
index 32c2112..0000000
--- a/Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Error\(s\) when configuring the project
-No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt b/Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt
deleted file mode 100644
index a255fb1..0000000
--- a/Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: PrefixTest SuffixTest \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces2-result.txt b/Tests/RunCMake/add_test/NameContainsSpaces2-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsSpaces2-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt b/Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt
deleted file mode 100644
index 32c2112..0000000
--- a/Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Error\(s\) when configuring the project
-No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt b/Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt
deleted file mode 100644
index 3d42b0b..0000000
--- a/Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-3/3 Test #3: PrefixTest SuffixTest \.+\*\*\*Failed.*
-CMake Error at .+/CMakeLists.txt:[0-9]+ \(message\):
-[ ]*Setting property on test did not succeed!
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces4-result.txt b/Tests/RunCMake/add_test/NameContainsSpaces4-result.txt
deleted file mode 100644
index b57e2de..0000000
--- a/Tests/RunCMake/add_test/NameContainsSpaces4-result.txt
+++ /dev/null
@@ -1 +0,0 @@
-(-1|255)
diff --git a/Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt b/Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt
deleted file mode 100644
index 32c2112..0000000
--- a/Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Error\(s\) when configuring the project
-No tests were found!!!
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt
deleted file mode 100644
index ae1a0b1..0000000
--- a/Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt
deleted file mode 100644
index ae1a0b1..0000000
--- a/Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt
deleted file mode 100644
index ae1a0b1..0000000
--- a/Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt b/Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt
deleted file mode 100644
index ae1a0b1..0000000
--- a/Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abc_\.\+-012 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt
deleted file mode 100644
index ed939bf..0000000
--- a/Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt
deleted file mode 100644
index ed939bf..0000000
--- a/Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt
deleted file mode 100644
index ed939bf..0000000
--- a/Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt b/Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt
deleted file mode 100644
index ed939bf..0000000
--- a/Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-Test #[0-9]+: abcdefghijklmnopqrstuvwxyz0123456789 \.+[ ]*Passed
diff --git a/Tests/RunCMake/add_test/RunCMakeTest.cmake b/Tests/RunCMake/add_test/RunCMakeTest.cmake
deleted file mode 100644
index 6e9edda..0000000
--- a/Tests/RunCMake/add_test/RunCMakeTest.cmake
+++ /dev/null
@@ -1,263 +0,0 @@
-include(RunCTest)
-
-set(ENV{CTEST_OUTPUT_ON_FAILURE} 1)
-
-function(run_NameIsAlphaNumeric1_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
- run_ctest(NameIsAlphaNumeric1)
-endfunction()
-run_NameIsAlphaNumeric1_test()
-
-function(run_NameIsAlphaNumeric2_test)
- set(CASE_CMAKELISTS_NAME_1 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
- run_ctest(NameIsAlphaNumeric2)
-endfunction()
-run_NameIsAlphaNumeric2_test()
-
-function(run_NameIsAlphaNumeric3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
- run_ctest(NameIsAlphaNumeric3)
-endfunction()
-run_NameIsAlphaNumeric3_test()
-
-function(run_NameIsAlphaNumeric4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ abcdefghijklmnopqrstuvwxyz0123456789 ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["abcdefghijklmnopqrstuvwxyz0123456789"]==])
- run_ctest(NameIsAlphaNumeric4)
-endfunction()
-run_NameIsAlphaNumeric4_test()
-
-
-function(run_NameContainsValidSpecialChars1_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ abc_.+-012 ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ abc_.+-012 ]==])
- run_ctest(NameContainsValidSpecialChars1)
-endfunction()
-run_NameContainsValidSpecialChars1_test()
-
-function(run_NameContainsValidSpecialChars2_test)
- set(CASE_CMAKELISTS_NAME_1 [==["abc_.+-012"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["abc_.+-012"]==])
- run_ctest(NameContainsValidSpecialChars2)
-endfunction()
-run_NameContainsValidSpecialChars2_test()
-
-function(run_NameContainsValidSpecialChars3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["abc_.+-012"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ abc_.+-012 ]==])
- run_ctest(NameContainsValidSpecialChars3)
-endfunction()
-run_NameContainsValidSpecialChars3_test()
-
-function(run_NameContainsValidSpecialChars4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ abc_.+-012 ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["abc_.+-012"]==])
- run_ctest(NameContainsValidSpecialChars4)
-endfunction()
-run_NameContainsValidSpecialChars4_test()
-
-
-function(run_NameContainsOtherSpecialChars1_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ !§$%&/ü:*😤~ ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ !§$%&/ü:*😤~ ]==])
- run_ctest(NameContainsOtherSpecialChars1)
-endfunction()
-run_NameContainsOtherSpecialChars1_test()
-
-function(run_NameContainsOtherSpecialChars2_test)
- set(CASE_CMAKELISTS_NAME_1 [==["!§$%&/ü:*😤~"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["!§$%&/ü:*😤~"]==])
- run_ctest(NameContainsOtherSpecialChars2)
-endfunction()
-run_NameContainsOtherSpecialChars2_test()
-
-function(run_NameContainsOtherSpecialChars3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["!§$%&/ü:*😤~"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ !§$%&/ü:*😤~ ]==])
- run_ctest(NameContainsOtherSpecialChars3)
-endfunction()
-run_NameContainsOtherSpecialChars3_test()
-
-function(run_NameContainsOtherSpecialChars4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ !§$%&/ü:*😤~ ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["!§$%&/ü:*😤~"]==])
- run_ctest(NameContainsOtherSpecialChars4)
-endfunction()
-run_NameContainsOtherSpecialChars4_test()
-
-
-function(run_NameContainsEscapedSpecialChars1_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ \(\)\ \# ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ \(\)\ \# ]==])
- run_ctest(NameContainsEscapedSpecialChars1)
-endfunction()
-run_NameContainsEscapedSpecialChars1_test()
-
-function(run_NameContainsEscapedSpecialChars2_test)
- set(CASE_CMAKELISTS_NAME_1 [==["\(\)\ \#"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["\(\)\ \#"]==])
- run_ctest(NameContainsEscapedSpecialChars2)
-endfunction()
-run_NameContainsEscapedSpecialChars2_test()
-
-function(run_NameContainsEscapedSpecialChars3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["\(\)\ \#"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ \(\)\ \# ]==])
- run_ctest(NameContainsEscapedSpecialChars3)
-endfunction()
-run_NameContainsEscapedSpecialChars3_test()
-
-function(run_NameContainsEscapedSpecialChars4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ \(\)\ \# ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["\(\)\ \#"]==])
- run_ctest(NameContainsEscapedSpecialChars4)
-endfunction()
-run_NameContainsEscapedSpecialChars4_test()
-
-
-function(run_NameContainsGeneratorExpressionSyntax1_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ $<BOOL:0> ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ $<BOOL:0> ]==])
- run_ctest(NameContainsGeneratorExpressionSyntax1)
-endfunction()
-run_NameContainsGeneratorExpressionSyntax1_test()
-
-function(run_NameContainsGeneratorExpressionSyntax2_test)
- set(CASE_CMAKELISTS_NAME_1 [==["$<BOOL:0>"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["$<BOOL:0>"]==])
- run_ctest(NameContainsGeneratorExpressionSyntax2)
-endfunction()
-run_NameContainsGeneratorExpressionSyntax2_test()
-
-function(run_NameContainsGeneratorExpressionSyntax3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["$<BOOL:0>"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ $<BOOL:0> ]==])
- run_ctest(NameContainsGeneratorExpressionSyntax3)
-endfunction()
-run_NameContainsGeneratorExpressionSyntax3_test()
-
-function(run_NameContainsGeneratorExpressionSyntax4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ $<BOOL:0> ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["$<BOOL:0>"]==])
- run_ctest(NameContainsGeneratorExpressionSyntax4)
-endfunction()
-run_NameContainsGeneratorExpressionSyntax4_test()
-
-
-function(run_NameContainsSpaces1_test)
- set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest SuffixTest"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest SuffixTest"]==])
- run_ctest(NameContainsSpaces1)
-endfunction()
-run_NameContainsSpaces1_test()
-
-function(run_NameContainsSpaces2_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest SuffixTest ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest SuffixTest ]==])
- run_ctest(NameContainsSpaces2)
-endfunction()
-run_NameContainsSpaces2_test()
-
-function(run_NameContainsSpaces3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest SuffixTest"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest SuffixTest ]==])
- run_ctest(NameContainsSpaces3)
-endfunction()
-run_NameContainsSpaces3_test()
-
-function(run_NameContainsSpaces4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest SuffixTest ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest SuffixTest"]==])
- run_ctest(NameContainsSpaces4)
-endfunction()
-run_NameContainsSpaces4_test()
-
-
-function(run_NameContainsSemicolon1_test)
- set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest;SuffixTest"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest;SuffixTest"]==])
- run_ctest(NameContainsSemicolon1)
-endfunction()
-run_NameContainsSemicolon1_test()
-
-function(run_NameContainsSemicolon2_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest;SuffixTest ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest;SuffixTest ]==])
- run_ctest(NameContainsSemicolon2)
-endfunction()
-run_NameContainsSemicolon2_test()
-
-function(run_NameContainsSemicolon3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["PrefixTest;SuffixTest"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ PrefixTest;SuffixTest ]==])
- run_ctest(NameContainsSemicolon3)
-endfunction()
-run_NameContainsSemicolon3_test()
-
-function(run_NameContainsSemicolon4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ PrefixTest;SuffixTest ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["PrefixTest;SuffixTest"]==])
- run_ctest(NameContainsSemicolon4)
-endfunction()
-run_NameContainsSemicolon4_test()
-
-
-function(run_NameContainsEscapedQuote1_test)
- set(CASE_CMAKELISTS_NAME_1 [==["EscapedQuote\"\"SuffixTest"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["EscapedQuote\"\"SuffixTest"]==])
- run_ctest(NameContainsEscapedQuote1)
-endfunction()
-run_NameContainsEscapedQuote1_test()
-
-function(run_NameContainsEscapedQuote2_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ EscapedQuote\"\"SuffixTest ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ EscapedQuote\"\"SuffixTest ]==])
- run_ctest(NameContainsEscapedQuote2)
-endfunction()
-run_NameContainsEscapedQuote2_test()
-
-function(run_NameContainsEscapedQuote3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["EscapedQuote\"\"SuffixTest"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ EscapedQuote\"\"SuffixTest ]==])
- run_ctest(NameContainsEscapedQuote3)
-endfunction()
-run_NameContainsEscapedQuote3_test()
-
-function(run_NameContainsEscapedQuote4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ EscapedQuote\"\"SuffixTest ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["EscapedQuote\"\"SuffixTest"]==])
- run_ctest(NameContainsEscapedQuote4)
-endfunction()
-run_NameContainsEscapedQuote4_test()
-
-
-function(run_NameContainsBracketArgument1_test)
- set(CASE_CMAKELISTS_NAME_1 [==["[=[BracketArgument;SuffixTest]=]"]==])
- set(CASE_CMAKELISTS_NAME_2 [==["[=[BracketArgument;SuffixTest]=]"]==])
- run_ctest(NameContainsBracketArgument1)
-endfunction()
-run_NameContainsBracketArgument1_test()
-
-function(run_NameContainsBracketArgument2_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ [=[BracketArgument;SuffixTest]=] ]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ [=[BracketArgument;SuffixTest]=] ]==])
- run_ctest(NameContainsBracketArgument2)
-endfunction()
-run_NameContainsBracketArgument2_test()
-
-function(run_NameContainsBracketArgument3_test)
- set(CASE_CMAKELISTS_NAME_1 [==["[=[BracketArgument;SuffixTest]=]"]==])
- set(CASE_CMAKELISTS_NAME_2 [==[ [=[BracketArgument;SuffixTest]=] ]==])
- run_ctest(NameContainsBracketArgument3)
-endfunction()
-run_NameContainsBracketArgument3_test()
-
-function(run_NameContainsBracketArgument4_test)
- set(CASE_CMAKELISTS_NAME_1 [==[ [=[BracketArgument;SuffixTest]=] ]==])
- set(CASE_CMAKELISTS_NAME_2 [==["[=[BracketArgument;SuffixTest]=]"]==])
- run_ctest(NameContainsBracketArgument4)
-endfunction()
-run_NameContainsBracketArgument4_test()
diff --git a/Tests/RunCMake/add_test/test.cmake.in b/Tests/RunCMake/add_test/test.cmake.in
deleted file mode 100644
index 9821c1c..0000000
--- a/Tests/RunCMake/add_test/test.cmake.in
+++ /dev/null
@@ -1,16 +0,0 @@
-cmake_minimum_required(VERSION 3.17)
-
-set(CTEST_SITE "test-site")
-set(CTEST_BUILD_NAME "test-build-name")
-set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@")
-set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build")
-set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
-set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
-
-set(ctest_test_args "@CASE_CTEST_TEST_ARGS@")
-ctest_start(Experimental)
-ctest_configure()
-#ctest_build()
-ctest_test(${ctest_test_args})
diff --git a/Tests/SetLang/CMakeLists.txt b/Tests/SetLang/CMakeLists.txt
index af90f11..616421e 100644
--- a/Tests/SetLang/CMakeLists.txt
+++ b/Tests/SetLang/CMakeLists.txt
@@ -9,6 +9,13 @@
target_link_libraries(SetLang foo)
set_target_properties(SetLang PROPERTIES LINKER_LANGUAGE CXX)
+# VS generators historically tolerated target-wide -TP flags added
+# by project code, so cover that case to preserve the behavior.
+if(CMAKE_GENERATOR MATCHES "^Visual Studio" AND "x${CMAKE_C_COMPILER_ID}" STREQUAL "xMSVC")
+ add_library(stay stay_c.c stay_cxx.cxx)
+ set_property(TARGET stay PROPERTY COMPILE_OPTIONS "-TP")
+endif()
+
if((CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang|MSVC|Borland|Embarcadero|Intel|TI|XL)"))
add_library(zoom zoom.zzz)
set_source_files_properties(zoom.zzz PROPERTIES LANGUAGE CXX)
diff --git a/Tests/SetLang/stay_c.c b/Tests/SetLang/stay_c.c
new file mode 100644
index 0000000..70755f3
--- /dev/null
+++ b/Tests/SetLang/stay_c.c
@@ -0,0 +1,8 @@
+#ifdef __cplusplus
+# error C source incorrectly compiled as C++
+#endif
+
+int stay_c(void)
+{
+ return 0;
+}
diff --git a/Tests/SetLang/stay_cxx.cxx b/Tests/SetLang/stay_cxx.cxx
new file mode 100644
index 0000000..e035260
--- /dev/null
+++ b/Tests/SetLang/stay_cxx.cxx
@@ -0,0 +1,8 @@
+#ifndef __cplusplus
+# error C++ source incorrectly compiled as C
+#endif
+
+int stay_cxx()
+{
+ return 0;
+}
diff --git a/Utilities/std/cm/bits/fs_path.cxx b/Utilities/std/cm/bits/fs_path.cxx
index b8c5631..8089998 100644
--- a/Utilities/std/cm/bits/fs_path.cxx
+++ b/Utilities/std/cm/bits/fs_path.cxx
@@ -331,7 +331,7 @@
while (ptr != end &&
(*ptr == '/'
# if defined(_WIN32)
- || *ptr == ' \\'
+ || *ptr == '\\'
# endif
)) {
ptr += step;
diff --git a/bootstrap b/bootstrap
index 0134e0c..2ef0fbb 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1188,7 +1188,7 @@
}
#endif
-#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_if_constexpr))
+#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_deduction_guides))
#include <optional>
template <typename T,
typename std::invoke_result<decltype(&T::get), T>::type = nullptr>