summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeTests.cmake6
-rw-r--r--fortran/test/CMakeTests.cmake16
2 files changed, 14 insertions, 8 deletions
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 1ad606c..221e5cc 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -47,9 +47,10 @@
foreach (example ${examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
+ add_test (NAME f90_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f90_ex_${example}>)
else ()
add_test (NAME f90_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:f90_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -68,9 +69,10 @@ endforeach ()
foreach (example ${F2003_examples})
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
+ add_test (NAME f03_ex_${example} COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:f03_ex_${example}>)
else ()
add_test (NAME f03_ex_${example} COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:f03_ex_${example}>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 20fb7e3..c93b4a2 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -65,9 +65,10 @@ endif ()
set (last_test "FORTRAN_testhdf5-clear-objects")
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME FORTRAN_testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
+ add_test (NAME FORTRAN_testhdf5_fortran COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran>)
else ()
add_test (NAME FORTRAN_testhdf5_fortran COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:testhdf5_fortran>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -85,9 +86,10 @@ set_tests_properties (FORTRAN_testhdf5_fortran PROPERTIES DEPENDS FORTRAN_testhd
#-- Adding test for testhdf5_fortran_1_8
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
+ add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:testhdf5_fortran_1_8>)
else ()
add_test (NAME FORTRAN_testhdf5_fortran_1_8 COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:testhdf5_fortran_1_8>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -105,9 +107,10 @@ set_tests_properties (FORTRAN_testhdf5_fortran_1_8 PROPERTIES DEPENDS FORTRAN_te
#-- Adding test for fortranlib_test_F03
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
+ add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fortranlib_test_F03>)
else ()
add_test (NAME FORTRAN_fortranlib_test_F03 COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:fortranlib_test_F03>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -125,9 +128,10 @@ endif ()
#-- Adding test for vol_connector
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME FORTRAN_vol_connector COMMAND $<TARGET_FILE:vol_connector>)
+ add_test (NAME FORTRAN_vol_connector COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:vol_connector>)
else ()
add_test (NAME FORTRAN_vol_connector COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:vol_connector>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -142,9 +146,9 @@ else ()
endif ()
#-- Adding test for fflush1
-add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
+add_test (NAME FORTRAN_fflush1 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush1>)
set_tests_properties (FORTRAN_fflush1 PROPERTIES DEPENDS FORTRAN_testhdf5-clear-objects)
#-- Adding test for fflush2
-add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
+add_test (NAME FORTRAN_fflush2 COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:fflush2>)
set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)