summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-01-03 17:00:02 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-01-03 17:00:02 +0000
commit9917401b32f26b16ae6053d07903ac147b64a43b (patch)
tree46c9840b989025595c62501ed4940907bd766d2c /CMakeLists.txt
parent81063a237722ae010bca325021b92436f8c56e05 (diff)
downloadclang-9917401b32f26b16ae6053d07903ac147b64a43b.tar.gz
Use some of the llvm cmake infraestructure. This takes care of
disabling rtti and exceptions where requested. Remove some unnecessary code too. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 2 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31c7f35329..2cc5a8142c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,8 +47,6 @@ configure_file(
# Add appropriate flags for GCC
if (CMAKE_COMPILER_IS_GNUCXX)
- # FIXME: Turn off exceptions, RTTI:
- # -fno-exceptions -fno-rtti
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings")
endif ()
@@ -57,10 +55,8 @@ if (APPLE)
endif ()
macro(add_clang_library name)
- set(srcs ${ARGN})
+ llvm_process_sources(srcs ${ARGN})
if(MSVC_IDE OR XCODE)
- file( GLOB_RECURSE headers *.h *.td *.def)
- set(srcs ${srcs} ${headers})
string( REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR})
list( GET split_path -1 dir)
file( GLOB_RECURSE headers
@@ -112,12 +108,7 @@ macro(add_clang_library name)
endmacro(add_clang_library)
macro(add_clang_executable name)
- set(srcs ${ARGN})
- if(MSVC_IDE)
- file( GLOB_RECURSE headers *.h *.td *.def)
- set(srcs ${srcs} ${headers})
- endif(MSVC_IDE)
- add_llvm_executable( ${name} ${srcs} )
+ add_llvm_executable( ${name} ${ARGN} )
endmacro(add_clang_executable)
include_directories(