Skip to content

Solver CMake improvements #1402

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

Closed
wants to merge 3 commits into from
Closed

Conversation

reuk
Copy link
Contributor

@reuk reuk commented Sep 18, 2017

Pass compiler and flags through to the solver libraries when configuring, and ensure they use C++11.

@reuk
Copy link
Contributor Author

reuk commented Sep 19, 2017

Should solve an issue @pkesseli encountered building with Cygwin. Maybe @marek-trtik could review too?

Copy link
Contributor

@marek-trtik marek-trtik left a comment

Choose a reason for hiding this comment

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

Looks good to me.

However, one question. Both minisat2 and glucose are put under if-else statements. Also, they cannot come together, i.e. either one is installed or another. In the original CMakeLists.txt both were installed always. Is this conditional installation really desired?

@reuk
Copy link
Contributor Author

reuk commented Sep 20, 2017

Yes, I think it's more desirable. It's not possible to use glucose + minisat at the same time. Therefore, we should choose one during configuration, and then only download the one we selected.

@marek-trtik
Copy link
Contributor

Sounds good and correct! Thanks.

Copy link
Contributor

@thk123 thk123 left a comment

Choose a reason for hiding this comment

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

This seems reasonable, but it would be good if @pkesseli could verify it fixes the problem.

Copy link
Contributor

@pkesseli pkesseli left a comment

Choose a reason for hiding this comment

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

The build still fails, I'm looking into this currently.

@reuk
Copy link
Contributor Author

reuk commented Sep 25, 2017

Any news on this?

Copy link
Contributor

@pkesseli pkesseli left a comment

Choose a reason for hiding this comment

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

Works now. For the record, I had to use the following configuration: cmake -H. -Bbuild -DCMAKE_CXX_COMPILER=i686-w64-mingw32-g++ -DCMAKE_C_COMPILER=i686-w64-mingw32-gcc -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DCMAKE_CXX_FLAGS='-Wno-overflow -Wno-return-type -D__STDC_FORMAT_MACROS'. Most importantly, __STDC_FORMAT_MACROS needs to be defined in order to avoid errors about a missing symbol PRIi64.

@thk123
Copy link
Contributor

thk123 commented Sep 28, 2017

@pkesseli Could you add this information to the CMake wiki so it doesn't get lost.

@reuk Is it worth adding it to the README.md as part of this PR?

@reuk
Copy link
Contributor Author

reuk commented Sep 28, 2017

Yes, those flags should probably go in the readme, but we should also fix the build so that warnings don't have to be manually suppressed. It's worth noting that this PR is superseded by #1426, which should handle flag pass-through in a more robust way. @pkesseli could you try building the branch from #1426, but with the same flags as above? If that branch also works, I'll close this PR because I think the other solution is much better.

@reuk reuk closed this Sep 28, 2017
@pkesseli
Copy link
Contributor

Documented it briefly in the Wiki. #1426 is already merged.

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.

4 participants