List Info

Thread: Bug in cmake parser?




Bug in cmake parser?
user name
2007-12-28 20:25:11
Hi,

trying to fix cmake support up for win32 I've stumbled
across something
which I think is a bug in the parser. When creating
ExecProgramAst it
seems like its workingDirectory option is set automatically
to the
executable, if no WORKING_DIRECTORY argument is given to the
function in
the CMakeLists.txt.

So for something like

exec_program($ ARGS --path data
OUTPUT_VARIABLE _data_DIR) 

visit( ExecProgramAst* ) gets a working directory of
"D:/andreas/kde4/bin/kde4-config.exe", i.e. the
same as the actual value
of the variable KDE4_KDECONFIG_EXECUTABLE.

I can reproduce that with the two attached files on both
win32 and
linux. So it seems for some reason the parser does "the
right thing" on
linux to create a default working dir. 

As its now 3:30 am, I'm not going to look into it right away
and instead
sending this, so maybe somebody with a bit more insight has
a fix at
hand by the time I wake up 

Andreas

-- 
You attempt things that you do not even plan because of your
extreme stupidity.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

Re: Bug in cmake parser?
user name
2007-12-28 20:31:04
On 29.12.07 03:25:11, Andreas Pakulat wrote:
> Hi,
> 
> trying to fix cmake support up for win32 I've stumbled
across something
> which I think is a bug in the parser. When creating
ExecProgramAst it
> seems like its workingDirectory option is set
automatically to the
> executable, if no WORKING_DIRECTORY argument is given
to the function in
> the CMakeLists.txt.
> 
> So for something like
> 
> exec_program($ ARGS --path
data
> OUTPUT_VARIABLE _data_DIR) 
> 
> visit( ExecProgramAst* ) gets a working directory of
> "D:/andreas/kde4/bin/kde4-config.exe", i.e.
the same as the actual value
> of the variable KDE4_KDECONFIG_EXECUTABLE.
> 
> I can reproduce that with the two attached files on
both win32 and
> linux. So it seems for some reason the parser does
"the right thing" on
> linux to create a default working dir. 
> 
> As its now 3:30 am, I'm not going to look into it right
away and instead
> sending this, so maybe somebody with a bit more insight
has a fix at
> hand by the time I wake up 

And here the testcase.

Andreas

-- 
You are destined to become the commandant of the fighting
men of the
department of transportation.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

  
  
Re: Bug in cmake parser?
user name
2008-01-01 08:11:29
On 29.12.07 03:25:11, Andreas Pakulat wrote:
> I can reproduce that with the two attached files on
both win32 and
> linux. So it seems for some reason the parser does
"the right thing" on
> linux to create a default working dir. 
> 
> As its now 3:30 am, I'm not going to look into it right
away and instead
> sending this, so maybe somebody with a bit more insight
has a fix at
> hand by the time I wake up 

In case anybody didn't notice: I've fixed this meanwhile.

Andreas

-- 
You are taking yourself far too seriously.

_______________________________________________
KDevelop-devel mailing list
KDevelop-develkdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinf
o/kdevelop-devel

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )