Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to disable optional dependencies #475

Open
adamjstewart opened this issue Nov 1, 2023 · 5 comments
Open

Unable to disable optional dependencies #475

adamjstewart opened this issue Nov 1, 2023 · 5 comments
Labels

Comments

@adamjstewart
Copy link

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
@blapie blapie added the cmake label Nov 2, 2023
@blapie
Copy link
Collaborator

blapie commented Nov 6, 2023

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.

@blapie
Copy link
Collaborator

blapie commented Feb 9, 2024

Do you still have this issue? Bare in mind option names have changed, e.g. DISABLE_MPFR became SLEEF_DISABLE_MPFR.

@adamjstewart
Copy link
Author

FFTW still seems to be buggy:

CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_POLICY_DEFAULT_CMP0090
    SLEEF_DISABLE_FFTW

@blapie
Copy link
Collaborator

blapie commented Feb 9, 2024

In what context is that showing? I cannot reproduce locally.

@adamjstewart
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants