mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Merge branch 'master' into deployqt4-cmp0080-fix
This commit is contained in:
@@ -39,6 +39,7 @@ The following individuals and institutions are among the Contributors:
|
||||
* Alexander Neundorf <neundorf@kde.org>
|
||||
* Alexander Smorkalov <alexander.smorkalov@itseez.com>
|
||||
* Alexey Sokolov <sokolov@google.com>
|
||||
* Alex Merry <alex.merry@kde.org>
|
||||
* Alex Turbov <i.zaufi@gmail.com>
|
||||
* Andreas Pakulat <apaku@gmx.de>
|
||||
* Andreas Schneider <asn@cryptomilk.org>
|
||||
@@ -65,6 +66,7 @@ The following individuals and institutions are among the Contributors:
|
||||
* Kelly Thompson <kgt@lanl.gov>
|
||||
* Konstantin Podsvirov <konstantin@podsvirov.pro>
|
||||
* Mario Bensi <mbensi@ipsquad.net>
|
||||
* Martin Gräßlin <mgraesslin@kde.org>
|
||||
* Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
||||
* Matthaeus G. Chajdas
|
||||
* Matthias Kretz <kretz@kde.org>
|
||||
|
||||
@@ -33,6 +33,7 @@ The options are:
|
||||
ExtraFiles = Files listed by CTEST_EXTRA_SUBMIT_FILES
|
||||
Upload = Files prepared for upload by ctest_upload(), in Upload.xml
|
||||
Submit = nothing
|
||||
Done = Build is complete, in Done.xml
|
||||
|
||||
``FILES <file>...``
|
||||
Specify an explicit list of specific files to be submitted.
|
||||
|
||||
+47
-39
@@ -3,41 +3,46 @@ if
|
||||
|
||||
Conditionally execute a group of commands.
|
||||
|
||||
.. code-block:: cmake
|
||||
Synopsis
|
||||
^^^^^^^^
|
||||
|
||||
if(expression)
|
||||
# then section.
|
||||
COMMAND1(ARGS ...)
|
||||
COMMAND2(ARGS ...)
|
||||
#...
|
||||
elseif(expression2)
|
||||
# elseif section.
|
||||
COMMAND1(ARGS ...)
|
||||
COMMAND2(ARGS ...)
|
||||
#...
|
||||
else(expression)
|
||||
# else section.
|
||||
COMMAND1(ARGS ...)
|
||||
COMMAND2(ARGS ...)
|
||||
#...
|
||||
endif(expression)
|
||||
::
|
||||
|
||||
Evaluates the given expression. If the result is true, the commands
|
||||
in the THEN section are invoked. Otherwise, the commands in the else
|
||||
section are invoked. The elseif and else sections are optional. You
|
||||
may have multiple elseif clauses. Note that the expression in the
|
||||
else and endif clause is optional. Long expressions can be used and
|
||||
there is a traditional order of precedence. Parenthetical expressions
|
||||
are evaluated first followed by unary tests such as ``EXISTS``,
|
||||
``COMMAND``, and ``DEFINED``. Then any binary tests such as
|
||||
if(<condition>)
|
||||
<commands>
|
||||
elseif(<condition>) # optional block, can be repeated
|
||||
<commands>
|
||||
else() # optional block
|
||||
<commands>
|
||||
endif()
|
||||
|
||||
Evaluates the ``condition`` argument of the ``if`` clause according to the
|
||||
`Condition syntax`_ described below. If the result is true, then the
|
||||
``commands`` in the ``if`` block are executed.
|
||||
Otherwise, optional ``elseif`` blocks are processed in the same way.
|
||||
Finally, if no ``condition`` is true, ``commands`` in the optional ``else``
|
||||
block are executed.
|
||||
|
||||
Per legacy, the ``else`` and ``endif`` clause may also have a ``condition`` argument,
|
||||
which then must be a verbatim repeat of the argument of the opening ``if`` clause.
|
||||
|
||||
Condition Syntax
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
The following syntax applies to the ``condition`` argument of
|
||||
the ``if``, ``elseif`` and :command:`while` clauses.
|
||||
|
||||
Compound conditions are evaluated in the following order of precedence:
|
||||
Innermost parentheses are evaluated first. Next come unary tests such
|
||||
as ``EXISTS``, ``COMMAND``, and ``DEFINED``. Then binary tests such as
|
||||
``EQUAL``, ``LESS``, ``LESS_EQUAL``, ``GREATER``, ``GREATER_EQUAL``,
|
||||
``STREQUAL``, ``STRLESS``, ``STRLESS_EQUAL``, ``STRGREATER``,
|
||||
``STRGREATER_EQUAL``, ``VERSION_EQUAL``, ``VERSION_LESS``,
|
||||
``VERSION_LESS_EQUAL``, ``VERSION_GREATER``, ``VERSION_GREATER_EQUAL``,
|
||||
and ``MATCHES`` will be evaluated. Then boolean ``NOT`` operators and
|
||||
finally boolean ``AND`` and then ``OR`` operators will be evaluated.
|
||||
and ``MATCHES``. Then the boolean operators in the order ``NOT``, ``AND``,
|
||||
and finally ``OR``.
|
||||
|
||||
Possible expressions are:
|
||||
Possible conditions are:
|
||||
|
||||
``if(<constant>)``
|
||||
True if the constant is ``1``, ``ON``, ``YES``, ``TRUE``, ``Y``,
|
||||
@@ -52,14 +57,14 @@ Possible expressions are:
|
||||
True if given a variable that is defined to a value that is not a false
|
||||
constant. False otherwise. (Note macro arguments are not variables.)
|
||||
|
||||
``if(NOT <expression>)``
|
||||
True if the expression is not true.
|
||||
``if(NOT <condition>)``
|
||||
True if the condition is not true.
|
||||
|
||||
``if(<expr1> AND <expr2>)``
|
||||
True if both expressions would be considered true individually.
|
||||
``if(<cond1> AND <cond2>)``
|
||||
True if both conditions would be considered true individually.
|
||||
|
||||
``if(<expr1> OR <expr2>)``
|
||||
True if either expression would be considered true individually.
|
||||
``if(<cond1> OR <cond2>)``
|
||||
True if either condition would be considered true individually.
|
||||
|
||||
``if(COMMAND command-name)``
|
||||
True if the given name is a command, macro or function that can be
|
||||
@@ -103,7 +108,7 @@ Possible expressions are:
|
||||
|
||||
``if(<variable|string> MATCHES regex)``
|
||||
True if the given string or variable's value matches the given regular
|
||||
expression. See :ref:`Regex Specification` for regex format.
|
||||
condition. See :ref:`Regex Specification` for regex format.
|
||||
``()`` groups are captured in :variable:`CMAKE_MATCH_<n>` variables.
|
||||
|
||||
``if(<variable|string> LESS <variable|string>)``
|
||||
@@ -184,11 +189,14 @@ Possible expressions are:
|
||||
variable is true or false just if it has been set. (Note macro
|
||||
arguments are not variables.)
|
||||
|
||||
``if((expression) AND (expression OR (expression)))``
|
||||
The expressions inside the parenthesis are evaluated first and then
|
||||
the remaining expression is evaluated as in the previous examples.
|
||||
``if((condition) AND (condition OR (condition)))``
|
||||
The conditions inside the parenthesis are evaluated first and then
|
||||
the remaining condition is evaluated as in the previous examples.
|
||||
Where there are nested parenthesis the innermost are evaluated as part
|
||||
of evaluating the expression that contains them.
|
||||
of evaluating the condition that contains them.
|
||||
|
||||
Variable Expansion
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
The if command was written very early in CMake's history, predating
|
||||
the ``${}`` variable evaluation syntax, and for convenience evaluates
|
||||
|
||||
+87
-58
@@ -1,90 +1,119 @@
|
||||
project
|
||||
-------
|
||||
|
||||
Sets project details such as name, version, etc. and enables languages.
|
||||
Set the name of the project.
|
||||
|
||||
Synopsis
|
||||
^^^^^^^^
|
||||
|
||||
.. code-block:: cmake
|
||||
|
||||
project(<PROJECT-NAME> [LANGUAGES] [<language-name>...])
|
||||
project(<PROJECT-NAME> [<language-name>...])
|
||||
project(<PROJECT-NAME>
|
||||
[VERSION <major>[.<minor>[.<patch>[.<tweak>]]]]
|
||||
[DESCRIPTION <project-description-string>]
|
||||
[HOMEPAGE_URL <url-string>]
|
||||
[LANGUAGES <language-name>...])
|
||||
|
||||
Sets the name of the project and stores the name in the
|
||||
:variable:`PROJECT_NAME` variable. Additionally this sets variables
|
||||
Sets the name of the project, and stores it in the variable
|
||||
:variable:`PROJECT_NAME`. When called from the top-level
|
||||
``CMakeLists.txt`` also stores the project name in the
|
||||
variable :variable:`CMAKE_PROJECT_NAME`.
|
||||
|
||||
Also sets the variables
|
||||
|
||||
* :variable:`PROJECT_SOURCE_DIR`,
|
||||
:variable:`<PROJECT-NAME>_SOURCE_DIR`
|
||||
* :variable:`PROJECT_BINARY_DIR`,
|
||||
:variable:`<PROJECT-NAME>_BINARY_DIR`
|
||||
|
||||
If ``VERSION`` is specified, given components must be non-negative integers.
|
||||
If ``VERSION`` is not specified, the default version is the empty string.
|
||||
The ``VERSION`` option may not be used unless policy :policy:`CMP0048` is
|
||||
set to ``NEW``.
|
||||
Further variables are set by the optional arguments described in the following.
|
||||
If any of these arguments is not used, then the corresponding variables are
|
||||
set to the empty string.
|
||||
|
||||
The :command:`project()` command stores the version number and its components
|
||||
in variables
|
||||
|
||||
* :variable:`PROJECT_VERSION`,
|
||||
:variable:`<PROJECT-NAME>_VERSION`
|
||||
* :variable:`PROJECT_VERSION_MAJOR`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_MAJOR`
|
||||
* :variable:`PROJECT_VERSION_MINOR`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_MINOR`
|
||||
* :variable:`PROJECT_VERSION_PATCH`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_PATCH`
|
||||
* :variable:`PROJECT_VERSION_TWEAK`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_TWEAK`
|
||||
|
||||
Variables corresponding to unspecified versions are set to the empty string
|
||||
(if policy :policy:`CMP0048` is set to ``NEW``).
|
||||
|
||||
If the optional ``DESCRIPTION`` is given, then :variable:`PROJECT_DESCRIPTION`
|
||||
and :variable:`<PROJECT-NAME>_DESCRIPTION` will be set to its argument.
|
||||
These variables will be cleared if ``DESCRIPTION`` is not given.
|
||||
The description is expected to be a relatively short string, usually no more
|
||||
than a few words.
|
||||
|
||||
The optional ``HOMEPAGE_URL`` sets the analogous variables
|
||||
:variable:`PROJECT_HOMEPAGE_URL` and :variable:`<PROJECT-NAME>_HOMEPAGE_URL`.
|
||||
When this option is given, the URL provided should be the canonical home for
|
||||
the project.
|
||||
These variables will be cleared if ``HOMEPAGE_URL`` is not given.
|
||||
|
||||
Note that the description and homepage URL may be used as defaults for
|
||||
things like packaging meta-data, documentation, etc.
|
||||
|
||||
Optionally you can specify which languages your project supports.
|
||||
Example languages include ``C``, ``CXX`` (i.e. C++), ``CUDA``,
|
||||
``Fortran``, and ``ASM``.
|
||||
By default ``C`` and ``CXX`` are enabled if no language options are
|
||||
given. Specify language ``NONE``, or use the ``LANGUAGES`` keyword
|
||||
and list no languages, to skip enabling any languages.
|
||||
|
||||
If enabling ``ASM``, list it last so that CMake can check whether
|
||||
compilers for other languages like ``C`` work for assembly too.
|
||||
|
||||
If a variable exists called :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE`,
|
||||
If the variable :variable:`CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE` exists,
|
||||
the file pointed to by that variable will be included as the last step of the
|
||||
project command.
|
||||
|
||||
Options
|
||||
^^^^^^^
|
||||
|
||||
The options are:
|
||||
|
||||
``VERSION <version>``
|
||||
Optional; may not be used unless policy :policy:`CMP0048` is
|
||||
set to ``NEW``.
|
||||
|
||||
Takes a ``<version>`` argument composed of non-negative integer components,
|
||||
i.e. ``<major>[.<minor>[.<patch>[.<tweak>]]]``,
|
||||
and sets the variables
|
||||
|
||||
* :variable:`PROJECT_VERSION`,
|
||||
:variable:`<PROJECT-NAME>_VERSION`
|
||||
* :variable:`PROJECT_VERSION_MAJOR`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_MAJOR`
|
||||
* :variable:`PROJECT_VERSION_MINOR`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_MINOR`
|
||||
* :variable:`PROJECT_VERSION_PATCH`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_PATCH`
|
||||
* :variable:`PROJECT_VERSION_TWEAK`,
|
||||
:variable:`<PROJECT-NAME>_VERSION_TWEAK`.
|
||||
|
||||
When the :command:`project()` command is called from the top-level ``CMakeLists.txt``,
|
||||
then the version is also stored in the variable :variable:`CMAKE_PROJECT_VERSION`.
|
||||
|
||||
``DESCRIPTION <project-description-string>``
|
||||
Optional.
|
||||
Sets the variables
|
||||
|
||||
* :variable:`PROJECT_DESCRIPTION`, :variable:`<PROJECT-NAME>_DESCRIPTION`
|
||||
|
||||
to ``<project-description-string>``.
|
||||
It is recommended that this description is a relatively short string,
|
||||
usually no more than a few words.
|
||||
|
||||
When the :command:`project()` command is called from the top-level ``CMakeLists.txt``,
|
||||
then the description is also stored in the variable :variable:`CMAKE_PROJECT_DESCRIPTION`.
|
||||
|
||||
``HOMEPAGE_URL <url-string>``
|
||||
Optional.
|
||||
Sets the variables
|
||||
|
||||
* :variable:`PROJECT_HOMEPAGE_URL`, :variable:`<PROJECT-NAME>_HOMEPAGE_URL`
|
||||
|
||||
to ``<url-string>``, which should be the canonical home URL for the project.
|
||||
|
||||
When the :command:`project()` command is called from the top-level ``CMakeLists.txt``,
|
||||
then the URL also is stored in the variable :variable:`CMAKE_PROJECT_HOMEPAGE_URL`.
|
||||
|
||||
``LANGUAGES <language-name>...``
|
||||
Optional.
|
||||
Can also be specified without ``LANGUAGES`` keyword per the first, short signature.
|
||||
|
||||
Selects which programming languages are needed to build the project.
|
||||
Supported languages include ``C``, ``CXX`` (i.e. C++), ``CUDA``, ``Fortran``, and ``ASM``.
|
||||
By default ``C`` and ``CXX`` are enabled if no language options are given.
|
||||
Specify language ``NONE``, or use the ``LANGUAGES`` keyword and list no languages,
|
||||
to skip enabling any languages.
|
||||
|
||||
If enabling ``ASM``, list it last so that CMake can check whether
|
||||
compilers for other languages like ``C`` work for assembly too.
|
||||
|
||||
The variables set through the ``VERSION``, ``DESCRIPTION`` and ``HOMEPAGE_URL``
|
||||
options are intended for use as default values in package metadata and documentation.
|
||||
|
||||
Usage
|
||||
^^^^^
|
||||
|
||||
The top-level ``CMakeLists.txt`` file for a project must contain a
|
||||
literal, direct call to the :command:`project` command; loading one
|
||||
through the :command:`include` command is not sufficient. If no such
|
||||
call exists CMake will implicitly add one to the top that enables the
|
||||
default languages (``C`` and ``CXX``). The name of the project set in
|
||||
the top level ``CMakeLists.txt`` file is available from the
|
||||
:variable:`CMAKE_PROJECT_NAME` variable, its description from
|
||||
:variable:`CMAKE_PROJECT_DESCRIPTION`, its homepage URL from
|
||||
:variable:`CMAKE_PROJECT_HOMEPAGE_URL` and its version from
|
||||
:variable:`CMAKE_PROJECT_VERSION`.
|
||||
default languages (``C`` and ``CXX``).
|
||||
|
||||
.. note::
|
||||
Call the :command:`cmake_minimum_required` command at the beginning
|
||||
of the top-level ``CMakeLists.txt`` file even before calling the
|
||||
``project()`` command. It is important to establish version and
|
||||
:command:`project()` command. It is important to establish version and
|
||||
policy settings before invoking other commands whose behavior they
|
||||
may affect. See also policy :policy:`CMP0000`.
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
cmake-modules(7)
|
||||
****************
|
||||
|
||||
.. only:: html
|
||||
The modules listed here are part of the CMake distribution.
|
||||
Projects may provide further modules; their location(s)
|
||||
can be specified in the :variable:`CMAKE_MODULE_PATH` variable.
|
||||
|
||||
.. contents::
|
||||
Utility Modules
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
All Modules
|
||||
===========
|
||||
These modules are loaded using the :command:`include` command.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
@@ -41,12 +43,9 @@ All Modules
|
||||
/module/CMakeAddFortranSubdirectory
|
||||
/module/CMakeBackwardCompatibilityCXX
|
||||
/module/CMakeDependentOption
|
||||
/module/CMakeDetermineVSServicePack
|
||||
/module/CMakeExpandImportedTargets
|
||||
/module/CMakeFindDependencyMacro
|
||||
/module/CMakeFindFrameworks
|
||||
/module/CMakeFindPackageMode
|
||||
/module/CMakeForceCompiler
|
||||
/module/CMakeGraphVizOptions
|
||||
/module/CMakePackageConfigHelpers
|
||||
/module/CMakeParseArguments
|
||||
@@ -70,6 +69,42 @@ All Modules
|
||||
/module/ExternalProject
|
||||
/module/FeatureSummary
|
||||
/module/FetchContent
|
||||
/module/FindPackageHandleStandardArgs
|
||||
/module/FindPackageMessage
|
||||
/module/FortranCInterface
|
||||
/module/GenerateExportHeader
|
||||
/module/GetPrerequisites
|
||||
/module/GNUInstallDirs
|
||||
/module/GoogleTest
|
||||
/module/InstallRequiredSystemLibraries
|
||||
/module/MacroAddFileDependencies
|
||||
/module/ProcessorCount
|
||||
/module/SelectLibraryConfigurations
|
||||
/module/SquishTestScript
|
||||
/module/TestBigEndian
|
||||
/module/TestForANSIForScope
|
||||
/module/TestForANSIStreamHeaders
|
||||
/module/TestForSSTREAM
|
||||
/module/TestForSTDNamespace
|
||||
/module/UseEcos
|
||||
/module/UseJavaClassFilelist
|
||||
/module/UseJava
|
||||
/module/UseJavaSymlinks
|
||||
/module/UsePkgConfig
|
||||
/module/UseSWIG
|
||||
/module/UsewxWidgets
|
||||
/module/Use_wxWindows
|
||||
/module/WriteCompilerDetectionHeader
|
||||
|
||||
Find Modules
|
||||
^^^^^^^^^^^^
|
||||
|
||||
These modules search for third-party software.
|
||||
They are normally called through the :command:`find_package` command.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/module/FindALSA
|
||||
/module/FindArmadillo
|
||||
/module/FindASPELL
|
||||
@@ -82,7 +117,6 @@ All Modules
|
||||
/module/FindBZip2
|
||||
/module/FindCABLE
|
||||
/module/FindCoin3D
|
||||
/module/FindCUDA
|
||||
/module/FindCups
|
||||
/module/FindCURL
|
||||
/module/FindCurses
|
||||
@@ -131,6 +165,7 @@ All Modules
|
||||
/module/FindLAPACK
|
||||
/module/FindLATEX
|
||||
/module/FindLibArchive
|
||||
/module/FindLibinput
|
||||
/module/FindLibLZMA
|
||||
/module/FindLibXml2
|
||||
/module/FindLibXslt
|
||||
@@ -173,8 +208,6 @@ All Modules
|
||||
/module/FindosgViewer
|
||||
/module/FindosgVolume
|
||||
/module/FindosgWidget
|
||||
/module/FindPackageHandleStandardArgs
|
||||
/module/FindPackageMessage
|
||||
/module/FindPatch
|
||||
/module/FindPerlLibs
|
||||
/module/FindPerl
|
||||
@@ -189,8 +222,6 @@ All Modules
|
||||
/module/FindPython
|
||||
/module/FindPython2
|
||||
/module/FindPython3
|
||||
/module/FindPythonInterp
|
||||
/module/FindPythonLibs
|
||||
/module/FindQt3
|
||||
/module/FindQt4
|
||||
/module/FindQt
|
||||
@@ -218,39 +249,39 @@ All Modules
|
||||
/module/FindWget
|
||||
/module/FindWish
|
||||
/module/FindwxWidgets
|
||||
/module/FindwxWindows
|
||||
/module/FindXCTest
|
||||
/module/FindXalanC
|
||||
/module/FindXercesC
|
||||
/module/FindX11
|
||||
/module/FindXMLRPC
|
||||
/module/FindZLIB
|
||||
/module/FortranCInterface
|
||||
/module/GenerateExportHeader
|
||||
/module/GetPrerequisites
|
||||
/module/GNUInstallDirs
|
||||
/module/GoogleTest
|
||||
/module/InstallRequiredSystemLibraries
|
||||
/module/MacroAddFileDependencies
|
||||
/module/ProcessorCount
|
||||
/module/SelectLibraryConfigurations
|
||||
/module/SquishTestScript
|
||||
/module/TestBigEndian
|
||||
|
||||
Deprecated Modules
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
Deprecated Utility Modules
|
||||
==========================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/module/CMakeDetermineVSServicePack
|
||||
/module/CMakeExpandImportedTargets
|
||||
/module/CMakeForceCompiler
|
||||
/module/TestCXXAcceptsFlag
|
||||
/module/TestForANSIForScope
|
||||
/module/TestForANSIStreamHeaders
|
||||
/module/TestForSSTREAM
|
||||
/module/TestForSTDNamespace
|
||||
/module/UseEcos
|
||||
/module/UseJavaClassFilelist
|
||||
/module/UseJava
|
||||
/module/UseJavaSymlinks
|
||||
/module/UsePkgConfig
|
||||
/module/UseSWIG
|
||||
/module/UsewxWidgets
|
||||
/module/Use_wxWindows
|
||||
/module/WriteBasicConfigVersionFile
|
||||
/module/WriteCompilerDetectionHeader
|
||||
|
||||
Deprecated Find Modules
|
||||
=======================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
/module/FindCUDA
|
||||
/module/FindPythonInterp
|
||||
/module/FindPythonLibs
|
||||
/module/FindwxWindows
|
||||
|
||||
Legacy CPack Modules
|
||||
====================
|
||||
|
||||
@@ -51,6 +51,14 @@ The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
|
||||
to determine whether to report an error on use of deprecated macros or
|
||||
functions.
|
||||
|
||||
Policies Introduced by CMake 3.14
|
||||
=================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
CMP0082: Install rules from add_subdirectory() are interleaved with those in caller. </policy/CMP0082>
|
||||
|
||||
Policies Introduced by CMake 3.13
|
||||
=================================
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.. cmake-module:: ../../Modules/FindLibinput.cmake
|
||||
@@ -0,0 +1,24 @@
|
||||
CMP0082
|
||||
-------
|
||||
|
||||
Install rules from :command:`add_subdirectory` calls are interleaved with
|
||||
those in caller.
|
||||
|
||||
CMake 3.13 and lower ran the install rules from :command:`add_subdirectory`
|
||||
after all other install rules, even if :command:`add_subdirectory` was called
|
||||
before the other install rules. CMake 3.14 and later interleaves these
|
||||
:command:`add_subdirectory` install rules with the others so that they are
|
||||
run in the order they are declared.
|
||||
|
||||
The ``OLD`` behavior for this policy is to run the install rules from
|
||||
:command:`add_subdirectory` after the other install rules. The ``NEW``
|
||||
behavior for this policy is to run all install rules in the order they are
|
||||
declared.
|
||||
|
||||
This policy was introduced in CMake version 3.14. Unlike most policies,
|
||||
CMake version |release| does *not* warn by default when this policy
|
||||
is not set and simply uses OLD behavior. See documentation of the
|
||||
:variable:`CMAKE_POLICY_WARNING_CMP0082 <CMAKE_POLICY_WARNING_CMP<NNNN>>`
|
||||
variable to control the warning.
|
||||
|
||||
.. include:: DEPRECATED.txt
|
||||
@@ -6,7 +6,9 @@ This property is supported only when ``<LANG>`` is ``C`` or ``CXX``.
|
||||
Specify a :ref:`;-list <CMake Language Lists>` containing a command line
|
||||
for the ``cppcheck`` static analysis tool. The :ref:`Makefile Generators`
|
||||
and the :generator:`Ninja` generator will run ``cppcheck`` along with the
|
||||
compiler and report any problems.
|
||||
compiler and report any problems. If the command-line specifies the
|
||||
exit code options to ``cppcheck`` then the build will fail if the
|
||||
tool returns non-zero.
|
||||
|
||||
This property is initialized by the value of the
|
||||
:variable:`CMAKE_<LANG>_CPPCHECK` variable if it is set when a target is
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
0-sample-topic
|
||||
--------------
|
||||
|
||||
* This is a sample release note for the change in a topic.
|
||||
Developers should add similar notes for each topic branch
|
||||
making a noteworthy change. Each document should be named
|
||||
and titled to match the topic name to avoid merge conflicts.
|
||||
@@ -0,0 +1,9 @@
|
||||
better-empty-list-behavior
|
||||
--------------------------
|
||||
|
||||
* The :command:`list` operations ``REMOVE_ITEM``, ``REMOVE_DUPLICATES``,
|
||||
``SORT``, ``REVERSE``, and ``FILTER`` all now accept a non-existent variable
|
||||
as the list since these operations on empty lists is also the empty list.
|
||||
|
||||
* The :command:`list` operation ``REMOVE_AT`` now indicates that the given
|
||||
indices are invalid for a non-existent variable or empty list.
|
||||
@@ -0,0 +1,6 @@
|
||||
cppcheck-exit-code
|
||||
------------------
|
||||
|
||||
* When using cppcheck via the :variable:`CMAKE_<LANG>_CPPCHECK` variable
|
||||
or :prop_tgt:`<LANG>_CPPCHECK` property, the build will now fail if
|
||||
``cppcheck`` returns non-zero as configured by its command-line options.
|
||||
@@ -0,0 +1,5 @@
|
||||
ctest-done
|
||||
----------
|
||||
|
||||
* The :command:`ctest_submit` command learned a new ``Done`` part that can be used
|
||||
to inform CDash that a build is complete and that no more parts will be uploaded.
|
||||
@@ -0,0 +1,6 @@
|
||||
find_libinput
|
||||
-------------
|
||||
|
||||
* The :module:`FindLibinput` module was added to find `libinput`_.
|
||||
|
||||
.. _`libinput`: https://www.freedesktop.org/wiki/Software/libinput/
|
||||
@@ -0,0 +1,5 @@
|
||||
install-subdirectory-order
|
||||
--------------------------
|
||||
|
||||
* Install rules under :command:`add_subdirectory` now interleave with those in
|
||||
the calling directory. See policy :policy:`CMP0082` for details.
|
||||
@@ -7,6 +7,8 @@ CMake Release Notes
|
||||
This file should include the adjacent "dev.txt" file
|
||||
in development versions but not in release versions.
|
||||
|
||||
.. include:: dev.txt
|
||||
|
||||
Releases
|
||||
========
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@ warn by default:
|
||||
policy :policy:`CMP0066`.
|
||||
* ``CMAKE_POLICY_WARNING_CMP0067`` controls the warning for
|
||||
policy :policy:`CMP0067`.
|
||||
* ``CMAKE_POLICY_WARNING_CMP0082`` controls the warning for
|
||||
policy :policy:`CMP0082`.
|
||||
|
||||
This variable should not be set by a project in CMake code. Project
|
||||
developers running CMake may set this variable in their cache to
|
||||
|
||||
@@ -225,11 +225,8 @@ external file causes this function to fail the verification.
|
||||
#]=======================================================================]
|
||||
|
||||
function(_warn_cmp0080)
|
||||
message(AUTHOR_WARNING
|
||||
"Policy CMP0080 is not set: BundleUtilities prefers not to be included at configure time. "
|
||||
"Run \"cmake --help-policy CMP0080\" for policy details. "
|
||||
"Use the cmake_policy command to set the policy and suppress this warning."
|
||||
)
|
||||
cmake_policy(GET_WARNING CMP0080 _cmp0080_warning)
|
||||
message(AUTHOR_WARNING "${_cmp0080_warning}\n")
|
||||
endfunction()
|
||||
|
||||
# Do not include this module at configure time!
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#[=======================================================================[.rst:
|
||||
FindLibinput
|
||||
------------
|
||||
|
||||
Find libinput headers and library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
``Libinput::Libinput``
|
||||
The libinput library, if found.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables in your project:
|
||||
|
||||
``Libinput_FOUND``
|
||||
true if (the requested version of) libinput is available.
|
||||
``Libinput_VERSION``
|
||||
the version of libinput.
|
||||
``Libinput_LIBRARIES``
|
||||
the libraries to link against to use libinput.
|
||||
``Libinput_INCLUDE_DIRS``
|
||||
where to find the libinput headers.
|
||||
``Libinput_COMPILE_OPTIONS``
|
||||
this should be passed to target_compile_options(), if the
|
||||
target is not used for linking
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
|
||||
# Use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PKG_Libinput QUIET libinput)
|
||||
|
||||
set(Libinput_COMPILE_OPTIONS ${PKG_Libinput_CFLAGS_OTHER})
|
||||
set(Libinput_VERSION ${PKG_Libinput_VERSION})
|
||||
|
||||
find_path(Libinput_INCLUDE_DIR
|
||||
NAMES
|
||||
libinput.h
|
||||
HINTS
|
||||
${PKG_Libinput_INCLUDE_DIRS}
|
||||
)
|
||||
find_library(Libinput_LIBRARY
|
||||
NAMES
|
||||
input
|
||||
HINTS
|
||||
${PKG_Libinput_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Libinput
|
||||
FOUND_VAR
|
||||
Libinput_FOUND
|
||||
REQUIRED_VARS
|
||||
Libinput_LIBRARY
|
||||
Libinput_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
Libinput_VERSION
|
||||
)
|
||||
|
||||
if(Libinput_FOUND AND NOT TARGET Libinput::Libinput)
|
||||
add_library(Libinput::Libinput UNKNOWN IMPORTED)
|
||||
set_target_properties(Libinput::Libinput PROPERTIES
|
||||
IMPORTED_LOCATION "${Libinput_LIBRARY}"
|
||||
INTERFACE_COMPILE_OPTIONS "${Libinput_COMPILE_OPTIONS}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Libinput_INCLUDE_DIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
mark_as_advanced(Libinput_LIBRARY Libinput_INCLUDE_DIR)
|
||||
|
||||
if(Libinput_FOUND)
|
||||
set(Libinput_LIBRARIES ${Libinput_LIBRARY})
|
||||
set(Libinput_INCLUDE_DIRS ${Libinput_INCLUDE_DIR})
|
||||
set(Libinput_VERSION_STRING ${Libinput_VERSION})
|
||||
endif()
|
||||
+122
-123
@@ -1,125 +1,126 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindOpenGL
|
||||
# ----------
|
||||
#
|
||||
# FindModule for OpenGL and GLU.
|
||||
#
|
||||
# Optional COMPONENTS
|
||||
# ^^^^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module respects several optional COMPONENTS: ``EGL``, ``GLX``, and
|
||||
# ``OpenGL``. There are corresponding import targets for each of these flags.
|
||||
#
|
||||
# IMPORTED Targets
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module defines the :prop_tgt:`IMPORTED` targets:
|
||||
#
|
||||
# ``OpenGL::GL``
|
||||
# Defined to the platform-specific OpenGL libraries if the system has OpenGL.
|
||||
# ``OpenGL::OpenGL``
|
||||
# Defined to libOpenGL if the system is GLVND-based.
|
||||
# ``OpenGL::GLU``
|
||||
# Defined if the system has GLU.
|
||||
# ``OpenGL::GLX``
|
||||
# Defined if the system has GLX.
|
||||
# ``OpenGL::EGL``
|
||||
# Defined if the system has EGL.
|
||||
#
|
||||
# Result Variables
|
||||
# ^^^^^^^^^^^^^^^^
|
||||
#
|
||||
# This module sets the following variables:
|
||||
#
|
||||
# ``OPENGL_FOUND``
|
||||
# True, if the system has OpenGL and all components are found.
|
||||
# ``OPENGL_XMESA_FOUND``
|
||||
# True, if the system has XMESA.
|
||||
# ``OPENGL_GLU_FOUND``
|
||||
# True, if the system has GLU.
|
||||
# ``OpenGL_OpenGL_FOUND``
|
||||
# True, if the system has an OpenGL library.
|
||||
# ``OpenGL_GLX_FOUND``
|
||||
# True, if the system has GLX.
|
||||
# ``OpenGL_EGL_FOUND``
|
||||
# True, if the system has EGL.
|
||||
# ``OPENGL_INCLUDE_DIR``
|
||||
# Path to the OpenGL include directory.
|
||||
# ``OPENGL_EGL_INCLUDE_DIRS``
|
||||
# Path to the EGL include directory.
|
||||
# ``OPENGL_LIBRARIES``
|
||||
# Paths to the OpenGL library, windowing system libraries, and GLU libraries.
|
||||
# On Linux, this assumes GLX and is never correct for EGL-based targets.
|
||||
# Clients are encouraged to use the ``OpenGL::*`` import targets instead.
|
||||
#
|
||||
# Cache variables
|
||||
# ^^^^^^^^^^^^^^^
|
||||
#
|
||||
# The following cache variables may also be set:
|
||||
#
|
||||
# ``OPENGL_egl_LIBRARY``
|
||||
# Path to the EGL library.
|
||||
# ``OPENGL_glu_LIBRARY``
|
||||
# Path to the GLU library.
|
||||
# ``OPENGL_glx_LIBRARY``
|
||||
# Path to the GLVND 'GLX' library.
|
||||
# ``OPENGL_opengl_LIBRARY``
|
||||
# Path to the GLVND 'OpenGL' library
|
||||
# ``OPENGL_gl_LIBRARY``
|
||||
# Path to the OpenGL library. New code should prefer the ``OpenGL::*`` import
|
||||
# targets.
|
||||
#
|
||||
# Linux-specific
|
||||
# ^^^^^^^^^^^^^^
|
||||
#
|
||||
# Some Linux systems utilize GLVND as a new ABI for OpenGL. GLVND separates
|
||||
# context libraries from OpenGL itself; OpenGL lives in "libOpenGL", and
|
||||
# contexts are defined in "libGLX" or "libEGL". GLVND is currently the only way
|
||||
# to get OpenGL 3+ functionality via EGL in a manner portable across vendors.
|
||||
# Projects may use GLVND explicitly with target ``OpenGL::OpenGL`` and either
|
||||
# ``OpenGL::GLX`` or ``OpenGL::EGL``.
|
||||
#
|
||||
# Projects may use the ``OpenGL::GL`` target (or ``OPENGL_LIBRARIES`` variable)
|
||||
# to use legacy GL interfaces. These will use the legacy GL library located
|
||||
# by ``OPENGL_gl_LIBRARY``, if available. If ``OPENGL_gl_LIBRARY`` is empty or
|
||||
# not found and GLVND is available, the ``OpenGL::GL`` target will use GLVND
|
||||
# ``OpenGL::OpenGL`` and ``OpenGL::GLX`` (and the ``OPENGL_LIBRARIES``
|
||||
# variable will use the corresponding libraries). Thus, for non-EGL-based
|
||||
# Linux targets, the ``OpenGL::GL`` target is most portable.
|
||||
#
|
||||
# A ``OpenGL_GL_PREFERENCE`` variable may be set to specify the preferred way
|
||||
# to provide legacy GL interfaces in case multiple choices are available.
|
||||
# The value may be one of:
|
||||
#
|
||||
# ``GLVND``
|
||||
# If the GLVND OpenGL and GLX libraries are available, prefer them.
|
||||
# This forces ``OPENGL_gl_LIBRARY`` to be empty.
|
||||
# This is the default if components were requested (since components
|
||||
# correspond to GLVND libraries) or if policy :policy:`CMP0072` is
|
||||
# set to ``NEW``.
|
||||
#
|
||||
# ``LEGACY``
|
||||
# Prefer to use the legacy libGL library, if available.
|
||||
# This is the default if no components were requested and
|
||||
# policy :policy:`CMP0072` is not set to ``NEW``.
|
||||
#
|
||||
# For EGL targets the client must rely on GLVND support on the user's system.
|
||||
# Linking should use the ``OpenGL::OpenGL OpenGL::EGL`` targets. Using GLES*
|
||||
# libraries is theoretically possible in place of ``OpenGL::OpenGL``, but this
|
||||
# module does not currently support that; contributions welcome.
|
||||
#
|
||||
# ``OPENGL_egl_LIBRARY`` and ``OPENGL_EGL_INCLUDE_DIRS`` are defined in the case of
|
||||
# GLVND. For non-GLVND Linux and other systems these are left undefined.
|
||||
#
|
||||
# macOS-Specific
|
||||
# ^^^^^^^^^^^^^^
|
||||
#
|
||||
# On OSX FindOpenGL defaults to using the framework version of OpenGL. People
|
||||
# will have to change the cache values of OPENGL_glu_LIBRARY and
|
||||
# OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX.
|
||||
#[=======================================================================[.rst:
|
||||
FindOpenGL
|
||||
----------
|
||||
|
||||
FindModule for OpenGL and GLU.
|
||||
|
||||
Optional COMPONENTS
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This module respects several optional COMPONENTS: ``EGL``, ``GLX``, and
|
||||
``OpenGL``. There are corresponding import targets for each of these flags.
|
||||
|
||||
IMPORTED Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines the :prop_tgt:`IMPORTED` targets:
|
||||
|
||||
``OpenGL::GL``
|
||||
Defined to the platform-specific OpenGL libraries if the system has OpenGL.
|
||||
``OpenGL::OpenGL``
|
||||
Defined to libOpenGL if the system is GLVND-based.
|
||||
``OpenGL::GLU``
|
||||
Defined if the system has GLU.
|
||||
``OpenGL::GLX``
|
||||
Defined if the system has GLX.
|
||||
``OpenGL::EGL``
|
||||
Defined if the system has EGL.
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module sets the following variables:
|
||||
|
||||
``OPENGL_FOUND``
|
||||
True, if the system has OpenGL and all components are found.
|
||||
``OPENGL_XMESA_FOUND``
|
||||
True, if the system has XMESA.
|
||||
``OPENGL_GLU_FOUND``
|
||||
True, if the system has GLU.
|
||||
``OpenGL_OpenGL_FOUND``
|
||||
True, if the system has an OpenGL library.
|
||||
``OpenGL_GLX_FOUND``
|
||||
True, if the system has GLX.
|
||||
``OpenGL_EGL_FOUND``
|
||||
True, if the system has EGL.
|
||||
``OPENGL_INCLUDE_DIR``
|
||||
Path to the OpenGL include directory.
|
||||
``OPENGL_EGL_INCLUDE_DIRS``
|
||||
Path to the EGL include directory.
|
||||
``OPENGL_LIBRARIES``
|
||||
Paths to the OpenGL library, windowing system libraries, and GLU libraries.
|
||||
On Linux, this assumes GLX and is never correct for EGL-based targets.
|
||||
Clients are encouraged to use the ``OpenGL::*`` import targets instead.
|
||||
|
||||
Cache variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``OPENGL_egl_LIBRARY``
|
||||
Path to the EGL library.
|
||||
``OPENGL_glu_LIBRARY``
|
||||
Path to the GLU library.
|
||||
``OPENGL_glx_LIBRARY``
|
||||
Path to the GLVND 'GLX' library.
|
||||
``OPENGL_opengl_LIBRARY``
|
||||
Path to the GLVND 'OpenGL' library
|
||||
``OPENGL_gl_LIBRARY``
|
||||
Path to the OpenGL library. New code should prefer the ``OpenGL::*`` import
|
||||
targets.
|
||||
|
||||
Linux-specific
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
Some Linux systems utilize GLVND as a new ABI for OpenGL. GLVND separates
|
||||
context libraries from OpenGL itself; OpenGL lives in "libOpenGL", and
|
||||
contexts are defined in "libGLX" or "libEGL". GLVND is currently the only way
|
||||
to get OpenGL 3+ functionality via EGL in a manner portable across vendors.
|
||||
Projects may use GLVND explicitly with target ``OpenGL::OpenGL`` and either
|
||||
``OpenGL::GLX`` or ``OpenGL::EGL``.
|
||||
|
||||
Projects may use the ``OpenGL::GL`` target (or ``OPENGL_LIBRARIES`` variable)
|
||||
to use legacy GL interfaces. These will use the legacy GL library located
|
||||
by ``OPENGL_gl_LIBRARY``, if available. If ``OPENGL_gl_LIBRARY`` is empty or
|
||||
not found and GLVND is available, the ``OpenGL::GL`` target will use GLVND
|
||||
``OpenGL::OpenGL`` and ``OpenGL::GLX`` (and the ``OPENGL_LIBRARIES``
|
||||
variable will use the corresponding libraries). Thus, for non-EGL-based
|
||||
Linux targets, the ``OpenGL::GL`` target is most portable.
|
||||
|
||||
A ``OpenGL_GL_PREFERENCE`` variable may be set to specify the preferred way
|
||||
to provide legacy GL interfaces in case multiple choices are available.
|
||||
The value may be one of:
|
||||
|
||||
``GLVND``
|
||||
If the GLVND OpenGL and GLX libraries are available, prefer them.
|
||||
This forces ``OPENGL_gl_LIBRARY`` to be empty.
|
||||
This is the default if components were requested (since components
|
||||
correspond to GLVND libraries) or if policy :policy:`CMP0072` is
|
||||
set to ``NEW``.
|
||||
|
||||
``LEGACY``
|
||||
Prefer to use the legacy libGL library, if available.
|
||||
This is the default if no components were requested and
|
||||
policy :policy:`CMP0072` is not set to ``NEW``.
|
||||
|
||||
For EGL targets the client must rely on GLVND support on the user's system.
|
||||
Linking should use the ``OpenGL::OpenGL OpenGL::EGL`` targets. Using GLES*
|
||||
libraries is theoretically possible in place of ``OpenGL::OpenGL``, but this
|
||||
module does not currently support that; contributions welcome.
|
||||
|
||||
``OPENGL_egl_LIBRARY`` and ``OPENGL_EGL_INCLUDE_DIRS`` are defined in the case of
|
||||
GLVND. For non-GLVND Linux and other systems these are left undefined.
|
||||
|
||||
macOS-Specific
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
On OSX FindOpenGL defaults to using the framework version of OpenGL. People
|
||||
will have to change the cache values of OPENGL_glu_LIBRARY and
|
||||
OPENGL_gl_LIBRARY to use OpenGL with X11 on OSX.
|
||||
#]=======================================================================]
|
||||
|
||||
set(_OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY)
|
||||
|
||||
@@ -267,11 +268,9 @@ else()
|
||||
endif()
|
||||
|
||||
if(_OpenGL_GL_POLICY_WARN AND OPENGL_gl_LIBRARY AND OPENGL_opengl_LIBRARY AND OPENGL_glx_LIBRARY)
|
||||
cmake_policy(GET_WARNING CMP0072 _cmp0072_warning)
|
||||
message(AUTHOR_WARNING
|
||||
"Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. "
|
||||
"Run \"cmake --help-policy CMP0072\" for policy details. "
|
||||
"Use the cmake_policy command to set the policy and suppress this warning."
|
||||
"\n"
|
||||
"${_cmp0072_warning}\n"
|
||||
"FindOpenGL found both a legacy GL library:\n"
|
||||
" OPENGL_gl_LIBRARY: ${OPENGL_gl_LIBRARY}\n"
|
||||
"and GLVND libraries for OpenGL and GLX:\n"
|
||||
|
||||
@@ -5,9 +5,12 @@
|
||||
# FindQt
|
||||
# ------
|
||||
#
|
||||
# Searches for all installed versions of Qt.
|
||||
# Searches for all installed versions of Qt3 or Qt4.
|
||||
#
|
||||
# This should only be used if your project can work with multiple
|
||||
# This module cannot handle Qt5 or any later versions.
|
||||
# For those, see :manual:`cmake-qt(7)`.
|
||||
#
|
||||
# This module should only be used if your project can work with multiple
|
||||
# versions of Qt. If not, you should just directly use FindQt4 or
|
||||
# FindQt3. If multiple versions of Qt are found on the machine, then
|
||||
# The user must set the option DESIRED_QT_VERSION to the version they
|
||||
@@ -16,9 +19,6 @@
|
||||
# or FindQt4 module is included. Once the user sets DESIRED_QT_VERSION,
|
||||
# then the FindQt3 or FindQt4 module is included.
|
||||
#
|
||||
# This module can only detect and switch between Qt versions 3 and 4. It
|
||||
# cannot handle Qt5 or any later versions.
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# QT_REQUIRED if this is set to TRUE then if CMake can
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# modules that you will use, you need to name them as components to the
|
||||
# package:
|
||||
#
|
||||
# find_package(wxWidgets COMPONENTS core base ...)
|
||||
# find_package(wxWidgets COMPONENTS core base ... OPTIONAL_COMPONENTS net ...)
|
||||
#
|
||||
# There are two search branches: a windows style and a unix style. For
|
||||
# windows, the following variables are searched for and set to defaults
|
||||
@@ -89,7 +89,7 @@
|
||||
# ::
|
||||
#
|
||||
# # Note that for MinGW users the order of libs is important!
|
||||
# find_package(wxWidgets COMPONENTS net gl core base)
|
||||
# find_package(wxWidgets COMPONENTS gl core base OPTIONAL_COMPONENTS net)
|
||||
# if(wxWidgets_FOUND)
|
||||
# include(${wxWidgets_USE_FILE})
|
||||
# # and for each of your dependent executable/library targets:
|
||||
@@ -102,7 +102,7 @@
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# find_package(wxWidgets REQUIRED net gl core base)
|
||||
# find_package(wxWidgets REQUIRED gl core base OPTIONAL_COMPONENTS net)
|
||||
# include(${wxWidgets_USE_FILE})
|
||||
# # and for each of your dependent executable/library targets:
|
||||
# target_link_libraries(<YourTarget> ${wxWidgets_LIBRARIES})
|
||||
@@ -396,6 +396,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
list(APPEND wxWidgets_LIBRARIES
|
||||
debug ${WX_${LIB}d} optimized ${WX_${LIB}}
|
||||
)
|
||||
set(wxWidgets_${LIB}_FOUND TRUE)
|
||||
elseif(NOT wxWidgets_FIND_REQUIRED_${LIB})
|
||||
DBG_MSG_V("- ignored optional missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}")
|
||||
else()
|
||||
DBG_MSG_V("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}")
|
||||
set(wxWidgets_FOUND FALSE)
|
||||
@@ -408,9 +411,11 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
if(WX_${LIB}${_DBG})
|
||||
DBG_MSG_V("Found ${LIB}${_DBG}")
|
||||
list(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}})
|
||||
set(wxWidgets_${LIB}_FOUND TRUE)
|
||||
elseif(NOT wxWidgets_FIND_REQUIRED_${LIB})
|
||||
DBG_MSG_V("- ignored optional missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}")
|
||||
else()
|
||||
DBG_MSG_V(
|
||||
"- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}")
|
||||
DBG_MSG_V("- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}")
|
||||
set(wxWidgets_FOUND FALSE)
|
||||
endif()
|
||||
endforeach()
|
||||
@@ -803,11 +808,24 @@ else()
|
||||
# - NOTE: wx-config doesn't verify that the libs requested exist
|
||||
# it just produces the names. Maybe a TRY_COMPILE would
|
||||
# be useful here...
|
||||
string(REPLACE ";" ","
|
||||
wxWidgets_FIND_COMPONENTS "${wxWidgets_FIND_COMPONENTS}")
|
||||
unset(_cmp_req)
|
||||
unset(_cmp_opt)
|
||||
foreach(_cmp IN LISTS wxWidgets_FIND_COMPONENTS)
|
||||
if(wxWidgets_FIND_REQUIRED_${_cmp})
|
||||
list(APPEND _cmp_req "${_cmp}")
|
||||
else()
|
||||
list(APPEND _cmp_opt "${_cmp}")
|
||||
endif()
|
||||
endforeach()
|
||||
DBG_MSG_V("wxWidgets required components : ${_cmp_req}")
|
||||
DBG_MSG_V("wxWidgets optional components : ${_cmp_opt}")
|
||||
if(DEFINED _cmp_opt)
|
||||
string(REPLACE ";" "," _cmp_opt "--optional-libs ${_cmp_opt}")
|
||||
endif()
|
||||
string(REPLACE ";" "," _cmp_req "${_cmp_req}")
|
||||
execute_process(
|
||||
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
|
||||
${wxWidgets_SELECT_OPTIONS} --libs ${wxWidgets_FIND_COMPONENTS}
|
||||
${wxWidgets_SELECT_OPTIONS} --libs ${_cmp_req} ${_cmp_opt}
|
||||
OUTPUT_VARIABLE wxWidgets_LIBRARIES
|
||||
RESULT_VARIABLE RET
|
||||
ERROR_QUIET
|
||||
@@ -833,8 +851,10 @@ else()
|
||||
|
||||
else()
|
||||
set(wxWidgets_FOUND FALSE)
|
||||
DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}")
|
||||
DBG_MSG("${wxWidgets_CONFIG_EXECUTABLE} --libs ${_cmp_req} ${_cmp_opt} FAILED with RET=${RET}")
|
||||
endif()
|
||||
unset(_cmp_req)
|
||||
unset(_cmp_opt)
|
||||
endif()
|
||||
|
||||
# When using wx-config in MSYS, the include paths are UNIX style paths which may or may
|
||||
@@ -960,10 +980,18 @@ DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}")
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
# FIXME: set wxWidgets_<comp>_FOUND for wx-config branch
|
||||
# and use HANDLE_COMPONENTS on Unix too
|
||||
if(wxWidgets_FIND_STYLE STREQUAL "win32")
|
||||
set(wxWidgets_HANDLE_COMPONENTS "HANDLE_COMPONENTS")
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(wxWidgets
|
||||
REQUIRED_VARS wxWidgets_LIBRARIES wxWidgets_INCLUDE_DIRS
|
||||
VERSION_VAR wxWidgets_VERSION_STRING
|
||||
${wxWidgets_HANDLE_COMPONENTS}
|
||||
)
|
||||
unset(wxWidgets_HANDLE_COMPONENTS)
|
||||
|
||||
#=====================================================================
|
||||
# Macros for use in wxWidgets apps.
|
||||
|
||||
@@ -554,11 +554,8 @@ function(SWIG_ADD_LIBRARY name)
|
||||
set (UseSWIG_TARGET_NAME_PREFERENCE STANDARD)
|
||||
else()
|
||||
if (NOT target_name_policy)
|
||||
message(AUTHOR_WARNING
|
||||
"Policy CMP0078 is not set. "
|
||||
"Run \"cmake --help-policy CMP0078\" for policy details. "
|
||||
"Use the cmake_policy command to set the policy and suppress this warning."
|
||||
)
|
||||
cmake_policy(GET_WARNING CMP0078 _cmp0078_warning)
|
||||
message(AUTHOR_WARNING "${_cmp0078_warning}\n")
|
||||
endif()
|
||||
if (NOT DEFINED UseSWIG_TARGET_NAME_PREFERENCE)
|
||||
set (UseSWIG_TARGET_NAME_PREFERENCE LEGACY)
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
# Use_wxWindows
|
||||
# -------------
|
||||
#
|
||||
#
|
||||
# Deprecated. Use ``find_package(wxWidgets)`` and
|
||||
# ``include(${wxWidgets_USE_FILE})`` instead.
|
||||
#
|
||||
#
|
||||
# This convenience include finds if wxWindows is installed and set the
|
||||
|
||||
+9
-2
@@ -62,13 +62,13 @@ within the CMake source directory or any other build directory of your
|
||||
choice. Once this has finished successfully, run ``make`` and
|
||||
``make install``. In summary::
|
||||
|
||||
$ ./bootstrap && make && make install
|
||||
$ ./bootstrap && make && sudo make install
|
||||
|
||||
Windows
|
||||
^^^^^^^
|
||||
|
||||
You need to download and install a binary release of CMake in order to build
|
||||
CMake. You can get these releases from the `CMake Download Page`_ . Then
|
||||
CMake. You can get these releases from the `CMake Download Page`_. Then
|
||||
proceed with the instructions below.
|
||||
|
||||
.. _`CMake Download Page`: https://cmake.org/cmake/resources/software.html
|
||||
@@ -83,6 +83,13 @@ For instructions how to do this, see documentation on `Running CMake`_.
|
||||
|
||||
.. _`Running CMake`: https://cmake.org/cmake/help/runningcmake.html
|
||||
|
||||
To build the documentation, install `Sphinx`_ and configure CMake with
|
||||
``-DSPHINX_HTML=ON`` and/or ``-DSPHINX_MAN=ON`` to enable the "html" or
|
||||
"man" builder. Add ``-DSPHINX_EXECUTABLE=/path/to/sphinx-build`` if the
|
||||
tool is not found automatically.
|
||||
|
||||
.. _`Sphinx`: http://sphinx-doc.org
|
||||
|
||||
Reporting Bugs
|
||||
==============
|
||||
|
||||
|
||||
@@ -260,6 +260,8 @@ set(SRCS
|
||||
cmInstallFilesGenerator.cxx
|
||||
cmInstallScriptGenerator.h
|
||||
cmInstallScriptGenerator.cxx
|
||||
cmInstallSubdirectoryGenerator.h
|
||||
cmInstallSubdirectoryGenerator.cxx
|
||||
cmInstallTargetGenerator.h
|
||||
cmInstallTargetGenerator.cxx
|
||||
cmInstallDirectoryGenerator.h
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# CMake version number components.
|
||||
set(CMake_VERSION_MAJOR 3)
|
||||
set(CMake_VERSION_MINOR 13)
|
||||
set(CMake_VERSION_PATCH 0)
|
||||
set(CMake_VERSION_RC 1)
|
||||
set(CMake_VERSION_PATCH 20181018)
|
||||
#set(CMake_VERSION_RC 1)
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCTest.h"
|
||||
#include "cmCTestCurl.h"
|
||||
#include "cmCTestScriptHandler.h"
|
||||
@@ -55,6 +56,7 @@ public:
|
||||
std::string Filename;
|
||||
std::string MD5;
|
||||
std::string Message;
|
||||
std::string BuildID;
|
||||
|
||||
private:
|
||||
std::vector<char> CurrentValue;
|
||||
@@ -96,6 +98,8 @@ private:
|
||||
this->MD5 = this->GetCurrentValue();
|
||||
} else if (name == "message") {
|
||||
this->Message = this->GetCurrentValue();
|
||||
} else if (name == "buildId") {
|
||||
this->BuildID = this->GetCurrentValue();
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -152,10 +156,9 @@ void cmCTestSubmitHandler::Initialize()
|
||||
this->Files.clear();
|
||||
}
|
||||
|
||||
bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url)
|
||||
bool cmCTestSubmitHandler::SubmitUsingFTP(
|
||||
const std::string& localprefix, const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix, const std::string& url)
|
||||
{
|
||||
CURL* curl;
|
||||
CURLcode res;
|
||||
@@ -299,10 +302,9 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix,
|
||||
}
|
||||
|
||||
// Uploading files is simpler
|
||||
bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url)
|
||||
bool cmCTestSubmitHandler::SubmitUsingHTTP(
|
||||
const std::string& localprefix, const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix, const std::string& url)
|
||||
{
|
||||
CURL* curl;
|
||||
CURLcode res;
|
||||
@@ -465,6 +467,17 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
|
||||
cmSystemTools::ComputeFileHash(local_file, cmCryptoHash::AlgoMD5);
|
||||
}
|
||||
|
||||
// Generate Done.xml right before it is submitted.
|
||||
// The reason for this is two-fold:
|
||||
// 1) It must be generated after some other part has been submitted
|
||||
// so we have a buildId to refer to in its contents.
|
||||
// 2) By generating Done.xml here its timestamp will be as late as
|
||||
// possible. This gives us a more accurate record of how long the
|
||||
// entire build took to complete.
|
||||
if (file == "Done.xml") {
|
||||
this->CTest->GenerateDoneFile();
|
||||
}
|
||||
|
||||
if (!cmSystemTools::FileExists(local_file)) {
|
||||
cmCTestLog(this->CTest, ERROR_MESSAGE,
|
||||
" Cannot find file: " << local_file << std::endl);
|
||||
@@ -646,6 +659,7 @@ void cmCTestSubmitHandler::ParseResponse(
|
||||
" Submission failed: " << parser.Message << std::endl);
|
||||
return;
|
||||
}
|
||||
this->CTest->SetBuildID(parser.BuildID);
|
||||
}
|
||||
output = cmSystemTools::UpperCase(output);
|
||||
if (output.find("WARNING") != std::string::npos) {
|
||||
@@ -662,9 +676,9 @@ void cmCTestSubmitHandler::ParseResponse(
|
||||
}
|
||||
}
|
||||
|
||||
bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url)
|
||||
bool cmCTestSubmitHandler::TriggerUsingHTTP(
|
||||
const std::vector<std::string>& files, const std::string& remoteprefix,
|
||||
const std::string& url)
|
||||
{
|
||||
CURL* curl;
|
||||
char error_buffer[1024];
|
||||
@@ -792,11 +806,10 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set<std::string>& files,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url)
|
||||
bool cmCTestSubmitHandler::SubmitUsingSCP(
|
||||
const std::string& scp_command, const std::string& localprefix,
|
||||
const std::vector<std::string>& files, const std::string& remoteprefix,
|
||||
const std::string& url)
|
||||
{
|
||||
if (scp_command.empty() || localprefix.empty() || files.empty() ||
|
||||
remoteprefix.empty() || url.empty()) {
|
||||
@@ -890,7 +903,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
|
||||
}
|
||||
|
||||
bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& destination)
|
||||
{
|
||||
@@ -925,7 +938,7 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix,
|
||||
|
||||
#if defined(CTEST_USE_XMLRPC)
|
||||
bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
||||
const std::string& localprefix, const std::set<std::string>& files,
|
||||
const std::string& localprefix, const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix, const std::string& url)
|
||||
{
|
||||
xmlrpc_env env;
|
||||
@@ -1020,7 +1033,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
||||
}
|
||||
#else
|
||||
bool cmCTestSubmitHandler::SubmitUsingXMLRPC(
|
||||
std::string const& /*unused*/, std::set<std::string> const& /*unused*/,
|
||||
std::string const& /*unused*/, std::vector<std::string> const& /*unused*/,
|
||||
std::string const& /*unused*/, std::string const& /*unused*/)
|
||||
{
|
||||
return false;
|
||||
@@ -1351,13 +1364,13 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
cmGeneratedFileStream ofs;
|
||||
this->StartLogFile("Submit", ofs);
|
||||
|
||||
cmCTest::SetOfStrings files;
|
||||
std::vector<std::string> files;
|
||||
std::string prefix = this->GetSubmitResultsPrefix();
|
||||
|
||||
if (!this->Files.empty()) {
|
||||
// Submit the explicitly selected files:
|
||||
//
|
||||
files.insert(this->Files.begin(), this->Files.end());
|
||||
files.insert(files.end(), this->Files.begin(), this->Files.end());
|
||||
}
|
||||
|
||||
// Add to the list of files to submit from any selected, existing parts:
|
||||
@@ -1404,7 +1417,21 @@ int cmCTestSubmitHandler::ProcessHandler()
|
||||
|
||||
// Submit files from this part.
|
||||
std::vector<std::string> const& pfiles = this->CTest->GetSubmitFiles(p);
|
||||
files.insert(pfiles.begin(), pfiles.end());
|
||||
files.insert(files.end(), pfiles.begin(), pfiles.end());
|
||||
}
|
||||
|
||||
// Make sure files are unique, but preserve order.
|
||||
{
|
||||
// This endPos intermediate is needed to work around non-conformant C++11
|
||||
// standard libraries that have erase(iterator,iterator) instead of
|
||||
// erase(const_iterator,const_iterator).
|
||||
size_t endPos = cmRemoveDuplicates(files) - files.cbegin();
|
||||
files.erase(files.begin() + endPos, files.end());
|
||||
}
|
||||
|
||||
// Submit Done.xml last
|
||||
if (this->SubmitPart[cmCTest::PartDone]) {
|
||||
files.push_back("Done.xml");
|
||||
}
|
||||
|
||||
if (ofs) {
|
||||
|
||||
@@ -57,27 +57,27 @@ private:
|
||||
* Submit file using various ways
|
||||
*/
|
||||
bool SubmitUsingFTP(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix, const std::string& url);
|
||||
bool SubmitUsingHTTP(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url);
|
||||
bool SubmitUsingSCP(const std::string& scp_command,
|
||||
const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix, const std::string& url);
|
||||
|
||||
bool SubmitUsingCP(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix, const std::string& url);
|
||||
|
||||
bool TriggerUsingHTTP(const std::set<std::string>& files,
|
||||
bool TriggerUsingHTTP(const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url);
|
||||
|
||||
bool SubmitUsingXMLRPC(const std::string& localprefix,
|
||||
const std::set<std::string>& files,
|
||||
const std::vector<std::string>& files,
|
||||
const std::string& remoteprefix,
|
||||
const std::string& url);
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "cmParseGTMCoverage.h"
|
||||
|
||||
#include "cmAlgorithms.h"
|
||||
#include "cmCTest.h"
|
||||
#include "cmCTestCoverageHandler.h"
|
||||
#include "cmSystemTools.h"
|
||||
@@ -86,6 +87,10 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
|
||||
}
|
||||
// Find the full path to the file
|
||||
bool found = this->FindMumpsFile(routine, filepath);
|
||||
if (!found && cmHasLiteralSuffix(routine, "%")) {
|
||||
routine.erase(0, 1);
|
||||
found = this->FindMumpsFile(routine, filepath);
|
||||
}
|
||||
if (found) {
|
||||
int lineoffset = 0;
|
||||
if (this->FindFunctionInMumpsFile(filepath, function, lineoffset)) {
|
||||
@@ -192,8 +197,8 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
|
||||
done = true;
|
||||
}
|
||||
} else {
|
||||
// all chars except ", (, and % get stored in the arg string
|
||||
if (cur != '\"' && cur != '(' && cur != '%') {
|
||||
// all chars except " and ( get stored in the arg string
|
||||
if (cur != '\"' && cur != '(') {
|
||||
arg.append(1, line[pos]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,6 +46,9 @@ bool cmCMakePolicyCommand::InitialPass(std::vector<std::string> const& args,
|
||||
if (args[0] == "VERSION") {
|
||||
return this->HandleVersionMode(args);
|
||||
}
|
||||
if (args[0] == "GET_WARNING") {
|
||||
return this->HandleGetWarningMode(args);
|
||||
}
|
||||
|
||||
std::ostringstream e;
|
||||
e << "given unknown first argument \"" << args[0] << "\"";
|
||||
@@ -181,3 +184,33 @@ bool cmCMakePolicyCommand::HandleVersionMode(
|
||||
this->Makefile->SetPolicyVersion(version_min, version_max);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool cmCMakePolicyCommand::HandleGetWarningMode(
|
||||
std::vector<std::string> const& args)
|
||||
{
|
||||
if (args.size() != 3) {
|
||||
this->SetError(
|
||||
"GET_WARNING must be given exactly 2 additional arguments.");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get arguments.
|
||||
std::string const& id = args[1];
|
||||
std::string const& var = args[2];
|
||||
|
||||
// Lookup the policy number.
|
||||
cmPolicies::PolicyID pid;
|
||||
if (!cmPolicies::GetPolicyID(id.c_str(), pid)) {
|
||||
std::ostringstream e;
|
||||
e << "GET_WARNING given policy \"" << id
|
||||
<< "\" which is not known to this version of CMake.";
|
||||
this->SetError(e.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
// Lookup the policy warning.
|
||||
this->Makefile->AddDefinition(var,
|
||||
cmPolicies::GetPolicyWarning(pid).c_str());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ private:
|
||||
bool HandleSetMode(std::vector<std::string> const& args);
|
||||
bool HandleGetMode(std::vector<std::string> const& args);
|
||||
bool HandleVersionMode(std::vector<std::string> const& args);
|
||||
bool HandleGetWarningMode(std::vector<std::string> const& args);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -294,6 +294,7 @@ cmCTest::cmCTest()
|
||||
this->SuppressUpdatingCTestConfiguration = false;
|
||||
this->DartVersion = 1;
|
||||
this->DropSiteCDash = false;
|
||||
this->BuildID = "";
|
||||
this->OutputTestOutputOnTestFailure = false;
|
||||
this->RepeatTests = 1; // default to run each test once
|
||||
this->RepeatUntilFail = false;
|
||||
@@ -320,6 +321,7 @@ cmCTest::cmCTest()
|
||||
this->Parts[PartNotes].SetName("Notes");
|
||||
this->Parts[PartExtraFiles].SetName("ExtraFiles");
|
||||
this->Parts[PartUpload].SetName("Upload");
|
||||
this->Parts[PartDone].SetName("Done");
|
||||
|
||||
// Fill the part name-to-id map.
|
||||
for (Part p = PartStart; p != PartCount; p = Part(p + 1)) {
|
||||
@@ -612,6 +614,7 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command)
|
||||
std::string bld_dir = this->GetCTestConfiguration("BuildDirectory");
|
||||
this->DartVersion = 1;
|
||||
this->DropSiteCDash = false;
|
||||
this->BuildID = "";
|
||||
for (Part p = PartStart; p != PartCount; p = Part(p + 1)) {
|
||||
this->Parts[p].SubmitFiles.clear();
|
||||
}
|
||||
@@ -1565,6 +1568,24 @@ int cmCTest::GenerateNotesFile(const char* cfiles)
|
||||
return this->GenerateNotesFile(files);
|
||||
}
|
||||
|
||||
int cmCTest::GenerateDoneFile()
|
||||
{
|
||||
cmGeneratedFileStream ofs;
|
||||
if (!this->OpenOutputFile(this->CurrentTag, "Done.xml", ofs)) {
|
||||
cmCTestLog(this, ERROR_MESSAGE, "Cannot open done file" << std::endl);
|
||||
return 1;
|
||||
}
|
||||
cmXMLWriter xml(ofs);
|
||||
xml.StartDocument();
|
||||
xml.StartElement("Done");
|
||||
xml.Element("buildId", this->BuildID);
|
||||
xml.Element("time", std::chrono::system_clock::now());
|
||||
xml.EndElement(); // Done
|
||||
xml.EndDocument();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string cmCTest::Base64GzipEncodeFile(std::string const& file)
|
||||
{
|
||||
std::string tarFile = file + "_temp.tar.gz";
|
||||
|
||||
@@ -50,6 +50,7 @@ public:
|
||||
PartNotes,
|
||||
PartExtraFiles,
|
||||
PartUpload,
|
||||
PartDone,
|
||||
PartCount // Update names in constructor when adding a part
|
||||
};
|
||||
|
||||
@@ -373,6 +374,9 @@ public:
|
||||
/** Create XML file that contains all the notes specified */
|
||||
int GenerateNotesFile(const VectorOfStrings& files);
|
||||
|
||||
/** Create XML file to indicate that build is complete */
|
||||
int GenerateDoneFile();
|
||||
|
||||
/** Submit extra files to the server */
|
||||
bool SubmitExtraFiles(const char* files);
|
||||
bool SubmitExtraFiles(const VectorOfStrings& files);
|
||||
@@ -405,6 +409,10 @@ public:
|
||||
int GetDartVersion() { return this->DartVersion; }
|
||||
int GetDropSiteCDash() { return this->DropSiteCDash; }
|
||||
|
||||
/** The Build ID is assigned by CDash */
|
||||
void SetBuildID(const std::string& id) { this->BuildID = id; }
|
||||
std::string GetBuildID() { return this->BuildID; }
|
||||
|
||||
/** Add file to be submitted */
|
||||
void AddSubmitFile(Part part, const char* name);
|
||||
std::vector<std::string> const& GetSubmitFiles(Part part)
|
||||
@@ -607,6 +615,8 @@ private:
|
||||
int DartVersion;
|
||||
bool DropSiteCDash;
|
||||
|
||||
std::string BuildID;
|
||||
|
||||
std::vector<std::string> InitialCommandLineArguments;
|
||||
|
||||
int SubmitIndex;
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
|
||||
#include "cmMakefile.h"
|
||||
|
||||
cmCustomCommand::cmCustomCommand()
|
||||
: Backtrace()
|
||||
{
|
||||
this->HaveComment = false;
|
||||
this->EscapeOldStyle = true;
|
||||
this->EscapeAllowMakeVars = false;
|
||||
this->UsesTerminal = false;
|
||||
this->CommandExpandLists = false;
|
||||
}
|
||||
|
||||
cmCustomCommand::cmCustomCommand(cmMakefile const* mf,
|
||||
const std::vector<std::string>& outputs,
|
||||
const std::vector<std::string>& byproducts,
|
||||
|
||||
@@ -22,9 +22,6 @@ class cmMakefile;
|
||||
class cmCustomCommand
|
||||
{
|
||||
public:
|
||||
/** Default and copy constructors for STL containers. */
|
||||
cmCustomCommand();
|
||||
|
||||
/** Main constructor specifies all information for the command. */
|
||||
cmCustomCommand(cmMakefile const* mf,
|
||||
const std::vector<std::string>& outputs,
|
||||
@@ -103,11 +100,11 @@ private:
|
||||
std::string Comment;
|
||||
std::string WorkingDirectory;
|
||||
std::string Depfile;
|
||||
bool HaveComment;
|
||||
bool EscapeAllowMakeVars;
|
||||
bool EscapeOldStyle;
|
||||
bool UsesTerminal;
|
||||
bool CommandExpandLists;
|
||||
bool HaveComment = false;
|
||||
bool EscapeAllowMakeVars = false;
|
||||
bool EscapeOldStyle = true;
|
||||
bool UsesTerminal = false;
|
||||
bool CommandExpandLists = false;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -384,13 +384,8 @@ std::string cmExtraSublimeTextGenerator::ComputeDefines(
|
||||
cmGeneratorExpressionInterpreter genexInterpreter(lg, config, target,
|
||||
language);
|
||||
|
||||
// Add the export symbol definition for shared library objects.
|
||||
if (const char* exportMacro = target->GetExportMacro()) {
|
||||
lg->AppendDefines(defines, exportMacro);
|
||||
}
|
||||
|
||||
// Add preprocessor definitions for this target and configuration.
|
||||
lg->AddCompileDefinitions(defines, target, config, language);
|
||||
lg->GetTargetDefines(target, config, language, defines);
|
||||
const std::string COMPILE_DEFINITIONS("COMPILE_DEFINITIONS");
|
||||
if (const char* compile_defs = source->GetProperty(COMPILE_DEFINITIONS)) {
|
||||
lg->AppendDefines(
|
||||
|
||||
@@ -1730,7 +1730,7 @@ bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const
|
||||
this->GetType() == cmStateEnums::EXECUTABLE;
|
||||
}
|
||||
|
||||
const char* cmGeneratorTarget::GetExportMacro() const
|
||||
const std::string* cmGeneratorTarget::GetExportMacro() const
|
||||
{
|
||||
// Define the symbol for targets that export symbols.
|
||||
if (this->GetType() == cmStateEnums::SHARED_LIBRARY ||
|
||||
@@ -1743,7 +1743,7 @@ const char* cmGeneratorTarget::GetExportMacro() const
|
||||
in += "_EXPORTS";
|
||||
this->ExportMacro = cmSystemTools::MakeCidentifier(in);
|
||||
}
|
||||
return this->ExportMacro.c_str();
|
||||
return &this->ExportMacro;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
|
||||
/** Get the macro to define when building sources in this target.
|
||||
If no macro should be defined null is returned. */
|
||||
const char* GetExportMacro() const;
|
||||
const std::string* GetExportMacro() const;
|
||||
|
||||
/** Get the soname of the target. Allowed only for a shared library. */
|
||||
std::string GetSOName(const std::string& config) const;
|
||||
|
||||
@@ -267,14 +267,9 @@ std::string cmGhsMultiTargetGenerator::GetDefines(const std::string& language,
|
||||
if (i == this->DefinesByLanguage.end()) {
|
||||
std::set<std::string> defines;
|
||||
const char* lang = language.c_str();
|
||||
// Add the export symbol definition for shared library objects.
|
||||
if (const char* exportMacro = this->GeneratorTarget->GetExportMacro()) {
|
||||
this->LocalGenerator->AppendDefines(defines, exportMacro);
|
||||
}
|
||||
|
||||
// Add preprocessor definitions for this target and configuration.
|
||||
this->LocalGenerator->AddCompileDefinitions(defines, this->GeneratorTarget,
|
||||
config, language);
|
||||
this->LocalGenerator->GetTargetDefines(this->GeneratorTarget, config,
|
||||
language, defines);
|
||||
|
||||
std::string definesString;
|
||||
this->LocalGenerator->JoinDefines(defines, definesString, lang);
|
||||
|
||||
@@ -1814,9 +1814,9 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
|
||||
BuildObjectListOrString ppDefs(this, true);
|
||||
this->AppendDefines(
|
||||
ppDefs, "CMAKE_INTDIR=\"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)\"");
|
||||
if (const char* exportMacro = gtgt->GetExportMacro()) {
|
||||
if (const std::string* exportMacro = gtgt->GetExportMacro()) {
|
||||
// Add the export symbol definition for shared library objects.
|
||||
this->AppendDefines(ppDefs, exportMacro);
|
||||
this->AppendDefines(ppDefs, exportMacro->c_str());
|
||||
}
|
||||
std::vector<std::string> targetDefines;
|
||||
if (!langForPreprocessor.empty()) {
|
||||
|
||||
@@ -22,6 +22,19 @@ cmInstallGenerator::~cmInstallGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
bool cmInstallGenerator::HaveInstall()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void cmInstallGenerator::CheckCMP0082(bool& haveSubdirectoryInstall,
|
||||
bool& haveInstallAfterSubdirectory)
|
||||
{
|
||||
if (haveSubdirectoryInstall) {
|
||||
haveInstallAfterSubdirectory = true;
|
||||
}
|
||||
}
|
||||
|
||||
void cmInstallGenerator::AddInstallRule(
|
||||
std::ostream& os, std::string const& dest, cmInstallType type,
|
||||
std::vector<std::string> const& files, bool optional /* = false */,
|
||||
|
||||
@@ -38,6 +38,10 @@ public:
|
||||
bool exclude_from_all);
|
||||
~cmInstallGenerator() override;
|
||||
|
||||
virtual bool HaveInstall();
|
||||
virtual void CheckCMP0082(bool& haveSubdirectoryInstall,
|
||||
bool& haveInstallAfterSubdirectory);
|
||||
|
||||
void AddInstallRule(
|
||||
std::ostream& os, std::string const& dest, cmInstallType type,
|
||||
std::vector<std::string> const& files, bool optional = false,
|
||||
|
||||
@@ -30,9 +30,9 @@ void cmInstallScriptGenerator::GenerateScript(std::ostream& os)
|
||||
os << indent << "if(" << component_test << ")\n";
|
||||
|
||||
if (this->Code) {
|
||||
os << indent.Next() << this->Script << "\n";
|
||||
os << indent << this->Script << "\n";
|
||||
} else {
|
||||
os << indent.Next() << "include(\"" << this->Script << "\")\n";
|
||||
os << indent << "include(\"" << this->Script << "\")\n";
|
||||
}
|
||||
|
||||
os << indent << "endif()\n\n";
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#include "cmInstallSubdirectoryGenerator.h"
|
||||
|
||||
#include "cmLocalGenerator.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmPolicies.h"
|
||||
#include "cmScriptGenerator.h"
|
||||
#include "cmSystemTools.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator(
|
||||
cmMakefile* makefile, const char* binaryDirectory, bool excludeFromAll)
|
||||
: cmInstallGenerator(nullptr, std::vector<std::string>(), nullptr,
|
||||
MessageDefault, excludeFromAll)
|
||||
, Makefile(makefile)
|
||||
, BinaryDirectory(binaryDirectory)
|
||||
{
|
||||
}
|
||||
|
||||
cmInstallSubdirectoryGenerator::~cmInstallSubdirectoryGenerator()
|
||||
{
|
||||
}
|
||||
|
||||
bool cmInstallSubdirectoryGenerator::HaveInstall()
|
||||
{
|
||||
for (auto generator : this->Makefile->GetInstallGenerators()) {
|
||||
if (generator->HaveInstall()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void cmInstallSubdirectoryGenerator::CheckCMP0082(
|
||||
bool& haveSubdirectoryInstall, bool& /*unused*/)
|
||||
{
|
||||
if (this->HaveInstall()) {
|
||||
haveSubdirectoryInstall = true;
|
||||
}
|
||||
}
|
||||
|
||||
void cmInstallSubdirectoryGenerator::Compute(cmLocalGenerator* lg)
|
||||
{
|
||||
this->LocalGenerator = lg;
|
||||
}
|
||||
|
||||
void cmInstallSubdirectoryGenerator::GenerateScript(std::ostream& os)
|
||||
{
|
||||
if (!this->ExcludeFromAll) {
|
||||
cmPolicies::PolicyStatus status =
|
||||
this->LocalGenerator->GetPolicyStatus(cmPolicies::CMP0082);
|
||||
switch (status) {
|
||||
case cmPolicies::WARN:
|
||||
case cmPolicies::OLD:
|
||||
// OLD behavior is handled in cmLocalGenerator::GenerateInstallRules()
|
||||
break;
|
||||
|
||||
case cmPolicies::NEW:
|
||||
case cmPolicies::REQUIRED_IF_USED:
|
||||
case cmPolicies::REQUIRED_ALWAYS: {
|
||||
Indent indent;
|
||||
std::string odir = this->BinaryDirectory;
|
||||
cmSystemTools::ConvertToUnixSlashes(odir);
|
||||
os << indent << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n"
|
||||
<< indent.Next()
|
||||
<< "# Include the install script for the subdirectory.\n"
|
||||
<< indent.Next() << "include(\"" << odir
|
||||
<< "/cmake_install.cmake\")\n"
|
||||
<< indent << "endif()\n\n";
|
||||
} break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
file Copyright.txt or https://cmake.org/licensing for details. */
|
||||
#ifndef cmInstallSubdirectoryGenerator_h
|
||||
#define cmInstallSubdirectoryGenerator_h
|
||||
|
||||
#include "cmConfigure.h" // IWYU pragma: keep
|
||||
|
||||
#include "cmInstallGenerator.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
class cmLocalGenerator;
|
||||
class cmMakefile;
|
||||
|
||||
/** \class cmInstallSubdirectoryGenerator
|
||||
* \brief Generate target installation rules.
|
||||
*/
|
||||
class cmInstallSubdirectoryGenerator : public cmInstallGenerator
|
||||
{
|
||||
public:
|
||||
cmInstallSubdirectoryGenerator(cmMakefile* makefile,
|
||||
const char* binaryDirectory,
|
||||
bool excludeFromAll);
|
||||
~cmInstallSubdirectoryGenerator() override;
|
||||
|
||||
bool HaveInstall() override;
|
||||
void CheckCMP0082(bool& haveSubdirectoryInstall,
|
||||
bool& haveInstallAfterSubdirectory) override;
|
||||
|
||||
void Compute(cmLocalGenerator* lg) override;
|
||||
|
||||
protected:
|
||||
void GenerateScript(std::ostream& os) override;
|
||||
|
||||
cmMakefile* Makefile;
|
||||
std::string BinaryDirectory;
|
||||
cmLocalGenerator* LocalGenerator;
|
||||
};
|
||||
|
||||
#endif
|
||||
+22
-24
@@ -346,8 +346,7 @@ bool cmListCommand::HandleRemoveItemCommand(
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
this->SetError("sub-command REMOVE_ITEM requires list to be present.");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string> remove(args.begin() + 2, args.end());
|
||||
@@ -376,8 +375,7 @@ bool cmListCommand::HandleReverseCommand(std::vector<std::string> const& args)
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
this->SetError("sub-command REVERSE requires list to be present.");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string value = cmJoin(cmReverseRange(varArgsExpanded), ";");
|
||||
@@ -399,9 +397,7 @@ bool cmListCommand::HandleRemoveDuplicatesCommand(
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
this->SetError(
|
||||
"sub-command REMOVE_DUPLICATES requires list to be present.");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
std::vector<std::string>::const_iterator argsEnd =
|
||||
@@ -1152,8 +1148,7 @@ bool cmListCommand::HandleSortCommand(std::vector<std::string> const& args)
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
this->SetError("sub-command SORT requires list to be present.");
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((sortCompare == cmStringSorter::Compare::STRING) &&
|
||||
@@ -1230,13 +1225,17 @@ bool cmListCommand::HandleRemoveAtCommand(std::vector<std::string> const& args)
|
||||
const std::string& listName = args[1];
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
this->SetError("sub-command REMOVE_AT requires list to be present.");
|
||||
return false;
|
||||
}
|
||||
// FIXME: Add policy to make non-existing lists an error like empty lists.
|
||||
if (varArgsExpanded.empty()) {
|
||||
this->SetError("REMOVE_AT given empty list");
|
||||
if (!this->GetList(varArgsExpanded, listName) || varArgsExpanded.empty()) {
|
||||
std::ostringstream str;
|
||||
str << "index: ";
|
||||
for (size_t i = 1; i < args.size(); ++i) {
|
||||
str << args[i];
|
||||
if (i != args.size() - 1) {
|
||||
str << ", ";
|
||||
}
|
||||
}
|
||||
str << " out of range (0, 0)";
|
||||
this->SetError(str.str());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1289,14 +1288,6 @@ bool cmListCommand::HandleFilterCommand(std::vector<std::string> const& args)
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string& listName = args[1];
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
this->SetError("sub-command FILTER requires list to be present.");
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string& op = args[2];
|
||||
bool includeMatches;
|
||||
if (op == "INCLUDE") {
|
||||
@@ -1308,6 +1299,13 @@ bool cmListCommand::HandleFilterCommand(std::vector<std::string> const& args)
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string& listName = args[1];
|
||||
// expand the variable
|
||||
std::vector<std::string> varArgsExpanded;
|
||||
if (!this->GetList(varArgsExpanded, listName)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const std::string& mode = args[3];
|
||||
if (mode == "REGEX") {
|
||||
if (args.size() != 5) {
|
||||
|
||||
+52
-29
@@ -517,31 +517,62 @@ void cmLocalGenerator::GenerateInstallRules()
|
||||
}
|
||||
|
||||
// Ask each install generator to write its code.
|
||||
cmPolicies::PolicyStatus status = this->GetPolicyStatus(cmPolicies::CMP0082);
|
||||
std::vector<cmInstallGenerator*> const& installers =
|
||||
this->Makefile->GetInstallGenerators();
|
||||
for (cmInstallGenerator* installer : installers) {
|
||||
installer->Generate(fout, config, configurationTypes);
|
||||
bool haveSubdirectoryInstall = false;
|
||||
bool haveInstallAfterSubdirectory = false;
|
||||
if (status == cmPolicies::WARN) {
|
||||
for (cmInstallGenerator* installer : installers) {
|
||||
installer->CheckCMP0082(haveSubdirectoryInstall,
|
||||
haveInstallAfterSubdirectory);
|
||||
installer->Generate(fout, config, configurationTypes);
|
||||
}
|
||||
} else {
|
||||
for (cmInstallGenerator* installer : installers) {
|
||||
installer->Generate(fout, config, configurationTypes);
|
||||
}
|
||||
}
|
||||
|
||||
// Write rules from old-style specification stored in targets.
|
||||
this->GenerateTargetInstallRules(fout, config, configurationTypes);
|
||||
|
||||
// Include install scripts from subdirectories.
|
||||
std::vector<cmStateSnapshot> children =
|
||||
this->Makefile->GetStateSnapshot().GetChildren();
|
||||
if (!children.empty()) {
|
||||
fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
|
||||
fout << " # Include the install script for each subdirectory.\n";
|
||||
for (cmStateSnapshot const& c : children) {
|
||||
if (!c.GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
|
||||
std::string odir = c.GetDirectory().GetCurrentBinary();
|
||||
cmSystemTools::ConvertToUnixSlashes(odir);
|
||||
fout << " include(\"" << odir << "/cmake_install.cmake\")"
|
||||
<< std::endl;
|
||||
switch (status) {
|
||||
case cmPolicies::WARN:
|
||||
if (haveInstallAfterSubdirectory &&
|
||||
this->Makefile->PolicyOptionalWarningEnabled(
|
||||
"CMAKE_POLICY_WARNING_CMP0082")) {
|
||||
std::ostringstream e;
|
||||
e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0082) << "\n";
|
||||
this->IssueMessage(cmake::AUTHOR_WARNING, e.str());
|
||||
}
|
||||
}
|
||||
fout << "\n";
|
||||
fout << "endif()\n\n";
|
||||
CM_FALLTHROUGH;
|
||||
case cmPolicies::OLD: {
|
||||
std::vector<cmStateSnapshot> children =
|
||||
this->Makefile->GetStateSnapshot().GetChildren();
|
||||
if (!children.empty()) {
|
||||
fout << "if(NOT CMAKE_INSTALL_LOCAL_ONLY)\n";
|
||||
fout << " # Include the install script for each subdirectory.\n";
|
||||
for (cmStateSnapshot const& c : children) {
|
||||
if (!c.GetDirectory().GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
|
||||
std::string odir = c.GetDirectory().GetCurrentBinary();
|
||||
cmSystemTools::ConvertToUnixSlashes(odir);
|
||||
fout << " include(\"" << odir << "/cmake_install.cmake\")"
|
||||
<< std::endl;
|
||||
}
|
||||
}
|
||||
fout << "\n";
|
||||
fout << "endif()\n\n";
|
||||
}
|
||||
} break;
|
||||
|
||||
case cmPolicies::REQUIRED_IF_USED:
|
||||
case cmPolicies::REQUIRED_ALWAYS:
|
||||
case cmPolicies::NEW:
|
||||
// NEW behavior is handled in
|
||||
// cmInstallSubdirectoryGenerator::GenerateScript()
|
||||
break;
|
||||
}
|
||||
|
||||
// Record the install manifest.
|
||||
@@ -773,16 +804,6 @@ std::string cmLocalGenerator::GetIncludeFlags(
|
||||
return flags;
|
||||
}
|
||||
|
||||
void cmLocalGenerator::AddCompileDefinitions(std::set<std::string>& defines,
|
||||
cmGeneratorTarget const* target,
|
||||
const std::string& config,
|
||||
const std::string& lang) const
|
||||
{
|
||||
std::vector<std::string> targetDefines;
|
||||
target->GetCompileDefinitions(targetDefines, config, lang);
|
||||
this->AppendDefines(defines, targetDefines);
|
||||
}
|
||||
|
||||
void cmLocalGenerator::AddCompileOptions(std::string& flags,
|
||||
cmGeneratorTarget* target,
|
||||
const std::string& lang,
|
||||
@@ -1232,12 +1253,14 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
|
||||
std::set<std::string>& defines) const
|
||||
{
|
||||
// Add the export symbol definition for shared library objects.
|
||||
if (const char* exportMacro = target->GetExportMacro()) {
|
||||
this->AppendDefines(defines, exportMacro);
|
||||
if (const std::string* exportMacro = target->GetExportMacro()) {
|
||||
this->AppendDefines(defines, *exportMacro);
|
||||
}
|
||||
|
||||
// Add preprocessor definitions for this target and configuration.
|
||||
this->AddCompileDefinitions(defines, target, config, lang);
|
||||
std::vector<std::string> targetDefines;
|
||||
target->GetCompileDefinitions(targetDefines, config, lang);
|
||||
this->AppendDefines(defines, targetDefines);
|
||||
}
|
||||
|
||||
std::string cmLocalGenerator::GetTargetFortranFlags(
|
||||
|
||||
@@ -251,10 +251,6 @@ public:
|
||||
bool appendAllImplicitDirs = false) const;
|
||||
void AddCompileOptions(std::string& flags, cmGeneratorTarget* target,
|
||||
const std::string& lang, const std::string& config);
|
||||
void AddCompileDefinitions(std::set<std::string>& defines,
|
||||
cmGeneratorTarget const* target,
|
||||
const std::string& config,
|
||||
const std::string& lang) const;
|
||||
|
||||
std::string GetProjectName() const;
|
||||
|
||||
|
||||
@@ -1819,8 +1819,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo(
|
||||
|
||||
// Build a list of preprocessor definitions for the target.
|
||||
std::set<std::string> defines;
|
||||
this->AddCompileDefinitions(defines, target, this->ConfigName,
|
||||
implicitLang.first);
|
||||
this->GetTargetDefines(target, this->ConfigName, implicitLang.first,
|
||||
defines);
|
||||
if (!defines.empty()) {
|
||||
/* clang-format off */
|
||||
cmakefileStream
|
||||
|
||||
@@ -735,8 +735,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
|
||||
targetOptions.AddDefine(configDefine);
|
||||
|
||||
// Add the export symbol definition for shared library objects.
|
||||
if (const char* exportMacro = target->GetExportMacro()) {
|
||||
targetOptions.AddDefine(exportMacro);
|
||||
if (const std::string* exportMacro = target->GetExportMacro()) {
|
||||
targetOptions.AddDefine(*exportMacro);
|
||||
}
|
||||
|
||||
// The intermediate directory name consists of a directory for the
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "cmGeneratorExpressionEvaluationFile.h"
|
||||
#include "cmGlobalGenerator.h"
|
||||
#include "cmInstallGenerator.h" // IWYU pragma: keep
|
||||
#include "cmInstallSubdirectoryGenerator.h"
|
||||
#include "cmListFileCache.h"
|
||||
#include "cmSourceFile.h"
|
||||
#include "cmSourceFileLocation.h"
|
||||
@@ -1669,6 +1670,9 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
|
||||
} else {
|
||||
this->UnConfiguredDirectories.push_back(subMf);
|
||||
}
|
||||
|
||||
this->AddInstallGenerator(new cmInstallSubdirectoryGenerator(
|
||||
subMf, binPath.c_str(), excludeFromAll));
|
||||
}
|
||||
|
||||
const std::string& cmMakefile::GetCurrentSourceDirectory() const
|
||||
|
||||
+6
-2
@@ -236,11 +236,15 @@ class cmMakefile;
|
||||
"target_link_libraries allows use with targets in other directories.", 3, \
|
||||
13, 0, cmPolicies::WARN) \
|
||||
SELECT(POLICY, CMP0080, \
|
||||
"BundleUtilities cannot be included at configure time", 3, 13, 0, \
|
||||
"BundleUtilities cannot be included at configure time.", 3, 13, 0, \
|
||||
cmPolicies::WARN) \
|
||||
SELECT(POLICY, CMP0081, \
|
||||
"Relative paths not allowed in LINK_DIRECTORIES target property.", \
|
||||
3, 13, 0, cmPolicies::WARN)
|
||||
3, 13, 0, cmPolicies::WARN) \
|
||||
SELECT(POLICY, CMP0082, \
|
||||
"Install rules from add_subdirectory() are interleaved with those " \
|
||||
"in caller.", \
|
||||
3, 14, 0, cmPolicies::WARN)
|
||||
|
||||
#define CM_SELECT_ID(F, A1, A2, A3, A4, A5, A6) F(A1)
|
||||
#define CM_FOR_EACH_POLICY_ID(POLICY) \
|
||||
|
||||
@@ -416,7 +416,7 @@ bool cmQtAutoGenInitializer::InitMoc()
|
||||
auto GetCompileDefinitions =
|
||||
[this, localGen](std::string const& cfg) -> std::string {
|
||||
std::set<std::string> defines;
|
||||
localGen->AddCompileDefinitions(defines, this->Target, cfg, "CXX");
|
||||
localGen->GetTargetDefines(this->Target, cfg, "CXX", defines);
|
||||
return cmJoin(defines, ";");
|
||||
};
|
||||
|
||||
|
||||
@@ -45,24 +45,21 @@ struct cmVisualStudio10TargetGenerator::Elem
|
||||
bool HasContent = false;
|
||||
std::string Tag;
|
||||
|
||||
Elem(std::ostream& s)
|
||||
Elem(std::ostream& s, const char* tag)
|
||||
: S(s)
|
||||
, Indent(0)
|
||||
, Tag(tag)
|
||||
{
|
||||
this->StartElement();
|
||||
}
|
||||
Elem(const Elem&) = delete;
|
||||
Elem(Elem& par)
|
||||
: S(par.S)
|
||||
, Indent(par.Indent + 1)
|
||||
{
|
||||
par.SetHasElements();
|
||||
}
|
||||
Elem(Elem& par, const char* tag)
|
||||
: S(par.S)
|
||||
, Indent(par.Indent + 1)
|
||||
, Tag(tag)
|
||||
{
|
||||
par.SetHasElements();
|
||||
this->StartElement(tag);
|
||||
this->StartElement();
|
||||
}
|
||||
void SetHasElements()
|
||||
{
|
||||
@@ -72,12 +69,7 @@ struct cmVisualStudio10TargetGenerator::Elem
|
||||
}
|
||||
}
|
||||
std::ostream& WriteString(const char* line);
|
||||
Elem& StartElement(const std::string& tag)
|
||||
{
|
||||
this->Tag = tag;
|
||||
this->WriteString("<") << tag;
|
||||
return *this;
|
||||
}
|
||||
void StartElement() { this->WriteString("<") << this->Tag; }
|
||||
void Element(const char* tag, const std::string& val)
|
||||
{
|
||||
Elem(*this, tag).Content(val);
|
||||
@@ -87,8 +79,6 @@ struct cmVisualStudio10TargetGenerator::Elem
|
||||
this->S << " " << an << "=\"" << cmVS10EscapeAttr(av) << "\"";
|
||||
return *this;
|
||||
}
|
||||
// This method for now assumes that this->Tag has been set, e.g. by calling
|
||||
// StartElement().
|
||||
void Content(const std::string& val)
|
||||
{
|
||||
if (!this->HasContent) {
|
||||
@@ -380,8 +370,7 @@ void cmVisualStudio10TargetGenerator::Generate()
|
||||
<< this->GlobalGenerator->Encoding() << "\"?>"
|
||||
<< "\n";
|
||||
{
|
||||
Elem e0(BuildFileStream);
|
||||
e0.StartElement("Project");
|
||||
Elem e0(BuildFileStream, "Project");
|
||||
e0.Attribute("DefaultTargets", "Build");
|
||||
e0.Attribute("ToolsVersion", this->GlobalGenerator->GetToolsVersion());
|
||||
e0.Attribute("xmlns",
|
||||
@@ -922,8 +911,8 @@ void cmVisualStudio10TargetGenerator::WriteXamlFilesGroup(Elem& e0)
|
||||
xamlType = "Page";
|
||||
}
|
||||
|
||||
Elem e2(e1);
|
||||
this->WriteSource(e2, xamlType, oi);
|
||||
Elem e2(e1, xamlType);
|
||||
this->WriteSource(e2, oi);
|
||||
e2.SetHasElements();
|
||||
if (this->ProjectType == csproj && !this->InSourceBuild) {
|
||||
// add <Link> tag to written XAML source if necessary
|
||||
@@ -1275,15 +1264,15 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
|
||||
std::unique_ptr<Elem> spe2;
|
||||
if (this->ProjectType != csproj) {
|
||||
spe1 = cm::make_unique<Elem>(e0, "ItemGroup");
|
||||
spe2 = cm::make_unique<Elem>(*spe1);
|
||||
this->WriteSource(*spe2, "CustomBuild", source);
|
||||
spe2 = cm::make_unique<Elem>(*spe1, "CustomBuild");
|
||||
this->WriteSource(*spe2, source);
|
||||
spe2->SetHasElements();
|
||||
} else {
|
||||
Elem e1(e0, "ItemGroup");
|
||||
Elem e2(e1);
|
||||
Elem e2(e1, "None");
|
||||
std::string link;
|
||||
this->GetCSharpSourceLink(source, link);
|
||||
this->WriteSource(e2, "None", source);
|
||||
this->WriteSource(e2, source);
|
||||
e2.SetHasElements();
|
||||
if (!link.empty()) {
|
||||
e2.Element("Link", link);
|
||||
@@ -1417,8 +1406,7 @@ void cmVisualStudio10TargetGenerator::WriteGroups()
|
||||
<< this->GlobalGenerator->Encoding() << "\"?>"
|
||||
<< "\n";
|
||||
{
|
||||
Elem e0(fout);
|
||||
e0.StartElement("Project");
|
||||
Elem e0(fout, "Project");
|
||||
e0.Attribute("ToolsVersion", this->GlobalGenerator->GetToolsVersion());
|
||||
e0.Attribute("xmlns",
|
||||
"http://schemas.microsoft.com/developer/msbuild/2003");
|
||||
@@ -1569,8 +1557,8 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(Elem& e1,
|
||||
cmSourceFile const* sf)
|
||||
{
|
||||
std::string const& fileName = sf->GetFullPath();
|
||||
Elem e2(e1);
|
||||
this->WriteSource(e2, "ClInclude", sf);
|
||||
Elem e2(e1, "ClInclude");
|
||||
this->WriteSource(e2, sf);
|
||||
if (this->IsResxHeader(fileName)) {
|
||||
e2.Element("FileType", "CppForm");
|
||||
} else if (this->IsXamlHeader(fileName)) {
|
||||
@@ -1738,8 +1726,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
|
||||
}
|
||||
}
|
||||
|
||||
Elem e2(e1);
|
||||
this->WriteSource(e2, tool, sf);
|
||||
Elem e2(e1, tool);
|
||||
this->WriteSource(e2, sf);
|
||||
if (toolHasSettings) {
|
||||
e2.SetHasElements();
|
||||
|
||||
@@ -1859,7 +1847,6 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
|
||||
}
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WriteSource(Elem& e2,
|
||||
std::string const& tool,
|
||||
cmSourceFile const* sf)
|
||||
{
|
||||
// Visual Studio tools append relative paths to the current dir, as in:
|
||||
@@ -1895,11 +1882,10 @@ void cmVisualStudio10TargetGenerator::WriteSource(Elem& e2,
|
||||
}
|
||||
}
|
||||
ConvertToWindowsSlash(sourceFile);
|
||||
e2.StartElement(tool);
|
||||
e2.Attribute("Include", sourceFile);
|
||||
|
||||
ToolSource toolSource = { sf, forceRelative };
|
||||
this->Tools[tool].push_back(toolSource);
|
||||
this->Tools[e2.Tag].push_back(toolSource);
|
||||
}
|
||||
|
||||
void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
|
||||
@@ -2003,8 +1989,8 @@ void cmVisualStudio10TargetGenerator::WriteAllSources(Elem& e0)
|
||||
include_configs.begin(), include_configs.end(),
|
||||
std::back_inserter(exclude_configs));
|
||||
|
||||
Elem e2(e1);
|
||||
this->WriteSource(e2, tool, si.Source);
|
||||
Elem e2(e1, tool);
|
||||
this->WriteSource(e2, si.Source);
|
||||
if (si.Kind == cmGeneratorTarget::SourceKindObjectSource) {
|
||||
this->OutputSourceSpecificFlags(e2, si.Source);
|
||||
}
|
||||
@@ -2580,8 +2566,9 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
|
||||
configDefine += configName;
|
||||
configDefine += "\"";
|
||||
clOptions.AddDefine(configDefine);
|
||||
if (const char* exportMacro = this->GeneratorTarget->GetExportMacro()) {
|
||||
clOptions.AddDefine(exportMacro);
|
||||
if (const std::string* exportMacro =
|
||||
this->GeneratorTarget->GetExportMacro()) {
|
||||
clOptions.AddDefine(*exportMacro);
|
||||
}
|
||||
|
||||
if (this->MSTools) {
|
||||
@@ -2877,8 +2864,9 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaOptions(
|
||||
configDefine += configName;
|
||||
configDefine += "\"";
|
||||
cudaOptions.AddDefine(configDefine);
|
||||
if (const char* exportMacro = this->GeneratorTarget->GetExportMacro()) {
|
||||
cudaOptions.AddDefine(exportMacro);
|
||||
if (const std::string* exportMacro =
|
||||
this->GeneratorTarget->GetExportMacro()) {
|
||||
cudaOptions.AddDefine(*exportMacro);
|
||||
}
|
||||
|
||||
// Get includes for this target
|
||||
@@ -3882,15 +3870,13 @@ void cmVisualStudio10TargetGenerator::WriteSinglePlatformExtension(
|
||||
void cmVisualStudio10TargetGenerator::WriteSDKReferences(Elem& e0)
|
||||
{
|
||||
std::vector<std::string> sdkReferences;
|
||||
Elem e1(e0);
|
||||
bool hasWrittenItemGroup = false;
|
||||
std::unique_ptr<Elem> spe1;
|
||||
if (const char* vsSDKReferences =
|
||||
this->GeneratorTarget->GetProperty("VS_SDK_REFERENCES")) {
|
||||
cmSystemTools::ExpandListArgument(vsSDKReferences, sdkReferences);
|
||||
e1.StartElement("ItemGroup");
|
||||
hasWrittenItemGroup = true;
|
||||
spe1 = cm::make_unique<Elem>(e0, "ItemGroup");
|
||||
for (std::string const& ri : sdkReferences) {
|
||||
Elem(e1, "SDKReference").Attribute("Include", ri);
|
||||
Elem(*spe1, "SDKReference").Attribute("Include", ri);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3906,19 +3892,20 @@ void cmVisualStudio10TargetGenerator::WriteSDKReferences(Elem& e0)
|
||||
|
||||
if (desktopExtensionsVersion || mobileExtensionsVersion ||
|
||||
iotExtensionsVersion) {
|
||||
if (!hasWrittenItemGroup) {
|
||||
e1.StartElement("ItemGroup");
|
||||
if (!spe1) {
|
||||
spe1 = cm::make_unique<Elem>(e0, "ItemGroup");
|
||||
}
|
||||
if (desktopExtensionsVersion) {
|
||||
this->WriteSingleSDKReference(e1, "WindowsDesktop",
|
||||
this->WriteSingleSDKReference(*spe1, "WindowsDesktop",
|
||||
desktopExtensionsVersion);
|
||||
}
|
||||
if (mobileExtensionsVersion) {
|
||||
this->WriteSingleSDKReference(e1, "WindowsMobile",
|
||||
this->WriteSingleSDKReference(*spe1, "WindowsMobile",
|
||||
mobileExtensionsVersion);
|
||||
}
|
||||
if (iotExtensionsVersion) {
|
||||
this->WriteSingleSDKReference(e1, "WindowsIoT", iotExtensionsVersion);
|
||||
this->WriteSingleSDKReference(*spe1, "WindowsIoT",
|
||||
iotExtensionsVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ private:
|
||||
void WriteExtraSource(Elem& e1, cmSourceFile const* sf);
|
||||
void WriteNsightTegraConfigurationValues(Elem& e1,
|
||||
std::string const& config);
|
||||
void WriteSource(Elem& e2, std::string const& tool, cmSourceFile const* sf);
|
||||
void WriteSource(Elem& e2, cmSourceFile const* sf);
|
||||
void WriteExcludeFromBuild(Elem& e2,
|
||||
std::vector<size_t> const& exclude_configs);
|
||||
void WriteAllSources(Elem& e0);
|
||||
|
||||
+7
-3
@@ -323,11 +323,15 @@ static int HandleCppCheck(const std::string& runCmd,
|
||||
stdErr.find("(performance)") != std::string::npos ||
|
||||
stdErr.find("(portability)") != std::string::npos ||
|
||||
stdErr.find("(information)") != std::string::npos) {
|
||||
std::cerr << "Warning: cppcheck reported diagnostics:\n";
|
||||
if (ret == 0) {
|
||||
std::cerr << "Warning: cppcheck reported diagnostics:\n";
|
||||
} else {
|
||||
std::cerr << "Error: cppcheck reported failure:\n";
|
||||
}
|
||||
}
|
||||
std::cerr << stdErr;
|
||||
// ignore errors so build continues
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
typedef int (*CoCompileHandler)(const std::string&, const std::string&,
|
||||
|
||||
@@ -1409,6 +1409,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
|
||||
add_subdirectory(FindLibRHash)
|
||||
endif()
|
||||
|
||||
if(CMake_TEST_FindLibinput)
|
||||
add_subdirectory(FindLibinput)
|
||||
endif()
|
||||
|
||||
if(CMake_TEST_FindLibUV)
|
||||
add_subdirectory(FindLibUV)
|
||||
endif()
|
||||
@@ -2665,7 +2669,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
|
||||
$<TARGET_FILE:ctest> -T Coverage --debug)
|
||||
set_tests_properties(CTestGTMCoverage PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Process file.*ZZCOVTST.m.*Total LOC:.*30.*Percentage Coverage: 80.00*"
|
||||
"Process file.*ZZCOVTST.m.*Total LOC:.*32.*Percentage Coverage: 81.25*"
|
||||
ENVIRONMENT COVFILE=)
|
||||
|
||||
configure_file(
|
||||
@@ -2683,7 +2687,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
|
||||
$<TARGET_FILE:ctest> -T Coverage --debug)
|
||||
set_tests_properties(CTestCacheCoverage PROPERTIES
|
||||
PASS_REGULAR_EXPRESSION
|
||||
"Process file.*ZZCOVTST.m.*Total LOC:.*29.*Percentage Coverage: 86.21.*"
|
||||
"Process file.*ZZCOVTST.m.*Total LOC:.*32.*Percentage Coverage: 87.50.*"
|
||||
ENVIRONMENT COVFILE=)
|
||||
|
||||
# Adding a test case for Python Coverage
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
add_test(NAME FindLibinput.Test COMMAND
|
||||
${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
|
||||
--build-and-test
|
||||
"${CMake_SOURCE_DIR}/Tests/FindLibinput/Test"
|
||||
"${CMake_BINARY_DIR}/Tests/FindLibinput/Test"
|
||||
${build_generator_args}
|
||||
--build-project TestFindLibinput
|
||||
--build-options ${build_options}
|
||||
--test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
|
||||
)
|
||||
@@ -0,0 +1,14 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(TestFindLibinput C)
|
||||
include(CTest)
|
||||
|
||||
find_package(Libinput REQUIRED)
|
||||
|
||||
add_executable(test_tgt main.c)
|
||||
target_link_libraries(test_tgt Libinput::Libinput)
|
||||
add_test(NAME test_tgt COMMAND test_tgt)
|
||||
|
||||
add_executable(test_var main.c)
|
||||
target_include_directories(test_var PRIVATE ${Libinput_INCLUDE_DIRS})
|
||||
target_link_libraries(test_var PRIVATE ${Libinput_LIBRARIES})
|
||||
add_test(NAME test_var COMMAND test_var)
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <libinput.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
struct libinput_interface interface;
|
||||
interface.open_restricted = 0;
|
||||
interface.close_restricted = 0;
|
||||
struct libinput* li;
|
||||
li = libinput_udev_create_context(&interface, NULL, NULL);
|
||||
printf("Found Libinput.\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -12,6 +12,9 @@ EN ; This entry point shouldn't be found without fixing
|
||||
; This line not executable
|
||||
D T6^ZZCOVTST
|
||||
;
|
||||
% ; a line to test for a problem where % was dropped
|
||||
N Do,Re,Mi
|
||||
S Do="A#"
|
||||
T1 ; This line should always be found
|
||||
N D
|
||||
S D=2
|
||||
|
||||
@@ -13,33 +13,36 @@ ZZCOVTST,1,1,"ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014
|
||||
,12,1," Q"
|
||||
,13,0," ; This line not executable"
|
||||
,14,0," ;"
|
||||
,15,0,"T1 ; This line should always be found"
|
||||
,16,1," N D"
|
||||
,17,1," S D=2"
|
||||
,18,1," W !,D,!,""This is the second entry point"",!"
|
||||
,19,1," D T2^ZZCOVTST(D)"
|
||||
,20,1," Q"
|
||||
,21,0," ;"
|
||||
,22,0,"T2(EQ) ; This is debatable and only called with ENT^ROU notation"
|
||||
,23,1," N D"
|
||||
,24,1," S D=3"
|
||||
,25,1," W !,D,!,EQ,""This is the third entry point"",!"
|
||||
,26,1," D T3^ZZCOVTST"
|
||||
,27,1," Q"
|
||||
,28,0," ;"
|
||||
,29,1,"T3 N D S D=4 W D,!,""Fourth Entry point"",! Q"
|
||||
,30,0," ;"
|
||||
,31,0,"T4 N D S D=5 W ""Shouldn't be executed"""
|
||||
,32,0," W ""Lots to not do"""
|
||||
,33,0," Q"
|
||||
,34,1,"T5(EQ) ;this entry point is called with a $$ notation"
|
||||
,35,1," W ""THIS IS THE $$ NOTATION!"",!"
|
||||
,36,1," Q 0"
|
||||
,37,0,"T6 ; An entry point to show comments inside of ""DO"" blocks"
|
||||
,38,1," D"
|
||||
,39,1," . W ""This is executable code"",!"
|
||||
,40,0," . ; This is a comment inside the do block, not executable"
|
||||
,41,1," . S ZZBLAH=""blah"""
|
||||
,42,1," W ""Ending T6"",!"
|
||||
,43,0," ;"
|
||||
Totals for ZZCOVTST,,25,
|
||||
,15,1,"% ; a line to test for a problem where % was dropped"
|
||||
,16,1,"N Do,Re,Mi"
|
||||
,17,1,"S Do=""A#"""
|
||||
,18,0,"T1 ; This line should always be found"
|
||||
,19,1," N D"
|
||||
,20,1," S D=2"
|
||||
,21,1," W !,D,!,""This is the second entry point"",!"
|
||||
,22,1," D T2^ZZCOVTST(D)"
|
||||
,23,1," Q"
|
||||
,24,0," ;"
|
||||
,25,0,"T2(EQ) ; This is debatable and only called with ENT^ROU notation"
|
||||
,26,1," N D"
|
||||
,27,1," S D=3"
|
||||
,28,1," W !,D,!,EQ,""This is the third entry point"",!"
|
||||
,29,1," D T3^ZZCOVTST"
|
||||
,30,1," Q"
|
||||
,31,0," ;"
|
||||
,32,1,"T3 N D S D=4 W D,!,""Fourth Entry point"",! Q"
|
||||
,33,0," ;"
|
||||
,34,0,"T4 N D S D=5 W ""Shouldn't be executed"""
|
||||
,35,0," W ""Lots to not do"""
|
||||
,36,0," Q"
|
||||
,37,1,"T5(EQ) ;this entry point is called with a $$ notation"
|
||||
,38,1," W ""THIS IS THE $$ NOTATION!"",!"
|
||||
,39,1," Q 0"
|
||||
,40,0,"T6 ; An entry point to show comments inside of ""DO"" blocks"
|
||||
,41,1," D"
|
||||
,42,1," . W ""This is executable code"",!"
|
||||
,43,0," . ; This is a comment inside the do block, not executable"
|
||||
,44,1," . S ZZBLAH=""blah"""
|
||||
,45,1," W ""Ending T6"",!"
|
||||
,46,0," ;"
|
||||
Toals for ZZCOVTST,,28,
|
||||
|
||||
@@ -9,6 +9,9 @@ GT.M 15-AUG-2014 10:14:32 ZWR
|
||||
^ZZCOVERAGE("ZZCOVTST","EN",4)="1:0:0:0:74"
|
||||
^ZZCOVERAGE("ZZCOVTST","EN",5)="1:0:0:0:66"
|
||||
^ZZCOVERAGE("ZZCOVTST","EN",6)="1:0:0:0:40"
|
||||
^ZZCOVERAGE("ZZCOVTST","%")="2:0:0:0:208"
|
||||
^ZZCOVERAGE("ZZCOVTST","%",1)="2:0:0:0:208"
|
||||
^ZZCOVERAGE("ZZCOVTST","%",2)="2:0:0:0:208"
|
||||
^ZZCOVERAGE("ZZCOVTST","T1")="1:0:0:0:208"
|
||||
^ZZCOVERAGE("ZZCOVTST","T1",1)="1:0:0:0:23"
|
||||
^ZZCOVERAGE("ZZCOVTST","T1",2)="1:0:0:0:24"
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
CMake Warning \(dev\) at .*/Modules/BundleUtilities\.cmake:[0-9]+ \(message\):
|
||||
Policy CMP0080 is not set: BundleUtilities prefers not to be included at
|
||||
configure time\. Run "cmake --help-policy CMP0080" for policy details\. Use
|
||||
the cmake_policy command to set the policy and suppress this warning\.
|
||||
Policy CMP0080 is not set: BundleUtilities cannot be included at configure
|
||||
time\. Run "cmake --help-policy CMP0080" for policy details\. Use the
|
||||
cmake_policy command to set the policy and suppress this warning\.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
.*/Modules/BundleUtilities\.cmake:[0-9]+ \(_warn_cmp0080\)
|
||||
CMP0080-WARN\.cmake:[0-9]+ \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers\. Use -Wno-dev to suppress it\.
|
||||
|
||||
@@ -4,4 +4,4 @@ CMake Error at CMP0026-CONFIG-LOCATION-NEW.cmake:7 \(get_target_property\):
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
specific short-term circumstances. Projects should be ported to the NEW
|
||||
behavior and not rely on setting a policy to OLD.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)$
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
|
||||
@@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-CONFIG-LOCATION-WARN.cmake:5 \(get_target_prope
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
@@ -4,4 +4,4 @@ CMake Error at CMP0026-LOCATION-CONFIG-NEW.cmake:7 \(get_target_property\):
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
specific short-term circumstances. Projects should be ported to the NEW
|
||||
behavior and not rely on setting a policy to OLD.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)$
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
|
||||
@@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-LOCATION-CONFIG-WARN.cmake:5 \(get_target_prope
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
@@ -4,4 +4,4 @@ CMake Error at CMP0026-NEW.cmake:7 \(get_target_property\):
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
specific short-term circumstances. Projects should be ported to the NEW
|
||||
behavior and not rely on setting a policy to OLD.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)$
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
|
||||
@@ -8,7 +8,7 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:5 \(get_target_property\):
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
+
|
||||
CMake Warning \(dev\) at CMP0026-WARN.cmake:8 \(get_target_property\):
|
||||
@@ -21,5 +21,5 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:8 \(get_target_property\):
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
@@ -8,5 +8,5 @@ CMake Warning \(dev\) at LOCATION-and-TARGET_OBJECTS.cmake:[0-9]+ \(get_target_p
|
||||
\$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
@@ -8,5 +8,5 @@ CMake Warning \(dev\) at ObjlibNotDefined.cmake:[0-9]+ \(get_target_property\):
|
||||
expression \$<TARGET_FILE>, as appropriate.
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
@@ -7,4 +7,4 @@
|
||||
specific short-term circumstances. Projects should be ported to the NEW
|
||||
behavior and not rely on setting a policy to OLD.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:[0-9]+ \(include\)$
|
||||
CMakeLists\.txt:[0-9]+ \(include\)$
|
||||
|
||||
@@ -7,6 +7,6 @@
|
||||
specific short-term circumstances. Projects should be ported to the NEW
|
||||
behavior and not rely on setting a policy to OLD.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
+
|
||||
Sources: "empty.cpp"$
|
||||
|
||||
@@ -9,7 +9,7 @@ CMake Warning \(dev\) at CMP0051-WARN.cmake:6 \(get_target_property\):
|
||||
needs to be adapted to ignore the generator expression using the
|
||||
string\(GENEX_STRIP\) command.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
Sources: "empty.cpp"
|
||||
@@ -25,7 +25,7 @@ CMake Warning \(dev\) at CMP0051-WARN.cmake:12 \(get_target_property\):
|
||||
needs to be adapted to ignore the generator expression using the
|
||||
string\(GENEX_STRIP\) command.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
Sources: "../empty.cpp"$
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\):
|
||||
Some deprecated warning
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
^CMake Warning \(dev\) at Wdev.cmake:1 \(message\):
|
||||
Some author warning
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Warning \(dev\) at Wdev.cmake:6 \(include\):
|
||||
include\(\) given empty file name \(ignored\).
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.$
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
^CMake Deprecation Error at Werror_deprecated.cmake:1 \(message\):
|
||||
Some deprecated warning
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
^CMake Error \(dev\) at Werror_dev.cmake:4 \(include\):
|
||||
include\(\) given empty file name \(ignored\).
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This error is for project developers. Use -Wno-error=dev to suppress it.
|
||||
|
||||
CMake Error \(dev\) at Werror_dev.cmake:7 \(message\):
|
||||
Some author warning
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This error is for project developers. Use -Wno-error=dev to suppress it.$
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
^CMake Deprecation Warning at Wno-error_deprecated.cmake:2 \(message\):
|
||||
Some deprecated warning
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
^CMake Warning \(dev\) at Wno-error_dev.cmake:2 \(message\):
|
||||
Some author warning
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.
|
||||
|
||||
CMake Warning \(dev\) at Wno-error_dev.cmake:6 \(include\):
|
||||
include\(\) given empty file name \(ignored\).
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists.txt:3 \(include\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
This warning is for project developers. Use -Wno-dev to suppress it.$
|
||||
|
||||
@@ -1 +1 @@
|
||||
0
|
||||
[^0]
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
[^0]
|
||||
@@ -0,0 +1 @@
|
||||
.*Error: cppcheck reported failure.*error.*warning.*style.*performance.*information.*
|
||||
@@ -0,0 +1,3 @@
|
||||
enable_language(C)
|
||||
set(CMAKE_C_CPPCHECK "${PSEUDO_CPPCHECK}" -error)
|
||||
add_executable(main main.c)
|
||||
@@ -15,6 +15,7 @@ endfunction()
|
||||
|
||||
run_cppcheck(C)
|
||||
run_cppcheck(CXX)
|
||||
run_cppcheck(C-error)
|
||||
run_cppcheck(C-bad)
|
||||
|
||||
if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake")
|
||||
|
||||
@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
|
||||
The transform name must be a valid C identifier.
|
||||
Call Stack \(most recent call first\):
|
||||
BadAlgoMap1.cmake:[0-9]+ \(ExternalData_Add_Target\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadAlgoMap1\.cmake:[0-9]+ \(ExternalData_Add_Target\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
|
||||
The transform name must be a valid C identifier.
|
||||
Call Stack \(most recent call first\):
|
||||
BadAlgoMap2.cmake:[0-9]+ \(ExternalData_Add_Target\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadAlgoMap2\.cmake:[0-9]+ \(ExternalData_Add_Target\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -4,5 +4,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
BAD
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadHashAlgo1.cmake:3 \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadHashAlgo1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadOption1.cmake:2 \(ExternalData_Add_Test\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadOption1\.cmake:[0-9]+ \(ExternalData_Add_Test\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadOption2.cmake:2 \(ExternalData_Add_Test\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadOption2\.cmake:[0-9]+ \(ExternalData_Add_Test\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
Recurse option "RECURSE:" allowed only with directories.
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadRecurse1.cmake:2 \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadRecurse1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
Recurse option "RECURSE:" allowed only with directories.
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadRecurse2.cmake:2 \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadRecurse2\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadRecurse3.cmake:2 \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadRecurse3\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -15,5 +15,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadSeries1.cmake:3 \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadSeries1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
@@ -12,5 +12,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\):
|
||||
\(x\)\(y\)\$
|
||||
Call Stack \(most recent call first\):
|
||||
.*
|
||||
BadSeries2.cmake:3 \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists.txt:3 \(include\)
|
||||
BadSeries2\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\)
|
||||
CMakeLists\.txt:[0-9]+ \(include\)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user