aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-10-22 17:46:25 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-10-22 20:30:08 -0700
commit0ae60f7236e4da0c234f59f3671f742695d54905 (patch)
tree8e54ab9b65fc445bbb5f55d564c592afdec2b572 /src
parentf82a82f889bb145fe83eb9cd366f920f10f6dcec (diff)
downloadzig-0ae60f7236e4da0c234f59f3671f742695d54905.tar.gz
zig-0ae60f7236e4da0c234f59f3671f742695d54905.zip
CMake: detect use of CMAKE_PREFIX_PATH env var
CMake recognizes the CMAKE_PREFIX_PATH environment variable for some things, and also the CMAKE_PREFIX_PATH cache variable for other things. However, it does not relate these two things, i.e. if the environment variable is set, CMake does not populate the cache variable in a corresponding manner. Some package systems, such as Homebrew, set the environment variable but not the cache variable. Furthermore, the environment variable follows the system path separator, such as ':' on POSIX and ';' on Windows, but the cache variable follows CMake's array behavior, i.e. always ';' for a separator. Closes #13242
Diffstat (limited to 'src')
-rw-r--r--src/stage1/config.h.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stage1/config.h.in b/src/stage1/config.h.in
index 8d1e688cbe..2d4fff6df2 100644
--- a/src/stage1/config.h.in
+++ b/src/stage1/config.h.in
@@ -17,7 +17,7 @@
// Used by build.zig for communicating build information to self hosted build.
#define ZIG_CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@"
#define ZIG_LLVM_LINK_MODE "@LLVM_LINK_MODE@"
-#define ZIG_CMAKE_PREFIX_PATH "@CMAKE_PREFIX_PATH@"
+#define ZIG_CMAKE_PREFIX_PATH "@ZIG_CMAKE_PREFIX_PATH@"
#define ZIG_CXX_COMPILER "@CMAKE_CXX_COMPILER@"
#define ZIG_LLD_INCLUDE_PATH "@LLD_INCLUDE_DIRS@"
#define ZIG_LLD_LIBRARIES "@LLD_LIBRARIES@"