diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-02-29 20:03:20 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-02-29 20:03:20 (GMT) |
commit | 2804716f648c42d6bd85e1d4a942f7df204c93f2 (patch) | |
tree | 664c6fbe21af3050a28ac998924d8766bf490caf /config/cmake_ext_mod | |
parent | 3f4c3bd5ed61e604c5005f0322ae394dc2609cc4 (diff) | |
download | hdf5-2804716f648c42d6bd85e1d4a942f7df204c93f2.zip hdf5-2804716f648c42d6bd85e1d4a942f7df204c93f2.tar.gz hdf5-2804716f648c42d6bd85e1d4a942f7df204c93f2.tar.bz2 |
Merge changes from other branches
Diffstat (limited to 'config/cmake_ext_mod')
-rw-r--r-- | config/cmake_ext_mod/CTestCustom.cmake | 2 | ||||
-rw-r--r-- | config/cmake_ext_mod/FindSZIP.cmake | 2 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 36 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFUseFortran.cmake | 179 | ||||
-rw-r--r-- | config/cmake_ext_mod/grepTest.cmake | 6 | ||||
-rw-r--r-- | config/cmake_ext_mod/runTest.cmake | 14 |
6 files changed, 123 insertions, 116 deletions
diff --git a/config/cmake_ext_mod/CTestCustom.cmake b/config/cmake_ext_mod/CTestCustom.cmake index 4e292a7..2d72e8d 100644 --- a/config/cmake_ext_mod/CTestCustom.cmake +++ b/config/cmake_ext_mod/CTestCustom.cmake @@ -5,7 +5,7 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION ".*note.*expected.*void.*but argument is of type.*volatile.*" ".*src.SZIP.*:[ \t]*warning.*" ".*src.ZLIB.*:[ \t]*warning.*" - ".*jpeg.src.*:[ \t]*warning.*" + ".*src.JPEG.*:[ \t]*warning.*" ".*POSIX name for this item is deprecated.*" ".*disabling jobserver mode.*" ".*warning.*implicit declaration of function.*" diff --git a/config/cmake_ext_mod/FindSZIP.cmake b/config/cmake_ext_mod/FindSZIP.cmake index 2303d6d..8f882b4 100644 --- a/config/cmake_ext_mod/FindSZIP.cmake +++ b/config/cmake_ext_mod/FindSZIP.cmake @@ -51,7 +51,7 @@ find_path(SZIP_INCLUDE_DIR szlib.h) set(szip_names ${SZIP_NAMES} sz szip szip-static libsz libszip libszip-static) foreach(name ${szip_names}) - list(APPEND szip_names_debug "${name}d") + list (APPEND szip_names_debug "${name}d") endforeach() if(NOT SZIP_LIBRARY) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index d1d9a6c..fee6def 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -82,10 +82,8 @@ macro (INSTALL_TARGET_PDB libtarget targetdestination targetcomponent) set (targetfilename $<TARGET_FILE_DIR:${libtarget}>/${target_name}.pdb) endif () install ( - FILES - ${targetfilename} - DESTINATION - ${targetdestination} + FILES ${targetfilename} + DESTINATION ${targetdestination} CONFIGURATIONS Debug RelWithDebInfo COMPONENT ${targetcomponent} OPTIONAL @@ -97,10 +95,8 @@ endmacro () macro (INSTALL_PROGRAM_PDB progtarget targetdestination targetcomponent) if (WIN32 AND MSVC) install ( - FILES - $<TARGET_PDB_FILE:${progtarget}> - DESTINATION - ${targetdestination} + FILES $<TARGET_PDB_FILE:${progtarget}> + DESTINATION ${targetdestination} CONFIGURATIONS Debug RelWithDebInfo COMPONENT ${targetcomponent} OPTIONAL @@ -123,18 +119,12 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) endif () endif () - set_target_properties (${libtarget} - PROPERTIES - OUTPUT_NAME - ${LIB_RELEASE_NAME} -# OUTPUT_NAME_DEBUG -# ${LIB_DEBUG_NAME} - OUTPUT_NAME_RELEASE - ${LIB_RELEASE_NAME} - OUTPUT_NAME_MINSIZEREL - ${LIB_RELEASE_NAME} - OUTPUT_NAME_RELWITHDEBINFO - ${LIB_RELEASE_NAME} + set_target_properties (${libtarget} PROPERTIES + OUTPUT_NAME ${LIB_RELEASE_NAME} +# OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME} + OUTPUT_NAME_RELEASE ${LIB_RELEASE_NAME} + 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) @@ -143,8 +133,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) if (${libtype} MATCHES "STATIC") if (WIN32) - set_target_properties (${libtarget} - PROPERTIES + set_target_properties (${libtarget} PROPERTIES COMPILE_PDB_NAME_DEBUG ${LIB_DEBUG_NAME} COMPILE_PDB_NAME_RELEASE ${LIB_RELEASE_NAME} COMPILE_PDB_NAME_MINSIZEREL ${LIB_RELEASE_NAME} @@ -156,8 +145,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) #----- Use MSVC Naming conventions for Shared Libraries if (MINGW AND ${libtype} MATCHES "SHARED") - set_target_properties (${libtarget} - PROPERTIES + set_target_properties (${libtarget} PROPERTIES IMPORT_SUFFIX ".lib" IMPORT_PREFIX "" PREFIX "" diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index 1cce918..0a6a092 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -16,6 +16,11 @@ enable_language (Fortran) set (HDF_PREFIX "H5") +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + include (CheckFortranSourceRuns) + include (CheckFortranSourceCompiles) +endif () + #------------------------------------------------------------------------------- # Fix Fortran flags if we are compiling staticly on Windows using # Windows_MT.cmake from config/cmake/UserMacros @@ -42,71 +47,15 @@ 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) - message (STATUS "Testing Fortran ${FUNCTION}") - if (HDF5_REQUIRED_LIBRARIES) - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES - "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") - else () - set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) - endif () - file (WRITE - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 - "${CODE}" - ) - TRY_COMPILE (RESULT_VAR - ${CMAKE_BINARY_DIR} - ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 - CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" - OUTPUT_VARIABLE OUTPUT - ) - -# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") -# message (STATUS "Test result ${OUTPUT}") -# message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") - - if (${RESULT_VAR}) - 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 () - message (STATUS "Testing Fortran ${FUNCTION} - Fail") - set (${VARIABLE} 0 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 () -endmacro () - -#----------------------------------------------------------------------------- -# 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 for Non-standard extension intrinsic function SIZEOF -set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE) -CHECK_FORTRAN_FEATURE(sizeof +#test code source +set (SIZEOF_CODE " PROGRAM main i = sizeof(x) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF ) - -# Check for F2008 standard intrinsic function C_SIZEOF -set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE) -CHECK_FORTRAN_FEATURE(c_sizeof +set (C_SIZEOF_CODE " PROGRAM main USE ISO_C_BINDING @@ -115,11 +64,8 @@ CHECK_FORTRAN_FEATURE(c_sizeof result = c_sizeof(a) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF ) - -# Check for F2008 standard intrinsic function STORAGE_SIZE -CHECK_FORTRAN_FEATURE(storage_size +set (STORAGE_SIZE_CODE " PROGRAM main INTEGER :: a @@ -127,22 +73,15 @@ CHECK_FORTRAN_FEATURE(storage_size result = storage_size(a) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE ) - -# Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV" -set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE) -CHECK_FORTRAN_FEATURE(ISO_FORTRAN_ENV +set (ISO_FORTRAN_ENV_CODE " PROGRAM main USE, INTRINSIC :: ISO_FORTRAN_ENV END PROGRAM " - ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV ) - -set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) -CHECK_FORTRAN_FEATURE(RealIsNotDouble +set (REALISNOTDOUBLE_CODE " MODULE type_mod INTERFACE h5t @@ -165,14 +104,8 @@ CHECK_FORTRAN_FEATURE(RealIsNotDouble CALL h5t(d) END PROGRAM main " - ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE ) - -#----------------------------------------------------------------------------- -# Checks if the ISO_C_BINDING module meets all the requirements -#----------------------------------------------------------------------------- -set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE) -CHECK_FORTRAN_FEATURE(iso_c_binding +set (ISO_C_BINDING_CODE " PROGRAM main USE iso_c_binding @@ -184,9 +117,95 @@ CHECK_FORTRAN_FEATURE(iso_c_binding ptr = C_LOC(ichr(1:1)) END PROGRAM " - ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING ) +if (NOT CMAKE_VERSION VERSION_LESS "3.14.0") + if (HDF5_REQUIRED_LIBRARIES) + set (CMAKE_REQUIRED_LIBRARIES "${HDF5_REQUIRED_LIBRARIES}") + endif () + check_fortran_source_compiles (${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF SRC_EXT f90) + check_fortran_source_compiles (${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF SRC_EXT f90) + check_fortran_source_compiles (${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE SRC_EXT f90) + check_fortran_source_compiles (${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV SRC_EXT f90) + check_fortran_source_compiles (${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE SRC_EXT f90) + check_fortran_source_compiles (${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING SRC_EXT f90) +else () + #----------------------------------------------------------------------------- + # 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) + message (STATUS "Testing Fortran ${FUNCTION}") + if (HDF5_REQUIRED_LIBRARIES) + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES + "-DLINK_LIBRARIES:STRING=${HDF5_REQUIRED_LIBRARIES}") + else () + set (CHECK_FUNCTION_EXISTS_ADD_LIBRARIES) + endif () + file (WRITE + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 + "${CODE}" + ) + TRY_COMPILE (RESULT_VAR + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f90 + CMAKE_FLAGS "${CHECK_FUNCTION_EXISTS_ADD_LIBRARIES}" + OUTPUT_VARIABLE OUTPUT + ) + + # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + # message (STATUS "Test result ${OUTPUT}") + # message (STATUS "* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ") + + if (${RESULT_VAR}) + 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 () + message (STATUS "Testing Fortran ${FUNCTION} - Fail") + set (${VARIABLE} 0 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 () + endmacro () + + #----------------------------------------------------------------------------- + # 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 for Non-standard extension intrinsic function SIZEOF + set (${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF FALSE) + CHECK_FORTRAN_FEATURE(sizeof_code ${SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_SIZEOF) + + # Check for F2008 standard intrinsic function C_SIZEOF + set (${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF FALSE) + CHECK_FORTRAN_FEATURE(c_sizeof_code ${C_SIZEOF_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_C_SIZEOF) + + # Check for F2008 standard intrinsic function STORAGE_SIZE + CHECK_FORTRAN_FEATURE(storage_size_code ${STORAGE_SIZE_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_STORAGE_SIZE) + + # Check for F2008 standard intrinsic module "ISO_FORTRAN_ENV" + set (${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV FALSE) + CHECK_FORTRAN_FEATURE(iso_fortran_env_code ${ISO_FORTRAN_ENV_CODE} ${HDF_PREFIX}_HAVE_ISO_FORTRAN_ENV) + + set (${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE FALSE) + CHECK_FORTRAN_FEATURE(realisnotdouble_code ${REALISNOTDOUBLE_CODE} ${HDF_PREFIX}_FORTRAN_DEFAULT_REAL_NOT_DOUBLE) + + #----------------------------------------------------------------------------- + # Checks if the ISO_C_BINDING module meets all the requirements + #----------------------------------------------------------------------------- + set (${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING FALSE) + CHECK_FORTRAN_FEATURE(iso_c_binding_code ${ISO_C_BINDING_CODE} ${HDF_PREFIX}_FORTRAN_HAVE_ISO_C_BINDING) +endif () + #----------------------------------------------------------------------------- # Add debug information (intel Fortran : JB) #----------------------------------------------------------------------------- diff --git a/config/cmake_ext_mod/grepTest.cmake b/config/cmake_ext_mod/grepTest.cmake index c65c951..b011ae8 100644 --- a/config/cmake_ext_mod/grepTest.cmake +++ b/config/cmake_ext_mod/grepTest.cmake @@ -87,7 +87,7 @@ if (TEST_ERRREF) # if the .err file exists grep the error output with the error reference before comparing stdout if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_ERR_STREAM) - list(LENGTH TEST_ERR_STREAM test_len) + list (LENGTH TEST_ERR_STREAM test_len) if (test_len GREATER 0) # TEST_ERRREF should always be matched string (REGEX MATCH "${TEST_ERRREF}" TEST_MATCH ${TEST_ERR_STREAM}) @@ -103,7 +103,7 @@ if (TEST_ERRREF) if (NOT TEST_SKIP_COMPARE) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) @@ -116,7 +116,7 @@ if (TEST_ERRREF) if (NOT TEST_SORT_COMPARE) # now compare the output with the reference execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} RESULT_VARIABLE TEST_COMPARE_RESULT ) else () diff --git a/config/cmake_ext_mod/runTest.cmake b/config/cmake_ext_mod/runTest.cmake index 6440c81..2b8b6b0 100644 --- a/config/cmake_ext_mod/runTest.cmake +++ b/config/cmake_ext_mod/runTest.cmake @@ -90,7 +90,7 @@ message (STATUS "COMMAND Result: ${TEST_RESULT}") # if the .err file exists and ERRROR_APPEND is enabled if (EXISTS "${TEST_FOLDER}/${TEST_OUTPUT}.err") file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (TEST_MASK_FILE) STRING(REGEX REPLACE "CurrentDir is [^\n]+\n" "CurrentDir is (dir name)\n" TEST_STREAM "${TEST_STREAM}") @@ -163,7 +163,7 @@ endif () # if the output file needs Modified text removed 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}") + 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 () @@ -210,7 +210,7 @@ set (TEST_COMPARE_RESULT 0) if (NOT TEST_SKIP_COMPARE) if (EXISTS "${TEST_FOLDER}/${TEST_REFERENCE}") file (READ ${TEST_FOLDER}/${TEST_REFERENCE} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_REFERENCE} ${TEST_FOLDER}/${TEST_REFERENCE}.tmp NEWLINE_STYLE CRLF) @@ -224,7 +224,7 @@ if (NOT TEST_SKIP_COMPARE) if (NOT TEST_SORT_COMPARE) # now compare the output with the reference execute_process ( - COMMAND ${CMAKE_COMMAND} -E compare_files ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT} ${TEST_FOLDER}/${TEST_REFERENCE} RESULT_VARIABLE TEST_COMPARE_RESULT ) else () @@ -281,7 +281,7 @@ if (NOT TEST_SKIP_COMPARE) set (TEST_ERRREF_RESULT 0) if (TEST_ERRREF) file (READ ${TEST_FOLDER}/${TEST_ERRREF} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) if (WIN32 OR MINGW) configure_file(${TEST_FOLDER}/${TEST_ERRREF} ${TEST_FOLDER}/${TEST_ERRREF}.tmp NEWLINE_STYLE CRLF) @@ -294,7 +294,7 @@ if (NOT TEST_SKIP_COMPARE) # 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} + COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${TEST_FOLDER}/${TEST_OUTPUT}.err ${TEST_FOLDER}/${TEST_ERRREF} RESULT_VARIABLE TEST_ERRREF_RESULT ) if (TEST_ERRREF_RESULT) @@ -343,7 +343,7 @@ set (TEST_GREP_RESULT 0) if (TEST_GREP_COMPARE) # now grep the output with the reference file (READ ${TEST_FOLDER}/${TEST_OUTPUT} TEST_STREAM) - list(LENGTH TEST_STREAM test_len) + list (LENGTH TEST_STREAM test_len) if (test_len GREATER 0) # TEST_REFERENCE should always be matched string (REGEX MATCH "${TEST_REFERENCE}" TEST_MATCH ${TEST_STREAM}) |