Closed bircoph closed 9 years ago
The idea behind this behaviour is the following:
another reason:
What do you think?
- examples serve no practical purpose - only educational.
+1 for not building / installing examples.
We are closing this for now. Should there be more reasons to build/install examples feel free to reopen.
1) My idea is very simple: if examples are being built, they should be installed.
Right now default behaviour is to build examples, but not to install them. This is strange and just wastes CPU time. If you consider examples not useful for general public, disable them by default. But if user asks for the examples, they should be installed as well.
In Gentoo we have special USE flag for this: USE=examples, so users may configure either globally or per-package if they want usage/config/educational/etc examples or not.
2) Dumping output in $PWD is OK. Of course, examples should be runnable from any directory where user can write, not only from the directory where binary file lies.
However there is a problem here: some examples need input data files (examples/input_data) and, as far as I can see from the code, example programs try to read them from $PWD, which is wrong. Some preconfigured location should be checked as well.
Which "preconfigured location" would you suggest, so it stays platform independent?
What do you think about following scenario:
As for reading input data we suggest to introduce a parameter --input-file
without a default value that will accomodate the path to the input file.
sounds reasonable to me and consistent with other projects practice
Done. We left examples enabled by default, to make life easier for those who work directly with the tarball - @ghisvail, you'll have to disable it for the distro.
- install them into bin
Please then consider renaming them into something like asl-$examplename. Otherwise there will be random collisions with other packages. General names like "flow" and "compressor" will be definitely a pain.
As for reading input data we suggest to introduce a parameter --input-file without a default value that will accomodate the path to the input file
Why not to set default to "share/ASL/examples/input_data" since files will be installed there anyway?
Please then consider renaming them into something like asl-$examplename. Otherwise there will be random collisions with other packages. General names like "flow" and "compressor" will be definitely a pain.
Yes, I was wondering how it is done on Gentoo... will do.
Why not to set default to "share/ASL/examples/input_data" since files will be installed there anyway?
- it would require configuring source code by cmake - this would make examples more complicated
- those who download and work with the tarball will often not install the examples but rather play with them in the build tree (thats why we have initially enabled examples without installing them) - in that case input data is not in
share
Done
Hi,
right now if ASL is configured with examples enabled (default behaviour) examples are built, but not installed during cmake install phase. CMakeLists.txt for examples contain no installation instructions, please fix this.
It should be the best to install binaries together with their source code, so that users will be able to learn how they work.