diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index c92daf32690..f4ff0bded3d 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -139,7 +139,7 @@ if(NOT DEFINED CMAKE_C_STANDARD) set(CMAKE_C_STANDARD 11) endif() -# This ensures that things like c++17 get passed correctly +# This ensures that a standard higher than the minimum can be passed correctly if(NOT DEFINED CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 20) elseif(${CMAKE_CXX_STANDARD} VERSION_LESS 20) diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index a46db60321a..df9b783d531 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -1180,7 +1180,7 @@ endif() foreach(LIB_TARGET ${ARROW_LIBRARIES}) target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_EXPORTING) - # C++17 is required to compile against Arrow C++ headers and libraries + # C++20 is required to compile against Arrow C++ headers and libraries target_compile_features(${LIB_TARGET} PUBLIC cxx_std_20) endforeach() diff --git a/matlab/README.md b/matlab/README.md index 30684625e9c..264d7f6ece5 100644 --- a/matlab/README.md +++ b/matlab/README.md @@ -64,7 +64,7 @@ To build the MATLAB Interface to Apache Arrow from source, the following softwar 1. [MATLAB](https://www.mathworks.com/products/get-matlab.html) 2. [CMake](https://cmake.org/cmake/help/latest/) -3. C++ compiler which supports C++17 (e.g. [`gcc`](https://gcc.gnu.org/) on Linux, [`Xcode`](https://developer.apple.com/xcode/) on macOS, or [`Visual Studio`](https://visualstudio.microsoft.com/) on Windows) +3. C++ compiler which supports C++20 (e.g. [`gcc`](https://gcc.gnu.org/) on Linux, [`Xcode`](https://developer.apple.com/xcode/) on macOS, or [`Visual Studio`](https://visualstudio.microsoft.com/) on Windows) 4. [Git](https://git-scm.com/) ## Setup diff --git a/matlab/tools/cmake/BuildMatlabArrowInterface.cmake b/matlab/tools/cmake/BuildMatlabArrowInterface.cmake index cc021b3400b..8c99d04af5b 100644 --- a/matlab/tools/cmake/BuildMatlabArrowInterface.cmake +++ b/matlab/tools/cmake/BuildMatlabArrowInterface.cmake @@ -130,7 +130,7 @@ libmexclass_client_add_proxy_library( INCLUDE_DIRS ${MATLAB_ARROW_LIBMEXCLASS_CLIENT_PROXY_LIBRARY_INCLUDE_DIRS} LINK_LIBRARIES arrow_shared ) -# Use C++17 +# Use C++20 target_compile_features(${MATLAB_ARROW_LIBMEXCLASS_CLIENT_PROXY_LIBRARY_NAME} PRIVATE cxx_std_20) target_compile_definitions(${MATLAB_ARROW_LIBMEXCLASS_CLIENT_PROXY_LIBRARY_NAME} PRIVATE ARROW_MATLAB_EXPORTING)