summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-01-10 23:09:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-01-10 23:10:03 (GMT)
commite1bcae8a6a804490aa941a654e99b1dd18251411 (patch)
treeef2ea266500b5bfea473b15495d850c5640ab1ed /config/cmake_ext_mod
parenta4cd30d418838bee49ca112fdfbcc199889b4a21 (diff)
downloadhdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.zip
hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.gz
hdf5-e1bcae8a6a804490aa941a654e99b1dd18251411.tar.bz2
Update cmake min version and cmake command convention
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/CheckTypeSize.cmake22
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake198
-rw-r--r--config/cmake_ext_mod/FindSZIP.cmake39
-rw-r--r--config/cmake_ext_mod/HDFLibMacros.cmake34
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake104
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake10
-rw-r--r--config/cmake_ext_mod/grepTest.cmake20
-rw-r--r--config/cmake_ext_mod/prunTest.cmake80
-rw-r--r--config/cmake_ext_mod/runTest.cmake14
9 files changed, 260 insertions, 261 deletions
diff --git a/config/cmake_ext_mod/CheckTypeSize.cmake b/config/cmake_ext_mod/CheckTypeSize.cmake
index 5095a27..85b1c6c 100644
--- a/config/cmake_ext_mod/CheckTypeSize.cmake
+++ b/config/cmake_ext_mod/CheckTypeSize.cmake
@@ -10,21 +10,21 @@
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
+ 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)
+ endif ()
+ endforeach ()
message (STATUS "Check size of ${TYPE}")
if (CMAKE_REQUIRED_LIBRARIES)
- set (CHECK_TYPE_SIZE_ADD_LIBRARIES
+ set (CHECK_TYPE_SIZE_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}"
)
- endif (CMAKE_REQUIRED_LIBRARIES)
+ endif ()
try_run (${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/CheckTypeSize.c
@@ -35,16 +35,16 @@ MACRO (HDF_CHECK_TYPE_SIZE TYPE VARIABLE)
if (HAVE_${VARIABLE})
message (STATUS "Check size of ${TYPE} - done")
file (APPEND
- ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
+ ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n"
)
- else (HAVE_${VARIABLE})
+ else ()
message (STATUS "Check size of ${TYPE} - failed")
file (APPEND
- ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
+ ${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}$")
+ endif ()
+ endif ()
set (CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
-ENDMACRO (HDF_CHECK_TYPE_SIZE)
+ENDMACRO ()
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 5a14990..f30dd96 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -11,9 +11,9 @@ include (${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
include (${CMAKE_ROOT}/Modules/CheckVariableExists.cmake)
include (${CMAKE_ROOT}/Modules/CheckFortranFunctionExists.cmake)
include (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
-if(CMAKE_CXX_COMPILER)
+if(CMAKE_CXX_COMPILER_LOADED)
include (${CMAKE_ROOT}/Modules/TestForSTDNamespace.cmake)
-endif(CMAKE_CXX_COMPILER)
+endif()
#-----------------------------------------------------------------------------
# APPLE/Darwin setup
@@ -28,17 +28,17 @@ if (APPLE)
"variable has been set to a blank value which will build the default architecture for this system.")
endif ()
set (${HDF_PREFIX}_AC_APPLE_UNIVERSAL_BUILD 0)
-endif (APPLE)
+endif ()
# Check for Darwin (not just Apple - we also want to catch OpenDarwin)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set (${HDF_PREFIX}_HAVE_DARWIN 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+endif ()
# Check for Solaris
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
set (${HDF_PREFIX}_HAVE_SOLARIS 1)
-endif (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
+endif ()
#-----------------------------------------------------------------------------
# This MACRO checks IF the symbol exists in the library and IF it
@@ -49,8 +49,8 @@ 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)
+ endif ()
+ENDMACRO ()
# ----------------------------------------------------------------------
# WINDOWS Hard code Values
@@ -62,7 +62,7 @@ if (WIN32)
set (${HDF_PREFIX}_HAVE_MINGW 1)
set (WINDOWS 1) # MinGW tries to imitate Windows
set (CMAKE_REQUIRED_FLAGS "-DWIN32_LEAN_AND_MEAN=1 -DNOGDI=1")
- endif (MINGW)
+ endif ()
set (${HDF_PREFIX}_HAVE_WIN32_API 1)
set (CMAKE_REQUIRED_LIBRARIES "ws2_32.lib;wsock32.lib")
if (NOT UNIX AND NOT MINGW)
@@ -70,9 +70,9 @@ if (WIN32)
set (CMAKE_REQUIRED_FLAGS "/DWIN32_LEAN_AND_MEAN=1 /DNOGDI=1")
if (MSVC)
set (${HDF_PREFIX}_HAVE_VISUAL_STUDIO 1)
- endif (MSVC)
- endif (NOT UNIX AND NOT MINGW)
-endif (WIN32)
+ endif ()
+ endif ()
+endif ()
if (WINDOWS)
set (${HDF_PREFIX}_HAVE_STDDEF_H 1)
@@ -84,20 +84,20 @@ if (WINDOWS)
set (${HDF_PREFIX}_HAVE_LONGJMP 1)
if (NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETHOSTNAME 1)
- endif (NOT MINGW)
+ endif ()
if (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
set (${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO 1)
- endif (NOT UNIX AND NOT CYGWIN AND NOT MINGW)
+ endif ()
set (${HDF_PREFIX}_HAVE_FUNCTION 1)
set (${HDF_PREFIX}_GETTIMEOFDAY_GIVES_TZ 1)
set (${HDF_PREFIX}_HAVE_TIMEZONE 1)
set (${HDF_PREFIX}_HAVE_GETTIMEOFDAY 1)
if (MINGW)
set (${HDF_PREFIX}_HAVE_WINSOCK2_H 1)
- endif (MINGW)
+ endif ()
set (${HDF_PREFIX}_HAVE_LIBWS2_32 1)
set (${HDF_PREFIX}_HAVE_LIBWSOCK32 1)
-endif (WINDOWS)
+endif ()
# ----------------------------------------------------------------------
# END of WINDOWS Hard code Values
@@ -105,7 +105,7 @@ endif (WINDOWS)
if (CYGWIN)
set (${HDF_PREFIX}_HAVE_LSEEK64 0)
-endif (CYGWIN)
+endif ()
#-----------------------------------------------------------------------------
# Check for the math library "m"
@@ -115,7 +115,7 @@ if (NOT WINDOWS)
CHECK_LIBRARY_EXISTS_CONCAT ("dl" dlopen ${HDF_PREFIX}_HAVE_LIBDL)
CHECK_LIBRARY_EXISTS_CONCAT ("ws2_32" WSAStartup ${HDF_PREFIX}_HAVE_LIBWS2_32)
CHECK_LIBRARY_EXISTS_CONCAT ("wsock32" gethostbyname ${HDF_PREFIX}_HAVE_LIBWSOCK32)
-endif (NOT WINDOWS)
+endif ()
# UCB (BSD) compatibility library
CHECK_LIBRARY_EXISTS_CONCAT ("ucb" gethostname ${HDF_PREFIX}_HAVE_LIBUCB)
@@ -126,11 +126,11 @@ set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${LINK_LIBS})
set (USE_INCLUDES "")
if (WINDOWS)
set (USE_INCLUDES ${USE_INCLUDES} "windows.h")
-endif (WINDOWS)
+endif ()
if (NOT WINDOWS)
TEST_BIG_ENDIAN (${HDF_PREFIX}_WORDS_BIGENDIAN)
-endif (NOT WINDOWS)
+endif ()
# For other specific tests, use this MACRO.
MACRO (HDF_FUNCTION_TEST OTHER_TEST)
@@ -139,7 +139,7 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST)
set (OTHER_TEST_ADD_LIBRARIES)
if (CMAKE_REQUIRED_LIBRARIES)
set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif (CMAKE_REQUIRED_LIBRARIES)
+ endif ()
foreach (def
HAVE_SYS_TIME_H
@@ -149,14 +149,14 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST)
)
if ("${${HDF_PREFIX}_${def}}")
set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ("${${HDF_PREFIX}_${def}}")
- endforeach (def)
+ endif ()
+ endforeach ()
if (LARGEFILE)
set (MACRO_CHECK_FUNCTION_DEFINITIONS
"${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
- endif (LARGEFILE)
+ endif ()
#message (STATUS "Performing ${OTHER_TEST}")
TRY_COMPILE (${OTHER_TEST}
@@ -169,16 +169,16 @@ MACRO (HDF_FUNCTION_TEST OTHER_TEST)
if (${OTHER_TEST})
set (${HDF_PREFIX}_${OTHER_TEST} 1 CACHE INTERNAL "Other test ${FUNCTION}")
message (STATUS "Performing Other Test ${OTHER_TEST} - Success")
- else (${OTHER_TEST})
+ else ()
message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
set (${HDF_PREFIX}_${OTHER_TEST} "" CACHE INTERNAL "Other test ${FUNCTION}")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing Other Test ${OTHER_TEST} failed with the following output:\n"
"${OUTPUT}\n"
)
- endif (${OTHER_TEST})
- endif ("${HDF_PREFIX}_${OTHER_TEST}" MATCHES "^${HDF_PREFIX}_${OTHER_TEST}$")
-ENDMACRO (HDF_FUNCTION_TEST)
+ endif ()
+ endif ()
+ENDMACRO ()
#-----------------------------------------------------------------------------
# Check for these functions before the time headers are checked
@@ -192,8 +192,8 @@ 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)
+ endif ()
+ENDMACRO ()
#-----------------------------------------------------------------------------
# Check for the existence of certain header files
@@ -219,8 +219,8 @@ if (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
if (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
set (${HDF_PREFIX}_HAVE_STDINT_H "" CACHE INTERNAL "Have includes HAVE_STDINT_H")
set (USE_INCLUDES ${USE_INCLUDES} "stdint.h")
- endif (NOT ${HDF_PREFIX}_HAVE_STDINT_H_CXX)
-endif (${HDF_PREFIX}_HAVE_STDINT_H AND CMAKE_CXX_COMPILER_LOADED)
+ endif ()
+endif ()
# Darwin
CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_H)
@@ -229,16 +229,16 @@ CHECK_INCLUDE_FILE_CONCAT ("mach/mach_time.h" ${HDF_PREFIX}_HAVE_MACH_MACH_TIME_
CHECK_INCLUDE_FILE_CONCAT ("io.h" ${HDF_PREFIX}_HAVE_IO_H)
if (NOT CYGWIN)
CHECK_INCLUDE_FILE_CONCAT ("winsock2.h" ${HDF_PREFIX}_HAVE_WINSOCK2_H)
-endif (NOT CYGWIN)
+endif ()
CHECK_INCLUDE_FILE_CONCAT ("sys/timeb.h" ${HDF_PREFIX}_HAVE_SYS_TIMEB_H)
if (CMAKE_SYSTEM_NAME MATCHES "OSF")
CHECK_INCLUDE_FILE_CONCAT ("sys/sysinfo.h" ${HDF_PREFIX}_HAVE_SYS_SYSINFO_H)
CHECK_INCLUDE_FILE_CONCAT ("sys/proc.h" ${HDF_PREFIX}_HAVE_SYS_PROC_H)
-else (CMAKE_SYSTEM_NAME MATCHES "OSF")
+else ()
set (${HDF_PREFIX}_HAVE_SYS_SYSINFO_H "" CACHE INTERNAL "" FORCE)
set (${HDF_PREFIX}_HAVE_SYS_PROC_H "" CACHE INTERNAL "" FORCE)
-endif (CMAKE_SYSTEM_NAME MATCHES "OSF")
+endif ()
CHECK_INCLUDE_FILE_CONCAT ("globus/common.h" ${HDF_PREFIX}_HAVE_GLOBUS_COMMON_H)
CHECK_INCLUDE_FILE_CONCAT ("pdb.h" ${HDF_PREFIX}_HAVE_PDB_H)
@@ -295,29 +295,29 @@ if (NOT WINDOWS)
# check should be generalized for all POSIX systems as it
# is in the Autotools.
if (TEST_LFS_WORKS_COMPILE)
- if (TEST_LFS_WORKS_RUN MATCHES 0)
+ if (TEST_LFS_WORKS_RUN MATCHES 0)
set (TEST_LFS_WORKS 1 CACHE INTERNAL ${msg})
set (LARGEFILE 1)
set (HDF_EXTRA_FLAGS ${HDF_EXTRA_FLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE)
message (STATUS "${msg}... yes")
- else (TEST_LFS_WORKS_RUN MATCHES 0)
+ else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/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 )
+ endif ()
+ else ( )
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
message (STATUS "${msg}... no")
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test TEST_LFS_WORKS Compile failed with the following output:\n ${OUTPUT}\n"
)
- endif (TEST_LFS_WORKS_COMPILE)
- endif (HDF_ENABLE_LARGE_FILE)
+ endif ()
+ endif ()
set (CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${HDF_EXTRA_FLAGS})
- endif (NOT ${HDF_PREFIX}_HAVE_SOLARIS AND NOT ${HDF_PREFIX}_HAVE_DARWIN)
-endif (NOT WINDOWS)
+ endif ()
+endif ()
add_definitions (${HDF_EXTRA_FLAGS})
@@ -331,7 +331,7 @@ if (NOT WINDOWS OR MINGW)
CHECK_FUNCTION_EXISTS (fseeko64 ${HDF_PREFIX}_HAVE_FSEEKO64)
CHECK_FUNCTION_EXISTS (ftello64 ${HDF_PREFIX}_HAVE_FTELLO64)
CHECK_FUNCTION_EXISTS (ftruncate64 ${HDF_PREFIX}_HAVE_FTRUNCATE64)
- endif (${HDF_PREFIX}_HAVE_OFF64_T)
+ endif ()
CHECK_FUNCTION_EXISTS (fseeko ${HDF_PREFIX}_HAVE_FSEEKO)
CHECK_FUNCTION_EXISTS (ftello ${HDF_PREFIX}_HAVE_FTELLO)
@@ -340,8 +340,8 @@ if (NOT WINDOWS OR MINGW)
if (HAVE_STAT64_STRUCT)
CHECK_FUNCTION_EXISTS (fstat64 ${HDF_PREFIX}_HAVE_FSTAT64)
CHECK_FUNCTION_EXISTS (stat64 ${HDF_PREFIX}_HAVE_STAT64)
- endif (HAVE_STAT64_STRUCT)
-endif (NOT WINDOWS OR MINGW)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Check the size in bytes of all the int and float types
@@ -354,8 +354,8 @@ MACRO (HDF_CHECK_TYPE_SIZE type var)
if (NOT ${aVar})
set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
# message (STATUS "Size of ${aType} was NOT Found")
- endif (NOT ${aVar})
-ENDMACRO (HDF_CHECK_TYPE_SIZE)
+ endif ()
+ENDMACRO ()
HDF_CHECK_TYPE_SIZE (char ${HDF_PREFIX}_SIZEOF_CHAR)
HDF_CHECK_TYPE_SIZE (short ${HDF_PREFIX}_SIZEOF_SHORT)
@@ -363,12 +363,12 @@ HDF_CHECK_TYPE_SIZE (int ${HDF_PREFIX}_SIZEOF_INT)
HDF_CHECK_TYPE_SIZE (unsigned ${HDF_PREFIX}_SIZEOF_UNSIGNED)
if (NOT APPLE)
HDF_CHECK_TYPE_SIZE (long ${HDF_PREFIX}_SIZEOF_LONG)
-endif (NOT APPLE)
+endif ()
HDF_CHECK_TYPE_SIZE ("long long" ${HDF_PREFIX}_SIZEOF_LONG_LONG)
HDF_CHECK_TYPE_SIZE (__int64 ${HDF_PREFIX}_SIZEOF___INT64)
if (NOT ${HDF_PREFIX}_SIZEOF___INT64)
set (${HDF_PREFIX}_SIZEOF___INT64 0)
-endif (NOT ${HDF_PREFIX}_SIZEOF___INT64)
+endif ()
HDF_CHECK_TYPE_SIZE (float ${HDF_PREFIX}_SIZEOF_FLOAT)
HDF_CHECK_TYPE_SIZE (double ${HDF_PREFIX}_SIZEOF_DOUBLE)
@@ -407,17 +407,17 @@ if (NOT APPLE)
HDF_CHECK_TYPE_SIZE (ssize_t ${HDF_PREFIX}_SIZEOF_SSIZE_T)
if (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
set (${HDF_PREFIX}_SIZEOF_SSIZE_T 0)
- endif (NOT ${HDF_PREFIX}_SIZEOF_SSIZE_T)
+ endif ()
if (NOT WINDOWS)
HDF_CHECK_TYPE_SIZE (ptrdiff_t ${HDF_PREFIX}_SIZEOF_PTRDIFF_T)
- endif (NOT WINDOWS)
-endif (NOT APPLE)
+ endif ()
+endif ()
HDF_CHECK_TYPE_SIZE (off_t ${HDF_PREFIX}_SIZEOF_OFF_T)
HDF_CHECK_TYPE_SIZE (off64_t ${HDF_PREFIX}_SIZEOF_OFF64_T)
if (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
set (${HDF_PREFIX}_SIZEOF_OFF64_T 0)
-endif (NOT ${HDF_PREFIX}_SIZEOF_OFF64_T)
+endif ()
#-----------------------------------------------------------------------------
# Extra C99 types
@@ -428,9 +428,9 @@ CHECK_INCLUDE_FILE_CONCAT (stdbool.h ${HDF_PREFIX}_HAVE_STDBOOL_H)
if (HAVE_STDBOOL_H)
set (CMAKE_EXTRA_INCLUDE_FILES stdbool.h)
HDF_CHECK_TYPE_SIZE (bool ${HDF_PREFIX}_SIZEOF_BOOL)
-else (HAVE_STDBOOL_H)
+else ()
HDF_CHECK_TYPE_SIZE (_Bool ${HDF_PREFIX}_SIZEOF_BOOL)
-endif (HAVE_STDBOOL_H)
+endif ()
if (NOT WINDOWS)
#-----------------------------------------------------------------------------
@@ -459,11 +459,11 @@ if (NOT WINDOWS)
HAVE_STRUCT_TM_TM_ZONE
)
HDF_FUNCTION_TEST (${test})
- endforeach (test)
+ endforeach ()
if (NOT CYGWIN AND NOT MINGW)
HDF_FUNCTION_TEST (HAVE_TIMEZONE)
# HDF_FUNCTION_TEST (HAVE_STAT_ST_BLOCKS)
- endif (NOT CYGWIN AND NOT MINGW)
+ endif ()
# ----------------------------------------------------------------------
# Does the struct stat have the st_blocks field? This field is not Posix.
@@ -481,7 +481,7 @@ if (NOT WINDOWS)
CHECK_FUNCTION_EXISTS (_scrsize ${HDF_PREFIX}_HAVE__SCRSIZE)
if (NOT CYGWIN AND NOT MINGW)
CHECK_FUNCTION_EXISTS (GetConsoleScreenBufferInfo ${HDF_PREFIX}_HAVE_GETCONSOLESCREENBUFFERINFO)
- endif (NOT CYGWIN AND NOT MINGW)
+ endif ()
CHECK_SYMBOL_EXISTS (TIOCGWINSZ "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGWINSZ)
CHECK_SYMBOL_EXISTS (TIOCGETD "sys/ioctl.h" ${HDF_PREFIX}_HAVE_TIOCGETD)
@@ -490,8 +490,8 @@ if (NOT WINDOWS)
#
if (NOT CYGWIN AND NOT MINGW)
CHECK_FUNCTION_EXISTS (getpwuid ${HDF_PREFIX}_HAVE_GETPWUID)
- endif (NOT CYGWIN AND NOT MINGW)
-endif (NOT WINDOWS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Check for some functions that are used
@@ -539,8 +539,8 @@ CHECK_FUNCTION_EXISTS (vsnprintf ${HDF_PREFIX}_HAVE_VSNPRINTF)
if (NOT WINDOWS)
if (${HDF_PREFIX}_HAVE_VSNPRINTF)
HDF_FUNCTION_TEST (VSNPRINTF_WORKS)
- endif (${HDF_PREFIX}_HAVE_VSNPRINTF)
-endif (NOT WINDOWS)
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# sigsetjmp is special; may actually be a macro
@@ -550,9 +550,9 @@ if (NOT ${HDF_PREFIX}_HAVE_SIGSETJMP)
CHECK_SYMBOL_EXISTS (sigsetjmp "setjmp.h" ${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
if (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
set (${HDF_PREFIX}_HAVE_SIGSETJMP 1)
- endif (${HDF_PREFIX}_HAVE_MACRO_SIGSETJMP)
- endif (${HDF_PREFIX}_HAVE_SETJMP_H)
-endif (NOT ${HDF_PREFIX}_HAVE_SIGSETJMP)
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Check a bunch of other functions
@@ -568,8 +568,8 @@ if (NOT WINDOWS)
HAVE_SOCKLEN_T
)
HDF_FUNCTION_TEST (${test})
- endforeach (test)
-endif (NOT WINDOWS)
+ endforeach ()
+endif ()
# For other CXX specific tests, use this MACRO.
MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST)
@@ -578,7 +578,7 @@ MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST)
set (OTHER_TEST_ADD_LIBRARIES)
if (CMAKE_REQUIRED_LIBRARIES)
set (OTHER_TEST_ADD_LIBRARIES "-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- endif (CMAKE_REQUIRED_LIBRARIES)
+ endif ()
foreach (def
HAVE_SYS_TIME_H
@@ -588,14 +588,14 @@ MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST)
)
if ("${${HDF_PREFIX}_${def}}")
set (MACRO_CHECK_FUNCTION_DEFINITIONS "${MACRO_CHECK_FUNCTION_DEFINITIONS} -D${def}")
- endif ("${${HDF_PREFIX}_${def}}")
- endforeach (def)
+ endif ()
+ endforeach ()
if (LARGEFILE)
set (MACRO_CHECK_FUNCTION_DEFINITIONS
"${MACRO_CHECK_FUNCTION_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
- endif (LARGEFILE)
+ endif ()
#message (STATUS "Performing ${OTHER_TEST}")
TRY_COMPILE (${OTHER_TEST}
@@ -608,16 +608,16 @@ MACRO (HDF_CXX_FUNCTION_TEST OTHER_TEST)
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)
+ else ()
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 (HDF_CXX_FUNCTION_TEST)
+ endif ()
+ endif ()
+ENDMACRO ()
#-----------------------------------------------------------------------------
# Check a bunch of cxx functions
@@ -632,8 +632,8 @@ if (CMAKE_CXX_COMPILER_LOADED)
CXX_HAVE_OFFSETOF
)
HDF_CXX_FUNCTION_TEST (${test})
- endforeach (test)
-endif (CMAKE_CXX_COMPILER_LOADED)
+ endforeach ()
+endif ()
#-----------------------------------------------------------------------------
# Check if InitOnceExecuteOnce is available
@@ -646,21 +646,21 @@ if (WINDOWS)
set (CMAKE_REQUIRED_DEFINITIONS
"${CURRENT_TEST_DEFINITIONS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE"
)
- endif (LARGEFILE)
+ endif ()
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)
+ else ()
set (CHECK_C_SOURCE_COMPILES_ADD_LIBRARIES)
- endif (CMAKE_REQUIRED_LIBRARIES)
+ endif ()
if (CMAKE_REQUIRED_INCLUDES)
set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
- else (CMAKE_REQUIRED_INCLUDES)
+ else ()
set (CHECK_C_SOURCE_COMPILES_ADD_INCLUDES)
- endif (CMAKE_REQUIRED_INCLUDES)
+ endif ()
TRY_RUN(HAVE_IOEO_EXITCODE HAVE_IOEO_COMPILED
${CMAKE_BINARY_DIR}
@@ -674,7 +674,7 @@ if (WINDOWS)
# 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)
+ endif ()
# if the return value was 0 then it worked
if ("${HAVE_IOEO_EXITCODE}" EQUAL 0)
set (${HDF_PREFIX}_HAVE_IOEO 1 CACHE INTERNAL "Test InitOnceExecuteOnce")
@@ -683,22 +683,22 @@ if (WINDOWS)
"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)
+ else ()
if (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
set (${HDF_PREFIX}_HAVE_IOEO "${HAVE_IOEO_EXITCODE}")
- else (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ else ()
set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
- endif (CMAKE_CROSSCOMPILING AND "${HAVE_IOEO_EXITCODE}" MATCHES "FAILED_TO_RUN")
+ endif ()
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 ("${${HDF_PREFIX}_HAVE_IOEO}" MATCHES "^${${HDF_PREFIX}_HAVE_IOEO}$")
- endif (NOT HDF_NO_IOEO_TEST)
-endif (WINDOWS)
+ endif ()
+ endif ()
+ endif ()
+endif ()
#-----------------------------------------------------------------------------
# Determine how 'inline' is used
@@ -706,7 +706,7 @@ endif (WINDOWS)
foreach (inline_test inline __inline__ __inline)
string (TOUPPER ${inline_test} INLINE_TEST_MACRO)
HDF_FUNCTION_TEST (HAVE_${INLINE_TEST_MACRO})
-endforeach (inline_test)
+endforeach ()
#-----------------------------------------------------------------------------
# Check how to print a Long Long integer
@@ -717,7 +717,7 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
- endif (${HDF_PREFIX}_SIZEOF_LONG_LONG)
+ endif ()
TRY_RUN (${HDF_PREFIX}_PRINTF_LL_TEST_RUN ${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
@@ -729,24 +729,24 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
string(REGEX REPLACE ".*PRINTF_LL_WIDTH=\\[(.*)\\].*" "\\1" ${HDF_PREFIX}_PRINTF_LL "${OUTPUT}")
set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"${${HDF_PREFIX}_PRINTF_LL}\"" CACHE INTERNAL "Width for printf for type `long long' or `__int64', us. `ll")
set (PRINT_LL_FOUND 1)
- else (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
+ else ()
message ("Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
- endif (${HDF_PREFIX}_PRINTF_LL_TEST_RUN MATCHES 0)
- else (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
+ endif ()
+ else ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Test ${HDF_PREFIX}_PRINTF_LL_WIDTH failed with the following output:\n ${OUTPUT}\n"
)
- endif (${HDF_PREFIX}_PRINTF_LL_TEST_COMPILE)
+ endif ()
if (PRINT_LL_FOUND)
message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
- else (PRINT_LL_FOUND)
+ else ()
message (STATUS "Checking for appropriate format for 64 bit long: not found")
set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
"Width for printf for type `long long' or `__int64', us. `ll"
)
- endif (PRINT_LL_FOUND)
-endif (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown")
+ endif ()
+endif ()
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle converting
diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index 5f0f031..04782f3 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -32,38 +32,38 @@ MACRO (SZIP_ADJUST_LIB_VARS basename)
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)
+ endif ()
# 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)
+ endif ()
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)
+ else ()
# 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)
+ endif ()
set (${basename}_LIBRARIES optimized ${${basename}_LIBRARY_RELEASE} debug ${${basename}_LIBRARY_DEBUG})
- endif (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE)
+ endif ()
set (${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library")
if (${basename}_LIBRARY)
set (${basename}_FOUND 1)
- endif (${basename}_LIBRARY)
+ endif ()
- endif (${basename}_INCLUDE_DIR )
+ endif ()
# 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)
+ENDMACRO ()
# Look for the header file.
@@ -93,10 +93,10 @@ FIND_PATH (SZIP_INCLUDE_DIR
if (WIN32)
set (SZIP_SEARCH_DEBUG_NAMES "sz_d;libsz_d")
set (SZIP_SEARCH_RELEASE_NAMES "sz;libsz;libszip")
-else (WIN32)
+else ()
set (SZIP_SEARCH_DEBUG_NAMES "sz_d")
set (SZIP_SEARCH_RELEASE_NAMES "sz;szip")
-endif (WIN32)
+endif ()
# Look for the library.
FIND_LIBRARY (SZIP_LIBRARY_DEBUG
@@ -123,13 +123,12 @@ if (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
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)
+ endif ()
+else ()
set (SZIP_FOUND 0)
set (SZIP_LIBRARIES)
set (SZIP_INCLUDE_DIRS)
-endif (SZIP_INCLUDE_DIR AND SZIP_LIBRARY)
+endif ()
# Report the results.
if (NOT SZIP_FOUND)
@@ -138,12 +137,12 @@ if (NOT SZIP_FOUND)
)
if (NOT SZIP_FIND_QUIETLY)
message (STATUS "${SZIP_DIR_MESSAGE}")
- else (NOT SZIP_FIND_QUIETLY)
+ else ()
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)
+ endif ()
+ endif ()
+endif ()
if (SZIP_FOUND)
include (CheckSymbolExists)
@@ -161,7 +160,7 @@ if (SZIP_FOUND)
set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
#
#############################################
-endif (SZIP_FOUND)
+endif ()
if (FIND_SZIP_DEBUG)
message (STATUS "SZIP_INCLUDE_DIR: ${SZIP_INCLUDE_DIR}")
@@ -169,4 +168,4 @@ if (FIND_SZIP_DEBUG)
message (STATUS "SZIP_LIBRARY_DEBUG: ${SZIP_LIBRARY_DEBUG}")
message (STATUS "SZIP_LIBRARY_RELEASE: ${SZIP_LIBRARY_RELEASE}")
message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-endif (FIND_SZIP_DEBUG)
+endif ()
diff --git a/config/cmake_ext_mod/HDFLibMacros.cmake b/config/cmake_ext_mod/HDFLibMacros.cmake
index 2145a3d..7d19b7a 100644
--- a/config/cmake_ext_mod/HDFLibMacros.cmake
+++ b/config/cmake_ext_mod/HDFLibMacros.cmake
@@ -51,7 +51,7 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${jpeg_pic}
)
- endif (${compress_type} MATCHES "SVN")
+ endif ()
externalproject_get_property (JPEG BINARY_DIR SOURCE_DIR)
##include (${BINARY_DIR}/${JPEG_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
@@ -68,13 +68,13 @@ macro (EXTERNAL_JPEG_LIBRARY compress_type jpeg_pic)
add_dependencies (JPEG jpeg-shared)
set (JPEG_SHARED_LIBRARY "jpeg-shared")
set (JPEG_LIBRARIES ${JPEG_LIBRARIES} ${JPEG_shared_LIBRARY})
- endif (BUILD_SHARED_LIBS)
+ endif ()
set (JPEG_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (JPEG_INCLUDE_DIR "${SOURCE_DIR}/src")
set (JPEG_FOUND 1)
set (JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR_GEN} ${JPEG_INCLUDE_DIR})
-endmacro (EXTERNAL_JPEG_LIBRARY)
+endmacro ()
#-------------------------------------------------------------------------------
macro (PACKAGE_JPEG_LIBRARY compress_type)
@@ -85,8 +85,8 @@ macro (PACKAGE_JPEG_LIBRARY compress_type)
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/jconfig.h)
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
add_dependencies (JPEG-GenHeader-Copy JPEG)
- endif (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-endmacro (PACKAGE_JPEG_LIBRARY)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
@@ -141,7 +141,7 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
-DSZIP_ENABLE_ENCODING:BOOL=${encoding}
)
- endif (${compress_type} MATCHES "SVN")
+ endif ()
externalproject_get_property (SZIP BINARY_DIR SOURCE_DIR)
##include (${BINARY_DIR}/${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
@@ -158,13 +158,13 @@ macro (EXTERNAL_SZIP_LIBRARY compress_type encoding)
add_dependencies (SZIP szip-shared)
set (SZIP_SHARED_LIBRARY "szip-shared")
set (SZIP_LIBRARIES ${SZIP_LIBRARIES} ${SZIP_shared_LIBRARY})
- endif (BUILD_SHARED_LIBS)
+ endif ()
set (SZIP_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (SZIP_INCLUDE_DIR "${SOURCE_DIR}/src")
set (SZIP_FOUND 1)
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR_GEN} ${SZIP_INCLUDE_DIR})
-endmacro (EXTERNAL_SZIP_LIBRARY)
+endmacro ()
#-------------------------------------------------------------------------------
macro (PACKAGE_SZIP_LIBRARY compress_type)
@@ -175,8 +175,8 @@ macro (PACKAGE_SZIP_LIBRARY compress_type)
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/SZconfig.h)
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
add_dependencies (SZIP-GenHeader-Copy SZIP)
- endif (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-endmacro (PACKAGE_SZIP_LIBRARY)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (EXTERNAL_ZLIB_LIBRARY compress_type)
@@ -228,14 +228,14 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-DCMAKE_ANSI_CFLAGS:STRING=${CMAKE_ANSI_CFLAGS}
)
- endif (${compress_type} MATCHES "SVN")
+ endif ()
externalproject_get_property (ZLIB BINARY_DIR SOURCE_DIR)
if (WIN32)
set (ZLIB_LIB_NAME "zlib")
- else (WIN32)
+ else ()
set (ZLIB_LIB_NAME "z")
- endif (WIN32)
+ endif ()
##include (${BINARY_DIR}/${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT}-targets.cmake)
# Create imported target zlib-static
add_library(zlib-static STATIC IMPORTED)
@@ -250,13 +250,13 @@ macro (EXTERNAL_ZLIB_LIBRARY compress_type)
add_dependencies (ZLIB zlib-shared)
set (ZLIB_SHARED_LIBRARY "zlib-shared")
set (ZLIB_LIBRARIES ${ZLIB_LIBRARIES} ${ZLIB_SHARED_LIBRARY})
- endif (BUILD_SHARED_LIBS)
+ endif ()
set (ZLIB_INCLUDE_DIR_GEN "${BINARY_DIR}")
set (ZLIB_INCLUDE_DIR "${SOURCE_DIR}")
set (ZLIB_FOUND 1)
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR_GEN} ${ZLIB_INCLUDE_DIR})
-endmacro (EXTERNAL_ZLIB_LIBRARY)
+endmacro ()
#-------------------------------------------------------------------------------
macro (PACKAGE_ZLIB_LIBRARY compress_type)
@@ -267,5 +267,5 @@ macro (PACKAGE_ZLIB_LIBRARY compress_type)
set (EXTERNAL_HEADER_LIST ${EXTERNAL_HEADER_LIST} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/zconf.h)
if (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
add_dependencies (ZLIB-GenHeader-Copy ZLIB)
- endif (${compress_type} MATCHES "GIT" OR ${compress_type} MATCHES "SVN" OR ${compress_type} MATCHES "TGZ")
-endmacro (PACKAGE_ZLIB_LIBRARY)
+ endif ()
+endmacro ()
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 1d6b49a..1016b1f 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -1,7 +1,7 @@
#-------------------------------------------------------------------------------
macro (SET_GLOBAL_VARIABLE name value)
set (${name} ${value} CACHE INTERNAL "Used to pass variables between directories" FORCE)
-endmacro (SET_GLOBAL_VARIABLE)
+endmacro ()
#-------------------------------------------------------------------------------
macro (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
@@ -14,7 +14,7 @@ macro (IDE_GENERATED_PROPERTIES SOURCE_PATH HEADERS SOURCES)
#set_property (SOURCE ${HEADERS}
# PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
#)
-endmacro (IDE_GENERATED_PROPERTIES)
+endmacro ()
#-------------------------------------------------------------------------------
macro (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
@@ -31,14 +31,14 @@ macro (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES)
#set_property (SOURCE ${HEADERS}
# PROPERTY MACOSX_PACKAGE_LOCATION Headers/${NAME}
#)
-endmacro (IDE_SOURCE_PROPERTIES)
+endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_NAMING libtarget libtype)
if (${libtype} MATCHES "SHARED")
set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME "${libtarget}${ARGN}")
- endif (${libtype} MATCHES "SHARED")
-endmacro (TARGET_NAMING)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
@@ -52,8 +52,8 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent)
CONFIGURATIONS RelWithDebInfo
COMPONENT ${targetcomponent}
)
- endif (WIN32 AND MSVC)
-endmacro (INSTALL_TARGET_PDB)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
@@ -68,8 +68,8 @@ macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent)
CONFIGURATIONS RelWithDebInfo
COMPONENT ${targetcomponent}
)
- endif (WIN32 AND MSVC)
-endmacro (INSTALL_PROGRAM_PDB)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
@@ -77,19 +77,19 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
if (WIN32)
set (LIB_RELEASE_NAME "${libname}")
set (LIB_DEBUG_NAME "${libname}_D")
- else (WIN32)
+ else ()
set (LIB_RELEASE_NAME "${libname}")
set (LIB_DEBUG_NAME "${libname}_debug")
- endif (WIN32)
+ endif ()
else (${libtype} MATCHES "SHARED")
if (WIN32)
set (LIB_RELEASE_NAME "lib${libname}")
set (LIB_DEBUG_NAME "lib${libname}_D")
- else (WIN32)
+ else ()
set (LIB_RELEASE_NAME "${libname}")
set (LIB_DEBUG_NAME "${libname}_debug")
- endif (WIN32)
- endif (${libtype} MATCHES "SHARED")
+ endif ()
+ endif ()
set_target_properties (${libtarget}
PROPERTIES
@@ -107,9 +107,9 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
IMPORT_PREFIX ""
PREFIX ""
)
- endif (MINGW AND ${libtype} MATCHES "SHARED")
+ endif ()
-endmacro (HDF_SET_LIB_OPTIONS)
+endmacro ()
#-------------------------------------------------------------------------------
macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
@@ -117,12 +117,12 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
if (${importtype} MATCHES "IMPORT")
set (importprefix "${CMAKE_STATIC_LIBRARY_PREFIX}")
- endif (${importtype} MATCHES "IMPORT")
+ endif ()
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
set (IMPORT_LIB_NAME ${LIB_DEBUG_NAME})
- else (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ else ()
set (IMPORT_LIB_NAME ${LIB_RELEASE_NAME})
- endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
+ endif ()
if (${libtype} MATCHES "SHARED")
if (WIN32)
@@ -131,54 +131,54 @@ macro (HDF_IMPORT_SET_LIB_OPTIONS libtarget libname libtype libversion)
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}.lib"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- else (MINGW)
+ else ()
set_target_properties (${libtarget} PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- endif (MINGW)
- else (WIN32)
+ endif ()
+ else ()
if (CYGWIN)
set_target_properties (${libtarget} PROPERTIES
IMPORTED_IMPLIB "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_IMPORT_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
)
- else (CYGWIN)
+ else ()
set_target_properties (${libtarget} PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}"
IMPORTED_SONAME "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}.${libversion}"
SOVERSION "${libversion}"
)
- endif (CYGWIN)
- endif (WIN32)
- else (${libtype} MATCHES "SHARED")
+ endif ()
+ endif ()
+ else ()
if (WIN32 AND NOT MINGW)
set_target_properties (${libtarget} PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- else (WIN32 AND NOT MINGW)
+ else ()
set_target_properties (${libtarget} PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_STATIC_LIBRARY_PREFIX}${IMPORT_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
)
- endif (WIN32 AND NOT MINGW)
- endif (${libtype} MATCHES "SHARED")
+ endif ()
+ endif ()
-endmacro (HDF_IMPORT_SET_LIB_OPTIONS)
+endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags)
if (MSVC)
TARGET_MSVC_PROPERTIES (${wintarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- else (MSVC)
+ else ()
set_target_properties (${wintarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
)
- endif (MSVC)
-endmacro (TARGET_C_PROPERTIES)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags)
@@ -188,15 +188,15 @@ macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags)
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "${addlinkflags}"
)
- endif (MSVC)
-endmacro (TARGET_MSVC_PROPERTIES)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_FORTRAN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
if (WIN32)
TARGET_FORTRAN_WIN_PROPERTIES (${forttarget} ${libtype} "${addcompileflags} ${WIN_COMPILE_FLAGS}" "${addlinkflags} ${WIN_LINK_FLAGS}")
- endif (WIN32)
-endmacro (TARGET_FORTRAN_PROPERTIES)
+ endif ()
+endmacro ()
#-------------------------------------------------------------------------------
macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkflags)
@@ -207,15 +207,15 @@ macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkf
COMPILE_FLAGS "/dll ${addcompileflags}"
LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
)
- else (${libtype} MATCHES "SHARED")
+ else ()
set_target_properties (${forttarget}
PROPERTIES
COMPILE_FLAGS "${addcompileflags}"
LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}"
)
- endif (${libtype} MATCHES "SHARED")
- endif (MSVC)
-endmacro (TARGET_FORTRAN_WIN_PROPERTIES)
+ endif ()
+ endif ()
+endmacro ()
#-----------------------------------------------------------------------------
# Configure the README.txt file for the binary package
@@ -228,16 +228,16 @@ macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_INSTALL_ENDING "msi")
if (CMAKE_CL_64)
set (BINARY_SYSTEM_NAME "win64")
- else (CMAKE_CL_64)
+ else ()
set (BINARY_SYSTEM_NAME "win32")
- endif (CMAKE_CL_64)
+ endif ()
if (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
set (BINARY_PLATFORM "${BINARY_PLATFORM} 7")
elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.2")
set (BINARY_PLATFORM "${BINARY_PLATFORM} 8")
elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.3")
set (BINARY_PLATFORM "${BINARY_PLATFORM} 10")
- endif (${CMAKE_SYSTEM_VERSION} MATCHES "6.1")
+ endif ()
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}")
if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2010")
@@ -249,36 +249,36 @@ macro (HDF_README_PROPERTIES target_fortran)
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013")
elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "19.*")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015")
- else (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+ else ()
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}")
- endif (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*")
+ endif ()
elseif (APPLE)
set (BINARY_EXAMPLE_ENDING "tar.gz")
set (BINARY_INSTALL_ENDING "dmg")
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
- else (WIN32)
+ else ()
set (BINARY_EXAMPLE_ENDING "tar.gz")
set (BINARY_INSTALL_ENDING "sh")
set (BINARY_PLATFORM "${BINARY_PLATFORM} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR}")
set (BINARY_PLATFORM "${BINARY_PLATFORM}, using ${CMAKE_C_COMPILER_ID} C ${CMAKE_C_COMPILER_VERSION}")
- endif (WIN32)
+ endif ()
if (target_fortran)
set (BINARY_PLATFORM "${BINARY_PLATFORM} / ${CMAKE_Fortran_COMPILER_ID} Fortran")
- endif (target_fortran)
+ endif ()
if (BUILD_SHARED_LIBS)
set (LIB_TYPE "Static and Shared")
- else (BUILD_SHARED_LIBS)
+ else ()
set (LIB_TYPE "Static")
- endif (BUILD_SHARED_LIBS)
+ endif ()
configure_file (
${HDF_RESOURCES_DIR}/README.txt.cmake.in
${CMAKE_BINARY_DIR}/README.txt @ONLY
)
-endmacro (HDF_README_PROPERTIES)
+endmacro ()
macro (HDFTEST_COPY_FILE src dest target)
add_custom_command(
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 275f2ea..84f7227 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -31,9 +31,9 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
if (CMAKE_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${CMAKE_REQUIRED_LIBRARIES}")
- else (CMAKE_REQUIRED_LIBRARIES)
+ else ()
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES)
- endif (CMAKE_REQUIRED_LIBRARIES)
+ endif ()
file (WRITE
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90
"${CODE}"
@@ -64,7 +64,7 @@ MACRO (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
"${OUTPUT}\n\n")
endif ()
-ENDMACRO (CHECK_FORTRAN_FEATURE)
+ENDMACRO ()
#-----------------------------------------------------------------------------
# Configure Checks which require Fortran compilation must go in here
@@ -175,5 +175,5 @@ 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)
+ endif ()
+endif ()
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index a090057..31c8421 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -4,25 +4,25 @@
# arguments checking
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
+endif ()
#if (NOT TEST_ARGS)
# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
+#endif ()
if (NOT TEST_FOLDER)
message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
if (NOT TEST_OUTPUT)
message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
+endif ()
#if (NOT TEST_EXPECT)
# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
+#endif ()
if (NOT TEST_FILTER)
message (STATUS "Require TEST_FILTER to be defined")
-endif (NOT TEST_FILTER)
+endif ()
if (NOT TEST_REFERENCE)
message (FATAL_ERROR "Require TEST_REFERENCE to be defined")
-endif (NOT TEST_REFERENCE)
+endif ()
message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
@@ -48,7 +48,7 @@ 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")
+endif ()
string (REGEX MATCH "${TEST_FILTER}" TEST_MATCH ${TEST_STREAM})
if (${TEST_EXPECT} STREQUAL "1")
@@ -56,8 +56,8 @@ if (${TEST_EXPECT} STREQUAL "1")
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")
+ endif ()
+endif ()
# everything went fine...
message ("Passed: The output of ${TEST_PROGRAM} matched")
diff --git a/config/cmake_ext_mod/prunTest.cmake b/config/cmake_ext_mod/prunTest.cmake
index 38ecb7e..44df682 100644
--- a/config/cmake_ext_mod/prunTest.cmake
+++ b/config/cmake_ext_mod/prunTest.cmake
@@ -5,25 +5,25 @@ cmake_policy(SET CMP0007 NEW)
# arguments checking
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
-endif (NOT TEST_PROGRAM)
+endif ()
#if (NOT TEST_ARGS)
# message (STATUS "Require TEST_ARGS to be defined")
-#endif (NOT TEST_ARGS)
+#endif ()
if (NOT TEST_FOLDER)
message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
-endif (NOT TEST_FOLDER)
+endif ()
if (NOT TEST_OUTPUT)
message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
-endif (NOT TEST_OUTPUT)
+endif ()
#if (NOT TEST_EXPECT)
# message (STATUS "Require TEST_EXPECT to be defined")
-#endif (NOT TEST_EXPECT)
+#endif ()
#if (NOT TEST_FILTER)
# message (STATUS "Require TEST_FILTER to be defined")
-#endif (NOT TEST_FILTER)
+#endif ()
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)
+endif ()
set (ERROR_APPEND 1)
@@ -31,7 +31,7 @@ message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
if (TEST_ENV_VAR)
set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
-endif (TEST_ENV_VAR)
+endif ()
# run the test program, capture the stdout/stderr and the result var
EXECUTE_PROCESS (
@@ -52,11 +52,11 @@ file (WRITE ${TEST_FOLDER}/P_${TEST_REFERENCE} "${TEST_STREAM}")
if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_STREAM}")
-endif (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
if (TEST_APPEND)
file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT} "${TEST_APPEND} ${TEST_ERROR}\n")
-endif (TEST_APPEND)
+endif ()
message (STATUS "COMMAND Error: ${TEST_ERROR}")
@@ -64,13 +64,13 @@ 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)
+endif ()
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)
+endif ()
if (TEST_MASK_ERROR)
file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM)
@@ -82,26 +82,26 @@ if (TEST_MASK_ERROR)
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)
+endif ()
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)
+endif ()
#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)
+#endif ()
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)
+ endif ()
# now compare the output with the reference
EXECUTE_PROCESS (
@@ -109,36 +109,36 @@ if (NOT TEST_SKIP_COMPARE)
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)
+ 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 ()
+ endif ()
+ endforeach ()
+ endif ()
+ if (NOT ${len_act} STREQUAL ${len_ref})
+ set (TEST_RESULT 1)
+ endif ()
+ endif ()
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)
+ endif ()
+endif ()
# everything went fine...
message ("Passed: The output of ${TEST_PROGRAM} matches P_${TEST_REFERENCE}")
diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake
index 48e9d03..db6d24f 100644
--- a/config/cmake_ext_mod/runTest.cmake
+++ b/config/cmake_ext_mod/runTest.cmake
@@ -23,15 +23,15 @@ endif ()
#endif ()
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)
+endif ()
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
-endif (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
-endif (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
# if there is not an error reference file add the error output to the stdout file
if (NOT TEST_ERRREF)
@@ -125,7 +125,7 @@ if (TEST_MASK_ERROR)
else ()
file (WRITE ${TEST_FOLDER}/${TEST_OUTPUT}.err "${TEST_STREAM}")
endif ()
-endif (TEST_MASK_ERROR)
+endif ()
# remove text from the output file
if (TEST_FILTER)
@@ -175,7 +175,7 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT ${len_act} STREQUAL ${len_ref})
set (TEST_RESULT 1)
endif ()
- endif (NOT ${TEST_RESULT} STREQUAL 0)
+ endif ()
message (STATUS "COMPARE Result: ${TEST_RESULT}")
@@ -234,8 +234,8 @@ if (NOT TEST_SKIP_COMPARE)
if (NOT ${TEST_RESULT} STREQUAL 0)
message (FATAL_ERROR "Failed: The error output of ${TEST_OUTPUT}.err did not match ${TEST_ERRREF}")
endif ()
- endif (TEST_ERRREF)
-endif (NOT TEST_SKIP_COMPARE)
+ endif ()
+endif ()
# everything went fine...
message ("Passed: The output of ${TEST_PROGRAM} matches ${TEST_REFERENCE}")