From 679500ffe00ecb4f02292129e7529ab7392f3943 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 15 Jun 2024 18:07:04 +0300 Subject: [PATCH] CMake: Rename the cache variable POSIX_SHELL to XZ_POSIX_SHELL We still need the variable POSIX_SHELL for configure_file() but it doesn't need to be a cache variable. --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f3baecb..886d3879 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1978,14 +1978,14 @@ if(UNIX) set(POSIX_SHELL_DEFAULT "/bin/sh") endif() - set(POSIX_SHELL "${POSIX_SHELL_DEFAULT}" CACHE STRING + set(XZ_POSIX_SHELL "${POSIX_SHELL_DEFAULT}" CACHE STRING "Shell to use for scripts (xzgrep and others)") - # Guess the extra path to add from POSIX_SHELL. Autotools-based build + # Guess the extra path to add from XZ_POSIX_SHELL. Autotools-based build # has a separate option --enable-path-for-scripts=PREFIX but this is # enough for Solaris. set(enable_path_for_scripts) - get_filename_component(POSIX_SHELL_DIR "${POSIX_SHELL}" DIRECTORY) + get_filename_component(POSIX_SHELL_DIR "${XZ_POSIX_SHELL}" DIRECTORY) if(NOT POSIX_SHELL_DIR STREQUAL "/bin" AND NOT POSIX_SHELL_DIR STREQUAL "/usr/bin") @@ -2005,6 +2005,7 @@ if(UNIX) endif() set(xz "xz") + set(POSIX_SHELL "${XZ_POSIX_SHELL}") foreach(S xzdiff xzgrep xzmore xzless) configure_file("src/scripts/${S}.in" "${S}"