diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Fortran/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/FortranOnly/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/FortranOnly/world.f | 9 |
3 files changed, 9 insertions, 5 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index c216529..ba0bdcc 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -161,8 +161,10 @@ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90) add_executable(test_use_in_comment_fixedform test_use_in_comment_fixedform.f) + set_property(SOURCE test_use_in_comment_fixedform.f PROPERTY Fortran_FORMAT FIXED) add_executable(test_use_in_comment_freeform test_use_in_comment_freeform.f90) + set_property(SOURCE test_use_in_comment_freeform.f90 PROPERTY Fortran_FORMAT FREE) add_executable(test_in_interface in_interface/main.f90 diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt index 3c4f0e7..d57a8b2 100644 --- a/Tests/FortranOnly/CMakeLists.txt +++ b/Tests/FortranOnly/CMakeLists.txt @@ -4,6 +4,9 @@ message("CTEST_FULL_OUTPUT ") # create a library with hello and world functions add_library(FortranOnlylib hello.f world.f) +set_property(TARGET FortranOnlylib PROPERTY Fortran_FORMAT FIXED) +set_property(SOURCE world.f PROPERTY Fortran_FORMAT FREE) + # create an executable that calls hello and world add_executable(FortranOnly testf.f) target_link_libraries(FortranOnly FortranOnlylib) diff --git a/Tests/FortranOnly/world.f b/Tests/FortranOnly/world.f index deae3fa..342b244 100644 --- a/Tests/FortranOnly/world.f +++ b/Tests/FortranOnly/world.f @@ -1,5 +1,4 @@ - SUBROUTINE WORLD - - PRINT *, 'World!' - - END +! Free-format ".f" file to test Fortran_FORMAT property +SUBROUTINE WORLD + PRINT *, 'World!' +END |