Bug correction : when creating a python module do not include .cpp files that are not python definition since corresponding .o files will be added twice (as .o and in lib.so)

This has been tested on Mac os 10.6 and linux RHEL 32bits.
This commit is contained in:
Damien Dupuis 2010-07-14 09:21:39 +00:00
parent af8a7ac195
commit 91a82cdbfe
6 changed files with 5 additions and 6 deletions

View File

@ -22,7 +22,7 @@ SETUP_PROJECT_PATHS(GOODIES)
LIST(INSERT CMAKE_MODULE_PATH 0 "${VLSISAPD_SOURCE_DIR}/cmake_modules") LIST(INSERT CMAKE_MODULE_PATH 0 "${VLSISAPD_SOURCE_DIR}/cmake_modules")
find_package(Goodies REQUIRED) FIND_PACKAGE(Goodies REQUIRED)
SETUP_BOOST(program_options filesystem python) SETUP_BOOST(program_options filesystem python)

View File

@ -10,7 +10,6 @@ SET ( cpps Library.cpp
Rectangle.cpp Rectangle.cpp
) )
SET ( pycpps PyAgds.cpp SET ( pycpps PyAgds.cpp
${cpps}
) )
ADD_LIBRARY(agds ${cpps}) ADD_LIBRARY(agds ${cpps})

View File

@ -7,7 +7,6 @@ SET ( cpps Circuit.cpp
Polygon.cpp Polygon.cpp
) )
SET ( pycpps PyCif.cpp SET ( pycpps PyCif.cpp
${cpps}
) )
ADD_LIBRARY(cif ${cpps}) ADD_LIBRARY(cif ${cpps})

View File

@ -10,7 +10,7 @@ SET ( cpps Techno.cpp
Name.cpp Name.cpp
) )
SET ( pycpps PyDtr.cpp ${cpps} SET ( pycpps PyDtr.cpp
) )
ADD_LIBRARY(dtr ${cpps}) ADD_LIBRARY(dtr ${cpps})

View File

@ -23,7 +23,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(addRule_overloads, addRule, 3, 5);
BOOST_PYTHON_MODULE(pyDTR) { BOOST_PYTHON_MODULE(pyDTR) {
// class DTR::Name // class DTR::Name
class_<Name>("Name", init<std::string>()) class_<Name>("Name", init<std::string>())
.def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a refenrce on string .def("getString", &Name::getString, return_value_policy<copy_const_reference>()) // return_value_policy because this method return a reference on string
.def(self == self) .def(self == self)
.def(self == std::string()) .def(self == std::string())
.def(self != self) .def(self != self)

View File

@ -25,7 +25,8 @@ SET ( cpps Circuit.cpp
Sizing.cpp Sizing.cpp
Transistor.cpp Transistor.cpp
) )
SET ( pycpps PyOpenChams.cpp ${cpps}) SET ( pycpps PyOpenChams.cpp
)
ADD_LIBRARY(openChams ${cpps}) ADD_LIBRARY(openChams ${cpps})
TARGET_LINK_LIBRARIES(openChams ${LIBXML2_LIBRARIES}) TARGET_LINK_LIBRARIES(openChams ${LIBXML2_LIBRARIES})