diff options
127 files changed, 1068 insertions, 576 deletions
diff --git a/.clang-tidy b/.clang-tidy index 8d79b0c..0ba4b0b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,5 +1,8 @@ --- Checks: "-*,\ +bugprone-*,\ +-bugprone-macro-parentheses,\ +-bugprone-misplaced-widening-cast,\ google-readability-casting,\ misc-*,\ -misc-incorrect-roundings,\ @@ -21,15 +24,18 @@ modernize-*,\ -modernize-use-using,\ performance-*,\ -performance-inefficient-string-concatenation,\ +-performance-inefficient-vector-operation,\ readability-*,\ -readability-function-size,\ -readability-identifier-naming,\ -readability-implicit-bool-cast,\ +-readability-implicit-bool-conversion,\ -readability-inconsistent-declaration-parameter-name,\ -readability-named-parameter,\ -readability-redundant-declaration,\ -readability-redundant-member-init,\ -readability-simplify-boolean-expr,\ +-readability-static-accessed-through-instance,\ " HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$' ... diff --git a/Help/command/ctest_build.rst b/Help/command/ctest_build.rst index 55bb4a3..66e1844 100644 --- a/Help/command/ctest_build.rst +++ b/Help/command/ctest_build.rst @@ -50,9 +50,7 @@ The options are: for an example. ``PROJECT_NAME <project-name>`` - Set the name of the project to build. This should correspond - to the top-level call to the :command:`project` command. - If not specified the ``CTEST_PROJECT_NAME`` variable will be checked. + Ignored. This was once used but is no longer needed. ``TARGET <target-name>`` Specify the name of a target to build. If not specified the diff --git a/Help/dev/documentation.rst b/Help/dev/documentation.rst index 1b2c942..c302790 100644 --- a/Help/dev/documentation.rst +++ b/Help/dev/documentation.rst @@ -458,32 +458,22 @@ reStructuredText markup from comment blocks that start in ``.rst:``. At the top of ``Modules/<module-name>.cmake``, begin with the following license notice: -.. code-block:: cmake +:: # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. After this notice, add a *BLANK* line. Then, add documentation using -a `Line Comment`_ block of the form: - -.. code-block:: cmake - - #.rst: - # <module-name> - # ------------- - # - # <reStructuredText documentation of module> - -or a `Bracket Comment`_ of the form: +a `Bracket Comment`_ of the form: :: - #[[.rst: - <module-name> - ------------- + #[=======================================================================[.rst: + <module-name> + ------------- - <reStructuredText documentation of module> - #]] + <reStructuredText documentation of module> + #]=======================================================================] Any number of ``=`` may be used in the opening and closing brackets as long as they match. Content on the line containing the closing @@ -496,35 +486,38 @@ For example, a ``Findxxx.cmake`` module may contain: :: - # Distributed under the OSI-approved BSD 3-Clause License. See accompanying - # file Copyright.txt or https://cmake.org/licensing for details. + # Distributed under the OSI-approved BSD 3-Clause License. See accompanying + # file Copyright.txt or https://cmake.org/licensing for details. + + #[=======================================================================[.rst: + FindXxx + ------- + + This is a cool module. + This module does really cool stuff. + It can do even more than you think. + + It even needs two paragraphs to tell you about it. + And it defines the following variables: + + ``VAR_COOL`` + this is great isn't it? + ``VAR_REALLY_COOL`` + cool right? + #]=======================================================================] + + <code> + + #[=======================================================================[.rst: + .. command:: xxx_do_something + + This command does something for Xxx:: - #.rst: - # FindXxx - # ------- - # - # This is a cool module. - # This module does really cool stuff. - # It can do even more than you think. - # - # It even needs two paragraphs to tell you about it. - # And it defines the following variables: - # - # * VAR_COOL: this is great isn't it? - # * VAR_REALLY_COOL: cool right? - - <code> - - #[========================================[.rst: - .. command:: xxx_do_something - - This command does something for Xxx:: - - xxx_do_something(some arguments) - #]========================================] - macro(xxx_do_something) - <code> - endmacro() + xxx_do_something(some arguments) + #]=======================================================================] + macro(xxx_do_something) + <code> + endmacro() Test the documentation formatting by running ``cmake --help-module <module-name>``, and also by enabling the @@ -534,5 +527,4 @@ have a .cmake file in this directory NOT show up in the modules documentation, simply leave out the ``Help/module/<module-name>.rst`` file and the ``Help/manual/cmake-modules.7.rst`` toctree entry. -.. _`Line Comment`: https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#line-comment .. _`Bracket Comment`: https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#bracket-comment diff --git a/Help/manual/ccmake.1.rst b/Help/manual/ccmake.1.rst index cc3ceec..9548471 100644 --- a/Help/manual/ccmake.1.rst +++ b/Help/manual/ccmake.1.rst @@ -13,7 +13,7 @@ Synopsis Description =========== -The "ccmake" executable is the CMake curses interface. Project +The **ccmake** executable is the CMake curses interface. Project configuration settings may be specified interactively through this GUI. Brief instructions are provided at the bottom of the terminal when the program is running. diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index b949464..85ed935 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -196,49 +196,78 @@ them. A Sample Find Module -------------------- -We will describe how to create a simple find module for a library -``Foo``. +We will describe how to create a simple find module for a library ``Foo``. -The first thing that is needed is a license notice. +The top of the module should begin with a license notice, followed by +a blank line, and then followed by a :ref:`Bracket Comment`. The comment +should begin with ``.rst:`` to indicate that the rest of its content is +reStructuredText-format documentation. For example: -.. code-block:: cmake +:: - # Distributed under the OSI-approved BSD 3-Clause License. See accompanying - # file Copyright.txt or https://cmake.org/licensing for details. + # Distributed under the OSI-approved BSD 3-Clause License. See accompanying + # file Copyright.txt or https://cmake.org/licensing for details. -Next we need module documentation. CMake's documentation system requires you -to follow the license notice with a blank line and then with a documentation -marker and the name of the module. You should follow this with a simple -statement of what the module does. + #[=======================================================================[.rst: + FindFoo + ------- -.. code-block:: cmake + Finds the Foo library. - #.rst: - # FindFoo - # ------- - # - # Finds the Foo library - # + Imported Targets + ^^^^^^^^^^^^^^^^ -More description may be required for some packages. If there are -caveats or other details users of the module should be aware of, you can -add further paragraphs below this. Then you need to document what -variables and imported targets are set by the module, such as + This module provides the following imported targets, if found: -.. code-block:: cmake + ``Foo::Foo`` + The Foo library + + Result Variables + ^^^^^^^^^^^^^^^^ + + This will define the following variables: + + ``Foo_FOUND`` + True if the system has the Foo library. + ``Foo_VERSION`` + The version of the Foo library which was found. + ``Foo_INCLUDE_DIRS`` + Include directories needed to use Foo. + ``Foo_LIBRARIES`` + Libraries needed to link to Foo. + + Cache Variables + ^^^^^^^^^^^^^^^ + + The following cache variables may also be set: + + ``Foo_INCLUDE_DIR`` + The directory containing ``foo.h``. + ``Foo_LIBRARY`` + The path to the Foo library. + + #]=======================================================================] + +The module documentation consists of: + +* An underlined heading specifying the module name. + +* A simple description of what the module finds. + More description may be required for some packages. If there are + caveats or other details users of the module should be aware of, + specify them here. + +* A section listing imported targets provided by the module, if any. + +* A section listing result variables provided by the module. - # This will define the following variables:: - # - # Foo_FOUND - True if the system has the Foo library - # Foo_VERSION - The version of the Foo library which was found - # - # and the following imported targets:: - # - # Foo::Foo - The Foo library +* Optionally a section listing cache variables used by the module, if any. -If the package provides any macros, they should be listed here, but can -be documented where they are defined. +If the package provides any macros or functions, they should be listed in +an additional section, but can be documented by additional ``.rst:`` +comment blocks immediately above where those macros or functions are defined. +The find module implementation may begin below the documentation block. Now the actual libraries and so on have to be found. The code here will obviously vary from module to module (dealing with that, after all, is the point of find modules), but there tends to be a common pattern for libraries. diff --git a/Help/manual/cmake-generators.7.rst b/Help/manual/cmake-generators.7.rst index 0287767..1de10c4 100644 --- a/Help/manual/cmake-generators.7.rst +++ b/Help/manual/cmake-generators.7.rst @@ -27,6 +27,8 @@ when creating a new build tree. CMake Generators ================ +.. _`Command-Line Build Tool Generators`: + Command-Line Build Tool Generators ---------------------------------- @@ -58,6 +60,8 @@ Ninja Generator /generator/Ninja +.. _`IDE Build Tool Generators`: + IDE Build Tool Generators ------------------------- diff --git a/Help/manual/cmake-gui.1.rst b/Help/manual/cmake-gui.1.rst index 57a9850..9322e33 100644 --- a/Help/manual/cmake-gui.1.rst +++ b/Help/manual/cmake-gui.1.rst @@ -14,7 +14,7 @@ Synopsis Description =========== -The "cmake-gui" executable is the CMake GUI. Project configuration +The **cmake-gui** executable is the CMake GUI. Project configuration settings may be specified interactively. Brief instructions are provided at the bottom of the window when the program is running. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 7c0fe6d..044a06e 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -57,6 +57,7 @@ Policies Introduced by CMake 3.14 .. toctree:: :maxdepth: 1 + CMP0085: IN_LIST generator expression handles empty list items. </policy/CMP0085> CMP0084: The FindQt module does not exist for find_package(). </policy/CMP0084> CMP0083: Add PIE options when linking executable. </policy/CMP0083> CMP0082: Install rules from add_subdirectory() are interleaved with those in caller. </policy/CMP0082> diff --git a/Help/manual/cmake.1.rst b/Help/manual/cmake.1.rst index b11526c..915e0d4 100644 --- a/Help/manual/cmake.1.rst +++ b/Help/manual/cmake.1.rst @@ -8,37 +8,164 @@ Synopsis .. parsed-literal:: - cmake [<options>] {<path-to-source> | <path-to-existing-build>} - cmake [<options>] -S <path-to-source> -B <path-to-build> - cmake [{-D <var>=<value>}...] -P <cmake-script-file> - cmake --build <dir> [<options>...] [-- <build-tool-options>...] - cmake --open <dir> - cmake -E <command> [<options>...] - cmake --find-package <options>... + `Generate a Project Buildsystem`_ + cmake [<options>] <path-to-source> + cmake [<options>] <path-to-existing-build> + cmake [<options>] -S <path-to-source> -B <path-to-build> + + `Build a Project`_ + cmake --build <dir> [<options>] [-- <build-tool-options>] + + `Open a Project`_ + cmake --open <dir> + + `Run a Script`_ + cmake [{-D <var>=<value>}...] -P <cmake-script-file> + + `Run a Command-Line Tool`_ + cmake -E <command> [<options>] + + `Run the Find-Package Tool`_ + cmake --find-package [<options>] + + `View Help`_ + cmake --help[-<topic>] Description =========== -The "cmake" executable is the CMake command-line interface. It may be -used to configure projects in scripts. Project configuration settings -may be specified on the command line with the -D option. +The **cmake** executable is the command-line interface of the cross-platform +buildsystem generator CMake. The above `Synopsis`_ lists various actions +the tool can perform as described in sections below. + +To build a software project with CMake, `Generate a Project Buildsystem`_. +Optionally use **cmake** to `Build a Project`_ or just run the +corresponding build tool (e.g. ``make``) directly. **cmake** can also +be used to `View Help`_. + +The other actions are meant for use by software developers writing +scripts in the :manual:`CMake language <cmake-language(7)>` to support +their builds. + +For graphical user interfaces that may be used in place of **cmake**, +see :manual:`ccmake <ccmake(1)>` and :manual:`cmake-gui <cmake-gui(1)>`. +For command-line interfaces to the CMake testing and packaging facilities, +see :manual:`ctest <ctest(1)>` and :manual:`cpack <cpack(1)>`. + +For more information on CMake at large, `see also`_ the links at the end +of this manual. + + +Introduction to CMake Buildsystems +================================== + +A *buildsystem* describes how to build a project's executables and libraries +from its source code using a *build tool* to automate the process. For +example, a buildsystem may be a ``Makefile`` for use with a command-line +``make`` tool or a project file for an Integrated Development Environment +(IDE). In order to avoid maintaining multiple such buildsystems, a project +may specify its buildsystem abstractly using files written in the +:manual:`CMake language <cmake-language(7)>`. From these files CMake +generates a preferred buildsystem locally for each user through a backend +called a *generator*. + +To generate a buildsystem with CMake, the following must be selected: + +Source Tree + The top-level directory containing source files provided by the project. + The project specifies its buildsystem using files as described in the + :manual:`cmake-language(7)` manual, starting with a top-level file named + ``CMakeLists.txt``. These files specify build targets and their + dependencies as described in the :manual:`cmake-buildsystem(7)` manual. + +Build Tree + The top-level directory in which buildsystem files and build output + artifacts (e.g. executables and libraries) are to be stored. + CMake will write a ``CMakeCache.txt`` file to identify the directory + as a build tree and store persistent information such as buildsystem + configuration options. + + To maintain a pristine source tree, perform an *out-of-source* build + by using a separate dedicated build tree. An *in-source* build in + which the build tree is placed in the same directory as the source + tree is also supported, but discouraged. + +Generator + This chooses the kind of buildsystem to generate. See the + :manual:`cmake-generators(7)` manual for documentation of all generators. + Run ``cmake --help`` to see a list of generators available locally. + Optionally use the ``-G`` option below to specify a generator, or simply + accept the default CMake chooses for the current platform. + + When using one of the :ref:`Command-Line Build Tool Generators` + CMake expects that the environment needed by the compiler toolchain + is already configured in the shell. When using one of the + :ref:`IDE Build Tool Generators`, no particular environment is needed. + + +Generate a Project Buildsystem +============================== + +Run CMake with one of the following command signatures to specify the +source and build trees and generate a buildsystem: + +``cmake [<options>] <path-to-source>`` + Uses the current working directory as the build tree, and + ``<path-to-source>`` as the source tree. The specified path may + be absolute or relative to the current working directory. + The source tree must contain a ``CMakeLists.txt`` file and must + *not* contain a ``CMakeCache.txt`` file because the latter + identifies an existing build tree. For example: + + .. code-block:: console + + $ mkdir build ; cd build + $ cmake ../src + +``cmake [<options>] <path-to-existing-build>`` + Uses ``<path-to-existing-build>`` as the build tree, and loads the + path to the source tree from its ``CMakeCache.txt`` file, which must + have already been generated by a previous run of CMake. The specified + path may be absolute or relative to the current working directory. + For example: + + .. code-block:: console + + $ cd build + $ cmake . + +``cmake [<options>] -S <path-to-source> -B <path-to-build>`` + Uses ``<path-to-build>`` as the build tree and ``<path-to-source>`` + as the source tree. The specified paths may be absolute or relative + to the current working directory. The source tree must contain a + ``CMakeLists.txt`` file. The build tree will be created automatically + if it does not already exist. For example: + + .. code-block:: console + + $ cmake -S src -B build + +In all cases the ``<options>`` may be zero or more of the `Options`_ below. + +After generating a buildsystem one may use the corresponding native +build tool to build the project. For example, after using the +:generator:`Unix Makefiles` generator one may run ``make`` directly: + + .. code-block:: console + + $ make + $ make install -CMake is a cross-platform build system generator. Projects specify -their build process with platform-independent CMake listfiles included -in each directory of a source tree with the name CMakeLists.txt. -Users build a project by using CMake to generate a build system for a -native tool on their platform. +Alternatively, one may use **cmake** to `Build a Project`_ by +automatically choosing and invoking the appropriate native build tool. .. _`CMake Options`: Options -======= +------- .. include:: OPTIONS_BUILD.txt -``-E <command> [<options>...]`` - See `Command-Line Tool Mode`_. - ``-L[A][H]`` List non-advanced cached variables. @@ -50,30 +177,12 @@ Options display also advanced variables. If H is specified, it will also display help for each variable. -``--build <dir>`` - See `Build Tool Mode`_. - -``--open <dir>`` - Open the generated project in the associated application. This is - only supported by some generators. - ``-N`` View mode only. Only load the cache. Do not actually run configure and generate steps. -``-P <file>`` - Process script mode. - - Process the given cmake file as a script written in the CMake - language. No configure or generate step is performed and the cache - is not modified. If variables are defined using -D, this must be - done before the -P argument. - -``--find-package`` - See `Find-Package Tool Mode`_. - ``--graphviz=[file]`` Generate graphviz of dependencies, see :module:`CMakeGraphVizOptions` for more. @@ -142,17 +251,17 @@ Options in CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR. This flag tells CMake to warn about other files as well. -.. include:: OPTIONS_HELP.txt - .. _`Build Tool Mode`: -Build Tool Mode +Build a Project =============== CMake provides a command-line signature to build an already-generated -project binary tree:: +project binary tree: - cmake --build <dir> [<options>...] [-- <build-tool-options>...] +.. code-block:: shell + + cmake --build <dir> [<options>] [-- <build-tool-options>] This abstracts a native build tool's command-line interface with the following options: @@ -185,12 +294,41 @@ following options: Run ``cmake --build`` with no options for quick help. -Command-Line Tool Mode -====================== -CMake provides builtin command-line tools through the signature:: +Open a Project +============== + +.. code-block:: shell + + cmake --open <dir> + +Open the generated project in the associated application. This is only +supported by some generators. + + +.. _`Script Processing Mode`: + +Run a Script +============ + +.. code-block:: shell - cmake -E <command> [<options>...] + cmake [{-D <var>=<value>}...] -P <cmake-script-file> + +Process the given cmake file as a script written in the CMake +language. No configure or generate step is performed and the cache +is not modified. If variables are defined using -D, this must be +done before the -P argument. + + +Run a Command-Line Tool +======================= + +CMake provides builtin command-line tools through the signature + +.. code-block:: shell + + cmake -E <command> [<options>] Run ``cmake -E`` or ``cmake -E help`` for a summary of commands. Available commands are: @@ -326,7 +464,7 @@ Available commands are: ``sleep <number>...`` Sleep for given number of seconds. -``tar [cxt][vf][zjJ] file.tar [<options>...] [--] [<file>...]`` +``tar [cxt][vf][zjJ] file.tar [<options>] [--] [<file>...]`` Create or extract a tar or zip archive. Options are: ``--`` @@ -379,24 +517,40 @@ The following ``cmake -E`` commands are available only on Windows: ``write_regv <key> <value>`` Write Windows registry value. -Find-Package Tool Mode -====================== -CMake provides a helper for Makefile-based projects with the signature:: +Run the Find-Package Tool +========================= - cmake --find-package <options>... +CMake provides a pkg-config like helper for Makefile-based projects: -This runs in a pkg-config like mode. +.. code-block:: shell -Search a package using :command:`find_package()` and print the resulting flags -to stdout. This can be used to use cmake instead of pkg-config to find -installed libraries in plain Makefile-based projects or in autoconf-based -projects (via ``share/aclocal/cmake.m4``). + cmake --find-package [<options>] + +It searches a package using :command:`find_package()` and prints the +resulting flags to stdout. This can be used instead of pkg-config +to find installed libraries in plain Makefile-based projects or in +autoconf-based projects (via ``share/aclocal/cmake.m4``). .. note:: This mode is not well-supported due to some technical limitations. It is kept for compatibility but should not be used in new projects. + +View Help +========= + +To print selected pages from the CMake documentation, use + +.. code-block:: shell + + cmake --help[-<topic>] + +with one of the following options: + +.. include:: OPTIONS_HELP.txt + + See Also ======== diff --git a/Help/manual/cpack.1.rst b/Help/manual/cpack.1.rst index 9ddab1e..679c547 100644 --- a/Help/manual/cpack.1.rst +++ b/Help/manual/cpack.1.rst @@ -13,10 +13,10 @@ Synopsis Description =========== -The ``cpack`` executable is the CMake packaging program. It generates +The **cpack** executable is the CMake packaging program. It generates installers and source packages in a variety of formats. -For each installer or package format, ``cpack`` has a specific backend, +For each installer or package format, **cpack** has a specific backend, called "generator". A generator is responsible for generating the required inputs and invoking the specific package creation tools. These installer or package generators are not to be confused with the makefile generators @@ -28,7 +28,7 @@ list of generators supported for the target platform. Which of them are to be used can be selected through the :variable:`CPACK_GENERATOR` variable or through the command-line option ``-G``. -The ``cpack`` program is steered by a configuration file written in the +The **cpack** program is steered by a configuration file written in the :manual:`CMake language <cmake-language(7)>`. Unless chosen differently through the command-line option ``--config``, the file ``CPackConfig.cmake`` in the current directory is used. diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index e24b10d..9e0ce27 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -19,7 +19,7 @@ Synopsis Description =========== -The "ctest" executable is the CMake test driver program. +The **ctest** executable is the CMake test driver program. CMake-generated build trees created for projects that use the ENABLE_TESTING and ADD_TEST commands have testing support. This program will run the tests and report results. @@ -38,7 +38,7 @@ Options ``--progress`` Enable short progress output from tests. - When the output of ``ctest`` is being sent directly to a terminal, the + When the output of **ctest** is being sent directly to a terminal, the progress through the set of tests is reported by updating the same line rather than printing start and end messages for each test on new lines. This can significantly reduce the verbosity of the test output. diff --git a/Help/policy/CMP0085.rst b/Help/policy/CMP0085.rst new file mode 100644 index 0000000..d9ec9a2 --- /dev/null +++ b/Help/policy/CMP0085.rst @@ -0,0 +1,21 @@ +CMP0085 +------- + +``$<IN_LIST:...>`` handles empty list items. + +In CMake 3.13 and lower, the ``$<IN_LIST:...>`` generator expression always +returned ``0`` if the first argument was empty, even if the list contained an +empty item. This behavior is inconsistent with the ``IN_LIST`` behavior of +:command:`if`, which this generator expression is meant to emulate. CMake 3.14 +and later handles this case correctly. + +The ``OLD`` behavior of this policy is for ``$<IN_LIST:...>`` to always return +``0`` if the first argument is empty. The ``NEW`` behavior is to return ``1`` +if the first argument is empty and the list contains an empty item. + +This policy was introduced in CMake version 3.14. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. +Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst index f61089a..022bab5 100644 --- a/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst +++ b/Help/prop_tgt/AUTOGEN_ORIGIN_DEPENDS.rst @@ -5,22 +5,34 @@ Switch for forwarding origin target dependencies to the corresponding ``_autogen`` target. Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property -``ON`` have a corresponding ``_autogen`` target which is used to auto generate +``ON`` have a corresponding ``_autogen`` target which generates ``moc`` and ``uic`` files. As this ``_autogen`` target is created at -generate-time, it is not possible to define dependencies of it, -such as to create inputs for the ``moc`` or ``uic`` executable. - -The dependencies of the ``_autogen`` target are composed from - -- the origin target dependencies - (by default enabled via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`) -- user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS` - -:prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` decides whether the origin target -dependencies should be forwarded to the ``_autogen`` target or not. +generate-time, it is not possible to define dependencies of it using +e.g. :command:`add_dependencies`. Instead the +:prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` target property decides whether the origin +target dependencies should be forwarded to the ``_autogen`` target or not. By default :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is initialized from :variable:`CMAKE_AUTOGEN_ORIGIN_DEPENDS` which is ``ON`` by default. +In total the dependencies of the ``_autogen`` target are composed from + +- forwarded origin target dependencies + (enabled by default via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`) +- additional user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS` + See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. + +Note +^^^^ + +Disabling :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is useful to avoid building of +origin target dependencies when building the ``_autogen`` target only. +This is especially interesting when a +:variable:`global autogen target <CMAKE_GLOBAL_AUTOGEN_TARGET>` is enabled. + +When the ``_autogen`` target doesn't require all the origin target's +dependencies, and :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` is disabled, it might be +necessary to extend :prop_tgt:`AUTOGEN_TARGET_DEPENDS` to add missing +dependencies. diff --git a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst index 84c2bfe..d5c5e14 100644 --- a/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst +++ b/Help/prop_tgt/AUTOGEN_TARGET_DEPENDS.rst @@ -1,23 +1,22 @@ AUTOGEN_TARGET_DEPENDS ---------------------- -Target dependencies of the corresponding ``_autogen`` target. +Additional target dependencies of the corresponding ``_autogen`` target. Targets which have their :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` property -``ON`` have a corresponding ``_autogen`` target which is used to auto generate +``ON`` have a corresponding ``_autogen`` target which generates ``moc`` and ``uic`` files. As this ``_autogen`` target is created at -generate-time, it is not possible to define dependencies of it, -such as to create inputs for the ``moc`` or ``uic`` executable. +generate-time, it is not possible to define dependencies of it using +e.g. :command:`add_dependencies`. Instead the +:prop_tgt:`AUTOGEN_TARGET_DEPENDS` target property can be set to a +:ref:`;-list <CMake Language Lists>` of additional dependencies for the +``_autogen`` target. Dependencies can be target names or file names. -The dependencies of the ``_autogen`` target are composed from +In total the dependencies of the ``_autogen`` target are composed from -- the origin target dependencies - (by default enabled via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`) -- user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS` - -The :prop_tgt:`AUTOGEN_TARGET_DEPENDS` target property can be set to a -list of additional dependencies for the ``_autogen`` target. Dependencies -can be target names or file names. +- forwarded origin target dependencies + (enabled by default via :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS`) +- additional user defined dependencies from :prop_tgt:`AUTOGEN_TARGET_DEPENDS` See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. @@ -32,6 +31,6 @@ If :prop_tgt:`AUTOMOC` or :prop_tgt:`AUTOUIC` depends on a file that is either - a :prop_sf:`GENERATED` C++ file that isn't recognized by :prop_tgt:`AUTOMOC` and :prop_tgt:`AUTOUIC` because it's skipped by :prop_sf:`SKIP_AUTOMOC`, :prop_sf:`SKIP_AUTOUIC`, :prop_sf:`SKIP_AUTOGEN` or :policy:`CMP0071` or -- a file that isn't in the target's sources +- a file that isn't in the origin target's sources it must added to :prop_tgt:`AUTOGEN_TARGET_DEPENDS`. diff --git a/Help/release/dev/FindGIF-modernize.rst b/Help/release/dev/FindGIF-modernize.rst new file mode 100644 index 0000000..3bb4821 --- /dev/null +++ b/Help/release/dev/FindGIF-modernize.rst @@ -0,0 +1,4 @@ +FindGIF-modernize +----------------- + +* The :module:`FindGIF` module now provides imported targets. diff --git a/Help/release/dev/genex-in_list-empty-args.rst b/Help/release/dev/genex-in_list-empty-args.rst new file mode 100644 index 0000000..ec1c6c0 --- /dev/null +++ b/Help/release/dev/genex-in_list-empty-args.rst @@ -0,0 +1,5 @@ +genex-in_list-empty-args +------------------------ + +* The $<IN_LIST:...> generator expression now correctly handles an empty + argument. See :policy:`CMP0085` for details. diff --git a/Help/variable/CMAKE_ARGC.rst b/Help/variable/CMAKE_ARGC.rst index aec9711..30db2a2 100644 --- a/Help/variable/CMAKE_ARGC.rst +++ b/Help/variable/CMAKE_ARGC.rst @@ -3,6 +3,6 @@ CMAKE_ARGC Number of command line arguments passed to CMake in script mode. -When run in :ref:`-P <CMake Options>` script mode, CMake sets this variable to -the number of command line arguments. See also :variable:`CMAKE_ARGV0`, -``1``, ``2`` ... +When run in :ref:`-P <Script Processing Mode>` script mode, CMake sets this +variable to the number of command line arguments. See also +:variable:`CMAKE_ARGV0`, ``1``, ``2`` ... diff --git a/Help/variable/CMAKE_ARGV0.rst b/Help/variable/CMAKE_ARGV0.rst index 8b1ecb7..c4d1c21 100644 --- a/Help/variable/CMAKE_ARGV0.rst +++ b/Help/variable/CMAKE_ARGV0.rst @@ -3,7 +3,7 @@ CMAKE_ARGV0 Command line argument passed to CMake in script mode. -When run in :ref:`-P <CMake Options>` script mode, CMake sets this variable to -the first command line argument. It then also sets ``CMAKE_ARGV1``, +When run in :ref:`-P <Script Processing Mode>` script mode, CMake sets this +variable to the first command line argument. It then also sets ``CMAKE_ARGV1``, ``CMAKE_ARGV2``, ... and so on, up to the number of command line arguments given. See also :variable:`CMAKE_ARGC`. diff --git a/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst b/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst index 75903ab..e82867d 100644 --- a/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst +++ b/Help/variable/CMAKE_GLOBAL_AUTOGEN_TARGET.rst @@ -16,3 +16,11 @@ By default :variable:`CMAKE_GLOBAL_AUTOGEN_TARGET` is unset. See the :manual:`cmake-qt(7)` manual for more information on using CMake with Qt. + +Note +^^^^ + +``<ORIGIN>_autogen`` targets by default inherit their origin target's +dependencies. This might result in unintended dependency target +builds when only ``<ORIGIN>_autogen`` targets are built. A solution is to +disable :prop_tgt:`AUTOGEN_ORIGIN_DEPENDS` on the respective origin targets. diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 2ea931d..18bb452 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -27,7 +27,6 @@ to creating tests when testing is enabled. To enable submissions to a CDash server, create a ``CTestConfig.cmake`` file at the top of the project with content such as:: - set(CTEST_PROJECT_NAME "MyProject") set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "my.cdash.org") diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index d150826..b6348fd 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -94,6 +94,7 @@ if(BLA_PREFER_PKGCONFIG) find_package(PkgConfig) pkg_check_modules(PKGC_BLAS blas) if(PKGC_BLAS_FOUND) + set(BLAS_FOUND ${PKGC_BLAS_FOUND}) set(BLAS_LIBRARIES "${PKGC_BLAS_LINK_LIBRARIES}") return() endif() @@ -126,6 +127,8 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) endif () endif () + list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + foreach(_library ${_list}) set(_combined_name ${_combined_name}_${_library}) @@ -170,6 +173,8 @@ macro(Check_Fortran_Libraries LIBRARIES _prefix _name _flags _list _thread) if(_libraries_work) if("${_list}" STREQUAL "") set(${LIBRARIES} "${LIBRARIES}-PLACEHOLDER-FOR-EMPTY-LIBRARIES") + else() + set(${LIBRARIES} ${${LIBRARIES}} ${_thread}) # for static link endif() else() set(${LIBRARIES} FALSE) @@ -205,14 +210,34 @@ endif () #BLAS in intel mkl 10+ library? (em64t 64bit) if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") if (NOT BLAS_LIBRARIES) + + # System-specific settings + if (WIN32) + if (BLA_STATIC) + set(BLAS_mkl_DLL_SUFFIX "") + else() + set(BLAS_mkl_DLL_SUFFIX "_dll") + endif() + else() + if(CMAKE_Fortran_COMPILER_LOADED AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") + set(BLAS_mkl_INTFACE "gf") + set(BLAS_mkl_THREADING "gnu") + set(BLAS_mkl_OMP "gomp") + else() + set(BLAS_mkl_INTFACE "intel") + set(BLAS_mkl_THREADING "intel") + set(BLAS_mkl_OMP "iomp5") + endif() + set(BLAS_mkl_LM "-lm") + set(BLAS_mkl_LDL "-ldl") + endif() + if (BLA_VENDOR MATCHES "_64ilp") set(BLAS_mkl_ILP_MODE "ilp64") else () set(BLAS_mkl_ILP_MODE "lp64") endif () - if (NOT WIN32) - set(LM "-lm") - endif () + if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) if(BLAS_FIND_QUIETLY OR NOT BLAS_FIND_REQUIRED) find_package(Threads) @@ -226,12 +251,6 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") set(BLAS_mkl_SEARCH_SYMBOL sgemm_f95) set(_LIBRARIES BLAS95_LIBRARIES) if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - # Find the main file (32-bit or 64-bit) set(BLAS_SEARCH_LIBS_WIN_MAIN "") if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") @@ -267,38 +286,32 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") endforeach() else () if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") + + # mkl >= 10.3 list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_intel mkl_intel_thread mkl_core guide") + "mkl_blas95 mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") endif () if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") # old version list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95 mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core guide") + "mkl_blas95 mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") # mkl >= 10.3 - if (CMAKE_C_COMPILER MATCHES ".+gcc") - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_gnu_thread mkl_core gomp") - else () - list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core iomp5") - endif () + list(APPEND BLAS_SEARCH_LIBS + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") endif () if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS - "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_intel_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") + "mkl_blas95_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") endif () endif () else () set(BLAS_mkl_SEARCH_SYMBOL sgemm) set(_LIBRARIES BLAS_LIBRARIES) if (WIN32) - if (BLA_STATIC) - set(BLAS_mkl_DLL_SUFFIX "") - else() - set(BLAS_mkl_DLL_SUFFIX "_dll") - endif() - # Find the main file (32-bit or 64-bit) set(BLAS_SEARCH_LIBS_WIN_MAIN "") if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") @@ -334,27 +347,26 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") endforeach() else () if (BLA_VENDOR STREQUAL "Intel10_32" OR BLA_VENDOR STREQUAL "All") + # old version + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") + + # mkl >= 10.3 list(APPEND BLAS_SEARCH_LIBS - "mkl_intel mkl_intel_thread mkl_core guide") + "mkl_${BLAS_mkl_INTFACE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") endif () if (BLA_VENDOR MATCHES "^Intel10_64i?lp$" OR BLA_VENDOR STREQUAL "All") - # old version list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core guide") + "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core guide") # mkl >= 10.3 - if (CMAKE_C_COMPILER MATCHES ".+gcc") - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_gnu_thread mkl_core gomp") - else () - list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_intel_thread mkl_core iomp5") - endif () + list(APPEND BLAS_SEARCH_LIBS + "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_${BLAS_mkl_THREADING}_thread mkl_core ${BLAS_mkl_OMP}") endif () if (BLA_VENDOR MATCHES "^Intel10_64i?lp_seq$" OR BLA_VENDOR STREQUAL "All") list(APPEND BLAS_SEARCH_LIBS - "mkl_intel_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") + "mkl_${BLAS_mkl_INTFACE}_${BLAS_mkl_ILP_MODE} mkl_sequential mkl_core") endif () #older vesions of intel mkl libs @@ -378,16 +390,30 @@ if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") ${BLAS_mkl_SEARCH_SYMBOL} "" "${SEARCH_LIBS}" - "${CMAKE_THREAD_LIBS_INIT};${LM}" + "${CMAKE_THREAD_LIBS_INIT};${BLAS_mkl_LM};${BLAS_mkl_LDL}" ) endif () endforeach () endif () unset(BLAS_mkl_ILP_MODE) + unset(BLAS_mkl_INTFACE) + unset(BLAS_mkl_THREADING) + unset(BLAS_mkl_OMP) + unset(BLAS_mkl_DLL_SUFFIX) + unset(BLAS_mkl_LM) + unset(BLAS_mkl_LDL) endif () endif () +if(BLA_F95) + find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES) + set(BLAS95_FOUND ${BLAS_FOUND}) + if(BLAS_FOUND) + set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") + endif() +endif() + if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) # gotoblas (http://www.tacc.utexas.edu/tacc-projects/gotoblas2) @@ -723,13 +749,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") endif() endif () -if(BLA_F95) - find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS95_LIBRARIES) - set(BLAS95_FOUND ${BLAS_FOUND}) - if(BLAS_FOUND) - set(BLAS_LIBRARIES "${BLAS95_LIBRARIES}") - endif() -else() +if(NOT BLA_F95) find_package_handle_standard_args(BLAS REQUIRED_VARS BLAS_LIBRARIES) endif() diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index ccd245b..ce307fa 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -35,6 +35,7 @@ case results are reported in variables:: Boost_MAJOR_VERSION - Boost major version number (X in X.y.z) Boost_MINOR_VERSION - Boost minor version number (Y in x.Y.z) Boost_SUBMINOR_VERSION - Boost subminor version number (Z in x.y.Z) + Boost_VERSION_STRING - Boost version number in x.y.z format Boost_LIB_DIAGNOSTIC_DEFINITIONS (Windows) - Pass to add_definitions() to have diagnostic information about Boost's automatic linking @@ -410,15 +411,12 @@ endmacro() #------------------------------------------------------------------------------- -# -# Runs compiler with "-dumpversion" and parses major/minor -# version with a regex. -# +# Convert CMAKE_CXX_COMPILER_VERSION to boost compiler suffix version. function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION _OUTPUT_VERSION_MAJOR _OUTPUT_VERSION_MINOR) string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1" - _boost_COMPILER_VERSION_MAJOR ${CMAKE_CXX_COMPILER_VERSION}) + _boost_COMPILER_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}") string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\2" - _boost_COMPILER_VERSION_MINOR ${CMAKE_CXX_COMPILER_VERSION}) + _boost_COMPILER_VERSION_MINOR "${CMAKE_CXX_COMPILER_VERSION}") set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}${_boost_COMPILER_VERSION_MINOR}") @@ -1371,6 +1369,7 @@ if(Boost_INCLUDE_DIR) math(EXPR Boost_MAJOR_VERSION "${Boost_VERSION} / 100000") math(EXPR Boost_MINOR_VERSION "${Boost_VERSION} / 100 % 1000") math(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION} % 100") + set(Boost_VERSION_STRING "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") string(APPEND Boost_ERROR_REASON "Boost version: ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}\nBoost include path: ${Boost_INCLUDE_DIR}") diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index 2ed9449..fdd3a92 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -485,12 +485,18 @@ endmacro() # Find Graphviz Dot... # macro(_Doxygen_find_dot) - set(_x86 "(x86)") - file( - GLOB _Doxygen_GRAPHVIZ_BIN_DIRS - "$ENV{ProgramFiles}/Graphviz*/bin" - "$ENV{ProgramFiles${_x86}}/Graphviz*/bin" - ) + if(WIN32) + set(_x86 "(x86)") + file( + GLOB _Doxygen_GRAPHVIZ_BIN_DIRS + "$ENV{ProgramFiles}/Graphviz*/bin" + "$ENV{ProgramFiles${_x86}}/Graphviz*/bin" + ) + unset(_x86) + else() + set(_Doxygen_GRAPHVIZ_BIN_DIRS "") + endif() + find_program( DOXYGEN_DOT_EXECUTABLE NAMES dot @@ -529,7 +535,6 @@ macro(_Doxygen_find_dot) endif() unset(_Doxygen_GRAPHVIZ_BIN_DIRS) - unset(_x86) endmacro() # diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake index 9a995af..9687b57 100644 --- a/Modules/FindGIF.cmake +++ b/Modules/FindGIF.cmake @@ -7,22 +7,43 @@ FindGIF This finds the GIF library (giflib) -The module defines the following variables: +Imported targets +^^^^^^^^^^^^^^^^ + +This module defines the following :prop_tgt:`IMPORTED` target: + +``GIF::GIF`` + The giflib library, if found. + +Result variables +^^^^^^^^^^^^^^^^ + +This module will set the following variables in your project: ``GIF_FOUND`` - True if giflib was found + If false, do not try to use GIF. +``GIF_INCLUDE_DIRS`` + where to find gif_lib.h, etc. ``GIF_LIBRARIES`` - Libraries to link to in order to use giflib -``GIF_INCLUDE_DIR`` - where to find the headers + the libraries needed to use GIF. ``GIF_VERSION`` - 3, 4 or a full version string (eg 5.1.4) for versions >= 4.1.6 + 3, 4 or a full version string (eg 5.1.4) for versions >= 4.1.6. + +Cache variables +^^^^^^^^^^^^^^^ + +The following cache variables may also be set: -The minimum required version of giflib can be specified using the -standard syntax, e.g. find_package(GIF 4) +``GIF_INCLUDE_DIR`` + where to find the GIF headers. +``GIF_LIBRARY`` + where to find the GIF library. + +Hints +^^^^^ -$GIF_DIR is an environment variable that would correspond to the -./configure --prefix=$GIF_DIR +``GIF_DIR`` is an environment variable that would correspond to the +``./configure --prefix=$GIF_DIR``. #]=======================================================================] # Created by Eric Wing. @@ -44,9 +65,6 @@ find_library(GIF_LIBRARY PATH_SUFFIXES lib ) -# see readme.txt -set(GIF_LIBRARIES ${GIF_LIBRARY}) - # Very basic version detection. # The GIF_LIB_VERSION string in gif_lib.h seems to be unreliable, since it seems # to be always " Version 2.0, " in versions 3.x of giflib. @@ -90,4 +108,20 @@ include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GIF REQUIRED_VARS GIF_LIBRARY GIF_INCLUDE_DIR VERSION_VAR GIF_VERSION ) +if(GIF_FOUND) + set(GIF_INCLUDE_DIRS "${GIF_INCLUDE_DIR}") + set(GIF_LIBRARIES ${GIF_LIBRARY}) + + if(NOT TARGET GIF::GIF) + add_library(GIF::GIF UNKNOWN IMPORTED) + set_target_properties(GIF::GIF PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "${GIF_INCLUDE_DIRS}") + if(EXISTS "${GIF_LIBRARY}") + set_target_properties(GIF::GIF PROPERTIES + IMPORTED_LINK_INTERFACE_LANGUAGES "C" + IMPORTED_LOCATION "${GIF_LIBRARY}") + endif() + endif() +endif() + mark_as_advanced(GIF_INCLUDE_DIR GIF_LIBRARY) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 62ff94c..7619664 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -96,6 +96,9 @@ if (NOT _libdir) set(_libdir ENV LD_LIBRARY_PATH) endif () endif () + +list(APPEND _libdir "${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}") + foreach(_library ${_list}) set(_combined_name ${_combined_name}_${_library}) @@ -175,6 +178,84 @@ if(BLAS_FOUND) endif() endif () +#intel lapack +if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") + if (NOT WIN32) + set(LAPACK_mkl_LM "-lm") + set(LAPACK_mkl_LDL "-ldl") + endif () + if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) + if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) + find_PACKAGE(Threads) + else() + find_package(Threads REQUIRED) + endif() + + if (BLA_VENDOR MATCHES "_64ilp") + set(LAPACK_mkl_ILP_MODE "ilp64") + else () + set(LAPACK_mkl_ILP_MODE "lp64") + endif () + + set(LAPACK_SEARCH_LIBS "") + + if (BLA_F95) + set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95") + set(_LIBRARIES LAPACK95_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) + + # old + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95") + # new >= 10.3 + list(APPEND LAPACK_SEARCH_LIBS + "mkl_intel_c") + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack95_${LAPACK_mkl_ILP_MODE}") + else() + set(LAPACK_mkl_SEARCH_SYMBOL "cheev") + set(_LIBRARIES LAPACK_LIBRARIES) + set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) + + # old + list(APPEND LAPACK_SEARCH_LIBS + "mkl_lapack") + endif() + + # First try empty lapack libs + if (NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "" + "${_BLAS_LIBRARIES}" + "" + ) + endif () + # Then try the search libs + foreach (IT ${LAPACK_SEARCH_LIBS}) + if (NOT ${_LIBRARIES}) + check_lapack_libraries( + ${_LIBRARIES} + LAPACK + ${LAPACK_mkl_SEARCH_SYMBOL} + "" + "${IT}" + "${_BLAS_LIBRARIES}" + "${CMAKE_THREAD_LIBS_INIT};${LAPACK_mkl_LM};${LAPACK_mkl_LDL}" + ) + endif () + endforeach () + + unset(LAPACK_mkl_ILP_MODE) + unset(LAPACK_mkl_SEARCH_SYMBOL) + unset(LAPACK_mkl_LM) + unset(LAPACK_mkl_LDL) + endif () +endif() + if (BLA_VENDOR STREQUAL "Goto" OR BLA_VENDOR STREQUAL "All") if(NOT LAPACK_LIBRARIES) check_lapack_libraries( @@ -267,82 +348,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR ) endif () endif () -#intel lapack -if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All") - if (NOT WIN32) - set(LM "-lm") - endif () - if (CMAKE_C_COMPILER_LOADED OR CMAKE_CXX_COMPILER_LOADED) - if(LAPACK_FIND_QUIETLY OR NOT LAPACK_FIND_REQUIRED) - find_PACKAGE(Threads) - else() - find_package(Threads REQUIRED) - endif() - - if (BLA_VENDOR MATCHES "_64ilp") - set(BLAS_mkl_ILP_MODE "ilp64") - else () - set(BLAS_mkl_ILP_MODE "lp64") - endif () - - set(LAPACK_SEARCH_LIBS "") - - if (BLA_F95) - set(LAPACK_mkl_SEARCH_SYMBOL "cheev_f95") - set(_LIBRARIES LAPACK95_LIBRARIES) - set(_BLAS_LIBRARIES ${BLAS95_LIBRARIES}) - - # old - list(APPEND LAPACK_SEARCH_LIBS - "mkl_lapack95") - # new >= 10.3 - list(APPEND LAPACK_SEARCH_LIBS - "mkl_intel_c") - list(APPEND LAPACK_SEARCH_LIBS - "mkl_lapack95_${BLAS_mkl_ILP_MODE}") - else() - set(LAPACK_mkl_SEARCH_SYMBOL "cheev") - set(_LIBRARIES LAPACK_LIBRARIES) - set(_BLAS_LIBRARIES ${BLAS_LIBRARIES}) - # old - list(APPEND LAPACK_SEARCH_LIBS - "mkl_lapack") - # new >= 10.3 - list(APPEND LAPACK_SEARCH_LIBS - "mkl_gf_${BLAS_mkl_ILP_MODE}") - endif() - - # First try empty lapack libs - if (NOT ${_LIBRARIES}) - check_lapack_libraries( - ${_LIBRARIES} - BLAS - ${LAPACK_mkl_SEARCH_SYMBOL} - "" - "" - "${_BLAS_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif () - # Then try the search libs - foreach (IT ${LAPACK_SEARCH_LIBS}) - if (NOT ${_LIBRARIES}) - check_lapack_libraries( - ${_LIBRARIES} - BLAS - ${LAPACK_mkl_SEARCH_SYMBOL} - "" - "${IT}" - "${_BLAS_LIBRARIES}" - "${CMAKE_THREAD_LIBS_INIT};${LM}" - ) - endif () - endforeach () - - unset(BLAS_mkl_ILP_MODE) - endif () -endif() else() message(STATUS "LAPACK requires BLAS") endif() diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index 5b1ed4b..e0ebb90 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -711,6 +711,23 @@ if ("Development" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS if (NOT _${_PYTHON_PREFIX}_CONFIG) continue() endif() + if (DEFINED CMAKE_LIBRARY_ARCHITECTURE) + # check that config tool match library architecture + execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --configdir + RESULT_VARIABLE _${_PYTHON_PREFIX}_RESULT + OUTPUT_VARIABLE _${_PYTHON_PREFIX}_CONFIGDIR + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + if (_${_PYTHON_PREFIX}_RESULT) + unset (_${_PYTHON_PREFIX}_CONFIG CACHE) + continue() + endif() + string(FIND "${_${_PYTHON_PREFIX}_CONFIGDIR}" "${CMAKE_LIBRARY_ARCHITECTURE}" _${_PYTHON_PREFIX}_RESULT) + if (_${_PYTHON_PREFIX}_RESULT EQUAL -1) + unset (_${_PYTHON_PREFIX}_CONFIG CACHE) + continue() + endif() + endif() # retrieve root install directory execute_process (COMMAND "${_${_PYTHON_PREFIX}_CONFIG}" --prefix diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake index 9a5e64d..5ba8687 100644 --- a/Modules/InstallRequiredSystemLibraries.cmake +++ b/Modules/InstallRequiredSystemLibraries.cmake @@ -303,7 +303,15 @@ if(MSVC) get_filename_component(windows_kits_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" ABSOLUTE) set(programfilesx86 "ProgramFiles(x86)") - find_path(WINDOWS_KITS_DIR NAMES Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll + if(";${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION};$ENV{UCRTVersion};$ENV{WindowsSDKVersion};" MATCHES [=[;(10\.[0-9.]+)[;\]]=]) + set(__ucrt_version "${CMAKE_MATCH_1}/") + else() + set(__ucrt_version "") + endif() + find_path(WINDOWS_KITS_DIR + NAMES + Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll + Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll PATHS $ENV{CMAKE_WINDOWS_KITS_10_DIR} "${windows_kits_dir}" @@ -314,11 +322,19 @@ if(MSVC) # Glob the list of UCRT DLLs. if(NOT CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY) - file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") + if(EXISTS "${WINDOWS_KITS_DIR}/Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/ucrtbase.dll") + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/${__ucrt_version}ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") + else() + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/Redist/ucrt/DLLs/${CMAKE_MSVC_ARCH}/*.dll") + endif() list(APPEND __install__libs ${__ucrt_dlls}) endif() if(CMAKE_INSTALL_DEBUG_LIBRARIES) - file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll") + if(EXISTS "${WINDOWS_KITS_DIR}/bin/${__ucrt_version}${CMAKE_MSVC_ARCH}/ucrt/ucrtbased.dll") + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${__ucrt_version}${CMAKE_MSVC_ARCH}/ucrt/*.dll") + else() + file(GLOB __ucrt_dlls "${WINDOWS_KITS_DIR}/bin/${CMAKE_MSVC_ARCH}/ucrt/*.dll") + endif() list(APPEND __install__libs ${__ucrt_dlls}) endif() endif() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 4a312ec..93aad21 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 20181120) +set(CMake_VERSION_PATCH 20181128) #set(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index ce27da1..65b4976 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -53,10 +53,6 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() } else { const char* cmakeGeneratorName = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR"); - const char* cmakeProjectName = - (this->Values[ctb_PROJECT_NAME] && *this->Values[ctb_PROJECT_NAME]) - ? this->Values[ctb_PROJECT_NAME] - : this->Makefile->GetDefinition("CTEST_PROJECT_NAME"); // Build configuration is determined by: CONFIGURATION argument, // or CTEST_BUILD_CONFIGURATION script variable, or @@ -81,8 +77,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() ? this->Values[ctb_TARGET] : this->Makefile->GetDefinition("CTEST_BUILD_TARGET"); - if (cmakeGeneratorName && *cmakeGeneratorName && cmakeProjectName && - *cmakeProjectName) { + if (cmakeGeneratorName && *cmakeGeneratorName) { if (!cmakeBuildConfiguration) { cmakeBuildConfiguration = "Release"; } @@ -132,14 +127,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() /* clang-format off */ ostr << "has no project to build. If this is a " "\"built with CMake\" project, verify that CTEST_CMAKE_GENERATOR " - "and CTEST_PROJECT_NAME are set." - "\n" - "CTEST_PROJECT_NAME is usually set in CTestConfig.cmake. Verify " - "that CTestConfig.cmake exists, or CTEST_PROJECT_NAME " - "is set in the script, or PROJECT_NAME is passed as an argument " - "to ctest_build." - "\n" - "Alternatively, set CTEST_BUILD_COMMAND to build the project " + "is set. Otherwise, set CTEST_BUILD_COMMAND to build the project " "with a custom command line."; /* clang-format on */ this->SetError(ostr.str()); diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 34adb4a..60029ab 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -23,8 +23,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() const char* ctestTriggerSite = this->Makefile->GetDefinition("CTEST_TRIGGER_SITE"); bool ctestDropSiteCDash = this->Makefile->IsOn("CTEST_DROP_SITE_CDASH"); - const char* ctestProjectName = - this->Makefile->GetDefinition("CTEST_PROJECT_NAME"); if (!ctestDropMethod) { ctestDropMethod = "http"; } @@ -37,8 +35,6 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler() // error: CDash requires CTEST_DROP_LOCATION definition // in CTestConfig.cmake } - this->CTest->SetCTestConfiguration("ProjectName", ctestProjectName, - this->Quiet); this->CTest->SetCTestConfiguration("DropMethod", ctestDropMethod, this->Quiet); this->CTest->SetCTestConfiguration("DropSite", ctestDropSite, this->Quiet); diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 98872a5..061c8ef 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -1084,8 +1084,12 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, std::string dropMethod; std::string url; this->ConstructCDashURL(dropMethod, url); - std::string::size_type pos = url.find("submit.php?"); - url = url.substr(0, pos + 10); + std::string fields; + std::string::size_type pos = url.find('?'); + if (pos != std::string::npos) { + fields = url.substr(pos + 1); + url = url.substr(0, pos); + } if (!(dropMethod == "http" || dropMethod == "https")) { cmCTestLog(this->CTest, ERROR_MESSAGE, "Only http and https are supported for CDASH_UPLOAD\n"); @@ -1133,8 +1137,6 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, const char* subproject = cm->GetState()->GetGlobalProperty("SubProject"); // TODO: Encode values for a URL instead of trusting caller. std::ostringstream str; - str << "project=" - << curl.Escape(this->CTest->GetCTestConfiguration("ProjectName")) << "&"; if (subproject) { str << "subproject=" << curl.Escape(subproject) << "&"; } @@ -1152,7 +1154,10 @@ int cmCTestSubmitHandler::HandleCDashUploadFile(std::string const& file, << "endtime=" << timeNow << "&" << "datafilesmd5[0]=" << md5sum << "&" << "type=" << curl.Escape(typeString); - std::string fields = str.str(); + if (!fields.empty()) { + fields += '&'; + } + fields += str.str(); cmCTestOptionalLog(this->CTest, DEBUG, "fields: " << fields << "\nurl:" << url << "\nfile: " << file << "\n", diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 1d938e6..2e1bb0a 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -3,6 +3,7 @@ #include "cmCTestTestHandler.h" #include <algorithm> #include <chrono> +#include <cmath> #include <cmsys/Base64.h> #include <cmsys/Directory.hxx> #include <cmsys/RegularExpression.hxx> @@ -544,8 +545,7 @@ int cmCTestTestHandler::ProcessHandler() } cmCTestLog(this->CTest, HANDLER_OUTPUT, std::endl - << passColorCode << static_cast<int>(percent + .5f) - << "% tests passed" + << passColorCode << std::lround(percent) << "% tests passed" << this->CTest->GetColorCode(cmCTest::Color::CLEAR_COLOR) << ", " << failedColorCode << failed.size() << " tests failed" << this->CTest->GetColorCode(cmCTest::Color::CLEAR_COLOR) diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake index 1b57fd8..d941c16 100644 --- a/Source/Checks/cm_cxx_features.cmake +++ b/Source/Checks/cm_cxx_features.cmake @@ -22,6 +22,8 @@ function(cm_check_cxx_feature name) # Filter out warnings caused by local configuration. string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}") string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}") + # Filter out other warnings unrelated to feature checks. + string(REGEX REPLACE "[^\n]*warning:[^\n]*sprintf\\(\\) is often misused, please use snprintf[^\n]*" "" check_output "${check_output}") # Filter out xcodebuild warnings. string(REGEX REPLACE "[^\n]* xcodebuild\\[[0-9]*:[0-9]*\\] warning: [^\n]*" "" check_output "${check_output}") # If using the feature causes warnings, treat it as broken/unavailable. diff --git a/Source/LexerParser/cmFortranLexer.cxx b/Source/LexerParser/cmFortranLexer.cxx index dec0f5e..82048df 100644 --- a/Source/LexerParser/cmFortranLexer.cxx +++ b/Source/LexerParser/cmFortranLexer.cxx @@ -593,13 +593,13 @@ static const YY_CHAR yy_ec[256] = 13, 14, 1, 15, 1, 1, 1, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 21, 22, 1, 23, 24, 25, 26, 27, 28, - 24, 24, 29, 24, 24, 30, 31, 32, 33, 24, - 24, 34, 35, 36, 37, 24, 24, 24, 24, 24, - 1, 38, 1, 1, 39, 1, 23, 40, 41, 42, + 29, 29, 30, 29, 29, 31, 32, 33, 34, 29, + 29, 35, 36, 37, 38, 29, 29, 29, 29, 29, + 1, 39, 1, 1, 40, 1, 23, 24, 41, 42, - 43, 44, 24, 24, 45, 24, 24, 46, 31, 47, - 33, 24, 24, 34, 48, 36, 49, 24, 24, 24, - 24, 24, 1, 1, 1, 1, 1, 1, 1, 1, + 43, 44, 29, 29, 45, 29, 29, 46, 32, 47, + 34, 29, 29, 35, 48, 37, 49, 29, 29, 29, + 29, 29, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -621,7 +621,7 @@ static const YY_CHAR yy_meta[50] = 1, 2, 2, 3, 4, 3, 3, 1, 1, 3, 3, 3, 3, 1, 3, 5, 3, 3, 1, 3, 6, 1, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 1, 5, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 1, 5, 7, 7, 7, 7, 7, 7, 7, 7, 7 } ; @@ -629,28 +629,28 @@ static const flex_int16_t yy_base[219] = { 0, 0, 48, 0, 49, 464, 56, 52, 57, 62, 68, 466, 0, 468, 468, 462, 468, 74, 81, 468, 468, - 468, 468, 447, 468, 442, 440, 0, 41, 42, 428, - 43, 42, 91, 119, 97, 157, 455, 206, 245, 468, - 454, 101, 468, 468, 0, 455, 468, 105, 430, 424, - 62, 68, 119, 141, 468, 468, 468, 111, 0, 59, - 98, 88, 415, 109, 158, 468, 0, 162, 293, 0, - 163, 411, 107, 122, 408, 405, 446, 342, 447, 468, - 0, 444, 169, 173, 420, 421, 132, 404, 90, 404, - 179, 185, 191, 227, 295, 397, 0, 146, 178, 149, - - 412, 0, 208, 206, 398, 171, 399, 170, 399, 391, - 387, 422, 417, 221, 468, 374, 365, 347, 347, 334, - 335, 335, 330, 334, 259, 340, 188, 340, 327, 327, - 327, 324, 325, 325, 320, 322, 319, 355, 354, 325, - 327, 468, 468, 310, 309, 309, 300, 301, 273, 273, - 275, 277, 297, 468, 468, 293, 289, 283, 275, 305, - 261, 238, 237, 214, 468, 468, 468, 196, 197, 189, - 277, 181, 0, 274, 112, 468, 468, 105, 103, 311, - 468, 233, 0, 468, 468, 83, 76, 0, 281, 282, - 468, 468, 52, 468, 468, 468, 468, 23, 287, 298, - - 327, 468, 0, 0, 329, 0, 31, 468, 468, 381, - 388, 394, 397, 404, 411, 418, 425, 432 + 468, 468, 447, 468, 442, 440, 0, 19, 41, 427, + 47, 41, 90, 119, 97, 158, 455, 207, 247, 468, + 454, 101, 468, 468, 0, 455, 468, 105, 430, 423, + 62, 67, 119, 151, 468, 468, 468, 121, 0, 90, + 93, 110, 431, 112, 142, 468, 0, 160, 295, 0, + 162, 411, 123, 102, 408, 405, 446, 344, 447, 468, + 0, 444, 170, 174, 420, 421, 132, 404, 95, 404, + 180, 186, 192, 228, 297, 397, 0, 168, 144, 52, + + 411, 0, 204, 217, 397, 179, 390, 170, 389, 378, + 364, 390, 389, 230, 468, 363, 355, 337, 337, 334, + 335, 335, 330, 334, 187, 339, 267, 339, 327, 327, + 327, 324, 325, 325, 318, 319, 318, 354, 352, 323, + 327, 468, 468, 310, 307, 305, 297, 297, 275, 275, + 277, 279, 287, 468, 468, 286, 283, 273, 196, 307, + 200, 238, 234, 210, 468, 468, 468, 174, 171, 162, + 279, 182, 0, 269, 150, 468, 468, 137, 109, 323, + 468, 239, 0, 468, 468, 72, 71, 0, 283, 283, + 468, 468, 51, 468, 468, 468, 468, 37, 283, 288, + + 330, 468, 0, 0, 331, 0, 52, 468, 468, 384, + 391, 397, 400, 407, 414, 421, 428, 435 } ; static const flex_int16_t yy_def[219] = @@ -685,53 +685,53 @@ static const flex_int16_t yy_nxt[518] = { 0, 12, 13, 14, 13, 13, 15, 16, 12, 17, 18, 19, 20, 21, 12, 22, 12, 23, 24, 12, 25, - 12, 26, 27, 27, 27, 27, 28, 27, 29, 27, - 30, 27, 27, 27, 31, 27, 32, 33, 34, 27, + 12, 26, 27, 27, 27, 27, 28, 27, 27, 29, + 27, 30, 27, 27, 27, 31, 27, 32, 33, 34, 27, 27, 28, 27, 29, 27, 27, 31, 32, 35, - 35, 208, 35, 35, 41, 36, 36, 35, 37, 41, - 35, 42, 43, 36, 41, 202, 42, 43, 44, 38, - 41, 42, 60, 61, 44, 48, 64, 42, 48, 63, - 39, 39, 53, 53, 97, 53, 54, 60, 61, 64, - 55, 63, 65, 66, 201, 65, 39, 39, 68, 49, - - 97, 68, 83, 84, 69, 83, 48, 87, 88, 48, - 50, 89, 95, 100, 90, 95, 51, 198, 52, 45, - 53, 53, 98, 53, 54, 197, 45, 45, 55, 100, - 49, 121, 45, 99, 67, 102, 122, 45, 98, 45, - 45, 50, 92, 53, 193, 92, 93, 51, 192, 52, - 94, 102, 106, 107, 191, 96, 45, 67, 70, 65, - 66, 70, 65, 68, 104, 108, 68, 104, 109, 69, - 83, 84, 71, 83, 114, 125, 118, 114, 71, 119, - 92, 53, 115, 92, 93, 127, 92, 53, 94, 92, - 93, 125, 92, 53, 94, 92, 93, 127, 72, 73, - - 94, 74, 75, 189, 126, 76, 78, 104, 80, 104, - 104, 133, 104, 78, 78, 130, 134, 151, 131, 78, - 126, 78, 114, 103, 78, 114, 78, 78, 92, 53, - 115, 92, 93, 151, 195, 195, 94, 187, 186, 185, - 184, 183, 182, 78, 78, 79, 79, 80, 79, 79, + 35, 60, 35, 35, 41, 36, 36, 35, 37, 41, + 35, 42, 43, 36, 41, 60, 42, 43, 44, 38, + 41, 42, 208, 61, 44, 48, 64, 42, 48, 202, + 39, 39, 53, 53, 63, 53, 54, 61, 64, 127, + 55, 65, 66, 201, 65, 63, 39, 39, 68, 49, + + 127, 68, 83, 84, 69, 83, 48, 87, 88, 48, + 89, 50, 198, 90, 197, 97, 51, 98, 52, 45, + 53, 53, 95, 53, 54, 95, 45, 45, 55, 99, + 49, 97, 45, 98, 67, 100, 121, 45, 102, 45, + 45, 122, 50, 65, 66, 108, 65, 51, 109, 52, + 193, 100, 92, 53, 102, 92, 93, 45, 67, 70, + 94, 68, 70, 104, 68, 96, 104, 69, 106, 107, + 126, 83, 84, 71, 83, 114, 118, 71, 114, 119, + 192, 92, 53, 115, 92, 93, 126, 92, 53, 94, + 92, 93, 191, 92, 53, 94, 92, 93, 125, 72, + + 73, 94, 74, 75, 189, 104, 76, 78, 104, 80, + 187, 133, 186, 125, 78, 78, 134, 185, 104, 103, + 78, 104, 78, 130, 149, 78, 131, 78, 78, 92, + 53, 114, 92, 93, 114, 149, 184, 94, 183, 115, + 195, 195, 182, 181, 179, 78, 78, 79, 79, 80, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, - 81, 79, 79, 79, 79, 79, 79, 81, 81, 81, + 79, 79, 81, 79, 79, 79, 79, 79, 79, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 79, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 81, 81, 70, 149, 95, 70, 171, 95, - - 172, 173, 174, 188, 181, 199, 180, 149, 103, 180, - 190, 200, 180, 203, 171, 180, 172, 173, 174, 188, - 103, 199, 190, 179, 204, 178, 103, 200, 205, 203, - 205, 205, 177, 205, 72, 73, 176, 74, 75, 96, - 204, 76, 78, 175, 80, 206, 170, 206, 169, 78, - 78, 168, 167, 166, 165, 78, 164, 78, 163, 162, - 78, 161, 78, 78, 160, 159, 158, 157, 156, 155, - 154, 153, 152, 150, 148, 147, 146, 145, 144, 78, - 78, 40, 40, 40, 40, 40, 40, 40, 45, 143, - 142, 141, 45, 45, 46, 46, 46, 46, 46, 46, - - 46, 59, 140, 59, 79, 79, 79, 79, 79, 79, - 79, 91, 91, 91, 91, 91, 91, 91, 194, 194, - 194, 139, 194, 194, 194, 196, 138, 196, 137, 196, - 196, 196, 207, 207, 207, 207, 207, 136, 207, 135, - 132, 129, 128, 124, 123, 120, 117, 116, 113, 80, + 81, 81, 81, 81, 81, 79, 81, 81, 81, 81, + 81, 81, 81, 81, 81, 81, 70, 151, 95, 70, + + 171, 95, 172, 173, 174, 188, 190, 199, 180, 203, + 103, 180, 151, 200, 204, 178, 171, 190, 172, 173, + 174, 188, 103, 199, 180, 203, 177, 180, 200, 176, + 204, 205, 205, 175, 205, 205, 72, 73, 103, 74, + 75, 96, 170, 76, 78, 169, 80, 168, 206, 206, + 167, 78, 78, 166, 165, 164, 163, 78, 162, 78, + 161, 160, 78, 159, 78, 78, 158, 157, 156, 155, + 154, 153, 152, 150, 148, 147, 146, 145, 144, 143, + 142, 141, 78, 78, 40, 40, 40, 40, 40, 40, + 40, 45, 140, 139, 138, 45, 45, 46, 46, 46, + + 46, 46, 46, 46, 59, 137, 59, 79, 79, 79, + 79, 79, 79, 79, 91, 91, 91, 91, 91, 91, + 91, 194, 194, 194, 136, 194, 194, 194, 196, 135, + 196, 132, 196, 196, 196, 207, 207, 207, 207, 207, + 129, 207, 128, 124, 123, 120, 117, 116, 113, 80, 112, 111, 110, 105, 101, 86, 85, 47, 82, 77, 62, 58, 57, 56, 47, 209, 37, 11, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, @@ -749,50 +749,50 @@ static const flex_int16_t yy_chk[518] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 4, 207, 2, 4, 7, 2, 4, 6, 6, 8, - 6, 7, 7, 6, 9, 198, 8, 8, 9, 6, - 10, 9, 28, 29, 10, 17, 32, 10, 17, 31, - 6, 6, 18, 18, 60, 18, 18, 28, 29, 32, - 18, 31, 33, 33, 193, 33, 6, 6, 35, 17, - - 60, 35, 42, 42, 35, 42, 48, 51, 51, 48, - 17, 52, 58, 62, 52, 58, 17, 187, 17, 34, - 53, 53, 61, 53, 53, 186, 34, 34, 53, 62, - 48, 89, 34, 61, 34, 64, 89, 34, 61, 34, - 34, 48, 54, 54, 179, 54, 54, 48, 178, 48, - 54, 64, 73, 73, 175, 58, 34, 34, 36, 65, - 65, 36, 65, 68, 71, 74, 68, 71, 74, 68, - 83, 83, 36, 83, 84, 98, 87, 84, 71, 87, - 91, 91, 84, 91, 91, 100, 92, 92, 91, 92, - 92, 98, 93, 93, 92, 93, 93, 100, 36, 36, - - 93, 36, 36, 172, 99, 36, 38, 104, 38, 103, - 104, 108, 103, 38, 38, 106, 108, 127, 106, 38, - 99, 38, 114, 103, 38, 114, 38, 38, 94, 94, - 114, 94, 94, 127, 182, 182, 94, 170, 169, 168, - 164, 163, 162, 38, 38, 39, 39, 39, 39, 39, + 4, 28, 2, 4, 7, 2, 4, 6, 6, 8, + 6, 7, 7, 6, 9, 28, 8, 8, 9, 6, + 10, 9, 207, 29, 10, 17, 32, 10, 17, 198, + 6, 6, 18, 18, 31, 18, 18, 29, 32, 100, + 18, 33, 33, 193, 33, 31, 6, 6, 35, 17, + + 100, 35, 42, 42, 35, 42, 48, 51, 51, 48, + 52, 17, 187, 52, 186, 60, 17, 61, 17, 34, + 53, 53, 58, 53, 53, 58, 34, 34, 53, 61, + 48, 60, 34, 61, 34, 62, 89, 34, 64, 34, + 34, 89, 48, 65, 65, 74, 65, 48, 74, 48, + 179, 62, 54, 54, 64, 54, 54, 34, 34, 36, + 54, 68, 36, 71, 68, 58, 71, 68, 73, 73, + 99, 83, 83, 36, 83, 84, 87, 71, 84, 87, + 178, 91, 91, 84, 91, 91, 99, 92, 92, 91, + 92, 92, 175, 93, 93, 92, 93, 93, 98, 36, + + 36, 93, 36, 36, 172, 103, 36, 38, 103, 38, + 170, 108, 169, 98, 38, 38, 108, 168, 104, 103, + 38, 104, 38, 106, 125, 38, 106, 38, 38, 94, + 94, 114, 94, 94, 114, 125, 164, 94, 163, 114, + 182, 182, 162, 161, 159, 38, 38, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, - 39, 39, 39, 39, 69, 125, 95, 69, 149, 95, - - 150, 151, 152, 171, 161, 189, 160, 125, 69, 160, - 174, 190, 180, 199, 149, 180, 150, 151, 152, 171, - 160, 189, 174, 159, 200, 158, 180, 190, 201, 199, - 205, 201, 157, 205, 69, 69, 156, 69, 69, 95, - 200, 69, 78, 153, 78, 201, 148, 205, 147, 78, - 78, 146, 145, 144, 141, 78, 140, 78, 139, 138, - 78, 137, 78, 78, 136, 135, 134, 133, 132, 131, - 130, 129, 128, 126, 124, 123, 122, 121, 120, 78, - 78, 210, 210, 210, 210, 210, 210, 210, 211, 119, - 118, 117, 211, 211, 212, 212, 212, 212, 212, 212, - - 212, 213, 116, 213, 214, 214, 214, 214, 214, 214, - 214, 215, 215, 215, 215, 215, 215, 215, 216, 216, - 216, 113, 216, 216, 216, 217, 112, 217, 111, 217, - 217, 217, 218, 218, 218, 218, 218, 110, 218, 109, - 107, 105, 101, 96, 90, 88, 86, 85, 82, 79, + 39, 39, 39, 39, 39, 39, 69, 127, 95, 69, + + 149, 95, 150, 151, 152, 171, 174, 189, 160, 199, + 69, 160, 127, 190, 200, 158, 149, 174, 150, 151, + 152, 171, 160, 189, 180, 199, 157, 180, 190, 156, + 200, 201, 205, 153, 201, 205, 69, 69, 180, 69, + 69, 95, 148, 69, 78, 147, 78, 146, 201, 205, + 145, 78, 78, 144, 141, 140, 139, 78, 138, 78, + 137, 136, 78, 135, 78, 78, 134, 133, 132, 131, + 130, 129, 128, 126, 124, 123, 122, 121, 120, 119, + 118, 117, 78, 78, 210, 210, 210, 210, 210, 210, + 210, 211, 116, 113, 112, 211, 211, 212, 212, 212, + + 212, 212, 212, 212, 213, 111, 213, 214, 214, 214, + 214, 214, 214, 214, 215, 215, 215, 215, 215, 215, + 215, 216, 216, 216, 110, 216, 216, 216, 217, 109, + 217, 107, 217, 217, 217, 218, 218, 218, 218, 218, + 105, 218, 101, 96, 90, 88, 86, 85, 82, 79, 77, 76, 75, 72, 63, 50, 49, 46, 41, 37, 30, 26, 25, 23, 15, 11, 5, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, 209, diff --git a/Source/LexerParser/cmFortranLexer.in.l b/Source/LexerParser/cmFortranLexer.in.l index 9acba4c..b7e837b 100644 --- a/Source/LexerParser/cmFortranLexer.in.l +++ b/Source/LexerParser/cmFortranLexer.in.l @@ -146,7 +146,7 @@ $[ \t]*endif { return F90PPR_ENDIF; } [Ii][Nn][Cc][Ll][Uu][Dd][Ee] { return INCLUDE; } [Ii][Nn][Tt][Ee][Rr][Ff][Aa][Cc][Ee] { return INTERFACE; } [Mm][Oo][Dd][Uu][Ll][Ee] { return MODULE; } -[Ss][Uu][bb][Mm][Oo][Dd][Uu][Ll][Ee] { return SUBMODULE; } +[Ss][Uu][Bb][Mm][Oo][Dd][Uu][Ll][Ee] { return SUBMODULE; } [Uu][Ss][Ee] { return USE; } [a-zA-Z_][a-zA-Z_0-9]* { diff --git a/Source/QtDialog/AddCacheEntry.cxx b/Source/QtDialog/AddCacheEntry.cxx index 6284ac9..70610d7 100644 --- a/Source/QtDialog/AddCacheEntry.cxx +++ b/Source/QtDialog/AddCacheEntry.cxx @@ -21,8 +21,8 @@ AddCacheEntry::AddCacheEntry(QWidget* p, const QStringList& varNames, , VarTypes(varTypes) { this->setupUi(this); - for (int i = 0; i < NumTypes; i++) { - this->Type->addItem(TypeStrings[i]); + for (auto const& elem : TypeStrings) { + this->Type->addItem(elem); } QWidget* cb = new QCheckBox(); QWidget* path = new QCMakePathEditor(); diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 330b747..9ce0323 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -19,9 +19,20 @@ if (Qt5Widgets_FOUND) macro(qt4_add_resources) qt5_add_resources(${ARGN}) endmacro() + set(CMake_QT_LIBRARIES ${Qt5Widgets_LIBRARIES}) set(QT_QTMAIN_LIBRARY ${Qt5Core_QTMAIN_LIBRARIES}) + # Try to find the package WinExtras for the task bar progress + if(WIN32) + find_package(Qt5WinExtras QUIET) + if (Qt5WinExtras_FOUND) + include_directories(${Qt5WinExtras_INCLUDE_DIRS}) + add_definitions(-DQT_WINEXTRAS) + list(APPEND CMake_QT_LIBRARIES ${Qt5WinExtras_LIBRARIES}) + endif() + endif() + # Remove this when the minimum version of Qt is 4.6. add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0) diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 3761bd3..444a980 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -21,6 +21,11 @@ #include <QToolButton> #include <QUrl> +#ifdef QT_WINEXTRAS +# include <QWinTaskbarButton> +# include <QWinTaskbarProgress> +#endif + #include "AddCacheEntry.h" #include "FirstConfigure.h" #include "QCMake.h" @@ -294,6 +299,12 @@ void CMakeSetupDialog::initialize() } else { this->onBinaryDirectoryChanged(this->BinaryDirectory->lineEdit()->text()); } + +#ifdef QT_WINEXTRAS + this->TaskbarButton = new QWinTaskbarButton(this); + this->TaskbarButton->setWindow(this->windowHandle()); + this->TaskbarButton->setOverlayIcon(QIcon(":/loading.png")); +#endif } CMakeSetupDialog::~CMakeSetupDialog() @@ -381,6 +392,10 @@ void CMakeSetupDialog::doConfigure() this->CacheValues->scrollToTop(); } this->ProgressBar->reset(); + +#ifdef QT_WINEXTRAS + this->TaskbarButton->progress()->reset(); +#endif } bool CMakeSetupDialog::doConfigureInternal() @@ -495,6 +510,9 @@ void CMakeSetupDialog::doGenerate() this->enterState(ReadyConfigure); this->ProgressBar->reset(); +#ifdef QT_WINEXTRAS + this->TaskbarButton->progress()->reset(); +#endif this->ConfigureNeeded = true; } @@ -674,6 +692,12 @@ void CMakeSetupDialog::showProgress(const QString& /*msg*/, float percent) { percent = (percent * ProgressFactor) + ProgressOffset; this->ProgressBar->setValue(qRound(percent * 100)); + +#ifdef QT_WINEXTRAS + QWinTaskbarProgress* progress = this->TaskbarButton->progress(); + progress->setVisible(true); + progress->setValue(qRound(percent * 100)); +#endif } void CMakeSetupDialog::error(const QString& msg) diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index 1cce35c..39c1053 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -15,6 +15,10 @@ class CMakeCacheModel; class QProgressBar; class QToolButton; +#ifdef QT_WINEXTRAS +class QWinTaskbarButton; +#endif + /// Qt user interface for CMake class CMakeSetupDialog : public QMainWindow @@ -118,6 +122,10 @@ protected: QEventLoop LocalLoop; +#ifdef QT_WINEXTRAS + QWinTaskbarButton* TaskbarButton; +#endif + float ProgressOffset; float ProgressFactor; }; diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index c2b6575..56c71c2 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -649,16 +649,6 @@ bool cmCTest::InitializeFromCommand(cmCTestStartCommand* command) command->SetError(m); return false; } - } else { - cmCTestOptionalLog(this, WARNING, - "Cannot locate CTest configuration: in BuildDirectory: " - << bld_dir_fname << std::endl, - command->ShouldBeQuiet()); - cmCTestOptionalLog( - this, WARNING, - "Cannot locate CTest configuration: in SourceDirectory: " - << src_dir_fname << std::endl, - command->ShouldBeQuiet()); } this->SetCTestConfigurationFromCMakeVariable(mf, "NightlyStartTime", diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index 0ccd68a..27f9131 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -684,7 +684,7 @@ cmELF::cmELF(const char* fname) std::unique_ptr<cmsys::ifstream> fin(new cmsys::ifstream(fname)); // Quit now if the file could not be opened. - if (!fin.get() || !*fin) { + if (!fin || !*fin) { this->ErrorMessage = "Error opening input file."; return; } diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index bddc3c4..df27c62 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -79,7 +79,7 @@ bool cmExportFileGenerator::GenerateImportFile() ap->SetCopyIfDifferent(true); foutPtr = std::move(ap); } - if (!foutPtr.get() || !*foutPtr) { + if (!foutPtr || !*foutPtr) { std::string se = cmSystemTools::GetLastSystemError(); std::ostringstream e; e << "cannot write to file \"" << this->MainImportFile << "\": " << se; diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index 34c88ab..73ff5a1 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -10,6 +10,7 @@ #include <algorithm> #include <assert.h> +#include <cmath> #include <ctype.h> #include <memory> // IWYU pragma: keep #include <sstream> @@ -2605,10 +2606,10 @@ public: bool UpdatePercentage(double value, double total, std::string& status) { - int OldPercentage = this->CurrentPercentage; + long OldPercentage = this->CurrentPercentage; if (total > 0.0) { - this->CurrentPercentage = static_cast<int>(value / total * 100.0 + 0.5); + this->CurrentPercentage = std::lround(value / total * 100.0); if (this->CurrentPercentage > 100) { // Avoid extra progress reports for unexpected data beyond total. this->CurrentPercentage = 100; @@ -2630,7 +2631,7 @@ public: cmFileCommand* GetFileCommand() { return this->FileCommand; } private: - int CurrentPercentage; + long CurrentPercentage; cmFileCommand* FileCommand; std::string Text; }; @@ -2827,7 +2828,7 @@ bool cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args) std::string algo = i->substr(0, pos); expectedHash = cmSystemTools::LowerCase(i->substr(pos + 1)); hash = std::unique_ptr<cmCryptoHash>(cmCryptoHash::New(algo.c_str())); - if (!hash.get()) { + if (!hash) { std::string err = "DOWNLOAD EXPECTED_HASH given unknown ALGO: "; err += algo; this->SetError(err); diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx index 9ff967c..739c9c0 100644 --- a/Source/cmForEachCommand.cxx +++ b/Source/cmForEachCommand.cxx @@ -38,7 +38,7 @@ bool cmForEachFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff, // Remove the function blocker for this scope or bail. std::unique_ptr<cmFunctionBlocker> fb( mf.RemoveFunctionBlocker(this, lff)); - if (!fb.get()) { + if (!fb) { return false; } diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 49b97fb..eb3df16 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -283,14 +283,39 @@ static const struct InListNode : public cmGeneratorExpressionNode std::string Evaluate( const std::vector<std::string>& parameters, - cmGeneratorExpressionContext* /*context*/, + cmGeneratorExpressionContext* context, const GeneratorExpressionContent* /*content*/, cmGeneratorExpressionDAGChecker* /*dagChecker*/) const override { - std::vector<std::string> values; - cmSystemTools::ExpandListArgument(parameters[1], values); - if (values.empty()) { - return "0"; + std::vector<std::string> values, checkValues; + bool check = false; + switch (context->LG->GetPolicyStatus(cmPolicies::CMP0085)) { + case cmPolicies::WARN: + if (parameters.front().empty()) { + check = true; + cmSystemTools::ExpandListArgument(parameters[1], checkValues, true); + } + CM_FALLTHROUGH; + case cmPolicies::OLD: + cmSystemTools::ExpandListArgument(parameters[1], values); + if (check && values != checkValues) { + std::ostringstream e; + e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0085) + << "\nSearch Item:\n \"" << parameters.front() + << "\"\nList:\n \"" << parameters[1] << "\"\n"; + context->LG->GetCMakeInstance()->IssueMessage( + cmake::AUTHOR_WARNING, e.str(), context->Backtrace); + return "0"; + } + if (values.empty()) { + return "0"; + } + break; + case cmPolicies::REQUIRED_IF_USED: + case cmPolicies::REQUIRED_ALWAYS: + case cmPolicies::NEW: + cmSystemTools::ExpandListArgument(parameters[1], values, true); + break; } return std::find(values.cbegin(), values.cend(), parameters.front()) == diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 0b28d1e..80d81d5 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4379,8 +4379,7 @@ const char* impliedValue<const char*>(const char* /*unused*/) return ""; } template <> -std::string impliedValue<std::string>( - std::string /*unused*/) // NOLINT(clang-tidy) +std::string impliedValue<std::string>(std::string /*unused*/) // NOLINT(*) { return std::string(); } diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index fbc756c..0271b6f 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -112,7 +112,7 @@ std::string cmGlobalNinjaGenerator::EncodeLiteral(const std::string& lit) std::string cmGlobalNinjaGenerator::EncodePath(const std::string& path) { - std::string result = path; // NOLINT(clang-tidy) + std::string result = path; #ifdef _WIN32 if (this->IsGCCOnWindows()) std::replace(result.begin(), result.end(), '\\', '/'); @@ -254,7 +254,7 @@ void cmGlobalNinjaGenerator::WriteCustomCommandBuild( bool restat, const cmNinjaDeps& outputs, const cmNinjaDeps& deps, const cmNinjaDeps& orderOnly) { - std::string cmd = command; // NOLINT(clang-tidy) + std::string cmd = command; // NOLINT(*) #ifdef _WIN32 if (cmd.empty()) // TODO Shouldn't an empty command be handled by ninja? @@ -1940,7 +1940,7 @@ int cmcmd_cmake_ninja_dyndep(std::vector<std::string>::const_iterator argBeg, cm.SetHomeOutputDirectory(dir_top_bld); std::unique_ptr<cmGlobalNinjaGenerator> ggd( static_cast<cmGlobalNinjaGenerator*>(cm.CreateGlobalGenerator("Ninja"))); - if (!ggd.get() || + if (!ggd || !ggd->WriteDyndepFile(dir_top_src, dir_top_bld, dir_cur_src, dir_cur_bld, arg_dd, arg_ddis, module_dir, linked_target_dirs)) { diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index c3ddb3e..92ee2e0 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -215,6 +215,10 @@ bool cmGlobalVisualStudio14Generator::IsWindowsStoreToolsetInstalled() const std::string cmGlobalVisualStudio14Generator::GetWindows10SDKMaxVersion() const { // The last Windows 10 SDK version that VS 2015 can target is 10.0.14393.0. + // + // "VS 2015 Users: The Windows 10 SDK (15063, 16299, 17134, 17763) is + // officially only supported for VS 2017." From: + // https://blogs.msdn.microsoft.com/chuckw/2018/10/02/windows-10-october-2018-update/ return "10.0.14393.0"; } @@ -287,28 +291,28 @@ std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion() // only the UCRT MSIs were installed for them. cmEraseIf(sdks, NoWindowsH()); - if (!sdks.empty()) { - // Only use the filename, which will be the SDK version. - for (std::string& i : sdks) { - i = cmSystemTools::GetFilenameName(i); - } + // Only use the filename, which will be the SDK version. + for (std::string& i : sdks) { + i = cmSystemTools::GetFilenameName(i); + } - // Sort the results to make sure we select the most recent one. - std::sort(sdks.begin(), sdks.end(), cmSystemTools::VersionCompareGreater); + // Skip SDKs that cannot be used with our toolset. + std::string maxVersion = this->GetWindows10SDKMaxVersion(); + if (!maxVersion.empty()) { + cmEraseIf(sdks, WindowsSDKTooRecent(maxVersion)); + } - // Skip SDKs that cannot be used with our toolset. - std::string maxVersion = this->GetWindows10SDKMaxVersion(); - if (!maxVersion.empty()) { - cmEraseIf(sdks, WindowsSDKTooRecent(maxVersion)); - } + // Sort the results to make sure we select the most recent one. + std::sort(sdks.begin(), sdks.end(), cmSystemTools::VersionCompareGreater); - // Look for a SDK exactly matching the requested target version. - for (std::string const& i : sdks) { - if (cmSystemTools::VersionCompareEqual(i, this->SystemVersion)) { - return i; - } + // Look for a SDK exactly matching the requested target version. + for (std::string const& i : sdks) { + if (cmSystemTools::VersionCompareEqual(i, this->SystemVersion)) { + return i; } + } + if (!sdks.empty()) { // Use the latest Windows 10 SDK since the exact version is not available. return sdks.at(0); } diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index ae4041d..5d952da 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -39,7 +39,7 @@ bool cmIfFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff, // Remove the function blocker for this scope or bail. std::unique_ptr<cmFunctionBlocker> fb( mf.RemoveFunctionBlocker(this, lff)); - if (!fb.get()) { + if (!fb) { return false; } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 790f6e0..5ad8ef6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2342,7 +2342,7 @@ cmMakefile::AppleSDK cmMakefile::GetAppleSDKType() const { "watchsimulator", AppleSDK::WatchSimulator }, }; - for (auto entry : sdkDatabase) { + for (auto const& entry : sdkDatabase) { if (sdkRoot.find(entry.name) == 0 || sdkRoot.find(std::string("/") + entry.name) != std::string::npos) { return entry.sdk; diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h index 6b1314f..9985d63 100644 --- a/Source/cmPolicies.h +++ b/Source/cmPolicies.h @@ -249,7 +249,9 @@ class cmMakefile; 0, cmPolicies::WARN) \ SELECT(POLICY, CMP0084, \ "The FindQt module does not exist for find_package().", 3, 14, 0, \ - cmPolicies::WARN) + cmPolicies::WARN) \ + SELECT(POLICY, CMP0085, "$<IN_LIST:...> handles empty list items.", 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/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index e71feac..582faf6 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1485,7 +1485,7 @@ bool cmQtAutoGenInitializer::GetUicExecutable() } // Test uic command - if (err.empty()) { + if (err.empty() && !this->Uic.Executable.empty()) { if (cmSystemTools::FileExists(this->Uic.Executable, true)) { std::vector<std::string> command; command.push_back(this->Uic.Executable); diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index d5bcfc2..9d43d19 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -37,7 +37,7 @@ bool cmWhileFunctionBlocker::IsFunctionBlocked(const cmListFileFunction& lff, // Remove the function blocker for this scope or bail. std::unique_ptr<cmFunctionBlocker> fb( mf.RemoveFunctionBlocker(this, lff)); - if (!fb.get()) { + if (!fb) { return false; } diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 35730b8..2ac7f4d 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2596,7 +2596,7 @@ bool cmake::Open(const std::string& dir, bool dryRun) std::unique_ptr<cmGlobalGenerator> gen( this->CreateGlobalGenerator(fullName)); - if (!gen.get()) { + if (!gen) { std::cerr << "Error: could create CMAKE_GENERATOR \"" << fullName << "\"\n"; return false; diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 96cdfd0..8b5f2e9 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1388,6 +1388,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindGDAL) endif() + if(CMake_TEST_FindGIF) + add_subdirectory(FindGIF) + endif() + if(CMake_TEST_FindGSL) add_subdirectory(FindGSL) endif() diff --git a/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in b/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in index 670a874..0f56781 100644 --- a/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in +++ b/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 2.8.10) set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/VSProjectInSubdir") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestBuildCommandProjectInSubdir/Nested") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") -set(CTEST_PROJECT_NAME "VSProjectInSubdir") set(CTEST_BUILD_CONFIGURATION "@CTestTest_CONFIG@") ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) diff --git a/Tests/CTestConfig/script.cmake.in b/Tests/CTestConfig/script.cmake.in index b6ccedb..973c7b8 100644 --- a/Tests/CTestConfig/script.cmake.in +++ b/Tests/CTestConfig/script.cmake.in @@ -1,7 +1,6 @@ set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") set(CTEST_CMAKE_GENERATOR_PLATFORM "@CMAKE_GENERATOR_PLATFORM@") set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") -set(CTEST_PROJECT_NAME "CTestConfig") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestConfig") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestConfig/@cfg@-script") diff --git a/Tests/CTestCoverageCollectGCOV/test.cmake.in b/Tests/CTestCoverageCollectGCOV/test.cmake.in index d48ef61..2c98876 100644 --- a/Tests/CTestCoverageCollectGCOV/test.cmake.in +++ b/Tests/CTestCoverageCollectGCOV/test.cmake.in @@ -1,5 +1,4 @@ cmake_minimum_required(VERSION 2.8.12) -set(CTEST_PROJECT_NAME "TestProject") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestCoverageCollectGCOV/TestProject") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestCoverageCollectGCOV/TestProject") set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") diff --git a/Tests/CTestTestBadExe/CTestConfig.cmake b/Tests/CTestTestBadExe/CTestConfig.cmake index c7286e2..fc5bffc 100644 --- a/Tests/CTestTestBadExe/CTestConfig.cmake +++ b/Tests/CTestTestBadExe/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestBadExe") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestBadGenerator/CTestConfig.cmake b/Tests/CTestTestBadGenerator/CTestConfig.cmake index 1e61bf4..fc5bffc 100644 --- a/Tests/CTestTestBadGenerator/CTestConfig.cmake +++ b/Tests/CTestTestBadGenerator/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestBadGenerator") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestCostSerial/CTestConfig.cmake b/Tests/CTestTestCostSerial/CTestConfig.cmake index 3ab99ac..faa91f0 100644 --- a/Tests/CTestTestCostSerial/CTestConfig.cmake +++ b/Tests/CTestTestCostSerial/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestCostSerial") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestCrash/CTestConfig.cmake b/Tests/CTestTestCrash/CTestConfig.cmake index 5c2ca0e..fc5bffc 100644 --- a/Tests/CTestTestCrash/CTestConfig.cmake +++ b/Tests/CTestTestCrash/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestCrash") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestCycle/CTestConfig.cmake b/Tests/CTestTestCycle/CTestConfig.cmake index 8aeb09b..fc5bffc 100644 --- a/Tests/CTestTestCycle/CTestConfig.cmake +++ b/Tests/CTestTestCycle/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestCycle") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestDepends/CTestConfig.cmake b/Tests/CTestTestDepends/CTestConfig.cmake index 7af9200..fc5bffc 100644 --- a/Tests/CTestTestDepends/CTestConfig.cmake +++ b/Tests/CTestTestDepends/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestDepends") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestFailure/CTestConfig.cmake b/Tests/CTestTestFailure/CTestConfig.cmake index 07e1be0..fc5bffc 100644 --- a/Tests/CTestTestFailure/CTestConfig.cmake +++ b/Tests/CTestTestFailure/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestFailure") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestFdSetSize/CTestConfig.cmake b/Tests/CTestTestFdSetSize/CTestConfig.cmake deleted file mode 100644 index b5f3c33..0000000 --- a/Tests/CTestTestFdSetSize/CTestConfig.cmake +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTestFdSetSize") diff --git a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake index 669b0fb..409d83a 100644 --- a/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_compiler_test_project/CTestConfig.cmake @@ -1,5 +1,4 @@ set(CTEST_USE_LAUNCHERS 1) -set(CTEST_PROJECT_NAME "CTestTestLaunchers") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake index 669b0fb..409d83a 100644 --- a/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_custom_command_test_project/CTestConfig.cmake @@ -1,5 +1,4 @@ set(CTEST_USE_LAUNCHERS 1) -set(CTEST_PROJECT_NAME "CTestTestLaunchers") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake index 669b0fb..409d83a 100644 --- a/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_linker_test_project/CTestConfig.cmake @@ -1,5 +1,4 @@ set(CTEST_USE_LAUNCHERS 1) -set(CTEST_PROJECT_NAME "CTestTestLaunchers") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestParallel/CTestConfig.cmake b/Tests/CTestTestParallel/CTestConfig.cmake index fc5b666..faa91f0 100644 --- a/Tests/CTestTestParallel/CTestConfig.cmake +++ b/Tests/CTestTestParallel/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestParallel") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestResourceLock/CTestConfig.cmake b/Tests/CTestTestResourceLock/CTestConfig.cmake index c118777..faa91f0 100644 --- a/Tests/CTestTestResourceLock/CTestConfig.cmake +++ b/Tests/CTestTestResourceLock/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestResourceLock") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestScheduler/CTestConfig.cmake b/Tests/CTestTestScheduler/CTestConfig.cmake index 797387b..faa91f0 100644 --- a/Tests/CTestTestScheduler/CTestConfig.cmake +++ b/Tests/CTestTestScheduler/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestScheduler") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake index da0c76b..fc5bffc 100644 --- a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake +++ b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestSkipReturnCode") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestStopTime/CTestConfig.cmake b/Tests/CTestTestStopTime/CTestConfig.cmake index 412283e..fc5bffc 100644 --- a/Tests/CTestTestStopTime/CTestConfig.cmake +++ b/Tests/CTestTestStopTime/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestStopTime") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestSubdir/CTestConfig.cmake b/Tests/CTestTestSubdir/CTestConfig.cmake index 47ebb92..faa91f0 100644 --- a/Tests/CTestTestSubdir/CTestConfig.cmake +++ b/Tests/CTestTestSubdir/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestSubdir") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestTimeout/CTestConfig.cmake b/Tests/CTestTestTimeout/CTestConfig.cmake index 13114f1..faa91f0 100644 --- a/Tests/CTestTestTimeout/CTestConfig.cmake +++ b/Tests/CTestTestTimeout/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestTimeout") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestUpload/CTestConfig.cmake b/Tests/CTestTestUpload/CTestConfig.cmake index a547088..95c79ff 100644 --- a/Tests/CTestTestUpload/CTestConfig.cmake +++ b/Tests/CTestTestUpload/CTestConfig.cmake @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestUpload") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set (CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestVerboseOutput/CTestConfig.cmake b/Tests/CTestTestVerboseOutput/CTestConfig.cmake index 4f96c79..faa91f0 100644 --- a/Tests/CTestTestVerboseOutput/CTestConfig.cmake +++ b/Tests/CTestTestVerboseOutput/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestVerboseOutput") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestTestZeroTimeout/CTestConfig.cmake b/Tests/CTestTestZeroTimeout/CTestConfig.cmake index 6094864..faa91f0 100644 --- a/Tests/CTestTestZeroTimeout/CTestConfig.cmake +++ b/Tests/CTestTestZeroTimeout/CTestConfig.cmake @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestTestZeroTimeout") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake index 61aa13b..0f8ec8e 100644 --- a/Tests/CTestUpdateCommon.cmake +++ b/Tests/CTestUpdateCommon.cmake @@ -130,7 +130,6 @@ function(create_content dir) # An example CTest project configuration file. file(WRITE ${TOP}/${dir}/CTestConfig.cmake "# CTest Configuration File -set(CTEST_PROJECT_NAME TestProject) set(CTEST_NIGHTLY_START_TIME \"21:00:00 EDT\") ") diff --git a/Tests/FindBoost/Test/CMakeLists.txt b/Tests/FindBoost/Test/CMakeLists.txt index 663f414..39e92c1 100644 --- a/Tests/FindBoost/Test/CMakeLists.txt +++ b/Tests/FindBoost/Test/CMakeLists.txt @@ -13,6 +13,9 @@ if(NOT Boost_PROGRAM_OPTIONS_FOUND) message(FATAL_ERROR "Optional Boost component \"program_options\" not found which is unexpected") endif(NOT Boost_PROGRAM_OPTIONS_FOUND) +add_definitions(-DCMAKE_EXPECTED_BOOST_VERSION="${Boost_VERSION}") +add_definitions(-DCMAKE_EXPECTED_BOOST_VERSION_COMPONENTS="${Boost_VERSION_STRING}") + add_executable(test_boost_tgt main.cxx) target_link_libraries(test_boost_tgt Boost::dynamic_linking diff --git a/Tests/FindBoost/Test/main.cxx b/Tests/FindBoost/Test/main.cxx index 6e8b5da..50ddadf 100644 --- a/Tests/FindBoost/Test/main.cxx +++ b/Tests/FindBoost/Test/main.cxx @@ -20,5 +20,20 @@ int main() boost::thread foo(threadmain); foo.join(); - return 0; + int version = BOOST_VERSION; + int major = version / 100000; + int minor = version / 100 % 1000; + int patch = version % 100; + char version_string[100]; + snprintf(version_string, sizeof(version_string), "%d.%d.%d", major, minor, + patch); + printf("Found Boost version %s, expected version %s\n", version_string, + CMAKE_EXPECTED_BOOST_VERSION_COMPONENTS); + int ret = strcmp(version_string, CMAKE_EXPECTED_BOOST_VERSION_COMPONENTS); + char raw_version_string[100]; + snprintf(raw_version_string, sizeof(raw_version_string), "%d", + BOOST_VERSION); + printf("Found Boost version %s, expected version %s\n", raw_version_string, + CMAKE_EXPECTED_BOOST_VERSION); + return ret | strcmp(raw_version_string, CMAKE_EXPECTED_BOOST_VERSION); } diff --git a/Tests/FindGIF/CMakeLists.txt b/Tests/FindGIF/CMakeLists.txt new file mode 100644 index 0000000..bac64af --- /dev/null +++ b/Tests/FindGIF/CMakeLists.txt @@ -0,0 +1,10 @@ +add_test(NAME FindGIF.Test COMMAND + ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION> + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindGIF/Test" + "${CMake_BINARY_DIR}/Tests/FindGIF/Test" + ${build_generator_args} + --build-project TestFindGIF + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION> + ) diff --git a/Tests/FindGIF/Test/CMakeLists.txt b/Tests/FindGIF/Test/CMakeLists.txt new file mode 100644 index 0000000..961e636 --- /dev/null +++ b/Tests/FindGIF/Test/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.4) +project(TestFindGIF C) +include(CTest) + +find_package(GIF REQUIRED) + +add_definitions(-DCMAKE_EXPECTED_GIF_VERSION="${GIF_VERSION}") + +add_executable(test_tgt main.c) +target_link_libraries(test_tgt GIF::GIF) +add_test(NAME test_tgt COMMAND test_tgt) + +add_executable(test_var main.c) +target_include_directories(test_var PRIVATE ${GIF_INCLUDE_DIRS}) +target_link_libraries(test_var PRIVATE ${GIF_LIBRARIES}) +add_test(NAME test_var COMMAND test_var) diff --git a/Tests/FindGIF/Test/main.c b/Tests/FindGIF/Test/main.c new file mode 100644 index 0000000..4ed72ec --- /dev/null +++ b/Tests/FindGIF/Test/main.c @@ -0,0 +1,35 @@ +#include <assert.h> +#include <stdio.h> +#include <string.h> + +#include <gif_lib.h> + +// GIFLIB before version 5 didn't know this macro +#ifndef GIFLIB_MAJOR +# define GIFLIB_MAJOR 4 +#endif + +int main() +{ + // because of the API changes we have to test different functions depending + // on the version of GIFLIB +#if GIFLIB_MAJOR >= 5 + // test the linker + GifErrorString(D_GIF_SUCCEEDED); + + // check the version + char gif_version_string[16]; + snprintf(gif_version_string, 16, "%i.%i.%i", GIFLIB_MAJOR, GIFLIB_MINOR, + GIFLIB_RELEASE); + + assert(strcmp(gif_version_string, CMAKE_EXPECTED_GIF_VERSION) == 0); +#else + // test the linker + GifLastError(); + + // unfortunately there is no way to check the version in older version of + // GIFLIB +#endif + + return 0; +} diff --git a/Tests/FortranModules/Submodules/child.f90 b/Tests/FortranModules/Submodules/child.f90 index 838ab61..c314835 100644 --- a/Tests/FortranModules/Submodules/child.f90 +++ b/Tests/FortranModules/Submodules/child.f90 @@ -1,10 +1,10 @@ ! Test the notation for a 1st-generation direct ! descendant of a parent module -submodule ( parent ) child +SUBMODULE ( parent ) child implicit none -contains +CONTAINS module function child_function() result(child_stuff) logical :: child_stuff child_stuff=.true. end function -end submodule child +END SUBMODULE child diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/CTestConfig.cmake.in b/Tests/RunCMake/CTestTimeoutAfterMatch/CTestConfig.cmake.in deleted file mode 100644 index 58b11af..0000000 --- a/Tests/RunCMake/CTestTimeoutAfterMatch/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "TimeoutAfterMatch@CASE_NAME@") diff --git a/Tests/RunCMake/FindBoost/NoCXX-stderr.txt b/Tests/RunCMake/FindBoost/NoCXX-stderr.txt new file mode 100644 index 0000000..8d98f9d --- /dev/null +++ b/Tests/RunCMake/FindBoost/NoCXX-stderr.txt @@ -0,0 +1 @@ +.* diff --git a/Tests/RunCMake/FindBoost/NoCXX.cmake b/Tests/RunCMake/FindBoost/NoCXX.cmake new file mode 100644 index 0000000..04b9cac --- /dev/null +++ b/Tests/RunCMake/FindBoost/NoCXX.cmake @@ -0,0 +1 @@ +find_package(Boost) diff --git a/Tests/RunCMake/FindBoost/RunCMakeTest.cmake b/Tests/RunCMake/FindBoost/RunCMakeTest.cmake index a153ae1..5d0577b 100644 --- a/Tests/RunCMake/FindBoost/RunCMakeTest.cmake +++ b/Tests/RunCMake/FindBoost/RunCMakeTest.cmake @@ -1,3 +1,4 @@ include(RunCMake) run_cmake(CMakePackage) +run_cmake(NoCXX) diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-NEW-check.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW-check.cmake new file mode 100644 index 0000000..520bf3d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW-check.cmake @@ -0,0 +1,6 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/CMP0085-NEW-generated.txt" content) + +set(expected "101011") +if(NOT content STREQUAL expected) + set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]") +endif() diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-NEW.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW.cmake new file mode 100644 index 0000000..ee85c0d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT CMP0085-NEW-generated.txt CONTENT + "$<IN_LIST:,>$<IN_LIST:,a>$<IN_LIST:,;a>$<IN_LIST:a,>$<IN_LIST:a,a>$<IN_LIST:a,;a>" + ) diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-check.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-check.cmake new file mode 100644 index 0000000..c387db7 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-check.cmake @@ -0,0 +1,6 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/CMP0085-OLD-generated.txt" content) + +set(expected "000011") +if(NOT content STREQUAL expected) + set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]") +endif() diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-OLD.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD.cmake new file mode 100644 index 0000000..31b6a51 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT CMP0085-OLD-generated.txt CONTENT + "$<IN_LIST:,>$<IN_LIST:,a>$<IN_LIST:,;a>$<IN_LIST:a,>$<IN_LIST:a,a>$<IN_LIST:a,;a>" + ) diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-check.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-check.cmake new file mode 100644 index 0000000..f7bcf0f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-check.cmake @@ -0,0 +1,6 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/CMP0085-WARN-generated.txt" content) + +set(expected "000011") +if(NOT content STREQUAL expected) + set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]") +endif() diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-stderr.txt b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-stderr.txt new file mode 100644 index 0000000..81bd450 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-stderr.txt @@ -0,0 +1,33 @@ +CMake Warning \(dev\) at CMP0085-WARN\.cmake:[0-9]+ \(file\): + Policy CMP0085 is not set: \$<IN_LIST:\.\.\.> handles empty list items\. Run + "cmake --help-policy CMP0085" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. + + Search Item: + + "" + + List: + + "" + +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. + +CMake Warning \(dev\) at CMP0085-WARN\.cmake:[0-9]+ \(file\): + Policy CMP0085 is not set: \$<IN_LIST:\.\.\.> handles empty list items\. Run + "cmake --help-policy CMP0085" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. + + Search Item: + + "" + + List: + + ";a" + +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-WARN.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN.cmake new file mode 100644 index 0000000..59c7826 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT CMP0085-WARN-generated.txt CONTENT + "$<IN_LIST:,>$<IN_LIST:,a>$<IN_LIST:,;a>$<IN_LIST:a,>$<IN_LIST:a,a>$<IN_LIST:a,;a>" + ) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 3905c5f..013117e 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -61,3 +61,13 @@ if(LINKER_SUPPORTS_PDB) else() run_cmake(NonValidCompiler-TARGET_PDB_FILE) endif() + +set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=OLD) +run_cmake(CMP0085-OLD) +unset(RunCMake_TEST_OPTIONS) + +run_cmake(CMP0085-WARN) + +set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=NEW) +run_cmake(CMP0085-NEW) +unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/RunCTest.cmake b/Tests/RunCMake/RunCTest.cmake index 89e16ee..98fdf20 100644 --- a/Tests/RunCMake/RunCTest.cmake +++ b/Tests/RunCMake/RunCTest.cmake @@ -3,8 +3,12 @@ include(RunCMake) function(run_ctest CASE_NAME) configure_file(${RunCMake_SOURCE_DIR}/test.cmake.in ${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake @ONLY) - configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in - ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake @ONLY) + if(EXISTS "${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in") + configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in + ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake @ONLY) + else() + file(REMOVE ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake) + endif() configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in ${RunCMake_BINARY_DIR}/${CASE_NAME}/CMakeLists.txt @ONLY) run_cmake_command(${CASE_NAME} ${CMAKE_CTEST_COMMAND} diff --git a/Tests/RunCMake/WorkingDirectory/CTestConfig.cmake.in b/Tests/RunCMake/WorkingDirectory/CTestConfig.cmake.in deleted file mode 100644 index 0226230..0000000 --- a/Tests/RunCMake/WorkingDirectory/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTestWorkingDir.@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt b/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt index 2e59d99..cc9085f 100644 --- a/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt +++ b/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_build/BuildQuiet Build directory: .*/Tests/RunCMake/ctest_build/BuildQuiet-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_build/BuildQuiet/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_build/CTestConfig.cmake.in b/Tests/RunCMake/ctest_build/CTestConfig.cmake.in deleted file mode 100644 index 097f82c..0000000 --- a/Tests/RunCMake/ctest_build/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestBuild@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_cmake_error/CTestConfig.cmake.in b/Tests/RunCMake/ctest_cmake_error/CTestConfig.cmake.in deleted file mode 100644 index 1f679d5..0000000 --- a/Tests/RunCMake/ctest_cmake_error/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestCoverage@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_configure/CTestConfig.cmake.in b/Tests/RunCMake/ctest_configure/CTestConfig.cmake.in deleted file mode 100644 index 7e30ab9..0000000 --- a/Tests/RunCMake/ctest_configure/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestConfigure@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt b/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt index 015644d..98f5a4c 100644 --- a/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt +++ b/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet Build directory: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in b/Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in deleted file mode 100644 index 1f679d5..0000000 --- a/Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestCoverage@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in deleted file mode 100644 index c0d7e42..0000000 --- a/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in b/Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in deleted file mode 100644 index 9823562..0000000 --- a/Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTestFixtures.@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in index 1e1905b..5d83530 100644 --- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in @@ -1,2 +1 @@ -set(CTEST_PROJECT_NAME "CTestLabelsForSubprojects@CASE_NAME@") @CTEST_EXTRA_CONFIG@ diff --git a/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in b/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in index 6d4a718..fe6f6ce 100644 --- a/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in @@ -1,4 +1,3 @@ -set (CTEST_PROJECT_NAME "CTestTestMemcheck@CASE_NAME@") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") diff --git a/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in deleted file mode 100644 index c0d7e42..0000000 --- a/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt index bc9a4c8..78f36a1 100644 --- a/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/AppendDifferentModel Build directory: .*/Tests/RunCMake/ctest_start/AppendDifferentModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendDifferentModel/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt index ab1c1f7..25085ef 100644 --- a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt @@ -2,7 +2,6 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack Build directory: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack-build Track: ExperimentalDifferent - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ExperimentalDifferent diff --git a/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt b/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt index 55f2d8e..5780629 100644 --- a/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Continuous Source directory: .*/Tests/RunCMake/ctest_start/AppendNoMatchingTrack Build directory: .*/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendNoMatchingTrack/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - SomeWeirdTrackName diff --git a/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt index f909a44..bcd0125 100644 --- a/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendNoModel Build directory: .*/Tests/RunCMake/ctest_start/AppendNoModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendNoModel/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt b/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt index 0660f5d..e58cd9c 100644 --- a/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Continuous Source directory: .*/Tests/RunCMake/ctest_start/AppendOldContinuous Build directory: .*/Tests/RunCMake/ctest_start/AppendOldContinuous-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendOldContinuous/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt index 0bdf9e4..47331e6 100644 --- a/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt @@ -1,6 +1,5 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendOldNoModel Build directory: .*/Tests/RunCMake/ctest_start/AppendOldNoModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendOldNoModel/CTestConfig.cmake Site: test-site Build name: test-build-name diff --git a/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt index 4f43626..3abd51e 100644 --- a/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Continuous Source directory: .*/Tests/RunCMake/ctest_start/AppendSameModel Build directory: .*/Tests/RunCMake/ctest_start/AppendSameModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendSameModel/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/CTestConfig.cmake.in b/Tests/RunCMake/ctest_start/CTestConfig.cmake.in deleted file mode 100644 index e75d14f..0000000 --- a/Tests/RunCMake/ctest_start/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestStart@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt b/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt index 7e94b8a..f4a0ba3 100644 --- a/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt +++ b/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/ConfigInBuild Build directory: .*/Tests/RunCMake/ctest_start/ConfigInBuild-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/ConfigInBuild-build/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt b/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt index c390372..5f98b4e 100644 --- a/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt +++ b/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/ConfigInSource Build directory: .*/Tests/RunCMake/ctest_start/ConfigInSource-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/ConfigInSource/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt index 4a6f1e9..20a29be 100644 --- a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt @@ -2,7 +2,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack Build directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-build Track: ExperimentalDifferent - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack/CTestConfig.cmake Site: test-site Build name: test-build-name Use ExperimentalDifferent tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake index 9b57b1b..905ad00 100644 --- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake @@ -48,8 +48,6 @@ function(run_ConfigInBuild) set(RunCMake_TEST_NO_CLEAN 1) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in - ${RunCMake_BINARY_DIR}/ConfigInBuild-build/CTestConfig.cmake @ONLY) run_ctest_start(ConfigInBuild Experimental) endfunction() run_ConfigInBuild() diff --git a/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in b/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in index 378a85a..140e4be 100644 --- a/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestSubmit@CASE_NAME@") # Intentionally leave out other upload-related CTestConfig.cmake settings # so that any ctest_submit calls fail with an error message. diff --git a/Tests/RunCMake/ctest_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_test/CTestConfig.cmake.in deleted file mode 100644 index 9004419..0000000 --- a/Tests/RunCMake/ctest_test/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTest@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_upload/CTestConfig.cmake.in b/Tests/RunCMake/ctest_upload/CTestConfig.cmake.in deleted file mode 100644 index 52665a8..0000000 --- a/Tests/RunCMake/ctest_upload/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestUpload@CASE_NAME@") diff --git a/Tests/Tutorial/Step7/CTestConfig.cmake b/Tests/Tutorial/Step7/CTestConfig.cmake deleted file mode 100644 index d8f5c44..0000000 --- a/Tests/Tutorial/Step7/CTestConfig.cmake +++ /dev/null @@ -1 +0,0 @@ -set (CTEST_PROJECT_NAME "Tutorial") |