In the Vc project, OptimizeForArchitecture.cmake is used to optimize compilation for specific architectures.
In my project, I used the old version of the above file. After I update it to the newest version, the compilation flags in flags.make
files have the following flags seperated by semicolons:
-march=broadwell;-msse2;-msse3;-mssse3;-msse4.1;-msse4.2;-mavx;-mfma;-mbmi2;-mavx2
which accouts for the following errors when compiling:
/bin/sh: 1: -msse2: not found
/bin/sh: 1: -msse3: not found
/bin/sh: 1: -mssse3: not found
/bin/sh: 1: -msse4.1: not found
/bin/sh: 1: -msse4.2: not found
/bin/sh: 1: -mavx: not found
/bin/sh: 1: -mfma: not found
/bin/sh: 1: -mbmi2: not found
/bin/sh: 1: -mavx2: not found
While when compiling the Vc project, there are no semicolons between the flags.
What's the possible reason of this problem?
A flags.make
file example: build/release/CMakeFiles/tungsten.dir/flags.make
CXX_FLAGS = -std=c++0x -march=broadwell;-msse2;-msse3;-mssse3;-msse4.1;-msse4.2;-mavx;-mfma;-mbmi2;-mavx2 -mno-sse4a -mno-xop -mno-fma4 -mno-avx512f -mno-avx512vl -mno-avx512pf -mno-avx512er -mno-avx512cd -mno-avx512dq -mno-avx512bw -mno-avx512ifma -mno-avx512vbmi -Wall -Wextra -Wpointer-arith -Wcast-align -fstrict-aliasing -Wno-unused-local-typedefs -Wno-misleading-indentation -Wno-maybe-uninitialized -Wno-int-in-bool-context -Wno-implicit-fallthrough -fvisibility-inlines-hidden -O3 -DNDEBUG