Skip to content

Loosen restrictions on unrecognized compilers#2585

Merged
ChrisThrasher merged 1 commit into
2.6.xfrom
unrecognized-compilers
Jun 22, 2023
Merged

Loosen restrictions on unrecognized compilers#2585
ChrisThrasher merged 1 commit into
2.6.xfrom
unrecognized-compilers

Conversation

@ChrisThrasher

@ChrisThrasher ChrisThrasher commented Jun 22, 2023

Copy link
Copy Markdown
Member

Description

A core tenet of CMake is the idea that you can use any valid C++ compiler. By enumerating all supported compilers and emitting and hard error when an unrecognized compiler is detected, we are violating that tenet.

Relaxing this message from a fatal error to merely a warning continues to communicate to users that their build may not succeed but it leaves the door open for the build to potential succeed if the compiler meets all of our requirements.

Partially addresses #2583

A core tenet of CMake is the idea that you can use any valid C++
compiler. By enumerating all supported compilers and emitting and
hard error when an unrecognized compiler is detected, we are violating
that tenet.

Relaxing this message from a fatal error to merely a warning continues
to communicate to users that their build may not succeed but it leaves
the door open for the build to potential succeed if the compiler meets
all of our requirements.
@ChrisThrasher ChrisThrasher changed the base branch from master to 2.6.x June 22, 2023 17:23
@ChrisThrasher

ChrisThrasher commented Jun 22, 2023

Copy link
Copy Markdown
Member Author

Alternatively we can entirely remove that else() block since most CMake projects I've seen simply don't do this kind of compiler detection logic in the first place. It's not necessarily warning-worthy to use an unrecognized compiler. There are other moderately popular compilers than MSVC, GCC, and Clang (and their variants).

@codecov

codecov Bot commented Jun 22, 2023

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (2.6.x@11b7374). Click here to learn what that means.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##             2.6.x    #2585   +/-   ##
========================================
  Coverage         ?   27.44%           
========================================
  Files            ?      227           
  Lines            ?    19773           
  Branches         ?     4651           
========================================
  Hits             ?     5426           
  Misses           ?    13757           
  Partials         ?      590           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11b7374...f0544e4. Read the comment docs.

@ChrisThrasher

Copy link
Copy Markdown
Member Author

@VictorEijkhout Would you please test this PR and let us know to what extent it fixes your issues with Intel compilers?

@VictorEijkhout

Copy link
Copy Markdown
-- The C compiler identification is IntelLLVM 2023.1.0
-- The CXX compiler identification is IntelLLVM 2023.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/intel/oneapi/compiler/2023.1.0/linux/bin/icx - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/intel/oneapi/compiler/2023.1.0/linux/bin/icpx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at cmake/Config.cmake:134 (message):
  Unrecognized compiler: IntelLLVM.  Use at your own risk.

and then

-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- UDev not found.

but that's my problem, not yours, I'm guessing.

@ChrisThrasher

Copy link
Copy Markdown
Member Author

https://github.com/ChrisThrasher/SFML/actions/runs/5349006137/jobs/9699625624

I was able to add an Intel oneAPI CI job to 2.6.0 and it passes so I'm hopeful you should be able to make this work as soon this PR gets merged. There could still be lingering issues since I'm not sure if this compiler is binary compatible with the Ubuntu packages we're linking against that assume the GCC ABI. That much will require further testing.

@ChrisThrasher ChrisThrasher merged commit e9e25d5 into 2.6.x Jun 22, 2023
@ChrisThrasher ChrisThrasher deleted the unrecognized-compilers branch June 22, 2023 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants