mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-30 20:07:14 +00:00
fix: Update C code for compatibility with the MSVC compiler (#949)
* Replace VLA with malloc Replace VLA with malloc to make C code compatible with cl compiler on Windows. * Fix C code for CI compiler. * Fix C code compability to CI. * check the trigger
This commit is contained in:
@@ -2,4 +2,7 @@ add_executable(coin_change_greedy coin_change_greedy.c)
|
||||
add_executable(fractional_knapsack fractional_knapsack.c)
|
||||
add_executable(max_capacity max_capacity.c)
|
||||
add_executable(max_product_cutting max_product_cutting.c)
|
||||
target_link_libraries(max_product_cutting m)
|
||||
|
||||
if (NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
target_link_libraries(max_product_cutting m)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user