summaryrefslogtreecommitdiff
path: root/cmake/libutils.cmake
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-01-25 16:37:08 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-01-25 16:37:08 +0400
commit1793646d78dfd828ecf172bf6dc38def62a4361f (patch)
treec5020df166e69b81c56ca1d5a91888d0d7b03f4c /cmake/libutils.cmake
parent74b1af19e9270a932f9e5f907eff53852984a7d3 (diff)
parent9c9d10b441fe79b111509949ca40afe1a6284c0f (diff)
downloadmariadb-git-1793646d78dfd828ecf172bf6dc38def62a4361f.tar.gz
Merge branch '5.5' into 10.0
Conflicts: plugin/server_audit/server_audit.c
Diffstat (limited to 'cmake/libutils.cmake')
-rw-r--r--cmake/libutils.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake
index 636737b2083..5125b9482cd 100644
--- a/cmake/libutils.cmake
+++ b/cmake/libutils.cmake
@@ -87,6 +87,11 @@ MACRO(CREATE_EXPORT_FILE VAR TARGET API_FUNCTIONS)
ENDFOREACH()
SET(CONTENT "${CONTENT} (void *)0\n}\;")
CONFIGURE_FILE_CONTENT(${CONTENT} ${EXPORTS})
+ # Avoid "function redeclared as variable" error
+ # when using gcc/clang option -flto(link time optimization)
+ IF(" ${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} " MATCHES " -flto")
+ SET_SOURCE_FILES_PROPERTIES(${EXPORTS} PROPERTIES COMPILE_FLAGS "-fno-lto")
+ ENDIF()
SET(${VAR} ${EXPORTS})
ENDIF()
ENDMACRO()