Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: [C++] Ensure setting the default CMAKE_BUILD_TYPE (apache#43794)
### Rationale for this change The current logic for detecting whether the `CMAKE_BUILD_TYPE` is set is incorrect. That variable is never fully undefined; by default, in cases where it is unset is actually set to the empty string. Therefore, the condition that must be checked is not whether the variable is defined, but whether it tests to a truthy value (i.e. is a non-empty string). I consider this a minor change so I have not opened an associated issue. ### What changes are included in this PR? This PR changes `if(NOT DEFINED CMAKE_BUILD_TYPE)` to `if(NOT CMAKE_BUILD_TYPE)`. ### Are these changes tested? Since this fixes a particular CMake build scenario I am not sure if a test is merited, or where one would be added. ### Are there any user-facing changes? No. Authored-by: Vyas Ramasubramani <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
- Loading branch information