-----------------------------------
TODOs for the Trilinos/CMake System
-----------------------------------


Active items:
-------------

(*) [Brent] Get a Windows machine set up to build Trilinos Dev with CMake and
run nightly tests.

(*) [Everyone] Clean up existing failures:
- [Brent] PyTrilnos: Get building and running on Darwin or ask Bill Spotz to
do it ... File a bug report ...
- [Brent] File bug report for Sundance failure (look for existing bug) ...


Backlog:
--------

(*) [???] Improving nightly testing:
- Implement a script to inform a group of people when a build on a test
machine if finished
- Implement a system of safeguards to make sure that nightly tests end when
they should.  For exmaple, you could check to see if the builds finished by 8
AM in the morning and if they have not, send out an email to
trilinos-framework@sandia.gov
- Standarize testing of primary and secondary stable code
- Add automated support for turning on SS TPLs when building (TPL_ENABLE_ALL)
- Add variable Trilinos_EXCLUDE_TESTS_REGEX that can be set to exclude
specific tests from being run.  You can pass in this REGEX to CTEST_TEST(...) 
with the EXCLUDE option.  We need the ability to disable particular tests on
specific machines for specific build cases.
- Add testing for MOOCHO with MA28 on gabriel or godel
- Add a no-Fortran build
- Add build for explicit MPI compiler, headers, and library
- Add build without complex support
- Add build without float support
- Add build without complex or float support
- Add a build with Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF

(*) [???] Turn on shared libraries by default on Mac and Linux: Switching to
shared libraries by default will save on disk space and could speed up
pre-checkin testing when only libraries need to be rebuilt and rerun the
tests.

(*) [???] Address TPL intra-dependencies: The current TPL handling system only
implicitly addresses intra-TPL dependencies.  For example, if you enable PETSc
you also need BLAS and LAPACK.  However, the TPL system does not really know
that.  If a Trilinos package depends on PETSc then it must currently also list
LAPACK and BLAS as TPLs also.  To fix this problem, we could update the
Trilinos/cmake/TrilinosTPLs.cmake file to add a third column which lists the
TPL intra-dependencies.  For example, for LAPACK we would list "BLAS".  For
PETSc, we would list "LAPACK;BLAS".  When, we would upgrade the CMake code to
automatically add the correct TPL dependencies for a given TPL.  This will
take some work but it will be necessary in order to make the system more
robust.

(*) [???] Get PyTrilinos updated:
- Enable BUILD_SHARED=ON if Trilinos_ENABLE_PyTrilinos=ON if BUILD_SHARED is
not already set.
- Report an error if Trilinos_ENABLE_PyTrilinos=ON but BUILD_SHARED=OFF and
fail the configure step.
- Enable testing for PyTrilinos on godel by setting
PYTHONPATH=/home/wfspotz/lib64/python2.4/site-packages on the environment.
You can also set this as a CMake variable I think.

(*) [???] Add the GCC option -Wextra to the list of default strong warning
options.  Many of these options may already be covered by -ansi -pedantic but
we just need to check this before adding this.

(*) [???] Add the option TPL_ENABLE_ALL_TPLS that will be set to OFF by
default but when set to ON will enable all PS TPLs and when
Trilinos_ENABLE_SECONDARY_STABLE_CODE=ON will also enable all SS TPLs.
Therefore, by setting Trilinos_ENABLE_ALL_PACKAGES=ON, TPL_ENABLE_ALL_TPLS=ON,
and Trilinos_ENABLE_SECONDARY_STABLE_CODE=ON and this will make sure that you
capture all of the SS code and make sure that you test correctly.

(*) [???] Update all SS optional enables in Trilinos to have a default value
based on Trilinos_ENABLE_SECONDARY_STABLE_CODE to turn on by default those
parts of their package that they don't consider PS code but are SS.  For
example, EpetraExt_BUILD_GRAPH_REORDERINGS should default to ON if
Trilinos_ENABLE_SECONDARY_STABLE_CODE=ON.

(*) [???] Revise how the Trilinos framework dependency files and unit tests
are handled.  Right now, CMake will create the dependency files and define the
unit tests by default for every configure.  This is overkill and makes
frequent configures take longer than they should.  Instead, we should consider
turning off dependency unit testing by default.  Then, we can turn on the
generation of the dependency files and enable the dependency unit tests when
doing pre-checkin testing.  Also, we need to add a 'TrilinosFramework' build
case (i.e. label) that will run all of the dependency unit tests.  This will
then be reported on the CDash dashboard so we can track it.

(*) [???] Add CREATE_TEST_SUBDIR, CREATE_POSTFIXES_SUBDIRS, and
POSTFIXES_AND_ARGS arguments for PACKAGE_ADD_[EXECUTABLE_AND]_TEST(...).
These will allow you to save output files that get produced so you can review
them after you run.  This will be very useful for MOOCHO tests that write
several files for every run.  The problem is that CTest currently does not
allow you to specify working directories for tests so I will have to call
PACAKGE_ADD_ADVANCED_TEST(...) internally to create the actuall
subdirectories.  I will also have to put in an option PRESERVE as an argument
to [OVERALL_WORKING_DIRECTORY <overallWorkingDir> [PRESERVE]] to
PACAKGE_ADD_ADVANCED_TEST(...) that will keep the top-level working directory.

(*) [???] Write a module that will determine and print out the compiler
version.  This is important for the nightly testing output.  A suggestion was
given on the cmake@cmake.org list which was "If you look through the
FindBoost.cmake file that comes with CMake around line 535 you may be able to
pull out that code which does a pretty decent job of determining compiler
versions".

(*) [???] Resolve the runtime MPI errors on godel: Perhaps we should just
rebuild and reinstall MPI on godel.

(*) [???] Add installation testing for the CMake build system.  Here, we will
build and install libraries, and then configure the tests and examples in a
new build directory against this.  It would be good to install a
PACKAGEConfig.cmake file for each package that could then be used to specify
what to build against.  We could also consider makefile fragments instead and
just kill two birds with one stone.

(*) [???] Revise the behavior of Trilinos_ENABLE_ALL_OPTIONAL_PACKAGES=ON so
that it only enables packages needed for the initial set of enabled packages.
Currently, all packges used by the libraries and the tests are being enabled.
However, this is too much.  You only need to enable the optional and required
packages for the tests and examples of the initial set of required packages.
To implement the right set of packages, first you need to loop forward over
all of the currently enabled packages that have enabled tests and/or examples
and enable all of the packages that are test/example dependencies (required
and optional).  Then you need to loop in reverse over all currenty enabled
packages and enable all required and optional library dependent packages.  At
the end of this, all of the packages that could possibly affect the libraries,
tests and examples of the set of initially enabled packages will be enabled.

(*) [???] Add option SKIPMEMCHECK to PACKAGE_ADD_[EXECUTABLE_AND_]TEST(...) to
add test to CMAKE_CUSTOM_MEMCHECK_IGNORE that gets written to
CTestCustomer.ctest.

(*) [???] Set the variable CPACK_SOURCE_IGNORE_FILES to ignore groups of files
(and hopefully directories) that you don't want to add to the source
distribution tarball!  We need to be able to set these at the global level as
an internal cache variables and then reset them at the package level.

(*) [???] Change all source files to be globbed and use internal ifdefs to
control what gets built.  This will make it easier to maintain the BJAM build
system.  I have done this for MOOCHO and it is great.

(*) [???] Upgrade Trilinos/CMakeLists.txt and dump-package-dep-table.py add an
option to only show dependencies for enabled packages.  Actually, this could
be done from within the CMake code when generating the XML file to only add
entries for enabled packages.  It would be good to have configure time option
to control this.  By default, only show packages that are enabled.

(*) [???] Update dump-package-dep-table.py to print a table of TPLs that
packages depend on.

(*) [???] Revive system in CMake for generating sample output.  I would like
to have a top-level target called something like
Trilinos_generate_sample_output and this target should dependend on
package-level targets ${PACKAGE_NAME}_generate_sample_output.  Some type of
macro should be created to automate this process.

(*) [???] Add an auto-documentation print system so that each package has
detailed documentation on what options that it supports.  In this way, we
could provide an option like Trilinos_PRINT_DOCUMENTATION who's main purpose
was to print out a complete set of documentation at the top level and for all
of the enabled packages.  I think that we could set this up so that it would
automatically print out all of the cache variables with documentation inside
of the detailed documentation.  We may need to an external tool to do this
that would read everything out of CMakeCache.txt.

(*) [???] Create automated support for stripping out all "Experimental" code
(both files and code inside of ifdefs) so that we don't put it out in releases
of Trilinos.  This negates the need for the autotools way of creating
tarballs.  Or, you could add to the CPACK_SOURCE_IGNORE_FILES varaible
automatically to exclude all such files.

(*) [???] Add the Trilinos LGPL license to the NSIS installer


Tentative:
----------

(*) [???] Add installation testing for the autotools installed libraries.
This will be done in the same way as with the CMake built and installed
libraries and headers instead we will use the autotools system to build and
install the libraries and headers instead.  The CMake build system would be
used to configure and build the tests and examples against the installed
libraries and headers.
