Post-build steps - Get preprocessor symbols and include path [message #1792332] |
Mon, 16 July 2018 08:05 |
Kevni Wysocki Messages: 2 Registered: July 2018 |
Junior Member |
|
|
Hi,
Let's explain what I would like to do.
Basically, I have a static library project (ARM target) with some source files, preprocessor symbols and include paths. One source file is excluded from build, it contains a main() function used to test the library. I don't want to include it to avoid to have many main() functions as the library is used by my application project. After building, I get a .a library files without compiling that test.c (no test.o object file).
I would like to have that test.c file compiled to get an application with which I could use to test some functions through command lines. So, I would like to use post-build steps to compile test.c and link with all other object files to get my test app.
So far, I am able to compile test.c with a command line like :
${cross_prefix}${cross_c}${cross_suffix} ${cross_toolchain_flags} -c -D__MY_DEFINED_SYMBOL__ -I/MY_INCLUDE_PATH -o test_${ProjName}.o ${workspace_loc:/${ProjName}}/src/test_${ProjName}.c
But I would like to replace "_MY_DEFINED_SYMBOL__" and "/MY_INCLUDE_PATH" by some variables that contains the symbol and paths defined in my project settings (basically, what's shown in "All options" textbox in Project Settings->C/C++ Build->Settings->C Compiler). If I add some path or whatever I don't want to modify that post-build command.
Does anybody know how I could do that ?
Thanks,
Kevin
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03417 seconds