Bug in cmake parser?

Andreas Pakulat apaku at gmx.de
Sat Dec 29 02:25:11 UTC 2007


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(${KDE4_KDECONFIG_EXECUTABLE} 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.




More information about the KDevelop-devel mailing list