[Cmake-commits] CMake branch, next, updated. v2.8.6-2192-gf8dc56c

Bill Hoffman bill.hoffman at kitware.com
Tue Dec 13 15:39:21 EST 2011


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  f8dc56c6da2668dbe98077412d76a155e823e167 (commit)
       via  b8869c4d6633004406e4a273e856a366ed9bc7fb (commit)
       via  c867735f093d3290c055215715b8301cfc32b3d2 (commit)
      from  a32595ab011d8b5159967943f9d323e60cb13258 (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=f8dc56c6da2668dbe98077412d76a155e823e167
commit f8dc56c6da2668dbe98077412d76a155e823e167
Merge: a32595a b8869c4
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Tue Dec 13 15:39:20 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Dec 13 15:39:20 2011 -0500

    Merge topic 'cmake_add_fortran_subdirectory' into next
    
    b8869c4 Make sure the exe, dll, and lib files all end up in the same place.
    c867735 Add magic comments to get intel windows fortran compiler to export syms.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8869c4d6633004406e4a273e856a366ed9bc7fb
commit b8869c4d6633004406e4a273e856a366ed9bc7fb
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Tue Dec 13 15:34:42 2011 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Tue Dec 13 15:34:42 2011 -0500

    Make sure the exe, dll, and lib files all end up in the same place.
    
    This commit fixes the build for VS 2010 so that the exe and dlls for
    the project end up in a consistent directory which makes it easier to
    run the test.

diff --git a/Tests/VSGNUFortran/CMakeLists.txt b/Tests/VSGNUFortran/CMakeLists.txt
index 973fe5c..e91453c 100644
--- a/Tests/VSGNUFortran/CMakeLists.txt
+++ b/Tests/VSGNUFortran/CMakeLists.txt
@@ -1,12 +1,22 @@
 cmake_minimum_required(VERSION 2.8)
 project(VSGNUFortran)
-
-set(EXECUTABLE_OUTPUT_PATH ${VSGNUFortran_BINARY_DIR}/bin)
-set(LIBRARY_OUTPUT_PATH ${VSGNUFortran_BINARY_DIR}/bin)
+# force the executable to be put out of Debug/Release dir
+# because gmake build of fortran will not be in a config
+# directory, and for easier testing we want the exe and .dll
+# to be in the same directory.
+if(CMAKE_CONFIGURATION_TYPES)
+  foreach(config ${CMAKE_CONFIGURATION_TYPES})
+    string(TOUPPER "${config}" config)
+    set(ARCHIVE_OUTPUT_DIRECTORY_${config}
+      "${PROJECT_BINARY_DIR}/bin")
+    set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${config}
+      "${PROJECT_BINARY_DIR}/bin")
+  endforeach()
+endif()
 
 include(CMakeAddFortranSubdirectory)
-# add the lapack subdirectory as a fortran project
-# the subdir is lapack, the project is LAPACK
+# 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 ../bin # .lib location relative to root binary tree
diff --git a/Tests/VSGNUFortran/c_code/CMakeLists.txt b/Tests/VSGNUFortran/c_code/CMakeLists.txt
index 95c641e..27d22fd 100644
--- a/Tests/VSGNUFortran/c_code/CMakeLists.txt
+++ b/Tests/VSGNUFortran/c_code/CMakeLists.txt
@@ -1,10 +1,2 @@
 add_executable(c_using_fortran main.c)
-# force the executable to be put out of Debug/Release dir
-# because gmake build of fortran will not be in a config
-# directory.
-if(CMAKE_CONFIGURATION_TYPES)
-  set_target_properties(c_using_fortran PROPERTIES
-    OUTPUT_NAME ../c_using_fortran)
-endif()
-
 target_link_libraries(c_using_fortran hello)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c867735f093d3290c055215715b8301cfc32b3d2
commit c867735f093d3290c055215715b8301cfc32b3d2
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Tue Dec 13 15:32:45 2011 -0500
Commit:     Bill Hoffman <bill.hoffman at kitware.com>
CommitDate: Tue Dec 13 15:32:45 2011 -0500

    Add magic comments to get intel windows fortran compiler to export syms.
    
    For the windows intel fortran compiler, we need to export symbols
    from the dll's that are created, so that the .exe can link and use them.

diff --git a/Tests/VSGNUFortran/fortran/hello.f b/Tests/VSGNUFortran/fortran/hello.f
index 291a43c..e52119a 100644
--- a/Tests/VSGNUFortran/fortran/hello.f
+++ b/Tests/VSGNUFortran/fortran/hello.f
@@ -1,3 +1,4 @@
+!DEC$ ATTRIBUTES DLLEXPORT :: HELLO
 	SUBROUTINE HELLO
 
 	PRINT *, 'Hello'
diff --git a/Tests/VSGNUFortran/fortran/world.f b/Tests/VSGNUFortran/fortran/world.f
index deae3fa..0598eee 100644
--- a/Tests/VSGNUFortran/fortran/world.f
+++ b/Tests/VSGNUFortran/fortran/world.f
@@ -1,3 +1,4 @@
+!DEC$ ATTRIBUTES DLLEXPORT :: WORLD
 	SUBROUTINE WORLD
 
 	PRINT *, 'World!'

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

Summary of changes:
 Tests/VSGNUFortran/CMakeLists.txt        |   20 +++++++++++++++-----
 Tests/VSGNUFortran/c_code/CMakeLists.txt |    8 --------
 Tests/VSGNUFortran/fortran/hello.f       |    1 +
 Tests/VSGNUFortran/fortran/world.f       |    1 +
 4 files changed, 17 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list