skip building chain.x, if no Fortran compiler is available

This commit is contained in:
Axel Kohlmeyer 2020-05-03 04:23:52 -04:00
parent fdb4ba51da
commit d811fd0da7
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 1 additions and 1 deletions

View File

@ -552,7 +552,7 @@ if(BUILD_TOOLS)
install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
include(CheckGeneratorSupport)
if(CMAKE_GENERATOR_SUPPORT_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})