avr: Fix documentation for Bus
[avr-sim.git] / CMakeLists.txt
blobe24ad89d2af74ee1addfe6c7868640c6c0c16493
1 cmake_minimum_required(VERSION 2.6)
2 project( AVRSIM )
4 set( AVRSIM_VERSION "1.0" )
5 set( AVRSIM_APIVERSION "1.0" )
7 # Include necessary submodules
8 SET(CMAKE_MODULE_PATH
9         "${AVRSIM_SOURCE_DIR}/CMake"
10         "${AVRSIM_SOURCE_DIR}/CMake/Utils"
11         "${AVRSIM_SOURCE_DIR}/CMake/Packages"
14 include(MacroLogFeature)
16 if (NOT APPLE)
17           # Create debug libraries with _d postfix
18           set(CMAKE_DEBUG_POSTFIX "_d")
19 endif ()
21 option(AVRSIM_STATIC "Static build" FALSE)
22 option(AVRSIM_64BIT "64 bit" TRUE)
24 # Set compiler specific build flags
25 if (CMAKE_COMPILER_IS_GNUCXX)
26   if( AVRSIM_64BIT )
27     set( CMAKE_COMPILER_CPU -mtune=opteron -DCPU=ATHLON )
28   endif( AVRSIM_64BIT )
30   if( CMAKE_BUILD_TYPE STREQUAL "release" )
31     add_definitions( -O3 -DNDEBUG -fomit-frame-pointer -falign-functions=4 -fexpensive-optimizations -fschedule-insns2 -finline-functions -funroll-loops -mfpmath=sse -msse2 -msse -mmmx -frerun-cse-after-loop -frerun-loop-opt -fno-strict-aliasing )
32   endif( CMAKE_BUILD_TYPE STREQUAL "release" )
34   add_definitions( ${CMAKE_COMPILER_CPU} "-W -Wall -pipe -DLINUX -DUNIX -fexceptions -DHAVE_LONGLONG" )
36   set( CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -g2" )
37 endif ()
38 if (MSVC)
39 #  add_definitions(/fp:fast)
40 add_definitions(/D _CRT_SECURE_NO_WARNINGS /EHa)
41 endif ()
43 include(ConfigureBuild)
45 # Find dependencies
46 include(Dependencies)
48 # Customize what to build
49 option(AVRSIM_BUILD_APP "Build application" TRUE)
51 # Customize what to install
52 option(AVRSIM_INSTALL_HEADERS "Install header files" TRUE)
54 # Add include path
55 include_directories( ${AVRSIM_SOURCE_DIR}/src )
56 add_subdirectory( src )
57 set( AVRSIM_LIBRARIES avr-sim )