File: FindCppUnit.cmake

package info (click to toggle)
spectrum2 2.2.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,548 kB
  • sloc: cpp: 32,594; python: 1,751; javascript: 273; makefile: 34; sql: 31; xml: 10
file content (30 lines) | stat: -rw-r--r-- 917 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# - Find cppunit
# Find the native cppunit includes and library
#
#  CPPUNIT_INCLUDE_DIR - where to find cppunit/Test.h, etc.
#  CPPUNIT_LIBRARIES   - List of libraries when using cppunit.
#  CPPUNIT_FOUND       - True if cppunit found.


IF (CPPUNIT_INCLUDE_DIR)
  # Already in cache, be silent
  SET(CPPUNIT_FIND_QUIETLY TRUE)
ENDIF (CPPUNIT_INCLUDE_DIR)

FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/Test.h)

SET(CPPUNIT_NAMES cppunit)
FIND_LIBRARY(CPPUNIT_LIBRARY NAMES ${CPPUNIT_NAMES} )

# 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_LIBRARY CPPUNIT_INCLUDE_DIR)

IF(CPPUNIT_FOUND)
  SET( CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} )
ELSE(CPPUNIT_FOUND)
  SET( CPPUNIT_LIBRARIES )
ENDIF(CPPUNIT_FOUND)

MARK_AS_ADVANCED( CPPUNIT_LIBRARY CPPUNIT_INCLUDE_DIR )