|
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...
map/sparta/cmake/sparta-config.cmake
Lines 129 to 141 in ee08219
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 inCMAKE_SYSTEM_PREFIX_PATHwhen 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...