| 
      
      
      From: <ai...@us...> - 2009-02-04 08:51:43
      
     | 
| Revision: 9449
          http://plplot.svn.sourceforge.net/plplot/?rev=9449&view=rev
Author:   airwin
Date:     2009-02-04 08:51:40 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
Use ${MATH_LIB} to test nan awareness rather than -lm since the math library
may not be available separately as libm on some systems (e.g., windows).
On systems (e.g., Linux) with a separate math library, ${MATH_LIB} is
defined to be the full pathname of the math library.  That approach
works fine on Linux, but it should be tested on other platforms (such
as AIX, Mac OS X, and windows) as well to be sure this approach works
cross-platform.
Modified Paths:
--------------
    trunk/cmake/modules/csiro.cmake
    trunk/cmake/modules/plplot.cmake
Modified: trunk/cmake/modules/csiro.cmake
===================================================================
--- trunk/cmake/modules/csiro.cmake	2009-02-04 08:33:13 UTC (rev 9448)
+++ trunk/cmake/modules/csiro.cmake	2009-02-04 08:51:40 UTC (rev 9449)
@@ -43,7 +43,7 @@
     try_run(NaNAwareCCompiler COMPILE_RESULT
       ${CMAKE_BINARY_DIR}
       ${CMAKE_SOURCE_DIR}/cmake/modules/TestNaNAware.c
-      CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${NAN_CFLAGS} -I${CMAKE_SOURCE_DIR}/lib/csa -lm"
+      CMAKE_FLAGS "-DCOMPILE_DEFINITIONS:STRING=${NAN_CFLAGS} -I${CMAKE_SOURCE_DIR}/lib/csa ${MATH_LIB}"
       OUTPUT_VARIABLE OUTPUT
       )
     if(NOT COMPILE_RESULT)
Modified: trunk/cmake/modules/plplot.cmake
===================================================================
--- trunk/cmake/modules/plplot.cmake	2009-02-04 08:33:13 UTC (rev 9448)
+++ trunk/cmake/modules/plplot.cmake	2009-02-04 08:51:40 UTC (rev 9449)
@@ -317,7 +317,6 @@
 # additional library support
 # =======================================================================
 include(freetype)
-include(csiro)
 # On windows systems the math library is not separated so do not specify
 # it unless you are on a non-windows system.
 if(NOT WIN32)
@@ -326,7 +325,10 @@
     message(FATAL_ERROR "Cannot find required math library")
   endif(NOT MATH_LIB)
 endif(NOT WIN32)
+# Must come after MATH_LIB is defined (or not).
+include(csiro)
 
+
 # =======================================================================
 # libpango support
 # =======================================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |