set(CMAKE_CXX_STANDARD 11) does not generate c++11 flag with CXX=icpc
When the environment variable $CXX
is set to the intel compiler icpc
and exported, set(CMAKE_CXX_STANDARD 11)
will not to produce the -std=c++11
flag.
When $CXX
is set to g++ , the c++11 flag is produced (-std=gnu++11). I checked the file flags.make
for this.
A compilation using the c++11
feature auto
will fail with export CXX=icpc
but not with export CXX=g++
.
I tested this with icpc (ICC) 15.0.2 20150121 and cmake version 3.2.2.