CMakeLists.txt 586 B

1234567891011121314
  1. cmake_minimum_required(VERSION 3.20)
  2. project(zcode_runtime_host LANGUAGES CXX)
  3. set(CMAKE_CXX_STANDARD 17)
  4. set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
  5. add_executable(zcode-runtime-host main.cpp)
  6. add_executable(zcode-runtime-host-acceptance EXCLUDE_FROM_ALL acceptance.cpp)
  7. foreach(target zcode-runtime-host zcode-runtime-host-acceptance)
  8. if(MSVC)
  9. target_compile_options(${target} PRIVATE /W4 /utf-8)
  10. else()
  11. target_compile_options(${target} PRIVATE -Wall -Wextra)
  12. target_link_options(${target} PRIVATE -municode -static)
  13. endif()
  14. endforeach()