Re: [CMake] With gcc is __FILE__ with full path. Is there a workaround?

2007-04-03 Thread Manfred Rebentisch
Hello Filipe, Am Montag, 2. April 2007 22:56 schrieb Filipe Sousa: > Eric Noulard wrote: > > 2007/4/2, Manfred Rebentisch <[EMAIL PROTECTED]>: > > > > May be. > > > > May be you can use predefined > > C99 __func__ or GCC specific __FUNCTION__ macros > > and then you should be able to use: > > >

Re: [CMake] With gcc is __FILE__ with full path. Is there a workaround?

2007-04-02 Thread Filipe Sousa
Eric Noulard wrote: > 2007/4/2, Manfred Rebentisch <[EMAIL PROTECTED]>: > > May be. > > May be you can use predefined > C99 __func__ or GCC specific __FUNCTION__ macros > and then you should be able to use: > > printf("%s:%s error msg x\n", basename(__FILE__), __FUNCTION__); > > nevertheless

Re: [CMake] With gcc is __FILE__ with full path. Is there a workaround?

2007-04-02 Thread Eric Noulard
2007/4/2, Manfred Rebentisch <[EMAIL PROTECTED]>: Thank you Filipe, Am Sonntag, 1. April 2007 23:20 schrieb Filipe Sousa: > > what about using basename()? > I do use a Macro: #define CP_PREFIX(varname, functionname) \ static const char* varname = __FILE__ ":" functionname and use

Re: [CMake] With gcc is __FILE__ with full path. Is there a workaround?

2007-04-02 Thread Manfred Rebentisch
Thank you Filipe, Am Sonntag, 1. April 2007 23:20 schrieb Filipe Sousa: > > what about using basename()? > I do use a Macro: #define CP_PREFIX(varname, functionname) \ static const char* varname = __FILE__ ":" functionname and use it: int func(void) { CP_PREFIX(prefix, "func");

Re: [CMake] With gcc is __FILE__ with full path. Is there a workaround?

2007-04-01 Thread Filipe Sousa
Manfred Rebentisch wrote: > Hello, > another effect. In the past I compiled projects with gcc in the actual > directory, the source file was "mysource.c". But with the generated cmake > Makefile it is "/home/mareb/sb/cp/bkupserver/src/mysource.c". > Into Logfiles I write for example with syslog(

[CMake] With gcc is __FILE__ with full path. Is there a workaround?

2007-04-01 Thread Manfred Rebentisch
Hello, another effect. In the past I compiled projects with gcc in the actual directory, the source file was "mysource.c". But with the generated cmake Makefile it is "/home/mareb/sb/cp/bkupserver/src/mysource.c". Into Logfiles I write for example with syslog(LOG_INFO, "%s: abcdef", __FILE__) a