Skip to content

Commit

Permalink
fix: Fixup #421 (#427)
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
  • Loading branch information
LecrisUT committed Feb 7, 2024
1 parent 62843bc commit 5b18822
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmake/SpglibConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ find_package_with_comps(PACKAGE Spglib PRINT LOAD_ALL_DEFAULT HAVE_GLOBAL_SHARED

check_required_components(Spglib)

get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
# For Fortran targets, check that the modules are usable with the current compiler
if (CMAKE_Fortran_COMPILER AND TARGET Spglib::fortran_mod)
if (Fortran IN_LIST languages AND TARGET Spglib::fortran_mod)
# TODO: CMake 3.25 use the modern try_compile signature. Remove the explicit CMakeScratch
try_compile(spglib_fortran_try_compile ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeScratch/spglib_fortran
SOURCES ${CMAKE_CURRENT_LIST_DIR}/try_compile.f90
Expand Down

0 comments on commit 5b18822

Please sign in to comment.