config.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. include(CMakePrintHelpers)
  2. include(configLib)
  3. SET(PLATFORMFOLDER ${ROOT}/CMSIS/DSP/Platforms/FVP)
  4. include(configPlatform)
  5. include(configBoot)
  6. define_property(TARGET
  7. PROPERTY DISABLEOPTIMIZATION
  8. BRIEF_DOCS "Force disabling of optimizations"
  9. FULL_DOCS "Force disabling of optimizations")
  10. define_property(TARGET
  11. PROPERTY DISABLEHALFFLOATSUPPORT
  12. BRIEF_DOCS "Force disabling of f16 support"
  13. FULL_DOCS "Force disabling of f16 support")
  14. # Config core settings
  15. # Configure platform (semihosting etc ...)
  16. # May be required for some compiler
  17. function(disableOptimization project)
  18. set_target_properties(${project} PROPERTIES DISABLEOPTIMIZATION ON)
  19. endfunction()
  20. function(disableHasfFloat project)
  21. set_target_properties(${project} PROPERTIES DISABLEHALFFLOATSUPPORT ON)
  22. endfunction()
  23. # Config app
  24. function (configApp project cmsisRoot)
  25. # When the C compiler is used to process ASM files, the fp16 option
  26. # is not always recognized.
  27. # So, FP16 option is ignored when building boot code
  28. # which is containing ASM
  29. disableHasfFloat(${project})
  30. configcore(${project} ${cmsisRoot})
  31. configboot(${project} ${cmsisRoot} ${PLATFORMFOLDER})
  32. set_platform_core()
  33. core_includes(${project})
  34. SET(PLATFORMID ${PLATFORMID} PARENT_SCOPE)
  35. SET(COREID ${COREID} PARENT_SCOPE)
  36. endfunction()