boostorg / boost_install

8 stars 32 forks source link

IntelLLVM is not supported #60

Closed mablanchard closed 2 years ago

mablanchard commented 2 years ago

Intel C/C++ compilers switched to LLVM and new ICX compiler is reported with CMAKE_CXX_COMPILER_ID set to IntelLLVM by CMake (testing CMake 3.23.1). This new string seems not to be handled correctly by BoostDetectToolset.cmake and throws messages like:

-- Boost toolset is unknown (compiler IntelLLVM 2022.1.0)

pdimov commented 2 years ago

@grafikrobot @grisumbras What is the correct b2 toolset name for the new LLVM-based Intel compiler?

grafikrobot commented 2 years ago

@pdimov it's just intel as before. Not sure which of the four platform variants of it support the new compiler though.

mablanchard commented 2 years ago

For reference, the hack below seems to be working here:

--- lib/cmake/BoostDetectToolset-1.77.0.cmake   (revision 2786)
+++ lib/cmake/BoostDetectToolset-1.77.0.cmake   (working copy)
@@ -32,7 +32,7 @@
     set(_BOOST_COMPILER_VERSION_MINOR)
   endif()

-elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" OR CMAKE_CXX_COMPILER_ID STREQUAL "IntelLLVM")

   if(WIN32)
pdimov commented 2 years ago

Applied your suggestion on develop, https://github.com/boostorg/boost_install/commit/56f7c5da02a62c009954bfa0c9ccb1b57a3096a4. Sorry that didn't happen earlier; the notification must have come in an inopportune time so I've missed it.

It's a bit too late now for 1.81, the beta is already on its way, but I'll see if this can be applied post-beta.

mablanchard commented 2 years ago

My bad, I should have created a PR but felt like this was more of a hack rather than a proper fix. I never took the time to actually look at the CMake logic here...

pdimov commented 2 years ago

Should be the proper fix.

pdimov commented 2 years ago

Merged to master, should be in the final 1.81 release.

mablanchard commented 2 years ago

Thanks!