[Cmake-commits] CMake branch, next, updated. v2.8.7-2298-gc110741

Bill Hoffman bill.hoffman at kitware.com
Fri Jan 27 11:18:22 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  c110741cdfb878d0496f37a8c5a0260cdbb677a4 (commit)
       via  4b5e270838275fe0e10e82b3eab175404f4b896b (commit)
       via  5d932d8eb76dbf353f313daf6f4b2d26586ad615 (commit)
      from  070ec8c4d156c6fa8608964c346abba74b961285 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c110741cdfb878d0496f37a8c5a0260cdbb677a4
commit c110741cdfb878d0496f37a8c5a0260cdbb677a4
Merge: 070ec8c 4b5e270
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Fri Jan 27 11:18:18 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 27 11:18:18 2012 -0500

    Merge topic 'cmake_add_fortran_subdirectory' into next
    
    4b5e270 Use GLOBAL option for imported targets, and update test to require that.
    5d932d8 Merge branch 'imported-target-visibility' into cmake_add_fortran_subdirectory


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b5e270838275fe0e10e82b3eab175404f4b896b
commit 4b5e270838275fe0e10e82b3eab175404f4b896b
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Fri Jan 27 11:14:00 2012 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Fri Jan 27 11:14:00 2012 -0500

    Use GLOBAL option for imported targets, and update test to require that.
    
    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.

diff --git a/Modules/CMakeAddFortranSubdirectory.cmake b/Modules/CMakeAddFortranSubdirectory.cmake
index c9604fa..8cfe2fb 100644
--- a/Modules/CMakeAddFortranSubdirectory.cmake
+++ b/Modules/CMakeAddFortranSubdirectory.cmake
@@ -150,7 +150,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"
diff --git a/Tests/VSGNUFortran/CMakeLists.txt b/Tests/VSGNUFortran/CMakeLists.txt
index 422350a..229c315 100644
--- a/Tests/VSGNUFortran/CMakeLists.txt
+++ b/Tests/VSGNUFortran/CMakeLists.txt
@@ -17,23 +17,8 @@ if(CMAKE_CONFIGURATION_TYPES)
   endforeach()
 endif()
 
-include(CMakeAddFortranSubdirectory)
-# add the fortran subdirectory as a fortran project
-# the subdir is fortran, the project is FortranHello
-cmake_add_fortran_subdirectory(fortran
-  PROJECT FortranHello  # project name in toplevel CMakeLists.txt
-  ARCHIVE_DIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-  RUNTIME_DIR bin # ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-  LIBRARIES hello world # target libraries created
-  CMAKE_COMMAND_LINE
-    -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-    -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
-    -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-  LINK_LIBRARIES  # link interface libraries
-   LINK_LIBS hello world  # hello needs world to link
-   )
-
-include_directories(${VSGNUFortran_BINARY_DIR}/fortran)
+add_subdirectory(subdir)
+include_directories(${VSGNUFortran_BINARY_DIR}/subdir/fortran)
 add_subdirectory(c_code)
 # use a cmake script to run the executable so that PATH
 # can be set with the MinGW/bin in it, and the fortran
diff --git a/Tests/VSGNUFortran/subdir/CMakeLists.txt b/Tests/VSGNUFortran/subdir/CMakeLists.txt
new file mode 100644
index 0000000..df018b3
--- /dev/null
+++ b/Tests/VSGNUFortran/subdir/CMakeLists.txt
@@ -0,0 +1,15 @@
+include(CMakeAddFortranSubdirectory)
+# add the fortran subdirectory as a fortran project
+# the subdir is fortran, the project is FortranHello
+cmake_add_fortran_subdirectory(fortran
+  PROJECT FortranHello  # project name in toplevel CMakeLists.txt
+  ARCHIVE_DIR ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+  RUNTIME_DIR bin # ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+  LIBRARIES hello world # target libraries created
+  CMAKE_COMMAND_LINE
+    -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+    -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
+    -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
+  LINK_LIBRARIES  # link interface libraries
+   LINK_LIBS hello world  # hello needs world to link
+   )
diff --git a/Tests/VSGNUFortran/fortran/CMakeLists.txt b/Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt
similarity index 100%
rename from Tests/VSGNUFortran/fortran/CMakeLists.txt
rename to Tests/VSGNUFortran/subdir/fortran/CMakeLists.txt
diff --git a/Tests/VSGNUFortran/fortran/hello.f b/Tests/VSGNUFortran/subdir/fortran/hello.f
similarity index 100%
rename from Tests/VSGNUFortran/fortran/hello.f
rename to Tests/VSGNUFortran/subdir/fortran/hello.f
diff --git a/Tests/VSGNUFortran/fortran/world.f b/Tests/VSGNUFortran/subdir/fortran/world.f
similarity index 100%
rename from Tests/VSGNUFortran/fortran/world.f
rename to Tests/VSGNUFortran/subdir/fortran/world.f

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5d932d8eb76dbf353f313daf6f4b2d26586ad615
commit 5d932d8eb76dbf353f313daf6f4b2d26586ad615
Merge: 5033f4c f9c1c62
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Fri Jan 27 10:30:45 2012 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Fri Jan 27 10:30:45 2012 -0500

    Merge branch 'imported-target-visibility' into cmake_add_fortran_subdirectory


-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeAddFortranSubdirectory.cmake          |    2 +-
 Tests/VSGNUFortran/CMakeLists.txt                  |   19 ++-----------------
 Tests/VSGNUFortran/subdir/CMakeLists.txt           |   15 +++++++++++++++
 .../{ => subdir}/fortran/CMakeLists.txt            |    0
 Tests/VSGNUFortran/{ => subdir}/fortran/hello.f    |    0
 Tests/VSGNUFortran/{ => subdir}/fortran/world.f    |    0
 6 files changed, 18 insertions(+), 18 deletions(-)
 create mode 100644 Tests/VSGNUFortran/subdir/CMakeLists.txt
 rename Tests/VSGNUFortran/{ => subdir}/fortran/CMakeLists.txt (100%)
 rename Tests/VSGNUFortran/{ => subdir}/fortran/hello.f (100%)
 rename Tests/VSGNUFortran/{ => subdir}/fortran/world.f (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list