tbb
tbb copied to clipboard
Supports clang on Windows
This should better be on the main TBB repo itself, but since I've waited for a month with no response, I'll just gonna move this here xD There are two flavors of clang on Windows: clang-cl (imitating MSVC) and normal clang (imitating GCC). You can check for them by using this code snippet:
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
# using clang with clang-cl front end
elseif (CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
# using clang with regular front end
endif()
endif()
(note: CMake 3.15 and above) For clang-cl, everything is the same as MSVC. But normal clang is a different story. It doesn't support version scripts on Windows, but it does support regular def files. So we can use the MSVC def file, but with GNU names instead. I can help you out if you need to.
So its about these lines: https://github.com/wjakob/tbb/blob/master/CMakeLists.txt#L223 right ? Yes this is not obvious, a patch would help.
Alright I'll try to work on it.
Please see #73