Fix for #20408 - CMake LLVM_ENABLE_FFI=ON build fails on reconfigure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Josh Klontz 2014-08-08 14:32:56 +00:00
parent 3b85f30319
commit a9ee302530

View File

@ -258,12 +258,12 @@ endif ()
if( LLVM_ENABLE_FFI )
find_path(FFI_INCLUDE_PATH ffi.h PATHS ${FFI_INCLUDE_DIR})
if( FFI_INCLUDE_PATH )
if( EXISTS "${FFI_INCLUDE_PATH}/ffi.h" )
set(FFI_HEADER ffi.h CACHE INTERNAL "")
set(HAVE_FFI_H 1 CACHE INTERNAL "")
else()
find_path(FFI_INCLUDE_PATH ffi/ffi.h PATHS ${FFI_INCLUDE_DIR})
if( FFI_INCLUDE_PATH )
if( EXISTS "${FFI_INCLUDE_PATH}/ffi/ffi.h" )
set(FFI_HEADER ffi/ffi.h CACHE INTERNAL "")
set(HAVE_FFI_FFI_H 1 CACHE INTERNAL "")
endif()