summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2014-05-14 19:50:28 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2014-05-14 19:50:28 (GMT)
commit21474f8eeef355d6f21403c14b7de5b54b4da064 (patch)
treeb6638b281f2052f43f59fd7f1701a570d672cd71 /config
parent8f57e86ab9f53cb1770054e69784087695ac14af (diff)
downloadhdf5-21474f8eeef355d6f21403c14b7de5b54b4da064.zip
hdf5-21474f8eeef355d6f21403c14b7de5b54b4da064.tar.gz
hdf5-21474f8eeef355d6f21403c14b7de5b54b4da064.tar.bz2
[svn-r25188] Implement change to cmake_ext_mod config folder
Tested: local linux
Diffstat (limited to 'config')
-rw-r--r--config/cmake/CPack.Info.plist.in32
-rw-r--r--config/cmake/CheckTypeSize.cmake48
-rw-r--r--config/cmake/ConfigureChecks.cmake768
-rw-r--r--config/cmake/FindMPI.cmake647
-rw-r--r--config/cmake/FindSZIP.cmake179
-rw-r--r--config/cmake/GetTimeOfDayTest.cpp15
-rw-r--r--config/cmake/HDF5CXXTests.cpp56
-rw-r--r--config/cmake/HDF5Tests.c479
-rw-r--r--config/cmake/HDF5UseFortran.cmake139
-rw-r--r--config/cmake/HDFLibMacros.cmake350
-rw-r--r--config/cmake/HDFMacros.cmake187
-rw-r--r--config/cmake/NSIS.InstallOptions.ini.in37
-rw-r--r--config/cmake/NSIS.template.in974
-rw-r--r--config/cmake/grepTest.cmake64
-rw-r--r--config/cmake/hdf.bmpbin1254 -> 0 bytes
-rw-r--r--config/cmake/hdf.icnsbin2632 -> 0 bytes
-rw-r--r--config/cmake/hdf.icobin23558 -> 0 bytes
-rw-r--r--config/cmake/prunTest.cmake145
-rw-r--r--config/cmake/runTest.cmake193
-rw-r--r--config/cmake/version.plist.in17
20 files changed, 15 insertions, 4315 deletions
diff --git a/config/cmake/CPack.Info.plist.in b/config/cmake/CPack.Info.plist.in
deleted file mode 100644
index 6cf2a94..0000000
--- a/config/cmake/CPack.Info.plist.in
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>@CPACK_PACKAGE_FILE_NAME@</string>
- <key>CFBundleIconFile</key>
- <string>@CPACK_BUNDLE_ICON@</string>
- <key>CFBundleIdentifier</key>
- <string>org.@CPACK_PACKAGE_VENDOR@.@CPACK_PACKAGE_NAME@@CPACK_MODULE_VERSION_SUFFIX@</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>@CPACK_PACKAGE_VERSIO@</string>
- <key>CFBundleShortVersionString</key>
- <string>@CPACK_SHORT_VERSION_STRING@</string>
- <key>CSResourcesFileMapped</key>
- <true/>
- <key>CFBundleName</key>
- <string>@CPACK_BUNDLE_NAME@</string>
- <key>CFBundleGetInfoString</key>
- <string>@CPACK_APPLE_GUI_INFO_STRING@</string>
- <key>NSHumanReadableCopyright</key>
- <string>@CPACK_APPLE_GUI_COPYRIGHT@</string>
-</dict>
-</plist>
diff --git a/config/cmake/CheckTypeSize.cmake b/config/cmake/CheckTypeSize.cmake
deleted file mode 100644
index 4af5741..0000000
--- a/config/cmake/CheckTypeSize.cmake
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Check if the type exists and determine size of type. if the type
-# exists, the size will be stored to the variable.
-#
-# CHECK_TYPE_SIZE - macro which checks the size of type
-# VARIABLE - variable to store size if the type exists.
-# HAVE_${VARIABLE} - does the variable exists or not
-#
-
-MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
- set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
- if ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- set (MACRO_CHECK_TYPE_SIZE_FLAGS
- "-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}"
- )
- foreach (def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H HAVE_INTTYPES_H)
- if ("${def}")
- set (MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
- ENDIF("${def}")
- endforeach (def)
-
- message (STATUS "Check size of ${TYPE}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_TYPE_SIZE_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
- )
- endif (CMAKE_REQUIRED_LIBRARIES)
- TRY_RUN (${VARIABLE} HAVE_${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/CheckTypeSize.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
- "${CHECK_TYPE_SIZE_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if (HAVE_${VARIABLE})
- message (STATUS "Check size of ${TYPE} - done")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
- "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n"
- )
- else (HAVE_${VARIABLE})
- message (STATUS "Check size of ${TYPE} - failed")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n\n"
- )
- endif (HAVE_${VARIABLE})
- endif ("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
- set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
-ENDMACRO (HDF_CHECK_TYPE_SIZE)
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 9816755..360d5b0 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -1,44 +1,11 @@
#-----------------------------------------------------------------------------
# Include all the necessary files for macros
#-----------------------------------------------------------------------------
-include (${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckIncludeFile.cmake)
-include (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
-include (${CMAKE_ROOT}/Modules/CheckIncludeFiles.cmake)
-include (${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
-include (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
-include (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
-include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
+set (HDF_PREFIX "H5")
+include (${HDF_RESOURCES_EXT_DIR}/ConfigureChecks.cmake)
include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
#-----------------------------------------------------------------------------
-# APPLE/Darwin setup
-#-----------------------------------------------------------------------------
-if (APPLE)
- list (LENGTH CMAKE_OSX_ARCHITECTURES ARCH_LENGTH)
- if (ARCH_LENGTH GREATER 1)
- set (CMAKE_OSX_ARCHITECTURES "" CACHE STRING "" FORCE)
- message(FATAL_ERROR "Building Universal Binaries on OS X is NOT supported by the HDF5 project. This is"
- "due to technical reasons. The best approach would be build each architecture in separate directories"
- "and use the 'lipo' tool to combine them into a single executable or library. The 'CMAKE_OSX_ARCHITECTURES'"
- "variable has been set to a blank value which will build the default architecture for this system.")
- endif ()
- set (H5_AC_APPLE_UNIVERSAL_BUILD 0)
-endif (APPLE)
-
-# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
- set (H5_HAVE_DARWIN 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-
-# Check for Solaris
-if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
- set (H5_HAVE_SOLARIS 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
-
-#-----------------------------------------------------------------------------
# Option to Clear File Buffers before write --enable-clear-file-buffers
#-----------------------------------------------------------------------------
option (HDF5_Enable_Clear_File_Buffers "Securely clear file buffers before writing to file" ON)
@@ -98,7 +65,13 @@ if (HDF5_ENABLE_CODESTACK)
endif (HDF5_ENABLE_CODESTACK)
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
+#-----------------------------------------------------------------------------
+# Are we going to use HSIZE_T
+#-----------------------------------------------------------------------------
option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
+if (HDF5_ENABLE_HSIZET)
+ set (${HDF_PREFIX}_HAVE_LARGE_HSIZET 1)
+endif (HDF5_ENABLE_HSIZET)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
@@ -110,40 +83,6 @@ option (HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON)
# so far we have no check for this
set (H5_HAVE_TMPFILE 1)
-#-----------------------------------------------------------------------------
-# This MACRO checks IF the symbol exists in the library and IF it
-# does, it appends library to the list.
-#-----------------------------------------------------------------------------
-set (LINK_LIBS "")
-MACRO (CHECK_LIBRARY_EXISTS_CONCAT LIBRARY SYMBOL VARIABLE)
- CHECK_LIBRARY_EXISTS ("${LIBRARY};${LINK_LIBS}" ${SYMBOL} "" ${VARIABLE})
- if (${VARIABLE})
- set (LINK_LIBS ${LINK_LIBS} ${LIBRARY})
- endif (${VARIABLE})
-ENDMACRO (CHECK_LIBRARY_EXISTS_CONCAT)
-
-# ----------------------------------------------------------------------
-# WINDOWS Hard code Values
-# ----------------------------------------------------------------------
-
-set (WINDOWS)
-if (WIN32)
- if (MINGW)
- set (H5_HAVE_MINGW 1)
- set (WINDOWS 1) # MinGW tries to imitate Windows
- set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
- endif (MINGW)
- set (H5_HAVE_WIN32_API 1)
- set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
- if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- set (WINDOWS 1)
- set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
- if (MSVC)
- set (H5_HAVE_VISUAL_STUDIO 1)
- endif (MSVC)
- endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
-endif (WIN32)
-
# TODO --------------------------------------------------------------------------
# Should the Default Virtual File Driver be compiled?
# This is hard-coded now but option should added to match configure
@@ -168,30 +107,6 @@ if (WINDOWS)
endif (WINDOWS)
if (WINDOWS)
- set (H5_HAVE_STDDEF_H 1)
- set (H5_HAVE_SYS_STAT_H 1)
- set (H5_HAVE_SYS_TYPES_H 1)
- set (H5_HAVE_LIBM 1)
- set (H5_HAVE_STRDUP 1)
- set (H5_HAVE_SYSTEM 1)
- set (H5_HAVE_LONGJMP 1)
- if (NOT MINGW)
- set (H5_HAVE_GETHOSTNAME 1)
- endif (NOT MINGW)
- if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- set (H5_HAVE_GETCONSOLESCREENBUFFERINFO 1)
- endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
- set (H5_HAVE_FUNCTION 1)
- set (H5_GETTIMEOFDAY_GIVES_TZ 1)
- set (H5_HAVE_TIMEZONE 1)
- set (H5_HAVE_GETTIMEOFDAY 1)
- set (H5_LONE_COLON 0)
- if (MINGW)
- set (H5_HAVE_WINSOCK2_H 1)
- endif (MINGW)
- set (H5_HAVE_LIBWS2_32 1)
- set (H5_HAVE_LIBWSOCK32 1)
-
#-----------------------------------------------------------------------------
# These tests need to be manually SET for windows since there is currently
# something not quite correct with the actual test implementation. This affects
@@ -204,97 +119,6 @@ endif (WINDOWS)
# END of WINDOWS Hard code Values
# ----------------------------------------------------------------------
-if (CYGWIN)
- set (H5_HAVE_LSEEK64 0)
-endif (CYGWIN)
-
-#-----------------------------------------------------------------------------
-# Check for the math library "m"
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
- CHECK_LIBRARY_EXISTS_CONCAT ("m" ceil H5_HAVE_LIBM)
- CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen H5_HAVE_LIBDL)
- CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup H5_HAVE_LIBWS2_32)
- CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname H5_HAVE_LIBWSOCK32)
-endif (NOT WINDOWS)
-
-CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname H5_HAVE_LIBUCB)
-CHECK_LIBRARY_EXISTS_CONCAT ("socket" connect H5_HAVE_LIBSOCKET)
-CHECK_LIBRARY_EXISTS ("c" gethostbyname "" NOT_NEED_LIBNSL)
-
-if (NOT NOT_NEED_LIBNSL)
- CHECK_LIBRARY_EXISTS_CONCAT ("nsl" gethostbyname H5_HAVE_LIBNSL)
-endif (NOT NOT_NEED_LIBNSL)
-
-# For other tests to use the same libraries
-set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
-
-set (USE_INCLUDES "")
-if (WINDOWS)
- set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
-endif (WINDOWS)
-
-if (NOT WINDOWS)
- TEST_BIG_ENDIAN (H5_WORDS_BIGENDIAN)
-endif (NOT WINDOWS)
-
-# For other specific tests, use this MACRO.
-MACRO (HDF5_FUNCTION_TEST OTHER_TEST)
- if ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif (CMAKE_REQUIRED_LIBRARIES)
-
- foreach (def ${HDF5_EXTRA_TEST_DEFINITIONS})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- endforeach (def)
-
- foreach (def
- HAVE_SYS_TIME_H
- HAVE_UNISTD_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_SOCKET_H
- )
- if ("${H5_${def}}")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ("${H5_${def}}")
- endforeach (def)
-
- if (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif (LARGEFILE)
-
- #message (STATUS "Performing ${OTHER_TEST}")
- TRY_COMPILE (${OTHER_TEST}
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if (${OTHER_TEST})
- set (H5_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
- message (STATUS "Performing Other Test ${OTHER_TEST} - Success")
- else (${OTHER_TEST})
- message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
- set (H5_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Performing Other Test ${OTHER_TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- )
- endif (${OTHER_TEST})
- endif ("H5_${OTHER_TEST}" MATCHES "^H5_${OTHER_TEST}$")
-ENDMACRO (HDF5_FUNCTION_TEST)
-
-#-----------------------------------------------------------------------------
-# Check for these functions before the time headers are checked
-#-----------------------------------------------------------------------------
-HDF5_FUNCTION_TEST (STDC_HEADERS)
-
CHECK_FUNCTION_EXISTS (difftime H5_HAVE_DIFFTIME)
#CHECK_FUNCTION_EXISTS (gettimeofday H5_HAVE_GETTIMEOFDAY)
# Since gettimeofday is not defined any where standard, lets look in all the
@@ -303,7 +127,7 @@ if (NOT MSVC)
if ("H5_HAVE_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_TIME_GETTIMEOFDAY$")
TRY_COMPILE (HAVE_TIME_GETTIMEOFDAY
${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp
+ ${HDF_RESOURCES_EXT_DIR}/GetTimeOfDayTest.cpp
COMPILE_DEFINITIONS -DTRY_TIME_H
OUTPUT_VARIABLE OUTPUT
)
@@ -316,7 +140,7 @@ if (NOT MSVC)
if ("H5_HAVE_SYS_TIME_GETTIMEOFDAY" MATCHES "^H5_HAVE_SYS_TIME_GETTIMEOFDAY$")
TRY_COMPILE (HAVE_SYS_TIME_GETTIMEOFDAY
${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/GetTimeOfDayTest.cpp
+ ${HDF_RESOURCES_EXT_DIR}/GetTimeOfDayTest.cpp
COMPILE_DEFINITIONS -DTRY_SYS_TIME_H
OUTPUT_VARIABLE OUTPUT
)
@@ -354,426 +178,6 @@ endif (NOT WINDOWS)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-# Check IF header file exists and add it to the list.
-#-----------------------------------------------------------------------------
-MACRO (CHECK_INCLUDE_FILE_CONCAT FILE VARIABLE)
- CHECK_INCLUDE_FILES ("${USE_INCLUDES};${FILE}" ${VARIABLE})
- if (${VARIABLE})
- set (USE_INCLUDES ${USE_INCLUDES} ${FILE})
- endif (${VARIABLE})
-ENDMACRO (CHECK_INCLUDE_FILE_CONCAT)
-
-#-----------------------------------------------------------------------------
-# Check for the existence of certain header files
-#-----------------------------------------------------------------------------
-CHECK_INCLUDE_FILE_CONCAT ("sys/resource.h" H5_HAVE_SYS_RESOURCE_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/time.h" H5_HAVE_SYS_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("unistd.h" H5_HAVE_UNISTD_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/ioctl.h" H5_HAVE_SYS_IOCTL_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/stat.h" H5_HAVE_SYS_STAT_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/socket.h" H5_HAVE_SYS_SOCKET_H)
-CHECK_INCLUDE_FILE_CONCAT ("sys/types.h" H5_HAVE_SYS_TYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("stddef.h" H5_HAVE_STDDEF_H)
-CHECK_INCLUDE_FILE_CONCAT ("setjmp.h" H5_HAVE_SETJMP_H)
-CHECK_INCLUDE_FILE_CONCAT ("features.h" H5_HAVE_FEATURES_H)
-CHECK_INCLUDE_FILE_CONCAT ("dirent.h" H5_HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdint.h" H5_HAVE_STDINT_H)
-
-# IF the c compiler found stdint, check the C++ as well. On some systems this
-# file will be found by C but not C++, only do this test IF the C++ compiler
-# has been initialized (e.g. the project also includes some c++)
-if (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
- CHECK_INCLUDE_FILE_CXX ("stdint.h" H5_HAVE_STDINT_H_CXX)
- if (NOT H5_HAVE_STDINT_H_CXX)
- set (H5_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
- set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
- endif (NOT H5_HAVE_STDINT_H_CXX)
-endif (H5_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
-
-# Darwin
-CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" H5_HAVE_MACH_MACH_TIME_H)
-
-# Windows
-CHECK_INCLUDE_FILE_CONCAT ("io.h" H5_HAVE_IO_H)
-if (NOT CYGWIN)
- CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" H5_HAVE_WINSOCK2_H)
-endif (NOT CYGWIN)
-CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" H5_HAVE_SYS_TIMEB_H)
-
-if (CMAKE_SYSTEM_NAME MATCHES "OSF")
- CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" H5_HAVE_SYS_SYSINFO_H)
- CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" H5_HAVE_SYS_PROC_H)
-else (CMAKE_SYSTEM_NAME MATCHES "OSF")
- set (H5_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
- set (H5_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-endif (CMAKE_SYSTEM_NAME MATCHES "OSF")
-
-CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" H5_HAVE_GLOBUS_COMMON_H)
-CHECK_INCLUDE_FILE_CONCAT ("pdb.h" H5_HAVE_PDB_H)
-CHECK_INCLUDE_FILE_CONCAT ("pthread.h" H5_HAVE_PTHREAD_H)
-CHECK_INCLUDE_FILE_CONCAT ("srbclient.h" H5_HAVE_SRBCLIENT_H)
-CHECK_INCLUDE_FILE_CONCAT ("string.h" H5_HAVE_STRING_H)
-CHECK_INCLUDE_FILE_CONCAT ("strings.h" H5_HAVE_STRINGS_H)
-CHECK_INCLUDE_FILE_CONCAT ("time.h" H5_HAVE_TIME_H)
-CHECK_INCLUDE_FILE_CONCAT ("stdlib.h" H5_HAVE_STDLIB_H)
-CHECK_INCLUDE_FILE_CONCAT ("memory.h" H5_HAVE_MEMORY_H)
-CHECK_INCLUDE_FILE_CONCAT ("dlfcn.h" H5_HAVE_DLFCN_H)
-CHECK_INCLUDE_FILE_CONCAT ("inttypes.h" H5_HAVE_INTTYPES_H)
-CHECK_INCLUDE_FILE_CONCAT ("netinet/in.h" H5_HAVE_NETINET_IN_H)
-
-#-----------------------------------------------------------------------------
-# Check for large file support
-#-----------------------------------------------------------------------------
-
-# The linux-lfs option is deprecated.
-set (LINUX_LFS 0)
-
-set (HDF5_EXTRA_C_FLAGS)
-set (HDF5_EXTRA_FLAGS)
-if (NOT WINDOWS)
- if (NOT H5_HAVE_SOLARIS)
- # Linux Specific flags
- # This was originally defined as _POSIX_SOURCE which was updated to
- # _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX
- # functionality so clock_gettime and CLOCK_MONOTONIC are defined
- # correctly.
- # POSIX feature information can be found in the gcc manual at:
- # http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
- set (HDF5_EXTRA_C_FLAGS -D_POSIX_C_SOURCE=199506L)
- set (HDF5_EXTRA_FLAGS -D_BSD_SOURCE)
-
- option (HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON)
- if (HDF5_ENABLE_LARGE_FILE)
- set (msg "Performing TEST_LFS_WORKS")
- TRY_RUN (TEST_LFS_WORKS_RUN TEST_LFS_WORKS_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-DTEST_LFS_WORKS
- OUTPUT_VARIABLE OUTPUT
- )
- if (TEST_LFS_WORKS_COMPILE)
- if (TEST_LFS_WORKS_RUN MATCHES 0)
- set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
- set (LARGEFILE 1)
- set (HDF5_EXTRA_FLAGS ${HDF5_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
- message (STATUS "${msg}... yes")
- else (TEST_LFS_WORKS_RUN MATCHES 0)
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test TEST_LFS_WORKS Run failed with the following output and exit code:\n ${OUTPUT}\n"
- )
- endif (TEST_LFS_WORKS_RUN MATCHES 0)
- else (TEST_LFS_WORKS_COMPILE )
- set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
- )
- endif (TEST_LFS_WORKS_COMPILE)
- endif (HDF5_ENABLE_LARGE_FILE)
- set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF5_EXTRA_FLAGS})
- endif (NOT H5_HAVE_SOLARIS)
-endif (NOT WINDOWS)
-
-add_definitions (${HDF5_EXTRA_FLAGS})
-
-#-----------------------------------------------------------------------------
-# Check for HAVE_OFF64_T functionality
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS OR MINGW)
- HDF5_FUNCTION_TEST (HAVE_OFF64_T)
- if (H5_HAVE_OFF64_T)
- CHECK_FUNCTION_EXISTS (lseek64 H5_HAVE_LSEEK64)
- CHECK_FUNCTION_EXISTS (fseeko64 H5_HAVE_FSEEKO64)
- CHECK_FUNCTION_EXISTS (ftello64 H5_HAVE_FTELLO64)
- CHECK_FUNCTION_EXISTS (ftruncate64 H5_HAVE_FTRUNCATE64)
- endif (H5_HAVE_OFF64_T)
-
- CHECK_FUNCTION_EXISTS (fseeko H5_HAVE_FSEEKO)
- CHECK_FUNCTION_EXISTS (ftello H5_HAVE_FTELLO)
-
- HDF5_FUNCTION_TEST (HAVE_STAT64_STRUCT)
- if (HAVE_STAT64_STRUCT)
- CHECK_FUNCTION_EXISTS (fstat64 H5_HAVE_FSTAT64)
- CHECK_FUNCTION_EXISTS (stat64 H5_HAVE_STAT64)
- endif (HAVE_STAT64_STRUCT)
-endif (NOT WINDOWS OR MINGW)
-
-#-----------------------------------------------------------------------------
-# Check the size in bytes of all the int and float types
-#-----------------------------------------------------------------------------
-MACRO (H5_CHECK_TYPE_SIZE type var)
- set (aType ${type})
- set (aVar ${var})
-# message (STATUS "Checking size of ${aType} and storing into ${aVar}")
- CHECK_TYPE_SIZE (${aType} ${aVar})
- if (NOT ${aVar})
- set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
-# message (STATUS "Size of ${aType} was NOT Found")
- endif (NOT ${aVar})
-ENDMACRO (H5_CHECK_TYPE_SIZE)
-
-H5_CHECK_TYPE_SIZE (char H5_SIZEOF_CHAR)
-H5_CHECK_TYPE_SIZE (short H5_SIZEOF_SHORT)
-H5_CHECK_TYPE_SIZE (int H5_SIZEOF_INT)
-H5_CHECK_TYPE_SIZE (unsigned H5_SIZEOF_UNSIGNED)
-if (NOT APPLE)
- H5_CHECK_TYPE_SIZE (long H5_SIZEOF_LONG)
-endif (NOT APPLE)
-H5_CHECK_TYPE_SIZE ("long long" H5_SIZEOF_LONG_LONG)
-H5_CHECK_TYPE_SIZE (__int64 H5_SIZEOF___INT64)
-if (NOT H5_SIZEOF___INT64)
- set (H5_SIZEOF___INT64 0)
-endif (NOT H5_SIZEOF___INT64)
-
-H5_CHECK_TYPE_SIZE (float H5_SIZEOF_FLOAT)
-H5_CHECK_TYPE_SIZE (double H5_SIZEOF_DOUBLE)
-H5_CHECK_TYPE_SIZE ("long double" H5_SIZEOF_LONG_DOUBLE)
-
-H5_CHECK_TYPE_SIZE (int8_t H5_SIZEOF_INT8_T)
-H5_CHECK_TYPE_SIZE (uint8_t H5_SIZEOF_UINT8_T)
-H5_CHECK_TYPE_SIZE (int_least8_t H5_SIZEOF_INT_LEAST8_T)
-H5_CHECK_TYPE_SIZE (uint_least8_t H5_SIZEOF_UINT_LEAST8_T)
-H5_CHECK_TYPE_SIZE (int_fast8_t H5_SIZEOF_INT_FAST8_T)
-H5_CHECK_TYPE_SIZE (uint_fast8_t H5_SIZEOF_UINT_FAST8_T)
-
-H5_CHECK_TYPE_SIZE (int16_t H5_SIZEOF_INT16_T)
-H5_CHECK_TYPE_SIZE (uint16_t H5_SIZEOF_UINT16_T)
-H5_CHECK_TYPE_SIZE (int_least16_t H5_SIZEOF_INT_LEAST16_T)
-H5_CHECK_TYPE_SIZE (uint_least16_t H5_SIZEOF_UINT_LEAST16_T)
-H5_CHECK_TYPE_SIZE (int_fast16_t H5_SIZEOF_INT_FAST16_T)
-H5_CHECK_TYPE_SIZE (uint_fast16_t H5_SIZEOF_UINT_FAST16_T)
-
-H5_CHECK_TYPE_SIZE (int32_t H5_SIZEOF_INT32_T)
-H5_CHECK_TYPE_SIZE (uint32_t H5_SIZEOF_UINT32_T)
-H5_CHECK_TYPE_SIZE (int_least32_t H5_SIZEOF_INT_LEAST32_T)
-H5_CHECK_TYPE_SIZE (uint_least32_t H5_SIZEOF_UINT_LEAST32_T)
-H5_CHECK_TYPE_SIZE (int_fast32_t H5_SIZEOF_INT_FAST32_T)
-H5_CHECK_TYPE_SIZE (uint_fast32_t H5_SIZEOF_UINT_FAST32_T)
-
-H5_CHECK_TYPE_SIZE (int64_t H5_SIZEOF_INT64_T)
-H5_CHECK_TYPE_SIZE (uint64_t H5_SIZEOF_UINT64_T)
-H5_CHECK_TYPE_SIZE (int_least64_t H5_SIZEOF_INT_LEAST64_T)
-H5_CHECK_TYPE_SIZE (uint_least64_t H5_SIZEOF_UINT_LEAST64_T)
-H5_CHECK_TYPE_SIZE (int_fast64_t H5_SIZEOF_INT_FAST64_T)
-H5_CHECK_TYPE_SIZE (uint_fast64_t H5_SIZEOF_UINT_FAST64_T)
-
-if (NOT APPLE)
- H5_CHECK_TYPE_SIZE (size_t H5_SIZEOF_SIZE_T)
- H5_CHECK_TYPE_SIZE (ssize_t H5_SIZEOF_SSIZE_T)
- if (NOT H5_SIZEOF_SSIZE_T)
- set (H5_SIZEOF_SSIZE_T 0)
- endif (NOT H5_SIZEOF_SSIZE_T)
- if (NOT WINDOWS)
- H5_CHECK_TYPE_SIZE (ptrdiff_t H5_SIZEOF_PTRDIFF_T)
- endif (NOT WINDOWS)
-endif (NOT APPLE)
-
-H5_CHECK_TYPE_SIZE (off_t H5_SIZEOF_OFF_T)
-H5_CHECK_TYPE_SIZE (off64_t H5_SIZEOF_OFF64_T)
-if (NOT H5_SIZEOF_OFF64_T)
- set (H5_SIZEOF_OFF64_T 0)
-endif (NOT H5_SIZEOF_OFF64_T)
-
-if (NOT WINDOWS)
- #-----------------------------------------------------------------------------
- # Check if the dev_t type is a scalar type
- #-----------------------------------------------------------------------------
- HDF5_FUNCTION_TEST (DEV_T_IS_SCALAR)
-
- # ----------------------------------------------------------------------
- # Check for MONOTONIC_TIMER support (used in clock_gettime). This has
- # to be done after any POSIX/BSD defines to ensure that the test gets
- # the correct POSIX level on linux.
- CHECK_VARIABLE_EXISTS (CLOCK_MONOTONIC HAVE_CLOCK_MONOTONIC)
-
- #-----------------------------------------------------------------------------
- # Check a bunch of time functions
- #-----------------------------------------------------------------------------
- foreach (test
- HAVE_TM_GMTOFF
- HAVE___TM_GMTOFF
-# HAVE_TIMEZONE
- HAVE_STRUCT_TIMEZONE
- GETTIMEOFDAY_GIVES_TZ
- TIME_WITH_SYS_TIME
- HAVE_TM_ZONE
- HAVE_STRUCT_TM_TM_ZONE
- )
- HDF5_FUNCTION_TEST (${test})
- endforeach (test)
- if (NOT CYGWIN AND NOT MINGW)
- HDF5_FUNCTION_TEST (HAVE_TIMEZONE)
-# HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
- endif (NOT CYGWIN AND NOT MINGW)
-
- # ----------------------------------------------------------------------
- # Does the struct stat have the st_blocks field? This field is not Posix.
- #
- HDF5_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
-
- # ----------------------------------------------------------------------
- # How do we figure out the width of a tty in characters?
- #
- CHECK_FUNCTION_EXISTS (ioctl H5_HAVE_IOCTL)
- HDF5_FUNCTION_TEST (HAVE_STRUCT_VIDEOCONFIG)
- HDF5_FUNCTION_TEST (HAVE_STRUCT_TEXT_INFO)
- CHECK_FUNCTION_EXISTS (_getvideoconfig H5_HAVE__GETVIDEOCONFIG)
- CHECK_FUNCTION_EXISTS (gettextinfo H5_HAVE_GETTEXTINFO)
- CHECK_FUNCTION_EXISTS (_scrsize H5_HAVE__SCRSIZE)
- if (NOT CYGWIN AND NOT MINGW)
- CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo H5_HAVE_GETCONSOLESCREENBUFFERINFO)
- endif (NOT CYGWIN AND NOT MINGW)
- CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" H5_HAVE_TIOCGWINSZ)
- CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" H5_HAVE_TIOCGETD)
-endif (NOT WINDOWS)
-
-#-----------------------------------------------------------------------------
-# Check for some functions that are used
-#
-CHECK_FUNCTION_EXISTS (alarm H5_HAVE_ALARM)
-#CHECK_FUNCTION_EXISTS (BSDgettimeofday H5_HAVE_BSDGETTIMEOFDAY)
-CHECK_FUNCTION_EXISTS (fork H5_HAVE_FORK)
-CHECK_FUNCTION_EXISTS (frexpf H5_HAVE_FREXPF)
-CHECK_FUNCTION_EXISTS (frexpl H5_HAVE_FREXPL)
-
-CHECK_FUNCTION_EXISTS (gethostname H5_HAVE_GETHOSTNAME)
-CHECK_FUNCTION_EXISTS (getpwuid H5_HAVE_GETPWUID)
-CHECK_FUNCTION_EXISTS (getrusage H5_HAVE_GETRUSAGE)
-CHECK_FUNCTION_EXISTS (lstat H5_HAVE_LSTAT)
-
-CHECK_FUNCTION_EXISTS (rand_r H5_HAVE_RAND_R)
-CHECK_FUNCTION_EXISTS (random H5_HAVE_RANDOM)
-CHECK_FUNCTION_EXISTS (setsysinfo H5_HAVE_SETSYSINFO)
-
-CHECK_FUNCTION_EXISTS (signal H5_HAVE_SIGNAL)
-CHECK_FUNCTION_EXISTS (longjmp H5_HAVE_LONGJMP)
-CHECK_FUNCTION_EXISTS (setjmp H5_HAVE_SETJMP)
-CHECK_FUNCTION_EXISTS (siglongjmp H5_HAVE_SIGLONGJMP)
-CHECK_FUNCTION_EXISTS (sigsetjmp H5_HAVE_SIGSETJMP)
-CHECK_FUNCTION_EXISTS (sigaction H5_HAVE_SIGACTION)
-CHECK_FUNCTION_EXISTS (sigprocmask H5_HAVE_SIGPROCMASK)
-
-CHECK_FUNCTION_EXISTS (snprintf H5_HAVE_SNPRINTF)
-CHECK_FUNCTION_EXISTS (srandom H5_HAVE_SRANDOM)
-CHECK_FUNCTION_EXISTS (strdup H5_HAVE_STRDUP)
-CHECK_FUNCTION_EXISTS (symlink H5_HAVE_SYMLINK)
-CHECK_FUNCTION_EXISTS (system H5_HAVE_SYSTEM)
-
-CHECK_FUNCTION_EXISTS (tmpfile H5_HAVE_TMPFILE)
-CHECK_FUNCTION_EXISTS (vasprintf H5_HAVE_VASPRINTF)
-CHECK_FUNCTION_EXISTS (waitpid H5_HAVE_WAITPID)
-
-CHECK_FUNCTION_EXISTS (vsnprintf H5_HAVE_VSNPRINTF)
-if (NOT WINDOWS)
- if (H5_HAVE_VSNPRINTF)
- HDF5_FUNCTION_TEST (VSNPRINTF_WORKS)
- endif (H5_HAVE_VSNPRINTF)
-endif (NOT WINDOWS)
-
-#-----------------------------------------------------------------------------
-# sigsetjmp is special; may actually be a macro
-#-----------------------------------------------------------------------------
-if (NOT H5_HAVE_SIGSETJMP)
- if (H5_HAVE_SETJMP_H)
- CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" H5_HAVE_MACRO_SIGSETJMP)
- if (H5_HAVE_MACRO_SIGSETJMP)
- set (H5_HAVE_SIGSETJMP 1)
- endif (H5_HAVE_MACRO_SIGSETJMP)
- endif (H5_HAVE_SETJMP_H)
-endif (NOT H5_HAVE_SIGSETJMP)
-
-#-----------------------------------------------------------------------------
-# Check for Symbols
-CHECK_SYMBOL_EXISTS (tzname "time.h" H5_HAVE_DECL_TZNAME)
-
-#-----------------------------------------------------------------------------
-# Check a bunch of other functions
-#-----------------------------------------------------------------------------
-if (NOT WINDOWS)
- foreach (test
- LONE_COLON
- HAVE_ATTRIBUTE
- HAVE_C99_FUNC
- HAVE_FUNCTION
- HAVE_C99_DESIGNATED_INITIALIZER
- SYSTEM_SCOPE_THREADS
- HAVE_SOCKLEN_T
- CXX_HAVE_OFFSETOF
- )
- HDF5_FUNCTION_TEST (${test})
- endforeach (test)
-endif (NOT WINDOWS)
-
-# For other CXX specific tests, use this MACRO.
-MACRO (HDF5_CXX_FUNCTION_TEST OTHER_TEST)
- if ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "-D${OTHER_TEST} ${CMAKE_REQUIRED_FLAGS}")
- set (OTHER_TEST_ADD_LIBRARIES)
- if (CMAKE_REQUIRED_LIBRARIES)
- set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif (CMAKE_REQUIRED_LIBRARIES)
-
- foreach (def ${HDF5_EXTRA_TEST_DEFINITIONS})
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}=${${def}}")
- endforeach (def)
-
- foreach (def
- HAVE_SYS_TIME_H
- HAVE_UNISTD_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_SOCKET_H
- )
- if ("${H5_${def}}")
- set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ("${H5_${def}}")
- endforeach (def)
-
- if (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif (LARGEFILE)
-
- #message (STATUS "Performing ${OTHER_TEST}")
- TRY_COMPILE (${OTHER_TEST}
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/HDF5CXXTests.cpp
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- "${OTHER_TEST_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
- if ("${OTHER_TEST}" EQUAL 0)
- set (${OTHER_TEST} 1 CACHE INTERNAL "CXX test ${FUNCTION}")
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Success")
- else ("${OTHER_TEST}" EQUAL 0)
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
- set (${OTHER_TEST} "" CACHE INTERNAL "CXX test ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Performing CXX Test ${OTHER_TEST} failed with the following output:\n"
- "${OUTPUT}\n"
- )
- endif ("${OTHER_TEST}" EQUAL 0)
- endif ("${OTHER_TEST}" MATCHES "^${OTHER_TEST}$")
-ENDMACRO (HDF5_CXX_FUNCTION_TEST)
-
-#-----------------------------------------------------------------------------
-# Check a bunch of cxx functions
-#-----------------------------------------------------------------------------
-if (CMAKE_CXX_COMPILER_LOADED)
- foreach (test
- OLD_HEADER_FILENAME
- H5_NO_NAMESPACE
- H5_NO_STD
- BOOL_NOTDEFINED
- NO_STATIC_CAST
- )
- HDF5_CXX_FUNCTION_TEST (${test})
- endforeach (test)
-endif (CMAKE_CXX_COMPILER_LOADED)
-
-#-----------------------------------------------------------------------------
# Check if Direct I/O driver works
#-----------------------------------------------------------------------------
if (NOT WINDOWS)
@@ -782,14 +186,14 @@ if (NOT WINDOWS)
set (msg "Performing TEST_DIRECT_VFD_WORKS")
set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}")
TRY_RUN (TEST_DIRECT_VFD_WORKS_RUN TEST_DIRECT_VFD_WORKS_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_EXT_DIR}/HDFTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
OUTPUT_VARIABLE OUTPUT
)
if (TEST_DIRECT_VFD_WORKS_COMPILE)
if (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
- HDF5_FUNCTION_TEST (HAVE_DIRECT)
+ HDF_FUNCTION_TEST (HAVE_DIRECT)
set (CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE")
add_definitions ("-D_GNU_SOURCE")
else (TEST_DIRECT_VFD_WORKS_RUN MATCHES 0)
@@ -809,148 +213,6 @@ if (NOT WINDOWS)
endif (HDF5_ENABLE_DIRECT_VFD)
endif (NOT WINDOWS)
-#-----------------------------------------------------------------------------
-# Check if InitOnceExecuteOnce is available
-#-----------------------------------------------------------------------------
-if (WINDOWS)
- if (NOT HDF5_NO_IOEO_TEST)
- message (STATUS "Checking for InitOnceExecuteOnce:")
- if ("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
- if (LARGEFILE)
- set (CMAKE_REQUIRED_DEFINITIONS
- "${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
- )
- endif (LARGEFILE)
- set (MACRO_CHECK_FUNCTION_DEFINITIONS
- "-DHAVE_IOEO ${CMAKE_REQUIRED_FLAGS}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- endif (CMAKE_REQUIRED_LIBRARIES)
- if (CMAKE_REQUIRED_INCLUDES)
- set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
- "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- else (CMAKE_REQUIRED_INCLUDES)
- set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
- endif (CMAKE_REQUIRED_INCLUDES)
-
- TRY_RUN(HAVE_IOEO_EXITCODE HAVE_IOEO_COMPILED
- ${CMAKE_BINARY_DIR}
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_FUNCTION_DEFINITIONS}
- -DCMAKE_SKIP_RPATH:BOOL=${CMAKE_SKIP_RPATH}
- "${CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES}"
- "${CHECK_C_SOURCE_COMPILES_ADD_INCLUDES}"
- COMPILE_OUTPUT_VARIABLE OUTPUT)
- # if it did not compile make the return value fail code of 1
- if (NOT HAVE_IOEO_COMPILED)
- set (HAVE_IOEO_EXITCODE 1)
- endif (NOT HAVE_IOEO_COMPILED)
- # if the return value was 0 then it worked
- if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- set (H5_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
- message (STATUS "Performing Test InitOnceExecuteOnce - Success")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
- "${OUTPUT}\n"
- "Return value: ${HAVE_IOEO}\n")
- else ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- if (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
- set (H5_HAVE_IOEO "${HAVE_IOEO_EXITCODE}")
- else (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
- set (H5_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
- endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
-
- message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Performing InitOnceExecuteOnce Test failed with the following output:\n"
- "${OUTPUT}\n"
- "Return value: ${HAVE_IOEO_EXITCODE}\n")
- endif ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
- endif ("${H5_HAVE_IOEO}" MATCHES "^${H5_HAVE_IOEO}$")
- endif (NOT HDF5_NO_IOEO_TEST)
-endif (WINDOWS)
-
-#-----------------------------------------------------------------------------
-# Determine how 'inline' is used
-#-----------------------------------------------------------------------------
-set (HDF5_EXTRA_TEST_DEFINITIONS INLINE_TEST_INLINE)
-foreach (inline_test inline __inline__ __inline)
- set (INLINE_TEST_INLINE ${inline_test})
- HDF5_FUNCTION_TEST (INLINE_TEST_${inline_test})
-endforeach (inline_test)
-
-set (HDF5_EXTRA_TEST_DEFINITIONS)
-if (INLINE_TEST___inline__)
- set (H5_inline __inline__)
-else (INLINE_TEST___inline__)
- if (INLINE_TEST___inline)
- set (H5_inline __inline)
- else (INLINE_TEST___inline)
- if (INLINE_TEST_inline)
- set (H5_inline inline)
- endif (INLINE_TEST_inline)
- endif (INLINE_TEST___inline)
-endif (INLINE_TEST___inline__)
-
-#-----------------------------------------------------------------------------
-# Check how to print a Long Long integer
-#-----------------------------------------------------------------------------
-if (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
- set (PRINT_LL_FOUND 0)
- message (STATUS "Checking for appropriate format for 64 bit long:")
- foreach (HDF5_PRINTF_LL l64 l L q I64 ll)
- set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH=${HDF5_PRINTF_LL}")
- if (H5_SIZEOF_LONG_LONG)
- set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- endif (H5_SIZEOF_LONG_LONG)
- TRY_RUN (HDF5_PRINTF_LL_TEST_RUN HDF5_PRINTF_LL_TEST_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/HDF5Tests.c
- CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CURRENT_TEST_DEFINITIONS}
- OUTPUT_VARIABLE OUTPUT
- )
- if (HDF5_PRINTF_LL_TEST_COMPILE)
- if (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- set (H5_PRINTF_LL_WIDTH "\"${HDF5_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
- set (PRINT_LL_FOUND 1)
- else (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- message ("Width with ${HDF5_PRINTF_LL} failed with result: ${HDF5_PRINTF_LL_TEST_RUN}")
- endif (HDF5_PRINTF_LL_TEST_RUN MATCHES 0)
- else (HDF5_PRINTF_LL_TEST_COMPILE)
- file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
- "Test H5_PRINTF_LL_WIDTH for ${HDF5_PRINTF_LL} failed with the following output:\n ${OUTPUT}\n"
- )
- endif (HDF5_PRINTF_LL_TEST_COMPILE)
- endforeach (HDF5_PRINTF_LL)
-
- if (PRINT_LL_FOUND)
- message (STATUS "Checking for apropriate format for 64 bit long: found ${H5_PRINTF_LL_WIDTH}")
- else (PRINT_LL_FOUND)
- message (STATUS "Checking for apropriate format for 64 bit long: not found")
- set (H5_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
- "Width for printf for type `long long' or `__int64', us. `ll"
- )
- endif (PRINT_LL_FOUND)
-endif (NOT H5_PRINTF_LL_WIDTH OR H5_PRINTF_LL_WIDTH MATCHES "unknown")
-
-# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can handle converting
-# denormalized floating-point values.
-# (This flag should be set for all machines, except for the Crays, where
-# the cache value is set in it's config file)
-#
-set (H5_CONVERT_DENORMAL_FLOAT 1)
-
-#-----------------------------------------------------------------------------
-# Are we going to use HSIZE_T
-#-----------------------------------------------------------------------------
-if (HDF5_ENABLE_HSIZET)
- set (H5_HAVE_LARGE_HSIZET 1)
-endif (HDF5_ENABLE_HSIZET)
#-----------------------------------------------------------------------------
# Macro to determine the various conversion capabilities
@@ -959,8 +221,8 @@ MACRO (H5ConversionTests TEST msg)
if ("${TEST}" MATCHES "^${TEST}$")
# message (STATUS "===> ${TEST}")
TRY_RUN (${TEST}_RUN ${TEST}_COMPILE
- ${HDF5_BINARY_DIR}/CMake
- ${HDF5_RESOURCES_DIR}/ConversionTests.c
+ ${CMAKE_BINARY_DIR}
+ ${HDF_RESOURCES_DIR}/ConversionTests.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=-D${TEST}_TEST
OUTPUT_VARIABLE OUTPUT
)
diff --git a/config/cmake/FindMPI.cmake b/config/cmake/FindMPI.cmake
deleted file mode 100644
index 1b67a30..0000000
--- a/config/cmake/FindMPI.cmake
+++ /dev/null
@@ -1,647 +0,0 @@
-# - Find a Message Passing Interface (MPI) implementation
-# The Message Passing Interface (MPI) is a library used to write
-# high-performance distributed-memory parallel applications, and
-# is typically deployed on a cluster. MPI is a standard interface
-# (defined by the MPI forum) for which many implementations are
-# available. All of them have somewhat different include paths,
-# libraries to link against, etc., and this module tries to smooth
-# out those differences.
-#
-# === Variables ===
-#
-# This module will set the following variables per language in your project,
-# where <lang> is one of C, CXX, or Fortran:
-# MPI_<lang>_FOUND TRUE if FindMPI found MPI flags for <lang>
-# MPI_<lang>_COMPILER MPI Compiler wrapper for <lang>
-# MPI_<lang>_COMPILE_FLAGS Compilation flags for MPI programs
-# MPI_<lang>_INCLUDE_PATH Include path(s) for MPI header
-# MPI_<lang>_LINK_FLAGS Linking flags for MPI programs
-# MPI_<lang>_LIBRARIES All libraries to link MPI programs against
-# Additionally, FindMPI sets the following variables for running MPI
-# programs from the command line:
-# MPIEXEC Executable for running MPI programs
-# MPIEXEC_NUMPROC_FLAG Flag to pass to MPIEXEC before giving
-# it the number of processors to run on
-# MPIEXEC_PREFLAGS Flags to pass to MPIEXEC directly
-# before the executable to run.
-# MPIEXEC_POSTFLAGS Flags to pass to MPIEXEC after other flags
-# === Usage ===
-#
-# To use this module, simply call FindMPI from a CMakeLists.txt file, or
-# run find_package(MPI), then run CMake. If you are happy with the auto-
-# detected configuration for your language, then you're done. If not, you
-# have two options:
-# 1. Set MPI_<lang>_COMPILER to the MPI wrapper (mpicc, etc.) of your
-# choice and reconfigure. FindMPI will attempt to determine all the
-# necessary variables using THAT compiler's compile and link flags.
-# 2. If this fails, or if your MPI implementation does not come with
-# a compiler wrapper, then set both MPI_<lang>_LIBRARIES and
-# MPI_<lang>_INCLUDE_PATH. You may also set any other variables
-# listed above, but these two are required. This will circumvent
-# autodetection entirely.
-# When configuration is successful, MPI_<lang>_COMPILER will be set to the
-# compiler wrapper for <lang>, if it was found. MPI_<lang>_FOUND and other
-# variables above will be set if any MPI implementation was found for <lang>,
-# regardless of whether a compiler was found.
-#
-# When using MPIEXEC to execute MPI applications, you should typically use
-# all of the MPIEXEC flags as follows:
-# ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} PROCS
-# ${MPIEXEC_PREFLAGS} EXECUTABLE ${MPIEXEC_POSTFLAGS} ARGS
-# where PROCS is the number of processors on which to execute the program,
-# EXECUTABLE is the MPI program, and ARGS are the arguments to pass to the
-# MPI program.
-#
-# === Backward Compatibility ===
-#
-# For backward compatibility with older versions of FindMPI, these
-# variables are set, but deprecated:
-# MPI_FOUND MPI_COMPILER MPI_LIBRARY
-# MPI_COMPILE_FLAGS MPI_INCLUDE_PATH MPI_EXTRA_LIBRARY
-# MPI_LINK_FLAGS MPI_LIBRARIES
-# In new projects, please use the MPI_<lang>_XXX equivalents.
-
-#=============================================================================
-# Copyright 2001-2011 Kitware, Inc.
-# Copyright 2010-2011 Todd Gamblin tgamblin@llnl.gov
-# Copyright 2001-2009 Dave Partyka
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-# include this to handle the QUIETLY and REQUIRED arguments
-include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
-include(GetPrerequisites)
-
-#
-# This part detects MPI compilers, attempting to wade through the mess of compiler names in
-# a sensible way.
-#
-# The compilers are detected in this order:
-#
-# 1. Try to find the most generic available MPI compiler, as this is usually set up by
-# cluster admins. e.g., if plain old mpicc is available, we'll use it and assume it's
-# the right compiler.
-#
-# 2. If a generic mpicc is NOT found, then we attempt to find one that matches
-# CMAKE_<lang>_COMPILER_ID. e.g. if you are using XL compilers, we'll try to find mpixlc
-# and company, but not mpiicc. This hopefully prevents toolchain mismatches.
-#
-# If you want to force a particular MPI compiler other than what we autodetect (e.g. if you
-# want to compile regular stuff with GNU and parallel stuff with Intel), you can always set
-# your favorite MPI_<lang>_COMPILER explicitly and this stuff will be ignored.
-#
-
-# Start out with the generic MPI compiler names, as these are most commonly used.
-set(_MPI_C_COMPILER_NAMES mpicc mpcc mpicc_r mpcc_r)
-set(_MPI_CXX_COMPILER_NAMES mpicxx mpiCC mpcxx mpCC mpic++ mpc++
- mpicxx_r mpiCC_r mpcxx_r mpCC_r mpic++_r mpc++_r)
-set(_MPI_Fortran_COMPILER_NAMES mpif95 mpif95_r mpf95 mpf95_r
- mpif90 mpif90_r mpf90 mpf90_r
- mpif77 mpif77_r mpf77 mpf77_r)
-
-# GNU compiler names
-set(_MPI_GNU_C_COMPILER_NAMES mpigcc mpgcc mpigcc_r mpgcc_r)
-set(_MPI_GNU_CXX_COMPILER_NAMES mpig++ mpg++ mpig++_r mpg++_r)
-set(_MPI_GNU_Fortran_COMPILER_NAMES mpigfortran mpgfortran mpigfortran_r mpgfortran_r
- mpig77 mpig77_r mpg77 mpg77_r)
-
-# Intel MPI compiler names
-set(_MPI_Intel_C_COMPILER_NAMES mpiicc)
-set(_MPI_Intel_CXX_COMPILER_NAMES mpiicpc mpiicxx mpiic++ mpiiCC)
-set(_MPI_Intel_Fortran_COMPILER_NAMES mpiifort mpiif95 mpiif90 mpiif77)
-
-# PGI compiler names
-set(_MPI_PGI_C_COMPILER_NAMES mpipgcc mppgcc)
-set(_MPI_PGI_CXX_COMPILER_NAMES mpipgCC mppgCC)
-set(_MPI_PGI_Fortran_COMPILER_NAMES mpipgf95 mpipgf90 mppgf95 mppgf90 mpipgf77 mppgf77)
-
-# XLC MPI Compiler names
-set(_MPI_XL_C_COMPILER_NAMES mpxlc mpxlc_r mpixlc mpixlc_r)
-set(_MPI_XL_CXX_COMPILER_NAMES mpixlcxx mpixlC mpixlc++ mpxlcxx mpxlc++ mpixlc++ mpxlCC
- mpixlcxx_r mpixlC_r mpixlc++_r mpxlcxx_r mpxlc++_r mpixlc++_r mpxlCC_r)
-set(_MPI_XL_Fortran_COMPILER_NAMES mpixlf95 mpixlf95_r mpxlf95 mpxlf95_r
- mpixlf90 mpixlf90_r mpxlf90 mpxlf90_r
- mpixlf77 mpixlf77_r mpxlf77 mpxlf77_r
- mpixlf mpixlf_r mpxlf mpxlf_r)
-
-# append vendor-specific compilers to the list if we either don't know the compiler id,
-# or if we know it matches the regular compiler.
-foreach (lang C CXX Fortran)
- foreach (id GNU Intel PGI XL)
- if (NOT CMAKE_${lang}_COMPILER_ID OR "${CMAKE_${lang}_COMPILER_ID}" STREQUAL "${id}")
- list(APPEND _MPI_${lang}_COMPILER_NAMES ${_MPI_${id}_${lang}_COMPILER_NAMES})
- endif()
- unset(_MPI_${id}_${lang}_COMPILER_NAMES) # clean up the namespace here
- endforeach()
-endforeach()
-
-
-# Names to try for MPI exec
-set(_MPI_EXEC_NAMES mpiexec mpirun lamexec srun)
-
-# Grab the path to MPI from the registry if we're on windows.
-set(_MPI_PREFIX_PATH)
-if(WIN32)
- list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
- list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
- list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/")
-endif()
-
-# Build a list of prefixes to search for MPI.
-foreach(SystemPrefixDir ${CMAKE_SYSTEM_PREFIX_PATH})
- foreach(MpiPackageDir ${_MPI_PREFIX_PATH})
- if(EXISTS ${SystemPrefixDir}/${MpiPackageDir})
- list(APPEND _MPI_PREFIX_PATH "${SystemPrefixDir}/${MpiPackageDir}")
- endif()
- endforeach()
-endforeach()
-
-
-#
-# interrogate_mpi_compiler(lang try_libs)
-#
-# Attempts to extract compiler and linker args from an MPI compiler. The arguments set
-# by this function are:
-#
-# MPI_<lang>_INCLUDE_PATH MPI_<lang>_LINK_FLAGS MPI_<lang>_FOUND
-# MPI_<lang>_COMPILE_FLAGS MPI_<lang>_LIBRARIES
-#
-# MPI_<lang>_COMPILER must be set beforehand to the absolute path to an MPI compiler for
-# <lang>. Additionally, MPI_<lang>_INCLUDE_PATH and MPI_<lang>_LIBRARIES may be set
-# to skip autodetection.
-#
-# If try_libs is TRUE, this will also attempt to find plain MPI libraries in the usual
-# way. In general, this is not as effective as interrogating the compilers, as it
-# ignores language-specific flags and libraries. However, some MPI implementations
-# (Windows implementations) do not have compiler wrappers, so this approach must be used.
-#
-function (interrogate_mpi_compiler lang try_libs)
- # MPI_${lang}_NO_INTERROGATE will be set to a compiler name when the *regular* compiler was
- # discovered to be the MPI compiler. This happens on machines like the Cray XE6 that use
- # modules to set cc, CC, and ftn to the MPI compilers. If the user force-sets another MPI
- # compiler, MPI_${lang}_COMPILER won't be equal to MPI_${lang}_NO_INTERROGATE, and we'll
- # inspect that compiler anew. This allows users to set new compilers w/o rm'ing cache.
- string(COMPARE NOTEQUAL "${MPI_${lang}_NO_INTERROGATE}" "${MPI_${lang}_COMPILER}" interrogate)
-
- # If MPI is set already in the cache, don't bother with interrogating the compiler.
- if (interrogate AND ((NOT MPI_${lang}_INCLUDE_PATH) OR (NOT MPI_${lang}_LIBRARIES)))
- if (MPI_${lang}_COMPILER)
- # Check whether the -showme:compile option works. This indicates that we have either OpenMPI
- # or a newer version of LAM-MPI, and implies that -showme:link will also work.
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:compile
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # If we appear to have -showme:compile, then we should
- # also have -showme:link. Try it.
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:link
- OUTPUT_VARIABLE MPI_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_LINK_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # We probably have -showme:incdirs and -showme:libdirs as well,
- # so grab that while we're at it.
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:incdirs
- OUTPUT_VARIABLE MPI_INCDIRS OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_INCDIRS ERROR_STRIP_TRAILING_WHITESPACE)
-
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme:libdirs
- OUTPUT_VARIABLE MPI_LIBDIRS OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_LIBDIRS ERROR_STRIP_TRAILING_WHITESPACE)
-
- else()
- # reset things here if something went wrong.
- set(MPI_COMPILE_CMDLINE)
- set(MPI_LINK_CMDLINE)
- endif()
- endif ()
-
- # Older versions of LAM-MPI have "-showme". Try to find that.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -showme
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
- endif()
-
- # MVAPICH uses -compile-info and -link-info. Try them.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -compile-info
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
-
- # If we have compile-info, also have link-info.
- if (MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -link-info
- OUTPUT_VARIABLE MPI_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_LINK_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
- endif()
-
- # make sure we got compile and link. Reset vars if something's wrong.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- set(MPI_COMPILE_CMDLINE)
- set(MPI_LINK_CMDLINE)
- endif()
- endif()
-
- # MPICH just uses "-show". Try it.
- if (NOT MPI_COMPILER_RETURN EQUAL 0)
- execute_process(
- COMMAND ${MPI_${lang}_COMPILER} -show
- OUTPUT_VARIABLE MPI_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
- ERROR_VARIABLE MPI_COMPILE_CMDLINE ERROR_STRIP_TRAILING_WHITESPACE
- RESULT_VARIABLE MPI_COMPILER_RETURN)
- endif()
-
- if (MPI_COMPILER_RETURN EQUAL 0)
- # We have our command lines, but we might need to copy MPI_COMPILE_CMDLINE
- # into MPI_LINK_CMDLINE, if we didn't find the link line.
- if (NOT MPI_LINK_CMDLINE)
- set(MPI_LINK_CMDLINE ${MPI_COMPILE_CMDLINE})
- endif()
- else()
- message(STATUS "Unable to determine MPI from MPI driver ${MPI_${lang}_COMPILER}")
- set(MPI_COMPILE_CMDLINE)
- set(MPI_LINK_CMDLINE)
- endif()
-
- # Here, we're done with the interrogation part, and we'll try to extract args we care
- # about from what we learned from the compiler wrapper scripts.
-
- # If interrogation came back with something, extract our variable from the MPI command line
- if (MPI_COMPILE_CMDLINE OR MPI_LINK_CMDLINE)
- # Extract compile flags from the compile command line.
- string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" MPI_ALL_COMPILE_FLAGS "${MPI_COMPILE_CMDLINE}")
- set(MPI_COMPILE_FLAGS_WORK)
-
- foreach(FLAG ${MPI_ALL_COMPILE_FLAGS})
- if (MPI_COMPILE_FLAGS_WORK)
- set(MPI_COMPILE_FLAGS_WORK "${MPI_COMPILE_FLAGS_WORK} ${FLAG}")
- else()
- set(MPI_COMPILE_FLAGS_WORK ${FLAG})
- endif()
- endforeach()
-
- # Extract include paths from compile command line
- string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" MPI_ALL_INCLUDE_PATHS "${MPI_COMPILE_CMDLINE}")
- foreach(IPATH ${MPI_ALL_INCLUDE_PATHS})
- string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
- string(REGEX REPLACE "//" "/" IPATH ${IPATH})
- list(APPEND MPI_INCLUDE_PATH_WORK ${IPATH})
- endforeach()
-
- # try using showme:incdirs if extracting didn't work.
- if (NOT MPI_INCLUDE_PATH_WORK)
- set(MPI_INCLUDE_PATH_WORK ${MPI_INCDIRS})
- separate_arguments(MPI_INCLUDE_PATH_WORK)
- endif()
-
- # If all else fails, just search for mpi.h in the normal include paths.
- if (NOT MPI_INCLUDE_PATH_WORK)
- set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_path(MPI_HEADER_PATH mpi.h
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include)
- set(MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH})
- endif()
-
- # Extract linker paths from the link command line
- string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_PATHS "${MPI_LINK_CMDLINE}")
- set(MPI_LINK_PATH)
- foreach(LPATH ${MPI_ALL_LINK_PATHS})
- string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
- string(REGEX REPLACE "//" "/" LPATH ${LPATH})
- list(APPEND MPI_LINK_PATH ${LPATH})
- endforeach()
-
- # try using showme:libdirs if extracting didn't work.
- if (NOT MPI_LINK_PATH)
- set(MPI_LINK_PATH ${MPI_LIBDIRS})
- separate_arguments(MPI_LINK_PATH)
- endif()
-
- # Extract linker flags from the link command line
- string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" MPI_ALL_LINK_FLAGS "${MPI_LINK_CMDLINE}")
- set(MPI_LINK_FLAGS_WORK)
- foreach(FLAG ${MPI_ALL_LINK_FLAGS})
- if (MPI_LINK_FLAGS_WORK)
- set(MPI_LINK_FLAGS_WORK "${MPI_LINK_FLAGS_WORK} ${FLAG}")
- else()
- set(MPI_LINK_FLAGS_WORK ${FLAG})
- endif()
- endforeach()
-
- # Extract the set of libraries to link against from the link command
- # line
- string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" MPI_LIBNAMES "${MPI_LINK_CMDLINE}")
- # add the compiler implicit directories because some compilers
- # such as the intel compiler have libraries that show up
- # in the showme list that can only be found in the implicit
- # link directories of the compiler. Do this for C++ and C
- # compilers if the implicit link directories are defined.
- if (DEFINED CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES)
- set(MPI_LINK_PATH
- "${MPI_LINK_PATH};${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}")
- endif ()
-
- if (DEFINED CMAKE_C_IMPLICIT_LINK_DIRECTORIES)
- set(MPI_LINK_PATH
- "${MPI_LINK_PATH};${CMAKE_C_IMPLICIT_LINK_DIRECTORIES}")
- endif ()
-
- # Determine full path names for all of the libraries that one needs
- # to link against in an MPI program
- foreach(LIB ${MPI_LIBNAMES})
- string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
- # MPI_LIB is cached by find_library, but we don't want that. Clear it first.
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB NAMES ${LIB} HINTS ${MPI_LINK_PATH})
-
- if (MPI_LIB)
- list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
- elseif (NOT MPI_FIND_QUIETLY)
- message(WARNING "Unable to find MPI library ${LIB}")
- endif()
- endforeach()
-
- # Sanity check MPI_LIBRARIES to make sure there are enough libraries
- list(LENGTH MPI_LIBRARIES_WORK MPI_NUMLIBS)
- list(LENGTH MPI_LIBNAMES MPI_NUMLIBS_EXPECTED)
- if (NOT MPI_NUMLIBS EQUAL MPI_NUMLIBS_EXPECTED)
- set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND")
- endif()
- endif()
-
- elseif(try_libs)
- # If we didn't have an MPI compiler script to interrogate, attempt to find everything
- # with plain old find functions. This is nasty because MPI implementations have LOTS of
- # different library names, so this section isn't going to be very generic. We need to
- # make sure it works for MS MPI, though, since there are no compiler wrappers for that.
- find_path(MPI_HEADER_PATH mpi.h
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES include Inc)
- set(MPI_INCLUDE_PATH_WORK ${MPI_HEADER_PATH})
-
- # Decide between 32-bit and 64-bit libraries for Microsoft's MPI
- if("${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
- set(MS_MPI_ARCH_DIR amd64)
- else()
- set(MS_MPI_ARCH_DIR i386)
- endif()
-
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB
- NAMES mpi mpich mpich2 msmpi
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
- set(MPI_LIBRARIES_WORK ${MPI_LIB})
-
- # Right now, we only know about the extra libs for C++.
- # We could add Fortran here (as there is usually libfmpich, etc.), but
- # this really only has to work with MS MPI on Windows.
- # Assume that other MPI's are covered by the compiler wrappers.
- if (${lang} STREQUAL CXX)
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB
- NAMES mpi++ mpicxx cxx mpi_cxx
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib)
- if (MPI_LIBRARIES_WORK AND MPI_LIB)
- list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
- endif()
- endif()
-
- if (${lang} STREQUAL Fortran)
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- find_library(MPI_LIB
- NAMES fmpi fmpich fmpich2 fmpich2g msmpifec msmpifmc
- HINTS ${_MPI_BASE_DIR} ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES lib lib/${MS_MPI_ARCH_DIR} Lib Lib/${MS_MPI_ARCH_DIR})
- if (MPI_LIBRARIES_WORK AND MPI_LIB)
- list(APPEND MPI_LIBRARIES_WORK ${MPI_LIB})
- endif()
- endif()
-
- if (NOT MPI_LIBRARIES_WORK)
- set(MPI_LIBRARIES_WORK "MPI_${lang}_LIBRARIES-NOTFOUND")
- endif()
- endif()
-
- # If we found MPI, set up all of the appropriate cache entries
- set(MPI_${lang}_COMPILE_FLAGS ${MPI_COMPILE_FLAGS_WORK} CACHE STRING "MPI ${lang} compilation flags" FORCE)
- set(MPI_${lang}_INCLUDE_PATH ${MPI_INCLUDE_PATH_WORK} CACHE STRING "MPI ${lang} include path" FORCE)
- set(MPI_${lang}_LINK_FLAGS ${MPI_LINK_FLAGS_WORK} CACHE STRING "MPI ${lang} linking flags" FORCE)
- set(MPI_${lang}_LIBRARIES ${MPI_LIBRARIES_WORK} CACHE STRING "MPI ${lang} libraries to link against" FORCE)
- mark_as_advanced(MPI_${lang}_COMPILE_FLAGS MPI_${lang}_INCLUDE_PATH MPI_${lang}_LINK_FLAGS MPI_${lang}_LIBRARIES)
-
- # clear out our temporary lib/header detectionv variable here.
- set(MPI_LIB "MPI_LIB-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI lib detection" FORCE)
- set(MPI_HEADER_PATH "MPI_HEADER_PATH-NOTFOUND" CACHE INTERNAL "Scratch variable for MPI header detection" FORCE)
- endif()
-
- # finally set a found variable for each MPI language
- if (MPI_${lang}_INCLUDE_PATH AND MPI_${lang}_LIBRARIES)
- set(MPI_${lang}_FOUND TRUE PARENT_SCOPE)
- else()
- set(MPI_${lang}_FOUND FALSE PARENT_SCOPE)
- endif()
-endfunction()
-
-
-# This function attempts to compile with the regular compiler, to see if MPI programs
-# work with it. This is a last ditch attempt after we've tried interrogating mpicc and
-# friends, and after we've tried to find generic libraries. Works on machines like
-# Cray XE6, where the modules environment changes what MPI version cc, CC, and ftn use.
-function(try_regular_compiler lang success)
- set(scratch_directory ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
- if (${lang} STREQUAL Fortran)
- set(test_file ${scratch_directory}/cmake_mpi_test.f90)
- file(WRITE ${test_file}
- "program hello\n"
- "include 'mpif.h'\n"
- "integer ierror\n"
- "call MPI_INIT(ierror)\n"
- "call MPI_FINALIZE(ierror)\n"
- "end\n")
- else()
- if (${lang} STREQUAL CXX)
- set(test_file ${scratch_directory}/cmake_mpi_test.cpp)
- else()
- set(test_file ${scratch_directory}/cmake_mpi_test.c)
- endif()
- file(WRITE ${test_file}
- "#include <mpi.h>\n"
- "int main(int argc, char **argv) {\n"
- " MPI_Init(&argc, &argv);\n"
- " MPI_Finalize();\n"
- "}\n")
- endif()
- try_compile(compiler_has_mpi ${scratch_directory} ${test_file})
- if (compiler_has_mpi)
- set(MPI_${lang}_NO_INTERROGATE ${CMAKE_${lang}_COMPILER} CACHE STRING "Whether to interrogate MPI ${lang} compiler" FORCE)
- set(MPI_${lang}_COMPILER ${CMAKE_${lang}_COMPILER} CACHE STRING "MPI ${lang} compiler" FORCE)
- set(MPI_${lang}_COMPILE_FLAGS "" CACHE STRING "MPI ${lang} compilation flags" FORCE)
- set(MPI_${lang}_INCLUDE_PATH "" CACHE STRING "MPI ${lang} include path" FORCE)
- set(MPI_${lang}_LINK_FLAGS "" CACHE STRING "MPI ${lang} linking flags" FORCE)
- set(MPI_${lang}_LIBRARIES "" CACHE STRING "MPI ${lang} libraries to link against" FORCE)
- endif()
- set(${success} ${compiler_has_mpi} PARENT_SCOPE)
- unset(compiler_has_mpi CACHE)
-endfunction()
-
-# End definitions, commence real work here.
-
-# Most mpi distros have some form of mpiexec which gives us something we can reliably look for.
-find_program(MPIEXEC
- NAMES ${_MPI_EXEC_NAMES}
- PATHS ${_MPI_PREFIX_PATH}
- PATH_SUFFIXES bin
- DOC "Executable for running MPI programs.")
-
-# call get_filename_component twice to remove mpiexec and the directory it exists in (typically bin).
-# This gives us a fairly reliable base directory to search for /bin /lib and /include from.
-get_filename_component(_MPI_BASE_DIR "${MPIEXEC}" PATH)
-get_filename_component(_MPI_BASE_DIR "${_MPI_BASE_DIR}" PATH)
-
-set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "Flag used by MPI to specify the number of processes for MPIEXEC; the next option will be the number of processes.")
-set(MPIEXEC_PREFLAGS "" CACHE STRING "These flags will be directly before the executable that is being run by MPIEXEC.")
-set(MPIEXEC_POSTFLAGS "" CACHE STRING "These flags will come after all flags given to MPIEXEC.")
-set(MPIEXEC_MAX_NUMPROCS "2" CACHE STRING "Maximum number of processors available to run MPI applications.")
-mark_as_advanced(MPIEXEC MPIEXEC_NUMPROC_FLAG MPIEXEC_PREFLAGS MPIEXEC_POSTFLAGS MPIEXEC_MAX_NUMPROCS)
-
-
-#=============================================================================
-# Backward compatibility input hacks. Propagate the FindMPI hints to C and
-# CXX if the respective new versions are not defined. Translate the old
-# MPI_LIBRARY and MPI_EXTRA_LIBRARY to respective MPI_${lang}_LIBRARIES.
-#
-# Once we find the new variables, we translate them back into their old
-# equivalents below.
-foreach (lang C CXX)
- # Old input variables.
- set(_MPI_OLD_INPUT_VARS COMPILER COMPILE_FLAGS INCLUDE_PATH LINK_FLAGS)
-
- # Set new vars based on their old equivalents, if the new versions are not already set.
- foreach (var ${_MPI_OLD_INPUT_VARS})
- if (NOT MPI_${lang}_${var} AND MPI_${var})
- set(MPI_${lang}_${var} "${MPI_${var}}")
- endif()
- endforeach()
-
- # Special handling for MPI_LIBRARY and MPI_EXTRA_LIBRARY, which we nixed in the
- # new FindMPI. These need to be merged into MPI_<lang>_LIBRARIES
- if (NOT MPI_${lang}_LIBRARIES AND (MPI_LIBRARY OR MPI_EXTRA_LIBRARY))
- set(MPI_${lang}_LIBRARIES ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
- endif()
-endforeach()
-#=============================================================================
-
-
-# This loop finds the compilers and sends them off for interrogation.
-foreach (lang C CXX Fortran)
- if (CMAKE_${lang}_COMPILER_WORKS)
- # If the user supplies a compiler *name* instead of an absolute path, assume that we need to find THAT compiler.
- if (MPI_${lang}_COMPILER)
- is_file_executable(MPI_${lang}_COMPILER MPI_COMPILER_IS_EXECUTABLE)
- if (NOT MPI_COMPILER_IS_EXECUTABLE)
- # Get rid of our default list of names and just search for the name the user wants.
- set(_MPI_${lang}_COMPILER_NAMES ${MPI_${lang}_COMPILER})
- set(MPI_${lang}_COMPILER "MPI_${lang}_COMPILER-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
- # If the user specifies a compiler, we don't want to try to search libraries either.
- set(try_libs FALSE)
- endif()
- else()
- set(try_libs TRUE)
- endif()
-
- find_program(MPI_${lang}_COMPILER
- NAMES ${_MPI_${lang}_COMPILER_NAMES}
- PATHS "${MPI_HOME}/bin" "$ENV{MPI_HOME}/bin" ${_MPI_PREFIX_PATH})
- interrogate_mpi_compiler(${lang} ${try_libs})
- mark_as_advanced(MPI_${lang}_COMPILER)
-
- # last ditch try -- if nothing works so far, just try running the regular compiler and
- # see if we can create an MPI executable.
- set(regular_compiler_worked 0)
- if (NOT MPI_${lang}_LIBRARIES OR NOT MPI_${lang}_INCLUDE_PATH)
- try_regular_compiler(${lang} regular_compiler_worked)
- endif()
-
- set(MPI_${lang}_FIND_QUIETLY ${MPI_FIND_QUIETLY})
- set(MPI_${lang}_FIND_REQUIRED ${MPI_FIND_REQUIRED})
- set(MPI_${lang}_FIND_VERSION ${MPI_FIND_VERSION})
- set(MPI_${lang}_FIND_VERSION_EXACT ${MPI_FIND_VERSION_EXACT})
-
- if (regular_compiler_worked)
- find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_COMPILER)
- else()
- find_package_handle_standard_args(MPI_${lang} DEFAULT_MSG MPI_${lang}_LIBRARIES MPI_${lang}_INCLUDE_PATH)
- endif()
- endif()
-endforeach()
-
-
-#=============================================================================
-# More backward compatibility stuff
-#
-# Bare MPI sans ${lang} vars are set to CXX then C, depending on what was found.
-# This mimics the behavior of the old language-oblivious FindMPI.
-set(_MPI_OLD_VARS FOUND COMPILER INCLUDE_PATH COMPILE_FLAGS LINK_FLAGS LIBRARIES)
-if (MPI_CXX_FOUND)
- foreach (var ${_MPI_OLD_VARS})
- set(MPI_${var} ${MPI_CXX_${var}})
- endforeach()
-elseif (MPI_C_FOUND)
- foreach (var ${_MPI_OLD_VARS})
- set(MPI_${var} ${MPI_C_${var}})
- endforeach()
-else()
- # Note that we might still have found Fortran, but you'll need to use MPI_Fortran_FOUND
- set(MPI_FOUND FALSE)
-endif()
-
-# Chop MPI_LIBRARIES into the old-style MPI_LIBRARY and MPI_EXTRA_LIBRARY, and set them in cache.
-if (MPI_LIBRARIES)
- list(GET MPI_LIBRARIES 0 MPI_LIBRARY_WORK)
- set(MPI_LIBRARY ${MPI_LIBRARY_WORK} CACHE FILEPATH "MPI library to link against" FORCE)
-else()
- set(MPI_LIBRARY "MPI_LIBRARY-NOTFOUND" CACHE FILEPATH "MPI library to link against" FORCE)
-endif()
-
-list(LENGTH MPI_LIBRARIES MPI_NUMLIBS)
-if (MPI_NUMLIBS GREATER 1)
- set(MPI_EXTRA_LIBRARY_WORK ${MPI_LIBRARIES})
- list(REMOVE_AT MPI_EXTRA_LIBRARY_WORK 0)
- set(MPI_EXTRA_LIBRARY ${MPI_EXTRA_LIBRARY_WORK} CACHE STRING "Extra MPI libraries to link against" FORCE)
-else()
- set(MPI_EXTRA_LIBRARY "MPI_EXTRA_LIBRARY-NOTFOUND" CACHE STRING "Extra MPI libraries to link against" FORCE)
-endif()
-#=============================================================================
-
-# unset these vars to cleanup namespace
-unset(_MPI_OLD_VARS)
-unset(_MPI_PREFIX_PATH)
-unset(_MPI_BASE_DIR)
-foreach (lang C CXX Fortran)
- unset(_MPI_${lang}_COMPILER_NAMES)
-endforeach()
diff --git a/config/cmake/FindSZIP.cmake b/config/cmake/FindSZIP.cmake
deleted file mode 100644
index f657cfa..0000000
--- a/config/cmake/FindSZIP.cmake
+++ /dev/null
@@ -1,179 +0,0 @@
-
-# - Find SZIP library
-# - Derived from the FindTiff.cmake that is included with cmake
-# Find the native SZIP includes and library
-# This module defines
-# SZIP_INCLUDE_DIRS, where to find tiff.h, etc.
-# SZIP_LIBRARIES, libraries to link against to use SZIP.
-# SZIP_FOUND, If false, do not try to use SZIP.
-# also defined, but not for general use are
-# SZIP_LIBRARY, where to find the SZIP library.
-# SZIP_LIBRARY_DEBUG - Debug version of SZIP library
-# SZIP_LIBRARY_RELEASE - Release Version of SZIP library
-
-# message (STATUS "Finding SZIP library and headers..." )
-
-############################################
-#
-# Check the existence of the libraries.
-#
-############################################
-# This macro was taken directly from the FindQt4.cmake file that is included
-# with the CMake distribution. This is NOT my work. All work was done by the
-# original authors of the FindQt4.cmake file. Only minor modifications were
-# made to remove references to Qt and make this file more generally applicable
-#########################################################################
-
-MACRO (SZIP_ADJUST_LIB_VARS basename)
- if (${basename}_INCLUDE_DIR)
-
- # if only the release version was found, set the debug variable also to the release version
- if (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
- set (${basename}_LIBRARY_DEBUG ${${basename}_LIBRARY_RELEASE})
- set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE})
- set (${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE})
- endif (${basename}_LIBRARY_RELEASE AND NOT ${basename}_LIBRARY_DEBUG)
-
- # if only the debug version was found, set the release variable also to the debug version
- if (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- set (${basename}_LIBRARY_RELEASE ${${basename}_LIBRARY_DEBUG})
- set (${basename}_LIBRARY ${${basename}_LIBRARY_DEBUG})
- set (${basename}_LIBRARIES ${${basename}_LIBRARY_DEBUG})
- endif (${basename}_LIBRARY_DEBUG AND NOT ${basename}_LIBRARY_RELEASE)
- if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
- # if the generator supports configuration types then set
- # optimized and debug libraries, or if the CMAKE_BUILD_TYPE has a value
- if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (${basename}_LIBRARY optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- # if there are no configuration types and CMAKE_BUILD_TYPE has no value
- # then just use the release libraries
- set (${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} )
- endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- endif (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
-
- set (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
-
- if (${basename}_LIBRARY)
- set (${basename}_FOUND 1)
- endif (${basename}_LIBRARY)
-
- endif (${basename}_INCLUDE_DIR )
-
- # Make variables changeble to the advanced user
- MARK_AS_ADVANCED (${basename}_LIBRARY ${basename}_LIBRARY_RELEASE ${basename}_LIBRARY_DEBUG ${basename}_INCLUDE_DIR )
-ENDMACRO (SZIP_ADJUST_LIB_VARS)
-
-
-# Look for the header file.
-set (SZIP_INCLUDE_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/include
- $ENV{SZIP_INSTALL}/include/szip
- /usr/include
- /usr/include/szip
-)
-
-set (SZIP_LIB_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/lib
- /usr/lib
-)
-
-set (SZIP_BIN_SEARCH_DIRS
- $ENV{SZIP_INSTALL}/bin
- /usr/bin
-)
-
-FIND_PATH (SZIP_INCLUDE_DIR
- NAMES szlib.h
- PATHS ${SZIP_INCLUDE_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-if (WIN32)
- set (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
- set (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
-else (WIN32)
- set (SZIP_SEARCH_DEBUG_NAMES "sz_d")
- set (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
-endif (WIN32)
-
-# Look for the library.
-FIND_LIBRARY (SZIP_LIBRARY_DEBUG
- NAMES ${SZIP_SEARCH_DEBUG_NAMES}
- PATHS ${SZIP_LIB_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-FIND_LIBRARY (SZIP_LIBRARY_RELEASE
- NAMES ${SZIP_SEARCH_RELEASE_NAMES}
- PATHS ${SZIP_LIB_SEARCH_DIRS}
- NO_DEFAULT_PATH
-)
-
-SZIP_ADJUST_LIB_VARS (SZIP)
-
-if (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- set (SZIP_FOUND 1)
- set (SZIP_LIBRARIES ${SZIP_LIBRARY})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
- if (SZIP_LIBRARY_DEBUG)
- GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_DEBUG} PATH)
- set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- elseif (SZIP_LIBRARY_RELEASE)
- GET_FILENAME_COMPONENT (SZIP_LIBRARY_PATH ${SZIP_LIBRARY_RELEASE} PATH)
- set (SZIP_LIB_DIR ${SZIP_LIBRARY_PATH})
- endif (SZIP_LIBRARY_DEBUG)
-
-else (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
- set (SZIP_FOUND 0)
- set (SZIP_LIBRARIES)
- set (SZIP_INCLUDE_DIRS)
-endif (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
-
-# Report the results.
-if (NOT SZIP_FOUND)
- set (SZIP_DIR_MESSAGE
- "SZip was not found. Make sure SZIP_LIBRARY and SZIP_INCLUDE_DIR are set or set the SZIP_INSTALL environment variable."
- )
- if (NOT SZIP_FIND_QUIETLY)
- message (STATUS "${SZIP_DIR_MESSAGE}")
- else (NOT SZIP_FIND_QUIETLY)
- if (SZIP_FIND_REQUIRED)
- message (FATAL_ERROR "SZip was NOT found and is Required by this project")
- endif (SZIP_FIND_REQUIRED)
- endif (NOT SZIP_FIND_QUIETLY)
-endif (NOT SZIP_FOUND)
-
-if (SZIP_FOUND)
- include (CheckSymbolExists)
- #############################################
- # Find out if SZIP was build using dll's
- #############################################
- # Save required variable
- set (CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
- set (CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
- # Add SZIP_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
- set (CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${SZIP_INCLUDE_DIRS}")
-
- CHECK_SYMBOL_EXISTS (SZIP_BUILT_AS_DYNAMIC_LIB "SZconfig.h" HAVE_SZIP_DLL)
-
- if (HAVE_SZIP_DLL STREQUAL "TRUE")
- set (HAVE_SZIP_DLL "1")
- endif (HAVE_SZIP_DLL STREQUAL "TRUE")
-
- # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
- set (CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
- set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
- #
- #############################################
-endif (SZIP_FOUND)
-
-if (FIND_SZIP_DEBUG)
- message (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
- message (STATUS "SZIP_INCLUDE_DIRS: ${SZIP_INCLUDE_DIRS}")
- message (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
- message (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
- message (STATUS "HAVE_SZIP_DLL: ${HAVE_SZIP_DLL}")
- message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-endif (FIND_SZIP_DEBUG)
diff --git a/config/cmake/GetTimeOfDayTest.cpp b/config/cmake/GetTimeOfDayTest.cpp
deleted file mode 100644
index 3b5bf60..0000000
--- a/config/cmake/GetTimeOfDayTest.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#if defined (TRY_SYS_TIME_H)
-#include <sys/time.h>
-/* #include <time.h> */
-#endif
-
-
-#if defined (TRY_TIME_H)
-#include <time.h>
-#endif
-
-int main(int argc, char **argv) {
- struct timeval t1;
- gettimeofday(&t1, 0x00);
- return 0;
-}
diff --git a/config/cmake/HDF5CXXTests.cpp b/config/cmake/HDF5CXXTests.cpp
deleted file mode 100644
index 7003cc8..0000000
--- a/config/cmake/HDF5CXXTests.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-
-#ifdef OLD_HEADER_FILENAME
-
-#include <iostream>
-
-int main(void) { return 0; }
-
-#endif
-
-
-#ifdef H5_NO_NAMESPACE
-
-namespace H5 {
-int fnord;
-}
-
-int main(void) {
- using namespace H5;
- fnord = 37;
- return 0;
-}
-
-#endif
-
-#ifdef H5_NO_STD
-
-#include <string>
-
-using namespace std;
-
-int main(void) {
- string myString("testing namespace std");
- return 0;
-}
-
-#endif
-
-#ifdef BOOL_NOTDEFINED
-int main(void) {
- bool flag;
- return 0;
-}
-
-#endif
-
-#ifdef NO_STATIC_CAST
-
-int main(void) {
- float test_float;
- int test_int;
- test_float = 37.0;
- test_int = static_cast <int> (test_float);
- return 0;
-}
-
-#endif
diff --git a/config/cmake/HDF5Tests.c b/config/cmake/HDF5Tests.c
deleted file mode 100644
index 355c06f..0000000
--- a/config/cmake/HDF5Tests.c
+++ /dev/null
@@ -1,479 +0,0 @@
-#define SIMPLE_TEST(x) int main(){ x; return 0; }
-
-#ifdef HAVE_C99_DESIGNATED_INITIALIZER
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int
-main ()
-{
-
- typedef struct
- {
- int x;
- union
- {
- int i;
- double d;
- }u;
- }di_struct_t;
- di_struct_t x =
- { 0,
- { .d = 0.0}};
- ;
- return 0;
-}
-
-#endif
-
-#ifdef HAVE_C99_FUNC
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
- const char *fname = __func__;
- ;
- return 0;
-}
-
-#endif
-
-#ifdef VSNPRINTF_WORKS
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-int test_vsnprintf(const char *fmt,...)
-{
- va_list ap;
- char *s = malloc(16);
- int ret;
-
- va_start(ap, fmt);
- ret=vsnprintf(s,16,"%s",ap);
- va_end(ap);
-
- return(ret!=42 ? 1 : 0);
-}
-
-int main(void)
-{
- return(test_vsnprintf("%s","A string that is longer than 16 characters"));
-}
-#endif
-
-
-#ifdef TIME_WITH_SYS_TIME
-/* Time with sys/time test */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-int
-main ()
-{
-if ((struct tm *) 0)
-return 0;
- ;
- return 0;
-}
-
-#endif
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-int main() { return 0; }
-#endif /* STDC_HEADERS */
-
-#ifdef HAVE_TM_ZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_zone);
-
-#endif /* HAVE_TM_ZONE */
-
-#ifdef HAVE_STRUCT_TM_TM_ZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_zone);
-
-#endif /* HAVE_STRUCT_TM_TM_ZONE */
-
-#ifdef HAVE_ATTRIBUTE
-
-#if 0
-static void test int __attribute((unused)) var)
-{
- int __attribute__((unused)) x = var;
-}
-
-int main(void)
-{
- test(19);
-}
-
-#else
-int
-main ()
-{
-int __attribute__((unused)) x
- ;
- return 0;
-}
-#endif
-
-
-#endif /* HAVE_ATTRIBUTE */
-
-#ifdef HAVE_FUNCTION
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
- extern "C"
-# endif
- int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-(void)__FUNCTION__
- ;
- return 0;
-}
-
-#endif /* HAVE_FUNCTION */
-
-#ifdef HAVE_TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE___TM_GMTOFF
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct tm tm; tm.__tm_gmtoff=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_TIMEZONE
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(timezone=0);
-
-#endif /* HAVE_TIMEZONE */
-
-#ifdef HAVE_STRUCT_TIMEZONE
-
-#include <sys/types.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#include <time.h>
-SIMPLE_TEST(struct timezone tz; tz.tz_minuteswest=0);
-
-#endif /* HAVE_STRUCT_TIMEZONE */
-
-#ifdef HAVE_STAT_ST_BLOCKS
-
-#include <sys/stat.h>
-SIMPLE_TEST(struct stat sb; sb.st_blocks=0);
-
-#endif /* HAVE_STAT_ST_BLOCKS */
-
-#ifdef PRINTF_LL_WIDTH
-
-#ifdef HAVE_LONG_LONG
-# define LL_TYPE long long
-#else /* HAVE_LONG_LONG */
-# define LL_TYPE __int64
-#endif /* HAVE_LONG_LONG */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(void)
-{
- char *llwidthArgs[] = { "l64", "l", "L", "q", "ll", NULL };
- char *s = malloc(128);
- char **currentArg = NULL;
- LL_TYPE x = (LL_TYPE)1048576 * (LL_TYPE)1048576;
- for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++)
- {
- char formatString[64];
- sprintf(formatString, "%%%sd", *currentArg);
- sprintf(s, formatString, x);
- if (strcmp(s, "1099511627776") == 0)
- {
- printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg);
- return 0;
- }
- }
- return 1;
-}
-
-#endif /* PRINTF_LL_WIDTH */
-
-#ifdef SYSTEM_SCOPE_THREADS
-#include <stdlib.h>
-#include <pthread.h>
-
-int main(void)
-{
- pthread_attr_t attribute;
- int ret;
-
- pthread_attr_init(&attribute);
- ret=pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM);
- if (ret==0)
- return 0;
- return 1;
-}
-
-#endif /* SYSTEM_SCOPE_THREADS */
-
-#ifdef HAVE_SOCKLEN_T
-
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-SIMPLE_TEST(socklen_t foo);
-
-#endif /* HAVE_SOCKLEN_T */
-
-#ifdef DEV_T_IS_SCALAR
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-int main ()
-{
- dev_t d1, d2;
- if(d1==d2)
- return 0;
- return 1;
-}
-
-#endif /* DEV_T_IS_SCALAR */
-
-#ifdef HAVE_OFF64_T
-#include <sys/types.h>
-int main()
-{
- off64_t n = 0;
- return (int)n;
-}
-#endif
-
-#ifdef HAVE_STAT64_STRUCT
-#include <sys/types.h>
-#include <sys/stat.h>],
-struct stat64 sb;
-int main()
-{
- return 0;
-}
-#endif
-
-#ifdef TEST_DIRECT_VFD_WORKS
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-int main(void)
-{
- int fid;
- if((fid=open("tst_file", O_CREAT | O_TRUNC | O_DIRECT, 0755))<0)
- return 1;
- close(fid);
- remove("tst_file");
- return 0;
-}
-#endif
-
-#ifdef HAVE_DIRECT
- SIMPLE_TEST(posix_memalign());
-#endif
-
-#ifdef TEST_LFS_WORKS
-/* Return 0 when LFS is available and 1 otherwise. */
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#define _LARGE_FILES
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <assert.h>
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
- /* check that off_t can hold 2^63 - 1 and perform basic operations... */
-#define OFF_T_64 (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- if (OFF_T_64 % 2147483647 != 1)
- return 1;
-
- /* stat breaks on SCO OpenServer */
- struct stat buf;
- stat( argv[0], &buf );
- if (!S_ISREG(buf.st_mode))
- return 2;
-
- FILE *file = fopen( argv[0], "r" );
- off_t offset = ftello( file );
- fseek( file, offset, SEEK_CUR );
- fclose( file );
- return 0;
-}
-#endif
-
-#ifdef GETTIMEOFDAY_GIVES_TZ
-#include <time.h>
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-int main(void)
-{
- struct timeval tv;
- struct timezone tz;
- tz.tz_minuteswest = 7777; /* Initialize to an unreasonable number */
- tz.tz_dsttime = 7;
- gettimeofday(&tv, &tz);
- /* Check whether the function returned any value at all */
- if(tz.tz_minuteswest == 7777 && tz.tz_dsttime == 7)
- return 1;
- else return 0;
-}
-#endif
-
-#ifdef LONE_COLON
-int main(int argc, char * argv)
-{
- return 0;
-}
-#endif
-
-#ifdef CXX_HAVE_OFFSETOF
-
-#include <stdio.h>
-#include <stddef.h>
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-# ifdef __cplusplus
-extern "C"
-# endif
-int FC_DUMMY_MAIN()
-{ return 1;}
-#endif
-#endif
-int
-main ()
-{
-
- struct index_st
- {
- unsigned char type;
- unsigned char num;
- unsigned int len;
- };
- typedef struct index_st index_t;
- int x,y;
- x = offsetof(struct index_st, len);
- y = offsetof(index_t, num)
-
- ;
- return 0;
-}
-
-#endif
-
-#ifdef HAVE_IOEO
-
-#include <windows.h>
-typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO);
-int main ()
-{
- PGNSI pGNSI;
- pGNSI = (PGNSI) GetProcAddress(
- GetModuleHandle(TEXT("kernel32.dll")),
- "InitOnceExecuteOnce");
- if(NULL == pGNSI)
- return 1;
- else
- return 0;
-}
-
-#endif /* HAVE_IOEO */
-
-#ifdef HAVE_STRUCT_VIDEOCONFIG
-
-SIMPLE_TEST(struct videoconfig w; w.numtextcols=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-#ifdef HAVE_STRUCT_TEXT_INFO
-
-SIMPLE_TEST(struct text_info w; w.screenwidth=0);
-
-#endif /* HAVE_TM_GMTOFF */
-
-
-#if defined( INLINE_TEST_inline ) || defined( INLINE_TEST___inline__ ) || defined( INLINE_TEST___inline )
-#ifndef __cplusplus
-typedef int foo_t;
-static INLINE_TEST_INLINE foo_t static_foo () { return 0; }
-INLINE_TEST_INLINE foo_t foo () {return 0; }
-int main() { return 0; }
-#endif
-
-#endif /* INLINE_TEST */
diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake
deleted file mode 100644
index e65ea21..0000000
--- a/config/cmake/HDF5UseFortran.cmake
+++ /dev/null
@@ -1,139 +0,0 @@
-#
-# This file provides functions for Fortran support.
-#
-#-------------------------------------------------------------------------------
-ENABLE_LANGUAGE (Fortran)
-
-#-----------------------------------------------------------------------------
-# Detect name mangling convention used between Fortran and C
-#-----------------------------------------------------------------------------
-include (FortranCInterface)
-FortranCInterface_HEADER (
- ${CMAKE_BINARY_DIR}/FCMangle.h
- MACRO_NAMESPACE "H5_FC_"
- SYMBOL_NAMESPACE "H5_FC_"
- SYMBOLS mysub mymod:my_sub
-)
-
-file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)")
-string (REGEX MATCH "H5_FC_GLOBAL\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
-set (H5_FC_FUNC "H5_FC_FUNC(name,NAME) ${CMAKE_MATCH_1}")
-
-file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)")
-string (REGEX MATCH "H5_FC_GLOBAL_\\(.*,.*\\) +(.*)" RESULT ${CONTENTS})
-set (H5_FC_FUNC_ "H5_FC_FUNC_(name,NAME) ${CMAKE_MATCH_1}")
-
-#-----------------------------------------------------------------------------
-# The provided CMake Fortran macros don't provide a general check function
-# so this one is used for a sizeof test.
-#-----------------------------------------------------------------------------
-MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- if (NOT DEFINED ${VARIABLE})
- message (STATUS "Testing Fortran ${FUNCTION}")
- if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
- "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif (CMAKE_REQUIRED_LIBRARIES)
- file (WRITE
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
- "${CODE}"
- )
- TRY_COMPILE (${VARIABLE}
- ${CMAKE_BINARY_DIR}
- ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
- CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}"
- OUTPUT_VARIABLE OUTPUT
- )
-
-# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-# message ( "Test result ${OUTPUT}")
-# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
-
- if (${VARIABLE})
- set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
- "Determining if the Fortran ${FUNCTION} exists passed with the following output:\n"
- "${OUTPUT}\n\n"
- )
- else (${VARIABLE})
- message (STATUS "Testing Fortran ${FUNCTION} - Fail")
- set (${VARIABLE} "" CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
- "Determining if the Fortran ${FUNCTION} exists failed with the following output:\n"
- "${OUTPUT}\n\n")
- endif (${VARIABLE})
- endif (NOT DEFINED ${VARIABLE})
-ENDMACRO (CHECK_FORTRAN_FEATURE)
-
-#-----------------------------------------------------------------------------
-# Configure Checks which require Fortran compilation must go in here
-# not in the main ConfigureChecks.cmake files, because if the user has
-# no Fortran compiler, problems arise.
-#
-# Be careful with leading spaces here, do not remove them.
-#-----------------------------------------------------------------------------
-CHECK_FORTRAN_FEATURE(sizeof
- "
- PROGRAM main
- i = sizeof(x)
- END PROGRAM
- "
- FORTRAN_HAVE_SIZEOF
-)
-
-CHECK_FORTRAN_FEATURE(RealIsNotDouble
- "
- MODULE type_mod
- INTERFACE h5t
- MODULE PROCEDURE h5t_real
- MODULE PROCEDURE h5t_dble
- END INTERFACE
- CONTAINS
- SUBROUTINE h5t_real(r)
- REAL :: r
- END SUBROUTINE h5t_real
- SUBROUTINE h5t_dble(d)
- DOUBLE PRECISION :: d
- END SUBROUTINE h5t_dble
- END MODULE type_mod
- PROGRAM main
- USE type_mod
- REAL :: r
- DOUBLE PRECISION :: d
- CALL h5t(r)
- CALL h5t(d)
- END PROGRAM main
- "
- FORTRAN_DEFAULT_REAL_NOT_DOUBLE
-)
-
-#-----------------------------------------------------------------------------
-# Checks if the ISO_C_BINDING module meets all the requirements
-#-----------------------------------------------------------------------------
-CHECK_FORTRAN_FEATURE(iso_c_binding
- "
- PROGRAM main
- USE iso_c_binding
- IMPLICIT NONE
- TYPE(C_PTR) :: ptr
- TYPE(C_FUNPTR) :: funptr
- INTEGER(C_INT64_T) :: c_int64_type
- CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr
- ptr = C_LOC(ichr(1:1))
- END PROGRAM
- "
- FORTRAN_HAVE_ISO_C_BINDING
-)
-
-#-----------------------------------------------------------------------------
-# Add debug information (intel Fortran : JB)
-#-----------------------------------------------------------------------------
-if (CMAKE_Fortran_COMPILER MATCHES ifort)
- if (WIN32)
- set (CMAKE_Fortran_FLAGS_DEBUG "/debug:full /dbglibs " CACHE "flags" STRING FORCE)
- set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG" CACHE "flags" STRING FORCE)
- endif (WIN32)
-endif (CMAKE_Fortran_COMPILER MATCHES ifort)
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
deleted file mode 100644
index 505a9d5..0000000
--- a/config/cmake/HDFLibMacros.cmake
+++ /dev/null
@@ -1,350 +0,0 @@
-#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
- # May need to build JPEG with PIC on x64 machines with gcc
- # Need to use CMAKE_ANSI_CFLAGS define so that compiler test works
-
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (JPEG
- SVN_REPOSITORY ${JPEG_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (JPEG
- URL ${JPEG_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
- )
- endif (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_GET_PROPERTY (JPEG BINARY_DIR SOURCE_DIR)
-
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (JPEG_LIB_NAME "jpeg_D")
- else (WIN32)
- set (JPEG_LIB_NAME "jpeg_debug")
- endif (WIN32)
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- set (JPEG_LIB_NAME "jpeg")
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
-
- # Create imported target szip
- ADD_LIBRARY(jpeg ${libtype} IMPORTED)
- ADD_DEPENDENCIES (jpeg JPEG)
-
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- if (MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}.lib"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- endif (MINGW)
- else (WIN32)
- if (CYGWIN)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (CYGWIN)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}${JPEG_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${JPEG_VERSION_STRING}"
- SOVERSION "${JPEG_VERSION_STRING}"
- )
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- else (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(jpeg PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${JPEG_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
-
-# include (${BINARY_DIR}/JPEG-targets.cmake)
- set (JPEG_LIBRARY "jpeg")
-
- set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
- set (JPEG_FOUND 1)
- set (JPEG_LIBRARIES ${JPEG_LIBRARY})
- set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_JPEG_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (PACKAGE_JPEG_LIBRARY compress_type)
- ADD_CUSTOM_TARGET (JPEG-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${JPEG_INCLUDE_DIR_GEN}/jconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${JPEG_INCLUDE_DIR_GEN}/jconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
- if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
- ADD_DEPENDENCIES (JPEG-GenHeader-Copy JPEG)
- endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_JPEG_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (SZIP
- SVN_REPOSITORY ${SZIP_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (SZIP
- URL ${SZIP_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- -DSZIP_ENABLE_ENCODING:BOOL=${encoding}
- )
- endif (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_GET_PROPERTY (SZIP BINARY_DIR SOURCE_DIR)
-
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (SZIP_LIB_NAME "szip_D")
- else (WIN32)
- set (SZIP_LIB_NAME "szip_debug")
- endif (WIN32)
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- set (SZIP_LIB_NAME "szip")
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
-
- # Create imported target szip
- ADD_LIBRARY(szip ${libtype} IMPORTED)
- ADD_DEPENDENCIES (szip SZIP)
-
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- if (MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}.lib"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- endif (MINGW)
- else (WIN32)
- if (CYGWIN)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (CYGWIN)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}${SZIP_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${SZIP_VERSION_STRING}"
- SOVERSION "${SZIP_VERSION_STRING}"
- )
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- else (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(szip PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${SZIP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
-
-# include (${BINARY_DIR}/SZIP-targets.cmake)
- set (SZIP_LIBRARY "szip")
-
- set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
- set (SZIP_FOUND 1)
- set (SZIP_LIBRARIES ${SZIP_LIBRARY})
- set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_SZIP_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (PACKAGE_SZIP_LIBRARY compress_type)
- ADD_CUSTOM_TARGET (SZIP-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${SZIP_INCLUDE_DIR_GEN}/SZconfig.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
- if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
- ADD_DEPENDENCIES (SZIP-GenHeader-Copy SZIP)
- endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_SZIP_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
- if (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_ADD (ZLIB
- SVN_REPOSITORY ${ZLIB_URL}
- # [SVN_REVISION rev]
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
- elseif (${compress_type} MATCHES "TGZ")
- EXTERNALPROJECT_ADD (ZLIB
- URL ${ZLIB_URL}
- URL_MD5 ""
- INSTALL_COMMAND ""
- CMAKE_ARGS
- -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
- -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
- -DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
- -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
- -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
- -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
- -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
- -DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
- )
- endif (${compress_type} MATCHES "SVN")
- EXTERNALPROJECT_GET_PROPERTY (ZLIB BINARY_DIR SOURCE_DIR)
-
- if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (ZLIB_LIB_NAME "zlib_D")
- else (WIN32)
- set (ZLIB_LIB_NAME "z_debug")
- endif (WIN32)
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
- if (WIN32)
- set (ZLIB_LIB_NAME "zlib")
- else (WIN32)
- set (ZLIB_LIB_NAME "z")
- endif (WIN32)
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
-
- # Create imported target szip
- ADD_LIBRARY(zlib ${libtype} IMPORTED)
- ADD_DEPENDENCIES (zlib ZLIB)
-
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- if (MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}.lib"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- endif (MINGW)
- else (WIN32)
- if (CYGWIN)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- )
- else (CYGWIN)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
- IMPORTED_SONAME "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${ZLIB_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${ZLIB_VERSION_STRING}"
- SOVERSION "${ZLIB_VERSION_STRING}"
- )
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- else (WIN32 AND NOT MINGW)
- SET_TARGET_PROPERTIES(zlib PROPERTIES
- IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${ZLIB_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- )
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
-
-# include (${BINARY_DIR}/ZLIB-targets.cmake)
- set (ZLIB_LIBRARY "zlib")
-
- set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
- set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
- set (ZLIB_FOUND 1)
- set (ZLIB_LIBRARIES ${ZLIB_LIBRARY})
- set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-ENDMACRO (EXTERNAL_ZLIB_LIBRARY)
-
-#-------------------------------------------------------------------------------
-MACRO (PACKAGE_ZLIB_LIBRARY compress_type)
- ADD_CUSTOM_TARGET (ZLIB-GenHeader-Copy ALL
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${ZLIB_INCLUDE_DIR_GEN}/zconf.h ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/
- COMMENT "Copying ${ZLIB_INCLUDE_DIR_GEN}/zconf.h to ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/"
- )
- set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
- if (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
- ADD_DEPENDENCIES (ZLIB-GenHeader-Copy ZLIB)
- endif (${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-ENDMACRO (PACKAGE_ZLIB_LIBRARY)
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
deleted file mode 100644
index 56fdf83..0000000
--- a/config/cmake/HDFMacros.cmake
+++ /dev/null
@@ -1,187 +0,0 @@
-#-------------------------------------------------------------------------------
-MACRO (SET_GLOBAL_VARIABLE name value)
- set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE)
-ENDMACRO (SET_GLOBAL_VARIABLE)
-
-#-------------------------------------------------------------------------------
-MACRO (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
- #set(source_group_path "Source/AIM/${NAME}")
- string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH})
- source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
-
- #-- The following is needed if we ever start to use OS X Frameworks but only
- #-- works on CMake 2.6 and greater
- #set_property (SOURCE ${HEADERS}
- # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
- #)
-ENDMACRO (IDE_GENERATED_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
- # install (FILES ${HEADERS}
- # DESTINATION include/R3D/${NAME}
- # COMPONENT Headers
- # )
-
- string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} )
- source_group (${source_group_path} FILES ${HEADERS} ${SOURCES})
-
- #-- The following is needed if we ever start to use OS X Frameworks but only
- #-- works on CMake 2.6 and greater
- #set_property (SOURCE ${HEADERS}
- # PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
- #)
-ENDMACRO (IDE_SOURCE_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_NAMING libtarget libtype)
- if (WIN32)
- if (${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}dll")
- endif (${libtype} MATCHES "SHARED")
- endif (WIN32)
-ENDMACRO (TARGET_NAMING)
-
-#-------------------------------------------------------------------------------
-MACRO (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
- if (WIN32 AND MSVC)
- get_target_property (target_name ${libtarget} RELWITHDEBINFO_OUTPUT_NAME)
- install (
- FILES
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${target_name}.pdb
- DESTINATION
- ${targetdestination}
- CONFIGURATIONS RelWithDebInfo
- COMPONENT ${targetcomponent}
- )
- endif (WIN32 AND MSVC)
-ENDMACRO (INSTALL_TARGET_PDB)
-
-#-------------------------------------------------------------------------------
-MACRO (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
- if (WIN32 AND MSVC)
- get_target_property (target_name ${progtarget} RELWITHDEBINFO_OUTPUT_NAME)
- get_target_property (target_prefix ${progtarget} PREFIX)
- install (
- FILES
- ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${target_prefix}${target_name}.pdb
- DESTINATION
- ${targetdestination}
- CONFIGURATIONS RelWithDebInfo
- COMPONENT ${targetcomponent}
- )
- endif (WIN32 AND MSVC)
-ENDMACRO (INSTALL_PROGRAM_PDB)
-
-#-------------------------------------------------------------------------------
-MACRO (HDF_SET_LIB_OPTIONS libtarget libname libtype)
- # message (STATUS "${libname} libtype: ${libtype}")
- if (${libtype} MATCHES "SHARED")
- if (WIN32)
- set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}_D")
- else (WIN32)
- set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}_debug")
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
- if (WIN32)
- set (LIB_RELEASE_NAME "lib${libname}")
- set (LIB_DEBUG_NAME "lib${libname}_D")
- else (WIN32)
- # if the generator supports configuration types or if the CMAKE_BUILD_TYPE has a value
- if (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (LIB_RELEASE_NAME "${libname}")
- set (LIB_DEBUG_NAME "${libname}_debug")
- else (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- set (LIB_RELEASE_NAME "lib${libname}")
- set (LIB_DEBUG_NAME "lib${libname}_debug")
- endif (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
- endif (WIN32)
- endif (${libtype} MATCHES "SHARED")
-
- set_target_properties (${libtarget}
- PROPERTIES
- DEBUG_OUTPUT_NAME ${LIB_DEBUG_NAME}
- RELEASE_OUTPUT_NAME ${LIB_RELEASE_NAME}
- MINSIZEREL_OUTPUT_NAME ${LIB_RELEASE_NAME}
- RELWITHDEBINFO_OUTPUT_NAME ${LIB_RELEASE_NAME}
- )
-
- #----- Use MSVC Naming conventions for Shared Libraries
- if (MINGW AND ${libtype} MATCHES "SHARED")
- set_target_properties (${libtarget}
- PROPERTIES
- IMPORT_SUFFIX ".lib"
- IMPORT_PREFIX ""
- PREFIX ""
- )
- endif (MINGW AND ${libtype} MATCHES "SHARED")
-
-ENDMACRO (HDF_SET_LIB_OPTIONS)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_C_PROPERTIES wintarget addcompileflags addlinkflags)
- if (MSVC)
- TARGET_MSVC_PROPERTIES (${wintarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- else (MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- else (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- endif (BUILD_SHARED_LIBS)
- endif (MSVC)
-ENDMACRO (TARGET_C_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_MSVC_PROPERTIES wintarget addcompileflags addlinkflags)
- if (MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- else (BUILD_SHARED_LIBS)
- set_target_properties (${wintarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "${addlinkflags}"
- )
- endif (BUILD_SHARED_LIBS)
- endif (MSVC)
-ENDMACRO (TARGET_MSVC_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_FORTRAN_PROPERTIES forttarget addcompileflags addlinkflags)
- if (WIN32)
- TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- endif (WIN32)
-ENDMACRO (TARGET_FORTRAN_PROPERTIES)
-
-#-------------------------------------------------------------------------------
-MACRO (TARGET_FORTRAN_WIN_PROPERTIES forttarget addcompileflags addlinkflags)
- if (MSVC)
- if (BUILD_SHARED_LIBS)
- set_target_properties (${forttarget}
- PROPERTIES
- COMPILE_FLAGS "/dll ${addcompileflags}"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
- )
- else (BUILD_SHARED_LIBS)
- set_target_properties (${forttarget}
- PROPERTIES
- COMPILE_FLAGS "${addcompileflags}"
- LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
- )
- endif (BUILD_SHARED_LIBS)
- endif (MSVC)
-ENDMACRO (TARGET_FORTRAN_WIN_PROPERTIES)
diff --git a/config/cmake/NSIS.InstallOptions.ini.in b/config/cmake/NSIS.InstallOptions.ini.in
deleted file mode 100644
index dc83c5a..0000000
--- a/config/cmake/NSIS.InstallOptions.ini.in
+++ /dev/null
@@ -1,37 +0,0 @@
-[Settings]
-NumFields=5
-
-[Field 1]
-Type=label
-Text=By default the @CPACK_PACKAGE_INSTALL_DIRECTORY@ directory path is added to the system PATH.
-Left=0
-Right=-1
-Top=0
-Bottom=20
-
-[Field 2]
-Type=radiobutton
-Text=Do not add @CPACK_PACKAGE_NAME@ to the system PATH
-Left=0
-Right=-1
-Top=30
-Bottom=40
-State=0
-
-[Field 3]
-Type=radiobutton
-Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for all users
-Left=0
-Right=-1
-Top=40
-Bottom=50
-State=1
-
-[Field 4]
-Type=radiobutton
-Text=Add @CPACK_PACKAGE_NAME@ to the system PATH for current user
-Left=0
-Right=-1
-Top=50
-Bottom=60
-State=0
diff --git a/config/cmake/NSIS.template.in b/config/cmake/NSIS.template.in
deleted file mode 100644
index ecced05..0000000
--- a/config/cmake/NSIS.template.in
+++ /dev/null
@@ -1,974 +0,0 @@
-; CPack install script designed for a nmake build
-
-;--------------------------------
-; You must define these values
-
- !define VERSION "@CPACK_PACKAGE_VERSION@"
- !define PATCH "@CPACK_PACKAGE_VERSION_PATCH@"
- !define INST_DIR "@CPACK_TEMPORARY_DIRECTORY@"
-
-;--------------------------------
-;Variables
-
- Var MUI_TEMP
- Var STARTMENU_FOLDER
- Var SV_ALLUSERS
- Var START_MENU
- Var DO_NOT_ADD_TO_PATH
- Var ADD_TO_PATH_ALL_USERS
- Var ADD_TO_PATH_CURRENT_USER
- Var INSTALL_DESKTOP
- Var IS_DEFAULT_INSTALLDIR
-;--------------------------------
-;Include Modern UI
-
- !include "MUI.nsh"
-
- ;Default installation folder
- InstallDir "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
-;--------------------------------
-;General
-
- ;Name and file
- Name "@CPACK_NSIS_PACKAGE_NAME@"
- OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
-
- ;Set compression
- SetCompressor @CPACK_NSIS_COMPRESSOR@
-
-@CPACK_NSIS_DEFINES@
-
- !include Sections.nsh
-
-;--- Component support macros: ---
-; The code for the add/remove functionality is from:
-; http://nsis.sourceforge.net/Add/Remove_Functionality
-; It has been modified slightly and extended to provide
-; inter-component dependencies.
-Var AR_SecFlags
-Var AR_RegFlags
-@CPACK_NSIS_SECTION_SELECTED_VARS@
-
-; Loads the "selected" flag for the section named SecName into the
-; variable VarName.
-!macro LoadSectionSelectedIntoVar SecName VarName
- SectionGetFlags ${${SecName}} $${VarName}
- IntOp $${VarName} $${VarName} & ${SF_SELECTED} ;Turn off all other bits
-!macroend
-
-; Loads the value of a variable... can we get around this?
-!macro LoadVar VarName
- IntOp $R0 0 + $${VarName}
-!macroend
-
-; Sets the value of a variable
-!macro StoreVar VarName IntValue
- IntOp $${VarName} 0 + ${IntValue}
-!macroend
-
-!macro InitSection SecName
- ; This macro reads component installed flag from the registry and
- ;changes checked state of the section on the components page.
- ;Input: section index constant name specified in Section command.
-
- ClearErrors
- ;Reading component status from registry
- ReadRegDWORD $AR_RegFlags HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" "Installed"
- IfErrors "default_${SecName}"
- ;Status will stay default if registry value not found
- ;(component was never installed)
- IntOp $AR_RegFlags $AR_RegFlags & ${SF_SELECTED} ;Turn off all other bits
- SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading default section flags
- IntOp $AR_SecFlags $AR_SecFlags & 0xFFFE ;Turn lowest (enabled) bit off
- IntOp $AR_SecFlags $AR_RegFlags | $AR_SecFlags ;Change lowest bit
-
- ; Note whether this component was installed before
- !insertmacro StoreVar ${SecName}_was_installed $AR_RegFlags
- IntOp $R0 $AR_RegFlags & $AR_RegFlags
-
- ;Writing modified flags
- SectionSetFlags ${${SecName}} $AR_SecFlags
-
- "default_${SecName}:"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-!macroend
-
-!macro FinishSection SecName
- ; This macro reads section flag set by user and removes the section
- ;if it is not selected.
- ;Then it writes component installed flag to registry
- ;Input: section index constant name specified in Section command.
-
- SectionGetFlags ${${SecName}} $AR_SecFlags ;Reading section flags
- ;Checking lowest bit:
- IntOp $AR_SecFlags $AR_SecFlags & ${SF_SELECTED}
- IntCmp $AR_SecFlags 1 "leave_${SecName}"
- ;Section is not selected:
- ;Calling Section uninstall macro and writing zero installed flag
- !insertmacro "Remove_${${SecName}}"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
- "Installed" 0
- Goto "exit_${SecName}"
-
- "leave_${SecName}:"
- ;Section is selected:
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@\Components\${SecName}" \
- "Installed" 1
-
- "exit_${SecName}:"
-!macroend
-
-!macro RemoveSection_CPack SecName
- ; This macro is used to call section's Remove_... macro
- ;from the uninstaller.
- ;Input: section index constant name specified in Section command.
-
- !insertmacro "Remove_${${SecName}}"
-!macroend
-
-; Determine whether the selection of SecName changed
-!macro MaybeSelectionChanged SecName
- !insertmacro LoadVar ${SecName}_selected
- SectionGetFlags ${${SecName}} $R1
- IntOp $R1 $R1 & ${SF_SELECTED} ;Turn off all other bits
-
- ; See if the status has changed:
- IntCmp $R0 $R1 "${SecName}_unchanged"
- !insertmacro LoadSectionSelectedIntoVar ${SecName} ${SecName}_selected
-
- IntCmp $R1 ${SF_SELECTED} "${SecName}_was_selected"
- !insertmacro "Deselect_required_by_${SecName}"
- goto "${SecName}_unchanged"
-
- "${SecName}_was_selected:"
- !insertmacro "Select_${SecName}_depends"
-
- "${SecName}_unchanged:"
-!macroend
-;--- End of Add/Remove macros ---
-
-;--------------------------------
-;Interface Settings
-
- !define MUI_HEADERIMAGE
- !define MUI_ABORTWARNING
-
-;--------------------------------
-; path functions
-
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-
-;----------------------------------------
-; based upon a script of "Written by KiCHiK 2003-01-18 05:57:02"
-;----------------------------------------
-!verbose 3
-!include "WinMessages.NSH"
-!verbose 4
-;====================================================
-; get_NT_environment
-; Returns: the selected environment
-; Output : head of the stack
-;====================================================
-!macro select_NT_profile UN
-Function ${UN}select_NT_profile
- StrCmp $ADD_TO_PATH_ALL_USERS "1" 0 environment_single
- DetailPrint "Selected environment for all users"
- Push "all"
- Return
- environment_single:
- DetailPrint "Selected environment for current user only."
- Push "current"
- Return
-FunctionEnd
-!macroend
-!insertmacro select_NT_profile ""
-!insertmacro select_NT_profile "un."
-;----------------------------------------------------
-!define NT_current_env 'HKCU "Environment"'
-!define NT_all_env 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
-
-!ifndef WriteEnvStr_RegKey
- !ifdef ALL_USERS
- !define WriteEnvStr_RegKey \
- 'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
- !else
- !define WriteEnvStr_RegKey 'HKCU "Environment"'
- !endif
-!endif
-
-; AddToPath - Adds the given dir to the search path.
-; Input - head of the stack
-; Note - Win9x systems requires reboot
-
-Function AddToPath
- Exch $0
- Push $1
- Push $2
- Push $3
-
- # don't add if the path doesn't exist
- IfFileExists "$0\*.*" "" AddToPath_done
-
- ReadEnvStr $1 PATH
- ; if the path is too long for a NSIS variable NSIS will return a 0
- ; length string. If we find that, then warn and skip any path
- ; modification as it will trash the existing path.
- StrLen $2 $1
- IntCmp $2 0 CheckPathLength_ShowPathWarning CheckPathLength_Done CheckPathLength_Done
- CheckPathLength_ShowPathWarning:
- Messagebox MB_OK|MB_ICONEXCLAMATION "Warning! PATH too long installer unable to modify PATH!"
- Goto AddToPath_done
- CheckPathLength_Done:
- Push "$1;"
- Push "$0;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$0\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- GetFullPathName /SHORT $3 $0
- Push "$1;"
- Push "$3;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
- Push "$1;"
- Push "$3\;"
- Call StrStr
- Pop $2
- StrCmp $2 "" "" AddToPath_done
-
- Call IsNT
- Pop $1
- StrCmp $1 1 AddToPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" a
- FileSeek $1 -1 END
- FileReadByte $1 $2
- IntCmp $2 26 0 +2 +2 # DOS EOF
- FileSeek $1 -1 END # write over EOF
- FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
- FileClose $1
- SetRebootFlag true
- Goto AddToPath_done
-
- AddToPath_NT:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" ReadAllKey
- ReadRegStr $1 ${NT_current_env} "PATH"
- Goto DoTrim
- ReadAllKey:
- ReadRegStr $1 ${NT_all_env} "PATH"
- DoTrim:
- StrCmp $1 "" AddToPath_NTdoIt
- Push $1
- Call Trim
- Pop $1
- StrCpy $0 "$1;$0"
- AddToPath_NTdoIt:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" WriteAllKey
- WriteRegExpandStr ${NT_current_env} "PATH" $0
- Goto DoSend
- WriteAllKey:
- WriteRegExpandStr ${NT_all_env} "PATH" $0
- DoSend:
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- AddToPath_done:
- Pop $3
- Pop $2
- Pop $1
- Pop $0
-FunctionEnd
-
-
-; RemoveFromPath - Remove a given dir from the path
-; Input: head of the stack
-
-Function un.RemoveFromPath
- Exch $0
- Push $1
- Push $2
- Push $3
- Push $4
- Push $5
- Push $6
-
- IntFmt $6 "%c" 26 # DOS EOF
-
- Call un.IsNT
- Pop $1
- StrCmp $1 1 unRemoveFromPath_NT
- ; Not on NT
- StrCpy $1 $WINDIR 2
- FileOpen $1 "$1\autoexec.bat" r
- GetTempFileName $4
- FileOpen $2 $4 w
- GetFullPathName /SHORT $0 $0
- StrCpy $0 "SET PATH=%PATH%;$0"
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoop:
- FileRead $1 $3
- StrCpy $5 $3 1 -1 # read last char
- StrCmp $5 $6 0 +2 # if DOS EOF
- StrCpy $3 $3 -1 # remove DOS EOF so we can compare
- StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
- StrCmp $3 "" unRemoveFromPath_dosLoopEnd
- FileWrite $2 $3
- Goto unRemoveFromPath_dosLoop
- unRemoveFromPath_dosLoopRemoveLine:
- SetRebootFlag true
- Goto unRemoveFromPath_dosLoop
-
- unRemoveFromPath_dosLoopEnd:
- FileClose $2
- FileClose $1
- StrCpy $1 $WINDIR 2
- Delete "$1\autoexec.bat"
- CopyFiles /SILENT $4 "$1\autoexec.bat"
- Delete $4
- Goto unRemoveFromPath_done
-
- unRemoveFromPath_NT:
- StrCmp $ADD_TO_PATH_ALL_USERS "1" unReadAllKey
- ReadRegStr $1 ${NT_current_env} "PATH"
- Goto unDoTrim
- unReadAllKey:
- ReadRegStr $1 ${NT_all_env} "PATH"
- unDoTrim:
- StrCpy $5 $1 1 -1 # copy last char
- StrCmp $5 ";" +2 # if last char != ;
- StrCpy $1 "$1;" # append ;
- Push $1
- Push "$0;"
- Call un.StrStr ; Find `$0;` in $1
- Pop $2 ; pos of our dir
- StrCmp $2 "" unRemoveFromPath_done
- ; else, it is in path
- # $0 - path to add
- # $1 - path var
- StrLen $3 "$0;"
- StrLen $4 $2
- StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
- StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
- StrCpy $3 $5$6
-
- StrCpy $5 $3 1 -1 # copy last char
- StrCmp $5 ";" 0 +2 # if last char == ;
- StrCpy $3 $3 -1 # remove last char
-
- StrCmp $ADD_TO_PATH_ALL_USERS "1" unWriteAllKey
- WriteRegExpandStr ${NT_current_env} "PATH" $3
- Goto unDoSend
- unWriteAllKey:
- WriteRegExpandStr ${NT_all_env} "PATH" $3
- unDoSend:
- SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
-
- unRemoveFromPath_done:
- Pop $6
- Pop $5
- Pop $4
- Pop $3
- Pop $2
- Pop $1
- Pop $0
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-; Uninstall sutff
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-###########################################
-# Utility Functions #
-###########################################
-
-;====================================================
-; IsNT - Returns 1 if the current system is NT, 0
-; otherwise.
-; Output: head of the stack
-;====================================================
-; IsNT
-; no input
-; output, top of the stack = 1 if NT or 0 if not
-;
-; Usage:
-; Call IsNT
-; Pop $R0
-; ($R0 at this point is 1 or 0)
-
-!macro IsNT un
-Function ${un}IsNT
- Push $0
- ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
- StrCmp $0 "" 0 IsNT_yes
- ; we are not NT.
- Pop $0
- Push 0
- Return
-
- IsNT_yes:
- ; NT!!!
- Pop $0
- Push 1
-FunctionEnd
-!macroend
-!insertmacro IsNT ""
-!insertmacro IsNT "un."
-
-; StrStr
-; input, top of stack = string to search for
-; top of stack-1 = string to search in
-; output, top of stack (replaces with the portion of the string remaining)
-; modifies no other variables.
-;
-; Usage:
-; Push "this is a long ass string"
-; Push "ass"
-; Call StrStr
-; Pop $R0
-; ($R0 at this point is "ass string")
-
-!macro StrStr un
-Function ${un}StrStr
-Exch $R1 ; st=haystack,old$R1, $R1=needle
- Exch ; st=old$R1,haystack
- Exch $R2 ; st=old$R1,old$R2, $R2=haystack
- Push $R3
- Push $R4
- Push $R5
- StrLen $R3 $R1
- StrCpy $R4 0
- ; $R1=needle
- ; $R2=haystack
- ; $R3=len(needle)
- ; $R4=cnt
- ; $R5=tmp
- loop:
- StrCpy $R5 $R2 $R3 $R4
- StrCmp $R5 $R1 done
- StrCmp $R5 "" done
- IntOp $R4 $R4 + 1
- Goto loop
-done:
- StrCpy $R1 $R2 "" $R4
- Pop $R5
- Pop $R4
- Pop $R3
- Pop $R2
- Exch $R1
-FunctionEnd
-!macroend
-!insertmacro StrStr ""
-!insertmacro StrStr "un."
-
-Function Trim ; Added by Pelaca
- Exch $R1
- Push $R2
-Loop:
- StrCpy $R2 "$R1" 1 -1
- StrCmp "$R2" " " RTrim
- StrCmp "$R2" "$\n" RTrim
- StrCmp "$R2" "$\r" RTrim
- StrCmp "$R2" ";" RTrim
- GoTo Done
-RTrim:
- StrCpy $R1 "$R1" -1
- Goto Loop
-Done:
- Pop $R2
- Exch $R1
-FunctionEnd
-
-Function ConditionalAddToRegisty
- Pop $0
- Pop $1
- StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
- WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" \
- "$1" "$0"
- ;MessageBox MB_OK "Set Registry: '$1' to '$0'"
- DetailPrint "Set install registry entry: '$1' to '$0'"
- ConditionalAddToRegisty_EmptyString:
-FunctionEnd
-
-;--------------------------------
-
-!ifdef CPACK_USES_DOWNLOAD
-Function DownloadFile
- IfFileExists $INSTDIR\* +2
- CreateDirectory $INSTDIR
- Pop $0
-
- ; Skip if already downloaded
- IfFileExists $INSTDIR\$0 0 +2
- Return
-
- StrCpy $1 "@CPACK_DOWNLOAD_SITE@"
-
- try_again:
- NSISdl::download "$1/$0" "$INSTDIR\$0"
-
- Pop $1
- StrCmp $1 "success" success
- StrCmp $1 "Cancelled" cancel
- MessageBox MB_OK "Download failed: $1"
- cancel:
- Return
- success:
-FunctionEnd
-!endif
-
-;--------------------------------
-; Installation types
-@CPACK_NSIS_INSTALLATION_TYPES@
-
-;--------------------------------
-; Component sections
-@CPACK_NSIS_COMPONENT_SECTIONS@
-
-;--------------------------------
-; Define some macro setting for the gui
-@CPACK_NSIS_INSTALLER_MUI_ICON_CODE@
-@CPACK_NSIS_INSTALLER_ICON_CODE@
-@CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC@
-@CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE@
-
-;--------------------------------
-;Pages
- !insertmacro MUI_PAGE_WELCOME
-
- !insertmacro MUI_PAGE_LICENSE "@CPACK_RESOURCE_FILE_LICENSE@"
- Page custom InstallOptionsPage
- !insertmacro MUI_PAGE_DIRECTORY
-
- ;Start Menu Folder Page Configuration
- !define MUI_STARTMENUPAGE_REGISTRY_ROOT "SHCTX"
- !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
- !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
- !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
-
- @CPACK_NSIS_PAGE_COMPONENTS@
-
- !insertmacro MUI_PAGE_INSTFILES
- !insertmacro MUI_PAGE_FINISH
-
- !insertmacro MUI_UNPAGE_CONFIRM
- !insertmacro MUI_UNPAGE_INSTFILES
-
-;--------------------------------
-;Languages
-
- !insertmacro MUI_LANGUAGE "English" ;first language is the default language
- !insertmacro MUI_LANGUAGE "Albanian"
- !insertmacro MUI_LANGUAGE "Arabic"
- !insertmacro MUI_LANGUAGE "Basque"
- !insertmacro MUI_LANGUAGE "Belarusian"
- !insertmacro MUI_LANGUAGE "Bosnian"
- !insertmacro MUI_LANGUAGE "Breton"
- !insertmacro MUI_LANGUAGE "Bulgarian"
- !insertmacro MUI_LANGUAGE "Croatian"
- !insertmacro MUI_LANGUAGE "Czech"
- !insertmacro MUI_LANGUAGE "Danish"
- !insertmacro MUI_LANGUAGE "Dutch"
- !insertmacro MUI_LANGUAGE "Estonian"
- !insertmacro MUI_LANGUAGE "Farsi"
- !insertmacro MUI_LANGUAGE "Finnish"
- !insertmacro MUI_LANGUAGE "French"
- !insertmacro MUI_LANGUAGE "German"
- !insertmacro MUI_LANGUAGE "Greek"
- !insertmacro MUI_LANGUAGE "Hebrew"
- !insertmacro MUI_LANGUAGE "Hungarian"
- !insertmacro MUI_LANGUAGE "Icelandic"
- !insertmacro MUI_LANGUAGE "Indonesian"
- !insertmacro MUI_LANGUAGE "Irish"
- !insertmacro MUI_LANGUAGE "Italian"
- !insertmacro MUI_LANGUAGE "Japanese"
- !insertmacro MUI_LANGUAGE "Korean"
- !insertmacro MUI_LANGUAGE "Kurdish"
- !insertmacro MUI_LANGUAGE "Latvian"
- !insertmacro MUI_LANGUAGE "Lithuanian"
- !insertmacro MUI_LANGUAGE "Luxembourgish"
- !insertmacro MUI_LANGUAGE "Macedonian"
- !insertmacro MUI_LANGUAGE "Malay"
- !insertmacro MUI_LANGUAGE "Mongolian"
- !insertmacro MUI_LANGUAGE "Norwegian"
- !insertmacro MUI_LANGUAGE "Polish"
- !insertmacro MUI_LANGUAGE "Portuguese"
- !insertmacro MUI_LANGUAGE "PortugueseBR"
- !insertmacro MUI_LANGUAGE "Romanian"
- !insertmacro MUI_LANGUAGE "Russian"
- !insertmacro MUI_LANGUAGE "Serbian"
- !insertmacro MUI_LANGUAGE "SerbianLatin"
- !insertmacro MUI_LANGUAGE "SimpChinese"
- !insertmacro MUI_LANGUAGE "Slovak"
- !insertmacro MUI_LANGUAGE "Slovenian"
- !insertmacro MUI_LANGUAGE "Spanish"
- !insertmacro MUI_LANGUAGE "Swedish"
- !insertmacro MUI_LANGUAGE "Thai"
- !insertmacro MUI_LANGUAGE "TradChinese"
- !insertmacro MUI_LANGUAGE "Turkish"
- !insertmacro MUI_LANGUAGE "Ukrainian"
- !insertmacro MUI_LANGUAGE "Welsh"
-
-
-;--------------------------------
-;Reserve Files
-
- ;These files should be inserted before other files in the data block
- ;Keep these lines before any File command
- ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
-
- ReserveFile "NSIS.InstallOptions.ini"
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
-
-;--------------------------------
-;Installer Sections
-
-Section "-Core installation"
- ;Use the entire tree produced by the INSTALL target. Keep the
- ;list of directories here in sync with the RMDir commands below.
- SetOutPath "$INSTDIR"
- @CPACK_NSIS_EXTRA_PREINSTALL_COMMANDS@
- @CPACK_NSIS_FULL_INSTALL@
-
- ;Store installation folder
- WriteRegStr SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "" $INSTDIR
-
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
- Push "DisplayName"
- Push "@CPACK_NSIS_DISPLAY_NAME@"
- Call ConditionalAddToRegisty
- Push "DisplayVersion"
- Push "@CPACK_PACKAGE_VERSION@"
- Call ConditionalAddToRegisty
- Push "Publisher"
- Push "@CPACK_PACKAGE_VENDOR@"
- Call ConditionalAddToRegisty
- Push "UninstallString"
- Push "$INSTDIR\Uninstall.exe"
- Call ConditionalAddToRegisty
- Push "NoRepair"
- Push "1"
- Call ConditionalAddToRegisty
-
- !ifdef CPACK_NSIS_ADD_REMOVE
- ;Create add/remove functionality
- Push "ModifyPath"
- Push "$INSTDIR\AddRemove.exe"
- Call ConditionalAddToRegisty
- !else
- Push "NoModify"
- Push "1"
- Call ConditionalAddToRegisty
- !endif
-
- ; Optional registration
- Push "DisplayIcon"
- Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
- Call ConditionalAddToRegisty
- Push "HelpLink"
- Push "@CPACK_NSIS_HELP_LINK@"
- Call ConditionalAddToRegisty
- Push "URLInfoAbout"
- Push "@CPACK_NSIS_URL_INFO_ABOUT@"
- Call ConditionalAddToRegisty
- Push "Contact"
- Push "@CPACK_NSIS_CONTACT@"
- Call ConditionalAddToRegisty
- !insertmacro MUI_INSTALLOPTIONS_READ $INSTALL_DESKTOP "NSIS.InstallOptions.ini" "Field 5" "State"
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
-
- ;Create shortcuts
- CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
-@CPACK_NSIS_CREATE_ICONS@
-@CPACK_NSIS_CREATE_ICONS_EXTRA@
- CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
-
- ;Read a value from an InstallOptions INI file
- !insertmacro MUI_INSTALLOPTIONS_READ $DO_NOT_ADD_TO_PATH "NSIS.InstallOptions.ini" "Field 2" "State"
- !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_ALL_USERS "NSIS.InstallOptions.ini" "Field 3" "State"
- !insertmacro MUI_INSTALLOPTIONS_READ $ADD_TO_PATH_CURRENT_USER "NSIS.InstallOptions.ini" "Field 4" "State"
-
- ; Write special uninstall registry entries
- Push "StartMenu"
- Push "$STARTMENU_FOLDER"
- Call ConditionalAddToRegisty
- Push "DoNotAddToPath"
- Push "$DO_NOT_ADD_TO_PATH"
- Call ConditionalAddToRegisty
- Push "AddToPathAllUsers"
- Push "$ADD_TO_PATH_ALL_USERS"
- Call ConditionalAddToRegisty
- Push "AddToPathCurrentUser"
- Push "$ADD_TO_PATH_CURRENT_USER"
- Call ConditionalAddToRegisty
- Push "InstallToDesktop"
- Push "$INSTALL_DESKTOP"
- Call ConditionalAddToRegisty
-
- !insertmacro MUI_STARTMENU_WRITE_END
-
-@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
-
-SectionEnd
-
-Section "-Add to path"
- Push $INSTDIR\bin
- StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 doNotAddToPath
- StrCmp $DO_NOT_ADD_TO_PATH "1" doNotAddToPath 0
- Call AddToPath
- doNotAddToPath:
-SectionEnd
-
-;--------------------------------
-; Create custom pages
-Function InstallOptionsPage
- !insertmacro MUI_HEADER_TEXT "Install Options" "Choose options for installing @CPACK_NSIS_PACKAGE_NAME@"
- !insertmacro MUI_INSTALLOPTIONS_DISPLAY "NSIS.InstallOptions.ini"
-
-FunctionEnd
-
-;--------------------------------
-; determine admin versus local install
-Function un.onInit
-
- ClearErrors
- UserInfo::GetName
- IfErrors noLM
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Admin group'
- Goto done
- StrCmp $1 "Power" 0 +3
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Power Users group'
- Goto done
-
- noLM:
- ;Get installation folder from registry if available
-
- done:
-
-FunctionEnd
-
-;--- Add/Remove callback functions: ---
-!macro SectionList MacroName
- ;This macro used to perform operation on multiple sections.
- ;List all of your components in following manner here.
-@CPACK_NSIS_COMPONENT_SECTION_LIST@
-!macroend
-
-Section -FinishComponents
- ;Removes unselected components and writes component status to registry
- !insertmacro SectionList "FinishSection"
-
-!ifdef CPACK_NSIS_ADD_REMOVE
- ; Get the name of the installer executable
- System::Call 'kernel32::GetModuleFileNameA(i 0, t .R0, i 1024) i r1'
- StrCpy $R3 $R0
-
- ; Strip off the last 13 characters, to see if we have AddRemove.exe
- StrLen $R1 $R0
- IntOp $R1 $R0 - 13
- StrCpy $R2 $R0 13 $R1
- StrCmp $R2 "AddRemove.exe" addremove_installed
-
- ; We're not running AddRemove.exe, so install it
- CopyFiles $R3 $INSTDIR\AddRemove.exe
-
- addremove_installed:
-!endif
-SectionEnd
-;--- End of Add/Remove callback functions ---
-
-;--------------------------------
-; Component dependencies
-Function .onSelChange
- !insertmacro SectionList MaybeSelectionChanged
-FunctionEnd
-
-;--------------------------------
-;Uninstaller Section
-
-Section "Uninstall"
- ReadRegStr $START_MENU SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "StartMenu"
- ;MessageBox MB_OK "Start menu is in: $START_MENU"
- ReadRegStr $DO_NOT_ADD_TO_PATH SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "DoNotAddToPath"
- ReadRegStr $ADD_TO_PATH_ALL_USERS SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathAllUsers"
- ReadRegStr $ADD_TO_PATH_CURRENT_USER SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "AddToPathCurrentUser"
- ;MessageBox MB_OK "Add to path: $DO_NOT_ADD_TO_PATH all users: $ADD_TO_PATH_ALL_USERS"
- ReadRegStr $INSTALL_DESKTOP SHCTX \
- "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "InstallToDesktop"
- ;MessageBox MB_OK "Install to desktop: $INSTALL_DESKTOP "
-
-@CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS@
-
- ;Remove files we installed.
- ;Keep the list of directories here in sync with the File commands above.
-@CPACK_NSIS_DELETE_FILES@
-@CPACK_NSIS_DELETE_DIRECTORIES@
-
-!ifdef CPACK_NSIS_ADD_REMOVE
- ;Remove the add/remove program
- Delete "$INSTDIR\AddRemove.exe"
-!endif
-
- ;Remove the uninstaller itself.
- Delete "$INSTDIR\Uninstall.exe"
- DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- ;Remove the installation directory if it is empty.
- RMDir "$INSTDIR"
-
- ; Remove the registry entries.
- DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- ; Removes all optional components
- !insertmacro SectionList "RemoveSection_CPack"
-
- !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
-
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS@
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- startMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors startMenuDeleteLoopDone
-
- StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
- startMenuDeleteLoopDone:
-
- ; If the user changed the shortcut, then untinstall may not work. This should
- ; try to fix it.
- StrCpy $MUI_TEMP "$START_MENU"
- Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
-@CPACK_NSIS_DELETE_ICONS_EXTRA@
-
- ;Delete empty start menu parent diretories
- StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
-
- secondStartMenuDeleteLoop:
- ClearErrors
- RMDir $MUI_TEMP
- GetFullPathName $MUI_TEMP "$MUI_TEMP\.."
-
- IfErrors secondStartMenuDeleteLoopDone
-
- StrCmp "$MUI_TEMP" "$SMPROGRAMS" secondStartMenuDeleteLoopDone secondStartMenuDeleteLoop
- secondStartMenuDeleteLoopDone:
-
- DeleteRegKey /ifempty SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
-
- Push $INSTDIR\bin
- StrCmp $DO_NOT_ADD_TO_PATH_ "1" doNotRemoveFromPath 0
- Call un.RemoveFromPath
- doNotRemoveFromPath:
-SectionEnd
-
-;--------------------------------
-; determine admin versus local install
-; Is install for "AllUsers" or "JustMe"?
-; Default to "JustMe" - set to "AllUsers" if admin or on Win9x
-; This function is used for the very first "custom page" of the installer.
-; This custom page does not show up visibly, but it executes prior to the
-; first visible page and sets up $INSTDIR properly...
-; Choose different default installation folder based on SV_ALLUSERS...
-; "Program Files" for AllUsers, "My Documents" for JustMe...
-
-Function .onInit
- StrCmp "@CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL@" "ON" 0 inst
-
- ReadRegStr $0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@" "UninstallString"
- StrCmp $0 "" inst
-
- MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \
- "@CPACK_NSIS_PACKAGE_NAME@ is already installed. $\n$\nDo you want to uninstall the old version before installing the new one?" \
- IDYES uninst IDNO inst
- Abort
-
-;Run the uninstaller
-uninst:
- ClearErrors
- StrLen $2 "\Uninstall.exe"
- StrCpy $3 $0 -$2 # remove "\Uninstall.exe" from UninstallString to get path
- ExecWait '$0 _?=$3' ;Do not copy the uninstaller to a temp file
-
- IfErrors uninst_failed inst
-uninst_failed:
- MessageBox MB_OK|MB_ICONSTOP "Uninstall failed."
- Abort
-
-
-inst:
- ; Reads components status for registry
- !insertmacro SectionList "InitSection"
-
- ; check to see if /D has been used to change
- ; the install directory by comparing it to the
- ; install directory that is expected to be the
- ; default
- StrCpy $IS_DEFAULT_INSTALLDIR 0
- StrCmp "$INSTDIR" "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@" 0 +2
- StrCpy $IS_DEFAULT_INSTALLDIR 1
-
- StrCpy $SV_ALLUSERS "JustMe"
- ; if default install dir then change the default
- ; if it is installed for JustMe
- StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "$DOCUMENTS\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
- ClearErrors
- UserInfo::GetName
- IfErrors noLM
- Pop $0
- UserInfo::GetAccountType
- Pop $1
- StrCmp $1 "Admin" 0 +4
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Admin group'
- StrCpy $SV_ALLUSERS "AllUsers"
- Goto done
- StrCmp $1 "Power" 0 +4
- SetShellVarContext all
- ;MessageBox MB_OK 'User "$0" is in the Power Users group'
- StrCpy $SV_ALLUSERS "AllUsers"
- Goto done
-
- noLM:
- StrCpy $SV_ALLUSERS "AllUsers"
- ;Get installation folder from registry if available
-
- done:
- StrCmp $SV_ALLUSERS "AllUsers" 0 +3
- StrCmp "$IS_DEFAULT_INSTALLDIR" "1" 0 +2
- StrCpy $INSTDIR "@CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@"
-
- StrCmp "@CPACK_NSIS_MODIFY_PATH@" "ON" 0 noOptionsPage
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT "NSIS.InstallOptions.ini"
-
- noOptionsPage:
-FunctionEnd
diff --git a/config/cmake/grepTest.cmake b/config/cmake/grepTest.cmake
deleted file mode 100644
index 579d855..0000000
--- a/config/cmake/grepTest.cmake
+++ /dev/null
@@ -1,64 +0,0 @@
-# grepTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-
-# arguments checking
-if (NOT TEST_PROGRAM)
- message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
- message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
-if (NOT TEST_FILTER)
- message (STATUS "Require TEST_FILTER to be defined")
-endif (NOT TEST_FILTER)
-if (NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_REFERENCE)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
- WORKING_DIRECTORY ${TEST_FOLDER}
- RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_OUTPUT}
- ERROR_FILE ${TEST_OUTPUT}.err
- OUTPUT_VARIABLE TEST_ERROR
- ERROR_VARIABLE TEST_ERROR
-)
-
-message (STATUS "COMMAND Result: ${TEST_RESULT}")
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-# now grep the output with the reference
-file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
-
-# TEST_REFERENCE should always be matched
-STRING(REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM})
-STRING(COMPARE EQUAL "${TEST_REFERENCE}" "${TEST_MATCH}" TEST_RESULT)
-if (${TEST_RESULT} STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did not contain ${TEST_REFERENCE}")
-endif (${TEST_RESULT} STREQUAL "0")
-
-STRING(REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
-if (${TEST_EXPECT} STREQUAL "1")
- # TEST_EXPECT (1) interperts TEST_FILTER as NOT to match
- STRING(LENGTH "${TEST_MATCH}" TEST_RESULT)
- if (NOT ${TEST_RESULT} STREQUAL "0")
- message (FATAL_ERROR "Failed: The output of ${TEST_PROGRAM} did contain ${TEST_FILTER}")
- endif (NOT ${TEST_RESULT} STREQUAL "0")
-endif (${TEST_EXPECT} STREQUAL "1")
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matched")
-
diff --git a/config/cmake/hdf.bmp b/config/cmake/hdf.bmp
deleted file mode 100644
index 9e9e4aa..0000000
--- a/config/cmake/hdf.bmp
+++ /dev/null
Binary files differ
diff --git a/config/cmake/hdf.icns b/config/cmake/hdf.icns
deleted file mode 100644
index 22afa2e..0000000
--- a/config/cmake/hdf.icns
+++ /dev/null
Binary files differ
diff --git a/config/cmake/hdf.ico b/config/cmake/hdf.ico
deleted file mode 100644
index 26abc96..0000000
--- a/config/cmake/hdf.ico
+++ /dev/null
Binary files differ
diff --git a/config/cmake/prunTest.cmake b/config/cmake/prunTest.cmake
deleted file mode 100644
index 3d5ec31..0000000
--- a/config/cmake/prunTest.cmake
+++ /dev/null
@@ -1,145 +0,0 @@
-# runTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-cmake_policy(SET CMP0007 NEW)
-
-# arguments checking
-if (NOT TEST_PROGRAM)
- message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
- message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
-#if (NOT TEST_FILTER)
-# message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-set (ERROR_APPEND 1)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-if (TEST_ENV_VAR)
- set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
- WORKING_DIRECTORY ${TEST_FOLDER}
- RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_OUTPUT}
- ERROR_FILE ${TEST_OUTPUT}.err
- OUTPUT_VARIABLE TEST_ERROR
- ERROR_VARIABLE TEST_ERROR
-)
-
-message (STATUS "COMMAND Result: ${TEST_RESULT}")
-
-file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
-file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-
-if (ERROR_APPEND)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND)
-
-if (TEST_APPEND)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
-endif (TEST_APPEND)
-
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-if (TEST_MASK)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK)
-
-if (TEST_MASK_MOD)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_MOD)
-
-if (TEST_MASK_ERROR)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_ERROR)
-
-if (TEST_FILTER)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_FILTER)
-
-#if (TEST_REF_FILTER)
-# message (STATUS "TEST_REF_FILTER: ${TEST_APPEND}${TEST_REF_FILTER}")
-# file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
-# STRING(REGEX REPLACE "${TEST_APPEND}" "${TEST_REF_FILTER}" TEST_STREAM "${TEST_STREAM}")
-# file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
-#endif (TEST_REF_FILTER)
-
-if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/P_${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
- endif (WIN32 AND NOT MINGW)
-
- # now compare the output with the reference
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/P_${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT ${TEST_RESULT} STREQUAL 0)
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- LIST (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/P_${TEST_REFERENCE} test_ref)
- LIST (LENGTH test_ref len_ref)
- if (NOT ${len_act} STREQUAL "0")
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- LIST (GET test_act ${line} str_act)
- LIST (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif (NOT "${str_act}" STREQUAL "")
- endif (NOT "${str_act}" STREQUAL "${str_ref}")
- endforeach (line RANGE 0 ${_FP_LEN})
- endif (NOT ${len_act} STREQUAL "0")
- if (NOT ${len_act} STREQUAL ${len_ref})
- set (TEST_RESULT 1)
- endif (NOT ${len_act} STREQUAL ${len_ref})
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
- # again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match P_${TEST_REFERENCE}")
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-endif (NOT TEST_SKIP_COMPARE)
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches P_${TEST_REFERENCE}")
-
diff --git a/config/cmake/runTest.cmake b/config/cmake/runTest.cmake
deleted file mode 100644
index 879426c..0000000
--- a/config/cmake/runTest.cmake
+++ /dev/null
@@ -1,193 +0,0 @@
-# runTest.cmake executes a command and captures the output in a file. File is then compared
-# against a reference file. Exit status of command can also be compared.
-cmake_policy(SET CMP0007 NEW)
-
-# arguments checking
-if (NOT TEST_PROGRAM)
- message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
-if (NOT TEST_FOLDER)
- message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
-if (NOT TEST_OUTPUT)
- message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
-if (NOT TEST_EXPECT)
- message (STATUS "Require TEST_EXPECT to be defined")
-endif (NOT TEST_EXPECT)
-#if (NOT TEST_FILTER)
-# message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
-if (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
- message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_SKIP_COMPARE AND NOT TEST_REFERENCE)
-
-if (NOT TEST_ERRREF)
- set (ERROR_APPEND 1)
-endif (NOT TEST_ERRREF)
-
-message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
-
-if (TEST_ENV_VAR)
- set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
-
-# run the test program, capture the stdout/stderr and the result var
-EXECUTE_PROCESS (
- COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
- WORKING_DIRECTORY ${TEST_FOLDER}
- RESULT_VARIABLE TEST_RESULT
- OUTPUT_FILE ${TEST_OUTPUT}
- ERROR_FILE ${TEST_OUTPUT}.err
- OUTPUT_VARIABLE TEST_ERROR
- ERROR_VARIABLE TEST_ERROR
-)
-
-message (STATUS "COMMAND Result: ${TEST_RESULT}")
-
-if (ERROR_APPEND)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND)
-
-if (TEST_APPEND)
- file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_RESULT}\n")
-endif (TEST_APPEND)
-
-# if the return value is !=${TEST_EXPECT} bail out
-if (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
- message ( FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
-endif (NOT ${TEST_RESULT} STREQUAL ${TEST_EXPECT})
-
-message (STATUS "COMMAND Error: ${TEST_ERROR}")
-
-if (TEST_MASK)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Storage:[^\n]+\n" "Storage: <details removed for portability>\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK)
-
-if (TEST_MASK_MOD)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "Modified:[^\n]+\n" "Modified: XXXX-XX-XX XX:XX:XX XXX\n" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_MASK_MOD)
-
-if (TEST_MASK_ERROR)
- if (NOT TEST_ERRREF)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- else (NOT TEST_ERRREF)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
- endif (NOT TEST_ERRREF)
- STRING(REGEX REPLACE "thread [0-9]*:" "thread (IDs):" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE ": ([^\n]*)[.]c " ": (file name) " TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE " line [0-9]*" " line (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "v[1-9]*[.][0-9]*[.]" "version (number)." TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "[1-9]*[.][0-9]*[.][0-9]*[^)]*" "version (number)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eget_auto[1-2]*" "H5Eget_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- STRING(REGEX REPLACE "H5Eset_auto[1-2]*" "H5Eset_auto(1 or 2)" TEST_STREAM "${TEST_STREAM}")
- if (NOT TEST_ERRREF)
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
- else (NOT TEST_ERRREF)
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
- endif (NOT TEST_ERRREF)
-endif (TEST_MASK_ERROR)
-
-if (TEST_FILTER)
- file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
- STRING(REGEX REPLACE "${TEST_FILTER}" "" TEST_STREAM "${TEST_STREAM}")
- file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (TEST_FILTER)
-
-if (NOT TEST_SKIP_COMPARE)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_REFERENCE} "${TEST_STREAM}")
- endif (WIN32 AND NOT MINGW)
-
- # now compare the output with the reference
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT ${TEST_RESULT} STREQUAL 0)
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT} test_act)
- LIST (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_REFERENCE} test_ref)
- LIST (LENGTH test_ref len_ref)
- if (NOT ${len_act} STREQUAL "0")
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- LIST (GET test_act ${line} str_act)
- LIST (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif (NOT "${str_act}" STREQUAL "")
- endif (NOT "${str_act}" STREQUAL "${str_ref}")
- endforeach (line RANGE 0 ${_FP_LEN})
- endif (NOT ${len_act} STREQUAL "0")
- if (NOT ${len_act} STREQUAL ${len_ref})
- set (TEST_RESULT 1)
- endif (NOT ${len_act} STREQUAL ${len_ref})
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
- # again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
- message (FATAL_ERROR "Failed: The output of ${TEST_OUTPUT} did not match ${TEST_REFERENCE}")
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- if (TEST_ERRREF)
- if (WIN32 AND NOT MINGW)
- file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM)
- file (WRITE ${TEST_FOLDER}/${TEST_ERRREF} "${TEST_STREAM}")
- endif (WIN32 AND NOT MINGW)
-
- # now compare the error output with the error reference
- EXECUTE_PROCESS (
- COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF}
- RESULT_VARIABLE TEST_RESULT
- )
- if (NOT ${TEST_RESULT} STREQUAL 0)
- set (TEST_RESULT 0)
- file (STRINGS ${TEST_FOLDER}/${TEST_OUTPUT}.err test_act)
- LIST (LENGTH test_act len_act)
- file (STRINGS ${TEST_FOLDER}/${TEST_ERRREF} test_ref)
- LIST (LENGTH test_ref len_ref)
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- if (NOT ${len_act} STREQUAL "0")
- MATH (EXPR _FP_LEN "${len_ref} - 1")
- foreach (line RANGE 0 ${_FP_LEN})
- LIST (GET test_act ${line} str_act)
- LIST (GET test_ref ${line} str_ref)
- if (NOT "${str_act}" STREQUAL "${str_ref}")
- if (NOT "${str_act}" STREQUAL "")
- set (TEST_RESULT 1)
- message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n")
- endif (NOT "${str_act}" STREQUAL "")
- endif (NOT "${str_act}" STREQUAL "${str_ref}")
- endforeach (line RANGE 0 ${_FP_LEN})
- endif (NOT ${len_act} STREQUAL "0")
- if (NOT ${len_act} STREQUAL ${len_ref})
- set (TEST_RESULT 1)
- endif (NOT ${len_act} STREQUAL ${len_ref})
- endif (NOT ${TEST_RESULT} STREQUAL 0)
-
- message (STATUS "COMPARE Result: ${TEST_RESULT}")
-
- # again, if return value is !=0 scream and shout
- if (NOT ${TEST_RESULT} STREQUAL 0)
- message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
- endif (NOT ${TEST_RESULT} STREQUAL 0)
- endif (TEST_ERRREF)
-endif (NOT TEST_SKIP_COMPARE)
-
-# everything went fine...
-message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")
diff --git a/config/cmake/version.plist.in b/config/cmake/version.plist.in
deleted file mode 100644
index 817d89e..0000000
--- a/config/cmake/version.plist.in
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-
-<plist version="1.0">
-<dict>
- <key>BuildVersion</key>
- <string>@CPACK_PACKAGE_VERSION_MAJOR@</string>
- <key>CFBundleShortVersionString</key>
- <string>@CPACK_APPLE_GUI_SHORT_VERSION_STRING@</string>
- <key>CFBundleVersion</key>
- <string>@CPACK_APPLE_GUI_SHORT_VERSION_STRING@</string>
- <key>ProjectName</key>
- <string>@CPACK_APPLE_GUI_BUNDLE_NAME@</string>
- <key>SourceVersion</key>
- <string>@CPACK_PACKAGE_VERSION_MINOR@</string>
-</dict>
-</plist>