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

CMake with module based configuration #301

Merged
merged 55 commits into from
Apr 23, 2024
Merged

Conversation

SumolX
Copy link
Collaborator

@SumolX SumolX commented Apr 6, 2024

Here is an alternative and cleaner approaching to managing build configuration for targets where each target will have a dedicated cmake modules (xxxx.cmake). The main CMakeLists.txt when updated with global based parameters automatically import the target properties... so it should be much more maintainable moving forward.

@SumolX SumolX requested a review from DCurrent as a code owner April 6, 2024 14:52
@SumolX SumolX marked this pull request as draft April 6, 2024 14:52
@SumolX SumolX changed the title CMake with toolchain based configuration CMake with module based configuration Apr 6, 2024
Copy link
Owner

@DCurrent DCurrent left a comment

Choose a reason for hiding this comment

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

Looks pretty slick so far @SumolX! I am curious what @Plombo thinks too.

engine/openbor.h Outdated
@@ -1790,8 +1790,6 @@ if(n<1) n = 1;
//#define MAX_MOVES 16
//#define MAX_MOVE_STEPS 16

#pragma pack(4)
Copy link
Collaborator Author

@SumolX SumolX Apr 7, 2024

Choose a reason for hiding this comment

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

Have to be-careful with packing. If data structures are not written/read from disk or being transferred over communication protocols this flag can cause bad behaviors. I encountered an issue where the pointer being assigned with an array of 11 elements was fragment and yet the code is expecting contiguous memory storage.... mostly arm based devices would have trouble with this since x86 cpus will try to fetch the data twice from memory when not aligned.... not the case with arm.

@SumolX SumolX mentioned this pull request Apr 23, 2024
@SumolX SumolX marked this pull request as ready for review April 23, 2024 21:13
@SumolX SumolX merged commit 5719a8c into DCurrent:master Apr 23, 2024
@SumolX SumolX deleted the cmake-toolchains branch April 23, 2024 21: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.

3 participants