Skip to content

Support copy of some binary files#354

Merged
hugtalbot merged 4 commits intosofa-framework:masterfrom
alxbilger:binaryfiles
Jul 5, 2023
Merged

Support copy of some binary files#354
hugtalbot merged 4 commits intosofa-framework:masterfrom
alxbilger:binaryfiles

Conversation

@alxbilger
Copy link
Copy Markdown
Contributor

The command configure_file with attribute @ONLY does not make sense for binary files. Actually, it corrupts them when copying them. So they have to be handled differently.
I don' t know how to detect that a file is binary or not, so I adopted a strategy where I checked if the file extension matches a list of known extensions. This is not generic...

For the record, we have binary files in Python modules in SoftRobots. It corresponds to meshes. The Finger for example

@damienmarchal
Copy link
Copy Markdown
Contributor

Is there any reason why not to use copy all the time ?

@alxbilger
Copy link
Copy Markdown
Contributor Author

configure_file copies but also changes the content of some variables in the file.

@damienmarchal
Copy link
Copy Markdown
Contributor

I know, but do the files given as parameter in configure_file need that ? Why no just having two set of files, the ones that contains cmake template token from the others ?

@hugtalbot hugtalbot merged commit 3871496 into sofa-framework:master Jul 5, 2023
damienmarchal pushed a commit that referenced this pull request Sep 13, 2024
* Support copy of some binary files

* Revert "Support copy of some binary files"

This reverts commit 55f74a4.

* Try to copy without configure

* Fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants