[Cmake-commits] CMake branch, next, updated. v3.0.2-5525-g1291bdb

Brad King brad.king at kitware.com
Tue Sep 30 08:25:32 EDT 2014


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  1291bdbecaad1b75c5e1691dd738d70b62fb15b9 (commit)
       via  a128129a867c2e659827c0378b183f50abde2e13 (commit)
      from  963a33f31873bafd0b3fa95279d9c3632500c271 (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=1291bdbecaad1b75c5e1691dd738d70b62fb15b9
commit 1291bdbecaad1b75c5e1691dd738d70b62fb15b9
Merge: 963a33f a128129
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 30 08:25:31 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 30 08:25:31 2014 -0400

    Merge topic 'vs-intel-15' into next
    
    a128129a VS: Support Intel Fortran 15 .vfproj generation (#15175)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a128129a867c2e659827c0378b183f50abde2e13
commit a128129a867c2e659827c0378b183f50abde2e13
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 29 10:12:43 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 30 08:24:50 2014 -0400

    VS: Support Intel Fortran 15 .vfproj generation (#15175)
    
    This version of the Intel Fortran plugin to Visual Studio says:
    
     please make sure that $(OutDir), $(TargetName) and $(TargetExt)
     property values match the value specified in %(Link.OutputFile)
    
    We must set TargetName and TargetExt in addition to the existing
    setting for OutputDirectory.  The settings do not appear to hurt
    older versions of Intel Fortran, so set them unconditionally.
    
    Extend the FortranOnly test to cover a corresponding use case by
    using the OUTPUT_NAME target property.
    
    Inspired-by: Ian Harvey <Ian.Harvey at megms.com.au>

diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 11a9627..eb45423 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -796,6 +796,20 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout,
        << "\t\t\tUseOfMFC=\"" << mfcFlag << "\"\n"
        << "\t\t\tATLMinimizesCRunTimeLibraryUsage=\"false\"\n";
 
+  if (this->FortranProject)
+    {
+    // Intel Fortran >= 15.0 uses TargetName property.
+    std::string targetNameFull = target.GetFullName(configName);
+    std::string targetName =
+      cmSystemTools::GetFilenameWithoutLastExtension(targetNameFull);
+    std::string targetExt =
+      cmSystemTools::GetFilenameLastExtension(targetNameFull);
+    fout <<
+      "\t\t\tTargetName=\"" << this->EscapeForXML(targetName) << "\"\n"
+      "\t\t\tTargetExt=\"" << this->EscapeForXML(targetExt) << "\"\n"
+      ;
+    }
+
   // If unicode is enabled change the character set to unicode, if not
   // then default to MBCS.
   if(targetOptions.UsingUnicode())
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt
index a3f83c9..f55e727 100644
--- a/Tests/FortranOnly/CMakeLists.txt
+++ b/Tests/FortranOnly/CMakeLists.txt
@@ -8,13 +8,14 @@ set_property(TARGET FortranOnlylib PROPERTY Fortran_FORMAT FIXED)
 set_property(SOURCE world.f PROPERTY Fortran_FORMAT FREE)
 
 # create an executable that calls hello and world
-add_executable(FortranOnly testf.f)
-target_link_libraries(FortranOnly FortranOnlylib)
+add_executable(FortranOnly1 testf.f)
+set_property(TARGET FortranOnly1 PROPERTY OUTPUT_NAME FortranOnly)
+target_link_libraries(FortranOnly1 FortranOnlylib)
 
-# create a custom command that runs FortranOnly and puts
+# create a custom command that runs FortranOnly1 and puts
 # the output into the file testfhello.txt
 add_custom_command(OUTPUT ${FortranOnly_BINARY_DIR}/testfhello.txt
-  COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly
+  COMMAND FortranOnly1
   > testfhello.txt)
 # create a second executable FortranOnly2 that has
 # testfhello.txt has an source file so that it will
@@ -27,15 +28,15 @@ add_custom_target(checktestf2 ALL
   COMMAND ${CMAKE_COMMAND}
   -P ${FortranOnly_SOURCE_DIR}/checktestf2.cmake)
 
-# create a custom target that runs FortranOnly exectuable and creates
+# create a custom target that runs FortranOnly1 exectuable and creates
 # a file out.txt that should have hello world in it.
 add_custom_target(sayhello ALL
-  COMMAND ${FortranOnly_BINARY_DIR}/${CMAKE_CFG_INTDIR}/FortranOnly > out.txt
+  COMMAND FortranOnly1 > out.txt
 )
 # make sure stuff is built in the right order
 add_dependencies(checktestf2 FortranOnly2)
-add_dependencies(sayhello FortranOnly)
-add_dependencies(FortranOnly2 FortranOnly)
+add_dependencies(sayhello FortranOnly1)
+add_dependencies(FortranOnly2 FortranOnly1)
 
 # add a custom target that checkes that out.txt has the correct
 # content

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

Summary of changes:
 Source/cmLocalVisualStudio7Generator.cxx |   14 ++++++++++++++
 Tests/FortranOnly/CMakeLists.txt         |   17 +++++++++--------
 2 files changed, 23 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list