Page 1 of 1
Working directory in Custom Build
Posted: Thu Jan 29, 2009 2:28 pm
by marfi
Hi, it seems a "Working Directory" option in a "Custom Build" panel doesn't work, because if I set this value to any directory (or CL macro) then the working dir is always a workspace directory anyway.
I use Ubunut 8.10 and CL rev 2747.
Regards
marfi
Re: Working directory in Custom Build
Posted: Thu Jan 29, 2009 4:21 pm
by eranif
Works here
Can u run this simple test:
What happen if you set the working directory to:
and then in the build command set:
what is the output that you get?
Eran
Re: Working directory in Custom Build
Posted: Thu Jan 29, 2009 5:21 pm
by marfi
I've already tried it with 'ls' command but with 'pwd' it works the same way: I set the working dir to "/home/", build command to "echo `pwd`" and the output is as follows:
Code: Select all
echo /home/michal/Src
/home/michal/Src
Regards
marfi
Re: Working directory in Custom Build
Posted: Thu Jan 29, 2009 5:30 pm
by eranif
Hi,
I created a simple hello world application using codelite, now I ticked the 'enable custom build' and set as 'Working Directory' in the 'Custom Build' tab to /home/eran,
I get this in the build command;
Code: Select all
----------Build Started--------
echo /home/eran
----------Building project:[ Main - Debug ]----------
/home/eran
----------Build Ended----------
0 errors, 0 warnings
When leaving the 'Working Directory' empty, here is the output:
Code: Select all
----------Build Started--------
echo /home/eran/devl/MainTest
----------Building project:[ Main - Debug ]----------
/home/eran/devl/MainTest
----------Build Ended----------
0 errors, 0 warnings
This makes me thinking: which 'Working Directory' entry do u refer to? (there are 2, one in the 'Custom Build' and another one in the 'General' tab)
Also, can u please copy the exact output as it appears in the 'Build' tab?
EDIT: reading your first post again, make me realize that you are refering to the correct entry (the one from the Custom Build), but how come your output is different than mine? (I miss the "status lines" Build Started, Building project etc.)
Eran
Re: Working directory in Custom Build
Posted: Thu Jan 29, 2009 5:48 pm
by marfi
I tried to do the same things like you and I've got the same output like you for Build target command, so this part is OK. But, the problem is that a working directory of "Command to use for makefile generation:" is not involved by a value set in the "Working directory" text field, so the output of "echo `pwd`" from "build command" field and from "makefile generation" field differs (I used Qmake generator).
Re: Working directory in Custom Build
Posted: Thu Jan 29, 2009 6:22 pm
by eranif
Ok, now it make sense.
I am too using qmake at work and never came across this issue, the reason is:
I simply defined new build target qmake ...
So my list contains:
Code: Select all
Compile Single File
Clean
Build
qmake MODULE_BUILD=DEBUG
qmake
This way I can use more than one qmake command (MODULE_BUILD=DEBUG generates Makefile with debug information, while qmake alone generates release Makefile)
Eran
Re: Working directory in Custom Build
Posted: Thu Jan 29, 2009 6:49 pm
by marfi
Oh, I see. Now it works fine.
Btw, I think I'll stay with wxWidgets...
Thank you for your effort!
Michal