Christophe Favergeon | aa3cdc5 | 2019-09-25 11:31:39 +0200 | [diff] [blame] | 1 | # This is for building a library only |
| 2 | # It is similar to the config.cmake but ignoring anything related to the platform |
| 3 | # and boot code |
Christophe Favergeon | 02847ce | 2019-10-14 11:37:59 +0100 | [diff] [blame] | 4 | if(EXPERIMENTAL) |
| 5 | list(APPEND CMAKE_MODULE_PATH ${EXPROOT}) |
| 6 | include(experimental) |
| 7 | endif() |
Christophe Favergeon | aa3cdc5 | 2019-09-25 11:31:39 +0200 | [diff] [blame] | 8 | |
| 9 | |
| 10 | include(Toolchain/Tools) |
Christophe Favergeon | 512b148 | 2020-02-07 11:25:11 +0100 | [diff] [blame] | 11 | option(OPTIMIZED "Compile for speed" OFF) |
Christophe Favergeon | f5bafd1 | 2019-09-26 15:11:29 +0200 | [diff] [blame] | 12 | option(AUTOVECTORIZE "Prefer autovectorizable code to one using C intrinsics" OFF) |
Christophe Favergeon | aa3cdc5 | 2019-09-25 11:31:39 +0200 | [diff] [blame] | 13 | |
| 14 | enable_language(CXX C ASM) |
| 15 | |
| 16 | |
| 17 | # Otherwise there is a .obj on windows and it creates problems |
| 18 | # with armlink. |
| 19 | SET(CMAKE_C_OUTPUT_EXTENSION .o) |
| 20 | SET(CMAKE_CXX_OUTPUT_EXTENSION .o) |
| 21 | SET(CMAKE_ASM_OUTPUT_EXTENSION .o) |
| 22 | |
| 23 | include(configCore) |
| 24 | |
| 25 | |
| 26 | function(configLib project cmsisRoot) |
Christophe Favergeon | 890f760 | 2020-04-14 09:47:39 +0200 | [diff] [blame] | 27 | configcore(${project} ${cmsisRoot}) |
Christophe Favergeon | aa3cdc5 | 2019-09-25 11:31:39 +0200 | [diff] [blame] | 28 | #configplatformForLib(${project} ${cmsisRoot}) |
| 29 | SET(COREID ${COREID} PARENT_SCOPE) |
| 30 | endfunction() |
| 31 | |