cpp-netlib/url

Can not build on Ubuntu 18.04 with Clang

emmenlau opened this issue · 2 comments

When using Clang on an older Linux like Ubuntu 18.04 (gcc-7), the build should link to stdc++fs unless skyr_BUILD_WITH_LLVM_LIBCXX is given.

I've tested that it works when using something like:

set(clang_with_gnu_stdlib $<AND:$<CXX_COMPILER_ID:Clang>,$<NOT:$<BOOL:${WIN32}>>,$<NOT:$<BOOL:${skyr_BUILD_WITH_LLVM_LIBCXX}>>>)

[...]
    target_link_libraries(
            skyr-filesystem
            [...]
            $<${clang_with_gnu_stdlib}:"stdc++fs">

Can you make a PR?

Thanks @glynos for your consideration! I can make a PR but I did not find a nice naming for this construct clang_with_gnu_stdlib. Is that an acceptable name and cmake check? Its by far not as nice as your other constructs...