-
Notifications
You must be signed in to change notification settings - Fork 363
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
chore: some CMake cleanup #3564
chore: some CMake cleanup #3564
Conversation
Signed-off-by: Henry Schreiner <[email protected]>
@@ -5,8 +5,6 @@ | |||
# The full license is in the file LICENSE, distributed with this software. | |||
|
|||
cmake_minimum_required(VERSION 3.16) | |||
cmake_policy(SET CMP0025 NEW) # Introduced in cmake 3.0 | |||
cmake_policy(SET CMP0077 NEW) # Introduced in cmake 3.13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the minimum version of CMake sets all policies to NEW that were introduced on or before that value. (Also true if you set a version range, like 3.16...3.30)
@@ -37,7 +37,7 @@ Install development dependencies | |||
.. code:: bash | |||
|
|||
micromamba create -n mamba -c conda-forge -f dev/environment-dev.yml | |||
micromamba activate -n mamba | |||
micromamba activate mamba |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no -n
here.
find_package(reproc REQUIRED) | ||
find_package(reproc++ REQUIRED) | ||
find_package(Libsolv REQUIRED) | ||
find_package(fmt CONFIG REQUIRED) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using CONFIG
explicitly makes the error message better. I didn't go through every one to figure out whether they were CONFIG or MODULE, but these are some of the first ones hit, so error message is important for these.
set(libmamba_target mamba::libmamba-dyn) | ||
else() | ||
set(libmamba_target mamba::libmamba) | ||
endif() | ||
|
||
find_package(Python COMPONENTS Interpreter Development) | ||
find_package(Python COMPONENTS Interpreter Development.Module) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default Development
looks for the Embed
target too, which isn't required and sometimes (like on manylinux) not available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @henryiii,
Thank you for bringing your expertise in build system and meta-build systems with this contribution!
Edit: I don't know whether the failures on Windows are related to that, and I can't debug it.
The PR after this one has the same windows error, and the one before this one claims to fix something on Windows (#3555). |
#3555 fixes an issue related to tests under Windows. The error here is due to vcpkg which is used for the static builds of micromamba on Windows — this might be beyond our control. |
This looks like a network issue, libxml2 is available at https://gitlab.gnome.org//GNOME/libxml2/-/archive/v2.11.9/libxml2-v2.11.9.tar.gz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the LibArchive vcpkg package does not provide a cmake config file
Thanks! |
Some things I noticed when trying something locally.