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

Revisit conda-specific cmake'isms? #484

Open
timsnyder opened this issue Mar 21, 2024 · 0 comments
Open

Revisit conda-specific cmake'isms? #484

timsnyder opened this issue Mar 21, 2024 · 0 comments

Comments

@timsnyder
Copy link
Contributor

if (USING_CONDA)
message (STATUS "Using CONDA toolchain")
# if you don't do this, cmake won't pass the conda $PREFIX/include to
# the conda compiler and things get crazy
unset(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
# This has to be done after sparta-config.cmake and before include directories because
# those variables are maintained as directory properties and will propagate to the subdirectories
# when we start doing include_directories. If we clear them after, the toplevel sources will
# build but the subdirs won't
#
# See also https://gitlab.kitware.com/cmake/cmake/issues/17966#note_408480
endif ()

Thought it was interesting that https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PREFIX_PATH.html#variable:CMAKE_SYSTEM_PREFIX_PATH for version 3.29 says ENV{CONDA_PREFIX} will be included in CMAKE_SYSTEM_PREFIX_PATH when using a conda compiler.

I'm not sure which version of cmake added this support but it seems to be improved from the last time I looked. Flipping through the versions of the documentation, it looks like maybe version 3.18 added it? 3.18.0 was July 2020 and 3.18.5 was Feb 2021.

We might be able to remove the special conda stuff in the cmake files...

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

No branches or pull requests

1 participant