3 include(CheckCCompilerFlag)
5 if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
6 CHECK_C_COMPILER_FLAG( "-O3" XFLAGS_O3)
8 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
11 CHECK_C_COMPILER_FLAG( "-Wall -Wno-unused" XFLAGS_WARN)
13 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unused")
15 CHECK_C_COMPILER_FLAG( "-std=gnu99" XFLAGS_GNU99)
17 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
20 CHECK_C_COMPILER_FLAG( "-march=native" XFLAGS_MARCH)
22 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native")
24 endif( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
26 MARK_AS_ADVANCED(XFLAGS_O3 XFLAGS_WARN XFLAGS_GNU99 XFLAGS_MARCH)