Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pods should parse pre-processor definitions from pkg-config files #3

Open
avalenzu opened this issue Mar 27, 2014 · 3 comments
Open

Comments

@avalenzu
Copy link

Currently, pods_use_pkg_config_packages calls pkg-config with the --cflags-only-I option and uses the result to populate the list of include directories. However, this means that pre-processor definitions that packages place in their pkg-config file (e.g for Bullet compiled with double-precision: -DBT_USE_DOUBLE_PRECISION) are ignored.

@RussTedrake
Copy link
Contributor

i can't see a good reason for not using --cflags instead. but we'll obviously want to test that. On quick inspection, all of the files in my build/lib/pkgconfig directory have only -I commands in their cflags... so it looks pretty safe.

russt-laptop% grep Cflags *
bot2-core.pc:Cflags: -I${includedir}
bot2-frames-renderers.pc:Cflags: -I${includedir}
bot2-frames.pc:Cflags: -I${includedir}
bot2-lcmgl-client.pc:Cflags: -I${includedir}
bot2-lcmgl-renderer.pc:Cflags: -I${includedir}
bot2-param-client.pc:Cflags: -I${includedir}
bot2-vis.pc:Cflags: -I${includedir}
bullet.pc:Cflags: -I/Users/russt/locomotion/drake-distro/build/include/bullet
drake-java.pc:Cflags: -I${includedir}
drake-qp.pc:Cflags: -I${includedir}
drake-rbm.pc:Cflags: -I${includedir}
eigen3.pc:Cflags: -I/Users/russt/locomotion/drake-distro/build/include/eigen3
gurobi.pc:Cflags: -I${includedir}
lcm.pc:Cflags: -I${includedir}
lcmtypes_bot2-core.pc:Cflags: -I${includedir}
lcmtypes_bot2-frames.pc:Cflags: -I${includedir}
lcmtypes_bot2-lcmgl.pc:Cflags: -I${includedir}
lcmtypes_bot2-param.pc:Cflags: -I${includedir}
lcmtypes_bot2-procman.pc:Cflags: -I${includedir}
lcmtypes_drake-java.pc:Cflags: -I${includedir}
snopt.pc:Cflags: -I${includedir}
snopt_c.pc:Cflags: -I${includedir} -I/Users/russt/locomotion/drake-distro/build/include/snopt
snopt_cpp.pc:Cflags: -I${includedir} -I/Users/russt/locomotion/drake-distro/build/include/snopt

@avalenzu
Copy link
Author

The problem is that the pods macro doesn't just append the cflags, it strips out the directory names and then adds them as include directories via cmake

@RussTedrake
Copy link
Contributor

oh. i see. so it's possible but annoying to have to do the same thing for the remaining flags.

On Mar 27, 2014, at 1:41 PM, Andres Valenzuela [email protected] wrote:

The problem is that the pods macro doesn't just append the cflags, it strips out the directory names and then adds them as include directories via cmake


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants