diff options
142 files changed, 1229 insertions, 480 deletions
diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el index 11e33b3..e50ae7b 100644 --- a/Auxiliary/cmake-mode.el +++ b/Auxiliary/cmake-mode.el @@ -70,11 +70,11 @@ set the path with these commands: (defconst cmake-regex-indented (rx-to-string `(and bol (* (group (or (regexp ,cmake-regex-token) (any space ?\n))))))) (defconst cmake-regex-block-open - (rx-to-string `(and bow (or ,@(append cmake-keywords-block-open - (mapcar 'downcase cmake-keywords-block-open))) eow))) + (rx-to-string `(and symbol-start (or ,@(append cmake-keywords-block-open + (mapcar 'downcase cmake-keywords-block-open))) symbol-end))) (defconst cmake-regex-block-close - (rx-to-string `(and bow (or ,@(append cmake-keywords-block-close - (mapcar 'downcase cmake-keywords-block-close))) eow))) + (rx-to-string `(and symbol-start (or ,@(append cmake-keywords-block-close + (mapcar 'downcase cmake-keywords-block-close))) symbol-end))) (defconst cmake-regex-close (rx-to-string `(and bol (* space) (regexp ,cmake-regex-block-close) (* space) (regexp ,cmake-regex-paren-left)))) diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst index 4ed10e1..8b3fb57 100644 --- a/Help/command/add_executable.rst +++ b/Help/command/add_executable.rst @@ -14,7 +14,7 @@ files listed in the command invocation. The ``<name>`` corresponds to the logical target name and must be globally unique within a project. The actual file name of the executable built is constructed based on conventions of the native platform (such as ``<name>.exe`` or just -``<name>``. +``<name>``). By default the executable file will be created in the build tree directory corresponding to the source tree directory in which the diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index fe7735c..5033e18 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -36,6 +36,12 @@ property is set to ``ON`` automatically. A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK` target property to create an OS X Framework. +If a library does not export any symbols, it must not be declared as a +``SHARED`` library. For example, a Windows resource DLL or a managed C++/CLI +DLL that exports no unmanaged symbols would need to be a ``MODULE`` library. +This is because CMake expects a ``SHARED`` library to always have an +associated import library on Windows. + By default the library file will be created in the build tree directory corresponding to the source tree directory in which the command was invoked. See documentation of the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`, diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst index 7e7e6bd..d8a96e9 100644 --- a/Help/command/add_test.rst +++ b/Help/command/add_test.rst @@ -28,6 +28,13 @@ quotes, or other characters special in CMake syntax. The options are: directory set to the build directory corresponding to the current source directory. +The given test command is expected to exit with code ``0`` to pass and +non-zero to fail, or vice-versa if the :prop_test:`WILL_FAIL` test +property is set. Any output written to stdout or stderr will be +captured by :manual:`ctest(1)` but does not affect the pass/fail status +unless the :prop_test:`PASS_REGULAR_EXPRESSION` or +:prop_test:`FAIL_REGULAR_EXPRESSION` test property is used. + The ``COMMAND`` and ``WORKING_DIRECTORY`` options may use "generator expressions" with the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` manual for available expressions. diff --git a/Help/command/file.rst b/Help/command/file.rst index bbddd40..96ac6c7 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -103,7 +103,8 @@ Generate a list of files that match the ``<globbing-expressions>`` and store it into the ``<variable>``. Globbing expressions are similar to regular expressions, but much simpler. If ``RELATIVE`` flag is specified, the results will be returned as relative paths to the given -path. +path. No specific order of results is defined. If order is important then +sort the list explicitly (e.g. using the :command:`list(SORT)` command). By default ``GLOB`` lists directories - directories are omited in result if ``LIST_DIRECTORIES`` is set to false. diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index 357aae9..bc633e6 100644 --- a/Help/manual/cmake-buildsystem.7.rst +++ b/Help/manual/cmake-buildsystem.7.rst @@ -80,6 +80,10 @@ regardless of the library type. The ``MODULE`` library type is dissimilar in that it is generally not linked to -- it is not used in the right-hand-side of the :command:`target_link_libraries` command. It is a type which is loaded as a plugin using runtime techniques. +If the library does not export any unmanaged symbols (e.g. Windows +resource DLL, C++/CLI DLL), it is required that the library not be a +``SHARED`` library because CMake expects ``SHARED`` libraries to export +at least one symbol. .. code-block:: cmake @@ -781,7 +785,8 @@ An *archive* output artifact of a buildsystem target may be: * On DLL platforms: the import library file (e.g. ``.lib``) of a shared library target created by the :command:`add_library` command - with the ``SHARED`` option. + with the ``SHARED`` option. This file is only guaranteed to exist if + the library exports at least one unmanaged symbol. * On DLL platforms: the import library file (e.g. ``.lib``) of an executable target created by the :command:`add_executable` command diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst index ac893c2..931363c 100644 --- a/Help/manual/cmake-properties.7.rst +++ b/Help/manual/cmake-properties.7.rst @@ -254,17 +254,22 @@ Properties on Targets /prop_tgt/TYPE /prop_tgt/VERSION /prop_tgt/VISIBILITY_INLINES_HIDDEN + /prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION /prop_tgt/VS_DOTNET_REFERENCES /prop_tgt/VS_DOTNET_TARGET_FRAMEWORK_VERSION /prop_tgt/VS_GLOBAL_KEYWORD /prop_tgt/VS_GLOBAL_PROJECT_TYPES /prop_tgt/VS_GLOBAL_ROOTNAMESPACE /prop_tgt/VS_GLOBAL_variable + /prop_tgt/VS_IOT_EXTENSIONS_VERSION + /prop_tgt/VS_IOT_STARTUP_TASK /prop_tgt/VS_KEYWORD + /prop_tgt/VS_MOBILE_EXTENSIONS_VERSION /prop_tgt/VS_SCC_AUXPATH /prop_tgt/VS_SCC_LOCALPATH /prop_tgt/VS_SCC_PROJECTNAME /prop_tgt/VS_SCC_PROVIDER + /prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION /prop_tgt/VS_WINRT_COMPONENT /prop_tgt/VS_WINRT_EXTENSIONS /prop_tgt/VS_WINRT_REFERENCES diff --git a/Help/manual/cmake-toolchains.7.rst b/Help/manual/cmake-toolchains.7.rst index a06dce7..492fcac 100644 --- a/Help/manual/cmake-toolchains.7.rst +++ b/Help/manual/cmake-toolchains.7.rst @@ -220,6 +220,23 @@ Windows CE to use. Currently version 8.0 (Windows Embedded Compact 2013) is supported out of the box. Other versions may require one to set :variable:`CMAKE_GENERATOR_TOOLSET` to the correct value. +Cross Compiling for Windows 10 Universal Applications +----------------------------------------------------- + +A toolchain file to configure a Visual Studio generator for a +Windows 10 Universal Application may look like this: + +.. code-block:: cmake + + set(CMAKE_SYSTEM_NAME WindowsStore) + set(CMAKE_SYSTEM_VERSION 10.0) + +A Windows 10 Universal Application targets both Windows Store and +Windows Phone. Specify the :variable:`CMAKE_SYSTEM_VERSION` variable +to be ``10.0`` to build with the latest available Windows 10 SDK. +Specify a more specific version (e.g. ``10.0.10240.0`` for RTM) +to build with the corresponding SDK. + Cross Compiling for Windows Phone --------------------------------- diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst index 635db00..2116900 100644 --- a/Help/manual/cmake-variables.7.rst +++ b/Help/manual/cmake-variables.7.rst @@ -82,6 +82,7 @@ Variables that Provide Information /variable/CMAKE_VS_NsightTegra_VERSION /variable/CMAKE_VS_PLATFORM_NAME /variable/CMAKE_VS_PLATFORM_TOOLSET + /variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION /variable/CMAKE_XCODE_PLATFORM_TOOLSET /variable/PROJECT_BINARY_DIR /variable/PROJECT-NAME_BINARY_DIR diff --git a/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst b/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst index 097cce1..07a933f 100644 --- a/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst +++ b/Help/prop_tgt/MACOSX_BUNDLE_INFO_PLIST.rst @@ -1,29 +1,35 @@ MACOSX_BUNDLE_INFO_PLIST ------------------------ -Specify a custom Info.plist template for a Mac OS X App Bundle. +Specify a custom ``Info.plist`` template for a Mac OS X App Bundle. -An executable target with MACOSX_BUNDLE enabled will be built as an -application bundle on Mac OS X. By default its Info.plist file is -created by configuring a template called MacOSXBundleInfo.plist.in -located in the CMAKE_MODULE_PATH. This property specifies an -alternative template file name which may be a full path. +An executable target with :prop_tgt:`MACOSX_BUNDLE` enabled will be built as an +application bundle on Mac OS X. By default its ``Info.plist`` file is created +by configuring a template called ``MacOSXBundleInfo.plist.in`` located in the +:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template +file name which may be a full path. The following target properties may be set to specify content to be configured into the file: -:: - - MACOSX_BUNDLE_INFO_STRING - MACOSX_BUNDLE_ICON_FILE - MACOSX_BUNDLE_GUI_IDENTIFIER - MACOSX_BUNDLE_LONG_VERSION_STRING - MACOSX_BUNDLE_BUNDLE_NAME - MACOSX_BUNDLE_SHORT_VERSION_STRING - MACOSX_BUNDLE_BUNDLE_VERSION - MACOSX_BUNDLE_COPYRIGHT +``MACOSX_BUNDLE_BUNDLE_NAME`` + Sets ``CFBundleName``. +``MACOSX_BUNDLE_BUNDLE_VERSION`` + Sets ``CFBundleVersion``. +``MACOSX_BUNDLE_COPYRIGHT`` + Sets ``NSHumanReadableCopyright``. +``MACOSX_BUNDLE_GUI_IDENTIFIER`` + Sets ``CFBundleIdentifier``. +``MACOSX_BUNDLE_ICON_FILE`` + Sets ``CFBundleIconFile``. +``MACOSX_BUNDLE_INFO_STRING`` + Sets ``CFBundleGetInfoString``. +``MACOSX_BUNDLE_LONG_VERSION_STRING`` + Sets ``CFBundleLongVersionString``. +``MACOSX_BUNDLE_SHORT_VERSION_STRING`` + Sets ``CFBundleShortVersionString``. CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set. If a custom -Info.plist is specified by this property it may of course hard-code +``Info.plist`` is specified by this property it may of course hard-code all the settings instead of using the target properties. diff --git a/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst b/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst index 729d929..548c3ac 100644 --- a/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst +++ b/Help/prop_tgt/MACOSX_FRAMEWORK_INFO_PLIST.rst @@ -1,25 +1,27 @@ MACOSX_FRAMEWORK_INFO_PLIST --------------------------- -Specify a custom Info.plist template for a Mac OS X Framework. +Specify a custom ``Info.plist`` template for a Mac OS X Framework. -A library target with FRAMEWORK enabled will be built as a framework -on Mac OS X. By default its Info.plist file is created by configuring -a template called MacOSXFrameworkInfo.plist.in located in the -CMAKE_MODULE_PATH. This property specifies an alternative template +A library target with :prop_tgt:`FRAMEWORK` enabled will be built as a +framework on Mac OS X. By default its ``Info.plist`` file is created by +configuring a template called ``MacOSXFrameworkInfo.plist.in`` located in the +:variable:`CMAKE_MODULE_PATH`. This property specifies an alternative template file name which may be a full path. The following target properties may be set to specify content to be configured into the file: -:: - - MACOSX_FRAMEWORK_ICON_FILE - MACOSX_FRAMEWORK_IDENTIFIER - MACOSX_FRAMEWORK_SHORT_VERSION_STRING - MACOSX_FRAMEWORK_BUNDLE_VERSION +``MACOSX_FRAMEWORK_BUNDLE_VERSION`` + Sets ``CFBundleVersion``. +``MACOSX_FRAMEWORK_ICON_FILE`` + Sets ``CFBundleIconFile``. +``MACOSX_FRAMEWORK_IDENTIFIER`` + Sets ``CFBundleIdentifier``. +``MACOSX_FRAMEWORK_SHORT_VERSION_STRING`` + Sets ``CFBundleShortVersionString``. CMake variables of the same name may be set to affect all targets in a directory that do not have each specific property set. If a custom -Info.plist is specified by this property it may of course hard-code +``Info.plist`` is specified by this property it may of course hard-code all the settings instead of using the target properties. diff --git a/Help/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION.rst b/Help/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION.rst new file mode 100644 index 0000000..19d1620 --- /dev/null +++ b/Help/prop_tgt/VS_DESKTOP_EXTENSIONS_VERSION.rst @@ -0,0 +1,10 @@ +VS_DESKTOP_EXTENSIONS_VERSION +----------------------------- + +Visual Studio Windows 10 Desktop Extensions Version + +Specifies the version of the Desktop Extensions that should be included in the +target. For example ``10.0.10240.0``. If the value is not specified, the Desktop +Extensions will not be included. To use the same version of the extensions as +the Windows 10 SDK that is being used, you can use the +:variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` variable. diff --git a/Help/prop_tgt/VS_IOT_EXTENSIONS_VERSION.rst b/Help/prop_tgt/VS_IOT_EXTENSIONS_VERSION.rst new file mode 100644 index 0000000..27c8a3d --- /dev/null +++ b/Help/prop_tgt/VS_IOT_EXTENSIONS_VERSION.rst @@ -0,0 +1,10 @@ +VS_IOT_EXTENSIONS_VERSION +------------------------- + +Visual Studio Windows 10 IoT Extensions Version + +Specifies the version of the IoT Extensions that should be included in the +target. For example ``10.0.10240.0``. If the value is not specified, the IoT +Extensions will not be included. To use the same version of the extensions as +the Windows 10 SDK that is being used, you can use the +:variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` variable. diff --git a/Help/prop_tgt/VS_IOT_STARTUP_TASK.rst b/Help/prop_tgt/VS_IOT_STARTUP_TASK.rst new file mode 100644 index 0000000..add50cb --- /dev/null +++ b/Help/prop_tgt/VS_IOT_STARTUP_TASK.rst @@ -0,0 +1,6 @@ +VS_IOT_STARTUP_TASK +------------------- + +Visual Studio Windows 10 IoT Continuous Background Task + +Specifies that the target should be compiled as a Continuous Background Task library. diff --git a/Help/prop_tgt/VS_MOBILE_EXTENSIONS_VERSION.rst b/Help/prop_tgt/VS_MOBILE_EXTENSIONS_VERSION.rst new file mode 100644 index 0000000..be3c9a0 --- /dev/null +++ b/Help/prop_tgt/VS_MOBILE_EXTENSIONS_VERSION.rst @@ -0,0 +1,10 @@ +VS_MOBILE_EXTENSIONS_VERSION +---------------------------- + +Visual Studio Windows 10 Mobile Extensions Version + +Specifies the version of the Mobile Extensions that should be included in the +target. For example ``10.0.10240.0``. If the value is not specified, the Mobile +Extensions will not be included. To use the same version of the extensions as +the Windows 10 SDK that is being used, you can use the +:variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` variable. diff --git a/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst b/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst new file mode 100644 index 0000000..1ad7a71 --- /dev/null +++ b/Help/prop_tgt/VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION.rst @@ -0,0 +1,10 @@ +VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION +-------------------------------------- + +Visual Studio Windows Target Platform Minimum Version + +For Windows 10. Specifies the minimum version of the OS that is being +targeted. For example ``10.0.10240.0``. If the value is not specified, the +value of :variable:`CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION` will be used on +WindowsStore projects otherwise the target platform minimum version will not +be specified for the project. diff --git a/Help/release/3.4.rst b/Help/release/3.4.rst new file mode 100644 index 0000000..89c5561 --- /dev/null +++ b/Help/release/3.4.rst @@ -0,0 +1,273 @@ +CMake 3.4 Release Notes +*********************** + +.. only:: html + + .. contents:: + +Changes made since CMake 3.3 include the following. + +New Features +============ + +Generators +---------- + +* The :generator:`Visual Studio 14 2015` generator learned to select + a Windows 10 SDK based on the value of the :variable:`CMAKE_SYSTEM_VERSION` + variable and the SDKs available on the host. + +* CMake learned rudimentary support for the Apple Swift language. When using + the :generator:`Xcode` generator with Xcode 6.1 or higher, one may enable + the ``Swift`` language with the :command:`enable_language` command or the + :command:`project` command (this is an error with other generators or when + Xcode is too old). Then one may list ``.swift`` source files in targets + for compilation. + +Commands +-------- + +* The :command:`find_program` command learned a ``NAMES_PER_DIR`` + option to consider all given ``NAMES`` in each directory before + moving on to the next directory. + +* The :command:`get_filename_component` command learned a new ``BASE_DIR`` + subcommand. This is used to specify a base directory when calculating an + absolute path from a relative path. + +* The :command:`if` command learned a new ``TEST`` operator that evaluates + to true if a given test name has been defined by the :command:`add_test` + command. See policy :policy:`CMP0064`. + +* The :command:`install(DIRECTORY)` command ``DESTINATION`` option learned to + support :manual:`generator expressions <cmake-generator-expressions(7)>`. + +* The :command:`install(FILES)` command ``DESTINATION`` option learned to + support :manual:`generator expressions <cmake-generator-expressions(7)>`. + +* The :command:`string` command learned a new ``APPEND`` subcommand. + +Variables +--------- + +* The :ref:`Makefile Generators` and the :generator:`Ninja` generator + learned to add compiler launcher tools like distcc and ccache along + with the compiler for ``C`` and ``CXX`` languages. See the + :variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` variable and + :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property for details. + +* New :variable:`CMAKE_LINK_SEARCH_START_STATIC` and + :variable:`CMAKE_LINK_SEARCH_END_STATIC` variables were + introduced to initialize the + :prop_tgt:`LINK_SEARCH_START_STATIC` and + :prop_tgt:`LINK_SEARCH_END_STATIC` target properties, + respectively. + +Properties +---------- + +* :ref:`Visual Studio Generators` learned to support additonal + target properties to customize projects for NVIDIA Nsight + Tegra Visual Studio Edition: + + * :prop_tgt:`ANDROID_ANT_ADDITIONAL_OPTIONS` + * :prop_tgt:`ANDROID_ARCH` + * :prop_tgt:`ANDROID_ASSETS_DIRECTORIES` + * :prop_tgt:`ANDROID_JAR_DEPENDENCIES` + * :prop_tgt:`ANDROID_JAR_DIRECTORIES` + * :prop_tgt:`ANDROID_JAVA_SOURCE_DIR` + * :prop_tgt:`ANDROID_NATIVE_LIB_DEPENDENCIES` + * :prop_tgt:`ANDROID_NATIVE_LIB_DIRECTORIES` + * :prop_tgt:`ANDROID_PROCESS_MAX` + * :prop_tgt:`ANDROID_PROGUARD` + * :prop_tgt:`ANDROID_PROGUARD_CONFIG_PATH` + * :prop_tgt:`ANDROID_SECURE_PROPS_PATH` + * :prop_tgt:`ANDROID_SKIP_ANT_STEP` + * :prop_tgt:`ANDROID_STL_TYPE` + +* The :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`, + :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and + :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target properties learned to + support :manual:`generator expressions <cmake-generator-expressions(7)>`. + +* The :prop_tgt:`SOURCE_DIR` and :prop_tgt:`BINARY_DIR` target properties + were introduced to allow project code to query where a target is defined. + +* The :prop_tgt:`OUTPUT_NAME` target property and its variants learned to + support :manual:`generator expressions <cmake-generator-expressions(7)>`. + +* A :prop_gbl:`TARGET_MESSAGES` global property was added to tell the + :ref:`Makefile Generators` whether to generate commands to print output + after each target is completed. + +* On Windows with MS-compatible tools, CMake learned to optionally + generate a module definition (``.def``) file for ``SHARED`` libraries. + See the :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property. + +Modules +------- + +* The :module:`ExternalProject` module :command:`ExternalProject_Add` + function ``GIT_SUBMODULES`` option now also limits the set of + submodules that are initialized in addition to the prior behavior + of limiting the set of submodules that are updated. + +* The :module:`ExternalProject` module learned new ``USES_TERMINAL`` + arguments for giving steps exclusive terminal access. This is + useful with the :generator:`Ninja` generator to monitor CMake + superbuild progress and prevent CPU oversubscription. + +* The :module:`FindBISON` module ``BISON_TARGET`` macro learned a + new ``DEFINES_FILE`` option to specify a custom output header + to be generated. + +* The :module:`FindHDF5` module learend a new ``HDF5_PREFER_PARALLEL`` + option allowing users to specify that a parallel HDF5 tool is + preferred if both are available. + +* The :module:`FindIce` module now provides imported targets. + +* The :module:`FindJava` module learned to optionally find + the ``idlj`` and ``jarsigner`` tools. + +* The :module:`FindOpenSSL` module now provides imported targets. + +* The :module:`FindOpenSSL` module learned a new ``OPENSSL_USE_STATIC_LIBS`` + option to search only for static libraries. + +* The :module:`FindPkgConfig` learned a new :command:`pkg_get_variable` + command which may be used to query for arbitrary variables from a package + (such as for related tools or data and plugin install paths). + +* The :module:`FindProtobuf` module gained a new + :command:`protobuf_generate_python` function to generate python + sources from ``.proto`` files. + +* The :module:`FindTIFF` module learned to search separately for + debug and release variants. + +* The :module:`FindwxWidgets` module learned to support version requests. + +* The :module:`FindXercesC` module learned to search separately for + debug and release variants. + +* The :module:`FindZLIB` module learned to search separately for + debug and release variants. + +* The :module:`GNUInstallDirs` module learned special default values + for certain installation prefixes according to the `GNU Coding + Standards`_ and the `Filesystem Hierarchy Standard`_. + +* The :module:`UseJava` module ``add_jar`` function learned + to support response files (e.g. ``@srcs.txt``) for source + specification. + +* The :module:`UseJava` module ``install_jar`` function learned + new ``DESTINATION`` and ``COMPONENT`` options to specify + the corresponding :command:`install` command options. + +* The :module:`UseJava` module gained a new ``create_javah`` + function to create C headers from Java classes. + +.. _`GNU Coding Standards`: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html +.. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html + +Generator Expressions +--------------------- + +* A new ``$<SHELL_PATH:...>`` + :manual:`generator expression <cmake-generator-expressions(7)>` + has been added. + +CTest +----- + +* CTest learned to optionally measure the CPU load during parallel + testing and avoid starting tests that may cause the load to exceed + a given threshold. See the :manual:`ctest(1)` command ``--test-load`` + option, the ``TestLoad`` setting of the :ref:`CTest Test Step`, + the :variable:`CTEST_TEST_LOAD` variable, and the ``TEST_LOAD`` + option of the :command:`ctest_test` command. + +* :manual:`ctest(1)` learned options + ``--test-output-size-passed`` and ``--test-output-size-failed`` + to customize the limit on test output size submitted when + running as a :ref:`Dashboard Client`. + +CPack +----- + +* The :module:`CPackDeb` module learned to set package dependencies + per component. See variables: + + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES` + * :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS` + +* The :module:`CPack` module learned to package empty directories. + +* The :module:`CPack` module gained a new setting, ``CPACK_VERBATIM_VARIABLES``, + which can be used to ensure the cpack program receives the settings' values + exactly as they were set, even if they contain CMake-special characters. + For compatibility, it's off by default. + +Other +----- + +* The :manual:`Compile Features <cmake-compile-features(7)>` functionality + is now aware of features supported by GNU C compilers on Windows. + +* CMake learned to honor ``*.manifest`` source files with MSVC tools. + Manifest files named as sources of ``.exe`` and ``.dll`` targets + will be merged with linker-generated manifests and embedded in the + binary. + +* The `Concurrent Fortran 77 <https://ccur.com>`__ compiler is now supported. + Its :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` is ``CCur``. + +* :manual:`cmake(1)` gained a new ``--trace-expand`` command line option + that is like ``--trace`` but expands variable references in the output. + +Deprecated and Removed Features +=============================== + +* The :module:`CMakeExpandImportedTargets` module is now documented + as deprecated. See module documentation for an explanation. + +* The :variable:`CMAKE_USE_RELATIVE_PATHS` variable no longer has any + effect. Previously it was partially implemented and unreliable. + +Other Changes +============= + +* The :module:`CheckFunctionExists`, :module:`CheckLibraryExists`, + :module:`CheckSymbolExists`, and :module:`FindThreads` modules learned to + work in environments where only CXX is enabled. + +* The :module:`CPackDeb` module now correctly excludes symlinks during package + checksum calculation. + +* The :module:`CPackDeb` no longer uses fakeroot and system tar program for + packaging. + +* The :module:`CPack` module no longer mangles settings with CMake-special + characters when they're used as defaults for other settings. The macro + ``cpack_set_if_not_set``, which was responsible for this, is now deprecated. + +* CMake no longer links executables with flags to export symbols + unless the :prop_tgt:`ENABLE_EXPORTS` target property is set. + See policy :policy:`CMP0065`. + +* The ``SONAME`` field is no longer set for ``MODULE`` libraries + created with the :command:`add_library` command. ``MODULE`` + libraries are meant for explicit dynamic loading at runtime. + They cannot be linked so ``SONAME`` is not useful. + +* The internal :variable:`CMAKE_<LANG>_COMPILE_OBJECT` rule variable now + substitutes compiler include flags in a separate ``<INCLUDES>`` placeholder + instead of the main ``<FLAGS>`` placeholder. 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/CPack-updates.rst b/Help/release/dev/CPack-updates.rst deleted file mode 100644 index ea0780f..0000000 --- a/Help/release/dev/CPack-updates.rst +++ /dev/null @@ -1,11 +0,0 @@ -CPack-updates -------------- - -* The :module:`CPack` module no longer mangles settings with CMake-special - characters when they're used as defaults for other settings. The macro - ``cpack_set_if_not_set``, which was responsible for this, is now deprecated. - -* The :module:`CPack` module gained a new setting, ``CPACK_VERBATIM_VARIABLES``, - which can be used to ensure the cpack program receives the settings' values - exactly as they were set, even if they contain CMake-special characters. - For compatibility, it's off by default. diff --git a/Help/release/dev/ConcurrentFortran-compiler-id.rst b/Help/release/dev/ConcurrentFortran-compiler-id.rst deleted file mode 100644 index 71e79aa..0000000 --- a/Help/release/dev/ConcurrentFortran-compiler-id.rst +++ /dev/null @@ -1,5 +0,0 @@ -ConcurrentFortran-compiler-id ------------------------------ - -* The `Concurrent Fortran 77 <https://ccur.com>`__ compiler is now supported. - Its :variable:`compiler id <CMAKE_<LANG>_COMPILER_ID>` is ``CCur``. diff --git a/Help/release/dev/ExternalProject-USES_TERMINAL.rst b/Help/release/dev/ExternalProject-USES_TERMINAL.rst deleted file mode 100644 index 415540d..0000000 --- a/Help/release/dev/ExternalProject-USES_TERMINAL.rst +++ /dev/null @@ -1,7 +0,0 @@ -ExternalProject-USES_TERMINAL ------------------------------ - -* The :module:`ExternalProject` module learned new ``USES_TERMINAL`` - arguments for giving steps exclusive terminal access. Especially - useful with the :generator:`Ninja` generator to monitor CMake - superbuild progress and prevent CPU oversubscription. diff --git a/Help/release/dev/ExternalProject_init_selected_submodules.rst b/Help/release/dev/ExternalProject_init_selected_submodules.rst deleted file mode 100644 index e642c19..0000000 --- a/Help/release/dev/ExternalProject_init_selected_submodules.rst +++ /dev/null @@ -1,7 +0,0 @@ -ExternalProject_init_selected_submodules ----------------------------------------- - -* The :module:`ExternalProject` module :command:`ExternalProject_Add` - function ``GIT_SUBMODULES`` option now also limits the set of - submodules that are initialized in addition to the prior behavior - of limiting the set of submodules that are updated. diff --git a/Help/release/dev/ExternalProject_stash_save_all.rst b/Help/release/dev/ExternalProject_stash_save_all.rst deleted file mode 100644 index e00ed44..0000000 --- a/Help/release/dev/ExternalProject_stash_save_all.rst +++ /dev/null @@ -1,5 +0,0 @@ -ExternalProject_stash_save_all ------------------------------- - -* Use "git stash save --all" only if supported. The --all option for git-stash - wasn't introduced until git version 1.7.6. diff --git a/Help/release/dev/FindBISON-DEFINES_FILE.rst b/Help/release/dev/FindBISON-DEFINES_FILE.rst deleted file mode 100644 index 815d560..0000000 --- a/Help/release/dev/FindBISON-DEFINES_FILE.rst +++ /dev/null @@ -1,6 +0,0 @@ -FindBISON-DEFINES_FILE ----------------------- - -* The :module:`FindBISON` module ``BISON_TARGET`` macro learned a - new ``DEFINES_FILE`` option to specify a custom output header - to be generated. diff --git a/Help/release/dev/FindHDF5-updates.rst b/Help/release/dev/FindHDF5-updates.rst deleted file mode 100644 index a9297bb..0000000 --- a/Help/release/dev/FindHDF5-updates.rst +++ /dev/null @@ -1,6 +0,0 @@ -FindHDF5-updates ----------------- - -* The :module:`FindHDF5` module learend a new ``HDF5_PREFER_PARALLEL`` - option allowing users to specify that a parallel HDF5 tool is - preferred if both are available. diff --git a/Help/release/dev/FindIce-imported-targets.rst b/Help/release/dev/FindIce-imported-targets.rst deleted file mode 100644 index 7e1b2f4..0000000 --- a/Help/release/dev/FindIce-imported-targets.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindIce-imported-targets ------------------------- - -* The :module:`FindIce` module now provides imported targets. diff --git a/Help/release/dev/FindOpenSSL-imported-targets.rst b/Help/release/dev/FindOpenSSL-imported-targets.rst deleted file mode 100644 index 63090af..0000000 --- a/Help/release/dev/FindOpenSSL-imported-targets.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindOpenSSL-imported-targets ----------------------------- - -* The :module:`FindOpenSSL` module now provides imported targets. diff --git a/Help/release/dev/FindOpenSSL-static-libs.rst b/Help/release/dev/FindOpenSSL-static-libs.rst deleted file mode 100644 index 69ec6f2..0000000 --- a/Help/release/dev/FindOpenSSL-static-libs.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindOpenSSL-static-libs ------------------------ - -* The :module:`FindOpenSSL` module learned a new ``OPENSSL_USE_STATIC_LIBS`` - option to search only for static libraries. diff --git a/Help/release/dev/FindProtobuf-python-extension.rst b/Help/release/dev/FindProtobuf-python-extension.rst deleted file mode 100644 index 95463bf..0000000 --- a/Help/release/dev/FindProtobuf-python-extension.rst +++ /dev/null @@ -1,6 +0,0 @@ -FindProtobuf-python-extension ------------------------------ - -* The :module:`FindProtobuf` module gained a new - :command:`protobuf_generate_python` function to generate python - sources from ``.proto`` files. diff --git a/Help/release/dev/FindTIFF-updates.rst b/Help/release/dev/FindTIFF-updates.rst deleted file mode 100644 index 083e40f..0000000 --- a/Help/release/dev/FindTIFF-updates.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindTIFF-updates ----------------- - -* The :module:`FindTIFF` module learned to search separately for - debug and release variants. diff --git a/Help/release/dev/FindXercesC-updates.rst b/Help/release/dev/FindXercesC-updates.rst deleted file mode 100644 index 47a8ada..0000000 --- a/Help/release/dev/FindXercesC-updates.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindXercesC-updates -------------------- - -* The :module:`FindXercesC` module learned to search separately for - debug and release variants. diff --git a/Help/release/dev/FindZLIB-per-config.rst b/Help/release/dev/FindZLIB-per-config.rst deleted file mode 100644 index 97fd6ef..0000000 --- a/Help/release/dev/FindZLIB-per-config.rst +++ /dev/null @@ -1,5 +0,0 @@ -FindZLIB-per-config -------------------- - -* The :module:`FindZLIB` module learned to search separately for - debug and release variants. diff --git a/Help/release/dev/FindwxWidgets-updates.rst b/Help/release/dev/FindwxWidgets-updates.rst deleted file mode 100644 index aa470f2..0000000 --- a/Help/release/dev/FindwxWidgets-updates.rst +++ /dev/null @@ -1,4 +0,0 @@ -FindwxWidgets-updates ---------------------- - -* The :module:`FindwxWidgets` module learned to support version requests. diff --git a/Help/release/dev/GNUInstallDirs-special-prefixes.rst b/Help/release/dev/GNUInstallDirs-special-prefixes.rst deleted file mode 100644 index 83c1352..0000000 --- a/Help/release/dev/GNUInstallDirs-special-prefixes.rst +++ /dev/null @@ -1,9 +0,0 @@ -GNUInstallDirs-special-prefixes -------------------------------- - -* The :module:`GNUInstallDirs` module learned special default values - for certain installation prefixes according to the `GNU Coding - Standards`_ and the `Filesystem Hierarchy Standard`_. - -.. _`GNU Coding Standards`: https://www.gnu.org/prep/standards/html_node/Directory-Variables.html -.. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html diff --git a/Help/release/dev/OUTPUT_DIRECTORY-genex.rst b/Help/release/dev/OUTPUT_DIRECTORY-genex.rst deleted file mode 100644 index 8b839c0..0000000 --- a/Help/release/dev/OUTPUT_DIRECTORY-genex.rst +++ /dev/null @@ -1,7 +0,0 @@ -OUTPUT_DIRECTORY-genex ----------------------- - -* The :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`, - :prop_tgt:`LIBRARY_OUTPUT_DIRECTORY`, and - :prop_tgt:`RUNTIME_OUTPUT_DIRECTORY` target properties learned to - support :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/OUTPUT_NAME-genex.rst b/Help/release/dev/OUTPUT_NAME-genex.rst deleted file mode 100644 index 0a39820..0000000 --- a/Help/release/dev/OUTPUT_NAME-genex.rst +++ /dev/null @@ -1,5 +0,0 @@ -OUTPUT_NAME-genex ------------------ - -* The :prop_tgt:`OUTPUT_NAME` target property and its variants learned to - support :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/Threads-CXX.rst b/Help/release/dev/Threads-CXX.rst deleted file mode 100644 index 2e34a01..0000000 --- a/Help/release/dev/Threads-CXX.rst +++ /dev/null @@ -1,6 +0,0 @@ -Threads-CXX ------------- - -* The :module:`CheckFunctionExists`, :module:`CheckLibraryExists`, - :module:`CheckSymbolExists`, and :module:`FindThreads` modules learned to - work in environments where only CXX is enabled. diff --git a/Help/release/dev/add-apple-swift-language.rst b/Help/release/dev/add-apple-swift-language.rst deleted file mode 100644 index 60ce5d8..0000000 --- a/Help/release/dev/add-apple-swift-language.rst +++ /dev/null @@ -1,9 +0,0 @@ -add-apple-swift-language ------------------------- - -* CMake learned rudimentary support for the Apple Swift language. When using - the :generator:`Xcode` generator with Xcode 6.1 or higher, one may enable - the ``Swift`` language with the :command:`enable_language` command or the - :command:`project` command (this is an error with other generators or when - Xcode is too old). Then one may list ``.swift`` source files in targets - for compilation. diff --git a/Help/release/dev/add-link-search-static-properties-defaults.rst b/Help/release/dev/add-link-search-static-properties-defaults.rst deleted file mode 100644 index 98dda30..0000000 --- a/Help/release/dev/add-link-search-static-properties-defaults.rst +++ /dev/null @@ -1,9 +0,0 @@ -add-link-search-static-properties-defaults ------------------------------------------- - -* New :variable:`CMAKE_LINK_SEARCH_START_STATIC` and - :variable:`CMAKE_LINK_SEARCH_END_STATIC` variables were - introduced to initialize the - :prop_tgt:`LINK_SEARCH_START_STATIC` and - :prop_tgt:`LINK_SEARCH_END_STATIC` target properties, - respectively. diff --git a/Help/release/dev/auto_export_dll_symbols.rst b/Help/release/dev/auto_export_dll_symbols.rst deleted file mode 100644 index 9db2b5e..0000000 --- a/Help/release/dev/auto_export_dll_symbols.rst +++ /dev/null @@ -1,6 +0,0 @@ -auto_export_dll_symbols ------------------------ - -* On Windows with MS-compatible tools, CMake learned to optionally - generate a module definition (``.def``) file for ``SHARED`` libraries. - See the :prop_tgt:`WINDOWS_EXPORT_ALL_SYMBOLS` target property. diff --git a/Help/release/dev/compiler-launcher.rst b/Help/release/dev/compiler-launcher.rst deleted file mode 100644 index 3ba692d..0000000 --- a/Help/release/dev/compiler-launcher.rst +++ /dev/null @@ -1,8 +0,0 @@ -compiler-launcher ------------------ - -* The :ref:`Makefile Generators` and the :generator:`Ninja` generator - learned to add compiler launcher tools like distcc and ccache along with the - compiler for ``C`` and ``CXX`` languages. See the - :variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` variable and - :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target property for details. diff --git a/Help/release/dev/cpack-deb-checksum-on-symlinks.rts b/Help/release/dev/cpack-deb-checksum-on-symlinks.rts deleted file mode 100644 index 9bfeded..0000000 --- a/Help/release/dev/cpack-deb-checksum-on-symlinks.rts +++ /dev/null @@ -1,4 +0,0 @@ -cpack-deb-checksum-on-symlinks ------------------------------- - -* The :module:`CPackDeb` module now correctly excludes symlinks during package checksum calculation. diff --git a/Help/release/dev/cpack-deb-component-dependencies.rst b/Help/release/dev/cpack-deb-component-dependencies.rst deleted file mode 100644 index 2714222..0000000 --- a/Help/release/dev/cpack-deb-component-dependencies.rst +++ /dev/null @@ -1,12 +0,0 @@ -cpack-deb-component-dependencies --------------------------------- - -* The :module:`CPackDeb` module learned to set package dependencies - per component. See :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PREDEPENDS`, - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_ENHANCES`, - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_BREAKS`, - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_CONFLICTS`, - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_PROVIDES`, - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_REPLACES`, - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_RECOMMENDS` and - :variable:`CPACK_DEBIAN_<COMPONENT>_PACKAGE_SUGGESTS`. diff --git a/Help/release/dev/cpack-deb-fakeroot-removal.rts b/Help/release/dev/cpack-deb-fakeroot-removal.rts deleted file mode 100644 index e0b97d1..0000000 --- a/Help/release/dev/cpack-deb-fakeroot-removal.rts +++ /dev/null @@ -1,4 +0,0 @@ -cpack-deb-fakeroot-removal --------------------------- - -* :module:`CPackDeb` no longer uses fakeroot and system tar program for packaging. diff --git a/Help/release/dev/cpack-package-empty-dirs.rts b/Help/release/dev/cpack-package-empty-dirs.rts deleted file mode 100644 index 1f56e1a..0000000 --- a/Help/release/dev/cpack-package-empty-dirs.rts +++ /dev/null @@ -1,4 +0,0 @@ -cpack-package-empty-dirs ------------------------- - -* The :module:`CPack` module learned to package empty directories. diff --git a/Help/release/dev/ctest-custom-output-size.rst b/Help/release/dev/ctest-custom-output-size.rst deleted file mode 100644 index 8098b93..0000000 --- a/Help/release/dev/ctest-custom-output-size.rst +++ /dev/null @@ -1,7 +0,0 @@ -ctest-custom-output-size ------------------------- - -* :manual:`ctest(1)` learned options - ``--test-output-size-passed`` and ``--test-output-size-failed`` - to customize the limit on test output size submitted when - running as a :ref:`Dashboard Client`. diff --git a/Help/release/dev/ctest-test-load-option.rst b/Help/release/dev/ctest-test-load-option.rst deleted file mode 100644 index 069f49a..0000000 --- a/Help/release/dev/ctest-test-load-option.rst +++ /dev/null @@ -1,9 +0,0 @@ -ctest-test-load-option ----------------------- - -* CTest learned to optionally measure the CPU load during parallel - testing and avoid starting tests that may cause the load to exceed - a given threshold. See the :manual:`ctest(1)` command ``--test-load`` - option, the ``TestLoad`` setting of the :ref:`CTest Test Step`, - the :variable:`CTEST_TEST_LOAD` variable, and the ``TEST_LOAD`` - option of the :command:`ctest_test` command. diff --git a/Help/release/dev/doc-CMakeExpandImportedTargets-deprecated.rst b/Help/release/dev/doc-CMakeExpandImportedTargets-deprecated.rst deleted file mode 100644 index 3bdaebe..0000000 --- a/Help/release/dev/doc-CMakeExpandImportedTargets-deprecated.rst +++ /dev/null @@ -1,5 +0,0 @@ -doc-CMakeExpandImportedTargets-deprecated ------------------------------------------ - -* The :module:`CMakeExpandImportedTargets` module is now documented - as deprecated. See module documentation for an explanation. diff --git a/Help/release/dev/find_program-NAMES_PER_DIR.rst b/Help/release/dev/find_program-NAMES_PER_DIR.rst deleted file mode 100644 index 04cd170..0000000 --- a/Help/release/dev/find_program-NAMES_PER_DIR.rst +++ /dev/null @@ -1,6 +0,0 @@ -find_program-NAMES_PER_DIR --------------------------- - -* The :command:`find_program` command learned a ``NAMES_PER_DIR`` - option to consdier all given ``NAMES`` in each directory before - moving on to the next directory. diff --git a/Help/release/dev/genex-SHELL_PATH.rst b/Help/release/dev/genex-SHELL_PATH.rst deleted file mode 100644 index 86af720..0000000 --- a/Help/release/dev/genex-SHELL_PATH.rst +++ /dev/null @@ -1,6 +0,0 @@ -genex-SHELL_PATH ----------------- - -* A new ``$<SHELL_PATH:...>`` - :manual:`generator expression <cmake-generator-expressions(7)>` - has been added. diff --git a/Help/release/dev/get-filename-component-base-dir.rst b/Help/release/dev/get-filename-component-base-dir.rst deleted file mode 100644 index c0df759..0000000 --- a/Help/release/dev/get-filename-component-base-dir.rst +++ /dev/null @@ -1,6 +0,0 @@ -get-filename-component-base-dir -------------------------------- - -* The :command:`get_filename_component` command learned a new ``BASE_DIR`` - subcommand. This is used to specify a base directory when calculating an - absolute path from a relative path. diff --git a/Help/release/dev/if-TEST.rst b/Help/release/dev/if-TEST.rst deleted file mode 100644 index 05bf71c..0000000 --- a/Help/release/dev/if-TEST.rst +++ /dev/null @@ -1,5 +0,0 @@ -if-TEST -------- - -* Add a new TEST operator to if() that evaluates to true - if a given test name has been defined. diff --git a/Help/release/dev/install-directory-dest-genex.rst b/Help/release/dev/install-directory-dest-genex.rst deleted file mode 100644 index 2b83bbd..0000000 --- a/Help/release/dev/install-directory-dest-genex.rst +++ /dev/null @@ -1,5 +0,0 @@ -install-directory-dest-genex ----------------------------- - -* The :command:`install(DIRECTORY)` command ``DESTINATION`` option learned to - support :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/install-files-dest-genex.rst b/Help/release/dev/install-files-dest-genex.rst deleted file mode 100644 index b7aa8b3..0000000 --- a/Help/release/dev/install-files-dest-genex.rst +++ /dev/null @@ -1,5 +0,0 @@ -install-files-dest-genex ------------------------- - -* The :command:`install(FILES)` command ``DESTINATION`` option learned to - support :manual:`generator expressions <cmake-generator-expressions(7)>`. diff --git a/Help/release/dev/java-updates.rst b/Help/release/dev/java-updates.rst deleted file mode 100644 index 8fd4ed6..0000000 --- a/Help/release/dev/java-updates.rst +++ /dev/null @@ -1,16 +0,0 @@ -java-updates ------------- - -* The :module:`FindJava` module learned to optionally find - the ``idlj`` and ``jarsigner`` tools. - -* The :module:`UseJava` module ``add_jar`` function learned - to support response files (e.g. ``@srcs.txt``) for source - specification. - -* The :module:`UseJava` module ``install_jar`` function learned - new ``DESTINATION`` and ``COMPONENT`` options to specify - the corresponding :command:`install` command options. - -* The :module:`UseJava` module gained a new ``create_javah`` - function to create C headers from Java classes. diff --git a/Help/release/dev/makefile-target-messages.rst b/Help/release/dev/makefile-target-messages.rst deleted file mode 100644 index 3d2cd9b..0000000 --- a/Help/release/dev/makefile-target-messages.rst +++ /dev/null @@ -1,6 +0,0 @@ -makefile-target-messages ------------------------- - -* A :prop_gbl:`TARGET_MESSAGES` global property was added to tell the - :ref:`Makefile Generators` whether to generate commands to print output - after each target is completed. diff --git a/Help/release/dev/mingw-compile-features-C.rst b/Help/release/dev/mingw-compile-features-C.rst deleted file mode 100644 index b3f99f1..0000000 --- a/Help/release/dev/mingw-compile-features-C.rst +++ /dev/null @@ -1,5 +0,0 @@ -mingw-compile-features-C ------------------------- - -* The :manual:`Compile Features <cmake-compile-features(7)>` functionality - is now aware of features supported by GNU C compilers on Windows. diff --git a/Help/release/dev/modules-no-soname.rst b/Help/release/dev/modules-no-soname.rst deleted file mode 100644 index 8fe74f8..0000000 --- a/Help/release/dev/modules-no-soname.rst +++ /dev/null @@ -1,7 +0,0 @@ -modules-no-soname ------------------ - -* The ``SONAME`` field is no longer set for ``MODULE`` libraries - created with the :command:`add_library` command. ``MODULE`` - libraries are meant for explicit dynamic loading at runtime. - They cannot be linked so ``SONAME`` is not useful. diff --git a/Help/release/dev/ms-manifest-files.rst b/Help/release/dev/ms-manifest-files.rst deleted file mode 100644 index 94fbe83..0000000 --- a/Help/release/dev/ms-manifest-files.rst +++ /dev/null @@ -1,7 +0,0 @@ -ms-manifest-files ------------------ - -* CMake learned to honor ``*.manifest`` source files with MSVC tools. - Manifest files named as sources of ``.exe`` and ``.dll`` targets - will be merged with linker-generated manifests and embedded in the - binary. diff --git a/Help/release/dev/pkg-config-variable-function.rst b/Help/release/dev/pkg-config-variable-function.rst deleted file mode 100644 index e181d13..0000000 --- a/Help/release/dev/pkg-config-variable-function.rst +++ /dev/null @@ -1,6 +0,0 @@ -pkg-config-variable-function ----------------------------- - -* The :module:`FindPkgConfig` learned a new :command:`pkg_get_variable` - command which may be used to query for arbitrary variables from a package - (such as for related tools or data and plugin install paths). diff --git a/Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst b/Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst deleted file mode 100644 index dd52ace..0000000 --- a/Help/release/dev/remove-CMAKE_USE_RELATIVE_PATHS.rst +++ /dev/null @@ -1,5 +0,0 @@ -remove-CMAKE_USE_RELATIVE_PATHS -------------------------------- - -* The :variable:`CMAKE_USE_RELATIVE_PATHS` variable no longer has any - effect. Previously it was partially implemented and unreliable. diff --git a/Help/release/dev/restrict-shlib-link-flags-to-enable-exports.rst b/Help/release/dev/restrict-shlib-link-flags-to-enable-exports.rst deleted file mode 100644 index f8ce044..0000000 --- a/Help/release/dev/restrict-shlib-link-flags-to-enable-exports.rst +++ /dev/null @@ -1,6 +0,0 @@ -restrict-shlib-link-flags-to-enable-exports -------------------------------------------- - -* CMake no longer links executables with flags to export symbols - unless the :prop_tgt:`ENABLE_EXPORTS` target property is set. - See policy :policy:`CMP0065`. diff --git a/Help/release/dev/string-append.rst b/Help/release/dev/string-append.rst deleted file mode 100644 index 190b51e..0000000 --- a/Help/release/dev/string-append.rst +++ /dev/null @@ -1,4 +0,0 @@ -string-append -------------- - -* The :command:`string` command learned a new ``APPEND`` subcommand. diff --git a/Help/release/dev/target-directory-properties.rst b/Help/release/dev/target-directory-properties.rst deleted file mode 100644 index 5ab2938..0000000 --- a/Help/release/dev/target-directory-properties.rst +++ /dev/null @@ -1,5 +0,0 @@ -target-directory-properties ---------------------------- - -* The :prop_tgt:`SOURCE_DIR` and :prop_tgt:`BINARY_DIR` target properties - were introduced to allow project code to query where a target is defined. diff --git a/Help/release/dev/trace-expand.rst b/Help/release/dev/trace-expand.rst deleted file mode 100644 index 383326e..0000000 --- a/Help/release/dev/trace-expand.rst +++ /dev/null @@ -1,5 +0,0 @@ -trace-expand ------------- - -* Add ``--trace-expand`` argument to CMake. Acts like ``--trace``, but expands - variable references in the output. diff --git a/Help/release/dev/vs-nsight-tegra-attributes.rst b/Help/release/dev/vs-nsight-tegra-attributes.rst deleted file mode 100644 index 7ebea33..0000000 --- a/Help/release/dev/vs-nsight-tegra-attributes.rst +++ /dev/null @@ -1,21 +0,0 @@ -vs-nsight-tegra-attributes --------------------------- - -* :ref:`Visual Studio Generators` learned to support additonal - target properties to customize projects for NVIDIA Nsight - Tegra Visual Studio Edition: - - * :prop_tgt:`ANDROID_ANT_ADDITIONAL_OPTIONS` - * :prop_tgt:`ANDROID_ARCH` - * :prop_tgt:`ANDROID_ASSETS_DIRECTORIES` - * :prop_tgt:`ANDROID_JAR_DEPENDENCIES` - * :prop_tgt:`ANDROID_JAR_DIRECTORIES` - * :prop_tgt:`ANDROID_JAVA_SOURCE_DIR` - * :prop_tgt:`ANDROID_NATIVE_LIB_DEPENDENCIES` - * :prop_tgt:`ANDROID_NATIVE_LIB_DIRECTORIES` - * :prop_tgt:`ANDROID_PROCESS_MAX` - * :prop_tgt:`ANDROID_PROGUARD` - * :prop_tgt:`ANDROID_PROGUARD_CONFIG_PATH` - * :prop_tgt:`ANDROID_SECURE_PROPS_PATH` - * :prop_tgt:`ANDROID_SKIP_ANT_STEP` - * :prop_tgt:`ANDROID_STL_TYPE` diff --git a/Help/release/index.rst b/Help/release/index.rst index b558e9d..5d1a3f7 100644 --- a/Help/release/index.rst +++ b/Help/release/index.rst @@ -5,14 +5,13 @@ 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.4 <3.4> 3.3 <3.3> 3.2 <3.2> 3.1 <3.1> diff --git a/Help/variable/CMAKE_SYSTEM_NAME.rst b/Help/variable/CMAKE_SYSTEM_NAME.rst index 0466da4..c3a42e5 100644 --- a/Help/variable/CMAKE_SYSTEM_NAME.rst +++ b/Help/variable/CMAKE_SYSTEM_NAME.rst @@ -1,8 +1,20 @@ CMAKE_SYSTEM_NAME ----------------- -Name of the operating system CMake is building for. +The name of the operating system for which CMake is to build. +See the :variable:`CMAKE_SYSTEM_VERSION` variable for the OS version. -This is the name of the operating system on which CMake is targeting. This -variable is the same as :variable:`CMAKE_HOST_SYSTEM_NAME` if you build for the -host system instead of the target system when cross compiling. +System Name for Host Builds +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``CMAKE_SYSTEM_NAME`` is by default set to the same value as the +:variable:`CMAKE_HOST_SYSTEM_NAME` variable so that the build +targets the host system. + +System Name for Cross Compiling +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +``CMAKE_SYSTEM_NAME`` may be set explicitly when first configuring a new build +tree in order to enable :ref:`cross compiling <Cross Compiling Toolchain>`. +In this case the :variable:`CMAKE_SYSTEM_VERSION` variable must also be +set explicitly. diff --git a/Help/variable/CMAKE_SYSTEM_VERSION.rst b/Help/variable/CMAKE_SYSTEM_VERSION.rst index 3b3cdc5..aba8ca3 100644 --- a/Help/variable/CMAKE_SYSTEM_VERSION.rst +++ b/Help/variable/CMAKE_SYSTEM_VERSION.rst @@ -1,8 +1,28 @@ CMAKE_SYSTEM_VERSION -------------------- -The operating system version CMake is building for. +The version of the operating system for which CMake is to build. +See the :variable:`CMAKE_SYSTEM_NAME` variable for the OS name. -This variable is the same as :variable:`CMAKE_HOST_SYSTEM_VERSION` if -you build for the host system instead of the target system when -cross compiling. +System Version for Host Builds +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When the :variable:`CMAKE_SYSTEM_NAME` variable takes its default value +then ``CMAKE_SYSTEM_VERSION`` is by default set to the same value as the +:variable:`CMAKE_HOST_SYSTEM_VERSION` variable so that the build targets +the host system version. + +In the case of a host build then ``CMAKE_SYSTEM_VERSION`` may be set +explicitly when first configuring a new build tree in order to enable +targeting the build for a different version of the host operating system +than is actually running on the host. This is allowed and not considered +cross compiling so long as the binaries built for the specified OS version +can still run on the host. + +System Version for Cross Compiling +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When the :variable:`CMAKE_SYSTEM_NAME` variable is set explicitly to +enable :ref:`cross compiling <Cross Compiling Toolchain>` then the +value of ``CMAKE_SYSTEM_VERSION`` must also be set explicitly to specify +the target system version. diff --git a/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst new file mode 100644 index 0000000..6392849 --- /dev/null +++ b/Help/variable/CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION.rst @@ -0,0 +1,11 @@ +CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION +---------------------------------------- + +Visual Studio Windows Target Platform Version. + +When targeting Windows 10 and above Visual Studio 2015 and above support +specification of a target Windows version to select a corresponding SDK. +The :variable:`CMAKE_SYSTEM_VERSION` variable may be set to specify a +version. Otherwise CMake computes a default version based on the Windows +SDK versions available. The chosen Windows target version number is provided +in ``CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION``. diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index b224007..63f8787 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -55,6 +55,7 @@ int main(int argc, char* argv[]) #ifdef SIMULATE_VERSION_MAJOR require += info_simulate_version[argc]; #endif + require += info_language_dialect_default[argc]; (void)argv; return require; } diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index d467507..61cd790 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -49,6 +49,7 @@ int main(int argc, char* argv[]) #ifdef SIMULATE_VERSION_MAJOR require += info_simulate_version[argc]; #endif + require += info_language_dialect_default[argc]; (void)argv; return require; } diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index df6daf3..81c2509 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -209,6 +209,9 @@ Id flags: ${testflags} else() set(id_system_version "") endif() + if(CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION) + set(id_WindowsTargetPlatformVersion "<WindowsTargetPlatformVersion>${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}</WindowsTargetPlatformVersion>") + endif() if(id_platform STREQUAL ARM) set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>") else() diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake index fa14641..d9f7579 100644 --- a/Modules/CMakeDetermineSystem.cmake +++ b/Modules/CMakeDetermineSystem.cmake @@ -123,7 +123,9 @@ elseif(CMAKE_VS_WINCE_VERSION) set(PRESET_CMAKE_SYSTEM_NAME TRUE) else() set(CMAKE_SYSTEM_NAME "${CMAKE_HOST_SYSTEM_NAME}") - set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") + if(NOT DEFINED CMAKE_SYSTEM_VERSION) + set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}") + endif() set(CMAKE_SYSTEM_PROCESSOR "${CMAKE_HOST_SYSTEM_PROCESSOR}") set(CMAKE_CROSSCOMPILING FALSE) set(PRESET_CMAKE_SYSTEM_NAME FALSE) diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 2533d3f..2f7f40e 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -17,7 +17,9 @@ # if defined(_MSC_VER) PRINT *, 'INFO:simulate[MSVC]' -# if _MSC_VER >= 1800 +# if _MSC_VER >= 1900 + PRINT *, 'INFO:simulate_version[019.00]' +# elif _MSC_VER >= 1800 PRINT *, 'INFO:simulate_version[018.00]' # elif _MSC_VER >= 1700 PRINT *, 'INFO:simulate_version[017.00]' @@ -45,6 +47,8 @@ # define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF) #elif defined(_CRAYFTN) PRINT *, 'INFO:compiler[Cray]' +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) #elif defined(__G95__) PRINT *, 'INFO:compiler[G95]' # define COMPILER_VERSION_MAJOR DEC(__G95__) diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 5fe51a6..bef8e16 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -16,7 +16,7 @@ # # Will be automatically generated unless explicitly provided. # -# It should be explicitly set to a constant generated gloabally unique +# It should be explicitly set to a constant generated globally unique # identifier (GUID) to allow your installers to replace existing # installations that use the same GUID. # @@ -226,7 +226,7 @@ # This variable can be used to provide a value for # the Windows Installer property ``<PROPERTY>`` # -# The follwing list contains some example properties that can be used to +# The following list contains some example properties that can be used to # customize information under # "Programs and Features" (also known as "Add or Remove Programs") # diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake index 5908c26..1cc72c0 100644 --- a/Modules/Compiler/AppleClang-C.cmake +++ b/Modules/Compiler/AppleClang-C.cmake @@ -18,6 +18,9 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0) message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}") endif() set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + set(CMAKE_C_STANDARD_DEFAULT 99) endif() endif() diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index c4e342b..95bc79a 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -28,6 +28,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.0) message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") endif() set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + set(CMAKE_CXX_STANDARD_DEFAULT 98) endif() endif() diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake index a2e81c1..d8b7743 100644 --- a/Modules/Compiler/Clang-C.cmake +++ b/Modules/Compiler/Clang-C.cmake @@ -23,6 +23,13 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4) message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}") endif() set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6) + set(CMAKE_C_STANDARD_DEFAULT 11) + else() + set(CMAKE_C_STANDARD_DEFAULT 99) + endif() endif() endif() diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 055a8ee..6a0a5e2 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -37,6 +37,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") endif() set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + set(CMAKE_CXX_STANDARD_DEFAULT 98) endif() endif() diff --git a/Modules/Compiler/GNU-C.cmake b/Modules/Compiler/GNU-C.cmake index d979fb7..2c478da 100644 --- a/Modules/Compiler/GNU-C.cmake +++ b/Modules/Compiler/GNU-C.cmake @@ -28,6 +28,13 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.4) message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}") endif() set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) + set(CMAKE_C_STANDARD_DEFAULT 11) + else() + set(CMAKE_C_STANDARD_DEFAULT 90) + endif() endif() endif() diff --git a/Modules/Compiler/GNU-CXX.cmake b/Modules/Compiler/GNU-CXX.cmake index a7e71c3..e1c555b 100644 --- a/Modules/Compiler/GNU-CXX.cmake +++ b/Modules/Compiler/GNU-CXX.cmake @@ -40,6 +40,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") endif() set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + set(CMAKE_CXX_STANDARD_DEFAULT 98) endif() endif() diff --git a/Modules/Compiler/SunPro-CXX.cmake b/Modules/Compiler/SunPro-CXX.cmake index 50d68ee..b4a5591 100644 --- a/Modules/Compiler/SunPro-CXX.cmake +++ b/Modules/Compiler/SunPro-CXX.cmake @@ -42,6 +42,9 @@ if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}") endif() set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT}) + elseif(NOT DEFINED CMAKE_CXX_STANDARD_DEFAULT) + # Compiler id was forced so just guess the default standard level. + set(CMAKE_CXX_STANDARD_DEFAULT 98) endif() endif() diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in index a17d03d..2870a11 100644 --- a/Modules/CompilerId/VS-10.vcxproj.in +++ b/Modules/CompilerId/VS-10.vcxproj.in @@ -12,6 +12,7 @@ <Keyword>Win32Proj</Keyword> @id_system@ @id_system_version@ + @id_WindowsTargetPlatformVersion@ @id_WindowsSDKDesktopARMSupport@ </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 90ceedf..c822bdb 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1731,6 +1731,7 @@ function(_ep_add_download_command name) --non-interactive ${svn_trust_cert_args} ${svn_user_pw_args} ${src_name}) list(APPEND depends ${stamp_dir}/${name}-svninfo.txt) elseif(git_repository) + unset(CMAKE_MODULE_PATH) # Use CMake builtin find module find_package(Git QUIET) if(NOT GIT_EXECUTABLE) message(FATAL_ERROR "error: could not find git for clone of ${name}") @@ -1739,7 +1740,7 @@ function(_ep_add_download_command name) # The git submodule update '--recursive' flag requires git >= v1.6.5 # if(GIT_VERSION_STRING VERSION_LESS 1.6.5) - message(FATAL_ERROR "error: git version 1.6.5 or later required for 'git submodule update --recursive': git_version='${git_version}'") + message(FATAL_ERROR "error: git version 1.6.5 or later required for 'git submodule update --recursive': GIT_VERSION_STRING='${GIT_VERSION_STRING}'") endif() get_property(git_tag TARGET ${name} PROPERTY _EP_GIT_TAG) diff --git a/Modules/FindGTest.cmake b/Modules/FindGTest.cmake index fccf877..eb7abfd 100644 --- a/Modules/FindGTest.cmake +++ b/Modules/FindGTest.cmake @@ -124,11 +124,11 @@ function(GTEST_ADD_TESTS executable extra_args) string(REGEX MATCH "${gtest_test_type_regex}" test_type ${hit}) # Parameterized tests have a different signature for the filter - if(${test_type} STREQUAL "TEST_P") + if("x${test_type}" STREQUAL "xTEST_P") string(REGEX REPLACE ${gtest_case_name_regex} "*/\\1.\\2/*" test_name ${hit}) - elseif(${test_type} STREQUAL "TEST_F" OR ${test_type} STREQUAL "TEST") + elseif("x${test_type}" STREQUAL "xTEST_F" OR "x${test_type}" STREQUAL "xTEST") string(REGEX REPLACE ${gtest_case_name_regex} "\\1.\\2" test_name ${hit}) - elseif(${test_type} STREQUAL "TYPED_TEST") + elseif("x${test_type}" STREQUAL "xTYPED_TEST") string(REGEX REPLACE ${gtest_case_name_regex} "\\1/*.\\2" test_name ${hit}) else() message(WARNING "Could not parse GTest ${hit} for adding to CTest.") diff --git a/Modules/FindMatlab.cmake b/Modules/FindMatlab.cmake index a47a69c..7a36719 100644 --- a/Modules/FindMatlab.cmake +++ b/Modules/FindMatlab.cmake @@ -229,6 +229,7 @@ if(NOT MATLAB_ADDITIONAL_VERSIONS) endif() set(MATLAB_VERSIONS_MAPPING + "R2015b=8.6" "R2015a=8.5" "R2014b=8.4" "R2014a=8.3" diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake index 3ce2c73..d05d3da 100644 --- a/Modules/FindPostgreSQL.cmake +++ b/Modules/FindPostgreSQL.cmake @@ -81,7 +81,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS} - "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") # Define additional search paths for root directories. set( PostgreSQL_ROOT_DIRECTORIES diff --git a/Modules/Platform/Darwin-Initialize.cmake b/Modules/Platform/Darwin-Initialize.cmake index 62fb985..a08411b 100644 --- a/Modules/Platform/Darwin-Initialize.cmake +++ b/Modules/Platform/Darwin-Initialize.cmake @@ -100,6 +100,10 @@ elseif("${CMAKE_GENERATOR}" MATCHES Xcode "Instead using SDK:\n \"${_CMAKE_OSX_SYSROOT_DEFAULT}\"." ) endif() + if(NOT CMAKE_OSX_DEPLOYMENT_TARGET AND _CURRENT_OSX_VERSION VERSION_LESS _CMAKE_OSX_DEPLOYMENT_TARGET) + set(CMAKE_OSX_DEPLOYMENT_TARGET ${_CURRENT_OSX_VERSION} CACHE STRING + "Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value." FORCE) + endif() else() # Assume developer files are in root (such as Xcode 4.5 command-line tools). set(_CMAKE_OSX_SYSROOT_DEFAULT "") diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake index 8594596..b421b0d 100644 --- a/Modules/Platform/Windows-MSVC.cmake +++ b/Modules/Platform/Windows-MSVC.cmake @@ -179,7 +179,9 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE) set(_PLATFORM_DEFINES "/DWIN32") set(_FLAGS_C " /DUNICODE /D_UNICODE") set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc") - if(WINDOWS_PHONE) + if(WINDOWS_STORE AND MSVC_VERSION GREATER 1899) + set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsApp.lib") + elseif(WINDOWS_PHONE) set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib") elseif(_MSVC_C_ARCHITECTURE_FAMILY STREQUAL "ARM" OR _MSVC_CXX_ARCHITECTURE_FAMILY STREQUAL "ARM") set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib") diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index a70f763..0ce1696 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 3) -set(CMake_VERSION_PATCH 20150930) -#set(CMake_VERSION_RC 1) +set(CMake_VERSION_MINOR 4) +set(CMake_VERSION_PATCH 0) +#set(CMake_VERSION_RC 0) diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 93c94e2..04efb71 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -570,7 +570,7 @@ int cmCPackDebGenerator::createDeb() return 0; } cmArchiveWrite control_tar(fileStream_control_tar, - tar_compression_type, + cmArchiveWrite::CompressGZip, "paxr"); // sets permissions and uid/gid for the files diff --git a/Source/CTest/cmCTestCurl.cxx b/Source/CTest/cmCTestCurl.cxx index b4c0137..fb6cc00 100644 --- a/Source/CTest/cmCTestCurl.cxx +++ b/Source/CTest/cmCTestCurl.cxx @@ -166,6 +166,10 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, curlWriteMemoryCallback); ::curl_easy_setopt(this->Curl, CURLOPT_DEBUGFUNCTION, curlDebugCallback); + // Be sure to set Content-Type to satisfy fussy modsecurity rules + struct curl_slist *headers = ::curl_slist_append(NULL, + "Content-Type: text/xml"); + ::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, headers); std::vector<char> responseData; std::vector<char> debugData; ::curl_easy_setopt(this->Curl, CURLOPT_FILE, (void *)&responseData); @@ -174,6 +178,8 @@ bool cmCTestCurl::UploadFile(std::string const& local_file, // Now run off and do what you've been told! ::curl_easy_perform(this->Curl); ::fclose(ftpfile); + ::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, NULL); + ::curl_slist_free_all(headers); if ( responseData.size() > 0 ) { diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index 4832186..7c7f5df 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -198,6 +198,10 @@ void cmCTestMultiProcessHandler::UnlockResources(int index) { this->LockedResources.erase(*i); } + if (this->Properties[index]->RunSerial) + { + this->SerialTestRunning = false; + } } //--------------------------------------------------------- @@ -451,11 +455,6 @@ bool cmCTestMultiProcessHandler::CheckOutput() this->WriteCheckpoint(test); this->UnlockResources(test); this->RunningCount -= GetProcessorsUsed(test); - if (this->Properties[test]->RunSerial) - { - this->SerialTestRunning = false; - } - delete p; } return true; diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx index 1e12f15..833cad6 100644 --- a/Source/CTest/cmCTestSubmitHandler.cxx +++ b/Source/CTest/cmCTestSubmitHandler.cxx @@ -338,6 +338,8 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, CURLcode res; FILE* ftpfile; char error_buffer[1024]; + struct curl_slist *headers = ::curl_slist_append(NULL, + "Content-Type: text/xml"); /* In windows, this will init the winsock stuff */ ::curl_global_init(CURL_GLOBAL_ALL); @@ -420,6 +422,9 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, ::curl_easy_setopt(curl, CURLOPT_PUT, 1); ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); + // Be sure to set Content-Type to satisfy fussy modsecurity rules + ::curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); + std::string local_file = *file; if ( !cmSystemTools::FileExists(local_file.c_str()) ) { @@ -477,6 +482,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, cmCTestLog(this->CTest, ERROR_MESSAGE, " Cannot find file: " << local_file << std::endl); ::curl_easy_cleanup(curl); + ::curl_slist_free_all(headers); ::curl_global_cleanup(); return false; } @@ -621,6 +627,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, << std::endl); } ::curl_easy_cleanup(curl); + ::curl_slist_free_all(headers); ::curl_global_cleanup(); return false; } @@ -630,6 +637,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix, " Uploaded: " + local_file << std::endl, this->Quiet); } } + ::curl_slist_free_all(headers); ::curl_global_cleanup(); return true; } diff --git a/Source/bindexplib.cxx b/Source/bindexplib.cxx index dc4db63..b250842 100644 --- a/Source/bindexplib.cxx +++ b/Source/bindexplib.cxx @@ -425,7 +425,7 @@ DumpFile(const char* filename, FILE *fout) if(h->Sig1 == 0x0 && h->Sig2 == 0xffff) { DumpSymbols<cmANON_OBJECT_HEADER_BIGOBJ, cmIMAGE_SYMBOL_EX> symbolDumper((cmANON_OBJECT_HEADER_BIGOBJ*) lpFileBase, fout, - (dosHeader->e_magic == IMAGE_FILE_MACHINE_AMD64)); + (h->Machine == IMAGE_FILE_MACHINE_AMD64)); symbolDumper.DumpObjFile(); } else { printf("unrecognized file format in '%s'\n", filename); diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx index 7874803..5330acd 100644 --- a/Source/cmConditionEvaluator.cxx +++ b/Source/cmConditionEvaluator.cxx @@ -11,9 +11,14 @@ ============================================================================*/ #include "cmConditionEvaluator.h" +#include "cmOutputConverter.h" -cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile): +cmConditionEvaluator::cmConditionEvaluator(cmMakefile& makefile, + const cmListFileContext &context, + const cmListFileBacktrace& bt): Makefile(makefile), + ExecutionContext(context), + Backtrace(bt), Policy12Status(makefile.GetPolicyStatus(cmPolicies::CMP0012)), Policy54Status(makefile.GetPolicyStatus(cmPolicies::CMP0054)), Policy57Status(makefile.GetPolicyStatus(cmPolicies::CMP0057)), @@ -98,6 +103,25 @@ bool cmConditionEvaluator::IsTrue( errorString, status, true); } +cmListFileContext cmConditionEvaluator::GetConditionContext( + cmMakefile* mf, + const cmCommandContext& command, + const std::string& filePath) +{ + cmListFileContext context = + cmListFileContext::FromCommandContext( + command, + filePath); + + if(!mf->GetCMakeInstance()->GetIsInTryCompile()) + { + cmOutputConverter converter(mf->GetStateSnapshot()); + context.FilePath = converter.Convert(context.FilePath, + cmOutputConverter::HOME); + } + return context; +} + //========================================================================= const char* cmConditionEvaluator::GetDefinitionIfUnquoted( cmExpandedCommandArgument const& argument) const @@ -113,7 +137,8 @@ const char* cmConditionEvaluator::GetDefinitionIfUnquoted( if(def && argument.WasQuoted() && this->Policy54Status == cmPolicies::WARN) { - if(!this->Makefile.HasCMP0054AlreadyBeenReported()) + if(!this->Makefile.HasCMP0054AlreadyBeenReported( + this->ExecutionContext)) { std::ostringstream e; e << (cmPolicies::GetPolicyWarning(cmPolicies::CMP0054)) << "\n"; @@ -122,7 +147,9 @@ const char* cmConditionEvaluator::GetDefinitionIfUnquoted( "when the policy is set to NEW. " "Since the policy is not set the OLD behavior will be used."; - this->Makefile.IssueMessage(cmake::AUTHOR_WARNING, e.str()); + this->Makefile.GetCMakeInstance() + ->IssueMessage(cmake::AUTHOR_WARNING, e.str(), + this->Backtrace); } } @@ -159,7 +186,8 @@ bool cmConditionEvaluator::IsKeyword(std::string const& keyword, if(isKeyword && argument.WasQuoted() && this->Policy54Status == cmPolicies::WARN) { - if(!this->Makefile.HasCMP0054AlreadyBeenReported()) + if(!this->Makefile.HasCMP0054AlreadyBeenReported( + this->ExecutionContext)) { std::ostringstream e; e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0054) << "\n"; @@ -168,7 +196,9 @@ bool cmConditionEvaluator::IsKeyword(std::string const& keyword, "when the policy is set to NEW. " "Since the policy is not set the OLD behavior will be used."; - this->Makefile.IssueMessage(cmake::AUTHOR_WARNING, e.str()); + this->Makefile.GetCMakeInstance() + ->IssueMessage(cmake::AUTHOR_WARNING, e.str(), + this->Backtrace); } } diff --git a/Source/cmConditionEvaluator.h b/Source/cmConditionEvaluator.h index c4e2d11..8600825 100644 --- a/Source/cmConditionEvaluator.h +++ b/Source/cmConditionEvaluator.h @@ -22,7 +22,9 @@ class cmConditionEvaluator public: typedef std::list<cmExpandedCommandArgument> cmArgumentList; - cmConditionEvaluator(cmMakefile& makefile); + cmConditionEvaluator(cmMakefile& makefile, + cmListFileContext const& context, + cmListFileBacktrace const& bt); // this is a shared function for both If and Else to determine if the // arguments were valid, and if so, was the response true. If there is @@ -31,6 +33,9 @@ public: std::string &errorString, cmake::MessageType &status); + static cmListFileContext GetConditionContext(cmMakefile* mf, + const cmCommandContext& command, std::string const& filePath); + private: // Filter the given variable definition based on policy CMP0054. const char* GetDefinitionIfUnquoted( @@ -91,6 +96,8 @@ private: cmake::MessageType &status); cmMakefile& Makefile; + cmListFileContext ExecutionContext; + cmListFileBacktrace Backtrace; cmPolicies::PolicyStatus Policy12Status; cmPolicies::PolicyStatus Policy54Status; cmPolicies::PolicyStatus Policy57Status; diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx index d062987..37dd328 100644 --- a/Source/cmELF.cxx +++ b/Source/cmELF.cxx @@ -567,8 +567,14 @@ bool cmELFInternalImpl<Types>::LoadDynamicSection() return true; } - // Allocate the dynamic section entries. + // If there are no entries we are done. ELF_Shdr const& sec = this->SectionHeaders[this->DynamicSectionIndex]; + if(sec.sh_entsize == 0) + { + return false; + } + + // Allocate the dynamic section entries. int n = static_cast<int>(sec.sh_size / sec.sh_entsize); this->DynamicSectionEntries.resize(n); diff --git a/Source/cmFindProgramCommand.cxx b/Source/cmFindProgramCommand.cxx index e64ed87..219ad48 100644 --- a/Source/cmFindProgramCommand.cxx +++ b/Source/cmFindProgramCommand.cxx @@ -176,6 +176,13 @@ std::string cmFindProgramCommand::FindNormalProgramNamesPerDir() { helper.AddName(*ni); } + + // Check for the names themselves (e.g. absolute paths). + if (helper.CheckDirectory(std::string())) + { + return helper.BestPath; + } + // Search every directory. for (std::vector<std::string>::const_iterator p = this->SearchPaths.begin(); p != this->SearchPaths.end(); ++p) @@ -200,6 +207,12 @@ std::string cmFindProgramCommand::FindNormalProgramDirsPerName() // Switch to searching for this name. helper.SetName(*ni); + // Check for the name by itself (e.g. an absolute path). + if (helper.CheckDirectory(std::string())) + { + return helper.BestPath; + } + // Search every directory. for (std::vector<std::string>::const_iterator p = this->SearchPaths.begin(); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 62598f4..194cd88 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -2747,6 +2747,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name, const char* version = this->GetProperty("VERSION"); const char* soversion = this->GetProperty("SOVERSION"); if(!this->HasSOName(config) || + this->Makefile->IsOn("CMAKE_PLATFORM_NO_VERSIONED_SONAME") || this->Target->IsFrameworkOnApple()) { // Versioning is supported only for shared libraries and modules, diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 44d632d..59e8f8c 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -176,7 +176,14 @@ cmGlobalVisualStudio10Generator::SetGeneratorToolset(std::string const& ts, //---------------------------------------------------------------------------- bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) { - if (this->SystemName == "WindowsCE") + if (this->SystemName == "Windows") + { + if (!this->InitializeWindows(mf)) + { + return false; + } + } + else if (this->SystemName == "WindowsCE") { this->SystemIsWindowsCE = true; if (!this->InitializeWindowsCE(mf)) @@ -184,7 +191,7 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) return false; } } - else if(this->SystemName == "WindowsPhone") + else if (this->SystemName == "WindowsPhone") { this->SystemIsWindowsPhone = true; if(!this->InitializeWindowsPhone(mf)) @@ -192,7 +199,7 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) return false; } } - else if(this->SystemName == "WindowsStore") + else if (this->SystemName == "WindowsStore") { this->SystemIsWindowsStore = true; if(!this->InitializeWindowsStore(mf)) @@ -229,6 +236,12 @@ bool cmGlobalVisualStudio10Generator::InitializeSystem(cmMakefile* mf) } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio10Generator::InitializeWindows(cmMakefile*) +{ + return true; +} + +//---------------------------------------------------------------------------- bool cmGlobalVisualStudio10Generator::InitializeWindowsCE(cmMakefile* mf) { if (this->DefaultPlatformName != "Win32") diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 8de7b09..f4861dc 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/Source/cmGlobalVisualStudio10Generator.h @@ -74,6 +74,10 @@ public: /** Return the CMAKE_SYSTEM_VERSION. */ std::string const& GetSystemVersion() const { return this->SystemVersion; } + /** Return the Windows version targeted on VS 2015 and above. */ + std::string const& GetWindowsTargetPlatformVersion() const + { return this->WindowsTargetPlatformVersion; } + /** Return true if building for WindowsCE */ bool TargetsWindowsCE() const { return this->SystemIsWindowsCE; } @@ -105,6 +109,7 @@ public: protected: virtual void Generate(); virtual bool InitializeSystem(cmMakefile* mf); + virtual bool InitializeWindows(cmMakefile* mf); virtual bool InitializeWindowsCE(cmMakefile* mf); virtual bool InitializeWindowsPhone(cmMakefile* mf); virtual bool InitializeWindowsStore(cmMakefile* mf); @@ -119,6 +124,7 @@ protected: std::string GeneratorToolset; std::string DefaultPlatformToolset; + std::string WindowsTargetPlatformVersion; std::string SystemName; std::string SystemVersion; std::string NsightTegraVersion; diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index d73eedf..41825fb 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -111,6 +111,84 @@ cmGlobalVisualStudio14Generator::MatchesGeneratorName( } //---------------------------------------------------------------------------- +bool cmGlobalVisualStudio14Generator::InitializeWindows(cmMakefile* mf) +{ + if (cmHasLiteralPrefix(this->SystemVersion, "10.0")) + { + return this->SelectWindows10SDK(mf); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio14Generator::InitializeWindowsStore(cmMakefile* mf) +{ + std::ostringstream e; + if(!this->SelectWindowsStoreToolset(this->DefaultPlatformToolset)) + { + if(this->DefaultPlatformToolset.empty()) + { + e << this->GetName() << " supports Windows Store '8.0', '8.1' and " + "'10.0', but not '" << this->SystemVersion << + "'. Check CMAKE_SYSTEM_VERSION."; + } + else + { + e << "A Windows Store component with CMake requires both the Windows " + << "Desktop SDK as well as the Windows Store '" << this->SystemVersion + << "' SDK. Please make sure that you have both installed"; + } + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + if (cmHasLiteralPrefix(this->SystemVersion, "10.0")) + { + return this->SelectWindows10SDK(mf); + } + return true; +} + +//---------------------------------------------------------------------------- +bool cmGlobalVisualStudio14Generator::SelectWindows10SDK(cmMakefile* mf) +{ + // Find the default version of the Windows 10 SDK. + this->WindowsTargetPlatformVersion = this->GetWindows10SDKVersion(); + if (this->WindowsTargetPlatformVersion.empty()) + { + std::ostringstream e; + e << "Could not find an appropriate version of the Windows 10 SDK" + << " installed on this machine"; + mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + return false; + } + mf->AddDefinition("CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION", + this->WindowsTargetPlatformVersion.c_str()); + return true; +} + +//---------------------------------------------------------------------------- +bool +cmGlobalVisualStudio14Generator::SelectWindowsStoreToolset( + std::string& toolset) const +{ + if (cmHasLiteralPrefix(this->SystemVersion, "10.0")) + { + if (this->IsWindowsStoreToolsetInstalled() && + this->IsWindowsDesktopToolsetInstalled()) + { + toolset = "v140"; + return true; + } + else + { + return false; + } + } + return + this->cmGlobalVisualStudio12Generator::SelectWindowsStoreToolset(toolset); +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio14Generator::WriteSLNHeader(std::ostream& fout) { // Visual Studio 14 writes .sln format 12.00 @@ -137,3 +215,77 @@ cmGlobalVisualStudio14Generator::IsWindowsDesktopToolsetInstalled() const return cmSystemTools::GetRegistrySubKeys(desktop10Key, vc14, cmSystemTools::KeyWOW64_32); } + +//---------------------------------------------------------------------------- +bool +cmGlobalVisualStudio14Generator::IsWindowsStoreToolsetInstalled() const +{ + const char universal10Key[] = + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" + "VisualStudio\\14.0\\Setup\\Build Tools for Windows 10;SrcPath"; + + std::string win10SDK; + return cmSystemTools::ReadRegistryValue(universal10Key, + win10SDK, cmSystemTools::KeyWOW64_32); +} + +//---------------------------------------------------------------------------- +std::string cmGlobalVisualStudio14Generator::GetWindows10SDKVersion() +{ +#if defined(_WIN32) && !defined(__CYGWIN__) + // This logic is taken from the vcvarsqueryregistry.bat file from VS2015 + // Try HKLM and then HKCU. + std::string win10Root; + if (!cmSystemTools::ReadRegistryValue( + "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\" + "Windows Kits\\Installed Roots;KitsRoot10", win10Root, + cmSystemTools::KeyWOW64_32) && + !cmSystemTools::ReadRegistryValue( + "HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\" + "Windows Kits\\Installed Roots;KitsRoot10", win10Root, + cmSystemTools::KeyWOW64_32)) + { + return std::string(); + } + + std::vector<std::string> sdks; + std::string path = win10Root + "Include/*"; + // Grab the paths of the different SDKs that are installed + cmSystemTools::GlobDirs(path, sdks); + if (!sdks.empty()) + { + // Only use the filename, which will be the SDK version. + for (std::vector<std::string>::iterator i = sdks.begin(); + i != sdks.end(); ++i) + { + *i = cmSystemTools::GetFilenameName(*i); + } + + // Sort the results to make sure we select the most recent one that + // has a version less or equal to our version of the operating system + std::sort(sdks.begin(), sdks.end(), cmSystemTools::VersionCompareGreater); + + // Select a suitable SDK version. + if (this->SystemVersion == "10.0") + { + // Use the latest Windows 10 SDK since no build version was given. + return sdks.at(0); + } + else + { + // Find the SDK less or equal to our specified version + for (std::vector<std::string>::iterator i = sdks.begin(); + i != sdks.end(); ++i) + { + if (!cmSystemTools::VersionCompareGreater(*i, this->SystemVersion)) + { + // This is the most recent SDK that we can run safely + return *i; + } + } + } + } +#endif + // Return an empty string + return std::string(); +} diff --git a/Source/cmGlobalVisualStudio14Generator.h b/Source/cmGlobalVisualStudio14Generator.h index 02c6274..76c15d9 100644 --- a/Source/cmGlobalVisualStudio14Generator.h +++ b/Source/cmGlobalVisualStudio14Generator.h @@ -30,12 +30,23 @@ public: virtual const char* GetToolsVersion() { return "14.0"; } protected: + virtual bool InitializeWindows(cmMakefile* mf); + virtual bool InitializeWindowsStore(cmMakefile* mf); + virtual bool SelectWindowsStoreToolset(std::string& toolset) const; + + // These aren't virtual because we need to check if the selected version + // of the toolset is installed + bool IsWindowsStoreToolsetInstalled() const; + virtual const char* GetIDEVersion() { return "14.0"; } + virtual bool SelectWindows10SDK(cmMakefile* mf); // Used to verify that the Desktop toolset for the current generator is // installed on the machine. virtual bool IsWindowsDesktopToolsetInstalled() const; + std::string GetWindows10SDKVersion(); + private: class Factory; }; diff --git a/Source/cmIfCommand.cxx b/Source/cmIfCommand.cxx index 20448c1..9e71d37 100644 --- a/Source/cmIfCommand.cxx +++ b/Source/cmIfCommand.cxx @@ -106,7 +106,14 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmake::MessageType messType; - cmConditionEvaluator conditionEvaluator(mf); + cmListFileContext conditionContext = + cmConditionEvaluator::GetConditionContext( + &mf, this->Functions[c], + this->GetStartingContext().FilePath); + + cmConditionEvaluator conditionEvaluator( + mf, conditionContext, + mf.GetBacktrace(this->Functions[c])); bool isTrue = conditionEvaluator.IsTrue( expandedArguments, errorString, messType); @@ -195,7 +202,16 @@ bool cmIfCommand cmake::MessageType status; - cmConditionEvaluator conditionEvaluator(*(this->Makefile)); + cmListFileContext execContext = this->Makefile->GetExecutionContext(); + + cmCommandContext commandContext; + commandContext.Line = execContext.Line; + commandContext.Name = execContext.Name; + + cmConditionEvaluator conditionEvaluator( + *(this->Makefile), cmConditionEvaluator::GetConditionContext( + this->Makefile, commandContext, execContext.FilePath), + this->Makefile->GetBacktrace()); bool isTrue = conditionEvaluator.IsTrue( expandedArguments, errorString, status); diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 333c2ff..d3c2e26 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -27,6 +27,7 @@ static cmInstallTargetGenerator* CreateInstallTargetGenerator(cmTarget& target, { cmInstallGenerator::MessageLevel message = cmInstallGenerator::SelectMessageLevel(target.GetMakefile()); + target.SetHaveInstallRule(true); return new cmInstallTargetGenerator(target.GetName(), args.GetDestination().c_str(), impLib, args.GetPermissions().c_str(), @@ -753,12 +754,6 @@ bool cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args) installsPublicHeader = installsPublicHeader || publicHeaderGenerator != 0; installsResource = installsResource || resourceGenerator; - if (installsArchive || installsRuntime || installsFramework - || installsLibrary || installsBundle) - { - target.SetHaveInstallRule(true); - } - this->Makefile->AddInstallGenerator(archiveGenerator); this->Makefile->AddInstallGenerator(libraryGenerator); this->Makefile->AddInstallGenerator(runtimeGenerator); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c70756a..cb66a75 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -3218,7 +3218,7 @@ void cmMakefile::AddDefaultDefinitions() //---------------------------------------------------------------------------- std::string cmMakefile::GetConfigurations(std::vector<std::string>& configs, - bool single) const + bool singleConfig) const { if(this->GetGlobalGenerator()->IsMultiConfig()) { @@ -3232,7 +3232,7 @@ cmMakefile::GetConfigurations(std::vector<std::string>& configs, else { const std::string& buildType = this->GetSafeDefinition("CMAKE_BUILD_TYPE"); - if(single && !buildType.empty()) + if(singleConfig && !buildType.empty()) { configs.push_back(buildType); } @@ -4658,9 +4658,10 @@ bool cmMakefile::SetPolicyVersion(const char *version) } //---------------------------------------------------------------------------- -bool cmMakefile::HasCMP0054AlreadyBeenReported() const +bool cmMakefile::HasCMP0054AlreadyBeenReported( + cmListFileContext const& context) const { - return !this->CMP0054ReportedIds.insert(this->GetExecutionContext()).second; + return !this->CMP0054ReportedIds.insert(context).second; } //---------------------------------------------------------------------------- diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 8724c6e..111f074 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -336,7 +336,7 @@ public: * Determine if the given context, name pair has already been reported * in context of CMP0054. */ - bool HasCMP0054AlreadyBeenReported() const; + bool HasCMP0054AlreadyBeenReported(const cmListFileContext &context) const; bool IgnoreErrorsCMP0061() const; diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 24e7ed8..d52ab78 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -86,7 +86,7 @@ std::string cmQtAutoGeneratorInitializer::ListQt5RccInputs(cmSourceFile* sf, std::vector<std::string> command; command.push_back(rccCommand); - command.push_back("-list"); + command.push_back("--list"); std::string absFile = cmsys::SystemTools::GetRealPath( sf->GetFullPath()); diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index d3c1f16..2c5aa8a 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2777,6 +2777,14 @@ bool cmSystemTools::VersionCompare(cmSystemTools::CompareOp op, } //---------------------------------------------------------------------------- +bool cmSystemTools::VersionCompareGreater(std::string const& lhs, + std::string const& rhs) +{ + return cmSystemTools::VersionCompare( + cmSystemTools::OP_GREATER, lhs.c_str(), rhs.c_str()); +} + +//---------------------------------------------------------------------------- bool cmSystemTools::RemoveRPath(std::string const& file, std::string* emsg, bool* removed) { diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index e88170a..b6b0978 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -294,6 +294,8 @@ public: * Compare versions */ static bool VersionCompare(CompareOp op, const char* lhs, const char* rhs); + static bool VersionCompareGreater(std::string const& lhs, + std::string const& rhs); /** * Determine the file type based on the extension diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 6c71313..1de2847 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -463,6 +463,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteString("<Import Project=\"" VS10_USER_PROPS "\"" " Condition=\"exists('" VS10_USER_PROPS "')\"" " Label=\"LocalAppDataPlatform\" />\n", 2); + this->WritePlatformExtensions(); this->WriteString("</ImportGroup>\n", 1); this->WriteString("<PropertyGroup Label=\"UserMacros\" />\n", 1); this->WriteWinRTPackageCertificateKeyFile(); @@ -475,6 +476,7 @@ void cmVisualStudio10TargetGenerator::Generate() this->WriteXamlFilesGroup(); this->WriteWinRTReferences(); this->WriteProjectReferences(); + this->WriteSDKReferences(); this->WriteString( "<Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\"" " />\n", 1); @@ -1303,10 +1305,15 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { tool = "Image"; } + else if(ext == "resw") + { + tool = "PRIResource"; + } else if(ext == "xml") { tool = "XML"; } + if(this->NsightTegra) { // Nsight Tegra needs specific file types to check up-to-dateness. @@ -2590,7 +2597,8 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) // A Windows Runtime component uses internal .NET metadata, // so does not have an import library. - if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT")) + if(this->Target->GetPropertyAsBool("VS_WINRT_COMPONENT") && + this->Target->GetType() != cmTarget::EXECUTABLE) { linkOptions.AddFlag("GenerateWindowsMetadata", "true"); } @@ -2661,7 +2669,7 @@ cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& config) { this->WriteString("<ProjectReference>\n", 2); this->WriteString( - " <LinkLibraryDependencies>false</LinkLibraryDependencies>\n", 2); + "<LinkLibraryDependencies>false</LinkLibraryDependencies>\n", 3); this->WriteString("</ProjectReference>\n", 2); } } @@ -2896,6 +2904,101 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() this->WriteString("</ItemGroup>\n", 1); } +void cmVisualStudio10TargetGenerator::WritePlatformExtensions() +{ + // This only applies to Windows 10 apps + if (this->GlobalGenerator->TargetsWindowsStore() && + cmHasLiteralPrefix(this->GlobalGenerator->GetSystemVersion(), "10.0")) + { + const char* desktopExtensionsVersion = + this->Target->GetProperty("VS_DESKTOP_EXTENSIONS_VERSION"); + if (desktopExtensionsVersion) + { + this->WriteSinglePlatformExtension("WindowsDesktop", + desktopExtensionsVersion); + } + const char* mobileExtensionsVersion = + this->Target->GetProperty("VS_MOBILE_EXTENSIONS_VERSION"); + if (mobileExtensionsVersion) + { + this->WriteSinglePlatformExtension("WindowsMobile", + mobileExtensionsVersion); + } + } +} + +void cmVisualStudio10TargetGenerator::WriteSinglePlatformExtension( + std::string const& extension, + std::string const& version + ) +{ + this->WriteString("<Import Project=", 2); + (*this->BuildFileStream) + << "\"$([Microsoft.Build.Utilities.ToolLocationHelper]" + << "::GetPlatformExtensionSDKLocation(`" + << extension <<", Version=" << version + << "`, $(TargetPlatformIdentifier), $(TargetPlatformVersion), null, " + << "$(ExtensionSDKDirectoryRoot), null))" + << "\\DesignTime\\CommonConfiguration\\Neutral\\" + << extension << ".props\" " + << "Condition=\"exists('$(" + << "[Microsoft.Build.Utilities.ToolLocationHelper]" + << "::GetPlatformExtensionSDKLocation(`" + << extension << ", Version=" << version + << "`, $(TargetPlatformIdentifier), $(TargetPlatformVersion), null, " + << "$(ExtensionSDKDirectoryRoot), null))" + << "\\DesignTime\\CommonConfiguration\\Neutral\\" + << extension << ".props')\" />\n"; +} + +void cmVisualStudio10TargetGenerator::WriteSDKReferences() +{ + // This only applies to Windows 10 apps + if (this->GlobalGenerator->TargetsWindowsStore() && + cmHasLiteralPrefix(this->GlobalGenerator->GetSystemVersion(), "10.0")) + { + const char* desktopExtensionsVersion = + this->Target->GetProperty("VS_DESKTOP_EXTENSIONS_VERSION"); + const char* mobileExtensionsVersion = + this->Target->GetProperty("VS_MOBILE_EXTENSIONS_VERSION"); + const char* iotExtensionsVersion = + this->Target->GetProperty("VS_IOT_EXTENSIONS_VERSION"); + + if(desktopExtensionsVersion || mobileExtensionsVersion || + iotExtensionsVersion) + { + this->WriteString("<ItemGroup>\n", 1); + if(desktopExtensionsVersion) + { + this->WriteSingleSDKReference("WindowsDesktop", + desktopExtensionsVersion); + } + if(mobileExtensionsVersion) + { + this->WriteSingleSDKReference("WindowsMobile", + mobileExtensionsVersion); + } + if(iotExtensionsVersion) + { + this->WriteSingleSDKReference("WindowsIoT", + iotExtensionsVersion); + } + this->WriteString("</ItemGroup>\n", 1); + } + } +} + +void cmVisualStudio10TargetGenerator::WriteSingleSDKReference( + std::string const& extension, + std::string const& version + ) +{ + this->WriteString("<SDKReference Include=\"", 2); + (*this->BuildFileStream) << extension + << ", Version=" << version << "\" />\n"; +} + + void cmVisualStudio10TargetGenerator::WriteWinRTPackageCertificateKeyFile() { if((this->GlobalGenerator->TargetsWindowsStore() || @@ -3006,6 +3109,8 @@ IsXamlSource(const std::string& sourceFile) void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() { + cmGlobalVisualStudio10Generator* gg = + static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator); bool isAppContainer = false; bool const isWindowsPhone = this->GlobalGenerator->TargetsWindowsPhone(); bool const isWindowsStore = this->GlobalGenerator->TargetsWindowsStore(); @@ -3016,13 +3121,27 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() (*this->BuildFileStream) << (isWindowsPhone ? "Windows Phone" : "Windows Store") << "</ApplicationType>\n"; - this->WriteString("<ApplicationTypeRevision>", 2); - (*this->BuildFileStream) << cmVS10EscapeXML(v) - << "</ApplicationTypeRevision>\n"; this->WriteString("<DefaultLanguage>en-US" "</DefaultLanguage>\n", 2); - if(v == "8.1") + if (cmHasLiteralPrefix(v, "10.0")) + { + this->WriteString("<ApplicationTypeRevision>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML("10.0") + << "</ApplicationTypeRevision>\n"; + // Visual Studio 14.0 is necessary for building 10.0 apps + this->WriteString("<MinimumVisualStudioVersion>14.0" + "</MinimumVisualStudioVersion>\n", 2); + + if(this->Target->GetType() < cmTarget::UTILITY) + { + isAppContainer = true; + } + } + else if(v == "8.1") { + this->WriteString("<ApplicationTypeRevision>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(v) + << "</ApplicationTypeRevision>\n"; // Visual Studio 12.0 is necessary for building 8.1 apps this->WriteString("<MinimumVisualStudioVersion>12.0" "</MinimumVisualStudioVersion>\n", 2); @@ -3034,6 +3153,9 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() } else if (v == "8.0") { + this->WriteString("<ApplicationTypeRevision>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(v) + << "</ApplicationTypeRevision>\n"; // Visual Studio 11.0 is necessary for building 8.0 apps this->WriteString("<MinimumVisualStudioVersion>11.0" "</MinimumVisualStudioVersion>\n", 2); @@ -3062,6 +3184,38 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings() this->WriteString("<WindowsSDKDesktopARMSupport>true" "</WindowsSDKDesktopARMSupport>\n", 2); } + std::string const& targetPlatformVersion = + gg->GetWindowsTargetPlatformVersion(); + if (!targetPlatformVersion.empty()) + { + this->WriteString("<WindowsTargetPlatformVersion>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(targetPlatformVersion) << + "</WindowsTargetPlatformVersion>\n"; + } + const char* targetPlatformMinVersion = + this->Target->GetProperty("VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION"); + if(targetPlatformMinVersion) + { + this->WriteString("<WindowsTargetPlatformMinVersion>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(targetPlatformMinVersion) << + "</WindowsTargetPlatformMinVersion>\n"; + } + else if (isWindowsStore && cmHasLiteralPrefix(v, "10.0")) + { + // If the min version is not set, then use the TargetPlatformVersion + if (!targetPlatformVersion.empty()) + { + this->WriteString("<WindowsTargetPlatformMinVersion>", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(targetPlatformVersion) << + "</WindowsTargetPlatformMinVersion>\n"; + } + } + + // Added IoT Startup Task support + if(this->Target->GetPropertyAsBool("VS_IOT_STARTUP_TASK")) + { + this->WriteString("<ContainsStartupTask>true</ContainsStartupTask>\n", 2); + } } void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles() @@ -3114,7 +3268,7 @@ void cmVisualStudio10TargetGenerator::VerifyNecessaryFiles() { this->IsMissingFiles = true; } - else if (v == "8.1") + else if (v == "8.1" || cmHasLiteralPrefix(v, "10.0")) { this->IsMissingFiles = true; } @@ -3148,6 +3302,10 @@ void cmVisualStudio10TargetGenerator::WriteMissingFiles() { this->WriteMissingFilesWS81(); } + else if (cmHasLiteralPrefix(v, "10.0")) + { + this->WriteMissingFilesWS10_0(); + } } } @@ -3409,6 +3567,64 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS81() this->WriteCommonMissingFiles(manifestFile); } +void cmVisualStudio10TargetGenerator::WriteMissingFilesWS10_0() +{ + std::string manifestFile = + this->DefaultArtifactDir + "/package.appxManifest"; + std::string artifactDir = + this->LocalGenerator->GetTargetDirectory(*this->Target); + this->ConvertToWindowsSlash(artifactDir); + std::string artifactDirXML = cmVS10EscapeXML(artifactDir); + std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName()); + + cmGeneratedFileStream fout(manifestFile.c_str()); + fout.SetCopyIfDifferent(true); + + fout << + "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<Package\n\t" + "xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"" + "\txmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"\n" + "\txmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"" + "\n\tIgnorableNamespaces=\"uap mp\">\n\n" + "\t<Identity Name=\"" << this->GUID << "\" Publisher=\"CN=CMake\"" + " Version=\"1.0.0.0\" />\n" + "\t<mp:PhoneIdentity PhoneProductId=\"" << this->GUID << + "\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>\n" + "\t<Properties>\n" + "\t\t<DisplayName>" << targetNameXML << "</DisplayName>\n" + "\t\t<PublisherDisplayName>CMake</PublisherDisplayName>\n" + "\t\t<Logo>" << artifactDirXML << "\\StoreLogo.png</Logo>\n" + "\t</Properties>\n" + "\t<Dependencies>\n" + "\t\t<TargetDeviceFamily Name=\"Windows.Universal\" " + "MinVersion=\"10.0.0.0\" MaxVersionTested=\"10.0.0.0\" />\n" + "\t</Dependencies>\n" + + "\t<Resources>\n" + "\t\t<Resource Language=\"x-generate\" />\n" + "\t</Resources>\n" + "\t<Applications>\n" + "\t\t<Application Id=\"App\"" + " Executable=\"" << targetNameXML << ".exe\"" + " EntryPoint=\"" << targetNameXML << ".App\">\n" + "\t\t\t<uap:VisualElements\n" + "\t\t\t\tDisplayName=\"" << targetNameXML << "\"\n" + "\t\t\t\tDescription=\"" << targetNameXML << "\"\n" + "\t\t\t\tBackgroundColor=\"#336699\"\n" + "\t\t\t\tSquare150x150Logo=\"" << artifactDirXML << "\\Logo.png\"\n" + "\t\t\t\tSquare44x44Logo=\"" << artifactDirXML << + "\\SmallLogo44x44.png\">\n" + "\t\t\t\t<uap:SplashScreen" + " Image=\"" << artifactDirXML << "\\SplashScreen.png\" />\n" + "\t\t\t</uap:VisualElements>\n" + "\t\t</Application>\n" + "\t</Applications>\n" + "</Package>\n"; + + this->WriteCommonMissingFiles(manifestFile); +} + void cmVisualStudio10TargetGenerator ::WriteCommonMissingFiles(const std::string& manifestFile) @@ -3432,6 +3648,14 @@ cmVisualStudio10TargetGenerator (*this->BuildFileStream) << cmVS10EscapeXML(smallLogo) << "\" />\n"; this->AddedFiles.push_back(smallLogo); + std::string smallLogo44 = this->DefaultArtifactDir + "/SmallLogo44x44.png"; + cmSystemTools::CopyAFile(templateFolder + "/SmallLogo44x44.png", + smallLogo44, false); + this->ConvertToWindowsSlash(smallLogo44); + this->WriteString("<Image Include=\"", 2); + (*this->BuildFileStream) << cmVS10EscapeXML(smallLogo44) << "\" />\n"; + this->AddedFiles.push_back(smallLogo44); + std::string logo = this->DefaultArtifactDir + "/Logo.png"; cmSystemTools::CopyAFile(templateFolder + "/Logo.png", logo, false); @@ -3475,7 +3699,7 @@ bool cmVisualStudio10TargetGenerator::ForceOld(const std::string& source) const return false; } - FILETIME const ftime_20010101 = { 3365781504, 29389701 }; + FILETIME const ftime_20010101 = { 3365781504u, 29389701u }; if (!SetFileTime(h, &ftime_20010101, &ftime_20010101, &ftime_20010101)) { CloseHandle(h); diff --git a/Source/cmVisualStudio10TargetGenerator.h b/Source/cmVisualStudio10TargetGenerator.h index f2aaf05..15ed9f2 100644 --- a/Source/cmVisualStudio10TargetGenerator.h +++ b/Source/cmVisualStudio10TargetGenerator.h @@ -78,6 +78,13 @@ private: void WriteMissingFilesWP81(); void WriteMissingFilesWS80(); void WriteMissingFilesWS81(); + void WriteMissingFilesWS10_0(); + void WritePlatformExtensions(); + void WriteSinglePlatformExtension(std::string const& extension, + std::string const& version); + void WriteSDKReferences(); + void WriteSingleSDKReference(std::string const& extension, + std::string const& version); void WriteCommonMissingFiles(const std::string& manifestFile); void WriteTargetSpecificReferences(); diff --git a/Source/cmWhileCommand.cxx b/Source/cmWhileCommand.cxx index 012c580..4b7afd8 100644 --- a/Source/cmWhileCommand.cxx +++ b/Source/cmWhileCommand.cxx @@ -49,7 +49,20 @@ IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile &mf, mf.ExpandArguments(this->Args, expandedArguments); cmake::MessageType messageType; - cmConditionEvaluator conditionEvaluator(mf); + cmListFileContext execContext = this->GetStartingContext(); + + cmCommandContext commandContext; + commandContext.Line = execContext.Line; + commandContext.Name = execContext.Name; + + cmListFileContext conditionContext = + cmConditionEvaluator::GetConditionContext( + &mf, commandContext, + this->GetStartingContext().FilePath); + + cmConditionEvaluator conditionEvaluator( + mf, conditionContext, + mf.GetBacktrace(commandContext)); bool isTrue = conditionEvaluator.IsTrue( expandedArguments, errorString, messageType); diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index f44c77d..a074444 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1550,7 +1550,6 @@ bool cmVSLink::Parse(std::vector<std::string>::const_iterator argBeg, // pass it to the link command. this->ManifestFileRC = intDir + "/manifest.rc"; this->ManifestFileRes = intDir + "/manifest.res"; - this->LinkCommand.push_back(this->ManifestFileRes); } else if (this->UserManifests.empty()) { @@ -1658,6 +1657,9 @@ int cmVSLink::LinkIncremental() return -1; } + // Tell the linker to use our manifest compiled into a resource. + this->LinkCommand.push_back(this->ManifestFileRes); + // Run the link command (possibly generates intermediate manifest). if (!RunCommand("LINK Pass 1", this->LinkCommand, this->Verbose)) { diff --git a/Templates/Windows/SmallLogo44x44.png b/Templates/Windows/SmallLogo44x44.png Binary files differnew file mode 100644 index 0000000..28810b7 --- /dev/null +++ b/Templates/Windows/SmallLogo44x44.png diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index dc65a2e..c82cb68 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1955,13 +1955,15 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(reg_vs10 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0;InstallDir]") set(reg_vs11 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\11.0;InstallDir]") set(reg_vs12 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\12.0;InstallDir]") + set(reg_vs14 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]") set(reg_ws80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]") set(reg_ws81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]") + set(reg_ws10_0 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\14.0\\Setup\\Build Tools for Windows 10;srcPath]") set(reg_wp80 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.0;InstallationFolder]") set(reg_wp81 "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\WindowsPhone\\v8.1;InstallationFolder]") select_wince_sdk(reg_wince wince_sdk) set(reg_tegra "[HKEY_LOCAL_MACHINE\\SOFTWARE\\NVIDIA Corporation\\Nsight Tegra;sdkRoot]") - foreach(reg vs10 vs11 vs12 ws80 ws81 wp80 wp81 wince tegra) + foreach(reg vs10 vs11 vs12 vs14 ws80 ws81 ws10_0 wp80 wp81 wince tegra) get_filename_component(r "${reg_${reg}}" ABSOLUTE) if(IS_DIRECTORY "${r}") set(${reg} 1) @@ -2008,6 +2010,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release -DCMAKE_SYSTEM_VERSION=8.1 ) endif() + if(vs14 AND ws10_0) + add_test_VSWinStorePhone(vs14-store10_0-X86 "Visual Studio 14 2015" WindowsStore 10.0) + add_test_VSWinStorePhone(vs14-store10_0-ARM "Visual Studio 14 2015 ARM" WindowsStore 10.0) + add_test_VSWinStorePhone(vs14-store10_0-X64 "Visual Studio 14 2015 Win64" WindowsStore 10.0) + endif() if(vs11 AND wp80) add_test_VSWinStorePhone(vs11-phone80-X86 "Visual Studio 11 2012" WindowsPhone 8.0) add_test_VSWinStorePhone(vs11-phone80-ARM "Visual Studio 11 2012 ARM" WindowsPhone 8.0) diff --git a/Tests/FindPackageModeMakefileTest/Makefile.in b/Tests/FindPackageModeMakefileTest/Makefile.in index e4df9d6..8e7ff72 100644 --- a/Tests/FindPackageModeMakefileTest/Makefile.in +++ b/Tests/FindPackageModeMakefileTest/Makefile.in @@ -4,6 +4,7 @@ include cmakeExecutable.mk CMAKE_CURRENT_BINARY_DIR = "@CMAKE_CURRENT_BINARY_DIR@" CMAKE_CXX_COMPILER = "@CMAKE_CXX_COMPILER@" CMAKE_CXX_COMPILER_ID = "@CMAKE_CXX_COMPILER_ID@" +CMAKE_CXX_FLAGS = @CMAKE_CXX_FLAGS@ CMAKE_FOO = $(CMAKE) --find-package -DCMAKE_MODULE_PATH=$(CMAKE_CURRENT_BINARY_DIR) -DNAME=Foo -DLANGUAGE=CXX -DCOMPILER_ID=$(CMAKE_CXX_COMPILER_ID) @@ -14,7 +15,7 @@ all: pngtest main.o: clean main.cpp @$(CMAKE_FOO) -DMODE=COMPILE >$(tmp) @foo="`cat $(tmp)`"; \ - printf '"%s" %s %s -c main.cpp\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$$foo" >$(tmp) + printf '"%s" %s %s -c main.cpp\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$$foo" >$(tmp) @cat $(tmp) @sh $(tmp) @rm -f $(tmp) @@ -22,7 +23,7 @@ main.o: clean main.cpp pngtest: main.o @$(CMAKE_FOO) -DMODE=LINK >$(tmp) @foo="`cat $(tmp)`"; \ - printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CXXFLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp) + printf '"%s" %s %s -o pngtest main.o %s\n' $(CMAKE_CXX_COMPILER) "$(CMAKE_CXX_FLAGS)" "$(LDFLAGS)" "$$foo" >$(tmp) @cat $(tmp) @sh $(tmp) @rm -f $(tmp) diff --git a/Tests/MSManifest/Subdir/CMakeLists.txt b/Tests/MSManifest/Subdir/CMakeLists.txt index a47cf00..11272bb 100644 --- a/Tests/MSManifest/Subdir/CMakeLists.txt +++ b/Tests/MSManifest/Subdir/CMakeLists.txt @@ -6,4 +6,6 @@ if(MSVC AND NOT MSVC_VERSION LESS 1400) COMMAND ${CMAKE_COMMAND} -Dexe=$<TARGET_FILE:MSManifest> -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake ) + add_executable(MSManifestNone main.c) + set_property(TARGET MSManifestNone PROPERTY LINK_FLAGS "/MANIFEST:NO") endif() diff --git a/Tests/RunCMake/AutoExportDll/sub/sub.cxx b/Tests/RunCMake/AutoExportDll/sub/sub.cxx index 9766b41..9a3145e 100644 --- a/Tests/RunCMake/AutoExportDll/sub/sub.cxx +++ b/Tests/RunCMake/AutoExportDll/sub/sub.cxx @@ -1,4 +1,6 @@ +#include <stdio.h> int sub() { + printf(""); return 10; } diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt index 3d875ae..3cfa5d2 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt @@ -9,3 +9,15 @@ CMake Warning \(dev\) at CMP0054-WARN.cmake:3 \(if\): Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at CMP0054-WARN.cmake:5 \(elseif\): + Policy CMP0054 is not set: Only interpret if\(\) arguments as variables or + keywords when unquoted. Run "cmake --help-policy CMP0054" for policy + details. Use the cmake_policy command to set the policy and suppress this + warning. + + Quoted variables like "FOO" will no longer be dereferenced when the policy + is set to NEW. Since the policy is not set the OLD behavior will be used. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake b/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake index 37855fc..a608929 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake +++ b/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake @@ -2,4 +2,6 @@ set(FOO "BAR") if(NOT "FOO" STREQUAL "BAR") message(FATAL_ERROR "The given literals should match") +elseif("FOO" STREQUAL "BING") + message(FATAL_ERROR "The given literals should not match") endif() diff --git a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt index b1ebd49..5a8c263 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt @@ -10,3 +10,16 @@ CMake Warning \(dev\) at CMP0054-keywords-WARN.cmake:1 \(if\): Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it. ++ +CMake Warning \(dev\) at CMP0054-keywords-WARN.cmake:3 \(elseif\): + Policy CMP0054 is not set: Only interpret if\(\) arguments as variables or + keywords when unquoted. Run "cmake --help-policy CMP0054" for policy + details. Use the cmake_policy command to set the policy and suppress this + warning. + + Quoted keywords like "DEFINED" will no longer be interpreted as keywords + when the policy is set to NEW. Since the policy is not set the OLD + behavior will be used. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake index ee0a623..118ab3d 100644 --- a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake +++ b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake @@ -1,3 +1,5 @@ if("NOT" 1) message(FATAL_ERROR "[\"NOT\" 1] evaluated true") +elseif("DEFINED" NotDefined) + message(FATAL_ERROR "[\"DEFINED\" NotDefined] evaluated true") endif() diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index 7ea2a24..aef1086 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -10,47 +10,12 @@ function(run_cpack_test TEST_NAME types build) file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") # execute cmake - execute_process( - COMMAND "${CMAKE_COMMAND}" -DRunCMake_TEST=${TEST_NAME} - -DGENERATOR_TYPE=${TEST_TYPE} "${RunCMake_SOURCE_DIR}" - WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}" - RESULT_VARIABLE res - OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt" - ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt" - ) - - if(res) - run_cmake_command( - ${TEST_TYPE}/${TEST_NAME} - "${CMAKE_COMMAND}" - -DRunCMake_TEST_STEP=configure - -Dreturn_code=${res} - "-Dbin_dir=${RunCMake_TEST_BINARY_DIR}" - -P "${RunCMake_SOURCE_DIR}/PreTestError.cmake" - ) - return() - endif() + set(RunCMake_TEST_OPTIONS "-DGENERATOR_TYPE=${TEST_TYPE}") + run_cmake(${TEST_NAME}) # execute optional build step if(build) - execute_process( - COMMAND "${CMAKE_COMMAND}" --build "${RunCMake_TEST_BINARY_DIR}" - RESULT_VARIABLE res - OUTPUT_FILE "${RunCMake_TEST_BINARY_DIR}/test_output.txt" - ERROR_FILE "${RunCMake_TEST_BINARY_DIR}/test_error.txt" - ) - endif() - - if(res) - run_cmake_command( - ${TEST_TYPE}/${TEST_NAME} - "${CMAKE_COMMAND}" - -DRunCMake_TEST_STEP=build - -Dreturn_code=${res} - "-Dbin_dir=${RunCMake_TEST_BINARY_DIR}" - -P "${RunCMake_SOURCE_DIR}/PreTestError.cmake" - ) - return() + run_cmake_command(${TEST_NAME}-Build "${CMAKE_COMMAND}" --build "${RunCMake_TEST_BINARY_DIR}") endif() # execute cpack diff --git a/Tests/RunCMake/CPack/DEPENDENCIES.cmake b/Tests/RunCMake/CPack/DEPENDENCIES.cmake index 0aef925..4f6d65f 100644 --- a/Tests/RunCMake/CPack/DEPENDENCIES.cmake +++ b/Tests/RunCMake/CPack/DEPENDENCIES.cmake @@ -1,11 +1,13 @@ +set(CMAKE_BUILD_WITH_INSTALL_RPATH 1) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp" - "int test_lib();") + "int test_lib();\n") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp" - "#include \"test_lib.hpp\"\nint test_lib() {return 0;}") + "#include \"test_lib.hpp\"\nint test_lib() {return 0;}\n") add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp") file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp" - "#include \"test_lib.hpp\"\nint main() {return test_lib();}") + "#include \"test_lib.hpp\"\nint main() {return test_lib();}\n") add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") target_link_libraries(test_prog test_lib) diff --git a/Tests/RunCMake/CPack/PreTestError.cmake b/Tests/RunCMake/CPack/PreTestError.cmake deleted file mode 100644 index f88f2e8..0000000 --- a/Tests/RunCMake/CPack/PreTestError.cmake +++ /dev/null @@ -1,7 +0,0 @@ -file(READ "${bin_dir}/test_output.txt" output) -file(READ "${bin_dir}/test_error.txt" error) - -message(FATAL_ERROR "Error in pre-test phase '${RunCMake_TEST_STEP}'!\n" - "Return code: '${return_code}'\n" - "Info output: '${output}'\n" - "Error output: '${error}'") diff --git a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake index 00895cc..2bc3693 100644 --- a/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestCommandLine/RunCMakeTest.cmake @@ -78,6 +78,21 @@ endfunction() run_LabelCount() +function(run_SerialFailed) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SerialFailed) + set(RunCMake_TEST_NO_CLEAN 1) + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + file(WRITE "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" " +add_test(NoSuchCommand no_such_command) +set_tests_properties(NoSuchCommand PROPERTIES RUN_SERIAL ON) +add_test(Echo \"${CMAKE_COMMAND}\" -E echo \"EchoTest\") +") + + run_cmake_command(SerialFailed ${CMAKE_CTEST_COMMAND} -V) +endfunction() +run_SerialFailed() + function(run_TestLoad name load) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestLoad) set(RunCMake_TEST_NO_CLEAN 1) diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt new file mode 100644 index 0000000..45a4fb7 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-result.txt @@ -0,0 +1 @@ +8 diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt new file mode 100644 index 0000000..cafe565 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stderr.txt @@ -0,0 +1 @@ +Unable to find executable: no_such_command diff --git a/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt new file mode 100644 index 0000000..d7144f7 --- /dev/null +++ b/Tests/RunCMake/CTestCommandLine/SerialFailed-stdout.txt @@ -0,0 +1,10 @@ +Could not find executable no_such_command +.* +2/2 Test #2: Echo ............................. Passed +[0-9.]+ sec ++ +50% tests passed, 1 tests failed out of 2 ++ +Total Test time \(real\) = +[0-9.]+ sec ++ +The following tests FAILED: +[ ]+1 - NoSuchCommand \(Not Run\)$ diff --git a/Tests/RunCMake/find_program/DirsPerName-stdout.txt b/Tests/RunCMake/find_program/DirsPerName-stdout.txt index f763bb0..dc1c82b 100644 --- a/Tests/RunCMake/find_program/DirsPerName-stdout.txt +++ b/Tests/RunCMake/find_program/DirsPerName-stdout.txt @@ -1 +1,2 @@ -- PROG='[^']*/Tests/RunCMake/find_program/B/testB' +-- PROG_ABS='[^']*/Tests/RunCMake/find_program/A/testA' diff --git a/Tests/RunCMake/find_program/DirsPerName.cmake b/Tests/RunCMake/find_program/DirsPerName.cmake index 54db6dd..6db778d 100644 --- a/Tests/RunCMake/find_program/DirsPerName.cmake +++ b/Tests/RunCMake/find_program/DirsPerName.cmake @@ -4,3 +4,9 @@ find_program(PROG NO_DEFAULT_PATH ) message(STATUS "PROG='${PROG}'") + +find_program(PROG_ABS + NAMES ${CMAKE_CURRENT_SOURCE_DIR}/A/testA + NO_DEFAULT_PATH + ) +message(STATUS "PROG_ABS='${PROG_ABS}'") diff --git a/Tests/RunCMake/find_program/NamesPerDir-stdout.txt b/Tests/RunCMake/find_program/NamesPerDir-stdout.txt index 964e259..fd79185 100644 --- a/Tests/RunCMake/find_program/NamesPerDir-stdout.txt +++ b/Tests/RunCMake/find_program/NamesPerDir-stdout.txt @@ -1 +1,2 @@ -- PROG='[^']*/Tests/RunCMake/find_program/A/testA' +-- PROG_ABS='[^']*/Tests/RunCMake/find_program/A/testA' diff --git a/Tests/RunCMake/find_program/NamesPerDir.cmake b/Tests/RunCMake/find_program/NamesPerDir.cmake index 49ce49d..5f00a28 100644 --- a/Tests/RunCMake/find_program/NamesPerDir.cmake +++ b/Tests/RunCMake/find_program/NamesPerDir.cmake @@ -4,3 +4,9 @@ find_program(PROG NO_DEFAULT_PATH ) message(STATUS "PROG='${PROG}'") + +find_program(PROG_ABS + NAMES ${CMAKE_CURRENT_SOURCE_DIR}/A/testA NAMES_PER_DIR + NO_DEFAULT_PATH + ) +message(STATUS "PROG_ABS='${PROG_ABS}'") diff --git a/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt index 3ee1855..f68e38e 100644 --- a/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt +++ b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt @@ -35,12 +35,12 @@ add_library(hello SHARED hello.f) add_library(world SHARED world.f) target_link_libraries(hello world) if(CMAKE_Fortran_COMPILER_ID MATCHES SunPro) - target_link_libraries(hello fsu) + target_link_libraries(hello PRIVATE fsu) if(CMAKE_Fortran_PLATFORM_ID MATCHES SunOS) - target_link_libraries(hello sunmath m) + target_link_libraries(hello PRIVATE sunmath m) test_sunquad(CMAKE_HAS_SUNQUAD) if(CMAKE_HAS_SUNQUAD) - target_link_libraries(hello sunquad) + target_link_libraries(hello PRIVATE sunquad) endif() endif() endif() diff --git a/Tests/VSWinStorePhone/CMakeLists.txt b/Tests/VSWinStorePhone/CMakeLists.txt index 8357d5f..ae82755 100644 --- a/Tests/VSWinStorePhone/CMakeLists.txt +++ b/Tests/VSWinStorePhone/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.0) project(VSWinStorePhone) - -if(MSVC_VERSION GREATER 1700) +if(MSVC_VERSION GREATER 1899) + set(COMPILER_VERSION "14") +elseif(MSVC_VERSION GREATER 1700) set(COMPILER_VERSION "12") elseif(MSVC_VERSION GREATER 1600) set(COMPILER_VERSION "11") @@ -91,6 +92,7 @@ elseif (NOT "${PLATFORM}" STREQUAL "DESKTOP") set(ASSET_FILES ${ASSET_FILES} Direct3DApp1/Assets/Logo.png Direct3DApp1/Assets/SmallLogo.png + Direct3DApp1/Assets/SmallLogo44x44.png Direct3DApp1/Assets/SplashScreen.png Direct3DApp1/Assets/StoreLogo.png ) @@ -124,4 +126,15 @@ source_group("Resource Files" FILES ${RESOURCE_FILES}) add_executable(${EXE_NAME} WIN32 ${SOURCE_FILES} ${HEADER_FILES} ${RESOURCE_FILES}) set_property(TARGET ${EXE_NAME} PROPERTY VS_WINRT_COMPONENT TRUE) + +string(SUBSTRING "${CMAKE_SYSTEM_VERSION}" 0, 4, SHORT_VERSION) + +if("${SHORT_VERSION}" STREQUAL "10.0") + message(STATUS "Targeting Windows 10. Setting Extensions to version ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") + set_property(TARGET ${EXE_NAME} PROPERTY VS_DESKTOP_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") + set_property(TARGET ${EXE_NAME} PROPERTY VS_MOBILE_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") + set_property(TARGET ${EXE_NAME} PROPERTY VS_IOT_EXTENSIONS_VERSION "${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}") +endif() + + target_link_libraries(${EXE_NAME} d3d11) diff --git a/Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.png b/Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.png Binary files differnew file mode 100644 index 0000000..28810b7 --- /dev/null +++ b/Tests/VSWinStorePhone/Direct3DApp1/Assets/SmallLogo44x44.png diff --git a/Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in b/Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in new file mode 100644 index 0000000..6b27ab7 --- /dev/null +++ b/Tests/VSWinStorePhone/cmake/Package_vc14.store.appxmanifest.in @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<Package + xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" + xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" + xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" + IgnorableNamespaces="uap mp"> + + <Identity Name="@PACKAGE_GUID@" Publisher="CN=mgong" Version="1.1.0.0" /> + <mp:PhoneIdentity PhoneProductId="@PACKAGE_GUID@" PhonePublisherId="00000000-0000-0000-0000-000000000000"/> + + <Properties> + <DisplayName>@SHORT_NAME@</DisplayName> + <PublisherDisplayName>mgong</PublisherDisplayName> + <Logo>Assets/StoreLogo.png</Logo> + </Properties> + + <Dependencies> + <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.65535.65535" /> + </Dependencies> + + <Resources> + <Resource Language="x-generate" /> + </Resources> + <Applications> + <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="@SHORT_NAME@.App"> + <uap:VisualElements + DisplayName="@SHORT_NAME@" + Description="@SHORT_NAME@" + BackgroundColor="#336699" + Square150x150Logo="Assets/Logo.png" + Square44x44Logo="Assets/SmallLogo44x44.png"> + <uap:SplashScreen Image="Assets/SplashScreen.png" /> + </uap:VisualElements> + </Application> + </Applications> +</Package> diff --git a/Utilities/Release/dash2win64_release.cmake b/Utilities/Release/dash2win64_release.cmake index 25acc17..ecfd7c5 100644 --- a/Utilities/Release/dash2win64_release.cmake +++ b/Utilities/Release/dash2win64_release.cmake @@ -1,6 +1,6 @@ set(CMAKE_RELEASE_DIRECTORY "c:/cygwin/home/dashboard/CMakeReleaseDirectory") set(CONFIGURE_WITH_CMAKE TRUE) -set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake\\ 2.8/bin/cmake.exe") +set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake/bin/cmake.exe") set(PROCESSORS 8) set(HOST dash2win64) set(CPACK_BINARY_GENERATORS "NSIS ZIP") diff --git a/Utilities/Release/upload_release.cmake b/Utilities/Release/upload_release.cmake index ac41300..171811a 100644 --- a/Utilities/Release/upload_release.cmake +++ b/Utilities/Release/upload_release.cmake @@ -1,6 +1,6 @@ set(CTEST_RUN_CURRENT_SCRIPT 0) if(NOT VERSION) - set(VERSION 3.3) + set(VERSION 3.4) endif() if(NOT DEFINED PROJECT_PREFIX) set(PROJECT_PREFIX cmake-${VERSION}) |