From b59c722a3fed1b873d4f82f38d248775bfe23ae4 Mon Sep 17 00:00:00 2001 From: Eric Joldasov Date: Tue, 14 May 2024 20:00:17 +0500 Subject: [PATCH] CMake: clean `CMAKE_{SOURCE,BUILD}_DIR` Replace `CMAKE_SOURCE_DIR` and `CMAKE_BUILD_DIR` with different variables, or in some cases just remove them. For some function arguments, prepended `CMAKE_SOURCE_DIR` was removed without replacement. This includes: * Sources for `add_library` and `add_executable` (`ZIG_CPP_SOURCES` and `ZIG_WASM2C_SOURCES`) * Inputs for `configure_file` and `target_include_directory` * For arguments above, CMake already prepends `CMAKE_CURRENT_SOURCE_DIR` to them by default, if they are relative paths. Additionaly, it was removed from arguments of commands that have `WORKING_DIRECTORY` set to `PROJECT_SOURCE_DIR`, they will be similarly converted by CMake for us. Also: * Move project declaration to the top so that these variables are available earlier. * Avoid calling "git" executable if ".git" directory does not exist. * Swap "--prefix" and `ZIG_BUILD_ARGS` arguments in cmake/install.cmake to match same "zig2 build" command in CMakeLists.txt and allow overriding "--prefix" argument Signed-off-by: Eric Joldasov --- CMakeLists.txt | 1050 ++++++++++++++++++++++--------------------- cmake/install.cmake | 4 +- 2 files changed, 532 insertions(+), 522 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 900032617a..442b53710a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,14 @@ cmake_minimum_required(VERSION 3.15) + +project(zig + DESCRIPTION + "Zig is a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software" + HOMEPAGE_URL + "https://ziglang.org" + LANGUAGES + C CXX +) + include(CheckSymbolExists) if(NOT CMAKE_BUILD_TYPE) @@ -7,7 +17,7 @@ if(NOT CMAKE_BUILD_TYPE) endif() if(NOT CMAKE_INSTALL_PREFIX) - set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/stage3" CACHE STRING + set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/stage3" CACHE STRING "Directory to install zig to" FORCE) endif() @@ -27,8 +37,8 @@ else() list(APPEND ZIG_CMAKE_PREFIX_PATH "${ZIG_CMAKE_PREFIX_PATH_STRING}") endif() -project(zig C CXX) -set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) + +list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") set(ZIG_VERSION_MAJOR 0) set(ZIG_VERSION_MINOR 13) @@ -38,15 +48,15 @@ set(ZIG_VERSION "" CACHE STRING "Override Zig version string. Default is to find if("${ZIG_VERSION}" STREQUAL "") set(RESOLVED_ZIG_VERSION "${ZIG_VERSION_MAJOR}.${ZIG_VERSION_MINOR}.${ZIG_VERSION_PATCH}") find_program(GIT_EXE NAMES git NAMES_PER_DIR) - if(GIT_EXE) + if(GIT_EXE AND EXISTS "${PROJECT_SOURCE_DIR}/.git") execute_process( - COMMAND ${GIT_EXE} -C ${CMAKE_SOURCE_DIR} describe --match *.*.* --tags --abbrev=9 + COMMAND ${GIT_EXE} -C "${PROJECT_SOURCE_DIR}" describe --match *.*.* --tags --abbrev=9 RESULT_VARIABLE EXIT_STATUS OUTPUT_VARIABLE GIT_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET) if(EXIT_STATUS EQUAL "0") - set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/.git/HEAD) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/.git/HEAD") if(GIT_DESCRIBE MATCHES "^v?([0-9]+\\.[0-9]+\\.[0-9]+)$") # Tagged release version. set(GIT_TAG ${CMAKE_MATCH_1}) @@ -172,507 +182,507 @@ endif() find_package(Threads) -set(ZIG_CONFIG_H_OUT "${CMAKE_BINARY_DIR}/config.h") -set(ZIG_CONFIG_ZIG_OUT "${CMAKE_BINARY_DIR}/config.zig") +set(ZIG_CONFIG_H_OUT "${PROJECT_BINARY_DIR}/config.h") +set(ZIG_CONFIG_ZIG_OUT "${PROJECT_BINARY_DIR}/config.zig") set(ZIG_WASM2C_SOURCES - "${CMAKE_SOURCE_DIR}/stage1/wasm2c.c" + stage1/wasm2c.c ) # Sync with "zig_cpp_sources" in build.zig set(ZIG_CPP_SOURCES # These are planned to stay even when we are self-hosted. - "${CMAKE_SOURCE_DIR}/src/zig_llvm.cpp" - "${CMAKE_SOURCE_DIR}/src/zig_llvm-ar.cpp" - "${CMAKE_SOURCE_DIR}/src/zig_clang.cpp" - "${CMAKE_SOURCE_DIR}/src/zig_clang_driver.cpp" - "${CMAKE_SOURCE_DIR}/src/zig_clang_cc1_main.cpp" - "${CMAKE_SOURCE_DIR}/src/zig_clang_cc1as_main.cpp" + src/zig_llvm.cpp + src/zig_llvm-ar.cpp + src/zig_clang.cpp + src/zig_clang_driver.cpp + src/zig_clang_cc1_main.cpp + src/zig_clang_cc1as_main.cpp ) # Needed because we use cmake, not the zig build system, to build zig2.o. set(ZIG_STAGE2_SOURCES "${ZIG_CONFIG_ZIG_OUT}" - "${CMAKE_SOURCE_DIR}/lib/std/array_hash_map.zig" - "${CMAKE_SOURCE_DIR}/lib/std/array_list.zig" - "${CMAKE_SOURCE_DIR}/lib/std/ascii.zig" - "${CMAKE_SOURCE_DIR}/lib/std/atomic.zig" - "${CMAKE_SOURCE_DIR}/lib/std/base64.zig" - "${CMAKE_SOURCE_DIR}/lib/std/BitStack.zig" - "${CMAKE_SOURCE_DIR}/lib/std/buf_map.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Build.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Build/Cache.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Build/Cache/DepTokenizer.zig" - "${CMAKE_SOURCE_DIR}/lib/std/builtin.zig" - "${CMAKE_SOURCE_DIR}/lib/std/c.zig" - "${CMAKE_SOURCE_DIR}/lib/std/c/linux.zig" - "${CMAKE_SOURCE_DIR}/lib/std/child_process.zig" - "${CMAKE_SOURCE_DIR}/lib/std/coff.zig" - "${CMAKE_SOURCE_DIR}/lib/std/static_string_map.zig" - "${CMAKE_SOURCE_DIR}/lib/std/crypto.zig" - "${CMAKE_SOURCE_DIR}/lib/std/crypto/blake3.zig" - "${CMAKE_SOURCE_DIR}/lib/std/crypto/siphash.zig" - "${CMAKE_SOURCE_DIR}/lib/std/debug.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf/AT.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf/ATE.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf/FORM.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf/LANG.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf/OP.zig" - "${CMAKE_SOURCE_DIR}/lib/std/dwarf/TAG.zig" - "${CMAKE_SOURCE_DIR}/lib/std/elf.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fifo.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fmt.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fmt/format_float.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fmt/parse_float.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fs.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fs/AtomicFile.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fs/Dir.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fs/File.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fs/get_app_data_dir.zig" - "${CMAKE_SOURCE_DIR}/lib/std/fs/path.zig" - "${CMAKE_SOURCE_DIR}/lib/std/hash.zig" - "${CMAKE_SOURCE_DIR}/lib/std/hash/auto_hash.zig" - "${CMAKE_SOURCE_DIR}/lib/std/hash/wyhash.zig" - "${CMAKE_SOURCE_DIR}/lib/std/hash_map.zig" - "${CMAKE_SOURCE_DIR}/lib/std/heap.zig" - "${CMAKE_SOURCE_DIR}/lib/std/heap/arena_allocator.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/buffered_atomic_file.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/buffered_writer.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/change_detection_stream.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/counting_reader.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/counting_writer.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/find_byte_writer.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/fixed_buffer_stream.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/limited_reader.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/Reader.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/seekable_stream.zig" - "${CMAKE_SOURCE_DIR}/lib/std/io/Writer.zig" - "${CMAKE_SOURCE_DIR}/lib/std/json.zig" - "${CMAKE_SOURCE_DIR}/lib/std/json/stringify.zig" - "${CMAKE_SOURCE_DIR}/lib/std/leb128.zig" - "${CMAKE_SOURCE_DIR}/lib/std/linked_list.zig" - "${CMAKE_SOURCE_DIR}/lib/std/log.zig" - "${CMAKE_SOURCE_DIR}/lib/std/macho.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/big.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/big/int.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/float.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/frexp.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/isinf.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/isnan.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/log.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/log10.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/log2.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/signbit.zig" - "${CMAKE_SOURCE_DIR}/lib/std/math/sqrt.zig" - "${CMAKE_SOURCE_DIR}/lib/std/mem.zig" - "${CMAKE_SOURCE_DIR}/lib/std/mem/Allocator.zig" - "${CMAKE_SOURCE_DIR}/lib/std/meta.zig" - "${CMAKE_SOURCE_DIR}/lib/std/meta/trailer_flags.zig" - "${CMAKE_SOURCE_DIR}/lib/std/multi_array_list.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/linux.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/linux/x86_64.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/linux.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/linux/IoUring.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/linux/io_uring_sqe.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/linux/x86_64.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/windows.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/windows/ntstatus.zig" - "${CMAKE_SOURCE_DIR}/lib/std/os/windows/win32error.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Progress.zig" - "${CMAKE_SOURCE_DIR}/lib/std/pdb.zig" - "${CMAKE_SOURCE_DIR}/lib/std/process.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Random.zig" - "${CMAKE_SOURCE_DIR}/lib/std/sort.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/absv.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/absvdi2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/absvsi2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/absvti2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/adddf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/addf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/addo.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/addsf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/addtf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/addxf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/arm.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/atomics.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/aulldiv.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/aullrem.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/bswap.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/ceil.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/clear_cache.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/cmp.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/cmpdf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/cmpsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/cmptf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/cmpxf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/common.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/comparef.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/cos.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/count0bits.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/divdf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/divsf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/divtf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/divti3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/divxf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/emutls.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/exp.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/exp2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extenddftf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extenddfxf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendhfsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendhftf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendhfxf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendsfdf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendsftf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendsfxf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/extendxftf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fabs.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixdfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixdfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixdfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixhfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixhfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixhfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixsfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixsfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixsfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixtfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixtfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixtfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunsdfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunsdfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunsdfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunshfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunshfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunshfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunssfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunssfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunssfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunstfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunstfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunstfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunsxfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunsxfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixunsxfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixxfdi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixxfsi.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fixxfti.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/int_from_float.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatdidf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatdihf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatdisf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatditf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatdixf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatsidf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatsihf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatsisf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatsitf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatsixf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floattidf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floattihf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floattisf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floattitf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floattixf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatundidf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatundihf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatundisf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatunditf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatundixf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatunsidf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatunsihf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatunsisf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatunsitf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatunsixf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatuntidf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatuntihf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatuntisf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatuntitf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floatuntixf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/floor.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fma.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fmax.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fmin.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/fmod.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/gedf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/gesf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/getf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/gexf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/int.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/float_from_int.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/log.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/log10.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/log2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/modti3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/mulXi3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/muldf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/mulf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/mulo.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/mulsf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/multf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/mulxf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/negXi2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/negv.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/os_version_check.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/parity.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/popcount.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/rem_pio2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/rem_pio2_large.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/rem_pio2f.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/round.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/shift.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/sin.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/sincos.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/sqrt.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/stack_probe.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/subo.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/subsf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/subdf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/subtf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/subxf3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/negsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/negdf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/negtf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/negxf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/tan.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/trig.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/trunc.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncdfhf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncdfsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncf.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncsfhf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/trunctfdf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/trunctfhf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/trunctfsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/trunctfxf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncxfdf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncxfhf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/truncxfsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/udivmod.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/udivmodei4.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/udivmodti4.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/udivti3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/umodti3.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/unorddf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/unordsf2.zig" - "${CMAKE_SOURCE_DIR}/lib/compiler_rt/unordtf2.zig" - "${CMAKE_SOURCE_DIR}/lib/std/start.zig" - "${CMAKE_SOURCE_DIR}/lib/std/std.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/Query.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/aarch64.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/amdgpu.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/arm.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/avr.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/bpf.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/hexagon.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/mips.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/msp430.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/nvptx.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/powerpc.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/riscv.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/sparc.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/s390x.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/wasm.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Target/x86.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Thread.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Thread/Futex.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Thread/Mutex.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Thread/Pool.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Thread/ResetEvent.zig" - "${CMAKE_SOURCE_DIR}/lib/std/Thread/WaitGroup.zig" - "${CMAKE_SOURCE_DIR}/lib/std/time.zig" - "${CMAKE_SOURCE_DIR}/lib/std/treap.zig" - "${CMAKE_SOURCE_DIR}/lib/std/unicode.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/Ast.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/AstGen.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/AstRlAnnotate.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/LibCInstallation.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/Parse.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/Server.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/WindowsSdk.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/Zir.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/c_builtins.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/render.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/string_literal.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/system.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/system/NativePaths.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/system/x86.zig" - "${CMAKE_SOURCE_DIR}/lib/std/zig/tokenizer.zig" - "${CMAKE_SOURCE_DIR}/src/Air.zig" - "${CMAKE_SOURCE_DIR}/src/Builtin.zig" - "${CMAKE_SOURCE_DIR}/src/Compilation.zig" - "${CMAKE_SOURCE_DIR}/src/Compilation/Config.zig" - "${CMAKE_SOURCE_DIR}/src/DarwinPosixSpawn.zig" - "${CMAKE_SOURCE_DIR}/src/InternPool.zig" - "${CMAKE_SOURCE_DIR}/src/Liveness.zig" - "${CMAKE_SOURCE_DIR}/src/Liveness/Verify.zig" - "${CMAKE_SOURCE_DIR}/src/Module.zig" - "${CMAKE_SOURCE_DIR}/src/Package.zig" - "${CMAKE_SOURCE_DIR}/src/Package/Fetch.zig" - "${CMAKE_SOURCE_DIR}/src/Package/Fetch/git.zig" - "${CMAKE_SOURCE_DIR}/src/Package/Manifest.zig" - "${CMAKE_SOURCE_DIR}/src/Package/Module.zig" - "${CMAKE_SOURCE_DIR}/src/RangeSet.zig" - "${CMAKE_SOURCE_DIR}/src/Sema.zig" - "${CMAKE_SOURCE_DIR}/src/Sema/bitcast.zig" - "${CMAKE_SOURCE_DIR}/src/Sema/comptime_ptr_access.zig" - "${CMAKE_SOURCE_DIR}/src/Value.zig" - "${CMAKE_SOURCE_DIR}/src/arch/aarch64/CodeGen.zig" - "${CMAKE_SOURCE_DIR}/src/arch/aarch64/Emit.zig" - "${CMAKE_SOURCE_DIR}/src/arch/aarch64/Mir.zig" - "${CMAKE_SOURCE_DIR}/src/arch/aarch64/abi.zig" - "${CMAKE_SOURCE_DIR}/src/arch/aarch64/bits.zig" - "${CMAKE_SOURCE_DIR}/src/arch/arm/CodeGen.zig" - "${CMAKE_SOURCE_DIR}/src/arch/arm/Emit.zig" - "${CMAKE_SOURCE_DIR}/src/arch/arm/Mir.zig" - "${CMAKE_SOURCE_DIR}/src/arch/arm/abi.zig" - "${CMAKE_SOURCE_DIR}/src/arch/arm/bits.zig" - "${CMAKE_SOURCE_DIR}/src/arch/riscv64/CodeGen.zig" - "${CMAKE_SOURCE_DIR}/src/arch/riscv64/Emit.zig" - "${CMAKE_SOURCE_DIR}/src/arch/riscv64/Mir.zig" - "${CMAKE_SOURCE_DIR}/src/arch/riscv64/abi.zig" - "${CMAKE_SOURCE_DIR}/src/arch/riscv64/bits.zig" - "${CMAKE_SOURCE_DIR}/src/arch/sparc64/CodeGen.zig" - "${CMAKE_SOURCE_DIR}/src/arch/sparc64/Emit.zig" - "${CMAKE_SOURCE_DIR}/src/arch/sparc64/Mir.zig" - "${CMAKE_SOURCE_DIR}/src/arch/sparc64/abi.zig" - "${CMAKE_SOURCE_DIR}/src/arch/sparc64/bits.zig" - "${CMAKE_SOURCE_DIR}/src/arch/wasm/CodeGen.zig" - "${CMAKE_SOURCE_DIR}/src/arch/wasm/Emit.zig" - "${CMAKE_SOURCE_DIR}/src/arch/wasm/Mir.zig" - "${CMAKE_SOURCE_DIR}/src/arch/wasm/abi.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86/bits.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/CodeGen.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/Disassembler.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/Emit.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/Encoding.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/Lower.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/Mir.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/abi.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/bits.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/encoder.zig" - "${CMAKE_SOURCE_DIR}/src/arch/x86_64/encodings.zig" - "${CMAKE_SOURCE_DIR}/src/clang.zig" - "${CMAKE_SOURCE_DIR}/src/clang_options.zig" - "${CMAKE_SOURCE_DIR}/src/clang_options_data.zig" - "${CMAKE_SOURCE_DIR}/src/codegen.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/c.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/c/Type.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/llvm.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/llvm/BitcodeReader.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/llvm/Builder.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/llvm/bindings.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/llvm/bitcode_writer.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/llvm/ir.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/spirv.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/spirv/Assembler.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/spirv/Module.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/spirv/Section.zig" - "${CMAKE_SOURCE_DIR}/src/codegen/spirv/spec.zig" - "${CMAKE_SOURCE_DIR}/src/crash_report.zig" - "${CMAKE_SOURCE_DIR}/src/glibc.zig" - "${CMAKE_SOURCE_DIR}/src/introspect.zig" - "${CMAKE_SOURCE_DIR}/src/libcxx.zig" - "${CMAKE_SOURCE_DIR}/src/libtsan.zig" - "${CMAKE_SOURCE_DIR}/src/libunwind.zig" - "${CMAKE_SOURCE_DIR}/src/link.zig" - "${CMAKE_SOURCE_DIR}/src/link/C.zig" - "${CMAKE_SOURCE_DIR}/src/link/Coff.zig" - "${CMAKE_SOURCE_DIR}/src/link/Coff/Atom.zig" - "${CMAKE_SOURCE_DIR}/src/link/Coff/ImportTable.zig" - "${CMAKE_SOURCE_DIR}/src/link/Coff/Object.zig" - "${CMAKE_SOURCE_DIR}/src/link/Coff/Relocation.zig" - "${CMAKE_SOURCE_DIR}/src/link/Coff/lld.zig" - "${CMAKE_SOURCE_DIR}/src/link/Dwarf.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/Archive.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/Atom.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/LdScript.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/LinkerDefined.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/Object.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/SharedObject.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/Symbol.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/ZigObject.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/eh_frame.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/file.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/gc.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/merge_section.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/relocatable.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/relocation.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/synthetic_sections.zig" - "${CMAKE_SOURCE_DIR}/src/link/Elf/thunks.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/Archive.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/Atom.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/CodeSignature.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/DebugSymbols.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/DwarfInfo.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/Dylib.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/InternalObject.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/Object.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/Relocation.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/Symbol.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/UnwindInfo.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/ZigObject.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/dead_strip.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/dyld_info/Rebase.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/dyld_info/Trie.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/dyld_info/bind.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/eh_frame.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/fat.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/file.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/hasher.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/load_commands.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/relocatable.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/synthetic.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/thunks.zig" - "${CMAKE_SOURCE_DIR}/src/link/MachO/uuid.zig" - "${CMAKE_SOURCE_DIR}/src/link/NvPtx.zig" - "${CMAKE_SOURCE_DIR}/src/link/Plan9.zig" - "${CMAKE_SOURCE_DIR}/src/link/Plan9/aout.zig" - "${CMAKE_SOURCE_DIR}/src/link/SpirV.zig" - "${CMAKE_SOURCE_DIR}/src/link/SpirV/BinaryModule.zig" - "${CMAKE_SOURCE_DIR}/src/link/SpirV/deduplicate.zig" - "${CMAKE_SOURCE_DIR}/src/link/SpirV/lower_invocation_globals.zig" - "${CMAKE_SOURCE_DIR}/src/link/SpirV/prune_unused.zig" - "${CMAKE_SOURCE_DIR}/src/link/StringTable.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/Archive.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/Atom.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/Object.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/Symbol.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/ZigObject.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/file.zig" - "${CMAKE_SOURCE_DIR}/src/link/Wasm/types.zig" - "${CMAKE_SOURCE_DIR}/src/link/aarch64.zig" - "${CMAKE_SOURCE_DIR}/src/link/riscv.zig" - "${CMAKE_SOURCE_DIR}/src/link/table_section.zig" - "${CMAKE_SOURCE_DIR}/src/link/tapi.zig" - "${CMAKE_SOURCE_DIR}/src/link/tapi/Tokenizer.zig" - "${CMAKE_SOURCE_DIR}/src/link/tapi/parse.zig" - "${CMAKE_SOURCE_DIR}/src/link/tapi/parse/test.zig" - "${CMAKE_SOURCE_DIR}/src/link/tapi/yaml.zig" - "${CMAKE_SOURCE_DIR}/src/link/tapi/yaml/test.zig" - "${CMAKE_SOURCE_DIR}/src/main.zig" - "${CMAKE_SOURCE_DIR}/src/mingw.zig" - "${CMAKE_SOURCE_DIR}/src/musl.zig" - "${CMAKE_SOURCE_DIR}/src/mutable_value.zig" - "${CMAKE_SOURCE_DIR}/src/print_air.zig" - "${CMAKE_SOURCE_DIR}/src/print_env.zig" - "${CMAKE_SOURCE_DIR}/src/print_targets.zig" - "${CMAKE_SOURCE_DIR}/src/print_value.zig" - "${CMAKE_SOURCE_DIR}/src/print_zir.zig" - "${CMAKE_SOURCE_DIR}/src/register_manager.zig" - "${CMAKE_SOURCE_DIR}/src/target.zig" - "${CMAKE_SOURCE_DIR}/src/tracy.zig" - "${CMAKE_SOURCE_DIR}/src/translate_c.zig" - "${CMAKE_SOURCE_DIR}/src/type.zig" - "${CMAKE_SOURCE_DIR}/src/wasi_libc.zig" + lib/std/array_hash_map.zig + lib/std/array_list.zig + lib/std/ascii.zig + lib/std/atomic.zig + lib/std/base64.zig + lib/std/BitStack.zig + lib/std/buf_map.zig + lib/std/Build.zig + lib/std/Build/Cache.zig + lib/std/Build/Cache/DepTokenizer.zig + lib/std/builtin.zig + lib/std/c.zig + lib/std/c/linux.zig + lib/std/child_process.zig + lib/std/coff.zig + lib/std/static_string_map.zig + lib/std/crypto.zig + lib/std/crypto/blake3.zig + lib/std/crypto/siphash.zig + lib/std/debug.zig + lib/std/dwarf.zig + lib/std/dwarf/AT.zig + lib/std/dwarf/ATE.zig + lib/std/dwarf/FORM.zig + lib/std/dwarf/LANG.zig + lib/std/dwarf/OP.zig + lib/std/dwarf/TAG.zig + lib/std/elf.zig + lib/std/fifo.zig + lib/std/fmt.zig + lib/std/fmt/format_float.zig + lib/std/fmt/parse_float.zig + lib/std/fs.zig + lib/std/fs/AtomicFile.zig + lib/std/fs/Dir.zig + lib/std/fs/File.zig + lib/std/fs/get_app_data_dir.zig + lib/std/fs/path.zig + lib/std/hash.zig + lib/std/hash/auto_hash.zig + lib/std/hash/wyhash.zig + lib/std/hash_map.zig + lib/std/heap.zig + lib/std/heap/arena_allocator.zig + lib/std/io.zig + lib/std/io/buffered_atomic_file.zig + lib/std/io/buffered_writer.zig + lib/std/io/change_detection_stream.zig + lib/std/io/counting_reader.zig + lib/std/io/counting_writer.zig + lib/std/io/find_byte_writer.zig + lib/std/io/fixed_buffer_stream.zig + lib/std/io/limited_reader.zig + lib/std/io/Reader.zig + lib/std/io/seekable_stream.zig + lib/std/io/Writer.zig + lib/std/json.zig + lib/std/json/stringify.zig + lib/std/leb128.zig + lib/std/linked_list.zig + lib/std/log.zig + lib/std/macho.zig + lib/std/math.zig + lib/std/math/big.zig + lib/std/math/big/int.zig + lib/std/math/float.zig + lib/std/math/frexp.zig + lib/std/math/isinf.zig + lib/std/math/isnan.zig + lib/std/math/log.zig + lib/std/math/log10.zig + lib/std/math/log2.zig + lib/std/math/signbit.zig + lib/std/math/sqrt.zig + lib/std/mem.zig + lib/std/mem/Allocator.zig + lib/std/meta.zig + lib/std/meta/trailer_flags.zig + lib/std/multi_array_list.zig + lib/std/os.zig + lib/std/os/linux.zig + lib/std/os/linux/x86_64.zig + lib/std/os/linux.zig + lib/std/os/linux/IoUring.zig + lib/std/os/linux/io_uring_sqe.zig + lib/std/os/linux/x86_64.zig + lib/std/os/windows.zig + lib/std/os/windows/ntstatus.zig + lib/std/os/windows/win32error.zig + lib/std/Progress.zig + lib/std/pdb.zig + lib/std/process.zig + lib/std/Random.zig + lib/std/sort.zig + lib/compiler_rt.zig + lib/compiler_rt/absv.zig + lib/compiler_rt/absvdi2.zig + lib/compiler_rt/absvsi2.zig + lib/compiler_rt/absvti2.zig + lib/compiler_rt/adddf3.zig + lib/compiler_rt/addf3.zig + lib/compiler_rt/addo.zig + lib/compiler_rt/addsf3.zig + lib/compiler_rt/addtf3.zig + lib/compiler_rt/addxf3.zig + lib/compiler_rt/arm.zig + lib/compiler_rt/atomics.zig + lib/compiler_rt/aulldiv.zig + lib/compiler_rt/aullrem.zig + lib/compiler_rt/bswap.zig + lib/compiler_rt/ceil.zig + lib/compiler_rt/clear_cache.zig + lib/compiler_rt/cmp.zig + lib/compiler_rt/cmpdf2.zig + lib/compiler_rt/cmpsf2.zig + lib/compiler_rt/cmptf2.zig + lib/compiler_rt/cmpxf2.zig + lib/compiler_rt/common.zig + lib/compiler_rt/comparef.zig + lib/compiler_rt/cos.zig + lib/compiler_rt/count0bits.zig + lib/compiler_rt/divdf3.zig + lib/compiler_rt/divsf3.zig + lib/compiler_rt/divtf3.zig + lib/compiler_rt/divti3.zig + lib/compiler_rt/divxf3.zig + lib/compiler_rt/emutls.zig + lib/compiler_rt/exp.zig + lib/compiler_rt/exp2.zig + lib/compiler_rt/extenddftf2.zig + lib/compiler_rt/extenddfxf2.zig + lib/compiler_rt/extendf.zig + lib/compiler_rt/extendhfsf2.zig + lib/compiler_rt/extendhftf2.zig + lib/compiler_rt/extendhfxf2.zig + lib/compiler_rt/extendsfdf2.zig + lib/compiler_rt/extendsftf2.zig + lib/compiler_rt/extendsfxf2.zig + lib/compiler_rt/extendxftf2.zig + lib/compiler_rt/fabs.zig + lib/compiler_rt/fixdfdi.zig + lib/compiler_rt/fixdfsi.zig + lib/compiler_rt/fixdfti.zig + lib/compiler_rt/fixhfdi.zig + lib/compiler_rt/fixhfsi.zig + lib/compiler_rt/fixhfti.zig + lib/compiler_rt/fixsfdi.zig + lib/compiler_rt/fixsfsi.zig + lib/compiler_rt/fixsfti.zig + lib/compiler_rt/fixtfdi.zig + lib/compiler_rt/fixtfsi.zig + lib/compiler_rt/fixtfti.zig + lib/compiler_rt/fixunsdfdi.zig + lib/compiler_rt/fixunsdfsi.zig + lib/compiler_rt/fixunsdfti.zig + lib/compiler_rt/fixunshfdi.zig + lib/compiler_rt/fixunshfsi.zig + lib/compiler_rt/fixunshfti.zig + lib/compiler_rt/fixunssfdi.zig + lib/compiler_rt/fixunssfsi.zig + lib/compiler_rt/fixunssfti.zig + lib/compiler_rt/fixunstfdi.zig + lib/compiler_rt/fixunstfsi.zig + lib/compiler_rt/fixunstfti.zig + lib/compiler_rt/fixunsxfdi.zig + lib/compiler_rt/fixunsxfsi.zig + lib/compiler_rt/fixunsxfti.zig + lib/compiler_rt/fixxfdi.zig + lib/compiler_rt/fixxfsi.zig + lib/compiler_rt/fixxfti.zig + lib/compiler_rt/int_from_float.zig + lib/compiler_rt/floatdidf.zig + lib/compiler_rt/floatdihf.zig + lib/compiler_rt/floatdisf.zig + lib/compiler_rt/floatditf.zig + lib/compiler_rt/floatdixf.zig + lib/compiler_rt/floatsidf.zig + lib/compiler_rt/floatsihf.zig + lib/compiler_rt/floatsisf.zig + lib/compiler_rt/floatsitf.zig + lib/compiler_rt/floatsixf.zig + lib/compiler_rt/floattidf.zig + lib/compiler_rt/floattihf.zig + lib/compiler_rt/floattisf.zig + lib/compiler_rt/floattitf.zig + lib/compiler_rt/floattixf.zig + lib/compiler_rt/floatundidf.zig + lib/compiler_rt/floatundihf.zig + lib/compiler_rt/floatundisf.zig + lib/compiler_rt/floatunditf.zig + lib/compiler_rt/floatundixf.zig + lib/compiler_rt/floatunsidf.zig + lib/compiler_rt/floatunsihf.zig + lib/compiler_rt/floatunsisf.zig + lib/compiler_rt/floatunsitf.zig + lib/compiler_rt/floatunsixf.zig + lib/compiler_rt/floatuntidf.zig + lib/compiler_rt/floatuntihf.zig + lib/compiler_rt/floatuntisf.zig + lib/compiler_rt/floatuntitf.zig + lib/compiler_rt/floatuntixf.zig + lib/compiler_rt/floor.zig + lib/compiler_rt/fma.zig + lib/compiler_rt/fmax.zig + lib/compiler_rt/fmin.zig + lib/compiler_rt/fmod.zig + lib/compiler_rt/gedf2.zig + lib/compiler_rt/gesf2.zig + lib/compiler_rt/getf2.zig + lib/compiler_rt/gexf2.zig + lib/compiler_rt/int.zig + lib/compiler_rt/float_from_int.zig + lib/compiler_rt/log.zig + lib/compiler_rt/log10.zig + lib/compiler_rt/log2.zig + lib/compiler_rt/modti3.zig + lib/compiler_rt/mulXi3.zig + lib/compiler_rt/muldf3.zig + lib/compiler_rt/mulf3.zig + lib/compiler_rt/mulo.zig + lib/compiler_rt/mulsf3.zig + lib/compiler_rt/multf3.zig + lib/compiler_rt/mulxf3.zig + lib/compiler_rt/negXi2.zig + lib/compiler_rt/negv.zig + lib/compiler_rt/os_version_check.zig + lib/compiler_rt/parity.zig + lib/compiler_rt/popcount.zig + lib/compiler_rt/rem_pio2.zig + lib/compiler_rt/rem_pio2_large.zig + lib/compiler_rt/rem_pio2f.zig + lib/compiler_rt/round.zig + lib/compiler_rt/shift.zig + lib/compiler_rt/sin.zig + lib/compiler_rt/sincos.zig + lib/compiler_rt/sqrt.zig + lib/compiler_rt/stack_probe.zig + lib/compiler_rt/subo.zig + lib/compiler_rt/subsf3.zig + lib/compiler_rt/subdf3.zig + lib/compiler_rt/subtf3.zig + lib/compiler_rt/subxf3.zig + lib/compiler_rt/negsf2.zig + lib/compiler_rt/negdf2.zig + lib/compiler_rt/negtf2.zig + lib/compiler_rt/negxf2.zig + lib/compiler_rt/tan.zig + lib/compiler_rt/trig.zig + lib/compiler_rt/trunc.zig + lib/compiler_rt/truncdfhf2.zig + lib/compiler_rt/truncdfsf2.zig + lib/compiler_rt/truncf.zig + lib/compiler_rt/truncsfhf2.zig + lib/compiler_rt/trunctfdf2.zig + lib/compiler_rt/trunctfhf2.zig + lib/compiler_rt/trunctfsf2.zig + lib/compiler_rt/trunctfxf2.zig + lib/compiler_rt/truncxfdf2.zig + lib/compiler_rt/truncxfhf2.zig + lib/compiler_rt/truncxfsf2.zig + lib/compiler_rt/udivmod.zig + lib/compiler_rt/udivmodei4.zig + lib/compiler_rt/udivmodti4.zig + lib/compiler_rt/udivti3.zig + lib/compiler_rt/umodti3.zig + lib/compiler_rt/unorddf2.zig + lib/compiler_rt/unordsf2.zig + lib/compiler_rt/unordtf2.zig + lib/std/start.zig + lib/std/std.zig + lib/std/Target.zig + lib/std/Target/Query.zig + lib/std/Target/aarch64.zig + lib/std/Target/amdgpu.zig + lib/std/Target/arm.zig + lib/std/Target/avr.zig + lib/std/Target/bpf.zig + lib/std/Target/hexagon.zig + lib/std/Target/mips.zig + lib/std/Target/msp430.zig + lib/std/Target/nvptx.zig + lib/std/Target/powerpc.zig + lib/std/Target/riscv.zig + lib/std/Target/sparc.zig + lib/std/Target/s390x.zig + lib/std/Target/wasm.zig + lib/std/Target/x86.zig + lib/std/Thread.zig + lib/std/Thread/Futex.zig + lib/std/Thread/Mutex.zig + lib/std/Thread/Pool.zig + lib/std/Thread/ResetEvent.zig + lib/std/Thread/WaitGroup.zig + lib/std/time.zig + lib/std/treap.zig + lib/std/unicode.zig + lib/std/zig.zig + lib/std/zig/Ast.zig + lib/std/zig/AstGen.zig + lib/std/zig/AstRlAnnotate.zig + lib/std/zig/LibCInstallation.zig + lib/std/zig/Parse.zig + lib/std/zig/Server.zig + lib/std/zig/WindowsSdk.zig + lib/std/zig/Zir.zig + lib/std/zig/c_builtins.zig + lib/std/zig/render.zig + lib/std/zig/string_literal.zig + lib/std/zig/system.zig + lib/std/zig/system/NativePaths.zig + lib/std/zig/system/x86.zig + lib/std/zig/tokenizer.zig + src/Air.zig + src/Builtin.zig + src/Compilation.zig + src/Compilation/Config.zig + src/DarwinPosixSpawn.zig + src/InternPool.zig + src/Liveness.zig + src/Liveness/Verify.zig + src/Module.zig + src/Package.zig + src/Package/Fetch.zig + src/Package/Fetch/git.zig + src/Package/Manifest.zig + src/Package/Module.zig + src/RangeSet.zig + src/Sema.zig + src/Sema/bitcast.zig + src/Sema/comptime_ptr_access.zig + src/Value.zig + src/arch/aarch64/CodeGen.zig + src/arch/aarch64/Emit.zig + src/arch/aarch64/Mir.zig + src/arch/aarch64/abi.zig + src/arch/aarch64/bits.zig + src/arch/arm/CodeGen.zig + src/arch/arm/Emit.zig + src/arch/arm/Mir.zig + src/arch/arm/abi.zig + src/arch/arm/bits.zig + src/arch/riscv64/CodeGen.zig + src/arch/riscv64/Emit.zig + src/arch/riscv64/Mir.zig + src/arch/riscv64/abi.zig + src/arch/riscv64/bits.zig + src/arch/sparc64/CodeGen.zig + src/arch/sparc64/Emit.zig + src/arch/sparc64/Mir.zig + src/arch/sparc64/abi.zig + src/arch/sparc64/bits.zig + src/arch/wasm/CodeGen.zig + src/arch/wasm/Emit.zig + src/arch/wasm/Mir.zig + src/arch/wasm/abi.zig + src/arch/x86/bits.zig + src/arch/x86_64/CodeGen.zig + src/arch/x86_64/Disassembler.zig + src/arch/x86_64/Emit.zig + src/arch/x86_64/Encoding.zig + src/arch/x86_64/Lower.zig + src/arch/x86_64/Mir.zig + src/arch/x86_64/abi.zig + src/arch/x86_64/bits.zig + src/arch/x86_64/encoder.zig + src/arch/x86_64/encodings.zig + src/clang.zig + src/clang_options.zig + src/clang_options_data.zig + src/codegen.zig + src/codegen/c.zig + src/codegen/c/Type.zig + src/codegen/llvm.zig + src/codegen/llvm/BitcodeReader.zig + src/codegen/llvm/Builder.zig + src/codegen/llvm/bindings.zig + src/codegen/llvm/bitcode_writer.zig + src/codegen/llvm/ir.zig + src/codegen/spirv.zig + src/codegen/spirv/Assembler.zig + src/codegen/spirv/Module.zig + src/codegen/spirv/Section.zig + src/codegen/spirv/spec.zig + src/crash_report.zig + src/glibc.zig + src/introspect.zig + src/libcxx.zig + src/libtsan.zig + src/libunwind.zig + src/link.zig + src/link/C.zig + src/link/Coff.zig + src/link/Coff/Atom.zig + src/link/Coff/ImportTable.zig + src/link/Coff/Object.zig + src/link/Coff/Relocation.zig + src/link/Coff/lld.zig + src/link/Dwarf.zig + src/link/Elf.zig + src/link/Elf/Archive.zig + src/link/Elf/Atom.zig + src/link/Elf/LdScript.zig + src/link/Elf/LinkerDefined.zig + src/link/Elf/Object.zig + src/link/Elf/SharedObject.zig + src/link/Elf/Symbol.zig + src/link/Elf/ZigObject.zig + src/link/Elf/eh_frame.zig + src/link/Elf/file.zig + src/link/Elf/gc.zig + src/link/Elf/merge_section.zig + src/link/Elf/relocatable.zig + src/link/Elf/relocation.zig + src/link/Elf/synthetic_sections.zig + src/link/Elf/thunks.zig + src/link/MachO.zig + src/link/MachO/Archive.zig + src/link/MachO/Atom.zig + src/link/MachO/CodeSignature.zig + src/link/MachO/DebugSymbols.zig + src/link/MachO/DwarfInfo.zig + src/link/MachO/Dylib.zig + src/link/MachO/InternalObject.zig + src/link/MachO/Object.zig + src/link/MachO/Relocation.zig + src/link/MachO/Symbol.zig + src/link/MachO/UnwindInfo.zig + src/link/MachO/ZigObject.zig + src/link/MachO/dead_strip.zig + src/link/MachO/dyld_info/Rebase.zig + src/link/MachO/dyld_info/Trie.zig + src/link/MachO/dyld_info/bind.zig + src/link/MachO/eh_frame.zig + src/link/MachO/fat.zig + src/link/MachO/file.zig + src/link/MachO/hasher.zig + src/link/MachO/load_commands.zig + src/link/MachO/relocatable.zig + src/link/MachO/synthetic.zig + src/link/MachO/thunks.zig + src/link/MachO/uuid.zig + src/link/NvPtx.zig + src/link/Plan9.zig + src/link/Plan9/aout.zig + src/link/SpirV.zig + src/link/SpirV/BinaryModule.zig + src/link/SpirV/deduplicate.zig + src/link/SpirV/lower_invocation_globals.zig + src/link/SpirV/prune_unused.zig + src/link/StringTable.zig + src/link/Wasm.zig + src/link/Wasm/Archive.zig + src/link/Wasm/Atom.zig + src/link/Wasm/Object.zig + src/link/Wasm/Symbol.zig + src/link/Wasm/ZigObject.zig + src/link/Wasm/file.zig + src/link/Wasm/types.zig + src/link/aarch64.zig + src/link/riscv.zig + src/link/table_section.zig + src/link/tapi.zig + src/link/tapi/Tokenizer.zig + src/link/tapi/parse.zig + src/link/tapi/parse/test.zig + src/link/tapi/yaml.zig + src/link/tapi/yaml/test.zig + src/main.zig + src/mingw.zig + src/musl.zig + src/mutable_value.zig + src/print_air.zig + src/print_env.zig + src/print_targets.zig + src/print_value.zig + src/print_zir.zig + src/register_manager.zig + src/target.zig + src/tracy.zig + src/translate_c.zig + src/type.zig + src/wasi_libc.zig ) if(MSVC) @@ -684,17 +694,17 @@ if(MSVC) endif() configure_file ( - "${CMAKE_SOURCE_DIR}/stage1/config.h.in" + stage1/config.h.in "${ZIG_CONFIG_H_OUT}" ) configure_file ( - "${CMAKE_SOURCE_DIR}/stage1/config.zig.in" + stage1/config.zig.in "${ZIG_CONFIG_ZIG_OUT}" ) # zigcpp target -set(ZIGCPP_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/zigcpp") +set(ZIGCPP_OUTPUT_DIR "${PROJECT_BINARY_DIR}/zigcpp") add_library(zigcpp STATIC ${ZIG_CPP_SOURCES}) @@ -821,10 +831,10 @@ else() endif() endif() -set(ZIG1_WASM_MODULE "${CMAKE_SOURCE_DIR}/stage1/zig1.wasm") -set(ZIG1_C_SOURCE "${CMAKE_BINARY_DIR}/zig1.c") -set(ZIG2_C_SOURCE "${CMAKE_BINARY_DIR}/zig2.c") -set(ZIG_COMPILER_RT_C_SOURCE "${CMAKE_BINARY_DIR}/compiler_rt.c") +set(ZIG1_WASM_MODULE "${PROJECT_SOURCE_DIR}/stage1/zig1.wasm") +set(ZIG1_C_SOURCE "${PROJECT_BINARY_DIR}/zig1.c") +set(ZIG2_C_SOURCE "${PROJECT_BINARY_DIR}/zig2.c") +set(ZIG_COMPILER_RT_C_SOURCE "${PROJECT_BINARY_DIR}/compiler_rt.c") add_executable(zig-wasm2c ${ZIG_WASM2C_SOURCES}) set_target_properties(zig-wasm2c PROPERTIES COMPILE_FLAGS "${ZIG_WASM2C_COMPILE_FLAGS}") @@ -834,10 +844,10 @@ add_custom_command( COMMAND zig-wasm2c "${ZIG1_WASM_MODULE}" "${ZIG1_C_SOURCE}" DEPENDS zig-wasm2c "${ZIG1_WASM_MODULE}" COMMENT STATUS "Converting ${ZIG1_WASM_MODULE} to ${ZIG1_C_SOURCE}" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" ) -add_executable(zig1 ${ZIG1_C_SOURCE} "${CMAKE_SOURCE_DIR}/stage1/wasi.c") +add_executable(zig1 ${ZIG1_C_SOURCE} stage1/wasi.c) set_target_properties(zig1 PROPERTIES COMPILE_FLAGS ${ZIG1_COMPILE_FLAGS}) if(MSVC) @@ -850,7 +860,7 @@ else() endif() set(BUILD_ZIG2_ARGS - "${CMAKE_SOURCE_DIR}/lib" + "${PROJECT_SOURCE_DIR}/lib" build-exe -ofmt=c -lc -OReleaseSmall --name zig2 -femit-bin="${ZIG2_C_SOURCE}" @@ -867,11 +877,11 @@ add_custom_command( COMMAND zig1 ${BUILD_ZIG2_ARGS} DEPENDS zig1 "${ZIG_STAGE2_SOURCES}" COMMENT STATUS "Running zig1.wasm to produce ${ZIG2_C_SOURCE}" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" ) set(BUILD_COMPILER_RT_ARGS - "${CMAKE_SOURCE_DIR}/lib" + "${PROJECT_SOURCE_DIR}/lib" build-obj -ofmt=c -OReleaseSmall --name compiler_rt -femit-bin="${ZIG_COMPILER_RT_C_SOURCE}" @@ -886,7 +896,7 @@ add_custom_command( COMMAND zig1 ${BUILD_COMPILER_RT_ARGS} DEPENDS zig1 "${ZIG_STAGE2_SOURCES}" COMMENT STATUS "Running zig1.wasm to produce ${ZIG_COMPILER_RT_C_SOURCE}" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" ) add_executable(zig2 ${ZIG2_C_SOURCE} ${ZIG_COMPILER_RT_C_SOURCE}) @@ -894,7 +904,7 @@ set_target_properties(zig2 PROPERTIES COMPILE_FLAGS ${ZIG2_COMPILE_FLAGS} LINK_FLAGS "${ZIG2_LINK_FLAGS}" ) -target_include_directories(zig2 PUBLIC "${CMAKE_SOURCE_DIR}/stage1") +target_include_directories(zig2 PUBLIC stage1) target_link_libraries(zig2 LINK_PUBLIC zigcpp) if(MSVC) @@ -951,7 +961,7 @@ endif() # -Dno-langref is currently hardcoded because building the langref takes too damn long # To obtain these two forms of documentation, run zig build against stage3 rather than stage2. set(ZIG_BUILD_ARGS - --zig-lib-dir "${CMAKE_SOURCE_DIR}/lib" + --zig-lib-dir "${PROJECT_SOURCE_DIR}/lib" "-Dconfig_h=${ZIG_CONFIG_H_OUT}" "-Denable-llvm" ${ZIG_RELEASE_ARG} @@ -967,24 +977,24 @@ set(ZIG_BUILD_ARGS ) add_custom_target(stage3 ALL - DEPENDS "${CMAKE_BINARY_DIR}/stage3/bin/zig" + DEPENDS "${PROJECT_BINARY_DIR}/stage3/bin/zig" ) add_custom_command( - OUTPUT "${CMAKE_BINARY_DIR}/stage3/bin/zig" - COMMAND zig2 build --prefix "${CMAKE_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} + OUTPUT "${PROJECT_BINARY_DIR}/stage3/bin/zig" + COMMAND zig2 build --prefix "${PROJECT_BINARY_DIR}/stage3" ${ZIG_BUILD_ARGS} COMMENT STATUS "Building stage3" - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" ) if(WIN32) - set(ZIG_EXECUTABLE "${CMAKE_BINARY_DIR}/zig2.exe") + set(ZIG_EXECUTABLE "${PROJECT_BINARY_DIR}/zig2.exe") else() - set(ZIG_EXECUTABLE "${CMAKE_BINARY_DIR}/zig2") + set(ZIG_EXECUTABLE "${PROJECT_BINARY_DIR}/zig2") endif() install(CODE "set(ZIG_EXECUTABLE \"${ZIG_EXECUTABLE}\")") install(CODE "set(ZIG_BUILD_ARGS \"${ZIG_BUILD_ARGS}\")") install(CODE "set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")") -install(CODE "set(CMAKE_SOURCE_DIR \"${CMAKE_SOURCE_DIR}\")") -install(SCRIPT "${CMAKE_SOURCE_DIR}/cmake/install.cmake") +install(CODE "set(PROJECT_SOURCE_DIR \"${PROJECT_SOURCE_DIR}\")") +install(SCRIPT cmake/install.cmake) diff --git a/cmake/install.cmake b/cmake/install.cmake index 4a8356313e..86fd3fb17c 100644 --- a/cmake/install.cmake +++ b/cmake/install.cmake @@ -1,7 +1,7 @@ -set(ZIG_INSTALL_ARGS build ${ZIG_BUILD_ARGS} --prefix "${CMAKE_INSTALL_PREFIX}") +set(ZIG_INSTALL_ARGS build --prefix "${CMAKE_INSTALL_PREFIX}" ${ZIG_BUILD_ARGS}) execute_process( COMMAND "${ZIG_EXECUTABLE}" ${ZIG_INSTALL_ARGS} - WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" RESULT_VARIABLE _result) if(_result)