File: CMakeLists.txt

package info (click to toggle)
gccxml 0.9.0%2Bcvs20100501-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 79,132 kB
  • ctags: 73,371
  • sloc: ansic: 751,436; cpp: 34,175; asm: 26,833; sh: 5,077; makefile: 4,696; lex: 589; awk: 566; perl: 334; yacc: 271; pascal: 86; python: 29
file content (42 lines) | stat: -rw-r--r-- 1,534 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
31
32
33
34
35
36
37
38
39
40
41
42
PROJECT(GCC C)
IF(COMMAND CMAKE_POLICY)
  CMAKE_POLICY(SET CMP0003 NEW)
ENDIF(COMMAND CMAKE_POLICY)

IF(GCCXML_INSTALL_COMPONENT_NAME_RUNTIME_EXECUTABLE)
  SET(GCCXML_INSTALL_COMPONENT_RUNTIME_EXECUTABLE
    COMPONENT ${GCCXML_INSTALL_COMPONENT_NAME_RUNTIME_EXECUTABLE})
ENDIF(GCCXML_INSTALL_COMPONENT_NAME_RUNTIME_EXECUTABLE)

# Do not place internal build-related executables in a parent project
# executable path.  Backup the real executable output path so it can
# be restored in gcc/cp for building gccxml_cc1plus.
SET(GCC_EXECUTABLE_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
SET(EXECUTABLE_OUTPUT_PATH "${GCC_BINARY_DIR}/gcc")

# Do not inherit library building rules from the parent project.
SET(BUILD_SHARED_LIBS 0)
SET(LIBRARY_OUTPUT_PATH "${GCC_BINARY_DIR}/gcc")

IF(APPLE)
  IF(CMAKE_COMPILER_IS_GNUCC)
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -no-cpp-precomp")
  ENDIF(CMAKE_COMPILER_IS_GNUCC)
ENDIF(APPLE)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")

IF(CMAKE_C_COMPILER MATCHES "cl")
  STRING(REGEX REPLACE "/W([0-4])?" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
  SET(CMAKE_CXX_WARNING_LEVEL 0)
  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W0")
ELSE(CMAKE_C_COMPILER MATCHES "cl")
  IF(CMAKE_C_COMPILER MATCHES "bcc32")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w-")
  ELSE(CMAKE_C_COMPILER MATCHES "bcc32")
    SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -w")
  ENDIF(CMAKE_C_COMPILER MATCHES "bcc32")
ENDIF(CMAKE_C_COMPILER MATCHES "cl")

ADD_DEFINITIONS(-DALMOST_STDC)

SUBDIRS(config_cmake libiberty libdecnumber libcpp gcc)