Skip to content

Commit

Permalink
apacheGH-35239: [MATLAB] Report error when building the MATLAB Interf…
Browse files Browse the repository at this point in the history
…ace to Arrow in Debug mode on Windows
  • Loading branch information
ShaiviAgarwal2 committed Jan 14, 2024
1 parent e632364 commit 32458b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ if(NOT Arrow_FOUND)
build_arrow()
endif()

# Identify MATLAB build mode (Debug or Release)
if(WIN32)
execute_process(COMMAND dumpbin /dependents ${Matlab_MAIN_PROGRAM} OUTPUT_VARIABLE DEPENDENTS)
if(DEPENDENTS MATCHES "MSVCP\\d+.dll")
message(FATAL_ERROR "Error: Building in Debug mode is not allowed because MATLAB is built with Release mode. Please switch to Release mode.")
endif()
endif()

# MATLAB is Required
find_package(Matlab REQUIRED COMPONENTS MAIN_PROGRAM)

Expand Down

0 comments on commit 32458b3

Please sign in to comment.