gnucash unstable: Fix CXX Flags for g++.
John Ralls
jralls at code.gnucash.org
Tue Dec 26 21:23:16 EST 2017
Updated via https://github.com/Gnucash/gnucash/commit/44fc5b05 (commit)
from https://github.com/Gnucash/gnucash/commit/bbd2df6a (commit)
commit 44fc5b0555dd6cbc21b304a3aa68fe1335278208
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Dec 26 18:23:09 2017 -0800
Fix CXX Flags for g++.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8a994b..b84795b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -514,8 +514,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") # FIXME: should be -std=
IF (UNIX)
- SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused")
- SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wno-unused")
+ SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Wdeclaration-after-statement -Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused")
+ SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wmissing-prototypes -Wmissing-declarations -Wno-unused")
SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations -std=gnu11")
SET( CMAKE_C_FLAGS_RELEASE "-O3 ${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2")
ENDIF (UNIX)
diff --git a/common/test-core/CMakeLists.txt b/common/test-core/CMakeLists.txt
index 7d426fc..d9a7276 100644
--- a/common/test-core/CMakeLists.txt
+++ b/common/test-core/CMakeLists.txt
@@ -66,12 +66,20 @@ GNC_ADD_SCHEME_TARGETS(scm-test-core
IF(NOT GTEST_SHARED_LIB)
SET (lib_gtest_SOURCES ${GTEST_SRC_DIR}/src/gtest-all.cc)
ADD_LIBRARY(gtest STATIC ${lib_gtest_SOURCES})
- TARGET_COMPILE_OPTIONS(gtest PRIVATE -Wno-missing-prototypes)
+ IF(APPLE)
+ TARGET_COMPILE_OPTIONS(gtest PRIVATE -Wno-missing-prototypes)
+ ELSE()
+ TARGET_COMPILE_OPTIONS(gtest PRIVATE -Wno-missing-declarations)
+ ENDIF()
TARGET_INCLUDE_DIRECTORIES(gtest PUBLIC ${GTEST_INCLUDE_DIR} ${GTEST_SRC_DIR})
ENDIF()
SET (lib_gmock_SOURCES ${GMOCK_SRC})
ADD_LIBRARY(gmock STATIC ${lib_gmock_SOURCES})
-TARGET_COMPILE_OPTIONS(gmock PRIVATE -Wno-missing-prototypes)
+IF (APPLE)
+ TARGET_COMPILE_OPTIONS(gmock PRIVATE -Wno-missing-prototypes)
+ELSE()
+ TARGET_COMPILE_OPTIONS(gmock PRIVATE -Wno-missing-declarations)
+ENDIF()
TARGET_INCLUDE_DIRECTORIES(gmock PUBLIC
${GTEST_INCLUDE_DIR} ${GTEST_SRC_DIR}
${GMOCK_INCLUDE_DIR} ${GMOCK_SRC_DIR})
Summary of changes:
CMakeLists.txt | 4 ++--
common/test-core/CMakeLists.txt | 12 ++++++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
More information about the gnucash-changes
mailing list