Skip to content

Commit

Permalink
move bigendian setting to sp tests only
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Nov 3, 2023
1 parent 8754fa3 commit b6aa034
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ function(create_sp_test name kind timeout)
target_link_libraries(${name}_${kind} PRIVATE OpenMP::OpenMP_Fortran)
endif()
target_link_libraries(${name}_${kind} PRIVATE ip::ip_${kind})
set_target_properties(${name}_${kind} PROPERTIES COMPILE_FLAGS "${fortran_${kind}_flags}")
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set_target_properties(${name}_${kind} PROPERTIES COMPILE_FLAGS "-convert big_endian ${fortran_${kind}_flags}")
elif(${CMAKE_Fortran_COMPILER_ID} MATCHES "^(GNU)$")
set_target_properties(${name}_${kind} PROPERTIES COMPILE_FLAGS "-fconvert=big-endian ${fortran_${kind}_flags}")
endif()
add_test(NAME ${name}_${kind} COMMAND ${name}_${kind})
target_compile_definitions(${name}_${kind} PRIVATE KIND_${kind})
if(TEST_TIME_LIMIT)
Expand Down

0 comments on commit b6aa034

Please sign in to comment.