diff options
author | Tamir Duberstein <tamird@gmail.com> | 2017-04-06 13:54:49 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2017-04-06 14:09:13 -0700 |
commit | 107c5f6a60e94c3cf478ee25e50164fd31b014b0 (patch) | |
tree | 2bb9ceae01b7d06be6dd4d05e829d036888e80f0 /CMakeLists.txt | |
parent | d2dce5611ab4b9a671ef518f648adf84d49e5356 (diff) |
CMake: more MinGW fixes
Summary:
siying this is a resubmission of #2081 with the 4th commit fixed. From that commit message:
> Note that the previous use of quotes in PLATFORM_{CC,CXX}FLAGS was
incorrect and caused GCC to produce the incorrect define:
>
> #define ROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE 1
>
> This was the cause of the Linux build failure on the previous version
of this change.
I've tested this locally, and the Linux build succeeds now.
Closes https://github.com/facebook/rocksdb/pull/2097
Differential Revision: D4839964
Pulled By: siying
fbshipit-source-id: cc51322
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e8ca64d54..32c52a256 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,20 +41,19 @@ endif() list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") -if(WIN32) +if(MSVC) include(${CMAKE_CURRENT_SOURCE_DIR}/thirdparty.inc) else() option(WITH_JEMALLOC "build with JeMalloc" OFF) + if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + # FreeBSD has jemaloc as default malloc + set(WITH_JEMALLOC ON) + endif() if(WITH_JEMALLOC) find_package(JeMalloc REQUIRED) - add_definitions(-DROCKSDB_JEMALLOC) + add_definitions(-DROCKSDB_JEMALLOC -DJEMALLOC_NO_DEMANGLE) include_directories(${JEMALLOC_INCLUDE_DIR}) endif() - if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") - # FreeBSD has jemaloc as default malloc - add_definitions(-DROCKSDB_JEMALLOC) - set(WITH_JEMALLOC ON) - endif() option(WITH_SNAPPY "build with SNAPPY" OFF) if(WITH_SNAPPY) find_package(snappy REQUIRED) |