Unable to disable optional dependencies
adamjstewart opened this issue · 5 comments
CMakeLists.txt has the following options:
option(DISABLE_FFTW "Disable testing the DFT library with FFTW" OFF)
option(DISABLE_MPFR "Disable testing with the MPFR library" OFF)
option(DISABLE_SSL "Disable testing with the SSL library" OFF)
However, these options don't actually work. When I select them, I see:
CMake Warning:
Manually-specified variables were not used by the project:
DISABLE_FFTW
DISABLE_MPFR
DISABLE_SSL
Instead, cmake picks up MPFR installed on my system and links to that:
-- MPFR : /opt/homebrew/lib/libmpfr.dylib
-- MPFR header file in /opt/homebrew/include
Hello! Thanks for reporting.
I was able to reproduce some of it on Mac OS.
For MPFR I agree that it does not clear MPFR unless we start on a fresh build. But starting on an empty build directory with
rm -rf build/*
cmake -S . -B build -GNinja -DDISABLE_MPFR=ON
returns
-- MPFR :
-- MPFR header file in /usr/local/include
For FFTW3 and OPENMP, I admit that there doesn't seem to be a mechanism to clear LIB_{FFTW3,OPENMP}.
Will look into why that is and potentially suggest a fix.
Do you still have this issue? Bare in mind option names have changed, e.g. DISABLE_MPFR became SLEEF_DISABLE_MPFR.
FFTW still seems to be buggy:
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_POLICY_DEFAULT_CMP0090
SLEEF_DISABLE_FFTW
In what context is that showing? I cannot reproduce locally.
This is interesting, never seen this one before.
This works fine without warnings: -DSLEEF_DISABLE_FFTW=ON
This results in the above warning: -DSLEEF_DISABLE_FFTW:BOOL=ON