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)
``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
^^^^^^^^^^^^^^^^^^^^^^^^^^
[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]
)
[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.
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.
`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>)
/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
[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.
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:
[[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
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
.. 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
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.
/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
``--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.
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``
.. 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.
.. 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.
.. 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
----------
* 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
`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".
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>``.
--- /dev/null
+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>``.
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`.
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`.
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
.. 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
+ "Visual Studio"
#elif PlatformToolsetv141
+ "Visual Studio"
+#elif PlatformToolsetv142
+ + "Visual Studio"
+#elif PlatformToolsetv143
+ + "Visual Studio"
#else
+ "unknown"
#endif
+ "2015"
#elif PlatformToolsetv141
+ "2017"
+#elif PlatformToolsetv142
+ + "2019"
+#elif PlatformToolsetv143
+ + "2022"
#else
+ "9999"
#endif
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)
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)
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()
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)
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()
"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)
" }"
"}"
)
+ # 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
)
"#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)
"# 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)
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)
"# 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)
"#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)
"# 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)
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)
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)
+++ /dev/null
-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()
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>")
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>")
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()
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()
cmQtAutoMocUic.h
cmQtAutoRcc.cxx
cmQtAutoRcc.h
+ cmQtAutoUicHelpers.cxx
+ cmQtAutoUicHelpers.h
cmRST.cxx
cmRST.h
cmRuntimeDependencyArchive.cxx
# 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)
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]* "
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;
*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;
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"
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 =
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 "";
}
}
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;
+ }();
+}
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
*/
// 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
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);
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);
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);
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
// 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) {
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.
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,
#include "cmFilePathChecksum.h"
#include "cmQtAutoGen.h"
+#include "cmQtAutoUicHelpers.h"
class cmGeneratorTarget;
class cmGlobalGenerator;
std::string ConfigDefault;
std::vector<std::string> ConfigsList;
std::string TargetsFolder;
+ cmQtAutoUicHelpers AutoUicHelpers;
/** Common directories. */
struct
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)
// -- 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);
#include "cmGeneratedFileStream.h"
#include "cmQtAutoGen.h"
#include "cmQtAutoGenerator.h"
+#include "cmQtAutoUicHelpers.h"
#include "cmStringAlgorithms.h"
#include "cmSystemTools.h"
#include "cmWorkerPool.h"
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. */
return res;
}
-cmQtAutoMocUicT::UicSettingsT::UicSettingsT()
-{
- this->RegExpInclude.compile("(^|\n)[ \t]*#[ \t]*include[ \t]+"
- "[\"<](([^ \">]+/)?ui_[^ \">/]+\\.h)[\">]");
-}
+cmQtAutoMocUicT::UicSettingsT::UicSettingsT() = default;
cmQtAutoMocUicT::UicSettingsT::~UicSettingsT() = default;
}
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);
}
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());
--- /dev/null
+/* 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();
+ }
+}
--- /dev/null
+/* 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;
+};
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)
# 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
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
# endif
bOsVersionInfoEx = GetVersionExA((OSVERSIONINFOA*)&osvi);
if (!bOsVersionInfoEx) {
- return 0;
+ return "";
}
# ifdef KWSYS_WINDOWS_DEPRECATED_GetVersionEx
# ifdef __clang__
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);
},
{
"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",
--- /dev/null
+[
+ {
+ "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"
+ ]
+ }
+]
--- /dev/null
+[
+ {
+ "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": []
+ }
+]
--- /dev/null
+[
+ {
+ "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"
+ ]
+ }
+]
#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 */
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) {
cmake_minimum_required(VERSION 3.3)
+if(POLICY CMP0126)
+ cmake_policy(SET CMP0126 NEW)
+endif()
# a simple CSharp only test case
project (CSharpOnly CSharp)
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")
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}")
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)
# 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})
#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;
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WidgetSubdir</class>
+ <widget class="MocWidget" name="WidgetSubdir@Num@"/>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include "ui_mainwindowsubdir.h"
+
+bool subdircheck()
+{
+ MocWidget mw;
+ Ui::WidgetSubdir mwUi;
+ mwUi.setupUi(&mw);
+ return mw.objectName() == "WidgetSubdir2";
+}
+++ /dev/null
-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}'")
--- /dev/null
+include(CMakeDependentOption)
+
+set(FOO "lower")
+cmake_dependent_option(USE_FOO "Use Foo" ON "FOO MATCHES (UPPER|lower)" OFF)
+message(STATUS "USE_FOO='${USE_FOO}'")
include(RunCMake)
-run_cmake_script(Parentheses)
+run_cmake_script(Regex)
--- /dev/null
+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")
--- /dev/null
+{
+ "version": 3,
+ "configurePresets": [
+ {
+ "name": "OptionalBinaryDirFieldNoS",
+ "generator": "@RunCMake_GENERATOR@"
+ }
+ ]
+}
# 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)
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)
${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_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}
${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}
${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}
${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_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}
${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}
${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}
--- /dev/null
+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}
+ )
${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_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}
${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}
${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}
${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_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_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}
${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}
${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_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}
${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_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}
${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}
${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_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}
${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}
${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}
${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_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}
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")
${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_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}
${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_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}
${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_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}
${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}
${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}
${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_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}
${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_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}
${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}
${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}
-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>)
-^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\.$
--- /dev/null
+^try_compile CMP0126='NEW' VAR='1'
--- /dev/null
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
--- /dev/null
+cmake_policy(SET CMP0126 NEW)
+enable_language(C)
--- /dev/null
+^try_compile CMP0126='OLD' VAR='2'
--- /dev/null
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
--- /dev/null
+cmake_policy(SET CMP0126 OLD)
+enable_language(C)
--- /dev/null
+^try_compile CMP0126='OLD' VAR='2'
--- /dev/null
+include("${CMAKE_CURRENT_LIST_DIR}/CMP0126-toolchain.cmake")
--- /dev/null
+# leave CMP0126 unset
+enable_language(C)
--- /dev/null
+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()
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)
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.
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)
--- /dev/null
+#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
include(RunCMake)
+run_cmake_script(newline)
+
run_cmake(defaultmessage)
run_cmake(nomessage)
run_cmake(message-internal-warning)
--- /dev/null
+message(STATUS "one\ntwo")
+message("one\ntwo")
--- /dev/null
+-- out='2d2d206f6e650a74776f0a'
+-- err='6f6e650a74776f0a'
--- /dev/null
+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()
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.
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"
: "0"(one), "m"(*target)
: "memory");
return old_value;
+#else
+ return __sync_fetch_and_or(target, 1);
+#endif
}
#endif