From 8713e9cbbc847cf0a97be1d831b555d8fe623287 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 3 Oct 2018 12:55:56 -0400 Subject: Begin post-3.13 development --- Help/release/dev/0-sample-topic.rst | 7 +++++++ Help/release/index.rst | 2 ++ Source/CMakeVersion.cmake | 4 ++-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 Help/release/dev/0-sample-topic.rst diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst new file mode 100644 index 0000000..e4cc01e --- /dev/null +++ b/Help/release/dev/0-sample-topic.rst @@ -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. diff --git a/Help/release/index.rst b/Help/release/index.rst index fbe4cf6..7ef3a8e 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -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 ======== diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 626dbb8..47990cd 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -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 20181003) +#set(CMake_VERSION_RC 1) -- cgit v0.12 From e07b6f69d821420050706f48e699f48cf70569f7 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Thu, 4 Oct 2018 00:01:15 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 47990cd..59d4316 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181003) +set(CMake_VERSION_PATCH 20181004) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 0813581859bd61a9d30c97aa893030bea85f134e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20S=C5=82odkowicz?= Date: Thu, 4 Oct 2018 23:52:30 +0200 Subject: FindwxWidgets: honor OPTIONAL_COMPONENTS --- Modules/FindwxWidgets.cmake | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index f2d6285..e61c84e 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -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( ${wxWidgets_LIBRARIES}) @@ -396,6 +396,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") list(APPEND wxWidgets_LIBRARIES debug ${WX_${LIB}d} optimized ${WX_${LIB}} ) + 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 +410,10 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") if(WX_${LIB}${_DBG}) DBG_MSG_V("Found ${LIB}${_DBG}") list(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}}) + 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 +806,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 +849,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 -- cgit v0.12 From 25a970405800e9a79dbd1927cdd2f298e646917c Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Fri, 5 Oct 2018 00:01:06 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 59d4316..b2be3c0 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181004) +set(CMake_VERSION_PATCH 20181005) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 342551be71c8ed300e5e6d99fa81ab0ed3a62600 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Sat, 6 Oct 2018 00:01:10 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index b2be3c0..60b7a9b 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181005) +set(CMake_VERSION_PATCH 20181006) #set(CMake_VERSION_RC 1) -- cgit v0.12 From f0c8d162f58270d7902fef36e0df2da1a22d2890 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Sun, 7 Oct 2018 00:01:05 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 60b7a9b..9e9a08e 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181006) +set(CMake_VERSION_PATCH 20181007) #set(CMake_VERSION_RC 1) -- cgit v0.12 From e3666e8ffeeda24dcee69a27942678927e895fbc Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Mon, 8 Oct 2018 00:01:06 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 9e9a08e..cd2bc0b 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181007) +set(CMake_VERSION_PATCH 20181008) #set(CMake_VERSION_RC 1) -- cgit v0.12 From ab6bf9d0adc3de143599d5558a6475af3ba172eb Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 8 Oct 2018 10:42:12 -0400 Subject: Utilities/Release: Update to openssl-1.1.1 Update the prebuilt binary build configurations for machines where we build our own OpenSSL library to use a newer version. --- Utilities/Release/linux64_release.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Utilities/Release/linux64_release.cmake b/Utilities/Release/linux64_release.cmake index dc34120..fa585d7 100644 --- a/Utilities/Release/linux64_release.cmake +++ b/Utilities/Release/linux64_release.cmake @@ -29,9 +29,9 @@ CURSES_LIBRARY:FILEPATH=/home/kitware/ncurses-5.9/lib/libncurses.a CURSES_INCLUDE_PATH:PATH=/home/kitware/ncurses-5.9/include FORM_LIBRARY:FILEPATH=/home/kitware/ncurses-5.9/lib/libform.a CMAKE_USE_OPENSSL:BOOL=ON -OPENSSL_CRYPTO_LIBRARY:STRING=/home/kitware/openssl-1.1.0h/lib/libcrypto.a;-pthread -OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.1.0h/include -OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.1.0h/lib/libssl.a +OPENSSL_CRYPTO_LIBRARY:STRING=/home/kitware/openssl-1.1.1/lib/libcrypto.a;-pthread +OPENSSL_INCLUDE_DIR:PATH=/home/kitware/openssl-1.1.1/include +OPENSSL_SSL_LIBRARY:FILEPATH=/home/kitware/openssl-1.1.1/lib/libssl.a PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 CPACK_SYSTEM_NAME:STRING=Linux-x86_64 BUILD_CursesDialog:BOOL=ON -- cgit v0.12 From 0ab5db035ed47182fb8551f9872045eeae1f9cec Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Tue, 9 Oct 2018 00:01:08 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index cd2bc0b..7466205 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181008) +set(CMake_VERSION_PATCH 20181009) #set(CMake_VERSION_RC 1) -- cgit v0.12 From ae80271ed35469d4d1092beb9665837963ba22ad Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" Date: Tue, 9 Oct 2018 09:58:30 +0200 Subject: README: Fix typo (rm space). --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index f1dbd9d..2e271ed 100644 --- a/README.rst +++ b/README.rst @@ -68,7 +68,7 @@ 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 -- cgit v0.12 From c9cedd675b0023c21e5350d69b25df2156836800 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (l)" Date: Tue, 9 Oct 2018 08:42:13 +0200 Subject: Help: Add link to cmake-qt(7) to FindQt.cmake. --- Modules/FindQt.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 68dfa7d..4dff7c3 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -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 -- cgit v0.12 From ba906112253737715e635c0ade10d52fbb185233 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (l)" Date: Fri, 5 Oct 2018 14:51:50 +0200 Subject: Help: Make synopsis of if command more compact; add section headers Also replace 'expression' by 'condition' (as in the while command); relegate optional arguments of else() and endif() to the text; revise explanation of operator precedence in Condition Syntax section. --- Help/command/if.rst | 90 +++++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 41 deletions(-) diff --git a/Help/command/if.rst b/Help/command/if.rst index 5294ce8..8abe9ba 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -3,41 +3,46 @@ if Conditionally execute a group of commands. -.. code-block:: cmake - - 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 +Synopsis +^^^^^^^^ + +:: + + if() + + elseif() # optional block, can be repeated + + else() # optional block + + 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()`` 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 )`` - True if the expression is not true. +``if(NOT )`` + True if the condition is not true. -``if( AND )`` - True if both expressions would be considered true individually. +``if( AND )`` + True if both conditions would be considered true individually. -``if( OR )`` - True if either expression would be considered true individually. +``if( OR )`` + 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( 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_` variables. ``if( LESS )`` @@ -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 -- cgit v0.12 From 5b56795d57ad79dcc4ce9070481101f28f737eda Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (l)" Date: Fri, 5 Oct 2018 15:23:15 +0200 Subject: Help: make the two signatures of command "project" orthogonal --- Help/command/project.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Help/command/project.rst b/Help/command/project.rst index bd8b4ef..f91eed8 100644 --- a/Help/command/project.rst +++ b/Help/command/project.rst @@ -5,7 +5,7 @@ Sets project details such as name, version, etc. and enables languages. .. code-block:: cmake - project( [LANGUAGES] [...]) + project( [...]) project( [VERSION [.[.[.]]]] [DESCRIPTION ] -- cgit v0.12 From e3e5445d83c253c3ddc18b5b02b59e90aa0b9df9 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (l)" Date: Fri, 5 Oct 2018 15:32:46 +0200 Subject: Help: Describe options of command project in a definition list. Also add section headers; explain default setting of optional argument variables. --- Help/command/project.rst | 123 +++++++++++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 51 deletions(-) diff --git a/Help/command/project.rst b/Help/command/project.rst index f91eed8..18420e4 100644 --- a/Help/command/project.rst +++ b/Help/command/project.rst @@ -1,7 +1,10 @@ project ------- -Sets project details such as name, version, etc. and enables languages. +Set the name of the project. + +Synopsis +^^^^^^^^ .. code-block:: cmake @@ -12,65 +15,83 @@ Sets project details such as name, version, etc. and enables languages. [HOMEPAGE_URL ] [LANGUAGES ...]) -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`. Also sets the variables * :variable:`PROJECT_SOURCE_DIR`, :variable:`_SOURCE_DIR` * :variable:`PROJECT_BINARY_DIR`, :variable:`_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``. - -The :command:`project()` command stores the version number and its components -in variables - -* :variable:`PROJECT_VERSION`, - :variable:`_VERSION` -* :variable:`PROJECT_VERSION_MAJOR`, - :variable:`_VERSION_MAJOR` -* :variable:`PROJECT_VERSION_MINOR`, - :variable:`_VERSION_MINOR` -* :variable:`PROJECT_VERSION_PATCH`, - :variable:`_VERSION_PATCH` -* :variable:`PROJECT_VERSION_TWEAK`, - :variable:`_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:`_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:`_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__INCLUDE`, +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. + +If the variable :variable:`CMAKE_PROJECT__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 `` + Optional; may not be used unless policy :policy:`CMP0048` is + set to ``NEW``. + + Takes a ```` argument composed of non-negative integer components, + i.e. ``[.[.[.]]]``, + and sets the variables + + * :variable:`PROJECT_VERSION`, + :variable:`_VERSION` + * :variable:`PROJECT_VERSION_MAJOR`, + :variable:`_VERSION_MAJOR` + * :variable:`PROJECT_VERSION_MINOR`, + :variable:`_VERSION_MINOR` + * :variable:`PROJECT_VERSION_PATCH`, + :variable:`_VERSION_PATCH` + * :variable:`PROJECT_VERSION_TWEAK`, + :variable:`_VERSION_TWEAK`. + +``DESCRIPTION `` + Optional. + Sets the variables + + * :variable:`PROJECT_DESCRIPTION`, :variable:`_DESCRIPTION` + + to ````. + It is recommended that this description is a relatively short string, + usually no more than a few words. + +``HOMEPAGE_URL `` + Optional. + Sets the variables + + * :variable:`PROJECT_HOMEPAGE_URL`, :variable:`_HOMEPAGE_URL` + + to ````, which should be the canonical home URL for the project. + +``LANGUAGES ...`` + 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 -- cgit v0.12 From 2f43bd3b6ca886b52fadae50a3bfbbf44029b9cd Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" Date: Tue, 9 Oct 2018 15:28:53 +0200 Subject: Help: move description of CMAKE_PROJECT_* variables Describe these variables along with the other variables. --- Help/command/project.rst | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Help/command/project.rst b/Help/command/project.rst index 18420e4..688e56c 100644 --- a/Help/command/project.rst +++ b/Help/command/project.rst @@ -16,7 +16,11 @@ Synopsis [LANGUAGES ...]) Sets the name of the project, and stores it in the variable -:variable:`PROJECT_NAME`. Also sets the variables +: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:`_SOURCE_DIR` @@ -55,6 +59,9 @@ The options are: * :variable:`PROJECT_VERSION_TWEAK`, :variable:`_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 `` Optional. Sets the variables @@ -65,6 +72,9 @@ The options are: 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 `` Optional. Sets the variables @@ -73,6 +83,9 @@ The options are: to ````, 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 ...`` Optional. Can also be specified without ``LANGUAGES`` keyword per the first, short signature. @@ -96,16 +109,11 @@ 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`. -- cgit v0.12 From 846e3d2ceb0c8532e19425afc36455f0d4eedb14 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (l)" Date: Mon, 8 Oct 2018 21:42:09 +0200 Subject: Help: Reorganise module index into sections * Split up module list into separate sections for utility modules and find modules. * Improve wording to explain how the different module types are expected to be called/used. * Move deprecated modules to their own separate sections. --- Help/manual/cmake-modules.7.rst | 103 +++++++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 37 deletions(-) diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index b7276b6..189e3be 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -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 @@ -173,8 +207,6 @@ All Modules /module/FindosgViewer /module/FindosgVolume /module/FindosgWidget - /module/FindPackageHandleStandardArgs - /module/FindPackageMessage /module/FindPatch /module/FindPerlLibs /module/FindPerl @@ -189,8 +221,6 @@ All Modules /module/FindPython /module/FindPython2 /module/FindPython3 - /module/FindPythonInterp - /module/FindPythonLibs /module/FindQt3 /module/FindQt4 /module/FindQt @@ -218,39 +248,38 @@ 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 ==================== -- cgit v0.12 From dc372f6eef54f8a4b436cf631cbf621437076677 Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Tue, 9 Oct 2018 22:54:46 +1100 Subject: Help: Document Use_wxWindows.cmake as deprecated The implementation already logged a message saying that the module was deprecated. This change adds that message to the module docs. --- Help/manual/cmake-modules.7.rst | 1 + Modules/Use_wxWindows.cmake | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index 189e3be..af8e33f 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -268,6 +268,7 @@ Deprecated Utility Modules /module/CMakeExpandImportedTargets /module/CMakeForceCompiler /module/TestCXXAcceptsFlag + /module/Use_wxWindows /module/WriteBasicConfigVersionFile Deprecated Find Modules diff --git a/Modules/Use_wxWindows.cmake b/Modules/Use_wxWindows.cmake index bd8cc01..7cdd92e 100644 --- a/Modules/Use_wxWindows.cmake +++ b/Modules/Use_wxWindows.cmake @@ -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 -- cgit v0.12 From af6f16f1e8a820ff5a08dfa273ceaa309fed7461 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" Date: Tue, 9 Oct 2018 13:26:50 +0200 Subject: README: Explain how to build CMake with the docs --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 2e271ed..1e8561a 100644 --- a/README.rst +++ b/README.rst @@ -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 ============== -- cgit v0.12 From a35981249d9efbf3db943698a1258ac6cbf3a5d5 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Wed, 10 Oct 2018 00:01:07 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7466205..6a2cb16 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181009) +set(CMake_VERSION_PATCH 20181010) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 045b0beae13366420186337170d70e73ec96ebca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20S=C5=82odkowicz?= Date: Thu, 4 Oct 2018 23:57:24 +0200 Subject: FindwxWidgets: implement detailed components status on Windows --- Modules/FindwxWidgets.cmake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake index e61c84e..e366842 100644 --- a/Modules/FindwxWidgets.cmake +++ b/Modules/FindwxWidgets.cmake @@ -396,6 +396,7 @@ 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() @@ -410,6 +411,7 @@ 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() @@ -978,10 +980,18 @@ DBG_MSG("wxWidgets_USE_FILE : ${wxWidgets_USE_FILE}") include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +# FIXME: set wxWidgets__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. -- cgit v0.12 From f460bbd4c8afab56f93b9831f1f4d8336480fcc5 Mon Sep 17 00:00:00 2001 From: Betsy McPhail Date: Thu, 4 Oct 2018 11:34:27 -0400 Subject: ctest_submit: Refactor file list to use a vector instead of a set Remove duplicates in a way that preserves order. --- Source/CTest/cmCTestSubmitHandler.cxx | 51 ++++++++++++++++++++--------------- Source/CTest/cmCTestSubmitHandler.h | 12 ++++----- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index ecf309a..38b5411 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -12,6 +12,7 @@ #include #include +#include "cmAlgorithms.h" #include "cmCTest.h" #include "cmCTestCurl.h" #include "cmCTestScriptHandler.h" @@ -152,10 +153,9 @@ void cmCTestSubmitHandler::Initialize() this->Files.clear(); } -bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix, - const std::set& files, - const std::string& remoteprefix, - const std::string& url) +bool cmCTestSubmitHandler::SubmitUsingFTP( + const std::string& localprefix, const std::vector& files, + const std::string& remoteprefix, const std::string& url) { CURL* curl; CURLcode res; @@ -299,10 +299,9 @@ bool cmCTestSubmitHandler::SubmitUsingFTP(const std::string& localprefix, } // Uploading files is simpler -bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, - const std::set& files, - const std::string& remoteprefix, - const std::string& url) +bool cmCTestSubmitHandler::SubmitUsingHTTP( + const std::string& localprefix, const std::vector& files, + const std::string& remoteprefix, const std::string& url) { CURL* curl; CURLcode res; @@ -662,9 +661,9 @@ void cmCTestSubmitHandler::ParseResponse( } } -bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set& files, - const std::string& remoteprefix, - const std::string& url) +bool cmCTestSubmitHandler::TriggerUsingHTTP( + const std::vector& files, const std::string& remoteprefix, + const std::string& url) { CURL* curl; char error_buffer[1024]; @@ -792,11 +791,10 @@ bool cmCTestSubmitHandler::TriggerUsingHTTP(const std::set& files, return true; } -bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command, - const std::string& localprefix, - const std::set& files, - const std::string& remoteprefix, - const std::string& url) +bool cmCTestSubmitHandler::SubmitUsingSCP( + const std::string& scp_command, const std::string& localprefix, + const std::vector& files, const std::string& remoteprefix, + const std::string& url) { if (scp_command.empty() || localprefix.empty() || files.empty() || remoteprefix.empty() || url.empty()) { @@ -890,7 +888,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command, } bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix, - const std::set& files, + const std::vector& files, const std::string& remoteprefix, const std::string& destination) { @@ -925,7 +923,7 @@ bool cmCTestSubmitHandler::SubmitUsingCP(const std::string& localprefix, #if defined(CTEST_USE_XMLRPC) bool cmCTestSubmitHandler::SubmitUsingXMLRPC( - const std::string& localprefix, const std::set& files, + const std::string& localprefix, const std::vector& files, const std::string& remoteprefix, const std::string& url) { xmlrpc_env env; @@ -1020,7 +1018,7 @@ bool cmCTestSubmitHandler::SubmitUsingXMLRPC( } #else bool cmCTestSubmitHandler::SubmitUsingXMLRPC( - std::string const& /*unused*/, std::set const& /*unused*/, + std::string const& /*unused*/, std::vector const& /*unused*/, std::string const& /*unused*/, std::string const& /*unused*/) { return false; @@ -1351,13 +1349,13 @@ int cmCTestSubmitHandler::ProcessHandler() cmGeneratedFileStream ofs; this->StartLogFile("Submit", ofs); - cmCTest::SetOfStrings files; + std::vector 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 +1402,16 @@ int cmCTestSubmitHandler::ProcessHandler() // Submit files from this part. std::vector 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()); } if (ofs) { diff --git a/Source/CTest/cmCTestSubmitHandler.h b/Source/CTest/cmCTestSubmitHandler.h index b4d0e77..66f2173 100644 --- a/Source/CTest/cmCTestSubmitHandler.h +++ b/Source/CTest/cmCTestSubmitHandler.h @@ -57,27 +57,27 @@ private: * Submit file using various ways */ bool SubmitUsingFTP(const std::string& localprefix, - const std::set& files, + const std::vector& files, const std::string& remoteprefix, const std::string& url); bool SubmitUsingHTTP(const std::string& localprefix, - const std::set& files, + const std::vector& files, const std::string& remoteprefix, const std::string& url); bool SubmitUsingSCP(const std::string& scp_command, const std::string& localprefix, - const std::set& files, + const std::vector& files, const std::string& remoteprefix, const std::string& url); bool SubmitUsingCP(const std::string& localprefix, - const std::set& files, + const std::vector& files, const std::string& remoteprefix, const std::string& url); - bool TriggerUsingHTTP(const std::set& files, + bool TriggerUsingHTTP(const std::vector& files, const std::string& remoteprefix, const std::string& url); bool SubmitUsingXMLRPC(const std::string& localprefix, - const std::set& files, + const std::vector& files, const std::string& remoteprefix, const std::string& url); -- cgit v0.12 From a6e0158712bd25256fb66cf21c047b81d65bc4fe Mon Sep 17 00:00:00 2001 From: Betsy McPhail Date: Thu, 4 Oct 2018 11:34:27 -0400 Subject: ctest_submit: Add support for a "Done" part Teach CTest to submit Done.xml. Submission of this file indicates to CDash that a build is complete and no more files will be uploaded. It contains the build id returned by CDash and the current time. This file is submitted last for a given build when using the `ctest_submit()` command. If submitting by PARTS, use `ctest_submit(PARTS Done)`. --- Help/command/ctest_submit.rst | 1 + Help/release/dev/ctest-done.rst | 5 +++++ Source/CTest/cmCTestSubmitHandler.cxx | 10 ++++++++++ Source/cmCTest.cxx | 21 +++++++++++++++++++++ Source/cmCTest.h | 10 ++++++++++ Tests/RunCMake/ctest_submit/PARTSDone-result.txt | 1 + Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt | 3 +++ Tests/RunCMake/ctest_submit/RunCMakeTest.cmake | 1 + 8 files changed, 52 insertions(+) create mode 100644 Help/release/dev/ctest-done.rst create mode 100644 Tests/RunCMake/ctest_submit/PARTSDone-result.txt create mode 100644 Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt diff --git a/Help/command/ctest_submit.rst b/Help/command/ctest_submit.rst index 2ba6bef..426475c 100644 --- a/Help/command/ctest_submit.rst +++ b/Help/command/ctest_submit.rst @@ -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 ...`` Specify an explicit list of specific files to be submitted. diff --git a/Help/release/dev/ctest-done.rst b/Help/release/dev/ctest-done.rst new file mode 100644 index 0000000..9ec0e24 --- /dev/null +++ b/Help/release/dev/ctest-done.rst @@ -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. diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 38b5411..6ad0e03 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -56,6 +56,7 @@ public: std::string Filename; std::string MD5; std::string Message; + std::string BuildID; private: std::vector CurrentValue; @@ -97,6 +98,8 @@ private: this->MD5 = this->GetCurrentValue(); } else if (name == "message") { this->Message = this->GetCurrentValue(); + } else if (name == "buildId") { + this->BuildID = this->GetCurrentValue(); } } }; @@ -645,6 +648,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) { @@ -1414,6 +1418,12 @@ int cmCTestSubmitHandler::ProcessHandler() files.erase(files.begin() + endPos, files.end()); } + // Submit Done.xml last + if (this->SubmitPart[cmCTest::PartDone]) { + this->CTest->GenerateDoneFile(); + files.push_back("Done.xml"); + } + if (ofs) { ofs << "Upload files:" << std::endl; int cnt = 0; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 908eea1..d0d5db6 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -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"; diff --git a/Source/cmCTest.h b/Source/cmCTest.h index 345b538..1ee002a 100644 --- a/Source/cmCTest.h +++ b/Source/cmCTest.h @@ -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 const& GetSubmitFiles(Part part) @@ -607,6 +615,8 @@ private: int DartVersion; bool DropSiteCDash; + std::string BuildID; + std::vector InitialCommandLineArguments; int SubmitIndex; diff --git a/Tests/RunCMake/ctest_submit/PARTSDone-result.txt b/Tests/RunCMake/ctest_submit/PARTSDone-result.txt new file mode 100644 index 0000000..b57e2de --- /dev/null +++ b/Tests/RunCMake/ctest_submit/PARTSDone-result.txt @@ -0,0 +1 @@ +(-1|255) diff --git a/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt b/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt new file mode 100644 index 0000000..0020a0f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt @@ -0,0 +1,3 @@ + *Error when uploading file: .*/Done.xml + *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index 952368d..178f0cb 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -24,6 +24,7 @@ run_ctest_submit(BadFILES FILES bad-file) run_ctest_submit(RepeatRETURN_VALUE RETURN_VALUE res RETURN_VALUE res) run_ctest_submit(PARTSCDashUpload PARTS Configure CDASH_UPLOAD) run_ctest_submit(PARTSCDashUploadType PARTS Configure CDASH_UPLOAD_TYPE) +run_ctest_submit(PARTSDone PARTS Done) run_ctest_submit(CDashUploadPARTS CDASH_UPLOAD bad-upload PARTS) run_ctest_submit(CDashUploadFILES CDASH_UPLOAD bad-upload FILES) run_ctest_submit(CDashUploadNone CDASH_UPLOAD) -- cgit v0.12 From 8f076acdb0af6e319005338e3e25d127043e3275 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 10 Oct 2018 09:02:41 -0400 Subject: cmLocalGenerator: Remove AddCompileDefinitions method This method offers the same definitions as `GetTargetDefines` except that it excludes the "export" macro on shared libraries. Update call sites to use `GetTargetDefines` instead. Some of them were incorrectly excluding the export macro. --- Source/cmExtraSublimeTextGenerator.cxx | 7 +------ Source/cmGhsMultiTargetGenerator.cxx | 9 ++------- Source/cmLocalGenerator.cxx | 14 +++----------- Source/cmLocalGenerator.h | 4 ---- Source/cmLocalUnixMakefileGenerator3.cxx | 4 ++-- Source/cmQtAutoGenInitializer.cxx | 2 +- 6 files changed, 9 insertions(+), 31 deletions(-) diff --git a/Source/cmExtraSublimeTextGenerator.cxx b/Source/cmExtraSublimeTextGenerator.cxx index c4cca07..882d39f 100644 --- a/Source/cmExtraSublimeTextGenerator.cxx +++ b/Source/cmExtraSublimeTextGenerator.cxx @@ -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( diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 847230a..4d98d55 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -267,14 +267,9 @@ std::string cmGhsMultiTargetGenerator::GetDefines(const std::string& language, if (i == this->DefinesByLanguage.end()) { std::set 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); diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7030725..40e183c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -773,16 +773,6 @@ std::string cmLocalGenerator::GetIncludeFlags( return flags; } -void cmLocalGenerator::AddCompileDefinitions(std::set& defines, - cmGeneratorTarget const* target, - const std::string& config, - const std::string& lang) const -{ - std::vector targetDefines; - target->GetCompileDefinitions(targetDefines, config, lang); - this->AppendDefines(defines, targetDefines); -} - void cmLocalGenerator::AddCompileOptions(std::string& flags, cmGeneratorTarget* target, const std::string& lang, @@ -1237,7 +1227,9 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target, } // Add preprocessor definitions for this target and configuration. - this->AddCompileDefinitions(defines, target, config, lang); + std::vector targetDefines; + target->GetCompileDefinitions(targetDefines, config, lang); + this->AppendDefines(defines, targetDefines); } std::string cmLocalGenerator::GetTargetFortranFlags( diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 58b7762..f8d70ca 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -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& defines, - cmGeneratorTarget const* target, - const std::string& config, - const std::string& lang) const; std::string GetProjectName() const; diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 4d19b3a..68cdef0 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -1819,8 +1819,8 @@ void cmLocalUnixMakefileGenerator3::WriteDependLanguageInfo( // Build a list of preprocessor definitions for the target. std::set defines; - this->AddCompileDefinitions(defines, target, this->ConfigName, - implicitLang.first); + this->GetTargetDefines(target, this->ConfigName, implicitLang.first, + defines); if (!defines.empty()) { /* clang-format off */ cmakefileStream diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 8a202a2..6bc3b61 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -416,7 +416,7 @@ bool cmQtAutoGenInitializer::InitMoc() auto GetCompileDefinitions = [this, localGen](std::string const& cfg) -> std::string { std::set defines; - localGen->AddCompileDefinitions(defines, this->Target, cfg, "CXX"); + localGen->GetTargetDefines(this->Target, cfg, "CXX", defines); return cmJoin(defines, ";"); }; -- cgit v0.12 From 7772bd31f57fd8b4d6a7937a97671eb34c966835 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Mon, 27 Aug 2018 14:57:17 -0400 Subject: FindMatlab: Guard against nonexistent installation Logic added by commit v3.12.0-rc1~183^2 (FindMatlab: Matlab Runtime Compiler support, 2017-04-29) assumes that `VersionInfo.xml` exists in the installation. Fix it to tolerate a missing or empty file. This change was originally made by commit v3.13.0-rc1~173^2 (FindMatlab: Guard against nonexistent installation, 2018-08-27). Here we backport it to the 3.12.x series. Fixes: #18436 --- Modules/FindMatlab.cmake | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index 2d04b84..d765bdf 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -1163,21 +1163,24 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve # return the updated value set(${matlab_final_version} ${Matlab_VERSION_STRING_INTERNAL} PARENT_SCOPE) - else() + elseif(EXISTS "${matlab_root}/VersionInfo.xml") # MCR # we cannot run anything in order to extract the version. We assume that the file # VersionInfo.xml exists under the MatlabRoot, we look for it and extract the version from there set(_matlab_version_tmp "unknown") file(STRINGS "${matlab_root}/VersionInfo.xml" versioninfo_string NEWLINE_CONSUME) - # parses "9.2.0.538062" - string(REGEX MATCH "(.*)" - version_reg_match - ${versioninfo_string} - ) - - if(NOT "${version_reg_match}" STREQUAL "") - if("${CMAKE_MATCH_1}" MATCHES "(([0-9])\\.([0-9]))[\\.0-9]*") - set(_matlab_version_tmp "${CMAKE_MATCH_1}") + + if(versioninfo_string) + # parses "9.2.0.538062" + string(REGEX MATCH "(.*)" + version_reg_match + ${versioninfo_string} + ) + + if(NOT "${version_reg_match}" STREQUAL "") + if("${CMAKE_MATCH_1}" MATCHES "(([0-9])\\.([0-9]))[\\.0-9]*") + set(_matlab_version_tmp "${CMAKE_MATCH_1}") + endif() endif() endif() set(${matlab_final_version} "${_matlab_version_tmp}" PARENT_SCOPE) @@ -1185,8 +1188,7 @@ function(_Matlab_get_version_from_root matlab_root matlab_or_mcr matlab_known_ve "${_matlab_version_tmp}" CACHE INTERNAL "Matlab (MCR) version (automatically determined)" FORCE) - - endif() # Matlab or MCR + endif() # Matlab or MCR endfunction() -- cgit v0.12 From 514f0b572ea8ca2ba87810aa8f48185f266a8eaa Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 3 Oct 2018 11:50:19 -0400 Subject: Testing: Update hard-coded line numbers to [0-9]+ in some tests --- .../CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt | 2 +- .../CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt | 2 +- .../CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt | 2 +- .../CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt | 2 +- .../CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt | 2 +- .../CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt | 2 +- Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt | 2 +- Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt | 2 +- Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt | 4 ++-- .../CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt | 2 +- Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt | 2 +- .../RunCMake/CMP0026/clear-cached-information-stderr.txt | 2 +- Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt | 2 +- Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt | 4 ++-- Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wdev-stderr.txt | 4 ++-- Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Werror_dev-stderr.txt | 4 ++-- .../RunCMake/CommandLine/Wno-error_deprecated-stderr.txt | 2 +- Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadOption1-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadOption2-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadSeries1-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadSeries2-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/BadSeries3-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/Directory1-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/Directory2-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/Directory3-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/Directory4-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/Directory5-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/MissingData-stderr.txt | 4 ++-- .../ExternalData/MissingDataWithAssociated-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt | 4 ++-- Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt | 4 ++-- .../BadInvalidName-stderr.txt | 16 ++++++++-------- .../BadNonTarget-stderr.txt | 2 +- .../LinkImplementationCycle1-stderr.txt | 2 +- .../LinkImplementationCycle2-stderr.txt | 2 +- Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt | 4 ++-- Tests/RunCMake/TargetSources/OriginDebug-stderr.txt | 8 ++++---- Tests/RunCMake/file/FileOpenFailRead-stderr.txt | 2 +- Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt | 12 ++++++------ Tests/RunCMake/get_property/BadArgument-stderr.txt | 2 +- Tests/RunCMake/get_property/BadDirectory-stderr.txt | 2 +- Tests/RunCMake/get_property/BadScope-stderr.txt | 2 +- Tests/RunCMake/get_property/BadTarget-stderr.txt | 2 +- Tests/RunCMake/get_property/BadTest-stderr.txt | 2 +- Tests/RunCMake/get_property/GlobalName-stderr.txt | 2 +- Tests/RunCMake/get_property/MissingArgument-stderr.txt | 2 +- Tests/RunCMake/get_property/NoCache-stderr.txt | 2 +- Tests/RunCMake/get_property/NoProperty-stderr.txt | 2 +- Tests/RunCMake/get_property/NoSource-stderr.txt | 2 +- Tests/RunCMake/get_property/NoTarget-stderr.txt | 2 +- Tests/RunCMake/get_property/NoTest-stderr.txt | 2 +- Tests/RunCMake/get_property/VariableName-stderr.txt | 2 +- .../include_guard/InvalidArgumentsNumber-stderr.txt | 2 +- Tests/RunCMake/include_guard/InvalidScope-stderr.txt | 2 +- .../install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt | 2 +- .../TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt | 2 +- .../TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt | 2 +- Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt | 14 +++++++------- Tests/RunCMake/string/AppendNoArgs-stderr.txt | 2 +- Tests/RunCMake/string/ConcatNoArgs-stderr.txt | 2 +- Tests/RunCMake/string/JoinNoArgs-stderr.txt | 2 +- Tests/RunCMake/string/JoinNoVar-stderr.txt | 2 +- Tests/RunCMake/string/PrependNoArgs-stderr.txt | 2 +- Tests/RunCMake/string/UuidBadNamespace-stderr.txt | 2 +- Tests/RunCMake/string/UuidBadType-stderr.txt | 2 +- Tests/RunCMake/string/UuidMissingNameValue-stderr.txt | 2 +- Tests/RunCMake/string/UuidMissingNamespace-stderr.txt | 2 +- .../RunCMake/string/UuidMissingNamespaceValue-stderr.txt | 2 +- Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt | 2 +- .../target_compile_features/alias_target-stderr.txt | 2 +- .../target_compile_features/cxx_not_enabled-stderr.txt | 2 +- .../target_compile_features/imported_target-stderr.txt | 2 +- .../target_compile_features/invalid_args-stderr.txt | 2 +- .../invalid_args_on_interface-stderr.txt | 2 +- .../no_matching_c_feature-stderr.txt | 2 +- .../no_matching_cxx_feature-stderr.txt | 2 +- .../target_compile_features/no_target-stderr.txt | 2 +- .../target_compile_features/not_a_c_feature-stderr.txt | 2 +- .../target_compile_features/not_a_cxx_feature-stderr.txt | 2 +- .../target_compile_features/not_enough_args-stderr.txt | 2 +- .../target_compile_features/utility_target-stderr.txt | 2 +- .../target_link_libraries/CMP0023-NEW-2-stderr.txt | 2 +- .../target_link_libraries/CMP0023-NEW-stderr.txt | 2 +- .../target_link_libraries/CMP0023-WARN-2-stderr.txt | 2 +- .../target_link_libraries/CMP0023-WARN-stderr.txt | 2 +- .../CMP0079-link-NEW-bogus-stderr.txt | 2 +- .../target_link_libraries/MixedSignature-stderr.txt | 2 +- 96 files changed, 143 insertions(+), 143 deletions(-) diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt index 05b0217..6a1f1bd 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt @@ -4,4 +4,4 @@ CMake Error at CMP0026-CONFIG-LOCATION-NEW.cmake:7 \(get_target_property\): expression \$, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt index edeb337..84dec32 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt @@ -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\)$ diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt index d44dcb4..d2209fd 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-CONFIG-LOCATION-WARN.cmake:5 \(get_target_prope expression \$, 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. diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt index fec9dfb..1490103 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt @@ -4,4 +4,4 @@ CMake Error at CMP0026-LOCATION-CONFIG-NEW.cmake:7 \(get_target_property\): expression \$, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt index 32ff698..1fb4ef6 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt @@ -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\)$ diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt index cd6f3d0..8b4faf0 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-LOCATION-CONFIG-WARN.cmake:5 \(get_target_prope expression \$, 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. diff --git a/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt index fa02512..8c47c2a 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt @@ -4,4 +4,4 @@ CMake Error at CMP0026-NEW.cmake:7 \(get_target_property\): expression \$, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt index b3f79fc..b4282f5 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt @@ -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\)$ diff --git a/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt index d122c4a..0d39596 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt @@ -8,7 +8,7 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:5 \(get_target_property\): expression \$, 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 \$, 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. diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt index 0996cb6..6377921 100644 --- a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt +++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at LOCATION-and-TARGET_OBJECTS.cmake:[0-9]+ \(get_target_p \$, 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. diff --git a/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt b/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt index 87d198d..360d987 100644 --- a/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt +++ b/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at ObjlibNotDefined.cmake:[0-9]+ \(get_target_property\): expression \$, 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. diff --git a/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt b/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt index 157a046..3525704 100644 --- a/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt +++ b/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt @@ -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\)$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt index 697265e..e1c44e5 100644 --- a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt @@ -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"$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt index ae2e468..78c6b6d 100644 --- a/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt @@ -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"$ diff --git a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt index e9be1dc..30385f8 100644 --- a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index 88cfb3a..172fb81 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -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.$ diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt index 6acdc73..d681836 100644 --- a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt +++ b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt index 590ec96..35890fc 100644 --- a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt @@ -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.$ diff --git a/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt index 0ed1698..4589706 100644 --- a/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt b/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt index dd22d55..ee28d7f 100644 --- a/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt @@ -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.$ diff --git a/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt b/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt index c3708a9..5388c46 100644 --- a/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt b/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt index 1f10644..a48e414 100644 --- a/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt b/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt index f68f0be..1f9f6b5 100644 --- a/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadOption1-stderr.txt b/Tests/RunCMake/ExternalData/BadOption1-stderr.txt index b63d098..fece877 100644 --- a/Tests/RunCMake/ExternalData/BadOption1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadOption1-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadOption2-stderr.txt b/Tests/RunCMake/ExternalData/BadOption2-stderr.txt index d114c8a..865552a 100644 --- a/Tests/RunCMake/ExternalData/BadOption2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadOption2-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt index aedc330..9d04693 100644 --- a/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt index 3f809ca..135b424 100644 --- a/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt index 37740e0..df9bb0e 100644 --- a/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt index 3099be5..5b34959 100644 --- a/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt index 3a02c25..82b2311 100644 --- a/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt @@ -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\) diff --git a/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt index 594cb6f6..13e75c5 100644 --- a/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt @@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Series option ":" not allowed with associated files. Call Stack \(most recent call first\): .* - BadSeries3.cmake:2 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadSeries3\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory1-stderr.txt b/Tests/RunCMake/ExternalData/Directory1-stderr.txt index 2bc3c60..8336832 100644 --- a/Tests/RunCMake/ExternalData/Directory1-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory1-stderr.txt @@ -10,5 +10,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that is directory instead of a file! Call Stack \(most recent call first\): .* - Directory1.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory1\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory2-stderr.txt b/Tests/RunCMake/ExternalData/Directory2-stderr.txt index 92c9a2f..ad6d814 100644 --- a/Tests/RunCMake/ExternalData/Directory2-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory2-stderr.txt @@ -6,5 +6,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): must list associated files. Call Stack \(most recent call first\): .* - Directory2.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory2\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory3-stderr.txt b/Tests/RunCMake/ExternalData/Directory3-stderr.txt index ceed2a0..5538c38 100644 --- a/Tests/RunCMake/ExternalData/Directory3-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory3-stderr.txt @@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a file \(with or without an extension\)! Call Stack \(most recent call first\): .* - Directory3.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory3\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/Directory4-stderr.txt b/Tests/RunCMake/ExternalData/Directory4-stderr.txt index dcb8522..ef88476 100644 --- a/Tests/RunCMake/ExternalData/Directory4-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory4-stderr.txt @@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Series option ":" not allowed with directories. Call Stack \(most recent call first\): .* - Directory4.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory4\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory5-stderr.txt b/Tests/RunCMake/ExternalData/Directory5-stderr.txt index 8e54aec..3fcde41 100644 --- a/Tests/RunCMake/ExternalData/Directory5-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory5-stderr.txt @@ -10,5 +10,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a directory! Call Stack \(most recent call first\): .* - Directory5.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory5\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/MissingData-stderr.txt b/Tests/RunCMake/ExternalData/MissingData-stderr.txt index 39ed2f1..b109976 100644 --- a/Tests/RunCMake/ExternalData/MissingData-stderr.txt +++ b/Tests/RunCMake/ExternalData/MissingData-stderr.txt @@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a file \(with or without an extension\)! Call Stack \(most recent call first\): .* - MissingData.cmake:4 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + MissingData\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt index 315af5e..426d86c 100644 --- a/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt +++ b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt @@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a file \(with or without an extension\)! Call Stack \(most recent call first\): .* - MissingDataWithAssociated.cmake:4 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + MissingDataWithAssociated\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt b/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt index 496ad8a..33cef07 100644 --- a/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt +++ b/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt @@ -2,5 +2,5 @@ CMake Warning at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): ExternalData_LINK_CONTENT cannot be used in-source Call Stack \(most recent call first\): .* - NoLinkInSource.cmake:8 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + NoLinkInSource\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt b/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt index ccbaf5a..45dfb94 100644 --- a/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt +++ b/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt @@ -1,5 +1,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Neither ExternalData_URL_TEMPLATES nor ExternalData_OBJECT_STORES is set! Call Stack \(most recent call first\): - NoURLTemplates.cmake:2 \(ExternalData_Add_Target\) - CMakeLists.txt:3 \(include\) + NoURLTemplates\.cmake:[0-9]+ \(ExternalData_Add_Target\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt index 6e89104..fec12ae 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt @@ -1,47 +1,47 @@ -^(CMake Error at BadInvalidName1/CMakeLists.txt:2 \(include_directories\): +^(CMake Error at BadInvalidName1/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ Target name not supported. -+)+(CMake Error at BadInvalidName2/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName2/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ Target name and property name not supported. -+)+(CMake Error at BadInvalidName3/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName3/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ Property name not supported. -+)+(CMake Error at BadInvalidName4/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName4/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ Property name not supported. -+)+(CMake Error at BadInvalidName5/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName5/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ \$ expression requires a non-empty target name and property name. -+)+(CMake Error at BadInvalidName6/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName6/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ \$ expression requires a non-empty target name. -+)+(CMake Error at BadInvalidName7/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName7/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ \$ expression requires a non-empty property name. -+)+(CMake Error at BadInvalidName8/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName8/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$ diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt index 3adf73e..75865ad 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt @@ -5,4 +5,4 @@ CMake Error at BadNonTarget.cmake:7 \(include_directories\): Target "NonExistent" not found. Call Stack \(most recent call first\): - CMakeLists.txt:8 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt index 7e002f5..8bff68e 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt @@ -7,4 +7,4 @@ CMake Error at LinkImplementationCycle1.cmake:5 \(target_link_libraries\): target property which is transitive over the link libraries, creating a recursion. Call Stack \(most recent call first\): - CMakeLists.txt:8 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt index 2f72de6..044b77c 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt @@ -7,4 +7,4 @@ CMake Error at LinkImplementationCycle2.cmake:5 \(target_link_libraries\): target property which is transitive over the link libraries, creating a recursion. Call Stack \(most recent call first\): - CMakeLists.txt:8 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt b/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt index 217c762..bd888ee 100644 --- a/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt +++ b/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\): +CMake Warning \(dev\) at CMP0076-WARN/CMakeLists\.txt:[0-9]+ \(target_sources\): Policy CMP0076 is not set: target_sources\(\) command converts relative paths to absolute. Run "cmake --help-policy CMP0076" for policy details. Use the cmake_policy command to set the policy and suppress this warning. @@ -6,7 +6,7 @@ CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\): An interface source of target "publiclib" has a relative path. This warning is for project developers. Use -Wno-dev to suppress it. -CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\): +CMake Warning \(dev\) at CMP0076-WARN/CMakeLists\.txt:[0-9]+ \(target_sources\): Policy CMP0076 is not set: target_sources\(\) command converts relative paths to absolute. Run "cmake --help-policy CMP0076" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt index 11bc96c..a40f463 100644 --- a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt +++ b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt @@ -4,7 +4,7 @@ CMake Debug Log at OriginDebug.cmake:13 \(add_library\): \* .*Tests/RunCMake/TargetSources/empty_2.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) .* CMake Debug Log at OriginDebug.cmake:16 \(set_property\): Used sources for target OriginDebug: @@ -12,7 +12,7 @@ CMake Debug Log at OriginDebug.cmake:16 \(set_property\): \* .*Tests/RunCMake/TargetSources/empty_3.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) .* CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): Used sources for target OriginDebug: @@ -20,7 +20,7 @@ CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): \* .*Tests/RunCMake/TargetSources/empty_4.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) .* CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): Used sources for target OriginDebug: @@ -28,4 +28,4 @@ CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): \* .*Tests/RunCMake/TargetSources/empty_1.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/FileOpenFailRead-stderr.txt b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt index 23d4337..9f8cee2 100644 --- a/Tests/RunCMake/file/FileOpenFailRead-stderr.txt +++ b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt @@ -3,4 +3,4 @@ CMake Error at FileOpenFailRead.cmake:[0-9]+ \(file\): .*/Tests/RunCMake/file/does_not_exist/file.txt Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt index 557b817..bb7e4d2 100644 --- a/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt +++ b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt @@ -2,31 +2,31 @@ CMake Error at INSTALL-MESSAGE-bad.cmake:1 \(file\): file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are mutually exclusive. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:2 \(file\): file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are mutually exclusive. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:3 \(file\): file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are mutually exclusive. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:4 \(file\): file option MESSAGE_ALWAYS may not appear after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:5 \(file\): file option MESSAGE_LAZY may not appear after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:6 \(file\): file option MESSAGE_NEVER may not appear after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/get_property/BadArgument-stderr.txt b/Tests/RunCMake/get_property/BadArgument-stderr.txt index 37c4477..ce5a209 100644 --- a/Tests/RunCMake/get_property/BadArgument-stderr.txt +++ b/Tests/RunCMake/get_property/BadArgument-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at BadArgument.cmake:1 \(get_property\): get_property given invalid argument "FOO". Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadDirectory-stderr.txt b/Tests/RunCMake/get_property/BadDirectory-stderr.txt index 98464f8..6afec03 100644 --- a/Tests/RunCMake/get_property/BadDirectory-stderr.txt +++ b/Tests/RunCMake/get_property/BadDirectory-stderr.txt @@ -3,4 +3,4 @@ found. This could be because the directory argument was invalid or, it is valid but has not been processed yet. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadScope-stderr.txt b/Tests/RunCMake/get_property/BadScope-stderr.txt index 4cc32c8..3084bb7 100644 --- a/Tests/RunCMake/get_property/BadScope-stderr.txt +++ b/Tests/RunCMake/get_property/BadScope-stderr.txt @@ -2,4 +2,4 @@ get_property given invalid scope FOO. Valid scopes are GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, VARIABLE, CACHE, INSTALL. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadTarget-stderr.txt b/Tests/RunCMake/get_property/BadTarget-stderr.txt index 45a0df6..e857117 100644 --- a/Tests/RunCMake/get_property/BadTarget-stderr.txt +++ b/Tests/RunCMake/get_property/BadTarget-stderr.txt @@ -2,4 +2,4 @@ get_property could not find TARGET FOO. Perhaps it has not yet been created. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadTest-stderr.txt b/Tests/RunCMake/get_property/BadTest-stderr.txt index 819c070..aec9e9e 100644 --- a/Tests/RunCMake/get_property/BadTest-stderr.txt +++ b/Tests/RunCMake/get_property/BadTest-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at BadTest.cmake:1 \(get_property\): get_property given TEST name that does not exist: FOO Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/GlobalName-stderr.txt b/Tests/RunCMake/get_property/GlobalName-stderr.txt index a7d4971..4ddceb2 100644 --- a/Tests/RunCMake/get_property/GlobalName-stderr.txt +++ b/Tests/RunCMake/get_property/GlobalName-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at GlobalName.cmake:1 \(get_property\): get_property given name for GLOBAL scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/MissingArgument-stderr.txt b/Tests/RunCMake/get_property/MissingArgument-stderr.txt index 8722712..00d3311 100644 --- a/Tests/RunCMake/get_property/MissingArgument-stderr.txt +++ b/Tests/RunCMake/get_property/MissingArgument-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at MissingArgument.cmake:1 \(get_property\): get_property called with incorrect number of arguments Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoCache-stderr.txt b/Tests/RunCMake/get_property/NoCache-stderr.txt index defafb6..7348cff 100644 --- a/Tests/RunCMake/get_property/NoCache-stderr.txt +++ b/Tests/RunCMake/get_property/NoCache-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoCache.cmake:1 \(get_property\): get_property not given name for CACHE scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoProperty-stderr.txt b/Tests/RunCMake/get_property/NoProperty-stderr.txt index 0ef147f..79b8c87 100644 --- a/Tests/RunCMake/get_property/NoProperty-stderr.txt +++ b/Tests/RunCMake/get_property/NoProperty-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoProperty.cmake:1 \(get_property\): get_property not given a PROPERTY argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoSource-stderr.txt b/Tests/RunCMake/get_property/NoSource-stderr.txt index 59fd0ad..cefff41 100644 --- a/Tests/RunCMake/get_property/NoSource-stderr.txt +++ b/Tests/RunCMake/get_property/NoSource-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoSource.cmake:1 \(get_property\): get_property not given name for SOURCE scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoTarget-stderr.txt b/Tests/RunCMake/get_property/NoTarget-stderr.txt index a0e1a94..fb1c8f4 100644 --- a/Tests/RunCMake/get_property/NoTarget-stderr.txt +++ b/Tests/RunCMake/get_property/NoTarget-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoTarget.cmake:1 \(get_property\): get_property not given name for TARGET scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoTest-stderr.txt b/Tests/RunCMake/get_property/NoTest-stderr.txt index c90a0ffc..93c3e98 100644 --- a/Tests/RunCMake/get_property/NoTest-stderr.txt +++ b/Tests/RunCMake/get_property/NoTest-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoTest.cmake:1 \(get_property\): get_property not given name for TEST scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/VariableName-stderr.txt b/Tests/RunCMake/get_property/VariableName-stderr.txt index e9f3827..250d920 100644 --- a/Tests/RunCMake/get_property/VariableName-stderr.txt +++ b/Tests/RunCMake/get_property/VariableName-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at VariableName.cmake:1 \(get_property\): get_property given name for VARIABLE scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt index cdd33ac..698e89a 100644 --- a/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt +++ b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt @@ -2,4 +2,4 @@ CMake Error at InvalidArgumentsNumber.cmake:1 \(include_guard\): include_guard given an invalid number of arguments. The command takes at most 1 argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/include_guard/InvalidScope-stderr.txt b/Tests/RunCMake/include_guard/InvalidScope-stderr.txt index 456709d..58f62a3 100644 --- a/Tests/RunCMake/include_guard/InvalidScope-stderr.txt +++ b/Tests/RunCMake/include_guard/InvalidScope-stderr.txt @@ -1,4 +1,4 @@ CMake Error at InvalidScope.cmake:1 \(include_guard\): include_guard given an invalid scope: INVALID Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt index 166ba6f..c8074e9 100644 --- a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt +++ b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt @@ -1,4 +1,4 @@ CMake Error at DIRECTORY-PATTERN-MESSAGE_NEVER.cmake:[0-9]+ \(install\): install DIRECTORY does not allow "MESSAGE_NEVER" after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt index 187a826..fe65fd3 100644 --- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt @@ -2,4 +2,4 @@ install TARGETS given NAMELINK_COMPONENT option not in LIBRARY group\. The NAMELINK_COMPONENT option may be specified only following LIBRARY\. Call Stack \(most recent call first\): - CMakeLists\.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt index d1002ba..60f52c4 100644 --- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt @@ -2,4 +2,4 @@ install TARGETS given NAMELINK_COMPONENT option not in LIBRARY group\. The NAMELINK_COMPONENT option may be specified only following LIBRARY\. Call Stack \(most recent call first\): - CMakeLists\.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt index f21b1de..e45fc64 100644 --- a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt @@ -3,7 +3,7 @@ \(\"ImportedGlobalTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error at IMPORTED_GLOBAL.cmake:16 \(set_property\): @@ -11,7 +11,7 @@ CMake Error at IMPORTED_GLOBAL.cmake:16 \(set_property\): \(\"ImportedGlobalTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error at IMPORTED_GLOBAL.cmake:26 \(set_property\): @@ -19,7 +19,7 @@ CMake Error at IMPORTED_GLOBAL.cmake:26 \(set_property\): \(\"ImportedLocalTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error at IMPORTED_GLOBAL.cmake:32 \(set_property\): @@ -27,10 +27,10 @@ CMake Error at IMPORTED_GLOBAL.cmake:32 \(set_property\): \(\"NonImportedTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) -CMake Error at IMPORTED_GLOBAL/CMakeLists.txt:8 \(set_property\): +CMake Error at IMPORTED_GLOBAL/CMakeLists\.txt:[0-9]+ \(set_property\): Attempt to promote imported target \"ImportedLocalTarget2\" to global scope \(by setting IMPORTED_GLOBAL\) which is not built in this directory. @@ -45,7 +45,7 @@ CMake Error at IMPORTED_GLOBAL.cmake:50 \(set_property\): Attempt to promote imported target \"ImportedSubdirTarget1\" to global scope \(by setting IMPORTED_GLOBAL\) which is not built in this directory. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error in IMPORTED_GLOBAL/CMakeLists.txt: @@ -58,4 +58,4 @@ CMake Error at IMPORTED_GLOBAL.cmake:52 \(set_property\): Attempt to promote imported target \"ImportedSubdirTarget2\" to global scope \(by setting IMPORTED_GLOBAL\) which is not built in this directory. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/string/AppendNoArgs-stderr.txt b/Tests/RunCMake/string/AppendNoArgs-stderr.txt index 75ad427..9b7e9fa 100644 --- a/Tests/RunCMake/string/AppendNoArgs-stderr.txt +++ b/Tests/RunCMake/string/AppendNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at AppendNoArgs.cmake:1 \(string\): string sub-command APPEND requires at least one argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/ConcatNoArgs-stderr.txt b/Tests/RunCMake/string/ConcatNoArgs-stderr.txt index efea5f1..22b608d 100644 --- a/Tests/RunCMake/string/ConcatNoArgs-stderr.txt +++ b/Tests/RunCMake/string/ConcatNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at ConcatNoArgs.cmake:1 \(string\): string sub-command CONCAT requires at least one argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JoinNoArgs-stderr.txt b/Tests/RunCMake/string/JoinNoArgs-stderr.txt index d9dcec3..7fcd352 100644 --- a/Tests/RunCMake/string/JoinNoArgs-stderr.txt +++ b/Tests/RunCMake/string/JoinNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at JoinNoArgs.cmake:1 \(string\): string sub-command JOIN requires at least two arguments. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JoinNoVar-stderr.txt b/Tests/RunCMake/string/JoinNoVar-stderr.txt index 90701a9..b4a09c3 100644 --- a/Tests/RunCMake/string/JoinNoVar-stderr.txt +++ b/Tests/RunCMake/string/JoinNoVar-stderr.txt @@ -1,4 +1,4 @@ CMake Error at JoinNoVar.cmake:1 \(string\): string sub-command JOIN requires at least two arguments. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/PrependNoArgs-stderr.txt b/Tests/RunCMake/string/PrependNoArgs-stderr.txt index 8d433f9..c8acba8 100644 --- a/Tests/RunCMake/string/PrependNoArgs-stderr.txt +++ b/Tests/RunCMake/string/PrependNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at PrependNoArgs.cmake:1 \(string\): string sub-command PREPEND requires at least one argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidBadNamespace-stderr.txt b/Tests/RunCMake/string/UuidBadNamespace-stderr.txt index cb12903..340189b 100644 --- a/Tests/RunCMake/string/UuidBadNamespace-stderr.txt +++ b/Tests/RunCMake/string/UuidBadNamespace-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidBadNamespace.cmake:3 \(string\): string UUID sub-command, malformed NAMESPACE UUID. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidBadType-stderr.txt b/Tests/RunCMake/string/UuidBadType-stderr.txt index 1993c04..2734d86 100644 --- a/Tests/RunCMake/string/UuidBadType-stderr.txt +++ b/Tests/RunCMake/string/UuidBadType-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidBadType.cmake:3 \(string\): string UUID sub-command, unknown TYPE 'FOO'. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt b/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt index 0b7cde4..79819a9 100644 --- a/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingNameValue.cmake:3 \(string\): string UUID sub-command, NAME requires a value. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt b/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt index dfcfe42..1ffc53f 100644 --- a/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingNamespace.cmake:3 \(string\): string UUID sub-command, malformed NAMESPACE UUID. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt b/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt index 86585ad..2a73d3f 100644 --- a/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingNamespaceValue.cmake:3 \(string\): string UUID sub-command, NAMESPACE requires a value. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt b/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt index 70252f8..44bd479 100644 --- a/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingTypeValue.cmake:3 \(string\): string UUID sub-command, TYPE requires a value. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt index 5ebe170..1658f58 100644 --- a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt @@ -1,4 +1,4 @@ CMake Error at alias_target.cmake:[0-9]+ \(target_compile_features\): target_compile_features can not be used on an ALIAS target. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt index 4f707c7..5b4761c 100644 --- a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt +++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at cxx_not_enabled.cmake:[0-9]+ \(target_compile_features\): target_compile_features cannot use features from non-enabled language CXX Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt index afad537..f2a1aba 100644 --- a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt @@ -2,4 +2,4 @@ target_compile_features may only set INTERFACE properties on INTERFACE targets Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt index 9917be7..ee57b54 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt +++ b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt @@ -1,4 +1,4 @@ CMake Error at invalid_args.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with invalid arguments Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt index 23a8eeb..d6564f4 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt @@ -2,4 +2,4 @@ CMake Error at invalid_args_on_interface.cmake:[0-9]+ \(target_compile_features\ target_compile_features may only set INTERFACE properties on INTERFACE targets Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt index 1875d12..07ddd6a 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt @@ -5,4 +5,4 @@ CMake Error at no_matching_c_feature.cmake:[0-9]+ \((target_compile_features|mes version 4.8.1. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt index 90d41c9..9392f4b 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt @@ -5,4 +5,4 @@ CMake Error at no_matching_cxx_feature.cmake:[0-9]+ \((target_compile_features|m version *[.0-9]+\. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_target-stderr.txt b/Tests/RunCMake/target_compile_features/no_target-stderr.txt index 65974b4..7b62c94 100644 --- a/Tests/RunCMake/target_compile_features/no_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_target-stderr.txt @@ -2,4 +2,4 @@ CMake Error at no_target.cmake:[0-9]+ \(target_compile_features\): Cannot specify compile features for target "main" which is not built by this project. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt index 493c582..8a4055d 100644 --- a/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt @@ -2,4 +2,4 @@ CMake Error at not_a_c_feature.cmake:[0-9]+ \(target_compile_features\): target_compile_features specified unknown feature "c_not_a_feature" for target "main". Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt index 3dbf0e6..bd7f2c6 100644 --- a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt @@ -2,4 +2,4 @@ CMake Error at not_a_cxx_feature.cmake:[0-9]+ \(target_compile_features\): target_compile_features specified unknown feature "cxx_not_a_feature" for target "main". Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt index c0c2efa..34f1ce2 100644 --- a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt @@ -1,4 +1,4 @@ CMake Error at not_enough_args.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with incorrect number of arguments Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt index ff03310..0c01377 100644 --- a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt @@ -1,4 +1,4 @@ CMake Error at utility_target.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with non-compilable target type Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt index 8e3f315..12c00fb 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt @@ -8,4 +8,4 @@ CMake Error at CMP0023-NEW-2.cmake:11 \(target_link_libraries\): \* CMP0023-NEW-2.cmake:10 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt index 2ef2290..117c806 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt @@ -8,4 +8,4 @@ CMake Error at CMP0023-NEW.cmake:11 \(target_link_libraries\): \* CMP0023-NEW.cmake:10 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt index 5147861..7e49d52 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt @@ -13,4 +13,4 @@ CMake Warning \(dev\) at CMP0023-WARN-2.cmake:9 \(target_link_libraries\): \* CMP0023-WARN-2.cmake:8 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt index a7474fa..df1288e 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt @@ -13,4 +13,4 @@ CMake Warning \(dev\) at CMP0023-WARN.cmake:9 \(target_link_libraries\): \* CMP0023-WARN.cmake:8 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt index b9fe3f6..8ef35c1 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt @@ -3,4 +3,4 @@ found. Perhaps a find_package\(\) call is missing for an IMPORTED target, or an ALIAS target is missing\? Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt b/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt index c6237f4..5b0caf7 100644 --- a/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt @@ -2,4 +2,4 @@ CMake Error at MixedSignature.cmake:6 \(target_link_libraries\): The INTERFACE, PUBLIC or PRIVATE option must appear as the second argument, just after the target name. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) -- cgit v0.12 From fc8955e8891c645cd369a3cc8b607a14a8ed5bd7 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Tue, 2 Oct 2018 16:38:26 -0400 Subject: add_subdirectory: Run subdirectory install rules in correct order Before this change, install rules created by add_subdirectory() would be executed after all of the top-level install rules, even if they were declared before the top-level rules. This change adds a new policy, CMP0082, which interleaves the add_subdirectory() install rules with the other install rules so they are run in the correct order. --- Help/manual/cmake-policies.7.rst | 8 +++ Help/policy/CMP0082.rst | 24 ++++++++ Help/release/dev/install-subdirectory-order.rst | 5 ++ Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst | 2 + Source/CMakeLists.txt | 2 + Source/cmInstallGenerator.cxx | 13 +++++ Source/cmInstallGenerator.h | 4 ++ Source/cmInstallScriptGenerator.cxx | 4 +- Source/cmInstallSubdirectoryGenerator.cxx | 77 +++++++++++++++++++++++++ Source/cmInstallSubdirectoryGenerator.h | 41 +++++++++++++ Source/cmLocalGenerator.cxx | 63 +++++++++++++++----- Source/cmMakefile.cxx | 4 ++ Source/cmPolicies.h | 6 +- bootstrap | 1 + 14 files changed, 235 insertions(+), 19 deletions(-) create mode 100644 Help/policy/CMP0082.rst create mode 100644 Help/release/dev/install-subdirectory-order.rst create mode 100644 Source/cmInstallSubdirectoryGenerator.cxx create mode 100644 Source/cmInstallSubdirectoryGenerator.h diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 2cc52fe..0587429 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -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. + Policies Introduced by CMake 3.13 ================================= diff --git a/Help/policy/CMP0082.rst b/Help/policy/CMP0082.rst new file mode 100644 index 0000000..7b2ef04 --- /dev/null +++ b/Help/policy/CMP0082.rst @@ -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 >` +variable to control the warning. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/install-subdirectory-order.rst b/Help/release/dev/install-subdirectory-order.rst new file mode 100644 index 0000000..c52e617 --- /dev/null +++ b/Help/release/dev/install-subdirectory-order.rst @@ -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. diff --git a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst index aa23b65..d179728 100644 --- a/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst +++ b/Help/variable/CMAKE_POLICY_WARNING_CMPNNNN.rst @@ -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 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 3cf6c8f..5e2758a 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -260,6 +260,8 @@ set(SRCS cmInstallFilesGenerator.cxx cmInstallScriptGenerator.h cmInstallScriptGenerator.cxx + cmInstallSubdirectoryGenerator.h + cmInstallSubdirectoryGenerator.cxx cmInstallTargetGenerator.h cmInstallTargetGenerator.cxx cmInstallDirectoryGenerator.h diff --git a/Source/cmInstallGenerator.cxx b/Source/cmInstallGenerator.cxx index 53ac716..2b23658 100644 --- a/Source/cmInstallGenerator.cxx +++ b/Source/cmInstallGenerator.cxx @@ -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 const& files, bool optional /* = false */, diff --git a/Source/cmInstallGenerator.h b/Source/cmInstallGenerator.h index fc1ce86..e5b88c3 100644 --- a/Source/cmInstallGenerator.h +++ b/Source/cmInstallGenerator.h @@ -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 const& files, bool optional = false, diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx index 3a90f4c..1d7784e 100644 --- a/Source/cmInstallScriptGenerator.cxx +++ b/Source/cmInstallScriptGenerator.cxx @@ -37,9 +37,9 @@ void cmInstallScriptGenerator::AddScriptInstallRule(std::ostream& os, std::string const& script) { if (this->Code) { - os << indent.Next() << script << "\n"; + os << indent << script << "\n"; } else { - os << indent.Next() << "include(\"" << script << "\")\n"; + os << indent << "include(\"" << script << "\")\n"; } } diff --git a/Source/cmInstallSubdirectoryGenerator.cxx b/Source/cmInstallSubdirectoryGenerator.cxx new file mode 100644 index 0000000..ca9f134 --- /dev/null +++ b/Source/cmInstallSubdirectoryGenerator.cxx @@ -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 +#include + +cmInstallSubdirectoryGenerator::cmInstallSubdirectoryGenerator( + cmMakefile* makefile, const char* binaryDirectory, bool excludeFromAll) + : cmInstallGenerator(nullptr, std::vector(), 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; + } + } +} diff --git a/Source/cmInstallSubdirectoryGenerator.h b/Source/cmInstallSubdirectoryGenerator.h new file mode 100644 index 0000000..35471dd --- /dev/null +++ b/Source/cmInstallSubdirectoryGenerator.h @@ -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 +#include + +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 diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7030725..21b029e 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -517,31 +517,62 @@ void cmLocalGenerator::GenerateInstallRules() } // Ask each install generator to write its code. + cmPolicies::PolicyStatus status = this->GetPolicyStatus(cmPolicies::CMP0082); std::vector 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 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 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. diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8d163b7..0a69d09 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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 diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index a367e47..a469f1e 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -240,7 +240,11 @@ class cmMakefile; 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) \ diff --git a/bootstrap b/bootstrap index 416a3d6..6710d1a 100755 --- a/bootstrap +++ b/bootstrap @@ -348,6 +348,7 @@ CMAKE_CXX_SOURCES="\ cmInstallFilesGenerator \ cmInstallGenerator \ cmInstallScriptGenerator \ + cmInstallSubdirectoryGenerator \ cmInstallTargetGenerator \ cmInstallTargetsCommand \ cmInstalledFile \ -- cgit v0.12 From b56f2db87aebd34bfaf24439d56632aa3f3019f8 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 3 Oct 2018 11:49:18 -0400 Subject: Testing: Add test for CMP0082 --- .../CMP0082-ExcludeFromAll/CMakeLists.txt | 1 + .../CMP0082-NEW-install-component-stdout.txt | 4 ++++ .../CMP0082-NEW-install-stdout.txt | 3 +++ Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake | 3 +++ .../add_subdirectory/CMP0082-Nested/CMakeLists.txt | 1 + .../CMP0082-Nested/sub/CMakeLists.txt | 1 + .../CMP0082-NestedSub/CMakeLists.txt | 2 ++ .../CMP0082-NestedSub/sub/CMakeLists.txt | 1 + .../add_subdirectory/CMP0082-None/CMakeLists.txt | 0 .../CMP0082-OLD-install-component-stdout.txt | 4 ++++ .../CMP0082-OLD-install-stdout.txt | 3 +++ Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake | 3 +++ ...MP0082-WARN-Nested-install-component-stdout.txt | 4 ++++ .../CMP0082-WARN-Nested-install-stdout.txt | 3 +++ .../CMP0082-WARN-Nested-stderr.txt | 7 +++++++ .../add_subdirectory/CMP0082-WARN-Nested.cmake | 2 ++ ...082-WARN-NestedSub-install-component-stdout.txt | 4 ++++ .../CMP0082-WARN-NestedSub-install-stdout.txt | 3 +++ .../CMP0082-WARN-NestedSub-stderr.txt | 7 +++++++ .../add_subdirectory/CMP0082-WARN-NestedSub.cmake | 1 + ...-WARN-NoTopInstall-install-component-stdout.txt | 3 +++ .../CMP0082-WARN-NoTopInstall-install-stdout.txt | 2 ++ .../CMP0082-WARN-NoTopInstall.cmake | 1 + .../CMP0082-WARN-None-install-component-stdout.txt | 3 +++ .../CMP0082-WARN-None-install-stdout.txt | 2 ++ .../add_subdirectory/CMP0082-WARN-None.cmake | 2 ++ .../CMP0082-WARN-install-component-stdout.txt | 4 ++++ .../CMP0082-WARN-install-stdout.txt | 3 +++ .../add_subdirectory/CMP0082-WARN-stderr.txt | 7 +++++++ Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake | 3 +++ .../add_subdirectory/CMP0082/CMakeLists.txt | 1 + Tests/RunCMake/add_subdirectory/CMakeLists.txt | 7 +++++++ .../add_subdirectory/DoesNotExist-stderr.txt | 2 +- Tests/RunCMake/add_subdirectory/Missing-stderr.txt | 2 +- Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake | 22 ++++++++++++++++++++++ 35 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake create mode 100644 Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt new file mode 100644 index 0000000..1bd7f49 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"exclude\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt new file mode 100644 index 0000000..7d76ed9 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- sub +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt new file mode 100644 index 0000000..35b0bb5 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- sub +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake new file mode 100644 index 0000000..56c1b81 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake @@ -0,0 +1,3 @@ +add_subdirectory(CMP0082) +add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt new file mode 100644 index 0000000..8f26c24 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(sub) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt new file mode 100644 index 0000000..91a8936 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"sub\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt new file mode 100644 index 0000000..52a0665 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(sub) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt new file mode 100644 index 0000000..91a8936 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"sub\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt new file mode 100644 index 0000000..e69de29 diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake new file mode 100644 index 0000000..56c1b81 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake @@ -0,0 +1,3 @@ +add_subdirectory(CMP0082) +add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt new file mode 100644 index 0000000..3624c43 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) in CMakeLists\.txt: + Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are + interleaved with those in caller\. Run "cmake --help-policy CMP0082" for + policy details\. Use the cmake_policy command to set the policy and + suppress this warning\. + +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake new file mode 100644 index 0000000..df5688a --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake @@ -0,0 +1,2 @@ +add_subdirectory(CMP0082-Nested) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt new file mode 100644 index 0000000..9362905 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) in CMP0082-NestedSub/CMakeLists\.txt: + Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are + interleaved with those in caller\. Run "cmake --help-policy CMP0082" for + policy details\. Use the cmake_policy command to set the policy and + suppress this warning\. + +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake new file mode 100644 index 0000000..88a0856 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake @@ -0,0 +1 @@ +add_subdirectory(CMP0082-NestedSub) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt new file mode 100644 index 0000000..f7a331d --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt new file mode 100644 index 0000000..6f22ae2 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt @@ -0,0 +1,2 @@ +^-- Install configuration: "[^\n]*" +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake new file mode 100644 index 0000000..70bc9ed --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake @@ -0,0 +1 @@ +add_subdirectory(CMP0082) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt new file mode 100644 index 0000000..157ab37 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt new file mode 100644 index 0000000..9e15872 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt @@ -0,0 +1,2 @@ +^-- Install configuration: "[^\n]*" +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake new file mode 100644 index 0000000..670f89b --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake @@ -0,0 +1,2 @@ +add_subdirectory(CMP0082-None) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt new file mode 100644 index 0000000..3624c43 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) in CMakeLists\.txt: + Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are + interleaved with those in caller\. Run "cmake --help-policy CMP0082" for + policy details\. Use the cmake_policy command to set the policy and + suppress this warning\. + +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake new file mode 100644 index 0000000..56c1b81 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake @@ -0,0 +1,3 @@ +add_subdirectory(CMP0082) +add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt new file mode 100644 index 0000000..91a8936 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"sub\")") diff --git a/Tests/RunCMake/add_subdirectory/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMakeLists.txt index 18dfd26..47d249c 100644 --- a/Tests/RunCMake/add_subdirectory/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/CMakeLists.txt @@ -1,3 +1,10 @@ cmake_minimum_required(VERSION 3.2) + +# Have to set policy here due to policy scope +if(DEFINED CMP0082_VALUE) + cmake_policy(SET CMP0082 "${CMP0082_VALUE}") +endif() +set(CMAKE_POLICY_WARNING_CMP0082 ON) + project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt b/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt index 369a956..0130581 100644 --- a/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt @@ -2,4 +2,4 @@ add_subdirectory given source "DoesNotExist" which is not an existing directory. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_subdirectory/Missing-stderr.txt b/Tests/RunCMake/add_subdirectory/Missing-stderr.txt index aba0675..dd83140 100644 --- a/Tests/RunCMake/add_subdirectory/Missing-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/Missing-stderr.txt @@ -5,4 +5,4 @@ does not contain a CMakeLists.txt file. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake index 88b9283..343e65b 100644 --- a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake @@ -4,6 +4,28 @@ run_cmake(DoesNotExist) run_cmake(Missing) run_cmake(Function) +macro(run_cmake_install case) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS ${ARGN}) + + run_cmake(${case}) + run_cmake_command(${case}-install ${CMAKE_COMMAND} -P cmake_install.cmake) + run_cmake_command(${case}-install-component ${CMAKE_COMMAND} -DCOMPONENT=Unspecified -P cmake_install.cmake) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) +endmacro() + +run_cmake_install(CMP0082-WARN) +run_cmake_install(CMP0082-WARN-Nested) +run_cmake_install(CMP0082-WARN-NestedSub) +run_cmake_install(CMP0082-WARN-None) +run_cmake_install(CMP0082-WARN-NoTopInstall) +run_cmake_install(CMP0082-OLD -DCMP0082_VALUE=OLD) +run_cmake_install(CMP0082-NEW -DCMP0082_VALUE=NEW) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build) set(RunCMake_TEST_NO_CLEAN 1) -- cgit v0.12 From f9f96598df3164cf12b6da7764bc74361e3fa414 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 10 Oct 2018 10:55:40 -0400 Subject: Help: Convert FindOpenGL documentation to block comment --- Modules/FindOpenGL.cmake | 239 ++++++++++++++++++++++++----------------------- 1 file changed, 120 insertions(+), 119 deletions(-) diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 4d0786c..16c794b 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -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) -- cgit v0.12 From 0d988f98e531333b32d0f1628acf86f8baa22241 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Wed, 3 Oct 2018 09:36:58 -0400 Subject: cmake_policy: Add undocumented GET_WARNING command This command is intended for modules that issue policy warnings so they can get the warning string from CMake in a uniform manner, rather than duplicating the string. Several modules been updated to include an example of the usage of this new command. --- Modules/BundleUtilities.cmake | 7 ++--- Modules/FindOpenGL.cmake | 6 ++-- Modules/UseSWIG.cmake | 7 ++--- Source/cmCMakePolicyCommand.cxx | 33 ++++++++++++++++++++++ Source/cmCMakePolicyCommand.h | 1 + Source/cmPolicies.h | 2 +- .../BundleUtilities/CMP0080-WARN-stderr.txt | 11 ++++++-- Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt | 15 +++++----- 8 files changed, 57 insertions(+), 25 deletions(-) diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 31db25a..a7e80e7 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -230,11 +230,8 @@ if(DEFINED CMAKE_GENERATOR) if(_BundleUtilities_CMP0080 STREQUAL "NEW") message(FATAL_ERROR "BundleUtilities cannot be included at configure time!") elseif(NOT _BundleUtilities_CMP0080 STREQUAL "OLD") - 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") endif() endif() diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 16c794b..832dca2 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -268,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" diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake index f20a53b..edb8294 100644 --- a/Modules/UseSWIG.cmake +++ b/Modules/UseSWIG.cmake @@ -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) diff --git a/Source/cmCMakePolicyCommand.cxx b/Source/cmCMakePolicyCommand.cxx index adf9ef8..3209ea5 100644 --- a/Source/cmCMakePolicyCommand.cxx +++ b/Source/cmCMakePolicyCommand.cxx @@ -46,6 +46,9 @@ bool cmCMakePolicyCommand::InitialPass(std::vector 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 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; +} diff --git a/Source/cmCMakePolicyCommand.h b/Source/cmCMakePolicyCommand.h index b18576c..cca1406 100644 --- a/Source/cmCMakePolicyCommand.h +++ b/Source/cmCMakePolicyCommand.h @@ -37,6 +37,7 @@ private: bool HandleSetMode(std::vector const& args); bool HandleGetMode(std::vector const& args); bool HandleVersionMode(std::vector const& args); + bool HandleGetWarningMode(std::vector const& args); }; #endif diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index a367e47..551cba1 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -236,7 +236,7 @@ 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.", \ diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt index a1a0e8f..460bbae 100644 --- a/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt +++ b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt @@ -1,4 +1,9 @@ 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\): + CMP0080-WARN\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt index bc8da4c..f0ed577 100644 --- a/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt +++ b/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt @@ -1,9 +1,10 @@ -CMake Warning \(dev\) at .*/Modules/UseSWIG.cmake:[0-9]+ \(message\): - 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 Warning \(dev\) at .*/Modules/UseSWIG\.cmake:[0-9]+ \(message\): + Policy CMP0078 is not set: UseSWIG generates standard target names\. Run + "cmake --help-policy CMP0078" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. + Call Stack \(most recent call first\): - CMP0078-common.cmake:6 \(swig_add_library\) - CMP0078-WARN.cmake:1 \(include\) - CMakeLists.txt:3 \(include\) + CMP0078-common\.cmake:6 \(swig_add_library\) + CMP0078-WARN\.cmake:1 \(include\) + CMakeLists\.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ -- cgit v0.12 From 8563e29c81c23b758350ba1716ef3c6213b8c615 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Thu, 11 Oct 2018 00:01:09 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 6a2cb16..4d3e783 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181010) +set(CMake_VERSION_PATCH 20181011) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 3b80cd77fb3e1d0ee6a77a590830e7dc620df1a5 Mon Sep 17 00:00:00 2001 From: Harald Brinkmann Date: Tue, 9 Oct 2018 08:18:29 +0200 Subject: Fail the build if cppcheck returns a non-zero exit code This allows the build failure to be tuned with cppcheck's options --error-exitcode= and --exitcode-suppressions=. --- Help/prop_tgt/LANG_CPPCHECK.rst | 4 +++- Help/release/dev/cppcheck-exit-code.rst | 6 ++++++ Source/cmcmd.cxx | 10 +++++++--- Tests/RunCMake/Cppcheck/C-bad-Build-result.txt | 2 +- Tests/RunCMake/Cppcheck/C-error-Build-result.txt | 1 + Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt | 1 + Tests/RunCMake/Cppcheck/C-error.cmake | 3 +++ Tests/RunCMake/Cppcheck/RunCMakeTest.cmake | 1 + Tests/RunCMake/pseudo_cppcheck.c | 19 +++++++++++-------- 9 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 Help/release/dev/cppcheck-exit-code.rst create mode 100644 Tests/RunCMake/Cppcheck/C-error-Build-result.txt create mode 100644 Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt create mode 100644 Tests/RunCMake/Cppcheck/C-error.cmake diff --git a/Help/prop_tgt/LANG_CPPCHECK.rst b/Help/prop_tgt/LANG_CPPCHECK.rst index 5f8be00..16b0f48 100644 --- a/Help/prop_tgt/LANG_CPPCHECK.rst +++ b/Help/prop_tgt/LANG_CPPCHECK.rst @@ -6,7 +6,9 @@ This property is supported only when ```` is ``C`` or ``CXX``. Specify a :ref:`;-list ` 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__CPPCHECK` variable if it is set when a target is diff --git a/Help/release/dev/cppcheck-exit-code.rst b/Help/release/dev/cppcheck-exit-code.rst new file mode 100644 index 0000000..d66c762 --- /dev/null +++ b/Help/release/dev/cppcheck-exit-code.rst @@ -0,0 +1,6 @@ +cppcheck-exit-code +------------------ + +* When using cppcheck via the :variable:`CMAKE__CPPCHECK` variable + or :prop_tgt:`_CPPCHECK` property, the build will now fail if + ``cppcheck`` returns non-zero as configured by its command-line options. diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 1d2f741..e2225ff 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -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&, diff --git a/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt b/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt index 573541a..d197c91 100644 --- a/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt +++ b/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt @@ -1 +1 @@ -0 +[^0] diff --git a/Tests/RunCMake/Cppcheck/C-error-Build-result.txt b/Tests/RunCMake/Cppcheck/C-error-Build-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/Cppcheck/C-error-Build-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt b/Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt new file mode 100644 index 0000000..4a24c0c --- /dev/null +++ b/Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt @@ -0,0 +1 @@ +.*Error: cppcheck reported failure.*error.*warning.*style.*performance.*information.* diff --git a/Tests/RunCMake/Cppcheck/C-error.cmake b/Tests/RunCMake/Cppcheck/C-error.cmake new file mode 100644 index 0000000..2254d75 --- /dev/null +++ b/Tests/RunCMake/Cppcheck/C-error.cmake @@ -0,0 +1,3 @@ +enable_language(C) +set(CMAKE_C_CPPCHECK "${PSEUDO_CPPCHECK}" -error) +add_executable(main main.c) diff --git a/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake b/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake index 5fd4ead..e395f36 100644 --- a/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake +++ b/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake @@ -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") diff --git a/Tests/RunCMake/pseudo_cppcheck.c b/Tests/RunCMake/pseudo_cppcheck.c index 75f3cec..5b1531b 100644 --- a/Tests/RunCMake/pseudo_cppcheck.c +++ b/Tests/RunCMake/pseudo_cppcheck.c @@ -5,13 +5,16 @@ int main(int argc, char* argv[]) { int i; + int result = 0; for (i = 1; i < argc; ++i) { - if (strcmp(argv[i], "-bad") == 0) - if (strcmp(argv[i], "-bad") == 0) { - fprintf(stdout, "stdout from bad command line arg '-bad'\n"); - fprintf(stderr, "stderr from bad command line arg '-bad'\n"); - return 1; - } + if (strcmp(argv[i], "-bad") == 0) { + fprintf(stdout, "stdout from bad command line arg '-bad'\n"); + fprintf(stderr, "stderr from bad command line arg '-bad'\n"); + return 1; + } else if (strcmp(argv[i], "-error") == 0) { + // The real cppcheck allows to set the exitcode with --error-exitcode + result = 5; + } } fprintf(stderr, "[/foo/bar.c:2]: (error) Array 'abc[10]' accessed at index 12," @@ -31,6 +34,6 @@ int main(int argc, char* argv[]) fprintf(stderr, "[/foo/bar.c:2]: (information) cannot find all the include " "files (use --check-config for details)\n"); - // we allow this to return 1 as we ignore it - return 1; + + return result; } -- cgit v0.12 From f76047f34a960272ca29518551fb23504c61ee7e Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 27 Sep 2018 09:41:02 +0200 Subject: FindLibinput: Add module to find libinput This module is inspired by one from KDE's KWin. --- Copyright.txt | 2 + Help/manual/cmake-modules.7.rst | 1 + Help/module/FindLibinput.rst | 1 + Help/release/dev/find_libinput.rst | 6 +++ Modules/FindLibinput.cmake | 83 ++++++++++++++++++++++++++++++++++ Tests/CMakeLists.txt | 4 ++ Tests/FindLibinput/CMakeLists.txt | 10 ++++ Tests/FindLibinput/Test/CMakeLists.txt | 14 ++++++ Tests/FindLibinput/Test/main.c | 13 ++++++ 9 files changed, 134 insertions(+) create mode 100644 Help/module/FindLibinput.rst create mode 100644 Help/release/dev/find_libinput.rst create mode 100644 Modules/FindLibinput.cmake create mode 100644 Tests/FindLibinput/CMakeLists.txt create mode 100644 Tests/FindLibinput/Test/CMakeLists.txt create mode 100644 Tests/FindLibinput/Test/main.c diff --git a/Copyright.txt b/Copyright.txt index 743c634..0b0fbf1 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -39,6 +39,7 @@ The following individuals and institutions are among the Contributors: * Alexander Neundorf * Alexander Smorkalov * Alexey Sokolov +* Alex Merry * Alex Turbov * Andreas Pakulat * Andreas Schneider @@ -65,6 +66,7 @@ The following individuals and institutions are among the Contributors: * Kelly Thompson * Konstantin Podsvirov * Mario Bensi +* Martin Gräßlin * Mathieu Malaterre * Matthaeus G. Chajdas * Matthias Kretz diff --git a/Help/manual/cmake-modules.7.rst b/Help/manual/cmake-modules.7.rst index af8e33f..f9b4afb 100644 --- a/Help/manual/cmake-modules.7.rst +++ b/Help/manual/cmake-modules.7.rst @@ -165,6 +165,7 @@ They are normally called through the :command:`find_package` command. /module/FindLAPACK /module/FindLATEX /module/FindLibArchive + /module/FindLibinput /module/FindLibLZMA /module/FindLibXml2 /module/FindLibXslt diff --git a/Help/module/FindLibinput.rst b/Help/module/FindLibinput.rst new file mode 100644 index 0000000..a8ca0b0 --- /dev/null +++ b/Help/module/FindLibinput.rst @@ -0,0 +1 @@ +.. cmake-module:: ../../Modules/FindLibinput.cmake diff --git a/Help/release/dev/find_libinput.rst b/Help/release/dev/find_libinput.rst new file mode 100644 index 0000000..ebb9e7a --- /dev/null +++ b/Help/release/dev/find_libinput.rst @@ -0,0 +1,6 @@ +find_libinput +------------- + +* The :module:`FindLibinput` module was added to find `libinput`_. + +.. _`libinput`: https://www.freedesktop.org/wiki/Software/libinput/ diff --git a/Modules/FindLibinput.cmake b/Modules/FindLibinput.cmake new file mode 100644 index 0000000..df66cff --- /dev/null +++ b/Modules/FindLibinput.cmake @@ -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_DEFINITIONS`` + 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_DEFINITIONS ${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_DEFINITIONS}" + 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() diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 0de6c41..9e192be 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -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() diff --git a/Tests/FindLibinput/CMakeLists.txt b/Tests/FindLibinput/CMakeLists.txt new file mode 100644 index 0000000..8538a55 --- /dev/null +++ b/Tests/FindLibinput/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindLibinput.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $ + --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 $ + ) diff --git a/Tests/FindLibinput/Test/CMakeLists.txt b/Tests/FindLibinput/Test/CMakeLists.txt new file mode 100644 index 0000000..1cc68d4 --- /dev/null +++ b/Tests/FindLibinput/Test/CMakeLists.txt @@ -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) diff --git a/Tests/FindLibinput/Test/main.c b/Tests/FindLibinput/Test/main.c new file mode 100644 index 0000000..3919962 --- /dev/null +++ b/Tests/FindLibinput/Test/main.c @@ -0,0 +1,13 @@ +#include +#include + +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; +} -- cgit v0.12 From bf572ac952d7ddf2b7208efc56f104844aea72e2 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 11 Oct 2018 17:22:45 -0400 Subject: cmListCommand: check list(FILTER) operation before the list A future commit will make the not-a-list case a success, but invalid operations should still be diagnosed in that case. --- Source/cmListCommand.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index d7de2fa..b9c7ada 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -1289,14 +1289,6 @@ bool cmListCommand::HandleFilterCommand(std::vector const& args) return false; } - const std::string& listName = args[1]; - // expand the variable - std::vector 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 +1300,14 @@ bool cmListCommand::HandleFilterCommand(std::vector const& args) return false; } + const std::string& listName = args[1]; + // expand the variable + std::vector varArgsExpanded; + if (!this->GetList(varArgsExpanded, listName)) { + this->SetError("sub-command FILTER requires list to be present."); + return false; + } + const std::string& mode = args[3]; if (mode == "REGEX") { if (args.size() != 5) { -- cgit v0.12 From aeb24db55400b16c9d53d10b50cdb4668ba93e5f Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Fri, 12 Oct 2018 00:01:08 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4d3e783..1bc2632 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181011) +set(CMake_VERSION_PATCH 20181012) #set(CMake_VERSION_RC 1) -- cgit v0.12 From fd71ad37152d2d3b843fc491abb2202e155c0114 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Sat, 13 Oct 2018 00:01:08 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 1bc2632..43b81a8 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181012) +set(CMake_VERSION_PATCH 20181013) #set(CMake_VERSION_RC 1) -- cgit v0.12 From f77a9576e542f7f0b2d32096a65fd232a1fd089e Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Sun, 14 Oct 2018 00:01:05 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 43b81a8..77419ff 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181013) +set(CMake_VERSION_PATCH 20181014) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 1601388212e633d5e83d788cf6e52fd7c99e4883 Mon Sep 17 00:00:00 2001 From: Vitaly Stakhovsky Date: Sun, 14 Oct 2018 18:32:53 -0400 Subject: cmVisualStudio10TargetGenerator: Code improvement Disallow incompletely initialized Elem objects --- Source/cmVisualStudio10TargetGenerator.cxx | 75 ++++++++++++------------------ Source/cmVisualStudio10TargetGenerator.h | 2 +- 2 files changed, 31 insertions(+), 46 deletions(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2d39cbb..9b96f56 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -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 tag to written XAML source if necessary @@ -1275,15 +1264,15 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule( std::unique_ptr spe2; if (this->ProjectType != csproj) { spe1 = cm::make_unique(e0, "ItemGroup"); - spe2 = cm::make_unique(*spe1); - this->WriteSource(*spe2, "CustomBuild", source); + spe2 = cm::make_unique(*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); } @@ -3882,15 +3868,13 @@ void cmVisualStudio10TargetGenerator::WriteSinglePlatformExtension( void cmVisualStudio10TargetGenerator::WriteSDKReferences(Elem& e0) { std::vector sdkReferences; - Elem e1(e0); - bool hasWrittenItemGroup = false; + std::unique_ptr spe1; if (const char* vsSDKReferences = this->GeneratorTarget->GetProperty("VS_SDK_REFERENCES")) { cmSystemTools::ExpandListArgument(vsSDKReferences, sdkReferences); - e1.StartElement("ItemGroup"); - hasWrittenItemGroup = true; + spe1 = cm::make_unique(e0, "ItemGroup"); for (std::string const& ri : sdkReferences) { - Elem(e1, "SDKReference").Attribute("Include", ri); + Elem(*spe1, "SDKReference").Attribute("Include", ri); } } @@ -3906,19 +3890,20 @@ void cmVisualStudio10TargetGenerator::WriteSDKReferences(Elem& e0) if (desktopExtensionsVersion || mobileExtensionsVersion || iotExtensionsVersion) { - if (!hasWrittenItemGroup) { - e1.StartElement("ItemGroup"); + if (!spe1) { + spe1 = cm::make_unique(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); } } } diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index 0dc03b6..b17b5f8 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -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 const& exclude_configs); void WriteAllSources(Elem& e0); -- cgit v0.12 From d543eb2260fff6c49ab6e5066d376c502e91bf9f Mon Sep 17 00:00:00 2001 From: Vitaly Stakhovsky Date: Sun, 14 Oct 2018 19:26:25 -0400 Subject: cmCustomCommand: remove the default constructor Unused; no longer mandated by STL --- Source/cmCustomCommand.cxx | 10 ---------- Source/cmCustomCommand.h | 13 +++++-------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index cfd260c..e87eb1e 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -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& outputs, const std::vector& byproducts, diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index 9e82f25..d82160b 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -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& 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 -- cgit v0.12 From 6c281138a577ccf07ae71b1286df30a3d22746e0 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Mon, 15 Oct 2018 00:01:05 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 77419ff..ce35d02 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181014) +set(CMake_VERSION_PATCH 20181015) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 60ca88d7261da8ad77e68d8f82ae67099af70df0 Mon Sep 17 00:00:00 2001 From: Zack Galbreath Date: Thu, 11 Oct 2018 13:48:53 -0400 Subject: ctest_submit: Generate Done.xml at submit time This fixes a bug where calling `ctest_submit()` would result in a Done.xml file with an empty element. CDash responds with a buildId when CTest submits a file. For this reason, Done.xml needs to generated after CTest has submitted some other file to CDash. This change also has the benefit of making Done.xml's timestamp as late as possible, giving us a more accurate record of how long the entire build took to complete. --- Source/CTest/cmCTestSubmitHandler.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 6ad0e03..98872a5 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -467,6 +467,17 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP( 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); @@ -1420,7 +1431,6 @@ int cmCTestSubmitHandler::ProcessHandler() // Submit Done.xml last if (this->SubmitPart[cmCTest::PartDone]) { - this->CTest->GenerateDoneFile(); files.push_back("Done.xml"); } -- cgit v0.12 From 92f3ad7caebe6922a6b682cbb8c8d687cbfc8256 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Tue, 16 Oct 2018 00:01:11 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index ce35d02..3fe3549 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181015) +set(CMake_VERSION_PATCH 20181016) #set(CMake_VERSION_RC 1) -- cgit v0.12 From f7d92deff487810f21b4f7979a5fe1892fabd255 Mon Sep 17 00:00:00 2001 From: Joseph Snyder Date: Mon, 15 Oct 2018 13:57:42 +0000 Subject: CTest: Fix GTM coverage handling of entry point named "%" Removing the "%" character from the name of the routine in the line parser causes CTest to be unable to find a routine entry point that is only named "%". Instead leave it during line parsing and handle routine names ending in "%" explicitly when loading files. --- Source/CTest/cmParseGTMCoverage.cxx | 9 +++- Tests/CMakeLists.txt | 4 +- .../VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m | 3 ++ Tests/MumpsCoverage/ZZCOVTST.cmcov | 63 +++++++++++----------- Tests/MumpsCoverage/ZZCOVTST.mcov | 3 ++ 5 files changed, 48 insertions(+), 34 deletions(-) diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx index 83dde3f..0722753 100644 --- a/Source/CTest/cmParseGTMCoverage.cxx +++ b/Source/CTest/cmParseGTMCoverage.cxx @@ -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]); } } diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 9e192be..2b2ac95 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -2669,7 +2669,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release $ -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( @@ -2687,7 +2687,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release $ -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 diff --git a/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m b/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m index ee70682..5567c4e 100644 --- a/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m +++ b/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m @@ -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 diff --git a/Tests/MumpsCoverage/ZZCOVTST.cmcov b/Tests/MumpsCoverage/ZZCOVTST.cmcov index aec9336..12f2aa6 100644 --- a/Tests/MumpsCoverage/ZZCOVTST.cmcov +++ b/Tests/MumpsCoverage/ZZCOVTST.cmcov @@ -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, diff --git a/Tests/MumpsCoverage/ZZCOVTST.mcov b/Tests/MumpsCoverage/ZZCOVTST.mcov index b2608d9..e1fa18c 100644 --- a/Tests/MumpsCoverage/ZZCOVTST.mcov +++ b/Tests/MumpsCoverage/ZZCOVTST.mcov @@ -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" -- cgit v0.12 From 0c20d4d67b1f5da52da283f4237fb85a29385acd Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 16 Oct 2018 15:56:09 +0200 Subject: FindLibinput: Use _COMPILE_OPTIONS instead of _DEFINITIONS The value may contain flags. --- Modules/FindLibinput.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/FindLibinput.cmake b/Modules/FindLibinput.cmake index df66cff..1057c91 100644 --- a/Modules/FindLibinput.cmake +++ b/Modules/FindLibinput.cmake @@ -26,7 +26,7 @@ This will define the following variables in your project: the libraries to link against to use libinput. ``Libinput_INCLUDE_DIRS`` where to find the libinput headers. -``Libinput_DEFINITIONS`` +``Libinput_COMPILE_OPTIONS`` this should be passed to target_compile_options(), if the target is not used for linking @@ -38,7 +38,7 @@ This will define the following variables in your project: find_package(PkgConfig QUIET) pkg_check_modules(PKG_Libinput QUIET libinput) -set(Libinput_DEFINITIONS ${PKG_Libinput_CFLAGS_OTHER}) +set(Libinput_COMPILE_OPTIONS ${PKG_Libinput_CFLAGS_OTHER}) set(Libinput_VERSION ${PKG_Libinput_VERSION}) find_path(Libinput_INCLUDE_DIR @@ -69,7 +69,7 @@ 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_DEFINITIONS}" + INTERFACE_COMPILE_OPTIONS "${Libinput_COMPILE_OPTIONS}" INTERFACE_INCLUDE_DIRECTORIES "${Libinput_INCLUDE_DIR}" ) endif() -- cgit v0.12 From b8bb6ba653df9d53d93824bb7185bf022e9bf2ef Mon Sep 17 00:00:00 2001 From: Vitaly Stakhovsky Date: Sun, 14 Oct 2018 19:00:34 -0400 Subject: cmGeneratorTarget::GetExportMacro: return const std::string* --- Source/cmGeneratorTarget.cxx | 4 ++-- Source/cmGeneratorTarget.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 4 ++-- Source/cmLocalGenerator.cxx | 4 ++-- Source/cmLocalVisualStudio7Generator.cxx | 4 ++-- Source/cmVisualStudio10TargetGenerator.cxx | 10 ++++++---- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 80fb621..ea283c6 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -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; } diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index b1daa53..98669c3 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -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; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e353a37..596bc6b 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -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 targetDefines; if (!langForPreprocessor.empty()) { diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 229f884..941d787 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1253,8 +1253,8 @@ void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target, std::set& 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. diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 8428672..1da077e 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -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 diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 2d39cbb..44ec899 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2580,8 +2580,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 +2878,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 -- cgit v0.12 From acfe53c58817c662b935fbe0f0443de298371731 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 11 Oct 2018 17:23:12 -0400 Subject: cmListCommand: make list(ACTION not_a_list) succeed when idempotent The operations changed here all are no-ops on empty lists anyways, so just have them succeed when given non-extant lists. - `list(REMOVE_ITEM)` - `list(REMOVE_DUPLICATES)` - `list(SORT)` - `list(FILTER)` - `list(REVERSE)` --- Help/release/dev/better-empty-list-behavior.rst | 6 ++++++ Source/cmListCommand.cxx | 16 +++++----------- Tests/RunCMake/list/FILTER-NotList-result.txt | 1 - Tests/RunCMake/list/FILTER-NotList-stderr.txt | 4 ---- Tests/RunCMake/list/FILTER-NotList.cmake | 4 ++++ Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt | 1 - Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt | 4 ---- Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake | 4 ++++ Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt | 1 - Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt | 4 ---- Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake | 4 ++++ Tests/RunCMake/list/REVERSE-NotList-result.txt | 1 - Tests/RunCMake/list/REVERSE-NotList-stderr.txt | 4 ---- Tests/RunCMake/list/REVERSE-NotList.cmake | 4 ++++ Tests/RunCMake/list/SORT-NotList-result.txt | 1 - Tests/RunCMake/list/SORT-NotList-stderr.txt | 4 ---- Tests/RunCMake/list/SORT-NotList.cmake | 4 ++++ 17 files changed, 31 insertions(+), 36 deletions(-) create mode 100644 Help/release/dev/better-empty-list-behavior.rst delete mode 100644 Tests/RunCMake/list/FILTER-NotList-result.txt delete mode 100644 Tests/RunCMake/list/FILTER-NotList-stderr.txt delete mode 100644 Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt delete mode 100644 Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt delete mode 100644 Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt delete mode 100644 Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt delete mode 100644 Tests/RunCMake/list/REVERSE-NotList-result.txt delete mode 100644 Tests/RunCMake/list/REVERSE-NotList-stderr.txt delete mode 100644 Tests/RunCMake/list/SORT-NotList-result.txt delete mode 100644 Tests/RunCMake/list/SORT-NotList-stderr.txt diff --git a/Help/release/dev/better-empty-list-behavior.rst b/Help/release/dev/better-empty-list-behavior.rst new file mode 100644 index 0000000..12a131f --- /dev/null +++ b/Help/release/dev/better-empty-list-behavior.rst @@ -0,0 +1,6 @@ +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. diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index b9c7ada..b46eb6d 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -346,8 +346,7 @@ bool cmListCommand::HandleRemoveItemCommand( // expand the variable std::vector varArgsExpanded; if (!this->GetList(varArgsExpanded, listName)) { - this->SetError("sub-command REMOVE_ITEM requires list to be present."); - return false; + return true; } std::vector remove(args.begin() + 2, args.end()); @@ -376,8 +375,7 @@ bool cmListCommand::HandleReverseCommand(std::vector const& args) // expand the variable std::vector 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 varArgsExpanded; if (!this->GetList(varArgsExpanded, listName)) { - this->SetError( - "sub-command REMOVE_DUPLICATES requires list to be present."); - return false; + return true; } std::vector::const_iterator argsEnd = @@ -1152,8 +1148,7 @@ bool cmListCommand::HandleSortCommand(std::vector const& args) // expand the variable std::vector 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) && @@ -1304,8 +1299,7 @@ bool cmListCommand::HandleFilterCommand(std::vector const& args) // expand the variable std::vector varArgsExpanded; if (!this->GetList(varArgsExpanded, listName)) { - this->SetError("sub-command FILTER requires list to be present."); - return false; + return true; } const std::string& mode = args[3]; diff --git a/Tests/RunCMake/list/FILTER-NotList-result.txt b/Tests/RunCMake/list/FILTER-NotList-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/list/FILTER-NotList-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/list/FILTER-NotList-stderr.txt b/Tests/RunCMake/list/FILTER-NotList-stderr.txt deleted file mode 100644 index 159c28d..0000000 --- a/Tests/RunCMake/list/FILTER-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at FILTER-NotList.cmake:2 \(list\): - list sub-command FILTER requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/FILTER-NotList.cmake b/Tests/RunCMake/list/FILTER-NotList.cmake index 1e15635..bf09ec7 100644 --- a/Tests/RunCMake/list/FILTER-NotList.cmake +++ b/Tests/RunCMake/list/FILTER-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(FILTER nosuchlist EXCLUDE REGEX "^FILTER_THIS_.+") +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(FILTER) created our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt deleted file mode 100644 index 96f3446..0000000 --- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at REMOVE_DUPLICATES-NotList.cmake:2 \(list\): - list sub-command REMOVE_DUPLICATES requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake index 218f227..b9f3999 100644 --- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REMOVE_DUPLICATES nosuchlist) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REMOVE_DUPLICATES) created our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt b/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt deleted file mode 100644 index c32a4c0..0000000 --- a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at REMOVE_ITEM-NotList.cmake:2 \(list\): - list sub-command REMOVE_ITEM requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake index 079e7fb..0c66837 100644 --- a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake +++ b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REMOVE_ITEM nosuchlist alpha) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REMOVE_ITEM) created our list") +endif () diff --git a/Tests/RunCMake/list/REVERSE-NotList-result.txt b/Tests/RunCMake/list/REVERSE-NotList-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/list/REVERSE-NotList-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt b/Tests/RunCMake/list/REVERSE-NotList-stderr.txt deleted file mode 100644 index e9dcc06..0000000 --- a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at REVERSE-NotList.cmake:2 \(list\): - list sub-command REVERSE requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REVERSE-NotList.cmake b/Tests/RunCMake/list/REVERSE-NotList.cmake index 977e2cc..7138329 100644 --- a/Tests/RunCMake/list/REVERSE-NotList.cmake +++ b/Tests/RunCMake/list/REVERSE-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REVERSE nosuchlist) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REVERSE) created our list") +endif () diff --git a/Tests/RunCMake/list/SORT-NotList-result.txt b/Tests/RunCMake/list/SORT-NotList-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/list/SORT-NotList-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/list/SORT-NotList-stderr.txt b/Tests/RunCMake/list/SORT-NotList-stderr.txt deleted file mode 100644 index 396c5b5..0000000 --- a/Tests/RunCMake/list/SORT-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at SORT-NotList.cmake:2 \(list\): - list sub-command SORT requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/SORT-NotList.cmake b/Tests/RunCMake/list/SORT-NotList.cmake index 8f48e10..6314f14 100644 --- a/Tests/RunCMake/list/SORT-NotList.cmake +++ b/Tests/RunCMake/list/SORT-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(SORT nosuchlist) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(SORT) created our list") +endif () -- cgit v0.12 From 121a036f73665a18ccadeaf50b00cc623d8ed9df Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 11 Oct 2018 17:26:44 -0400 Subject: cmListCommand: handle empty lists for list(REMOVE_AT) Treat an empty list as a list with no valid bounds and return an error message indicating that any given indices are out-of-bounds. --- Help/release/dev/better-empty-list-behavior.rst | 3 +++ Source/cmListCommand.cxx | 18 +++++++++++------- Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt | 2 +- Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt | 1 + Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt | 4 ++++ Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake | 6 ++++++ Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt | 2 +- Tests/RunCMake/list/REMOVE_AT-NotList.cmake | 4 ++++ Tests/RunCMake/list/RunCMakeTest.cmake | 2 ++ 9 files changed, 33 insertions(+), 9 deletions(-) create mode 100644 Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt create mode 100644 Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt create mode 100644 Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake diff --git a/Help/release/dev/better-empty-list-behavior.rst b/Help/release/dev/better-empty-list-behavior.rst index 12a131f..cd864f4 100644 --- a/Help/release/dev/better-empty-list-behavior.rst +++ b/Help/release/dev/better-empty-list-behavior.rst @@ -4,3 +4,6 @@ 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. diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index b46eb6d..b2acb90 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -1225,13 +1225,17 @@ bool cmListCommand::HandleRemoveAtCommand(std::vector const& args) const std::string& listName = args[1]; // expand the variable std::vector 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; } diff --git a/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt b/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt index b24a0ed..9368e88 100644 --- a/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt +++ b/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt @@ -1,4 +1,4 @@ CMake Error at EmptyRemoveAt0.cmake:2 \(list\): - list REMOVE_AT given empty list + list index: mylist, 0 out of range \(0, 0\) Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt b/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt b/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt new file mode 100644 index 0000000..582b74b --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_AT-EmptyList.cmake:2 \(list\): + list index: nosuchlist, 0 out of range \(0, 0\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake b/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake new file mode 100644 index 0000000..ff0dde8 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake @@ -0,0 +1,6 @@ +set(nosuchlist "") +list(REMOVE_AT nosuchlist 0) +if (NOT DEFINED nosuchlist OR NOT nosuchlist STREQUAL "") + message(FATAL_ERROR + "list(REMOVE_AT) modified our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt index d6e8d85..563d865 100644 --- a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt +++ b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at REMOVE_AT-NotList.cmake:2 \(list\): - list sub-command REMOVE_AT requires list to be present. + list index: nosuchlist, 0 out of range \(0, 0\) Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake index 5266c7f..090df49 100644 --- a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake +++ b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REMOVE_AT nosuchlist 0) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REMOVE_AT) created our list") +endif () diff --git a/Tests/RunCMake/list/RunCMakeTest.cmake b/Tests/RunCMake/list/RunCMakeTest.cmake index a8a0b57..bf3d22d 100644 --- a/Tests/RunCMake/list/RunCMakeTest.cmake +++ b/Tests/RunCMake/list/RunCMakeTest.cmake @@ -22,6 +22,8 @@ run_cmake(REMOVE_DUPLICATES-TooManyArguments) run_cmake(REVERSE-TooManyArguments) run_cmake(SUBLIST-TooManyArguments) +run_cmake(REMOVE_AT-EmptyList) + run_cmake(FILTER-NotList) run_cmake(REMOVE_AT-NotList) run_cmake(REMOVE_DUPLICATES-NotList) -- cgit v0.12 From 88ef5737a25b40ce738041b8f9e00df20a131eb6 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Wed, 17 Oct 2018 00:01:08 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 3fe3549..afd6f42 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181016) +set(CMake_VERSION_PATCH 20181017) #set(CMake_VERSION_RC 1) -- cgit v0.12 From 33632898e9a831931fdb96089a244f53cdc37caf Mon Sep 17 00:00:00 2001 From: David Demelier Date: Wed, 17 Oct 2018 10:53:03 +0200 Subject: README: Suggest "sudo" for "make install" --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1e8561a..775463e 100644 --- a/README.rst +++ b/README.rst @@ -62,7 +62,7 @@ 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 ^^^^^^^ -- cgit v0.12 From aab69ccd9b20a7560d2c656bc1a53a4afa587240 Mon Sep 17 00:00:00 2001 From: Kitware Robot Date: Thu, 18 Oct 2018 00:01:07 -0400 Subject: CMake Nightly Date Stamp --- Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index afd6f42..beafab2 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181017) +set(CMake_VERSION_PATCH 20181018) #set(CMake_VERSION_RC 1) -- cgit v0.12