mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-20 11:48:30 -06:00
ADD_DEFINITIONS is obsolete for setting C/CXXFLAGS.
And setting -O0 in a debug build is unnecessary, that's the default.
This commit is contained in:
parent
da0df1c48d
commit
ae6d2a2340
@ -516,9 +516,11 @@ if (APPLE)
|
||||
endif()
|
||||
Check_C_Compiler_Flag(-Wno-unknown-attributes have_no_unkatt)
|
||||
if (have_no_unkatt)
|
||||
ADD_DEFINITIONS(-Wno-unknown-attributes -Wno-typedef-redefinition)
|
||||
set(CMAKE_C_FLAGS "-Wno-unknown-attributes -Wno-typedef-redefinition ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "-Wno-unknown-attributes -Wno-typedef-redefinition ${CMAKE_CXX_FLAGS}")
|
||||
else()
|
||||
ADD_DEFINITIONS(-Wno-typedef-redefinition)
|
||||
set(CMAKE_C_FLAGS "-Wno-typedef-redefinition ${CMAKE_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "-Wno-typedef-redefinition ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
# SET (CMAKE_OSX_ARCHITECTURES "i386")
|
||||
endif (APPLE)
|
||||
@ -539,9 +541,6 @@ IF (MINGW)
|
||||
SET( CMAKE_CXX_FLAGS "-DWINVER=0x0500 -D_EMULATE_GLIBC=0 ${CMAKE_CXX_FLAGS}") # Workaround for bug in gtest on mingw, see https://github.com/google/googletest/issues/893 and https://github.com/google/googletest/issues/920
|
||||
ENDIF (MINGW)
|
||||
|
||||
SET( CMAKE_C_FLAGS_DEBUG "-O0 -g ${CMAKE_C_FLAGS}")
|
||||
SET( CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}")
|
||||
|
||||
IF (APPLE AND WITH_GNUCASH)
|
||||
SET(CMAKE_MACOSX_RPATH ON)
|
||||
SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
|
Loading…
Reference in New Issue
Block a user