Skip to content

Commit 4c122ae

Browse files
opcmCopilot
andauthored
add error handling in CMakeLists.txt
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4677646 commit 4c122ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MacMSRDriver/PcmMsr/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ if(APPLE)
1818
COMMAND xcrun --sdk macosx --show-sdk-path
1919
OUTPUT_VARIABLE MACOSX_SDK_PATH
2020
OUTPUT_STRIP_TRAILING_WHITESPACE
21+
RESULT_VARIABLE XCRUN_RESULT
2122
)
23+
if(NOT XCRUN_RESULT EQUAL 0 OR NOT MACOSX_SDK_PATH)
24+
message(FATAL_ERROR "Failed to find macOS SDK path using xcrun")
25+
endif()
2226
message(STATUS "Using SDK for KEXT: ${MACOSX_SDK_PATH}")
2327
endif()
2428

0 commit comments

Comments
 (0)