I’m wondering it is a regression:
I have a series of cmake scripts like this:
add_library(Protobuf INTERFACE)
target_include_directories(Protobuf INTERFACE ${ProtobufInclude})
// something else...
add_library(MyLib)
target_sources(MyLib INTERFACE FILE_SET HEADERS FILES ${HeaderFiles})
// something else...
target_link_libraries(MyTarget PRIVATE MyLib)
file(GENERATE OUTPUT test_debug_genex.log
CONTENT "$<TARGET_PROPERTY:MyTarget,INCLUDE_DIRECTORIES>")
If I build these scripts with CMake 3.23.0 by using “cmake -G “Visual studio 16” …”
I will get a visual studio solution of which “Addination Include Directories” property contains “ProtobufInclude” and the base_dir path of MyLib’s HeaderFiles. The Command lines do not contain any “external:I xxx”.
If I build these scripts with CMake 3.24.1 by using the same command,
The visual studio solution’s “Addination Include Directories” property only contains the path of “ProtobufInclude”.
And the base_dir path of MyLib’s HeaderFiles can only be found in Command lines, like “external:I MyLib’s HeaderFiles”.
The same behavious can be found by building Visual studio 2022 solution with CMake 3.24.1.