sandialabs / TChem

TChem - A Software Toolkit for the Analysis of Complex Kinetic Models
BSD 2-Clause "Simplified" License
54 stars 21 forks source link

set TCHEM_INSTALL_LIB_PATH to be an option that can be overridden at configure time #4

Closed mjs271 closed 3 years ago

mjs271 commented 3 years ago

The cmake variable TCHEM_INSTALL_LIB_PATH is currently hard-set to be lib, which causes some problems when we build in haero. Namely, it results in strife when building on linux systems that like CMAKE_INSTALL_LIBDIR to be lib64. Thus, this PR would allow the default lib to be overridden at configure time.

kyungjoo-kim commented 3 years ago

Oh... does this mean that we use the default cmake install lib directory CMAKE_INSTALL_LIBDIR instead of TCHEM_INSTALL_LIB_PATH ?

mjs271 commented 3 years ago

@kyungjoo-kim Originally, the variable TCHEM_INSTALL_LIB_PATH was being set to lib. Now, it's an option with the default value of lib. Then, for example in Haero, we set it at configure time to CMAKE_INSTALL_LIBDIR to line up with the location of our other external libraries, since it was ending up in a different spot on linux builds (when CMAKE_INSTALL_LIBDIR might be lib64).

kyungjoo-kim commented 3 years ago

@mschmidt271 Yes, that is what I thought. So,

SET(TCHEM_INSTALL_LIB_PATH ${CMAKE_INSTALL_LIBDIR})

Would this make it more convenient ? I just wonder if this is more close to the standard cmake.

mjs271 commented 3 years ago

Yeah, that would put it in line with what we are going for. My goal on this PR was preserve the original behavior in case there was a reason it was set that way, but your suggestion seems like it'd be ideal.