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
"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)
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:
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