Skip to content

Commit

Permalink
Taking care of .F90 file names
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo authored and LecrisUT committed Feb 27, 2023
1 parent abacf62 commit f343e1b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/fortran_api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if(NOT Spglib_FOUND)
endif()


add_executable(example_f example_f08.f90)
add_executable(example_f example_f08.F90)
if(Spglib_FOUND)
# Linking using native cmake
target_link_libraries(example_c PUBLIC
Expand Down
4 changes: 2 additions & 2 deletions example/fortran_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ spglib in a cmake project, using either native cmake options or pkg-config.

## Examples of linking to spglib manually

To manually compile `example.f90`:
To manually compile `example.F90`:

```console
gfortran example.f90 -I[include directory] -L[library directory] -lsymspg
gfortran example.F90 -I[include directory] -L[library directory] -lsymspg
```

where `[include directory]` and `[library directory]` are taken from `pkg-config --cflags --libs spglib_f08`.
3 changes: 0 additions & 3 deletions example/fortran_api/example_full.f90
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
! How to make
! % gfortran example_f08.f90 ../lib/libspglib_f08.a ../lib/libsymspg.a -I../include

program spglib_example
use, intrinsic :: iso_c_binding
implicit none
Expand Down
6 changes: 3 additions & 3 deletions fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Main fortran wrapper
add_library(Spglib_fortran spglib_f08.f90)
add_library(Spglib_fortran spglib_f08.F90)
add_library(Spglib::fortran ALIAS Spglib_fortran)

# Configure Fortran wrapper
Expand All @@ -8,9 +8,9 @@ set_target_properties(Spglib_fortran PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}
EXPORT_NAME fortran
OUTPUT_NAME spglib_f08
PUBLIC_HEADER spglib_f08.f90)
PUBLIC_HEADER spglib_f08.F90)
set_target_properties(Spglib_fortran PROPERTIES
PUBLIC_HEADER spglib_f08.f90)
PUBLIC_HEADER spglib_f08.F90)
target_include_directories(Spglib_fortran PUBLIC
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
target_link_libraries(Spglib_fortran PUBLIC Spglib_symspg)
Expand Down
2 changes: 1 addition & 1 deletion test/fortran/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_library(test_utils STATIC utils.f90 c_interface_module.F90)
add_library(test_utils STATIC utils.F90 c_interface_module.F90)

# Generated ctest file that switches and displays tests
# Note must be plain C because generated CPP file does not include extern "C"
Expand Down
File renamed without changes.

0 comments on commit f343e1b

Please sign in to comment.