[DEV] update Build interface and remove wrapper on boost when no x11
This commit is contained in:
parent
b23925c8d5
commit
8f18bd0018
@ -1 +0,0 @@
|
||||
#include <chrono>
|
@ -1 +0,0 @@
|
||||
#include <condition_variable>
|
@ -1 +0,0 @@
|
||||
#include <functional>
|
@ -1 +0,0 @@
|
||||
#include <memory>
|
@ -1,2 +0,0 @@
|
||||
|
||||
#include <mutex>
|
@ -1 +0,0 @@
|
||||
#include <thread>
|
@ -1,7 +0,0 @@
|
||||
|
||||
#ifndef __ETK_CHRONO_FROM_BOOST_H__
|
||||
#define __ETK_CHRONO_FROM_BOOST_H__
|
||||
|
||||
#include <boost/chrono.hpp>
|
||||
|
||||
#endif
|
@ -1,7 +0,0 @@
|
||||
|
||||
#ifndef __ETK_CONDITION_VARIABLE_FROM_BOOST_H__
|
||||
#define __ETK_CONDITION_VARIABLE_FROM_BOOST_H__
|
||||
|
||||
#include <boost/thread/condition_variable.hpp>
|
||||
|
||||
#endif
|
@ -1,23 +0,0 @@
|
||||
|
||||
#ifndef __ETK_FUNCTIONNAL_FROM_BOOST_H__
|
||||
#define __ETK_FUNCTIONNAL_FROM_BOOST_H__
|
||||
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/placeholders.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
static boost::arg<1> _1;
|
||||
static boost::arg<2> _2;
|
||||
static boost::arg<3> _3;
|
||||
static boost::arg<4> _4;
|
||||
static boost::arg<5> _5;
|
||||
static boost::arg<6> _6;
|
||||
static boost::arg<7> _7;
|
||||
static boost::arg<8> _8;
|
||||
static boost::arg<9> _9;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -1,11 +0,0 @@
|
||||
|
||||
#ifndef __ETK_MEMORY_FROM_BOOST_H__
|
||||
#define __ETK_MEMORY_FROM_BOOST_H__
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/weak_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
|
||||
|
||||
#endif
|
@ -1,8 +0,0 @@
|
||||
|
||||
#ifndef __ETK_MUTEX_FROM_BOOST_H__
|
||||
#define __ETK_MUTEX_FROM_BOOST_H__
|
||||
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include <boost/thread/recursive_mutex.hpp>
|
||||
|
||||
#endif
|
@ -1,7 +0,0 @@
|
||||
|
||||
#ifndef __ETK_THREAD_FROM_BOOST_H__
|
||||
#define __ETK_THREAD_FROM_BOOST_H__
|
||||
|
||||
#include <boost/thread/thread.hpp>
|
||||
|
||||
#endif
|
@ -300,7 +300,7 @@ namespace etk {
|
||||
}
|
||||
|
||||
template<typename MY_TYPE, int MY_TYPE_SIZE> Color<MY_TYPE, MY_TYPE_SIZE>::Color(const std::string& _input) {
|
||||
TK_VERBOSE("convert color string : '" << _input << "'");
|
||||
//TK_VERBOSE("convert color string : '" << _input << "'");
|
||||
const char* inputData = _input.c_str();
|
||||
size_t len = _input.size();
|
||||
if( len >=1
|
||||
|
10
etk/Hash.h
10
etk/Hash.h
@ -134,7 +134,7 @@ namespace etk {
|
||||
static MY_TYPE g_error;
|
||||
int64_t elementId = getId(_key);
|
||||
if (elementId<0) {
|
||||
TK_ERROR("try to acces at an unexistant hash element : " << _key);
|
||||
//TK_ERROR("try to acces at an unexistant hash element : " << _key);
|
||||
return g_error;
|
||||
}
|
||||
return m_data[elementId]->m_value;
|
||||
@ -162,7 +162,7 @@ namespace etk {
|
||||
if (elementId <0) {
|
||||
HashData<MY_TYPE>* tmp = new HashData<MY_TYPE>(_key, _value);
|
||||
if (NULL == tmp) {
|
||||
TK_ERROR("allocation error in Hash table : '" << _key << "'");
|
||||
//TK_ERROR("allocation error in Hash table : '" << _key << "'");
|
||||
return;
|
||||
}
|
||||
m_data.push_back(tmp);
|
||||
@ -221,7 +221,7 @@ namespace etk {
|
||||
// NOTE :Do not change log level, this generate error only in debug mode
|
||||
#if DEBUG_LEVEL > 2
|
||||
if(_pos>m_data.size()){
|
||||
TK_CRITICAL("Access to an unexistant data in hach : " << _pos << "/ " << m_data.size());
|
||||
//TK_CRITICAL("Access to an unexistant data in hach : " << _pos << "/ " << m_data.size());
|
||||
}
|
||||
#endif
|
||||
return m_data[_pos]->m_key;
|
||||
@ -248,7 +248,7 @@ namespace etk {
|
||||
// NOTE :Do not change log level, this generate error only in debug mode
|
||||
#if DEBUG_LEVEL > 2
|
||||
if(_pos>m_data.size()){
|
||||
TK_CRITICAL("Access to an unexistant data in hach : " << _pos << "/ " << m_data.size());
|
||||
//TK_CRITICAL("Access to an unexistant data in hach : " << _pos << "/ " << m_data.size());
|
||||
}
|
||||
#endif
|
||||
return m_data[_pos]->m_value;
|
||||
@ -260,7 +260,7 @@ namespace etk {
|
||||
// NOTE :Do not change log level, this generate error only in debug mode
|
||||
#if DEBUG_LEVEL > 2
|
||||
if(_pos>m_data.size()){
|
||||
TK_CRITICAL("Access to an unexistant data in hach : " << _pos << "/ " << m_data.size());
|
||||
//TK_CRITICAL("Access to an unexistant data in hach : " << _pos << "/ " << m_data.size());
|
||||
}
|
||||
#endif
|
||||
return m_data[_pos]->m_value;
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include <etk/archive/Zip.h>
|
||||
#include <etk/types.h>
|
||||
#include <etk/debug.h>
|
||||
|
||||
etk::archive::Zip::Zip(const std::string& _fileName, uint64_t _offset) :
|
||||
etk::Archive(_fileName),
|
||||
|
@ -8,11 +8,12 @@
|
||||
|
||||
#include <etk/log.h>
|
||||
#include <time.h>
|
||||
#include <etk/mutex.h>
|
||||
#include <etk/thread.h>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <map>
|
||||
#include <inttypes.h>
|
||||
#include <etk/thread/tools.h>
|
||||
#include <etk/debug.h>
|
||||
|
||||
#if defined(__TARGET_OS__Android)
|
||||
# include <android/log.h>
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include <etk/math/Vector2D.h>
|
||||
#include <etk/stdTools.h>
|
||||
#include <etk/debug.h>
|
||||
|
||||
std::ostream& etk::operator <<(std::ostream& _os, const etk::Vector2D<int32_t>& _obj) {
|
||||
_os << "(";
|
||||
|
@ -12,7 +12,6 @@
|
||||
#ifndef __ETK_MATH_VECTOR2D_H__
|
||||
#define __ETK_MATH_VECTOR2D_H__
|
||||
|
||||
#include <etk/debug.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace etk {
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
#include <etk/math/Vector3D.h>
|
||||
#include <etk/stdTools.h>
|
||||
#include <etk/debug.h>
|
||||
|
||||
std::ostream& etk::operator <<(std::ostream& _os, const ivec3& _obj) {
|
||||
_os << "(";
|
||||
|
@ -11,7 +11,6 @@
|
||||
#ifndef __ETK_MATH_VECTOR3D_H__
|
||||
#define __ETK_MATH_VECTOR3D_H__
|
||||
|
||||
#include <etk/debug.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef ETK_BUILD_LINEARMATH
|
||||
|
@ -11,7 +11,6 @@
|
||||
#ifndef __ETK_MATH_VECTOR4D_H__
|
||||
#define __ETK_MATH_VECTOR4D_H__
|
||||
|
||||
#include <etk/debug.h>
|
||||
#include <math.h>
|
||||
#ifdef ETK_BUILD_LINEARMATH
|
||||
#include <LinearMath/btScalar.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <etk/tool.h>
|
||||
#include <etk/debug.h>
|
||||
#include <map>
|
||||
#include <mutex>
|
||||
#ifdef __TARGET_OS__Windows
|
||||
|
@ -822,13 +822,13 @@ namespace etk {
|
||||
std::vector<TTT> out;
|
||||
etk::FSNode node(_path);
|
||||
if (node.fileOpenRead() == false) {
|
||||
TK_ERROR("can not open file : '" << node << "'");
|
||||
//TK_ERROR("can not open file : '" << node << "'");
|
||||
return out;
|
||||
}
|
||||
uint64_t nbByte = node.fileSize();
|
||||
out.resize(nbByte/sizeof(TTT));
|
||||
if (out.size()*sizeof(TTT) != nbByte) {
|
||||
TK_WARNING("Error in reading the file missing some byte at the end ...");
|
||||
//TK_WARNING("Error in reading the file missing some byte at the end ...");
|
||||
}
|
||||
node.fileRead(&out[0], sizeof(TTT), nbByte/sizeof(TTT));
|
||||
node.fileClose();
|
||||
@ -842,7 +842,7 @@ namespace etk {
|
||||
template<typename TTT> void FSNodeWriteAllDataType(const std::string& _path, const std::vector<TTT>& _data) {
|
||||
etk::FSNode node(_path);
|
||||
if (node.fileOpenWrite() == false) {
|
||||
TK_ERROR("can not open file : '" << node << "'");
|
||||
//TK_ERROR("can not open file : '" << node << "'");
|
||||
return;
|
||||
}
|
||||
node.fileWrite(&_data[0], sizeof(TTT), _data.size());
|
||||
|
@ -9,14 +9,14 @@
|
||||
#ifndef __ETK_STD_TOOLS_H__
|
||||
#define __ETK_STD_TOOLS_H__
|
||||
|
||||
#include <etk/debug.h>
|
||||
#include <etk/types.h>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
#include <etk/chrono.h>
|
||||
#include <chrono>
|
||||
|
||||
namespace u32char {
|
||||
extern const char32_t Null; //!< '\0'
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <etk/debug.h>
|
||||
#include <etk/thread/tools.h>
|
||||
#include <etk/mutex.h>
|
||||
#include <mutex>
|
||||
#include <map>
|
||||
|
||||
static std11::mutex g_lock;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#ifndef __ETK_THREAD_TOOLS_H__
|
||||
#define __ETK_THREAD_TOOLS_H__
|
||||
|
||||
#include <etk/thread.h>
|
||||
#include <thread>
|
||||
|
||||
namespace etk {
|
||||
namespace thread {
|
||||
|
16
etk/types.h
16
etk/types.h
@ -43,19 +43,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if __CPP_VERSION__ < 2011
|
||||
#define nullptr NULL
|
||||
typedef uint32_t char32_t;
|
||||
namespace boost {
|
||||
// just define
|
||||
}
|
||||
namespace std11 = boost;
|
||||
#else
|
||||
namespace std11 = std;
|
||||
#endif
|
||||
|
||||
namespace std17 = std;
|
||||
namespace std14 = std;
|
||||
namespace std11 = std;
|
||||
|
||||
#include <etk/stdTools.h>
|
||||
|
||||
|
38
lutin_etk.py
38
lutin_etk.py
@ -33,6 +33,25 @@ def create(target):
|
||||
if target.name=="IOs":
|
||||
myModule.add_src_file('etk/logIOs.m')
|
||||
|
||||
myModule.add_header_file([
|
||||
'etk/etk.h',
|
||||
'etk/types.h',
|
||||
'etk/stdTools.h',
|
||||
'etk/log.h',
|
||||
'etk/tool.h',
|
||||
'etk/Noise.h',
|
||||
'etk/Color.h',
|
||||
'etk/Hash.h',
|
||||
'etk/thread/tools.h',
|
||||
'etk/math/Matrix4.h',
|
||||
'etk/math/Vector2D.h',
|
||||
'etk/math/Vector3D.h',
|
||||
'etk/math/Vector4D.h',
|
||||
'etk/os/Fifo.h',
|
||||
'etk/os/FSNode.h',
|
||||
'etk/os/FSNodeRight.h',
|
||||
'etk/archive/Archive.h',
|
||||
'etk/archive/Zip.h'])
|
||||
|
||||
if target.config["mode"] == "release":
|
||||
# TODO : The other way is to remove this ...
|
||||
@ -45,19 +64,10 @@ def create(target):
|
||||
if target.name != "Windows":
|
||||
myModule.add_export_flag('link', "-ldl -rdynamic")
|
||||
|
||||
# for ald C++ compatibility (old GCC) just link with boost ...
|
||||
if target.config["compilator"] == "gcc" \
|
||||
and target.xx_version < 4007000:
|
||||
# note : this framework depend on C++ 11, but a simple port of Boost for old compatibility has been done ...
|
||||
myModule.compile_version_XX(1999)
|
||||
myModule.add_optionnal_module_depend('boost', ["c++", "-DETK_BUILD_BOOST"], export=True)
|
||||
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_boost")
|
||||
else:
|
||||
myModule.compile_version_XX(2011)
|
||||
# name of the dependency
|
||||
myModule.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
|
||||
myModule.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
|
||||
myModule.add_export_path(tools.get_current_path(__file__) + "/binding_X11")
|
||||
myModule.compile_version_XX(2011)
|
||||
# name of the dependency
|
||||
myModule.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
|
||||
myModule.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
|
||||
|
||||
if target.name=="Windows":
|
||||
pass
|
||||
@ -66,7 +76,7 @@ def create(target):
|
||||
else:
|
||||
myModule.add_export_flag('link', "-lpthread")
|
||||
|
||||
myModule.add_export_path(tools.get_current_path(__file__))
|
||||
myModule.add_path(tools.get_current_path(__file__))
|
||||
|
||||
# add the currrent module at the
|
||||
return myModule
|
||||
|
Loading…
x
Reference in New Issue
Block a user