Skip to content

[mdaiter]: add CMake file for easier build#12

Open
mdaiter wants to merge 1 commit into
PascalPons:masterfrom
mdaiter:CMake
Open

[mdaiter]: add CMake file for easier build#12
mdaiter wants to merge 1 commit into
PascalPons:masterfrom
mdaiter:CMake

Conversation

@mdaiter
Copy link
Copy Markdown

@mdaiter mdaiter commented Apr 30, 2019

The Makefile sometimes provides issues with temporary file generation and platform-specific compilers (g++). CMake should help alleviate these issues.

Comment thread generator.cpp
* symetric positions are printed only once.
*/
void explore(const Position &P, char* pos_str, const int depth) {
void explore(const Position &P, char* const pos_str, const int depth) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added a const-annotation to the pointer here to ensure memory safety and optimization

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This parameter is actually not const.
The code does not even compile with your suggestion.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Wait, the integer values are variable, but the pointer is const, no? I compiled on my machine and all of this worked;.

Copy link
Copy Markdown
Owner

@PascalPons PascalPons May 5, 2019

Choose a reason for hiding this comment

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

my bad, sorry I misplaced the const when copying the code.

Comment thread generator.cpp
Comment thread generator.cpp
@mdaiter
Copy link
Copy Markdown
Author

mdaiter commented May 6, 2019

@PascalPons , are we still trying to merge this? Wouldn't want the CMake file to go to waste.

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