summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-04-02 13:21:12 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-04-02 13:21:12 +0000
commit0b7bc77e305d8d4bd5615e54cf61f32cd0cac9c2 (patch)
tree4053f002a445871d3fe927b7077560c6c9278659 /cmake
parent357be5e4ae712eae73d5985c2f6b91baa8bc4271 (diff)
downloadllvm-0b7bc77e305d8d4bd5615e54cf61f32cd0cac9c2.tar.gz
llvm-0b7bc77e305d8d4bd5615e54cf61f32cd0cac9c2.tar.bz2
llvm-0b7bc77e305d8d4bd5615e54cf61f32cd0cac9c2.tar.xz
Handle changing of LLVM_ENABLE_FFI.
If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it off, the build will fail in lib/ExecutionEngine/Interpreter because Interpreter will try still to #include <ffi/ffi.h>, but there are no include_directories(${FFI_INCLUDE_DIR}) now. This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if LLVM_ENABLE_FFI=0. This forces CMake to update config.h. Patch by arrowdodger! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128769 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rwxr-xr-xcmake/config-ix.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index c5ec54eb0c..e446853ef7 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -271,6 +271,10 @@ if( LLVM_ENABLE_FFI )
check_symbol_exists(ffi_call ${FFI_HEADER} HAVE_FFI_CALL)
list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH})
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH})
+else()
+ unset(HAVE_FFI_FFI_H CACHE)
+ unset(HAVE_FFI_H CACHE)
+ unset(HAVE_FFI_CALL CACHE)
endif( LLVM_ENABLE_FFI )
# Define LLVM_MULTITHREADED if gcc atomic builtins exists.