[
https://issues.apache.org/jira/browse/ARROW-7940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17045842#comment-17045842
]
Valery Vybornov commented on ARROW-7940:
----------------------------------------
The issue is caused by the following clcache configuration code in
cpp/CMakeLists.txt:
{code:java}
if(MSVC
AND ARROW_USE_CLCACHE
AND (("${CMAKE_GENERATOR}" STREQUAL "NMake Makefiles")
OR ("${CMAKE_GENERATOR}" STREQUAL "Ninja")))
find_program(CLCACHE_FOUND clcache)
if(CLCACHE_FOUND)
set(CMAKE_CXX_COMPILER ${CLCACHE_FOUND})
endif(CLCACHE_FOUND)
endif(){code}
Note that setting CMAKE_CXX_COMPILER at this point violates usage limitations
for the setting, as stated here [https://cmake.org/Bug/view.php?id=14841]
I'd propose the following:
# Removing this piece of code entirely
# Documenting that clcache should be explicitly specified via command line or
environment:
{code:java}
cmake -DCMAKE_C_COMPILER=clcache -DCMAKE_CXX_COMPILER=clcache ... {code}
or, alternatively
{code:java}
set CC=clcache
set CXX=clcache
cmake ... {code}
> [C++] Unable to generate cmake build with settings other than default
> ---------------------------------------------------------------------
>
> Key: ARROW-7940
> URL: https://issues.apache.org/jira/browse/ARROW-7940
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 0.16.0
> Environment: Windows 10
> Visual Studio 2019 Build Tools 16.4.5
> Reporter: Valery Vybornov
> Priority: Major
> Attachments: log.txt
>
>
> Steps to reproduce:
> # Install conda-forge as described here:
> [https://arrow.apache.org/docs/developers/cpp/windows.html#using-conda-forge-for-build-dependencies]
> # Install ninja+clcache
> [https://arrow.apache.org/docs/developers/cpp/windows.html#building-with-ninja-and-clcache]
> # (git bash) git clone [https://github.com/apache/arrow.git]
> cd arrow/
> git checkout apache-arrow-0.16.0
> # (cmd)
> call C:\Users\vvv\Miniconda3\Scripts\activate.bat C:\Users\vvv\Miniconda3
> call "C:\Program Files (x86)\Microsoft Visual
> Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" x64
> call conda activate arrow-dev
> # cd arrow\cpp
> mkdir build
> cd build
> # cmake -G "Ninja" -DARROW_BUILD_EXAMPLES=ON -DARROW_BUILD_UTILITIES=ON
> -DARROW_FLIGHT=ON -DARROW_GANDIVA=ON -DARROW_PARQUET=ON ..
> # cmake --build . --config Release
> Expected results: Examples, utilities, flight, gandiva, parquet built.
> Actual results: Default configuration and none of the above built.
> cmake_summary.json indicates all these features OFF. Following lines in the
> output of cmake:
> {code:java}
> -- Configuring done
> You have changed variables that require your cache to be deleted.
> Configure will be re-run and you may have to reset some variables.
> The following variables have changed:
> CMAKE_CXX_COMPILER= C:/Program Files (x86)/Microsoft Visual
> Studio/2019/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe
> -- Building using CMake version: 3.16.4 {code}
> Full cmake output attached
--
This message was sent by Atlassian Jira
(v8.3.4#803005)