2 cmake_minimum_required(VERSION 2.8)
5 include_directories(lwext4)
6 include_directories(blockdev/filedev)
7 include_directories(blockdev/filedev_win)
9 set(BLOCKDEV_TYPE none)
12 if (CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m0)
14 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m3)
16 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL arm-sim)
18 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m4)
20 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL bf518)
21 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
23 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL avrxmega7)
24 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
26 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL msp430g2210)
27 add_definitions(-DCONFIG_DEBUG_PRINTF=0)
28 add_definitions(-DCONFIG_DEBUG_ASSERT=0)
29 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
32 #Generic example target
33 set(BLOCKDEV_TYPE linux)
34 add_definitions(-DCONFIG_EXTENT_FULL=1)
35 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=0)
36 add_definitions(-DCONFIG_HAVE_OWN_ERRNO=0)
37 add_definitions(-DCONFIG_HAVE_OWN_ASSERT=0)
38 add_definitions(-DCONFIG_BLOCK_DEV_CACHE_SIZE=16)
39 add_subdirectory(fs_test)
42 add_subdirectory(blockdev)
45 add_subdirectory(lwext4)
46 #Detect all possible warnings for lwext4 target
47 set_target_properties(lwext4 PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic")
51 set(CPACK_PACKAGE_VERSION_MAJOR "0")
52 set(CPACK_PACKAGE_VERSION_MINOR "8")
53 set(CPACK_PACKAGE_VERSION_PATCH "0")
54 set(CPACK_SOURCE_GENERATOR "TBZ2")
55 set(CPACK_SOURCE_PACKAGE_FILE_NAME
56 "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
57 set(CPACK_SOURCE_IGNORE_FILES
61 add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)