[CMake] Let ExceptionDemo buildable with ENABLE_EH.

llvm-svn: 246152
This commit is contained in:
NAKAMURA Takumi 2015-08-27 15:13:14 +00:00
parent 976f4da09d
commit 34c7b5192b
2 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ add_subdirectory(HowToUseJIT)
add_subdirectory(Kaleidoscope) add_subdirectory(Kaleidoscope)
add_subdirectory(ModuleMaker) add_subdirectory(ModuleMaker)
if( ( NOT WIN32 ) AND ( NOT "${LLVM_NATIVE_ARCH}" STREQUAL "ARM" ) ) if(LLVM_ENABLE_EH AND (NOT WIN32) AND (NOT "${LLVM_NATIVE_ARCH}" STREQUAL "ARM"))
add_subdirectory(ExceptionDemo) add_subdirectory(ExceptionDemo)
endif() endif()

View File

@ -5,14 +5,14 @@ set(LLVM_LINK_COMPONENTS
MCJIT MCJIT
RuntimeDyld RuntimeDyld
Support Support
Target
nativecodegen nativecodegen
) )
# Enable EH and RTTI for this demo # Enable EH and RTTI for this demo
set(LLVM_REQUIRES_EH 1) if(NOT LLVM_ENABLE_EH)
set(LLVM_REQUIRES_RTTI 1) message(FATAL_ERROR "ExceptionDemo must require EH.")
endif()
set(LLVM_BUILD_EXAMPLES OFF)
add_llvm_example(ExceptionDemo add_llvm_example(ExceptionDemo
ExceptionDemo.cpp ExceptionDemo.cpp