Define simple configuration on INI files.
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

46 satır
892 B

  1. cmake_minimum_required(VERSION 3.24)
  2. project(ini-config C)
  3. set(CMAKE_C_STANDARD 11)
  4. include(CTest)
  5. include_directories(
  6. "${CMAKE_HOME_DIRECTORY}/subprojects/minIni/dev"
  7. )
  8. add_library(
  9. ini-config STATIC
  10. source/ini-config.c
  11. source/ini-config.h
  12. source/types/int.c
  13. source/types/int.h
  14. source/types/string.c
  15. source/types/string.h
  16. )
  17. add_executable(
  18. test-int
  19. subprojects/minIni/dev/minIni.h
  20. subprojects/minIni/dev/minIni.c
  21. tests/test-int.c
  22. source/ini-config.c
  23. source/ini-config.h
  24. source/types/int.c
  25. source/types/int.h
  26. )
  27. set_target_properties (test-int PROPERTIES RUNTIME_OUTPUT_DIRECTORY tests)
  28. add_test(
  29. NAME test-int
  30. COMMAND test-int
  31. WORKING_DIRECTORY tests
  32. )
  33. add_custom_command(
  34. TARGET test-int POST_BUILD
  35. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  36. "${CMAKE_HOME_DIRECTORY}/fixtures/test-int.ini"
  37. $<TARGET_FILE_DIR:test-int>
  38. )