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)