Commit 7836e3a5 authored by Tom Finegan's avatar Tom Finegan
Browse files Add /arch:AVX for files using AVX.

Turns on AVX when the final characters of .c and .cc file names preceding the
.c and .cc file extension contain the substrings avx or avx2. This silences
many MSVC warnings issued during compilation files that use AVX.

Change-Id: I82bda394af7a688679abab2a50dd7e10b3cb0c7a
parent fffb3be7
...@@ -174,6 +174,10 @@ generate_filter() { ...@@ -174,6 +174,10 @@ generate_filter() {
Include=".\\$f" Include=".\\$f"
# Separate file names with Condition? # Separate file names with Condition?
tag_content ObjectFileName "\$(IntDir)$objf" tag_content ObjectFileName "\$(IntDir)$objf"
# Check for AVX and turn it on to avoid warnings.
if [[ $f =~ avx.?\.c$ ]]; then
tag_content AdditionalOptions "/arch:AVX"
close_tag ClCompile close_tag ClCompile
elif [ "$pat" == "h" ] ; then elif [ "$pat" == "h" ] ; then
tag ClInclude \ tag ClInclude \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment