summaryrefslogtreecommitdiffstats
path: root/src
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 /src
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 'src')
-rw-r--r--src/CMakeLists.txt17
-rw-r--r--src/portable.cpp1
2 files changed, 13 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index df76cb0..be395f4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -248,13 +248,20 @@ add_executable(doxygen main.cpp)
if (use_libclang)
find_package(LLVM REQUIRED CONFIG)
find_package(Clang REQUIRED CONFIG)
- target_compile_features(_doxygen PRIVATE cxx_alignof)
- target_compile_options(_doxygen PRIVATE -stdlib=libc++ -std=c++11)
- target_compile_features(doxygen PRIVATE cxx_alignof)
- target_compile_options(doxygen PRIVATE -stdlib=libc++ -std=c++11)
+ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+ target_compile_features(_doxygen PRIVATE cxx_alignof)
+ target_compile_features(doxygen PRIVATE cxx_alignof)
+ target_compile_options(_doxygen PRIVATE -stdlib=libc++ -std=c++11)
+ target_compile_options(doxygen PRIVATE -stdlib=libc++ -std=c++11)
+ elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+ target_compile_options(_doxygen PRIVATE -std=c++11)
+ target_compile_options(doxygen PRIVATE -std=c++11)
+ endif()
+ include_directories(${LLVM_INCLUDE_DIRS})
+ add_definitions(${LLVM_DEFINITIONS})
llvm_map_components_to_libnames(llvm_libs support core option)
target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS})
- set(CLANG_LIBS ${llvm_libs} ${CLANG_LIBS} clangTooling)
+ set(CLANG_LIBS libclang clangTooling ${llvm_libs})
endif()
target_link_libraries(doxygen
diff --git a/src/portable.cpp b/src/portable.cpp
index 1983fe7..4ad88a4 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -180,6 +180,7 @@ int portable_system(const char *command,const char *args,bool commandHasConsole)
}
}
#endif
+ return 1; // we should never get here
}