summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2016-09-13 10:01:11 (GMT)
committerRalf Habacker <ralf.habacker@freenet.de>2016-09-13 10:01:11 (GMT)
commitf5e7ad324325d82f8cbca05a1c1ef9a302a083d1 (patch)
tree325ccd3a6b5bad9d8ce7e263f2c5cbc2b751998a
parent3abff2a605bf2c1a6991017cb5b41ef404fd3ec6 (diff)
Add detecting of clang package to cmake build system.
shawn.mckenney at emmion.com reported that Ubuntu/Debian needs it. Compiling umbrello on Windows using KDE/Emerge needs it too.
-rw-r--r--unittests/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt
index dbf96a2..dd72b19 100644
--- a/unittests/CMakeLists.txt
+++ b/unittests/CMakeLists.txt
@@ -114,13 +114,21 @@ ecm_add_executable(TEST_umlroledialog ${TEST_umlroledialog_SRCS})
target_link_libraries(TEST_umlroledialog ${LIBS})
find_package(LLVM CONFIG)
+find_package(CLANG)
if(LLVM_FOUND)
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
+ message(STATUS "Found CLANG ${CLANG_PACKAGE_VERSION}")
+
include_directories(${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
+ if(CLANG_FOUND)
+ include_directories(${CLANG_INCLUDE_DIRS})
+ add_definitions(${CLANG_DEFINITIONS})
+ endif()
+
# Now build our tools
add_executable(test-llvm TEST_llvm.cpp)