I'm trying to enable AVX2 code-generation via CMake on my Visual Studio 2013 projects and so far, I'm out of luck.
Things I've tried are:
- Set 
CMAKE_CXX_FLAGS_*to include/arch:AVX2like so:SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /arch:AVX2") - Set target properties like so: 
SET_TARGET_PROPERTIES("myproject" PROPERTIES COMPILE_FLAGS "/arch:AVX2"). I also tried replacingCOMPILE_FLAGSwithCOMPILE_DEFINITIONS,COMPILE_FEATURES(fails to generate project) andCOMPILE_OPTIONS. 
Each time I try generating the projects, I would make sure to delete the CMake cache so that it doesn't get in the way of generating the project files.
What am I missing? Any help to shed light on this would be much appreciated. Thanks for your time.