Commit Graph

89 Commits

Author SHA1 Message Date
Torgeir Rusten
f332ce12d6 IRSL: Fix path to Intel 32-bit redist libraries
The path to the 32 bit libraries in the Intel windows/redist folder use
ia32.  I don't remember if this has changed at some point, but ia32 has
been used at least since Intel Fortran XE 2018.
2020-07-09 06:29:40 -04:00
Brad King
7ca923bcaf IRSL: Install msvcp140_{1,2,codecvt_ids}.dll if available
VS now distributes these additional runtime libraries.  Install them if
available.

Fixes: #20228
2020-01-20 13:19:56 -05:00
Brad King
ecbf6546d7 IRSL: Install vcruntime140_1.dll if available
VS 2019 now distributes this additional runtime DLL with its `14.2x`
toolsets.

Fixes: #19829
2019-10-11 12:05:51 -04:00
Brad King
2eecd1c3bc IRSL: Prefer MSVC runtime libraries from newest toolset first 2019-10-11 11:57:39 -04:00
James Butler
13c3ec545b IRSL: Fix discovery of VS 2019 v141 toolset redistributables
Since VS 2019, the v141 toolset redistributables can be found in
either the VS 2019 or VS 2017 install directory. Update the logic
to search multiple versions of VS.

Fixes: #19488
2019-07-22 10:06:45 -04:00
James Butler
0484165da0 IRSL: Fix typo in v143 toolset version check
Fix the toolset v143 check from commit 33ee779330 (IRSL: Fix discovery
of VS 2019 v142 toolset redistributables, 2019-04-03, v3.14.2~6^2) to
check the correct variable.
2019-07-22 10:06:44 -04:00
Brad King
a0b6448c85 IRSL: Update redist directory for VS 2019 update 1
VS 2019 Update 1 will fix its redist directories to be named `VC142`
instead of `VC141`.  It will also use cl `19.21` instead of `19.20`
so we can use that to distinguish the versions.

Fixes: #19131
2019-04-15 10:59:02 -04:00
Brad King
33ee779330 IRSL: Fix discovery of VS 2019 v142 toolset redistributables
Since VS 2017's v141 toolset there is no longer a simple equation to
calculate the redist name, dll version, and VS IDE version from just the
MSVC toolset version.  Refactor the logic to use hard-coded values and
warn when a new version is not supported.

Fixes: #19125
2019-04-04 11:35:38 -04:00
Brad King
4b94f3420c Merge topic 'irsl-ucrt-version'
01c7d9ce86 IRSL: Detect versioned Windows Universal CRT directories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2637
2018-11-20 09:25:03 -05:00
Brad King
01c7d9ce86 IRSL: Detect versioned Windows Universal CRT directories
Windows SDK version 10.0.17763.0 now places the uCRT libraries in a
versioned directory.

Fixes: #18603
2018-11-19 13:31:40 -05:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
luz.paz
6b4c5a0365 Fix misc. typos
Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"`
where the whitelist consists of

```
aci
ans
behaviour
buil
convertor
dum
earch
ect
emmited
emmitted
helpfull
iff
isnt
ith
lowercased
mose
nd
nknown
nto
objext
ot
pathes
pevents
splitted
substract
superceded
supercedes
te
tim
todays
uint
upto
whitespaces
```
2018-10-03 15:32:46 -04:00
Brad King
6e39697ad5 Merge topic 'irsl-fortran-only-linux'
05ece372a6 IRSL: Fix Intel library list for ifort-only setups

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2061
2018-05-14 09:35:34 -04:00
Christian Pfeiffer
05ece372a6 IRSL: Fix Intel library list for ifort-only setups
Fixes: #17727
2018-05-11 09:45:07 -04:00
Brad King
423de692f9 Merge topic 'InstallRequiredSystemLibraries-mfcm'
bdf660cab5 InstallRequiredSystemLibraries: Check for existence of mfcm dlls

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1980
2018-04-19 08:24:40 -04:00
Christof Krüger
bdf660cab5 InstallRequiredSystemLibraries: Check for existence of mfcm dlls
Previously, only existence of `mfc${v}.dll` and `mfc${v}d.dll` variants
was checked and it was assumed that the managed variants `mfcm*.dll`
also existed.  This assumption doesn't hold with Visual Studio 2017.
Check each file separately.

Fixes: #17913
2018-04-18 09:18:57 -04:00
Arkady Shapkin
45bf6f6246 Modules: Use MSVC_TOOLSET_VERSION variable to simplify logic 2018-04-04 13:21:16 -04:00
Brad King
671958d288 Merge topic 'irsl-intel-fortran-only-fix'
7d1ed84c IRSL: Skip libgfxoffload if no Intel C++ is used

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1589
2017-12-14 08:18:53 -05:00
Brad King
f0b3fab179 Merge topic 'irsl-msvc-omp-fix'
4dae55fb IRSL: Fix MSVC variable deferencing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1588
2017-12-13 07:50:52 -05:00
Christian Pfeiffer
4dae55fb70 IRSL: Fix MSVC variable deferencing
Fixes: #17529
2017-12-12 15:16:38 +01:00
Christian Pfeiffer
7d1ed84cea IRSL: Skip libgfxoffload if no Intel C++ is used
`libgfxoffload` is only used and installed by the Intel C/C++ compilers
and will be unavailable if only Intel Fortran has been installed.

Fixes: #17550
2017-12-12 14:43:08 +01:00
Christian Pfeiffer
8e7e7af5c8 IRSL: Install the 1041 folder for Intel compilers
The presence of the `1041` seems to solely depend on whether a given
Intel compiler release was available in Japanese or not. Install it if
it is present and silently ignore it otherwise.

Example: The Intel 2018.0 release did not ship it, but the 2018.1
compilers have it.
2017-11-20 16:35:02 +01:00
Christian Pfeiffer
f6994f436c IRSL: Add support for the 2018 release on Windows.
Fixes: #17421
2017-11-06 14:10:45 -05:00
Brad King
6dd0a593d9 Merge branch 'backport-irsl-vs15-future' into irsl-vs15-future 2017-09-06 11:37:30 -04:00
Brad King
1dd2c08b19 InstallRequiredSystemLibraries: Add support for future VS 2017 toolchains
Assume that all cl 19.xx versions will use the same runtime DLL pattern.

Suggested-by: Tomasz Słodkowicz <slodki@users.noreply.github.com>
2017-09-06 11:36:47 -04:00
Christian Pfeiffer
fd4406f33e IRSL: Add Intel compiler support
Fixes: #16891
Fixes: #9903
2017-08-30 19:24:59 +02:00
Christian Pfeiffer
8444252fbf IRSL: Install VC++ OpenMP libraries only for MSVC
At the moment, the Visual C++ OpenMP libraries will be installed for all
compilers simulating MSVC. They should however only be provided if we're
dealing with actual MSVC.
2017-08-23 18:49:37 +02:00
Brad King
23cf9e152f InstallRequiredSystemLibraries: Find VS 2017 Update 3 redist directory
Add compiler version 19.11 to our table.

Fixes: #17184
2017-08-21 11:59:33 -04:00
Brad King
b45d8432c2 InstallRequiredSystemLibraries: Factor redist name into variable
Store the `VC###` component of the `Microsoft.VC###.CRT` directory name
in a variable set based on the toolchain version.  Its naming convention
is changed by VS 15.3.
2017-08-21 11:59:31 -04:00
Brad King
fee011946e VS: Add an environment variable for the Windows 10 kits directory
Define a `CMAKE_WINDOWS_KITS_10_DIR` environment variable to allow
users to tell CMake about a custom Windows 10 SDK directory.  We
choose to make this an environment variable rather than a CMake
variable or cache entry because:

* Using a custom directory also requires custom external MSBuild
  configuration.  Therefore users are already configuring a
  custom environment.

* The custom directory must be set consistently in all parts of
  a build including nested projects.  An environment variable
  avoids requiring users to thread the setting into nested builds.

Fixes: #16743
2017-04-12 10:57:05 -04:00
Brad King
6eb609fd59 InstallRequiredSystemLibraries: Find VS 2017 redist directory
Use our undocumented `cmake_host_system_information` query to find the
VS 2017 installation directory by asking the VS installer tool.  Then
look relative to that for the redist directory.

Fixes: #16737
2017-03-27 11:43:01 -04:00
Brad King
082c0375d9 InstallRequiredSystemLibraries: Split VS 2017 search paths
VS 2017 does not have the same registry entries or other paths we
search for other VS versions.  Split the search code paths to treat
it separately.
2017-03-27 11:43:01 -04:00
Brad King
d4a693a083 InstallRequiredSystemLibraries: Add support for VS 2017
VS 2017 (VS 15) places its redist DLLs in `Microsoft.VC150.*`
directories but still uses version number `140` in the DLL names.  The
redist directories now have version numbers in their name, and the MSVC
and MFC runtime DLLs may be in directories with different versions.
Fill out our logic to handle this.

For now assume we are given the `MSVC_REDIST_DIR` value as a cache
entry.  Unfortunately we cannot yet find the VS 2017 MSVC redist
directory automatically since there is no registry entry for the VS
installation.  Later we will have to use `cmVSSetupHelper` for this.

Issue: #16735
2017-03-23 10:30:14 -04:00
Brad King
5ed4e48128 InstallRequiredSystemLibraries: Split MFC redist dir variable 2017-03-23 10:26:52 -04:00
Brad King
dbdb880af9 InstallRequiredSystemLibraries: Split VS IDE and DLL versions
Refactor MSVC logic to split the IDE and DLL version variables.
2017-03-23 10:14:50 -04:00
Brad King
a2aad448e1 InstallRequiredSystemLibraries: Drop version from variable names
Each `MSVC${v}_*_DIR` variable is only ever used with one value for
`${v}` within a given build tree.  Drop the `${v}` version component
from the variable names.
2017-03-22 15:58:40 -04:00
Brad King
16eb58d503 InstallRequiredSystemLibraries: Refactor to avoid macros
For a given `MSVC_VERSION` our macros were each called at most once.
Replace them with a single code path that is parameterized over what
was the macro argument.
2017-03-22 15:48:34 -04:00
Brad King
a259e8db8f InstallRequiredSystemLibraries: Use MSVC_VERSION instead of MSVC##
Issue: #16735
2017-03-22 12:50:10 -04:00
Brad King
e31986b900 Merge topic 'InstallRequiredSystemLibraries-UCRT-configs'
e0ed1de4 InstallRequiredSystemLibraries: Distinguish UCRT install configurations
2017-01-12 10:21:56 -05:00
Bjoern Thiel
e0ed1de4fb InstallRequiredSystemLibraries: Distinguish UCRT install configurations
Teach the `CMAKE_INSTALL_UCRT_LIBRARIES` feature to honor the
`CMAKE_INSTALL_DEBUG_LIBRARIES_ONLY` and `CMAKE_INSTALL_DEBUG_LIBRARIES`
settings.

Closes: #16542
2017-01-11 11:20:47 -05:00
Taylor Braun-Jones
3578e86272 InstallRequiredSystemLibraries: Add concrt*.dll for VC >= 14.0
Fixes #16513
2016-12-16 18:02:48 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Brad King
dab3ccf294 InstallRequiredSystemLibraries: Document UCRT option use case
Suggested-by: Hendrik Sattler <post@hendrik-sattler.de>
2016-06-30 08:54:46 -04:00
Brad King
6b0b066074 InstallRequiredSystemLibraries: Optionally install Windows UCRT (#16073) 2016-05-12 11:10:23 -04:00
Brad King
bbf8c03b4f InstallRequiredSystemLibraries: Fix ENV{ProgramFiles(x86)} reference
The fix in commit v3.1.0-rc1~544^2~5 (Windows: Avoid () in environment
variable references, 2014-05-02) introduced a set() command in the
middle of an argument list.  Move it to before the find_path() call.
2016-05-12 11:08:40 -04:00
Brad King
2d02986b7c Merge topic 'InstallRequiredSystemLibraries-vs2015'
9b2778d4 InstallRequiredSystemLibraries: Update for VS 2015 (#15552)
2015-05-05 09:35:25 -04:00
Brad King
9b2778d412 InstallRequiredSystemLibraries: Update for VS 2015 (#15552)
The part of the MS C Runtime library that applications need to
distribute has been renamed from "msvcr*.dll" to "vcruntime*.dll"
starting with VS 2015.  See the Visual C++ Team Blog:

 Introducing the Universal CRT
 http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx
2015-05-04 12:36:12 -04:00
Bjoern Thiel
ff183986df InstallRequiredSystemLibraries: Fix MBCS MFC detection (#15531)
Fix the logic added by commit v3.0.0-rc5~9^2
(InstallRequiredSystemLibraries: MBCS MFC is optional on VS 12,
2014-05-06).  Do not test content of MSVC${v}_MFC_DIR until after the
variable is set.
2015-04-27 10:09:38 -04:00
Johan Andruejol
e97141c2bc InstallRequiredSystemLibraries: Add option to specify install COMPONENT
Previously the module did not support projects using installation
components because install(PROGRAMS) was never called with COMPONENT.
Add an option to specify the COMPONENT so that projects doing this do
not have to resort to using CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP and
writing the install rule by hand.
2015-03-03 09:17:47 -05:00
Brad King
d6a320ab5e InstallRequiredSystemLibraries: Format documentation 2015-03-03 09:14:29 -05:00