Commit 4b03000c authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Remove the ADD_DEFINITION and upgrade the cmake requirement

parent 38cc000c
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 3.0)
project(VITE CXX C) project(VITE CXX C)
### The current version number ### The current version number
......
...@@ -244,8 +244,6 @@ set(VITE_SRCS ...@@ -244,8 +244,6 @@ set(VITE_SRCS
# VBO # VBO
############################################# #############################################
IF(VITE_ENABLE_VBO) IF(VITE_ENABLE_VBO)
ADD_DEFINITIONS(-DWITH_VBO)
SET(VITE_HDRS SET(VITE_HDRS
${VITE_HDRS} ${VITE_HDRS}
render/vbo.hpp render/vbo.hpp
...@@ -265,8 +263,6 @@ ENDIF(VITE_ENABLE_VBO) ...@@ -265,8 +263,6 @@ ENDIF(VITE_ENABLE_VBO)
# OTF Parser # OTF Parser
############################################# #############################################
IF(VITE_ENABLE_OTF) IF(VITE_ENABLE_OTF)
ADD_DEFINITIONS(-DWITH_OTF)
SET(VITE_HDRS SET(VITE_HDRS
${VITE_HDRS} ${VITE_HDRS}
parser/OTFParser/ParserDefinitionOTF.hpp parser/OTFParser/ParserDefinitionOTF.hpp
...@@ -295,7 +291,7 @@ IF(VITE_ENABLE_OTF) ...@@ -295,7 +291,7 @@ IF(VITE_ENABLE_OTF)
parser/OTFParser/OTFTraceBuilderThread.cpp parser/OTFParser/OTFTraceBuilderThread.cpp
) )
ENDIF() ENDIF()
INCLUDE_DIRECTORIES(BEFORE ${OTF_INCLUDE_DIR}) INCLUDE_DIRECTORIES(BEFORE ${OTF_INCLUDE_DIR})
ENDIF(VITE_ENABLE_OTF) ENDIF(VITE_ENABLE_OTF)
...@@ -304,7 +300,6 @@ ENDIF(VITE_ENABLE_OTF) ...@@ -304,7 +300,6 @@ ENDIF(VITE_ENABLE_OTF)
# TAU Parser # TAU Parser
############################################# #############################################
IF(VITE_ENABLE_TAU) IF(VITE_ENABLE_TAU)
ADD_DEFINITIONS(-DWITH_TAU)
SET(VITE_HDRS SET(VITE_HDRS
${VITE_HDRS} ${VITE_HDRS}
...@@ -382,7 +377,7 @@ IF(USE_QT5) ...@@ -382,7 +377,7 @@ IF(USE_QT5)
QT5_WRAP_UI(VITE_UIS_H ${VITE_UIS}) QT5_WRAP_UI(VITE_UIS_H ${VITE_UIS})
QT5_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS}) QT5_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS})
QT5_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS}) QT5_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS})
#ADD_DEFINITIONS(-DQT_NO_DEBUG)
############################################# #############################################
# QT4 # QT4
############################################# #############################################
...@@ -401,8 +396,6 @@ ELSE(USE_QT5) ...@@ -401,8 +396,6 @@ ELSE(USE_QT5)
QT4_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS}) QT4_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS})
QT4_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS}) QT4_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS})
#ADD_DEFINITIONS(-DQT_NO_DEBUG)
ENDIF(USE_QT5) ENDIF(USE_QT5)
############################################# #############################################
...@@ -462,7 +455,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") ...@@ -462,7 +455,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
TARGET_LINK_LIBRARIES(vite TARGET_LINK_LIBRARIES(vite
rt rt
) )
ADD_DEFINITIONS("-DBOOST_GZIP") #ADD_DEFINITIONS("-DBOOST_GZIP")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF(VITE_ENABLE_VBO) IF(VITE_ENABLE_VBO)
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
#include "interface/Interface_graphic.hpp" #include "interface/Interface_graphic.hpp"
#include "core/Core.hpp" #include "core/Core.hpp"
/* -- */ /* -- */
#ifdef WITH_VBO #ifdef VITE_ENABLE_VBO
#include "render/Render_alternate.hpp" #include "render/Render_alternate.hpp"
#else #else
#include "render/Render_opengl.hpp" #include "render/Render_opengl.hpp"
...@@ -602,22 +602,12 @@ bool Core::draw_trace(const string & filename, const int format) { ...@@ -602,22 +602,12 @@ bool Core::draw_trace(const string & filename, const int format) {
*Message::get_instance() << "Try to use file: " << filename << " instead of a previous parsed file: " << _file_opened << Message::ende; *Message::get_instance() << "Try to use file: " << filename << " instead of a previous parsed file: " << _file_opened << Message::ende;
} }
if(_trace!=NULL && !killed){ if(_trace!=NULL && !killed){
if (Info::Render::_x_min_visible == Info::Render::_x_max_visible){// first time if (Info::Render::_x_min_visible == Info::Render::_x_max_visible){ // first time
_trace->set_interval_constrained(new Interval(0,_trace->get_max_date())); _trace->set_interval_constrained(new Interval(0,_trace->get_max_date()));
}else{ }else{
_trace->set_interval_constrained(new Interval(Info::Render::_x_min_visible, Info::Render::_x_max_visible)); _trace->set_interval_constrained(new Interval(Info::Render::_x_min_visible, Info::Render::_x_max_visible));
//
// WARNING I HAVE COMMENTED THIS LINE BECAUSE I FOUND IT USELESS. I TRIED AFTER AND NO BUG APPEARED
// MOREOVER IT ENABLES THE PLUGIN TIME SELECTION
//
} }
// if(_state & _STATE_IN_AN_INTERVAL) {
// _trace->set_interval_constrained(new Interval(_time_start,_time_end));
// }
if(!_xml_config_file.empty() && _trace->get_view_root_containers()->empty()){//if we have a partial loading, process it here, but only once if(!_xml_config_file.empty() && _trace->get_view_root_containers()->empty()){//if we have a partial loading, process it here, but only once
launch_action(_DRAW_OPENGL_PARTIAL,NULL); launch_action(_DRAW_OPENGL_PARTIAL,NULL);
} }
...@@ -733,7 +723,7 @@ void Core::launch_action(int state, void* arg) { ...@@ -733,7 +723,7 @@ void Core::launch_action(int state, void* arg) {
SIGNAL(close_windows()), SIGNAL(close_windows()),
SLOT(on_quit_triggered())); SLOT(on_quit_triggered()));
// format.setOverlay(true); // format.setOverlay(true);
#ifdef WITH_VBO #ifdef VITE_ENABLE_VBO
_render_opengl = new Render_alternate (this, _main_window, format); _render_opengl = new Render_alternate (this, _main_window, format);
#else #else
_render_opengl = new Render_opengl (this, _main_window, format); _render_opengl = new Render_opengl (this, _main_window, format);
...@@ -756,7 +746,6 @@ void Core::launch_action(int state, void* arg) { ...@@ -756,7 +746,6 @@ void Core::launch_action(int state, void* arg) {
<< Message::ende; << Message::ende;
} }
// if (false == _render_opengl->format().hasOverlay ()){ // if (false == _render_opengl->format().hasOverlay ()){
// /* If no overlay was created, check the original format */ // /* If no overlay was created, check the original format */
......
...@@ -47,10 +47,12 @@ ...@@ -47,10 +47,12 @@
#ifndef CORE_HPP #ifndef CORE_HPP
#define CORE_HPP #define CORE_HPP
#include "common/common.hpp"
class Core; class Core;
class Interface_graphic; class Interface_graphic;
#ifdef WITH_VBO #ifdef VITE_ENABLE_VBO
class Render_alternate; class Render_alternate;
#else #else
class Render_opengl; class Render_opengl;
...@@ -293,7 +295,7 @@ protected: ...@@ -293,7 +295,7 @@ protected:
* \brief Contains the OpenGL render instance. * \brief Contains the OpenGL render instance.
*/ */
/* MOD */ /* MOD */
#ifdef WITH_VBO #ifdef VITE_ENABLE_VBO
Render_alternate* _render_opengl; Render_alternate* _render_opengl;
#else #else
Render_opengl* _render_opengl; Render_opengl* _render_opengl;
......
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
/* -- */ /* -- */
#include "common/ViteConfig.hpp"
/* -- */
#include "trace/values/Values.hpp" #include "trace/values/Values.hpp"
#include "trace/EntityTypes.hpp" #include "trace/EntityTypes.hpp"
#include "trace/Entitys.hpp" #include "trace/Entitys.hpp"
...@@ -63,19 +65,19 @@ ...@@ -63,19 +65,19 @@
#endif #endif
#include "parser/PajeParser/ParserVite.hpp" #include "parser/PajeParser/ParserVite.hpp"
#ifdef WITH_OTF #ifdef VITE_ENABLE_OTF
#include <otf.h> #include <otf.h>
#ifdef MT_PARSING #ifdef MT_PARSING
#include "parser/OTFParser/mt_ParserOTF.hpp" #include "parser/OTFParser/mt_ParserOTF.hpp"
#else #else
#include "parser/OTFParser/ParserOTF.hpp" #include "parser/OTFParser/ParserOTF.hpp"
#endif #endif
#endif //WITH_OTF #endif //VITE_ENABLE_OTF
#ifdef WITH_TAU #ifdef VITE_ENABLE_TAU
#include <TAU_tf.h> #include <TAU_tf.h>
#include "parser/TauParser/ParserTau.hpp" #include "parser/TauParser/ParserTau.hpp"
#endif //WITH_TAU #endif //VITE_ENABLE_TAU
#ifdef BOOST_SERIALIZE #ifdef BOOST_SERIALIZE
#include "ParserSplitted.hpp" #include "ParserSplitted.hpp"
...@@ -106,7 +108,7 @@ bool ParserFactory::create(Parser **parser, ...@@ -106,7 +108,7 @@ bool ParserFactory::create(Parser **parser,
*parser = new ParserVite(filename); *parser = new ParserVite(filename);
} }
else if( ext == ".otf" ) { else if( ext == ".otf" ) {
#ifdef WITH_OTF #ifdef VITE_ENABLE_OTF
#ifdef MT_PARSING #ifdef MT_PARSING
*parser = new mt_ParserOTF(filename); *parser = new mt_ParserOTF(filename);
#else #else
...@@ -115,22 +117,22 @@ bool ParserFactory::create(Parser **parser, ...@@ -115,22 +117,22 @@ bool ParserFactory::create(Parser **parser,
#else #else
*Message::get_instance() << "OTF parser was not compiled. Use parser Paje by default" << Message::endw; *Message::get_instance() << "OTF parser was not compiled. Use parser Paje by default" << Message::endw;
return false; return false;
#endif //WITH_OTF #endif //VITE_ENABLE_OTF
} }
else if( (ext == ".trc") || (ext == ".edf") ) { else if( (ext == ".trc") || (ext == ".edf") ) {
#ifdef WITH_TAU #ifdef VITE_ENABLE_TAU
*parser = new ParserTau(filename); *parser = new ParserTau(filename);
#else #else
*Message::get_instance() << "Tau parser was not compiled. Use parser Paje by default" << Message::endw; *Message::get_instance() << "Tau parser was not compiled. Use parser Paje by default" << Message::endw;
return false; return false;
#endif //WITH_TAU #endif //VITE_ENABLE_TAU
} }
else if(ext == ".vite") { else if(ext == ".vite") {
#ifdef BOOST_SERIALIZE #ifdef BOOST_SERIALIZE
*parser = new ParserSplitted(filename); *parser = new ParserSplitted(filename);
#else #else
*Message::get_instance() << "Boost serialization was not compiled. We cannot parse .vite files" << Message::endw; *Message::get_instance() << "Boost serialization was not compiled. We cannot parse .vite files" << Message::endw;
#endif //WITH_OTF #endif //VITE_ENABLE_OTF
} }
} }
......
...@@ -73,7 +73,6 @@ class Render_opengl : /*public QGLWidget,*/ public Hook_event, public Render ...@@ -73,7 +73,6 @@ class Render_opengl : /*public QGLWidget,*/ public Hook_event, public Render
{ {
Q_OBJECT Q_OBJECT
private: private:
bool _draw_container; bool _draw_container;
......
...@@ -14,7 +14,7 @@ INCLUDE(${QT_USE_FILE}) ...@@ -14,7 +14,7 @@ INCLUDE(${QT_USE_FILE})
SET(SRC_DIR ../../src) SET(SRC_DIR ../../src)
# Files needed by all the tests # Files needed by all the tests
SET(ALL_HDRS SET(ALL_HDRS
trace/Trace.hpp trace/Trace.hpp
trace/Container.hpp trace/Container.hpp
trace/ContainerType.hpp trace/ContainerType.hpp
...@@ -115,7 +115,7 @@ OPTION(ENABLE_TAU "Enable the support of TAU file format." OFF) ...@@ -115,7 +115,7 @@ OPTION(ENABLE_TAU "Enable the support of TAU file format." OFF)
IF(ENABLE_TAU) IF(ENABLE_TAU)
INCLUDE(../../cmake/FindTAU.cmake) INCLUDE(../../cmake/FindTAU.cmake)
ADD_DEFINITIONS(-DWITH_TAU) ADD_DEFINITIONS(-DWITH_TAU)
SET(TAU_HDRS SET(TAU_HDRS
parser/ParserTau.hpp parser/ParserTau.hpp
parser/TauStructs.hpp parser/TauStructs.hpp
...@@ -124,9 +124,9 @@ IF(ENABLE_TAU) ...@@ -124,9 +124,9 @@ IF(ENABLE_TAU)
SET(TAU_SRCS SET(TAU_SRCS
${SRC_DIR}parser/ParserTau.cpp ${SRC_DIR}parser/ParserTau.cpp
) )
ADD_EXECUTABLE(TimeMemoryTest_Tau TimeMemoryTest_Tau.cpp ${ALL_SRCS} ${TAU_SRCS}) ADD_EXECUTABLE(TimeMemoryTest_Tau TimeMemoryTest_Tau.cpp ${ALL_SRCS} ${TAU_SRCS})
TARGET_LINK_LIBRARIES(TimeMemoryTest_Tau TARGET_LINK_LIBRARIES(TimeMemoryTest_Tau
${QT_LIBRARIES} ${QT_LIBRARIES}
${TAU_LIBRARY} ${TAU_LIBRARY}
...@@ -147,15 +147,15 @@ IF(ENABLE_OTF) ...@@ -147,15 +147,15 @@ IF(ENABLE_OTF)
parser/ParserOTF.hpp parser/ParserOTF.hpp
${OTF_INCLUDE_DIR} ${OTF_INCLUDE_DIR}
) )
SET(OTF_SRCS SET(OTF_SRCS
${SRC_DIR}/parser/ParserDefinitionOTF.cpp ${SRC_DIR}/parser/ParserDefinitionOTF.cpp
${SRC_DIR}/parser/ParserEventOTF.cpp ${SRC_DIR}/parser/ParserEventOTF.cpp
${SRC_DIR}/parser/ParserOTF.cpp ${SRC_DIR}/parser/ParserOTF.cpp
) )
ADD_EXECUTABLE(TimeMemoryTest_OTF TimeMemoryTest_OTF.cpp ${ALL_SRCS} ${OTF_SRCS}) ADD_EXECUTABLE(TimeMemoryTest_OTF TimeMemoryTest_OTF.cpp ${ALL_SRCS} ${OTF_SRCS})
TARGET_LINK_LIBRARIES(TimeMemoryTest_OTF TARGET_LINK_LIBRARIES(TimeMemoryTest_OTF
${QT_LIBRARIES} ${QT_LIBRARIES}
${OTF_LIBRARY} ${OTF_LIBRARY}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment