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)
17 add_subdirectory(blockdev)
18 add_subdirectory(demos/generic)
19 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL cortex-m4)
21 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL bf518)
22 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
24 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL avrxmega7)
25 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
27 elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL msp430g2210)
28 add_definitions(-DCONFIG_DEBUG_PRINTF=0)
29 add_definitions(-DCONFIG_DEBUG_ASSERT=0)
30 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=1)
33 #Generic example target
34 set(BLOCKDEV_TYPE linux)
35 add_definitions(-DCONFIG_EXTENT_FULL=1)
36 add_definitions(-DCONFIG_HAVE_OWN_OFLAGS=0)
37 add_definitions(-DCONFIG_HAVE_OWN_ERRNO=0)
38 add_definitions(-DCONFIG_HAVE_OWN_ASSERT=0)
39 add_definitions(-DCONFIG_BLOCK_DEV_CACHE_SIZE=16)
40 add_subdirectory(fs_test)
41 add_subdirectory(demos/generic)
44 add_subdirectory(blockdev)
47 add_subdirectory(lwext4)
48 #Detect all possible warnings for lwext4 target
49 set_target_properties(lwext4 PROPERTIES COMPILE_FLAGS "-Wall -Wextra -pedantic")
53 set(CPACK_PACKAGE_VERSION_MAJOR "0")
54 set(CPACK_PACKAGE_VERSION_MINOR "8")
55 set(CPACK_PACKAGE_VERSION_PATCH "0")
56 set(CPACK_SOURCE_GENERATOR "TBZ2")
57 set(CPACK_SOURCE_PACKAGE_FILE_NAME
58 "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
59 set(CPACK_SOURCE_IGNORE_FILES
63 add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)