Skip to content

Commit

Permalink
Disable libclang cmakelists & caching until needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Galarius committed Feb 24, 2024
1 parent 1bd4944 commit e562a76
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 23 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,15 @@ jobs:
run: |
python3 build.py conan-install --with-tests
- name: Cache libclang
id: cache-libclang
uses: actions/cache@v3
env:
cache-name: cache-libclang
with:
path: .build/_deps/libclang-subbuild/libclang-populate-prefix/src/*.7z
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('libclang/libclang-urls.txt') }}
# libclang is not currently used, uncomment when needed (#17, #24)
# - name: Cache libclang
# id: cache-libclang
# uses: actions/cache@v3
# env:
# cache-name: cache-libclang
# with:
# path: .build/_deps/libclang-subbuild/libclang-populate-prefix/src/*.7z
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('libclang/libclang-urls.txt') }}

- name: Configure
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ jobs:
conan profile detect
# The following step is copied from the build.yml.
# TODO: reuse it
- name: Cache libclang
id: cache-libclang
uses: actions/cache@v3
env:
cache-name: cache-libclang
with:
path: .build/_deps/libclang-subbuild/libclang-populate-prefix/src/*.7z
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('libclang/libclang-urls.txt') }}
# TODO: reuse if when needed (#17, #24)
# - name: Cache libclang
# id: cache-libclang
# uses: actions/cache@v3
# env:
# cache-name: cache-libclang
# with:
# path: .build/_deps/libclang-subbuild/libclang-populate-prefix/src/*.7z
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('libclang/libclang-urls.txt') }}


- name: Windows - Configure & Build (Release)
Expand Down
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ find_package(nlohmann_json REQUIRED)
find_package(CLI11 REQUIRED)
find_package(uriparser REQUIRED)

add_subdirectory(libclang)
# libclang is not currently used, uncomment when needed (#17, #24)
# add_subdirectory(libclang)

if(ENABLE_TESTING)
find_package(GTest REQUIRED)
Expand Down Expand Up @@ -113,7 +114,9 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
endif()


target_link_libraries(${PROJECT_NAME} ${conan_libs} libclang-imported)
target_link_libraries(${PROJECT_NAME} ${conan_libs}
# libclang-imported
)
target_include_directories(${PROJECT_NAME} PRIVATE
"${PROJECT_SOURCE_DIR}/include"
${CMAKE_CURRENT_BINARY_DIR}
Expand Down
3 changes: 0 additions & 3 deletions src/diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "log.hpp"
#include "utils.hpp"

#include <clang-c/Index.h>
#include <filesystem>
#include <iostream>
#include <optional>
Expand Down Expand Up @@ -259,8 +258,6 @@ std::optional<ocls::Device> Diagnostics::SelectOpenCLDevice(

std::string Diagnostics::BuildSource(const std::string& source) const
{
clang_createIndex(0, 0); // tmp

if (!m_device.has_value())
{
throw std::runtime_error("missing OpenCL device");
Expand Down
4 changes: 3 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ endif()
target_compile_definitions(${TESTS_PROJECT_NAME} PRIVATE
ENABLE_TESTING=1
)
target_link_libraries (${TESTS_PROJECT_NAME} ${libs} libclang-imported)
target_link_libraries (${TESTS_PROJECT_NAME} ${libs}
#libclang-imported
)
target_include_directories(${TESTS_PROJECT_NAME} PRIVATE
"${PROJECT_SOURCE_DIR}/include"
"${CMAKE_CURRENT_SOURCE_DIR}/mocks"
Expand Down

0 comments on commit e562a76

Please sign in to comment.