-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
MSVC but not Clang: /MP #2824
MSVC but not Clang: /MP #2824
Conversation
Needs a |
APPEND | ||
PROPERTY INTERFACE_COMPILE_OPTIONS $<$<NOT:$<CONFIG:Debug>>:$<$<COMPILE_LANGUAGE:CXX>:/MP>>) | ||
# /MP enables multithreaded builds (relevant when there are many files) for MSVC | ||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # no Clang no Intel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or to check whether CMAKE_CXX_COMPILER_FRONTEND_VARIANT
is empty https://github.com/Kitware/CMake/blob/master/Modules/CMakeDetermineCXXCompiler.cmake#L129-L143
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be checked to make sure it is valid for all versions we support - CMake has a bad habit of not adding those the first round. If so, then it seems more elegant. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMAKE_CXX_COMPILER_FRONTEND_VARIANT
wasn't there in 3.11, which is where this block of code starts taking effect.
On Windows, clang-cl does not understand /MP. ``` clang-cl: warning: argument unused during compilation: '/MP' [-Wunused-command-line-argument] ``` with Clang 10.0.0
92cb34c
to
42210a9
Compare
Thats odd, |
Quite sure that has nothing to do with this PR. |
@henryiii Same error surprised @YannickJadoul in #2846 . |
Description
On Windows, clang-cl does not understand
/MP
.with Clang 10.0.0 and Ninja.
Suggested changelog entry: