gcc编译

This commit is contained in:
fasiondog 2017-07-18 02:17:20 +08:00
parent b1a5c450b5
commit 44bb92433a
7 changed files with 70 additions and 53 deletions

View File

@ -10,7 +10,7 @@ using gcc ;
# Python configuration
#using python : 2.6 : /usr ;
using python : 3.5 ;
using python : 3.5 : : /usr/include/python3.5 ;
# Specify the path to the Boost project. If you move this project,
# adjust this path to refer to the Boost root directory.
@ -35,10 +35,10 @@ project : default-build release
: requirements <include>$(BOOST_INCLUDE_DIR)
<include>$(HKU_INCLUDE_DIR)
<toolset>gcc:<cxxflags>-ftemplate-depth-300
<toolset>gcc:<cxxflags>-std=c++0x
<toolset>clang:<cxxflags>-std=c++0x
<toolset>gcc:<cxxflags>-std=c++11
<toolset>clang:<cxxflags>-std=c++11
<toolset>gcc:<linkflags>-s
<toolset>gcc:<linkflags>-Wl,-rpath,./:../
<toolset>gcc:<linkflags>-Wl,-rpath,./
<toolset>gcc:<define>BOOST_ALL_DYN_LINK
<toolset>msvc:<address-model>64
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE

View File

@ -5,7 +5,7 @@ cp Jamroot.linux Jamroot
b2 -j 4 link=shared
#toolset=clang-linux-3.8
#toolset=clang-linux-3.8.0
toolset=gcc-5.4.0
#cd ./libs
@ -13,6 +13,19 @@ toolset=gcc-5.4.0
#cd ..
rm -v -f ./tools/hikyuu/*.so
rm -v -f ./tools/hikyuu/libboost*
cp -v -f ${BOOST_ROOT}/bin.v2/libs/python/build/${toolset}/release/libboost_python3.so.* ./tools/hikyuu/
cp -v -f ${BOOST_ROOT}/stage/lib/libboost_python.so.* ./tools/hikyuu/
cp -v -f ${BOOST_ROOT}/stage/lib/libboost_chrono.so.* ./tools/hikyuu/
cp -v -f ${BOOST_ROOT}/stage/lib/libboost_date_time.so.* ./tools/hikyuu/
cp -v -f ${BOOST_ROOT}/stage/lib/libboost_filesystem.so.* ./tools/hikyuu/
cp -v -f ${BOOST_ROOT}/stage/lib/libboost_system.so.* ./tools/hikyuu/
cp -v -f ${BOOST_ROOT}/stage/lib/libboost_serialization.so.* ./tools/hikyuu/
cp -v -f ./build/hikyuu/$toolset/release/libhikyuu.so ./tools/hikyuu
cp -v -f ./build/hikyuu_utils/$toolset/release/libhikyuu_utils.so ./tools/hikyuu
cp -v -f ./build/hikyuu_python/$toolset/release/_hikyuu.so ./tools/hikyuu
cp -v -f ./build/hikyuu_python/$toolset/release/indicator/_indicator.so ./tools/hikyuu/indicator
@ -21,11 +34,9 @@ cp -v -f ./build/hikyuu_python/$toolset/release/trade_sys/_trade_sys.so ./tools/
cp -v -f ./build/hikyuu_python/$toolset/release/trade_instance/_trade_instance.so ./tools/hikyuu/trade_instance
cp -v -f ./build/hikyuu/$toolset/release/libhikyuu.so ./tools/hikyuu
cp -v -f ./build/hikyuu_utils/$toolset/release/libhikyuu_utils.so ./tools/hikyuu
cd ./test
b2 -j 4 link=shared
b2 link=shared
python ../tools/hikyuu/test/test.py

View File

@ -35,12 +35,12 @@ lib hikyuu : [ glob-tree *.cpp ]
lib hikyuu : [ glob-tree *.cpp ]
/usr/lib/x86_64-linux-gnu/libsqlite3.so
/usr/lib/x86_64-linux-gnu/libpthread.so
../../hikyuu_extern_libs/linux64/libhdf5_serial.so
../../hikyuu_extern_libs/linux64/libhdf5_serial_hl.so
../../hikyuu_extern_libs/linux64/libhdf5_cpp.so
../../hikyuu_extern_libs/linux64/libhdf5_hl_cpp.so
../../hikyuu_extern_libs/linux64/liblog4cplus.so
../../hikyuu_extern_libs/linux64/libmysqlclient.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so
/usr/local/lib/liblog4cplus.so
/usr/lib/x86_64-linux-gnu/libmysqlclient.so
: <toolset>clang
;

View File

@ -7,6 +7,7 @@ import python ;
project : build-dir ../../build/hikyuu_python ;
project : requirements <toolset>gcc:<library>/boost/python//boost_python3
<toolset>clang:<library>/boost/python//boost_python3
<toolset>msvc:<library>/boost/python//boost_python
<library>/hikyuu//hikyuu
<library>/boost//thread
@ -34,6 +35,10 @@ python-extension _hikyuu : [ glob *.cpp ]
/usr/local/lib/liblog4cplus.so
: <toolset>gcc
;
python-extension _hikyuu : [ glob *.cpp ]
/usr/local/lib/liblog4cplus.so
: <toolset>clang
;
python-extension indicator/_indicator : [ glob indicator/*.cpp ] ;
python-extension trade_manage/_trade_manage : [ glob trade_manage/*.cpp ] ;
python-extension trade_sys/_trade_sys : [ glob trade_sys/*.cpp ] ;

View File

@ -35,7 +35,7 @@ unit-test test_all_in_one : [ glob-tree *.cpp ]
<define>TEST_ALL_IN_ONE ;
unit-test test_all_in_one : [ glob-tree *.cpp ]
../hikyuu_extern_libs/linux64/liblog4cplus.so
/usr/local/lib/liblog4cplus.so
: <toolset>clang
<define>TEST_ALL_IN_ONE ;

View File

@ -43,8 +43,8 @@ import_config = """
;db -
;sql - 使
[database]
db = {dir}\stock.db
sql = {dir}\createdb.sql
db = {dir}/stock.db
sql = {dir}/createdb.sql
;
;shsz分别指定上证
@ -66,24 +66,24 @@ sz = {dir}/weight/sznse/weight
;all默认为falseA股B股
[dest]
;all = True
sh_day = {dir}\sh_day.h5
sz_day = {dir}\sz_day.h5
sh_5min = {dir}\sh_5min.h5
sz_5min = {dir}\sz_5min.h5
sh_1min = {dir}\sh_1min.h5
sz_1min = {dir}\sz_1min.h5
sh_day = {dir}/sh_day.h5
sz_day = {dir}/sz_day.h5
sh_5min = {dir}/sh_5min.h5
sz_5min = {dir}/sz_5min.h5
sh_1min = {dir}/sh_1min.h5
sz_1min = {dir}/sz_1min.h5
"""
hikyuu_config = """
[tmpdir]
tmpdir = {dir}\\tmp
tmpdir = {dir}/tmp
[logger]
properties = {dir}\\logger.properties
properties = {dir}/logger.properties
[block]
type = qianlong
dir = {dir}\\block
dir = {dir}/block
= zsbk.ini
= hybk.ini
= dybk.ini
@ -100,7 +100,7 @@ year = 0
[baseinfo]
type = sqlite3
db = {dir}\\stock.db
db = {dir}/stock.db
;type = mysql
;host = 127.0.0.1
;port = 3306
@ -111,7 +111,7 @@ db = {dir}\\stock.db
;type = tdx
;file = D:\\TdxW_HuaTai\\vipdoc
type = hdf5
file = c:\\stock\\sh_day.h5
file = {dir}/sh_day.h5
;type = mysql
;host = 127.0.0.1
;port = 3306
@ -120,49 +120,49 @@ file = c:\\stock\\sh_day.h5
[sh_week]
type = hdf5
file = {dir}\\sh_day.h5
file = {dir}/sh_day.h5
[sh_month]
type = hdf5
file = {dir}\\sh_day.h5
file = {dir}/sh_day.h5
[sh_quarter]
type = hdf5
file = {dir}\\sh_day.h5
file = {dir}/sh_day.h5
[sh_halfyear]
type = hdf5
file = {dir}\\sh_day.h5
file = {dir}/sh_day.h5
[sh_year]
type = hdf5
file = {dir}\\sh_day.h5
file = {dir}/sh_day.h5
[sh_1min]
type = hdf5
file = {dir}\\sh_1min.h5
file = {dir}/sh_1min.h5
[sh_5min]
type = hdf5
file = {dir}\\sh_5min.h5
file = {dir}/sh_5min.h5
[sh_15min]
type = hdf5
file = {dir}\\sh_5min.h5
file = {dir}/sh_5min.h5
[sh_30min]
type = hdf5
file = {dir}\\sh_5min.h5
file = {dir}/sh_5min.h5
[sh_60min]
type = hdf5
file = {dir}\\sh_5min.h5
file = {dir}/sh_5min.h5
;
[sz_day]
type = hdf5
file = {dir}\\sz_day.h5
file = {dir}/sz_day.h5
;type = mysql
;host = 127.0.0.1
;port = 3306
@ -171,43 +171,43 @@ file = {dir}\\sz_day.h5
[sz_week]
type = hdf5
file = {dir}\\sz_day.h5
file = {dir}/sz_day.h5
[sz_month]
type = hdf5
file = {dir}\\sz_day.h5
file = {dir}/sz_day.h5
[sz_quarter]
type = hdf5
file = {dir}\\sz_day.h5
file = {dir}/sz_day.h5
[sz_halfyear]
type = hdf5
file = {dir}\\sz_day.h5
file = {dir}/sz_day.h5
[sz_year]
type = hdf5
file = {dir}\\sz_day.h5
file = {dir}/sz_day.h5
[sz_1min]
type = hdf5
file = {dir}\\sz_1min.h5
file = {dir}/sz_1min.h5
[sz_5min]
type = hdf5
file = {dir}\\sz_5min.h5
file = {dir}/sz_5min.h5
[sz_15min]
type = hdf5
file = {dir}\\sz_5min.h5
file = {dir}/sz_5min.h5
[sz_30min]
type = hdf5
file = {dir}\\sz_5min.h5
file = {dir}/sz_5min.h5
[sz_60min]
type = hdf5
file = {dir}\\sz_5min.h5
file = {dir}/sz_5min.h5
"""

View File

@ -31,10 +31,11 @@ exe importdata : [ glob-tree *.cpp ]
exe importdata : [ glob-tree *.cpp ]
/usr/lib/x86_64-linux-gnu/libsqlite3.so
/usr/lib/x86_64-linux-gnu/libpthread.so
../../hikyuu_extern_libs/linux64/libhdf5_serial.so
../../hikyuu_extern_libs/linux64/libhdf5_serial_hl.so
../../hikyuu_extern_libs/linux64/libhdf5_cpp.so
../../hikyuu_extern_libs/linux64/libhdf5_hl_cpp.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial.so
/usr/lib/x86_64-linux-gnu/libhdf5_serial_hl.so
/usr/lib/x86_64-linux-gnu/libhdf5_cpp.so
/usr/lib/x86_64-linux-gnu/libhdf5_hl_cpp.so
/usr/local/lib/liblog4cplus.so
: <toolset>clang
<define>H5_USE_16_API
;