summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2021-04-28 10:42:20 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2021-04-28 23:02:06 +0700
commite788738e18bd5cedb21f75b21f902f1bbcc34719 (patch)
treebce781641d8ef7008332a1bfa2272093a5a50bd8
parent24693c6fcf041f5ee7d5c9d3215094bde6da4bc8 (diff)
downloadmariadb-git-bb-10.2-MDEV-25543.tar.gz
MDEV-25543: Building failure on MacOS in case MariadDB server is compiled with XCode 12.5bb-10.2-MDEV-25543
Attempt to build MariaDB server on MacOS could result in compilation errors like the following one: In file included from server-10.2/storage/perfschema/cursor_by_account.cc:28: In file included from server-10.2/include/my_global.h:287: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/math.h:309: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/type_traits:418: server-10.2/version:1:1: error: expected unqualified-id MYSQL_VERSION_MAJOR=10 ^ server-10.2/build.dir/include/my_config.h:529:29: note: expanded from macro 'MYSQL_VERSION_MAJOR' This kind of compiler errors occur by the reson that compiler's system headers contain the directive '#include <version>' and a compiler is invoked with -I${CMAKE_SOURCE_DIR}. The MariaDB source code root directory contains the file VERSION that is handled by the compiler during processing the directive #include <version> since file names on MacOS are case insensetive, so version and VERSION is treated as the same file name. To fix the issue the source code root directory should be removed from a list of directories used by the compiler for include search path.
-rw-r--r--storage/perfschema/CMakeLists.txt3
1 files changed, 1 insertions, 2 deletions
diff --git a/storage/perfschema/CMakeLists.txt b/storage/perfschema/CMakeLists.txt
index e1839bc5b00..56083f24223 100644
--- a/storage/perfschema/CMakeLists.txt
+++ b/storage/perfschema/CMakeLists.txt
@@ -20,8 +20,7 @@
# along with this program; if not, write to the Free Software Foundation,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/include
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${CMAKE_BINARY_DIR}/sql
${PCRE_INCLUDES}