cmake_minimum_required(VERSION 3.5)
project(Candland)
add_executable(candyland candyland.cpp)
set_target_properties(candyland PROPERTIES CXX_STANDARD 20)
set_target_properties(candyland PROPERTIES CXX_STANDARD_REQUIRED TRUE)

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
    target_compile_options(candyland PRIVATE
        -Wall
        -Wextra
        -Wpedantic
        -Wshadow
        -Wnon-virtual-dtor
        -Wold-style-cast
        -Wcast-align
        -Wunused
        -Woverloaded-virtual
        # -Wconversion
        -Wnull-dereference
        -Wdouble-promotion
        -Wformat=2
    )
endif()
