Tests: Simplify VSGNUFortran Oracle-specific link lines

On an Oracle 12.4 build the c_using_fortran executable cannot find the
"fsu" library at runtime.  Since this is an implementation detail of the
"hello" library, link that library to it privately so that "-lfsu" does
not propagate to the executables consuming it.
This commit is contained in:
Brad King 2015-10-01 10:48:38 -04:00
parent f23ab1a150
commit 7bc202ccd4
1 changed files with 3 additions and 3 deletions

View File

@ -35,12 +35,12 @@ add_library(hello SHARED hello.f)
add_library(world SHARED world.f)
target_link_libraries(hello world)
if(CMAKE_Fortran_COMPILER_ID MATCHES SunPro)
target_link_libraries(hello fsu)
target_link_libraries(hello PRIVATE fsu)
if(CMAKE_Fortran_PLATFORM_ID MATCHES SunOS)
target_link_libraries(hello sunmath m)
target_link_libraries(hello PRIVATE sunmath m)
test_sunquad(CMAKE_HAS_SUNQUAD)
if(CMAKE_HAS_SUNQUAD)
target_link_libraries(hello sunquad)
target_link_libraries(hello PRIVATE sunquad)
endif()
endif()
endif()