-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: add ZIG_BUILD_ARGS_OVERRIDE
string option
#19913
cmake: add ZIG_BUILD_ARGS_OVERRIDE
string option
#19913
Conversation
Useful when someone wants to pass argument that is not yet exposed to CMake via `ZIG_WHATEVER` option, for example `--search-prefix` from here: ziglang#18434 . Also change order of arguments in cmake/install.cmake to be the same as in CMakeLists.txt, so that `--prefix` can be overriden in both steps. Also bump minimum CMake version to "3.9". Signed-off-by: Eric Joldasov <[email protected]>
ffd8abb
to
61c619f
Compare
Forgot to bump CMake version in README, fixed now. |
why do you need to override arbitrary arguments? it does not specify intent clearly enough. |
For example, to pass "-Ddebug_extensions" to zig2 when building stage3. This way, we don't need to spend extra time building stage4, since all args are used together in one step (stage3). Or if someone can't even build stage3, like in mentioned issue. UPD: and there is no way to tell CMake from command line "build targets up to/excluding stage3" (AFAIK), and bootstrap.c builds stages with |
You can build just stage 2 with Maybe this simpler approach, which adds var |
Thank you for info, this may sound silly, but I completely forgot about this. I changed this PR complwtely, now this is a general cleanup of CMakeLists.txt and revival of #12747 . |
Oops, I closed it by removing branch and can't reopen it, new PR here #19969 . |
Useful when someone wants to pass argument that is not yet exposed to CMake via "ZIG_WHATEVER" option, for example "--search-prefix" from here: #18434 .
Also change order of arguments in cmake/install.cmake to be the same as in CMakeLists.txt, so that "--prefix" can be overriden in both steps.
Also bump minimum CMake version to "3.9".