DEBUG mode in makefile

This commit is contained in:
2016-03-29 18:49:33 +02:00
parent 52ba015950
commit 59abad41a9

View File

@@ -21,21 +21,23 @@ if(CPU_SSE3_AVAILABLE)
endif(CPU_SSE3_AVAILABLE)
OPTION(USE_SSE "If SSE instruction set should be used." OFF)
OPTION(USE_SSE2 "If SSE 2 instruction set should be used." ON)
OPTION(USE_AVX "If AVX instruction set should be used." OFF)
OPTION(USE_FMA "If FMA instruction set should be used." OFF)
OPTION(USE_SSE "If SSE instruction set should be used." OFF)
OPTION(USE_SSE2 "If SSE 2 instruction set should be used." ON)
OPTION(DEBUG "If library should be compiled with DEBUG" OFF)
OPTION(ENABLE_TESTS "enables tests" ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -Weffc++ -Wshadow -Wstrict-aliasing -ansi -Woverloaded-virtual -Wdelete-non-virtual-dtor -Wno-unused-function")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++14")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -pthread")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -O3")
if(DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native -O3")
endif(DEBUG)
if(USE_AVX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx -DUSE_AVX")