forked from lijiext/lammps
cmake: enable Fortran before checking for the compiler
This commit is contained in:
parent
260e6bafd5
commit
b5af7da2c6
|
@ -553,8 +553,8 @@ if(BUILD_TOOLS)
|
||||||
install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(TARGETS binary2txt DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
include(CheckGeneratorSupport)
|
include(CheckGeneratorSupport)
|
||||||
if(CMAKE_GENERATOR_SUPPORT_FORTRAN AND CMAKE_Fortran_COMPILER)
|
|
||||||
enable_language(Fortran)
|
enable_language(Fortran)
|
||||||
|
if(CMAKE_GENERATOR_SUPPORT_FORTRAN AND CMAKE_Fortran_COMPILER)
|
||||||
add_executable(chain.x ${LAMMPS_TOOLS_DIR}/chain.f)
|
add_executable(chain.x ${LAMMPS_TOOLS_DIR}/chain.f)
|
||||||
target_link_libraries(chain.x PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
target_link_libraries(chain.x PRIVATE ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
|
||||||
install(TARGETS chain.x DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(TARGETS chain.x DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
Loading…
Reference in New Issue