lanl / qmd-progress

PROGRESS: Parallel, Rapid O(N) and Graph-based Recursive Electronic Structure Solver.
https://qmd-progress.readthedocs.io/
Other
20 stars 13 forks source link

Setting CMAKE_PREFIX_PATH #250

Open jeanlucf22 opened 1 year ago

jeanlucf22 commented 1 year ago

In build.sh, we have:

${CMAKE:=cmake} .. \
    -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
    ${CMAKE_PREFIX_PATH:+-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}"} \

...

I don't understand how it is supposed to work. Are we trying to append something to CMAKE_PREFIX_PATH? It actually doe not work for me on Summit at OLCF. I set

export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH:=$BML_LIB}

but then, when I run cmake and printing out the value of CMAKE_PREFIX_PATH, I get:

CMAKE_PREFIX_PATH: /sw/summit/spack-envs/base/opt/linux-rhel8-ppc64le/gcc-9.1.0/spectrum-mpi-10.4.0.3-20210112-6jbupg3thjwhsabgevk6xmwhd2bbyxdc:/sw/summit/spack-envs/base/opt/linux-rhel8-ppc64le/gcc-8.3.1/cmake-3.23.2-jwqghrfxvfhuozlioasit4bvncwg5yff:/sw/summit/spack-envs/base/opt/linux-rhel8-ppc64le/gcc-8.3.1/darshan-runtime-3.4.0-kjycgqekqo72q2f4xzrpwcnb6j4kl4ed

instead of the value of BML_LIB

jeanlucf22 commented 1 year ago

@nicolasbock Any comments? It looks like you wrote that part.

jeanlucf22 commented 1 year ago

@junghans any thoughts about this? we have this kind of syntax all over PROGRESS and BML build systems, and I am wondering if anyone knows where these come from...

junghans commented 1 year ago

Try export CMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}:${BML_LIB}