summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-11-18 20:58:06 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-11-18 20:58:06 (GMT)
commit265325fb9aa5dd6e8ca95fecb52528d7f8702c7d (patch)
tree4b82bbc1051ec687d0cf17d7d6a6c55144d4c475 /config/cmake
parent3f9c7efbd9a2e8a25266868783cd7665b810017c (diff)
downloadhdf5-265325fb9aa5dd6e8ca95fecb52528d7f8702c7d.zip
hdf5-265325fb9aa5dd6e8ca95fecb52528d7f8702c7d.tar.gz
hdf5-265325fb9aa5dd6e8ca95fecb52528d7f8702c7d.tar.bz2
Add VS2019 support
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/CTestScript.cmake6
-rw-r--r--config/cmake/HDF5_Examples.cmake.in3
-rw-r--r--config/cmake/hdf5-config.cmake.in1
-rw-r--r--config/cmake/scripts/CTestScript.cmake12
-rw-r--r--config/cmake/scripts/HDF5config.cmake18
5 files changed, 35 insertions, 5 deletions
diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake
index e819e58..e914c4d 100644
--- a/config/cmake/CTestScript.cmake
+++ b/config/cmake/CTestScript.cmake
@@ -119,8 +119,12 @@ set(CTEST_CONFIGURE_TOOLSET "")
if(CMAKE_GENERATOR_TOOLSET)
set(CTEST_CONFIGURE_TOOLSET "-T${CMAKE_GENERATOR_TOOLSET}")
endif()
+set(CTEST_CONFIGURE_ARCHITECTURE "")
+if(CMAKE_GENERATOR_ARCHITECTURE)
+ set(CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}")
+endif()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
#-----------------------------------------------------------------------------
diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in
index 042b17b..4755ec8 100644
--- a/config/cmake/HDF5_Examples.cmake.in
+++ b/config/cmake/HDF5_Examples.cmake.in
@@ -20,6 +20,9 @@ set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
if("@CMAKE_GENERATOR_TOOLSET@")
set(CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
endif()
+if("@CMAKE_GENERATOR_ARCHITECTURE@")
+ set(CMAKE_GENERATOR_ARCHITECTURE "@CMAKE_GENERATOR_ARCHITECTURE@")
+endif()
set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
# handle input parameters to script.
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in
index afb2a5c..b5a12a6 100644
--- a/config/cmake/hdf5-config.cmake.in
+++ b/config/cmake/hdf5-config.cmake.in
@@ -46,6 +46,7 @@ set (${HDF5_PACKAGE_NAME}_BUILD_SHARED_LIBS @H5_ENABLE_SHARED_LIB@)
set (${HDF5_PACKAGE_NAME}_BUILD_STATIC_LIBS @H5_ENABLE_STATIC_LIB@)
set (${HDF5_PACKAGE_NAME}_PACKAGE_EXTLIBS @HDF5_PACKAGE_EXTLIBS@)
set (${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES @HDF5_LIBRARIES_TO_EXPORT@)
+set (${HDF5_PACKAGE_NAME}_ARCHITECTURE "@CMAKE_GENERATOR_ARCHITECTURE@")
set (${HDF5_PACKAGE_NAME}_TOOLSET "@CMAKE_GENERATOR_TOOLSET@")
set (${HDF5_PACKAGE_NAME}_DEFAULT_API_VERSION "@DEFAULT_API_VERSION@")
set (${HDF5_PACKAGE_NAME}_PARALLEL_FILTERED_WRITES "@PARALLEL_FILTERED_WRITES@")
diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake
index dc3939e..febe109 100644
--- a/config/cmake/scripts/CTestScript.cmake
+++ b/config/cmake/scripts/CTestScript.cmake
@@ -195,20 +195,28 @@ if (CMAKE_GENERATOR_TOOLSET)
else ()
set (CTEST_CONFIGURE_TOOLSET "")
endif()
+if (CMAKE_GENERATOR_ARCHITECTURE)
+ set (CTEST_CONFIGURE_ARCHITECTURE "-A${CMAKE_GENERATOR_ARCHITECTURE}")
+else ()
+ set (CTEST_CONFIGURE_ARCHITECTURE "")
+endif()
if (LOCAL_MEMCHECK_TEST)
find_program (CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/mccacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
else ()
if (LOCAL_COVERAGE_TEST)
find_program (CTEST_COVERAGE_COMMAND NAMES gcov)
endif ()
set (CTEST_CONFIGURE_COMMAND
- "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_CONFIGURATION_TYPE} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_CONFIGURE_ARCHITECTURE}\" \"${CTEST_CONFIGURE_TOOLSET}\" \"${CTEST_SOURCE_DIRECTORY}\""
)
endif ()
+set(CTEST_USE_LAUNCHERS 1)
+set(ENV{CTEST_USE_LAUNCHERS_DEFAULT} 1)
+
#-----------------------------------------------------------------------------
## -- set output to english
set ($ENV{LC_MESSAGES} "en_EN")
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index ad5fbdc..775fb37 100644
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -22,6 +22,8 @@ cmake_minimum_required (VERSION 3.10)
# where valid options for OPTION are:
# BUILD_GENERATOR - The cmake build generator:
# Unix * Unix Makefiles
+# VS2019 * Visual Studio 16 2019
+# VS201964 * Visual Studio 16 2019
# VS2017 * Visual Studio 15 2017
# VS201764 * Visual Studio 15 2017 Win64
# VS2015 * Visual Studio 14 2015
@@ -106,8 +108,20 @@ if (NOT DEFINED HPC)
endif ()
if (WIN32 AND NOT MINGW)
set (SITE_OS_NAME "Windows")
- set (SITE_OS_VERSION "WIN7")
- if (BUILD_GENERATOR STREQUAL "VS201764")
+ set (SITE_OS_VERSION "WIN10")
+ if (BUILD_GENERATOR STREQUAL "VS201964")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
+ set (CMAKE_GENERATOR_ARCHITECTURE "x64")
+ set (SITE_OS_BITS "64")
+ set (SITE_COMPILER_NAME "vs2019")
+ set (SITE_COMPILER_VERSION "16")
+ elseif (BUILD_GENERATOR STREQUAL "VS2019")
+ set (CTEST_CMAKE_GENERATOR "Visual Studio 16 2019")
+ set (CMAKE_GENERATOR_ARCHITECTURE "Win32")
+ set (SITE_OS_BITS "32")
+ set (SITE_COMPILER_NAME "vs2019")
+ set (SITE_COMPILER_VERSION "16")
+ elseif (BUILD_GENERATOR STREQUAL "VS201764")
set (CTEST_CMAKE_GENERATOR "Visual Studio 15 2017 Win64")
set (SITE_OS_BITS "64")
set (SITE_COMPILER_NAME "vs2017")