|
|
@ -113,9 +113,12 @@ MACRO(NL_SETUP_BUILD)
|
|
|
|
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
|
|
ENDIF(CMAKE_BUILD_TYPE MATCHES "Debug")
|
|
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
IF(WIN32)
|
|
|
|
SET(NL_DEBUG_CFLAGS "/ZI /Gy /GS-")
|
|
|
|
SET(NL_DEBUG_CFLAGS "/EHa /Ob1 /Zi")
|
|
|
|
SET(NL_RELEASE_CFLAGS "/Ox /Ob2 /Oi /Ot /Oy /GT /GF")
|
|
|
|
SET(NL_RELEASE_CFLAGS "/EHa /Zi /Ox /Ob2 /Oi /Ot /Oy /GT /GF /GS-")
|
|
|
|
SET(NL_RELEASEDEBUG_CFLAGS "/DNL_RELEASE_DEBUG /Ob2 /GF")
|
|
|
|
SET(NL_RELEASEDEBUG_CFLAGS "/EHa /DNL_RELEASE_DEBUG /Zi /Ob2 /GF")
|
|
|
|
|
|
|
|
SET(NL_DEBUG_LINK_FLAGS "/NODEFAULTLIB:msvcrt")
|
|
|
|
|
|
|
|
SET(NL_RELEASE_LINK_FLAGS "/OPT:REF /OPT:ICF")
|
|
|
|
|
|
|
|
SET(NL_RELEASEDEBUG_LINK_FLAGS "/OPT:REF /OPT:ICF")
|
|
|
|
ELSE(WIN32)
|
|
|
|
ELSE(WIN32)
|
|
|
|
SET(PLATFORM_CFLAGS "-ftemplate-depth-24 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused")
|
|
|
|
SET(PLATFORM_CFLAGS "-ftemplate-depth-24 -D_REENTRANT -Wall -ansi -W -Wpointer-arith -Wsign-compare -Wno-deprecated-declarations -Wno-multichar -Wno-long-long -Wno-unused")
|
|
|
|
IF(WITH_COVERAGE)
|
|
|
|
IF(WITH_COVERAGE)
|
|
|
@ -165,18 +168,22 @@ MACRO(NL_SETUP_BUILD_FLAGS)
|
|
|
|
## Debug
|
|
|
|
## Debug
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${NL_DEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
|
|
|
|
SET(CMAKE_LINK_FLAGS_DEBUG "${CMAKE_LINK_FLAGS_DEBUG} ${NL_DEBUG_LINK_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
|
|
|
|
|
|
|
|
|
|
|
## Release
|
|
|
|
## Release
|
|
|
|
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${NL_RELEASE_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
|
|
|
|
SET(CMAKE_LINK_FLAGS_RELEASE "${CMAKE_LINK_FLAGS_RELEASE} ${NL_RELEASE_LINK_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
|
|
|
|
|
|
|
|
|
|
|
## RelWithDebInfo
|
|
|
|
## RelWithDebInfo
|
|
|
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
|
|
|
|
SET(CMAKE_LINK_FLAGS_RELWITHDEBINFO "${CMAKE_LINK_FLAGS_RELWITHDEBINFO} ${NL_RELEASEDEBUG_LINK_FLAGS} ${PLATFORM_LINKFLAGS} ")
|
|
|
|
|
|
|
|
|
|
|
|
## MinSizeRel
|
|
|
|
## MinSizeRel
|
|
|
|
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
SET(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_CFLAGS} ${PLATFORM_CFLAGS} ")
|
|
|
|
|
|
|
|
SET(LINK_FLAGS_MINSIZEREL "${CMAKE_LINK_FLAGS_MINSIZEREL} ${NL_RELEASEDEBUG_LINK_CFLAGS} ${PLATFORM_LINKFLAGS} ")
|
|
|
|
ENDMACRO(NL_SETUP_BUILD_FLAGS)
|
|
|
|
ENDMACRO(NL_SETUP_BUILD_FLAGS)
|
|
|
|
|
|
|
|
|
|
|
|
MACRO(NL_SETUP_PREFIX_PATHS)
|
|
|
|
MACRO(NL_SETUP_PREFIX_PATHS)
|
|
|
|