Text archives Help
- From: bigler@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1189 - trunk/SwigInterface/test
- Date: Wed, 23 Aug 2006 14:36:51 -0600 (MDT)
Author: bigler
Date: Wed Aug 23 14:36:51 2006
New Revision: 1189
Modified:
trunk/SwigInterface/test/MantaUseSWIG.cmake
trunk/SwigInterface/test/child.i
trunk/SwigInterface/test/parent.i
Log:
MantaUseSWIG.cmake
Fixed a bug that was preventing the new dependencies from being
pulled in. You need to always include the cmake readible dependency
file. This will create a dependency between that file and the CMake
build system that will cause CMake to run again when the file
changes. This dependency will let CMake pull in new dependencies
when they exist.
child.i
parent.i
Part of the test module.
Modified: trunk/SwigInterface/test/MantaUseSWIG.cmake
==============================================================================
--- trunk/SwigInterface/test/MantaUseSWIG.cmake (original)
+++ trunk/SwigInterface/test/MantaUseSWIG.cmake Wed Aug 23 14:36:51 2006
@@ -110,11 +110,19 @@
SET(MANTA_SWIG_DEPEND_REGENERATE)
# Include the dependency file. Create it first if it doesn't exist
- # for make files except for IDEs (see below).
+ # for make files except for IDEs (see below). The INCLUDE puts a
+ # dependency that will force CMake to rerun and bring in the new info
+ # when it changes. DO NOT REMOVE THIS (as I did and spent a few hours
+ # figuring out why it didn't work.
IF(${CMAKE_MAKE_PROGRAM} MATCHES "make")
- IF(EXISTS ${dependency_file})
- INCLUDE(${dependency_file})
- ENDIF(EXISTS ${dependency_file})
+ IF(NOT EXISTS ${dependency_file})
+ CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/empty.depend.in
+ ${dependency_file} IMMEDIATE)
+ ENDIF(NOT EXISTS ${dependency_file})
+ # Always include this file to force CMake to run again next
+ # invocation and rebuild the dependencies.
+ INCLUDE(${dependency_file})
ELSE(${CMAKE_MAKE_PROGRAM} MATCHES "make")
# for IDE generators like MS dev only include the depend files
# if they exist. This is to prevent ecessive reloading of
@@ -146,6 +154,10 @@
# rule to re-run.
IF(MANTA_SWIG_DEPEND_REGENERATE)
SET(MANTA_SWIG_DEPEND ${dependency_file})
+ # Force CMake to run again next build
+ CONFIGURE_FILE(
+ ${CMAKE_SOURCE_DIR}/empty.depend.in
+ ${dependency_file} IMMEDIATE)
ENDIF(MANTA_SWIG_DEPEND_REGENERATE)
ENDMACRO(MANTA_INCLUDE_SWIG_DEPENDENCIES)
@@ -275,7 +287,7 @@
MAIN_DEPENDENCY ${swig_generated_dependency_file}
COMMENT "Converting swig dependency to CMake (${cmake_dependency_file})"
)
-
+
# Build the wrapper file. This depends on the
# cmake_dependency_file, so that stuff will get built too.
ADD_CUSTOM_COMMAND(
@@ -283,7 +295,8 @@
COMMAND "${SWIG_EXECUTABLE}"
ARGS ${ALL_SWIG_COMMAND_FLAGS} ${swig_source_file_fullname}
MAIN_DEPENDENCY "${swig_source_file_fullname}"
- DEPENDS ${MANTA_SWIG_DEPEND} ${cmake_dependency_file}
+ DEPENDS ${MANTA_SWIG_DEPEND}
+ DEPENDS ${cmake_dependency_file}
COMMENT "Swig source (${swig_generated_file_fullname})"
)
Modified: trunk/SwigInterface/test/child.i
==============================================================================
--- trunk/SwigInterface/test/child.i (original)
+++ trunk/SwigInterface/test/child.i Wed Aug 23 14:36:51 2006
@@ -1,4 +1,4 @@
-%module child
+%module(package="test") child
%import "parent.i"
Modified: trunk/SwigInterface/test/parent.i
==============================================================================
--- trunk/SwigInterface/test/parent.i (original)
+++ trunk/SwigInterface/test/parent.i Wed Aug 23 14:36:51 2006
@@ -1,4 +1,4 @@
-%module parent
+%module(package="test") parent
%{
#include "parent.h"
- [MANTA] r1189 - trunk/SwigInterface/test, bigler, 08/23/2006
Archive powered by MHonArc 2.6.16.