[MOAB-dev] r1391 - in MOAB/trunk: . cmake

pebay at mcs.anl.gov pebay at mcs.anl.gov
Wed Nov 14 15:25:38 CST 2007


Author: pebay
Date: 2007-11-14 15:25:38 -0600 (Wed, 14 Nov 2007)
New Revision: 1391

Added:
   MOAB/trunk/cmake/Findverdict.cmake
Modified:
   MOAB/trunk/CMakeLists.txt
Log:
ENH: the CMake build now requires Verdict to be installed. Several
     locations are searched, by default, but the user can also
     specify its libraries and header file of choice.


Modified: MOAB/trunk/CMakeLists.txt
===================================================================
--- MOAB/trunk/CMakeLists.txt	2007-11-14 20:10:55 UTC (rev 1390)
+++ MOAB/trunk/CMakeLists.txt	2007-11-14 21:25:38 UTC (rev 1391)
@@ -70,6 +70,9 @@
     set ( MOAB_HAVE_PTRDIFF_T ${HAVE_PTRDIFF_T} )
   endif ( NOT MOAB_FORCE_64_BIT_HANDLES AND NOT MOAB_FORCE_32_BIT_HANDLES )
 
+  # find Verdict
+  find_package( verdict REQUIRED )
+
   # Build options
   option ( MOAB_USE_MPI    "Should MOAB be compiled with MPI support?"       OFF )
   option ( MOAB_USE_HDF    "Include HDF I/O in the build?"                   OFF )

Added: MOAB/trunk/cmake/Findverdict.cmake
===================================================================
--- MOAB/trunk/cmake/Findverdict.cmake	                        (rev 0)
+++ MOAB/trunk/cmake/Findverdict.cmake	2007-11-14 21:25:38 UTC (rev 1391)
@@ -0,0 +1,42 @@
+#
+# Find Verdict include directories and libraries
+#
+# verdict_INCLUDE_DIRECTORIES - where to find verdict.h
+# verdict_LIBRARIES           - list of libraries to link against when using verdict
+# verdict_FOUND               - Do not attempt to use verdict if "no", "0", or undefined.
+
+set( verdict_PREFIX "" CACHE PATH "Path to search for Verdict header and library files" )
+
+find_path( verdict_INCLUDE_DIRECTORIES verdict.h
+  ${verdict_PREFIX}
+  ${verdict_PREFIX}/include
+  /usr/local/include
+  /usr/include
+)
+
+find_library( verdict_LIBRARY
+  NAMES verdict
+  ${verdict_PREFIX}
+  ${verdict_PREFIX}/lib64
+  ${verdict_PREFIX}/lib
+  /usr/local/lib64
+  /usr/lib64
+  /usr/local/lib
+  /usr/lib
+)
+
+set( verdict_LIBRARIES
+  ${verdict_LIBRARY}
+)
+
+if ( verdict_INCLUDE_DIRECTORIES AND verdict_LIBRARIES )
+  set( verdict_FOUND 1 )
+else ( verdict_INCLUDE_DIRECTORIES AND verdict_LIBRARIES )
+  set( verdict_FOUND 0 )
+endif ( verdict_INCLUDE_DIRECTORIES AND verdict_LIBRARIES )
+
+mark_as_advanced(
+  verdict_PREFIX
+  verdict_INCLUDE_DIRECTORIES
+  verdict_LIBRARY
+)




More information about the moab-dev mailing list