We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
On MacOS clang-13, it doesn't support -static-libgcc. So the code below might get:
-static-libgcc
clang: error: unsupported option '-static-libgcc'
Is this expected?
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc") + if (NOT APPLE) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc") + endif() if(ENABLE_STATIC_LIBSTDCXX) try_compile(FOUND_STATIC_LIBSTDCXX ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/cmake/checks/static_libstdcxx.cc LINK_OPTIONS -static-libstdc++ CXX_STANDARD 11) if(NOT FOUND_STATIC_LIBSTDCXX) message(FATAL_ERROR "cannot find static library of libstdc++, please add ENABLE_STATIC_LIBSTDCXX=OFF to disable") endif() set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++") endif() endif()
The text was updated successfully, but these errors were encountered:
Looks good to me.
Sorry, something went wrong.
It was fixed in #1555
Too tired today that I forgot to close it, thanks!
mapleFU
No branches or pull requests
Search before asking
Motivation
On MacOS clang-13, it doesn't support
-static-libgcc
. So the code below might get:Is this expected?
Solution
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: