Filter compiler version, Windows .lib detection
This commit is contained in:
parent
290ad2b967
commit
6d256d1271
2 changed files with 13 additions and 4 deletions
|
|
@ -1138,7 +1138,7 @@ macro getHeader*(
|
|||
`version`* {.strdefine.} = `verVal`
|
||||
`lname` =
|
||||
when `nameStatic`:
|
||||
`lre` & ".a"
|
||||
`lre` & "\\.(a|lib)"
|
||||
else:
|
||||
`lre` & getDynlibExt()
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,15 @@ proc getConanBuilds*(pkg: ConanPackage, filter = "") =
|
|||
## `filter` can be used to tweak search terms
|
||||
## e.g. build_type=Debug&compiler=clang
|
||||
let
|
||||
(arch, os, compiler, _) = getGccInfo()
|
||||
(arch, os, compiler, version) = getGccInfo()
|
||||
|
||||
vsplit = version.split('.')
|
||||
|
||||
vfilter =
|
||||
when defined(OSX):
|
||||
vsplit[0 .. 1].join(".")
|
||||
else:
|
||||
vsplit[0]
|
||||
|
||||
query =
|
||||
if pkg.bhash.len == 0:
|
||||
|
|
@ -177,7 +185,8 @@ proc getConanBuilds*(pkg: ConanPackage, filter = "") =
|
|||
if filter.len != 0:
|
||||
query &= &"&{filter}"
|
||||
if "compiler=" notin filter and os != "windows":
|
||||
query &= &"&compiler={compiler}"
|
||||
query &= &"&compiler={compiler}&compiler.version=" & vfilter
|
||||
|
||||
query.replace("&", "%20and%20")
|
||||
else: ""
|
||||
|
||||
|
|
@ -370,4 +379,4 @@ proc getConanLibs*(pkg: ConanPackage, outdir: string): seq[string] =
|
|||
result.add outdir / lib
|
||||
|
||||
for cpkg in pkg.requires:
|
||||
result.add cpkg.getConanLibs(outdir)
|
||||
result.add cpkg.getConanLibs(outdir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue