[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5733-g52bdbf0

Brad King brad.king at kitware.com
Mon Nov 25 08:29:59 EST 2013


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  52bdbf084212f3fe258086e28fff7be55640e4b9 (commit)
       via  276e3735d89e1476a36f33c4aefa4e19af718459 (commit)
      from  208e8a07ee7a04d4cc6b27fb4d8815f22c9d2bb7 (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=52bdbf084212f3fe258086e28fff7be55640e4b9
commit 52bdbf084212f3fe258086e28fff7be55640e4b9
Merge: 208e8a0 276e373
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 25 08:29:56 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 25 08:29:56 2013 -0500

    Merge topic 'UseSWIG-fix13772' into next
    
    276e373 UseSWIG: Fix .i relative source file location (#13173,#13772,#14459)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=276e3735d89e1476a36f33c4aefa4e19af718459
commit 276e3735d89e1476a36f33c4aefa4e19af718459
Author:     Julien Schueller <schueller at phimeca.com>
AuthorDate: Sat Nov 23 12:51:44 2013 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 25 08:29:37 2013 -0500

    UseSWIG: Fix .i relative source file location (#13173,#13772,#14459)

diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 00f3e21..4329053 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -94,7 +94,6 @@ endmacro()
 #
 macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
   set(swig_full_infile ${infile})
-  get_filename_component(swig_source_file_path "${infile}" PATH)
   get_filename_component(swig_source_file_name_we "${infile}" NAME_WE)
   get_source_file_property(swig_source_file_generated ${infile} GENERATED)
   get_source_file_property(swig_source_file_cplusplus ${infile} CPLUSPLUS)
@@ -102,35 +101,8 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
   if("${swig_source_file_flags}" STREQUAL "NOTFOUND")
     set(swig_source_file_flags "")
   endif()
-  set(swig_source_file_fullname "${infile}")
-  if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
-    string(REGEX REPLACE
-      "^${CMAKE_CURRENT_SOURCE_DIR}" ""
-      swig_source_file_relative_path
-      "${swig_source_file_path}")
-  else()
-    if(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
-      string(REGEX REPLACE
-        "^${CMAKE_CURRENT_BINARY_DIR}" ""
-        swig_source_file_relative_path
-        "${swig_source_file_path}")
-      set(swig_source_file_generated 1)
-    else()
-      set(swig_source_file_relative_path "${swig_source_file_path}")
-      if(swig_source_file_generated)
-        set(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}")
-      else()
-        set(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}")
-      endif()
-    endif()
-  endif()
+  get_filename_component(swig_source_file_fullname "${infile}" ABSOLUTE)
 
-  set(swig_generated_file_fullname
-    "${CMAKE_CURRENT_BINARY_DIR}")
-  if(swig_source_file_relative_path)
-    set(swig_generated_file_fullname
-      "${swig_generated_file_fullname}/${swig_source_file_relative_path}")
-  endif()
   # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir
   if(CMAKE_SWIG_OUTDIR)
     set(swig_outdir ${CMAKE_SWIG_OUTDIR})
@@ -142,7 +114,7 @@ macro(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
     "${swig_outdir}"
     "${infile}")
   set(swig_generated_file_fullname
-    "${swig_generated_file_fullname}/${swig_source_file_name_we}")
+    "${swig_outdir}/${swig_source_file_name_we}")
   # add the language into the name of the file (i.e. TCL_wrap)
   # this allows for the same .i file to be wrapped into different languages
   set(swig_generated_file_fullname

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list