Skip to content

Commit 11c1e8d

Browse files
committed
CMake: Fix for validation test with older CMakes
1 parent 04cfa89 commit 11c1e8d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,11 +384,15 @@ if ( ENABLE_TESTS )
384384
endif ()
385385

386386
# Check output for differences
387+
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14)
388+
set( JSON_FORTRAN_COMPARE_FLAG "--ignore-eol")
389+
endif()
390+
387391
foreach ( JSON_FILE ${EXPECTED_OUTPUTS} )
388392
get_filename_component (OUTPUT ${JSON_FILE} NAME )
389393
add_test ( NAME regression-${OUTPUT}
390394
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/files"
391-
COMMAND ${CMAKE_COMMAND} -E compare_files --ignore-eol ${OUTPUT} expected-outputs/${OUTPUT} )
395+
COMMAND ${CMAKE_COMMAND} -E compare_files ${JSON_FORTRAN_COMPARE_FLAG} ${OUTPUT} expected-outputs/${OUTPUT} )
392396
set_property ( TEST regression-${OUTPUT}
393397
APPEND
394398
PROPERTY

0 commit comments

Comments
 (0)