Skip to content

Commit

Permalink
Fix linking problem in Fortran example (#71)
Browse files Browse the repository at this point in the history
Fixes #70.
  • Loading branch information
havogt authored Nov 22, 2017
1 parent 718a7cc commit b4869a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function(serialbox_add_fortran_example NAME)
${SERIALBOX_EXTERNAL_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT})
target_include_directories(${NAME} PUBLIC ${CMAKE_BINARY_DIR}/src/serialbox-fortran)
set_target_properties( ${NAME} PROPERTIES LINKER_LANGUAGE Fortran)
if( ${CMAKE_Fortran_COMPILER_ID} STREQUAL "PGI" )
set_target_properties( ${NAME} PROPERTIES LINKER_LANGUAGE Fortran)
endif()
link_directories(${CMAKE_BINARY_DIR}/src/serialbox-fortran)
install(TARGETS ${NAME} DESTINATION bin)
endfunction(serialbox_add_fortran_example)
Expand Down

0 comments on commit b4869a3

Please sign in to comment.