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

Detect additional CMake build failures #2058

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

falbrechtskirchinger
Copy link
Contributor

Add include_httplib.cc to the main test executable (already done in Makefile), and add include_windows_h.cc to the main test executable on Windows to test if including windows.h conflicts with httplib.h.

Detects breakage fixed in #2057.

@yhirose
Copy link
Owner

yhirose commented Feb 16, 2025

@sum01 @abouvier @jimmy-park @Tachi107 do you have any comment since I am not very miuch familiar to CMake?

@Tachi107
Copy link
Contributor

Tachi107 commented Feb 16, 2025

¯\_(ツ)_/¯

The change looks good, but I don't really care about Windows

@falbrechtskirchinger
Copy link
Contributor Author

falbrechtskirchinger commented Feb 16, 2025

¯_(ツ)_/¯

The change looks good, but I don't really care about Windows

Neither do I, but I've been trained to always parenthesis min and max by repeated issues in nlohmann/json.

Edit: Also, the other change is about detecting ODR violations, which I do care about when I build tests on Linux using CMake. ;-)

Add include_httplib.cc to the main test executable (already done in
Makefile), and add include_windows_h.cc to the main test executable on
Windows to test if including windows.h conflicts with httplib.h.
@sum01
Copy link
Contributor

sum01 commented Feb 16, 2025

It seems fine, but I've never really looked at the project's test cmake stuff anyways.

But isn't it easier to just #define NOMINMAX instead of dealing with those issues anyways?

@falbrechtskirchinger
Copy link
Contributor Author

It seems fine, but I've never really looked at the project's test cmake stuff anyways.

But isn't it easier to just #define NOMINMAX instead of dealing with those issues anyways?

They have been dealt with previously, so I'm just continuing the practice. And it seems to continuously bite people, as evidenced by the issue trackers.

@yhirose yhirose merged commit 735e593 into yhirose:master Feb 16, 2025
5 checks passed
@yhirose
Copy link
Owner

yhirose commented Feb 16, 2025

Thanks all!

@falbrechtskirchinger falbrechtskirchinger deleted the windows_h branch February 17, 2025 04:17
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