diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-13 16:33:00 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-13 16:33:00 (GMT) |
commit | cafab483ff373731e694096a9cdfdf262ed7cf5f (patch) | |
tree | 86c040c1d1bfb7bea553b137228e9908b9458892 /config | |
parent | 2456a36f46a15ca44840cb64c7aac213f0ca8bf8 (diff) | |
parent | 05f49d5ffdbd4cf9e967d60a3a0efd0ca7f2c820 (diff) | |
download | hdf5-cafab483ff373731e694096a9cdfdf262ed7cf5f.zip hdf5-cafab483ff373731e694096a9cdfdf262ed7cf5f.tar.gz hdf5-cafab483ff373731e694096a9cdfdf262ed7cf5f.tar.bz2 |
Merge pull request #1920 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit '05f49d5ffdbd4cf9e967d60a3a0efd0ca7f2c820': (22 commits)
HDFFV-10854 add release note for windows
Fix get home dir for windows
Use variable for test output
Allow tests to dump output if not comparing
revert as CHECK will first check for exception
Clear exception for getting JNI string to clear the exception
Correct Windows check
revert windows change
Windows ssl headers are not in system loacation
Add include dirs and default lib for windows
Add policy to use <package>_ROOT
Add statement for label if code unimplemented
Update Windows require for CURL to CMake 3.13
Fix unused var
Add updated find module for earlier CMake versions
Correct label and var names
Add back missing java implementation
use h5test.h
add test library
special windows override
...
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 5 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 9 | ||||
-rw-r--r-- | config/toolchain/build32.cmake | 36 |
3 files changed, 50 insertions, 0 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index cb1eb48..7d0f429 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -159,11 +159,16 @@ endif () #----------------------------------------------------------------------------- option (HDF5_ENABLE_ROS3_VFD "Build the ROS3 Virtual File Driver" OFF) if (HDF5_ENABLE_ROS3_VFD) + # CMake version 3.13 fixed FindCURL module + if(CMAKE_VERSION VERSION_LESS "3.13.0" AND WIN32) + MESSAGE(FATAL_ERROR "Windows builds for this option requires a minimum of CMake 3.13") + endif () find_package(CURL REQUIRED) find_package(OpenSSL REQUIRED) if (${CURL_FOUND} AND ${OPENSSL_FOUND}) set (${HDF_PREFIX}_HAVE_ROS3_VFD 1) list (APPEND LINK_LIBS ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES}) + INCLUDE_DIRECTORIES (${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR}) else () message (STATUS "The Read-Only S3 VFD was requested but cannot be built.\nPlease check that openssl and cURL are available on your\nsystem, and/or re-configure without option HDF5_ENABLE_ROS3_VFD.") endif () diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index e601653..6f633f3 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -343,6 +343,15 @@ if (TEST_GREP_COMPARE) endif () endif () +# dump the output unless nodisplay option is set +if (TEST_SKIP_COMPARE AND NOT TEST_NO_DISPLAY) + file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) + execute_process ( + COMMAND ${CMAKE_COMMAND} -E echo ${TEST_STREAM} + RESULT_VARIABLE TEST_RESULT + ) +endif () + # everything went fine... message (STATUS "${TEST_PROGRAM} Passed") diff --git a/config/toolchain/build32.cmake b/config/toolchain/build32.cmake index d078956..deb5899 100644 --- a/config/toolchain/build32.cmake +++ b/config/toolchain/build32.cmake @@ -3,6 +3,42 @@ if (WIN32) set (CMAKE_GENERATOR_PLATFORM "x86") elseif(APPLE) set (CMAKE_OSX_ARCHITECTURES "i386") +elseif(MINGW) + set (CMAKE_SYSTEM_NAME Windows) + set (CMAKE_C_COMPILER i686-w64-mingw32-gcc) + set (CMAKE_CXX_COMPILER i686-w64-mingw32-g++) + set (CMAKE_RC_COMPILER i686-w64-mingw32-windres) + set (CMAKE_Fortran_COMPILER i686-w64-mingw32-gfortran) + + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags") + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags") + + set (LIB32 /usr/lib) # Fedora + + if (EXISTS "/usr/lib32") + set (LIB32 /usr/lib32) # Arch, Solus + endif () + + set (CMAKE_SYSTEM_LIBRARY_PATH ${LIB32} CACHE STRING "system library search path" FORCE) + set (CMAKE_LIBRARY_PATH ${LIB32} CACHE STRING "library search path" FORCE) + + # this is probably unlikely to be needed, but just in case + set (CMAKE_EXE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE) + set (CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shared library linker flags" FORCE) + set (CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags" FORCE) + + # on Fedora and Arch and similar, point pkgconfig at 32 bit .pc files. We have + # to include the regular system .pc files as well (at the end), because some + # are not always present in the 32 bit directory + if (EXISTS "${LIB32}/pkgconfig") + set (ENV{PKG_CONFIG_LIBDIR} ${LIB32}/pkgconfig:/usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig) + endif () + + set (CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32) + set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + set (CMAKE_CROSSCOMPILING_EMULATOR wine32) else () set (CMAKE_SYSTEM_NAME Linux) |