From e10ec6f0735532214fae4ab0c621fc5e21145a91 Mon Sep 17 00:00:00 2001 From: Alex Neundorf Date: Sun, 19 Feb 2012 10:25:43 +0100 Subject: -Werror=return-type is unrelated to the visibility testing stuff Alex --- kde-modules/KDECompilerSettings.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kde-modules') diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake index 79ebb0b6..905e16d6 100644 --- a/kde-modules/KDECompilerSettings.cmake +++ b/kde-modules/KDECompilerSettings.cmake @@ -401,6 +401,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-threadsafe-statics") endif() + if (GCC_IS_NEWER_THAN_4_2) + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type") + endif() + set(_GCC_COMPILED_WITH_BAD_ALLOCATOR FALSE) if (GCC_IS_NEWER_THAN_4_1) exec_program(${CMAKE_C_COMPILER} ARGS ${CMAKE_C_COMPILER_ARG1} -v OUTPUT_VARIABLE _gcc_alloc_info) @@ -432,7 +436,7 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # endif(NOT _compile_result) if (GCC_IS_NEWER_THAN_4_2) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=return-type -fvisibility-inlines-hidden") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") endif() else() set (__KDE_HAVE_GCC_VISIBILITY 0) -- cgit v1.2.1