mirror of
https://github.com/neovim/neovim.git
synced 2026-11-02 20:30:40 -06:00
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.
This commit is contained in:
1 parent
5688a9fb34
commit
ced0cd12d0
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user