summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/CTestCustom.cmake22
-rw-r--r--config/cmake/ConfigureChecks.cmake18
-rw-r--r--config/cmake/HDF518_Examples.cmake.in112
-rw-r--r--config/cmake/HDFMacros.cmake10
-rw-r--r--config/cmake/UserMacros/Windows_MT.cmake39
-rw-r--r--config/cmake/cacheinit.cmake3
6 files changed, 178 insertions, 26 deletions
diff --git a/config/cmake/CTestCustom.cmake b/config/cmake/CTestCustom.cmake
index ec7b10e..c16f9a6 100644
--- a/config/cmake/CTestCustom.cmake
+++ b/config/cmake/CTestCustom.cmake
@@ -1,19 +1,19 @@
-SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1500)
+SET (CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 3000)
SET (CTEST_CUSTOM_WARNING_EXCEPTION
${CTEST_CUSTOM_WARNING_EXCEPTION}
- "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:"
- "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument"
- "H5detect.c[0-9 \t:]*warning:[ \t]*passing argument"
- "note.*expected.*void.*but argument is of type.*volatile"
- "H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type"
- "H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244"
- "SZIP.src.*:[ \t]*warning"
- "POSIX name for this item is deprecated"
+# "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning C4090:"
+# "H5detect.c.[0-9]+.[ \t]*:[ \t]*warning:[ \t]*passing argument"
+# "H5detect.c[0-9 \t:]*warning:[ \t]*passing argument"
+# "note.*expected.*void.*but argument is of type.*volatile"
+# "H5Tconv.c[0-9 \t:]*warning:[ \t]*comparison is always false due to limited range of data type"
+# "H5Ztrans.c.[0-9]+.[ \t]*:[ \t]*warning C4244"
+# "SZIP.src.*:[ \t]*warning"
+# "POSIX name for this item is deprecated"
"disabling jobserver mode"
"config.cmake.xlatefile.c"
- "warning.*implicit declaration of function"
- "note: expanded from macro"
+# "warning.*implicit declaration of function"
+# "note: expanded from macro"
# "fpp:[ \t]*warning:[ \t]*cannot remove H5_DEBUG_API - not a predefined macro"
)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 0a4d190..cce71c7 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -183,14 +183,14 @@ IF (WINDOWS)
ENDIF (MINGW)
SET (H5_HAVE_LIBWS2_32 1)
SET (H5_HAVE_LIBWSOCK32 1)
-ENDIF (WINDOWS)
-#-----------------------------------------------------------------------------
-# These tests need to be manually SET for windows since there is currently
-# something not quite correct with the actual test implementation. This affects
-# the 'dt_arith' test and most likely lots of other code
-# ----------------------------------------------------------------------------
-#SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
+ #-----------------------------------------------------------------------------
+ # These tests need to be manually SET for windows since there is currently
+ # something not quite correct with the actual test implementation. This affects
+ # the 'dt_arith' test and most likely lots of other code
+ # ----------------------------------------------------------------------------
+ SET (H5_FP_TO_ULLONG_RIGHT_MAXIMUM "" CACHE INTERNAL "")
+ENDIF (WINDOWS)
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
@@ -1030,7 +1030,7 @@ H5MiscConversionTest (H5_SIZEOF_LONG_DOUBLE H5_LDOUBLE_TO_INTEGER_ACCURATE "chec
# yet. (1/8/05 - SLU)
#
IF (NOT MSVC)
-H5ConversionTests (H5_LDOUBLE_TO_INTEGER_WORKS "Checking IF converting from long double to integers works")
+ H5ConversionTests (H5_LDOUBLE_TO_INTEGER_WORKS "Checking IF converting from long double to integers works")
ENDIF (NOT MSVC)
# -----------------------------------------------------------------------
# Set flag to indicate that the machine can handle conversion from
@@ -1106,7 +1106,7 @@ ENDIF (H5_LLONG_TO_FP_CAST_WORKS MATCHES ^H5_LLONG_TO_FP_CAST_WORKS$)
# the conversion, and Cygwin where compiler doesn't do rounding correctly.)
#
IF (NOT MSVC)
-H5ConversionTests (H5_ULLONG_TO_LDOUBLE_PRECISION "Checking IF converting unsigned long long to long double with precision")
+ H5ConversionTests (H5_ULLONG_TO_LDOUBLE_PRECISION "Checking IF converting unsigned long long to long double with precision")
ENDIF (NOT MSVC)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle overflow converting
diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in
new file mode 100644
index 0000000..699e2d0
--- /dev/null
+++ b/config/cmake/HDF518_Examples.cmake.in
@@ -0,0 +1,112 @@
+cmake_minimum_required(VERSION 2.8.10 FATAL_ERROR)
+###############################################################################################################
+# This script will build and run the examples from a compressed file
+# Execute from a command line:
+# ctest -S HDF518_Examples.cmake,HDF5Examples-0.1.1-Source -C Release -O test.log
+###############################################################################################################
+
+set(INSTALLDIR "@CMAKE_INSTALL_PREFIX@/@HDF5_PACKAGE_VERSION@")
+set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
+set(STATICLIBRARIES "@H5_ENABLE_STATIC_LIB@")
+set(CTEST_SOURCE_NAME ${CTEST_SCRIPT_ARG})
+set(CTEST_DASHBOARD_ROOT ${CTEST_SCRIPT_DIRECTORY})
+set(CTEST_BUILD_CONFIGURATION "Release")
+
+###############################################################################################################
+# Adjust the following SET Commands as needed
+###############################################################################################################
+if(WIN32)
+ if(STATICLIBRARIES)
+ set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF")
+ endif(STATICLIBRARIES)
+ set(ENV{HDF5_DIR} "${INSTALLDIR}/cmake/hdf5")
+ set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}\\build)
+ set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_SOURCE_NAME}")
+ set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}\\${CTEST_BINARY_NAME}")
+else(WIN32)
+ if(STATICLIBRARIES)
+ set(BUILD_OPTIONS "-DUSE_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ endif(STATICLIBRARIES)
+ set(ENV{HDF5_DIR} "${INSTALLDIR}/share/cmake/hdf5")
+ set(ENV{LD_LIBRARY_PATH} "${INSTALLDIR}/lib")
+ set(CTEST_BINARY_NAME ${CTEST_SOURCE_NAME}/build)
+ set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_SOURCE_NAME}")
+ set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/${CTEST_BINARY_NAME}")
+endif(WIN32)
+
+###############################################################################################################
+# For any comments please contact cdashhelp@hdfgroup.org
+#
+###############################################################################################################
+
+#-----------------------------------------------------------------------------
+# MAC machines need special option
+#-----------------------------------------------------------------------------
+if(APPLE)
+ # Compiler choice
+ execute_process(COMMAND xcrun --find cc OUTPUT_VARIABLE XCODE_CC OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND xcrun --find c++ OUTPUT_VARIABLE XCODE_CXX OUTPUT_STRIP_TRAILING_WHITESPACE)
+ set(ENV{CC} "${XCODE_CC}")
+ set(ENV{CXX} "${XCODE_CXX}")
+ # Shared fortran is not supported, build static
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_ANSI_CFLAGS:STRING=-fPIC")
+ set(BUILD_OPTIONS "${BUILD_OPTIONS} -DCTEST_USE_LAUNCHERS:BOOL=ON -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF")
+endif(APPLE)
+
+#-----------------------------------------------------------------------------
+set(CTEST_CMAKE_COMMAND "\"${CMAKE_COMMAND}\"")
+## Uncompress source in tar file provided
+## --------------------------
+if(WIN32)
+ set(CTEST_7Z_COMMAND "C:/Program Files/7-Zip/7z.exe")
+ message("extracting... [${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip]")
+ execute_process(COMMAND ${CTEST_7Z_COMMAND} x ${CTEST_SOURCE_NAME}.zip RESULT_VARIABLE rv)
+else(WIN32)
+ message("extracting... [${CTEST_CMAKE_COMMAND} -E tar -xvf ${CTEST_SOURCE_NAME}.tar.gz]")
+ execute_process(COMMAND tar -xvf ${CTEST_SOURCE_NAME}.tar.gz RESULT_VARIABLE rv)
+endif(WIN32)
+
+if(NOT rv EQUAL 0)
+ message("extracting... [error-(${rv}) clean up]")
+ file(REMOVE_RECURSE "${CTEST_SOURCE_DIRECTORY}")
+ message(FATAL_ERROR "error: extract of ${CTEST_SOURCE_NAME} failed")
+endif(NOT rv EQUAL 0)
+
+#-----------------------------------------------------------------------------
+## Clear the build directory
+## --------------------------
+set(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
+
+# Use multiple CPU cores to build
+include(ProcessorCount)
+ProcessorCount(N)
+if(NOT N EQUAL 0)
+ if(NOT WIN32)
+ set(CTEST_BUILD_FLAGS -j${N})
+ endif(NOT WIN32)
+ set(ctest_test_args ${ctest_test_args} PARALLEL_LEVEL ${N})
+endif()
+set (CTEST_CONFIGURE_COMMAND
+ "${CTEST_CMAKE_COMMAND} -C \"${CTEST_SOURCE_DIRECTORY}/config/cmake/cacheinit.cmake\" -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} ${BUILD_OPTIONS} \"-G${CTEST_CMAKE_GENERATOR}\" \"${CTEST_SOURCE_DIRECTORY}\""
+)
+
+#-----------------------------------------------------------------------------
+## -- set output to english
+set($ENV{LC_MESSAGES} "en_EN")
+
+#-----------------------------------------------------------------------------
+ ## NORMAL process
+ ## --------------------------
+ CTEST_START (Experimental)
+ CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
+ CTEST_READ_CUSTOM_FILES ("${CTEST_BINARY_DIRECTORY}")
+ CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
+ CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" APPEND ${ctest_test_args} RETURN_VALUE res)
+ if(res GREATER 0)
+ message (FATAL_ERROR "tests FAILED")
+ endif(res GREATER 0)
+#-----------------------------------------------------------------------------
+##############################################################################################################
+message("DONE") \ No newline at end of file
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index e9e9665..b0788f2 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -132,7 +132,7 @@ MACRO (TARGET_C_PROPERTIES wintarget addcompileflags addlinkflags)
LINK_FLAGS "${addlinkflags}"
)
ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${forttarget}
+ SET_TARGET_PROPERTIES (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
@@ -147,14 +147,14 @@ MACRO (TARGET_MSVC_PROPERTIES wintarget addcompileflags addlinkflags)
IF (BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES (${wintarget}
PROPERTIES
- COMPILE_FLAGS "/dll ${addcompileflags}"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
+ COMPILE_FLAGS "${addcompileflags}"
+ LINK_FLAGS "${addlinkflags}"
)
ELSE (BUILD_SHARED_LIBS)
- SET_TARGET_PROPERTIES (${forttarget}
+ SET_TARGET_PROPERTIES (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
+ LINK_FLAGS "${addlinkflags}"
)
ENDIF (BUILD_SHARED_LIBS)
ENDIF (MSVC)
diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake
new file mode 100644
index 0000000..9be5404
--- /dev/null
+++ b/config/cmake/UserMacros/Windows_MT.cmake
@@ -0,0 +1,39 @@
+########################################################
+# Include file for user options
+########################################################
+
+# To use this option, copy both the macro and option code
+# into the root UserMacros.cmake file.
+
+#-----------------------------------------------------------------------------
+# Option to Build with Static CRT libraries on Windows
+#-------------------------------------------------------------------------------
+MACRO (TARGET_STATIC_CRT_FLAGS)
+ IF (MSVC AND NOT BUILD_SHARED_LIBS)
+ FOREACH (flag_var
+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+ IF (${flag_var} MATCHES "/MD")
+ STRING (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ ENDIF (${flag_var} MATCHES "/MD")
+ ENDFOREACH (flag_var)
+ FOREACH (flag_var
+ CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS_DEBUG CMAKE_Fortran_FLAGS_RELEASE
+ CMAKE_Fortran_FLAGS_MINSIZEREL CMAKE_Fortran_FLAGS_RELWITHDEBINFO)
+ IF (${flag_var} MATCHES "/libs:dll")
+ STRING (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}")
+ ENDIF (${flag_var} MATCHES "/libs:dll")
+ ENDFOREACH (flag_var)
+ SET (WIN_COMPILE_FLAGS "")
+ SET (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
+ ENDIF (MSVC AND NOT BUILD_SHARED_LIBS)
+ENDMACRO (TARGET_STATIC_CRT_FLAGS)
+
+#-----------------------------------------------------------------------------
+OPTION (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF)
+IF (BUILD_STATIC_CRT_LIBS)
+ TARGET_STATIC_CRT_FLAGS ()
+ENDIF (BUILD_STATIC_CRT_LIBS)
+ \ No newline at end of file
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index d45ef9e..43ba754 100644
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -62,7 +62,8 @@ SET (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libr
SET (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE)
-SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building" FORCE)
+SET (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)" FORCE)
+SET_PROPERTY(CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO SVN TGZ)
SET (ZLIB_SVN_URL "http://svn.hdfgroup.uiuc.edu/zlib/trunk" CACHE STRING "Use ZLib from HDF repository" FORCE)