Linear Collider Forum



Home » Software Tools » Marlin et al » CMake with local package
CMake with local package [message #2341] Tue, 04 November 2014 21:46 Go to next message
jfstrube
Messages: 64
Registered: September 2004
Location: Tohoku University
I'm trying to build LCFIPlus, which in turn depends on LCFIVertex.
I've checked out both packages, because I'd like to work on both of them.
How can I tell CMake to look for my local copy of LCFIVertex when building LCFIPlus rather than the one in $ILCSOFT?

I could probably hack together something for the CMakeLists.txt, with a lot of googling.
If possible, I would much prefer a solution based on command-line options.
Otherwise, some hints on how to hack the CMakeLists.txt are also appreciated.

<edit>I've tried cmake -C /home/ilc/jstrube/public/LCFIVertex/LCFIVertexConfig.cmake -C /group/ilc/soft/ilcsoft/x86_64_gcc44/v01-17-06/ILCSoft.cmake .., but without success. Changing the order of the cmake files did not help.</edit>

[Updated on: Tue, 04 November 2014 21:55]

Re: CMake with local package [message #2342 is a reply to message #2341] Tue, 04 November 2014 22:35 Go to previous messageGo to next message
sailer
Messages: 34
Registered: February 2009
This should work (did not test it though):
cmake -C /group/ilc/soft/ilcsoft/x86_64_gcc44/v01-17-06/ILCSoft.cmake -D LCFIVertex_DIR=/home/ilc/jstrube/public/LCFIVertex/  ..

-C Loads a cache file
-D changes /defines variables. and Find_package (LCFIVetrtex) should then look in the LCFIVertex_DIR.
Otherwise LCFIVertex is found via the CMAKE_PREFIX_PATH defined in the $ILCSOFT/ILCSoft.cmake

http://www.cmake.org/cmake/help/v3.0/manual/cmake.1.html

Edit: corrected statement about where LCFIVertex is found.

[Updated on: Tue, 04 November 2014 22:46]

Re: CMake with local package [message #2343 is a reply to message #2342] Tue, 04 November 2014 22:38 Go to previous message
jfstrube
Messages: 64
Registered: September 2004
Location: Tohoku University
Terrific!
I had tried LCFIVertex_ROOT before, as suggested on stackexchange.
LCFIVertex_DIR works.
Thank you.
Previous Topic:new ilcsoft developers release v01-17-05
Next Topic:iLCSoft release v01-17-06
Goto Forum:
  

[ PDF ]

Current Time: Tue Jun 18 06:42:50 Pacific Daylight Time 2019
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software