Fix build issue with ICPC when using CGAL #25843
Open
+11
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
The original code was adding "-fp-model strict" to all targets Regardless of the language which led to compilation issues with CMake Project that contained CUDA or C code (untesed with C).
Motivation
This issue made my cuda builds fail.
I didn't open an issue, as the work required to create a detailed issue is the same as fixing it directly.
Details
I simply repeated what was already done for other compilers but applied it to intel.
I didn't test on Windows or using older CMAKE <3.3, so be careful with the review.
As the conditions are copied and pasted from the other compilers and the linux & cmake > 3.3 test worked well. I believe it should work.
I also changed "fp-model strict" to "fp-model=strict" for more compatibility with Wrappers like nvcc which can transmit unknown arguments to the underlying compiler.
Relevant intel doc: https://www.intel.com/content/www/us/en/docs/cpp-compiler/developer-guide-reference/2021-8/fp-model-fp.html