Commits


Changming Sun authored and GitHub committed 7a57976d1a1
Make natvis files work better (#13665) ### Description After this change, you will see GSL.natvis and wil.nativs files will be added to every onnxruntime_xxx project. Like this:  This is because in onnxruntime_common.cmake we have: ```cmake if (MSVC) set(ABSEIL_NATVIS_FILE "abseil-cpp.natvis") target_sources( onnxruntime_common INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/${ABSEIL_NATVIS_FILE}>) endif() ``` It sets a property, INTERFACE_SOURCES, on the target "onnxruntime_common". Then if anyone else uses: ``` target_link_libraries(mytarget PRIVATE onnxruntime_common) ``` The nativis file will be added to `mytarget`. However, in this project we don't use such things for the targets that are static libraries. For example, onnxruntime_graph is a static library. Instead, we use the `onnxruntime_add_include_to_target ` function to explicitly control what we want to propagate . The function was written before we started to have nativis files. So it doesn't pass a source file from one static library to another. Now we have the need. Probably only for Windows. ### Motivation and Context Add natvis files to every project.