summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.gitlab/ci/sccache.sh16
-rw-r--r--Help/manual/cmake-policies.7.rst2
-rw-r--r--Help/policy/CMP0111.rst13
-rw-r--r--Help/release/3.19.rst2
-rw-r--r--Modules/CheckFortranSourceCompiles.cmake4
-rw-r--r--Modules/CheckFortranSourceRuns.cmake4
-rw-r--r--Modules/CheckSourceCompiles.cmake9
-rw-r--r--Modules/CheckSourceRuns.cmake11
-rw-r--r--Modules/Compiler/IAR.cmake1
-rw-r--r--Modules/FindPython/Support.cmake2
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/QtDialog/CMakeSetupDialog.cxx13
-rw-r--r--Source/QtDialog/CMakeSetupDialog.ui6
-rw-r--r--Source/cmFileCommand.cxx10
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Source/cmPolicies.h2
-rw-r--r--Source/cmSeparateArgumentsCommand.cxx5
-rw-r--r--Tests/CMakeGUI/CMakeGUITest.cxx27
-rw-r--r--Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt21
-rw-r--r--Tests/RunCMake/CTest/RunCMakeTest.cmake11
-rw-r--r--Tests/RunCMake/CTest/SingleConfig-test-stdout.txt8
-rw-r--r--Tests/RunCMake/CTest/SingleConfig.cmake6
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt (renamed from Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt)0
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt9
-rw-r--r--Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake5
-rw-r--r--Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt1
-rw-r--r--Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt9
-rw-r--r--Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake5
-rw-r--r--Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt1
-rw-r--r--Tests/RunCMake/File_Configure/AngleBracketsContent.cmake6
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt5
-rw-r--r--Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake4
-rw-r--r--Tests/RunCMake/File_Configure/RunCMakeTest.cmake2
-rw-r--r--Tests/RunCMake/separate_arguments/NativeCommand.cmake5
-rw-r--r--Tests/RunCMake/separate_arguments/UnixCommand.cmake5
-rw-r--r--Tests/RunCMake/separate_arguments/WindowsCommand.cmake5
38 files changed, 170 insertions, 74 deletions
diff --git a/.gitlab/ci/sccache.sh b/.gitlab/ci/sccache.sh
index f7d51ff..af24710 100755
--- a/.gitlab/ci/sccache.sh
+++ b/.gitlab/ci/sccache.sh
@@ -2,17 +2,17 @@
set -e
-readonly version="0.2.13"
-
case "$( uname -s )" in
Linux)
+ version="0.2.13"
shatool="sha256sum"
sha256sum="28a5499e340865b08b632306b435913beb590fbd7b49a3f887a623b459fabdeb"
platform="x86_64-unknown-linux-musl"
;;
Darwin)
+ version="gfe63078"
shatool="shasum -a 256"
- sha256sum="f564e948abadfc9e409eb1cd7babf24c6784057d5506c3b0a04cdd37cd830ae9"
+ sha256sum="60a0302b1d7227f7ef56abd82266353f570d27c6e850c56c6448bf62def38888"
platform="x86_64-apple-darwin"
;;
*)
@@ -20,6 +20,7 @@ case "$( uname -s )" in
exit 1
;;
esac
+readonly version
readonly shatool
readonly sha256sum
readonly platform
@@ -27,10 +28,17 @@ readonly platform
readonly filename="sccache-$version-$platform"
readonly tarball="$filename.tar.gz"
+if [ "$( uname -s )" = "Darwin" ]; then
+ url="https://paraview.org/files/dependencies"
+else
+ url="https://github.com/mozilla/sccache/releases/download/$version"
+fi
+readonly url
+
cd .gitlab
echo "$sha256sum $tarball" > sccache.sha256sum
-curl -OL "https://github.com/mozilla/sccache/releases/download/$version/$tarball"
+curl -OL "$url/$tarball"
$shatool --check sccache.sha256sum
tar xf "$tarball"
mv "$filename/sccache" .
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 886fe80..0116674 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -69,7 +69,7 @@ Policies Introduced by CMake 3.19
CMP0114: ExternalProject step targets fully adopt their steps. </policy/CMP0114>
CMP0113: Makefile generators do not repeat custom commands from target dependencies. </policy/CMP0113>
CMP0112: Target file component generator expressions do not add target dependencies. </policy/CMP0112>
- CMP0111: An imported target with a missing location fails during generation. </policy/CMP0111>
+ CMP0111: An imported target missing its location property fails during generation. </policy/CMP0111>
CMP0110: add_test() supports arbitrary characters in test names. </policy/CMP0110>
CMP0109: find_program() requires permission to execute but not to read. </policy/CMP0109>
diff --git a/Help/policy/CMP0111.rst b/Help/policy/CMP0111.rst
index 37e5ad5..e327583 100644
--- a/Help/policy/CMP0111.rst
+++ b/Help/policy/CMP0111.rst
@@ -3,10 +3,17 @@ CMP0111
.. versionadded:: 3.19
-An imported target with a missing location fails during generation.
+An imported target missing its location property fails during generation.
-Prior to this the location would be generated as ``<TARGET_NAME>-NOTFOUND``,
-which would result in build failures.
+:ref:`Imported Targets` for library files and executables require that
+their location on disk is specified in a target property such as
+:prop_tgt:`IMPORTED_LOCATION`, :prop_tgt:`IMPORTED_IMPLIB`, or a
+per-configuration equivalent. If a needed location property is not set,
+CMake 3.18 and below generate the string ``<TARGET_NAME>-NOTFOUND`` in
+its place, which results in failures of the corresponding rules at build
+time. CMake 3.19 and above prefer instead to raise an error during
+generation. This policy provides compatibility for projects that have
+not been updated to expect the new behavior.
The ``OLD`` behavior of this policy is to generate the location of an imported
unknown, static or shared library target as ``<TARGET_NAME>-NOTFOUND`` if not
diff --git a/Help/release/3.19.rst b/Help/release/3.19.rst
index ea68594..93e060e 100644
--- a/Help/release/3.19.rst
+++ b/Help/release/3.19.rst
@@ -293,7 +293,7 @@ Other Changes
* The :command:`find_program` command now requires permission to execute
but not to read the file found. See policy :policy:`CMP0109`.
-* An imported target with a missing location now fails during generation
+* An imported target missing its location property fails during generation
if the location is used. See policy :policy:`CMP0111`.
* The following target-based generator expressions that query for directory or
diff --git a/Modules/CheckFortranSourceCompiles.cmake b/Modules/CheckFortranSourceCompiles.cmake
index 2bcc343..169b829 100644
--- a/Modules/CheckFortranSourceCompiles.cmake
+++ b/Modules/CheckFortranSourceCompiles.cmake
@@ -90,5 +90,7 @@ include_guard(GLOBAL)
include(CheckSourceCompiles)
macro(CHECK_Fortran_SOURCE_COMPILES SOURCE VAR)
- check_source_compiles(Fortran "${SOURCE}" ${VAR} ${ARGN})
+ # Pass the SRC_EXT we used by default historically.
+ # A user-provided SRC_EXT argument in ARGN will override ours.
+ check_source_compiles(Fortran "${SOURCE}" ${VAR} SRC_EXT "F" ${ARGN})
endmacro()
diff --git a/Modules/CheckFortranSourceRuns.cmake b/Modules/CheckFortranSourceRuns.cmake
index 29f4a98..5276709 100644
--- a/Modules/CheckFortranSourceRuns.cmake
+++ b/Modules/CheckFortranSourceRuns.cmake
@@ -86,5 +86,7 @@ include_guard(GLOBAL)
include(CheckSourceRuns)
macro(CHECK_Fortran_SOURCE_RUNS SOURCE VAR)
- check_source_runs(Fortran "${SOURCE}" ${VAR} ${ARGN})
+ # Pass the SRC_EXT we used by default historically.
+ # A user-provided SRC_EXT argument in ARGN will override ours.
+ check_source_runs(Fortran "${SOURCE}" ${VAR} SRC_EXT "F90" ${ARGN})
endmacro()
diff --git a/Modules/CheckSourceCompiles.cmake b/Modules/CheckSourceCompiles.cmake
index 08fc153..4ed9a5c 100644
--- a/Modules/CheckSourceCompiles.cmake
+++ b/Modules/CheckSourceCompiles.cmake
@@ -94,7 +94,7 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
set(_lang_ext "cu")
elseif(_lang STREQUAL Fortran)
set(_lang_textual "Fortran")
- set(_lang_ext "F")
+ set(_lang_ext "F90")
elseif(_lang STREQUAL ISPC)
set(_lang_textual "ISPC")
set(_lang_ext "ispc")
@@ -121,8 +121,11 @@ function(CHECK_SOURCE_COMPILES _lang _source _var)
foreach(arg ${ARGN})
if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
set(_key "${arg}")
- elseif(_key)
- list(APPEND _${_key} "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
else()
message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
endif()
diff --git a/Modules/CheckSourceRuns.cmake b/Modules/CheckSourceRuns.cmake
index 20f3e1e..033793d 100644
--- a/Modules/CheckSourceRuns.cmake
+++ b/Modules/CheckSourceRuns.cmake
@@ -92,7 +92,7 @@ function(CHECK_SOURCE_RUNS _lang _source _var)
set(_lang_ext "cu")
elseif(_lang STREQUAL Fortran)
set(_lang_textual "Fortran")
- set(_lang_ext "F")
+ set(_lang_ext "F90")
elseif(_lang STREQUAL OBJC)
set(_lang_textual "Objective-C")
set(_lang_ext "m")
@@ -114,10 +114,13 @@ function(CHECK_SOURCE_RUNS _lang _source _var)
set(_SRC_EXT)
set(_key)
foreach(arg ${ARGN})
- if("${arg}" MATCHES "^(SRC_EXT)$")
+ if("${arg}" MATCHES "^(FAIL_REGEX|SRC_EXT)$")
set(_key "${arg}")
- elseif(_key)
- list(APPEND _${_key} "${arg}")
+ elseif(_key STREQUAL "FAIL_REGEX")
+ list(APPEND _FAIL_REGEX "${arg}")
+ elseif(_key STREQUAL "SRC_EXT")
+ set(_SRC_EXT "${arg}")
+ set(_key "")
else()
message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
endif()
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake
index 296e2fd..f3938a9 100644
--- a/Modules/Compiler/IAR.cmake
+++ b/Modules/Compiler/IAR.cmake
@@ -42,6 +42,7 @@ include_guard()
macro(__compiler_iar_ilink lang)
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
+ set(CMAKE_${lang}_OUTPUT_EXTENSION ".o")
if (${lang} STREQUAL "C" OR ${lang} STREQUAL "CXX")
set(CMAKE_${lang}_COMPILE_OBJECT "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT>")
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> ${CMAKE_IAR_${lang}_FLAG} --silent <SOURCE> <DEFINES> <INCLUDES> <FLAGS> --preprocess=cnl <PREPROCESSED_SOURCE>")
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake
index 7de2d29..2b911ae 100644
--- a/Modules/FindPython/Support.cmake
+++ b/Modules/FindPython/Support.cmake
@@ -22,7 +22,7 @@ if (NOT DEFINED _${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR)
message (FATAL_ERROR "FindPython: INTERNAL ERROR")
endif()
if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "3")
- set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+ set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL "2")
set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
else()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index e31bf44..e0bf0ad 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 19)
-set(CMake_VERSION_PATCH 20201016)
+set(CMake_VERSION_PATCH 20201019)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx
index acd32ec..7a04daa 100644
--- a/Source/QtDialog/CMakeSetupDialog.cxx
+++ b/Source/QtDialog/CMakeSetupDialog.cxx
@@ -43,6 +43,12 @@
#include "RegexExplorer.h"
#include "WarningMessagesDialog.h"
+namespace {
+const QString PRESETS_DISABLED_TOOLTIP =
+ "This option is disabled because there are no available presets in "
+ "CMakePresets.json or CMakeUserPresets.json.";
+}
+
QCMakeThread::QCMakeThread(QObject* p)
: QThread(p)
{
@@ -92,6 +98,7 @@ CMakeSetupDialog::CMakeSetupDialog()
this->ProgressBar->reset();
this->RemoveEntry->setEnabled(false);
this->AddEntry->setEnabled(false);
+ this->Preset->setStatusTip(PRESETS_DISABLED_TOOLTIP);
QByteArray p = settings.value("SplitterSizes").toByteArray();
this->Splitter->restoreState(p);
@@ -696,8 +703,8 @@ void CMakeSetupDialog::updatePresets(const QVector<QCMakePreset>& presets)
this->Preset->blockSignals(false);
}
- this->Preset->setHidden(presets.isEmpty());
- this->PresetLabel->setHidden(presets.isEmpty());
+ this->Preset->setDisabled(presets.isEmpty());
+ this->Preset->setToolTip(presets.isEmpty() ? PRESETS_DISABLED_TOOLTIP : "");
if (!this->DeferredPreset.isNull()) {
this->Preset->setPresetName(this->DeferredPreset);
@@ -823,7 +830,7 @@ void CMakeSetupDialog::setEnabledState(bool enabled)
this->CacheValues->cacheModel()->setEditEnabled(enabled);
this->SourceDirectory->setEnabled(enabled);
this->BrowseSourceDirectoryButton->setEnabled(enabled);
- this->Preset->setEnabled(enabled);
+ this->Preset->setEnabled(enabled && !this->Preset->presets().isEmpty());
this->BinaryDirectory->setEnabled(enabled);
this->BrowseBinaryDirectoryButton->setEnabled(enabled);
this->ReloadCacheAction->setEnabled(enabled);
diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui
index afb25eb..a5c35b1 100644
--- a/Source/QtDialog/CMakeSetupDialog.ui
+++ b/Source/QtDialog/CMakeSetupDialog.ui
@@ -68,7 +68,11 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QCMakePresetComboBox" name="Preset"/>
+ <widget class="QCMakePresetComboBox" name="Preset">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="BinaryLabel">
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4fe5901..cd440ad 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2989,15 +2989,7 @@ bool HandleConfigureCommand(std::vector<std::string> const& args,
std::string outputFile = cmSystemTools::CollapseFullPath(
args[2], status.GetMakefile().GetCurrentBinaryDirectory());
- std::string::size_type pos = input.find_first_of("<>");
- if (pos != std::string::npos) {
- status.SetError(cmStrCat("CONFIGURE called with CONTENT containing a \"",
- input[pos],
- "\". This character is not allowed."));
- return false;
- }
-
- pos = outputFile.find_first_of("<>");
+ std::string::size_type pos = outputFile.find_first_of("<>");
if (pos != std::string::npos) {
status.SetError(cmStrCat("CONFIGURE called with OUTPUT containing a \"",
outputFile[pos],
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index c366b48..22594bd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3185,10 +3185,9 @@ std::vector<std::string> cmMakefile::GetGeneratorConfigs(
GeneratorConfigQuery mode) const
{
std::vector<std::string> configs;
- if (this->GetGlobalGenerator()->IsMultiConfig() ||
- mode == cmMakefile::OnlyMultiConfig) {
+ if (this->GetGlobalGenerator()->IsMultiConfig()) {
this->GetDefExpandList("CMAKE_CONFIGURATION_TYPES", configs);
- } else {
+ } else if (mode != cmMakefile::OnlyMultiConfig) {
const std::string& buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE");
if (!buildType.empty()) {
configs.emplace_back(buildType);
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 99bac98..5ef0ff7 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -327,7 +327,7 @@ class cmMakefile;
"add_test() supports arbitrary characters in test names.", 3, 19, 0, \
cmPolicies::WARN) \
SELECT(POLICY, CMP0111, \
- "An imported target with a missing location fails during " \
+ "An imported target missing its location property fails during " \
"generation.", \
3, 19, 0, cmPolicies::WARN) \
SELECT(POLICY, CMP0112, \
diff --git a/Source/cmSeparateArgumentsCommand.cxx b/Source/cmSeparateArgumentsCommand.cxx
index 7e501a2..52b1a44 100644
--- a/Source/cmSeparateArgumentsCommand.cxx
+++ b/Source/cmSeparateArgumentsCommand.cxx
@@ -80,6 +80,11 @@ bool cmSeparateArgumentsCommand(std::vector<std::string> const& args,
return false;
}
+ if (unparsedArguments.empty()) {
+ status.GetMakefile().AddDefinition(var, {});
+ return true;
+ }
+
std::string& command = unparsedArguments.front();
if (command.empty()) {
diff --git a/Tests/CMakeGUI/CMakeGUITest.cxx b/Tests/CMakeGUI/CMakeGUITest.cxx
index 5a6bec3..2b5d973 100644
--- a/Tests/CMakeGUI/CMakeGUITest.cxx
+++ b/Tests/CMakeGUI/CMakeGUITest.cxx
@@ -356,16 +356,14 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presetName(), QString{});
QCOMPARE(this->m_window->Preset->presets().size(), 0);
QCOMPARE(this->m_window->BinaryDirectory->currentText(), "");
- QCOMPARE(this->m_window->Preset->isHidden(), true);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), true);
+ QCOMPARE(this->m_window->Preset->isEnabled(), false);
writePresets("build1", { "preset" });
loopSleep(1500);
QCOMPARE(this->m_window->Preset->presetName(), QString{});
QCOMPARE(this->m_window->Preset->presets().size(), 1);
QCOMPARE(this->m_window->BinaryDirectory->currentText(), "");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
this->m_window->Preset->setPresetName("preset");
loopSleep();
@@ -373,8 +371,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 1);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src/build1/preset");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
writePresets("build2", { "preset2", "preset" });
loopSleep(1500);
@@ -382,8 +379,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 2);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src/build1/preset");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
writePresets("build3", { "preset2" });
loopSleep(1500);
@@ -391,8 +387,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 1);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src/build1/preset");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
this->m_window->Preset->setPresetName("preset2");
loopSleep();
@@ -400,8 +395,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 1);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src/build3/preset2");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
QDir::root().mkpath(CMakeGUITest_BINARY_DIR "/changingPresets/src2");
QFile::copy(CMakeGUITest_BINARY_DIR "/changingPresets/src/CMakePresets.json",
@@ -414,8 +408,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 1);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src/build3/preset2");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
this->m_window->Preset->setPresetName("preset2");
loopSleep();
@@ -423,8 +416,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 1);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src2/build3/preset2");
- QCOMPARE(this->m_window->Preset->isHidden(), false);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), false);
+ QCOMPARE(this->m_window->Preset->isEnabled(), true);
QFile(CMakeGUITest_BINARY_DIR "/changingPresets/src2/CMakePresets.json")
.remove();
@@ -433,8 +425,7 @@ void CMakeGUITest::changingPresets()
QCOMPARE(this->m_window->Preset->presets().size(), 0);
QCOMPARE(this->m_window->BinaryDirectory->currentText(),
CMakeGUITest_BINARY_DIR "/changingPresets/src2/build3/preset2");
- QCOMPARE(this->m_window->Preset->isHidden(), true);
- QCOMPARE(this->m_window->PresetLabel->isHidden(), true);
+ QCOMPARE(this->m_window->Preset->isEnabled(), false);
}
void SetupDefaultQSettings()
diff --git a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
index 2fe6cc8..3abca0a 100644
--- a/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0111/CMP0111-WARN-stderr.txt
@@ -1,25 +1,28 @@
CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0111 is not set: An imported target with a missing location fails
- during generation. Run "cmake --help-policy CMP0111" for policy details.
- Use the cmake_policy command to set the policy and suppress this warning.
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
IMPORTED_LOCATION not set for imported target "unknown_lib"( configuration
".+")?.
This warning is for project developers. Use -Wno-dev to suppress it.
+
CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0111 is not set: An imported target with a missing location fails
- during generation. Run "cmake --help-policy CMP0111" for policy details.
- Use the cmake_policy command to set the policy and suppress this warning.
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
IMPORTED_LOCATION not set for imported target "static_lib"( configuration
".+")?.
This warning is for project developers. Use -Wno-dev to suppress it.
+
CMake Warning \(dev\) in CMakeLists.txt:
- Policy CMP0111 is not set: An imported target with a missing location fails
- during generation. Run "cmake --help-policy CMP0111" for policy details.
- Use the cmake_policy command to set the policy and suppress this warning.
+ Policy CMP0111 is not set: An imported target missing its location property
+ fails during generation. Run "cmake --help-policy CMP0111" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
IMPORTED_IMPLIB not set for imported target "shared_lib"( configuration
".+")?.
diff --git a/Tests/RunCMake/CTest/RunCMakeTest.cmake b/Tests/RunCMake/CTest/RunCMakeTest.cmake
index 62606f8..ffc8f78 100644
--- a/Tests/RunCMake/CTest/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CTest/RunCMakeTest.cmake
@@ -27,3 +27,14 @@ function(run_TestfileErrors)
run_cmake_command(TestfileErrors-test ${CMAKE_CTEST_COMMAND} -C Debug)
endfunction()
run_TestfileErrors()
+
+function(run_SingleConfig)
+ set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SingleConfig-build)
+ run_cmake(SingleConfig)
+ set(RunCMake_TEST_NO_CLEAN 1)
+ run_cmake_command(SingleConfig-build ${CMAKE_COMMAND} --build .)
+ run_cmake_command(SingleConfig-test ${CMAKE_CTEST_COMMAND}) # No -C Debug required for single-config.
+endfunction()
+if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
+ run_SingleConfig()
+endif()
diff --git a/Tests/RunCMake/CTest/SingleConfig-test-stdout.txt b/Tests/RunCMake/CTest/SingleConfig-test-stdout.txt
new file mode 100644
index 0000000..1c39ea1
--- /dev/null
+++ b/Tests/RunCMake/CTest/SingleConfig-test-stdout.txt
@@ -0,0 +1,8 @@
+^Test project [^
+]*/Tests/RunCMake/CTest/SingleConfig-build
+ Start 1: SingleConfig
+1/1 Test #1: SingleConfig \.+ +Passed +[0-9.]+ sec
++
+100% tests passed, 0 tests failed out of 1
++
+Total Test time \(real\) = +[0-9.]+ sec$
diff --git a/Tests/RunCMake/CTest/SingleConfig.cmake b/Tests/RunCMake/CTest/SingleConfig.cmake
new file mode 100644
index 0000000..7c10e06
--- /dev/null
+++ b/Tests/RunCMake/CTest/SingleConfig.cmake
@@ -0,0 +1,6 @@
+include(CTest)
+
+# This should be ignored by single-config generators.
+set(CMAKE_CONFIGURATION_TYPES "Release;Debug" CACHE INTERNAL "Supported configuration types")
+
+add_test(NAME SingleConfig COMMAND ${CMAKE_COMMAND} -E echo SingleConfig)
diff --git a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
index 22cb466..6e9088f 100644
--- a/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckSourceCompiles/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
run_cmake(NotEnabledLanguage)
run_cmake(NonExistentLanguage)
+run_cmake(UnknownArgument)
run_cmake(CheckCSourceCompiles)
run_cmake(CheckCXXSourceCompiles)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt
index d00491f..d00491f 100644
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-result.txt
+++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-result.txt
diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt
new file mode 100644
index 0000000..eed581a
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at [^
+]*/Modules/CheckSourceCompiles.cmake:[0-9]+ \(message\):
+ Unknown argument:
+
+ BAD
+
+Call Stack \(most recent call first\):
+ UnknownArgument.cmake:[0-9]+ \(check_source_compiles\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake
new file mode 100644
index 0000000..3b861da
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceCompiles/UnknownArgument.cmake
@@ -0,0 +1,5 @@
+
+enable_language (C)
+include(CheckSourceCompiles)
+
+check_source_compiles(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT C BAD)
diff --git a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
index b27b08d..c99ac8b 100644
--- a/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CheckSourceRuns/RunCMakeTest.cmake
@@ -2,6 +2,7 @@ include(RunCMake)
run_cmake(NotEnabledLanguage)
run_cmake(NonExistentLanguage)
+run_cmake(UnknownArgument)
run_cmake(CheckCSourceRuns)
run_cmake(CheckCXXSourceRuns)
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt
new file mode 100644
index 0000000..8ae1ea1
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument-stderr.txt
@@ -0,0 +1,9 @@
+^CMake Error at [^
+]*/Modules/CheckSourceRuns.cmake:[0-9]+ \(message\):
+ Unknown argument:
+
+ BAD
+
+Call Stack \(most recent call first\):
+ UnknownArgument.cmake:[0-9]+ \(check_source_runs\)
+ CMakeLists.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake
new file mode 100644
index 0000000..6e50fa7
--- /dev/null
+++ b/Tests/RunCMake/CheckSourceRuns/UnknownArgument.cmake
@@ -0,0 +1,5 @@
+
+enable_language (C)
+include(CheckSourceRuns)
+
+check_source_runs(C "int main() {return 0;}" SHOULD_BUILD SRC_EXT C BAD)
diff --git a/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt b/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt
new file mode 100644
index 0000000..08c2ada
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AngleBracketsContent-stderr.txt
@@ -0,0 +1 @@
+^foo-\$<CONFIG>$
diff --git a/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake b/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake
new file mode 100644
index 0000000..04c63bb
--- /dev/null
+++ b/Tests/RunCMake/File_Configure/AngleBracketsContent.cmake
@@ -0,0 +1,6 @@
+file(CONFIGURE
+ OUTPUT "file.txt"
+ CONTENT "foo-$<CONFIG>"
+)
+file(READ ${CMAKE_CURRENT_BINARY_DIR}/file.txt out)
+message("${out}")
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
deleted file mode 100644
index acda654..0000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent-stderr.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-CMake Error at BadArgGeneratorExpressionContent.cmake:[0-9]+ \(file\):
- file CONFIGURE called with CONTENT containing a "<". This character is not
- allowed.
-Call Stack \(most recent call first\):
- CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake b/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
deleted file mode 100644
index 75fe9e5..0000000
--- a/Tests/RunCMake/File_Configure/BadArgGeneratorExpressionContent.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-file(CONFIGURE
- OUTPUT "file.txt"
- CONTENT "foo-$<CONFIG>"
-)
diff --git a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
index 0337014..e79de79 100644
--- a/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/File_Configure/RunCMakeTest.cmake
@@ -1,7 +1,7 @@
include(RunCMake)
+run_cmake(AngleBracketsContent)
run_cmake(BadArg)
-run_cmake(BadArgGeneratorExpressionContent)
run_cmake(BadArgGeneratorExpressionOutput)
run_cmake(DirOutput)
run_cmake(NewLineStyle-NoArg)
diff --git a/Tests/RunCMake/separate_arguments/NativeCommand.cmake b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
index 1cb009e..0051a79 100644
--- a/Tests/RunCMake/separate_arguments/NativeCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/NativeCommand.cmake
@@ -17,3 +17,8 @@ if(NOT "${native_out}" STREQUAL "${native_exp}")
message(FATAL_ERROR "separate_arguments native-style failed. "
"Expected\n [${native_exp}]\nbut got\n [${native_out}]\n")
endif()
+
+separate_arguments(empty_out NATIVE_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments native-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/UnixCommand.cmake b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
index 0b5767a..c56cd63 100644
--- a/Tests/RunCMake/separate_arguments/UnixCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/UnixCommand.cmake
@@ -6,3 +6,8 @@ if(NOT "${unix_out}" STREQUAL "${unix_exp}")
message(FATAL_ERROR "separate_arguments unix-style failed. "
"Expected\n [${unix_exp}]\nbut got\n [${unix_out}]\n")
endif()
+
+separate_arguments(empty_out UNIX_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments unix-style failed on no arguments")
+endif()
diff --git a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
index 86aa14a..cd07494 100644
--- a/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
+++ b/Tests/RunCMake/separate_arguments/WindowsCommand.cmake
@@ -6,3 +6,8 @@ if(NOT "${windows_out}" STREQUAL "${windows_exp}")
message(FATAL_ERROR "separate_arguments windows-style failed. "
"Expected\n [${windows_exp}]\nbut got\n [${windows_out}]\n")
endif()
+
+separate_arguments(empty_out WINDOWS_COMMAND)
+if(NOT empty_out STREQUAL "")
+ message(FATAL_ERROR "separate_arguments windows-style failed on no arguments")
+endif()