Skip to content

Commit

Permalink
makefile: pass DUCC option to Python sk-build via CMAKE_ARGS in pip
Browse files Browse the repository at this point in the history
  • Loading branch information
ahbarnett committed Oct 25, 2024
1 parent b684337 commit dcab61e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ ifeq ($(FFT),DUCC)
DUCC_SRCS := $(DUCC_OBJS:.o=.cc)
# FINUFFT's switchable FFT done via this compile directive...
CXXFLAGS += -DFINUFFT_USE_DUCC0
# tell Python skbuild also to use DUCC (note wrapping in quotes)...
PY_CMAKE_ARGS := "-DFINUFFT_USE_DUCC0=ON"
else
# link against FFTW3 single-threaded (leaves DUCC_OBJS and DUCC_SETUP undef)
LIBSFFT += -l$(FFTWNAME) -l$(FFTWNAME)f
Expand Down Expand Up @@ -422,7 +424,8 @@ endif

# python ---------------------------------------------------------------------
python: $(STATICLIB) $(DYNLIB)
FINUFFT_DIR=$(FINUFFT) $(PYTHON) -m pip -v install python/finufft
# note use of CMAKE_ARGS which needs quotes; see scikit-build docs...
FINUFFT_DIR=$(FINUFFT) CMAKE_ARGS=$(PY_CMAKE_ARGS) $(PYTHON) -m pip -v install python/finufft
# note to devs: if trouble w/ NumPy, use: pip install ./python --no-deps
$(PYTHON) python/finufft/test/run_accuracy_tests.py
$(PYTHON) python/finufft/examples/simple1d1.py
Expand Down

0 comments on commit dcab61e

Please sign in to comment.