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)