diff options
99 files changed, 1016 insertions, 406 deletions
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/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..495391a --- /dev/null +++ b/Help/release/3.4.rst @@ -0,0 +1,269 @@ +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. 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-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/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in index c72e338..a1bfc70 100644 --- a/Modules/CMakeCCompiler.cmake.in +++ b/Modules/CMakeCCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@") set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@") set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@") set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@") +set(CMAKE_C_COMPILER_LINKS_STATICALLY "@CMAKE_C_COMPILER_LINKS_STATICALLY@") set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@") set(CMAKE_C90_COMPILE_FEATURES "@CMAKE_C90_COMPILE_FEATURES@") diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index d2417aa..0d102a1 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -75,6 +75,10 @@ if(CMAKE_C_SIZEOF_DATA_PTR) unset(CMAKE_C_ABI_FILES) endif() +if(CMAKE_C_COMPILER_LINKS_STATICALLY) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +endif() + # This should be included before the _INIT variables are # used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in index 52e44f6..4218a6d 100644 --- a/Modules/CMakeCXXCompiler.cmake.in +++ b/Modules/CMakeCXXCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@") set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@") set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@") set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@") +set(CMAKE_CXX_COMPILER_LINKS_STATICALLY "@CMAKE_CXX_COMPILER_LINKS_STATICALLY@") set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@") set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@") set(CMAKE_CXX98_COMPILE_FEATURES "@CMAKE_CXX98_COMPILE_FEATURES@") diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index 091627b..dad7969 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -74,6 +74,10 @@ if(CMAKE_CXX_SIZEOF_DATA_PTR) unset(CMAKE_CXX_ABI_FILES) endif() +if(CMAKE_CXX_COMPILER_LINKS_STATICALLY) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +endif() + # This should be included before the _INIT variables are # used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index df6daf3..2e74100 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -106,6 +106,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY "${CMAKE_${lang}_COMPILER_LINKS_STATICALLY}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) @@ -209,6 +210,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() @@ -529,6 +533,13 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) endif() endif() + if(UNIX) + execute_process(COMMAND file "${file}" OUTPUT_VARIABLE out ERROR_VARIABLE out) + if(out MATCHES "statically linked") + set(CMAKE_${lang}_COMPILER_LINKS_STATICALLY 1 PARENT_SCOPE) + endif() + endif() + # Check if a valid compiler and platform were found. if(COMPILER_ID AND NOT COMPILER_ID_TWICE) set(CMAKE_${lang}_COMPILER_ID "${COMPILER_ID}") 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/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in index 14fdd60..6b984e5 100644 --- a/Modules/CMakeFortranCompiler.cmake.in +++ b/Modules/CMakeFortranCompiler.cmake.in @@ -2,6 +2,7 @@ set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@") set(CMAKE_Fortran_COMPILER_ARG1 "@CMAKE_Fortran_COMPILER_ARG1@") set(CMAKE_Fortran_COMPILER_ID "@CMAKE_Fortran_COMPILER_ID@") set(CMAKE_Fortran_COMPILER_VERSION "@CMAKE_Fortran_COMPILER_VERSION@") +set(CMAKE_Fortran_COMPILER_LINKS_STATICALLY "@CMAKE_Fortran_COMPILER_LINKS_STATICALLY@") set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 79393d3..aa48df7 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -51,6 +51,10 @@ if(CMAKE_Fortran_SIZEOF_DATA_PTR) unset(CMAKE_Fortran_ABI_FILES) endif() +if(CMAKE_Fortran_COMPILER_LINKS_STATICALLY) + set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE) +endif() + # This should be included before the _INIT variables are # used to initialize the cache. Since the rule variables # have if blocks on them, users can still define them here. 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/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/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 eb53118..aaef212 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 20150929) -#set(CMake_VERSION_RC 1) +set(CMake_VERSION_MINOR 4) +set(CMake_VERSION_PATCH 0) +set(CMake_VERSION_RC 1) 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/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/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/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f4de0f2..3230403 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1542,7 +1542,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries, this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); // Flags to link an executable to shared libraries. - if( tgt.GetType() == cmTarget::EXECUTABLE ) + if (tgt.GetType() == cmTarget::EXECUTABLE && + this->StateSnapshot.GetState()-> + GetGlobalPropertyAsBool("TARGET_SUPPORTS_SHARED_LIBS")) { bool add_shlib_flags = false; switch(tgt.Target->GetPolicyStatusCMP0065()) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index c70756a..077470d 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); } 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..2395ce7 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); @@ -1307,6 +1309,7 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf) { tool = "XML"; } + if(this->NsightTegra) { // Nsight Tegra needs specific file types to check up-to-dateness. @@ -2590,7 +2593,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 +2665,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 +2900,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 +3105,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 +3117,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 +3149,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 +3180,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 +3264,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 +3298,10 @@ void cmVisualStudio10TargetGenerator::WriteMissingFiles() { this->WriteMissingFilesWS81(); } + else if (cmHasLiteralPrefix(v, "10.0")) + { + this->WriteMissingFilesWS10_0(); + } } } @@ -3409,6 +3563,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 +3644,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 +3695,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/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 80289b8..262af27 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -408,6 +408,7 @@ class SystemToolsPathCaseMap: // adds the elements of the env variable path to the arg passed in void SystemTools::GetPath(std::vector<std::string>& path, const char* env) { + size_t const old_size = path.size(); #if defined(_WIN32) && !defined(__CYGWIN__) const char pathSep = ';'; #else @@ -445,7 +446,7 @@ void SystemTools::GetPath(std::vector<std::string>& path, const char* env) done = true; } } - for(std::vector<std::string>::iterator i = path.begin(); + for(std::vector<std::string>::iterator i = path.begin() + old_size; i != path.end(); ++i) { SystemTools::ConvertToUnixSlashes(*i); diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx index e14d2fc..a0f904f 100644 --- a/Source/kwsys/testSystemTools.cxx +++ b/Source/kwsys/testSystemTools.cxx @@ -28,6 +28,7 @@ #include <testSystemTools.h> #include <iostream> +#include <sstream> #include <string.h> /* strcmp */ #if defined(_WIN32) && !defined(__CYGWIN__) # include <io.h> /* _umask (MSVC) / umask (Borland) */ @@ -790,6 +791,66 @@ static bool CheckCollapsePath() return res; } +static std::string StringVectorToString(const std::vector<std::string>& vec) +{ + std::stringstream ss; + ss << "vector("; + for (std::vector<std::string>::const_iterator i = vec.begin(); + i != vec.end(); ++i) + { + if (i != vec.begin()) + { + ss << ", "; + } + ss << *i; + } + ss << ")"; + return ss.str(); +} + +static bool CheckGetPath() +{ + const char* envName = "S"; +#ifdef _WIN32 + const char* envValue = "C:\\Somewhere\\something;D:\\Temp"; +#else + const char* envValue = "/Somewhere/something:/tmp"; +#endif + const char* registryPath = "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MyApp; MyKey]"; + + std::vector<std::string> originalPathes; + originalPathes.push_back(registryPath); + + std::vector<std::string> expectedPathes; + expectedPathes.push_back(registryPath); +#ifdef _WIN32 + expectedPathes.push_back("C:/Somewhere/something"); + expectedPathes.push_back("D:/Temp"); +#else + expectedPathes.push_back("/Somewhere/something"); + expectedPathes.push_back("/tmp"); +#endif + + bool res = true; + res &= CheckPutEnv(std::string(envName) + "=" + envValue, envName, envValue); + + std::vector<std::string> pathes = originalPathes; + kwsys::SystemTools::GetPath(pathes, envName); + + if (pathes != expectedPathes) + { + std::cerr << + "GetPath(" << StringVectorToString(originalPathes) << + ", " << envName << ") yielded " << StringVectorToString(pathes) << + " instead of " << StringVectorToString(expectedPathes) << + std::endl; + res = false; + } + + res &= CheckUnPutEnv(envName, envName); + return res; +} + //---------------------------------------------------------------------------- int testSystemTools(int, char*[]) { @@ -825,5 +886,7 @@ int testSystemTools(int, char*[]) res &= CheckCollapsePath(); + res &= CheckGetPath(); + return res ? 0 : 1; } 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/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/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}) |