summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CPack.cmake11
-rw-r--r--Modules/FindCUDA.cmake25
-rw-r--r--Modules/FindCUDA/run_nvcc.cmake2
-rw-r--r--Modules/FindPostgreSQL.cmake4
4 files changed, 25 insertions, 17 deletions
diff --git a/Modules/CPack.cmake b/Modules/CPack.cmake
index 812917f..9216fc9 100644
--- a/Modules/CPack.cmake
+++ b/Modules/CPack.cmake
@@ -68,7 +68,7 @@
#
# .. variable:: CPACK_PACKAGE_VENDOR
#
-# The name of the package vendor. (e.g., "Kitware").
+# The name of the package vendor. (e.g., "Kitware"). Default is "Humanity".
#
# .. variable:: CPACK_PACKAGE_DIRECTORY
#
@@ -80,15 +80,15 @@
#
# .. variable:: CPACK_PACKAGE_VERSION_MAJOR
#
-# Package major Version
+# Package major Version. Default value is 0.
#
# .. variable:: CPACK_PACKAGE_VERSION_MINOR
#
-# Package minor Version
+# Package minor Version. Default value is 1.
#
# .. variable:: CPACK_PACKAGE_VERSION_PATCH
#
-# Package patch Version
+# Package patch Version. Default value is 1.
#
# .. variable:: CPACK_PACKAGE_DESCRIPTION_FILE
#
@@ -262,7 +262,8 @@
#
# .. variable:: CPACK_SYSTEM_NAME
#
-# System name, defaults to the value of ${CMAKE_SYSTEM_NAME}.
+# System name, defaults to the value of ${CMAKE_SYSTEM_NAME}, except on
+# Windows where it will be "win32" or "win64".
#
# .. variable:: CPACK_PACKAGE_VERSION
#
diff --git a/Modules/FindCUDA.cmake b/Modules/FindCUDA.cmake
index 32aa454..321121c 100644
--- a/Modules/FindCUDA.cmake
+++ b/Modules/FindCUDA.cmake
@@ -98,12 +98,13 @@
# CUDA_HOST_COMPILATION_CPP (Default ON)
# -- Set to OFF for C compilation of host code.
#
-# CUDA_HOST_COMPILER (Default CMAKE_C_COMPILER, $(VCInstallDir)/bin for VS)
+# CUDA_HOST_COMPILER (Default CMAKE_C_COMPILER)
# -- Set the host compiler to be used by nvcc. Ignored if -ccbin or
# --compiler-bindir is already present in the CUDA_NVCC_FLAGS or
-# CUDA_NVCC_FLAGS_<CONFIG> variables. For Visual Studio targets
-# $(VCInstallDir)/bin is a special value that expands out to the path when
-# the command is run from within VS.
+# CUDA_NVCC_FLAGS_<CONFIG> variables. For Visual Studio targets,
+# the host compiler is constructed with one or more visual studio macros
+# such as $(VCInstallDir), that expands out to the path when
+# the command is run from withing VS.
#
# CUDA_NVCC_FLAGS
# CUDA_NVCC_FLAGS_<CONFIG>
@@ -527,7 +528,13 @@ option(CUDA_HOST_COMPILATION_CPP "Generated file extension" ON)
cmake_initialize_per_config_variable(CUDA_NVCC_FLAGS "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")
+ set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)Tools/MSVC/$(VCToolsVersion)/bin/Host$(Platform)/$(PlatformTarget)")
+ if(MSVC_VERSION LESS 1910)
+ set(_CUDA_MSVC_HOST_COMPILER "$(VCInstallDir)bin")
+ endif()
+
+ set(CUDA_HOST_COMPILER "${_CUDA_MSVC_HOST_COMPILER}" CACHE FILEPATH "Host side compiler used by NVCC")
+
else()
if(APPLE
AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang"
@@ -1301,11 +1308,11 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
endif()
# This needs to be passed in at this stage, because VS needs to fill out the
- # value of VCInstallDir from within VS. Note that CCBIN is only used if
+ # various macros from within VS. Note that CCBIN is only used if
# -ccbin or --compiler-bindir isn't used and CUDA_HOST_COMPILER matches
- # $(VCInstallDir)/bin.
+ # _CUDA_MSVC_HOST_COMPILER
if(CMAKE_GENERATOR MATCHES "Visual Studio")
- set(ccbin_flags -D "\"CCBIN:PATH=$(VCInstallDir)bin\"" )
+ set(ccbin_flags -D "\"CCBIN:PATH=${_CUDA_MSVC_HOST_COMPILER}\"" )
else()
set(ccbin_flags)
endif()
@@ -1424,7 +1431,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
if( "${_cuda_host_flags}" MATCHES "-std=c\\+\\+11")
# Add the c++11 flag to nvcc if it isn't already present. Note that we only look at
# the main flag instead of the configuration specific flags.
- if( NOT "${CUDA_NVCC_FLAGS}" MATCHES "-std;c\\+\\+11" )
+ if( NOT "${CUDA_NVCC_FLAGS}" MATCHES "-std=c\\+\\+11" )
list(APPEND nvcc_flags --std c++11)
endif()
string(REGEX REPLACE "[-]+std=c\\+\\+11" "" _cuda_host_flags "${_cuda_host_flags}")
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake
index a20ef8f..6fc2439 100644
--- a/Modules/FindCUDA/run_nvcc.cmake
+++ b/Modules/FindCUDA/run_nvcc.cmake
@@ -125,7 +125,7 @@ list(APPEND CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS_${build_configuration}})
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 AND CUDA_HOST_COMPILER )
- if (CUDA_HOST_COMPILER STREQUAL "$(VCInstallDir)bin" AND DEFINED CCBIN)
+ if (CUDA_HOST_COMPILER STREQUAL "@_CUDA_MSVC_HOST_COMPILER@" AND DEFINED CCBIN)
set(CCBIN -ccbin "${CCBIN}")
else()
set(CCBIN -ccbin "${CUDA_HOST_COMPILER}")
diff --git a/Modules/FindPostgreSQL.cmake b/Modules/FindPostgreSQL.cmake
index 7964917..3f6fa6c 100644
--- a/Modules/FindPostgreSQL.cmake
+++ b/Modules/FindPostgreSQL.cmake
@@ -27,7 +27,7 @@
# In Windows the default installation of PostgreSQL uses that as part of the path.
# E.g C:\Program Files\PostgreSQL\8.4.
# Currently, the following version numbers are known to this module:
-# "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
+# "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0"
#
# To use this variable just do something like this:
# set(PostgreSQL_ADDITIONAL_VERSIONS "9.2" "8.4.4")
@@ -71,7 +71,7 @@ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to wher
set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
- "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
+ "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
# Define additional search paths for root directories.
set( PostgreSQL_ROOT_DIRECTORIES