Wrong flags with pgcc
For some reason /arch:AVX2
is detected as a valid flag for the pgcc
compiler, but it is interpreted as a filename and then compilation fails:
$ CC=pgcc cmake ..
[...]
-- Performing Test CMAKE_C_FLAGS [-march=native] - Failed
-- Performing Test CMAKE_C_FLAGS [-xHost] - Failed
-- Performing Test CMAKE_C_FLAGS [/arch:AVX2] - Success, Appending
[...]
$ make
[...]
[ 96%] Linking C executable xc-info
/usr/bin/ld: cannot find /arch:AVX2: No such file or directory
CMakeFiles/xc-info.dir/build.make:103: recipe for target 'xc-info' failed
make[2]: *** [xc-info] Error 2
CMakeFiles/Makefile2:124: recipe for target 'CMakeFiles/xc-info.dir/all' failed
make[1]: *** [CMakeFiles/xc-info.dir/all] Error 2
Makefile:159: recipe for target 'all' failed
make: *** [all] Error 2