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

Make examples multiplatform #58

Merged
merged 12 commits into from
Jul 7, 2024
Merged

Make examples multiplatform #58

merged 12 commits into from
Jul 7, 2024

Conversation

illwieckz
Copy link
Member

@illwieckz illwieckz commented Jul 5, 2024

Now the examples build everywhere, not only on Windows.

I introduced some ifdef that may later be rewritten with deeper change by calling into some already implemented multiplatform functions from crnlib, or to implement such reusable multiplatform function, or to make them reusable, but I expect to do that in a second step, the same way I factorized the snprintf code after having made sure it was right.

@illwieckz illwieckz force-pushed the illwieckz/examples branch from f731530 to 7dc4898 Compare July 5, 2024 22:57
@illwieckz illwieckz force-pushed the illwieckz/examples branch from 9b707e7 to a0b82ef Compare July 5, 2024 23:23
@illwieckz
Copy link
Member Author

I needed to add the -pthread flag to build the examples on the CI, actually linking the binaries without it didn't make sense.

For unknown reasons the build of crnlib/crunch was completing itself before without the flag but that's wrong, maybe some libs required by crnlib already implicitly required pthread.

@illwieckz illwieckz force-pushed the illwieckz/examples branch from a0b82ef to 305d3f1 Compare July 5, 2024 23:27
CMakeLists.txt Outdated
@@ -121,7 +121,9 @@ else()
endif()
endif()

if (BUILD_SHARED_LIBCRN OR BUILD_STATIC_LIBCRN OR BUILD_CRUNCH)
if (BUILD_SHARED_LIBCRN OR BUILD_STATIC_LIBCRN OR BUILD_CRUNCH OR BULD_EXAMPLES)
Copy link
Member

Choose a reason for hiding this comment

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

"BULD_EXAMPLES"

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch! Fixed.

@illwieckz illwieckz force-pushed the illwieckz/examples branch from 305d3f1 to 60967ae Compare July 7, 2024 16:38
@illwieckz illwieckz merged commit c6a5d46 into master Jul 7, 2024
13 checks passed
@illwieckz illwieckz deleted the illwieckz/examples branch July 7, 2024 16:44
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