I use OpenCL which has many text files compiled at runtime.
All of these text files must be copied from source directory to target directory (if newer).
There is no a cross-platfrom approach to do this with C::B.
Can we add this option for "Other" files??
Regards.
Pavlos Gessos
Quote from: chameleon on April 07, 2012, 09:03:46 PM
There is no a cross-platfrom approach to do this with C::B.
There is, if you use C::B's scripting engine.
Have you tried using something like:
$(CMD_CP) src/opencl/*.cl bin/openclor (more advanced)
[[ if (PLATFORM == PLATFORM_MSW) { print (_T("cmd /c xcopy /D /y")); } else { print (_T("sh cp -u")); } ]] src/opencl/*.cl bin/openclas a post-build step (see the Code::Blocks manual (http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3-960003.2.7) for details)?
Quote from: MortenMacFly on April 07, 2012, 10:04:52 PM
Quote from: chameleon on April 07, 2012, 09:03:46 PM
There is no a cross-platfrom approach to do this with C::B.
There is, if you use C::B's scripting engine.
Or the copy macro.
Quote from: Alpha on April 07, 2012, 10:06:19 PM
Or the copy macro.
Even simpler - even better. 8)
Quote from: chameleon on April 07, 2012, 08:58:30 PM
Is ok to add a feature request? "Copy source to target if newer".
The forum is not good place to add feature requests. Use the project page at berlios.de
Hm...
I will work with
[[ if (PLATFORM == PLATFORM_MSW) { print (_T("cmd /c xcopy /D /y")); } else { print (_T("sh cp -u")); } ]] src/opencl/*.cl bin/opencl
But I thought something like "copy if newer" option for "Other" files, together with "compile" and "link" option (for every single file).
I am inspired from NetBeans (for Java) where if you have a *.java file, it compiled. If you have e.g. a *.png file, it copied.
(Off course I understand that in C++ there are many things to do with "Other" files instead of simply copy them to target - like intermediate building for something special library as is Qt)
PS: Sorry for off-topic post by the way. I am not "living here" :)