CMakeLists.txt 703 B

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 3.2)
  2. set(CMAKE_C_STANDARD 99)
  3. set(CMAKE_C_STANDARD_REQUIRED ON)
  4. set(CMAKE_C_EXTENSIONS OFF)
  5. if(MSVC)
  6. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4 /WX")
  7. else()
  8. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -pedantic-errors")
  9. endif()
  10. if(ZF_LOG_LIBRARY_PREFIX)
  11. add_definitions("-DZF_LOG_LIBRARY_PREFIX=${ZF_LOG_LIBRARY_PREFIX}")
  12. endif()
  13. add_executable(hello_c hello.c)
  14. target_link_libraries(hello_c zf_log)
  15. add_executable(custom_output custom_output.c)
  16. target_link_libraries(custom_output zf_log)
  17. add_executable(file_output file_output.c)
  18. target_link_libraries(file_output zf_log)
  19. add_executable(args_eval args_eval.c)
  20. target_link_libraries(args_eval zf_log)