OSDN Git Service

Allow the CMake option 'LLVM_ABI_BREAKING_CHECKS' to be undefined.
authorEric Fiselier <eric@efcs.ca>
Tue, 12 May 2015 22:49:18 +0000 (22:49 +0000)
committerEric Fiselier <eric@efcs.ca>
Tue, 12 May 2015 22:49:18 +0000 (22:49 +0000)
When building libc++abi in a standalone configuration the CMake option
'LLVM_ABI_BREAKING_CHECKS` will not be defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237204 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/HandleLLVMOptions.cmake

index d2b8974..b878863 100644 (file)
@@ -88,6 +88,9 @@ elseif( uppercase_LLVM_ABI_BREAKING_CHECKS STREQUAL "FORCE_ON" )
   set( LLVM_ENABLE_ABI_BREAKING_CHECKS 1 )
 elseif( uppercase_LLVM_ABI_BREAKING_CHECKS STREQUAL "FORCE_OFF" )
   # We don't need to do anything special to turn off ABI breaking checks.
+elseif( NOT DEFINED LLVM_ABI_BREAKING_CHECKS )
+  # Treat LLVM_ABI_BREAKING_CHECKS like "FORCE_OFF" when it has not been
+  # defined.
 else()
   message(FATAL_ERROR "Unknown value for LLVM_ABI_BREAKING_CHECKS: \"${LLVM_ABI_BREAKING_CHECKS}\"!")
 endif()