Hi Alan, Thanks a lot! Yeah I was thinking about something along those lines, but i was wondering if there is a solution that does not involve modifying the submodules.
On Wed, Jul 20, 2016 at 12:09 PM, Alan W. Irwin <ir...@beluga.phys.uvic.ca> wrote: > On 2016-07-20 11:02-0700 Tiago Macarios wrote: > > Hi, >> >> I have a project which uses git submodules to manage it's dependencies. >> Right now we want to add a installer to it, problem we have is that some >> of >> the dependencies have their own "install" directives. Is there a way to >> ignore a project install command? >> >> Long version case it is unclear: >> >> main project >> submodule - has a install directive >> myCode - actual code, links statically to submodule above >> >> I would like to only issue the install of myCode. is there a way to tell >> cmake or cpack to ignore "submodule" install directives? >> > > Hi Tiago: > > You could brute force it by surrounding each install directive in > submodule by > > if(INSTALL_SUBMODULE) > .... > endif(INSTALL_SUBMODULE) > > Then add > > option(INSTALL_SUBMODULE, "Install submodule?" OFF) > > to your top-level CMakeLists.txt file. > > Then because of that OFF, by default users would not install > submodule, but if users desired that install, they could specify the > -DINSTALL_SUBMODULE=ON option on the cmake command line. Or you could > choose to default to ON. > > Note, I have characterized the above as brute force, but in fact the > method is completely flexible, and most mature CMake projects use this > kind of option-based method a lot. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake