mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-08-21 04:22:27 +02:00
Reduced optimization level for the (non-performance critical) host-code to speed-up compilation
This commit is contained in:
parent
19504ed609
commit
a823edb65f
|
@ -76,14 +76,14 @@ endif(MSVC)
|
||||||
|
|
||||||
# C++ compiler settings
|
# C++ compiler settings
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(FLAGS "/Ox")
|
set(FLAGS "/Ot")
|
||||||
set(FLAGS "${FLAGS} /wd4715")
|
set(FLAGS "${FLAGS} /wd4715")
|
||||||
else()
|
else()
|
||||||
set(FLAGS "-std=c++11")
|
set(FLAGS "-std=c++11")
|
||||||
if(VERBOSE)
|
if(VERBOSE)
|
||||||
set(FLAGS "${FLAGS} -O1 -g")
|
set(FLAGS "${FLAGS} -O1 -g")
|
||||||
else()
|
else()
|
||||||
set(FLAGS "${FLAGS} -O3")
|
set(FLAGS "${FLAGS} -O2")
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
if(CMAKE_CXX_COMPILER_ID STREQUAL GNU)
|
||||||
set(FLAGS "${FLAGS} -Wall -Wno-comment -Wno-return-type -Wno-switch -Wno-missing-noreturn")
|
set(FLAGS "${FLAGS} -Wall -Wno-comment -Wno-return-type -Wno-switch -Wno-missing-noreturn")
|
||||||
|
@ -107,9 +107,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAGS}")
|
||||||
|
|
||||||
# C compiler settings (for the sample)
|
# C compiler settings (for the sample)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(CFLAGS "/Ox")
|
set(CFLAGS "/Ot")
|
||||||
else()
|
else()
|
||||||
set(CFLAGS "-O3 -std=c99")
|
set(CFLAGS "-O2 -std=c99")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CFLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CFLAGS}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue