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

Add Option to deactivate the CPack directives #292

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fbordeu
Copy link

@fbordeu fbordeu commented Dec 16, 2024

Hello,

Little change to add an option to the cmake files to only install compiled files. In the current cmake files the VisualStudio runtime files are installed. This make it impossible to build a package unsing the conda-force infrastructure on windows (the packages must ship only compiled libs).

MR of the new recipe for mmg for conda-forge. conda-forge/mmgsuite-feedstock#15

Felipe

@CLAassistant
Copy link

CLAassistant commented Dec 16, 2024

CLA assistant check
All committers have signed the CLA.

@taupalosaurus
Copy link
Contributor

Hello,

why would we want to install VS runtime files as well ? Should it be the opposite by default, and only install them if requested ?

Thanks,

--
Nicolas

@taupalosaurus
Copy link
Contributor

Hi @fbordeu , sorry I let this one drag on.

I'm trying to familiarize myself with all this building process. Could you please clarify the path that is taken when cmake copies the VS files ? Do you not need Cpack when you build your conda package ?

Also, it seems that there is an option to have Cpack ignore certain files https://cmake.org/cmake/help/latest/module/CPack.html#variable:CPACK_SOURCE_IGNORE_FILES

Thanks,

@fbordeu
Copy link
Author

fbordeu commented Jan 19, 2025

In conda packages, conda-build is responsible of the software packaging. son cpack is not needed and must not be activated. This MR add the possibility to disconnect cpack directives (the default behavior is not modified).

@taupalosaurus
Copy link
Contributor

what I do not understand is : the cmake rule install(packages) creates rules in the Makefiles to build the package. Do you call that rule explicitly ? Or else, how does it get called ?

I'm wondering if SET (MMG5_PACKAGE FALSE CACHE BOOL "add CPack directives") wouldn't be better for users.

@fbordeu
Copy link
Author

fbordeu commented Jan 19, 2025

ok, (if my memory is good) during the build no cpack directive are executed. but during "make install", the vs files are installed on the install directory. Here the install directory is a prefix defined by the conda-build system.

To make a correct conda-forge package the recipe must install only the files responsible of, no other files. VS files are added as dependencies so the conda installer can solve the dependency tree and install all the neede dependencies.

@taupalosaurus
Copy link
Contributor

If I understand correctly, you build from sources, you do make install and it somehow calls CPack and installs the CPack package ?

It really makes no sense to me. I'm going to open an issue to track this out of the PR.

Copy link
Contributor

@taupalosaurus taupalosaurus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference: the option should probably be deactivated by default. We will investigate further in a separate issue.

@fbordeu
Copy link
Author

fbordeu commented Jan 20, 2025

If I understand correctly, you build from sources, you do make install and it somehow calls CPack and installs the CPack package ?

It really makes no sense to me. I'm going to open an issue to track this out of the PR.

No cpack is used during the conda-build. the steps are:

git clone
cmake ...
make ...
make install ...
conda-build make a package of the installed 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

Successfully merging this pull request may close these issues.

3 participants