Add comments explaining include paths
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
280165c9b3
commit
76dd3aa5bb
4 changed files with 16 additions and 0 deletions
|
@ -192,6 +192,11 @@ if(USE_SHARED_MBEDTLS_LIBRARY)
|
|||
endif(USE_SHARED_MBEDTLS_LIBRARY)
|
||||
|
||||
foreach(target IN LISTS target_libraries)
|
||||
# Include public header files from /include and other directories
|
||||
# declared by /3rdparty/**/CMakeLists.txt. Include private header files
|
||||
# from /library and others declared by /3rdparty/**/CMakeLists.txt.
|
||||
# /library needs to be listed explicitly when building .c files outside
|
||||
# of /library (which currently means: under /3rdparty).
|
||||
target_include_directories(${target}
|
||||
PUBLIC ${MBEDTLS_DIR}/include/
|
||||
PUBLIC ${thirdparty_inc_public}
|
||||
|
|
|
@ -5,6 +5,10 @@ CFLAGS ?= -O2
|
|||
WARNING_CFLAGS ?= -Wall -Wextra
|
||||
LDFLAGS ?=
|
||||
|
||||
# Include ../include for public headers and . for private headers.
|
||||
# Note that . needs to be included explicitly for the sake of library
|
||||
# files that are not in the /library directory (which currently means
|
||||
# under /3rdparty).
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I. -I../include -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS =
|
||||
|
||||
|
|
|
@ -48,6 +48,10 @@ function(add_test_suite suite_name)
|
|||
|
||||
add_executable(test_suite_${data_name} test_suite_${data_name}.c $<TARGET_OBJECTS:mbedtls_test>)
|
||||
target_link_libraries(test_suite_${data_name} ${libs})
|
||||
# Include test-specific header files from ./include and private header
|
||||
# files (used by some invasive tests) from ../library. Public header
|
||||
# files are automatically included because the library targets declare
|
||||
# them as PUBLIC.
|
||||
target_include_directories(test_suite_${data_name}
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../library)
|
||||
|
|
|
@ -6,6 +6,9 @@ CFLAGS ?= -O2
|
|||
WARNING_CFLAGS ?= -Wall -Wextra
|
||||
LDFLAGS ?=
|
||||
|
||||
# Include public header files from ../include, test-specific header files
|
||||
# from ./include, and private header files (used by some invasive tests)
|
||||
# from ../library.
|
||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I./include -I../include -I../library -D_FILE_OFFSET_BITS=64
|
||||
LOCAL_LDFLAGS = -L../library \
|
||||
-lmbedtls$(SHARED_SUFFIX) \
|
||||
|
|
Loading…
Reference in a new issue