~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/cmake/modules/FindBison.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Try to find Bison
 
2
# Once done this will define
 
3
#
 
4
#  BISON_FOUND - system has Bison
 
5
#  BISON_EXECUTABLE - path of the bison executable
 
6
#  BISON_VERSION - the version string, like "2.5.31"
 
7
#
 
8
 
 
9
MACRO(FIND_BISON)
 
10
        FIND_PROGRAM(BISON_EXECUTABLE NAMES bison)
 
11
 
 
12
        IF(BISON_EXECUTABLE)
 
13
                SET(BISON_FOUND TRUE)
 
14
 
 
15
                EXECUTE_PROCESS(COMMAND ${BISON_EXECUTABLE} --version
 
16
                        OUTPUT_VARIABLE _BISON_VERSION
 
17
                )
 
18
                string (REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" BISON_VERSION "${_bison_VERSION}")
 
19
        ENDIF(BISON_EXECUTABLE)
 
20
 
 
21
        IF(BISON_FOUND)
 
22
          IF(NOT Bison_FIND_QUIETLY)
 
23
                MESSAGE(STATUS "Found Bison: ${BISON_EXECUTABLE}")
 
24
          ENDIF(NOT Bison_FIND_QUIETLY)
 
25
        ELSE(BISON_FOUND)
 
26
          IF(Bison_FIND_REQUIRED)
 
27
                MESSAGE(FATAL_ERROR "Could not find Bison")
 
28
          ENDIF(Bison_FIND_REQUIRED)
 
29
        ENDIF(BISON_FOUND)
 
30
ENDMACRO(FIND_BISON)
 
31
 
 
32
MACRO(BISON_GENERATOR _PREFIX _Y_INPUT _H_OUTPUT _CPP_OUTPUT)
 
33
        IF(BISON_EXECUTABLE)
 
34
                GET_FILENAME_COMPONENT(_Y_DIR ${_Y_INPUT} PATH)
 
35
                ADD_CUSTOM_COMMAND(
 
36
                        OUTPUT  ${_CPP_OUTPUT}
 
37
                        OUTPUT  ${_H_OUTPUT}
 
38
                        DEPENDS ${_Y_INPUT}
 
39
                        COMMAND ${BISON_EXECUTABLE}
 
40
                        ARGS
 
41
                                -p ${_PREFIX} -o"${_CPP_OUTPUT}"
 
42
                                --defines="${_H_OUTPUT}" ${_Y_INPUT}
 
43
                        WORKING_DIRECTORY ${_Y_DIR}
 
44
                )
 
45
                SET_SOURCE_FILES_PROPERTIES(
 
46
                        ${_CPP_OUTPUT} ${_H_OUTPUT}
 
47
                        GENERATED
 
48
                )
 
49
        ELSE(BISON_EXECUTABLE)
 
50
                MESSAGE(SEND_ERROR "Can't find bison program, and it's required")
 
51
        ENDIF(BISON_EXECUTABLE)
 
52
ENDMACRO(BISON_GENERATOR)