diff options
author | Gregory Anders <8965202+gpanders@users.noreply.github.com> | 2023-02-16 12:36:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-16 12:36:55 -0700 |
commit | ced0cd12d0dc8ec113e2139082b72e0ea964a567 (patch) | |
tree | 2902cfa5088ed688241419ffb5b875c5e8954d0d | |
parent | 5688a9fb3404d58de75f811ef99be834c4a9c5a9 (diff) | |
download | rneovim-ced0cd12d0dc8ec113e2139082b72e0ea964a567.tar.gz rneovim-ced0cd12d0dc8ec113e2139082b72e0ea964a567.tar.bz2 rneovim-ced0cd12d0dc8ec113e2139082b72e0ea964a567.zip |
build: only use HOSTNAME_PRG if HOSTNAME is undefined (#22288)
Allow specifying the HOSTNAME variable by defining it with -D when
invoking CMake, instead of overriding it with the output of
HOSTNAME_RPG.
-rw-r--r-- | cmake.config/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake.config/CMakeLists.txt b/cmake.config/CMakeLists.txt index da7b2b9b45..9ae81074e7 100644 --- a/cmake.config/CMakeLists.txt +++ b/cmake.config/CMakeLists.txt @@ -188,7 +188,7 @@ elseif (NOT DEFINED USERNAME AND EXISTS ${WHOAMI_PRG}) endif() if (DEFINED ENV{HOSTNAME}) set(HOSTNAME $ENV{HOSTNAME}) -elseif (EXISTS ${HOSTNAME_PRG}) +elseif (NOT DEFINED HOSTNAME AND EXISTS ${HOSTNAME_PRG}) execute_process(COMMAND ${HOSTNAME_PRG} OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE HOSTNAME) |