* All Tools:
- Change: New structure for the installation & CMake system. * Tools are now grouped in "projects". There are three projects: 1. - IO: Standalones parsers/drivers (IO_USER_TOP, IO_TOP). 2. - Coriolis: Base & digital tools (CORIOLIS_USER_TOP, CORIOLIS_TOP). 3. - Chams: Analogic tools (CHAMS_USER_TOP, CHAMS_TOP). Each *project* has a two "TOP" environement variables, for example: IO_TOP and IO_USER_TOP. Thoses variables are the only ones useds to locate the tool (CMake modules, headers & libraries). The local path always takes precedence over the global one. The localisation process occurs in each tool top CMakeLists.txt where the macro SETUP_PROJECT_PATH is to be defined. There is no way to put it in a shared includes file as it's the macro precisely used to locates the includes... You have to call the macro once for each project you wants to uses: SETUP_PROJECT_PATHS(IO) SETUP_PROJECT_PATHS(CORIOLIS) * In FindTOOL.cmake, supress the <TOOL>_DIR_SEARCH and uses the <PROJECT>_DIR_SEARCH instead (example: CORIOLIS_DIR_SEARCH). * buildCoriolis.py modificated according to the new "TOP" scheme.
This commit is contained in:
parent
ff68159214
commit
b044a3e8a6
|
@ -18,7 +18,32 @@ IF(COMMAND CMAKE_POLICY)
|
|||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
ENDIF(COMMAND CMAKE_POLICY)
|
||||
|
||||
SET(CMAKE_MODULE_PATH "$ENV{HURRICANE_TOP}/share/cmake_modules/")
|
||||
# This macro has to be included in all the tools CMakeLists.txt as it's
|
||||
# the sole means of localizing other tools/projects.
|
||||
MACRO(SETUP_PROJECT_PATHS project)
|
||||
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
|
||||
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
|
||||
SET(${project}_DIR_SEARCH "$ENV{${project}_USER_TOP}")
|
||||
SET(PROJECT_MODULE_PATH "$ENV{${project}_USER_TOP}/share/cmake_modules/")
|
||||
LIST(FIND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}" DIR_INDEX)
|
||||
IF( DIR_INDEX LESS 0)
|
||||
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}")
|
||||
ENDIF( DIR_INDEX LESS 0)
|
||||
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
|
||||
|
||||
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
|
||||
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
|
||||
LIST(APPEND ${project}_DIR_SEARCH "$ENV{${project}_TOP}")
|
||||
SET(PROJECT_MODULE_PATH "$ENV{${project}_TOP}/share/cmake_modules/")
|
||||
LIST(FIND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}" DIR_INDEX)
|
||||
IF( DIR_INDEX LESS 0)
|
||||
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}")
|
||||
ENDIF( DIR_INDEX LESS 0)
|
||||
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
|
||||
ENDMACRO(SETUP_PROJECT_PATHS project)
|
||||
|
||||
SETUP_PROJECT_PATHS(IO)
|
||||
SETUP_PROJECT_PATHS(CORIOLIS)
|
||||
|
||||
SET(QT_USE_QTXML "true")
|
||||
|
||||
|
|
|
@ -12,14 +12,12 @@ SET(KITE_DIR_MESSAGE "Set the KITE_INCLUDE_DIR cmake cache entry to the ${KITE_I
|
|||
|
||||
# don't even bother under WIN32
|
||||
IF(UNIX)
|
||||
|
||||
SET(KITE_DIR_SEARCH $ENV{CORIOLIS_TOP} $ENV{HURRICANE_TOP})
|
||||
#
|
||||
# Look for an installation.
|
||||
#
|
||||
FIND_PATH(KITE_INCLUDE_PATH NAMES kite/KiteEngine.h PATHS
|
||||
# Look in other places.
|
||||
${KITE_DIR_SEARCH}
|
||||
${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES include/coriolis
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${KITE_INCLUDE_PATH_DESCRIPTION}"
|
||||
|
@ -27,7 +25,7 @@ IF(UNIX)
|
|||
|
||||
FIND_LIBRARY(KITE_LIBRARY_PATH
|
||||
NAMES kite
|
||||
PATHS ${KITE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${KITE_INCLUDE_PATH_DESCRIPTION}"
|
||||
|
@ -35,7 +33,7 @@ IF(UNIX)
|
|||
|
||||
FIND_LIBRARY(KITE_STATIC_LIBRARY_PATH
|
||||
NAMES kite-static
|
||||
PATHS ${KITE_DIR_SEARCH}
|
||||
PATHS ${CORIOLIS_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "The ${KITE_INCLUDE_PATH_DESCRIPTION}"
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "hurricane/DebugSession.h"
|
||||
#include "hurricane/Bug.h"
|
||||
#include "hurricane/Error.h"
|
||||
#include "hurricane/Warning.h"
|
||||
#include "hurricane/Component.h"
|
||||
#include "hurricane/RoutingPad.h"
|
||||
#include "katabatic/AutoSegment.h"
|
||||
|
@ -137,6 +138,7 @@ namespace Kite {
|
|||
using Hurricane::roundfp;
|
||||
using Hurricane::Bug;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::ForEachIterator;
|
||||
using Hurricane::Component;
|
||||
using Hurricane::RoutingPad;
|
||||
|
@ -163,6 +165,25 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Kite::GCell::CompareByKey".
|
||||
//
|
||||
// lhs < rhs --> true
|
||||
|
||||
|
||||
bool GCell::CompareByKey::operator() ( GCell* lhs, GCell* rhs )
|
||||
{
|
||||
//int difference = floatCompare ( lhs->base()->getDensity(), rhs->base()->getDensity() );
|
||||
//if ( abs(difference) > 1000 ) return difference > 0;
|
||||
|
||||
float difference = roundfp ( lhs->base()->getDensity() - rhs->base()->getDensity() );
|
||||
if ( difference != 0.0 ) return (difference > 0.0);
|
||||
|
||||
if ( lhs->getIndex() < rhs->getIndex() ) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Kite::GCell::CompareByStiffness".
|
||||
//
|
||||
|
@ -583,6 +604,39 @@ namespace Kite {
|
|||
,_map.size(),_requests.size()) << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DyKeyQueue::invalidate ( GCell* gcell )
|
||||
{
|
||||
std::set<GCell*,GCell::CompareByKey>::iterator igcell = _map.find(gcell);
|
||||
if ( igcell != _map.end() ) {
|
||||
_map.erase ( igcell );
|
||||
}
|
||||
push ( gcell );
|
||||
}
|
||||
|
||||
|
||||
void DyKeyQueue::push ( GCell* gcell )
|
||||
{
|
||||
_requests.insert ( gcell );
|
||||
}
|
||||
|
||||
|
||||
void DyKeyQueue::revalidate ()
|
||||
{
|
||||
std::set<GCell*>::iterator igcell = _requests.begin();
|
||||
for ( ; igcell != _requests.end() ; ++igcell )
|
||||
_map.insert ( *igcell );
|
||||
}
|
||||
|
||||
|
||||
GCell* DyKeyQueue::pop ()
|
||||
{
|
||||
if ( _map.empty() ) return NULL;
|
||||
std::set<GCell*,GCell::CompareByKey>::iterator igcell = _map.begin();
|
||||
GCell* gcell = *igcell;
|
||||
_map.erase ( igcell );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#define __KITE_GCELL__
|
||||
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
|
@ -73,6 +74,11 @@ namespace Kite {
|
|||
public:
|
||||
bool operator() ( GCell* lhs, GCell* rhs );
|
||||
};
|
||||
// Sub-Class: "CompareByKey()".
|
||||
class CompareByKey {
|
||||
public:
|
||||
bool operator() ( GCell* lhs, GCell* rhs );
|
||||
};
|
||||
// Sub-Class: "CompareByStiffness()".
|
||||
class CompareByStiffness {
|
||||
public:
|
||||
|
@ -221,8 +227,8 @@ namespace Kite {
|
|||
void invalidate ( GCell* );
|
||||
void revalidate ();
|
||||
private:
|
||||
set<GCell*,GCell::CompareByKey> _map;
|
||||
set<GCell*> _requests;
|
||||
std::set<GCell*,GCell::CompareByKey> _map;
|
||||
std::set<GCell*> _requests;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue