Skip to content

Commit

Permalink
[BUILD] Check windows options are not passed to non-Windows build (op…
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan authored Nov 12, 2023
1 parent 6322607 commit 5bd9c65
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 5bd9c65

Please sign in to comment.