summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-02-08 15:33:04 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-02-08 15:33:04 (GMT)
commita7e2021fea7f5dee0c8d8c6841819286438c8580 (patch)
treea21259a497240b8809ceebeeb09218e4c8f3d124 /Tests
parent2619317c66ece81a9103731736ed7c8718e45666 (diff)
parentc5eb21b6d1f4187778ad49545761a818e1126541 (diff)
downloadCMake-a7e2021fea7f5dee0c8d8c6841819286438c8580.zip
CMake-a7e2021fea7f5dee0c8d8c6841819286438c8580.tar.gz
CMake-a7e2021fea7f5dee0c8d8c6841819286438c8580.tar.bz2
Merge topic 'fix-Fortran-module-in-subdir'
c5eb21b6 Fix dependency scanning configuration in subdirectories
Diffstat (limited to 'Tests')
-rw-r--r--Tests/Fortran/CMakeLists.txt1
-rw-r--r--Tests/Fortran/Executable/CMakeLists.txt2
-rw-r--r--Tests/Fortran/Executable/main.f901
-rw-r--r--Tests/Fortran/Subdir/CMakeLists.txt2
-rw-r--r--Tests/Fortran/Subdir/subdir.f902
5 files changed, 7 insertions, 1 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 753ce27..ecf38a6 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -223,5 +223,6 @@ if(TEST_MODULE_DEPENDS)
endif()
add_subdirectory(Library)
+ add_subdirectory(Subdir)
add_subdirectory(Executable)
endif()
diff --git a/Tests/Fortran/Executable/CMakeLists.txt b/Tests/Fortran/Executable/CMakeLists.txt
index 55f21ad..de08d86 100644
--- a/Tests/Fortran/Executable/CMakeLists.txt
+++ b/Tests/Fortran/Executable/CMakeLists.txt
@@ -3,6 +3,6 @@ include_directories(${External_BINARY_DIR})
link_directories(${External_BINARY_DIR})
add_executable(subdir_exe2 main.f90)
-target_link_libraries(subdir_exe2 subdir_mods)
+target_link_libraries(subdir_exe2 subdir_mods subdir_mods2)
add_dependencies(subdir_exe2 ExternalTarget)
target_link_libraries(subdir_exe2 myext)
diff --git a/Tests/Fortran/Executable/main.f90 b/Tests/Fortran/Executable/main.f90
index f21156c..640259c 100644
--- a/Tests/Fortran/Executable/main.f90
+++ b/Tests/Fortran/Executable/main.f90
@@ -1,6 +1,7 @@
PROGRAM MAINF90
USE libraryModuleA
USE libraryModuleB
+ USE subdirModuleA
USE externalMod
CALL printExtModGreeting
END PROGRAM MAINF90
diff --git a/Tests/Fortran/Subdir/CMakeLists.txt b/Tests/Fortran/Subdir/CMakeLists.txt
new file mode 100644
index 0000000..52683e5
--- /dev/null
+++ b/Tests/Fortran/Subdir/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_library(subdir_mods2 subdir.f90)
+target_include_directories(subdir_mods2 INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/Tests/Fortran/Subdir/subdir.f90 b/Tests/Fortran/Subdir/subdir.f90
new file mode 100644
index 0000000..68955f6
--- /dev/null
+++ b/Tests/Fortran/Subdir/subdir.f90
@@ -0,0 +1,2 @@
+MODULE subdirModuleA
+END MODULE