summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBoost.cmake2
-rw-r--r--Modules/FindCUDA.cmake14
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake4
-rw-r--r--Modules/FindJPEG.cmake2
-rw-r--r--Modules/FindOpenMP.cmake5
-rw-r--r--Modules/FindQt4.cmake3
-rw-r--r--Modules/FindVTK.cmake112
-rw-r--r--Modules/InstallRequiredSystemLibraries.cmake8
-rw-r--r--Modules/Platform/Windows-MSVC.cmake5
9 files changed, 46 insertions, 109 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index dfd4460..0eec4ad 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -383,6 +383,8 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
else()
set (_boost_COMPILER "-il")
endif()
+ elseif (MSVC14)
+ set(_boost_COMPILER "-vc140")
elseif (MSVC12)
set(_boost_COMPILER "-vc120")
elseif (MSVC11)
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index d9809ad..9348aa5 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -452,7 +452,17 @@ set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple arguments.")
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(CUDA_HOST_COMPILER "$(VCInstallDir)bin" CACHE FILEPATH "Host side compiler used by NVCC")
else()
- set(CUDA_HOST_COMPILER "${CMAKE_C_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC")
+ # Using cc which is symlink to clang may let NVCC think it is GCC and issue
+ # unhandled -dumpspecs option to clang. Also in case neither
+ # CMAKE_C_COMPILER is defined (project does not use C language) nor
+ # CUDA_HOST_COMPILER is specified manually we should skip -ccbin and let
+ # nvcc use its own default C compiler.
+ if(DEFINED CMAKE_C_COMPILER AND NOT DEFINED CUDA_HOST_COMPILER)
+ get_filename_component(c_compiler_realpath "${CMAKE_C_COMPILER}" REALPATH)
+ else()
+ set(c_compiler_realpath "")
+ endif()
+ set(CUDA_HOST_COMPILER "${c_compiler_realpath}" CACHE FILEPATH "Host side compiler used by NVCC")
endif()
# Propagate the host flags to the host compiler via -Xcompiler
@@ -1422,7 +1432,7 @@ function(CUDA_LINK_SEPARABLE_COMPILATION_OBJECTS output_file cuda_target options
# If -ccbin, --compiler-bindir has been specified, don't do anything. Otherwise add it here.
list( FIND nvcc_flags "-ccbin" ccbin_found0 )
list( FIND nvcc_flags "--compiler-bindir" ccbin_found1 )
- if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
+ if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
list(APPEND nvcc_flags -ccbin "\"${CUDA_HOST_COMPILER}\"")
endif()
# Create a list of flags specified by CUDA_NVCC_FLAGS_${CONFIG}
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index f0aac84..58e0d31 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -62,7 +62,7 @@ set(cmake_dependency_file "@cmake_dependency_file@") # path
set(CUDA_make2cmake "@CUDA_make2cmake@") # path
set(CUDA_parse_cubin "@CUDA_parse_cubin@") # path
set(build_cubin @build_cubin@) # bool
-set(CUDA_HOST_COMPILER "@CUDA_HOST_COMPILER@") # bool
+set(CUDA_HOST_COMPILER "@CUDA_HOST_COMPILER@") # path
# We won't actually use these variables for now, but we need to set this, in
# order to force this file to be run again if it changes.
set(generated_file_path "@generated_file_path@") # path
@@ -106,7 +106,7 @@ list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
# Any -ccbin existing in CUDA_NVCC_FLAGS gets highest priority
list( FIND CUDA_NVCC_FLAGS "-ccbin" ccbin_found0 )
list( FIND CUDA_NVCC_FLAGS "--compiler-bindir" ccbin_found1 )
-if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 )
+if( ccbin_found0 LESS 0 AND ccbin_found1 LESS 0 AND CUDA_HOST_COMPILER )
if (CUDA_HOST_COMPILER STREQUAL "$(VCInstallDir)bin" AND DEFINED CCBIN)
set(CCBIN -ccbin "${CCBIN}")
else()
diff --git a/Modules/FindJPEG.cmake b/Modules/FindJPEG.cmake
index 90e4485..86bb6e5 100644
--- a/Modules/FindJPEG.cmake
+++ b/Modules/FindJPEG.cmake
@@ -33,7 +33,7 @@
find_path(JPEG_INCLUDE_DIR jpeglib.h)
-set(JPEG_NAMES ${JPEG_NAMES} jpeg)
+set(JPEG_NAMES ${JPEG_NAMES} jpeg libjpeg)
find_library(JPEG_LIBRARY NAMES ${JPEG_NAMES} )
# handle the QUIETLY and REQUIRED arguments and set JPEG_FOUND to TRUE if
diff --git a/Modules/FindOpenMP.cmake b/Modules/FindOpenMP.cmake
index 30972ae..935a0ca 100644
--- a/Modules/FindOpenMP.cmake
+++ b/Modules/FindOpenMP.cmake
@@ -68,8 +68,11 @@ function(_OPENMP_FLAG_CANDIDATES LANG)
set(OMP_FLAG_HP "+Oopenmp")
if(WIN32)
set(OMP_FLAG_Intel "-Qopenmp")
- else()
+ elseif(CMAKE_${LANG}_COMPILER_ID STREQUAL "Intel" AND
+ "${CMAKE_${LANG}_COMPILER_VERSION}" VERSION_LESS "15.0.0.20140528")
set(OMP_FLAG_Intel "-openmp")
+ else()
+ set(OMP_FLAG_Intel "-qopenmp")
endif()
set(OMP_FLAG_MIPSpro "-mp")
set(OMP_FLAG_MSVC "/openmp")
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index c930042..c942c1c 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -518,7 +518,8 @@ set(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
set(_QT4_QMAKE_NAMES qmake qmake4 qmake-qt4 qmake-mac)
_qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
-if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+if (QT_QMAKE_EXECUTABLE AND
+ QTVERSION VERSION_GREATER 3 AND QTVERSION VERSION_LESS 5)
if (Qt5Core_FOUND)
# Qt5CoreConfig sets QT_MOC_EXECUTABLE as a non-cache variable to the Qt 5
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
index bcc7f87..60f48dd 100644
--- a/Modules/FindVTK.cmake
+++ b/Modules/FindVTK.cmake
@@ -10,18 +10,6 @@
# ::
#
# VTK_FOUND - Set to true when VTK is found.
-# VTK_USE_FILE - CMake file to use VTK.
-# VTK_MAJOR_VERSION - The VTK major version number.
-# VTK_MINOR_VERSION - The VTK minor version number
-# (odd non-release).
-# VTK_BUILD_VERSION - The VTK patch level
-# (meaningless for odd minor).
-# VTK_INCLUDE_DIRS - Include directories for VTK
-# VTK_LIBRARY_DIRS - Link directories for VTK libraries
-# VTK_KITS - List of VTK kits, in CAPS
-# (COMMON,IO,) etc.
-# VTK_LANGUAGES - List of wrapped languages, in CAPS
-# (TCL, PYHTON,) etc.
#
# The following cache entries must be set by the user to locate VTK:
#
@@ -43,7 +31,7 @@
# instead.
#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
+# Copyright 2001-2014 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
@@ -55,102 +43,24 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-# Assume not found.
-set(VTK_FOUND 0)
-
-# VTK 4.0 did not provide VTKConfig.cmake.
-if("${VTK_FIND_VERSION}" VERSION_LESS 4.1)
- set(_VTK_40_ALLOW 1)
- if(VTK_FIND_VERSION)
- set(_VTK_40_ONLY 1)
- endif()
-endif()
-
-# Construct consistent error messages for use below.
-set(VTK_DIR_DESCRIPTION "directory containing VTKConfig.cmake. This is either the root of the build tree, or PREFIX/lib/vtk for an installation.")
-if(_VTK_40_ALLOW)
- set(VTK_DIR_DESCRIPTION "${VTK_DIR_DESCRIPTION} For VTK 4.0, this is the location of UseVTK.cmake. This is either the root of the build tree or PREFIX/include/vtk for an installation.")
-endif()
-set(VTK_DIR_MESSAGE "VTK not found. Set the VTK_DIR cmake cache entry to the ${VTK_DIR_DESCRIPTION}")
-
-# Check whether VTK 4.0 has already been found.
-if(_VTK_40_ALLOW AND VTK_DIR)
- if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
- set(VTK_FOUND 1)
- include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
- endif()
-endif()
-
# Use the Config mode of the find_package() command to find VTKConfig.
# If this succeeds (possibly because VTK_DIR is already set), the
# command will have already loaded VTKConfig.cmake and set VTK_FOUND.
-if(NOT _VTK_40_ONLY AND NOT VTK_FOUND)
- find_package(VTK QUIET NO_MODULE)
-endif()
-
-# Special search for VTK 4.0.
-if(_VTK_40_ALLOW AND NOT VTK_DIR)
- # Old scripts may set these directories in the CMakeCache.txt file.
- # They can tell us where to find VTKConfig.cmake.
- set(VTK_DIR_SEARCH_LEGACY "")
- if(VTK_BINARY_PATH AND USE_BUILT_VTK)
- set(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY} ${VTK_BINARY_PATH})
- endif()
- if(VTK_INSTALL_PATH AND USE_INSTALLED_VTK)
- set(VTK_DIR_SEARCH_LEGACY ${VTK_DIR_SEARCH_LEGACY}
- ${VTK_INSTALL_PATH}/lib/vtk)
+if(NOT VTK_FOUND)
+ set(_VTK_REQUIRED "")
+ if(VTK_FIND_REQUIRED)
+ set(_VTK_REQUIRED REQUIRED)
endif()
-
- # Look for UseVTK.cmake in build trees or under <prefix>/include/vtk.
- find_path(VTK_DIR
- NAMES UseVTK.cmake
- PATH_SUFFIXES vtk-4.0 vtk
- HINTS ENV VTK_DIR
-
- PATHS
-
- # Support legacy cache files.
- ${VTK_DIR_SEARCH_LEGACY}
-
- # Read from the CMakeSetup registry entries. It is likely that
- # VTK will have been recently built.
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
- [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
-
- # Help the user find it if we cannot.
- DOC "The ${VTK_DIR_DESCRIPTION}"
- )
-
- if(VTK_DIR)
- if(EXISTS ${VTK_DIR}/UseVTK.cmake AND NOT EXISTS ${VTK_DIR}/VTKConfig.cmake)
- set(VTK_FOUND 1)
- include(${CMAKE_CURRENT_LIST_DIR}/UseVTKConfig40.cmake) # No VTKConfig; load VTK 4.0 settings.
- else()
- # We found the wrong version. Pretend we did not find it.
- set(VTK_DIR "VTK_DIR-NOTFOUND" CACHE PATH "The ${VTK_DIR_DESCRIPTION}" FORCE)
- endif()
+ set(_VTK_QUIET "")
+ if(VTK_FIND_QUIETLY)
+ set(_VTK_QUIET QUIET)
endif()
+ find_package(VTK ${_VTK_REQUIRED} ${_VTK_QUIET} NO_MODULE)
+ unset(_VTK_REQUIRED)
+ unset(_VTK_QUIET)
endif()
-#-----------------------------------------------------------------------------
if(VTK_FOUND)
# Set USE_VTK_FILE for backward-compatibility.
set(USE_VTK_FILE ${VTK_USE_FILE})
-else()
- # VTK not found, explain to the user how to specify its location.
- if(VTK_FIND_REQUIRED)
- message(FATAL_ERROR ${VTK_DIR_MESSAGE})
- else()
- if(NOT VTK_FIND_QUIETLY)
- message(STATUS ${VTK_DIR_MESSAGE})
- endif()
- endif()
endif()
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 2fc8c04..349cbf5 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -198,6 +198,10 @@ if(MSVC)
MSVCRT_FILES_FOR_VERSION(12)
endif()
+ if(MSVC14)
+ MSVCRT_FILES_FOR_VERSION(14)
+ endif()
+
if(CMAKE_INSTALL_MFC_LIBRARIES)
if(MSVC70)
set(__install__libs ${__install__libs}
@@ -367,6 +371,10 @@ if(MSVC)
if(MSVC12)
MFC_FILES_FOR_VERSION(12)
endif()
+
+ if(MSVC14)
+ MFC_FILES_FOR_VERSION(14)
+ endif()
endif()
foreach(lib
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 5732170..bb6d991 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -85,6 +85,7 @@ if(NOT MSVC_VERSION)
set(MSVC10)
set(MSVC11)
set(MSVC12)
+ set(MSVC14)
set(MSVC60)
set(MSVC70)
set(MSVC71)
@@ -92,7 +93,9 @@ if(NOT MSVC_VERSION)
set(MSVC90)
set(CMAKE_COMPILER_2005)
set(CMAKE_COMPILER_SUPPORTS_PDBTYPE)
- if(NOT "${_compiler_version}" VERSION_LESS 18)
+ if(NOT "${_compiler_version}" VERSION_LESS 19)
+ set(MSVC14 1)
+ elseif(NOT "${_compiler_version}" VERSION_LESS 18)
set(MSVC12 1)
elseif(NOT "${_compiler_version}" VERSION_LESS 17)
set(MSVC11 1)