|
From: <ai...@us...> - 2011-11-24 21:04:16
|
Revision: 12039
http://plplot.svn.sourceforge.net/plplot/?rev=12039&view=rev
Author: airwin
Date: 2011-11-24 21:04:09 +0000 (Thu, 24 Nov 2011)
Log Message:
-----------
Implement NON_TRANSITIVE case for the fortran bindings. When obvious
false positives were discounted, ldd -u showed perfect results for the
Fortran examples in the build tree, but slightly imperfect results in
the traditional installed examples tree because we have failed to
configure a separate *.pc file for the plplotf77c and plplotf95c
libraries, and lumped that information instead into the *.pc files
associated with the plplotf77 and plotf95 libraries. I will leave it
to someone else to fix that.
Build and run tests in the build tree and traditional installed
examples tree produced results without obvious errors on Debian
stable. However, the latest Linux distributions such as Fedora or
Debian unstable have a linker that enforces linking rules much more
stringently than Debian stable so additional tests (and likely some
fixes) are required before -DNON_TRANSITIVE=ON will work for fortran
on those platforms.
Modified Paths:
--------------
trunk/bindings/f77/CMakeLists.txt
trunk/bindings/f95/CMakeLists.txt
Modified: trunk/bindings/f77/CMakeLists.txt
===================================================================
--- trunk/bindings/f77/CMakeLists.txt 2011-11-24 20:09:56 UTC (rev 12038)
+++ trunk/bindings/f77/CMakeLists.txt 2011-11-24 21:04:09 UTC (rev 12039)
@@ -203,6 +203,18 @@
add_library(plplotf77${LIB_TAG} ${plplotf77${LIB_TAG}_LIB_SRCS})
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotf77cd and libplplotf77d in the shared libraries case.
+ target_link_libraries(plplotf77c${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ target_link_libraries(plplotf77${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ # This configures the pkg-config method to use non-transitive linking.
+ set(PC_REQUIRES_TAG "Requires.private")
+ else(NON_TRANSITIVE)
+ # This configures the pkg-config method to use transitive linking
+ set(PC_REQUIRES_TAG "Requires")
+ endif(NON_TRANSITIVE)
+
if(STATIC_OPTS)
add_library(plplotf77opts${LIB_TAG} STATIC ${plplotf77opts${LIB_TAG}_LIB_SRCS})
target_link_libraries(plplotf77${LIB_TAG} plplotf77c${LIB_TAG})
Modified: trunk/bindings/f95/CMakeLists.txt
===================================================================
--- trunk/bindings/f95/CMakeLists.txt 2011-11-24 20:09:56 UTC (rev 12038)
+++ trunk/bindings/f95/CMakeLists.txt 2011-11-24 21:04:09 UTC (rev 12039)
@@ -147,6 +147,18 @@
add_library(plplotf95${LIB_TAG} ${plplotf95${LIB_TAG}_LIB_SRCS})
+ if(NON_TRANSITIVE)
+ # empty list ==> non-transitive linking for everything that links to
+ # libplplotf95cd and libplplotf95d in the shared libraries case.
+ target_link_libraries(plplotf95c${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ target_link_libraries(plplotf95${LIB_TAG} LINK_INTERFACE_LIBRARIES)
+ # This configures the pkg-config method to use non-transitive linking.
+ set(PC_REQUIRES_TAG "Requires.private")
+ else(NON_TRANSITIVE)
+ # This configures the pkg-config method to use transitive linking
+ set(PC_REQUIRES_TAG "Requires")
+ endif(NON_TRANSITIVE)
+
if(STATIC_OPTS)
add_library(plplotf95opts${LIB_TAG} STATIC ${plplotf95opts${LIB_TAG}_LIB_SRCS})
target_link_libraries(plplotf95${LIB_TAG} plplotf95c${LIB_TAG})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|