summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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
}