-
Notifications
You must be signed in to change notification settings - Fork 124
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
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.
… all cpu targets.
…etween 64 and 32 bit platforms.
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.