[llvm] r246152 - [CMake] Let ExceptionDemo buildable with ENABLE_EH.

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 08:13:14 PDT 2015


Author: chapuni
Date: Thu Aug 27 10:13:14 2015
New Revision: 246152

URL: http://llvm.org/viewvc/llvm-project?rev=246152&view=rev
Log:
[CMake] Let ExceptionDemo buildable with ENABLE_EH.

Modified:
    llvm/trunk/examples/CMakeLists.txt
    llvm/trunk/examples/ExceptionDemo/CMakeLists.txt

Modified: llvm/trunk/examples/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/CMakeLists.txt?rev=246152&r1=246151&r2=246152&view=diff
==============================================================================
--- llvm/trunk/examples/CMakeLists.txt (original)
+++ llvm/trunk/examples/CMakeLists.txt Thu Aug 27 10:13:14 2015
@@ -4,7 +4,7 @@ add_subdirectory(HowToUseJIT)
 add_subdirectory(Kaleidoscope)
 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)
 endif()
 

Modified: llvm/trunk/examples/ExceptionDemo/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/CMakeLists.txt?rev=246152&r1=246151&r2=246152&view=diff
==============================================================================
--- llvm/trunk/examples/ExceptionDemo/CMakeLists.txt (original)
+++ llvm/trunk/examples/ExceptionDemo/CMakeLists.txt Thu Aug 27 10:13:14 2015
@@ -5,14 +5,14 @@ set(LLVM_LINK_COMPONENTS
   MCJIT
   RuntimeDyld
   Support
+  Target
   nativecodegen
   )
 
 # Enable EH and RTTI for this demo
-set(LLVM_REQUIRES_EH 1)
-set(LLVM_REQUIRES_RTTI 1)
-
-set(LLVM_BUILD_EXAMPLES OFF)
+if(NOT LLVM_ENABLE_EH)
+  message(FATAL_ERROR "ExceptionDemo must require EH.")
+endif()
 
 add_llvm_example(ExceptionDemo
   ExceptionDemo.cpp




More information about the llvm-commits mailing list