Skip to content

Conversation

star-hengxing
Copy link
Contributor

No description provided.

@star-hengxing
Copy link
Contributor Author

Build failed with brew mingw (gcc13), gcc15 ok.
How can I compare gcc version in on_check? @waruqi

@star-hengxing
Copy link
Contributor Author

Build failed with brew mingw (gcc13), gcc15 ok. How can I compare gcc version in on_check? @waruqi

assert(package:check_cxxsnippets({test = [[
#if defined(__GNUC__) && !defined(__clang__)
# if (__GNUC__ < 10) || (__GNUC__ == 10 && (__GNUC_MINOR__ < 2))
# error "package(libcoro): GCC version too low, need at least 10.2.0"
# endif
#endif
]]}, {configs = {languages = "c++20"}}), "package(libcoro): GCC version too low, need at least 10.2.0")

@choyy
Copy link
Contributor

choyy commented Sep 9, 2025

Get version from command line?

  local gcc = find_tool("gcc")
  local out = os.iorunv(gcc.program, {"--version"})
  version = out:match("gcc .+ (%d+%.%d+%.%d+)")
  vmajor = version:split("%.")[1]

@waruqi waruqi merged commit 3ae04c7 into dev Sep 9, 2025
73 checks passed
@star-hengxing star-hengxing deleted the eve branch September 9, 2025 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants