Hi all,
I am trying to write a Julia parquet writer by leveraging the C++ arrow
library. I can build arrow and arrow/parquet and can write out a parquet
file successfully. The next part I need to do is to use the [CxxWrap.jl](
https://github.com/JuliaInterop/CxxWrap.jl) Julia package to call the C++
functions I wrote. However, CxxWrap.jl underlying JlCxx library only has
build examples in CMake, so I am having issues modifying the CMakeLists.txt
to add the arrow and arrow/parquet dependencies.
This is the error I get when I try to run their CMake process, so I should
be able to add something to the CMakeLists.txt file to tell i where to the
find the parquet and arrow libraries right? I am so new to C++ that I am at
lost on how to do this. I have include the CMakeLIst.txt file at the very
end! Thanks for any help and for helping me make a Julia parquet write a
reality.
```
[ 50%] Building CXX object CMakeFiles/testlib.dir/testlib.cpp.o
/home/xiaodai/git/ParquetWriter.jl/test-include-julia/testlib.cpp:26:10:
fatal error: parquet/arrow/writer.h: No such file or directory
#include "parquet/arrow/writer.h"
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
CMakeFiles/testlib.dir/build.make:62: recipe for target
'CMakeFiles/testlib.dir/testlib.cpp.o' failed
make[2]: *** [CMakeFiles/testlib.dir/testlib.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/testlib.dir/all'
failed
make[1]: *** [CMakeFiles/testlib.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
```
The CMakeLists.txt I am using now
```
project(TestLib)
cmake_minimum_required(VERSION 2.8.12)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
find_package(JlCxx)
get_target_property(JlCxx_location JlCxx::cxxwrap_julia LOCATION)
get_filename_component(JlCxx_location ${JlCxx_location} DIRECTORY)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${JlCxx_location}")
message(STATUS "Found JlCxx at ${JlCxx_location}")
add_library(testlib SHARED testlib.cpp)
target_link_libraries(testlib JlCxx::cxxwrap_julia)
install(TARGETS
testlib
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION lib)
```
Regards
--
ZJ
[email protected]