diff options
author | Kent Boortz <kent.boortz@sun.com> | 2010-06-23 12:56:22 +0200 |
---|---|---|
committer | Kent Boortz <kent.boortz@sun.com> | 2010-06-23 12:56:22 +0200 |
commit | fb583cfaea30df93c99556f49b2712d3267770d9 (patch) | |
tree | b2cd2b82fccee5c18ade58e47b046eb1a6def8a9 | |
parent | cf9d4c456d8a40c6b824f1f5f420531e3935d7dc (diff) | |
download | mariadb-git-fb583cfaea30df93c99556f49b2712d3267770d9.tar.gz |
CMakeLists.txt
cmake/build_configurations/mysql_release.cmake
- Corrected spelling ENABLE_LOCAL_INFILE => ENABLED_LOCAL_INFILE
- In addition to "RelWithDebInfo", set target "Release" and "Debug"
- Set Debug flags
- Enabled SSL on Mac OS X
- For gcc builds, set RELEASE and DEBUG flags as well
- For g++ builds, added "-fno-implicit-templates"
- Use "-O" (gcc -O1) for optimized binaries, as "DEBUG" in out case
is more about enabling trace support to the server, no optimization
makes binaries too slow to be practical to reproduce problems
cmake/os/WindowsCache.cmake
- Removed unused HAVE_SYS_IOCTL
config.h.cmake
- Added header checks and missing defines
- Removed unused HAVE_SYS_IOCTL
- Grouped and uncommented some HAVE_* that are really not
defines, but internal variables used in the CMake setup,
- Added hard coded flags for HP-UX and Mac OS X
configure.cmake
- Added header checks and missing defines
- Removed unused HAVE_SYS_IOCTL
- "sys/dir.h" test needs "sys/types.h"
- Corrected syntax for "sys/ptem.h" test
- Don't exclude test for some types if Mac OS X, harmless
to do the test and we want the HAVE_<type> settings
- Added hard coded flags for HP-UX and Mac OS X
extra/yassl/CMakeLists.txt
extra/yassl/taocrypt/CMakeLists.txt
- Added missing source file "template_instnt.cpp"
-rwxr-xr-x | CMakeLists.txt | 4 | ||||
-rw-r--r-- | cmake/build_configurations/mysql_release.cmake | 111 | ||||
-rw-r--r-- | cmake/os/WindowsCache.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 39 | ||||
-rw-r--r-- | configure.cmake | 54 | ||||
-rwxr-xr-x | extra/yassl/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | extra/yassl/taocrypt/CMakeLists.txt | 1 |
7 files changed, 151 insertions, 61 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0131ac1b0a7..385686ab2e4 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,9 +144,9 @@ IF(WITH_ERROR_INJECT) SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DERROR_INJECT_SUPPORT") ENDIF() -OPTION(ENABLE_LOCAL_INFILE +OPTION(ENABLED_LOCAL_INFILE "If we should should enable LOAD DATA LOCAL by default" ${IF_WIN}) -MARK_AS_ADVANCED(ENABLE_LOCAL_INFILE) +MARK_AS_ADVANCED(ENABLED_LOCAL_INFILE) OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF) MARK_AS_ADVANCED(WITH_FAST_MUTEXES) diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 97de0965f6b..b4d3dfc1c17 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -80,7 +80,7 @@ IF(FEATURE_SET) ENDFOREACH() ENDIF() -OPTION(ENABLE_LOCAL_INFILE "" ON) +OPTION(ENABLED_LOCAL_INFILE "" ON) SET(WITH_SSL bundled CACHE STRING "") SET(WITH_ZLIB bundled CACHE STRING "") @@ -107,42 +107,53 @@ ENDIF() # Compiler options -IF(UNIX) +IF(UNIX) + + # Defaults if not set at all + + SET(OPT_FLG "-O") + SET(DBG_FLG "-g") + SET(COMMON_CFLAGS "") + SET(COMMON_CXXFLAGS "") + # Default GCC flags IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O3 -static-libgcc -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti") + SET(OPT_FLG "-O3") + SET(DBG_FLG "-O") + SET(COMMON_CFLAGS "-static-libgcc -g -fno-omit-frame-pointer") + SET(COMMON_CXXFLAGS "${COMMON_CFLAGS} -fno-implicit-templates -felide-constructors -fno-exceptions -fno-rtti") ENDIF() - # HPUX flags IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX") IF(CMAKE_C_COMPILER_ID MATCHES "HP") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64") - SET(CMAKE_C_FLAGS - "${CMAKE_C_FLAGS} +DD64 +DSitanium2 -mt -AC99") - SET(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} +DD64 +DSitanium2 -mt -Aa") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} +O2") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} +O2") + SET(OPT_FLG "+O2") + SET(DBG_FLG "+O0") + SET(COMMON_CFLAGS "+DD64 +DSitanium2 -mt -AC99") + SET(COMMON_CXXFLAGS "+DD64 +DSitanium2 -mt -Aa") ENDIF() ENDIF() - SET(WITH_SSL) + SET(WITH_SSL no) ENDIF() # Linux flags IF(CMAKE_SYSTEM_NAME MATCHES "Linux") IF(CMAKE_C_COMPILER_ID MATCHES "Intel") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-static-intel -static-libgcc -g -O3 -unroll2 -ip -mp -restrict -no-ftz -no-prefetch") + SET(OPT_FLG "-O3 -unroll2 -ip") + SET(DBG_FLG "") + SET(COMMON_CFLAGS "-static-intel -static-libgcc -g -mp -restrict -no-ftz -no-prefetch") + SET(COMMON_CXXFLAGS "-static-intel -static-libgcc -g -mp -restrict -no-ftz -no-prefetch") SET(WITH_SSL no) ENDIF() ENDIF() # OSX flags IF(APPLE) - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -Os -fno-common") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -Os -felide-constructors -fno-common") + SET(OPT_FLG "-Os") + SET(DBG_FLG "-O") + SET(COMMON_CFLAGS "-g -fno-common") + SET(COMMON_CXXFLAGS "-g -felide-constructors -fno-common") ENDIF() # Solaris flags @@ -152,38 +163,48 @@ IF(UNIX) SET(WITH_MYSQLD_LDFLAGS "-lmtmalloc" CACHE STRING "") ENDIF() IF(CMAKE_C_COMPILER_ID MATCHES "SunPro") + SET(DBG_FLG "") IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386") IF(CMAKE_SIZEOF_VOID_P EQUAL 4) - # Solaris x86 - SET(CMAKE_C_FLAGS_RELWITHDEBINFO - "-g -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "-g0 -xO2 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic") + # Solaris x86 + SET(OPT_FLG "-xO2") + ELSE() + # Solaris x86_64 + SET(OPT_FLG "-xO3") + ENDIF() + SET(COMMON_CFLAGS + "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") + SET(COMMON_CXXFLAGS + "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic") + ELSE() + IF(CMAKE_SIZEOF_VOID_P EQUAL 4) + # Solaris sparc 32 bit + SET(OPT_FLG "-xO3") + SET(COMMON_CFLAGS "-g -Xa -xstrconst -mt -xarch=sparc") + SET(COMMON_CXXFLAGS "-g0 -noex -mt -xarch=sparc") ELSE() - # Solaris x64 - SET(CMAKE_C_FLAGS_RELWITHDEBINFO - "-g -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO - "-g0 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -features=no%except -xlibmil -xlibmopt -xtarget=generic") - ENDIF() - ELSE() - IF(CMAKE_SIZEOF_VOID_P EQUAL 4) - # Solaris sparc 32 bit - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -xO3 -Xa -xstrconst -mt -xarch=sparc") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g0 -xO3 -noex -mt -xarch=sparc") - ELSE() - # Solaris sparc 64 bit - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -xO3 -Xa -xstrconst -mt") - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g0 -xO3 -noex -mt") - ENDIF() - ENDIF() + # Solaris sparc 64 bit + SET(OPT_FLG "-xO3") + SET(COMMON_CFLAGS "-g -Xa -xstrconst -mt") + SET(COMMON_CXXFLAGS "-g0 -noex -mt") + ENDIF() + ENDIF() ENDIF() ENDIF() - - IF(CMAKE_CXX_FLAGS_RELWITHDEBINFO) - SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" - CACHE STRING "Compile flags") - SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}" - CACHE STRING "Compile flags") - ENDIF() + + SET(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CXXFLAGS}" + CACHE STRING "Release type C++ compiler flags") + SET(CMAKE_C_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CFLAGS}" + CACHE STRING "Release type C compile flags") + + SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CXXFLAGS}" + CACHE STRING "Default/RelWithDebInfo type C++ compiler flags") + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CFLAGS}" + CACHE STRING "Default/RelWithDebInfo type C compiler flags") + + SET(CMAKE_CXX_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CXXFLAGS}" + CACHE STRING "Debug type C++ compiler flags") + SET(CMAKE_C_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CFLAGS}" + CACHE STRING "Debug type C compiler flags") + ENDIF() diff --git a/cmake/os/WindowsCache.cmake b/cmake/os/WindowsCache.cmake index 68b6f2a6ddf..dbf3f136b6e 100644 --- a/cmake/os/WindowsCache.cmake +++ b/cmake/os/WindowsCache.cmake @@ -263,7 +263,6 @@ SET(HAVE_SYS_DIR_H CACHE INTERNAL "") SET(HAVE_SYS_ERRLIST CACHE INTERNAL "") SET(HAVE_SYS_FILE_H CACHE INTERNAL "") SET(HAVE_SYS_FPU_H CACHE INTERNAL "") -SET(HAVE_SYS_IOCTL CACHE INTERNAL "") SET(HAVE_SYS_IOCTL_H CACHE INTERNAL "") SET(HAVE_SYS_IPC_H CACHE INTERNAL "") SET(HAVE_SYS_MALLOC_H CACHE INTERNAL "") diff --git a/config.h.cmake b/config.h.cmake index 7bef260cf4e..deb571ac5eb 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -22,11 +22,14 @@ #cmakedefine HAVE_ALLOCA_H 1 #cmakedefine HAVE_AIO_H 1 #cmakedefine HAVE_ARPA_INET_H 1 +#cmakedefine HAVE_ASM_MSR_H 1 +#cmakedefine HAVE_ASM_TERMBITS_H 1 #cmakedefine HAVE_BSEARCH 1 #cmakedefine HAVE_CRYPT_H 1 #cmakedefine HAVE_CURSES_H 1 #cmakedefine HAVE_CXXABI_H 1 #cmakedefine HAVE_NCURSES_H 1 +#cmakedefine HAVE_NDIR_H 1 #cmakedefine HAVE_DIRENT_H 1 #cmakedefine HAVE_DLFCN_H 1 #cmakedefine HAVE_EXECINFO_H 1 @@ -70,6 +73,7 @@ #cmakedefine HAVE_SYS_IPC_H 1 #cmakedefine HAVE_SYS_MALLOC_H 1 #cmakedefine HAVE_SYS_MMAN_H 1 +#cmakedefine HAVE_SYS_NDIR_H 1 #cmakedefine HAVE_SYS_PTE_H 1 #cmakedefine HAVE_SYS_PTEM_H 1 #cmakedefine HAVE_SYS_PRCTL_H 1 @@ -87,6 +91,7 @@ #cmakedefine HAVE_SYS_UN_H 1 #cmakedefine HAVE_SYS_VADVISE_H 1 #cmakedefine HAVE_TERM_H 1 +#cmakedefine HAVE_TERMBITS_H 1 #cmakedefine HAVE_TERMIOS_H 1 #cmakedefine HAVE_TERMIO_H 1 #cmakedefine HAVE_TERMCAP_H 1 @@ -98,6 +103,7 @@ #cmakedefine HAVE_SYS_UTIME_H 1 #cmakedefine HAVE_SYS_WAIT_H 1 #cmakedefine HAVE_SYS_PARAM_H 1 +#cmakedefine HAVE_XFS_XFS_H 1 /* Libraries */ #cmakedefine HAVE_LIBPTHREAD 1 @@ -130,9 +136,11 @@ #cmakedefine HAVE_BMOVE 1 #cmakedefine HAVE_BZERO 1 #cmakedefine HAVE_INDEX 1 +#cmakedefine HAVE_CHOWN 1 #cmakedefine HAVE_CLOCK_GETTIME 1 #cmakedefine HAVE_CRYPT 1 #cmakedefine HAVE_CUSERID 1 +#cmakedefine HAVE_CXX_NEW 1 #cmakedefine HAVE_DIRECTIO 1 #cmakedefine HAVE_DLERROR 1 #cmakedefine HAVE_DLOPEN 1 @@ -147,6 +155,7 @@ #cmakedefine HAVE_FPSETMASK 1 #cmakedefine HAVE_FSEEKO 1 #cmakedefine HAVE_FSYNC 1 +#cmakedefine HAVE_FTIME 1 #cmakedefine HAVE_GETADDRINFO 1 #cmakedefine HAVE_GETCWD 1 #cmakedefine HAVE_GETHOSTBYADDR_R 1 @@ -176,6 +185,8 @@ #cmakedefine HAVE_LOG2 1 #cmakedefine HAVE_LONGJMP 1 #cmakedefine HAVE_LSTAT 1 +#cmakedefine HAVE_MEMALIGN 1 +/* #cmakedefine HAVE_MLOCK 1 see Bug#54662 */ #cmakedefine HAVE_NPTL 1 #cmakedefine HAVE_NL_LANGINFO 1 #cmakedefine HAVE_MADVISE 1 @@ -196,6 +207,8 @@ #cmakedefine HAVE_PREAD 1 #cmakedefine HAVE_PAUSE_INSTRUCTION 1 #cmakedefine HAVE_FAKE_PAUSE_INSTRUCTION 1 +#cmakedefine HAVE_RDTSCLL 1 +#cmakedefine HAVE_READ_REAL_TIME 1 #cmakedefine HAVE_PTHREAD_ATTR_CREATE 1 #cmakedefine HAVE_PTHREAD_ATTR_GETSTACKSIZE 1 #cmakedefine HAVE_PTHREAD_ATTR_SETPRIO 1 @@ -240,6 +253,15 @@ #cmakedefine HAVE_SIGWAIT 1 #cmakedefine HAVE_SLEEP 1 #cmakedefine HAVE_SNPRINTF 1 +/* Some that currently are not real defines, internal to CMake setup */ +/* #cmakedefine HAVE_FCNTL_NONBLOCK 1 */ +/* #cmakedefine HAVE_FINITE_IN_MATH_H 1 */ +/* #cmakedefine HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 */ +/* #cmakedefine HAVE_SOCKADDR_STORAGE___SS_FAMILY 1 */ +/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_int 1 */ +/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_size_t 1 */ +/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_socklen_t */ +/* #cmakedefine HAVE_SOCKET_TIMEOUT */ #cmakedefine HAVE_STPCPY 1 #cmakedefine HAVE_STRERROR 1 #cmakedefine HAVE_STRCOLL 1 @@ -560,6 +582,23 @@ #cmakedefine HAVE_UCA_COLLATIONS 1 #cmakedefine HAVE_COMPRESS 1 +/* + Hard coded platform settings +*/ + +/* This is ugly, but we need lots of tweaks for HP-UX */ +#cmakedefine HPUX11 1 +#cmakedefine DO_NOT_REMOVE_THREAD_WRAPPERS 1 +#cmakedefine HAVE_BROKEN_PREAD 1 +#cmakedefine HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT 1 +#cmakedefine SNPRINTF_RETURN_TRUNC 1 +#cmakedefine _INCLUDE_LONGLONG 1 + +/* Mac OS X */ +#cmakedefine SIGNALS_DONT_BREAK_READ 1 +#cmakedefine IGNORE_SIGHUP_SIGQUIT 1 +#cmakedefine _P1003_1B_VISIBLE 1 +#cmakedefine DONT_DECLARE_CXA_PURE_VIRTUAL 1 /* Stuff that always need to be defined (compile breaks without it) diff --git a/configure.cmake b/configure.cmake index 462e359ee7d..941273bce93 100644 --- a/configure.cmake +++ b/configure.cmake @@ -202,6 +202,7 @@ CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H) CHECK_INCLUDE_FILES (locale.h HAVE_LOCALE_H) CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) CHECK_INCLUDE_FILES (memory.h HAVE_MEMORY_H) +CHECK_INCLUDE_FILES (ndir.h HAVE_NDIR_H) CHECK_INCLUDE_FILES (netinet/in.h HAVE_NETINET_IN_H) CHECK_INCLUDE_FILES (paths.h HAVE_PATHS_H) CHECK_INCLUDE_FILES (port.h HAVE_PORT_H) @@ -210,7 +211,8 @@ CHECK_INCLUDE_FILES (pwd.h HAVE_PWD_H) CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H) CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H) CHECK_INCLUDE_FILES (semaphore.h HAVE_SEMAPHORE_H) -CHECK_INCLUDE_FILES (sys/dir.h HAVE_SYS_DIR_H) +CHECK_INCLUDE_FILES ("sys/types.h;sys/dir.h" HAVE_SYS_DIR_H) +CHECK_INCLUDE_FILES (sys/ndir.h HAVE_SYS_NDIR_H) CHECK_INCLUDE_FILES (sys/pte.h HAVE_SYS_PTE_H) CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H) CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H) @@ -236,6 +238,8 @@ CHECK_INCLUDE_FILES (sys/stream.h HAVE_SYS_STREAM_H) CHECK_INCLUDE_FILES (sys/termcap.h HAVE_SYS_TERMCAP_H) CHECK_INCLUDE_FILES ("time.h;sys/timeb.h" HAVE_SYS_TIMEB_H) CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H) +CHECK_INCLUDE_FILES (asm/termbits.h HAVE_ASM_TERMBITS_H) +CHECK_INCLUDE_FILES (termbits.h HAVE_TERMBITS_H) CHECK_INCLUDE_FILES (termios.h HAVE_TERMIOS_H) CHECK_INCLUDE_FILES (termio.h HAVE_TERMIO_H) CHECK_INCLUDE_FILES (termcap.h HAVE_TERMCAP_H) @@ -249,11 +253,15 @@ CHECK_INCLUDE_FILES (sys/param.h HAVE_SYS_PARAM_H) CHECK_INCLUDE_FILES (sys/vadvise.h HAVE_SYS_VADVISE_H) CHECK_INCLUDE_FILES (fnmatch.h HAVE_FNMATCH_H) CHECK_INCLUDE_FILES (stdarg.h HAVE_STDARG_H) -CHECK_INCLUDE_FILES("stdlib.h;sys/un.h" HAVE_SYS_UN_H) +CHECK_INCLUDE_FILES ("stdlib.h;sys/un.h" HAVE_SYS_UN_H) +CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H) +CHECK_INCLUDE_FILES (wchar.h HAVE_WCHAR_H) +CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H) +CHECK_INCLUDE_FILES (xfs/xfs.h HAVE_XFS_XFS_H) IF(HAVE_SYS_STREAM_H) # Needs sys/stream.h on Solaris - CHECK_INCLUDE_FILES (sys/stream.h sys/ptem.h HAVE_SYS_PTEM_H) + CHECK_INCLUDE_FILES ("sys/stream.h;sys/ptem.h" HAVE_SYS_PTEM_H) ELSE() CHECK_INCLUDE_FILES (sys/ptem.h HAVE_SYS_PTEM_H) ENDIF() @@ -495,14 +503,15 @@ IF(HAVE_STDINT_H) SET(CMAKE_EXTRA_INCLUDE_FILES stdint.h) ENDIF(HAVE_STDINT_H) -IF(NOT APPLE) - # Prevent some checks on OSX, they return ambigious results - # on universal 32/64 bit binariess - MY_CHECK_TYPE_SIZE("void *" VOIDP) - MY_CHECK_TYPE_SIZE("char *" CHARP) - MY_CHECK_TYPE_SIZE(long LONG) - MY_CHECK_TYPE_SIZE(size_t SIZE_T) -ENDIF() +# These first four SIZE_* values are not really used on Mac OS X, +# as we only know at comile time what architecture to build for, +# see "config.h.cmake". But as same macro MY_CHECK_TYPE_SIZE also +# sets HAVE_* macros, we run the check here, doesn't hurt. +MY_CHECK_TYPE_SIZE("void *" VOIDP) +MY_CHECK_TYPE_SIZE("char *" CHARP) +MY_CHECK_TYPE_SIZE(long LONG) +MY_CHECK_TYPE_SIZE(size_t SIZE_T) + MY_CHECK_TYPE_SIZE(char CHAR) MY_CHECK_TYPE_SIZE(short SHORT) MY_CHECK_TYPE_SIZE(int INT) @@ -750,7 +759,6 @@ IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC) ENDIF() CHECK_SYMBOL_EXISTS(tcgetattr "termios.h" HAVE_TCGETATTR 1) -CHECK_INCLUDE_FILES(sys/ioctl.h HAVE_SYS_IOCTL 1) # # Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) @@ -1040,3 +1048,25 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN) SET(SPRINTF_RETURNS_INT 1) +#-------------------------------------------------------------------- +# Hard coded platform settings +#-------------------------------------------------------------------- + +# This is ugly, but we need lots of tweaks for HP-UX +IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX") + SET(HPUX11 1) + SET(DO_NOT_REMOVE_THREAD_WRAPPERS 1) + SET(HAVE_BROKEN_PREAD 1) + SET(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT 1) + SET(NO_FCNTL_NONBLOCK 1) # Set conditionally in code above + SET(SNPRINTF_RETURN_TRUNC 1) + SET(_INCLUDE_LONGLONG 1) +ENDIF() + +IF(APPLE) + SET(DONT_DECLARE_CXA_PURE_VIRTUAL 1) + SET(IGNORE_SIGHUP_SIGQUIT 1) + SET(SIGNALS_DONT_BREAK_READ 1) + SET(SIGNAL_WITH_VIO_CLOSE 1) # FIXME better handled in mysql-trunk + SET(_P1003_1B_VISIBLE 1) +ENDIF() diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index 82d7e5b7581..63eabb45824 100755 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -28,7 +28,7 @@ ${CMAKE_CXX_FLAGS}) ENDIF() SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp - src/yassl_imp.cpp src/yassl_int.cpp) + src/yassl_imp.cpp src/yassl_int.cpp src/template_instnt.cpp) ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES}) RESTRICT_SYMBOL_EXPORTS(yassl) diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt index 2c43756b6f4..9417dda4095 100755 --- a/extra/yassl/taocrypt/CMakeLists.txt +++ b/extra/yassl/taocrypt/CMakeLists.txt @@ -21,6 +21,7 @@ ADD_DEFINITIONS(${SSL_DEFINES}) SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp + src/template_instnt.cpp include/aes.hpp include/algebra.hpp include/arc4.hpp include/asn.hpp include/block.hpp include/coding.hpp include/des.hpp include/dh.hpp include/dsa.hpp include/dsa.hpp include/error.hpp include/file.hpp include/hash.hpp include/hmac.hpp include/integer.hpp |