@@ -13,14 +13,14 @@ endif()
13
13
project (mbed-os)
14
14
15
15
# Add all paths to the list files within Mbed OS
16
- list (APPEND CMAKE_MODULE_PATH
16
+ list (APPEND CMAKE_MODULE_PATH
17
17
"${mbed-os_SOURCE_DIR}/platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM/TARGET_TFM_LATEST/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_Cypress/scripts;${mbed-os_SOURCE_DIR}/targets/TARGET_NXP/scripts"
18
18
)
19
19
20
20
option (BUILD_TESTING "Run unit tests only." OFF )
21
21
22
22
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
23
- include (CTest)
23
+ include (CTest)
24
24
add_subdirectory (UNITTESTS)
25
25
endif ()
26
26
@@ -68,19 +68,19 @@ if(${CMAKE_CROSSCOMPILING})
68
68
"Invalid printf library type '${MBED_PRINTF_LIB} '. Possible values:\n ${MBED_PRINTF_LIB_TYPES} "
69
69
)
70
70
endif ()
71
-
71
+
72
72
mbed_set_cpu_core_definitions(mbed-core)
73
73
if (${MBED_TOOLCHAIN_FILE_USED} )
74
74
mbed_set_profile_options(mbed-core ${MBED_TOOLCHAIN} )
75
75
mbed_set_c_lib(mbed-core ${MBED_C_LIB} )
76
76
mbed_set_printf_lib(mbed-core ${MBED_PRINTF_LIB} )
77
-
77
+
78
78
target_compile_features (mbed-core
79
79
INTERFACE
80
80
c_std_11
81
81
cxx_std_14
82
82
)
83
-
83
+
84
84
endif ()
85
85
86
86
target_compile_definitions (mbed-core
@@ -98,7 +98,7 @@ if(${CMAKE_CROSSCOMPILING})
98
98
endif ()
99
99
100
100
# We need to generate a "response file" to pass to the C preprocessor when we preprocess the linker
101
- # script, because of path le ngth limitations on Windows. We set the response file and bind the path
101
+ # script, because of path length limitations on Windows. We set the response file and bind the path
102
102
# to a global property here. The MBED_TARGET being built queries this global property when it sets
103
103
# the linker script.
104
104
#
@@ -110,7 +110,7 @@ if(${CMAKE_CROSSCOMPILING})
110
110
# using response files or global properties.
111
111
mbed_generate_options_for_linker(mbed-core RESPONSE_FILE_PATH)
112
112
set_property (GLOBAL PROPERTY COMPILE_DEFS_RESPONSE_FILE ${RESPONSE_FILE_PATH} )
113
-
113
+
114
114
# Add compile definitions for backward compatibility with the toolchain
115
115
# supported. New source files should instead check for __GNUC__ and __clang__
116
116
# for the GCC_ARM and ARM toolchains respectively.
@@ -164,7 +164,7 @@ if(${CMAKE_CROSSCOMPILING})
164
164
string (TOLOWER ${MBED_TARGET} MBED_TARGET_CONVERTED)
165
165
string (REPLACE "_" "-" MBED_TARGET_CONVERTED ${MBED_TARGET_CONVERTED} )
166
166
string (PREPEND MBED_TARGET_CONVERTED "mbed-" )
167
-
167
+
168
168
target_link_libraries (mbed-core INTERFACE ${MBED_TARGET_CONVERTED} )
169
169
endif ()
170
170
0 commit comments