Skip to content

Commit

Permalink
add NOFORTARN switch to disable fortran language
Browse files Browse the repository at this point in the history
  • Loading branch information
filiatra committed Nov 7, 2024
1 parent fc2a083 commit a4a744f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ project(gsCInterface LANGUAGES CXX)

include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
if(CMAKE_Fortran_COMPILER AND NOT NOFORTRAN)
enable_language(Fortran)
include(FortranCInterface)
FortranCInterface_VERIFY(CXX)
Expand All @@ -20,7 +20,7 @@ endif()
include(gsConfig)

if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -names lowercase")
# set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -names lowercase")
elseif ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} /names:lowercase")
endif()
Expand Down Expand Up @@ -61,6 +61,6 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/"
add_gismo_executable(${CMAKE_CURRENT_SOURCE_DIR}/examples/basis_cexample.c)
add_gismo_executable(${CMAKE_CURRENT_SOURCE_DIR}/examples/geometry_cexample.c)

if(CMAKE_Fortran_COMPILER)
if(CMAKE_Fortran_COMPILER AND NOT NOFORTRAN)
add_gismo_executable(${CMAKE_CURRENT_SOURCE_DIR}/examples/geometry_fexample.F90)
endif()

0 comments on commit a4a744f

Please sign in to comment.