diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 4d107f9da6..0ee0ef3772 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -553,8 +553,8 @@ if(BUILD_TOOLS) install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR}) include(CheckGeneratorSupport) + enable_language(Fortran) if(CMAKE_GENERATOR_SUPPORT_FORTRAN AND CMAKE_Fortran_COMPILER) - enable_language(Fortran) add_executable(chain.x ${LAMMPS_TOOLS_DIR}/chain.f) target_link_libraries(chain.x PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) install(TARGETS chain.x DESTINATION ${CMAKE_INSTALL_BINDIR})