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

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)
### The current version number
......
......@@ -244,8 +244,6 @@ set(VITE_SRCS
# VBO
#############################################
IF(VITE_ENABLE_VBO)
ADD_DEFINITIONS(-DWITH_VBO)
SET(VITE_HDRS
${VITE_HDRS}
render/vbo.hpp
......@@ -265,8 +263,6 @@ ENDIF(VITE_ENABLE_VBO)
# OTF Parser
#############################################
IF(VITE_ENABLE_OTF)
ADD_DEFINITIONS(-DWITH_OTF)
SET(VITE_HDRS
${VITE_HDRS}
parser/OTFParser/ParserDefinitionOTF.hpp
......@@ -295,7 +291,7 @@ IF(VITE_ENABLE_OTF)
parser/OTFParser/OTFTraceBuilderThread.cpp
)
ENDIF()
INCLUDE_DIRECTORIES(BEFORE ${OTF_INCLUDE_DIR})
ENDIF(VITE_ENABLE_OTF)
......@@ -304,7 +300,6 @@ ENDIF(VITE_ENABLE_OTF)
# TAU Parser
#############################################
IF(VITE_ENABLE_TAU)
ADD_DEFINITIONS(-DWITH_TAU)
SET(VITE_HDRS
${VITE_HDRS}
......@@ -382,7 +377,7 @@ IF(USE_QT5)
QT5_WRAP_UI(VITE_UIS_H ${VITE_UIS})
QT5_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS})
QT5_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS})
#ADD_DEFINITIONS(-DQT_NO_DEBUG)
#############################################
# QT4
#############################################
......@@ -401,8 +396,6 @@ ELSE(USE_QT5)
QT4_WRAP_CPP(VITE_MOC ${VITE_UIS_H} ${VITE_MOC_HDRS})
QT4_ADD_RESOURCES(VITE_RCC_SRCS ${VITE_RCCS})
#ADD_DEFINITIONS(-DQT_NO_DEBUG)
ENDIF(USE_QT5)
#############################################
......@@ -462,7 +455,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
TARGET_LINK_LIBRARIES(vite
rt
)
ADD_DEFINITIONS("-DBOOST_GZIP")
#ADD_DEFINITIONS("-DBOOST_GZIP")
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
IF(VITE_ENABLE_VBO)
......
......@@ -117,7 +117,7 @@
#include "interface/Interface_graphic.hpp"
#include "core/Core.hpp"
/* -- */
#ifdef WITH_VBO
#ifdef VITE_ENABLE_VBO
#include "render/Render_alternate.hpp"
#else
#include "render/Render_opengl.hpp"
......@@ -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;
}
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()));
}else{
_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
launch_action(_DRAW_OPENGL_PARTIAL,NULL);
}
......@@ -733,7 +723,7 @@ void Core::launch_action(int state, void* arg) {
SIGNAL(close_windows()),
SLOT(on_quit_triggered()));
// format.setOverlay(true);
#ifdef WITH_VBO
#ifdef VITE_ENABLE_VBO
_render_opengl = new Render_alternate (this, _main_window, format);
#else
_render_opengl = new Render_opengl (this, _main_window, format);
......@@ -756,7 +746,6 @@ void Core::launch_action(int state, void* arg) {
<< Message::ende;
}
// if (false == _render_opengl->format().hasOverlay ()){
// /* If no overlay was created, check the original format */
......
......@@ -47,10 +47,12 @@
#ifndef CORE_HPP
#define CORE_HPP
#include "common/common.hpp"
class Core;
class Interface_graphic;
#ifdef WITH_VBO
#ifdef VITE_ENABLE_VBO
class Render_alternate;
#else
class Render_opengl;
......@@ -293,7 +295,7 @@ protected:
* \brief Contains the OpenGL render instance.
*/
/* MOD */
#ifdef WITH_VBO
#ifdef VITE_ENABLE_VBO
Render_alternate* _render_opengl;
#else
Render_opengl* _render_opengl;
......
......@@ -47,6 +47,8 @@
#include <fstream>
#include <sstream>
/* -- */
#include "common/ViteConfig.hpp"
/* -- */
#include "trace/values/Values.hpp"
#include "trace/EntityTypes.hpp"
#include "trace/Entitys.hpp"
......@@ -63,19 +65,19 @@
#endif
#include "parser/PajeParser/ParserVite.hpp"
#ifdef WITH_OTF
#ifdef VITE_ENABLE_OTF
#include <otf.h>
#ifdef MT_PARSING
#include "parser/OTFParser/mt_ParserOTF.hpp"
#else
#include "parser/OTFParser/ParserOTF.hpp"
#endif
#endif //WITH_OTF
#endif //VITE_ENABLE_OTF
#ifdef WITH_TAU
#ifdef VITE_ENABLE_TAU
#include <TAU_tf.h>
#include "parser/TauParser/ParserTau.hpp"
#endif //WITH_TAU
#endif //VITE_ENABLE_TAU
#ifdef BOOST_SERIALIZE
#include "ParserSplitted.hpp"
......@@ -106,7 +108,7 @@ bool ParserFactory::create(Parser **parser,
*parser = new ParserVite(filename);
}
else if( ext == ".otf" ) {
#ifdef WITH_OTF
#ifdef VITE_ENABLE_OTF
#ifdef MT_PARSING
*parser = new mt_ParserOTF(filename);
#else
......@@ -115,22 +117,22 @@ bool ParserFactory::create(Parser **parser,
#else
*Message::get_instance() << "OTF parser was not compiled. Use parser Paje by default" << Message::endw;
return false;
#endif //WITH_OTF
#endif //VITE_ENABLE_OTF
}
else if( (ext == ".trc") || (ext == ".edf") ) {
#ifdef WITH_TAU
#ifdef VITE_ENABLE_TAU
*parser = new ParserTau(filename);
#else
*Message::get_instance() << "Tau parser was not compiled. Use parser Paje by default" << Message::endw;
return false;
#endif //WITH_TAU
#endif //VITE_ENABLE_TAU
}
else if(ext == ".vite") {
#ifdef BOOST_SERIALIZE
*parser = new ParserSplitted(filename);
#else
*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
{
Q_OBJECT
private:
bool _draw_container;
......
......@@ -14,7 +14,7 @@ INCLUDE(${QT_USE_FILE})
SET(SRC_DIR ../../src)
# Files needed by all the tests
SET(ALL_HDRS
SET(ALL_HDRS
trace/Trace.hpp
trace/Container.hpp
trace/ContainerType.hpp
......@@ -115,7 +115,7 @@ OPTION(ENABLE_TAU "Enable the support of TAU file format." OFF)
IF(ENABLE_TAU)
INCLUDE(../../cmake/FindTAU.cmake)
ADD_DEFINITIONS(-DWITH_TAU)
SET(TAU_HDRS
parser/ParserTau.hpp
parser/TauStructs.hpp
......@@ -124,9 +124,9 @@ IF(ENABLE_TAU)
SET(TAU_SRCS
${SRC_DIR}parser/ParserTau.cpp
)
ADD_EXECUTABLE(TimeMemoryTest_Tau TimeMemoryTest_Tau.cpp ${ALL_SRCS} ${TAU_SRCS})
TARGET_LINK_LIBRARIES(TimeMemoryTest_Tau
${QT_LIBRARIES}
${TAU_LIBRARY}
......@@ -147,15 +147,15 @@ IF(ENABLE_OTF)
parser/ParserOTF.hpp
${OTF_INCLUDE_DIR}
)
SET(OTF_SRCS
${SRC_DIR}/parser/ParserDefinitionOTF.cpp
${SRC_DIR}/parser/ParserEventOTF.cpp
${SRC_DIR}/parser/ParserOTF.cpp
)
ADD_EXECUTABLE(TimeMemoryTest_OTF TimeMemoryTest_OTF.cpp ${ALL_SRCS} ${OTF_SRCS})
TARGET_LINK_LIBRARIES(TimeMemoryTest_OTF
${QT_LIBRARIES}
${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