Skip to content

Commit

Permalink
GH-37209: [CI][Docs][MATLAB] Remove support for `MATLAB_ARROW_INTERFA…
Browse files Browse the repository at this point in the history
…CE` flag from CMake build system and build new MATLAB Interface code by default (#37211)

### Rationale for this change

Now that the old Feather V1 code and associated build infrastructure has been removed (#37204), it makes sense to start building the new, experimental MATLAB Interface code by default (without needing to [explicitly specify `-D MATLAB_ARROW_INTERFACE=ON`](https://github.com/apache/arrow/tree/main/matlab#build)).

This pull request removes the `MATLAB_ARROW_INTERFACE` flag entirely, since setting it to `OFF` when we are building the MATLAB Interface code by default would essentially imply that no code should be built.

### What changes are included in this PR?

1. Removed mention of `MATLAB_ARROW_INTERFACE` flag from MATLAB `README.md`.
2. Removed conditional check for `MATLAB_ARROW_INTERFACE` flag from MATLAB `CMakeLists.txt`.
3. Removed `MATLAB_ARROW_INTERFACE` flag from `matlab_build.sh` CI script.

### Are these changes tested?

Yes.

The MATLAB Interface is building as expected by default on my Debian 11 machine.

### Are there any user-facing changes?

Yes.

1. The experimental MATLAB Interface APIs will now be built by default without users explicitly specifying `-D MATLAB_ARROW_INTERFACE=ON` to `cmake`.
2. If users specify a value for `MATLAB_ARROW_INTERFACE`, the value will be ignored by the CMake build system.
* Closes: #37209

Authored-by: Kevin Gurney <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
  • Loading branch information
kevingurney authored Aug 17, 2023
1 parent d0c18a6 commit 4680ca5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion ci/scripts/matlab_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ cmake \
-S ${source_dir} \
-B ${build_dir} \
-G Ninja \
-D MATLAB_ARROW_INTERFACE=ON \
-D MATLAB_BUILD_TESTS=ON \
-D CMAKE_INSTALL_PREFIX=${install_dir} \
-D MATLAB_ADD_INSTALL_DIR_TO_SEARCH_PATH=OFF
Expand Down
5 changes: 2 additions & 3 deletions matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,8 @@ endif()
# Create a subdirectory at CMAKE_INSTALL_PREFIX to install the interface.
set(CMAKE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/arrow_matlab")

if(MATLAB_ARROW_INTERFACE)
include(BuildMatlabArrowInterface)
endif()
# Build the MATLAB Interface to Arrow.
include(BuildMatlabArrowInterface)

# Install MATLAB source files.
# On macOS, exclude '.DS_Store' files in the source tree from installation.
Expand Down
6 changes: 2 additions & 4 deletions matlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ $ cd arrow/matlab
To build the MATLAB interface, use [CMake](https://cmake.org/cmake/help/latest/):

```console
$ cmake -S . -B build -D MATLAB_ARROW_INTERFACE=ON
$ cmake -S . -B build
$ cmake --build build --config Release
```

**NOTE:** To build the experimental MATLAB interface code, `-D MATLAB_ARROW_INTERFACE=ON` must be specified as shown above.

## Install

To install the MATLAB interface to the default software installation location for the target machine (e.g. `/usr/local` on Linux or `C:\Program Files` on Windows), pass the `--target install` flag to CMake.
Expand Down Expand Up @@ -111,7 +109,7 @@ To run the MATLAB tests, start MATLAB in the `arrow/matlab` directory and call t
To enable the C++ tests, set the `MATLAB_BUILD_TESTS` flag to `ON` at build time:

```console
$ cmake -S . -B build -D MATLAB_ARROW_INTERFACE=ON -D MATLAB_BUILD_TESTS=ON
$ cmake -S . -B build -D MATLAB_BUILD_TESTS=ON
$ cmake --build build --config Release
```

Expand Down

0 comments on commit 4680ca5

Please sign in to comment.