From 96f9d025f18abcd37b4d7e2c8152eba46a603486 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Wed, 5 Jun 2024 13:57:52 -0400 Subject: [PATCH] fix disabling fortran --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b281bc68d..134668a29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,7 +204,7 @@ endforeach( OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES ) if(MAKE_PYTHON_WRAPPER) set(CMAKE_SWIG_OUTDIR ${PROJECT_BINARY_DIR}/lib) endif() -if(CMAKE_Fortran_COMPILER) +if(WB_MAKE_FORTRAN_WRAPPER) set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_BINARY_DIR}/mod) endif() @@ -231,7 +231,7 @@ include_directories("include/" "tests/" "${CMAKE_CURRENT_BINARY_DIR}/include") # Add source directory file(GLOB_RECURSE SOURCES_CXX "source/world_builder/*.cc" "${PROJECT_BINARY_DIR}/source/world_builder/*.cc") -if(CMAKE_Fortran_COMPILER) +if(WB_MAKE_FORTRAN_WRAPPER) file(GLOB_RECURSE SOURCES_FORTRAN "source/world_builder/*.f90") endif() @@ -561,7 +561,7 @@ install(CODE "message(Installing...)") install(TARGETS ${WB_TARGET} EXPORT WorldBuilder DESTINATION bin) install(EXPORT WorldBuilder DESTINATION bin) -if(CMAKE_Fortran_COMPILER) +if(WB_MAKE_FORTRAN_WRAPPER) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/mod/worldbuilder.mod DESTINATION include) endif()