cmake_minimum_required(VERSION 3.0)
cmake_policy(SET CMP0011 NEW)

include("${CMAKE_CURRENT_LIST_DIR}/megaAVR.cmake")

set(ATMEGA8_FLAGS "-D__AGILIB_CPU_AVR_megaAVR_ATmega8 -mmcu=atmega8")
set(__AGILIB_CPU                 "ATmega8")
set(__AGILIB_CPU_megaAVR_ATmega8 "TRUE")

set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} ${ATMEGA8_FLAGS}" CACHE STRING "")
set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   ${ATMEGA8_FLAGS}" CACHE STRING "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATMEGA8_FLAGS}" CACHE STRING "")

unset(ATMEGA8_FLAGS)
