diff options
author | Shantonu Sen <ssen@apple.com> | 2009-09-23 16:05:25 +0000 |
---|---|---|
committer | Shantonu Sen <ssen@apple.com> | 2009-09-23 16:05:25 +0000 |
commit | 6311a30c904305e1d975ce0897f6233ebc6d5785 (patch) | |
tree | f35fec8912c37fa9a16c6b54927d49aa1136dd40 /CMakeLists.txt | |
parent | 3f55c61a5d7428eb18e65393e2b9e91ea9444fdb (diff) |
If the compiler does not support GCC-compatible
atomic operations, skip building the blocks runtime
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@82627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 064fde0af..9c458477d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,9 +34,19 @@ SET( Configurations Debug Release Profile ) -# BlocksRuntime - some random cruft that got thrown in at the last minute, ignoring for now. -ADD_SUBDIRECTORY( BlocksRuntime ) - +# Only build Blocks Runtime if the compiler has enough support +IF( WIN32 OR MSVC OR HAVE_OSATOMIC_COMPARE_AND_SWAP_INT OR HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT ) + SET(BUILD_BLOCKS_RUNTIME TRUE) +ELSE( WIN32 OR MSVC OR HAVE_OSATOMIC_COMPARE_AND_SWAP_INT OR HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT ) + SET(BUILD_BLOCKS_RUNTIME FALSE) +ENDIF( WIN32 OR MSVC OR HAVE_OSATOMIC_COMPARE_AND_SWAP_INT OR HAVE_SYNC_BOOL_COMPARE_AND_SWAP_INT ) + +IF( BUILD_BLOCKS_RUNTIME ) + ADD_SUBDIRECTORY( BlocksRuntime ) +ELSE( BUILD_BLOCKS_RUNTIME ) + MESSAGE(STATUS "No suitable atomic operation routines detected, skipping Blocks Runtime") +ENDIF( BUILD_BLOCKS_RUNTIME ) + ADD_SUBDIRECTORY( lib ) # Tests are being ignored for until the very basics are working. |