Add Intel ICC 18 detection/support to CMakeLists.txt#1841
Add Intel ICC 18 detection/support to CMakeLists.txt#1841Spudz76 wants to merge 1 commit intofireice-uk:devfrom
Conversation
|
Fresh on the heels of ICC-19 release, here is ICC-18 support... |
psychocrypt
left a comment
There was a problem hiding this comment.
I need to test it by my self. Some changes looks like workarounds for a not correct configured icc.
| message(FATAL_ERROR "g++ version must be at least 5.1!") | ||
| endif() | ||
| elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") | ||
| include_directories(BEFORE "/opt/intel/include") |
There was a problem hiding this comment.
Please do not hard code any path's. It could be that the compiler is installed somewhere else even if this path is the default path.
| get_filename_component(ICC_GXX ${ICC_GXX} NAME) | ||
| find_program(ICC_GCC NAMES "gcc-${ICC_GCCVER}" "gcc-7" "gcc-6" "gcc") | ||
| get_filename_component(ICC_GCC ${ICC_GCC} NAME) | ||
| set(ICC_COMPILERS "-gxx-name=${ICC_GXX} -gcc-name=${ICC_GCC}") |
There was a problem hiding this comment.
Not sure if this is the correct way, because if I install icc I select already an gcc version. This looks like a workaround.
There was a problem hiding this comment.
What, where? I run the installer, remove everything but the C++, it never asks it only seeks whatever /usr/bin/gcc points to... system default
I also use this to generate test binaries made with every permutation of ICC+GCC regardless what was configured or what the system defaults are. So yes, it is a workaround, for having to use the ICC environment at all (I don't use their shell scripts or whatever). I also don't have ICC in the system path.
|
Example of what happens otherwise: It has picked up gcc-8 and crashes out. You probably have never had gcc-8 on the same system as icc-18? This compiler test box has gcc 5,6,7,8 and clang 3.8,3.9,4.0,5.0,6.0,7,8 and icc-18. icc by itself is too stupid to avoid gcc-8 even though it does not work. |
|
Confirmed, I set my system compiler back to gcc-7 and icc works without these mods. I will rework this patch so it is more generic. |
Detect ICC-18, add their header and lib paths
Select newest available and compatible GCC and pass to ICC to avoid built-in default of using
/usr/bin/gccwhich in some distro revisions is too oldUse
-DICC_GCCVER=Nto force specificgcc-NLink to Intel lib