CMakeLists.txt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. cmake_minimum_required(VERSION 3.1)
  2. project(par)
  3. find_package(PkgConfig REQUIRED)
  4. pkg_search_module(CURL REQUIRED libcurl)
  5. set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "-std=c11 -Wall")
  6. set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++17 -Wvla -Wall")
  7. include_directories(.. . ${CURL_INCLUDE_DIRS})
  8. add_executable(
  9. test_strings
  10. console-colors.c
  11. test_strings.cpp)
  12. target_link_libraries(test_strings)
  13. add_executable(
  14. test_msquares
  15. test_msquares.c
  16. lz4.cpp
  17. lodepng.c
  18. sds.c
  19. whereami.c)
  20. target_link_libraries(test_msquares ${CURL_LIBRARIES})
  21. add_executable(
  22. test_bluenoise
  23. test_bluenoise.c
  24. lz4.cpp
  25. lodepng.c
  26. sds.c
  27. whereami.c)
  28. target_link_libraries(test_bluenoise ${CURL_LIBRARIES})
  29. add_executable(
  30. test_cpp
  31. test_cpp.cpp
  32. lz4.cpp
  33. lodepng.c
  34. sds.c
  35. whereami.c)
  36. target_link_libraries(test_cpp ${CURL_LIBRARIES})
  37. add_executable(
  38. test_c
  39. test_c.c
  40. lz4.cpp
  41. lodepng.c
  42. sds.c
  43. whereami.c)
  44. target_link_libraries(test_c ${CURL_LIBRARIES})
  45. add_executable(
  46. test_linkage
  47. test_linkage.cpp
  48. test_linkage.c
  49. lz4.cpp
  50. lodepng.c
  51. sds.c
  52. whereami.c)
  53. target_link_libraries(test_linkage ${CURL_LIBRARIES})
  54. add_executable(
  55. test_shapes
  56. test_shapes.c
  57. console-colors.c)
  58. target_link_libraries(test_shapes m)
  59. add_executable(
  60. test_bubbles
  61. test_bubbles.c
  62. console-colors.c)
  63. target_link_libraries(test_bubbles m)
  64. add_executable(
  65. test_filecache
  66. test_filecache.c
  67. console-colors.c)
  68. add_executable(
  69. test_filecache_lz4
  70. test_filecache_lz4.c
  71. console-colors.c)
  72. add_executable(
  73. test_sprune
  74. test_sprune.c
  75. console-colors.c)
  76. add_executable(
  77. test_octasphere
  78. test_octasphere.cpp
  79. console-colors.c)