From 2260d6c60e7eaf9a8550f2e002064ba4df187f86 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Tue, 11 Jan 2011 16:03:49 -0600 Subject: [PATCH] binpac: Add warning when building and installing are done by different users --- tools/binpac/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/binpac/CMakeLists.txt b/tools/binpac/CMakeLists.txt index 6f1e549207..cc255c9a01 100644 --- a/tools/binpac/CMakeLists.txt +++ b/tools/binpac/CMakeLists.txt @@ -106,3 +106,17 @@ message( "\n" "\n================================================================\n" ) + +######################################################################## +## Show warning when installing user is different from the one that configured + +install(CODE " + if (NOT $ENV{USER} STREQUAL \$ENV{USER}) + message(STATUS \"ATTENTION: Install is being performed by user \" + \"'\$ENV{USER}', but the build directory was configured by \" + \"user '$ENV{USER}'. This may result in a permissions error \" + \"when writing the install manifest, but you can ignore it \" + \"and consider the installation as successful if you don't \" + \"care about the install manifest.\") + endif () +")