File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,6 +62,19 @@ file(GLOB ARGPARSE_FILES ${CMAKE_SOURCE_DIR}/argparse/*.cpp)
6262
6363add_executable (next ${SRC_FILES} ${ARGPARSE_FILES} )
6464
65+ option (ENABLE_VEC_REPORT "Enable compiler vectorization reports" ON )
66+
67+ if (ENABLE_VEC_REPORT)
68+ if (CMAKE_CXX_COMPILER_ID MATCHES "IntelLLVM" )
69+ target_compile_options (next PRIVATE -O3 -Rpass=loop-vectorize -Rpass-missed=loop-vectorize )
70+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
71+ target_compile_options (next PRIVATE -O3 -fopt-info-vec-optimized -fopt-info-vec-missed )
72+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
73+ target_compile_options (next PRIVATE -O3 -Rpass=loop-vectorize -Rpass-missed=loop-vectorize )
74+ endif ()
75+ endif ()
76+
77+
6578# ============================
6679# OpenMP
6780# ============================
You can’t perform that action at this time.
0 commit comments