coriolis/kite/src/CMakeLists.txt

122 lines
6.0 KiB
CMake
Raw Normal View History

# -*- explicit-buffer-name: "CMakeLists.txt<kite/src>" -*-
# include( ${QT_USE_FILE} )
include_directories( ${KITE_SOURCE_DIR}/src
${CORIOLIS_INCLUDE_DIR}
2021-08-27 11:36:55 -05:00
${KNIK_INCLUDE_DIR}
${KATABATIC_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
${FLUTE_INCLUDE_DIR}
${QtX_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
Migration towards Python3, first stage: still based on C-Macros. * New: Python/C++ API level: * Write a new C++/template wrapper to get rid of boost::python * The int & long Python type are now merged. So a C/C++ level, it became "PyLong_X" (remove "PyInt_X") and at Python code level, it became "int" (remove "long"). * Change: VLSISAPD finally defunct. * Configuration is now integrated as a Hurricane component, makes use of the new C++/template wrapper. * vlsisapd is now defunct. Keep it in the source for now as some remaining non essential code may have to be ported in the future. * Note: Python code (copy of the migration howto): * New print function syntax print(). * Changed "dict.has_key(k)" for "k" in dict. * Changed "except Exception, e" for "except Exception as e". * The division "/" is now the floating point division, even if both operand are integers. So 3/2 now gives 1.5 and no longer 1. The integer division is now "//" : 1 = 3//2. So have to carefully review the code to update. Most of the time we want to use "//". We must never change to float for long that, in fact, represents DbU (exposed as Python int type). * execfile() must be replaced by exec(open("file").read()). * iter().__next__() becomes iter(x).__next__(). * __getslice__() has been removed, integrated to __getitem__(). * The formating used for str(type(o)) has changed, so In Stratus, have to update them ("<class 'MyClass'>" instead of "MyClass"). * the "types" module no longer supply values for default types like str (types.StringType) or list (types.StringType). Must use "isinstance()" where they were occuring. * Remove the 'L' to indicate "long integer" (like "12L"), now all Python integer are long. * Change in bootstrap: * Ported Coriolis builder (ccb) to Python3. * Ported Coriolis socInstaller.py to Python3. * Note: In PyQt4+Python3, QVariant no longer exists. Use None or directly convert using the python syntax: bool(x), int(x), ... By default, it is a string (str). * Note: PyQt4 bindings & Python3 under SL7. * In order to compile user's must upgrade to my own rebuild of PyQt 4 & 5 bindings 4.19.21-1.el7.soc. * Bug: In cumulus/plugins.block.htree.HTree.splitNet(), set the root buffer of the H-Tree to the original signal (mainly: top clock). Strangely, it was only done when working in full chip mode.
2021-09-19 12:41:24 -05:00
${Python_INCLUDE_DIRS}
)
set( includes kite/Constants.h
kite/TrackCost.h
kite/DataNegociate.h
kite/TrackElement.h kite/TrackElements.h
kite/TrackSegment.h
kite/TrackFixedSegment.h
kite/TrackMarker.h
kite/Track.h
kite/Tracks.h
kite/HorizontalTrack.h
kite/VerticalTrack.h
kite/RoutingPlane.h
kite/Session.h
kite/Manipulator.h
kite/SegmentFsm.h
kite/RoutingEvent.h
kite/RoutingEventQueue.h
kite/RoutingEventHistory.h
kite/RoutingEventLoop.h
kite/NegociateWindow.h
kite/Configuration.h
kite/KiteEngine.h
kite/GraphicKiteEngine.h
)
set( pyIncludes kite/PyKiteEngine.h
kite/PyGraphicKiteEngine.h
)
set( mocIncludes kite/GraphicKiteEngine.h )
set( cpps TrackCost.cpp
DataNegociate.cpp
TrackElement.cpp
TrackElements.cpp
TrackSegment.cpp
TrackFixedSegment.cpp
TrackMarker.cpp
Track.cpp
Tracks.cpp
HorizontalTrack.cpp
VerticalTrack.cpp
RoutingPlane.cpp
Session.cpp
Manipulator.cpp
SegmentFsm.cpp
RoutingEvent.cpp
RoutingEventQueue.cpp
RoutingEventHistory.cpp
RoutingEventLoop.cpp
NegociateWindow.cpp
BuildPowerRails.cpp
BuildPreRouteds.cpp
ProtectRoutingPads.cpp
PreProcess.cpp
Configuration.cpp
KiteEngine.cpp
GraphicKiteEngine.cpp
)
set( pyCpps PyKite.cpp
PyKiteEngine.cpp
PyGraphicKiteEngine.cpp
)
set( kiteCpps KiteMain.cpp )
qtX_wrap_cpp( mocCpps ${mocIncludes} )
set( depLibs ${KATABATIC_LIBRARIES}
${KNIK_LIBRARIES}
${NIMBUS_LIBRARIES}
${CORIOLIS_PYTHON_LIBRARIES}
${CORIOLIS_LIBRARIES}
${HURRICANE_PYTHON_LIBRARIES}
${HURRICANE_GRAPHICAL_LIBRARIES}
${HURRICANE_LIBRARIES}
${CONFIGURATION_LIBRARY}
${BOOKSHELF_LIBRARY}
${CIF_LIBRARY}
${AGDS_LIBRARY}
${UTILITIES_LIBRARY}
${FLUTE_LIBRARIES}
${LEFDEF_LIBRARIES}
${OA_LIBRARIES}
${QtX_LIBRARIES}
${Boost_LIBRARIES}
${LIBXML2_LIBRARIES}
Migration towards Python3, first stage: still based on C-Macros. * New: Python/C++ API level: * Write a new C++/template wrapper to get rid of boost::python * The int & long Python type are now merged. So a C/C++ level, it became "PyLong_X" (remove "PyInt_X") and at Python code level, it became "int" (remove "long"). * Change: VLSISAPD finally defunct. * Configuration is now integrated as a Hurricane component, makes use of the new C++/template wrapper. * vlsisapd is now defunct. Keep it in the source for now as some remaining non essential code may have to be ported in the future. * Note: Python code (copy of the migration howto): * New print function syntax print(). * Changed "dict.has_key(k)" for "k" in dict. * Changed "except Exception, e" for "except Exception as e". * The division "/" is now the floating point division, even if both operand are integers. So 3/2 now gives 1.5 and no longer 1. The integer division is now "//" : 1 = 3//2. So have to carefully review the code to update. Most of the time we want to use "//". We must never change to float for long that, in fact, represents DbU (exposed as Python int type). * execfile() must be replaced by exec(open("file").read()). * iter().__next__() becomes iter(x).__next__(). * __getslice__() has been removed, integrated to __getitem__(). * The formating used for str(type(o)) has changed, so In Stratus, have to update them ("<class 'MyClass'>" instead of "MyClass"). * the "types" module no longer supply values for default types like str (types.StringType) or list (types.StringType). Must use "isinstance()" where they were occuring. * Remove the 'L' to indicate "long integer" (like "12L"), now all Python integer are long. * Change in bootstrap: * Ported Coriolis builder (ccb) to Python3. * Ported Coriolis socInstaller.py to Python3. * Note: In PyQt4+Python3, QVariant no longer exists. Use None or directly convert using the python syntax: bool(x), int(x), ... By default, it is a string (str). * Note: PyQt4 bindings & Python3 under SL7. * In order to compile user's must upgrade to my own rebuild of PyQt 4 & 5 bindings 4.19.21-1.el7.soc. * Bug: In cumulus/plugins.block.htree.HTree.splitNet(), set the root buffer of the H-Tree to the original signal (mainly: top clock). Strangely, it was only done when working in full chip mode.
2021-09-19 12:41:24 -05:00
${Python_LIBRARIES} -lutil
${LIBEXECINFO_LIBRARIES}
)
add_library( kite ${cpps} ${mocCpps} ${pyCpps} )
set_target_properties( kite PROPERTIES VERSION 1.0 SOVERSION 1 )
#target_link_libraries( kite ${depLibs} )
add_python_module( "${pyCpps}"
"${pyIncludes}"
"Do_not_generate_C_library"
Kite
"kite;${depLibs}"
include/coriolis2/kite
)
# add_executable( kite.bin ${kiteCpps} )
#target_link_libraries( kite.bin kite ${depLibs} )
install( TARGETS kite DESTINATION lib${LIB_SUFFIX} )
# install( TARGETS kite.bin DESTINATION bin )
install( FILES ${includes}
${mocIncludes} DESTINATION include/coriolis2/kite )