[Cmake-commits] CMake branch, next, updated. v2.8.12.1-5716-g65ca1fb

Julien Schueller schueller at phimeca.com
Sun Nov 24 15:16:15 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  65ca1fb21260ba4a440b69376245a4a2b74e21f0 (commit)
       via  8f8785fc5c422be4ab626ac0bc522ba5c0322e2c (commit)
      from  9d646670c3d93366360e42d19d724a65f949f7b0 (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=65ca1fb21260ba4a440b69376245a4a2b74e21f0
commit 65ca1fb21260ba4a440b69376245a4a2b74e21f0
Merge: 9d64667 8f8785f
Author:     Julien Schueller <schueller at phimeca.com>
AuthorDate: Sun Nov 24 15:16:12 2013 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Nov 24 15:16:12 2013 -0500

    Merge topic 'UseSWIG-fix13772' into next
    
    8f8785f Fixed .i relative source file location, fixes #0013772 (#0013173, #0014459)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8f8785fc5c422be4ab626ac0bc522ba5c0322e2c
commit 8f8785fc5c422be4ab626ac0bc522ba5c0322e2c
Author:     Julien Schueller <schueller at phimeca.com>
AuthorDate: Sat Nov 23 12:51:44 2013 +0100
Commit:     Julien Schueller <schueller at phimeca.com>
CommitDate: Sat Nov 23 12:51:44 2013 +0100

    Fixed .i relative source file location, fixes #0013772 (#0013173, #0014459)

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:
 Modules/UseSWIG.cmake |   32 ++------------------------------
 1 files changed, 2 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list