diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-01-20 22:32:31 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-01-20 22:32:31 +0100 |
commit | 3cb24fff33105f40c2f4b696a06449032ec09604 (patch) | |
tree | 4623802cde42a9debeae4fbd893e66522f1ffb6c /mysys/CMakeLists.txt | |
parent | c232b2023205b6b898448cb1f603b4d42a7a2656 (diff) | |
download | mariadb-git-3cb24fff33105f40c2f4b696a06449032ec09604.tar.gz |
- Always compile my_new.cc and safemalloc.c with mysys
Preprocessor macros USE_MYSYS_NEW and -DSAFEMALLOC are
used to conditionally compile safemalloc or overwritten new/delete.
-Define dummy symbol in my_new.cc in case -DUSE_MYSYS_NEW is not set.
This avoids compiler/linker warnings about an essentially empty file
being compiled.
Diffstat (limited to 'mysys/CMakeLists.txt')
-rw-r--r-- | mysys/CMakeLists.txt | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 329c132a9f1..c565f7f12d5 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -34,6 +34,7 @@ SET(MYSYS_SOURCES array.c charset-def.c charset.c checksum.c default.c rijndael.c sha1.c string.c thr_alarm.c thr_lock.c thr_mutex.c thr_rwlock.c tree.c typelib.c base64.c my_memmem.c my_getpagesize.c lf_alloc-pin.c lf_dynarray.c lf_hash.c + safemalloc.c my_new.cc my_atomic.c my_getncpus.c my_safehash.c my_chmod.c my_rnd.c my_uuid.c wqueue.c waiting_threads.c ma_dyncol.c my_rdtsc.c) @@ -46,15 +47,6 @@ IF(UNIX) SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_addr_resolve.c) ENDIF() -IF(NOT HAVE_CXX_NEW) - ADD_DEFINITIONS( -DUSE_MYSYS_NEW) - SET (MYSYS_SOURCES ${MYSYS_SOURCES} my_new.cc) -ENDIF() - -IF(WITH_SAFEMALLOC) - SET (MYSYS_SOURCES ${MYSYS_SOURCES} safemalloc.c) -ENDIF() - IF(HAVE_ALARM) SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_alarm.c) ENDIF() |