Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Simplify CMake Options #111

Closed
markus2330 opened this issue Sep 17, 2014 · 8 comments
Closed

Simplify CMake Options #111

markus2330 opened this issue Sep 17, 2014 · 8 comments

Comments

@markus2330
Copy link
Contributor

Many build combinations are currently broken:
http://build.libelektra.org:8080/job/elektra-multiconfig-gcc47-cmake-options/

There are 8192 possible cmake flag combinations even though many of those do not make sense. E.g. BUILD_PDF only makes sense if BUILD_DOCUMENTATION is active and ENABLE_TESTING only makes sense if BUILD_TESTING is active.

Concrete suggestion how we can reduce flags can be suggested here.

use enum instead of the boolean flags above

Unrelated to the issue, but to improve consistency we will also introduce a BINDINGS cmake variable that works like PLUGINS and TOOLS.

@markus2330 markus2330 added this to the 0.8.9 milestone Sep 17, 2014
@markus2330 markus2330 changed the title Cleanup CMake Options Simplify CMake Options Sep 17, 2014
@manuelm
Copy link
Contributor

manuelm commented Sep 17, 2014

Please first merge #104 before introducing new build flags or variables

@markus2330
Copy link
Contributor Author

@manuelm Thank you for reminding me.
Another issue we already discussed is that testcases do not work with BUILD_SHARED. Thats also a class of combinations where the builds fail. It would be nice to find a solution for that, too. (maybe just collecting all directories of plugins with add_plugins and adding it to LD_LIBRARY_PATH is enough)

@manuelm
Copy link
Contributor

manuelm commented Sep 17, 2014

On my development vm I don't build statically as this just increases build time. Instead I've created a small script which searches for all shared objects below $build/src/plugins and symlinks them into a libs directory. This way I don't have a massive list in LD_LIBRARY_PATH

@markus2330
Copy link
Contributor Author

The buildtime is not increased anymore when add_plugin is used. (It will be compiled once and linked 3 times)

Currently without full+static no tests how build, have you changed CMake for that what you describe?

Maybe setting CMAKE_LIBRARY_OUTPUT_DIRECTORY and CMAKE_RUNTIME_OUTPUT_DIRECTORY in cmake is enough (+ setting LD_LIBRARY_PATH to it)

@manuelm
Copy link
Contributor

manuelm commented Sep 17, 2014

No, didn't change anything.

What I wanted to say is that symlinking the plugins is probably easier and more manageable than building a huge list. Also the bindings already need to modify the library path for their tests so please take this into account.

markus2330 pushed a commit that referenced this issue Sep 17, 2014
also build examples in non-static, non-full
@markus2330
Copy link
Contributor Author

I think the commit is already the solution, using OUTPUT_DIRECTORY the executables using the shared libs+plugins seem to just work. (Of course now the ifs for linking the correct thing is needed everywhere, a cmake function should be able to do it at one place)

@markus2330 markus2330 removed this from the 0.8.9 milestone Nov 6, 2014
@markus2330
Copy link
Contributor Author

Lots of progress, see http://build.markus-raab.org:8080/job/elektra-multiconfig-gcc47-cmake-options/

BINDINGS is introduced and works nicely

still open is BUILD_PDF, but thats a minor issue, and documentation of CMake flags should be improved

@markus2330
Copy link
Contributor Author

No real reason to break existing packages by changing BUILD_PDF, so I will close this for now.

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

No branches or pull requests

2 participants