summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod
diff options
context:
space:
mode:
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r--config/cmake_ext_mod/ConfigureChecks.cmake60
-rw-r--r--config/cmake_ext_mod/FindSZIP.cmake4
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake14
-rw-r--r--config/cmake_ext_mod/HDFUseCXX.cmake12
-rw-r--r--config/cmake_ext_mod/HDFUseFortran.cmake16
-rw-r--r--config/cmake_ext_mod/grepTest.cmake10
6 files changed, 77 insertions, 39 deletions
diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake
index 7988772..5fa6ca1 100644
--- a/config/cmake_ext_mod/ConfigureChecks.cmake
+++ b/config/cmake_ext_mod/ConfigureChecks.cmake
@@ -224,7 +224,9 @@ macro (HDF_FUNCTION_TEST OTHER_TEST)
)
endif ()
- #message (STATUS "Performing ${OTHER_TEST}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Performing ${OTHER_TEST}")
+ endif ()
try_compile (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFTests.c
@@ -234,9 +236,13 @@ 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")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Success")
+ endif ()
else ()
- message (STATUS "Performing Other Test ${OTHER_TEST} - Failed")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Other Test ${OTHER_TEST} - Failed")
+ endif ()
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"
@@ -297,17 +303,23 @@ if (MINGW OR NOT WINDOWS)
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")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... yes")
+ endif ()
else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test TEST_LFS_WORKS Run failed with the following exit code:\n ${TEST_LFS_WORKS_RUN}\n"
)
endif ()
else ()
set (TEST_LFS_WORKS "" CACHE INTERNAL ${msg})
- message (STATUS "${msg}... no")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${msg}... no")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Test TEST_LFS_WORKS Compile failed\n"
)
@@ -340,11 +352,15 @@ endif ()
macro (HDF_CHECK_TYPE_SIZE type var)
set (aType ${type})
set (aVar ${var})
-# message (STATUS "Checking size of ${aType} and storing into ${aVar}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Checking size of ${aType} and storing into ${aVar}")
+ endif ()
CHECK_TYPE_SIZE (${aType} ${aVar})
if (NOT ${aVar})
set (${aVar} 0 CACHE INTERNAL "SizeOf for ${aType}")
-# message (STATUS "Size of ${aType} was NOT Found")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Size of ${aType} was NOT Found")
+ endif ()
endif ()
endmacro ()
@@ -574,7 +590,9 @@ endif ()
#-----------------------------------------------------------------------------
if (WINDOWS)
if (NOT HDF_NO_IOEO_TEST)
- message (STATUS "Checking for InitOnceExecuteOnce:")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for InitOnceExecuteOnce:")
+ endif ()
if (NOT DEFINED ${HDF_PREFIX}_HAVE_IOEO)
if (LARGEFILE)
set (CMAKE_REQUIRED_DEFINITIONS
@@ -603,7 +621,9 @@ if (WINDOWS)
# 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")
- message (STATUS "Performing Test InitOnceExecuteOnce - Success")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Test InitOnceExecuteOnce - Success")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Performing C SOURCE FILE Test InitOnceExecuteOnce succeded with the following output:\n"
"${OUTPUT}\n"
@@ -615,7 +635,9 @@ if (WINDOWS)
set (${HDF_PREFIX}_HAVE_IOEO "" CACHE INTERNAL "Test InitOnceExecuteOnce")
endif ()
- message (STATUS "Performing Test InitOnceExecuteOnce - Failed")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing Test InitOnceExecuteOnce - Failed")
+ endif ()
file (APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Performing InitOnceExecuteOnce Test failed with the following output:\n"
"${OUTPUT}\n"
@@ -638,7 +660,9 @@ endforeach ()
#-----------------------------------------------------------------------------
if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "unknown")
set (PRINT_LL_FOUND 0)
- message (STATUS "Checking for appropriate format for 64 bit long:")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for appropriate format for 64 bit long:")
+ endif ()
set (CURRENT_TEST_DEFINITIONS "-DPRINTF_LL_WIDTH")
if (${HDF_PREFIX}_SIZEOF_LONG_LONG)
set (CURRENT_TEST_DEFINITIONS "${CURRENT_TEST_DEFINITIONS} -DHAVE_LONG_LONG")
@@ -655,7 +679,9 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
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 ()
- message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}")
+ endif ()
endif ()
else ()
file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
@@ -664,9 +690,13 @@ if (NOT ${HDF_PREFIX}_PRINTF_LL_WIDTH OR ${HDF_PREFIX}_PRINTF_LL_WIDTH MATCHES "
endif ()
if (PRINT_LL_FOUND)
- message (STATUS "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for appropriate format for 64 bit long: found ${${HDF_PREFIX}_PRINTF_LL_WIDTH}")
+ endif ()
else ()
- message (STATUS "Checking for appropriate format for 64 bit long: not found")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Checking for appropriate format for 64 bit long: not found")
+ endif ()
set (${HDF_PREFIX}_PRINTF_LL_WIDTH "\"unknown\"" CACHE INTERNAL
"Width for printf for type `long long' or `__int64', us. `ll"
)
diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake
index 8f882b4..6ac2099 100644
--- a/config/cmake_ext_mod/FindSZIP.cmake
+++ b/config/cmake_ext_mod/FindSZIP.cmake
@@ -118,7 +118,9 @@ if (NOT SZIP_FOUND)
"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}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "${SZIP_DIR_MESSAGE}")
+ endif ()
else ()
if (SZIP_FIND_REQUIRED)
message (FATAL_ERROR "SZip was NOT found and is Required by this project")
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index 952b766..15b5117 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -28,7 +28,9 @@ macro (SET_HDF_BUILD_TYPE)
endif()
endif()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- message (STATUS "Setting build type to 'RelWithDebInfo' as none was specified.")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Setting build type to 'RelWithDebInfo' as none was specified.")
+ endif()
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
@@ -126,10 +128,6 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype)
OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME}
OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME}
)
- #get_property (target_name TARGET ${libtarget} PROPERTY OUTPUT_NAME)
- #get_property (target_name_debug TARGET ${libtarget} PROPERTY OUTPUT_NAME_DEBUG)
- #get_property (target_name_rwdi TARGET ${libtarget} PROPERTY OUTPUT_NAME_RELWITHDEBINFO)
- #message (STATUS "${target_name} : ${target_name_debug} : ${target_name_rwdi}")
if (${libtype} MATCHES "STATIC")
if (WIN32)
@@ -458,19 +456,19 @@ endmacro ()
macro (ADD_H5_FLAGS h5_flag_var infile)
file (STRINGS ${infile} TEST_FLAG_STREAM)
- #message (STATUS "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}")
+ #message (TRACE "TEST_FLAG_STREAM=${TEST_FLAG_STREAM}")
list (LENGTH TEST_FLAG_STREAM len_flag)
if (len_flag GREATER 0)
math (EXPR _FP_LEN "${len_flag} - 1")
foreach (line RANGE 0 ${_FP_LEN})
list (GET TEST_FLAG_STREAM ${line} str_flag)
string (REGEX REPLACE "^#.*" "" str_flag "${str_flag}")
- #message (STATUS "str_flag=${str_flag}")
+ #message (TRACE "str_flag=${str_flag}")
if (str_flag)
list (APPEND ${h5_flag_var} "${str_flag}")
endif ()
endforeach ()
endif ()
- #message (STATUS "h5_flag_var=${${h5_flag_var}}")
+ #message (TRACE "h5_flag_var=${${h5_flag_var}}")
endmacro ()
diff --git a/config/cmake_ext_mod/HDFUseCXX.cmake b/config/cmake_ext_mod/HDFUseCXX.cmake
index 8d98147..efce42f 100644
--- a/config/cmake_ext_mod/HDFUseCXX.cmake
+++ b/config/cmake_ext_mod/HDFUseCXX.cmake
@@ -70,7 +70,9 @@ macro (HDF_CXX_FUNCTION_TEST OTHER_TEST)
)
endif ()
- #message (STATUS "Performing ${OTHER_TEST}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "Performing ${OTHER_TEST}")
+ endif ()
TRY_COMPILE (${OTHER_TEST}
${CMAKE_BINARY_DIR}
${HDF_RESOURCES_EXT_DIR}/HDFCXXTests.cpp
@@ -80,9 +82,13 @@ 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")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Success")
+ endif ()
else ()
- message (STATUS "Performing CXX Test ${OTHER_TEST} - Failed")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Performing CXX Test ${OTHER_TEST} - Failed")
+ endif ()
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"
diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake
index 0a6a092..2da7148 100644
--- a/config/cmake_ext_mod/HDFUseFortran.cmake
+++ b/config/cmake_ext_mod/HDFUseFortran.cmake
@@ -135,7 +135,9 @@ else ()
# so this one is used for a sizeof test.
#-----------------------------------------------------------------------------
macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE)
- message (STATUS "Testing Fortran ${FUNCTION}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing Fortran ${FUNCTION}")
+ endif ()
if (HDF5_REQUIRED_LIBRARIES)
set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES
"-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}")
@@ -153,13 +155,17 @@ else ()
OUTPUT_VARIABLE OUTPUT
)
- # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
- # message (STATUS "Test result ${OUTPUT}")
- # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # message (TRACE "Test result ${OUTPUT}")
+ # message (TRACE "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ")
+ # endif ()
if (${RESULT_VAR})
set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}")
- message (STATUS "Testing Fortran ${FUNCTION} - OK")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (VERBOSE "Testing Fortran ${FUNCTION} - OK")
+ endif ()
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"
diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake
index 758b62b..cf7071d 100644
--- a/config/cmake_ext_mod/grepTest.cmake
+++ b/config/cmake_ext_mod/grepTest.cmake
@@ -16,18 +16,12 @@
if (NOT TEST_PROGRAM)
message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
endif ()
-#if (NOT TEST_ARGS)
-# message (STATUS "Require TEST_ARGS to be defined")
-#endif ()
if (NOT TEST_FOLDER)
message (FATAL_ERROR "Require TEST_FOLDER to be defined")
endif ()
if (NOT TEST_OUTPUT)
message (FATAL_ERROR "Require TEST_OUTPUT to be defined")
endif ()
-#if (NOT TEST_EXPECT)
-# message (STATUS "Require TEST_EXPECT to be defined")
-#endif ()
if (NOT TEST_FILTER)
message (STATUS "Optional TEST_FILTER to be defined")
endif ()
@@ -55,7 +49,9 @@ endif ()
if (TEST_ENV_VAR)
set (ENV{${TEST_ENV_VAR}} "${TEST_ENV_VALUE}")
- #message (STATUS "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
+ message (TRACE "ENV:${TEST_ENV_VAR}=$ENV{${TEST_ENV_VAR}}")
+ endif ()
endif ()
# run the test program, capture the stdout/stderr and the result var