aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/CMakeLists.txt b/config/CMakeLists.txt
index b233418bda..b94c3f9f07 100644
--- a/config/CMakeLists.txt
+++ b/config/CMakeLists.txt
@@ -17,7 +17,7 @@ configure_file (
find_program(WHOAMI_PROG whoami)
find_program(HOSTNAME_PROG hostname)
-if (EXISTS ${WHOAMI_PROG})
+if (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PROG})
execute_process(COMMAND ${WHOAMI_PROG}
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE USERNAME)