refactor(cmake): drop legacy export option and public test includes

- EXPORT_LINK_INTERFACE_LIBRARIES has no effect with policy CMP0022
- Test targets are executables, so their include directories are private

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-09 22:43:44 +00:00
committed by Dennis Klein
parent 44bdfe9ddc
commit 7b2923d6d5

View File

@@ -74,7 +74,7 @@ function(add_testsuite suitename)
add_dependencies(${target} ${testsuite_DEPENDS}) add_dependencies(${target} ${testsuite_DEPENDS})
endif() endif()
if(testsuite_INCLUDES) if(testsuite_INCLUDES)
target_include_directories(${target} PUBLIC ${testsuite_INCLUDES}) target_include_directories(${target} PRIVATE ${testsuite_INCLUDES})
endif() endif()
if(testsuite_DEFINITIONS) if(testsuite_DEFINITIONS)
target_compile_definitions("${target}" PUBLIC ${testsuite_DEFINITIONS}) target_compile_definitions("${target}" PUBLIC ${testsuite_DEFINITIONS})
@@ -123,7 +123,7 @@ function(add_testhelper helpername)
add_dependencies(${target} ${testhelper_DEPENDS}) add_dependencies(${target} ${testhelper_DEPENDS})
endif() endif()
if(testhelper_INCLUDES) if(testhelper_INCLUDES)
target_include_directories(${target} PUBLIC ${testhelper_INCLUDES}) target_include_directories(${target} PRIVATE ${testhelper_INCLUDES})
endif() endif()
if(testhelper_DEFINITIONS) if(testhelper_DEFINITIONS)
target_compile_definitions(${target} PUBLIC ${testhelper_DEFINITIONS}) target_compile_definitions(${target} PUBLIC ${testhelper_DEFINITIONS})
@@ -154,7 +154,7 @@ function(add_testlib libname)
add_dependencies(${target} ${testlib_DEPENDS}) add_dependencies(${target} ${testlib_DEPENDS})
endif() endif()
if(testlib_INCLUDES) if(testlib_INCLUDES)
target_include_directories(${target} PUBLIC ${testlib_INCLUDES}) target_include_directories(${target} PRIVATE ${testlib_INCLUDES})
endif() endif()
if(testlib_HIDDEN) if(testlib_HIDDEN)
set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden) set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden)