Skip to content

Commit

Permalink
set CMake_Fortran_MODULE_DIRECTORY in examples that were missing it
Browse files Browse the repository at this point in the history
  • Loading branch information
balos1 committed Jun 17, 2024
1 parent 476b4c1 commit f37dc0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/sunnonlinsol/fixedpoint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ foreach(example_tuple ${fortran_examples})
# check if this example has already been added, only need to add
# example source files once for testing with different inputs
if(NOT TARGET ${example})
# build fortran modules into a unique directory to avoid naming collisions
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir)

# example source files
add_executable(${example} ${example}.f90
${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90)
Expand Down
3 changes: 3 additions & 0 deletions examples/sunnonlinsol/newton/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ foreach(example_tuple ${fortran_examples})
# check if this example has already been added, only need to add
# example source files once for testing with different inputs
if(NOT TARGET ${example})
# build fortran modules into a unique directory to avoid naming collisions
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${example}.dir)

# example source files
add_executable(${example} ${example}.f90
${SUNDIALS_SOURCE_DIR}/examples/utilities/test_utilities.f90)
Expand Down

0 comments on commit f37dc0b

Please sign in to comment.