Imported Upstream version 3.21.1 upstream/3.21.1
authorDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:21:01 +0000 (09:21 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Fri, 8 Oct 2021 00:21:01 +0000 (09:21 +0900)
116 files changed:
CMakeLists.txt
Help/command/add_custom_command.rst
Help/command/ctest_memcheck.rst
Help/command/ctest_test.rst
Help/command/file.rst
Help/command/target_link_libraries.rst
Help/generator/Visual Studio 17 2022.rst
Help/manual/cmake-variables.7.rst
Help/manual/ctest.1.rst
Help/policy/CMP0077.rst
Help/policy/CMP0124.rst
Help/policy/CMP0125.rst
Help/policy/CMP0126.rst
Help/release/3.21.rst
Help/variable/CMAKE_EXECUTABLE_SUFFIX.rst
Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst [new file with mode: 0644]
Help/variable/CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE.rst
Help/variable/CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE.rst
Help/variable/MSVC_VERSION.rst
Help/variable/PROJECT_IS_TOP_LEVEL.rst
Modules/CMakeCSharpCompilerId.cs.in
Modules/CMakeDependentOption.cmake
Modules/CMakeDetermineCompilerId.cmake
Modules/CMakeFindBinUtils.cmake
Modules/CMakeTestCCompiler.cmake
Modules/CMakeTestCSharpCompiler.cmake
Modules/CMakeTestCUDACompiler.cmake
Modules/CMakeTestCXXCompiler.cmake
Modules/CMakeTestFortranCompiler.cmake
Modules/CMakeTestHIPCompiler.cmake
Modules/CMakeTestOBJCCompiler.cmake
Modules/CMakeTestOBJCXXCompiler.cmake
Modules/CMakeTestSwiftCompiler.cmake
Modules/Compiler/GNU-C.cmake
Modules/Compiler/IAR-FindBinUtils.cmake [deleted file]
Modules/Compiler/IAR.cmake
Modules/FindXCTest.cmake
Source/CMakeLists.txt
Source/CMakeVersion.cmake
Source/cmCMakePresetsFile.cxx
Source/cmCoreTryCompile.cxx
Source/cmGeneratorExpressionNode.cxx
Source/cmGlobalVisualStudioVersionedGenerator.cxx
Source/cmQtAutoGen.cxx
Source/cmQtAutoGen.h
Source/cmQtAutoGenInitializer.cxx
Source/cmQtAutoGenInitializer.h
Source/cmQtAutoGenerator.cxx
Source/cmQtAutoGenerator.h
Source/cmQtAutoMocUic.cxx
Source/cmQtAutoUicHelpers.cxx [new file with mode: 0644]
Source/cmQtAutoUicHelpers.h [new file with mode: 0644]
Source/cmakemain.cxx
Source/kwsys/CMakeLists.txt
Source/kwsys/SystemTools.cxx
Templates/MSBuild/FlagTables/v142_CL.json
Templates/MSBuild/FlagTables/v143_CL.json [new file with mode: 0644]
Templates/MSBuild/FlagTables/v143_CSharp.json [new file with mode: 0644]
Templates/MSBuild/FlagTables/v143_Link.json [new file with mode: 0644]
Templates/TestDriver.cxx.in
Tests/CSharpOnly/CMakeLists.txt
Tests/CompileOptions/CMakeLists.txt
Tests/QtAutogen/RerunUicOnFileChange/CMakeLists.txt
Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/CMakeLists.txt.in
Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/main.cpp
Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in [new file with mode: 0644]
Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp [new file with mode: 0644]
Tests/RunCMake/CMakeDependentOption/Parentheses.cmake [deleted file]
Tests/RunCMake/CMakeDependentOption/Regex-stdout.txt [moved from Tests/RunCMake/CMakeDependentOption/Parentheses-stdout.txt with 100% similarity]
Tests/RunCMake/CMakeDependentOption/Regex.cmake [new file with mode: 0644]
Tests/RunCMake/CMakeDependentOption/RunCMakeTest.cmake
Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake [new file with mode: 0644]
Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in [new file with mode: 0644]
Tests/RunCMake/CMakePresets/RunCMakeTest.cmake
Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-all-subdir-build-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-all-top-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake [new file with mode: 0644]
Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-top-build-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-debug-subdir-build-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-all-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-minsizerel-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-default-build-file-clean-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-minsizerel-top-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple-release-in-minsizerel-graph-subdir-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/Simple.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-all-in-release-graph-build-check.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleCrossConfigs-all-relwithdebinfo-in-release-graph-build-check.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAlias-all-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-configs-build-check.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-all-relwithdebinfo-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleDefaultBuildAliasList-clean-configs-ninja-check.cmake
Tests/RunCMake/NinjaMultiConfig/SimpleSubdir/CMakeLists.txt
Tests/RunCMake/NinjaMultiConfig/empty_dbg.c [new file with mode: 0644]
Tests/RunCMake/NinjaMultiConfig/empty_rel.c [new file with mode: 0644]
Tests/RunCMake/ObjectLibrary/OwnSources-stderr.txt
Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake [new file with mode: 0644]
Tests/RunCMake/ToolchainFile/RunCMakeTest.cmake
Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake
Tests/RunCMake/XcodeProject/dummy_main.swift [new file with mode: 0644]
Tests/RunCMake/message/RunCMakeTest.cmake
Tests/RunCMake/message/newline-script.cmake [new file with mode: 0644]
Tests/RunCMake/message/newline-stdout.txt [new file with mode: 0644]
Tests/RunCMake/message/newline.cmake [new file with mode: 0644]
Tests/SwiftOnly/CMakeLists.txt
Utilities/cmlibuv/src/win/atomicops-inl.h

index 44b433a..9944ea4 100644 (file)
@@ -361,6 +361,9 @@ macro (CMAKE_BUILD_UTILITIES)
   if(CMake_NO_CXX_STANDARD)
     set(KWSYS_CXX_STANDARD "")
   endif()
+  if(CMake_NO_SELF_BACKTRACE)
+    set(KWSYS_NO_EXECINFO 1)
+  endif()
   if(WIN32)
     # FIXME: Teach KWSys to hard-code these checks on Windows.
     set(KWSYS_C_HAS_CLOCK_GETTIME_MONOTONIC_COMPILED 0)
index d881a66..b45a079 100644 (file)
@@ -271,35 +271,40 @@ The options are:
 ``DEPFILE``
   .. versionadded:: 3.7
 
-  Specify a ``.d`` depfile for the :generator:`Ninja`, :generator:`Xcode` and
-  :ref:`Makefile <Makefile Generators>` generators. The depfile may use
-  "generator expressions" with the syntax ``$<...>``. See the
-  :manual:`generator-expressions(7) <cmake-generator-expressions(7)>` manual
-  for available expressions. A ``.d`` file holds dependencies usually emitted
-  by the custom command itself.
+  Specify a ``.d`` depfile which holds dependencies for the custom command.
+  It is usually emitted by the custom command itself.  This keyword may only
+  be used if the generator supports it, as detailed below.
 
-  Using ``DEPFILE`` with other generators than :generator:`Ninja`,
-  :generator:`Xcode` or :ref:`Makefile <Makefile Generators>` is an error.
+  .. versionadded:: 3.7
+    The :generator:`Ninja` generator supports ``DEPFILE`` since the keyword
+    was first added.
+
+  .. versionadded:: 3.17
+    Added the :generator:`Ninja Multi-Config` generator, which included
+    support for the ``DEPFILE`` keyword.
 
   .. versionadded:: 3.20
     Added support for :ref:`Makefile Generators`.
 
+    .. note::
+
+      ``DEPFILE`` cannot be specified at the same time as the
+      ``IMPLICIT_DEPENDS`` option for :ref:`Makefile Generators`.
+
   .. versionadded:: 3.21
     Added support for :ref:`Visual Studio Generators` with VS 2012 and above,
-    for the :generator:`Xcode` generator, and for
-    :manual:`generator expressions <cmake-generator-expressions(7)>`.
+    and for the :generator:`Xcode` generator.  Support for
+    :manual:`generator expressions <cmake-generator-expressions(7)>` was also
+    added.
+
+  Using ``DEPFILE`` with generators other than those listed above is an error.
 
   If the ``DEPFILE`` argument is relative, it should be relative to
   :variable:`CMAKE_CURRENT_BINARY_DIR`, and any relative paths inside the
-  ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`
-  (see policy :policy:`CMP0116`. This policy is always ``NEW`` for
+  ``DEPFILE`` should also be relative to :variable:`CMAKE_CURRENT_BINARY_DIR`.
+  See policy :policy:`CMP0116`, which is always ``NEW`` for
   :ref:`Makefile Generators`, :ref:`Visual Studio Generators`,
-  and the :generator:`Xcode` generator).
-
-  .. note::
-
-    For :ref:`Makefile Generators`, this option cannot be specified at the
-    same time as ``IMPLICIT_DEPENDS`` option.
+  and the :generator:`Xcode` generator.
 
 Examples: Generating Files
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
index f655c2e..8b79077 100644 (file)
@@ -17,10 +17,15 @@ Perform the :ref:`CTest MemCheck Step` as a :ref:`Dashboard Client`.
                  [EXCLUDE_FIXTURE_SETUP <regex>]
                  [EXCLUDE_FIXTURE_CLEANUP <regex>]
                  [PARALLEL_LEVEL <level>]
+                 [RESOURCE_SPEC_FILE <file>]
                  [TEST_LOAD <threshold>]
                  [SCHEDULE_RANDOM <ON|OFF>]
+                 [STOP_ON_FAILURE]
                  [STOP_TIME <time-of-day>]
                  [RETURN_VALUE <result-var>]
+                 [CAPTURE_CMAKE_ERROR <result-var>]
+                 [REPEAT <mode>:<n>]
+                 [OUTPUT_JUNIT <file>]
                  [DEFECT_COUNT <defect-count-var>]
                  [QUIET]
                  )
index 2153c90..89787d1 100644 (file)
@@ -29,6 +29,10 @@ Perform the :ref:`CTest Test Step` as a :ref:`Dashboard Client`.
              [QUIET]
              )
 
+..
+   _note: If updating the argument list here, please also update the argument
+   list documentation for :command:`ctest_memcheck` as well.
+
 Run tests in the project build tree and store results in
 ``Test.xml`` for submission with the :command:`ctest_submit` command.
 
@@ -151,12 +155,12 @@ The options are:
   Store in the ``<result-var>`` variable -1 if there are any errors running
   the command and prevent ctest from returning non-zero if an error occurs.
 
-``OUTPUT_JUNIT``
+``OUTPUT_JUNIT <file>``
   .. versionadded:: 3.21
 
   Write test results to ``<file>`` in JUnit XML format. If ``<file>`` is a
-  relative path it will be placed in the build directory. If ``<file>>``
-  already exists it will be overwritten. Note that the resulting JUnit XML
+  relative path, it will be placed in the build directory. If ``<file>``
+  already exists, it will be overwritten. Note that the resulting JUnit XML
   file is **not** uploaded to CDash because it would be redundant with
   CTest's ``Test.xml`` file.
 
index 943bf7c..f038871 100644 (file)
@@ -38,10 +38,10 @@ Synopsis
 
   `Filesystem`_
     file({`GLOB`_ | `GLOB_RECURSE`_} <out-var> [...] [<globbing-expr>...])
+    file(`MAKE_DIRECTORY`_ [<dir>...])
+    file({`REMOVE`_ | `REMOVE_RECURSE`_ } [<files>...])
     file(`RENAME`_ <oldname> <newname> [...])
     file(`COPY_FILE`_ <oldname> <newname> [...])
-    file({`REMOVE`_ | `REMOVE_RECURSE`_ } [<files>...])
-    file(`MAKE_DIRECTORY`_ [<dir>...])
     file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...])
     file(`SIZE`_ <filename> <out-var>)
     file(`READ_SYMLINK`_ <linkname> <out-var>)
@@ -691,6 +691,32 @@ Examples of recursive globbing include::
 
   /dir/*.py  - match all python files in /dir and subdirectories
 
+.. _MAKE_DIRECTORY:
+
+.. code-block:: cmake
+
+  file(MAKE_DIRECTORY [<directories>...])
+
+Create the given directories and their parents as needed.
+
+.. _REMOVE:
+.. _REMOVE_RECURSE:
+
+.. code-block:: cmake
+
+  file(REMOVE [<files>...])
+  file(REMOVE_RECURSE [<files>...])
+
+Remove the given files.  The ``REMOVE_RECURSE`` mode will remove the given
+files and directories, also non-empty directories. No error is emitted if a
+given file does not exist.  Relative input paths are evaluated with respect
+to the current source directory.
+
+.. versionchanged:: 3.15
+  Empty input paths are ignored with a warning.  Previous versions of CMake
+  interpreted empty strings as a relative path with respect to the current
+  directory and removed its contents.
+
 .. _RENAME:
 
 .. code-block:: cmake
@@ -725,6 +751,8 @@ The options are:
        [RESULT <result>]
        [ONLY_IF_DIFFERENT])
 
+.. versionadded:: 3.21
+
 Copy a file from ``<oldname>`` to ``<newname>``. Directories are not
 supported. Symlinks are ignored and ``<oldfile>``'s content is read and
 written to ``<newname>`` as a new file.
@@ -736,34 +764,17 @@ The options are:
   If ``RESULT`` is not specified and the operation fails, an error is emitted.
 
 ``ONLY_IF_DIFFERENT``
-  If the ``<newname>`` path already exists, do not replace it if it is the
-  same as ``<oldname>``. Otherwise, an error is emitted.
-
-.. _REMOVE:
-.. _REMOVE_RECURSE:
-
-.. code-block:: cmake
-
-  file(REMOVE [<files>...])
-  file(REMOVE_RECURSE [<files>...])
-
-Remove the given files.  The ``REMOVE_RECURSE`` mode will remove the given
-files and directories, also non-empty directories. No error is emitted if a
-given file does not exist.  Relative input paths are evaluated with respect
-to the current source directory.
-
-.. versionchanged:: 3.15
-  Empty input paths are ignored with a warning.  Previous versions of CMake
-  interpreted empty string as a relative path with respect to the current
-  directory and removed its contents.
-
-.. _MAKE_DIRECTORY:
+  If the ``<newname>`` path already exists, do not replace it if the file's
+  contents are already the same as ``<oldname>`` (this avoids updating
+  ``<newname>``'s timestamp).
 
-.. code-block:: cmake
-
-  file(MAKE_DIRECTORY [<directories>...])
+This sub-command has some similarities to :command:`configure_file` with the
+``COPYONLY`` option.  An important difference is that :command:`configure_file`
+creates a dependency on the source file, so CMake will be re-run if it changes.
+The ``file(COPY_FILE)`` sub-command does not create such a dependency.
 
-Create the given directories and their parents as needed.
+See also the ``file(COPY)`` sub-command just below which provides
+further file-copying capabilities.
 
 .. _COPY:
 .. _INSTALL:
@@ -779,6 +790,11 @@ Create the given directories and their parents as needed.
        [[PATTERN <pattern> | REGEX <regex>]
         [EXCLUDE] [PERMISSIONS <permissions>...]] [...])
 
+.. note::
+
+  For a simple file copying operation, the ``file(COPY_FILE)`` sub-command
+  just above may be easier to use.
+
 The ``COPY`` signature copies files, directories, and symlinks to a
 destination folder.  Relative input paths are evaluated with respect
 to the current source directory, and a relative destination is
index ac231bc..c85094a 100644 (file)
@@ -300,7 +300,7 @@ The object files associated with an object library may be referenced
 by the :genex:`$<TARGET_OBJECTS>` generator expression.  Such object
 files are placed on the link line *before* all libraries, regardless
 of their relative order.  Additionally, an ordering dependency will be
-added to the build sysstem to make sure the object library is up-to-date
+added to the build system to make sure the object library is up-to-date
 before the dependent target links.  For example, the code
 
 .. code-block:: cmake
index 06deda4..6007365 100644 (file)
@@ -7,7 +7,7 @@ Generates Visual Studio 17 (VS 2022) project files.
 
 .. warning::
 
-  This is experimental and based on "Visual Studio 2022 Preview 1.1".
+  This is experimental and based on "Visual Studio 2022 Preview 2".
   As of this version of CMake, VS 2022 has not been released.
 
 Project Types
@@ -51,7 +51,7 @@ name (architecture).  For example:
 Toolset Selection
 ^^^^^^^^^^^^^^^^^
 
-The ``v142`` toolset that comes with VS 17 2022 Preview 1.1 is selected by
+The ``v143`` toolset that comes with VS 17 2022 Preview 2 is selected by
 default.  The :variable:`CMAKE_GENERATOR_TOOLSET` option may be set, perhaps
 via the :manual:`cmake(1)` ``-T`` option, to specify another toolset.
 
index 39fbbed..9cea0fb 100644 (file)
@@ -53,6 +53,7 @@ Variables that Provide Information
    /variable/CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
    /variable/CMAKE_EDIT_COMMAND
    /variable/CMAKE_EXECUTABLE_SUFFIX
+   /variable/CMAKE_EXECUTABLE_SUFFIX_LANG
    /variable/CMAKE_EXTRA_GENERATOR
    /variable/CMAKE_EXTRA_SHARED_LIBRARY_SUFFIXES
    /variable/CMAKE_FIND_DEBUG_MODE
index ab819f9..03d8bf6 100644 (file)
@@ -137,8 +137,10 @@ Options
 ``--output-junit <file>``
  Write test results in JUnit format.
 
- This option tells CTest to write test results to a ``<file>`` JUnit XML file.
- If ``<file>`` already exists it will be overwritten.
+ This option tells CTest to write test results to ``<file>`` in JUnit XML
+ format. If ``<file>`` already exists, it will be overwritten. If using the
+ ``-S`` option to run a dashboard script, use the ``OUTPUT_JUNIT`` keyword
+ with the :command:`ctest_test` command instead.
 
 ``-N,--show-only[=<format>]``
  Disable actual execution of tests.
index 174cde9..d8744a9 100644 (file)
@@ -46,6 +46,10 @@ name:
   variable of the same name exists.  The normal variable is not removed.
   The cache entry is not created or updated and is ignored if it exists.
 
+See :policy:`CMP0126` for a similar policy for the :command:`set(CACHE)`
+command, but note that there are some differences in ``NEW`` behavior
+between the two policies.
+
 This policy was introduced in CMake version 3.13.  CMake version
 |release| warns when the policy is not set and uses ``OLD`` behavior.
 Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
index 88d03e3..3935166 100644 (file)
@@ -3,14 +3,12 @@ CMP0124
 
 .. versionadded:: 3.21
 
-The loop variables created by :command:`foreach` command have now their scope
-restricted to the loop scope.
+When this policy is set to ``NEW``, the scope of loop variables defined by the
+:command:`foreach` command is restricted to the loop only.  They will be unset
+at the end of the loop.
 
-Starting with CMake 3.21, the :command:`foreach` command ensures that the loop
-variables have their scope restricted to the loop scope.
-
-The ``OLD`` behavior for this policy let the loop variables to exist, with an
-empty value, in the outer scope of loop scope.
+The ``OLD`` behavior for this policy still clears the loop variables at the end
+of the loop, but does not unset them.  This leaves them as defined, but empty.
 
 This policy was introduced in CMake version 3.21. Use the
 :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
index 19571dc..0b1704e 100644 (file)
@@ -4,18 +4,35 @@ CMP0125
 .. versionadded:: 3.21
 
 The :command:`find_file`, :command:`find_path`, :command:`find_library` and
-:command:`find_program` commands handle cache variables in the same way
-regardless of whether they are defined on the command line, with or without a
-type, or using the :command:`set` command.
-
-Starting with CMake 3.21, the :command:`find_file`, :command:`find_path`,
-:command:`find_library`, and :command:`find_program` commands ensure that the
-cache variables will be used in the same way regardless how they were defined
-and the result will be always successful if the searched artifact exists.
-
-The ``OLD`` behavior for this policy is to have the find commands' behaviors
-differ depending on how the cache variable is defined. The ``NEW`` behavior for
-this policy is to have consistent behavior.
+:command:`find_program` commands cache their result in the variable specified
+by their first argument.  Prior to CMake 3.21, if a cache variable of that
+name already existed before the call but the cache variable had no type, any
+non-cache variable of the same name would be discarded and the cache variable
+was always used (see also :policy:`CMP0126` for a different but similar
+behavior).  This contradicts the convention that a non-cache variable should
+take precedence over a cache variable of the same name.  Such a situation can
+arise if a user sets a cache variable on the command line without specifying
+a type, such as ``cmake -DMYVAR=blah ...`` instead of
+``cmake -DMYVAR:FILEPATH=blah``.
+
+Related to the above, if a cache variable of the specified name already exists
+and it *does* have a type, the various ``find_...()`` commands would return
+that value unchanged.  In particular, if it contained a relative path, it
+would not be converted to an absolute path in this situation.
+
+When policy ``CMP0125`` is set to ``OLD`` or is unset, the behavior is as
+described above.  When it is set to ``NEW``, the behavior is as follows:
+
+* If a non-cache variable of the specified name exists when the ``find_...()``
+  command is called, its value will be used regardless of whether a cache
+  variable of the same name already exists or not.  A cache variable will not
+  be created in this case if no such cache variable existed before.
+  If a cache variable of the specified name did already exist, the cache will
+  be updated to match the non-cache variable.
+
+* The various ``find...()`` commands will always provide an absolute path in
+  the result variable, except where a relative path provided by a cache or
+  non-cache variable cannot be resolved to an existing path.
 
 This policy was introduced in CMake version 3.21. Use the
 :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
index 0ced8fa..ba027b3 100644 (file)
@@ -3,16 +3,25 @@ CMP0126
 
 .. versionadded:: 3.21
 
-The :command:`set(CACHE)` does not remove a normal variable of the same name.
+When this policy is set to ``NEW``, the :command:`set(CACHE)` command does not
+remove any normal variable of the same name from the current scope.
+The ``OLD`` behavior removes any normal variable of the same name from the
+current scope in the following situations:
 
-Starting with CMake 3.21, the :command:`set(CACHE)` does not remove, in the
-current scope, any normal variable with the same name.
+* No cache variable of that name existed previously.
 
-The ``OLD`` behavior for this policy is to have the :command:`set(CACHE)`
-command removing the normal variable of the same name, if any. The ``NEW``
-behavior for this policy is to keep the normal variable of the same name.
+* A cache variable of that name existed previously, but it had no type.
+  This can occur when the variable was set on the command line using a form
+  like ``cmake -DMYVAR=blah`` instead of ``cmake -DMYVAR:STRING=blah``.
 
-This policy was introduced in CMake version 3.21. Use the
+Note that the ``NEW`` behavior has an important difference to the similar
+``NEW`` behavior of policy :policy:`CMP0077`.  The :command:`set(CACHE)`
+command always sets the cache variable if it did not exist previously,
+regardless of the ``CMP0126`` policy setting.  The :command:`option` command
+will *not* set the cache variable if a non-cache variable of the same name
+already exists and :policy:`CMP0077` is set to ``NEW``.
+
+Policy ``CMP0126`` was introduced in CMake version 3.21. Use the
 :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` explicitly.
 Unlike many policies, CMake version |release| does *not* warn when the policy
 is not set and simply uses ``OLD`` behavior.  See documentation of the
index 204880b..3e70552 100644 (file)
@@ -27,7 +27,7 @@ Generators
 ----------
 
 * The :generator:`Visual Studio 17 2022` generator was added.  This is
-  experimental and based on "Visual Studio 2022 Preview 1.1" because this
+  experimental and based on "Visual Studio 2022 Preview 2" because this
   version of VS has not been released.
 
 * The :ref:`Makefile Generators` and the :generator:`Ninja` generator
@@ -293,3 +293,14 @@ Other Changes
   `cmake.org <https://cmake.org/download/>`_ now support
   ``liblzma`` multi-threading.  See the :variable:`CPACK_THREADS` and
   :variable:`CPACK_ARCHIVE_THREADS` variables.
+
+Updates
+=======
+
+Changes made since CMake 3.21.0 include the following.
+
+3.21.1
+------
+
+* The :generator:`Visual Studio 17 2022` generator is now based on
+  "Visual Studio 2022 Preview 2".  Previously it was based on "Preview 1.1".
index 356590f..bc4b9df 100644 (file)
@@ -6,4 +6,5 @@ The suffix for executables on this platform.
 The suffix to use for the end of an executable filename if any, ``.exe``
 on Windows.
 
-``CMAKE_EXECUTABLE_SUFFIX_<LANG>`` overrides this for language ``<LANG>``.
+:variable:`CMAKE_EXECUTABLE_SUFFIX_<LANG>` overrides this for
+language ``<LANG>``.
diff --git a/Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst b/Help/variable/CMAKE_EXECUTABLE_SUFFIX_LANG.rst
new file mode 100644 (file)
index 0000000..a68150e
--- /dev/null
@@ -0,0 +1,7 @@
+CMAKE_EXECUTABLE_SUFFIX_<LANG>
+------------------------------
+
+The suffix to use for the end of an executable filename of ``<LANG>``
+compiler target architecture, if any.
+
+It overrides :variable:`CMAKE_EXECUTABLE_SUFFIX` for language ``<LANG>``.
index 9f145c1..7e7d431 100644 (file)
@@ -9,3 +9,6 @@ If a test's output contains the literal string "CTEST_FULL_OUTPUT",
 the output will not be truncated and may exceed the maximum size.
 
 .. include:: CTEST_CUSTOM_XXX.txt
+
+For controlling the output collection of passing tests, see
+:variable:`CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE`.
index 71ecf52..64367f9 100644 (file)
@@ -9,3 +9,6 @@ If a test's output contains the literal string "CTEST_FULL_OUTPUT",
 the output will not be truncated and may exceed the maximum size.
 
 .. include:: CTEST_CUSTOM_XXX.txt
+
+For controlling the output collection of failing tests, see
+:variable:`CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE`.
index 241eb03..cbb3a3c 100644 (file)
@@ -19,8 +19,6 @@ Known version numbers are::
   1900      = VS 14.0 (v140 toolset)
   1910-1919 = VS 15.0 (v141 toolset)
   1920-1929 = VS 16.0 (v142 toolset)
-
-..
   1930-1939 = VS 17.0 (v143 toolset)
 
 See also the  :variable:`CMAKE_<LANG>_COMPILER_VERSION` and
index ad61fec..7e40704 100644 (file)
@@ -3,7 +3,8 @@ PROJECT_IS_TOP_LEVEL
 
 .. versionadded:: 3.21
 
-A boolean variable indicating whether :command:`project` was called in a top
+A boolean variable indicating whether the most recently called
+:command:`project` command in the current scope or above was in the top
 level ``CMakeLists.txt`` file.
 
 Some modules should only be included as part of the top level
index 987f63a..b43ec04 100644 (file)
@@ -15,6 +15,10 @@ namespace CSharp
         + "Visual Studio"
 #elif PlatformToolsetv141
         + "Visual Studio"
+#elif PlatformToolsetv142
+        + "Visual Studio"
+#elif PlatformToolsetv143
+        + "Visual Studio"
 #else
         + "unknown"
 #endif
@@ -45,6 +49,10 @@ namespace CSharp
         + "2015"
 #elif PlatformToolsetv141
         + "2017"
+#elif PlatformToolsetv142
+        + "2019"
+#elif PlatformToolsetv143
+        + "2022"
 #else
         + "9999"
 #endif
index 0a291f2..96855d2 100644 (file)
@@ -42,10 +42,7 @@ macro(CMAKE_DEPENDENT_OPTION option doc default depends force)
   if(${option}_ISSET MATCHES "^${option}_ISSET$")
     set(${option}_AVAILABLE 1)
     foreach(d ${depends})
-      string(REPLACE "(" " ( " _CMAKE_CDO_DEP "${d}")
-      string(REPLACE ")" " ) " _CMAKE_CDO_DEP "${_CMAKE_CDO_DEP}")
-      string(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${_CMAKE_CDO_DEP}")
-      unset(_CMAKE_CDO_DEP)
+      string(REGEX REPLACE " +" ";" CMAKE_DEPENDENT_OPTION_DEP "${d}")
       if(${CMAKE_DEPENDENT_OPTION_DEP})
       else()
         set(${option}_AVAILABLE 0)
index bd1e732..e933cf4 100644 (file)
@@ -1012,9 +1012,6 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
     endif()
 
   endif()
-  if(NOT DEFINED CMAKE_EXECUTABLE_FORMAT)
-    set(CMAKE_EXECUTABLE_FORMAT)
-  endif()
   # Return the information extracted.
   set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
   set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
@@ -1026,7 +1023,6 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
   set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE)
   set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
   set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
-  set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
   set(COMPILER_QNXNTO "${COMPILER_QNXNTO}" PARENT_SCOPE)
   set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE)
 endfunction()
index 3162ec5..f139ff4 100644 (file)
@@ -94,6 +94,53 @@ elseif("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" MATCHES "^x(Open)?W
   set(_CMAKE_AR_NAMES "wlib")
   list(APPEND _CMAKE_TOOL_VARS LINKER AR)
 
+elseif("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" MATCHES "^xIAR$")
+  # Small helper declaring an IAR tool (e.g. linker) to avoid repeating the same idiom every time
+  macro(__append_IAR_tool TOOL_VAR NAME)
+    set(_CMAKE_${TOOL_VAR}_NAMES "${NAME}" "${NAME}.exe")
+    list(APPEND _CMAKE_TOOL_VARS ${TOOL_VAR})
+  endmacro()
+
+  # Resolve hint path from an IAR compiler
+  function(__resolve_IAR_hints COMPILER RESULT)
+    get_filename_component(_CMAKE_IAR_HINT "${COMPILER}" REALPATH)
+    get_filename_component(_CMAKE_IAR_HINT "${_CMAKE_IAR_HINT}" DIRECTORY)
+    list(APPEND _IAR_HINTS "${_CMAKE_IAR_HINT}")
+
+    get_filename_component(_CMAKE_IAR_HINT "${COMPILER}" DIRECTORY)
+    list(APPEND _IAR_HINTS "${_CMAKE_IAR_HINT}")
+
+    set(${RESULT} "${_IAR_HINTS}" PARENT_SCOPE)
+  endfunction()
+
+  __resolve_IAR_hints("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" _CMAKE_TOOLCHAIN_LOCATION)
+  set(_CMAKE_IAR_ITOOLS "ARM" "RX" "RH850" "RL78" "RISCV" "STM8")
+  set(_CMAKE_IAR_XTOOLS "AVR" "MSP430" "V850" "8051")
+
+  if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" IN_LIST _CMAKE_IAR_ITOOLS)
+    string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _CMAKE_IAR_LOWER_ARCHITECTURE_ID)
+
+    __append_IAR_tool(AR "iarchive")
+    __append_IAR_tool(LINKER "ilink${_CMAKE_IAR_LOWER_ARCHITECTURE_ID}")
+
+    __append_IAR_tool(IAR_ELFDUMP "ielfdump${_CMAKE_IAR_LOWER_ARCHITECTURE_ID}")
+    __append_IAR_tool(IAR_ELFTOOL "ielftool")
+    __append_IAR_tool(IAR_OBJMANIP "iobjmanip")
+    __append_IAR_tool(IAR_SYMEXPORT "isymexport")
+
+    unset(_CMAKE_IAR_LOWER_ARCHITECTURE_ID)
+
+  elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" IN_LIST _CMAKE_IAR_XTOOLS)
+    __append_IAR_tool(AR "xar")
+    __append_IAR_tool(LINKER "xlink")
+
+  else()
+    message(FATAL_ERROR "Failed to find linker and librarian for ${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID} on ${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}.")
+  endif()
+
+  unset(_CMAKE_IAR_ITOOLS)
+  unset(_CMAKE_IAR_XTOOLS)
+
 # in all other cases search for ar, ranlib, etc.
 else()
   if(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN)
@@ -186,3 +233,10 @@ unset(_CMAKE_TOOL_VARS)
 unset(_CMAKE_TOOL_CACHED)
 unset(_CMAKE_TOOL_NAME)
 unset(_CMAKE_TOOL)
+
+if("x${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ID}" MATCHES "^xIAR$")
+  # Set for backwards compatibility
+  set(CMAKE_IAR_ARCHIVE "${CMAKE_AR}" CACHE FILEPATH "The IAR archiver")
+  set(CMAKE_IAR_LINKER "${CMAKE_LINKER}" CACHE FILEPATH "The IAR ILINK linker")
+  mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_AR)
+endif()
index 03f2db2..ae5aa27 100644 (file)
@@ -50,6 +50,9 @@ if(NOT CMAKE_C_COMPILER_WORKS)
     "int main(int argc, char* argv[])\n"
     "#endif\n"
     "{ (void)argv; return argc-1;}\n")
+  # Clear result from normal variable.
+  unset(CMAKE_C_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
     OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
index 1119a45..adea250 100644 (file)
@@ -30,6 +30,9 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS)
     "   }"
     "}"
     )
+  # Clear result from normal variable.
+  unset(CMAKE_CSharp_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_CSharp_COMPILER_WORKS ${CMAKE_BINARY_DIR} "${test_compile_file}"
     OUTPUT_VARIABLE __CMAKE_CSharp_COMPILER_OUTPUT
     )
index a18947b..25a3653 100644 (file)
@@ -36,6 +36,10 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS)
     "#endif\n"
     "int main(){return 0;}\n")
 
+  # Clear result from normal variable.
+  unset(CMAKE_CUDA_COMPILER_WORKS)
+
+  # Puts test result in cache variable.
   try_compile(CMAKE_CUDA_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.cu
     OUTPUT_VARIABLE __CMAKE_CUDA_COMPILER_OUTPUT)
index 0d2d0b0..bbe3533 100644 (file)
@@ -43,6 +43,9 @@ if(NOT CMAKE_CXX_COMPILER_WORKS)
     "# error \"The CMAKE_CXX_COMPILER is set to a C compiler\"\n"
     "#endif\n"
     "int main(){return 0;}\n")
+  # Clear result from normal variable.
+  unset(CMAKE_CXX_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
     OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
index 10fb0a7..f25788d 100644 (file)
@@ -36,6 +36,9 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
         PRINT *, 'Hello'
         END
   ")
+  # Clear result from normal variable.
+  unset(CMAKE_Fortran_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
     OUTPUT_VARIABLE OUTPUT)
index d9fcc9d..62f0657 100644 (file)
@@ -46,6 +46,9 @@ if(NOT CMAKE_HIP_COMPILER_WORKS)
     "# error \"The CMAKE_HIP_COMPILER is set to a C/CXX compiler\"\n"
     "#endif\n"
     "int main(){return 0;}\n")
+  # Clear result from normal variable.
+  unset(CMAKE_HIP_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_HIP_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testHIPCompiler.hip
     OUTPUT_VARIABLE __CMAKE_HIP_COMPILER_OUTPUT)
index 298272b..20d1f8b 100644 (file)
@@ -47,6 +47,9 @@ if(NOT CMAKE_OBJC_COMPILER_WORKS)
     "#endif\n"
     "int main(int argc, char* argv[])\n"
     "{ (void)argv; return argc-1;}\n")
+  # Clear result from normal variable.
+  unset(CMAKE_OBJC_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_OBJC_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCCompiler.m
     OUTPUT_VARIABLE __CMAKE_OBJC_COMPILER_OUTPUT)
index 36e3efc..4f7185f 100644 (file)
@@ -46,6 +46,9 @@ if(NOT CMAKE_OBJCXX_COMPILER_WORKS)
     "# error \"The CMAKE_OBJCXX_COMPILER is not an Objective-C++ compiler\"\n"
     "#endif\n"
     "int main(){return 0;}\n")
+  # Clear result from normal variable.
+  unset(CMAKE_OBJCXX_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_OBJCXX_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCXXCompiler.mm
     OUTPUT_VARIABLE __CMAKE_OBJCXX_COMPILER_OUTPUT)
index d98dc9d..2f2546f 100644 (file)
@@ -23,6 +23,9 @@ if(NOT CMAKE_Swift_COMPILER_WORKS)
   PrintTestCompilerStatus("Swift")
   file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.swift
     "print(\"CMake\")\n")
+  # Clear result from normal variable.
+  unset(CMAKE_Swift_COMPILER_WORKS)
+  # Puts test result in cache variable.
   try_compile(CMAKE_Swift_COMPILER_WORKS ${CMAKE_BINARY_DIR}
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.swift
     OUTPUT_VARIABLE __CMAKE_Swift_COMPILER_OUTPUT)
index 39e9c72..03e8d2b 100644 (file)
@@ -42,8 +42,8 @@ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 8.1)
 endif()
 
 if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 9.1)
-  set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c23")
-  set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu23")
+  set(CMAKE_C23_STANDARD_COMPILE_OPTION "-std=c2x")
+  set(CMAKE_C23_EXTENSION_COMPILE_OPTION "-std=gnu2x")
 endif()
 
 __compiler_check_default_language_standard(C 3.4 90 5.0 11 8.1 17)
diff --git a/Modules/Compiler/IAR-FindBinUtils.cmake b/Modules/Compiler/IAR-FindBinUtils.cmake
deleted file mode 100644 (file)
index 6c67d34..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-if(NOT DEFINED _CMAKE_PROCESSING_LANGUAGE OR _CMAKE_PROCESSING_LANGUAGE STREQUAL "")
-  message(FATAL_ERROR "Internal error: _CMAKE_PROCESSING_LANGUAGE is not set")
-endif()
-
-# Try to find tools in the same directory as the compiler itself
-get_filename_component(__iar_hint_1 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" REALPATH)
-get_filename_component(__iar_hint_1 "${__iar_hint_1}" DIRECTORY)
-
-get_filename_component(__iar_hint_2 "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER}" DIRECTORY)
-
-set(__iar_hints "${__iar_hint_1}" "${__iar_hint_2}")
-
-if("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "ARM" OR
-   "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RX" OR
-   "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RH850" OR
-   "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RL78" OR
-   "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV" OR
-   "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
-
-  string(TOLOWER "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" _archid_lower)
-
-  # Find linker
-  find_program(CMAKE_IAR_LINKER ilink${_archid_lower} HINTS ${__iar_hints}
-      DOC "The IAR ILINK linker")
-  find_program(CMAKE_IAR_ARCHIVE iarchive HINTS ${__iar_hints}
-      DOC "The IAR archiver")
-
-  # Find utility tools
-  find_program(CMAKE_IAR_ELFTOOL ielftool HINTS ${__iar_hints}
-      DOC "The IAR ELF Tool")
-    find_program(CMAKE_IAR_ELFDUMP ielfdump${_archid_lower} HINTS ${__iar_hints}
-      DOC "The IAR ELF Dumper")
-  find_program(CMAKE_IAR_OBJMANIP iobjmanip HINTS ${__iar_hints}
-      DOC "The IAR ELF Object Tool")
-  find_program(CMAKE_IAR_SYMEXPORT isymexport HINTS ${__iar_hints}
-      DOC "The IAR Absolute Symbol Exporter")
-  mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_ARCHIVE CMAKE_IAR_ELFTOOL CMAKE_IAR_ELFDUMP CMAKE_IAR_OBJMANIP CMAKE_IAR_SYMEXPORT)
-
-  set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CUSTOM_CODE
-"set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
-set(CMAKE_IAR_ARCHIVE \"${CMAKE_IAR_ARCHIVE}\")
-set(CMAKE_IAR_ELFTOOL \"${CMAKE_IAR_ELFTOOL}\")
-set(CMAKE_IAR_ELFDUMP \"${CMAKE_IAR_ELFDUMP}\")
-set(CMAKE_IAR_OBJMANIP \"${CMAKE_IAR_OBJMANIP}\")
-set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
-")
-
-elseif("${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR" OR
-       "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430" OR
-       "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850" OR
-       "${CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
-
-  # Find the "xlink" linker and "xar" archiver:
-  find_program(CMAKE_IAR_LINKER xlink HINTS ${__iar_hints}
-      DOC "The IAR XLINK linker")
-  find_program(CMAKE_IAR_AR xar HINTS ${__iar_hints}
-      DOC "The IAR archiver")
-  mark_as_advanced(CMAKE_IAR_LINKER CMAKE_IAR_AR)
-
-  set(CMAKE_${_CMAKE_PROCESSING_LANGUAGE}_COMPILER_CUSTOM_CODE
-"set(CMAKE_IAR_LINKER \"${CMAKE_IAR_LINKER}\")
-set(CMAKE_IAR_AR \"${CMAKE_IAR_AR}\")
-")
-endif()
index 8bfc3ef..2200a21 100644 (file)
@@ -41,7 +41,7 @@
 include_guard()
 
 macro(__compiler_iar_ilink lang)
-  set(CMAKE_EXECUTABLE_SUFFIX ".elf")
+  set(CMAKE_EXECUTABLE_SUFFIX_${lang} ".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>")
@@ -71,13 +71,10 @@ macro(__compiler_iar_ilink lang)
   set(CMAKE_${lang}_ARCHIVE_CREATE "<CMAKE_AR> <TARGET> --create <LINK_FLAGS> <OBJECTS>")
   set(CMAKE_${lang}_ARCHIVE_APPEND "<CMAKE_AR> <TARGET> --replace <LINK_FLAGS> <OBJECTS>")
   set(CMAKE_${lang}_ARCHIVE_FINISH "")
-
-  set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE)
-  set(CMAKE_AR "${CMAKE_IAR_ARCHIVE}" CACHE FILEPATH "The IAR archiver" FORCE)
 endmacro()
 
 macro(__compiler_iar_xlink lang)
-  set(CMAKE_EXECUTABLE_SUFFIX ".bin")
+  set(CMAKE_EXECUTABLE_SUFFIX_${lang} ".bin")
   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>")
@@ -109,7 +106,4 @@ macro(__compiler_iar_xlink lang)
   set(CMAKE_${lang}_ARCHIVE_FINISH "")
 
   set(CMAKE_LIBRARY_PATH_FLAG "-I")
-
-  set(CMAKE_LINKER "${CMAKE_IAR_LINKER}" CACHE FILEPATH "The IAR linker" FORCE)
-  set(CMAKE_AR "${CMAKE_IAR_AR}" CACHE FILEPATH "The IAR archiver" FORCE)
 endmacro()
index 48371e6..00729bc 100644 (file)
@@ -156,8 +156,9 @@ function(xctest_add_bundle target testee)
         XCODE_ATTRIBUTE_BUNDLE_LOADER "$(TEST_HOST)"
         XCODE_ATTRIBUTE_TEST_HOST "$<TARGET_FILE:${testee}>")
       if(XCODE_VERSION VERSION_GREATER_EQUAL 7.3)
-        # CMAKE_XCODE_BUILD_SYSTEM equals 12 means that at least Xcode 11.x is used.
+        # The Xcode "new build system" used a different path until Xcode 12.5.
         if(CMAKE_XCODE_BUILD_SYSTEM EQUAL 12 AND
+           XCODE_VERSION VERSION_LESS 12.5 AND
            NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
           set(_output_directory "$<TARGET_BUNDLE_CONTENT_DIR:${testee}>")
         else()
index 9a18184..0142c07 100644 (file)
@@ -432,6 +432,8 @@ set(SRCS
   cmQtAutoMocUic.h
   cmQtAutoRcc.cxx
   cmQtAutoRcc.h
+  cmQtAutoUicHelpers.cxx
+  cmQtAutoUicHelpers.h
   cmRST.cxx
   cmRST.h
   cmRuntimeDependencyArchive.cxx
index a783d05..6a005be 100644 (file)
@@ -1,7 +1,7 @@
 # CMake version number components.
 set(CMake_VERSION_MAJOR 3)
 set(CMake_VERSION_MINOR 21)
-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 [==[ff7a2e37bf CMake 3.21.0]==])
+  set(git_info [==[f7cf69e34a CMake 3.21.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]* "
index 2f9972c..fd578fa 100644 (file)
@@ -197,11 +197,13 @@ bool ExpandMacros(const cmCMakePresetsFile& file,
   std::string binaryDir = preset.BinaryDir;
   CHECK_EXPAND(out, binaryDir, macroExpanders, file.GetVersion(preset))
 
-  if (!cmSystemTools::FileIsFullPath(binaryDir)) {
-    binaryDir = cmStrCat(file.SourceDir, '/', binaryDir);
+  if (!binaryDir.empty()) {
+    if (!cmSystemTools::FileIsFullPath(binaryDir)) {
+      binaryDir = cmStrCat(file.SourceDir, '/', binaryDir);
+    }
+    out->BinaryDir = cmSystemTools::CollapseFullPath(binaryDir);
+    cmSystemTools::ConvertToUnixSlashes(out->BinaryDir);
   }
-  out->BinaryDir = cmSystemTools::CollapseFullPath(binaryDir);
-  cmSystemTools::ConvertToUnixSlashes(out->BinaryDir);
 
   if (!preset.InstallDir.empty()) {
     std::string installDir = preset.InstallDir;
index 8ecf264..bf18143 100644 (file)
@@ -570,6 +570,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv,
               *cmp0123 == "NEW"_s ? "NEW" : "OLD");
     }
 
+    /* Set cache/normal variable policy to match outer project.
+       It may affect toolchain files.  */
+    if (this->Makefile->GetPolicyStatus(cmPolicies::CMP0126) !=
+        cmPolicies::NEW) {
+      fprintf(fout, "cmake_policy(SET CMP0126 OLD)\n");
+    }
+
     std::string projectLangs;
     for (std::string const& li : testLangs) {
       projectLangs += " " + li;
index c608bf9..217ebe5 100644 (file)
@@ -1635,10 +1635,11 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
       reportError(context, content->GetOriginalExpression(), e.str());
       return std::string();
     }
-    if (!context->EvaluateForBuildsystem) {
-      cmGlobalGenerator* gg = context->LG->GetGlobalGenerator();
+    cmGlobalGenerator* gg = context->LG->GetGlobalGenerator();
+    {
       std::string reason;
-      if (!gg->HasKnownObjectFileLocation(&reason)) {
+      if (!context->EvaluateForBuildsystem &&
+          !gg->HasKnownObjectFileLocation(&reason)) {
         std::ostringstream e;
         e << "The evaluation of the TARGET_OBJECTS generator expression "
              "is only suitable for consumption by CMake (limited"
@@ -1664,7 +1665,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
       gt->GetTargetObjectNames(context->Config, objects);
 
       std::string obj_dir;
-      if (context->EvaluateForBuildsystem) {
+      if (context->EvaluateForBuildsystem && !gg->SupportsCrossConfigs()) {
         // Use object file directory with buildsystem placeholder.
         obj_dir = gt->ObjectDirectory;
         context->HadContextSensitiveCondition =
index 4fab0b9..79c06d6 100644 (file)
@@ -104,8 +104,7 @@ static const char* VSVersionToToolset(
     case cmGlobalVisualStudioGenerator::VS16:
       return "v142";
     case cmGlobalVisualStudioGenerator::VS17:
-      // FIXME: VS 2022 Preview 1 uses v142.  Will it be v143 later?
-      return "v142";
+      return "v143";
   }
   return "";
 }
index 57fcd2d..898d862 100644 (file)
@@ -384,3 +384,39 @@ bool cmQtAutoGen::RccLister::list(std::string const& qrcFile,
   }
   return true;
 }
+
+bool cmQtAutoGen::FileRead(std::string& content, std::string const& filename,
+                           std::string* error)
+{
+  content.clear();
+  if (!cmSystemTools::FileExists(filename, true)) {
+    if (error != nullptr) {
+      *error = "Not a file.";
+    }
+    return false;
+  }
+
+  unsigned long const length = cmSystemTools::FileLength(filename);
+  cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary));
+
+  // Use lambda to save destructor calls of ifs
+  return [&ifs, length, &content, error]() -> bool {
+    if (!ifs) {
+      if (error != nullptr) {
+        *error = "Opening the file for reading failed.";
+      }
+      return false;
+    }
+    content.reserve(length);
+    using IsIt = std::istreambuf_iterator<char>;
+    content.assign(IsIt{ ifs }, IsIt{});
+    if (!ifs) {
+      content.clear();
+      if (error != nullptr) {
+        *error = "Reading from the file failed.";
+      }
+      return false;
+    }
+    return true;
+  }();
+}
index 466a954..b9ae360 100644 (file)
@@ -100,6 +100,9 @@ public:
                               std::vector<std::string> const& newOpts,
                               bool isQt5);
 
+  static bool FileRead(std::string& content, std::string const& filename,
+                       std::string* error = nullptr);
+
   /** @class RccLister
    * @brief Lists files in qrc resource files
    */
index 2894201..6cc8328 100644 (file)
@@ -902,6 +902,13 @@ bool cmQtAutoGenInitializer::InitScanFiles()
   // The reason is that their file names might be discovered from source files
   // at generation time.
   if (this->MocOrUicEnabled()) {
+    std::set<std::string> uicIncludes;
+    auto collectUicIncludes = [&](std::unique_ptr<cmSourceFile> const& sf) {
+      std::string content;
+      FileRead(content, sf->GetFullPath());
+      this->AutoUicHelpers.CollectUicIncludes(uicIncludes, content);
+    };
+
     for (const auto& sf : this->Makefile->GetSourceFiles()) {
       // sf->GetExtension() is only valid after sf->ResolveFullPath() ...
       // Since we're iterating over source files that might be not in the
@@ -914,6 +921,10 @@ bool cmQtAutoGenInitializer::InitScanFiles()
       std::string const& extLower =
         cmSystemTools::LowerCase(sf->GetExtension());
 
+      bool const skipAutogen = sf->GetPropertyAsBool(kw.SKIP_AUTOGEN);
+      bool const skipUic =
+        (skipAutogen || sf->GetPropertyAsBool(kw.SKIP_AUTOUIC) ||
+         !this->Uic.Enabled);
       if (cm->IsAHeaderExtension(extLower)) {
         if (!cm::contains(this->AutogenTarget.Headers, sf.get())) {
           auto muf = makeMUFile(sf.get(), fullPath, {}, false);
@@ -921,6 +932,9 @@ bool cmQtAutoGenInitializer::InitScanFiles()
             addMUHeader(std::move(muf), extLower);
           }
         }
+        if (!skipUic && !sf->GetIsGenerated()) {
+          collectUicIncludes(sf);
+        }
       } else if (cm->IsACLikeSourceExtension(extLower)) {
         if (!cm::contains(this->AutogenTarget.Sources, sf.get())) {
           auto muf = makeMUFile(sf.get(), fullPath, {}, false);
@@ -928,11 +942,11 @@ bool cmQtAutoGenInitializer::InitScanFiles()
             addMUSource(std::move(muf));
           }
         }
+        if (!skipUic && !sf->GetIsGenerated()) {
+          collectUicIncludes(sf);
+        }
       } else if (this->Uic.Enabled && (extLower == kw.ui)) {
         // .ui file
-        bool const skipAutogen = sf->GetPropertyAsBool(kw.SKIP_AUTOGEN);
-        bool const skipUic =
-          (skipAutogen || sf->GetPropertyAsBool(kw.SKIP_AUTOUIC));
         if (!skipUic) {
           // Check if the .ui file has uic options
           std::string const uicOpts = sf->GetSafeProperty(kw.AUTOUIC_OPTIONS);
@@ -942,35 +956,22 @@ bool cmQtAutoGenInitializer::InitScanFiles()
             this->Uic.UiFilesWithOptions.emplace_back(fullPath,
                                                       cmExpandedList(uicOpts));
           }
-
-          auto uiHeaderRelativePath = cmSystemTools::RelativePath(
-            this->LocalGen->GetCurrentSourceDirectory(),
-            cmSystemTools::GetFilenamePath(fullPath));
-
-          // Avoid creating a path containing adjacent slashes
-          if (!uiHeaderRelativePath.empty() &&
-              uiHeaderRelativePath.back() != '/') {
-            uiHeaderRelativePath += '/';
-          }
-
-          auto uiHeaderFilePath = cmStrCat(
-            '/', uiHeaderRelativePath, "ui_"_s,
-            cmSystemTools::GetFilenameWithoutLastExtension(fullPath), ".h"_s);
-
-          ConfigString uiHeader;
-          std::string uiHeaderGenex;
-          this->ConfigFileNamesAndGenex(
-            uiHeader, uiHeaderGenex, cmStrCat(this->Dir.Build, "/include"_s),
-            uiHeaderFilePath);
-
-          this->Uic.UiHeaders.emplace_back(
-            std::make_pair(uiHeader, uiHeaderGenex));
         } else {
           // Register skipped .ui file
           this->Uic.SkipUi.insert(fullPath);
         }
       }
     }
+
+    for (const auto& include : uicIncludes) {
+      ConfigString uiHeader;
+      std::string uiHeaderGenex;
+      this->ConfigFileNamesAndGenex(uiHeader, uiHeaderGenex,
+                                    cmStrCat(this->Dir.Build, "/include"_s),
+                                    cmStrCat("/"_s, include));
+      this->Uic.UiHeaders.emplace_back(
+        std::make_pair(uiHeader, uiHeaderGenex));
+    }
   }
 
   // Process GENERATED sources and headers
@@ -1111,11 +1112,30 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
   // Register info file as generated by CMake
   this->Makefile->AddCMakeOutputFile(this->AutogenTarget.InfoFile);
 
+  // Determine whether to use a depfile for the AUTOGEN target.
+  const bool useNinjaDepfile = this->QtVersion >= IntegerVersion(5, 15) &&
+    this->GlobalGen->GetName().find("Ninja") != std::string::npos;
+
   // Files provided by the autogen target
   std::vector<std::string> autogenByproducts;
+  std::vector<std::string> timestampByproducts;
   if (this->Moc.Enabled) {
     this->AddGeneratedSource(this->Moc.CompilationFile, this->Moc, true);
-    autogenByproducts.push_back(this->Moc.CompilationFileGenex);
+    if (useNinjaDepfile) {
+      if (this->MultiConfig) {
+        // Make all mocs_compilation_<CONFIG>.cpp files byproducts of the
+        // ${target}_autogen/timestamp custom command.
+        // We cannot just use Moc.CompilationFileGenex here, because that
+        // custom command runs cmake_autogen for each configuration.
+        for (const auto& p : this->Moc.CompilationFile.Config) {
+          timestampByproducts.push_back(p.second);
+        }
+      } else {
+        timestampByproducts.push_back(this->Moc.CompilationFileGenex);
+      }
+    } else {
+      autogenByproducts.push_back(this->Moc.CompilationFileGenex);
+    }
   }
 
   if (this->Uic.Enabled) {
@@ -1265,8 +1285,6 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
       this->AutogenTarget.DependFiles.begin(),
       this->AutogenTarget.DependFiles.end());
 
-    const bool useNinjaDepfile = this->QtVersion >= IntegerVersion(5, 15) &&
-      this->GlobalGen->GetName().find("Ninja") != std::string::npos;
     if (useNinjaDepfile) {
       // Create a custom command that generates a timestamp file and
       // has a depfile assigned. The depfile is created by JobDepFilesMergeT.
@@ -1327,8 +1345,9 @@ bool cmQtAutoGenInitializer::InitAutogenTarget()
       this->AddGeneratedSource(outputFile, this->Moc);
       const std::string no_main_dependency;
       this->LocalGen->AddCustomCommandToOutput(
-        outputFile, dependencies, no_main_dependency, commandLines,
-        autogenComment.c_str(), this->Dir.Work.c_str(),
+        { outputFile }, timestampByproducts, dependencies, no_main_dependency,
+        /*implicit_depends=*/{}, commandLines, autogenComment.c_str(),
+        this->Dir.Work.c_str(),
         /*cmp0116=*/cmPolicies::NEW, /*replace=*/false,
         /*escapeOldStyle=*/false,
         /*uses_terminal=*/false,
index e76817b..3ec87d2 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "cmFilePathChecksum.h"
 #include "cmQtAutoGen.h"
+#include "cmQtAutoUicHelpers.h"
 
 class cmGeneratorTarget;
 class cmGlobalGenerator;
@@ -170,6 +171,7 @@ private:
   std::string ConfigDefault;
   std::vector<std::string> ConfigsList;
   std::string TargetsFolder;
+  cmQtAutoUicHelpers AutoUicHelpers;
 
   /** Common directories.  */
   struct
index 568926e..0c6b5e6 100644 (file)
@@ -121,43 +121,6 @@ bool cmQtAutoGenerator::MakeParentDirectory(std::string const& filename)
   return success;
 }
 
-bool cmQtAutoGenerator::FileRead(std::string& content,
-                                 std::string const& filename,
-                                 std::string* error)
-{
-  content.clear();
-  if (!cmSystemTools::FileExists(filename, true)) {
-    if (error != nullptr) {
-      *error = "Not a file.";
-    }
-    return false;
-  }
-
-  unsigned long const length = cmSystemTools::FileLength(filename);
-  cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary));
-
-  // Use lambda to save destructor calls of ifs
-  return [&ifs, length, &content, error]() -> bool {
-    if (!ifs) {
-      if (error != nullptr) {
-        *error = "Opening the file for reading failed.";
-      }
-      return false;
-    }
-    content.reserve(length);
-    using IsIt = std::istreambuf_iterator<char>;
-    content.assign(IsIt{ ifs }, IsIt{});
-    if (!ifs) {
-      content.clear();
-      if (error != nullptr) {
-        *error = "Reading from the file failed.";
-      }
-      return false;
-    }
-    return true;
-  }();
-}
-
 bool cmQtAutoGenerator::FileWrite(std::string const& filename,
                                   std::string const& content,
                                   std::string* error)
index 5c3a8ad..66399d7 100644 (file)
@@ -70,8 +70,6 @@ public:
 
   // -- File system methods
   static bool MakeParentDirectory(std::string const& filename);
-  static bool FileRead(std::string& content, std::string const& filename,
-                       std::string* error = nullptr);
   static bool FileWrite(std::string const& filename,
                         std::string const& content,
                         std::string* error = nullptr);
index f5c195f..86d54f9 100644 (file)
@@ -30,6 +30,7 @@
 #include "cmGeneratedFileStream.h"
 #include "cmQtAutoGen.h"
 #include "cmQtAutoGenerator.h"
+#include "cmQtAutoUicHelpers.h"
 #include "cmStringAlgorithms.h"
 #include "cmSystemTools.h"
 #include "cmWorkerPool.h"
@@ -281,7 +282,7 @@ public:
     std::vector<std::string> Options;
     std::unordered_map<std::string, UiFile> UiFiles;
     std::vector<std::string> SearchPaths;
-    cmsys::RegularExpression RegExpInclude;
+    cmQtAutoUicHelpers AutoUicHelpers;
   };
 
   /** Uic shared variables.  */
@@ -761,11 +762,7 @@ std::string cmQtAutoMocUicT::MocSettingsT::MacrosString() const
   return res;
 }
 
-cmQtAutoMocUicT::UicSettingsT::UicSettingsT()
-{
-  this->RegExpInclude.compile("(^|\n)[ \t]*#[ \t]*include[ \t]+"
-                              "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]");
-}
+cmQtAutoMocUicT::UicSettingsT::UicSettingsT() = default;
 
 cmQtAutoMocUicT::UicSettingsT::~UicSettingsT() = default;
 
@@ -1056,16 +1053,7 @@ void cmQtAutoMocUicT::JobParseT::UicIncludes()
   }
 
   std::set<std::string> includes;
-  {
-    const char* contentChars = this->Content.c_str();
-    cmsys::RegularExpression const& regExp = this->UicConst().RegExpInclude;
-    cmsys::RegularExpressionMatch match;
-    while (regExp.find(contentChars, match)) {
-      includes.emplace(match.match(2));
-      // Forward content pointer
-      contentChars += match.end();
-    }
-  }
+  this->UicConst().AutoUicHelpers.CollectUicIncludes(includes, this->Content);
   this->CreateKeys(this->FileHandle->ParseData->Uic.Include, includes,
                    UiUnderscoreLength);
 }
@@ -2248,12 +2236,20 @@ void cmQtAutoMocUicT::JobDepFilesMergeT::Process()
   std::for_each(this->MocEval().SourceMappings.begin(),
                 this->MocEval().SourceMappings.end(), processMappingEntry);
 
-  // Remove SKIP_AUTOMOC files
-  dependencies.erase(std::remove_if(dependencies.begin(), dependencies.end(),
-                                    [this](const std::string& dep) {
-                                      return this->MocConst().skipped(dep);
-                                    }),
-                     dependencies.end());
+  // Remove SKIP_AUTOMOC files.
+  // Also remove AUTOUIC header files to avoid cyclic dependency.
+  dependencies.erase(
+    std::remove_if(dependencies.begin(), dependencies.end(),
+                   [this](const std::string& dep) {
+                     return this->MocConst().skipped(dep) ||
+                       std::any_of(
+                              this->UicEval().Includes.begin(),
+                              this->UicEval().Includes.end(),
+                              [&dep](MappingMapT::value_type const& mapping) {
+                                return dep == mapping.second->OutputFile;
+                              });
+                   }),
+    dependencies.end());
 
   // Remove duplicates to make the depfile smaller
   std::sort(dependencies.begin(), dependencies.end());
diff --git a/Source/cmQtAutoUicHelpers.cxx b/Source/cmQtAutoUicHelpers.cxx
new file mode 100644 (file)
index 0000000..751ae08
--- /dev/null
@@ -0,0 +1,25 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#include "cmQtAutoUicHelpers.h"
+
+cmQtAutoUicHelpers::cmQtAutoUicHelpers()
+{
+  RegExpInclude.compile("(^|\n)[ \t]*#[ \t]*include[ \t]+"
+                        "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]");
+}
+
+void cmQtAutoUicHelpers::CollectUicIncludes(std::set<std::string>& includes,
+                                            const std::string& content) const
+{
+  if (content.find("ui_") == std::string::npos) {
+    return;
+  }
+
+  const char* contentChars = content.c_str();
+  cmsys::RegularExpressionMatch match;
+  while (this->RegExpInclude.find(contentChars, match)) {
+    includes.emplace(match.match(2));
+    // Forward content pointer
+    contentChars += match.end();
+  }
+}
diff --git a/Source/cmQtAutoUicHelpers.h b/Source/cmQtAutoUicHelpers.h
new file mode 100644 (file)
index 0000000..6b09a31
--- /dev/null
@@ -0,0 +1,20 @@
+/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+   file Copyright.txt or https://cmake.org/licensing for details.  */
+#pragma once
+
+#include <set>
+#include <string>
+
+#include "cmsys/RegularExpression.hxx"
+
+class cmQtAutoUicHelpers
+{
+public:
+  cmQtAutoUicHelpers();
+  virtual ~cmQtAutoUicHelpers() = default;
+  void CollectUicIncludes(std::set<std::string>& includes,
+                          const std::string& content) const;
+
+private:
+  cmsys::RegularExpression RegExpInclude;
+};
index 1725375..64d93df 100644 (file)
@@ -153,9 +153,20 @@ std::string cmakemainGetStack(cmake* cm)
 void cmakemainMessageCallback(const std::string& m,
                               const cmMessageMetadata& md, cmake* cm)
 {
+#if defined(_WIN32)
+  // FIXME: On Windows we replace cerr's streambuf with a custom
+  // implementation that converts our internal UTF-8 encoding to the
+  // console's encoding.  It also does *not* replace LF with CRLF.
+  // Since stderr does not convert encoding and does convert LF, we
+  // cannot use it to print messages.  Another implementation will
+  // be needed to print colored messages on Windows.
+  static_cast<void>(md);
+  std::cerr << m << cmakemainGetStack(cm) << "\n";
+#else
   cmsysTerminal_cfprintf(md.desiredColor, stderr, "%s", m.c_str());
   fflush(stderr); // stderr is buffered in some cases.
   std::cerr << cmakemainGetStack(cm) << "\n";
+#endif
 }
 
 void cmakemainProgressCallback(const std::string& m, float prog, cmake* cm)
index ef615b3..7da5971 100644 (file)
@@ -46,6 +46,8 @@
 #                               Set to empty string to use no default value.
 #  KWSYS_CXX_COMPILE_FEATURES = target_compile_features arguments for KWSys.
 #
+#  KWSYS_NO_EXECINFO          = Do not use execinfo.
+#
 # Optional settings to setup install rules are as follows:
 #
 #  KWSYS_INSTALL_BIN_DIR     = The installation target directories into
@@ -526,7 +528,7 @@ if(KWSYS_USE_SystemInformation)
     set_property(SOURCE SystemInformation.cxx APPEND PROPERTY
       COMPILE_DEFINITIONS KWSYS_CXX_HAS_RLIMIT64=1)
   endif()
-  if(UNIX)
+  if(UNIX AND NOT KWSYS_NO_EXECINFO)
     include(CheckIncludeFileCXX)
     # check for simple stack trace
     # usually it's in libc but on FreeBSD
index 006495d..7c26974 100644 (file)
@@ -4360,7 +4360,7 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
 #  endif
   bOsVersionInfoEx = GetVersionExA((OSVERSIONINFOA*)&osvi);
   if (!bOsVersionInfoEx) {
-    return 0;
+    return "";
   }
 #  ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
 #    ifdef __clang__
@@ -4499,14 +4499,14 @@ std::string SystemTools::GetOperatingSystemNameAndVersion()
                         L"SYSTEM\\CurrentControlSet\\Control\\ProductOptions",
                         0, KEY_QUERY_VALUE, &hKey);
         if (lRet != ERROR_SUCCESS) {
-          return 0;
+          return "";
         }
 
         lRet = RegQueryValueExW(hKey, L"ProductType", nullptr, nullptr,
                                 (LPBYTE)szProductType, &dwBufLen);
 
         if ((lRet != ERROR_SUCCESS) || (dwBufLen > BUFSIZE)) {
-          return 0;
+          return "";
         }
 
         RegCloseKey(hKey);
index 49776d0..64eeac4 100644 (file)
   },
   {
     "name": "LanguageStandard",
-    "switch": "std:c++20",
-    "comment": "ISO C++20 Standard",
-    "value": "stdcpp20",
+    "switch": "std:c++17",
+    "comment": "ISO C++17 Standard",
+    "value": "stdcpp17",
     "flags": []
   },
   {
     "name": "LanguageStandard",
-    "switch": "std:c++17",
-    "comment": "ISO C++17 Standard",
-    "value": "stdcpp17",
+    "switch": "std:c++20",
+    "comment": "ISO C++20 Standard",
+    "value": "stdcpp20",
     "flags": []
   },
   {
     "flags": []
   },
   {
-    "name": "CompileAs",
-    "switch": "interface",
-    "comment": "Compile as C++ Module Code",
-    "value": "CompileAsCppModule",
-    "flags": []
-  },
-  {
-    "name": "CompileAs",
-    "switch": "internalPartition",
-    "comment": "Compile as C++ Module Internal Partition",
-    "value": "CompileAsCppModuleInternalPartition",
-    "flags": []
-  },
-  {
-    "name": "CompileAs",
-    "switch": "exportHeader",
-    "comment": "Compile as C++ Header Unit",
-    "value": "CompileAsHeaderUnit",
-    "flags": []
-  },
-  {
     "name": "ErrorReporting",
     "switch": "errorReport:none",
     "comment": "Do Not Send Report",
     ]
   },
   {
-    "name": "ForceSynchronousPDBWrites",
-    "switch": "FS",
-    "comment": "Force Synchronous PDB Writes",
-    "value": "true",
-    "flags": []
-  },
-  {
     "name": "IntrinsicFunctions",
     "switch": "Oi",
     "comment": "Enable Intrinsic Functions",
diff --git a/Templates/MSBuild/FlagTables/v143_CL.json b/Templates/MSBuild/FlagTables/v143_CL.json
new file mode 100644 (file)
index 0000000..8b700aa
--- /dev/null
@@ -0,0 +1,1488 @@
+[
+  {
+    "name": "DebugInformationFormat",
+    "switch": "",
+    "comment": "None",
+    "value": "None",
+    "flags": []
+  },
+  {
+    "name": "DebugInformationFormat",
+    "switch": "Z7",
+    "comment": "C7 compatible",
+    "value": "OldStyle",
+    "flags": []
+  },
+  {
+    "name": "DebugInformationFormat",
+    "switch": "Zi",
+    "comment": "Program Database",
+    "value": "ProgramDatabase",
+    "flags": []
+  },
+  {
+    "name": "DebugInformationFormat",
+    "switch": "ZI",
+    "comment": "Program Database for Edit And Continue",
+    "value": "EditAndContinue",
+    "flags": []
+  },
+  {
+    "name": "CompileAsManaged",
+    "switch": "",
+    "comment": "No Common Language RunTime Support",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "CompileAsManaged",
+    "switch": "clr",
+    "comment": "Common Language RunTime Support",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "CompileAsManaged",
+    "switch": "clr:pure",
+    "comment": "Pure MSIL Common Language RunTime Support",
+    "value": "Pure",
+    "flags": []
+  },
+  {
+    "name": "CompileAsManaged",
+    "switch": "clr:safe",
+    "comment": "Safe MSIL Common Language RunTime Support",
+    "value": "Safe",
+    "flags": []
+  },
+  {
+    "name": "WarningLevel",
+    "switch": "W0",
+    "comment": "Turn Off All Warnings",
+    "value": "TurnOffAllWarnings",
+    "flags": []
+  },
+  {
+    "name": "WarningLevel",
+    "switch": "W1",
+    "comment": "Level1",
+    "value": "Level1",
+    "flags": []
+  },
+  {
+    "name": "WarningLevel",
+    "switch": "W2",
+    "comment": "Level2",
+    "value": "Level2",
+    "flags": []
+  },
+  {
+    "name": "WarningLevel",
+    "switch": "W3",
+    "comment": "Level3",
+    "value": "Level3",
+    "flags": []
+  },
+  {
+    "name": "WarningLevel",
+    "switch": "W4",
+    "comment": "Level4",
+    "value": "Level4",
+    "flags": []
+  },
+  {
+    "name": "WarningLevel",
+    "switch": "Wall",
+    "comment": "EnableAllWarnings",
+    "value": "EnableAllWarnings",
+    "flags": []
+  },
+  {
+    "name": "DiagnosticsFormat",
+    "switch": "diagnostics:caret",
+    "comment": "Caret",
+    "value": "Caret",
+    "flags": []
+  },
+  {
+    "name": "DiagnosticsFormat",
+    "switch": "diagnostics:column",
+    "comment": "Column Info",
+    "value": "Column",
+    "flags": []
+  },
+  {
+    "name": "DiagnosticsFormat",
+    "switch": "diagnostics:classic",
+    "comment": "Classic",
+    "value": "Classic",
+    "flags": []
+  },
+  {
+    "name": "Optimization",
+    "switch": "",
+    "comment": "Custom",
+    "value": "Custom",
+    "flags": []
+  },
+  {
+    "name": "Optimization",
+    "switch": "Od",
+    "comment": "Disabled",
+    "value": "Disabled",
+    "flags": []
+  },
+  {
+    "name": "Optimization",
+    "switch": "O1",
+    "comment": "Maximum Optimization (Favor Size)",
+    "value": "MinSpace",
+    "flags": []
+  },
+  {
+    "name": "Optimization",
+    "switch": "O2",
+    "comment": "Maximum Optimization (Favor Speed)",
+    "value": "MaxSpeed",
+    "flags": []
+  },
+  {
+    "name": "Optimization",
+    "switch": "Ox",
+    "comment": "Optimizations (Favor Speed)",
+    "value": "Full",
+    "flags": []
+  },
+  {
+    "name": "InlineFunctionExpansion",
+    "switch": "",
+    "comment": "Default",
+    "value": "Default",
+    "flags": []
+  },
+  {
+    "name": "InlineFunctionExpansion",
+    "switch": "Ob0",
+    "comment": "Disabled",
+    "value": "Disabled",
+    "flags": []
+  },
+  {
+    "name": "InlineFunctionExpansion",
+    "switch": "Ob1",
+    "comment": "Only __inline",
+    "value": "OnlyExplicitInline",
+    "flags": []
+  },
+  {
+    "name": "InlineFunctionExpansion",
+    "switch": "Ob2",
+    "comment": "Any Suitable",
+    "value": "AnySuitable",
+    "flags": []
+  },
+  {
+    "name": "FavorSizeOrSpeed",
+    "switch": "Os",
+    "comment": "Favor small code",
+    "value": "Size",
+    "flags": []
+  },
+  {
+    "name": "FavorSizeOrSpeed",
+    "switch": "Ot",
+    "comment": "Favor fast code",
+    "value": "Speed",
+    "flags": []
+  },
+  {
+    "name": "FavorSizeOrSpeed",
+    "switch": "",
+    "comment": "Neither",
+    "value": "Neither",
+    "flags": []
+  },
+  {
+    "name": "ExceptionHandling",
+    "switch": "EHa",
+    "comment": "Yes with SEH Exceptions",
+    "value": "Async",
+    "flags": []
+  },
+  {
+    "name": "ExceptionHandling",
+    "switch": "EHsc",
+    "comment": "Yes",
+    "value": "Sync",
+    "flags": []
+  },
+  {
+    "name": "ExceptionHandling",
+    "switch": "EHs",
+    "comment": "Yes with Extern C functions",
+    "value": "SyncCThrow",
+    "flags": []
+  },
+  {
+    "name": "ExceptionHandling",
+    "switch": "",
+    "comment": "No",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "BasicRuntimeChecks",
+    "switch": "RTCs",
+    "comment": "Stack Frames",
+    "value": "StackFrameRuntimeCheck",
+    "flags": []
+  },
+  {
+    "name": "BasicRuntimeChecks",
+    "switch": "RTCu",
+    "comment": "Uninitialized variables",
+    "value": "UninitializedLocalUsageCheck",
+    "flags": []
+  },
+  {
+    "name": "BasicRuntimeChecks",
+    "switch": "RTC1",
+    "comment": "Both (/RTC1, equiv. to /RTCsu)",
+    "value": "EnableFastChecks",
+    "flags": []
+  },
+  {
+    "name": "BasicRuntimeChecks",
+    "switch": "",
+    "comment": "Default",
+    "value": "Default",
+    "flags": []
+  },
+  {
+    "name": "RuntimeLibrary",
+    "switch": "MT",
+    "comment": "Multi-threaded",
+    "value": "MultiThreaded",
+    "flags": []
+  },
+  {
+    "name": "RuntimeLibrary",
+    "switch": "MTd",
+    "comment": "Multi-threaded Debug",
+    "value": "MultiThreadedDebug",
+    "flags": []
+  },
+  {
+    "name": "RuntimeLibrary",
+    "switch": "MD",
+    "comment": "Multi-threaded DLL",
+    "value": "MultiThreadedDLL",
+    "flags": []
+  },
+  {
+    "name": "RuntimeLibrary",
+    "switch": "MDd",
+    "comment": "Multi-threaded Debug DLL",
+    "value": "MultiThreadedDebugDLL",
+    "flags": []
+  },
+  {
+    "name": "StructMemberAlignment",
+    "switch": "Zp1",
+    "comment": "1 Byte",
+    "value": "1Byte",
+    "flags": []
+  },
+  {
+    "name": "StructMemberAlignment",
+    "switch": "Zp2",
+    "comment": "2 Bytes",
+    "value": "2Bytes",
+    "flags": []
+  },
+  {
+    "name": "StructMemberAlignment",
+    "switch": "Zp4",
+    "comment": "4 Byte",
+    "value": "4Bytes",
+    "flags": []
+  },
+  {
+    "name": "StructMemberAlignment",
+    "switch": "Zp8",
+    "comment": "8 Bytes",
+    "value": "8Bytes",
+    "flags": []
+  },
+  {
+    "name": "StructMemberAlignment",
+    "switch": "Zp16",
+    "comment": "16 Bytes",
+    "value": "16Bytes",
+    "flags": []
+  },
+  {
+    "name": "StructMemberAlignment",
+    "switch": "",
+    "comment": "Default",
+    "value": "Default",
+    "flags": []
+  },
+  {
+    "name": "BufferSecurityCheck",
+    "switch": "GS-",
+    "comment": "Disable Security Check",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "BufferSecurityCheck",
+    "switch": "GS",
+    "comment": "Enable Security Check",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ControlFlowGuard",
+    "switch": "guard:cf",
+    "comment": "Yes",
+    "value": "Guard",
+    "flags": []
+  },
+  {
+    "name": "ControlFlowGuard",
+    "switch": "",
+    "comment": "No",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "arch:SSE",
+    "comment": "Streaming SIMD Extensions",
+    "value": "StreamingSIMDExtensions",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "arch:SSE2",
+    "comment": "Streaming SIMD Extensions 2",
+    "value": "StreamingSIMDExtensions2",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "arch:AVX",
+    "comment": "Advanced Vector Extensions",
+    "value": "AdvancedVectorExtensions",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "arch:AVX2",
+    "comment": "Advanced Vector Extensions 2",
+    "value": "AdvancedVectorExtensions2",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "arch:AVX512",
+    "comment": "Advanced Vector Extensions 512",
+    "value": "AdvancedVectorExtensions512",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "arch:IA32",
+    "comment": "No Enhanced Instructions",
+    "value": "NoExtensions",
+    "flags": []
+  },
+  {
+    "name": "EnableEnhancedInstructionSet",
+    "switch": "",
+    "comment": "Not Set",
+    "value": "NotSet",
+    "flags": []
+  },
+  {
+    "name": "FloatingPointModel",
+    "switch": "fp:precise",
+    "comment": "Precise",
+    "value": "Precise",
+    "flags": []
+  },
+  {
+    "name": "FloatingPointModel",
+    "switch": "fp:strict",
+    "comment": "Strict",
+    "value": "Strict",
+    "flags": []
+  },
+  {
+    "name": "FloatingPointModel",
+    "switch": "fp:fast",
+    "comment": "Fast",
+    "value": "Fast",
+    "flags": []
+  },
+  {
+    "name": "SpectreMitigation",
+    "switch": "Qspectre-load-cf",
+    "comment": "All Control Flow Loads",
+    "value": "SpectreLoadCF",
+    "flags": []
+  },
+  {
+    "name": "SpectreMitigation",
+    "switch": "Qspectre-load",
+    "comment": "All Loads",
+    "value": "SpectreLoad",
+    "flags": []
+  },
+  {
+    "name": "SpectreMitigation",
+    "switch": "Qspectre-",
+    "comment": "Disabled",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "SpectreMitigation",
+    "switch": "Qspectre",
+    "comment": "Enabled",
+    "value": "Spectre",
+    "flags": []
+  },
+  {
+    "name": "ConformanceMode",
+    "switch": "permissive-",
+    "comment": "Yes",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ConformanceMode",
+    "switch": "permissive",
+    "comment": "No",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "LanguageStandard",
+    "switch": "std:c++14",
+    "comment": "ISO C++14 Standard",
+    "value": "stdcpp14",
+    "flags": []
+  },
+  {
+    "name": "LanguageStandard",
+    "switch": "std:c++17",
+    "comment": "ISO C++17 Standard",
+    "value": "stdcpp17",
+    "flags": []
+  },
+  {
+    "name": "LanguageStandard",
+    "switch": "std:c++20",
+    "comment": "ISO C++20 Standard",
+    "value": "stdcpp20",
+    "flags": []
+  },
+  {
+    "name": "LanguageStandard",
+    "switch": "std:c++latest",
+    "comment": "Preview - Features from the Latest C++ Working Draft",
+    "value": "stdcpplatest",
+    "flags": []
+  },
+  {
+    "name": "LanguageStandard_C",
+    "switch": "std:c11",
+    "comment": "ISO C11 Standard",
+    "value": "stdc11",
+    "flags": []
+  },
+  {
+    "name": "LanguageStandard_C",
+    "switch": "std:c17",
+    "comment": "ISO C17 (2018) Standard",
+    "value": "stdc17",
+    "flags": []
+  },
+  {
+    "name": "PrecompiledHeader",
+    "switch": "Yc",
+    "comment": "Create",
+    "value": "Create",
+    "flags": [
+      "UserValue",
+      "UserIgnored",
+      "Continue"
+    ]
+  },
+  {
+    "name": "PrecompiledHeader",
+    "switch": "Yu",
+    "comment": "Use",
+    "value": "Use",
+    "flags": [
+      "UserValue",
+      "UserIgnored",
+      "Continue"
+    ]
+  },
+  {
+    "name": "PrecompiledHeader",
+    "switch": "Y-",
+    "comment": "Not Using Precompiled Headers",
+    "value": "NotUsing",
+    "flags": []
+  },
+  {
+    "name": "AssemblerOutput",
+    "switch": "",
+    "comment": "No Listing",
+    "value": "NoListing",
+    "flags": []
+  },
+  {
+    "name": "AssemblerOutput",
+    "switch": "FA",
+    "comment": "Assembly-Only Listing",
+    "value": "AssemblyCode",
+    "flags": []
+  },
+  {
+    "name": "AssemblerOutput",
+    "switch": "FAc",
+    "comment": "Assembly With Machine Code",
+    "value": "AssemblyAndMachineCode",
+    "flags": []
+  },
+  {
+    "name": "AssemblerOutput",
+    "switch": "FAs",
+    "comment": "Assembly With Source Code",
+    "value": "AssemblyAndSourceCode",
+    "flags": []
+  },
+  {
+    "name": "AssemblerOutput",
+    "switch": "FAcs",
+    "comment": "Assembly, Machine Code and Source",
+    "value": "All",
+    "flags": []
+  },
+  {
+    "name": "ExternalWarningLevel",
+    "switch": "external:W0",
+    "comment": "Turn Off All Warnings",
+    "value": "TurnOffAllWarnings",
+    "flags": []
+  },
+  {
+    "name": "ExternalWarningLevel",
+    "switch": "external:W1",
+    "comment": "Level1",
+    "value": "Level1",
+    "flags": []
+  },
+  {
+    "name": "ExternalWarningLevel",
+    "switch": "external:W2",
+    "comment": "Level2",
+    "value": "Level2",
+    "flags": []
+  },
+  {
+    "name": "ExternalWarningLevel",
+    "switch": "external:W3",
+    "comment": "Level3",
+    "value": "Level3",
+    "flags": []
+  },
+  {
+    "name": "ExternalWarningLevel",
+    "switch": "external:W4",
+    "comment": "Level4",
+    "value": "Level4",
+    "flags": []
+  },
+  {
+    "name": "CallingConvention",
+    "switch": "Gd",
+    "comment": "__cdecl",
+    "value": "Cdecl",
+    "flags": []
+  },
+  {
+    "name": "CallingConvention",
+    "switch": "Gr",
+    "comment": "__fastcall",
+    "value": "FastCall",
+    "flags": []
+  },
+  {
+    "name": "CallingConvention",
+    "switch": "Gz",
+    "comment": "__stdcall",
+    "value": "StdCall",
+    "flags": []
+  },
+  {
+    "name": "CallingConvention",
+    "switch": "Gv",
+    "comment": "__vectorcall",
+    "value": "VectorCall",
+    "flags": []
+  },
+  {
+    "name": "CompileAs",
+    "switch": "",
+    "comment": "Default",
+    "value": "Default",
+    "flags": []
+  },
+  {
+    "name": "CompileAs",
+    "switch": "TC",
+    "comment": "Compile as C Code",
+    "value": "CompileAsC",
+    "flags": []
+  },
+  {
+    "name": "CompileAs",
+    "switch": "TP",
+    "comment": "Compile as C++ Code",
+    "value": "CompileAsCpp",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:none",
+    "comment": "Do Not Send Report",
+    "value": "None",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:prompt",
+    "comment": "Prompt Immediately",
+    "value": "Prompt",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:queue",
+    "comment": "Queue For Next Login",
+    "value": "Queue",
+    "flags": []
+  },
+  {
+    "name": "ErrorReporting",
+    "switch": "errorReport:send",
+    "comment": "Send Automatically",
+    "value": "Send",
+    "flags": []
+  },
+  {
+    "name": "TranslateIncludes",
+    "switch": "translateInclude",
+    "comment": "Translate Includes to Imports",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SupportJustMyCode",
+    "switch": "JMC-",
+    "comment": "Support Just My Code Debugging",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "SupportJustMyCode",
+    "switch": "JMC",
+    "comment": "Support Just My Code Debugging",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "CompileAsWinRT",
+    "switch": "ZW",
+    "comment": "Consume Windows Runtime Extension",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "WinRTNoStdLib",
+    "switch": "ZW:nostdlib",
+    "comment": "No Standard WinRT Libraries",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SuppressStartupBanner",
+    "switch": "nologo",
+    "comment": "Suppress Startup Banner",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "TreatWarningAsError",
+    "switch": "WX-",
+    "comment": "Treat Warnings As Errors",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "TreatWarningAsError",
+    "switch": "WX",
+    "comment": "Treat Warnings As Errors",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SDLCheck",
+    "switch": "sdl-",
+    "comment": "SDL checks",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "SDLCheck",
+    "switch": "sdl",
+    "comment": "SDL checks",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "MultiProcessorCompilation",
+    "switch": "MP",
+    "comment": "Multi-processor Compilation",
+    "value": "true",
+    "flags": [
+      "UserValue",
+      "UserIgnored",
+      "Continue"
+    ]
+  },
+  {
+    "name": "IntrinsicFunctions",
+    "switch": "Oi",
+    "comment": "Enable Intrinsic Functions",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "OmitFramePointers",
+    "switch": "Oy-",
+    "comment": "Omit Frame Pointers",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "OmitFramePointers",
+    "switch": "Oy",
+    "comment": "Omit Frame Pointers",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnableFiberSafeOptimizations",
+    "switch": "GT",
+    "comment": "Enable Fiber-Safe Optimizations",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "WholeProgramOptimization",
+    "switch": "GL",
+    "comment": "Whole Program Optimization",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "UndefineAllPreprocessorDefinitions",
+    "switch": "u",
+    "comment": "Undefine All Preprocessor Definitions",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "IgnoreStandardIncludePath",
+    "switch": "X",
+    "comment": "Ignore Standard Include Paths",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "PreprocessToFile",
+    "switch": "P",
+    "comment": "Preprocess to a File",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "PreprocessSuppressLineNumbers",
+    "switch": "EP",
+    "comment": "Preprocess Suppress Line Numbers",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "PreprocessKeepComments",
+    "switch": "C",
+    "comment": "Keep Comments",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "UseStandardPreprocessor",
+    "switch": "Zc:preprocessor-",
+    "comment": "Use Standard Conforming Preprocessor",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "UseStandardPreprocessor",
+    "switch": "Zc:preprocessor",
+    "comment": "Use Standard Conforming Preprocessor",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "StringPooling",
+    "switch": "GF-",
+    "comment": "Enable String Pooling",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "StringPooling",
+    "switch": "GF",
+    "comment": "Enable String Pooling",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "MinimalRebuild",
+    "switch": "Gm-",
+    "comment": "Enable Minimal Rebuild",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "MinimalRebuild",
+    "switch": "Gm",
+    "comment": "Enable Minimal Rebuild",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SmallerTypeCheck",
+    "switch": "RTCc",
+    "comment": "Smaller Type Check",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "FunctionLevelLinking",
+    "switch": "Gy-",
+    "comment": "Enable Function-Level Linking",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "FunctionLevelLinking",
+    "switch": "Gy",
+    "comment": "Enable Function-Level Linking",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnableParallelCodeGeneration",
+    "switch": "Qpar-",
+    "comment": "Enable Parallel Code Generation",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "EnableParallelCodeGeneration",
+    "switch": "Qpar",
+    "comment": "Enable Parallel Code Generation",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "FloatingPointExceptions",
+    "switch": "fp:except-",
+    "comment": "Enable Floating Point Exceptions",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "FloatingPointExceptions",
+    "switch": "fp:except",
+    "comment": "Enable Floating Point Exceptions",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "CreateHotpatchableImage",
+    "switch": "hotpatch",
+    "comment": "Create Hotpatchable Image",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "IntelJCCErratum",
+    "switch": "QIntel-jcc-erratum",
+    "comment": "Enable Intel JCC Erratum Mitigation",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "GuardEHContMetadata",
+    "switch": "guard:ehcont-",
+    "comment": "Enable EH Continuation Metadata",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "GuardEHContMetadata",
+    "switch": "guard:ehcont",
+    "comment": "Enable EH Continuation Metadata",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "GuardSignedReturns",
+    "switch": "guard:signret-",
+    "comment": "Enable Signed Returns",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "GuardSignedReturns",
+    "switch": "guard:signret",
+    "comment": "Enable Signed Returns",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "DisableLanguageExtensions",
+    "switch": "Za",
+    "comment": "Disable Language Extensions",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "TreatWChar_tAsBuiltInType",
+    "switch": "Zc:wchar_t-",
+    "comment": "Treat WChar_t As Built in Type",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "TreatWChar_tAsBuiltInType",
+    "switch": "Zc:wchar_t",
+    "comment": "Treat WChar_t As Built in Type",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ForceConformanceInForLoopScope",
+    "switch": "Zc:forScope-",
+    "comment": "Force Conformance in For Loop Scope",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "ForceConformanceInForLoopScope",
+    "switch": "Zc:forScope",
+    "comment": "Force Conformance in For Loop Scope",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "RemoveUnreferencedCodeData",
+    "switch": "Zc:inline-",
+    "comment": "Remove unreferenced code and data",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "RemoveUnreferencedCodeData",
+    "switch": "Zc:inline",
+    "comment": "Remove unreferenced code and data",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnforceTypeConversionRules",
+    "switch": "Zc:rvalueCast-",
+    "comment": "Enforce type conversion rules",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "EnforceTypeConversionRules",
+    "switch": "Zc:rvalueCast",
+    "comment": "Enforce type conversion rules",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "RuntimeTypeInfo",
+    "switch": "GR-",
+    "comment": "Enable Run-Time Type Information",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "RuntimeTypeInfo",
+    "switch": "GR",
+    "comment": "Enable Run-Time Type Information",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "OpenMPSupport",
+    "switch": "openmp-",
+    "comment": "Open MP Support",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "OpenMPSupport",
+    "switch": "openmp",
+    "comment": "Open MP Support",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnableModules",
+    "switch": "experimental:module",
+    "comment": "Enable Experimental C++ Standard Library Modules",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ExpandAttributedSource",
+    "switch": "Fx",
+    "comment": "Expand Attributed Source",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "UseUnicodeForAssemblerListing",
+    "switch": "FAu",
+    "comment": "Use Unicode For Assembler Listing",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "GenerateModuleDependencies",
+    "switch": "sourceDependencies:directives",
+    "comment": "Generate Module Dependenices File",
+    "value": "true",
+    "flags": [
+      "Continue"
+    ]
+  },
+  {
+    "name": "GenerateXMLDocumentationFiles",
+    "switch": "doc",
+    "comment": "Generate XML Documentation Files",
+    "value": "true",
+    "flags": [
+      "UserValue",
+      "UserIgnored",
+      "Continue"
+    ]
+  },
+  {
+    "name": "GenerateSourceDependencies",
+    "switch": "sourceDependencies",
+    "comment": "Generate Source Dependencies File",
+    "value": "true",
+    "flags": [
+      "Continue"
+    ]
+  },
+  {
+    "name": "BrowseInformation",
+    "switch": "FR",
+    "comment": "Enable Browse Information",
+    "value": "true",
+    "flags": [
+      "UserValue",
+      "UserIgnored",
+      "Continue"
+    ]
+  },
+  {
+    "name": "TreatAngleIncludeAsExternal",
+    "switch": "external:anglebrackets",
+    "comment": "Treat Files Included with Angle Brackets as External",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ExternalTemplatesDiagnostics",
+    "switch": "external:templates-",
+    "comment": "Template Diagnostics in External Headers",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "DisableAnalyzeExternal",
+    "switch": "analyze:external-",
+    "comment": "Disable Code Analysis for External Headers",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ShowIncludes",
+    "switch": "showIncludes",
+    "comment": "Show Includes",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnablePREfast",
+    "switch": "analyze-",
+    "comment": "Enable Code Analysis",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "EnablePREfast",
+    "switch": "analyze",
+    "comment": "Enable Code Analysis",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "UseFullPaths",
+    "switch": "FC",
+    "comment": "Use Full Paths",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "OmitDefaultLibName",
+    "switch": "Zl",
+    "comment": "Omit Default Library Name",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "AdditionalIncludeDirectories",
+    "switch": "I",
+    "comment": "Additional Include Directories",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AdditionalUsingDirectories",
+    "switch": "AI",
+    "comment": "Additional #using Directories",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AdditionalBMIDirectories",
+    "switch": "ifcSearchDir",
+    "comment": "Additional BMI Directories",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AdditionalModuleDependencies",
+    "switch": "reference",
+    "comment": "Additional Module Dependencies",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AdditionalHeaderUnitDependencies",
+    "switch": "headerUnit",
+    "comment": "Additional Header Unit Dependencies",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "PreprocessorDefinitions",
+    "switch": "D",
+    "comment": "Preprocessor Definitions",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "UndefinePreprocessorDefinitions",
+    "switch": "U",
+    "comment": "Undefine Preprocessor Definitions",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "StdIfcDirectory",
+    "switch": "stdIfcDir",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "ExternalDirectoriesEnv",
+    "switch": "external:env:",
+    "comment": "External Directories Environment Variables",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "DisableSpecificWarnings",
+    "switch": "wd",
+    "comment": "Disable Specific Warnings",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "ForcedIncludeFiles",
+    "switch": "FI",
+    "comment": "Forced Include File",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "ForcedUsingFiles",
+    "switch": "FU",
+    "comment": "Forced #using File",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "PREfastLog",
+    "switch": "analyze:log",
+    "comment": "Code Analysis Log",
+    "value": "",
+    "flags": [
+      "UserFollowing"
+    ]
+  },
+  {
+    "name": "PREfastAdditionalPlugins",
+    "switch": "analyze:plugin",
+    "comment": "Additional Code Analysis Native plugins",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "TreatSpecificWarningsAsErrors",
+    "switch": "we",
+    "comment": "Treat Specific Warnings As Errors",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "WarningVersion",
+    "switch": "Wv:",
+    "comment": "Warning Version",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "PreprocessOutputPath",
+    "switch": "Fi",
+    "comment": "Preprocess Output Path",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "PrecompiledHeaderFile",
+    "switch": "Yu",
+    "comment": "Precompiled Header File",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "PrecompiledHeaderFile",
+    "switch": "Yc",
+    "comment": "Precompiled Header File",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "PrecompiledHeaderOutputFile",
+    "switch": "Fp",
+    "comment": "Precompiled Header Output File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "AssemblerListingLocation",
+    "switch": "Fa",
+    "comment": "ASM List Location",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ModuleOutputFile",
+    "switch": "ifcOutput",
+    "comment": "Module Output File Name",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ModuleDependenciesFile",
+    "switch": "sourceDependencies:directives",
+    "comment": "Module Dependencies File Name",
+    "value": "",
+    "flags": [
+      "UserFollowing"
+    ]
+  },
+  {
+    "name": "ObjectFileName",
+    "switch": "Fo",
+    "comment": "Object File Name",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ProgramDataBaseFileName",
+    "switch": "Fd",
+    "comment": "Program Database File Name",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "XMLDocumentationFileName",
+    "switch": "doc",
+    "comment": "XML Documentation File Name",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "SourceDependenciesFile",
+    "switch": "sourceDependencies",
+    "comment": "Source Dependencies File Name",
+    "value": "",
+    "flags": [
+      "UserFollowing"
+    ]
+  },
+  {
+    "name": "BrowseInformationFile",
+    "switch": "FR",
+    "comment": "Browse Information File",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "PREfastProjectDirectory",
+    "switch": "analyze:projectdirectory",
+    "comment": "Code Analysis Project Directory",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "PREfastRulesetDirectories",
+    "switch": "analyze:rulesetdirectory",
+    "comment": "Code Analysis Ruleset Directories",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "PREfastRulesetFile",
+    "switch": "analyze:ruleset",
+    "comment": "Code Analysis Ruleset File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ProcessorNumber",
+    "switch": "MP",
+    "comment": "Number of processors",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  }
+]
diff --git a/Templates/MSBuild/FlagTables/v143_CSharp.json b/Templates/MSBuild/FlagTables/v143_CSharp.json
new file mode 100644 (file)
index 0000000..ae1bd47
--- /dev/null
@@ -0,0 +1,553 @@
+[
+  {
+    "name":  "ProjectName",
+    "switch": "out:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name":  "OutputType",
+    "switch": "target:exe",
+    "comment": "",
+    "value": "Exe",
+    "flags": []
+  },
+  {
+    "name":  "OutputType",
+    "switch": "target:winexe",
+    "comment": "",
+    "value": "Winexe",
+    "flags": []
+  },
+  {
+    "name":  "OutputType",
+    "switch": "target:library",
+    "comment": "",
+    "value": "Library",
+    "flags": []
+  },
+  {
+    "name":  "OutputType",
+    "switch": "target:module",
+    "comment": "",
+    "value": "Module",
+    "flags": []
+  },
+  {
+    "name":  "DocumentationFile",
+    "switch": "doc",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name":  "Platform",
+    "switch": "platform:x86",
+    "comment": "",
+    "value": "x86",
+    "flags": []
+  },
+  {
+    "name":  "Platform",
+    "switch": "platform:Itanium",
+    "comment": "",
+    "value": "Itanium",
+    "flags": []
+  },
+  {
+    "name":  "Platform",
+    "switch": "platform:x64",
+    "comment": "",
+    "value": "x64",
+    "flags": []
+  },
+  {
+    "name":  "Platform",
+    "switch": "platform:arm",
+    "comment": "",
+    "value": "arm",
+    "flags": []
+  },
+  {
+    "name":  "Platform",
+    "switch": "platform:anycpu32bitpreferred",
+    "comment": "",
+    "value": "anycpu32bitpreferred",
+    "flags": []
+  },
+  {
+    "name":  "Platform",
+    "switch": "platform:anycpu",
+    "comment": "",
+    "value": "anycpu",
+    "flags": []
+  },
+  {
+    "name":  "References",
+    "switch": "reference:",
+    "comment": "mit alias",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "References",
+    "switch": "reference:",
+    "comment": "dateiliste",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "AddModules",
+    "switch": "addmodule:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name":  "Win32Resource",
+    "switch": "win32res:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name":  "ApplicationIcon",
+    "switch": "win32icon:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name":  "ApplicationManifest",
+    "switch": "win32manifest:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name":  "NoWin32Manifest",
+    "switch": "nowin32manifest",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "DefineDebug",
+    "switch": "debug",
+    "comment": "",
+    "value": "true",
+    "flags": [
+      "Continue"
+    ]
+  },
+  {
+    "name":  "DebugSymbols",
+    "switch": "debug",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "DebugSymbols",
+    "switch": "debug-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "DebugSymbols",
+    "switch": "debug+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "DebugType",
+    "switch": "debug:none",
+    "comment": "",
+    "value": "none",
+    "flags": []
+  },
+  {
+    "name":  "DebugType",
+    "switch": "debug:full",
+    "comment": "",
+    "value": "full",
+    "flags": []
+  },
+  {
+    "name":  "DebugType",
+    "switch": "debug:pdbonly",
+    "comment": "",
+    "value": "pdbonly",
+    "flags": []
+  },
+  {
+    "name":  "DebugType",
+    "switch": "debug:portable",
+    "comment": "",
+    "value": "portable",
+    "flags": []
+  },
+  {
+    "name":  "Optimize",
+    "switch": "optimize",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "Optimize",
+    "switch": "optimize-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "Optimize",
+    "switch": "optimize+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "TreatWarningsAsErrors",
+    "switch": "warnaserror",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "TreatWarningsAsErrors",
+    "switch": "warnaserror-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "TreatWarningsAsErrors",
+    "switch": "warnaserror+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "WarningsAsErrors",
+    "switch": "warnaserror",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "WarningsAsErrors",
+    "switch": "warnaserror-",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "WarningsAsErrors",
+    "switch": "warnaserror+",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "WarningsAsErrors",
+    "switch": "warnaserror:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired",
+      "CommaAppendable"
+    ]
+  },
+  {
+    "name":  "WarningLevel",
+    "switch": "warn:0",
+    "comment": "",
+    "value": "0",
+    "flags": []
+  },
+  {
+    "name":  "WarningLevel",
+    "switch": "warn:1",
+    "comment": "",
+    "value": "1",
+    "flags": []
+  },
+  {
+    "name":  "WarningLevel",
+    "switch": "warn:2",
+    "comment": "",
+    "value": "2",
+    "flags": []
+  },
+  {
+    "name":  "WarningLevel",
+    "switch": "warn:3",
+    "comment": "",
+    "value": "3",
+    "flags": []
+  },
+  {
+    "name":  "WarningLevel",
+    "switch": "warn:4",
+    "comment": "",
+    "value": "4",
+    "flags": []
+  },
+  {
+    "name":  "NoWarn",
+    "switch": "nowarn:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired",
+      "CommaAppendable"
+    ]
+  },
+  {
+    "name":  "CheckForOverflowUnderflow",
+    "switch": "checked",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "CheckForOverflowUnderflow",
+    "switch": "checked-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "CheckForOverflowUnderflow",
+    "switch": "checked+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "AllowUnsafeBlocks",
+    "switch": "unsafe",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "AllowUnsafeBlocks",
+    "switch": "unsafe-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "AllowUnsafeBlocks",
+    "switch": "unsafe+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "DefineConstants",
+    "switch": "define:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "SemicolonAppendable",
+      "UserValue"
+    ]
+  },
+  {
+    "name":  "LangVersion",
+    "switch": "langversion:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name":  "DelaySign",
+    "switch": "delaysign",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "DelaySign",
+    "switch": "delaysign-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "DelaySign",
+    "switch": "delaysign+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "AssemblyOriginatorKeyFile",
+    "switch": "keyfile",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "KeyContainerName",
+    "switch": "keycontainer",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "NoLogo",
+    "switch": "nologo",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "NoConfig",
+    "switch": "noconfig",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "BaseAddress",
+    "switch": "baseaddress:",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "CodePage",
+    "switch": "codepage",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "Utf8Output",
+    "switch": "utf8output",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "MainEntryPoint",
+    "switch": "main:",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "GenerateFullPaths",
+    "switch": "fullpaths",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "FileAlignment",
+    "switch": "filealign",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "PdbFile",
+    "switch": "pdb:",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "NoStandardLib",
+    "switch": "nostdlib",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "NoStandardLib",
+    "switch": "nostdlib-",
+    "comment": "",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name":  "NoStandardLib",
+    "switch": "nostdlib+",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name":  "SubsystemVersion",
+    "switch": "subsystemversion",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "AdditionalLibPaths",
+    "switch": "lib:",
+    "comment": "",
+    "value": "",
+    "flags": []
+  },
+  {
+    "name":  "ErrorReport",
+    "switch": "errorreport:none",
+    "comment": "Do Not Send Report",
+    "value": "none",
+    "flags": []
+  },
+  {
+    "name":  "ErrorReport",
+    "switch": "errorreport:prompt",
+    "comment": "Prompt Immediately",
+    "value": "prompt",
+    "flags": []
+  },
+  {
+    "name":  "ErrorReport",
+    "switch": "errorreport:queue",
+    "comment": "Queue For Next Login",
+    "value": "queue",
+    "flags": []
+  },
+  {
+    "name":  "ErrorReport",
+    "switch": "errorreport:send",
+    "comment": "Send Automatically",
+    "value": "send",
+    "flags": []
+  }
+]
diff --git a/Templates/MSBuild/FlagTables/v143_Link.json b/Templates/MSBuild/FlagTables/v143_Link.json
new file mode 100644 (file)
index 0000000..71d58f8
--- /dev/null
@@ -0,0 +1,1407 @@
+[
+  {
+    "name": "ShowProgress",
+    "switch": "",
+    "comment": "Not Set",
+    "value": "NotSet",
+    "flags": []
+  },
+  {
+    "name": "ShowProgress",
+    "switch": "VERBOSE",
+    "comment": "Display all progress messages",
+    "value": "LinkVerbose",
+    "flags": []
+  },
+  {
+    "name": "ShowProgress",
+    "switch": "VERBOSE:Lib",
+    "comment": "For Libraries Searched",
+    "value": "LinkVerboseLib",
+    "flags": []
+  },
+  {
+    "name": "ShowProgress",
+    "switch": "VERBOSE:ICF",
+    "comment": "About COMDAT folding during optimized linking",
+    "value": "LinkVerboseICF",
+    "flags": []
+  },
+  {
+    "name": "ShowProgress",
+    "switch": "VERBOSE:REF",
+    "comment": "About data removed during optimized linking",
+    "value": "LinkVerboseREF",
+    "flags": []
+  },
+  {
+    "name": "ShowProgress",
+    "switch": "VERBOSE:SAFESEH",
+    "comment": "About Modules incompatible with SEH",
+    "value": "LinkVerboseSAFESEH",
+    "flags": []
+  },
+  {
+    "name": "ShowProgress",
+    "switch": "VERBOSE:CLR",
+    "comment": "About linker activity related to managed code",
+    "value": "LinkVerboseCLR",
+    "flags": []
+  },
+  {
+    "name": "ForceFileOutput",
+    "switch": "FORCE",
+    "comment": "Enabled",
+    "value": "Enabled",
+    "flags": []
+  },
+  {
+    "name": "ForceFileOutput",
+    "switch": "FORCE:MULTIPLE",
+    "comment": "Multiply Defined Symbol Only",
+    "value": "MultiplyDefinedSymbolOnly",
+    "flags": []
+  },
+  {
+    "name": "ForceFileOutput",
+    "switch": "FORCE:UNRESOLVED",
+    "comment": "Undefined Symbol Only",
+    "value": "UndefinedSymbolOnly",
+    "flags": []
+  },
+  {
+    "name": "CreateHotPatchableImage",
+    "switch": "FUNCTIONPADMIN",
+    "comment": "Enabled",
+    "value": "Enabled",
+    "flags": []
+  },
+  {
+    "name": "CreateHotPatchableImage",
+    "switch": "FUNCTIONPADMIN:5",
+    "comment": "X86 Image Only",
+    "value": "X86Image",
+    "flags": []
+  },
+  {
+    "name": "CreateHotPatchableImage",
+    "switch": "FUNCTIONPADMIN:6",
+    "comment": "X64 Image Only",
+    "value": "X64Image",
+    "flags": []
+  },
+  {
+    "name": "CreateHotPatchableImage",
+    "switch": "FUNCTIONPADMIN:16",
+    "comment": "Itanium Image Only",
+    "value": "ItaniumImage",
+    "flags": []
+  },
+  {
+    "name": "UACExecutionLevel",
+    "switch": "level='asInvoker'",
+    "comment": "asInvoker",
+    "value": "AsInvoker",
+    "flags": []
+  },
+  {
+    "name": "UACExecutionLevel",
+    "switch": "level='highestAvailable'",
+    "comment": "highestAvailable",
+    "value": "HighestAvailable",
+    "flags": []
+  },
+  {
+    "name": "UACExecutionLevel",
+    "switch": "level='requireAdministrator'",
+    "comment": "requireAdministrator",
+    "value": "RequireAdministrator",
+    "flags": []
+  },
+  {
+    "name": "GenerateDebugInformation",
+    "switch": "DEBUG",
+    "comment": "Generate Debug Information",
+    "value": "true",
+    "flags": [
+      "CaseInsensitive"
+    ]
+  },
+  {
+    "name": "GenerateDebugInformation",
+    "switch": "DEBUG:FASTLINK",
+    "comment": "Generate Debug Information optimized for faster links",
+    "value": "DebugFastLink",
+    "flags": [
+      "CaseInsensitive"
+    ]
+  },
+  {
+    "name": "GenerateDebugInformation",
+    "switch": "DEBUG:FULL",
+    "comment": "Generate Debug Information optimized for sharing and publishing",
+    "value": "DebugFull",
+    "flags": [
+      "CaseInsensitive"
+    ]
+  },
+  {
+    "name": "GenerateDebugInformation",
+    "switch": "DEBUG:NONE",
+    "comment": "Produces no debugging information",
+    "value": "false",
+    "flags": [
+      "CaseInsensitive"
+    ]
+  },
+  {
+    "name": "SubSystem",
+    "switch": "",
+    "comment": "Not Set",
+    "value": "NotSet",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:CONSOLE",
+    "comment": "Console",
+    "value": "Console",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:WINDOWS",
+    "comment": "Windows",
+    "value": "Windows",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:NATIVE",
+    "comment": "Native",
+    "value": "Native",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:EFI_APPLICATION",
+    "comment": "EFI Application",
+    "value": "EFI Application",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER",
+    "comment": "EFI Boot Service Driver",
+    "value": "EFI Boot Service Driver",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:EFI_ROM",
+    "comment": "EFI ROM",
+    "value": "EFI ROM",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:EFI_RUNTIME_DRIVER",
+    "comment": "EFI Runtime",
+    "value": "EFI Runtime",
+    "flags": []
+  },
+  {
+    "name": "SubSystem",
+    "switch": "SUBSYSTEM:POSIX",
+    "comment": "POSIX",
+    "value": "POSIX",
+    "flags": []
+  },
+  {
+    "name": "Driver",
+    "switch": "",
+    "comment": "Not Set",
+    "value": "NotSet",
+    "flags": []
+  },
+  {
+    "name": "Driver",
+    "switch": "Driver",
+    "comment": "Driver",
+    "value": "Driver",
+    "flags": []
+  },
+  {
+    "name": "Driver",
+    "switch": "DRIVER:UPONLY",
+    "comment": "UP Only",
+    "value": "UpOnly",
+    "flags": []
+  },
+  {
+    "name": "Driver",
+    "switch": "DRIVER:WDM",
+    "comment": "WDM",
+    "value": "WDM",
+    "flags": []
+  },
+  {
+    "name": "LinkTimeCodeGeneration",
+    "switch": "",
+    "comment": "Default",
+    "value": "Default",
+    "flags": []
+  },
+  {
+    "name": "LinkTimeCodeGeneration",
+    "switch": "LTCG:incremental",
+    "comment": "Use Fast Link Time Code Generation",
+    "value": "UseFastLinkTimeCodeGeneration",
+    "flags": []
+  },
+  {
+    "name": "LinkTimeCodeGeneration",
+    "switch": "LTCG",
+    "comment": "Use Link Time Code Generation",
+    "value": "UseLinkTimeCodeGeneration",
+    "flags": []
+  },
+  {
+    "name": "LinkTimeCodeGeneration",
+    "switch": "LTCG:PGInstrument",
+    "comment": "Profile Guided Optimization - Instrument",
+    "value": "PGInstrument",
+    "flags": []
+  },
+  {
+    "name": "LinkTimeCodeGeneration",
+    "switch": "LTCG:PGOptimize",
+    "comment": "Profile Guided Optimization - Optimization",
+    "value": "PGOptimization",
+    "flags": []
+  },
+  {
+    "name": "LinkTimeCodeGeneration",
+    "switch": "LTCG:PGUpdate",
+    "comment": "Profile Guided Optimization - Update",
+    "value": "PGUpdate",
+    "flags": []
+  },
+  {
+    "name": "GenerateWindowsMetadata",
+    "switch": "WINMD",
+    "comment": "Yes",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "GenerateWindowsMetadata",
+    "switch": "WINMD:NO",
+    "comment": "No",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "WindowsMetadataSignHash",
+    "switch": "WINMDSIGNHASH:SHA1",
+    "comment": "SHA1",
+    "value": "SHA1",
+    "flags": []
+  },
+  {
+    "name": "WindowsMetadataSignHash",
+    "switch": "WINMDSIGNHASH:SHA256",
+    "comment": "SHA256",
+    "value": "SHA256",
+    "flags": []
+  },
+  {
+    "name": "WindowsMetadataSignHash",
+    "switch": "WINMDSIGNHASH:SHA384",
+    "comment": "SHA384",
+    "value": "SHA384",
+    "flags": []
+  },
+  {
+    "name": "WindowsMetadataSignHash",
+    "switch": "WINMDSIGNHASH:SHA512",
+    "comment": "SHA512",
+    "value": "SHA512",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "",
+    "comment": "Not Set",
+    "value": "NotSet",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:ARM",
+    "comment": "MachineARM",
+    "value": "MachineARM",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:ARM64",
+    "comment": "MachineARM64",
+    "value": "MachineARM64",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:ARM64EC",
+    "comment": "MachineARM64EC",
+    "value": "MachineARM64EC",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:ARM64X",
+    "comment": "MachineARM64X",
+    "value": "MachineARM64X",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:EBC",
+    "comment": "MachineEBC",
+    "value": "MachineEBC",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:IA64",
+    "comment": "MachineIA64",
+    "value": "MachineIA64",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:MIPS",
+    "comment": "MachineMIPS",
+    "value": "MachineMIPS",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:MIPS16",
+    "comment": "MachineMIPS16",
+    "value": "MachineMIPS16",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:MIPSFPU",
+    "comment": "MachineMIPSFPU",
+    "value": "MachineMIPSFPU",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:MIPSFPU16",
+    "comment": "MachineMIPSFPU16",
+    "value": "MachineMIPSFPU16",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:SH4",
+    "comment": "MachineSH4",
+    "value": "MachineSH4",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:THUMB",
+    "comment": "MachineTHUMB",
+    "value": "MachineTHUMB",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:X64",
+    "comment": "MachineX64",
+    "value": "MachineX64",
+    "flags": []
+  },
+  {
+    "name": "TargetMachine",
+    "switch": "MACHINE:X86",
+    "comment": "MachineX86",
+    "value": "MachineX86",
+    "flags": []
+  },
+  {
+    "name": "CLRThreadAttribute",
+    "switch": "CLRTHREADATTRIBUTE:MTA",
+    "comment": "MTA threading attribute",
+    "value": "MTAThreadingAttribute",
+    "flags": []
+  },
+  {
+    "name": "CLRThreadAttribute",
+    "switch": "CLRTHREADATTRIBUTE:STA",
+    "comment": "STA threading attribute",
+    "value": "STAThreadingAttribute",
+    "flags": []
+  },
+  {
+    "name": "CLRThreadAttribute",
+    "switch": "CLRTHREADATTRIBUTE:NONE",
+    "comment": "Default threading attribute",
+    "value": "DefaultThreadingAttribute",
+    "flags": []
+  },
+  {
+    "name": "CLRImageType",
+    "switch": "CLRIMAGETYPE:IJW",
+    "comment": "Force IJW image",
+    "value": "ForceIJWImage",
+    "flags": []
+  },
+  {
+    "name": "CLRImageType",
+    "switch": "CLRIMAGETYPE:PURE",
+    "comment": "Force Pure IL Image",
+    "value": "ForcePureILImage",
+    "flags": []
+  },
+  {
+    "name": "CLRImageType",
+    "switch": "CLRIMAGETYPE:SAFE",
+    "comment": "Force Safe IL Image",
+    "value": "ForceSafeILImage",
+    "flags": []
+  },
+  {
+    "name": "CLRImageType",
+    "switch": "",
+    "comment": "Default image type",
+    "value": "Default",
+    "flags": []
+  },
+  {
+    "name": "SignHash",
+    "switch": "CLRSIGNHASH:SHA1",
+    "comment": "SHA1",
+    "value": "SHA1",
+    "flags": []
+  },
+  {
+    "name": "SignHash",
+    "switch": "CLRSIGNHASH:SHA256",
+    "comment": "SHA256",
+    "value": "SHA256",
+    "flags": []
+  },
+  {
+    "name": "SignHash",
+    "switch": "CLRSIGNHASH:SHA384",
+    "comment": "SHA384",
+    "value": "SHA384",
+    "flags": []
+  },
+  {
+    "name": "SignHash",
+    "switch": "CLRSIGNHASH:SHA512",
+    "comment": "SHA512",
+    "value": "SHA512",
+    "flags": []
+  },
+  {
+    "name": "LinkErrorReporting",
+    "switch": "ERRORREPORT:PROMPT",
+    "comment": "PromptImmediately",
+    "value": "PromptImmediately",
+    "flags": []
+  },
+  {
+    "name": "LinkErrorReporting",
+    "switch": "ERRORREPORT:QUEUE",
+    "comment": "Queue For Next Login",
+    "value": "QueueForNextLogin",
+    "flags": []
+  },
+  {
+    "name": "LinkErrorReporting",
+    "switch": "ERRORREPORT:SEND",
+    "comment": "Send Error Report",
+    "value": "SendErrorReport",
+    "flags": []
+  },
+  {
+    "name": "LinkErrorReporting",
+    "switch": "ERRORREPORT:NONE",
+    "comment": "No Error Report",
+    "value": "NoErrorReport",
+    "flags": []
+  },
+  {
+    "name": "CLRSupportLastError",
+    "switch": "CLRSupportLastError",
+    "comment": "Enabled",
+    "value": "Enabled",
+    "flags": []
+  },
+  {
+    "name": "CLRSupportLastError",
+    "switch": "CLRSupportLastError:NO",
+    "comment": "Disabled",
+    "value": "Disabled",
+    "flags": []
+  },
+  {
+    "name": "CLRSupportLastError",
+    "switch": "CLRSupportLastError:SYSTEMDLL",
+    "comment": "System Dlls Only",
+    "value": "SystemDlls",
+    "flags": []
+  },
+  {
+    "name": "LinkIncremental",
+    "switch": "INCREMENTAL:NO",
+    "comment": "Enable Incremental Linking",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "LinkIncremental",
+    "switch": "INCREMENTAL",
+    "comment": "Enable Incremental Linking",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SuppressStartupBanner",
+    "switch": "NOLOGO",
+    "comment": "Suppress Startup Banner",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LinkStatus",
+    "switch": "LTCG:NOSTATUS",
+    "comment": "Link Status",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "LinkStatus",
+    "switch": "LTCG:STATUS",
+    "comment": "Link Status",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "PreventDllBinding",
+    "switch": "ALLOWBIND:NO",
+    "comment": "Prevent Dll Binding",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "PreventDllBinding",
+    "switch": "ALLOWBIND",
+    "comment": "Prevent Dll Binding",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "TreatLinkerWarningAsErrors",
+    "switch": "WX:NO",
+    "comment": "Treat Linker Warning As Errors",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "TreatLinkerWarningAsErrors",
+    "switch": "WX",
+    "comment": "Treat Linker Warning As Errors",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "IgnoreAllDefaultLibraries",
+    "switch": "NODEFAULTLIB",
+    "comment": "Ignore All Default Libraries",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "GenerateManifest",
+    "switch": "MANIFEST:NO",
+    "comment": "Generate Manifest",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "GenerateManifest",
+    "switch": "MANIFEST",
+    "comment": "Generate Manifest",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "AllowIsolation",
+    "switch": "ALLOWISOLATION:NO",
+    "comment": "Allow Isolation",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "AllowIsolation",
+    "switch": "",
+    "comment": "Allow Isolation",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnableUAC",
+    "switch": "MANIFESTUAC:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired",
+      "SpaceAppendable"
+    ]
+  },
+  {
+    "name": "UACUIAccess",
+    "switch": "uiAccess='false'",
+    "comment": "UAC Bypass UI Protection",
+    "value": "false",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "UACUIAccess",
+    "switch": "uiAccess='false'",
+    "comment": "UAC Bypass UI Protection",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "UACUIAccess",
+    "switch": "uiAccess='true'",
+    "comment": "UAC Bypass UI Protection",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ManifestEmbed",
+    "switch": "manifest:embed",
+    "comment": "Embed Manifest",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "GenerateMapFile",
+    "switch": "MAP",
+    "comment": "Generate Map File",
+    "value": "true",
+    "flags": [
+      "UserValue",
+      "UserIgnored",
+      "Continue"
+    ]
+  },
+  {
+    "name": "MapExports",
+    "switch": "MAPINFO:EXPORTS",
+    "comment": "Map Exports",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "AssemblyDebug",
+    "switch": "ASSEMBLYDEBUG:DISABLE",
+    "comment": "Debuggable Assembly",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "AssemblyDebug",
+    "switch": "ASSEMBLYDEBUG",
+    "comment": "Debuggable Assembly",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LargeAddressAware",
+    "switch": "LARGEADDRESSAWARE:NO",
+    "comment": "Enable Large Addresses",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "LargeAddressAware",
+    "switch": "LARGEADDRESSAWARE",
+    "comment": "Enable Large Addresses",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "TerminalServerAware",
+    "switch": "TSAWARE:NO",
+    "comment": "Terminal Server",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "TerminalServerAware",
+    "switch": "TSAWARE",
+    "comment": "Terminal Server",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SwapRunFromCD",
+    "switch": "SWAPRUN:CD",
+    "comment": "Swap Run From CD",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SwapRunFromNET",
+    "switch": "SWAPRUN:NET",
+    "comment": "Swap Run From Network",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "OptimizeReferences",
+    "switch": "OPT:NOREF",
+    "comment": "References",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "OptimizeReferences",
+    "switch": "OPT:REF",
+    "comment": "References",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "EnableCOMDATFolding",
+    "switch": "OPT:NOICF",
+    "comment": "Enable COMDAT Folding",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "EnableCOMDATFolding",
+    "switch": "OPT:ICF",
+    "comment": "Enable COMDAT Folding",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "IgnoreEmbeddedIDL",
+    "switch": "IGNOREIDL",
+    "comment": "Ignore Embedded IDL",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "AppContainer",
+    "switch": "APPCONTAINER",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "WindowsMetadataLinkDelaySign",
+    "switch": "WINMDDELAYSIGN:NO",
+    "comment": "Windows Metadata Delay Sign",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "WindowsMetadataLinkDelaySign",
+    "switch": "WINMDDELAYSIGN",
+    "comment": "Windows Metadata Delay Sign",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "NoEntryPoint",
+    "switch": "NOENTRY",
+    "comment": "No Entry Point",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SetChecksum",
+    "switch": "RELEASE",
+    "comment": "Set Checksum",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "RandomizedBaseAddress",
+    "switch": "DYNAMICBASE:NO",
+    "comment": "Randomized Base Address",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "RandomizedBaseAddress",
+    "switch": "DYNAMICBASE",
+    "comment": "Randomized Base Address",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "FixedBaseAddress",
+    "switch": "FIXED:NO",
+    "comment": "Fixed Base Address",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "FixedBaseAddress",
+    "switch": "FIXED",
+    "comment": "Fixed Base Address",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "DataExecutionPrevention",
+    "switch": "NXCOMPAT:NO",
+    "comment": "Data Execution Prevention (DEP)",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "DataExecutionPrevention",
+    "switch": "NXCOMPAT",
+    "comment": "Data Execution Prevention (DEP)",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "TurnOffAssemblyGeneration",
+    "switch": "NOASSEMBLY",
+    "comment": "Turn Off Assembly Generation",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SupportUnloadOfDelayLoadedDLL",
+    "switch": "DELAY:UNLOAD",
+    "comment": "Unload delay loaded DLL",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "SupportNobindOfDelayLoadedDLL",
+    "switch": "DELAY:NOBIND",
+    "comment": "Nobind delay loaded DLL",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "Profile",
+    "switch": "PROFILE",
+    "comment": "Profile",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LinkDelaySign",
+    "switch": "DELAYSIGN:NO",
+    "comment": "Delay Sign",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "LinkDelaySign",
+    "switch": "DELAYSIGN",
+    "comment": "Delay Sign",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "CLRUnmanagedCodeCheck",
+    "switch": "CLRUNMANAGEDCODECHECK:NO",
+    "comment": "CLR Unmanaged Code Check",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "CLRUnmanagedCodeCheck",
+    "switch": "CLRUNMANAGEDCODECHECK",
+    "comment": "CLR Unmanaged Code Check",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "DetectOneDefinitionRule",
+    "switch": "ODR",
+    "comment": "Detect One Definition Rule violations",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "CETCompat",
+    "switch": "CETCOMPAT:NO",
+    "comment": "CET Shadow Stack Compatible",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "CETCompat",
+    "switch": "CETCOMPAT",
+    "comment": "CET Shadow Stack Compatible",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "ImageHasSafeExceptionHandlers",
+    "switch": "SAFESEH:NO",
+    "comment": "Image Has Safe Exception Handlers",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "ImageHasSafeExceptionHandlers",
+    "switch": "SAFESEH",
+    "comment": "Image Has Safe Exception Handlers",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LinkControlFlowGuard",
+    "switch": "guard:cf",
+    "comment": "Control Flow Guard",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LinkGuardEHContMetadata",
+    "switch": "guard:ehcont",
+    "comment": "Enable EH Continuation Metadata",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LinkGuardSignedReturns",
+    "switch": "guard:nodelayloadsignret",
+    "comment": "Enable Signed Returns",
+    "value": "false",
+    "flags": []
+  },
+  {
+    "name": "LinkGuardSignedReturns",
+    "switch": "guard:delayloadsignret",
+    "comment": "Enable Signed Returns",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "LinkDLL",
+    "switch": "DLL",
+    "comment": "",
+    "value": "true",
+    "flags": []
+  },
+  {
+    "name": "AdditionalLibraryDirectories",
+    "switch": "LIBPATH:",
+    "comment": "Additional Library Directories",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "Natvis",
+    "switch": "NATVIS:",
+    "comment": "Natvis files",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "SpecifySectionAttributes",
+    "switch": "SECTION:",
+    "comment": "Specify Section Attributes",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "IgnoreSpecificDefaultLibraries",
+    "switch": "NODEFAULTLIB:",
+    "comment": "Ignore Specific Default Libraries",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AddModuleNamesToAssembly",
+    "switch": "ASSEMBLYMODULE:",
+    "comment": "Add Module to Assembly",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "EmbedManagedResourceFile",
+    "switch": "ASSEMBLYRESOURCE:",
+    "comment": "Embed Managed Resource File",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "ForceSymbolReferences",
+    "switch": "INCLUDE:",
+    "comment": "Force Symbol References",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "DelayLoadDLLs",
+    "switch": "DELAYLOAD:",
+    "comment": "Delay Loaded Dlls",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AssemblyLinkResource",
+    "switch": "ASSEMBLYLINKRESOURCE:",
+    "comment": "Assembly Link Resource",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "AdditionalManifestDependencies",
+    "switch": "MANIFESTDEPENDENCY:",
+    "comment": "Additional Manifest Dependencies",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "ManifestInput",
+    "switch": "manifestinput:",
+    "comment": "Manifest Input",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "SemicolonAppendable"
+    ]
+  },
+  {
+    "name": "OutputFile",
+    "switch": "OUT:",
+    "comment": "Output File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "Version",
+    "switch": "VERSION:",
+    "comment": "Version",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "IncrementalLinkDatabaseFile",
+    "switch": "ILK:",
+    "comment": "Incremental Link Database File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "MSDOSStubFileName",
+    "switch": "STUB:",
+    "comment": "MS-DOS Stub File Name",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ModuleDefinitionFile",
+    "switch": "DEF:",
+    "comment": "Module Definition File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ManifestFile",
+    "switch": "ManifestFile:",
+    "comment": "Manifest File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ProgramDatabaseFile",
+    "switch": "PDB:",
+    "comment": "Generate Program Database File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "StripPrivateSymbols",
+    "switch": "PDBSTRIPPED:",
+    "comment": "Strip Private Symbols",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "MapFileName",
+    "switch": "MAP:",
+    "comment": "Map File Name",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "HeapReserveSize",
+    "switch": "HEAP:",
+    "comment": "Heap Reserve Size",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "HeapCommitSize",
+    "switch": "HEAP",
+    "comment": "Heap Commit Size",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "StackReserveSize",
+    "switch": "STACK:",
+    "comment": "Stack Reserve Size",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "StackCommitSize",
+    "switch": "STACK",
+    "comment": "Stack Commit Size",
+    "value": "",
+    "flags": [
+      "UserValue",
+      "UserRequired"
+    ]
+  },
+  {
+    "name": "FunctionOrder",
+    "switch": "ORDER:@",
+    "comment": "Function Order",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ProfileGuidedDatabase",
+    "switch": "PGD:",
+    "comment": "Profile Guided Database",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "LinkTimeCodeGenerationObjectFile",
+    "switch": "LTCGOUT:",
+    "comment": "Link Time Code Generation Object File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "MidlCommandFile",
+    "switch": "MIDL:@",
+    "comment": "MIDL Commands",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "MergedIDLBaseFileName",
+    "switch": "IDLOUT:",
+    "comment": "Merged IDL Base File Name",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "TypeLibraryFile",
+    "switch": "TLBOUT:",
+    "comment": "Type Library",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "WindowsMetadataFile",
+    "switch": "WINMDFILE:",
+    "comment": "Windows Metadata File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "WindowsMetadataLinkKeyFile",
+    "switch": "WINMDKEYFILE:",
+    "comment": "Windows Metadata Key File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "WindowsMetadataKeyContainer",
+    "switch": "WINMDKEYCONTAINER:",
+    "comment": "Windows Metadata Key Container",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "EntryPointSymbol",
+    "switch": "ENTRY:",
+    "comment": "Entry Point",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "BaseAddress",
+    "switch": "BASE:",
+    "comment": "Base Address",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "ImportLibrary",
+    "switch": "IMPLIB:",
+    "comment": "Import Library",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "LinkKeyFile",
+    "switch": "KEYFILE:",
+    "comment": "Key File",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "KeyContainer",
+    "switch": "KEYCONTAINER:",
+    "comment": "Key Container",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "TypeLibraryResourceID",
+    "switch": "TLBID:",
+    "comment": "TypeLib Resource ID",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "SectionAlignment",
+    "switch": "ALIGN:",
+    "comment": "SectionAlignment",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "PdbThreads",
+    "switch": "pdbthreads:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  },
+  {
+    "name": "CgThreads",
+    "switch": "cgthreads:",
+    "comment": "",
+    "value": "",
+    "flags": [
+      "UserValue"
+    ]
+  }
+]
index 6113417..6ced800 100644 (file)
@@ -2,7 +2,7 @@
 #include <stdio.h>  /* NOLINT */
 #include <stdlib.h> /* NOLINT */
 #include <string.h> /* NOLINT */
-#include <time.h>
+#include <time.h>   /* NOLINT */
 
 #if defined(_MSC_VER)
 #pragma warning(disable : 4996) /* deprecation */
@@ -122,7 +122,7 @@ int main(int ac, char* av[])
   if (run_all == 1) {
     clock_t t;
     int status = 0;
-    const char* status_message = NULL;
+    const char* status_message = CM_NULL;
     printf("TAP version 13\n");
     printf("1..%d\n", NumTests);
     for (i = 0; i < NumTests; ++i) {
index f7928b6..efac58c 100644 (file)
@@ -1,4 +1,7 @@
 cmake_minimum_required(VERSION 3.3)
+if(POLICY CMP0126)
+  cmake_policy(SET CMP0126 NEW)
+endif()
 # a simple CSharp only test case
 project (CSharpOnly CSharp)
 
index 96bafea..1bedac0 100644 (file)
@@ -65,6 +65,10 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "^(GNU|AppleClang|MSVC)$")
   string(APPEND CMAKE_CXX_FLAGS_RELEASE        " -DFLAG_A=2 -DFLAG_C=1")
   string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO " -DFLAG_A=2 -DFLAG_C=1")
   string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL     " -DFLAG_A=2 -DFLAG_C=1")
+  string(TOUPPER "${CMAKE_BUILD_TYPE}" _xbuild_type)
+  if(NOT _xbuild_type MATCHES "^(DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL)$")
+    string(APPEND CMAKE_CXX_FLAGS_${_xbuild_type} " -DFLAG_A=2 -DFLAG_C=1")
+  endif()
   set_property(TARGET CompileOptions APPEND PROPERTY COMPILE_OPTIONS "-DFLAG_B=2" "-DFLAG_C=2" "-DFLAG_D=1")
   set_property(TARGET testlib APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-DFLAG_D=2")
   if(NOT CMAKE_GENERATOR MATCHES "^Visual Studio 9")
index 1f636af..a9ccece 100644 (file)
@@ -27,10 +27,12 @@ endmacro()
 
 configure_file("${testProjectTemplateDir}/mocwidget.h" "${testProjectSrc}/mocwidget.h" COPYONLY)
 configure_file("${testProjectTemplateDir}/main.cpp" "${testProjectSrc}/main.cpp" COPYONLY)
+configure_file("${testProjectTemplateDir}/subdir/subdircheck.cpp" "${testProjectSrc}/subdir/subdircheck.cpp" COPYONLY)
 configure_file("${testProjectTemplateDir}/CMakeLists.txt.in" "${testProjectSrc}/CMakeLists.txt" @ONLY)
 
 set(Num 1)
 configure_file("${testProjectTemplateDir}/mainwindow.ui.in" "${testProjectSrc}/mainwindow.ui" @ONLY)
+configure_file("${testProjectTemplateDir}/subdir/mainwindowsubdir.ui.in" "${testProjectSrc}/subdir/mainwindowsubdir.ui" @ONLY)
 
 if(CMAKE_GENERATOR_INSTANCE)
     set(_D_CMAKE_GENERATOR_INSTANCE "-DCMAKE_GENERATOR_INSTANCE=${CMAKE_GENERATOR_INSTANCE}")
@@ -94,6 +96,7 @@ sleep()
 
 set(Num 2)
 configure_file("${testProjectTemplateDir}/mainwindow.ui.in" "${testProjectSrc}/mainwindow.ui" @ONLY)
+configure_file("${testProjectTemplateDir}/subdir/mainwindowsubdir.ui.in" "${testProjectSrc}/subdir/mainwindowsubdir.ui" @ONLY)
 rebuild(2)
 
 execute_process(COMMAND "${testProjectBinDir}/${extra_bin_path}UicOnFileChange" RESULT_VARIABLE result)
index fa9dd6b..2a1998d 100644 (file)
@@ -6,6 +6,8 @@ include("@CMAKE_CURRENT_LIST_DIR@/../AutogenGuiTest.cmake")
 # Enable CMAKE_AUTOUIC for all targets
 set(CMAKE_AUTOUIC ON)
 
-add_executable(UicOnFileChange main.cpp mainwindow.ui)
+add_executable(UicOnFileChange main.cpp mainwindow.ui
+    subdir/subdircheck.cpp subdir/mainwindowsubdir.ui
+)
 target_include_directories(UicOnFileChange PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
 target_link_libraries(UicOnFileChange ${QT_QTCORE_TARGET} ${QT_LIBRARIES})
index fd810fa..3981268 100644 (file)
@@ -1,9 +1,11 @@
 #include "ui_mainwindow.h"
 
+extern bool subdircheck();
+
 int main(int argc, char* argv[])
 {
   MocWidget mw;
   Ui::Widget mwUi;
   mwUi.setupUi(&mw);
-  return mw.objectName() == "Widget2" ? 0 : 1;
+  return mw.objectName() == "Widget2" && subdircheck() ? 0 : 1;
 }
diff --git a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/mainwindowsubdir.ui.in
new file mode 100644 (file)
index 0000000..a6a31f6
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WidgetSubdir</class>
+ <widget class="MocWidget" name="WidgetSubdir@Num@"/>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp b/Tests/QtAutogen/RerunUicOnFileChange/UicOnFileChange/subdir/subdircheck.cpp
new file mode 100644 (file)
index 0000000..3b36a10
--- /dev/null
@@ -0,0 +1,9 @@
+#include "ui_mainwindowsubdir.h"
+
+bool subdircheck()
+{
+  MocWidget mw;
+  Ui::WidgetSubdir mwUi;
+  mwUi.setupUi(&mw);
+  return mw.objectName() == "WidgetSubdir2";
+}
diff --git a/Tests/RunCMake/CMakeDependentOption/Parentheses.cmake b/Tests/RunCMake/CMakeDependentOption/Parentheses.cmake
deleted file mode 100644 (file)
index c2951f1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-include(CMakeDependentOption)
-
-set(A 1)
-set(B 1)
-set(C 0)
-cmake_dependent_option(USE_FOO "Use Foo" ON "A AND (B OR C)" OFF)
-message(STATUS "USE_FOO='${USE_FOO}'")
diff --git a/Tests/RunCMake/CMakeDependentOption/Regex.cmake b/Tests/RunCMake/CMakeDependentOption/Regex.cmake
new file mode 100644 (file)
index 0000000..8342a01
--- /dev/null
@@ -0,0 +1,5 @@
+include(CMakeDependentOption)
+
+set(FOO "lower")
+cmake_dependent_option(USE_FOO "Use Foo" ON "FOO MATCHES (UPPER|lower)" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
diff --git a/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake b/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.cmake
new file mode 100644 (file)
index 0000000..ae8a0de
--- /dev/null
@@ -0,0 +1,4 @@
+include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
+
+get_filename_component(_parent_dir "${CMAKE_SOURCE_DIR}" DIRECTORY)
+test_variable(CMAKE_BINARY_DIR "" "${_parent_dir}/OptionalBinaryDirFieldNoS-build")
diff --git a/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in b/Tests/RunCMake/CMakePresets/OptionalBinaryDirFieldNoS.json.in
new file mode 100644 (file)
index 0000000..0e3addd
--- /dev/null
@@ -0,0 +1,9 @@
+{
+  "version": 3,
+  "configurePresets": [
+    {
+      "name": "OptionalBinaryDirFieldNoS",
+      "generator": "@RunCMake_GENERATOR@"
+    }
+  ]
+}
index 3b9806a..31bd8a4 100644 (file)
@@ -312,6 +312,11 @@ unset(CMakePresets_FILE)
 # Test optional generator and buildDir fields
 run_cmake_presets(OptionalBinaryDirField -B "${RunCMake_BINARY_DIR}/OptionalBinaryDirField/build")
 run_cmake_presets(OptionalGeneratorField -G "${RunCMake_GENERATOR}")
+set(CMakePresets_NO_S_ARG TRUE)
+set(CMakePresets_SOURCE_ARG "../OptionalBinaryDirFieldNoS")
+run_cmake_presets(OptionalBinaryDirFieldNoS)
+unset(CMakePresets_SOURCE_ARG)
+unset(CMakePresets_NO_S_ARG)
 
 # Test the example from the documentation
 file(READ "${RunCMake_SOURCE_DIR}/../../../Help/manual/presets/example.json" _example)
index 559c8f7..7c100eb 100644 (file)
@@ -101,6 +101,7 @@ run_cmake_build(Simple all-configs Release simplestatic:all)
 run_ninja(Simple default-build-file build.ninja simpleexe)
 run_cmake_build(Simple all-clean Release clean:all)
 run_cmake_build(Simple debug-subdir Debug SimpleSubdir/all)
+run_ninja(Simple debug-in-release-graph-target build-Release.ninja simpleexe2:Debug)
 run_ninja(Simple release-in-minsizerel-graph-subdir build-MinSizeRel.ninja SimpleSubdir/all:Release)
 run_cmake_build(Simple all-subdir Release SimpleSubdir/all:all)
 run_ninja(Simple minsizerel-top build-MinSizeRel.ninja all)
index de4505c..0cb6ad2 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -14,6 +17,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -23,6 +29,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
 
+    ${TARGET_FILE_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
     ${TARGET_FILE_simpleshared_MinSizeRel}
     ${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -32,6 +41,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index c171e3d..d27c1ca 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
 
+    ${TARGET_FILE_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
     ${TARGET_FILE_simpleshared_MinSizeRel}
     ${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -44,6 +53,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
diff --git a/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake b/Tests/RunCMake/NinjaMultiConfig/Simple-debug-in-release-graph-target-ninja-check.cmake
new file mode 100644 (file)
index 0000000..8de8fde
--- /dev/null
@@ -0,0 +1,37 @@
+check_files("${RunCMake_TEST_BINARY_DIR}"
+  INCLUDE
+    ${GENERATED_FILES}
+
+    ${TARGET_FILE_simpleexe_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe_Debug}
+
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
+    ${TARGET_FILE_simpleshared_Debug}
+    ${TARGET_LINKER_FILE_simpleshared_Debug}
+    ${TARGET_OBJECT_FILES_simpleshared_Debug}
+
+    ${TARGET_OBJECT_FILES_simpleobj_Debug}
+
+  EXCLUDE
+    ${TARGET_OBJECT_FILES_simplestatic_Debug}
+
+    ${TARGET_OBJECT_FILES_simpleexe_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleshared_Release}
+    ${TARGET_OBJECT_FILES_simplestatic_Release}
+    ${TARGET_OBJECT_FILES_simpleobj_Release}
+
+    ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simplestatic_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleobj_MinSizeRel}
+
+    ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simplestatic_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleobj_RelWithDebInfo}
+  )
index fe980fe..d2cb846 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -27,6 +33,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
 
+    ${TARGET_FILE_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
     ${TARGET_FILE_simpleshared_MinSizeRel}
     ${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -40,6 +49,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index 6bb7773..6a0190f 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
index 4e6e654..aec10ee 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index c09ae65..b46a708 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
index 43213dd..9d124cd 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
 
+    ${TARGET_FILE_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
     ${TARGET_FILE_simpleshared_MinSizeRel}
     ${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
index bf4be49..496d722 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -14,6 +17,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -23,6 +29,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
 
+    ${TARGET_FILE_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
     ${TARGET_FILE_simpleshared_MinSizeRel}
     ${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -36,6 +45,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index b6c77ab..29c0187 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -14,6 +17,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
index 3f4ecbe..e2d393b 100644 (file)
@@ -10,6 +10,6 @@ add_subdirectory(SimpleSubdir)
 add_library(simplestatic STATIC simplelib.c)
 
 include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake)
-generate_output_files(simpleexe simpleshared simplestatic simpleobj)
+generate_output_files(simpleexe simpleexe2 simpleshared simplestatic simpleobj)
 
 file(APPEND "${CMAKE_BINARY_DIR}/target_files.cmake" "set(GENERATED_FILES [==[${CMAKE_BINARY_DIR}/empty.cmake]==])\n")
index fee5951..67326d9 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
index fee5951..67326d9 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
index c171e3d..d27c1ca 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -18,6 +21,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -31,6 +37,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleexe_MinSizeRel}
 
+    ${TARGET_FILE_simpleexe2_MinSizeRel}
+    ${TARGET_OBJECT_FILES_simpleexe2_MinSizeRel}
+
     ${TARGET_FILE_simpleshared_MinSizeRel}
     ${TARGET_LINKER_FILE_simpleshared_MinSizeRel}
     ${TARGET_OBJECT_FILES_simpleshared_MinSizeRel}
@@ -44,6 +53,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index 8ffdd20..4e4ec82 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
index 9e5baf9..b1789b0 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Debug}
     ${TARGET_OBJECT_FILES_simpleexe_Debug}
 
+    ${TARGET_FILE_simpleexe2_Debug}
+    ${TARGET_OBJECT_FILES_simpleexe2_Debug}
+
     ${TARGET_FILE_simpleshared_Debug}
     ${TARGET_LINKER_FILE_simpleshared_Debug}
     ${TARGET_OBJECT_FILES_simpleshared_Debug}
@@ -17,6 +20,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_Release}
     ${TARGET_OBJECT_FILES_simpleexe_Release}
 
+    ${TARGET_FILE_simpleexe2_Release}
+    ${TARGET_OBJECT_FILES_simpleexe2_Release}
+
     ${TARGET_FILE_simpleshared_Release}
     ${TARGET_LINKER_FILE_simpleshared_Release}
     ${TARGET_OBJECT_FILES_simpleshared_Release}
@@ -29,6 +35,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index 3829d3e..9016cf4 100644 (file)
@@ -5,6 +5,9 @@ check_files("${RunCMake_TEST_BINARY_DIR}"
     ${TARGET_FILE_simpleexe_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleexe_RelWithDebInfo}
 
+    ${TARGET_FILE_simpleexe2_RelWithDebInfo}
+    ${TARGET_OBJECT_FILES_simpleexe2_RelWithDebInfo}
+
     ${TARGET_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_LINKER_FILE_simpleshared_RelWithDebInfo}
     ${TARGET_OBJECT_FILES_simpleshared_RelWithDebInfo}
index 7e754a3..d81f5ab 100644 (file)
@@ -1,4 +1,8 @@
-add_library(simpleobj OBJECT ../empty.c)
-add_executable(simpleexe ../main.c $<TARGET_OBJECTS:simpleobj>)
+add_library(simpleobj OBJECT ../empty.c "$<$<CONFIG:Debug>:../empty_dbg.c>" "$<$<CONFIG:Release>:../empty_rel.c>")
 add_library(simpleshared SHARED ../simplelib.c)
+
+add_executable(simpleexe ../main.c $<TARGET_OBJECTS:simpleobj>)
 target_link_libraries(simpleexe PRIVATE simpleshared)
+
+add_executable(simpleexe2 ../main.c)
+target_link_libraries(simpleexe2 PRIVATE simpleshared $<TARGET_OBJECTS:simpleobj>)
diff --git a/Tests/RunCMake/NinjaMultiConfig/empty_dbg.c b/Tests/RunCMake/NinjaMultiConfig/empty_dbg.c
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Tests/RunCMake/NinjaMultiConfig/empty_rel.c b/Tests/RunCMake/NinjaMultiConfig/empty_rel.c
new file mode 100644 (file)
index 0000000..e69de29
index 69230b6..5c27b8a 100644 (file)
@@ -1,19 +1,7 @@
-^CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
+^(CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
   The SOURCES of "A" use a generator expression that depends on the SOURCES
   themselves.
 Call Stack \(most recent call first\):
   CMakeLists.txt:[0-9]+ \(include\)
-+
-CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
-  The SOURCES of "A" use a generator expression that depends on the SOURCES
-  themselves.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)
-+
-CMake Error at OwnSources.cmake:[0-9]+ \(add_library\):
-  The SOURCES of "A" use a generator expression that depends on the SOURCES
-  themselves.
-Call Stack \(most recent call first\):
-  CMakeLists.txt:[0-9]+ \(include\)
-+
++)+
 CMake Generate step failed\.  Build files cannot be regenerated correctly\.$
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt b/Tests/RunCMake/ToolchainFile/CMP0126-NEW-stderr.txt
new file mode 100644 (file)
index 0000000..7b91b43
--- /dev/null
@@ -0,0 +1 @@
+^try_compile CMP0126='NEW' VAR='1'
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-NEW-toolchain.cmake
new file mode 100644 (file)
index 0000000..2f1ec86
--- /dev/null
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-NEW.cmake
new file mode 100644 (file)
index 0000000..62d4df1
--- /dev/null
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0126 NEW)
+enable_language(C)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt b/Tests/RunCMake/ToolchainFile/CMP0126-OLD-stderr.txt
new file mode 100644 (file)
index 0000000..f3c068a
--- /dev/null
@@ -0,0 +1 @@
+^try_compile CMP0126='OLD' VAR='2'
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-OLD-toolchain.cmake
new file mode 100644 (file)
index 0000000..2f1ec86
--- /dev/null
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-OLD.cmake
new file mode 100644 (file)
index 0000000..ef821fe
--- /dev/null
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0126 OLD)
+enable_language(C)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt b/Tests/RunCMake/ToolchainFile/CMP0126-WARN-stderr.txt
new file mode 100644 (file)
index 0000000..f3c068a
--- /dev/null
@@ -0,0 +1 @@
+^try_compile CMP0126='OLD' VAR='2'
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-WARN-toolchain.cmake
new file mode 100644 (file)
index 0000000..2f1ec86
--- /dev/null
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-WARN.cmake
new file mode 100644 (file)
index 0000000..426e2b1
--- /dev/null
@@ -0,0 +1,2 @@
+# leave CMP0126 unset
+enable_language(C)
diff --git a/Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake b/Tests/RunCMake/ToolchainFile/CMP0126-toolchain.cmake
new file mode 100644 (file)
index 0000000..d5af14f
--- /dev/null
@@ -0,0 +1,7 @@
+get_property(_IN_TC GLOBAL PROPERTY IN_TRY_COMPILE)
+if(_IN_TC)
+  cmake_policy(GET CMP0126 cmp0126)
+  set(VAR 1)
+  set(VAR 2 CACHE STRING "")
+  message("try_compile CMP0126='${cmp0126}' VAR='${VAR}'")
+endif()
index 304c105..7744ee8 100644 (file)
@@ -11,6 +11,9 @@ run_cmake_toolchain(CheckLanguage)
 run_cmake_toolchain(FlagsInit)
 run_cmake_toolchain(LangVars)
 run_cmake_toolchain(LinkFlagsInit)
+run_cmake_toolchain(CMP0126-NEW)
+run_cmake_toolchain(CMP0126-OLD)
+run_cmake_toolchain(CMP0126-WARN)
 
 function(run_IncludeDirectories)
   run_cmake_toolchain(IncludeDirectories)
index 26714c4..ed8e725 100644 (file)
@@ -407,11 +407,16 @@ if (XCODE_VERSION VERSION_GREATER_EQUAL 7.3)
   if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
     xctest_add_bundle_test(Darwin macosx "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
     xctest_add_bundle_test(Darwin macosx "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
-    xctest_add_bundle_test(iOS iphoneos "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
-    xctest_add_bundle_test(iOS iphoneos "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>")
+    xctest_add_bundle_test(iOS iphonesimulator "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+    if (XCODE_VERSION VERSION_LESS 12.5)
+      xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>")
+    else()
+      xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+    endif()
   else()
     xctest_add_bundle_test(Darwin macosx "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
-    xctest_add_bundle_test(iOS iphoneos "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
+    xctest_add_bundle_test(iOS iphonesimulator "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
   endif()
 endif()
+
 # Please add macOS-only tests above before the device-specific tests.
index 444c730..9114fee 100644 (file)
@@ -1,9 +1,14 @@
 enable_language(Swift)
+
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
+set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
 find_package(XCTest REQUIRED)
 
-add_executable(TestedApp MACOSX_BUNDLE EXCLUDE_FROM_ALL foo.swift)
+add_executable(TestedApp MACOSX_BUNDLE dummy_main.swift)
 
-xctest_add_bundle(TestingAppBundle TestedApp foo.swift)
+xctest_add_bundle(TestingAppBundle TestedApp dummy_main.swift)
 
 get_target_property(_lib_output_dir TestingAppBundle LIBRARY_OUTPUT_DIRECTORY)
 
diff --git a/Tests/RunCMake/XcodeProject/dummy_main.swift b/Tests/RunCMake/XcodeProject/dummy_main.swift
new file mode 100644 (file)
index 0000000..1aaee42
--- /dev/null
@@ -0,0 +1,18 @@
+#if os(iOS)
+import UIKit
+
+@UIApplicationMain
+class MyApp: UIResponder, UIApplicationDelegate {
+}
+
+#elseif os(macOS)
+import SwiftUI
+
+@main
+struct MyApp: App {
+    var body: some Scene {
+        WindowGroup {
+        }
+    }
+}
+#endif
index 0313ed1..1233838 100644 (file)
@@ -1,5 +1,7 @@
 include(RunCMake)
 
+run_cmake_script(newline)
+
 run_cmake(defaultmessage)
 run_cmake(nomessage)
 run_cmake(message-internal-warning)
diff --git a/Tests/RunCMake/message/newline-script.cmake b/Tests/RunCMake/message/newline-script.cmake
new file mode 100644 (file)
index 0000000..e9e3d5d
--- /dev/null
@@ -0,0 +1,2 @@
+message(STATUS "one\ntwo")
+message("one\ntwo")
diff --git a/Tests/RunCMake/message/newline-stdout.txt b/Tests/RunCMake/message/newline-stdout.txt
new file mode 100644 (file)
index 0000000..beca44e
--- /dev/null
@@ -0,0 +1,2 @@
+-- out='2d2d206f6e650a74776f0a'
+-- err='6f6e650a74776f0a'
diff --git a/Tests/RunCMake/message/newline.cmake b/Tests/RunCMake/message/newline.cmake
new file mode 100644 (file)
index 0000000..97afba4
--- /dev/null
@@ -0,0 +1,9 @@
+execute_process(
+  COMMAND "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_LIST_DIR}/newline-script.cmake"
+  OUTPUT_FILE newline-script-stdout.txt
+  ERROR_FILE newline-script-stderr.txt
+  )
+foreach(f out err)
+  file(READ newline-script-std${f}.txt hex HEX)
+  message(STATUS "${f}='${hex}'")
+endforeach()
index 41d14ea..01c2222 100644 (file)
@@ -1,4 +1,7 @@
 cmake_minimum_required(VERSION 3.3)
+if(POLICY CMP0126)
+  cmake_policy(SET CMP0126 NEW)
+endif()
 
 # NOTE: Force the Release mode configuration as there are some issues with the
 # debug information handling on macOS on certain Xcode builds.
index 52713cf..2f984c6 100644 (file)
@@ -39,10 +39,11 @@ static char INLINE uv__atomic_exchange_set(char volatile* target) {
   return _InterlockedOr8(target, 1);
 }
 
-#else /* GCC */
+#else /* GCC, Clang in mingw mode */
 
-/* Mingw-32 version, hopefully this works for 64-bit gcc as well. */
 static inline char uv__atomic_exchange_set(char volatile* target) {
+#if defined(__i386__) || defined(__x86_64__)
+  /* Mingw-32 version, hopefully this works for 64-bit gcc as well. */
   const char one = 1;
   char old_value;
   __asm__ __volatile__ ("lock xchgb %0, %1\n\t"
@@ -50,6 +51,9 @@ static inline char uv__atomic_exchange_set(char volatile* target) {
                         : "0"(one), "m"(*target)
                         : "memory");
   return old_value;
+#else
+  return __sync_fetch_and_or(target, 1);
+#endif
 }
 
 #endif