diff options
author | Oscar Fuentes <ofv@wanadoo.es> | 2011-02-03 22:48:20 +0000 |
---|---|---|
committer | Oscar Fuentes <ofv@wanadoo.es> | 2011-02-03 22:48:20 +0000 |
commit | 2100fe952a644134b1dca462f2e6330cf14ef47c (patch) | |
tree | 2661962ac35846985a752be71bd8f995f9c81081 /CMakeLists.txt | |
parent | c2e20d0c42cf085940c9a9cb495a7116d1b0eb07 (diff) |
Moved here from LLVM Clang's configuration options and related macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8722882eaf..f7989bc1fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,12 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) add_definitions( -D__STDC_CONSTANT_MACROS ) endif() +set(CLANG_RESOURCE_DIR "" CACHE STRING + "Relative directory from the Clang binary to its resource files.") + +set(C_INCLUDE_DIRS "" CACHE STRING + "Colon separated list of directories clang will search for headers.") + set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -108,6 +114,10 @@ if (APPLE) set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress") endif () +configure_file( + ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake + ${CLANG_BINARY_DIR}/include/clang/Config/config.h) + macro(add_clang_library name) llvm_process_sources(srcs ${ARGN}) if(MSVC_IDE OR XCODE) @@ -186,7 +196,7 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ PATTERN "*.inc" ) -add_definitions( -D_GNU_SOURCE ) +add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H ) option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF) if(CLANG_BUILD_EXAMPLES) |