Fix Windows build after recent guardedalloc changes

This commit is contained in:
Brecht Van Lommel 2020-05-20 02:14:49 +02:00 committed by Brecht Van Lommel
parent e610964e89
commit 4f622c9a08
4 changed files with 16 additions and 2 deletions

View File

@ -53,6 +53,14 @@ if(WIN32 AND NOT UNIX)
mmap_win.h
)
list(APPEND INC_SYS
${PTHREADS_INC}
)
list(APPEND LIB
${PTHREADS_LIBRARIES}
)
endif()
# Jemalloc 5.0.0+ needs extra configuration.

View File

@ -58,6 +58,10 @@ setup_platform_linker_flags()
add_executable(makesdna ${SRC} ${SRC_DNA_INC})
if(WIN32 AND NOT UNIX)
target_link_libraries(makesdna ${PTHREADS_LIBRARIES})
endif()
# Output dna.c
add_custom_command(
OUTPUT

View File

@ -394,6 +394,10 @@ add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC})
target_link_libraries(makesrna bf_dna)
target_link_libraries(makesrna bf_dna_blenlib)
if(WIN32 AND NOT UNIX)
target_link_libraries(makesrna ${PTHREADS_LIBRARIES})
endif()
# Output rna_*_gen.c
# note (linux only): with crashes try add this after COMMAND: valgrind --leak-check=full --track-origins=yes
add_custom_command(

View File

@ -87,9 +87,7 @@ TEST(LockfreeLinkList, InsertMultipleConcurrent)
BLI_task_pool_push(pool, concurrent_insert, POINTER_FROM_INT(i), false, NULL);
}
/* Run all the tasks. */
BLI_threaded_malloc_begin();
BLI_task_pool_work_and_wait(pool);
BLI_threaded_malloc_end();
/* Verify we've got all the data properly inserted. */
EXPECT_EQ(list.head, &list.dummy_node);
bool *visited_nodes = (bool *)MEM_callocN(sizeof(bool) * num_nodes, "visited nodes");