summaryrefslogtreecommitdiffstats
path: root/compiler-rt/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-01-18 16:05:21 +0000
committerAlexey Samsonov <samsonov@google.com>2013-01-18 16:05:21 +0000
commit163ab9d0a5119325fafcb79e240894fa8c8cc63f (patch)
tree05a4652087dd38502eed7977b91bb4154cf9b869 /compiler-rt/CMakeLists.txt
parentc8cde8d736593150b09b782b7e179c05502babd4 (diff)
downloadbcm5719-llvm-163ab9d0a5119325fafcb79e240894fa8c8cc63f.tar.gz
bcm5719-llvm-163ab9d0a5119325fafcb79e240894fa8c8cc63f.zip
CMake: create AddCompilerRT module and implement convenience add_compiler_rt_object_library function
llvm-svn: 172826
Diffstat (limited to 'compiler-rt/CMakeLists.txt')
-rw-r--r--compiler-rt/CMakeLists.txt18
1 files changed, 1 insertions, 17 deletions
diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 9ab40891636..4b71d6acb84 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/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.
OpenPOWER on IntegriCloud