Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hurstel
CGoGN
Commits
7764757b
Commit
7764757b
authored
Jul 28, 2011
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajout fichier apps_cmake, a include derriere la definition
du CGoGN_ROOT_DIR
parent
19782a24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
13 deletions
+73
-13
build/apps_cmake.txt
build/apps_cmake.txt
+56
-0
include/Utils/cgognStream.h
include/Utils/cgognStream.h
+5
-2
src/Utils/cgognStream.cpp
src/Utils/cgognStream.cpp
+12
-11
No files found.
build/apps_cmake.txt
0 → 100644
View file @
7764757b
# A mettre juste apres la definition de CGoGN_ROOT_DIR a la racine du CGoGN_Apps
SET(CMAKE_MODULE_PATH " ${CMAKE_MODULE_PATH} ${CGoGN_ROOT_DIR}/cmake_modules/")
find_package(OpenGL)
FIND_PACKAGE(Qt4 REQUIRED)
#for basile ;)
find_package(GLUT)
IF (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=${ASSERTON})
ELSE (DEFINED ASSERTON)
add_definitions(-DCGOGN_ASSERT_BOOL=false)
ENDIF (DEFINED ASSERTON)
# FOR Qt4
SET(QT_USE_QTOPENGL TRUE)
INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
# qq definition specifiques pour mac
IF(APPLE)
# a changer pour chercher la bonne version automatiquement ??
SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.6.sdk")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined -Wl,dynamic_lookup")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMAC_OSX")
SET(CMAKE_OSX_ARCHITECTURES x86_64)
ENDIF(APPLE)
IF(WIN32)
SET(GLEW_LIBRARY glew32)
SET(DEVIL_LIBRARIES DevIL ILU ILUT)
SET(ZLIB_LIBRARIES zlib)
SET(LIBXML2_LIBRARIES xml2)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/windows_dependencies/include/)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/windows_dependencies/lib/)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
find_package(DevIL)
find_package(ZLIB)
find_package(LibXml2)
SET(GLEW_LIBRARY GLEW)
IF (IL_LIBRARIES)
SET(DEVIL_LIBRARIES ${IL_LIBRARIES} ${ILU_LIBRARIES} ${ILUT_LIBRARIES})
ELSE(IL_LIBRARIES)
SET(DEVIL_LIBRARIES ${IL_LIBRARY} ${ILU_LIBRARY} ${ILUT_LIBRARY})
ENDIF(IL_LIBRARIES)
ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
SET(COMMON_LIBS ${GLUT_LIBRARY} ${OPENGL_LIBRARY} ${GLEW_LIBRARY} ${DEVIL_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBXML2_LIBRARIES} gzstream openctm assimp)
SET(CGoGN_LIBS_D topologyD algoD containerD utilsD)
SET(CGoGN_LIBS_R topology algo container utils)
SET(NUMERICAL_LIBS numerical lapack blas f2c)
include/Utils/cgognStream.h
View file @
7764757b
...
@@ -51,6 +51,7 @@ void allToStd(bool yes = true);
...
@@ -51,6 +51,7 @@ void allToStd(bool yes = true);
*/
*/
void
allToFile
(
const
std
::
string
&
filename
);
void
allToFile
(
const
std
::
string
&
filename
);
#ifndef NO_QT
/**
/**
* set all outputs to status bar of Qt interface
* set all outputs to status bar of Qt interface
*/
*/
...
@@ -61,6 +62,8 @@ void allToStatusBar(Utils::QT::SimpleQT* sqt);
...
@@ -61,6 +62,8 @@ void allToStatusBar(Utils::QT::SimpleQT* sqt);
*/
*/
void
allToConsole
(
Utils
::
QT
::
SimpleQT
*
sqt
);
void
allToConsole
(
Utils
::
QT
::
SimpleQT
*
sqt
);
#endif
/**
/**
* set all outputs to string stream buffer
* set all outputs to string stream buffer
*/
*/
...
@@ -86,13 +89,13 @@ protected:
...
@@ -86,13 +89,13 @@ protected:
int
m_out_mode
;
int
m_out_mode
;
std
::
stringstream
m_buffer
;
std
::
stringstream
m_buffer
;
#ifndef NO_QT
Utils
::
QT
::
SimpleQT
*
m_sqt_bar
;
Utils
::
QT
::
SimpleQT
*
m_sqt_bar
;
Utils
::
QT
::
SimpleQT
*
m_sqt_console
;
Utils
::
QT
::
SimpleQT
*
m_sqt_console
;
QTextEdit
*
m_qte
;
QTextEdit
*
m_qte
;
#endif
std
::
ofstream
*
m_ofs
;
std
::
ofstream
*
m_ofs
;
std
::
stringstream
*
m_oss
;
std
::
stringstream
*
m_oss
;
...
...
src/Utils/cgognStream.cpp
View file @
7764757b
...
@@ -24,8 +24,9 @@
...
@@ -24,8 +24,9 @@
#include "Utils/cgognStream.h"
#include "Utils/cgognStream.h"
#include "Utils/qtSimple.h"
#include "Utils/qtSimple.h"
#ifndef NO_QT
#include <QtGui/QTextEdit>
#include <QtGui/QTextEdit>
#endif
namespace
CGoGN
namespace
CGoGN
{
{
...
@@ -54,6 +55,7 @@ void allToFile(const std::string& filename )
...
@@ -54,6 +55,7 @@ void allToFile(const std::string& filename )
}
}
#ifndef NO_QT
void
allToStatusBar
(
Utils
::
QT
::
SimpleQT
*
sqt
)
void
allToStatusBar
(
Utils
::
QT
::
SimpleQT
*
sqt
)
{
{
CGoGNout
.
toStatusBar
(
sqt
);
CGoGNout
.
toStatusBar
(
sqt
);
...
@@ -69,6 +71,7 @@ void allToConsole(Utils::QT::SimpleQT* sqt)
...
@@ -69,6 +71,7 @@ void allToConsole(Utils::QT::SimpleQT* sqt)
CGoGNdbg
.
toConsole
(
sqt
);
CGoGNdbg
.
toConsole
(
sqt
);
}
}
#endif
void
allToBuffer
(
std
::
stringstream
*
ss
)
void
allToBuffer
(
std
::
stringstream
*
ss
)
{
{
...
@@ -84,9 +87,11 @@ void allToBuffer(std::stringstream* ss)
...
@@ -84,9 +87,11 @@ void allToBuffer(std::stringstream* ss)
Out
::
Out
()
:
Out
::
Out
()
:
m_out_mode
(
STDOUT
),
m_out_mode
(
STDOUT
),
#ifndef NO_QT
m_sqt_bar
(
NULL
),
m_sqt_bar
(
NULL
),
m_sqt_console
(
NULL
),
m_sqt_console
(
NULL
),
m_qte
(
NULL
),
m_qte
(
NULL
),
#endif
m_ofs
(
NULL
),
m_ofs
(
NULL
),
m_oss
(
NULL
),
m_oss
(
NULL
),
m_code
(
0
)
m_code
(
0
)
...
@@ -139,6 +144,7 @@ void Out::toFile(const std::string& filename )
...
@@ -139,6 +144,7 @@ void Out::toFile(const std::string& filename )
m_ofs
=
new
std
::
ofstream
(
filename
.
c_str
());
m_ofs
=
new
std
::
ofstream
(
filename
.
c_str
());
}
}
#ifndef NO_QT
void
Out
::
toStatusBar
(
Utils
::
QT
::
SimpleQT
*
sqt
)
void
Out
::
toStatusBar
(
Utils
::
QT
::
SimpleQT
*
sqt
)
{
{
if
(
sqt
!=
NULL
)
if
(
sqt
!=
NULL
)
...
@@ -157,7 +163,7 @@ void Out::toConsole(Utils::QT::SimpleQT* sqt)
...
@@ -157,7 +163,7 @@ void Out::toConsole(Utils::QT::SimpleQT* sqt)
m_out_mode
&=
~
QTCONSOLE
;
m_out_mode
&=
~
QTCONSOLE
;
m_sqt_console
=
sqt
;
m_sqt_console
=
sqt
;
}
}
#endif
void
Out
::
toBuffer
(
std
::
stringstream
*
ss
)
void
Out
::
toBuffer
(
std
::
stringstream
*
ss
)
{
{
...
@@ -205,13 +211,12 @@ Out& Out::operator<< (Special& os )
...
@@ -205,13 +211,12 @@ Out& Out::operator<< (Special& os )
*
m_ofs
<<
bufc
<<
std
::
endl
;
*
m_ofs
<<
bufc
<<
std
::
endl
;
}
}
}
}
#ifndef NO_QT
if
(
m_out_mode
&
QTSTATUSBAR
)
if
(
m_out_mode
&
QTSTATUSBAR
)
{
{
while
(
!
m_buffer
.
eof
())
while
(
!
m_buffer
.
eof
())
{
{
m_buffer
.
getline
(
bufc
,
512
);
m_buffer
.
getline
(
bufc
,
512
);
// m_sqt_bar->statusMsg(bufc);
}
}
}
}
...
@@ -230,13 +235,10 @@ Out& Out::operator<< (Special& os )
...
@@ -230,13 +235,10 @@ Out& Out::operator<< (Special& os )
else
else
m_sqt_console
->
console
()
->
setTextColor
(
QColor
(
0
,
0
,
150
));
m_sqt_console
->
console
()
->
setTextColor
(
QColor
(
0
,
0
,
150
));
}
}
// m_sqt_console->console()->insertPlainText(QString(bufc));
// m_sqt_console->console()->insertPlainText(QString("\n"));
m_sqt_console
->
console
()
->
append
(
QString
(
bufc
));
m_sqt_console
->
console
()
->
append
(
QString
(
bufc
));
}
}
}
}
#endif
if
(
m_out_mode
&
SSBUFFER
)
if
(
m_out_mode
&
SSBUFFER
)
{
{
while
(
!
m_buffer
.
eof
())
while
(
!
m_buffer
.
eof
())
...
@@ -265,13 +267,12 @@ Out& Out::operator<< (Special& os )
...
@@ -265,13 +267,12 @@ Out& Out::operator<< (Special& os )
*
m_ofs
<<
bufc
<<
std
::
flush
;
*
m_ofs
<<
bufc
<<
std
::
flush
;
}
}
}
}
#ifndef NO_QT
if
(
m_out_mode
&
QTSTATUSBAR
)
if
(
m_out_mode
&
QTSTATUSBAR
)
{
{
while
(
!
m_buffer
.
eof
())
while
(
!
m_buffer
.
eof
())
{
{
m_buffer
.
getline
(
bufc
,
512
);
m_buffer
.
getline
(
bufc
,
512
);
// m_sqt_bar->statusMsg(bufc);
}
}
}
}
...
@@ -295,7 +296,7 @@ Out& Out::operator<< (Special& os )
...
@@ -295,7 +296,7 @@ Out& Out::operator<< (Special& os )
m_sqt_console
->
console
()
->
insertPlainText
(
QString
(
bufc
));
m_sqt_console
->
console
()
->
insertPlainText
(
QString
(
bufc
));
}
}
}
}
#endif
if
(
m_out_mode
&
SSBUFFER
)
if
(
m_out_mode
&
SSBUFFER
)
{
{
while
(
!
m_buffer
.
eof
())
while
(
!
m_buffer
.
eof
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment