@@ -5,16 +5,24 @@ add_subdirectory(cxx)
5
5
add_subdirectory (fortran)
6
6
7
7
# -- Fortran calling C++
8
- add_executable (fortran_call_cxx fortran/math_main.f90)
9
- target_link_libraries (fortran_call_cxx PRIVATE math_cxx)
8
+ add_executable (fortran_cxx_math fortran/math_main.f90)
9
+ target_link_libraries (fortran_cxx_math PRIVATE math_cxx)
10
10
# LINKER_LANGUAGE option is necessary for ifort at least
11
- set_target_properties (fortran_call_cxx PROPERTIES LINKER_LANGUAGE Fortran)
12
- add_test (NAME Fortran_call_C++ COMMAND fortran_call_cxx)
11
+ set_target_properties (fortran_cxx_math PROPERTIES LINKER_LANGUAGE Fortran)
12
+ add_test (NAME Fortran_C++_math COMMAND fortran_cxx_math)
13
+
14
+ add_executable (fortran_cxx_struct fortran/struct_main.f90)
15
+ target_link_libraries (fortran_cxx_struct PRIVATE struct_cxx)
16
+ add_test (NAME Fortran_C++_struct COMMAND fortran_cxx_struct)
13
17
14
18
# -- Fortran calling C
15
- add_executable (fortran_call_c fortran/math_main.f90)
16
- target_link_libraries (fortran_call_c PRIVATE math_c)
17
- add_test (NAME Fortran_call_C COMMAND fortran_call_c)
19
+ add_executable (fortran_c_math fortran/math_main.f90)
20
+ target_link_libraries (fortran_c_math PRIVATE math_c)
21
+ add_test (NAME Fortran_C_math COMMAND fortran_c_math)
22
+
23
+ add_executable (fortran_c_struct fortran/struct_main.f90)
24
+ target_link_libraries (fortran_c_struct PRIVATE struct_c)
25
+ add_test (NAME Fortran_C_struct COMMAND fortran_c_struct)
18
26
19
27
# -- C calling Fortran
20
28
add_executable (c_fortran_error c/error_main.c)
@@ -49,6 +57,6 @@ set_target_properties(cxx_fortran_struct PROPERTIES LINKER_LANGUAGE CXX)
49
57
add_test (NAME C++_Fortran_struct COMMAND $<TARGET_FILE:cxx_fortran_struct>)
50
58
51
59
# -- test wrapup
52
- set_tests_properties (C++_Fortran_math C++_Fortran_error Fortran_call_C Fortran_call_C++ PROPERTIES
60
+ set_tests_properties (C++_Fortran_math C++_Fortran_error Fortran_C_math Fortran_C++_math PROPERTIES
53
61
TIMEOUT 5
54
62
)
0 commit comments