Re: [CMake] coding style for modules

2018-01-03 Thread Alan W. Irwin
On 2018-01-04 05:09+0300 Dave Milter wrote: Hello, If there is some libfoo that I want to use in my project, and this libfoo has it's own CMakeLists.txt I have 3 options to deal with such external dependency: a) Treat it like every other external dependency and write cmake code like

Re: [CMake] coding style for modules

2018-01-03 Thread Don Hinton
I normally see it like this: if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) project(foo) # ... endif() hth... don On Wed, Jan 3, 2018 at 6:09 PM, Dave Milter wrote: > Hello, > > If there is some libfoo that I want to use in my project, > and this libfoo has

[Cmake-commits] CMake branch, master, updated. v3.10.1-704-gbc7fd08

2018-01-03 Thread Kitware Robot
VERSION_MINOR 10) -set(CMake_VERSION_PATCH 20180103) +set(CMake_VERSION_PATCH 20180104) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/

[CMake] coding style for modules

2018-01-03 Thread Dave Milter
Hello, If there is some libfoo that I want to use in my project, and this libfoo has it's own CMakeLists.txt I have 3 options to deal with such external dependency: a) Treat it like every other external dependency and write cmake code like FindLibFoo.cmake to find libfoo on file system.

Re: [CMake] modularizing, specifying dependencies in a project

2018-01-03 Thread Geogin Varghese
This works. Have pushed changes to the repo here: https://github.com/vargheseg/test Thank you On Wed, Jan 3, 2018 at 8:16 PM, Robert Maynard wrote: > You will want to use add_subdirectory instead of include in the root > CMakeLists.txt and remove all include

[CMake] CPack per-component value for CPACK_PACKAGING_INSTALL_PREFIX when using RPM generator

2018-01-03 Thread Sam Lunt
I am trying to set a per-component value for CPACK_PACKAGING_INSTALL_PREFIX when using the RPM generator, but I haven't been able to do so. I would like to be able to: 1. Install using "make install" (or cmake --build ${BUILD_DIR} --target install) and have CMAKE_INSTALL_PREFIX control the

[cmake-developers] Optionally disabling static lib dependencies with COMPILE_DEPENDS

2018-01-03 Thread John Wordsworth
I have recently been reviewing ways to improve build times for our project, which is comprised of a number of static libraries. I stumbled across this post on the CMake tracker from 2012/13 (https://cmake.org/Bug/view.php?id=13799 ). It suggests adding a

Re: [CMake] RPATH for pkg-config

2018-01-03 Thread Andreas Naumann
What about using a FindPETSC-Module? Some hints are *http://jacobmerson.com/2016/01/17/cmake-petsc2.html *http://www.mcs.anl.gov/petsc/documentation/faq.html#cmake Regards, Andreas Am 03.01.2018 um 21:35 schrieb Alexander Neundorf: On 2018 M01 3, Wed 10:08:09 CET Franck Houssen wrote:

Re: [CMake] RPATH for pkg-config

2018-01-03 Thread Alexander Neundorf
On 2018 M01 3, Wed 10:08:09 CET Franck Houssen wrote: > Hello, > > How to ask cmake to add a library path (coming from pc file) to rpath ? > > I checked this https://cmake.org/Wiki/CMake_RPATH_handling, but still not > working. Can somebody help ? > >> more main.cpp > > #include > > int

[Cmake-commits] CMake branch, master, updated. v3.10.1-703-g1642eb7

2018-01-03 Thread Kitware Robot
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 1642eb7749622ffb50b8279355b42f4262cde000 (commit) via

Re: [CMake] modularizing, specifying dependencies in a project

2018-01-03 Thread Robert Maynard
You will want to use add_subdirectory instead of include in the root CMakeLists.txt and remove all include statements from ModA and ModB It total the changes needed to get everything to work are: diff --git a/CMakeLists.txt b/CMakeLists.txt index e611a37..b6968c1 100644 --- a/CMakeLists.txt +++

[CMake] modularizing, specifying dependencies in a project

2018-01-03 Thread Geogin Varghese
Hello, Recently came across these presentations on cmake: Using Modern CMake Patterns to Enforce a Good Modular Design (https://www.youtube.com/watch?v=bsXLMQ6WgIk) Effective CMake (https://www.youtube.com/watch?v=eC9-iRN2b04) They encourage using target_* command variants for scripting

[CMake] RPATH for pkg-config

2018-01-03 Thread Franck Houssen
Hello, How to ask cmake to add a library path (coming from pc file) to rpath ? I checked this https://cmake.org/Wiki/CMake_RPATH_handling, but still not working. Can somebody help ? >> more main.cpp #include int main(int argc, char ** argv) { PetscInitialize(, , NULL, "");