kevingurney commented on PR #39595:
URL: https://github.com/apache/arrow/pull/39595#issuecomment-1910891024

   @ShaiviAgarwal2 - I believe what is happening here is a result of the fact 
that Visual Studio is a [Multi Configuration 
Generator](https://cmake.org/cmake/help/latest/prop_gbl/GENERATOR_IS_MULTI_CONFIG.html)
 (as opposed to a Single Configuration Generator like Make). Multi 
Configuration Generators ignore the value of 
[`CMAKE_BUILD_TYPE`](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html#variable:CMAKE_BUILD_TYPE).
 As a side effect, it appears to be defaulting to the value `Debug`,  despite 
the fact that we are [explicitly building in Release mode in CI via 
`matlab_build.sh` (`--config 
Release`)](https://github.com/apache/arrow/blob/9c0a7617d953a74abaec5c14318bc2f46d0d176a/ci/scripts/matlab_build.sh#L34).
   
   The following section from the CMake documentation on Build Configurations 
describes what seems to be going on here in more detail:
   
   
https://cmake.org/cmake/help/latest/manual/cmake-buildsystem.7.html#build-configurations
   
   To make this work as desired, I believe we will need to use a generator 
expression to check if a `Debug` build is being performed with Visual Studio, 
rather than using a conditional, config-time check based on the value 
`CMAKE_BUILD_TYPE`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to