annotate extensions/dbg_interactive/CMakeLists.txt @ 641:69d3579f6c6c 1.0.3-rc3

First version of dbg_interactive is complete
author Sebastien Decugis <sdecugis@nict.go.jp>
date Tue, 21 Dec 2010 10:29:46 +0900
parents 237cf6339546
children f198d16fa7f4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
609
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
1 # The rt_debug extension
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
2 PROJECT("Interactive debug facility based on SWIG" C)
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
3
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
4
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
5 # This module is using Python
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
6 FIND_PACKAGE(PythonLibs)
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
7 INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
8
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
9 #####
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
10 # Wrapper to fD in python
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
11 FIND_PACKAGE(SWIG REQUIRED)
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
12 INCLUDE(${SWIG_USE_FILE})
624
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
13 SET(CMAKE_SWIG_FLAGS -castmode -threads)
609
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
14
618
1dbc4c5397d6 Attempting to improve python wrapper usability (work in progress)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 609
diff changeset
15 # Add the dependencies for re-swig-ing the file
624
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
16 SET(SWIG_MODULE_fDpy_EXTRA_DEPS
618
1dbc4c5397d6 Attempting to improve python wrapper usability (work in progress)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 609
diff changeset
17 ${CMAKE_BINARY_DIR}/include/freeDiameter/freeDiameter-host.h
1dbc4c5397d6 Attempting to improve python wrapper usability (work in progress)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 609
diff changeset
18 ${CMAKE_SOURCE_DIR}/include/freeDiameter/libfreeDiameter.h
637
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
19 ${CMAKE_SOURCE_DIR}/include/freeDiameter/freeDiameter.h
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
20 lists.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
21 dictionary.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
22 sessions.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
23 routing.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
24 messages.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
25 dispatch.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
26 queues.i
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
27 peers.i
640
237cf6339546 dbg_interactive almost complete
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 637
diff changeset
28 events.i
237cf6339546 dbg_interactive almost complete
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 637
diff changeset
29 endpoints.i
641
69d3579f6c6c First version of dbg_interactive is complete
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 640
diff changeset
30 posix.i
637
22e8fac3b2d6 Split interface file in modules
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 625
diff changeset
31 )
624
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
32 SET_SOURCE_FILES_PROPERTIES(dbg_interactive.i PROPERTIES SWIG_MODULE_NAME fDpy)
618
1dbc4c5397d6 Attempting to improve python wrapper usability (work in progress)
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 609
diff changeset
33
624
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
34 # The following code is inspired from SWIG_ADD_MODULE, but we do only what we need
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
35 SWIG_MODULE_INITIALIZE(fDpy python)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
36 SWIG_ADD_SOURCE_TO_MODULE(fDpy swig_generated_sources "dbg_interactive.i")
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
37
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
38 # In order to avoid shipping the python file that contains the shadow class definitions,
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
39 # we transform this file in a C-style string and compile it within our software.
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
40 # We use for this purpose xxd tool provided with vim package.
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
41 FIND_PROGRAM(XXD_EXECUTABLE xxd)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
42 # To avoid the dependency, simply compile it if not provided
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
43 if (NOT XXD_EXECUTABLE)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
44 SET_SOURCE_FILES_PROPERTIES(helper/xxd.c PROPERTIES COMPILE_DEFINITIONS UNIX)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
45 ADD_EXECUTABLE(xxd helper/xxd.c)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
46 SET(XXD_EXECUTABLE xxd)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
47 endif (NOT XXD_EXECUTABLE)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
48 # And now the magic command
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
49 ADD_CUSTOM_COMMAND(
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
50 OUTPUT "fDpy-inc.c"
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
51 COMMAND "${XXD_EXECUTABLE}"
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
52 ARGS "-i"
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
53 "fDpy.py"
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
54 "fDpy-inc.c"
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
55 MAIN_DEPENDENCY "${swig_extra_generated_files}"
625
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
56 COMMENT "Shadow definitions")
624
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
57
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
58 # Ensure that the generated source files are removed
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
59 GET_DIRECTORY_PROPERTY(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
60 SET_DIRECTORY_PROPERTIES(PROPERTIES
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
61 ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources};fDpy-inc.c")
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
62
609
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
63
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
64 #####
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
65 # Extension that embeds the python interpreter
624
a5682d003ed9 Finally got the proxy aka shadow class to work
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 618
diff changeset
66 FD_ADD_EXTENSION(dbg_interactive dbg_interactive.c ${swig_generated_sources} fDpy-inc.c)
609
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
67 TARGET_LINK_LIBRARIES(dbg_interactive ${PYTHON_LIBRARIES})
2d15fd8ef5ba Very very early python interactive extension, using SWIG
Sebastien Decugis <sdecugis@nict.go.jp>
parents:
diff changeset
68
625
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
69
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
70 ####
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
71 ## INSTALL section ##
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
72
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
73 INSTALL(TARGETS dbg_interactive
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
74 LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX}
2cd2cf7abe2a Improvements to usability, still work ongoing
Sebastien Decugis <sdecugis@nict.go.jp>
parents: 624
diff changeset
75 COMPONENT freeDiameter-debug-tools)
"Welcome to our mercurial repository"