github.com/moontrade/unsafe@v0.9.1/memory/rpmalloc/src/CMakeLists.txt (about)

     1  cmake_minimum_required(VERSION 3.18)
     2  project(rpmalloc C)
     3  
     4  set(CMAKE_C_STANDARD 11)
     5  
     6  if(UNIX AND NOT APPLE)
     7      set(LINUX TRUE)
     8  endif()
     9  
    10  if(APPLE)
    11  	set(CMAKE_C_FLAGS "-Ofast -fPIC")
    12  endif()
    13  if(LINUX)
    14      set(CMAKE_C_FLAGS "-Ofast -fPIC -D_GNU_SOURCE")
    15  endif()
    16  
    17  add_library(rpmalloc SHARED rpmalloc.c)