What is the CMake way to include the GCC equivalent -march= , especially -march=native ? Is anything better than CHECK_CXX_COMPILER_FLAG , for example:
include(CheckCXXCompilerFlag) CHECK_CXX_COMPILER_FLAG("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE) if(COMPILER_SUPPORTS_MARCH_NATIVE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif()
source share