File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,13 +29,23 @@ foreach(FILE ${AvsCore_Sources})
2929 source_group ("${GROUP} " FILES "${FILE} " )
3030endforeach ()
3131
32- # special AVX option for source files with *_avx.cpp pattern
33- file (GLOB_RECURSE SRCS_AVX "*_avx.cpp" )
34- set_source_files_properties (${SRCS_AVX} PROPERTIES COMPILE_FLAGS " /arch:AVX " )
32+ if (MSVC_IDE )
33+ # special AVX option for source files with *_avx.cpp pattern
34+ file (GLOB_RECURSE SRCS_AVX "*_avx.cpp" )
35+ set_source_files_properties (${SRCS_AVX} PROPERTIES COMPILE_FLAGS " /arch:AVX " )
36+
37+ # special AVX2 option for source files with *_avx2.cpp pattern
38+ file (GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp" )
39+ set_source_files_properties (${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " /arch:AVX2 " )
40+ elseif (MINGW)
41+ # special AVX option for source files with *_avx.cpp pattern
42+ file (GLOB_RECURSE SRCS_AVX "*_avx.cpp" )
43+ set_source_files_properties (${SRCS_AVX} PROPERTIES COMPILE_FLAGS -mavx )
3544
36- # special AVX2 option for source files with *_avx2.cpp pattern
37- file (GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp" )
38- set_source_files_properties (${SRCS_AVX2} PROPERTIES COMPILE_FLAGS " /arch:AVX2 " )
45+ # special AVX2 option for source files with *_avx2.cpp pattern
46+ file (GLOB_RECURSE SRCS_AVX2 "*_avx2.cpp" )
47+ set_source_files_properties (${SRCS_AVX2} PROPERTIES COMPILE_FLAGS -mavx2 )
48+ endif ()
3949
4050# Specify include directories
4151target_include_directories ("AvsCore" PUBLIC ${CMAKE_CURRENT_SOURCE_DIR } /include )
You can’t perform that action at this time.
0 commit comments