[CMake] Make add_custom_target depends on cmake macro/function

2015-02-23 Thread Mathieu Malaterre
Hi there, I am trying to setup a rule which always execute, however it needs to depends on a cmake macro. Here is an equivalent code: [...] cmake_minimum_required(VERSION 3.0) string(TIMESTAMP curdate UTC) add_custom_target( dummy ALL COMMAND echo "${curdate}" ) [...] Is there any simple w

Re: [CMake] Make add_custom_target depends on cmake macro/function

2015-02-23 Thread Mathieu Malaterre
On Mon, Feb 23, 2015 at 1:37 PM, Mathieu Malaterre wrote: > Hi there, > > I am trying to setup a rule which always execute, however it needs to > depends on a cmake macro. Here is an equivalent code: > > [...] > cmake_minimum_required(VERSION 3.0) > string(TIMESTAMP curdate UTC) > add_custom_targe

Re: [CMake] Make add_custom_target depends on cmake macro/function

2015-02-23 Thread Petr Kmoch
You could have the custom target execute CMake in script mode: add_custom_target( dummy ALL COMMAND ${CMAKE_COMMAND} -P timescript.cmake ) The file timescript.cmake could look like this: string(TIMESTAMP curdate UTC) message("${curdate}") Feel free to play around with stdout/stderr distinct

[CMake] Eclipse CDT project for VC++ toolchain - debug information?

2015-02-23 Thread Martin Dietze
I need to maintain a multi platform project. The Windows version requires the Visual C++ tools. I would however like to use Eclipse. Now I have succeeded doing the basic setup, and I can build inside Eclipse. Only I never get debug information generated. The commadn line I use is this: cmake -G "E

Re: [CMake] cmake shared library exported symbols on 64bit AIX XLC compiler

2015-02-23 Thread Roman Bolshakov
Hi Michael, Gotcha, thanks for explanation. Right, there should be a way to pass -X32/-X64 for CreateExportList right prior to /objects.exp. Current definition in Modules/Compiler/XL.cmake doesn't have a spot for that: set(CMAKE_${lang}_CREATE_SHARED_LIBRARY "${CMAKE_XL_CreateExportLi