From ee4d9e4394873367c92f6c4c717cc08e8da7ca85 Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Thu, 3 Jul 2014 12:17:39 -0400 Subject: [PATCH] Add running tests to install-guide At least on architectures we don't test, it is necessary that the user runs the tests. Because we don't have a way to query whether it is a tested architecture every user should run the tests. Also add a warning if unit tests cannot be build because libmxl2 wasn't found. Partial fix for #1548 Change-Id: I8b87cc77f909d5cf2a4ee70151096312e3191af2 --- CMakeLists.txt | 3 +++ install-guide/install-guide.md | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5f2ecce19..832dcb44ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -560,6 +560,9 @@ if(GMX_EXTERNAL_BOOST AND NOT Boost_FOUND) "version of Boost included with Gromacs.") endif() +if(NOT DEFINED GMX_BUILD_UNITTESTS AND NOT HAVE_LIBXML2) + message(WARNING "libxml2 not found. Will build GROMACS without unit-tests. This is not recommended, because the unit-tests help to verify that GROMACS functions correctly. Most likely you are missing the libxml2-dev(el) package. After you installed it, set GMX_BUILD_UNITTESTS=ON.") +endif() option(GMX_BUILD_UNITTESTS "Build unit tests with BUILD_TESTING (uses Google C++ Testing and Mocking Frameworks, requires libxml2)" ${HAVE_LIBXML2}) mark_as_advanced(GMX_BUILD_UNITTESTS) gmx_add_cache_dependency(GMX_BUILD_UNITTESTS BOOL BUILD_TESTING OFF) diff --git a/install-guide/install-guide.md b/install-guide/install-guide.md index d780c6be2f..84481d0059 100644 --- a/install-guide/install-guide.md +++ b/install-guide/install-guide.md @@ -13,7 +13,7 @@ at . 3. Get and unpack the latest version of the GROMACS tarball. 4. Make a separate build directory and change to it. 5. Run `cmake` with the path to the source as an argument -6. Run `make` and `make install` +6. Run `make`, `make test`, and `make install` Or, as a sequence of commands to execute: @@ -21,8 +21,9 @@ Or, as a sequence of commands to execute: cd gromacs-@PROJECT_VERSION@ mkdir build cd build - cmake .. -DGMX_BUILD_OWN_FFTW=ON + cmake .. -DGMX_BUILD_OWN_FFTW=ON -DREGRESSIONTEST_DOWNLOAD=ON make + make test sudo make install source /usr/local/gromacs/bin/GMXRC -- 2.22.0