diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-02-25 22:58:57 +0300 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-02-25 22:58:57 +0300 |
commit | accce6be6eba077aaa538c8b0f4d1a839d08abe6 (patch) | |
tree | 4b3b3b110f6d30f408577b12710f0925376eb883 /cmake | |
parent | a98481354e99f4bd27ca91e74518999eb5dee359 (diff) | |
parent | 49e7114fdb3520462a40f22d17f267686a5f1f3f (diff) | |
download | mariadb-git-accce6be6eba077aaa538c8b0f4d1a839d08abe6.tar.gz |
Auto-merge from mysql-next-mr.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Makefile.am | 3 | ||||
-rw-r--r-- | cmake/build_configurations/mysql_release.cmake | 2 | ||||
-rw-r--r-- | cmake/configure.pl | 49 | ||||
-rw-r--r-- | cmake/cpack_source_ignore_files.cmake | 40 | ||||
-rw-r--r-- | cmake/dtrace.cmake | 25 | ||||
-rwxr-xr-x | cmake/install_layout.cmake | 2 | ||||
-rw-r--r-- | cmake/mysql_version.cmake | 12 | ||||
-rw-r--r-- | cmake/os/SunOS.cmake | 2 |
8 files changed, 116 insertions, 19 deletions
diff --git a/cmake/Makefile.am b/cmake/Makefile.am index 86244a526c1..6fe1a9556be 100644 --- a/cmake/Makefile.am +++ b/cmake/Makefile.am @@ -1,5 +1,6 @@ EXTRA_DIST = \ cmake_parse_arguments.cmake \ + cpack_source_ignore_files.cmake \ package_name.cmake \ configurable_file_content.in \ check_minimal_version.cmake \ @@ -25,7 +26,7 @@ EXTRA_DIST = \ mysql_add_executable.cmake \ install_layout.cmake \ build_configurations/mysql_release.cmake \ - os/Windows.cmake \ + os/Windows.cmake \ os/WindowsCache.cmake \ os/Linux.cmake \ os/SunOS.cmake \ diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 6834f006b6b..450ef9826c2 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -80,6 +80,8 @@ IF(FEATURE_SET) ENDFOREACH() ENDIF() +SET(WITHOUT_AUDIT_NULL ON CACHE BOOL "") +SET(WITHOUT_DAEMON_EXAMPLE ON CACHE BOOL "") OPTION(ENABLE_LOCAL_INFILE "" ON) SET(WITH_SSL bundled CACHE STRING "") diff --git a/cmake/configure.pl b/cmake/configure.pl index 52c57011ce0..7f21810a8f2 100644 --- a/cmake/configure.pl +++ b/cmake/configure.pl @@ -38,12 +38,55 @@ sub set_installdir } } +# CMake understands CC and CXX env.variables correctly, if they contain 1 or 2 tokens +# e.g CXX=gcc and CXX="ccache gcc" are ok. However it could have a problem if there +# (recognizing gcc) with more tokens ,e.g CXX="ccache gcc --pipe". +# The problem is simply fixed by splitting compiler and flags, e.g +# CXX="ccache gcc --pipe" => CXX=ccache gcc CXXFLAGS=--pipe + +sub check_compiler +{ + my ($varname, $flagsvarname) = @_; + my @tokens = split(/ /,$ENV{$varname}); + if($#tokens >= 2) + { + $ENV{$varname} = $tokens[0]." ".$tokens[1]; + my $flags; + + for(my $i=2; $i<=$#tokens; $i++) + { + $flags= $flags." ".$tokens[$i]; + } + if(defined $ENV{$flagsvarname}) + { + $flags = $flags." ".$ENV{$flagsvarname}; + } + $ENV{$flagsvarname}=$flags; + print("$varname=$ENV{$varname}\n"); + print("$flagsvarname=$ENV{$flagsvarname}\n"); + } +} + +check_compiler("CC", "CFLAGS"); +check_compiler("CXX", "CXXFLAGS"); + foreach my $option (@ARGV) { - if (substr ($option, 0, 2) == "--") + if (substr ($option, 0, 2) eq "--") { $option = substr($option, 2); } + else + { + # This must be environment variable + my @v = split('=', $option); + my $name = shift(@v); + if(@v) + { + $ENV{$name} = join('=', @v); + } + next; + } if($option =~ /srcdir/) { $srcdir = substr($option,7); @@ -87,12 +130,12 @@ foreach my $option (@ARGV) } if($option =~ /with-ssl=/) { - $cmakeargs = $cmakeargs." -DWITH_SSL=bundled"; + $cmakeargs = $cmakeargs." -DWITH_SSL=yes"; next; } if($option =~ /with-ssl/) { - $cmakeargs = $cmakeargs." -DWITH_SSL=yes"; + $cmakeargs = $cmakeargs." -DWITH_SSL=bundled"; next; } if($option =~ /prefix=/) diff --git a/cmake/cpack_source_ignore_files.cmake b/cmake/cpack_source_ignore_files.cmake new file mode 100644 index 00000000000..5eef20dccc6 --- /dev/null +++ b/cmake/cpack_source_ignore_files.cmake @@ -0,0 +1,40 @@ +SET(CPACK_SOURCE_IGNORE_FILES +\\\\.bzr/ +\\\\.bzr-mysql +\\\\.bzrignore +CMakeCache\\\\.txt +cmake_dist\\\\.cmake +CPackSourceConfig\\\\.cmake +CPackConfig.cmake +/cmake_install\\\\.cmake +/CTestTestfile\\\\.cmake +/CMakeFiles/ +/version_resources/ +/_CPack_Packages/ +$\\\\.gz +$\\\\.zip +/CMakeFiles/ +/version_resources/ +/_CPack_Packages/ +scripts/make_binary_distribution$ +scripts/msql2mysql$ +scripts/mysql_config$ +scripts/mysql_convert_table_format$ +scripts/mysql_find_rows$ +scripts/mysql_fix_extensions$ +scripts/mysql_install_db$ +scripts/mysql_secure_installation$ +scripts/mysql_setpermission$ +scripts/mysql_zap$ +scripts/mysqlaccess$ +scripts/mysqld_multi$ +scripts/mysqld_safe$ +scripts/mysqldumpslow$ +scripts/mysqlhotcopy$ +Makefile$ +include/config\\\\.h$ +include/my_config\\\\.h$ +/autom4te\\\\.cache/ +errmsg\\\\.sys$ +# +) diff --git a/cmake/dtrace.cmake b/cmake/dtrace.cmake index f110e2ab32c..d5566d03913 100644 --- a/cmake/dtrace.cmake +++ b/cmake/dtrace.cmake @@ -72,8 +72,29 @@ IF(ENABLE_DTRACE) ) ENDIF() +IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCXX + AND CMAKE_SIZEOF_VOID_P EQUAL 4) + IF(NOT DEFINED BUGGY_GCC_NO_DTRACE_MODULES) + EXECUTE_PROCESS( + COMMAND ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1} --version + OUTPUT_VARIABLE out) + IF(out MATCHES "3.4.6") + # This gcc causes crashes in dlopen() for dtraced shared libs, + # while standard shipped with Solaris10 3.4.3 is ok + SET(BUGGY_GCC_NO_DTRACE_MODULES 1 CACHE INTERNAL "") + ELSE() + SET(BUGGY_GCC_NO_DTRACE_MODULES 0 CACHE INTERNAL "") + ENDIF() + ENDIF() +ENDIF() -MACRO(DTRACE_INSTRUMENT target) +FUNCTION(DTRACE_INSTRUMENT target) + IF(BUGGY_GCC_NO_DTRACE_MODULES) + GET_TARGET_PROPERTY(target_type ${target} TYPE) + IF(target_type MATCHES "MODULE_LIBRARY") + RETURN() + ENDIF() + ENDIF() IF(ENABLE_DTRACE) ADD_DEPENDENCIES(${target} gen_dtrace_header) @@ -119,7 +140,7 @@ MACRO(DTRACE_INSTRUMENT target) ENDIF() ENDIF() ENDIF() -ENDMACRO() +ENDFUNCTION() # Ugly workaround for Solaris' DTrace inability to use probes diff --git a/cmake/install_layout.cmake b/cmake/install_layout.cmake index 7a0d34d6a17..92eebebd4e2 100755 --- a/cmake/install_layout.cmake +++ b/cmake/install_layout.cmake @@ -80,7 +80,7 @@ ENDIF() SET(INSTALL_LIBDIR_STANDALONE "lib") SET(INSTALL_INCLUDEDIR_STANDALONE "include") SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin") - SET(INSTALL_DOCDIR_STANDALONE "doc") + SET(INSTALL_DOCDIR_STANDALONE "docs") SET(INSTALL_MANDIR_STANDALONE "man") SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share") SET(INSTALL_SHAREDIR_STANDALONE "share") diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index d9f6b777536..3a61bcf40ab 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -108,17 +108,7 @@ IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME) ENDIF() SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc") SET(CPACK_SOURCE_GENERATOR "TGZ") -SET(CPACK_SOURCE_IGNORE_FILES - \\\\.bzr/ - \\\\.bzr-mysql - .bzrignore - CMakeCache.txt - /CMakeFiles/ - /version_resources/ - /_CPack_Packages/ - $.gz - $.zip -) +INCLUDE(cpack_source_ignore_files) # Defintions for windows version resources SET(PRODUCTNAME "MySQL Server") diff --git a/cmake/os/SunOS.cmake b/cmake/os/SunOS.cmake index 84ac64d8af3..e932e6c2b74 100644 --- a/cmake/os/SunOS.cmake +++ b/cmake/os/SunOS.cmake @@ -30,7 +30,7 @@ SET(LIBM m) # CMake defined -lthread as thread flag. This crashes in dlopen # when trying to load plugins workaround with -lpthread -SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "") +SET(CMAKE_THREADS_LIBS_INIT -lpthread CACHE INTERNAL "" FORCE) # Solaris specific large page support CHECK_SYMBOL_EXISTS(MHA_MAPSIZE_VA sys/mman.h HAVE_DECL_MHA_MAPSIZE_VA) |