summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorChristian Pfeiffer <cpfeiffer@live.de>2017-08-16 13:13:00 (GMT)
committerChristian Pfeiffer <cpfeiffer@live.de>2017-08-23 16:49:37 (GMT)
commit8444252fbfe48374b485b66740708fd14a984463 (patch)
treed05b6d74e0850cd71e548c929fc69c811c324ca6 /Modules
parentfa664d9863c559f977c20f7b681ee141a1481e16 (diff)
downloadCMake-8444252fbfe48374b485b66740708fd14a984463.zip
CMake-8444252fbfe48374b485b66740708fd14a984463.tar.gz
CMake-8444252fbfe48374b485b66740708fd14a984463.tar.bz2
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 1a4e268..096287c 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -56,6 +56,13 @@
# Specify the :command:`install(PROGRAMS)` command ``COMPONENT``
# option. If not specified, no such option will be used.
+set(_IRSL_HAVE_MSVC FALSE)
+foreach(LANG IN ITEMS C CXX)
+ if(CMAKE_${LANG}_COMPILER_ID STREQUAL MSVC)
+ set(_IRSL_HAVE_MSVC TRUE)
+ endif()
+endforeach()
+
if(MSVC)
file(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
@@ -487,7 +494,7 @@ if(MSVC)
# MSVC 8 was the first version with OpenMP
# Furthermore, there is no debug version of this
- if(CMAKE_INSTALL_OPENMP_LIBRARIES)
+ if(CMAKE_INSTALL_OPENMP_LIBRARIES AND _IRSL_HAVE_MSVC)
if(MSVC_VERSION EQUAL 1911)
set(_MSOMP_DLL_VERSION 140)
set(_MSOMP_IDE_VERSION 15)