-
Notifications
You must be signed in to change notification settings - Fork 56
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
CMake: Use GNUInstallDirs variables instead of hard-coded paths #404
Conversation
CMakeLists.txt
Outdated
@@ -78,19 +78,19 @@ enable_language(C) # C needed even for basic platform introspection | |||
|
|||
# Set install paths ============================================================ | |||
|
|||
set(TILEDARRAY_INSTALL_BINDIR "bin" | |||
set(TILEDARRAY_INSTALL_BINDIR "${CMAKE_INSTALL_BINDIR}" |
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.
These should come after include(GNUInstallDirs)
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.
Thanks, I moved the set of install paths into the place after include(GNUInstallDirs)
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.
@evaleev would have to comment on whether TILEDARRAY_INSTALL_XYZ
need to be set before include
-ing the TA-specific CMake modules.
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.
it appears that currently TILEDARRAY_INSTALL_*
vars are not used by files in cmake/modules
but were used in the past. So keeping the original location of the definitions of TILEDARRAY_INSTALL_*
would be ideal.
Thanks, @topazus !
The current CMake practice suggests the variables in
GNUInstallDirs
to be used for the installation paths. The hard-coded paths should be avoided.Ref: https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
https://cmake.org/cmake/help/latest/command/install.html