[cfe-commits] r122750 - /cfe/trunk/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Mon Jan 3 09:00:02 PST 2011
Author: ofv
Date: Mon Jan 3 11:00:02 2011
New Revision: 122750
URL: http://llvm.org/viewvc/llvm-project?rev=122750&view=rev
Log:
Use some of the llvm cmake infraestructure. This takes care of
disabling rtti and exceptions where requested. Remove some unnecessary
code too.
Modified:
cfe/trunk/CMakeLists.txt
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=122750&r1=122749&r2=122750&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Mon Jan 3 11:00:02 2011
@@ -47,8 +47,6 @@
# 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 @@
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 @@
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(
More information about the cfe-commits
mailing list