summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Auxiliary/CMakeLists.txt16
-rw-r--r--Auxiliary/bash-completion/CMakeLists.txt17
-rw-r--r--Help/command/add_test.rst5
-rw-r--r--Help/command/file.rst4
-rw-r--r--Help/release/3.18.rst21
-rw-r--r--Modules/CMakeDetermineCompiler.cmake4
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
-rw-r--r--Modules/Compiler/Clang.cmake10
-rw-r--r--Modules/CompilerId/Xcode-3.pbxproj.in1
-rw-r--r--Modules/ExternalProject.cmake6
-rw-r--r--Modules/FindCURL.cmake6
-rw-r--r--Modules/FindXalanC.cmake6
-rw-r--r--Source/CMakeVersion.cmake4
-rw-r--r--Source/QtDialog/QCMakeCacheView.cxx5
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Source/cmGhsMultiTargetGenerator.cxx5
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx21
-rw-r--r--Source/cmGlobalXCodeGenerator.h2
-rw-r--r--Source/cmGraphVizWriter.cxx116
-rw-r--r--Source/cmGraphVizWriter.h36
-rw-r--r--Source/cmLocalGenerator.cxx1
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx18
-rw-r--r--Source/cmStandardLexer.h4
-rw-r--r--Source/cmTestGenerator.cxx14
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx6
-rw-r--r--Tests/QtAutogen/Tests.cmake1
-rw-r--r--Tests/QtAutogen/UnityMocSource/CMakeLists.txt12
-rw-r--r--Tests/QtAutogen/UnityMocSource/library.cpp6
-rw-r--r--Tests/QtAutogen/UnityMocSource/main.cpp4
-rw-r--r--Tests/RunCMake/AndroidTestUtilities/check.cmake2
-rw-r--r--Tests/RunCMake/CMakeLists.txt1
-rw-r--r--Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake10
-rw-r--r--Tests/RunCMake/Graphviz/default_options-check.cmake8
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication22
-rw-r--r--Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers26
-rw-r--r--Tests/RunCMake/add_test/CMakeLists.txt.in27
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument3-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument3-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsBracketArgument4-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote1-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote1-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote2-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote2-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote3-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote3-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote4-stderr.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedQuote4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsEscapedSpecialChars4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsGeneratorExpressionSyntax4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsOtherSpecialChars4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon2-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon2-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon3-stdout.txt3
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSemicolon4-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces2-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces2-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces3-stdout.txt3
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces4-result.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsSpaces4-stderr.txt2
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameContainsValidSpecialChars4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric1-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric2-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric3-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/NameIsAlphaNumeric4-stdout.txt1
-rw-r--r--Tests/RunCMake/add_test/RunCMakeTest.cmake263
-rw-r--r--Tests/RunCMake/add_test/test.cmake.in16
-rw-r--r--Tests/SetLang/CMakeLists.txt7
-rw-r--r--Tests/SetLang/stay_c.c8
-rw-r--r--Tests/SetLang/stay_cxx.cxx8
-rw-r--r--Tests/SwiftOnly/CMakeLists.txt1
-rwxr-xr-xbootstrap8
93 files changed, 399 insertions, 428 deletions
diff --git a/Auxiliary/CMakeLists.txt b/Auxiliary/CMakeLists.txt
index a833c7913..c0aebef30 100644
--- a/Auxiliary/CMakeLists.txt
+++ b/Auxiliary/CMakeLists.txt
@@ -1,4 +1,16 @@
-install(DIRECTORY vim/indent vim/syntax DESTINATION ${CMAKE_XDGDATA_DIR}/vim/vimfiles)
-install(FILES cmake-mode.el DESTINATION ${CMAKE_XDGDATA_DIR}/emacs/site-lisp)
+# Install Vim files to a typical system integration directory.
+# Packagers can set CMake_INSTALL_VIMFILES_DIR to control this.
+if(NOT CMake_INSTALL_VIMFILES_DIR)
+ set(CMake_INSTALL_VIMFILES_DIR ${CMAKE_XDGDATA_DIR}/vim/vimfiles)
+endif()
+install(DIRECTORY vim/indent vim/syntax DESTINATION ${CMake_INSTALL_VIMFILES_DIR})
+
+# Install Emacs files to a typical system integration directory.
+# Packagers can set CMake_INSTALL_EMACS_DIR to control this.
+if(NOT CMake_INSTALL_EMACS_DIR)
+ set(CMake_INSTALL_EMACS_DIR ${CMAKE_XDGDATA_DIR}/emacs/site-lisp)
+endif()
+install(FILES cmake-mode.el DESTINATION ${CMake_INSTALL_EMACS_DIR})
+
install(FILES cmake.m4 DESTINATION ${CMAKE_XDGDATA_DIR}/aclocal)
add_subdirectory (bash-completion)
diff --git a/Auxiliary/bash-completion/CMakeLists.txt b/Auxiliary/bash-completion/CMakeLists.txt
index 06d22c238..93b6ffd0e 100644
--- a/Auxiliary/bash-completion/CMakeLists.txt
+++ b/Auxiliary/bash-completion/CMakeLists.txt
@@ -6,11 +6,16 @@
# with) as well as a simple installation by a local user into their home
# directory *if* the prefix is `$HOME/.local` since `.local/share/` is part of
# the bash-completion search path too.
-# For more complex installations, packagers can set CMAKE_BASH_COMP_DIR to
-# another system location.
+# For more complex installations, packagers can set CMake_INSTALL_BASH_COMP_DIR
+# to another system location.
-set(CMAKE_BASH_COMP_DIR_DEFAULT ${CMAKE_XDGDATA_DIR}/bash-completion/completions)
-if (NOT CMAKE_BASH_COMP_DIR)
- set(CMAKE_BASH_COMP_DIR "${CMAKE_BASH_COMP_DIR_DEFAULT}")
+if(NOT CMake_INSTALL_BASH_COMP_DIR)
+ if(CMAKE_BASH_COMP_DIR)
+ # Honor previous customization option.
+ set(CMake_INSTALL_BASH_COMP_DIR "${CMAKE_BASH_COMP_DIR}")
+ else()
+ # Default.
+ set(CMake_INSTALL_BASH_COMP_DIR ${CMAKE_XDGDATA_DIR}/bash-completion/completions)
+ endif()
endif()
-install(FILES cmake cpack ctest DESTINATION ${CMAKE_BASH_COMP_DIR})
+install(FILES cmake cpack ctest DESTINATION ${CMake_INSTALL_BASH_COMP_DIR})
diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst
index c0677d2b0..a77ba37cc 100644
--- a/Help/command/add_test.rst
+++ b/Help/command/add_test.rst
@@ -10,9 +10,8 @@ Add a test to the project to be run by :manual:`ctest(1)`.
[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/command/file.rst b/Help/command/file.rst
index e7bc8d288..693c059c5 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -250,8 +250,8 @@ be resolved. See below for a full description of how they work.
List of post-exclude regexes through which to filter the names of resolved
dependencies.
-These arguments can be used to blacklist unwanted system libraries when
-resolving the dependencies, or to whitelist libraries from a specific
+These arguments can be used to exclude unwanted system libraries when
+resolving the dependencies, or to include libraries from a specific
directory. The filtering works as follows:
1. If the not-yet-resolved dependency matches any of the
diff --git a/Help/release/3.18.rst b/Help/release/3.18.rst
index 386b61b17..ba80d2b35 100644
--- a/Help/release/3.18.rst
+++ b/Help/release/3.18.rst
@@ -318,3 +318,24 @@ Other Changes
* The :manual:`cmake-file-api(7)` "codemodel" version 2 "target" object gained
a new ``precompileHeaders`` field in the ``compileGroups`` objects.
+
+Updates
+=======
+
+Changes made since CMake 3.18.0 include the following.
+
+3.18.1
+------
+
+* The :generator:`Xcode` generator, when :variable:`CMAKE_OSX_ARCHITECTURES`
+ is not defined, now selects ``$(NATIVE_ARCH_ACTUAL)`` as the default
+ 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/Modules/CMakeDetermineCompiler.cmake b/Modules/CMakeDetermineCompiler.cmake
index 7cd7c47b8..cb1ab1dbe 100644
--- a/Modules/CMakeDetermineCompiler.cmake
+++ b/Modules/CMakeDetermineCompiler.cmake
@@ -140,7 +140,9 @@ function(_cmake_find_compiler_sysroot lang)
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/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index df48fa574..44332a66a 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -469,6 +469,12 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
set(id_clang_cxx_library "CLANG_CXX_LIBRARY = \"${CMAKE_MATCH_3}\";")
endif()
endif()
+ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_SYSROOT MATCHES "^$|[Mm][Aa][Cc][Oo][Ss]")
+ # When targeting macOS, use only the host architecture.
+ set(id_archs [[ARCHS = "$(NATIVE_ARCH_ACTUAL)";]])
+ else()
+ set(id_archs "")
+ endif()
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in
${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY)
unset(_ENV_MACOSX_DEPLOYMENT_TARGET)
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index bb516d3a2..52d5350a3 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -222,11 +222,11 @@ macro(__compiler_clang_cxx_standards lang)
# can be attempted.
macro(cmake_record_${lang}_compile_features)
list(APPEND CMAKE_${lang}_COMPILE_FEATURES
- ${lang}_std_98
- ${lang}_std_11
- ${lang}_std_14
- ${lang}_std_17
- ${lang}_std_20
+ cxx_std_98
+ cxx_std_11
+ cxx_std_14
+ cxx_std_17
+ cxx_std_20
)
_record_compiler_features(${lang} "" CMAKE_${lang}_COMPILE_FEATURES)
endmacro()
diff --git a/Modules/CompilerId/Xcode-3.pbxproj.in b/Modules/CompilerId/Xcode-3.pbxproj.in
index 672044e13..6fe17e541 100644
--- a/Modules/CompilerId/Xcode-3.pbxproj.in
+++ b/Modules/CompilerId/Xcode-3.pbxproj.in
@@ -84,6 +84,7 @@
CODE_SIGNING_REQUIRED = NO;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
SYMROOT = .;
+ @id_archs@
@id_toolset@
@id_lang_version@
@id_clang_cxx_library@
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 3a47090a7..aecc00b3b 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1124,7 +1124,11 @@ function(_ep_write_gitclone_script script_filename source_dir git_EXECUTABLE git
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/FindCURL.cmake b/Modules/FindCURL.cmake
index 919babcde..be7e16ea5 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -148,16 +148,16 @@ if(CURL_FIND_COMPONENTS)
endif()
foreach(component IN LISTS CURL_FIND_COMPONENTS)
list(FIND CURL_KNOWN_PROTOCOLS ${component} _found)
- if(_found)
+ if(NOT _found EQUAL -1)
list(FIND CURL_SUPPORTED_PROTOCOLS ${component} _found)
- if(_found)
+ if(NOT _found EQUAL -1)
set(CURL_${component}_FOUND TRUE)
elseif(CURL_FIND_REQUIRED)
message(FATAL_ERROR "CURL: Required protocol ${component} is not found")
endif()
else()
list(FIND CURL_SUPPORTED_FEATURES ${component} _found)
- if(_found)
+ if(NOT _found EQUAL -1)
set(CURL_${component}_FOUND TRUE)
elseif(CURL_FIND_REQUIRED)
message(FATAL_ERROR "CURL: Required feature ${component} is not found")
diff --git a/Modules/FindXalanC.cmake b/Modules/FindXalanC.cmake
index 3adaa44d3..54783e394 100644
--- a/Modules/FindXalanC.cmake
+++ b/Modules/FindXalanC.cmake
@@ -47,9 +47,9 @@ The following cache variables may also be set:
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 63a538ccb..17b38cf0e 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 0)
+set(CMake_VERSION_PATCH 1)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
@@ -21,7 +21,7 @@ endif()
if(NOT CMake_VERSION_NO_GIT)
# If this source was exported by 'git archive', use its commit info.
- set(git_info [==[d421274e3e CMake 3.18.0]==])
+ set(git_info [==[63a65baf4c CMake 3.18.1]==])
# Otherwise, try to identify the current development source version.
if(NOT git_info MATCHES "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]?[0-9a-f]?)[0-9a-f]* "
diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx
index b1f4a8229..9b24fbdc9 100644
--- a/Source/QtDialog/QCMakeCacheView.cxx
+++ b/Source/QtDialog/QCMakeCacheView.cxx
@@ -226,8 +226,9 @@ void QCMakeCacheModel::setProperties(const QCMakePropertyList& props)
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QSet<QCMakeProperty> oldProps = this->properties().toSet();
#else
- QSet<QCMakeProperty> oldProps = QSet<QCMakeProperty>(
- this->properties().begin(), this->properties().end());
+ QCMakePropertyList const& oldPropsList = this->properties();
+ QSet<QCMakeProperty> oldProps =
+ QSet<QCMakeProperty>(oldPropsList.begin(), oldPropsList.end());
#endif
oldProps.intersect(newProps);
newProps.subtract(oldProps);
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f2011ee66..c7baf2b71 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1309,6 +1309,9 @@ void AddSwiftImplicitIncludeDirectories(
for (const cmLinkImplItem& library : libraries->Libraries) {
if (const cmGeneratorTarget* dependency = library.Target) {
+ if (dependency->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ continue;
+ }
if (cm::contains(dependency->GetAllConfigCompileLanguages(),
"Swift")) {
EvaluatedTargetPropertyEntry entry{ library, library.Backtrace };
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 358d65a8c..97580d6ec 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -550,8 +550,9 @@ void cmGhsMultiTargetGenerator::WriteSources(std::ostream& fout_proj)
*/
for (auto& sg : groupFilesList) {
std::ostream* fout;
- bool useProjectFile = cmIsOn(*this->GeneratorTarget->GetProperty(
- "GHS_NO_SOURCE_GROUP_FILE")) ||
+ cmProp noSourceGroupFile =
+ this->GeneratorTarget->GetProperty("GHS_NO_SOURCE_GROUP_FILE");
+ bool useProjectFile = (noSourceGroupFile && cmIsOn(*noSourceGroupFile)) ||
cmIsOn(this->Makefile->GetDefinition("CMAKE_GHS_NO_SOURCE_GROUP_FILE"));
if (useProjectFile || sg.empty()) {
fout = &fout_proj;
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index a5ce5d18f..f0737e80f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -12,6 +12,7 @@
#include <cm/memory>
#include <cmext/algorithm>
+#include <cmext/string_view>
#include "cmsys/RegularExpression.hxx"
@@ -271,6 +272,13 @@ std::string cmGlobalXCodeGenerator::FindXcodeBuildCommand()
return makeProgram;
}
+bool cmGlobalXCodeGenerator::SetSystemName(std::string const& s,
+ cmMakefile* mf)
+{
+ this->SystemName = s;
+ return this->cmGlobalGenerator::SetSystemName(s, mf);
+}
+
bool cmGlobalXCodeGenerator::SetGeneratorToolset(std::string const& ts,
bool build, cmMakefile* mf)
{
@@ -3111,6 +3119,14 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects(
if (archs.empty()) {
// Tell Xcode to use NATIVE_ARCH instead of ARCHS.
buildSettings->AddAttribute("ONLY_ACTIVE_ARCH", this->CreateString("YES"));
+ // When targeting macOS, use only the host architecture.
+ if (this->SystemName == "Darwin"_s &&
+ (!sysroot || !*sysroot ||
+ cmSystemTools::LowerCase(sysroot).find("macos") !=
+ std::string::npos)) {
+ buildSettings->AddAttribute("ARCHS",
+ this->CreateString("$(NATIVE_ARCH_ACTUAL)"));
+ }
} else {
// Tell Xcode to use ARCHS (ONLY_ACTIVE_ARCH defaults to NO).
buildSettings->AddAttribute("ARCHS", this->CreateString(archs));
@@ -3210,7 +3226,8 @@ void cmGlobalXCodeGenerator::ComputeArchitectures(cmMakefile* mf)
}
if (this->Architectures.empty()) {
- // With no ARCHS we use ONLY_ACTIVE_ARCH.
+ // With no ARCHS we use ONLY_ACTIVE_ARCH and possibly a
+ // platform-specific default ARCHS placeholder value.
// Look up the arch that Xcode chooses in this case.
if (const char* arch = mf->GetDefinition("CMAKE_XCODE_ARCHS")) {
this->ObjectDirArchDefault = arch;
@@ -3466,6 +3483,8 @@ void cmGlobalXCodeGenerator::OutputXCodeWorkspaceSettings(
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/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index e380f1c0f..e2d1b3a82 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -109,6 +109,7 @@ public:
bool ShouldStripResourcePath(cmMakefile*) const override;
+ bool SetSystemName(std::string const& s, cmMakefile* mf) override;
bool SetGeneratorToolset(std::string const& ts, bool build,
cmMakefile* mf) override;
void AppendFlag(std::string& flags, std::string const& flag) const;
@@ -298,6 +299,7 @@ private:
std::vector<std::string> Architectures;
std::string ObjectDirArchDefault;
std::string ObjectDirArch;
+ std::string SystemName;
std::string GeneratorToolset;
std::map<cmGeneratorTarget const*, size_t> TargetOrderIndex;
};
diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx
index 0fcda4e3e..c23156d66 100644
--- a/Source/cmGraphVizWriter.cxx
+++ b/Source/cmGraphVizWriter.cxx
@@ -67,6 +67,36 @@ const char* getShapeForTarget(const cmLinkItem& item)
return GRAPHVIZ_NODE_SHAPE_LIBRARY_UNKNOWN;
}
}
+
+struct DependeesDir
+{
+ template <typename T>
+ static const cmLinkItem& src(const T& con)
+ {
+ return con.src;
+ }
+
+ template <typename T>
+ static const cmLinkItem& dst(const T& con)
+ {
+ return con.dst;
+ }
+};
+
+struct DependersDir
+{
+ template <typename T>
+ static const cmLinkItem& src(const T& con)
+ {
+ return con.dst;
+ }
+
+ template <typename T>
+ static const cmLinkItem& dst(const T& con)
+ {
+ return con.src;
+ }
+};
}
cmGraphVizWriter::cmGraphVizWriter(std::string const& fileName,
@@ -173,18 +203,16 @@ void cmGraphVizWriter::VisitLink(cmLinkItem const& depender,
return;
}
+ // write global data directly
this->WriteConnection(this->GlobalFileStream, depender, dependee, scopeType);
if (this->GeneratePerTarget) {
- auto fileStream = PerTargetFileStreams[depender.AsStr()].get();
- this->WriteNode(*fileStream, dependee);
- this->WriteConnection(*fileStream, depender, dependee, scopeType);
+ PerTargetConnections[depender].emplace_back(depender, dependee, scopeType);
}
if (this->GenerateDependers) {
- auto fileStream = TargetDependersFileStreams[dependee.AsStr()].get();
- this->WriteNode(*fileStream, depender);
- this->WriteConnection(*fileStream, depender, dependee, scopeType);
+ TargetDependersConnections[dependee].emplace_back(dependee, depender,
+ scopeType);
}
}
@@ -288,10 +316,86 @@ void cmGraphVizWriter::Write()
}
}
+ // write global data and collect all connection data for per target graphs
for (auto const gt : sortedGeneratorTargets) {
auto item = cmLinkItem(gt, false, gt->GetBacktrace());
this->VisitItem(item);
}
+
+ if (this->GeneratePerTarget) {
+ WritePerTargetConnections<DependeesDir>(PerTargetConnections,
+ PerTargetFileStreams);
+ }
+
+ if (this->GenerateDependers) {
+ WritePerTargetConnections<DependersDir>(TargetDependersConnections,
+ TargetDependersFileStreams);
+ }
+}
+
+void cmGraphVizWriter::FindAllConnections(const ConnectionsMap& connectionMap,
+ const cmLinkItem& rootItem,
+ Connections& extendedCons,
+ std::set<cmLinkItem>& visitedItems)
+{
+ // some "targets" are not in map, e.g. linker flags as -lm or
+ // targets without dependency.
+ // in both cases we are finished with traversing the graph
+ if (connectionMap.find(rootItem) == connectionMap.cend()) {
+ return;
+ }
+
+ const Connections& origCons = connectionMap.at(rootItem);
+
+ for (const Connection& con : origCons) {
+ extendedCons.emplace_back(con);
+ const cmLinkItem& dstItem = con.dst;
+ bool const visited = visitedItems.find(dstItem) != visitedItems.cend();
+ if (!visited) {
+ visitedItems.insert(dstItem);
+ FindAllConnections(connectionMap, dstItem, extendedCons, visitedItems);
+ }
+ }
+}
+
+void cmGraphVizWriter::FindAllConnections(const ConnectionsMap& connectionMap,
+ const cmLinkItem& rootItem,
+ Connections& extendedCons)
+{
+ std::set<cmLinkItem> visitedItems = { rootItem };
+ FindAllConnections(connectionMap, rootItem, extendedCons, visitedItems);
+}
+
+template <typename DirFunc>
+void cmGraphVizWriter::WritePerTargetConnections(
+ const ConnectionsMap& connections, const FileStreamMap& streams)
+{
+ // the per target connections must be extended by indirect dependencies
+ ConnectionsMap extendedConnections;
+ for (auto const& conPerTarget : connections) {
+ const cmLinkItem& rootItem = conPerTarget.first;
+ Connections& extendedCons = extendedConnections[conPerTarget.first];
+ FindAllConnections(connections, rootItem, extendedCons);
+ }
+
+ for (auto const& conPerTarget : extendedConnections) {
+ const cmLinkItem& rootItem = conPerTarget.first;
+
+ // some of the nodes are excluded completely and are not written
+ if (this->ItemExcluded(rootItem)) {
+ continue;
+ }
+
+ const Connections& cons = conPerTarget.second;
+ auto fileStream = streams.at(rootItem.AsStr()).get();
+
+ for (const Connection& con : cons) {
+ const cmLinkItem& src = DirFunc::src(con);
+ const cmLinkItem& dst = DirFunc::dst(con);
+ this->WriteNode(*fileStream, con.dst);
+ this->WriteConnection(*fileStream, src, dst, con.scopeType);
+ }
+ }
}
void cmGraphVizWriter::WriteHeader(cmGeneratedFileStream& fs,
diff --git a/Source/cmGraphVizWriter.h b/Source/cmGraphVizWriter.h
index 578660dbb..9766068a2 100644
--- a/Source/cmGraphVizWriter.h
+++ b/Source/cmGraphVizWriter.h
@@ -7,16 +7,18 @@
#include <map>
#include <memory>
+#include <set>
#include <string>
+#include <utility>
#include <vector>
#include "cmsys/RegularExpression.hxx"
#include "cmGeneratedFileStream.h"
+#include "cmLinkItem.h"
#include "cmLinkItemGraphVisitor.h"
#include "cmStateTypes.h"
-class cmLinkItem;
class cmGlobalGenerator;
/** This class implements writing files for graphviz (dot) for graphs
@@ -47,6 +49,22 @@ private:
using FileStreamMap =
std::map<std::string, std::unique_ptr<cmGeneratedFileStream>>;
+ struct Connection
+ {
+ Connection(cmLinkItem s, cmLinkItem d, std::string scope)
+ : src(std::move(s))
+ , dst(std::move(d))
+ , scopeType(std::move(scope))
+ {
+ }
+
+ cmLinkItem src;
+ cmLinkItem dst;
+ std::string scopeType;
+ };
+ using Connections = std::vector<Connection>;
+ using ConnectionsMap = std::map<cmLinkItem, Connections>;
+
void VisitLink(cmLinkItem const& depender, cmLinkItem const& dependee,
bool isDirectLink, std::string const& scopeType = "");
@@ -66,6 +84,19 @@ private:
cmLinkItem const& dependeeTargetName,
std::string const& edgeStyle);
+ void FindAllConnections(const ConnectionsMap& connectionMap,
+ const cmLinkItem& rootItem,
+ Connections& extendedCons,
+ std::set<cmLinkItem>& visitedItems);
+
+ void FindAllConnections(const ConnectionsMap& connectionMap,
+ const cmLinkItem& rootItem,
+ Connections& extendedCons);
+
+ template <typename DirFunc>
+ void WritePerTargetConnections(const ConnectionsMap& connections,
+ const FileStreamMap& streams);
+
bool ItemExcluded(cmLinkItem const& item);
bool ItemNameFilteredOut(std::string const& itemName);
bool TargetTypeEnabled(cmStateEnums::TargetType targetType) const;
@@ -83,6 +114,9 @@ private:
FileStreamMap PerTargetFileStreams;
FileStreamMap TargetDependersFileStreams;
+ ConnectionsMap PerTargetConnections;
+ ConnectionsMap TargetDependersConnections;
+
std::string GraphName;
std::string GraphHeader;
std::string GraphNodePrefix;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 3b3f110dc..e26dc94e6 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2848,7 +2848,6 @@ inline void RegisterUnitySources(cmGeneratorTarget* target, cmSourceFile* sf,
{
target->AddSourceFileToUnityBatch(sf->ResolveFullPath());
sf->SetProperty("UNITY_SOURCE_FILE", filename.c_str());
- sf->SetProperty("SKIP_AUTOGEN", "ON");
}
inline void IncludeFileInUnitySources(cmGeneratedFileStream& unity_file,
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b92548fd3..0f01f85c7 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -733,8 +733,13 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement(
static_cast<int>(cmSystemTools::CalculateCommandLineLengthLimit()) -
globalGen->GetRuleCmdLength(this->LanguageLinkerDeviceRule(config));
- build.RspFile = this->ConvertToNinjaPath(std::string("CMakeFiles/") +
- genTarget->GetName() + ".rsp");
+ std::string path = localGen.GetHomeRelativeOutputPath();
+ if (!path.empty()) {
+ path += '/';
+ }
+ build.RspFile = this->ConvertToNinjaPath(
+ cmStrCat(path, "CMakeFiles/", genTarget->GetName(),
+ globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
// Gather order-only dependencies.
this->GetLocalGenerator()->AppendTargetDepends(
@@ -1154,8 +1159,13 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement(
globalGen->GetRuleCmdLength(linkBuild.Rule);
}
- linkBuild.RspFile = this->ConvertToNinjaPath(std::string("CMakeFiles/") +
- gt->GetName() + ".rsp");
+ std::string path = localGen.GetHomeRelativeOutputPath();
+ if (!path.empty()) {
+ path += '/';
+ }
+ linkBuild.RspFile = this->ConvertToNinjaPath(
+ cmStrCat(path, "CMakeFiles/", gt->GetName(),
+ globalGen->IsMultiConfig() ? cmStrCat('.', config) : "", ".rsp"));
// Gather order-only dependencies.
this->GetLocalGenerator()->AppendTargetDepends(gt, linkBuild.OrderOnlyDeps,
diff --git a/Source/cmStandardLexer.h b/Source/cmStandardLexer.h
index cc67ac20e..e0b21165e 100644
--- a/Source/cmStandardLexer.h
+++ b/Source/cmStandardLexer.h
@@ -3,6 +3,10 @@
#ifndef cmStandardLexer_h
#define cmStandardLexer_h
+#if defined(__linux)
+/* Needed for glibc < 2.12 */
+# define _XOPEN_SOURCE 600
+#endif
#if !defined(_WIN32) && !defined(__sun)
/* POSIX APIs are needed */
# define _POSIX_C_SOURCE 200809L
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx
index e10a8e207..af9117717 100644
--- a/Source/cmTestGenerator.cxx
+++ b/Source/cmTestGenerator.cxx
@@ -77,7 +77,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
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 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os,
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::GenerateScriptForConfig(std::ostream& os,
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 @@ void cmTestGenerator::GenerateOldStyle(std::ostream& fout, Indent indent)
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 a3ccd2bae..a8e424d60 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2884,6 +2884,12 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
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;
}
diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake
index a19a9aeec..dfa5ea0c1 100644
--- a/Tests/QtAutogen/Tests.cmake
+++ b/Tests/QtAutogen/Tests.cmake
@@ -29,6 +29,7 @@ ADD_AUTOGEN_TEST(UicInterface QtAutoUicInterface)
ADD_AUTOGEN_TEST(UicNoGui uicNoGui)
ADD_AUTOGEN_TEST(UicOnly uicOnly)
ADD_AUTOGEN_TEST(UicSkipSource)
+ADD_AUTOGEN_TEST(UnityMocSource)
if(QT_TEST_ALLOW_QT_MACROS)
ADD_AUTOGEN_TEST(MocCMP0071)
diff --git a/Tests/QtAutogen/UnityMocSource/CMakeLists.txt b/Tests/QtAutogen/UnityMocSource/CMakeLists.txt
new file mode 100644
index 000000000..d47231930
--- /dev/null
+++ b/Tests/QtAutogen/UnityMocSource/CMakeLists.txt
@@ -0,0 +1,12 @@
+cmake_minimum_required(VERSION 3.16)
+project(UnityMocSource)
+include("../AutogenGuiTest.cmake")
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_UNITY_BUILD ON)
+
+add_library(library library.cpp)
+target_link_libraries(library ${QT_LIBRARIES})
+
+add_executable(unityMocSource main.cpp)
+target_link_libraries(unityMocSource PRIVATE library)
diff --git a/Tests/QtAutogen/UnityMocSource/library.cpp b/Tests/QtAutogen/UnityMocSource/library.cpp
new file mode 100644
index 000000000..1e30d4b0a
--- /dev/null
+++ b/Tests/QtAutogen/UnityMocSource/library.cpp
@@ -0,0 +1,6 @@
+#include <QObject>
+class Test : public QObject
+{
+ Q_OBJECT
+};
+#include "library.moc"
diff --git a/Tests/QtAutogen/UnityMocSource/main.cpp b/Tests/QtAutogen/UnityMocSource/main.cpp
new file mode 100644
index 000000000..f8b643afb
--- /dev/null
+++ b/Tests/QtAutogen/UnityMocSource/main.cpp
@@ -0,0 +1,4 @@
+int main()
+{
+ return 0;
+}
diff --git a/Tests/RunCMake/AndroidTestUtilities/check.cmake b/Tests/RunCMake/AndroidTestUtilities/check.cmake
index c24a3cd6f..ccd4d74dd 100644
--- a/Tests/RunCMake/AndroidTestUtilities/check.cmake
+++ b/Tests/RunCMake/AndroidTestUtilities/check.cmake
@@ -13,7 +13,7 @@ function(compare_build_to_expected)
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 36409d813..10e66c31b 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -287,7 +287,6 @@ add_RunCMake_test(add_dependencies)
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 3cbbc070e..588b77b37 100644
--- a/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
+++ b/Tests/RunCMake/CrosscompilingEmulator/AddTest-check.cmake
@@ -7,22 +7,22 @@ endif()
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/Graphviz/default_options-check.cmake b/Tests/RunCMake/Graphviz/default_options-check.cmake
index c9a7562ae..584e27608 100644
--- a/Tests/RunCMake/Graphviz/default_options-check.cmake
+++ b/Tests/RunCMake/Graphviz/default_options-check.cmake
@@ -3,3 +3,11 @@ include(RunCMake)
ensure_files_match(
${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_default_options.dot
${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot)
+
+ensure_files_match(
+ ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
+ ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot.GraphicApplication)
+
+ensure_files_match(
+ ${RunCMake_TEST_SOURCE_DIR}/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
+ ${RunCMake_TEST_BINARY_DIR}/generated_dependency_graph.dot.CompilerFlags.dependers)
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
new file mode 100644
index 000000000..6893fd19e
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependencies.dot.GraphicApplication
@@ -0,0 +1,22 @@
+digraph "GraphicApplication" {
+node [
+ fontsize = "12"
+];
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node0" [ label = "CompilerFlags", shape = pentagon ];
+ "node2" -> "node0" // CoreLibrary -> CompilerFlags
+ "node3" [ label = "GoofyLoggingLibrary\n(SeriousLoggingLibrary)\n(TheBestLoggingLibrary)", shape = pentagon ];
+ "node2" -> "node3" [ style = dotted ] // CoreLibrary -> GoofyLoggingLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node7" [ label = "\"-lm\"", shape = septagon ];
+ "node6" -> "node7" [ style = dotted ] // GraphicLibrary -> "-lm"
+ "node0" [ label = "CompilerFlags", shape = pentagon ];
+ "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node8" [ label = "GraphicLibraryObjects", shape = hexagon ];
+ "node6" -> "node8" [ style = dotted ] // GraphicLibrary -> GraphicLibraryObjects
+}
diff --git a/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
new file mode 100644
index 000000000..3352b1ad5
--- /dev/null
+++ b/Tests/RunCMake/Graphviz/expected_outputs/dependency_graph_target_dependers.dot.CompilerFlags.dependers
@@ -0,0 +1,26 @@
+digraph "CompilerFlags" {
+node [
+ fontsize = "12"
+];
+ "node0" [ label = "CompilerFlags", shape = pentagon ];
+ "node2" [ label = "CoreLibrary", shape = octagon ];
+ "node2" -> "node0" // CoreLibrary -> CompilerFlags
+ "node1" [ label = "ConsoleApplication", shape = egg ];
+ "node1" -> "node2" [ style = dotted ] // ConsoleApplication -> CoreLibrary
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node5" -> "node2" [ style = dotted ] // GraphicApplication -> CoreLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node2" [ style = dotted ] // GraphicLibrary -> CoreLibrary
+ "node5" [ label = "GraphicApplication", shape = egg ];
+ "node5" -> "node6" [ style = dotted ] // GraphicApplication -> GraphicLibrary
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node2" [ style = dotted ] // GraphicDriverOpenGL -> CoreLibrary
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node2" [ style = dotted ] // GraphicDriverVulkan -> CoreLibrary
+ "node6" [ label = "GraphicLibrary", shape = doubleoctagon ];
+ "node6" -> "node0" // GraphicLibrary -> CompilerFlags
+ "node9" [ label = "GraphicDriverOpenGL", shape = tripleoctagon ];
+ "node9" -> "node0" [ style = dotted ] // GraphicDriverOpenGL -> CompilerFlags
+ "node10" [ label = "GraphicDriverVulkan", shape = tripleoctagon ];
+ "node10" -> "node0" [ style = dotted ] // GraphicDriverVulkan -> CompilerFlags
+}
diff --git a/Tests/RunCMake/add_test/CMakeLists.txt.in b/Tests/RunCMake/add_test/CMakeLists.txt.in
deleted file mode 100644
index 495240d44..000000000
--- 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 00865d013..000000000
--- 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 a744beb19..000000000
--- 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 b57e2deb7..000000000
--- 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 32c2112f8..000000000
--- 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 b57e2deb7..000000000
--- 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 32c2112f8..000000000
--- 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 b57e2deb7..000000000
--- 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 066194508..000000000
--- 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 4875409a8..000000000
--- 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 b57e2deb7..000000000
--- 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 066194508..000000000
--- 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 4875409a8..000000000
--- 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 b57e2deb7..000000000
--- 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 066194508..000000000
--- 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 4875409a8..000000000
--- 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 b57e2deb7..000000000
--- 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 066194508..000000000
--- 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 4875409a8..000000000
--- 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 80435b619..000000000
--- 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 80435b619..000000000
--- 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 80435b619..000000000
--- 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 80435b619..000000000
--- 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 172ff9933..000000000
--- 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 172ff9933..000000000
--- 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 172ff9933..000000000
--- 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 172ff9933..000000000
--- 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 83e3f8634..000000000
--- 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 83e3f8634..000000000
--- 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 83e3f8634..000000000
--- 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 83e3f8634..000000000
--- 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 0fbf486ae..000000000
--- 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 b57e2deb7..000000000
--- 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 32c2112f8..000000000
--- 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 c5ab1d8d1..000000000
--- 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 b57e2deb7..000000000
--- 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 32c2112f8..000000000
--- 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 a255fb1ab..000000000
--- 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 b57e2deb7..000000000
--- 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 32c2112f8..000000000
--- 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 3d42b0b2a..000000000
--- 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 b57e2deb7..000000000
--- 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 32c2112f8..000000000
--- 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 ae1a0b112..000000000
--- 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 ae1a0b112..000000000
--- 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 ae1a0b112..000000000
--- 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 ae1a0b112..000000000
--- 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 ed939bf40..000000000
--- 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 ed939bf40..000000000
--- 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 ed939bf40..000000000
--- 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 ed939bf40..000000000
--- 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 6e9edda81..000000000
--- 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 9821c1cae..000000000
--- 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 f24e5cb5d..9de4fc61d 100644
--- a/Tests/SetLang/CMakeLists.txt
+++ b/Tests/SetLang/CMakeLists.txt
@@ -8,3 +8,10 @@ add_executable(SetLang bar.c)
set_source_files_properties(foo.c bar.c PROPERTIES LANGUAGE CXX)
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()
diff --git a/Tests/SetLang/stay_c.c b/Tests/SetLang/stay_c.c
new file mode 100644
index 000000000..70755f315
--- /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 000000000..e0352604d
--- /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/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt
index e24279b5b..41d14eae8 100644
--- a/Tests/SwiftOnly/CMakeLists.txt
+++ b/Tests/SwiftOnly/CMakeLists.txt
@@ -35,3 +35,4 @@ target_link_libraries(N PUBLIC
# Dummy to make sure generation works with such targets.
add_library(SwiftIface INTERFACE)
+target_link_libraries(SwiftOnly PRIVATE SwiftIface)
diff --git a/bootstrap b/bootstrap
index fe7b2ad51..04067dc7a 100755
--- a/bootstrap
+++ b/bootstrap
@@ -622,6 +622,8 @@ Configuration:
--no-system-bzip2 use cmake-provided bzip2 library (default)
--system-liblzma use system-installed liblzma library
--no-system-liblzma use cmake-provided liblzma library (default)
+ --system-nghttp2 use system-installed nghttp2 library
+ --no-system-nghttp2 use cmake-provided nghttp2 library (default)
--system-zstd use system-installed zstd library
--no-system-zstd use cmake-provided zstd library (default)
--system-libarchive use system-installed libarchive library
@@ -866,10 +868,10 @@ while test $# != 0; do
--init=*) cmake_init_file=`cmake_arg "$1"` ;;
--system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=1" ;;
--no-system-libs) cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARIES=0" ;;
- --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-zstd|--system-libuv)
+ --system-bzip2|--system-curl|--system-expat|--system-jsoncpp|--system-libarchive|--system-librhash|--system-zlib|--system-liblzma|--system-nghttp2|--system-zstd|--system-libuv)
lib=`cmake_arg "$1" "--system-"`
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=1" ;;
- --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-zstd|--no-system-libuv)
+ --no-system-bzip2|--no-system-curl|--no-system-expat|--no-system-jsoncpp|--no-system-libarchive|--no-system-librhash|--no-system-zlib|--no-system-liblzma|--no-system-nghttp2|--no-system-zstd|--no-system-libuv)
lib=`cmake_arg "$1" "--no-system-"`
cmake_bootstrap_system_libs="${cmake_bootstrap_system_libs} -DCMAKE_USE_SYSTEM_LIBRARY_`cmake_toupper $lib`=0" ;;
--qt-gui) cmake_bootstrap_qt_gui="1" ;;
@@ -1179,7 +1181,7 @@ int check_cxx14()
}
#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>