From 911230b037923182e04899801db3fbc3f58dbf3d Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Tue, 11 Jan 2011 15:58:18 -0600 Subject: [PATCH] Add warning when building and installing are done by different users --- CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b90eea6727..8f2c07d90c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -212,3 +212,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 () +")