blob: 4a6c2a5af666b069d6e4bfae0449f18398a10b02 [file] [log] [blame]
Christophe Favergeon26c2f682019-09-06 14:43:32 +01001if(EXPERIMENTAL)
2list(APPEND CMAKE_MODULE_PATH ${EXPROOT})
3include(experimental)
4endif()
5
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02006include(Toolchain/Tools)
Christophe Favergeonec574202019-08-09 06:54:05 +01007SET(PLATFORMFOLDER ${ROOT}/CMSIS/DSP/Platforms/FVP)
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +02008option(OPTIMIZED "Compile for speed" ON)
9include(configPlatform)
10include(configBoot)
11include(configCore)
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020012
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020013define_property(TARGET
14 PROPERTY DISABLEOPTIMIZATION
15 BRIEF_DOCS "Force disabling of optimizations"
16 FULL_DOCS "Force disabling of optimizations")
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020017
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020018# Config core settings
19# Configure platform (semihosting etc ...)
20# May be required for some compiler
21function(disableOptimization project)
22 set_target_properties(${project} PROPERTIES DISABLEOPTIMIZATION ON)
23endfunction()
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020024
Christophe Favergeon6b604eb2019-05-17 13:46:33 +020025
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020026function(configLib project cmsisRoot)
27 configcore(${project} ${cmsisRoot})
28 configplatformForLib(${project} ${cmsisRoot})
29 SET(COREID ${COREID} PARENT_SCOPE)
30endfunction()
31
32# Config app
33function (configApp project cmsisRoot)
34 configcore(${project} ${cmsisRoot})
Christophe Favergeonec574202019-08-09 06:54:05 +010035 configboot(${project} ${cmsisRoot} ${PLATFORMFOLDER})
Christophe Favergeon3b2a0ee2019-06-12 13:29:14 +020036 set_platform_core()
37 core_includes(${project})
38 SET(PLATFORMID ${PLATFORMID} PARENT_SCOPE)
39 SET(COREID ${COREID} PARENT_SCOPE)
Christophe Favergeone0181322019-05-20 13:25:14 +020040endfunction()