Skip to content

Commit

Permalink
make fortran optional, add xml test file
Browse files Browse the repository at this point in the history
  • Loading branch information
filiatra committed Apr 23, 2024
1 parent 5168439 commit db3683e
Show file tree
Hide file tree
Showing 3 changed files with 1,185 additions and 3 deletions.
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
##
######################################################################

project(gsCInterface LANGUAGES C Fortran)
project(gsCInterface LANGUAGES C)

include(CheckLanguage)
check_language(Fortran)
if(CMAKE_Fortran_COMPILER)
enable_language(Fortran)
else()
message(STATUS "No Fortran support")
endif()

# Apply G+Smo config
include(gsConfig)
Expand Down Expand Up @@ -43,4 +51,7 @@ 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)
add_gismo_executable(${CMAKE_CURRENT_SOURCE_DIR}/examples/geometry_fexample.F90)

if(CMAKE_Fortran_COMPILER)
add_gismo_executable(${CMAKE_CURRENT_SOURCE_DIR}/examples/geometry_fexample.F90)
endif()
2 changes: 1 addition & 1 deletion examples/geometry_fexample.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ program geometry_fexample
! TODO: input option for xml-file?

write(*,'(2(a,f5.1),a,i3)') 'reading XML for tensor B-spline'
some_file = 'optional/gsWRContact/examples/sw_crossing/sw_tp.xml' // C_NULL_CHAR
some_file = 'sw_tp.xml' // C_NULL_CHAR
g = gsCReadFile(some_file)

write(*,'(a,i3)') 'done, g.dim=', gsFunctionSet_domainDim(g)
Expand Down
Loading

0 comments on commit db3683e

Please sign in to comment.