diff options
159 files changed, 1226 insertions, 828 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index cd979c9..625dac0 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -188,8 +188,8 @@ size_t Various implementations have differing implementation of ``size_t``. When assigning the result of ``.size()`` on a container for example, the result -should not be assigned to an ``unsigned int`` or similar. ``std::size_t`` must -not be used. +should be assigned to ``size_t`` not to ``std::size_t``, ``unsigned int`` or +similar types. Templates --------- diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 3f92ec5..864ea6e 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -351,6 +351,7 @@ Variables for CTest /variable/CTEST_HG_UPDATE_OPTIONS /variable/CTEST_MEMORYCHECK_COMMAND /variable/CTEST_MEMORYCHECK_COMMAND_OPTIONS + /variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS /variable/CTEST_MEMORYCHECK_SUPPRESSIONS_FILE /variable/CTEST_MEMORYCHECK_TYPE /variable/CTEST_NIGHTLY_START_TIME diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index a3210a9..03e86af 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -111,7 +111,7 @@ Options ``-D <dashboard>, --dashboard <dashboard>`` Execute dashboard test - This option tells ctest to act as a Dart client and perform a + This option tells ctest to act as a CDash client and perform a dashboard test. All tests are <Mode><Test>, where Mode can be Experimental, Nightly, and Continuous, and Test can be Start, Update, Configure, Build, Test, Coverage, and Submit. @@ -127,14 +127,14 @@ Options ``-M <model>, --test-model <model>`` Sets the model for a dashboard - This option tells ctest to act as a Dart client where the TestModel + This option tells ctest to act as a CDash client where the TestModel can be Experimental, Nightly, and Continuous. Combining -M and -T is similar to -D ``-T <action>, --test-action <action>`` Sets the dashboard action to perform - This option tells ctest to act as a Dart client and perform some + This option tells ctest to act as a CDash client and perform some action such as start, build, test etc. Combining -M and -T is similar to -D @@ -328,11 +328,8 @@ Options used to detect implicit dependencies in a test suite. ``--submit-index`` - Submit individual dashboard tests with specific index - - This option allows performing the same CTest action (such as test) - multiple times and submit all stages to the same dashboard (Dart2 - required). Each execution requires different index. + Legacy option for old Dart2 dashboard server feature. + Do not use. ``--timeout <seconds>`` Set a global timeout on all tests. @@ -824,6 +821,18 @@ Configuration settings include: * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_COMMAND_OPTIONS` * :module:`CTest` module variable: ``MEMORYCHECK_COMMAND_OPTIONS`` +``MemoryCheckType`` + Specify the type of memory checking to perform. + + * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_TYPE` + * :module:`CTest` module variable: ``MEMORYCHECK_TYPE`` + +``MemoryCheckSanitizerOptions`` + Specify options to sanitizers when running with a sanitize-enabled build. + + * `CTest Script`_ variable: :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS` + * :module:`CTest` module variable: ``MEMORYCHECK_SANITIZER_OPTIONS`` + ``MemoryCheckSuppressionFile`` Specify a file containing suppression rules for the ``MemoryCheckCommand`` tool. It will be passed with options diff --git a/Help/module/FindITK.rst b/Help/module/FindITK.rst index dbfabbd..21a922f 100644 --- a/Help/module/FindITK.rst +++ b/Help/module/FindITK.rst @@ -1 +1,10 @@ -.. cmake-module:: ../../Modules/FindITK.cmake +FindITK +------- + +This module no longer exists. + +This module existed in versions of CMake prior to 3.1, but became +only a thin wrapper around ``find_package(ITK NO_MODULE)`` to +provide compatibility for projects using long-outdated conventions. +Now ``find_package(ITK)`` will search for ``ITKConfig.cmake`` +directly. diff --git a/Help/module/FindVTK.rst b/Help/module/FindVTK.rst index f9c1efe..3bc67c5 100644 --- a/Help/module/FindVTK.rst +++ b/Help/module/FindVTK.rst @@ -1 +1,10 @@ -.. cmake-module:: ../../Modules/FindVTK.cmake +FindVTK +------- + +This module no longer exists. + +This module existed in versions of CMake prior to 3.1, but became +only a thin wrapper around ``find_package(VTK NO_MODULE)`` to +provide compatibility for projects using long-outdated conventions. +Now ``find_package(VTK)`` will search for ``VTKConfig.cmake`` +directly. diff --git a/Help/release/3.1.0.rst b/Help/release/3.1.0.rst new file mode 100644 index 0000000..652bcd3 --- /dev/null +++ b/Help/release/3.1.0.rst @@ -0,0 +1,381 @@ +CMake 3.1.0 Release Notes +************************* + +.. only:: html + + .. contents:: + +Changes made since CMake 3.0.0 include the following. + +Documentation Changes +===================== + +* A new :manual:`cmake-compile-features(7)` manual was added. + +New Features +============ + +Generators +---------- + +* A :generator:`Visual Studio 14` generator was added. + +Windows Phone and Windows Store +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* Generators for Visual Studio 11 (2012) and above learned to generate + projects for Windows Phone and Windows Store. One may set the + :variable:`CMAKE_SYSTEM_NAME` variable to ``WindowsPhone`` + or ``WindowsStore`` on the :manual:`cmake(1)` command-line + or in a :variable:`CMAKE_TOOLCHAIN_FILE` to activate these platforms. + Also set :variable:`CMAKE_SYSTEM_VERSION` to ``8.0`` or ``8.1`` to + specify the version of Windows to be targeted. + +NVIDIA Nsight Tegra +^^^^^^^^^^^^^^^^^^^ + +* Generators for Visual Studio 10 (2010) and above learned to generate + projects for NVIDIA Nsight Tegra Visual Studio Edition. One may set + the :variable:`CMAKE_SYSTEM_NAME` variable to ``Android`` on the + :manual:`cmake(1)` command-line or in a :variable:`CMAKE_TOOLCHAIN_FILE` + to activate this platform. + +Syntax +------ + +* The :manual:`cmake-language(7)` syntax for :ref:`Variable References` and + :ref:`Escape Sequences` was simplified in order to allow a much faster + implementation. See policy :policy:`CMP0053`. + +* The :command:`if` command no longer automatically dereferences + variables named in quoted or bracket arguments. See policy + :policy:`CMP0054`. + +Commands +-------- + +* The :command:`add_custom_command` command learned to interpret + :manual:`cmake-generator-expressions(7)` in arguments to ``DEPENDS``. + +* The :command:`export(PACKAGE)` command learned to check the + :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable to skip + exporting the package. + +* The :command:`file(STRINGS)` command gained a new ``ENCODING`` + option to enable extraction of ``UTF-8`` strings. + +* The :command:`find_package` command learned to check the + :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` and + :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` + variables to skip searching the package registries. + +* The :command:`install` command learned a ``MESSAGE_NEVER`` option + to avoid output during installation. + +* The :command:`string` command learned a new ``GENEX_STRIP`` subcommand + which removes + :manual:`generator expression <cmake-generator-expressions(7)>`. + +* The :command:`string` command learned a new ``UUID`` subcommand + to generate a univerally unique identifier. + +* New :command:`target_compile_features` command allows populating the + :prop_tgt:`COMPILE_FEATURES` target property, just like any other + build variable. + +* The :command:`target_sources` command was added to add to the + :prop_tgt:`SOURCES` target property. + +Variables +--------- + +* The Visual Studio generators for versions 8 (2005) and above + learned to read the target platform name from a new + :variable:`CMAKE_GENERATOR_PLATFORM` variable when it is + not specified as part of the generator name. The platform + name may be specified on the :manual:`cmake(1)` command line + with the ``-A`` option, e.g. ``-G "Visual Studio 12 2013" -A x64``. + +* The :variable:`CMAKE_GENERATOR_TOOLSET` variable may now be + initialized in a toolchain file specified by the + :variable:`CMAKE_TOOLCHAIN_FILE` variable. This is useful + when cross-compiling with the Xcode or Visual Studio + generators. + +* The :variable:`CMAKE_INSTALL_MESSAGE` variable was introduced to + optionally reduce output installation. + +Properties +---------- + +* New :prop_tgt:`CXX_STANDARD` and :prop_tgt:`CXX_EXTENSIONS` target + properties may specify values which CMake uses to compute required + compile options such as ``-std=c++11`` or ``-std=gnu++11``. The + :variable:`CMAKE_CXX_STANDARD` and :variable:`CMAKE_CXX_EXTENSIONS` + variables may be set to initialize the target properties. + +* New :prop_tgt:`C_STANDARD` and :prop_tgt:`C_EXTENSIONS` target + properties may specify values which CMake uses to compute required + compile options such as ``-std=c11`` or ``-std=gnu11``. The + :variable:`CMAKE_C_STANDARD` and :variable:`CMAKE_C_EXTENSIONS` + variables may be set to initialize the target properties. + +* New :prop_tgt:`COMPILE_FEATURES` target property may contain a list + of features required to compile a target. CMake uses this + information to ensure that the compiler in use is capable of building + the target, and to add any necessary compile flags to support language + features. + +* New :prop_tgt:`COMPILE_PDB_NAME` and + :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY` target properties + were introduced to specify the MSVC compiler program database + file location (``cl /Fd``). This complements the existing + :prop_tgt:`PDB_NAME` and :prop_tgt:`PDB_OUTPUT_DIRECTORY` + target properties that specify the linker program database + file location (``link /pdb``). + +* The :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property now supports + a ``$<LINK_ONLY:...>`` + :manual:`generator expression <cmake-generator-expressions(7)>`. + +* A new :prop_tgt:`INTERFACE_SOURCES` target property was introduced. This is + consumed by dependent targets, which compile and link the listed sources. + +* The :prop_tgt:`SOURCES` target property now contains + :manual:`generator expression <cmake-generator-expressions(7)>` + such as ``TARGET_OBJECTS`` when read at configure time, if + policy :policy:`CMP0051` is ``NEW``. + +* The :prop_tgt:`SOURCES` target property now generally supports + :manual:`generator expression <cmake-generator-expressions(7)>`. The + generator expressions may be used in the :command:`add_library` and + :command:`add_executable` commands. + +* It is now possible to write and append to the :prop_tgt:`SOURCES` target + property. The :variable:`CMAKE_DEBUG_TARGET_PROPERTIES` variable may be + used to trace the origin of sources. + +* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added + to tell the Visual Studio generators to mark content for deployment + in Windows Phone and Windows Store projects. + +* The :prop_tgt:`VS_WINRT_COMPONENT` target property was created to + tell Visual Studio generators to compile a shared library as a + Windows Runtime (WinRT) component. + +* The :generator:`Xcode` generator learned to check source + file properties :prop_sf:`XCODE_EXPLICIT_FILE_TYPE` and + :prop_sf:`XCODE_LAST_KNOWN_FILE_TYPE` for a custom Xcode + file reference type. + +Modules +------- + +* The :module:`BundleUtilities` module learned to resolve and replace + ``@rpath`` placeholders on OS X to correctly bundle applications + using them. + +* The :module:`CMakePackageConfigHelpers` module + :command:`configure_package_config_file` command learned a new + ``INSTALL_PREFIX`` option to generate package configuration files + meant for a prefix other than :variable:`CMAKE_INSTALL_PREFIX`. + +* The :module:`CheckFortranSourceCompiles` module was added to + provide a ``CHECK_Fortran_SOURCE_COMPILES`` macro. + +* The :module:`ExternalData` module learned to tolerate a ``DATA{}`` + reference to a missing source file with a warning instead of + rejecting it with an error. This helps developers write new + ``DATA{}`` references to test reference outputs that have not + yet been created. + +* The :module:`ExternalProject` module learned to support lzma-compressed + source tarballs with ``.7z``, ``.tar.xz``, and ``.txz`` extensions. + +* The :module:`ExternalProject` module ``ExternalProject_Add`` command + learned a new ``BUILD_ALWAYS`` option to cause the external project + build step to run every time the host project is built. + +* The :module:`ExternalProject` module ``ExternalProject_Add`` command + learned a new ``EXCLUDE_FROM_ALL`` option to cause the external + project target to have the :prop_tgt:`EXCLUDE_FROM_ALL` target + property set. + +* The :module:`ExternalProject` module ``ExternalProject_Add_Step`` command + learned a new ``EXCLUDE_FROM_MAIN`` option to cause the step to not be + a direct dependency of the main external project target. + +* The :module:`ExternalProject` module ``ExternalProject_Add`` command + learned a new ``DOWNLOAD_NO_PROGRESS`` option to disable progress + output while downloading the source tarball. + +* The :module:`FeatureSummary` module ``feature_summary`` API + learned to accept multiple values for the ``WHAT`` option and + combine them appropriately. + +* The :module:`FindCUDA` module learned to support ``fatbin`` and ``cubin`` + modules. + +* The :module:`FindGTest` module ``gtest_add_tests`` macro learned + a new ``AUTO`` option to automatically read the :prop_tgt:`SOURCES` + target property of the test executable and scan the source files + for tests to be added. + +* The :module:`FindGLEW` module now provides imported targets. + +* The :module:`FindGLUT` module now provides imported targets. + +* The :module:`FindHg` module gained a new ``Hg_WC_INFO`` macro to + help run ``hg`` to extract information about a Mercurial work copy. + +* The :module:`FindOpenCL` module was introduced. + +* The :module:`FindOpenGL` module now provides imported targets + ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found. + +* The :module:`FindOpenMP` module learned to support Fortran. + +* The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG`` + environment variable value as the ``pkg-config`` executable, if set. + +* The :module:`FindVTK` module dropped support for finding VTK 4.0. + It is now a thin-wrapper around ``find_package(VTK ... NO_MODULE)``. + This produces much clearer error messages when VTK is not found. + +* The :module:`FindZLIB` module now provides imported targets. + +* The :module:`GenerateExportHeader` module ``generate_export_header`` + function learned to allow use with :ref:`Object Libraries`. + +* The :module:`InstallRequiredSystemLibraries` module gained a new + ``CMAKE_INSTALL_OPENMP_LIBRARIES`` option to install MSVC OpenMP + runtime libraries. + +* The :module:`UseSWIG` module learned to detect the module name + from ``.i`` source files if possible to avoid the need to set + the ``SWIG_MODULE_NAME`` source file property explicitly. + +* The :module:`WriteCompilerDetectionHeader` module was added to allow + creation of a portable header file for compiler optional feature detection. + +Generator Expressions +--------------------- + +* New ``COMPILE_FEATURES`` + :manual:`generator expression <cmake-generator-expressions(7)>` allows + setting build properties based on available compiler features. + +CTest +----- + +* The :command:`ctest_coverage` command learned to read variable + ``CTEST_COVERAGE_EXTRA_FLAGS`` to set ``CoverageExtraFlags``. + +* The :command:`ctest_coverage` command learned to support + Intel coverage files with the ``codecov`` tool. + +* The :command:`ctest_memcheck` command learned to support sanitizer + modes, including ``AddressSanitizer``, ``MemorySanitizer``, + ``ThreadSanitizer``, and ``UndefinedBehaviorSanitizer``. + Options may be set using the new + :variable:`CTEST_MEMORYCHECK_SANITIZER_OPTIONS` variable. + +CPack +----- + +* :manual:`cpack(1)` gained an ``IFW`` generator to package using + Qt Framework Installer tools. See the :module:`CPackIFW` module. + +* :manual:`cpack(1)` gained ``7Z`` and ``TXZ`` generators supporting + lzma-compressed archives. + +* The :module:`CPackDeb` module learned a new + :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` variable to set the + tarball compression type. + +* The :manual:`cpack(1)` ``WiX`` generator learned to support + a :prop_inst:`CPACK_WIX_ACL` installed file property to + specify an Access Control List. + +Other +----- + +* The :manual:`cmake(1)` ``-E`` option learned a new ``env`` command. + +* The :manual:`cmake(1)` ``-E tar`` command learned to support + lzma-compressed files. + +* :ref:`Object Libraries` may now have extra sources that do not + compile to object files so long as they would not affect linking + of a normal library (e.g. ``.dat`` is okay but not ``.def``). + +* Visual Studio generators for VS 8 and later learned to support + the ``ASM_MASM`` language. + +* The Visual Studio generators learned to treat ``.hlsl`` source + files as High Level Shading Language sources (using ``FXCompile`` + in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file + property was added to specify the Shader Type. + +New Diagnostics +=============== + +* Policy :policy:`CMP0052` introduced to control directories in the + :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of exported targets. + +Deprecated and Removed Features +=============================== + +* In CMake 3.0 the :command:`target_link_libraries` command + accidentally began allowing unquoted arguments to use + :manual:`generator expressions <cmake-generator-expressions(7)>` + containing a (``;`` separated) list within them. For example:: + + set(libs B C) + target_link_libraries(A PUBLIC $<BUILD_INTERFACE:${libs}>) + + This is equivalent to writing:: + + target_link_libraries(A PUBLIC $<BUILD_INTERFACE:B C>) + + and was never intended to work. It did not work in CMake 2.8.12. + Such generator expressions should be in quoted arguments:: + + set(libs B C) + target_link_libraries(A PUBLIC "$<BUILD_INTERFACE:${libs}>") + + CMake 3.1 again requires the quotes for this to work correctly. + +* Callbacks established by the :command:`variable_watch` command will no + longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when + the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is + set. Uninitialized variable accesses will always be reported as + ``UNKNOWN_READ_ACCESS``. + +* The :module:`CMakeDetermineVSServicePack` module now warns that + it is deprecated and should not longer be used. Use the + :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable instead. + +Other Changes +============= + +* The :manual:`cmake-gui(1)` learned to capture output from child + processes started by the :command:`execute_process` command + and display it in the output window. + +* The :manual:`cmake-language(7)` internal implementation of generator + expression and list expansion parsers have been optimized and shows + non-trivial speedup on large projects. + +* The Makefile generators learned to use response files with GNU tools + on Windows to pass library directories and names to the linker. + +* When generating linker command-lines, CMake now avoids repeating + items corresponding to SHARED library targets. + +* Support for the Open Watcom compiler has been overhauled. + The :variable:`CMAKE_<LANG>_COMPILER_ID` is now ``OpenWatcom``, + and the :variable:`CMAKE_<LANG>_COMPILER_VERSION` now uses + the Open Watcom external version numbering. The external + version numbers are lower than the internal version number + by 11. diff --git a/Help/release/dev/0-sample-topic.rst b/Help/release/dev/0-sample-topic.rst deleted file mode 100644 index e4cc01e..0000000 --- a/Help/release/dev/0-sample-topic.rst +++ /dev/null @@ -1,7 +0,0 @@ -0-sample-topic --------------- - -* This is a sample release note for the change in a topic. - Developers should add similar notes for each topic branch - making a noteworthy change. Each document should be named - and titled to match the topic name to avoid merge conflicts. diff --git a/Help/release/dev/CMP0052.rst b/Help/release/dev/CMP0052.rst deleted file mode 100644 index adb3d44..0000000 --- a/Help/release/dev/CMP0052.rst +++ /dev/null @@ -1,5 +0,0 @@ -CMP0052 -------- - -* Policy :policy:`CMP0052` introduced to control directories in the - :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of exported targets. diff --git a/Help/release/dev/CMP0053.rst b/Help/release/dev/CMP0053.rst deleted file mode 100644 index 3b835fb..0000000 --- a/Help/release/dev/CMP0053.rst +++ /dev/null @@ -1,6 +0,0 @@ -CMP0053 -------- - -* The :manual:`cmake-language(7)` syntax for :ref:`Variable References` and - :ref:`Escape Sequences` was simplified in order to allow a much faster - implementation. See policy :policy:`CMP0053`. diff --git a/Help/release/dev/CMakeDetermineVSServicePack.rst b/Help/release/dev/CMakeDetermineVSServicePack.rst deleted file mode 100644 index d9d7b41..0000000 --- a/Help/release/dev/CMakeDetermineVSServicePack.rst +++ /dev/null @@ -1,6 +0,0 @@ -CMakeDetermineVSServicePack ---------------------------- - -* The :module:`CMakeDetermineVSServicePack` module now warns that - it is deprecated and should not longer be used. Use the - :variable:`CMAKE_<LANG>_COMPILER_VERSION` variable instead. diff --git a/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst b/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst deleted file mode 100644 index da8d7c3..0000000 --- a/Help/release/dev/CMakePackageConfigHelpers-INSTALL_PREFIX.rst +++ /dev/null @@ -1,7 +0,0 @@ -CMakePackageConfigHelpers-INSTALL_PREFIX ----------------------------------------- - -* The :module:`CMakePackageConfigHelpers` module - :command:`configure_package_config_file` command learned a new - ``INSTALL_PREFIX`` option to generate package configuration files - meant for a prefix other than :variable:`CMAKE_INSTALL_PREFIX`. diff --git a/Help/release/dev/ExternalData-missing-not-fatal.rst b/Help/release/dev/ExternalData-missing-not-fatal.rst deleted file mode 100644 index e9f1f04..0000000 --- a/Help/release/dev/ExternalData-missing-not-fatal.rst +++ /dev/null @@ -1,8 +0,0 @@ -ExternalData-missing-not-fatal ------------------------------- - -* The :module:`ExternalData` module learned to tolerate a ``DATA{}`` - reference to a missing source file with a warning instead of - rejecting it with an error. This helps developers write new - ``DATA{}`` references to test reference outputs that have not - yet been created. diff --git a/Help/release/dev/ExternalProject-BUILD_ALWAYS.rst b/Help/release/dev/ExternalProject-BUILD_ALWAYS.rst deleted file mode 100644 index 5384671..0000000 --- a/Help/release/dev/ExternalProject-BUILD_ALWAYS.rst +++ /dev/null @@ -1,6 +0,0 @@ -ExternalProject-BUILD_ALWAYS ----------------------------- - -* The :module:`ExternalProject` module ``ExternalProject_Add`` command - learned a new ``BUILD_ALWAYS`` option to cause the external project - build step to run every time the host project is built. diff --git a/Help/release/dev/ExternalProject-add-lzma.rst b/Help/release/dev/ExternalProject-add-lzma.rst deleted file mode 100644 index cb398ef..0000000 --- a/Help/release/dev/ExternalProject-add-lzma.rst +++ /dev/null @@ -1,5 +0,0 @@ -ExternalProject-add-lzma ------------------------- - -* The :module:`ExternalProject` module learned to support lzma-compressed - source tarballs with ``.7z``, ``.tar.xz``, and ``.txz`` extensions. diff --git a/Help/release/dev/ExternalProject-no-download-progress.rst b/Help/release/dev/ExternalProject-no-download-progress.rst deleted file mode 100644 index 41db55d..0000000 --- a/Help/release/dev/ExternalProject-no-download-progress.rst +++ /dev/null @@ -1,6 +0,0 @@ -ExternalProject-no-download-progress ------------------------------------- - -* The :module:`ExternalProject` module ``ExternalProject_Add`` command - learned a new ``DOWNLOAD_NO_PROGRESS`` option to disable progress - output while downloading the source tarball. diff --git a/Help/release/dev/ExternalProject_exclude-from-all.rst b/Help/release/dev/ExternalProject_exclude-from-all.rst deleted file mode 100644 index 1d62b3a..0000000 --- a/Help/release/dev/ExternalProject_exclude-from-all.rst +++ /dev/null @@ -1,11 +0,0 @@ -ExternalProject_exclude-from-all --------------------------------- - -* The :module:`ExternalProject` module ``ExternalProject_Add`` command - learned a new ``EXCLUDE_FROM_ALL`` option to cause the external - project target to have the :prop_tgt:`EXCLUDE_FROM_ALL` target - property set. - -* The :module:`ExternalProject` module ``ExternalProject_Add_Step`` command - learned a new ``EXCLUDE_FROM_MAIN`` option to cause the step to not be - a direct dependency of the main external project target. diff --git a/Help/release/dev/FeatureSummary_combine_WHAT_values.rst b/Help/release/dev/FeatureSummary_combine_WHAT_values.rst deleted file mode 100644 index 174ef15..0000000 --- a/Help/release/dev/FeatureSummary_combine_WHAT_values.rst +++ /dev/null @@ -1,6 +0,0 @@ -FeatureSummary_combine_WHAT_values ----------------------------------- - -* The :module:`FeatureSummary` module ``feature_summary`` API - learned to accept multiple values for the ``WHAT`` option and - combine them appropriately. diff --git a/Help/release/dev/FindCUDA-cubin-fatbin.rst b/Help/release/dev/FindCUDA-cubin-fatbin.rst deleted file mode 100644 index d44da8e..0000000 --- a/Help/release/dev/FindCUDA-cubin-fatbin.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindCUDA-cubin-fatbin ---------------------- - -* The :module:`FindCUDA` module learned to support ``fatbin`` and ``cubin`` - modules. diff --git a/Help/release/dev/FindGTest-AUTO-SOURCES.rst b/Help/release/dev/FindGTest-AUTO-SOURCES.rst deleted file mode 100644 index 17b2a1b..0000000 --- a/Help/release/dev/FindGTest-AUTO-SOURCES.rst +++ /dev/null @@ -1,7 +0,0 @@ -FindGTest-AUTO-SOURCES ----------------------- - -* The :module:`FindGTest` module ``gtest_add_tests`` macro learned - a new ``AUTO`` option to automatically read the :prop_tgt:`SOURCES` - target property of the test executable and scan the source files - for tests to be added. diff --git a/Help/release/dev/FindHg-WC_INFO.rst b/Help/release/dev/FindHg-WC_INFO.rst deleted file mode 100644 index 0caf2b3..0000000 --- a/Help/release/dev/FindHg-WC_INFO.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindHg-WC_INFO --------------- - -* The :module:`FindHg` module gained a new ``Hg_WC_INFO`` macro to - help run ``hg`` to extract information about a Mercurial work copy. diff --git a/Help/release/dev/FindOpenGL-target.rst b/Help/release/dev/FindOpenGL-target.rst deleted file mode 100644 index 670507e..0000000 --- a/Help/release/dev/FindOpenGL-target.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindOpenGL-target ------------------ - -* The :module:`FindOpenGL` module now provides imported targets - ``OpenGL::GL`` and ``OpenGL::GLU`` when the libraries are found. diff --git a/Help/release/dev/FindOpenMP-add-Fortran-support.rst b/Help/release/dev/FindOpenMP-add-Fortran-support.rst deleted file mode 100644 index 0205718..0000000 --- a/Help/release/dev/FindOpenMP-add-Fortran-support.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindOpenMP-add-Fortran-support ------------------------------- - -* The :module:`FindOpenMP` module learned to support Fortran. diff --git a/Help/release/dev/FindPkgConfig-PKG_CONFIG.rst b/Help/release/dev/FindPkgConfig-PKG_CONFIG.rst deleted file mode 100644 index c0f6471..0000000 --- a/Help/release/dev/FindPkgConfig-PKG_CONFIG.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindPkgConfig-PKG_CONFIG ------------------------- - -* The :module:`FindPkgConfig` module learned to use the ``PKG_CONFIG`` - environment variable value as the ``pkg-config`` executable, if set. diff --git a/Help/release/dev/FindVTK.rst b/Help/release/dev/FindVTK.rst deleted file mode 100644 index 1cc9fc4..0000000 --- a/Help/release/dev/FindVTK.rst +++ /dev/null @@ -1,6 +0,0 @@ -FindVTK -------- - -* The :module:`FindVTK` module dropped support for finding VTK 4.0. - It is now a thin-wrapper around ``find_package(VTK ... NO_MODULE)``. - This produces much clearer error messages when VTK is not found. diff --git a/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst b/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst deleted file mode 100644 index 4f8f962..0000000 --- a/Help/release/dev/InstallRequiredSystemLibraries-vs-openmp.rst +++ /dev/null @@ -1,6 +0,0 @@ -InstallRequiredSystemLibraries-vs-openmp ----------------------------------------- - -* The :module:`InstallRequiredSystemLibraries` module gained a new - ``CMAKE_INSTALL_OPENMP_LIBRARIES`` option to install MSVC OpenMP - runtime libraries. diff --git a/Help/release/dev/OpenWatcom.rst b/Help/release/dev/OpenWatcom.rst deleted file mode 100644 index 63f6e8c..0000000 --- a/Help/release/dev/OpenWatcom.rst +++ /dev/null @@ -1,9 +0,0 @@ -OpenWatcom ----------- - -* Support for the Open Watcom compiler has been overhauled. - The :variable:`CMAKE_<LANG>_COMPILER_ID` is now ``OpenWatcom``, - and the :variable:`CMAKE_<LANG>_COMPILER_VERSION` now uses - the Open Watcom external version numbering. The external - version numbers are lower than the internal version number - by 11. diff --git a/Help/release/dev/UseSWIG-guess_module_name.rst b/Help/release/dev/UseSWIG-guess_module_name.rst deleted file mode 100644 index c895046..0000000 --- a/Help/release/dev/UseSWIG-guess_module_name.rst +++ /dev/null @@ -1,6 +0,0 @@ -UseSWIG-guess_module_name -------------------------- - -* The :module:`UseSWIG` module learned to detect the module name - from ``.i`` source files if possible to avoid the need to set - the ``SWIG_MODULE_NAME`` source file property explicitly. diff --git a/Help/release/dev/add-CheckFortranSourceCompiles.rst b/Help/release/dev/add-CheckFortranSourceCompiles.rst deleted file mode 100644 index b78c747..0000000 --- a/Help/release/dev/add-CheckFortranSourceCompiles.rst +++ /dev/null @@ -1,5 +0,0 @@ -add-CheckFortranSourceCompiles ------------------------------- - -* The :module:`CheckFortranSourceCompiles` module was added to - provide a ``CHECK_Fortran_SOURCE_COMPILES`` macro. diff --git a/Help/release/dev/add-FindOpenCL.rst b/Help/release/dev/add-FindOpenCL.rst deleted file mode 100644 index e1e30d1..0000000 --- a/Help/release/dev/add-FindOpenCL.rst +++ /dev/null @@ -1,4 +0,0 @@ -add-FindOpenCL --------------- - -* The :module:`FindOpenCL` module was introduced. diff --git a/Help/release/dev/add-liblzma.rst b/Help/release/dev/add-liblzma.rst deleted file mode 100644 index a59ec09..0000000 --- a/Help/release/dev/add-liblzma.rst +++ /dev/null @@ -1,5 +0,0 @@ -add-liblzma ------------ - -* The :manual:`cmake(1)` ``-E tar`` command learned to support - lzma-compressed files. diff --git a/Help/release/dev/add_custom_command-DEPENDS-genex.rst b/Help/release/dev/add_custom_command-DEPENDS-genex.rst deleted file mode 100644 index 1e528e6..0000000 --- a/Help/release/dev/add_custom_command-DEPENDS-genex.rst +++ /dev/null @@ -1,5 +0,0 @@ -add_custom_command-DEPENDS-genex --------------------------------- - -* The :command:`add_custom_command` command learned to interpret - :manual:`cmake-generator-expressions(7)` in arguments to ``DEPENDS``. diff --git a/Help/release/dev/allow-OBJECT-library-extra-sources.rst b/Help/release/dev/allow-OBJECT-library-extra-sources.rst deleted file mode 100644 index 472fcdc..0000000 --- a/Help/release/dev/allow-OBJECT-library-extra-sources.rst +++ /dev/null @@ -1,6 +0,0 @@ -allow-OBJECT-library-extra-sources ----------------------------------- - -* :ref:`Object Libraries` may now have extra sources that do not - compile to object files so long as they would not affect linking - of a normal library (e.g. ``.dat`` is okay but not ``.def``). diff --git a/Help/release/dev/cmake-E-env.rst b/Help/release/dev/cmake-E-env.rst deleted file mode 100644 index 4bdcd0c..0000000 --- a/Help/release/dev/cmake-E-env.rst +++ /dev/null @@ -1,4 +0,0 @@ -cmake-E-env ------------ - -* The :manual:`cmake(1)` ``-E`` option learned a new ``env`` command. diff --git a/Help/release/dev/cmake-gui-capture-output.rst b/Help/release/dev/cmake-gui-capture-output.rst deleted file mode 100644 index 40cd25e..0000000 --- a/Help/release/dev/cmake-gui-capture-output.rst +++ /dev/null @@ -1,6 +0,0 @@ -cmake-gui-capture-output ------------------------- - -* The :manual:`cmake-gui(1)` learned to capture output from child - processes started by the :command:`execute_process` command - and display it in the output window. diff --git a/Help/release/dev/compile-language-features.rst b/Help/release/dev/compile-language-features.rst deleted file mode 100644 index d10e22b..0000000 --- a/Help/release/dev/compile-language-features.rst +++ /dev/null @@ -1,28 +0,0 @@ -target-language-features ------------------------- - -* New :prop_tgt:`CXX_STANDARD` and :prop_tgt:`CXX_EXTENSIONS` target - properties may specify values which CMake uses to compute required - compile options such as ``-std=c++11`` or ``-std=gnu++11``. The - :variable:`CMAKE_CXX_STANDARD` and :variable:`CMAKE_CXX_EXTENSIONS` - variables may be set to initialize the target properties. - -* New :prop_tgt:`C_STANDARD` and :prop_tgt:`C_EXTENSIONS` target - properties may specify values which CMake uses to compute required - compile options such as ``-std=c11`` or ``-std=gnu11``. The - :variable:`CMAKE_C_STANDARD` and :variable:`CMAKE_C_EXTENSIONS` - variables may be set to initialize the target properties. - -* New :prop_tgt:`COMPILE_FEATURES` target property may contain a list - of features required to compile a target. CMake uses this - information to ensure that the compiler in use is capable of building - the target, and to add any necessary compile flags to support language - features. - -* New :command:`target_compile_features` command allows populating the - :prop_tgt:`COMPILE_FEATURES` target property, just like any other - build variable. - -* New ``COMPILE_FEATURES`` - :manual:`generator expression <cmake-generator-expressions(7)>` allows - setting build properties based on available compiler features. diff --git a/Help/release/dev/cpack-add-lzma.rst b/Help/release/dev/cpack-add-lzma.rst deleted file mode 100644 index ad59f35..0000000 --- a/Help/release/dev/cpack-add-lzma.rst +++ /dev/null @@ -1,5 +0,0 @@ -cpack-add-lzma --------------- - -* :manual:`cpack(1)` gained ``7Z`` and ``TXZ`` generators supporting - lzma-compressed archives. diff --git a/Help/release/dev/cpack-deb-compression-types.rst b/Help/release/dev/cpack-deb-compression-types.rst deleted file mode 100644 index a33e333..0000000 --- a/Help/release/dev/cpack-deb-compression-types.rst +++ /dev/null @@ -1,6 +0,0 @@ -cpack-deb-compression-types ---------------------------- - -* The :module:`CPackDeb` module learned a new - :variable:`CPACK_DEBIAN_COMPRESSION_TYPE` variable to set the - tarball compression type. diff --git a/Help/release/dev/cpack-ifw-generator.rst b/Help/release/dev/cpack-ifw-generator.rst deleted file mode 100644 index f667136..0000000 --- a/Help/release/dev/cpack-ifw-generator.rst +++ /dev/null @@ -1,5 +0,0 @@ -cpack-ifw-generator -------------------- - -* :manual:`cpack(1)` gained an ``IFW`` generator to package using - Qt Framework Installer tools. See the :module:`CPackIFW` module. diff --git a/Help/release/dev/ctest-coverage-extra.rst b/Help/release/dev/ctest-coverage-extra.rst deleted file mode 100644 index 85d023b..0000000 --- a/Help/release/dev/ctest-coverage-extra.rst +++ /dev/null @@ -1,5 +0,0 @@ -ctest-coverage-extra --------------------- - -* The :command:`ctest_coverage` command learned to read variable - ``CTEST_COVERAGE_EXTRA_FLAGS`` to set ``CoverageExtraFlags``. diff --git a/Help/release/dev/ctest-intel-coverage.rst b/Help/release/dev/ctest-intel-coverage.rst deleted file mode 100644 index 11455a5..0000000 --- a/Help/release/dev/ctest-intel-coverage.rst +++ /dev/null @@ -1,5 +0,0 @@ -ctest-intel-coverage --------------------- - -* The :command:`ctest_coverage` command learned to support - Intel coverage files with the ``codecov`` tool. diff --git a/Help/release/dev/custom-ninja-deptypes.rst b/Help/release/dev/custom-ninja-deptypes.rst deleted file mode 100644 index 7750da8..0000000 --- a/Help/release/dev/custom-ninja-deptypes.rst +++ /dev/null @@ -1,5 +0,0 @@ -custom-ninja-deptypes ---------------------- - -* Add a `CMAKE_NINJA_DEPTYPE_<LANG>` variable so that compilers may set the - deptype for use in Ninja other than those CMake itself knows about. diff --git a/Help/release/dev/delay-generator-toolset.rst b/Help/release/dev/delay-generator-toolset.rst deleted file mode 100644 index 0512834..0000000 --- a/Help/release/dev/delay-generator-toolset.rst +++ /dev/null @@ -1,8 +0,0 @@ -delay-generator-toolset ------------------------ - -* The :variable:`CMAKE_GENERATOR_TOOLSET` variable may now be - initialized in a toolchain file specified by the - :variable:`CMAKE_TOOLCHAIN_FILE` variable. This is useful - when cross-compiling with the Xcode or Visual Studio - generators. diff --git a/Help/release/dev/export-from-obj-libs.rst b/Help/release/dev/export-from-obj-libs.rst deleted file mode 100644 index 6d58288..0000000 --- a/Help/release/dev/export-from-obj-libs.rst +++ /dev/null @@ -1,5 +0,0 @@ -export-from-obj-libs --------------------- - -* The :module:`GenerateExportHeader` module ``generate_export_header`` - function learned to allow use with :ref:`Object Libraries`. diff --git a/Help/release/dev/faster-parsers.rst b/Help/release/dev/faster-parsers.rst deleted file mode 100644 index c2a8bfb..0000000 --- a/Help/release/dev/faster-parsers.rst +++ /dev/null @@ -1,6 +0,0 @@ -faster-parsers --------------- - -* The :manual:`cmake-language(7)` internal implementation of generator - expression and list expansion parsers have been optimized and shows - non-trivial speedup on large projects. diff --git a/Help/release/dev/file-strings-encoding.rst b/Help/release/dev/file-strings-encoding.rst deleted file mode 100644 index 9da3e47..0000000 --- a/Help/release/dev/file-strings-encoding.rst +++ /dev/null @@ -1,5 +0,0 @@ -file-strings-encoding ---------------------- - -* The :command:`file(STRINGS)` command gained a new ``ENCODING`` - option to enable extraction of ``UTF-8`` strings. diff --git a/Help/release/dev/find-module-targets.rst b/Help/release/dev/find-module-targets.rst deleted file mode 100644 index 98ea283..0000000 --- a/Help/release/dev/find-module-targets.rst +++ /dev/null @@ -1,8 +0,0 @@ -find-module-targets -------------------- - -* The :module:`FindGLUT` module now provides imported targets. - -* The :module:`FindGLEW` module now provides imported targets. - -* The :module:`FindZLIB` module now provides imported targets. diff --git a/Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst b/Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst deleted file mode 100644 index c8246c5..0000000 --- a/Help/release/dev/fix-OSX-bundle-rpaths-and-Qt5.rst +++ /dev/null @@ -1,6 +0,0 @@ -fix-OSX-bundle-rpaths-and-Qt5 ------------------------------ - -* The :module:`BundleUtilities` module learned to resolve and replace - ``@rpath`` placeholders on OS X to correctly bundle applications - using them. diff --git a/Help/release/dev/generalize-LINK_ONLY.rst b/Help/release/dev/generalize-LINK_ONLY.rst deleted file mode 100644 index 6dccbd5..0000000 --- a/Help/release/dev/generalize-LINK_ONLY.rst +++ /dev/null @@ -1,6 +0,0 @@ -generalize-LINK_ONLY --------------------- - -* The :prop_tgt:`INTERFACE_LINK_LIBRARIES` target property now supports - a ``$<LINK_ONLY:...>`` - :manual:`generator expression <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/if-sanity.rst b/Help/release/dev/if-sanity.rst deleted file mode 100644 index 6645bc4..0000000 --- a/Help/release/dev/if-sanity.rst +++ /dev/null @@ -1,6 +0,0 @@ -if-sanity ---------- - -* The :command:`if` command no longer automatically dereferences - variables named in quoted or bracket arguments. See policy - :policy:`CMP0054`. diff --git a/Help/release/dev/install-messages.rst b/Help/release/dev/install-messages.rst deleted file mode 100644 index e023ef7..0000000 --- a/Help/release/dev/install-messages.rst +++ /dev/null @@ -1,8 +0,0 @@ -install-messages ----------------- - -* The :command:`install` command learned a ``MESSAGE_NEVER`` option - to avoid output during installation. - -* The :variable:`CMAKE_INSTALL_MESSAGE` variable was introduced to - optionally reduce output installation. diff --git a/Help/release/dev/link-libraries-response-files.rst b/Help/release/dev/link-libraries-response-files.rst deleted file mode 100644 index cecf7f6..0000000 --- a/Help/release/dev/link-libraries-response-files.rst +++ /dev/null @@ -1,5 +0,0 @@ -link-libraries-response-files ------------------------------ - -* The Makefile generators learned to use response files with GNU tools - on Windows to pass library directories and names to the linker. diff --git a/Help/release/dev/link-line-dedup.rst b/Help/release/dev/link-line-dedup.rst deleted file mode 100644 index 6ce31e3..0000000 --- a/Help/release/dev/link-line-dedup.rst +++ /dev/null @@ -1,5 +0,0 @@ -link-line-dedup ---------------- - -* When generating linker command-lines, CMake now avoids repeating - items corresponding to SHARED library targets. diff --git a/Help/release/dev/module-WriteCompilerDetectionHeader.rst b/Help/release/dev/module-WriteCompilerDetectionHeader.rst deleted file mode 100644 index 10e7b86..0000000 --- a/Help/release/dev/module-WriteCompilerDetectionHeader.rst +++ /dev/null @@ -1,5 +0,0 @@ -module-WriteCompilerDetectionHeader ------------------------------------ - -* The :module:`WriteCompilerDetectionHeader` module was added to allow - creation of a portable header file for compiler optional feature detection. diff --git a/Help/release/dev/msvc-compiler-pdb-files.rst b/Help/release/dev/msvc-compiler-pdb-files.rst deleted file mode 100644 index d06d202..0000000 --- a/Help/release/dev/msvc-compiler-pdb-files.rst +++ /dev/null @@ -1,10 +0,0 @@ -msvc-compiler-pdb-files ------------------------ - -* New :prop_tgt:`COMPILE_PDB_NAME` and - :prop_tgt:`COMPILE_PDB_OUTPUT_DIRECTORY` target properties - were introduced to specify the MSVC compiler program database - file location (``cl /Fd``). This complements the existing - :prop_tgt:`PDB_NAME` and :prop_tgt:`PDB_OUTPUT_DIRECTORY` - target properties that specify the linker program database - file location (``link /pdb``). diff --git a/Help/release/dev/package-disable-registry.rst b/Help/release/dev/package-disable-registry.rst deleted file mode 100644 index 1b23fde..0000000 --- a/Help/release/dev/package-disable-registry.rst +++ /dev/null @@ -1,11 +0,0 @@ -package-disable-registry ------------------------- - -* The :command:`export(PACKAGE)` command learned to check the - :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable to skip - exporting the package. - -* The :command:`find_package` command learned to check the - :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` and - :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` - variables to skip searching the package registries. diff --git a/Help/release/dev/string-GENEX_STRIP.rst b/Help/release/dev/string-GENEX_STRIP.rst deleted file mode 100644 index b5b1074..0000000 --- a/Help/release/dev/string-GENEX_STRIP.rst +++ /dev/null @@ -1,6 +0,0 @@ -string-GENEX_STRIP ------------------- - -* The :command:`string` command learned a new ``GENEX_STRIP`` subcommand - which removes - :manual:`generator expression <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/string-uuid.rst b/Help/release/dev/string-uuid.rst deleted file mode 100644 index dacf9a8..0000000 --- a/Help/release/dev/string-uuid.rst +++ /dev/null @@ -1,5 +0,0 @@ -string-uuid ------------ - -* The :command:`string` command learned a new ``UUID`` subcommand - to generate a univerally unique identifier. diff --git a/Help/release/dev/target-INTERFACE_SOURCES.rst b/Help/release/dev/target-INTERFACE_SOURCES.rst deleted file mode 100644 index 4e34943..0000000 --- a/Help/release/dev/target-INTERFACE_SOURCES.rst +++ /dev/null @@ -1,5 +0,0 @@ -target-INTERFACE_SOURCES ------------------------- - -* A new :prop_tgt:`INTERFACE_SOURCES` target property was introduced. This is - consumed by dependent targets, which compile and link the listed sources. diff --git a/Help/release/dev/target-SOURCES-genex.rst b/Help/release/dev/target-SOURCES-genex.rst deleted file mode 100644 index 9a65101..0000000 --- a/Help/release/dev/target-SOURCES-genex.rst +++ /dev/null @@ -1,12 +0,0 @@ -target-SOURCES-genex --------------------- - -* The :prop_tgt:`SOURCES` target property now contains - :manual:`generator expression <cmake-generator-expressions(7)>` - such as ``TARGET_OBJECTS`` when read at configure time, if - policy :policy:`CMP0051` is ``NEW``. - -* The :prop_tgt:`SOURCES` target property now generally supports - :manual:`generator expression <cmake-generator-expressions(7)>`. The - generator expressions may be used in the :command:`add_library` and - :command:`add_executable` commands. diff --git a/Help/release/dev/target-SOURCES-write.rst b/Help/release/dev/target-SOURCES-write.rst deleted file mode 100644 index a754a73..0000000 --- a/Help/release/dev/target-SOURCES-write.rst +++ /dev/null @@ -1,6 +0,0 @@ -target-SOURCES-write.rst ------------------------- - -* It is now possible to write and append to the :prop_tgt:`SOURCES` target - property. The :variable:`CMAKE_DEBUG_TARGET_PROPERTIES` variable may be - used to trace the origin of sources. diff --git a/Help/release/dev/target_sources-command.rst b/Help/release/dev/target_sources-command.rst deleted file mode 100644 index abfb303..0000000 --- a/Help/release/dev/target_sources-command.rst +++ /dev/null @@ -1,5 +0,0 @@ -target_sources-command ----------------------- - -* The :command:`target_sources` command was added to add to the - :prop_tgt:`SOURCES` target property. diff --git a/Help/release/dev/thread-sanitizer.rst b/Help/release/dev/thread-sanitizer.rst deleted file mode 100644 index f38e8e1..0000000 --- a/Help/release/dev/thread-sanitizer.rst +++ /dev/null @@ -1,5 +0,0 @@ -thread-sanitizer ----------------- - -* The :command:`ctest_memcheck` command learned to support - ``ThreadSanitizer``. diff --git a/Help/release/dev/variable_watch-no-allowed-access.rst b/Help/release/dev/variable_watch-no-allowed-access.rst deleted file mode 100644 index ba7b4a5..0000000 --- a/Help/release/dev/variable_watch-no-allowed-access.rst +++ /dev/null @@ -1,8 +0,0 @@ -variable_watch-no-allowed-access --------------------------------- - -* Callbacks established by the :command:`variable_watch` command will no - longer receive the ``ALLOWED_UNKNOWN_READ_ACCESS`` access type when - the undocumented ``CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS`` variable is - set. Uninitialized variable accesses will always be reported as - ``UNKNOWN_READ_ACCESS``. diff --git a/Help/release/dev/vs-generator-platform.rst b/Help/release/dev/vs-generator-platform.rst deleted file mode 100644 index cf2090b..0000000 --- a/Help/release/dev/vs-generator-platform.rst +++ /dev/null @@ -1,9 +0,0 @@ -vs-generator-platform ---------------------- - -* The Visual Studio generators for versions 8 (2005) and above - learned to read the target platform name from a new - :variable:`CMAKE_GENERATOR_PLATFORM` variable when it is - not specified as part of the generator name. The platform - name may be specified on the :manual:`cmake(1)` command line - with the ``-A`` option, e.g. ``-G "Visual Studio 12 2013" -A x64``. diff --git a/Help/release/dev/vs-masm.rst b/Help/release/dev/vs-masm.rst deleted file mode 100644 index d7a19d0..0000000 --- a/Help/release/dev/vs-masm.rst +++ /dev/null @@ -1,5 +0,0 @@ -vs-masm -------- - -* Visual Studio generators for VS 8 and later learned to support - the ``ASM_MASM`` language. diff --git a/Help/release/dev/vs-nsight-tegra-generator.rst b/Help/release/dev/vs-nsight-tegra-generator.rst deleted file mode 100644 index 92f4236..0000000 --- a/Help/release/dev/vs-nsight-tegra-generator.rst +++ /dev/null @@ -1,8 +0,0 @@ -vs-nsight-tegra-generator -------------------------- - -* Generators for Visual Studio 10 (2010) and above learned to generate - projects for NVIDIA Nsight Tegra Visual Studio Edition. One may set - the :variable:`CMAKE_SYSTEM_NAME` variable to ``Android`` on the - :manual:`cmake(1)` command-line or in a :variable:`CMAKE_TOOLCHAIN_FILE` - to activate this platform. diff --git a/Help/release/dev/vs-special-source-file-properties.rst b/Help/release/dev/vs-special-source-file-properties.rst deleted file mode 100644 index 166c4b3..0000000 --- a/Help/release/dev/vs-special-source-file-properties.rst +++ /dev/null @@ -1,11 +0,0 @@ -vs-special-source-file-properties ---------------------------------- - -* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added - to tell the Visual Studio generators to mark content for deployment - in Windows Phone and Windows Store projects. - -* The Visual Studio generators learned to treat ``.hlsl`` source - files as High Level Shading Language sources (using ``FXCompile`` - in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file - property was added to specify the Shader Type. diff --git a/Help/release/dev/vs-windows-apps.rst b/Help/release/dev/vs-windows-apps.rst deleted file mode 100644 index 63dae28..0000000 --- a/Help/release/dev/vs-windows-apps.rst +++ /dev/null @@ -1,6 +0,0 @@ -vs-windows-apps ---------------- - -* The :prop_tgt:`VS_WINRT_COMPONENT` target property was created to - tell Visual Studio generators to compile a shared library as a - Windows Runtime (WinRT) component. diff --git a/Help/release/dev/vs-windows-phone-and-store.rst b/Help/release/dev/vs-windows-phone-and-store.rst deleted file mode 100644 index b44e276..0000000 --- a/Help/release/dev/vs-windows-phone-and-store.rst +++ /dev/null @@ -1,10 +0,0 @@ -vs-windows-phone-and-store --------------------------- - -* Generators for Visual Studio 11 (2012) and above learned to generate - projects for Windows Phone and Windows Store. One may set the - :variable:`CMAKE_SYSTEM_NAME` variable to ``WindowsPhone`` - or ``WindowsStore`` on the :manual:`cmake(1)` command-line - or in a :variable:`CMAKE_TOOLCHAIN_FILE` to activate these platforms. - Also set :variable:`CMAKE_SYSTEM_VERSION` to ``8.0`` or ``8.1`` to - specify the version of Windows to be targeted. diff --git a/Help/release/dev/vs14-generator.rst b/Help/release/dev/vs14-generator.rst deleted file mode 100644 index 0bda236..0000000 --- a/Help/release/dev/vs14-generator.rst +++ /dev/null @@ -1,4 +0,0 @@ -vs14-generator --------------- - -* A :generator:`Visual Studio 14` generator was added. diff --git a/Help/release/dev/wix-acl.rst b/Help/release/dev/wix-acl.rst deleted file mode 100644 index bf146d0..0000000 --- a/Help/release/dev/wix-acl.rst +++ /dev/null @@ -1,6 +0,0 @@ -wix-acl -------- - -* The :manual:`cpack(1)` ``WiX`` generator learned to support - a :prop_inst:`CPACK_WIX_ACL` installed file property to - specify an Access Control List. diff --git a/Help/release/dev/xcode-file-type.rst b/Help/release/dev/xcode-file-type.rst deleted file mode 100644 index 6f637f7..0000000 --- a/Help/release/dev/xcode-file-type.rst +++ /dev/null @@ -1,7 +0,0 @@ -xcode-file-type ---------------- - -* The :generator:`Xcode` generator learned to check source - file properties :prop_sf:`XCODE_EXPLICIT_FILE_TYPE` and - :prop_sf:`XCODE_LAST_KNOWN_FILE_TYPE` for a custom Xcode - file reference type. diff --git a/Help/release/index.rst b/Help/release/index.rst index 15ce065..616a582 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -5,12 +5,11 @@ CMake Release Notes This file should include the adjacent "dev.txt" file in development versions but not in release versions. -.. include:: dev.txt - Releases ======== .. toctree:: :maxdepth: 1 + 3.1.0 <3.1.0> 3.0.0 <3.0.0> diff --git a/Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst b/Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst new file mode 100644 index 0000000..2de5fb6 --- /dev/null +++ b/Help/variable/CTEST_MEMORYCHECK_SANITIZER_OPTIONS.rst @@ -0,0 +1,5 @@ +CTEST_MEMORYCHECK_SANITIZER_OPTIONS +----------------------------------- + +Specify the CTest ``MemoryCheckSanitizerOptions`` setting +in a :manual:`ctest(1)` dashboard client script. diff --git a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst index f7875da..f1087c0 100644 --- a/Help/variable/CTEST_MEMORYCHECK_TYPE.rst +++ b/Help/variable/CTEST_MEMORYCHECK_TYPE.rst @@ -1,6 +1,7 @@ CTEST_MEMORYCHECK_TYPE -------------------------- +---------------------- Specify the CTest ``MemoryCheckType`` setting in a :manual:`ctest(1)` dashboard client script. -Valid values are Valgrind, Purify, BoundsChecker, and ThreadSanitizer. +Valid values are Valgrind, Purify, BoundsChecker, and ThreadSanitizer, +AddressSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer. diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake index 8463b5d..4b8dc1e 100644 --- a/Modules/CPackIFW.cmake +++ b/Modules/CPackIFW.cmake @@ -25,6 +25,8 @@ # and Mac OS X. # # To use CPack ``IFW`` generator you must also install QtIFW_. +# If you are not using the default path for the installation, please set +# the path to the variable ``QTIFWDIR``. # # Variables # ^^^^^^^^^ @@ -83,6 +85,19 @@ # The root package name, which will be used if configuration group is not # specified # +# .. variable:: CPACK_IFW_REPOSITORIES_ALL +# +# The list of remote repositories. +# +# The default value of this variable is computed by CPack and contains +# all repositories added with command :command:`cpack_ifw_add_repository` +# +# .. variable:: CPACK_IFW_DOWNLOAD_ALL +# +# If this is ``ON`` all components will be downloaded. +# By default is ``OFF`` or used value +# from :variable:`CPACK_DOWNLOAD_ALL` if set +# # Components # """""""""" # @@ -95,7 +110,7 @@ # Additional prepared packages dirs that will be used to resolve # dependent components. # -# Advanced +# Tools # """""""" # # .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE @@ -104,20 +119,12 @@ # # This variable is cached and can be configured user if need. # -# .. variable:: CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND -# -# True if the "binarycreator" command line client was found. -# # .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE # # The path to "repogen" command line client. # # This variable is cached and can be configured user if need. # -# .. variable:: CPACK_IFW_REPOGEN_EXECUTABLE_FOUND -# -# True if the "repogen" command line client was found. -# # Commands # ^^^^^^^^^ # @@ -191,6 +198,33 @@ # ``LICENSES`` pair of <display_name> and <file_path> of license text for this # component group. You can specify more then one license. # +# -------------------------------------------------------------------------- +# +# .. command:: cpack_ifw_add_repository +# +# Add QtIFW_ specific remote repository. +# +# :: +# +# cpack_ifw_add_repository(<reponame> [DISABLED] +# URL <url> +# [USERNAME <username>] +# [PASSWORD <password>] +# [DISPLAY_NAME <display_name>]) +# +# This macro will also add the <reponame> repository +# to a variable :variable:`CPACK_IFW_REPOSITORIES_ALL` +# +# ``DISABLED`` if set, then the repository will be disabled by default. +# +# ``URL`` is points to a list of available components. +# +# ``USERNAME`` is used as user on a protected repository. +# +# ``PASSWORD`` is password to use on a protected repository. +# +# ``DISPLAY_NAME`` is string to display instead of the URL. +# # Example usage # ^^^^^^^^^^^^^ # @@ -198,7 +232,7 @@ # # set(CPACK_PACKAGE_NAME "MyPackage") # set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "MyPackage Installation Example") -# set(CPACK_PACKAGE_VERSION "1.0.0") +# set(CPACK_PACKAGE_VERSION "1.0.0") # Version of installer # # include(CPack) # include(CPackIFW) @@ -207,8 +241,15 @@ # DISPLAY_NAME "MyApp" # DESCRIPTION "My Application") # cpack_ifw_configure_component(myapp -# VERSION "1.2.3" +# VERSION "1.2.3" # Version of component # SCRIPT "operations.qs") +# cpack_add_component(mybigplugin +# DISPLAY_NAME "MyBigPlugin" +# DESCRIPTION "My Big Downloadable Plugin" +# DOWNLOADED) +# cpack_ifw_add_repository(myrepo +# URL "http://example.com/ifw/repo/myapp" +# DISPLAY_NAME "My Application Repository") # # # Online installer @@ -223,8 +264,11 @@ # Then you would use the command :command:`cpack_configure_downloads`. # If you set ``ALL`` option all components will be downloaded. # +# You also can use command :command:`cpack_ifw_add_repository` and +# variable :variable:`CPACK_IFW_DOWNLOAD_ALL` for more specific configuration. +# # CPack IFW generator create "repository" dir in current binary dir. You -# would copy content of this dir to specified ``site``. +# would copy content of this dir to specified ``site`` (``url``). # # See Also # ^^^^^^^^ @@ -264,48 +308,41 @@ # Default path +set(_CPACK_IFW_PATHS + "${QTIFWDIR}" + "$ENV{QTIFWDIR}" + "${QTDIR}" + "$ENV{QTIFWDIR}") if(WIN32) - set(_CPACK_IFW_PATHS - "$ENV{HOMEDRIVE}/Qt" - "C:/Qt" - ) + list(APPEND _CPACK_IFW_PATHS + "$ENV{HOMEDRIVE}/Qt" + "C:/Qt") else() - set(_CPACK_IFW_PATHS - "$ENV{HOME}/Qt" - "/opt/Qt" - ) + list(APPEND _CPACK_IFW_PATHS + "$ENV{HOME}/Qt" + "/opt/Qt") endif() set(_CPACK_IFW_SUFFIXES - "QtIFW-1.7.0/bin" - "QtIFW-1.6.0/bin" - "QtIFW-1.5.0/bin" - "QtIFW-1.4.0/bin" - "QtIFW-1.3.0/bin" -) + "bin" + "QtIFW-1.7.0/bin" + "QtIFW-1.6.0/bin" + "QtIFW-1.5.0/bin" + "QtIFW-1.4.0/bin" + "QtIFW-1.3.0/bin") # Look for 'binarycreator' -if(NOT CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND) - find_program(CPACK_IFW_BINARYCREATOR_EXECUTABLE NAMES binarycreator PATHS ${_CPACK_IFW_PATHS} PATH_SUFFIXES ${_CPACK_IFW_SUFFIXES} - DOC "QtIFW binarycreator command line client" - ) -mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE) - -if(EXISTS ${CPACK_IFW_BINARYCREATOR_EXECUTABLE}) - set(CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND 1) -endif() + DOC "QtIFW binarycreator command line client") -endif() # NOT CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND +mark_as_advanced(CPACK_IFW_BINARYCREATOR_EXECUTABLE) # Look for 'repogen' -if(NOT CPACK_IFW_REPOGEN_EXECUTABLE_FOUND) - find_program(CPACK_IFW_REPOGEN_EXECUTABLE NAMES repogen PATHS ${_CPACK_IFW_PATHS} @@ -314,12 +351,6 @@ find_program(CPACK_IFW_REPOGEN_EXECUTABLE ) mark_as_advanced(CPACK_IFW_REPOGEN_EXECUTABLE) -if(EXISTS ${CPACK_IFW_REPOGEN_EXECUTABLE}) - set(CPACK_IFW_REPOGEN_EXECUTABLE_FOUND 1) -endif() - -endif() # NOT CPACK_IFW_REPOGEN_EXECUTABLE_FOUND - # ## Next code is included only once # @@ -444,4 +475,43 @@ macro(cpack_ifw_configure_component_group grpname) endif() endmacro() +# Macro for adding repository +macro(cpack_ifw_add_repository reponame) + + string(TOUPPER ${reponame} _CPACK_IFWREPO_UNAME) + + set(_IFW_OPT DISABLED) + set(_IFW_ARGS URL USERNAME PASSWORD DISPLAY_NAME) + set(_IFW_MULTI_ARGS) + cmake_parse_arguments(CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN}) + + set(_CPACK_IFWREPO_STR "\n# Configuration for IFW repository \"${reponame}\"\n") + + foreach(_IFW_ARG_NAME ${_IFW_OPT}) + cpack_append_option_set_command( + CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME} + _CPACK_IFWREPO_STR) + endforeach() + + foreach(_IFW_ARG_NAME ${_IFW_ARGS}) + cpack_append_string_variable_set_command( + CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME} + _CPACK_IFWREPO_STR) + endforeach() + + foreach(_IFW_ARG_NAME ${_IFW_MULTI_ARGS}) + cpack_append_variable_set_command( + CPACK_IFW_REPOSITORY_${_CPACK_IFWREPO_UNAME}_${_IFW_ARG_NAME} + _CPACK_IFWREPO_STR) + endforeach() + + list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame}) + set(_CPACK_IFWREPO_STR "${_CPACK_IFWREPO_STR}list(APPEND CPACK_IFW_REPOSITORIES_ALL ${reponame})\n") + + if(CPack_CMake_INCLUDED) + file(APPEND "${CPACK_OUTPUT_CONFIG_FILE}" "${_CPACK_IFWREPO_STR}") + endif() + +endmacro() + endif() # NOT CPackIFW_CMake_INCLUDED diff --git a/Modules/CheckStructHasMember.cmake b/Modules/CheckStructHasMember.cmake index 880a688..c8949cf 100644 --- a/Modules/CheckStructHasMember.cmake +++ b/Modules/CheckStructHasMember.cmake @@ -70,7 +70,7 @@ ${_INCLUDE_FILES} int main() { ${_STRUCT}* tmp; - tmp->${_MEMBER}; + (void) tmp->${_MEMBER}; return 0; } ") diff --git a/Modules/DartConfiguration.tcl.in b/Modules/DartConfiguration.tcl.in index 86049d0..37a0a40 100644 --- a/Modules/DartConfiguration.tcl.in +++ b/Modules/DartConfiguration.tcl.in @@ -75,6 +75,7 @@ PurifyCommand: @PURIFYCOMMAND@ ValgrindCommand: @VALGRIND_COMMAND@ ValgrindCommandOptions: @VALGRIND_COMMAND_OPTIONS@ MemoryCheckType: @MEMORYCHECK_TYPE@ +MemoryCheckSanitizerOptions: @MEMORYCHECK_SANITIZER_OPTIONS@ MemoryCheckCommand: @MEMORYCHECK_COMMAND@ MemoryCheckCommandOptions: @MEMORYCHECK_COMMAND_OPTIONS@ MemoryCheckSuppressionFile: @MEMORYCHECK_SUPPRESSIONS_FILE@ diff --git a/Modules/FindBacktrace.cmake b/Modules/FindBacktrace.cmake index 5620661..07109b0 100644 --- a/Modules/FindBacktrace.cmake +++ b/Modules/FindBacktrace.cmake @@ -44,7 +44,7 @@ include(CMakePushCheckState) include(CheckSymbolExists) -include(FindPackageHandleStandardArgs) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) # List of variables to be provided to find_package_handle_standard_args() set(_Backtrace_STD_ARGS Backtrace_INCLUDE_DIR) diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 0eec4ad..3642b3e 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -375,9 +375,9 @@ endfunction() # Guesses Boost's compiler prefix used in built library names # Returns the guess by setting the variable pointed to by _ret function(_Boost_GUESS_COMPILER_PREFIX _ret) - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" + OR CMAKE_CXX_COMPILER MATCHES "icl" + OR CMAKE_CXX_COMPILER MATCHES "icpc") if(WIN32) set (_boost_COMPILER "-iw") else() @@ -403,7 +403,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) set(_boost_COMPILER "-vc6") # yes, this is correct elseif (BORLAND) set(_boost_COMPILER "-bcb") - elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro") + elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") set(_boost_COMPILER "-sw") elseif (MINGW) if(${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION} VERSION_LESS 1.34) diff --git a/Modules/FindITK.cmake b/Modules/FindITK.cmake deleted file mode 100644 index c9d39eb..0000000 --- a/Modules/FindITK.cmake +++ /dev/null @@ -1,61 +0,0 @@ -#.rst: -# FindITK -# ------- -# -# Find an ITK installation or build tree. - -# When ITK is found, the ITKConfig.cmake file is sourced to setup the -# location and configuration of ITK. Please read this file, or -# ITKConfig.cmake.in from the ITK source tree for the full list of -# definitions. Of particular interest is ITK_USE_FILE, a CMake source file -# that can be included to set the include directories, library directories, -# and preprocessor macros. In addition to the variables read from -# ITKConfig.cmake, this find module also defines -# ITK_DIR - The directory containing ITKConfig.cmake. -# This is either the root of the build tree, -# or the lib/InsightToolkit directory. -# This is the only cache entry. -# -# ITK_FOUND - Whether ITK was found. If this is true, -# ITK_DIR is okay. -# -# USE_ITK_FILE - The full path to the UseITK.cmake file. -# This is provided for backward -# compatibility. Use ITK_USE_FILE -# instead. - -#============================================================================= -# Copyright 2001-2010 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Use the Config mode of the find_package() command to find ITKConfig. -# If this succeeds (possibly because ITK_DIR is already set), the -# command will have already loaded ITKConfig.cmake and set ITK_FOUND. -if(NOT ITK_FOUND) - set(_ITK_REQUIRED "") - if(ITK_FIND_REQUIRED) - set(_ITK_REQUIRED REQUIRED) - endif() - set(_ITK_QUIET "") - if(ITK_FIND_QUIETLY) - set(_ITK_QUIET QUIET) - endif() - find_package(ITK ${_ITK_REQUIRED} ${_ITK_QUIET} NO_MODULE - NAMES ITK InsightToolkit - CONFIGS ITKConfig.cmake - ) -endif() - -if(ITK_FOUND) - # Set USE_ITK_FILE for backward-compatibility. - set(USE_ITK_FILE ${ITK_USE_FILE}) -endif() diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index 60a4107..55528b8 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -334,7 +334,7 @@ endfunction() _Ice_FIND() -include(FindPackageHandleStandardArgs) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ice FOUND_VAR Ice_FOUND REQUIRED_VARS Ice_SLICE2CPP_EXECUTABLE diff --git a/Modules/FindLATEX.cmake b/Modules/FindLATEX.cmake index 62eedd6..e353d38 100644 --- a/Modules/FindLATEX.cmake +++ b/Modules/FindLATEX.cmake @@ -104,7 +104,7 @@ find_program(DVIPDF_CONVERTER if (WIN32) find_program(PS2PDF_CONVERTER - NAMES ps2pdf14.bat ps2pdf + NAMES ps2pdf14.bat ps2pdf14 ps2pdf PATHS ${GHOSTSCRIPT_LIBRARY_PATH} ${MIKTEX_BINARY_PATH} ) diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake index cc35e54..731f5f2 100644 --- a/Modules/FindLua.cmake +++ b/Modules/FindLua.cmake @@ -56,7 +56,7 @@ function(set_lua_version_vars) if (Lua_FIND_VERSION_EXACT) if (Lua_FIND_VERSION_COUNT GREATER 1) - set(lua_append_versions ${Lua_FIND_VERSION_MAJOR} ${Lua_FIND_VERSION_MINOR}) + set(lua_append_versions ${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}) endif () elseif (Lua_FIND_VERSION) # once there is a different major version supported this should become a loop diff --git a/Modules/FindPackageHandleStandardArgs.cmake b/Modules/FindPackageHandleStandardArgs.cmake index e8d1dfb..23f3f05 100644 --- a/Modules/FindPackageHandleStandardArgs.cmake +++ b/Modules/FindPackageHandleStandardArgs.cmake @@ -284,18 +284,47 @@ function(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) # version handling: set(VERSION_MSG "") set(VERSION_OK TRUE) - set(VERSION ${${FPHSA_VERSION_VAR}} ) - if (${_NAME}_FIND_VERSION) + set(VERSION ${${FPHSA_VERSION_VAR}}) - if(VERSION) + # check with DEFINED here as the requested or found version may be "0" + if (DEFINED ${_NAME}_FIND_VERSION) + if(DEFINED ${FPHSA_VERSION_VAR}) if(${_NAME}_FIND_VERSION_EXACT) # exact version required - if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") - set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") - set(VERSION_OK FALSE) + # count the dots in the version string + string(REGEX REPLACE "[^.]" "" _VERSION_DOTS "${VERSION}") + # add one dot because there is one dot more than there are components + string(LENGTH "${_VERSION_DOTS}." _VERSION_DOTS) + if (_VERSION_DOTS GREATER ${_NAME}_FIND_VERSION_COUNT) + # Because of the C++ implementation of find_package() ${_NAME}_FIND_VERSION_COUNT + # is at most 4 here. Therefore a simple lookup table is used. + if (${_NAME}_FIND_VERSION_COUNT EQUAL 1) + set(_VERSION_REGEX "[^.]*") + elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 2) + set(_VERSION_REGEX "[^.]*\\.[^.]*") + elseif (${_NAME}_FIND_VERSION_COUNT EQUAL 3) + set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*") + else () + set(_VERSION_REGEX "[^.]*\\.[^.]*\\.[^.]*\\.[^.]*") + endif () + string(REGEX REPLACE "^(${_VERSION_REGEX})\\..*" "\\1" _VERSION_HEAD "${VERSION}") + unset(_VERSION_REGEX) + if (NOT ${_NAME}_FIND_VERSION VERSION_EQUAL _VERSION_HEAD) + set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") + set(VERSION_OK FALSE) + else () + set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") + endif () + unset(_VERSION_HEAD) else () - set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") + if (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + set(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") + set(VERSION_OK FALSE) + else () + set(VERSION_MSG "(found suitable exact version \"${VERSION}\")") + endif () endif () + unset(_VERSION_DOTS) else() # minimum version specified: if ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") diff --git a/Modules/FindSquish.cmake b/Modules/FindSquish.cmake index 4076521..2b7fd22 100644 --- a/Modules/FindSquish.cmake +++ b/Modules/FindSquish.cmake @@ -201,7 +201,7 @@ else() endif() # record if Squish was found -include(FindPackageHandleStandardArgs) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(Squish REQUIRED_VARS SQUISH_INSTALL_DIR SQUISH_CLIENT_EXECUTABLE SQUISH_SERVER_EXECUTABLE VERSION_VAR SQUISH_VERSION ) diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake index 6050dcd..a0bc4d1 100644 --- a/Modules/FindThreads.cmake +++ b/Modules/FindThreads.cmake @@ -14,14 +14,32 @@ # CMAKE_USE_PTHREADS_INIT - are we using pthreads # CMAKE_HP_PTHREADS_INIT - are we using hp pthreads # +# The following import target is created +# +# :: +# +# Threads::Threads +# # For systems with multiple thread libraries, caller can set # # :: # # CMAKE_THREAD_PREFER_PTHREAD +# +# If the use of the -pthread compiler and linker flag is prefered then the +# caller can set +# +# :: +# +# THREADS_PREFER_PTHREAD_FLAG +# +# Please note that the compiler flag can only be used with the imported +# target. Use of both the imported target as well as this switch is highly +# recommended for new code. #============================================================================= # Copyright 2002-2009 Kitware, Inc. +# Copyright 2011-2014 Rolf Eike Beer <eike@sf-mail.de> # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -45,6 +63,58 @@ if(CMAKE_SYSTEM_NAME MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD) CHECK_INCLUDE_FILES("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H) endif() +# Internal helper macro. +# Do NOT even think about using it outside of this file! +macro(_check_threads_lib LIBNAME FUNCNAME VARNAME) + if(NOT Threads_FOUND) + CHECK_LIBRARY_EXISTS(${LIBNAME} ${FUNCNAME} "" ${VARNAME}) + if(${VARNAME}) + set(CMAKE_THREAD_LIBS_INIT "-l${LIBNAME}") + set(CMAKE_HAVE_THREADS_LIBRARY 1) + set(Threads_FOUND TRUE) + endif() + endif () +endmacro() + +# Internal helper macro. +# Do NOT even think about using it outside of this file! +macro(_check_pthreads_flag) + if(NOT Threads_FOUND) + # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread + if(NOT DEFINED THREADS_HAVE_PTHREAD_ARG) + message(STATUS "Check if compiler accepts -pthread") + try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.c + CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread + COMPILE_OUTPUT_VARIABLE OUTPUT) + + if(THREADS_HAVE_PTHREAD_ARG) + if(THREADS_PTHREAD_ARG STREQUAL "2") + set(Threads_FOUND TRUE) + message(STATUS "Check if compiler accepts -pthread - yes") + else() + message(STATUS "Check if compiler accepts -pthread - no") + file(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n") + endif() + else() + message(STATUS "Check if compiler accepts -pthread - no") + file(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") + endif() + + endif() + + if(THREADS_HAVE_PTHREAD_ARG) + set(Threads_FOUND TRUE) + set(CMAKE_THREAD_LIBS_INIT "-pthread") + endif() + endif() +endmacro() + if(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD) # We have sproc set(CMAKE_USE_SPROC_INIT 1) @@ -67,69 +137,23 @@ else() set(Threads_FOUND TRUE) else() - # Do we have -lpthreads - CHECK_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE) - if(CMAKE_HAVE_PTHREADS_CREATE) - set(CMAKE_THREAD_LIBS_INIT "-lpthreads") - set(CMAKE_HAVE_THREADS_LIBRARY 1) - set(Threads_FOUND TRUE) - else() - - # Ok, how about -lpthread - CHECK_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE) - if(CMAKE_HAVE_PTHREAD_CREATE) - set(CMAKE_THREAD_LIBS_INIT "-lpthread") - set(CMAKE_HAVE_THREADS_LIBRARY 1) - set(Threads_FOUND TRUE) + # Check for -pthread first if enabled. This is the recommended + # way, but not backwards compatible as one must also pass -pthread + # as compiler flag then. + if (THREADS_PREFER_PTHREAD_FLAG) + _check_pthreads_flag() + endif () - elseif(CMAKE_SYSTEM_NAME MATCHES "SunOS") + _check_threads_lib(pthreads pthread_create CMAKE_HAVE_PTHREADS_CREATE) + _check_threads_lib(pthread pthread_create CMAKE_HAVE_PTHREAD_CREATE) + if(CMAKE_SYSTEM_NAME MATCHES "SunOS") # On sun also check for -lthread - CHECK_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE) - if(CMAKE_HAVE_THR_CREATE) - set(CMAKE_THREAD_LIBS_INIT "-lthread") - set(CMAKE_HAVE_THREADS_LIBRARY 1) - set(Threads_FOUND TRUE) - endif() - endif() + _check_threads_lib(thread thr_create CMAKE_HAVE_THR_CREATE) endif() endif() endif() - if(NOT CMAKE_HAVE_THREADS_LIBRARY) - # If we did not found -lpthread, -lpthread, or -lthread, look for -pthread - if("x${THREADS_HAVE_PTHREAD_ARG}" STREQUAL "x") - message(STATUS "Check if compiler accepts -pthread") - try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG - ${CMAKE_BINARY_DIR} - ${CMAKE_ROOT}/Modules/CheckForPthreads.c - CMAKE_FLAGS -DLINK_LIBRARIES:STRING=-pthread - COMPILE_OUTPUT_VARIABLE OUTPUT) - - if(THREADS_HAVE_PTHREAD_ARG) - if(THREADS_PTHREAD_ARG STREQUAL "2") - set(Threads_FOUND TRUE) - message(STATUS "Check if compiler accepts -pthread - yes") - else() - message(STATUS "Check if compiler accepts -pthread - no") - file(APPEND - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n") - endif() - else() - message(STATUS "Check if compiler accepts -pthread - no") - file(APPEND - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log - "Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n") - endif() - - endif() - - if(THREADS_HAVE_PTHREAD_ARG) - set(Threads_FOUND TRUE) - set(CMAKE_THREAD_LIBS_INIT "-pthread") - endif() - - endif() + _check_pthreads_flag() endif() endif() @@ -178,3 +202,15 @@ endif() set(CMAKE_REQUIRED_QUIET ${CMAKE_REQUIRED_QUIET_SAVE}) include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND) + +if(THREADS_FOUND AND NOT TARGET Threads::Threads) + add_library(Threads::Threads INTERFACE IMPORTED) + + if(THREADS_HAVE_PTHREAD_ARG) + set_property(TARGET Threads::Threads PROPERTY INTERFACE_COMPILE_OPTIONS "-pthread") + endif() + + if(CMAKE_THREAD_LIBS_INIT) + set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}") + endif() +endif() diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake deleted file mode 100644 index 60f48dd..0000000 --- a/Modules/FindVTK.cmake +++ /dev/null @@ -1,66 +0,0 @@ -#.rst: -# FindVTK -# ------- -# -# Find a VTK installation or build tree. -# -# The following variables are set if VTK is found. If VTK is not found, -# VTK_FOUND is set to false. -# -# :: -# -# VTK_FOUND - Set to true when VTK is found. -# -# The following cache entries must be set by the user to locate VTK: -# -# :: -# -# VTK_DIR - The directory containing VTKConfig.cmake. -# This is either the root of the build tree, -# or the lib/vtk directory. This is the -# only cache entry. -# -# The following variables are set for backward compatibility and should -# not be used in new code: -# -# :: -# -# USE_VTK_FILE - The full path to the UseVTK.cmake file. -# This is provided for backward -# compatibility. Use VTK_USE_FILE -# instead. - -#============================================================================= -# Copyright 2001-2014 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Use the Config mode of the find_package() command to find VTKConfig. -# If this succeeds (possibly because VTK_DIR is already set), the -# command will have already loaded VTKConfig.cmake and set VTK_FOUND. -if(NOT VTK_FOUND) - set(_VTK_REQUIRED "") - if(VTK_FIND_REQUIRED) - set(_VTK_REQUIRED REQUIRED) - endif() - set(_VTK_QUIET "") - if(VTK_FIND_QUIETLY) - set(_VTK_QUIET QUIET) - endif() - find_package(VTK ${_VTK_REQUIRED} ${_VTK_QUIET} NO_MODULE) - unset(_VTK_REQUIRED) - unset(_VTK_QUIET) -endif() - -if(VTK_FOUND) - # Set USE_VTK_FILE for backward-compatibility. - set(USE_VTK_FILE ${VTK_USE_FILE}) -endif() diff --git a/Modules/FindXerces.cmake b/Modules/FindXerces.cmake index 325bb6d..6c6007a 100644 --- a/Modules/FindXerces.cmake +++ b/Modules/FindXerces.cmake @@ -70,7 +70,7 @@ if(Xerces_INCLUDE_DIR) _Xerces_GET_VERSION("${Xerces_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp") endif() -include(FindPackageHandleStandardArgs) +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xerces FOUND_VAR Xerces_FOUND REQUIRED_VARS Xerces_LIBRARY diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c5303ce..716f229 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 0) -set(CMake_VERSION_PATCH 20140930) -#set(CMake_VERSION_RC 1) +set(CMake_VERSION_MINOR 1) +set(CMake_VERSION_PATCH 0) +set(CMake_VERSION_RC 1) diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index 732938b..7f06e2d 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -56,7 +56,7 @@ int cmCPackIFWGenerator::PackageFiles() ifwTmpFile += "/IFWOutput.log"; // Run repogen - if (!DownloadSite.empty()) + if (!Installer.Repositories.empty()) { std::string ifwCmd = RepoGen; ifwCmd += " -c " + this->toplevel + "/config/config.xml"; @@ -128,7 +128,7 @@ int cmCPackIFWGenerator::PackageFiles() { ifwCmd += " --online-only"; } - else if (!DownloadedPackages.empty() && !DownloadSite.empty()) + else if (!DownloadedPackages.empty() && !Installer.Repositories.empty()) { ifwCmd += " -e "; std::set<cmCPackIFWPackage*>::iterator it @@ -223,23 +223,25 @@ int cmCPackIFWGenerator::InitializeInternal() { // Search Qt Installer Framework tools - if(!this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND") || - !this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND")) + const std::string BinCreatorOpt = "CPACK_IFW_BINARYCREATOR_EXECUTABLE"; + const std::string RepoGenOpt = "CPACK_IFW_REPOGEN_EXECUTABLE"; + + if(!this->IsSet(BinCreatorOpt) || + !this->IsSet(RepoGenOpt)) { this->ReadListFile("CPackIFW.cmake"); } // Look 'binarycreator' executable (needs) - if(this->IsOn("CPACK_IFW_BINARYCREATOR_EXECUTABLE_FOUND")) + const char *BinCreatorStr = this->GetOption(BinCreatorOpt); + if(!BinCreatorStr || cmSystemTools::IsNOTFOUND(BinCreatorStr)) { - const char *ifwBinCreatorStr = - this->GetOption("CPACK_IFW_BINARYCREATOR_EXECUTABLE"); - BinCreator = ifwBinCreatorStr ? ifwBinCreatorStr : ""; + BinCreator = ""; } else { - BinCreator = ""; + BinCreator = BinCreatorStr; } if (BinCreator.empty()) @@ -253,15 +255,14 @@ int cmCPackIFWGenerator::InitializeInternal() // Look 'repogen' executable (optional) - if(this->IsOn("CPACK_IFW_REPOGEN_EXECUTABLE_FOUND")) + const char *RepoGenStr = this->GetOption(RepoGenOpt); + if(!RepoGenStr || cmSystemTools::IsNOTFOUND(RepoGenStr)) { - const char *ifwRepoGenStr = - this->GetOption("CPACK_IFW_REPOGEN_EXECUTABLE"); - RepoGen = ifwRepoGenStr ? ifwRepoGenStr : ""; + RepoGen = ""; } else { - RepoGen = ""; + RepoGen = RepoGenStr; } // Variables that Change Behavior @@ -277,16 +278,26 @@ int cmCPackIFWGenerator::InitializeInternal() PkgsDirsVector); } - // Remote repository + // Installer + Installer.Generator = this; + Installer.ConfigureFromOptions(); - if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE")) + if (const char* ifwDownloadAll = + this->GetOption("CPACK_IFW_DOWNLOAD_ALL")) { - DownloadSite = site; + OnlineOnly = cmSystemTools::IsOn(ifwDownloadAll); + } + else if (const char* cpackDownloadAll = + this->GetOption("CPACK_DOWNLOAD_ALL")) + { + OnlineOnly = cmSystemTools::IsOn(cpackDownloadAll); + } + else + { + OnlineOnly = false; } - OnlineOnly = this->IsOn("CPACK_DOWNLOAD_ALL") ? true : false; - - if (!DownloadSite.empty() && RepoGen.empty()) { + if (!Installer.Repositories.empty() && RepoGen.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find QtIFW repository generator \"repogen\": " "likely it is not installed, or not in your PATH" @@ -294,10 +305,6 @@ int cmCPackIFWGenerator::InitializeInternal() return 0; } - // Installer - Installer.Generator = this; - Installer.ConfigureFromOptions(); - return this->Superclass::InitializeInternal(); } diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.h b/Source/CPack/IFW/cmCPackIFWGenerator.h index 7211e04..1d4d67b 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.h +++ b/Source/CPack/IFW/cmCPackIFWGenerator.h @@ -127,8 +127,6 @@ private: std::string RepoGen; std::string BinCreator; - std::string DownloadSite; - bool OnlineOnly; bool ResolveDuplicateNames; std::vector<std::string> PkgsDirsVector; diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx index fcb07e6..0644ecb 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx +++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx @@ -45,6 +45,12 @@ const char *cmCPackIFWInstaller::GetOption(const std::string &op) const } //---------------------------------------------------------------------------- +bool cmCPackIFWInstaller::IsOn(const std::string &op) const +{ + return Generator ? Generator->IsOn(op) : false; +} + +//---------------------------------------------------------------------------- void cmCPackIFWInstaller::ConfigureFromOptions() { // Name; @@ -167,6 +173,78 @@ void cmCPackIFWInstaller::ConfigureFromOptions() { AdminTargetDir = option; } + + // Repositories + Repositories.clear(); + RepositoryStruct Repo; + if (const char *site = this->GetOption("CPACK_DOWNLOAD_SITE")) + { + Repo.Url = site; + Repositories.push_back(Repo); + } + if(const char *RepoAllStr = this->GetOption("CPACK_IFW_REPOSITORIES_ALL")) + { + std::vector<std::string> RepoAllVector; + cmSystemTools::ExpandListArgument(RepoAllStr, + RepoAllVector); + for(std::vector<std::string>::iterator + rit = RepoAllVector.begin(); rit != RepoAllVector.end(); ++rit) + { + std::string prefix = "CPACK_IFW_REPOSITORY_" + + cmsys::SystemTools::UpperCase(*rit) + + "_"; + // Url + if (const char* url = GetOption(prefix + "URL")) + { + Repo.Url = url; + } + else + { + Repo.Url = ""; + } + // Enabled + if (IsOn(prefix + "DISABLED")) + { + Repo.Enabled = "0"; + } + else + { + Repo.Enabled = ""; + } + // Username + if (const char* username = GetOption(prefix + "USERNAME")) + { + Repo.Username = username; + } + else + { + Repo.Username = ""; + } + // Password + if (const char* password = GetOption(prefix + "PASSWORD")) + { + Repo.Password = password; + } + else + { + Repo.Password = ""; + } + // DisplayName + if (const char* displayName = GetOption(prefix + "DISPLAY_NAME")) + { + Repo.DisplayName = displayName; + } + else + { + Repo.DisplayName = ""; + } + + if(!Repo.Url.empty()) + { + Repositories.push_back(Repo); + } + } + } } //---------------------------------------------------------------------------- @@ -246,19 +324,43 @@ void cmCPackIFWInstaller::GenerateInstallerFile() << "</AdminTargetDir>" << std::endl; } - // Site - if (!Generator->DownloadSite.empty()) + // Remote repositories + if (!Repositories.empty()) { xout << " <RemoteRepositories>" << std::endl; - xout << " <Repository>" << std::endl; - xout << " <Url>" << Generator->DownloadSite - << "</Url>" << std::endl; - // These properties can not be set from "cpack_configure_downloads" - // <Enabled>1</Enabled> - // <Username>user</Username> - // <Password>password</Password> - // <DisplayName>Example repository</DisplayName> - xout << " </Repository>" << std::endl; + for(std::vector<RepositoryStruct>::iterator + rit = Repositories.begin(); rit != Repositories.end(); ++rit) + { + xout << " <Repository>" << std::endl; + // Url + xout << " <Url>" << rit->Url + << "</Url>" << std::endl; + // Enabled + if(!rit->Enabled.empty()) + { + xout << " <Enabled>" << rit->Enabled + << "</Enabled>" << std::endl; + } + // Username + if(!rit->Username.empty()) + { + xout << " <Username>" << rit->Username + << "</Username>" << std::endl; + } + // Password + if(!rit->Password.empty()) + { + xout << " <Password>" << rit->Password + << "</Password>" << std::endl; + } + // DisplayName + if(!rit->DisplayName.empty()) + { + xout << " <DisplayName>" << rit->DisplayName + << "</DisplayName>" << std::endl; + } + xout << " </Repository>" << std::endl; + } xout << " </RemoteRepositories>" << std::endl; } diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.h b/Source/CPack/IFW/cmCPackIFWInstaller.h index 1630a94..5824d33 100644 --- a/Source/CPack/IFW/cmCPackIFWInstaller.h +++ b/Source/CPack/IFW/cmCPackIFWInstaller.h @@ -27,6 +27,15 @@ public: // Types typedef std::map<std::string, cmCPackIFWPackage*> PackagesMap; + struct RepositoryStruct + { + std::string Url; + std::string Enabled; + std::string Username; + std::string Password; + std::string DisplayName; + }; + public: // Constructor /** @@ -69,6 +78,7 @@ public: // Configuration public: // Internal implementation const char* GetOption(const std::string& op) const; + bool IsOn(const std::string& op) const; void ConfigureFromOptions(); @@ -78,6 +88,7 @@ public: // Internal implementation cmCPackIFWGenerator* Generator; PackagesMap Packages; + std::vector<RepositoryStruct> Repositories; std::string Directory; }; diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 744280a..7e00027 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -850,6 +850,11 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons( std::string relativeDirectoryPath = cmSystemTools::RelativePath(toplevel.c_str(), topdir.c_str()); + if(relativeDirectoryPath.empty()) + { + relativeDirectoryPath = "."; + } + cmInstalledFile const* directoryInstalledFile = this->GetInstalledFile(relativeDirectoryPath); diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx index 934481b..7f966aa 100644 --- a/Source/CTest/cmCTestBatchTestHandler.cxx +++ b/Source/CTest/cmCTestBatchTestHandler.cxx @@ -33,8 +33,8 @@ void cmCTestBatchTestHandler::WriteBatchScript() { this->Script = this->CTest->GetBinaryDir() + "/Testing/CTestBatch.txt"; - std::fstream fout; - fout.open(this->Script.c_str(), std::ios::out); + cmsys::ofstream fout; + fout.open(this->Script.c_str()); fout << "#!/bin/sh\n"; for(TestMap::iterator i = this->Tests.begin(); i != this->Tests.end(); ++i) @@ -48,7 +48,7 @@ void cmCTestBatchTestHandler::WriteBatchScript() } //--------------------------------------------------------- -void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout) +void cmCTestBatchTestHandler::WriteSrunArgs(int test, cmsys::ofstream& fout) { cmCTestTestHandler::cmCTestTestProperties* properties = this->Properties[test]; @@ -79,7 +79,7 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::fstream& fout) } //--------------------------------------------------------- -void cmCTestBatchTestHandler::WriteTestCommand(int test, std::fstream& fout) +void cmCTestBatchTestHandler::WriteTestCommand(int test, cmsys::ofstream& fout) { std::vector<std::string> args = this->Properties[test]->Args; std::vector<std::string> processArgs; diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h index ab0d081..e0c6e48 100644 --- a/Source/CTest/cmCTestBatchTestHandler.h +++ b/Source/CTest/cmCTestBatchTestHandler.h @@ -17,6 +17,7 @@ #include <cmCTestTestHandler.h> #include <cmCTestMultiProcessHandler.h> #include <cmCTestRunTest.h> +#include <cmsys/FStream.hxx> /** \class cmCTestBatchTestHandler * \brief run parallel ctest @@ -30,8 +31,8 @@ public: virtual void RunTests(); protected: void WriteBatchScript(); - void WriteSrunArgs(int test, std::fstream& fout); - void WriteTestCommand(int test, std::fstream& fout); + void WriteSrunArgs(int test, cmsys::ofstream& fout); + void WriteTestCommand(int test, cmsys::ofstream& fout); void SubmitBatchScript(); diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx b/Source/CTest/cmCTestMemCheckCommand.cxx index 939b4dc..f144066 100644 --- a/Source/CTest/cmCTestMemCheckCommand.cxx +++ b/Source/CTest/cmCTestMemCheckCommand.cxx @@ -23,6 +23,8 @@ cmCTestGenericHandler* cmCTestMemCheckCommand::InitializeActualHandler() this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, "MemoryCheckType", "CTEST_MEMORYCHECK_TYPE"); this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, + "MemoryCheckSanitizerOptions", "CTEST_MEMORYCHECK_SANITIZER_OPTIONS"); + this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, "MemoryCheckCommand", "CTEST_MEMORYCHECK_COMMAND"); this->CTest->SetCTestConfigurationFromCMakeVariable(this->Makefile, "MemoryCheckCommandOptions", "CTEST_MEMORYCHECK_COMMAND_OPTIONS"); diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index a7ab077..4835010 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -370,11 +370,17 @@ void cmCTestMemCheckHandler::GenerateDartOutput(std::ostream& os) case cmCTestMemCheckHandler::BOUNDS_CHECKER: os << "BoundsChecker"; break; + case cmCTestMemCheckHandler::ADDRESS_SANITIZER: + os << "AddressSanitizer"; + break; case cmCTestMemCheckHandler::THREAD_SANITIZER: os << "ThreadSanitizer"; break; - case cmCTestMemCheckHandler::ADDRESS_SANITIZER: - os << "AddressSanitizer"; + case cmCTestMemCheckHandler::MEMORY_SANITIZER: + os << "MemorySanitizer"; + break; + case cmCTestMemCheckHandler::UB_SANITIZER: + os << "UndefinedBehaviorSanitizer"; break; default: os << "Unknown"; @@ -537,6 +543,14 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->MemoryTesterStyle = cmCTestMemCheckHandler::BOUNDS_CHECKER; } if ( this->CTest->GetCTestConfiguration("MemoryCheckType") + == "AddressSanitizer") + { + this->MemoryTester + = this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); + this->MemoryTesterStyle = cmCTestMemCheckHandler::ADDRESS_SANITIZER; + this->LogWithPID = true; // even if we give the log file the pid is added + } + if ( this->CTest->GetCTestConfiguration("MemoryCheckType") == "ThreadSanitizer") { this->MemoryTester @@ -545,11 +559,19 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->LogWithPID = true; // even if we give the log file the pid is added } if ( this->CTest->GetCTestConfiguration("MemoryCheckType") - == "AddressSanitizer") + == "MemorySanitizer") { this->MemoryTester = this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); - this->MemoryTesterStyle = cmCTestMemCheckHandler::ADDRESS_SANITIZER; + this->MemoryTesterStyle = cmCTestMemCheckHandler::MEMORY_SANITIZER; + this->LogWithPID = true; // even if we give the log file the pid is added + } + if ( this->CTest->GetCTestConfiguration("MemoryCheckType") + == "UndefinedBehaviorSanitizer") + { + this->MemoryTester + = this->CTest->GetCTestConfiguration("CMakeCommand").c_str(); + this->MemoryTesterStyle = cmCTestMemCheckHandler::UB_SANITIZER; this->LogWithPID = true; // even if we give the log file the pid is added } // Check the MemoryCheckType @@ -674,10 +696,11 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() this->MemoryTesterOptions.push_back("/M"); break; } - // these two are almost the same but the env var used - // is different + // these are almost the same but the env var used is different case cmCTestMemCheckHandler::ADDRESS_SANITIZER: case cmCTestMemCheckHandler::THREAD_SANITIZER: + case cmCTestMemCheckHandler::MEMORY_SANITIZER: + case cmCTestMemCheckHandler::UB_SANITIZER: { // To pass arguments to ThreadSanitizer the environment variable // TSAN_OPTIONS is used. This is done with the cmake -E env command. @@ -686,15 +709,30 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking() // TSAN_OPTIONS string with the log_path in it. this->MemoryTesterDynamicOptions.push_back("-E"); this->MemoryTesterDynamicOptions.push_back("env"); - std::string envVar = "TSAN_OPTIONS"; - std::string extraOptions; + std::string envVar; + std::string extraOptions = + this->CTest->GetCTestConfiguration("MemoryCheckSanitizerOptions"); if(this->MemoryTesterStyle == cmCTestMemCheckHandler::ADDRESS_SANITIZER) { envVar = "ASAN_OPTIONS"; - extraOptions = " detect_leaks=1"; + extraOptions += " detect_leaks=1"; + } + else if(this->MemoryTesterStyle == + cmCTestMemCheckHandler::THREAD_SANITIZER) + { + envVar = "TSAN_OPTIONS"; + } + else if(this->MemoryTesterStyle == + cmCTestMemCheckHandler::MEMORY_SANITIZER) + { + envVar = "MSAN_OPTIONS"; + } + else if(this->MemoryTesterStyle == cmCTestMemCheckHandler::UB_SANITIZER) + { + envVar = "UBSAN_OPTIONS"; } std::string outputFile = envVar + "=log_path=\"" - + this->MemoryTesterOutputFile + "\""; + + this->MemoryTesterOutputFile + "\" "; this->MemoryTesterEnvironmentVariable = outputFile + extraOptions; break; } @@ -728,9 +766,13 @@ ProcessMemCheckOutput(const std::string& str, return this->ProcessMemCheckPurifyOutput(str, log, results); } else if ( this->MemoryTesterStyle == + cmCTestMemCheckHandler::ADDRESS_SANITIZER || + this->MemoryTesterStyle == cmCTestMemCheckHandler::THREAD_SANITIZER || this->MemoryTesterStyle == - cmCTestMemCheckHandler::ADDRESS_SANITIZER) + cmCTestMemCheckHandler::MEMORY_SANITIZER || + this->MemoryTesterStyle == + cmCTestMemCheckHandler::UB_SANITIZER) { return this->ProcessMemCheckSanitizerOutput(str, log, results); } @@ -770,13 +812,22 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput( std::vector<int>& result) { std::string regex; - if(this->MemoryTesterStyle == cmCTestMemCheckHandler::THREAD_SANITIZER) - { - regex = "WARNING: ThreadSanitizer: (.*) \\(pid=.*\\)"; - } - else + switch ( this->MemoryTesterStyle ) { - regex = "ERROR: AddressSanitizer: (.*) on.*"; + case cmCTestMemCheckHandler::ADDRESS_SANITIZER: + regex = "ERROR: AddressSanitizer: (.*) on.*"; + break; + case cmCTestMemCheckHandler::THREAD_SANITIZER: + regex = "WARNING: ThreadSanitizer: (.*) \\(pid=.*\\)"; + break; + case cmCTestMemCheckHandler::MEMORY_SANITIZER: + regex = "WARNING: MemorySanitizer: (.*)"; + break; + case cmCTestMemCheckHandler::UB_SANITIZER: + regex = "runtime error: (.*)"; + break; + default: + break; } cmsys::RegularExpression sanitizerWarning(regex); cmsys::RegularExpression leakWarning("(Direct|Indirect) leak of .*"); diff --git a/Source/CTest/cmCTestMemCheckHandler.h b/Source/CTest/cmCTestMemCheckHandler.h index 2195dab..69fdd9f 100644 --- a/Source/CTest/cmCTestMemCheckHandler.h +++ b/Source/CTest/cmCTestMemCheckHandler.h @@ -49,9 +49,11 @@ private: VALGRIND, PURIFY, BOUNDS_CHECKER, - // checkers after hear do not use the standard error list + // checkers after here do not use the standard error list + ADDRESS_SANITIZER, THREAD_SANITIZER, - ADDRESS_SANITIZER + MEMORY_SANITIZER, + UB_SANITIZER }; public: enum { // Memory faults diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index b9e6721..7ba434c 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -319,8 +319,8 @@ void cmCTestMultiProcessHandler::UpdateCostData() { std::string fname = this->CTest->GetCostDataFile(); std::string tmpout = fname + ".tmp"; - std::fstream fout; - fout.open(tmpout.c_str(), std::ios::out); + cmsys::ofstream fout; + fout.open(tmpout.c_str()); PropertiesMap temp = this->Properties; @@ -610,8 +610,8 @@ void cmCTestMultiProcessHandler::WriteCheckpoint(int index) { std::string fname = this->CTest->GetBinaryDir() + "/Testing/Temporary/CTestCheckpoint.txt"; - std::fstream fout; - fout.open(fname.c_str(), std::ios::app | std::ios::out); + cmsys::ofstream fout; + fout.open(fname.c_str(), std::ios::app); fout << index << "\n"; fout.close(); } diff --git a/Source/CTest/cmParseCoberturaCoverage.cxx b/Source/CTest/cmParseCoberturaCoverage.cxx index 6b98056..0742be1 100644 --- a/Source/CTest/cmParseCoberturaCoverage.cxx +++ b/Source/CTest/cmParseCoberturaCoverage.cxx @@ -71,6 +71,7 @@ protected: cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Reading file: " << atts[tagCount+1]<< std::endl); std::string filename = atts[tagCount+1]; + this->CurFileName = ""; for(size_t i=0;i < FilePaths.size();i++) { finalpath = FilePaths[i] + "/" + filename; diff --git a/Source/cmGlobalBorlandMakefileGenerator.h b/Source/cmGlobalBorlandMakefileGenerator.h index 470dea4..120d2f8 100644 --- a/Source/cmGlobalBorlandMakefileGenerator.h +++ b/Source/cmGlobalBorlandMakefileGenerator.h @@ -39,7 +39,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6a4adc0..ae0e807 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -318,7 +318,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf) // will run xcodebuild and if it sees the error text file busy // it will stop forwarding output, and let the build finish. // Then it will retry the build. It will continue this - // untill no text file busy errors occur. + // until no text file busy errors occur. std::string cmakexbuild = this->CMakeInstance->GetCacheManager()->GetCacheValue("CMAKE_COMMAND"); cmakexbuild = cmakexbuild.substr(0, cmakexbuild.length()-5); @@ -1008,9 +1008,9 @@ void cmGlobalGenerator::SetLanguageEnabledMaps(const std::string& l, if (sscanf(linkerPref, "%d", &preference)!=1) { // backward compatibility: before 2.6 LINKER_PREFERENCE - // was either "None" or "Prefered", and only the first character was + // was either "None" or "Preferred", and only the first character was // tested. So if there is a custom language out there and it is - // "Prefered", set its preference high + // "Preferred", set its preference high if (linkerPref[0]=='P') { preference = 100; diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index f166789..ddd7e91 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -39,7 +39,7 @@ class cmExportBuildFileGenerator; class cmQtAutoGenerators; /** \class cmGlobalGenerator - * \brief Responable for overseeing the generation process for the entire tree + * \brief Responsible for overseeing the generation process for the entire tree * * Subclasses of this class generate makefiles for various * platforms. @@ -94,7 +94,7 @@ public: void ClearEnabledLanguages(); void GetEnabledLanguages(std::vector<std::string>& lang) const; /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, @@ -108,7 +108,7 @@ public: bool optional) const; /** - * Try to determine system infomation, get it from another generator + * Try to determine system information, get it from another generator */ virtual void EnableLanguagesFromGenerator(cmGlobalGenerator *gen, cmMakefile* mf); @@ -198,7 +198,7 @@ public: std::string GetLanguageFromExtension(const char* ext) const; ///! is an extension to be ignored bool IgnoreFile(const char* ext) const; - ///! What is the preference for linkers and this language (None or Prefered) + ///! What is the preference for linkers and this language (None or Preferred) int GetLinkerPreference(const std::string& lang) const; ///! What is the object file extension for a given source file? std::string GetLanguageOutputExtension(cmSourceFile const&) const; diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h index 344e013..fbb35f3 100644 --- a/Source/cmGlobalJOMMakefileGenerator.h +++ b/Source/cmGlobalJOMMakefileGenerator.h @@ -40,7 +40,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalMSYSMakefileGenerator.h b/Source/cmGlobalMSYSMakefileGenerator.h index c4825bd..baecde7 100644 --- a/Source/cmGlobalMSYSMakefileGenerator.h +++ b/Source/cmGlobalMSYSMakefileGenerator.h @@ -39,7 +39,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalMinGWMakefileGenerator.h b/Source/cmGlobalMinGWMakefileGenerator.h index 4289422..fa8d9f2 100644 --- a/Source/cmGlobalMinGWMakefileGenerator.h +++ b/Source/cmGlobalMinGWMakefileGenerator.h @@ -38,7 +38,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index 2ff44e3..e7b03dd 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -38,7 +38,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 50e1abb..6e7b06b 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -205,7 +205,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os, && args.size() + buildstr.size() + assignments.size() > (size_t) cmdLineLimit) { buildstr += "_RSP_FILE"; - variable_assignments.clear(); + variable_assignments.str(std::string()); cmGlobalNinjaGenerator::WriteVariable(variable_assignments, "RSP_FILE", rspfile, "", 1); assignments += variable_assignments.str(); @@ -1042,17 +1042,27 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os) std::back_inserter(unkownExplicitDepends)); + std::string const rootBuildDirectory = + this->GetCMakeInstance()->GetHomeOutputDirectory(); for (std::vector<std::string>::const_iterator i = unkownExplicitDepends.begin(); i != unkownExplicitDepends.end(); ++i) { - cmNinjaDeps deps(1,*i); - this->WritePhonyBuild(os, - "", - deps, - deps); - } + //verify the file is in the build directory + std::string const absDepPath = cmSystemTools::CollapseFullPath( + i->c_str(), rootBuildDirectory.c_str()); + bool const inBuildDir = cmSystemTools::IsSubDirectory(absDepPath.c_str(), + rootBuildDirectory.c_str()); + if(inBuildDir) + { + cmNinjaDeps deps(1,*i); + this->WritePhonyBuild(os, + "", + deps, + deps); + } + } } void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os) @@ -1128,6 +1138,16 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()), implicitDeps.end()); + cmNinjaVars variables; + // Use 'console' pool to get non buffered output of the CMake re-run call + // Available since Ninja 1.5 + if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, + ninjaVersion().c_str(), + "1.5") == false) + { + variables["pool"] = "console"; + } + this->WriteBuild(os, "Re-run CMake if any of its inputs changed.", "RERUN_CMAKE", @@ -1135,7 +1155,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os) /*explicitDeps=*/ cmNinjaDeps(), implicitDeps, /*orderOnlyDeps=*/ cmNinjaDeps(), - /*variables=*/ cmNinjaVars()); + variables); this->WritePhonyBuild(os, "A missing CMake input file is not an error.", @@ -1154,6 +1174,17 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const return "ninja"; } +std::string cmGlobalNinjaGenerator::ninjaVersion() const +{ + std::string version; + std::string command = ninjaCmd() + " --version"; + cmSystemTools::RunSingleCommand(command.c_str(), + &version, 0, 0, + cmSystemTools::OUTPUT_NONE); + + return version; +} + void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) { WriteRule(*this->RulesFileStream, diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 4cbbeea..f666ee3 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -297,6 +297,8 @@ public: void AddTargetAlias(const std::string& alias, cmTarget* target); virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; + + std::string ninjaVersion() const; protected: /// Overloaded methods. @see cmGlobalGenerator::Generate() @@ -335,8 +337,7 @@ private: std::string ninjaCmd() const; - - /// The file containing the build statement. (the relation ship of the + /// The file containing the build statement. (the relationship of the /// compilation DAG). cmGeneratedFileStream* BuildFileStream; /// The file containing the rule statements. (The action attached to each diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index f44dd12..c61c36e 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -71,7 +71,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 3af7b51..686dcdf 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -49,7 +49,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index 57c2660..58efb25 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/Source/cmGlobalVisualStudio6Generator.h @@ -42,7 +42,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 04a74db..201a6a6 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -52,7 +52,7 @@ public: static void GetDocumentation(cmDocumentationEntry& entry); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalVisualStudio9Generator.h b/Source/cmGlobalVisualStudio9Generator.h index c24d5fe..0a191cd 100644 --- a/Source/cmGlobalVisualStudio9Generator.h +++ b/Source/cmGlobalVisualStudio9Generator.h @@ -32,7 +32,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void WriteSLNHeader(std::ostream& fout); diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h index 2057a42..0e577b5 100644 --- a/Source/cmGlobalWatcomWMakeGenerator.h +++ b/Source/cmGlobalWatcomWMakeGenerator.h @@ -38,7 +38,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 4fe04fc..9d7b784 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -44,7 +44,7 @@ public: virtual cmLocalGenerator *CreateLocalGenerator(); /** - * Try to determine system infomation such as shared library + * Try to determine system information such as shared library * extension, pthreads, byte order etc. */ virtual void EnableLanguage(std::vector<std::string>const& languages, diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 4bd9191..50e279b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1287,9 +1287,11 @@ cmLocalGenerator::ConvertToOutputForExisting(RelativeRoot remote, //---------------------------------------------------------------------------- std::string cmLocalGenerator::ConvertToIncludeReference(std::string const& path, - OutputFormat format) + OutputFormat format, + bool forceFullPaths) { - return this->ConvertToOutputForExisting(path, START_OUTPUT, format); + return this->ConvertToOutputForExisting( + path, forceFullPaths? FULL : START_OUTPUT, format); } //---------------------------------------------------------------------------- @@ -1297,6 +1299,7 @@ std::string cmLocalGenerator::GetIncludeFlags( const std::vector<std::string> &includes, cmGeneratorTarget* target, const std::string& lang, + bool forceFullPaths, bool forResponseFile, const std::string& config) { @@ -1401,7 +1404,7 @@ std::string cmLocalGenerator::GetIncludeFlags( flagUsed = true; } std::string includePath = - this->ConvertToIncludeReference(*i, shellFormat); + this->ConvertToIncludeReference(*i, shellFormat, forceFullPaths); if(quotePaths && includePath.size() && includePath[0] != '\"') { includeFlags << "\""; diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index b25b9ab..3a9d5be 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -160,6 +160,7 @@ public: std::string GetIncludeFlags(const std::vector<std::string> &includes, cmGeneratorTarget* target, const std::string& lang, + bool forceFullPaths = false, bool forResponseFile = false, const std::string& config = ""); @@ -215,7 +216,8 @@ public: OutputFormat format = SHELL); virtual std::string ConvertToIncludeReference(std::string const& path, - OutputFormat format = SHELL); + OutputFormat format = SHELL, + bool forceFullPaths = false); /** Called from command-line hook to clear dependencies. */ virtual void ClearDependencies(cmMakefile* /* mf */, diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 2ac8363..398b55a 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -151,9 +151,10 @@ cmLocalNinjaGenerator::ConvertToLinkReference(std::string const& lib, std::string cmLocalNinjaGenerator::ConvertToIncludeReference(std::string const& path, - OutputFormat format) + OutputFormat format, + bool forceFullPaths) { - return this->Convert(path, HOME_OUTPUT, format); + return this->Convert(path, forceFullPaths? FULL : HOME_OUTPUT, format); } //---------------------------------------------------------------------------- @@ -189,6 +190,7 @@ void cmLocalNinjaGenerator::WriteBuildFileTop() { // For the build file. this->WriteProjectHeader(this->GetBuildFileStream()); + this->WriteNinjaRequiredVersion(this->GetBuildFileStream()); this->WriteNinjaFilesInclusion(this->GetBuildFileStream()); // For the rule file. @@ -205,6 +207,30 @@ void cmLocalNinjaGenerator::WriteProjectHeader(std::ostream& os) cmGlobalNinjaGenerator::WriteDivider(os); } +void cmLocalNinjaGenerator::WriteNinjaRequiredVersion(std::ostream& os) +{ + // Default required version + // Ninja generator uses 'deps' and 'msvc_deps_prefix' introduced in 1.3 + std::string requiredVersion = "1.3"; + + // Ninja generator uses the 'console' pool if available (>= 1.5) + std::string usedVersion = this->GetGlobalNinjaGenerator()->ninjaVersion(); + if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, + usedVersion.c_str(), + "1.5") == false) + { + requiredVersion = "1.5"; + } + + cmGlobalNinjaGenerator::WriteComment(os, + "Minimal version of Ninja required by this file"); + os + << "ninja_required_version = " + << requiredVersion + << std::endl << std::endl + ; +} + void cmLocalNinjaGenerator::WritePools(std::ostream& os) { cmGlobalNinjaGenerator::WriteDivider(os); diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 11321b8..1d27224 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -108,7 +108,8 @@ public: protected: virtual std::string ConvertToIncludeReference(std::string const& path, - OutputFormat format = SHELL); + OutputFormat format = SHELL, + bool forceFullPaths = false); private: @@ -117,6 +118,7 @@ private: void WriteBuildFileTop(); void WriteProjectHeader(std::ostream& os); + void WriteNinjaRequiredVersion(std::ostream& os); void WriteNinjaFilesInclusion(std::ostream& os); void WriteProcessedMakefile(std::ostream& os); void WritePools(std::ostream& os); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 11a9627..eb45423 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -796,6 +796,20 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, << "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n" << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n"; + if (this->FortranProject) + { + // Intel Fortran >= 15.0 uses TargetName property. + std::string targetNameFull = target.GetFullName(configName); + std::string targetName = + cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull); + std::string targetExt = + cmSystemTools::GetFilenameLastExtension(targetNameFull); + fout << + "\t\t\tTargetName=\"" << this->EscapeForXML(targetName) << "\"\n" + "\t\t\tTargetExt=\"" << this->EscapeForXML(targetExt) << "\"\n" + ; + } + // If unicode is enabled change the character set to unicode, if not // then default to MBCS. if(targetOptions.UsingUnicode()) diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 7849d12..1f8f686 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -1962,7 +1962,7 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags, std::string includeFlags = this->LocalGenerator->GetIncludeFlags(includes, this->GeneratorTarget, - lang, useResponseFile); + lang, false, useResponseFile); if(includeFlags.empty()) { return; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index cb070cc..93ebde6 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1180,9 +1180,9 @@ cmQtAutoGenerators::WriteOldMocDefinitionsFile( cmSystemTools::ConvertToUnixSlashes(filename); filename += "/AutomocOldMocDefinitions.cmake"; - std::fstream outfile; + cmsys::ofstream outfile; outfile.open(filename.c_str(), - std::ios::out | std::ios::trunc); + std::ios::trunc); outfile << "set(AM_OLD_COMPILE_SETTINGS " << cmLocalGenerator::EscapeForCMake( this->CurrentCompileSettingsStr) << ")\n"; @@ -1451,9 +1451,9 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) } // source file that includes all remaining moc files (_automoc.cpp file) - std::fstream outfile; + cmsys::ofstream outfile; outfile.open(this->OutMocCppFilename.c_str(), - std::ios::out | std::ios::trunc); + std::ios::trunc); outfile << automocSource; outfile.close(); diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt index 3ad0b26..2023e74 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/CMakeLists.txt @@ -103,11 +103,11 @@ unset(CTEST_EXTRA_CONFIG) unset(CTEST_EXTRA_CODE) unset(CMAKELISTS_EXTRA_CODE) +#----------------------------------------------------------------------------- # add ThreadSanitizer test set(CTEST_EXTRA_CODE "set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"report_bugs=1 history_size=5 exitcode=55\") ") - set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" -P \"${CMAKE_CURRENT_SOURCE_DIR}/testThreadSanitizer.cmake\") @@ -119,11 +119,11 @@ set_tests_properties(CTestTestMemcheckDummyThreadSanitizer PROPERTIES set(CMAKELISTS_EXTRA_CODE ) set(CTEST_EXTRA_CODE) +#----------------------------------------------------------------------------- # add LeakSanitizer test set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") ") - set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" -P \"${CMAKE_CURRENT_SOURCE_DIR}/testLeakSanitizer.cmake\") @@ -134,11 +134,12 @@ set(CTEST_EXTRA_CODE) set_tests_properties(CTestTestMemcheckDummyLeakSanitizer PROPERTIES PASS_REGULAR_EXPRESSION ".*Memory checking results:.*Direct leak - 2.*Indirect leak - 1.*") + +#----------------------------------------------------------------------------- # add AddressSanitizer test set(CTEST_EXTRA_CODE -"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") ") - set(CMAKELISTS_EXTRA_CODE "add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" -P \"${CMAKE_CURRENT_SOURCE_DIR}/testAddressSanitizer.cmake\") @@ -150,6 +151,41 @@ set_tests_properties(CTestTestMemcheckDummyAddressSanitizer PROPERTIES PASS_REGULAR_EXPRESSION ".*Memory checking results:.*heap-buffer-overflow - 1.*") +#----------------------------------------------------------------------------- +# add MemorySanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_COMMAND_OPTIONS \"simulate_sanitizer=1 report_bugs=1 history_size=5 exitcode=55\") +") + +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" +-P \"${CMAKE_CURRENT_SOURCE_DIR}/testMemorySanitizer.cmake\") +") +gen_mc_test_internal(DummyMemorySanitizer "" -DMEMCHECK_TYPE=MemorySanitizer) +set(CMAKELISTS_EXTRA_CODE ) +set(CTEST_EXTRA_CODE) +set_tests_properties(CTestTestMemcheckDummyMemorySanitizer PROPERTIES + PASS_REGULAR_EXPRESSION + ".*Memory checking results:.*use-of-uninitialized-value - 1.*") + +#----------------------------------------------------------------------------- +# add UndefinedBehaviorSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\") +") + +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" +-P \"${CMAKE_CURRENT_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\") +") +gen_mc_test_internal(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer) +set(CMAKELISTS_EXTRA_CODE ) +set(CTEST_EXTRA_CODE) +set_tests_properties(CTestTestMemcheckDummyUndefinedBehaviorSanitizer PROPERTIES + PASS_REGULAR_EXPRESSION + ".*Memory checking results:.*left shift of negative value -256 - 1.*") + +#----------------------------------------------------------------------------- gen_mc_test(DummyPurify "\${PSEUDO_PURIFY}") gen_mc_test(DummyValgrind "\${PSEUDO_VALGRIND}") diff --git a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake index a073151..3082e4b 100644 --- a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake +++ b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake @@ -1,4 +1,4 @@ -# this file simulates a program that has been built with thread sanitizer +# this file simulates a program that has been built with address sanitizer # options message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]") @@ -12,8 +12,7 @@ endif() # clear the log file file(REMOVE "${LOG_FILE}.2343") -# create an error of each type of thread santizer -# these names come from tsan_report.cc in llvm +# create an example error from address santizer file(APPEND "${LOG_FILE}.2343" "================================================================= diff --git a/Tests/CTestTestMemcheck/testMemorySanitizer.cmake b/Tests/CTestTestMemcheck/testMemorySanitizer.cmake new file mode 100644 index 0000000..c87af9a --- /dev/null +++ b/Tests/CTestTestMemcheck/testMemorySanitizer.cmake @@ -0,0 +1,27 @@ +# this file simulates a program that has been built with thread sanitizer +# options + +message("MSAN_OPTIONS = [$ENV{MSAN_OPTIONS}]") +string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{MSAN_OPTIONS}") +message("LOG_FILE=[${LOG_FILE}]") + +# if we are not asked to simulate address sanitizer don't do it +if(NOT "$ENV{MSAN_OPTIONS}]" MATCHES "simulate_sanitizer.1") + return() +endif() +# clear the log file +file(REMOVE "${LOG_FILE}.2343") + +# create an error of each type of thread santizer +# these names come from tsan_report.cc in llvm + +file(APPEND "${LOG_FILE}.2343" +"================================================================= +==28423== WARNING: MemorySanitizer: use-of-uninitialized-value + #0 0x7f4364210dd9 in main (/home/kitware/msan/msan-bin/umr+0x7bdd9) + #1 0x7f4362d9376c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226 + #2 0x7f4364210b0c in _start (/home/kitware/msan/msan-bin/umr+0x7bb0c) + +SUMMARY: MemorySanitizer: use-of-uninitialized-value ??:0 main +Exiting +") diff --git a/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake b/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake new file mode 100644 index 0000000..8ef3c0a --- /dev/null +++ b/Tests/CTestTestMemcheck/testUndefinedBehaviorSanitizer.cmake @@ -0,0 +1,21 @@ +# this file simulates a program that has been built with undefined behavior +# sanitizer options + +message("UBSAN_OPTIONS = [$ENV{UBSAN_OPTIONS}]") +string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{UBSAN_OPTIONS}") +message("LOG_FILE=[${LOG_FILE}]") + +# if we are not asked to simulate address sanitizer don't do it +if(NOT "$ENV{UBSAN_OPTIONS}]" MATCHES "simulate_sanitizer.1") + return() +endif() +# clear the log file +file(REMOVE "${LOG_FILE}.2343") + +# create an error like undefined behavior santizer creates; +# these names come from ubsan_diag.cc and ubsan_handlers.cc +# in llvm + +file(APPEND "${LOG_FILE}.2343" +"<unknown>: runtime error: left shift of negative value -256 +") diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt index a3f83c9..f55e727 100644 --- a/Tests/FortranOnly/CMakeLists.txt +++ b/Tests/FortranOnly/CMakeLists.txt @@ -8,13 +8,14 @@ set_property(TARGET FortranOnlylib PROPERTY Fortran_FORMAT FIXED) set_property(SOURCE world.f PROPERTY Fortran_FORMAT FREE) # create an executable that calls hello and world -add_executable(FortranOnly testf.f) -target_link_libraries(FortranOnly FortranOnlylib) +add_executable(FortranOnly1 testf.f) +set_property(TARGET FortranOnly1 PROPERTY OUTPUT_NAME FortranOnly) +target_link_libraries(FortranOnly1 FortranOnlylib) -# create a custom command that runs FortranOnly and puts +# create a custom command that runs FortranOnly1 and puts # the output into the file testfhello.txt add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt - COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly + COMMAND FortranOnly1 > testfhello.txt) # create a second executable FortranOnly2 that has # testfhello.txt has an source file so that it will @@ -27,15 +28,15 @@ add_custom_target(checktestf2 ALL COMMAND ${CMAKE_COMMAND} -P ${FortranOnly_SOURCE_DIR}/checktestf2.cmake) -# create a custom target that runs FortranOnly exectuable and creates +# create a custom target that runs FortranOnly1 exectuable and creates # a file out.txt that should have hello world in it. add_custom_target(sayhello ALL - COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly > out.txt + COMMAND FortranOnly1 > out.txt ) # make sure stuff is built in the right order add_dependencies(checktestf2 FortranOnly2) -add_dependencies(sayhello FortranOnly) -add_dependencies(FortranOnly2 FortranOnly) +add_dependencies(sayhello FortranOnly1) +add_dependencies(FortranOnly2 FortranOnly1) # add a custom target that checkes that out.txt has the correct # content diff --git a/Tests/RunCMake/FPHSA/FindPseudo.cmake b/Tests/RunCMake/FPHSA/FindPseudo.cmake new file mode 100644 index 0000000..dc3558b --- /dev/null +++ b/Tests/RunCMake/FPHSA/FindPseudo.cmake @@ -0,0 +1,6 @@ +# pseudo find_module + +set(FOOBAR TRUE) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(Pseudo REQUIRED_VARS FOOBAR VERSION_VAR Pseudo_VERSION) diff --git a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake index 0d48fa9..bb7743c 100644 --- a/Tests/RunCMake/FPHSA/RunCMakeTest.cmake +++ b/Tests/RunCMake/FPHSA/RunCMakeTest.cmake @@ -1,3 +1,28 @@ include(RunCMake) run_cmake(BadFoundVar) + +# The pseudo module will "find" a package with the given version. Check if the +# version selection code in FPHSA works correctly. +set(RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=1.2.3.4.5") +run_cmake(any_version) + +# test EXACT mode with every subcomponent +run_cmake(exact_1) +run_cmake(exact_1.2) +run_cmake(exact_1.2.3) +run_cmake(exact_1.2.3.4) + +# now test every component with an invalid version +run_cmake(exact_0) +run_cmake(exact_2) +run_cmake(exact_1.1) +run_cmake(exact_1.3) +run_cmake(exact_1.2.2) +run_cmake(exact_1.2.4) +run_cmake(exact_1.2.3.3) +run_cmake(exact_1.2.3.5) + +# check if searching for a version 0 works +list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_LIST_DIR}" "-DPseudo_VERSION=0") +run_cmake(exact_0_matching) diff --git a/Tests/RunCMake/FPHSA/any_version.cmake b/Tests/RunCMake/FPHSA/any_version.cmake new file mode 100644 index 0000000..b34a540 --- /dev/null +++ b/Tests/RunCMake/FPHSA/any_version.cmake @@ -0,0 +1 @@ +find_package(Pseudo REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_0-result.txt b/Tests/RunCMake/FPHSA/exact_0-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_0-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_0.cmake b/Tests/RunCMake/FPHSA/exact_0.cmake new file mode 100644 index 0000000..432887b --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_0.cmake @@ -0,0 +1 @@ +find_package(Pseudo 0 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_0_matching.cmake b/Tests/RunCMake/FPHSA/exact_0_matching.cmake new file mode 100644 index 0000000..432887b --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_0_matching.cmake @@ -0,0 +1 @@ +find_package(Pseudo 0 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.1-result.txt b/Tests/RunCMake/FPHSA/exact_1.1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.1.cmake b/Tests/RunCMake/FPHSA/exact_1.1.cmake new file mode 100644 index 0000000..d967da9 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.1.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.1 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.2.cmake b/Tests/RunCMake/FPHSA/exact_1.2.2.cmake new file mode 100644 index 0000000..e959f61 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.2.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.2 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake new file mode 100644 index 0000000..af53cc8 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.3.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3.3 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake new file mode 100644 index 0000000..1e2baa6 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.4.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3.4 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.5-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake new file mode 100644 index 0000000..ddb0d13 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.5.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3.5 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.3.cmake b/Tests/RunCMake/FPHSA/exact_1.2.3.cmake new file mode 100644 index 0000000..bf9b2a3 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.3.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.3 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt b/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.4-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.2.4.cmake b/Tests/RunCMake/FPHSA/exact_1.2.4.cmake new file mode 100644 index 0000000..548a079 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.4.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2.4 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.2.cmake b/Tests/RunCMake/FPHSA/exact_1.2.cmake new file mode 100644 index 0000000..080d961 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.2.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.2 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.3-result.txt b/Tests/RunCMake/FPHSA/exact_1.3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_1.3.cmake b/Tests/RunCMake/FPHSA/exact_1.3.cmake new file mode 100644 index 0000000..e36b0c5 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.3.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1.3 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_1.cmake b/Tests/RunCMake/FPHSA/exact_1.cmake new file mode 100644 index 0000000..adadbc4 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_1.cmake @@ -0,0 +1 @@ +find_package(Pseudo 1 EXACT REQUIRED) diff --git a/Tests/RunCMake/FPHSA/exact_2-result.txt b/Tests/RunCMake/FPHSA/exact_2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FPHSA/exact_2.cmake b/Tests/RunCMake/FPHSA/exact_2.cmake new file mode 100644 index 0000000..55353a8 --- /dev/null +++ b/Tests/RunCMake/FPHSA/exact_2.cmake @@ -0,0 +1 @@ +find_package(Pseudo 2 EXACT REQUIRED) diff --git a/Tests/VSResource/CMakeLists.txt b/Tests/VSResource/CMakeLists.txt index c5cb336..17eb041 100644 --- a/Tests/VSResource/CMakeLists.txt +++ b/Tests/VSResource/CMakeLists.txt @@ -18,6 +18,11 @@ if(CMAKE_RC_COMPILER MATCHES windres) message(STATUS "CMAKE_RC_COMPILER MATCHES windres") add_definitions(/DCMAKE_RCDEFINE=test.txt) add_definitions(/DCMAKE_RCDEFINE_NO_QUOTED_STRINGS) + if(MSYS AND CMAKE_CURRENT_BINARY_DIR MATCHES " ") + # windres cannot handle spaces in include dir, and + # for the MSys shell we do not convert to shortpath. + set(CMAKE_RC_NO_INCLUDE 1) + endif() elseif(MSVC60) # VS6 rc compiler does not deal well with spaces in a "/D" value, but it can # handle the quoting @@ -30,10 +35,17 @@ else() set(TEXTFILE_FROM_SOURCE_DIR "textfile, spaces in name, from binary dir") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test.txt "${CMAKE_CURRENT_BINARY_DIR}/test with spaces.txt" @ONLY) - include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_definitions(/DCMAKE_RCDEFINE="test with spaces.txt") endif() +if(CMAKE_RC_NO_INCLUDE) + add_definitions(/DCMAKE_RC_NO_INCLUDE) +else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include.rc.in + "${CMAKE_CURRENT_BINARY_DIR}/include.rc" @ONLY) + include_directories(${CMAKE_CURRENT_BINARY_DIR}) +endif() + add_executable(VSResource main.cpp test.rc) set_property(TARGET VSResource diff --git a/Tests/VSResource/include.rc.in b/Tests/VSResource/include.rc.in new file mode 100644 index 0000000..f0f6859 --- /dev/null +++ b/Tests/VSResource/include.rc.in @@ -0,0 +1 @@ +// This file should be included. diff --git a/Tests/VSResource/test.rc b/Tests/VSResource/test.rc index 4ce4b53..0de4683 100644 --- a/Tests/VSResource/test.rc +++ b/Tests/VSResource/test.rc @@ -1,4 +1,7 @@ #ifdef CMAKE_RCDEFINE +# ifndef CMAKE_RC_NO_INCLUDE +# include <include.rc> +# endif // This line can compile with either an unquoted or a quoted string 1025 TEXTFILE CMAKE_RCDEFINE diff --git a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c index 088ecea..c666551 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_add_filter_lzop.c @@ -85,7 +85,7 @@ static int archive_write_lzop_free(struct archive_write_filter *); #if defined(HAVE_LZO_LZOCONF_H) && defined(HAVE_LZO_LZO1X_H) /* Maximum block size. */ #define BLOCK_SIZE (256 * 1024) -/* Block infomation is composed of uncompressed size(4 bytes), +/* Block information is composed of uncompressed size(4 bytes), * compressed size(4 bytes) and the checksum of uncompressed data(4 bytes) * in this lzop writer. */ #define BLOCK_INfO_SIZE 12 diff --git a/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c b/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c index 4d343ea..b0c8018 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_set_format_mtree.c @@ -1115,7 +1115,7 @@ write_mtree_entry_tree(struct archive_write *a) do { if (mtree->output_global_set) { /* - * Collect attribute infomation to know which value + * Collect attribute information to know which value * is frequently used among the children. */ attr_counter_set_reset(mtree); |