Call the generator "Visual Studio 14" without any year because this
version of VS does not provide a year in the product name.
Copy cmGlobalVisualStudio12Generator to cmGlobalVisualStudio14Generator
and update version numbers accordingly. Add the VS14 enumeration value.
Teach the platform module Windows-MSVC to set MSVC14 and document the
variable. Teach module InstallRequiredSystemLibraries to look for the VS
14 runtime libraries.
Teach tests CheckCompilerRelatedVariables, VSExternalInclude, and
RunCMake.GeneratorToolset to treat VS 14 as they do VS 10, 11, and 12.
Co-Author: Pawel Stopinski <diokhan@go2.pl>
To be able to include InstallRequiredSystemLibraries more than once
(e.g. to get the Debug and Release libraries separately), clear the
internal library list for non-matching configuration.
The MBCS (Multi-Byte Character Set) has been deprecated with VS 2013,
and MSVC no longer ships with an MBCS-version of MFC by default.
However, it can be downloaded as an add-on.
Teach InstallRequiredSystemLibraries to install the MBCS MFC only
for VS < 12 or if it happens to exist on the system.
Distinguish "Open Watcom" from old "Watcom" by introducing a new
"OpenWatcom" compiler id. The __WATCOMC__ format is "VVRP" for Watcom
and "VVRP + 1100" for Open Watcom.
In InstallRequiredSystemLibraries the version number for RTDLL can be
calculated from the compiler version. This will support current and
future OW versions without updating the module again.
Copy cmGlobalVisualStudio11Generator to cmGlobalVisualStudio12Generator
and update version numbers accordingly. Add the VS12 enumeration value.
Add module CMakeVS12FindMake to find MSBuild. Look for MSBuild in its
now-dedicated Windows Registry entry. Teach the platform module
Windows-MSVC to set MSVC12 and document the variable. Teach module
InstallRequiredSystemLibraries to look for the VS 12 runtime libraries.
Teach tests CheckCompilerRelatedVariables, Preprocess, VSExternalInclude,
and RunCMake.GeneratorToolset to treat VS 12 as they do VS 10 and 11.
Inspired-by: Minmin Gong <minmin.gong@gmail.com>
The Spanish language MFC localization dll changed names from
VS 9 to 10. Use the correct file name ending with "esn.dll"
instead of the now non-existent one ending with "esp.dll"
Also, add the existing, but missing from our rules until now,
Russian language module.
Alphabetize the list while we're at it for easier reading in
the future.
We may want to consider adding some file(GLOB code here to
minimize the risk of missing files added in future versions
of VS.
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
The parent commit added a warning message whenever a required file
does not exist.
As it turns out, the "required" files never exist when built with
Visual Studio Express editions. Add a variable to suppress these
warning messages because only packagers or naive includers of
this file will care to see such warning messages.
We want to warn about this condition by default so that people who
are using InstallRequiredSystemLibraries without understanding it
fully will have a chance of understanding why it's not working in
the event of missing required files.
But we also want to give projects the ability to suppress this warning
(by "project's choice default") so that they can encourage users who
are restricted to using an Express edition to build their project.
Packagers should explicitly use...
-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS=OFF
...when building releases. That way, their release build process will warn
them about any missing files, but only if their project CMakeLists files
use a construct similar to CMake's:
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
ENDIF()
Thanks to "J Decker" on the CMake mailing list for pointing out
that one of the MSVC10_CRT_DIR settings was using "VC90" instead
of "VC100".
After fixing that, I added the code to generate a CMake warning
if one of the files we think is "required" does not exist.
Then, with VS10, there were several other problems that the
warning revealed:
- MSVC10_REDIST_DIR needed more PATHS to be found correctly
- the 64-bit directory is named "x64" now, not "amd64" as in
previous VS versions
- manifest files no longer exist as separate files in the
redist subdirectories (they must be built-in as resources
to the dlls...?)
Add support to InstallRequiredSystemLibraries to only install
debug libraries when both debug and release versions are available.
This is as if you are building a debug package then only the debug
versions are needed but not the release.
InstallRequiredSystemLibraries currently defaults to installing to
bin on WIN32 and lib otherwise. This patch allows you to configure
this by using the variable CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION.
It also switches the logic to use a single INSTALL(PROGRAMS) command
rather than two deprecated uses of the INSTALL_PROGRAMS command.
In InstallRequiredSystemLibraries the documentation details the
variable CMAKE_SKIP_INSTALL_RULES to skip installation. This
actually doesn't do anything, the variable required is named
CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP. This commit amends the
documentation to point to the correct variable.
This adds copyright/license notification blocks CMake's non-find
modules. Most of the modules had no notices at all. Some had notices
referring to the BSD license already. This commit normalizes existing
notices and adds missing notices.