Skip to content
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

Add support for Intel C++ #24451

Open
sinetek opened this issue Apr 3, 2024 · 6 comments
Open

Add support for Intel C++ #24451

sinetek opened this issue Apr 3, 2024 · 6 comments
Labels
build Any build issue (with or without CMake) feature

Comments

@sinetek
Copy link

sinetek commented Apr 3, 2024

Hi, here is a patch for adding support for Intel C++ compiler.
There's two intel compilers, but the old one is going to be deprecated, so I only bothered to test with 'icx'.

diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
index ed0cb89f7c..7ee134644b 100644
--- a/build/cmake/init.cmake
+++ b/build/cmake/init.cmake
@@ -178,6 +178,8 @@ if(WIN32)
         set(wxCOMPILER_PREFIX "gcc")
     elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
         set(wxCOMPILER_PREFIX "clang")
+    elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "IntelLLVM")
+        set(wxCOMPILER_PREFIX "icx")
     else()
         message(FATAL_ERROR "Unknown WIN32 compiler type")
     endif()
@sinetek sinetek added the build Any build issue (with or without CMake) label Apr 3, 2024
@sinetek
Copy link
Author

sinetek commented Apr 3, 2024

I think the value should be vc instead of icx to make cmake happy.

@vadz
Copy link
Contributor

vadz commented Apr 3, 2024

We used to support icc in the past but I have no idea if it's still supported, i.e. if the code actually compiles/works correctly with it. Any serious effort to revive support for it should include adding a CI build testing it, otherwise it will just inevitably bit rot away again.

If you can do this, please open a PR adding a CI job using icc and the necessary changes to make it work. TIA!

@vadz vadz added the feature label Apr 3, 2024
@imciner2
Copy link
Contributor

imciner2 commented Apr 3, 2024

icc is different from icx. icx is the newer LLVM-based Intel compiler and icc is their older one that is now deprecated (to be removed in a year or two actually).

When I tried compiling wx with icx in August of last year it worked.

@vadz
Copy link
Contributor

vadz commented Apr 3, 2024

Sorry, I didn't realize the name has changed. But the gist remains the same: for a compiler to be really supported, it needs to be tested in the CI. It looks like Intel even has an apt repository, so adding a job using it should be pretty simple, if anybody is interested in doing it.

@sinetek
Copy link
Author

sinetek commented Apr 4, 2024

Yes, I don't know what a CI is. So someone feel free to take this issue. I wanted to leave documentation for those googling the error messages.

@vadz
Copy link
Contributor

vadz commented Apr 7, 2024

CI is "continuous integration" and refers to the builds done automatically on every push and, even more importantly, every PR done in this repository. It ensures that new changes at least don't break the build and it's even more crucial to have it for rarely used compilers like this one.

It's not difficult to add a new CI job, see .github/workflows/ci.yml, but someone needs to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Any build issue (with or without CMake) feature
Projects
None yet
Development

No branches or pull requests

3 participants