From 3c36cd61d9dd6b921742bc98e3c96e217bc588ff Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Fri, 17 May 2019 15:44:02 -0500 Subject: Fix Fortran feature var usage and message syntax --- CMakeLists.txt | 2 +- config/cmake/HDF5UseFortran.cmake | 10 +++++----- config/cmake/userblockTest.cmake | 4 ++-- config/cmake/vfdTest.cmake | 4 ++-- config/cmake_ext_mod/ConfigureChecks.cmake | 2 +- config/cmake_ext_mod/HDFUseFortran.cmake | 6 +++--- config/cmake_ext_mod/grepTest.cmake | 4 ++-- config/cmake_ext_mod/runTest.cmake | 8 ++++---- fortran/src/CMakeLists.txt | 4 ++-- fortran/src/H5test_kind_SIZEOF.f90 | 2 +- fortran/test/CMakeLists.txt | 2 +- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10461bb..f649520 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -713,7 +713,7 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for set (LINK_Fortran_LIBS ${LINK_LIBS}) if (HDF5_ENABLE_F2003) - if (NOT FORTRAN_HAVE_ISO_C_BINDING) + if (NOT H5_FORTRAN_HAVE_ISO_C_BINDING) set (HDF5_ENABLE_F2003 OFF) endif () endif () diff --git a/config/cmake/HDF5UseFortran.cmake b/config/cmake/HDF5UseFortran.cmake index 6bfd491..d760904 100644 --- a/config/cmake/HDF5UseFortran.cmake +++ b/config/cmake/HDF5UseFortran.cmake @@ -386,11 +386,11 @@ macro (C_RUN FUNCTION_NAME SOURCE_CODE RETURN_VAR) set (${RETURN_VAR} ${OUTPUT_VAR}) - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - #message ( "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") - #message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message (STATUS "Test COMPILE_RESULT_VAR ${COMPILE_RESULT_VAR} ") + #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + #message (STATUS "Test RUN_RESULT_VAR ${RUN_RESULT_VAR} ") + #message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") if (${COMPILE_RESULT_VAR}) if (${RUN_RESULT_VAR} MATCHES 1) diff --git a/config/cmake/userblockTest.cmake b/config/cmake/userblockTest.cmake index 4a580d0..0e9d01b 100644 --- a/config/cmake/userblockTest.cmake +++ b/config/cmake/userblockTest.cmake @@ -20,7 +20,7 @@ if (NOT TEST_GET_PROGRAM) message (FATAL_ERROR "Require TEST_GET_PROGRAM getub to be defined") endif () if (NOT TEST_FOLDER) - message ( FATAL_ERROR "Require TEST_FOLDER to be defined") + message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_HFILE) message (FATAL_ERROR "Require TEST_HFILE the hdf file to be defined") @@ -127,5 +127,5 @@ else () endif () # everything went fine... -message ("Passed: The output of CHECK matched expectation") +message (STATUS "Passed: The output of CHECK matched expectation") diff --git a/config/cmake/vfdTest.cmake b/config/cmake/vfdTest.cmake index b616958..8e186e9 100644 --- a/config/cmake/vfdTest.cmake +++ b/config/cmake/vfdTest.cmake @@ -17,7 +17,7 @@ if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") endif () if (NOT TEST_FOLDER) - message ( FATAL_ERROR "Require TEST_FOLDER to be defined") + message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_VFD) message (FATAL_ERROR "Require TEST_VFD to be defined") @@ -73,4 +73,4 @@ endif () message (STATUS "COMMAND Error: ${TEST_ERROR}") # everything went fine... -message ("Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}") +message (STATUS "Passed: The ${TEST_PROGRAM} program used vfd ${TEST_VFD}") diff --git a/config/cmake_ext_mod/ConfigureChecks.cmake b/config/cmake_ext_mod/ConfigureChecks.cmake index 0eaf76a..fc867a4 100644 --- a/config/cmake_ext_mod/ConfigureChecks.cmake +++ b/config/cmake_ext_mod/ConfigureChecks.cmake @@ -658,7 +658,7 @@ 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 ("Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") + message (STATUS "Width test failed with result: ${${HDF_PREFIX}_PRINTF_LL_TEST_RUN}") endif () else () file (APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index c68c921..de66e33 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -65,9 +65,9 @@ macro (CHECK_FORTRAN_FEATURE FUNCTION CODE VARIABLE) OUTPUT_VARIABLE OUTPUT ) -# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") -# message ( "Test result ${OUTPUT}") -# message ( "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") +# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") +# message (STATUS "Test result ${OUTPUT}") +# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") if (${RESULT_VAR}) set (${VARIABLE} 1 CACHE INTERNAL "Have Fortran function ${FUNCTION}") diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index 1417204..fe8af03 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -20,7 +20,7 @@ endif () # message (STATUS "Require TEST_ARGS to be defined") #endif () if (NOT TEST_FOLDER) - message ( FATAL_ERROR "Require TEST_FOLDER to be defined") + message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") @@ -71,5 +71,5 @@ if (TEST_EXPECT) endif () # everything went fine... -message ("Passed: The output of ${TEST_PROGRAM} matched") +message (STATUS "Passed: The output of ${TEST_PROGRAM} matched") diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 13e8a4d..c9508f3 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -18,7 +18,7 @@ if (NOT TEST_PROGRAM) message (FATAL_ERROR "Require TEST_PROGRAM to be defined") endif () if (NOT TEST_FOLDER) - message ( FATAL_ERROR "Require TEST_FOLDER to be defined") + message (FATAL_ERROR "Require TEST_FOLDER to be defined") endif () if (NOT TEST_OUTPUT) message (FATAL_ERROR "Require TEST_OUTPUT to be defined") @@ -221,7 +221,7 @@ if (NOT TEST_SKIP_COMPARE) if (NOT str_act STREQUAL str_ref) if (str_act) set (TEST_RESULT 1) - message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") + message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") endif () endif () endforeach () @@ -273,7 +273,7 @@ if (NOT TEST_SKIP_COMPARE) if (NOT str_act STREQUAL str_ref) if (str_act) set (TEST_RESULT 1) - message ("line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") + message (STATUS "line = ${line}\n***ACTUAL: ${str_act}\n****REFER: ${str_ref}\n") endif () endif () endforeach () @@ -321,5 +321,5 @@ if (TEST_GREP_COMPARE) endif () # everything went fine... -message ("${TEST_PROGRAM} Passed") +message (STATUS "${TEST_PROGRAM} Passed") diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 1c0de1a..c4e1244 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -27,7 +27,7 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID) # H5fortran_detect.f90 used to generate H5fort_type_defines.h # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.f90 #----------------------------------------------------------------------------- -if (FORTRAN_HAVE_STORAGE_SIZE) +if (H5_FORTRAN_HAVE_STORAGE_SIZE) add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_STORAGE_SIZE.f90 ) @@ -38,7 +38,7 @@ if (FORTRAN_HAVE_STORAGE_SIZE) endif () set (H5_TEST_KIND_NAME "h5test_kind_storage_size_mod") else () - if (FORTRAN_HAVE_SIZEOF) + if (H5_FORTRAN_HAVE_SIZEOF) add_executable (H5test_FortranHavekind ${HDF5_F90_SRC_SOURCE_DIR}/H5test_kind_SIZEOF.f90 ) diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90 index 137cc48..e16adcb 100644 --- a/fortran/src/H5test_kind_SIZEOF.f90 +++ b/fortran/src/H5test_kind_SIZEOF.f90 @@ -17,7 +17,7 @@ ! function SIZEOF is available. It generates code that makes use of SIZEOF in ! H5fortran_detect.f90 which is a portable solution but is not standard ! compliant. The program H5test_kind_C_SIZEOF uses F2008 standard intrinsic -! function instead, which is the preferred method. +! function instead, which is the preferred method. ! ! The availability of SIZEOF is checked at configure time and the TRUE/FALSE ! condition is set in the configure variable "FORTRAN_HAVE_SIZEOF". diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index bcf065f..ac501ea 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -55,7 +55,7 @@ endif () # fall back to F2003. If F2003 not supported then use F90 for the tests. set_source_files_properties (tf_F90.f90 tf_F03.f90 tf_F08.f90 tf.f90 PROPERTIES LANGUAGE Fortran) -if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF) +if (H5_FORTRAN_HAVE_STORAGE_SIZE AND H5_FORTRAN_HAVE_C_SIZEOF) add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf_F08.f90 tf.f90) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf_F08.f90 tf.f90) -- cgit v0.12