We should move all public definitions in CMakeLists.txt
to target_compile_definitions(opentelemetry_api INTERFACE ...)
#1311
Labels
bug
Something isn't working
Describe your environment
System: Windows
Build System: cmake
Steps to reproduce
cmake <...> -DWITH_ETW=ON
What is the expected behavior?
Now, some definitions are added by
add_definitions(...)
inCMakeLists.txt
and so that these definitions are private. But we should keep the same behaviour between compiling opentelemetry-cpp and using it by users. We can add these public definitions bytarget_compile_definitions(opentelemetry_api INTERFACE ...)
and then these definitions will be auto passed to all cmake targets dependopentelemetry_api
.What is the actual behavior?
Some definitions are missing and library get a different behavior.
Additional context
Should we add prefix to
NO_GETENV
andNOMINMAX
in case of them will conflict with other libraries?It this's acceptable, it can be assigned to me please.
The text was updated successfully, but these errors were encountered: