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 Sylvan Cannot be Compiled as a Submodule #48

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

SSoelvsten
Copy link
Contributor

@SSoelvsten SSoelvsten commented Jan 17, 2024

Note that CMAKE_SOURCE_DIR and PROJECT_SOURCE_DIR are two different variables. The former is the root of the entire tree (possibly a dependent project) whereas the latter is the latest call to project() (which is the Sylvan root folder in this case).

  • Does it now work again as a submodule? Yes, I have tested this works as intended on my benchmarking repository. With this fix, everything compiles and runs with the latest version of Sylvan.
  • Does it break installation? No, sudo make install indeed copies the desired files to /usr/local/... as intended.

@jacopol
Copy link
Contributor

jacopol commented Jan 17, 2024

Could this be related to / would this also fix #47 ?

@SSoelvsten
Copy link
Contributor Author

SSoelvsten commented Jan 17, 2024

This would not fix #47, no. I do not exactly know why ccmake did not change the value correctly, but you can alternatively provide the prefix at the terminal with cmake.

@trolando trolando merged commit 9ccb1fd into trolando:master Mar 23, 2024
31 checks passed
@trolando
Copy link
Owner

I'll pull it in, but I recall that there was a better way to detect if a project is the root project or a subproject.

@SSoelvsten
Copy link
Contributor Author

SSoelvsten commented Mar 23, 2024

Thanks!

You can use the PROJECT_IS_TOP_LEVEL Cmake variable to check if something is the root project, if that is the you are thinking of. But, I'm not sure I yet see how it can improve code quality.

@SSoelvsten SSoelvsten deleted the fix-submodule branch April 12, 2024 19:46
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.

3 participants