Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MAKE_POSITION_INDEPENDENT_CODE to geo lib
This basically means that on linux (maybe other compiler configs), cmake will add the -fPIC flag. This amounts to letting you link a static library into a shared library, which is the case when we link geolib.a into the openstudio utilities shared library. This issue only seems to show up on some linux compiler configurations. (not mine) and not windows or mac as far as I have found. In any case we are trusting the cmake abstraction MAKE_POSITION_INDEPENDENT_CODE to do the right thing.
- Loading branch information
25786f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geez, this got hairy
25786f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was pretty happy when I found out cmake had a solution. Otherwise it does get hairy. When do you need to apply fPIC? What platforms? What compilers? With this cmake takes care of it.