Fix Windows rpmalloc compile flags

This commit is contained in:
Lukas W
2020-05-12 11:32:37 +02:00
parent dc95f07287
commit f5ecddbb1f

View File

@@ -1,5 +1,3 @@
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Wno-unused-variable")
add_library(rpmalloc STATIC
rpmalloc/rpmalloc/rpmalloc.c
rpmalloc/rpmalloc/rpmalloc.h
@@ -9,6 +7,14 @@ target_include_directories(rpmalloc PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/rpmalloc/rpmalloc
)
set_property(TARGET rpmalloc PROPERTY C_STANDARD 11)
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
target_compile_options(rpmalloc
PRIVATE -Wno-unused-variable
)
endif()
if (NOT LMMS_BUILD_WIN32)
target_compile_definitions(rpmalloc
PRIVATE -D_GNU_SOURCE