forked from TriBITSPub/TriBITS
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement recursive chgrp and chmod for installed files/directories (T…
…riBITSPub#314, ATDV-241) This is needed to fix some permisisons problems related to that ATDM Trilinos builds (see ATDV-241). See the updated documentation and unit tests for details. Other things I did as part of this: * Options ${PROJECT_NAME}_MAKE_INSTALL_GROUP_READABLE and ${PROJECT_NAME}_MAKE_INSTALL_WORLD_READABLE no longer conditional (since they are enforced by recursive chmod). * Set policy CMP0082 to make install() commands run in order based on how they were executed in the CMake configure. * Added TRIBITS_DIR_IS_BASEDIR() and unit tests * Fixed numerious mispelling of "UNITEST" to "UNITTEST". * Refectored some other installation-cleanup code to by extracting some functions.
- Loading branch information
1 parent
aa0f122
commit 889fa64
Showing
18 changed files
with
940 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash -e | ||
|
||
FILE_TO_EDIT=$1 | ||
LINE_TO_ADD=$2 | ||
|
||
echo "$LINE_TO_ADD" >> $FILE_TO_EDIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
tribits/core/add_install_group_and_perms_fixups/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
INCLUDE(TribitsAddInstallGroupAndPermsFixups) | ||
|
||
TRIBITS_ADD_INSTALL_GROUP_AND_PERMS_FIXUPS() | ||
|
||
# NOTE: This is a workaround for a problem with an issue with CMake where you | ||
# must call install(SCRIPT ...) in a subdirectory added with | ||
# add_subdirectory() in order for CMake to run that install script after all | ||
# of the other subdirectories (which are TriBITS packages). As of CMake 3.14, | ||
# you can set the policy set_policy(CMP0082 NEW) which would have allowed us | ||
# to put this in the base TRIBITS_PROJECT_IMPL() macro. But since TriBITS is | ||
# not allowed to require CMake 3.14 yet, we must use this workaround. To make | ||
# super sure that this install(SCRIPTS ...) script will get called last, the | ||
# policy CMP0082 is set to NEW in the TribitsCMakePolicies.cmake file. In | ||
# automated testing of TriBITS, this seems to show that this custom script | ||
# runs after all of the other files get installed (even with CMake 3.11) and | ||
# passes the automated tests that ensures that the last file installed is | ||
# given the correct permissions! At least that is what happened with TriBITS. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.