summaryrefslogtreecommitdiff
path: root/Tests/Fortran
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
committerAnas Nashif <anas.nashif@intel.com>2013-02-13 18:21:12 -0800
commitef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (patch)
tree6501b44707b5c6a88fa5f817adee1a3ffcb0012d /Tests/Fortran
parent035c7fabc3b82cbc9a346c11abe2e9462b4c0379 (diff)
downloadcmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.gz
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.tar.bz2
cmake-ef8aa19c33e83ff019595fd7f8fdc29c35c336a3.zip
Imported Upstream version 2.8.10.2upstream/2.8.10.2
Diffstat (limited to 'Tests/Fortran')
-rw-r--r--Tests/Fortran/CMakeLists.txt18
-rw-r--r--Tests/Fortran/Library/CMakeLists.txt14
-rw-r--r--Tests/Fortran/foo.f2
-rw-r--r--Tests/Fortran/test_use_in_comment_freeform.f906
4 files changed, 20 insertions, 20 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index a995f68dd..6e78f4228 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -121,7 +121,7 @@ else()
message("Fortran does not match c compiler")
message("Fortran = ${CMAKE_Fortran_COMPILER_ID}")
message("C = ${CMAKE_C_COMPILER_ID}")
- # hack to make g77 work after CL has been enabled
+ # hack to make g77 work after CL has been enabled
# as a languge, cmake needs language specific versions
# of these variables....
if(WIN32 AND "${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
@@ -154,11 +154,11 @@ 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
+ 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
+ add_executable(test_in_interface
in_interface/main.f90
in_interface/module.f90)
@@ -167,7 +167,7 @@ if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
add_executable(test_preprocess test_preprocess.F90)
set(TEST_MODULE_DEPENDS 1)
-endif(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
+endif()
if(TEST_MODULE_DEPENDS)
# Build the external project separately using a custom target.
@@ -175,10 +175,10 @@ if(TEST_MODULE_DEPENDS)
if(CMAKE_CONFIGURATION_TYPES)
set(External_CONFIG_TYPE -C "${CMAKE_CFG_INTDIR}")
set(External_BUILD_TYPE)
- else(CMAKE_CONFIGURATION_TYPES)
+ else()
set(External_CONFIG_TYPE)
set(External_BUILD_TYPE -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE})
- endif(CMAKE_CONFIGURATION_TYPES)
+ endif()
set(External_SOURCE_DIR "${testf_SOURCE_DIR}/External")
set(External_BINARY_DIR "${testf_BINARY_DIR}/External")
if("${testf_BINARY_DIR}" MATCHES " ")
@@ -211,10 +211,10 @@ if(TEST_MODULE_DEPENDS)
# Test module output directory if available.
if(CMAKE_Fortran_MODDIR_FLAG)
set(Library_MODDIR "${testf_BINARY_DIR}/Library/modules")
- else(CMAKE_Fortran_MODDIR_FLAG)
+ else()
set(Library_MODDIR "${testf_BINARY_DIR}/Library")
- endif(CMAKE_Fortran_MODDIR_FLAG)
+ endif()
add_subdirectory(Library)
add_subdirectory(Executable)
-endif(TEST_MODULE_DEPENDS)
+endif()
diff --git a/Tests/Fortran/Library/CMakeLists.txt b/Tests/Fortran/Library/CMakeLists.txt
index fe1368a07..17438cafb 100644
--- a/Tests/Fortran/Library/CMakeLists.txt
+++ b/Tests/Fortran/Library/CMakeLists.txt
@@ -1,11 +1,11 @@
-INCLUDE_DIRECTORIES(${Library_MODDIR})
-ADD_LIBRARY(subdir_mods a.f90 b.f90)
-ADD_EXECUTABLE(subdir_exe main.f90)
-TARGET_LINK_LIBRARIES(subdir_exe subdir_mods)
+include_directories(${Library_MODDIR})
+add_library(subdir_mods a.f90 b.f90)
+add_executable(subdir_exe main.f90)
+target_link_libraries(subdir_exe subdir_mods)
# Test module output directory if available.
-IF(CMAKE_Fortran_MODDIR_FLAG)
- SET_TARGET_PROPERTIES(subdir_mods PROPERTIES
+if(CMAKE_Fortran_MODDIR_FLAG)
+ set_target_properties(subdir_mods PROPERTIES
Fortran_MODULE_DIRECTORY modules
)
-ENDIF(CMAKE_Fortran_MODDIR_FLAG)
+endif()
diff --git a/Tests/Fortran/foo.f b/Tests/Fortran/foo.f
index dbbb3a4e9..ece0df44c 100644
--- a/Tests/Fortran/foo.f
+++ b/Tests/Fortran/foo.f
@@ -5,5 +5,5 @@
contains
subroutine sub
end subroutine
-
+
end module test_mod
diff --git a/Tests/Fortran/test_use_in_comment_freeform.f90 b/Tests/Fortran/test_use_in_comment_freeform.f90
index c992a041b..48bcd5a21 100644
--- a/Tests/Fortran/test_use_in_comment_freeform.f90
+++ b/Tests/Fortran/test_use_in_comment_freeform.f90
@@ -1,7 +1,7 @@
PROGRAM foo
-! USE bar
-! use bar
-! Use bar
+! USE bar
+! use bar
+! Use bar
WRITE(*,*) 'Hello, Fortran world.'
END PROGRAM