Skip to content

Commit fba6b5d

Browse files
committed
need linker language
1 parent d7269fd commit fba6b5d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ add_test(NAME C_Fortran_error
2727

2828
add_executable(c_fortran_struct c/struct_main.c)
2929
target_link_libraries(c_fortran_struct PRIVATE struct_fortran)
30+
set_target_properties(c_fortran_struct PROPERTIES LINKER_LANGUAGE C)
3031
add_test(NAME C_Fortran_struct COMMAND $<TARGET_FILE:c_fortran_struct>)
3132

3233
# -- C++ calling Fortran
@@ -44,6 +45,7 @@ add_test(NAME C++_Fortran_error
4445

4546
add_executable(cxx_fortran_struct cxx/struct_main.cxx)
4647
target_link_libraries(cxx_fortran_struct PRIVATE struct_fortran)
48+
set_target_properties(cxx_fortran_struct PROPERTIES LINKER_LANGUAGE CXX)
4749
add_test(NAME C++_Fortran_struct COMMAND $<TARGET_FILE:cxx_fortran_struct>)
4850

4951
# -- test wrapup

0 commit comments

Comments
 (0)