In order for code, demos, documentation, etc. developed for CGAL to be included in an automated way into the internal (and public) releases of the library, the files must be organized in a specific directory structure, which we describe here. We describe the entire directory structure for a package. Not every package will have all the parts described here. Only the files maintainer, changes.txt and description.txt are obligatory. Submissions should not contain files in other places than described here. Packages may be rejected if they do, and the contents won't go into releases.
The directory structure of a submission should be as follows:
+--- include/CGAL
|
+--- src/
|
+--- test/<testdir>
|
+--- doc_tex/
|
+--- examples/<exampledir>
|
+--- demo/<demodir>
|
+--- auxiliary/
|
+--- scripts/
|
+--- developer_scripts/
|
|- changes.txt
|
|- description.txt
|
|- dont_submit
|
|- long_description.txt
|
|- maintainer
2 Feb 2004 Sylvain Pion
- Fix a memory-leak in file.h.
- Optimized function A::f().
TODO
include/CGAL/my_internal_file.h
Benchmark
name email addressFor example:
Susan Hert hert@mpi-sb.mpg.de
Sylvain Pion Sylvain.Pion@sophia.inria.fr
This directory contains the test suite for the package. Here we just briefly list the files contained in such a directory. For more detailed information about testsuites for CGAL packages refer to Chapter 17.
test/<testdir>
+--- data/
|
+--- include/
|
|- cgal_test
|
|- makefile
|
|- *.C
|
|- *.cin
where the directory <testdir> has a name that corresponds to the package
name.
For testing purposes, such a script can be created using the create_cgal_test script (Section 5.5).
For testing purposes, such a makefile can be created using the script cgal_create_makefile with the argument -t (Section 5.4).
When a test program runs correctly, it should return the value zero, or, more precisely, the value std::EXIT_WITH_SUCCESS defined in <cstdlib>. Test programs may not be graphical and they may not require any user interaction.
./program < program.cin
| advanced |
|
To indicate whether the tests are successful or not, the script writes two one-line messages to a file called error.txt for each target. If something goes wrong during compilation or during execution, an error message is written that starts with the keyword ERROR:; otherwise a message indicating successful compilation or execution is written to this file. Running the script cgal_test must not require any user interaction and the script cleans up after itself by removing object files and executables (usually by using the command make clean).
Custom makefile. In special cases, you may want to provided a custom makefile to fit special needs. Use the two variables $TESTSUITE_CXXFLAGS and $TESTSUITE_LDFLAGS as the first compiler and linker flags, respectively.
| advanced |
|
As described in Chapter 2, the CGAL documentation is organized in subdirectories for each package and the different manuals are assembled from these packages. Contained in these subdirectories are the files required for producing a package's contributions to the different reference and users' manuals. The users' manual input files are located in the package's directory; the reference manual files are be located in a directory named _ref . For both the users' manual and reference manual parts, the input can be split into more than one file (In fact, this is necessary for the reference manual in order to support conversion to HTML; see Section 2.4.), but there must be a file called main.tex in both the user and reference manual directories that inputs all the other files for that manual part. (Note: You should use the \input command and NOT the \include command to input other source files in this file, and they have to include their files using relative paths starting in the doc_tex directory.)
For example, the optimisation package of the basic library can have the following documentation.
doc_tex/Optimisation
|--- main.tex
|
|--- *.tex
|
+--- *.((ps)|(eps)|(pdf)|(gif)|(jpg)|(png))
doc_tex/Optimisation_ref/
|--- main.tex
|
|--- intro.tex
|
|--- *.tex
|
+--- *.((ps)|(eps)|(pdf)|(gif)|(jpg)|(png))
file,
and include those files in main.tex using the \input
macro.
Historical Notes. Once upon a time a file called htmlfiles has been used to indicate files (e.g., images) to be used for the html conversion. This file is no longer needed nor is it evaluated anymore. The functionality is now provided by an mechanism in the latex_to_html converter to find and copy the included raster images automatically. Also the cgal.bib files are not used anymore. They are replaced by a common file doc_tex/Manual/cgal_manual.bib in the Manual package.
Example programs (Chapter 19) for a package should be placed in a subdirectory of the directory examples. The subdirectory name, <exampledir>, will usually correspond to the package name, but this is not a requirement. To make sure that the examples will be tested , a directory with examples should be submitted in exactly the same way as a test directory (Section 4.1).
The structure of an example directory should be as follows:
examples/<exampledir>
+--- data/
|
+--- include/
|
|- README
|
|- cgal_test
|
|- makefile
|
|- *.C
The file README should contain information about what the programs do and how to compile them. See the rules for a test directory for an explanation of the other files and subdirectories.
The demo directory (Chapter 19) contains programs with graphical interfaces or programs requiring user input. These programs will be compiled but not run by the test suite. The structure of this directory should be as follows:
demo/<demodir>
+--- data/
|
+--- include/
|
|- README
|
|- makefile
|
|- *.C
where <demodir> is a name that corresponds (at least in part) to
the package for which it is a demo.
The file README should contain information about what the program does, and how to compile it (i.e., what graphical libraries are needed, etc.). Note that, in contrast to example programs and test suite programs, for demo programs is it necessary to submit a makefile since different demos will require different libraries and thus the makefiles for these programs will be somewhat dissimilar.
Requirements:
Recommendations: