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

Fix tests by correcting detection of build path sep. #410

Merged
merged 1 commit into from May 20, 2019

Conversation

rpavlik
Copy link
Contributor

@rpavlik rpavlik commented May 15, 2019

Before, would guess incorrectly if the CMake source tree was specified
via a relative path (since then the path would not start with /).
Now, checks for any backslashes, using them as an indicator that
the backslash is the separator.

Without this, I can't get the test suite to run on Linux, and I'm pretty sure I couldn't get it to run on Windows before.

@whitequark
Copy link
Contributor

This condition should be inverted. Backslash is legal as a separator in Linux (though misguided) but forward slash is not legal as a separator on Windows.

@rpavlik
Copy link
Contributor Author

rpavlik commented May 15, 2019

Hmm. It's only forbidden on Windows in some APIs - I regularly use forward slash.

Perhaps the better way would be setting a define from CMake if the build system is win32, and completely dodge trying to do it at runtime.

@whitequark
Copy link
Contributor

Yeah, that would be nicer. No idea why I went with __FILE__ in first place.

…arator.

Before, would guess incorrectly if the CMake source tree was specified
via a relative path (since then the path would not start with /).
Now, directly asks CMake if building on Windows or something else,
and sets a define.
@rpavlik
Copy link
Contributor Author

rpavlik commented May 20, 2019

ok, updated accordingly.

@whitequark
Copy link
Contributor

Thanks!

@whitequark whitequark merged commit c18deb2 into solvespace:master May 20, 2019
@rpavlik rpavlik deleted the test-fix branch May 20, 2019 16:51
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.

None yet

2 participants