Revision: 45525
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45525&view=rev
Author:   starseeker
Date:     2011-07-18 16:55:42 +0000 (Mon, 18 Jul 2011)

Log Message:
-----------
Don't use FATAL_ERROR when checking for CppUnit - it's not essential.

Modified Paths:
--------------
    geomcore/trunk/CMake/FindCppUnit.cmake

Modified: geomcore/trunk/CMake/FindCppUnit.cmake
===================================================================
--- geomcore/trunk/CMake/FindCppUnit.cmake      2011-07-18 14:45:11 UTC (rev 
45524)
+++ geomcore/trunk/CMake/FindCppUnit.cmake      2011-07-18 16:55:42 UTC (rev 
45525)
@@ -33,22 +33,10 @@
 FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h)
 FIND_LIBRARY(CPPUNIT_LIBRARY NAMES cppunit)
 
-IF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY)
-   SET(CPPUNIT_FOUND TRUE)
-ENDIF (CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARY)
+MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARY)
 
-IF (CPPUNIT_FOUND)
+# handle the QUIETLY and REQUIRED arguments and set CPPUNIT_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPPUNIT DEFAULT_MSG CPPUNIT_INCLUDE_DIR 
CPPUNIT_LIBRARY)
 
-   # show which CppUnit was found only if not quiet
-   IF (NOT CppUnit_FIND_QUIETLY)
-      MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_LIBRARY}")
-   ENDIF (NOT CppUnit_FIND_QUIETLY)
-
-ELSE (CPPUNIT_FOUND)
-
-   # fatal error if CppUnit is required but not found
-   IF (CppUnit_FIND_REQUIRED)
-      MESSAGE(FATAL_ERROR "Could not find CppUnit")
-   ENDIF (CppUnit_FIND_REQUIRED)
-
-ENDIF (CPPUNIT_FOUND)
\ No newline at end of file


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to