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

Modernize cmake #68

Merged
merged 13 commits into from
Nov 5, 2024
Merged

Modernize cmake #68

merged 13 commits into from
Nov 5, 2024

Conversation

orzechow
Copy link
Member

@orzechow orzechow commented Nov 4, 2024

Some CMake cleanup and refactoring, in preparation to add the #22 as subfolder project.

Based on Modern CMake book and other sources.

@orzechow orzechow mentioned this pull request Nov 4, 2024
Merged
Copy link
Collaborator

@ll-nick ll-nick left a comment

Choose a reason for hiding this comment

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

Awesome, thanks a lot!

Lots of great changes, I don't have a lot to complain about. :)

test/CMakeLists.txt Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
README.md Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@@ -138,7 +138,7 @@ In order to compile with tests define `BUILD_TESTS=true`
mkdir -p arbitration_graphs/build
cd arbitration_graphs/build
cmake -DBUILD_TESTS=true ..
cmake --build .
cmake --build . -j9
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why 9 btw? :D

Copy link
Member Author

@orzechow orzechow Nov 5, 2024

Choose a reason for hiding this comment

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

Kind of arbitrary, but at least more than one.

A very rough suggestion was once to use #threads + 1, nowadays 2 * #threads seems to also work for many. Anyhow, it's not too crazy to assume a modern dev has >8 threads available (4 cores with hyperthreading).

@orzechow orzechow merged commit 061414c into main Nov 5, 2024
@orzechow orzechow deleted the modernize_cmake branch November 5, 2024 10:14
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.

2 participants