mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-02 03:48:19 +08:00
优化 setup.py build 及其他文件名调整
This commit is contained in:
parent
9ff8ac99c8
commit
71fbc2e5de
89
config.h.in
89
config.h.in
@ -2,95 +2,6 @@
|
|||||||
#ifndef HIKYUU_CONFIG_H_
|
#ifndef HIKYUU_CONFIG_H_
|
||||||
#define HIKYUU_CONFIG_H_
|
#define HIKYUU_CONFIG_H_
|
||||||
|
|
||||||
#ifdef __APPLE__
|
|
||||||
#include <TargetConditionals.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* CPU 架构宏定义
|
|
||||||
*/
|
|
||||||
#if defined(__arm__)
|
|
||||||
#define HKU_ARCH_ARM 1
|
|
||||||
#define HKU_ARCH_ARM64 0
|
|
||||||
#define HKU_ARCH_X86 0
|
|
||||||
#define HKU_ARCH_X64 0
|
|
||||||
#elif defined(__aarch64__)
|
|
||||||
#define HKU_ARCH_ARM 0
|
|
||||||
#define HKU_ARCH_ARM64 1
|
|
||||||
#define HKU_ARCH_X86 0
|
|
||||||
#define HKU_ARCH_X64 0
|
|
||||||
#elif defined(__x86_64__) || defined(_WIN64)
|
|
||||||
#define HKU_ARCH_ARM 0
|
|
||||||
#define HKU_ARCH_ARM64 0
|
|
||||||
#define HKU_ARCH_X86 0
|
|
||||||
#define HKU_ARCH_X64 1
|
|
||||||
#elif defined(__i386__) || defined(_WIN32)
|
|
||||||
#define HKU_ARCH_ARM 0
|
|
||||||
#define HKU_ARCH_ARM64 0
|
|
||||||
#define HKU_ARCH_X86 1
|
|
||||||
#define HKU_ARCH_X64 0
|
|
||||||
#else
|
|
||||||
#define HKU_ARCH_ARM 0
|
|
||||||
#define HKU_ARCH_ARM64 0
|
|
||||||
#define HKU_ARCH_X86 0
|
|
||||||
#define HKU_ARCH_X64 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 操作系统宏定义
|
|
||||||
*/
|
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
|
||||||
#define HKU_OS_WINOWS 1
|
|
||||||
#define HKU_OS_LINUX 0
|
|
||||||
#define HKU_OS_ANDROID 0
|
|
||||||
#define HKU_OS_OSX 0
|
|
||||||
#define HKU_OS_IOS 0
|
|
||||||
#elif defined(__ANDROID__)
|
|
||||||
#define HKU_OS_WINOWS 0
|
|
||||||
#define HKU_OS_LINUX 0
|
|
||||||
#define HKU_OS_ANDROID 1
|
|
||||||
#define HKU_OS_OSX 0
|
|
||||||
#define HKU_OS_IOS 0
|
|
||||||
#elif defined(__linux__)
|
|
||||||
#define HKU_OS_WINOWS 0
|
|
||||||
#define HKU_OS_LINUX 1
|
|
||||||
#define HKU_OS_ANDROID 0
|
|
||||||
#define HKU_OS_OSX 0
|
|
||||||
#define HKU_OS_IOS 0
|
|
||||||
#elif TARGET_OS_OSX
|
|
||||||
#define HKU_OS_WINOWS 0
|
|
||||||
#define HKU_OS_LINUX 0
|
|
||||||
#define HKU_OS_ANDROID 0
|
|
||||||
#define HKU_OS_OSX 1
|
|
||||||
#define HKU_OS_IOS 0
|
|
||||||
#elif TARGET_OS_IOS || TARGET_OS_IPHONE
|
|
||||||
#define HKU_OS_WINOWS 0
|
|
||||||
#define HKU_OS_LINUX 0
|
|
||||||
#define HKU_OS_ANDROID 0
|
|
||||||
#define HKU_OS_OSX 0
|
|
||||||
#define HKU_OS_IOS 1
|
|
||||||
#else
|
|
||||||
#define HKU_OS_WINOWS 0
|
|
||||||
#define HKU_OS_LINUX 0
|
|
||||||
#define HKU_OS_ANDROID 0
|
|
||||||
#define HKU_OS_OSX 0
|
|
||||||
#define HKU_OS_IOS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// IOS 模拟器
|
|
||||||
#if HKU_OS_IOS && TARGET_OS_SIMULATOR
|
|
||||||
#define HKU_OS_IOS_SIMULATOR 1
|
|
||||||
#else
|
|
||||||
#define HKU_OS_IOS_SIMULATOR 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ARM NEON 优化
|
|
||||||
#if HKU_OS_ANDROID && HKU_ARCH_ARM64
|
|
||||||
#define HKU_ENBALE_NEON 0
|
|
||||||
#else
|
|
||||||
#define HKU_ENBALE_NEON 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
|
|
||||||
// support serialization
|
// support serialization
|
||||||
|
@ -25,11 +25,13 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
//#include <vector>
|
// #include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
#include "utilities/osdef.h"
|
||||||
|
#include "utilities/cppdef.h"
|
||||||
#include "datetime/Datetime.h"
|
#include "datetime/Datetime.h"
|
||||||
#include "utilities/Null.h"
|
#include "utilities/Null.h"
|
||||||
#include "utilities/arithmetic.h"
|
#include "utilities/arithmetic.h"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "global/GlobalSpotAgent.h"
|
#include "global/GlobalSpotAgent.h"
|
||||||
#include "global/schedule/scheduler.h"
|
#include "global/schedule/scheduler.h"
|
||||||
#include "indicator/IndicatorImp.h"
|
#include "indicator/IndicatorImp.h"
|
||||||
#include "global/environment.h"
|
#include "global/sysinfo.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
namespace hku {
|
namespace hku {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <boost/uuid/uuid_generators.hpp>
|
#include <boost/uuid/uuid_generators.hpp>
|
||||||
#include "hikyuu/utilities/osdef.h"
|
#include "hikyuu/utilities/osdef.h"
|
||||||
#include "hikyuu/Log.h"
|
#include "hikyuu/Log.h"
|
||||||
#include "environment.h"
|
#include "sysinfo.h"
|
||||||
|
|
||||||
namespace hku {
|
namespace hku {
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <boost/python.hpp>
|
#include <boost/python.hpp>
|
||||||
#include <hikyuu/hikyuu.h>
|
#include <hikyuu/hikyuu.h>
|
||||||
#include <hikyuu/global/environment.h>
|
#include <hikyuu/global/sysinfo.h>
|
||||||
|
|
||||||
namespace py = boost::python;
|
namespace py = boost::python;
|
||||||
using namespace hku;
|
using namespace hku;
|
||||||
|
5
setup.py
5
setup.py
@ -128,11 +128,12 @@ def start_build(verbose=False, mode='release', worker_num=2):
|
|||||||
print(cmd)
|
print(cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
|
|
||||||
os.system("xmake -j {} -b {} hikyuu".format(worker_num,
|
|
||||||
"-v -D" if verbose else ""))
|
|
||||||
if mode == "release":
|
if mode == "release":
|
||||||
os.system("xmake -j {} -b {} core".format(worker_num,
|
os.system("xmake -j {} -b {} core".format(worker_num,
|
||||||
"-v -D" if verbose else ""))
|
"-v -D" if verbose else ""))
|
||||||
|
else:
|
||||||
|
os.system("xmake -j {} -b {} hikyuu".format(
|
||||||
|
worker_num, "-v -D" if verbose else ""))
|
||||||
|
|
||||||
# 保存当前的编译信息
|
# 保存当前的编译信息
|
||||||
save_current_compile_info(current_compile_info)
|
save_current_compile_info(current_compile_info)
|
||||||
|
Loading…
Reference in New Issue
Block a user