mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
cmake: remove -D prefix from COMPILE_DEFINITIONS property
Unlike COMPILE_OPTIONS, COMPILE_DEFINITIONS CMake property assumes values without the -D prefix, such as NAME or NAME=VAL. Previously, IDF build system was passing COMPILE_DEFINITIONS build property to CMake COMPILE_OPTIONS property, so -D prefix was not a problem. Now that COMPILE_DEFINITIONS CMake property is used, -D prefix has to be removed. (Note that this doesn't affect 'target_compile_definitions' function, which strips -D prefix before adding the definition to the property.)
This commit is contained in:
@@ -6,7 +6,7 @@ set(sources "pthread.c"
|
||||
idf_component_register(SRCS ${sources}
|
||||
INCLUDE_DIRS include)
|
||||
|
||||
idf_build_set_property(COMPILE_DEFINITIONS "-D_POSIX_READER_WRITER_LOCKS" APPEND)
|
||||
idf_build_set_property(COMPILE_DEFINITIONS "_POSIX_READER_WRITER_LOCKS" APPEND)
|
||||
|
||||
set(extra_link_flags "-u pthread_include_pthread_impl")
|
||||
list(APPEND extra_link_flags "-u pthread_include_pthread_cond_impl")
|
||||
|
Reference in New Issue
Block a user