diff options
author | Doug Johnston <doug.johnston@gmail.com> | 2017-04-06 17:25:56 (GMT) |
---|---|---|
committer | Doug Johnston <doug.johnston@gmail.com> | 2017-04-06 17:25:56 (GMT) |
commit | 818aefcecf3cca986c971cd236bd7b77337db955 (patch) | |
tree | d5f6b59eec1ae57d746a454ee73c072e0b677d1c /CMakeLists.txt | |
parent | b91f4665693f52d02f18ee626ef201a8113321ff (diff) | |
download | Doxygen-818aefcecf3cca986c971cd236bd7b77337db955.zip Doxygen-818aefcecf3cca986c971cd236bd7b77337db955.tar.gz Doxygen-818aefcecf3cca986c971cd236bd7b77337db955.tar.bz2 |
make use of clang compilation database
See: https://clang.llvm.org/docs/JSONCompilationDatabase.html
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6127de2..e3c3d08 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,14 +35,19 @@ set(clang "0" CACHE INTERNAL "used in settings.h") if (use_sqlite3) set(sqlite3 "1" CACHE INTERNAL "used in settings.h") endif() + +set(MACOS_VERSION_MIN 10.5) if (use_libclang) set(clang "1" CACHE INTERNAL "used in settings.h") find_package(LibClang REQUIRED) + if (${CMAKE_SYSTEM} MATCHES "Darwin") + set(MACOS_VERSION_MIN 10.11) + endif() endif() if (${CMAKE_SYSTEM} MATCHES "Darwin") - set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_CXX_FLAGS}") - set(CMAKE_C_FLAGS "-Wno-deprecated-register -mmacosx-version-min=10.5 ${CMAKE_C_FLAGS}") + set(CMAKE_CXX_FLAGS "-Wno-deprecated-register -mmacosx-version-min=${MACOS_VERSION_MIN} ${CMAKE_CXX_FLAGS}") + set(CMAKE_C_FLAGS "-Wno-deprecated-register -mmacosx-version-min=${MACOS_VERSION_MIN} ${CMAKE_C_FLAGS}") find_library(CORESERVICES_LIB CoreServices) set(EXTRA_LIBS ${CORESERVICES_LIB}) endif() |