[opengtl-commits] [513] check for llvm version

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 513
Author:   cyrille
Date:     2008-12-01 23:42:16 +0100 (Mon, 01 Dec 2008)

Log Message:
-----------
check for llvm version

Modified Paths:
--------------
    trunk/OpenGTL/CMakeLists.txt
    trunk/OpenGTL/cmake/modules/FindLLVM.cmake


Modified: trunk/OpenGTL/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/CMakeLists.txt	2008-12-01 22:39:52 UTC (rev 512)
+++ trunk/OpenGTL/CMakeLists.txt	2008-12-01 22:42:16 UTC (rev 513)
@@ -27,6 +27,9 @@
 add_definitions(-Wall -Werror )
 
 find_package(LLVM REQUIRED)
+if( NOT LLVM_VERSION STREQUAL "2.4" )
+  message(FATAL_ERROR "LLVM 2.4 is required.")
+endif(NOT LLVM_VERSION STREQUAL "2.4" )
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/OpenGTL ${CMAKE_CURRENT_BINARY_DIR}
 )

Modified: trunk/OpenGTL/cmake/modules/FindLLVM.cmake
===================================================================
--- trunk/OpenGTL/cmake/modules/FindLLVM.cmake	2008-12-01 22:39:52 UTC (rev 512)
+++ trunk/OpenGTL/cmake/modules/FindLLVM.cmake	2008-12-01 22:42:16 UTC (rev 513)
@@ -33,6 +33,7 @@
   exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --cxxflags  OUTPUT_VARIABLE LLVM_COMPILE_FLAGS )
   exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --ldflags   OUTPUT_VARIABLE LLVM_LDFLAGS )
   exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --libs core OUTPUT_VARIABLE LLVM_LIBS_CORE )
+  exec_program(${LLVM_CONFIG_EXECUTABLE} ARGS --version OUTPUT_VARIABLE LLVM_VERSION )
   
   FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} jit LLVM_LIBS_JIT LLVM_LIBS_JIT_OBJECTS )
   FIND_LLVM_LIBS( ${LLVM_CONFIG_EXECUTABLE} native LLVM_LIBS_NATIVE LLVM_LIBS_NATIVE_OBJECTS )


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/