Skip to content

Commit e1110cd

Browse files
committed
nicer cmake logic for windows override test
1 parent a9e9467 commit e1110cd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,13 +724,11 @@ if (MI_BUILD_TESTS)
724724
if(MI_BUILD_SHARED AND NOT (MI_TRACK_ASAN OR MI_DEBUG_TSAN OR MI_DEBUG_UBSAN))
725725
add_executable(mimalloc-test-stress-dynamic test/test-stress.c)
726726
target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE ${mi_defines} "USE_STD_MALLOC=1")
727-
if(WIN32)
728-
target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE "MI_LINK_VERSION=1")
729-
endif()
730727
target_compile_options(mimalloc-test-stress-dynamic PRIVATE ${mi_cflags})
731728
target_include_directories(mimalloc-test-stress-dynamic PRIVATE include)
732729
if(WIN32)
733-
target_link_libraries(mimalloc-test-stress-dynamic PRIVATE mimalloc ${mi_libraries}) # mi_version
730+
target_compile_definitions(mimalloc-test-stress-dynamic PRIVATE "MI_LINK_VERSION=1") # link mi_version
731+
target_link_libraries(mimalloc-test-stress-dynamic PRIVATE mimalloc ${mi_libraries}) # link mi_version
734732
add_test(NAME test-stress-dynamic COMMAND ${CMAKE_COMMAND} -E env MIMALLOC_VERBOSE=1 $<TARGET_FILE:mimalloc-test-stress-dynamic>)
735733
else()
736734
if(APPLE)

0 commit comments

Comments
 (0)