Re: [CMake] What is the purpose of INSTALL_DIR in ExternalProject_Add command?

2015-04-09 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/09/2015 01:26 PM, Ryan Pavlik wrote: It's for if your use case requires the project to be installed in a specific location that's not the automatically generated one. For instance, if you're building multiple external projects you might have

[CMake] CPack and file checks...

2014-09-01 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm a little bit annoyed by the following lines in CPack.cmake (2.8.12): macro(cpack_check_file_exists file description) if(NOT EXISTS ${file}) message(SEND_ERROR CPack ${description} file: \${file}\ could not be found.) endif() endmacro()

Re: [CMake] header files/build orgainization with cmake

2014-06-19 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/17/2014 02:04 PM, Marcel Loose wrote: Hi Majo, We have a similar situation. I assume you want to use lib1 in proj2 at build time, without doing a separate install. The way I solved this involves symbolic links, which AFAIK only work on

[CMake] FindPackage: Mismatch between documentation and implementation ?

2014-05-05 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm not quite clear, but here is the problem. I want to control precisely the place where a subproject XXX is found (using external_project_add). For this I'm passing the variable XXX_DIR to the other projects needing XXX. This variable XXX_DIR is

Re: [CMake] Explanation....

2014-04-25 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/24/2014 12:31 PM, David Cole wrote: You sure? When I checked, this did not work. Also, the following gives me a syntax error: I, for one, would fully support breaking backwards compatibility to fix this, and be strict with variable and

Re: [CMake] Explanation....

2014-04-14 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 First thank's a lot for your answer On 04/14/2014 12:03 PM, Johannes Zarl wrote: Hello Theo, On Friday, 11. April 2014, 14:20:36, Theodore Papadopoulo wrote: ::-B-:: - This shows that B is indeed parsed as OPTIONAL A A- Fine I'm

[CMake] Explanation....

2014-04-11 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have run on behaviour of cmake that I really do not understand (even if I have clues)... This is probably stupid, but I'm puzzled... The attached CMakeLists.txt gives the following output: ::-B-:: - This shows that B is indeed parsed as OPTIONAL

[CMake] GenerateExportHeader

2014-03-22 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I wonder why GenerateExportHeader is tied to the C++ compiler (by using the check_cxx_* functions instead if their check_c_* variants). As far as I can tell it would be better to just use the C compiler (or a function that depends on C/CXX).

Re: [CMake] CPack RPM with COMPONENTS packaging

2013-03-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/19/2013 04:06 PM, Eric Noulard wrote: See: cpack --help-variable CPACK_GENNAME_COMPONENT_INSTALL CPACK_GENNAME_COMPONENT_INSTALL Enable/Disable component install for CPack generator GENNAME. Each CPack Generator (RPM, DEB, ARCHIVE,

Re: [CMake] CPack RPM with COMPONENTS packaging

2013-03-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/20/2013 03:58 PM, Eric Noulard wrote: 2013/3/20 Theodore Papadopoulo theodore.papadopo...@inria.fr: That was what I was missing. Thanks. It is a pity that the example does not include that. I think this is quite hidden Which example

Re: [CMake] CPack RPM with COMPONENTS packaging

2013-03-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/20/2013 05:01 PM, Eric Noulard wrote: 2013/3/20 Theodore Papadopoulo theodore.papadopo...@inria.fr: And do you observe differences when you do that? As I said above, no there is no difference in my case because the set of file is fixed

Re: [CMake] CPack RPM with COMPONENTS packaging

2013-03-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Actually, this patch works better... and is much simpler. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

[CMake] CPack RPM with COMPONENTS packaging

2013-03-19 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I cannot manage to make COMPONENT packaging with RPM to work. I clearly see that the CPackRPM.cmake module contains stuff to do so, but I cannot manage to make it work at all. Even the ComponentExampleStart that is given on some of CMake

Re: [CMake] how to export header-only library (2.8.11)?

2013-03-15 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/14/2013 08:33 PM, Stephen Kelly wrote: Matthew Woehlke wrote: Now that 2.8.11 supports interface include_directories on targets, is there a way to create a library target that can be exported that has no actual library, but *does* define

Re: [CMake] ExternalProject and hardwired src directory

2013-03-11 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2013 01:06 PM, Luc J. Bourhis wrote: Ansis Māliņš wrote The problem is that I have more than a dozen targets added with ExternalProject_Add. How would I factor out such a change in one place and one place only? Use a function like:

[CMake] Forcing ExternalProjects build

2013-03-08 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Is there a way to force the rebuild of external projects. By default it seems that nothing is rebuilt (my projects only have source and build, no updates, install or patches). I have tried to add the following code:

Re: [CMake] detecting if c++11 available

2013-02-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nowadays, asking for c++-11 is probably too coarse as implementations are usually uncomplete. So you have a stdc++-11 switch and still missing some features on which you rely. Another technique is to test features instead of the whole standard, that

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/04/2013 09:23 AM, Ansis Māliņš wrote: If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory just fine, should I still use ExternalProject_Add instead? Given both ways work, what should I prefer? What are the

Re: [CMake] Why does ExternalProject require root access?

2013-01-21 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/20/2013 10:54 PM, Eric Noulard wrote: 2013/1/20 Ansis Māliņš ansis.mal...@gmail.com mailto:ansis.mal...@gmail.com The line ExternalProject_Add(bullet PREFIX ${PROJECT_SOURCE_DIR}) fails with Install the project... -- Install

[CMake] FindPackage in config mode

2013-01-06 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is something I do not understand with FindPackage. I often build multiple versions of the same packages, as a result there are multiple versions of some config files (let's say XXXConfig.cmake). To be even more explicit, I build a set of

[CMake] Saving/Restoring link_directories and link_libraries

2012-06-01 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm using a library XXX which comes with UseXXX.cmake and XXXConfig.cmake files (which I cannot touch as they come from linux distributions). Unfortunately, the XXXConfig.cmake directly calls include_directories(), add_definitions(),

Re: [CMake] Bug fix requests for the *next* release of CMake...

2012-01-23 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I do not know if it is too late to require bugfix for the next release or even whether this bug is known (a quick browsing of buzilla shows nothing and the git sources still contain the bug), but in any case. In cmake-2.8.6, the module

Re: [CMake] Bug fix requests for the *next* release of CMake...

2012-01-23 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/23/2012 07:29 PM, Rolf Eike Beer wrote: Theodore Papadopoulo wrote: I do not know if it is too late to require bugfix for the next release or even whether this bug is known (a quick browsing of buzilla shows nothing and the git sources still

Re: [CMake] determine 32 vs 64 bit linux

2011-06-23 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/23/2011 03:31 AM, Jean-Christophe Fillion-Robin wrote: Hi Karl, You could do so something like that: set(bitness 32) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(bitness 64) endif() The following macro provides a more complete example...

Re: [CMake] Double redefinition of commands...

2011-05-20 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/19/2011 10:14 PM, Alexander Neundorf wrote: On Thursday 19 May 2011, Theodore Papadopoulo wrote: This feature is not very, let's say polished, so yes, it is not perfect as it is. Why do you want do do this ? Basically, I want

[CMake] Double redefinition of commands...

2011-05-19 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I'm facing with the following problem, I'm using the _XXX trick to access the previous version of a command. Unfortunately, this is not quite what I need because of a double redefinition of the command. Here is a small example of the

Re: [CMake] CMake and include only libraries

2011-04-05 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/05/2011 03:53 AM, Michael Hertling wrote: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(HEADERLIBRARY C) SET(CMAKE_VERBOSE_MAKEFILE ON) FILE(WRITE ${CMAKE_BINARY_DIR}/f.h void f(void)\n) ADD_LIBRARY(f STATIC f.h)

[CMake] CMake and include only libraries

2011-04-04 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm trying to use cmake to install a include only library. I'd like to use the export feature as described in http://www.itk.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file and I found the idea of using

Re: [CMake] Auxiliary fortran link libraries?

2010-07-20 Thread Theodore Papadopoulo
On 07/19/2010 08:43 PM, Brad King wrote: Note that if you use the *shared* libblas.so and liblapack.so then you do not need to list the implementation dependencies explicitly. Another way to view this is that when you pointed Trilinos at the blas and lapack libraries to use, you chose the static

Re: [CMake] TRY_COMPILE without linking...

2010-05-26 Thread Theodore Papadopoulo
On 05/26/2010 04:03 AM, Bill Hoffman wrote: On 5/25/2010 8:57 PM, Michael Hertling wrote: Use the CMAKE_FLAGS of TRY_COMPILE() to pass in a no-op for the linker: TRY_COMPILE(... CMAKE_FLAGS -DCMAKE_CXX_LINK_EXECUTABLE='echo not linking now...' ...) That will not work with Xcode and VS.

[CMake] TRY_COMPILE without linking...

2010-05-25 Thread Theodore Papadopoulo
In porting a library (blitz) from autoconf to cmake, I have the sub-project of testing C++ compiler features. The autoconf way was to create some C++ files and test that they are compiling (and just compiling not linking). TRY_COMPILE (in the variant that creates automatically the CMake

[CMake] CMake Visual Studio 2005 and DLLs

2010-03-20 Thread Theodore Papadopoulo
Hi, I have the following problem. I try to build a DLL library with Visula Studio 2005. The project is schematically structured in this way: project: src test zlib The src directory contains the sources of the DLL library. The test directory contains a sample binary that

Re: [CMake] Please support FindLAPACK/FindBLAS for C/C++-only projects

2010-02-05 Thread Theodore Papadopoulo
I have been following this discussion silently, as the problem of interfacing C/C++ with blas and lapack (and without obliging users to install a fortran compiler) is recurrent in a few of the projects I'm involved in. I'm attaching (for comments) a modified FortranCInterface.cmake that

Re: [CMake] Encapsulating macros

2009-10-21 Thread Theodore Papadopoulo
Alexander Neundorf wrote: There was something... If you override an already existing macro/command, the previous version is still available, but with an underscore prefixed, i.e. _find_library(). I'm not sure I remember correctly, but it was somethign close to this. You remembered

[CMake] Make test an official dependency...

2009-10-21 Thread Theodore Papadopoulo
From the documentation of add_dependencies: Make a top-level target depend on other top-level targets. A top-level target is one created by ADD_EXECUTABLE, ADD_LIBRARY, or ADD_CUSTOM_TARGET. A test is thus not a valid target to add dependencies to. Often, one wants to build an executable only

[CMake] Encapsulating macros

2009-10-20 Thread Theodore Papadopoulo
Following-up a previous message Re: [CMake] Updating cache entries on variable modification, I would like to encapsulate the FIND_LIBRARY. Taking a simple example, let's assume that I'd like to have a list of all the calls of FIND_LIBRARY I did. Is there a way of creating a cmake script that

Re: [CMake] Updating cache entries on variable modification

2009-10-16 Thread Theodore Papadopoulo
Tyler Roscoe wrote: On Wed, Oct 14, 2009 at 04:59:17PM +0200, Theodore Papadopoulo wrote: We have a project which can be built either with static or dynamic libraries. The toggle is defined via an option named BUILD_SHARED which has some default value (let's say static). Unfortunately

[CMake] Updating cache entries on variable modification

2009-10-14 Thread Theodore Papadopoulo
We have a project which can be built either with static or dynamic libraries. The toggle is defined via an option named BUILD_SHARED which has some default value (let's say static). Unfortunately, after the first configure in ccmake all the libraries are set to their values corresponding to

[CMake] Single source, multiple binaries

2008-08-08 Thread Theodore Papadopoulo
Hi, I'm new to this list and a recent CMake user, so please accept in advance my apologies if these are a common question. I have looked at the various FAQs or through google but did not find any answers to my problems... 1) My main problem is that I'd like to compile the same source many