Browse Source

Minor cleanup of clang -resource-dir setting

merge-requests/413/head
eidheim 3 years ago
parent
commit
6603f52be9
  1. 2
      CMakeLists.txt
  2. 2
      src/compile_commands.cpp

2
CMakeLists.txt

@ -101,7 +101,7 @@ else()
endif() endif()
if(APPLE) if(APPLE)
add_definitions(-DJUCI_LIBCLANG_LIBRARY="${LIBCLANG_LIBRARIES}") add_definitions(-DLIBCLANG_LIBRARY_DIR="${LIBCLANG_LIBRARY_DIR}")
endif() endif()
set(BUILD_TESTING_SAVED ${BUILD_TESTING}) set(BUILD_TESTING_SAVED ${BUILD_TESTING})

2
src/compile_commands.cpp

@ -141,7 +141,7 @@ std::vector<std::string> CompileCommands::get_arguments(const boost::filesystem:
#if defined(__APPLE__) #if defined(__APPLE__)
static auto resource_path = []() -> std::string { static auto resource_path = []() -> std::string {
boost::system::error_code ec; boost::system::error_code ec;
for(boost::filesystem::directory_iterator it(boost::filesystem::path(JUCI_LIBCLANG_LIBRARY).parent_path() / "clang", ec), end; it != end; ++it) for(boost::filesystem::directory_iterator it(boost::filesystem::path(LIBCLANG_LIBRARY_DIR) / "clang", ec), end; it != end; ++it)
return it->path().string(); return it->path().string();
return {}; return {};
}(); }();

Loading…
Cancel
Save