Index: parallel-libs/trunk/streamexecutor/CMakeLists.txt =================================================================== --- parallel-libs/trunk/streamexecutor/CMakeLists.txt +++ parallel-libs/trunk/streamexecutor/CMakeLists.txt @@ -26,17 +26,10 @@ include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) - # Get the LLVM cxxflags by using llvm-config. - # - # This is necessary to get -fno-rtti if LLVM is compiled that way. - execute_process( - COMMAND - "${LLVM_BINARY_DIR}/bin/llvm-config" - --cxxflags - OUTPUT_VARIABLE - LLVM_CXXFLAGS - OUTPUT_STRIP_TRAILING_WHITESPACE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXXFLAGS}") + # If LLVM does not have RTTI, don't use it here either. + if (NOT LLVM_ENABLE_RTTI) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") + endif() set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")