Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz-Alexander-Kern committed Jun 7, 2024
1 parent e0dcbfb commit d520605
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ jobs:

- name: Install dependencies
run: |
brew install libomp gcc
export CC=/usr/local/bin/gcc-14
export CXX=/usr/local/bin/g++-14
brew install libomp llvm
export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
export LDFLAGS="-L/usr/local/opt/libomp/lib"
export CPPFLAGS="-I/usr/local/opt/libomp/include"
python -m pip install --upgrade pip
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
optional=True
)
elif platform.system() == "Darwin":
# Path to the Homebrew-installed llvm and libomp
llvm_dir = '/usr/local/opt/llvm'
libomp_dir = '/usr/local/opt/libomp'

Expand All @@ -42,11 +41,10 @@
sources=['elephant/spade_src/src/fim.cpp'],
include_dirs=[
'elephant/spade_src/include',
os.path.join(libomp_dir, 'include'), # Include directory for OpenMP headers
os.path.join(libomp_dir, 'lib') # Include directory for OpenMP headers
os.path.join(libomp_dir, 'include') # Include directory for OpenMP headers
],
language='c++',
libraries=['omp'], # You might need to check the actual name of the OpenMP library
libraries=['omp'], # Adjust if necessary
extra_compile_args=[
'-DMODULE_NAME=fim',
'-DUSE_OPENMP',
Expand All @@ -56,11 +54,13 @@
'-Xpreprocessor',
'-fopenmp', # Enable OpenMP
'-std=c++17',
f'-I{os.path.join(libomp_dir, "include")}' # Include OpenMP headers
'-stdlib=libc++' # Use libc++ for the C++ standard library
],
extra_link_args=[
'-L' + os.path.join(libomp_dir, 'lib'), # Link against the OpenMP library
'-fopenmp', # Enable OpenMP
'-stdlib=libc++', # Link against libc++
'-lomp' # Link with the OpenMP library
],
optional=False
)
Expand Down

0 comments on commit d520605

Please sign in to comment.