Skip to content

Commit

Permalink
Expose include directory as system path via CMake
Browse files Browse the repository at this point in the history
Treading the include directory as a system include directory prevents
clang-tidy from emitting errors from the doctest headers, avoiding
issues when using various doctest macros.
  • Loading branch information
severinstrobl committed Sep 30, 2023
1 parent 66ff54a commit d001397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if(MAIN_PROJECT)

add_custom_target(assemble_single_header ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doctest/doctest.h)
else()
target_include_directories(${PROJECT_NAME} INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>)
target_include_directories(${PROJECT_NAME} SYSTEM INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/>)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down

0 comments on commit d001397

Please sign in to comment.