* ./hurricane/src/hurricane:
- Bug: In DebugSession, bad stacking/unstacking of debug levels (unapaired), and wrong value stacked sometimes. * All Hurricane/Coriolis tools: - Change: Simplify the CMakeLists,
This commit is contained in:
parent
c738ac2f6e
commit
4449b76213
|
@ -7,20 +7,19 @@ ENDIF(COMMAND CMAKE_POLICY)
|
|||
|
||||
SET(CMAKE_MODULE_PATH "${HURRICANE_SOURCE_DIR}/cmake_modules/")
|
||||
|
||||
OPTION(BUILD_STATIC "Build static version of libraries & binaries" OFF)
|
||||
OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF)
|
||||
|
||||
IF(BUILD_STATIC)
|
||||
MESSAGE(STATUS "Building static libraries.")
|
||||
# check for qmake
|
||||
#SET_LIB_LINK_MODE()
|
||||
IF(NOT BUILD_SHARED_LIBS)
|
||||
# check for qmake
|
||||
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake-qt4 qmake PATHS
|
||||
/opt/qt4-static-4.3.2/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
MESSAGE(STATUS "qmake: ${QT_QMAKE_EXECUTABLE}")
|
||||
ELSE(BUILD_STATIC)
|
||||
MESSAGE(STATUS "Building static libraries.")
|
||||
ELSE(NOT BUILD_SHARED_LIBS)
|
||||
MESSAGE(STATUS "Building dynamic libraries.")
|
||||
ENDIF(BUILD_STATIC)
|
||||
ENDIF(NOT BUILD_SHARED_LIBS)
|
||||
|
||||
SET(QT_USE_QTXML "true")
|
||||
#SET(QT_USE_QTOPENGL "true")
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
MACRO(SET_LIBRARIES_PATH configname library)
|
||||
SET(${configname}_FOUND "NOTFOUND")
|
||||
SET(${configname}_STATIC_FOUND "NOTFOUND")
|
||||
|
||||
IF(${library}_LIBRARY_PATH)
|
||||
SET(${configname}_FOUND "YES")
|
||||
|
@ -17,16 +16,8 @@ MACRO(SET_LIBRARIES_PATH configname library)
|
|||
MARK_AS_ADVANCED(${configname}_INCLUDE_DIR ${configname}_LIBRARIES)
|
||||
ENDIF(${library}_LIBRARY_PATH)
|
||||
|
||||
IF(${library}_STATIC_LIBRARY_PATH)
|
||||
SET(${configname}_STATIC_FOUND "YES")
|
||||
SET(${configname}_INCLUDE_DIR ${${library}_INCLUDE_PATH})
|
||||
SET(${configname}_STATIC_LIBRARIES ${${library}_STATIC_LIBRARY_PATH} ${${configname}_STATIC_LIBRARIES})
|
||||
MARK_AS_ADVANCED(${configname}_INCLUDE_DIR ${configname}_STATIC_LIBRARIES)
|
||||
ENDIF(${library}_STATIC_LIBRARY_PATH)
|
||||
|
||||
IF(NOT ${library}_INCLUDE_PATH)
|
||||
SET(${configname}_FOUND "NOTFOUND")
|
||||
SET(${configname}_STATIC_FOUND "NOTFOUND")
|
||||
ENDIF(NOT ${library}_INCLUDE_PATH)
|
||||
ENDMACRO ( SET_LIBRARIES_PATH )
|
||||
|
||||
|
@ -36,22 +27,32 @@ MACRO(HURRICANE_CHECK_LIBRARIES)
|
|||
ELSE(ARGC LESS 2)
|
||||
SET(REQUIRED ${argv1})
|
||||
ENDIF(ARGC LESS 2)
|
||||
IF(${argv0}_FOUND OR ${argv0}_STATIC_FOUND)
|
||||
IF(${argv0}_FOUND)
|
||||
IF(NOT ${argv0}_FIND_QUIETLY)
|
||||
IF(${argv0}_FOUND)
|
||||
MESSAGE(STATUS "Found ${argv0} : ${${argv0}_LIBRARIES}")
|
||||
ENDIF(${argv0}_FOUND)
|
||||
IF(${argv0}_STATIC_FOUND)
|
||||
MESSAGE(STATUS "Found ${argv0} (static): ${${argv0}_STATIC_LIBRARIES}")
|
||||
ENDIF(${argv0}_STATIC_FOUND)
|
||||
ENDIF(NOT ${argv0}_FIND_QUIETLY)
|
||||
ELSE(${argv0}_FOUND OR ${argv0}_STATIC_FOUND)
|
||||
ELSE(${argv0}_FOUND)
|
||||
IF(REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "${argv0} was not found. ${${argv0}_DIR_MESSAGE}")
|
||||
ENDIF(REQUIRED)
|
||||
ENDIF(${argv0}_FOUND OR ${argv0}_STATIC_FOUND)
|
||||
ENDIF(${argv0}_FOUND)
|
||||
ENDMACRO(HURRICANE_CHECK_LIBRARIES)
|
||||
|
||||
MACRO(SET_LIB_LINK_MODE)
|
||||
IF(NOT BUILD_SHARED_LIBS)
|
||||
# check for qmake
|
||||
FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake-qt4 qmake PATHS
|
||||
/opt/qt4-static-4.3.2/bin
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
MESSAGE(STATUS "Building static libraries.")
|
||||
ELSE(NOT BUILD_SHARED_LIBS)
|
||||
MESSAGE(STATUS "Building dynamic libraries.")
|
||||
ENDIF(NOT BUILD_SHARED_LIBS)
|
||||
ENDMACRO(SET_LIB_LINK_MODE)
|
||||
|
||||
|
||||
SET(HURRICANE_INCLUDE_PATH_DESCRIPTION "The directory containing the Hurricane include files. E.g /usr/local/include or /asim/coriolis/include")
|
||||
SET(HURRICANE_LIBRARY_PATH_DESCRIPTION "The directory containing the Hurricane library files. E.g /usr/local/lib or /asim/coriolis/lib")
|
||||
|
@ -84,14 +85,6 @@ IF(UNIX)
|
|||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(HURRICANE_STATIC_LIBRARY_PATH
|
||||
NAMES hurricane-static
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
FIND_PATH(HURRICANE_VIEWER_INCLUDE_PATH
|
||||
NAMES hurricane/viewer/CellWidget.h
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
|
@ -108,14 +101,6 @@ IF(UNIX)
|
|||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
FIND_LIBRARY(HURRICANE_VIEWER_STATIC_LIBRARY_PATH
|
||||
NAMES hviewer-static
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
PATH_SUFFIXES lib
|
||||
# Help the user find it if we cannot.
|
||||
DOC "${HURRICANE_LIBRARY_PATH_DESCRIPTION}"
|
||||
)
|
||||
|
||||
FIND_PATH(HURRICANE_PYTHON_INCLUDE_PATH
|
||||
NAMES hurricane/isobar/PyCell.h
|
||||
PATHS ${HURRICANE_DIR_SEARCH}
|
||||
|
|
|
@ -151,13 +151,7 @@
|
|||
Timer.cpp
|
||||
)
|
||||
|
||||
|
||||
if ( BUILD_STATIC )
|
||||
add_library ( hurricane-static STATIC ${cpps} )
|
||||
install ( TARGETS hurricane-static DESTINATION /lib)
|
||||
else ( BUILD_STATIC )
|
||||
add_library ( hurricane SHARED ${cpps} )
|
||||
add_library ( hurricane ${cpps} )
|
||||
install ( TARGETS hurricane DESTINATION /lib)
|
||||
endif ( BUILD_STATIC )
|
||||
|
||||
install(FILES ${includes} DESTINATION /include/hurricane)
|
||||
|
|
|
@ -72,6 +72,12 @@ bool inltrace ( unsigned int level )
|
|||
return TRACE_SHOW_LEVEL <= level;
|
||||
}
|
||||
|
||||
unsigned int ltracelevel ()
|
||||
//**************************
|
||||
{
|
||||
return TRACE_SHOW_LEVEL;
|
||||
}
|
||||
|
||||
unsigned int ltracelevel ( unsigned int level )
|
||||
//**********************************************
|
||||
{
|
||||
|
|
|
@ -87,6 +87,7 @@ namespace Hurricane {
|
|||
void trace_in ();
|
||||
void trace_out ();
|
||||
bool inltrace ( unsigned int level );
|
||||
unsigned int ltracelevel ();
|
||||
unsigned int ltracelevel ( unsigned int level );
|
||||
void ltracein ( unsigned int level, unsigned int count=1 );
|
||||
void ltraceout ( unsigned int level, unsigned int count=1 );
|
||||
|
|
|
@ -109,12 +109,15 @@ namespace Hurricane {
|
|||
{
|
||||
if ( _singleton->_isTraced(symbol) )
|
||||
_singleton->_levels.push ( ltracelevel(traceLevel) );
|
||||
else {
|
||||
_singleton->_levels.push ( ltracelevel() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void DebugSession::close ()
|
||||
{
|
||||
if ( !_singleton->_levels.empty() ) {
|
||||
if ( not _singleton->_levels.empty() ) {
|
||||
ltracelevel ( _singleton->_levels.top() );
|
||||
_singleton->_levels.pop ();
|
||||
}
|
||||
|
|
|
@ -108,18 +108,9 @@
|
|||
|
||||
install ( FILES ${exports} DESTINATION /include/hurricane/viewer )
|
||||
|
||||
if ( BUILD_STATIC )
|
||||
add_library ( hviewer-static STATIC ${cpps} ${MOC_SRCS} ${RCC_SRCS} )
|
||||
target_link_libraries ( hviewer-static hurricane-static
|
||||
${QT_LIBRARIES}
|
||||
# ${Boost_LIBRARIES}
|
||||
)
|
||||
install ( TARGETS hviewer-static DESTINATION /lib )
|
||||
else ( BUILD_STATIC )
|
||||
add_library ( hviewer SHARED ${cpps} ${MOC_SRCS} ${RCC_SRCS} )
|
||||
add_library ( hviewer ${cpps} ${MOC_SRCS} ${RCC_SRCS} )
|
||||
target_link_libraries ( hviewer hurricane
|
||||
${QT_LIBRARIES}
|
||||
# ${Boost_LIBRARIES}
|
||||
)
|
||||
install ( TARGETS hviewer DESTINATION /lib )
|
||||
endif ( BUILD_STATIC )
|
||||
|
|
|
@ -82,21 +82,7 @@
|
|||
|
||||
install ( FILES ${includes} DESTINATION /include/hurricane/isobar )
|
||||
|
||||
if ( BUILD_STATIC )
|
||||
add_library ( isobar-static STATIC ${sources} )
|
||||
target_link_libraries ( isobar-static hurricane-static ${PYTHON_LIBRARIES} )
|
||||
|
||||
add_library ( Hurricane-static MODULE ${sources} )
|
||||
set_target_properties ( Hurricane-static PROPERTIES
|
||||
COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1"
|
||||
PREFIX ""
|
||||
)
|
||||
target_link_libraries ( Hurricane-static isobar-static hurricane-static ${PYTHON_LIBRARIES} )
|
||||
|
||||
install ( TARGETS isobar-static DESTINATION /lib )
|
||||
install ( TARGETS Hurricane-static DESTINATION /lib/python )
|
||||
else ( BUILD_STATIC )
|
||||
add_library ( isobar SHARED ${sources} )
|
||||
add_library ( isobar ${sources} )
|
||||
target_link_libraries ( isobar hurricane ${PYTHON_LIBRARIES} -lutil )
|
||||
|
||||
add_library ( Hurricane MODULE ${sources} )
|
||||
|
@ -108,4 +94,3 @@
|
|||
|
||||
install ( TARGETS isobar DESTINATION /lib )
|
||||
install ( TARGETS Hurricane DESTINATION /lib/python )
|
||||
endif ( BUILD_STATIC )
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
|
||||
if ( BUILD_STATIC )
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane )
|
||||
add_executable ( htest-static HTest.cpp )
|
||||
target_link_libraries ( htest-static hurricane-static )
|
||||
else ( BUILD_STATIC )
|
||||
include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane )
|
||||
add_executable ( htest HTest.cpp )
|
||||
target_link_libraries ( htest hurricane )
|
||||
endif ( BUILD_STATIC )
|
||||
|
|
Loading…
Reference in New Issue