hello-algo/codes/c/chapter_greedy/CMakeLists.txt
Yudong Jin f7c41b6bef
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
2023-11-17 00:29:54 +08:00

8 lines
319 B
CMake

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)
if (NOT CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_link_libraries(max_product_cutting m)
endif()