1
0

finished up final build flags for linux

This commit is contained in:
Tycho Bickerstaff 2013-12-21 13:45:27 +00:00
parent b4fb8ace03
commit 869104de34

View File

@ -14,11 +14,11 @@ macro(add_flags FLAGS)
endmacro()
SET(CMAKE_CXX_FLAGS_PROFILE
"${CMAKE_CXX_FLAGS_DEBUG} -pg"
"${CMAKE_CXX_FLAGS_DEBUG} -pg -DNDEBUG"
CACHE STRING "Flags used by the C++ compiler during profile builds."
FORCE )
SET(CMAKE_C_FLAGS_PROFILE
"${CMAKE_C_FLAGS_DEBUG} -pg"
"${CMAKE_C_FLAGS_DEBUG} -pg -DNDEBUG"
CACHE STRING "Flags used by the C compiler during profile builds."
FORCE )
SET(CMAKE_EXE_LINKER_FLAGS_PROFILE
@ -35,10 +35,21 @@ MARK_AS_ADVANCED(
CMAKE_EXE_LINKER_FLAGS_PROFILE
CMAKE_SHARED_LINKER_FLAGS_PROFILE )
if(UNIX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DNDEBUG")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_DEBUG")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D_DEBUG")
endif()
if(WIN32)
add_flags("/MP")
else()
add_flags("-pthread")
endif()
set(CMAKE_CXX_FLAGS_RELEASE_BAK "${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE_BAK "${CMAKE_C_FLAGS_RELEASE}")
if (UNIX)
@ -54,6 +65,12 @@ endif()
set(CMAKE_BUILD_TYPE_BAK ${CMAKE_BUILD_TYPE})
set(CMAKE_BUILD_TYPE "Release")
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_definitions(-DCRYPTOPP_DISABLE_ASM)
endif()
add_definitions(-DLUA_USE_DLOPEN)
add_subdirectory(lib/inifile/)
add_subdirectory(lib/jsoncpp/)
add_subdirectory(lib/cryptopp/)