fix cmake Debug build

Flags added to CMAKE_C_FLAGS_DEBUG are not applied to C++ files, CMAKE_CXX_FLAGS_DEBUG should be used instead.
This commit is contained in:
Mokhtar Naamani 2017-05-21 21:55:15 +03:00 committed by Arvid Norberg
parent 387f3ba0ea
commit aed1f4ef9d
1 changed files with 1 additions and 1 deletions

View File

@ -176,7 +176,7 @@ if (NOT CMAKE_BUILD_TYPE)
endif()
# add_definitions() doesn't seem to let you say wich build type to apply it to
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DTORRENT_DEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTORRENT_DEBUG")
if(UNIX)
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os -g")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")