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

Correction for QHULL and Python #49

Merged
merged 3 commits into from Aug 1, 2014

Conversation

francois-keith
Copy link
Member

No description provided.

@@ -47,6 +47,11 @@ EXECUTE_PROCESS(
# Remove final \n of the variable PYTHON_SITELIB
STRING(REPLACE "\n" "" PYTHON_SITELIB "${PYTHON_SITELIB}")

# In Win32, replace the \ character by / (can create issue with nmake).
IF(WIN32)
STRING(REPLACE "\\" "/" PYTHON_SITELIB "${PYTHON_SITELIB}")
Copy link
Contributor

Choose a reason for hiding this comment

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

This kind of thing should be better in "portability.cmake"... (I mean like providing the right slash in a single variable independently of the platform).

Remember: if you have a per-platform switch in a general purpose algorithm then you're doing it "wrong" ;)

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean, in portability.cmake there should be a method CORRECT_PATH (or else) that do this string conversion,
and this method should be called here (rather than specifying the conversion directly here).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes defining a variable and propagating it in all the cmake files (by grepping slashes for instance) should be better and preserve us from future similar mistakes.
If this string replacement is used several times then yes adding a macro will do no harm. Again grep is great tool to look for code duplication!

Copy link
Member

Choose a reason for hiding this comment

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

+1, this is likely to be useful elsewhere since there are tons of things that were not tested on Windows.

@francois-keith
Copy link
Member Author

I applied the recommanded modifications + I enhanced detection of sphinx in Win32

@thomas-moulard
Copy link
Contributor

Thanks François, I am ok with this one, please merge :)

@olivier-stasse
Copy link
Member

I have no comment and will follow Thomas advice.

@bchretien
Copy link
Member

👍

olivier-stasse pushed a commit that referenced this pull request Aug 1, 2014
Correction for QHULL and Python
@olivier-stasse olivier-stasse merged commit bfaeb03 into jrl-umi3218:master Aug 1, 2014
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

4 participants