_gmx_add_files_to_property(GMX_LIBGROMACS_GPU_IMPL_SOURCES ${ARGN})
endfunction ()
-function (gmx_install_headers)
- if (NOT GMX_BUILD_MDRUN_ONLY)
- file(RELATIVE_PATH _dest ${PROJECT_SOURCE_DIR}/src ${CMAKE_CURRENT_LIST_DIR})
- install(FILES ${ARGN}
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_dest}"
- COMPONENT development)
- endif()
- _gmx_add_files_to_property(GMX_INSTALLED_HEADERS ${ARGN})
-endfunction ()
-
-function (gmx_write_installed_header_list)
- get_property(_list GLOBAL PROPERTY GMX_INSTALLED_HEADERS)
- string(REPLACE ";" "\n" _list "${_list}")
- # TODO: Make this only update the file timestamp if the contents actually change.
- file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/installed-headers.txt "${_list}")
-endfunction()
-
# Add these contents first because linking their tests can take a lot
# of time, so we want lots of parallel work still available after
# linking starts.
list(APPEND libgromacs_object_library_dependencies thread_mpi)
configure_file(version.h.cmakein version.h)
-gmx_install_headers(
- analysisdata.h
- commandline.h
- options.h
- random.h
- selection.h
- trajectoryanalysis.h
- utility.h
- ${CMAKE_CURRENT_BINARY_DIR}/version.h
- )
# This code is here instead of utility/CMakeLists.txt, because CMake
# custom commands and source file properties can only be set in the directory
# TODO Perhaps generalize this for all headers from src/external
target_include_directories(libgromacs SYSTEM PRIVATE ${PROJECT_SOURCE_DIR}/src/external)
+# Temporary fix to allow external access to restraintpotentail
+target_include_directories(libgromacs PUBLIC
+ $<INSTALL_INTERFACE:include>
+ )
+
if(SIMD_AVX_512_CXX_SUPPORTED AND NOT ("${GMX_SIMD_ACTIVE}" STREQUAL "AVX_512_KNL"))
# Since we might be overriding -march=core-avx2, add a flag so we don't warn for this specific file.
# On KNL this can cause illegal instruction because the compiler might use non KNL AVX instructions
"${CLANG_TIDY_EXE};-warnings-as-errors=*")
endif()
-gmx_write_installed_header_list()
-
# Only install the library in mdrun-only mode if it is actually necessary
# for the binary
if (NOT GMX_BUILD_MDRUN_ONLY OR BUILD_SHARED_LIBS)
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ INCLUDES DESTINATION include
COMPONENT libraries)
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2010,2011,2012,2013,2014,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB ANALYSISDATA_SOURCES *.cpp modules/*.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${ANALYSISDATA_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- abstractdata.h
- analysisdata.h
- arraydata.h
- dataframe.h
- datamodule.h
- )
-
add_subdirectory(modules)
if (BUILD_TESTING)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2010,2013,2014,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
#
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-
-gmx_install_headers(
- average.h
- displacement.h
- histogram.h
- lifetime.h
- plot.h
- )
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+# Copyright (c) 2012,2013,2014,2015,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB COMMANDLINE_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${COMMANDLINE_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- cmdlinehelpwriter.h
- cmdlineinit.h
- cmdlinemodule.h
- cmdlineoptionsmodule.h
- cmdlineparser.h
- cmdlineprogramcontext.h
- filenm.h
- pargs.h
- viewit.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
# To help us fund GROMACS development, we humbly ask that you cite
# the research papers on the package. Check out http://www.gromacs.org.
-gmx_install_headers(
- string_view.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${COORDINATEIO_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- coordinatefile.h
- enums.h
- ioutputadapter.h
- outputadaptercontainer.h
- outputadapters.h
- outputadapters/outputselector.h
- outputadapters/setatoms.h
- outputadapters/setbox.h
- outputadapters/setforces.h
- outputadapters/setprecision.h
- outputadapters/setstarttime.h
- outputadapters/settimestep.h
- outputadapters/setvelocities.h
- requirements.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
gmx_add_libgromacs_sources(fft_mkl.cpp)
endif()
-gmx_install_headers(fft.h)
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
set(libgromacs_object_library_dependencies ${libgromacs_object_library_dependencies} PARENT_SCOPE)
endif()
-gmx_install_headers(
- confio.h
- enxio.h
- filetypes.h
- gmxfio.h
- mtxio.h
- oenv.h
- pdbio.h
- rgb.h
- tpxio.h
- trrio.h
- trxio.h
- xdr_datatype.h
- xtcio.h
- xvgr.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015,2017,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB GMXANA_SOURCES *.cpp)
-gmx_install_headers(
- gstat.h
- )
-
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${GMXANA_SOURCES} PARENT_SCOPE)
if(BUILD_TESTING)
)
endif()
-# workaround for the state - host allocator dependency
-gmx_install_headers(hostallocator.h)
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
endif()
list(APPEND libgromacs_object_library_dependencies linearalgebra)
set(libgromacs_object_library_dependencies ${libgromacs_object_library_dependencies} PARENT_SCOPE)
-
-gmx_install_headers(
- eigensolver.h
- matrix.h
- sparsematrix.h
- )
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB MATH_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${MATH_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- 3dtransforms.h
- arrayrefwithpadding.h
- do_fit.h
- functions.h
- gmxcomplex.h
- units.h
- utilities.h
- vec.h
- vectypes.h
- paddedvector.h
- )
+# TODO: (https://redmine.gromacs.org/issues/988) Find a new convention for defining public API.
+install(FILES
+ vectypes.h
+ DESTINATION include/gromacs/math)
if (BUILD_TESTING)
add_subdirectory(tests)
)
endif()
-gmx_install_headers(simulationsignal.h)
tpi.cpp
)
-gmx_install_headers()
-
if (BUILD_TESTING)
# TODO import this from src/programs/mdrun/tests
# add_subdirectory(tests)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2015, by the GROMACS development team, led by
+# Copyright (c) 2015,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB MDTYPES_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${MDTYPES_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- inputrec.h
- mdatom.h
- md_enums.h
- state.h
-)
utilities.cpp
)
-gmx_install_headers()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2010,2012,2013,2014,2015,2016,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
treesupport.cpp
)
-gmx_install_headers(
- abstractoption.h
- abstractsection.h
- basicoptions.h
- filenameoption.h
- filenameoptionmanager.h
- ioptionsbehavior.h
- ioptionscontainer.h
- ioptionscontainerwithsections.h
- isectionstorage.h
- ivaluestore.h
- optionfiletype.h
- optionflags.h
- options.h
- optionsection.h
- repeatingsection.h
- timeunitmanager.h
- valuestore.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
file(GLOB PBCUTIL_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${PBCUTIL_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- ishift.h
- pbc.h
- pbcenums.h
- rmpbc.h
- pbc_aiuc.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2015,2016,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB RANDOM_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${RANDOM_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- exponentialdistribution.h
- gammadistribution.h
- normaldistribution.h
- seed.h
- tabulatednormaldistribution.h
- threefry.h
- uniformintdistribution.h
- uniformrealdistribution.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2017,2018, by the GROMACS development team, led by
+# Copyright (c) 2017,2018,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
manager.cpp
restraintmdmodule.cpp
)
-
-gmx_install_headers(restraintpotential.h)
+# TODO this is a hacky way to expose things for the API and needs to be changed to something proper
+install(FILES restraintpotential.h DESTINATION include/gromacs/restraint)
if (BUILD_TESTING)
add_subdirectory(tests)
list(APPEND libgromacs_object_library_dependencies scanner)
set(libgromacs_object_library_dependencies ${libgromacs_object_library_dependencies} PARENT_SCOPE)
-gmx_install_headers(
- nbsearch.h
- indexutil.h
- position.h
- selection.h
- selectioncollection.h
- selectionenums.h
- selectionoption.h
- selectionoptionbehavior.h
- selectionoptionmanager.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+# Copyright (c) 2013,2014,2015,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB TIMING_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TIMING_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- wallcycle.h
- walltime_accounting.h
- )
-
if (BUILD_TESTING)
# add_subdirectory(tests)
endif()
file(GLOB TOPOLOGY_SOURCES *.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TOPOLOGY_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- atomprop.h
- atoms.h
- block.h
- forcefieldparameters.h
- idef.h
- ifunc.h
- index.h
- mtop_util.h
- symtab.h
- topology.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2015,2016,2018, by the GROMACS development team, led by
+# Copyright (c) 2015,2016,2018,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
energyframe.cpp
trajectoryframe.cpp
)
-
-gmx_install_headers(
- energyframe.h
- trajectoryframe.h
- )
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2013,2014,2015,2018, by the GROMACS development team, led by
+# Copyright (c) 2010,2013,2014,2015,2018,2019, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
file(GLOB TRAJECTORYANALYSIS_SOURCES *.cpp modules/*.cpp)
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${TRAJECTORYANALYSIS_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- analysismodule.h
- analysissettings.h
- cmdlinerunner.h
- topologyinformation.h
- )
-
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
endif()
set(LIBGROMACS_SOURCES ${LIBGROMACS_SOURCES} ${UTILITY_SOURCES} PARENT_SCOPE)
-gmx_install_headers(
- alignedallocator.h
- allocator.h
- arrayref.h
- arraysize.h
- basedefinitions.h
- baseversion.h
- classhelpers.h
- cstringutil.h
- current_function.h
- datafilefinder.h
- enumerationhelpers.h
- errorcodes.h
- exceptions.h
- fatalerror.h
- flags.h
- fileptr.h
- futil.h
- gmxassert.h
- init.h
- programcontext.h
- real.h
- smalloc.h
- stringutil.h
- unique_cptr.h
- )
+# TODO: (https://redmine.gromacs.org/issues/988) Find a new convention for defining public API.
+install(FILES
+ basedefinitions.h
+ current_function.h
+ gmxassert.h
+ real.h
+ DESTINATION include/gromacs/utility)
if (BUILD_TESTING)
add_subdirectory(tests)