summaryrefslogtreecommitdiffstats
path: root/cmake/FindLibClang.cmake
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2017-08-20 09:18:21 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2017-08-20 09:18:21 (GMT)
commitb0aae61c97966cb9d424b500d7ced5bdf500d8db (patch)
tree467f8a07e0757e0658de96bb37101b8c065f6359 /cmake/FindLibClang.cmake
parent82221a3a3f20f7e7cef94b52ac6c575f940b51f3 (diff)
downloadDoxygen-b0aae61c97966cb9d424b500d7ced5bdf500d8db.zip
Doxygen-b0aae61c97966cb9d424b500d7ced5bdf500d8db.tar.gz
Doxygen-b0aae61c97966cb9d424b500d7ced5bdf500d8db.tar.bz2
Fixes for cross platform build with new LLVM/CLANG version
Diffstat (limited to 'cmake/FindLibClang.cmake')
-rw-r--r--cmake/FindLibClang.cmake55
1 files changed, 0 insertions, 55 deletions
diff --git a/cmake/FindLibClang.cmake b/cmake/FindLibClang.cmake
deleted file mode 100644
index e7462d4..0000000
--- a/cmake/FindLibClang.cmake
+++ /dev/null
@@ -1,55 +0,0 @@
-if (NOT CLANG_ROOT)
- set(CLANG_ROOT $ENV{CLANG_ROOT})
-endif ()
-
-if (NOT LLVM_CONFIG)
- set(LLVM_CONFIG $ENV{LLVM_CONFIG})
- if (NOT LLVM_CONFIG)
- set(llvm_config_names llvm-config)
- foreach(minor RANGE 9 1)
- list(APPEND llvm_config_names "llvm-config3${minor}" "llvm-config-3.${minor}" "llvm-config-mp-3.${minor}")
- endforeach ()
- find_program(LLVM_CONFIG NAMES ${llvm_config_names})
- endif ()
-endif ()
-
-if (LLVM_CONFIG)
- message(STATUS "llvm-config found at: ${LLVM_CONFIG}")
-else ()
- message(FATAL_ERROR "Could NOT find llvm-config executable.")
-endif ()
-
-if (NOT EXISTS ${CLANG_INCLUDEDIR})
- execute_process(COMMAND ${LLVM_CONFIG} --includedir OUTPUT_VARIABLE CLANG_INCLUDEDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT EXISTS ${CLANG_INCLUDEDIR})
- message(FATAL_ERROR "Could NOT find clang includedir. You can fix this by setting CLANG_INCLUDEDIR in your shell or as a cmake variable.")
- endif ()
-endif ()
-
-if (NOT EXISTS ${CLANG_LIBDIR})
- execute_process(COMMAND ${LLVM_CONFIG} --libdir OUTPUT_VARIABLE CLANG_LIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
- if (NOT EXISTS ${CLANG_LIBDIR})
- message(FATAL_ERROR "Could NOT find clang libdir. You can fix this by setting CLANG_LIBDIR in your shell or as a cmake variable.")
- endif ()
-endif ()
-
-if (NOT CLANG_LIBS)
- find_library(CLANG_LIB_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT NAMES clang libclang ${CLANG_ROOT}/lib ${CLANG_LIBDIR} NO_DEFAULT_PATH)
- if (NOT EXISTS ${CLANG_CLANG_LIB_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT})
- find_library(CLANG_LIBS NAMES clang libclang)
- if (NOT EXISTS ${CLANG_LIBS})
- if (MSVC)
- set (CLANG_LIBS "${CLANG_LIBDIR}/libclang.lib")
- else()
- set (CLANG_LIBS "-L${CLANG_LIBDIR}" "-lclang" "-Wl,-rpath,${CLANG_LIBDIR}")
- endif()
- endif ()
- else ()
- set(CLANG_LIBS "${CLANG_LIB_HACK_CMAKECACHE_DOT_TEXT_BULLSHIT}")
- endif ()
-endif ()
-
-execute_process(COMMAND ${LLVM_CONFIG} --version OUTPUT_VARIABLE CLANG_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-message("-- Using Clang ${CLANG_VERSION} from ${CLANG_LIBDIR} with LIBS ${CLANG_LIBS} and CXXFLAGS ${CLANG_CXXFLAGS}")
-
-