From d811fd0da7cd5ccf17d5138be3153d13e21747d3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 3 May 2020 04:23:52 -0400 Subject: [PATCH] skip building chain.x, if no Fortran compiler is available --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index e097a9fc1e..9cc48a2458 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -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})