Hello,
I successfully built ITK 5.1.1 static libraries with gcc 7.4, but having an issue linking them to my application, which uses an Intel compiler.
I’m getting an “Unsupported compiler” error thrown by the generated include file itk_compiler_detection.h from this conditional (starting at line 153 in my build):
# if ITK_COMPILER_IS_GNU
# include "compilers/ITK_COMPILER_INFO_GNU_CXX.h"
# else
# error Unsupported compiler
# endif
Looking through the preceding code in that file, I’m seeing that ITK_COMPILER_IS_GNU is not set to 1 if __INTEL_COMPILER or __ICC is defined.
To confirm the source of the issue, I changed the conditional above to this:
# if ITK_COMPILER_IS_GNU || ITK_COMPILER_IS_Intel
and the “Unsupported compiler” error went away.
Since modifying a generated file isn’t a good solution, is there a bug in ITK CMake files that causes the build to generate files that don’t accommodate linking with an Intel compiler? If yes, can we resolve it?
If not, did I miss some CMake configuration setting that can be used to eliminate this issue?
Attaching my full itk_compiler_detection.h file for reference:
itk_compiler_detection.h.bak (7.8 KB)
Thanks a lot.