rtcore/CMakeLists.txt
2026-04-19 14:01:14 +02:00

17 lines
475 B
CMake

project(rtcore C)
set(CMAKE_C_STANDARD 99)
function(compile_opts target)
target_compile_options(${target} PRIVATE
$<IF:$<C_COMPILER_ID:GNU>,
-Wall -Wextra -Wpedantic, # -Wno-unused-parameter,
>
$<IF:$<C_COMPILER_ID:MSVC>,
/W4,
>)
set_target_properties(${target} PROPERTIES COMPILE_WARNING_AS_ERROR ON)
endfunction()
add_executable(rtcore_test rtcore_test.c rtcore.h)
compile_opts(rtcore_test)