Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

cmake: drop WITH_GMX in cmake in favor of auto-detect #523

Merged
merged 3 commits into from
Apr 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ stages:
-DBUILD_OWN_GROMACS=${BUILD_GROMACS} ${BUILD_GROMACS:+-DENABLE_WARNING_FLAGS=OFF}
-DMODULE_BUILD=${MODULE_BUILD} ${MODULE_BUILD:+-DCMAKE_INSTALL_PREFIX=/home/votca/votca.install}
${MINIMAL:+-DCMAKE_DISABLE_FIND_PACKAGE_HDF5=ON -DCMAKE_DISABLE_FIND_PACKAGE_FFTW3=ON
-DCMAKE_DISABLE_FIND_PACKAGE_MKL=ON -DBUILD_MANPAGES=OFF -DWITH_GMX=OFF -DBUILD_XTP=OFF -DENABLE_REGRESSION_TESTING=OFF}
-DCMAKE_DISABLE_FIND_PACKAGE_MKL=ON -DBUILD_MANPAGES=OFF -DCMAKE_DISABLE_FIND_PACKAGE_GROMACS=ON -DBUILD_XTP=OFF -DENABLE_REGRESSION_TESTING=OFF}
- cmake --build . -- -j2
- ctest --output-on-failure
- test -z "${MODULE_BUILD}" && DESTDIR=${PWD}/install cmake --build . --target install && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ For more detailed information about the changes see the history of the
* update boundary class (#457)
* fix usage of PROJECT_SOURCE_DIR in cmake (#517)
* document cmake options and packages (#520)
* drop WITH_GMX in cmake in favor of auto-detect (#523)

## Version 1.6.1 (released XX.04.20)
* add support for cma-3 (#158)
Expand Down
20 changes: 8 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,14 @@ if(DEFINED VOTCA_TOOLS_VERSION AND NOT VOTCA_TOOLS_VERSION STREQUAL PROJECT_VERS
message(FATAL_ERROR "Incompatible VOTCA Tools version found (needed ${PROJECT_VERSION}, found ${VOTCA_TOOLS_VERSION})")
endif()

option(WITH_GMX "Build gromacs reader/writer, disabling leads to reduced functionality!" ON)
add_feature_info(WITH_GMX WITH_GMX "Enable gromacs file readers/writers")
if (WITH_GMX)
find_package(GROMACS 2021 QUIET CONFIG NAMES gromacs gromacs_d)
set_package_properties(GROMACS PROPERTIES TYPE RECOMMENDED PURPOSE "Used to read gromacs data files")
if(NOT GROMACS_FOUND)
find_package(GROMACS 2016 REQUIRED MODULE)
endif()
if(DEFINED GROMACS_VERSION AND GROMACS_VERSION VERSION_GREATER_EQUAL "2020")
message(WARNING "Gromacs-2020 and above have no support for tabulated interactions, that are needed for coarse-graining (see and comment on https://gitlab.com/gromacs/gromacs/-/issues/1347)")
endif()
endif(WITH_GMX)
find_package(GROMACS 2021 QUIET CONFIG NAMES gromacs gromacs_d)
set_package_properties(GROMACS PROPERTIES TYPE RECOMMENDED PURPOSE "Used to read/write gromacs data files")
if(NOT GROMACS_FOUND)
find_package(GROMACS 2016 MODULE)
endif()
if(GROMACS_FOUND AND DEFINED GROMACS_VERSION AND GROMACS_VERSION VERSION_GREATER_EQUAL "2020")
message(WARNING "Gromacs-2020 and above have no support for tabulated interactions, that are needed for coarse-graining (see and comment on https://gitlab.com/gromacs/gromacs/-/issues/1347)")
endif()

find_program(GMX_EXECUTABLE gmx_d gmx)
find_package_handle_standard_args(GMX REQUIRED_VARS GMX_EXECUTABLE)
Expand Down
2 changes: 1 addition & 1 deletion CMakeModules/FindTXT2TAGS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(TXT2TAGS DEFAULT_MSG TXT2TAGS_EXECUTABLE)

IF(NOT TXT2TAGS_FOUND)
message("txt2tags not found, help cmake to find it by setting TXT2TAGS_EXECUTABLE")
message(STATUS "txt2tags not found, help cmake to find it by setting TXT2TAGS_EXECUTABLE")
ENDIF(NOT TXT2TAGS_FOUND)

MARK_AS_ADVANCED( TXT2TAGS_EXECUTABLE )
Expand Down