diff options
author | Brad King <brad.king@kitware.com> | 2016-02-05 13:55:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-05 14:26:44 (GMT) |
commit | c5eb21b6d1f4187778ad49545761a818e1126541 (patch) | |
tree | 1ee13587cb37984b90e9bd4cbcab178a2c0ed5b8 /Tests/Fortran/Executable | |
parent | a5a5a6857241c21d306661d723b749839f4c6e1a (diff) | |
download | CMake-c5eb21b6d1f4187778ad49545761a818e1126541.zip CMake-c5eb21b6d1f4187778ad49545761a818e1126541.tar.gz CMake-c5eb21b6d1f4187778ad49545761a818e1126541.tar.bz2 |
Fix dependency scanning configuration in subdirectories
Refactoring in commit v3.5.0-rc1~347^2~2 (Set the current dirs on the
snapshot before creating the cmMakefile) accidentally changed the
source and binary directories configured in `cmake -E cmake_depends`
for use during dependency scanning. This can cause the wrong directory
information to be loaded. It also breaks Fortran module dependency
scanning for modules provided by targets in subdirectories that do
not have Fortran_MODULE_DIRECTORY set.
Fix the dependency scanning directory configuration and add a test to
cover the Fortran module case in which the breakage was observed.
Reported-by: Kelly Thompson <kgt@lanl.gov>
Diffstat (limited to 'Tests/Fortran/Executable')
-rw-r--r-- | Tests/Fortran/Executable/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/Fortran/Executable/main.f90 | 1 |
2 files changed, 2 insertions, 1 deletions
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 |