diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2012-01-27 16:14:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-02-09 13:38:52 (GMT) |
commit | 48a09f82ccadf93eb2d60c9efe5da783327a8520 (patch) | |
tree | d6a8acaca1b3bfa6c4288d36c956a48324d506d7 /Modules/CMakeAddFortranSubdirectory.cmake | |
parent | 067c1f44a80ed8fb32e56918a57437142c64b049 (diff) | |
download | CMake-48a09f82ccadf93eb2d60c9efe5da783327a8520.zip CMake-48a09f82ccadf93eb2d60c9efe5da783327a8520.tar.gz CMake-48a09f82ccadf93eb2d60c9efe5da783327a8520.tar.bz2 |
CMakeAddFortranSubdirectory: Make IMPORTED targets GLOBAL
cmake_add_fortran_directory uses imported targets when using the
mingw fortran compiler. This change makes those targets global
in scope so they act just like the real targets that exist when
a fortran compiler exists and regular add_subdirectory is used.
Diffstat (limited to 'Modules/CMakeAddFortranSubdirectory.cmake')
-rw-r--r-- | Modules/CMakeAddFortranSubdirectory.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake index c846b55..5c3e9a2 100644 --- a/Modules/CMakeAddFortranSubdirectory.cmake +++ b/Modules/CMakeAddFortranSubdirectory.cmake @@ -25,7 +25,7 @@ # function is invoked. #============================================================================= -# Copyright 2011 Kitware, Inc. +# Copyright 2011-2012 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. @@ -151,7 +151,7 @@ function(cmake_add_fortran_subdirectory subdir) ) # create imported targets for all libraries foreach(lib ${libraries}) - add_library(${lib} SHARED IMPORTED) + add_library(${lib} SHARED IMPORTED GLOBAL) set_property(TARGET ${lib} APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG) set_target_properties(${lib} PROPERTIES IMPORTED_IMPLIB_NOCONFIG "${library_dir}/lib${lib}.lib" |