[gmx-users] Using libgromacs in a CMake project built on the fly?
Cory J. Geesaman
cory at biocoin.org
Sat Jan 27 04:12:16 CET 2018
Is it possible to use libgromacs in a CMake based project which links the
library in at build time (but from source as opposed to a system-wide
installation?)
So far I have the gromacs source included as a submodule from
https://github.com/gromacs/gromacs.git located in the subdirectory
3rdparty/gromacs/
In my CMakeLists.txt I have:
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/gromacs/src/gromacs
)
and a bit further down:
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} libgromacs)
Which seems to pass the CMake tests, but when it gets to actually building
the project I get the error:
c:/progra~1/mingw/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64
-w64-mingw32/bin/ld.exe: cannot find -llibgromacs
collect2.exe: error: ld returned 1 exit status
I'm sure this is some kind of CMake error but I don't know what it could be
precisely because I'm relatively new to CMake. I'm building with
CLion+MinGW on Windows 7 (but also intend to build on Linux.)
Additionally, are there any significant gromacs-specific performance
concerns I should be aware of building Windows binaries with MinGW or will
it work as well as with a Windows build platform like visual c++?
Thanks for any information,
Cory
More information about the gromacs.org_gmx-users
mailing list