mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-07-07 03:48:42 +03:00
fix compilation with C++, fix overrides in C++ to adhere to the spec (issue #26)
This commit is contained in:
parent
dd59a917ce
commit
c3528203b5
10 changed files with 133 additions and 35 deletions
|
@ -1,7 +1,8 @@
|
|||
cmake_minimum_required(VERSION 3.0)
|
||||
project(libmimalloc C)
|
||||
project(libmimalloc C CXX)
|
||||
include("cmake/mimalloc-config-version.cmake")
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
option(MI_OVERRIDE "Override the standard malloc interface" ON)
|
||||
option(MI_INTERPOSE "Use interpose to override standard malloc on macOS" ON)
|
||||
|
@ -76,6 +77,7 @@ endif()
|
|||
if(MI_USE_CXX MATCHES "ON")
|
||||
message(STATUS "Use the C++ compiler to compile (MI_USE_CXX=ON)")
|
||||
set_source_files_properties(${mi_sources} PROPERTIES LANGUAGE CXX )
|
||||
set_source_files_properties(src/static.c test/test-api.c PROPERTIES LANGUAGE CXX )
|
||||
endif()
|
||||
|
||||
# Compiler flags
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue