Skip to content

Commit bda2f1f

Browse files
committed
Regards #56: Have printf.c use the same include path as other code including printf.h.
1 parent e239898 commit bda2f1f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

src/printf/printf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
#include "printf_config.h"
5050
#endif
5151

52-
#include "printf.h"
52+
#include <printf/printf.h>
5353

5454
#if PRINTF_ALIAS_STANDARD_FUNCTION_NAMES
5555
# define printf_ printf

test/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ endforeach()
7272
# compiled library - it includes the library's source .c file; and that means we
7373
# need to include the generated config.h file.
7474
target_compile_definitions(test_suite PRIVATE PRINTF_INCLUDE_CONFIG_H)
75-
target_include_directories(test_suite PRIVATE "${GENERATED_INCLUDE_DIR}")
75+
target_include_directories(
76+
test_suite
77+
PRIVATE
78+
"${GENERATED_INCLUDE_DIR}"
79+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../src/>"
80+
)
7681
add_test(
7782
NAME "${PROJECT_NAME}.test_suite"
7883
COMMAND "test_suite" # ${TEST_RUNNER_PARAMS}

0 commit comments

Comments
 (0)