Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: chameleon on April 06, 2012, 08:51:08 pm
-
Hi guys.
I check the structure of CBP file and I realize that can be cross-platform.
I work with OpenCL which has many compile-at-runtime text files.
I want these files in my source "src/opencl/" directory.
I add these files as "Others" in my CBP project.
But there is no copy operation to target "bin" directory.
So I want "Other" files in my project:
- Copy from source "src" to target "bin" directory with the same structure "src/opencl/matrix.cl" -> "bin/opencl/matrix.cl"
- Copy only if newer.
- Copy with a cross-platform method. "copy %source_file %target_file" is not working on linux and "cp %source_file %target_file" is not working on windows.
How can I do this?
Regards
Pavlos Gessos.
-
1. Do as C::B does and shell script for linux and bat file for windows
2. Try a squirrel script in the post build steps, I think it is possible, but I've not tried it, ever
3. Use rsync
-
hm....
This is not so cross-platform approach.
My poor opinion:
Add an extra "compiler" in the list of supported compilers with name "Copy if newer".
Of course any other similar approach is ok.
Is ok to add a feature request? "Copy source to target if newer".