[CMake] using macros

2016-01-13 Thread Owen Hogarth II
I am trying to use a macro to enable c99 in some of my cmake modules. In the top level cmake file I add this macro macro(use_c99) if (CMAKE_VERSION VERSION_LESS "3.1") if (CMAKE_C_COMPILER_ID STREQUAL "GNU") set (CMAKE_C_FLAGS "--std=gnu99 ${CMAKE_C_FLAGS}") endif () else ()

Re: [CMake] CMAKE_INSTALL_RPATH_USE_LINK_PATH is broken?

2016-01-13 Thread clinton
On Jan 8, 2016 8:16 PM, Elizabeth Fischer wrote: > > Hello, > > I'm using cmake 3.4.1.  I'm trying to compile libraries & executables with an > RPATH.  To that end, I use the following settings: >> >> >> SET(CMAKE_SKIP_BUILD_RPATH  FALSE) >> SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) >> SET(CMAKE_

Re: [CMake] How to get generated dependencies

2016-01-13 Thread J Decker
Or reorganize your project so your includes aren't all scattered and just INSTALL(DIRECTORY include ) On Wed, Jan 13, 2016 at 12:00 PM, Tom Kacvinsky wrote: > Should have read the docs before I asked that last question: > file(STRINGS ...) is what I want > > On Wed, Jan 13, 2016 at 2:59 PM, Tom

Re: [CMake] How to get generated dependencies

2016-01-13 Thread Tom Kacvinsky
Should have read the docs before I asked that last question: file(STRINGS ...) is what I want On Wed, Jan 13, 2016 at 2:59 PM, Tom Kacvinsky wrote: > I suppose what I could do is get the target properties for the > compiler flags (will this include compiler defines and include > directories?), ad

Re: [CMake] How to get generated dependencies

2016-01-13 Thread Tom Kacvinsky
I suppose what I could do is get the target properties for the compiler flags (will this include compiler defines and include directories?), add -MDD -c (using gcc, so those are the options I want) to the compiler flags and make a custom command to generate the file, then post process it to get the

Re: [CMake] How to get generated dependencies

2016-01-13 Thread J Decker
On Wed, Jan 13, 2016 at 11:31 AM, j s wrote: > From what I remember from the mailing list a long time ago, CMake has its > own dependency generator independent of the CPP. > it does; but not for all generators > > On 1/13/16 1:20 PM, Tom Kacvinsky wrote: >> >> On Wed, Jan 13, 2016 at 2:09 PM, J De

Re: [CMake] How to get generated dependencies

2016-01-13 Thread j s
From what I remember from the mailing list a long time ago, CMake has its own dependency generator independent of the CPP. On 1/13/16 1:20 PM, Tom Kacvinsky wrote: On Wed, Jan 13, 2016 at 2:09 PM, J Decker wrote: The short answer is 'no'. I see depends.internal was generated with the gcc (i

Re: [CMake] How to get generated dependencies

2016-01-13 Thread Tom Kacvinsky
On Wed, Jan 13, 2016 at 2:09 PM, J Decker wrote: > The short answer is 'no'. I see depends.internal was generated with the gcc (in my case) option -MD (or perhaps -MDD). Ss cmake knows how to do this. Question: is this at build time or Makefile generation time? If the latter, it would be nice

Re: [CMake] How to get generated dependencies

2016-01-13 Thread J Decker
The short answer is 'no'. On Wed, Jan 13, 2016 at 10:26 AM, Tom Kacvinsky wrote: > On Tue, Jan 12, 2016 at 9:58 AM, Tom Kacvinsky > wrote: >> Is there a way of invoking cmake to get the list of non-system header >> dependencies, like invoking gcc with -MMD? I need to find out the >> list of non

Re: [CMake] How to get generated dependencies

2016-01-13 Thread Tom Kacvinsky
On Tue, Jan 12, 2016 at 9:58 AM, Tom Kacvinsky wrote: > Is there a way of invoking cmake to get the list of non-system header > dependencies, like invoking gcc with -MMD? I need to find out the > list of non-system header dependencies and I know cmake has a way of > doing this, I just need to kno

Re: [CMake] [cmake-developers] Why does INTERFACE type targets only support whitelisted properties?

2016-01-13 Thread Ben Boeckel
On Mon, Jan 11, 2016 at 16:47:03 -0500, Taylor Braun-Jones wrote: > I have another INTERFACE property use case that is not whitelisted, but > should be: VERSION VERSION is a special property for libraries. Particularly the name for the file with the actual content of the library (the SOVERSION and

Re: [CMake] test endian ness

2016-01-13 Thread CHEVRIER, Marc
Hi, May be to include the module before using it: include (TestBigEndian) On 13/01/16 15:25, "CMake on behalf of Vania Joloboff" wrote: >Hi > >I am familiar with autoconf and trying to migrate our project to cmake. >Thus newbie. I am running cmake 3.2.2 on Linux Mint 17 > >I have seen in t

[CMake] test endian ness

2016-01-13 Thread Vania Joloboff
Hi I am familiar with autoconf and trying to migrate our project to cmake. Thus newbie. I am running cmake 3.2.2 on Linux Mint 17 I have seen in the documentation the macro https://cmake.org/cmake/help/v3.2/module/TestBigEndian.html?highlight=endian#module:TestBigEndian which seems very conveni