Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUILD] Check windows options are not passed to non-Windows build #2399

Merged
merged 3 commits into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ set(OTELCPP_PROTO_PATH

if(WIN32)
option(WITH_ETW "Whether to include the ETW Exporter in the SDK" ON)
else()
if(DEFINED (WITH_ETW))
message(FATAL_ERROR "WITH_ETW is only supported on Windows")
endif()
endif(WIN32)

# Do not convert deprecated message to error
Expand Down Expand Up @@ -628,6 +632,9 @@ endif()
include(CMakePackageConfigHelpers)

if(DEFINED OPENTELEMETRY_BUILD_DLL)
if(NOT WIN32)
message(FATAL_ERROR "Build DLL is only supported on Windows!")
endif()
if(NOT MSVC)
message(WARNING "Build DLL is supposed to work with MSVC!")
endif()
Expand Down