#
# Created by Raoul Rubien on 08.09.16.
#

#SET(CMAKE_BUILD_TYPE "CMAKE_C_FLAGS_[DEBUG|RELEASE|RELWITHDEBINFO|MINSIZEREL])
SET(CMAKE_BUILD_TYPE "DEBUG")
#SET(CMAKE_BUILD_TYPE "RELEASE")

SET(CMAKE_VERBOSE_MAKEFILE True)
SET(CMAKE_SYSTEM_NAME Generic)

SET(CMAKE_C_COMPILER gcc)
SET(CMAKE_CXX_COMPILER g++)

SET(CSTANDARD "-std=c11")
SET(CXXSTANDARD "-std=c++11")

SET(CWARN "-Wall -Wredundant-decls -Werror ")
SET(CXXWARN "-Wall -Wredundant-decls -Werror ")

SET(CTUNING "")
#SET(CTUNING "${CTUNING} -fshort-enums")

#SET(CDEFS "-DFOO_MACRO='myvalue' ${CDEFS}")
SET(CDEFS "${CDEFS}")

#SET(COPT "-Os")
SET(COPT "-O3")
#SET(COPT "-O2")
#SET(COPT "-O1")

SET(CMAKE_CXX_FLAGS_DEBUG "${CXXDEBUG} -gstabs")
SET(CMAKE_C_FLAGS_DEBUG "${CDEBUG} -gstabs")
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
SET(CMAKE_C_FLAGS "${CMCU} ${CDEFS} ${CINCS} ${COPT} ${CWARN} ${CSTANDARD} ${CTUNING} ${DEFINED_MACROS}")
SET(CMAKE_CXX_FLAGS "${CMCU} ${CDEFS} ${CINCS} ${COPT} ${CXXWARN} ${CXXSTANDARD} ${CTUNING} ${DEFINED_MACROS}")
