From b78559b03c2a783d2ef9c046d274710d94c44099 Mon Sep 17 00:00:00 2001 From: Mu-Te Joshua Lau <71618875+JoshuaLau0220@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:41:17 +0800 Subject: [PATCH] :wrench: don't test clang-19 compilation - xtensor not ready yet --- .github/workflows/clang-test-macos.yml | 8 ++++---- CMakeLists.txt | 11 ++++++++--- src/duostra/scheduler_search.cpp | 2 -- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/clang-test-macos.yml b/.github/workflows/clang-test-macos.yml index 7c7c1971..a46cc23f 100644 --- a/.github/workflows/clang-test-macos.yml +++ b/.github/workflows/clang-test-macos.yml @@ -15,10 +15,10 @@ jobs: uses: actions/checkout@v3 - name: Download llvm-clang, parallel and coreutils run: | - brew install llvm parallel coreutils - echo 'export PATH="$(brew --prefix)/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile - echo 'export LDFLAGS="-L$(brew --prefix)/opt/llvm/lib"' >> /Users/runner/.bash_profile - echo 'export CPPFLAGS="-I$(brew --prefix)/opt/llvm/include"' >> /Users/runner/.bash_profile + brew install llvm@18 parallel coreutils + echo 'export PATH="$(brew --prefix)/opt/llvm@18/bin:$PATH"' >> /Users/runner/.bash_profile + echo 'export LDFLAGS="-L$(brew --prefix)/opt/llvm@18/lib"' >> /Users/runner/.bash_profile + echo 'export CPPFLAGS="-I$(brew --prefix)/opt/llvm@18/include"' >> /Users/runner/.bash_profile - name: Build qsyn run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index d76bd76a..f74bc057 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,12 +36,17 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin" message( STATUS "Setting the correct unwind library for Clang18 on Apple Silicon") +# the clang should be installed at .../bin/clang++ +# get the path to clang and remove the /bin/clang++ execute_process( - COMMAND brew --prefix OUTPUT_VARIABLE BREW_PREFIX + COMMAND which clang++ + OUTPUT_VARIABLE CLANG_PATH OUTPUT_STRIP_TRAILING_WHITESPACE) - link_libraries(${BREW_PREFIX}/opt/llvm/lib/libunwind.dylib) + string(REGEX REPLACE "/bin/clang\\+\\+" "" BREW_PREFIX ${CLANG_PATH}) + message(STATUS "BREW_PREFIX: ${BREW_PREFIX}") + link_libraries(${BREW_PREFIX}/lib/libunwind.dylib) set(CMAKE_EXE_LINKER_FLAGS - "${CMAKE_EXE_LINKER_FLAGS} -L${BREW_PREFIX}/opt/llvm/lib/c++") + "${CMAKE_EXE_LINKER_FLAGS} -L${BREW_PREFIX}/lib/c++") endif() include(scripts/cmake/target_link_libraries_system.cmake) diff --git a/src/duostra/scheduler_search.cpp b/src/duostra/scheduler_search.cpp index 48dcdd21..3bade0fe 100644 --- a/src/duostra/scheduler_search.cpp +++ b/src/duostra/scheduler_search.cpp @@ -6,8 +6,6 @@ Copyright [ Copyright(c) 2023 DVLab, GIEE, NTU, Taiwan ] ****************************************************************************/ -#include - #include #include #include