I could be wrong, but I think the change would look something like [1]. This 
would only affect libraries built using `add_arrow_lib`, so maybe it wouldn't 
affect all of the ones you'd like, but this would certainly affect the ones 
you've mentioned (e.g. "libarrow.*").

I haven't tested it though, so your mileage may vary.

[1]: 
https://github.com/apache/arrow/compare/main...drin:arrow:example-parameterize-libname?expand=1



# ------------------------------

# Aldrin


https://github.com/drin/

https://gitlab.com/octalene

https://keybase.io/octalene


On Friday, November 22nd, 2024 at 12:38, Aldrin <octalene....@pm.me> wrote:

> As far as I can tell the library name is determined by arguments to  
> `add_arrow_lib`[1]. For the main arrow library, the argument itself is not 
> parameterized [2]. So, I think the short answer is that the functionality 
> you're asking for isn't available.
> 

> If you're interested, you could locally (for yourself) parameterize this with 
> a new option that defaults to empty string (backwards compatible). I'm not 
> sure what you would call the option, maybe something like... 
> `LIB_NAME_BUILDTYPE_SUFFIX`? The logic would be something similar to checking 
> `ARROW_USE_OPENSSL` and setting a cmake variable to a non-empty string if so 
> [3] (instead of `list(APPEND ...)`, just use `set(LIB_NAME_SUFFIX)`).
> 

> Then, optionally, you can make a PR for it for others that might be 
> interested in a similar feature. I would think that if it's well enough named 
> the community would be supportive, and if it's not well enough named then 
> someone might have a good suggestion.
> 

> 

> 

> [1]: 
> https://github.com/apache/arrow/blob/main/cpp/cmake_modules/BuildUtils.cmake#L196
> 

> [2]: 
> https://github.com/apache/arrow/blob/main/cpp/src/arrow/CMakeLists.txt#L1018
> 

> [3]: 
> https://github.com/apache/arrow/blob/main/cpp/src/arrow/CMakeLists.txt#L42-L44
> 

> 

> 

> 

> # ------------------------------
> 

> # Aldrin
> 

> 

> https://github.com/drin/
> 

> https://gitlab.com/octalene
> 

> https://keybase.io/octalene
> 

> 

> On Friday, November 22nd, 2024 at 12:15, Carl Godkin <cgod...@gmail.com> 
> wrote:
> 

> > Hi Felipe,
> > Thanks for your reply.
> > 

> > I understand that and already build in two sub-directories of cpp called 
> > `win64_build` and `win64_debug`.
> > 

> > But the libraries end up with the same names still so I can install them to 
> > the same place. In other words, when I do this:
> > 

> > 

> >  cmake -G "NMake Makefiles" ^
> >   -DCMAKE_BUILD_TYPE=Release ^
> >   -DCMAKE_INSTALL_PREFIX=d:\arrow-18.0.0 ^
> >   -DARROW_CSV=ON ^
> >   -DARROW_PARQUET=ON ^
> >   -DPARQUET_BUILD_EXECUTABLES=ON ^
> >   -DPARQUET_BUILD_EXAMPLES=ON ^
> >   -DARROW_WITH_SNAPPY=ON ^
> >   ..
> > 

> > nmake
> > 

> > nmake install
> > 

> > and then do the same thing for my debug build, the libraries overwrite each 
> > other.
> > 

> > Other libraries that I use append a "d" or "D" to the library and DLL names 
> > which is what I hope to be able to do here.  But I can't see how to do it 
> > and I'm by no means a cmake expert.
> > 

> > I realize that I can rename the files AFTER I build them (e.g., using this  
> > Python script) but that doesn't quite work in this case since parquet.dll 
> > depends on arrow.dll.  What ends up happening is that my "parquetD.dll" 
> > depends on the original name ("arrow.dll").
> > 

> > Thanks a lot for any suggestions,
> > 

> > carl
> > 

> > 

> > 

> > On Fri, Nov 22, 2024 at 12:00 PM Felipe Oliveira Carvalho 
> > <felipe...@gmail.com> wrote:
> > 

> > > You can create two different build directories: release and debug.
> > > 

> > > Then you run cmake $ARROW_ROOT on the two different folders.
> > > 

> > > On Fri, 22 Nov 2024 at 15:53 Carl Godkin <cgod...@gmail.com> wrote:
> > > 

> > > > Hi,
> > > > I'm using the arrow library with parquet version 18.0.0 on Windows and 
> > > > Linux from C++.
> > > > 

> > > > For development purposes, I build both a debug and release version of 
> > > > the libraries. However, I noticed that (e.g., on Windows) the arrow and 
> > > > parquet libraries are named arrow.lib/.dll and parquet.lib/.dll after 
> > > > both builds.
> > > > 

> > > > I'd like to specify a different name for the debug builds and don't 
> > > > find a cmake option for this.
> > > > 

> > > > Is there a good way to do this?
> > > > 

> > > > Thanks a lot,
> > > > 

> > > > carl

Attachment: publickey - octalene.dev@pm.me - 0x21969656.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to