From 91a82cdbfe39c907dcc5bb5607959594905fc8ad Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Wed, 14 Jul 2010 09:21:39 +0000 Subject: [PATCH] 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. --- vlsisapd/CMakeLists.txt | 2 +- vlsisapd/src/agds/src/CMakeLists.txt | 1 - vlsisapd/src/cif/src/CMakeLists.txt | 1 - vlsisapd/src/dtr/src/CMakeLists.txt | 2 +- vlsisapd/src/dtr/src/PyDtr.cpp | 2 +- vlsisapd/src/openChams/src/CMakeLists.txt | 3 ++- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt index 811211f2..dcf95c39 100644 --- a/vlsisapd/CMakeLists.txt +++ b/vlsisapd/CMakeLists.txt @@ -22,7 +22,7 @@ SETUP_PROJECT_PATHS(GOODIES) 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) diff --git a/vlsisapd/src/agds/src/CMakeLists.txt b/vlsisapd/src/agds/src/CMakeLists.txt index 4cd15d7d..2d46f66a 100644 --- a/vlsisapd/src/agds/src/CMakeLists.txt +++ b/vlsisapd/src/agds/src/CMakeLists.txt @@ -10,7 +10,6 @@ SET ( cpps Library.cpp Rectangle.cpp ) SET ( pycpps PyAgds.cpp - ${cpps} ) ADD_LIBRARY(agds ${cpps}) diff --git a/vlsisapd/src/cif/src/CMakeLists.txt b/vlsisapd/src/cif/src/CMakeLists.txt index 2f3a02e9..f2439ed5 100644 --- a/vlsisapd/src/cif/src/CMakeLists.txt +++ b/vlsisapd/src/cif/src/CMakeLists.txt @@ -7,7 +7,6 @@ SET ( cpps Circuit.cpp Polygon.cpp ) SET ( pycpps PyCif.cpp - ${cpps} ) ADD_LIBRARY(cif ${cpps}) diff --git a/vlsisapd/src/dtr/src/CMakeLists.txt b/vlsisapd/src/dtr/src/CMakeLists.txt index 783e649b..7d8fc05c 100644 --- a/vlsisapd/src/dtr/src/CMakeLists.txt +++ b/vlsisapd/src/dtr/src/CMakeLists.txt @@ -10,7 +10,7 @@ SET ( cpps Techno.cpp Name.cpp ) -SET ( pycpps PyDtr.cpp ${cpps} +SET ( pycpps PyDtr.cpp ) ADD_LIBRARY(dtr ${cpps}) diff --git a/vlsisapd/src/dtr/src/PyDtr.cpp b/vlsisapd/src/dtr/src/PyDtr.cpp index 3365065f..b4e227e9 100644 --- a/vlsisapd/src/dtr/src/PyDtr.cpp +++ b/vlsisapd/src/dtr/src/PyDtr.cpp @@ -23,7 +23,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(addRule_overloads, addRule, 3, 5); BOOST_PYTHON_MODULE(pyDTR) { // class DTR::Name class_("Name", init()) - .def("getString", &Name::getString, return_value_policy()) // return_value_policy because this method return a refenrce on string + .def("getString", &Name::getString, return_value_policy()) // return_value_policy because this method return a reference on string .def(self == self) .def(self == std::string()) .def(self != self) diff --git a/vlsisapd/src/openChams/src/CMakeLists.txt b/vlsisapd/src/openChams/src/CMakeLists.txt index 8f4f73b6..367ba1de 100644 --- a/vlsisapd/src/openChams/src/CMakeLists.txt +++ b/vlsisapd/src/openChams/src/CMakeLists.txt @@ -25,7 +25,8 @@ SET ( cpps Circuit.cpp Sizing.cpp Transistor.cpp ) -SET ( pycpps PyOpenChams.cpp ${cpps}) +SET ( pycpps PyOpenChams.cpp + ) ADD_LIBRARY(openChams ${cpps}) TARGET_LINK_LIBRARIES(openChams ${LIBXML2_LIBRARIES})