diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-01-18 16:05:21 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-01-18 16:05:21 +0000 |
commit | 392c50d4a56557a51a353509c665188aef115f74 (patch) | |
tree | 1c17bf1f8845bf70681a8434e07c496618b3fca1 /CMakeLists.txt | |
parent | d6bc93e1f1f9eb1d3cd1ce88891dc5fe28d051f9 (diff) | |
download | compiler-rt-392c50d4a56557a51a353509c665188aef115f74.tar.gz compiler-rt-392c50d4a56557a51a353509c665188aef115f74.tar.bz2 compiler-rt-392c50d4a56557a51a353509c665188aef115f74.tar.xz |
CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@172826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ab40891..4b71d6ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" ) +include(AddCompilerRT) set(COMPILER_RT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) @@ -123,23 +124,6 @@ if(APPLE) list(APPEND SANITIZER_COMMON_CFLAGS -mmacosx-version-min=10.5) endif() -# Because compiler-rt spends a lot of time setting up custom compile flags, -# define a handy helper function for it. The compile flags setting in CMake -# has serious issues that make its syntax challenging at best. -function(set_target_compile_flags target) - foreach(arg ${ARGN}) - set(argstring "${argstring} ${arg}") - endforeach() - set_property(TARGET ${target} PROPERTY COMPILE_FLAGS "${argstring}") -endfunction() - -function(set_target_link_flags target) - foreach(arg ${ARGN}) - set(argstring "${argstring} ${arg}") - endforeach() - set_property(TARGET ${target} PROPERTY LINK_FLAGS "${argstring}") -endfunction() - # Compute the Clang version from the LLVM version. # FIXME: We should be able to reuse CLANG_VERSION variable calculated # in Clang cmake files, instead of copying the rules here. |