-
Notifications
You must be signed in to change notification settings - Fork 34
Tupek/gretl cmake #1511
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
Tupek/gretl cmake #1511
Conversation
chapman39
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me
| set(GRETL_SOURCE_DIR "${PROJECT_SOURCE_DIR}/gretl" CACHE PATH "") | ||
|
|
||
| if (NOT EXISTS "${GRETL_SOURCE_DIR}/CMakeLists.txt") | ||
| message(FATAL_ERROR | ||
| "The gretl repo is not present. " | ||
| "Either run the following command in your git repository: \n" | ||
| " git submodule update --init --recursive\n" | ||
| "Or add -DGRETL_SOURCE_DIR=/path/to/gretl to your CMake command." ) | ||
| set(GRETL_SOURCE_DIR "${PROJECT_SOURCE_DIR}/smith/gretl" CACHE PATH "" FORCE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think something like this would be cleaner:
if(NOT DEFINED GRETL_SOURCE_DIR)
set(GRETL_SOURCE_DIR "${PROJECT_SOURCE_DIR}/gretl" CACHE PATH "")
endif()
// then error if ${GRETL_SOURCE_DIR}/CMakeLists.txt doesnt exist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I cleaned it up a bit in the latest commit, but I still needed to try looking in /smith/gretl in some cases
2c41e07 to
1c18314
Compare
99a270d to
a6791cf
Compare
a6791cf to
2e1b3d5
Compare
this enables smith to be built by other projects containing smith as a submodule