diff --git a/config.h.in b/config.h.in index 1c5c004a..233649c6 100644 --- a/config.h.in +++ b/config.h.in @@ -2,95 +2,6 @@ #ifndef HIKYUU_CONFIG_H_ #define HIKYUU_CONFIG_H_ -#ifdef __APPLE__ -#include -#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 // support serialization diff --git a/hikyuu_cpp/hikyuu/DataType.h b/hikyuu_cpp/hikyuu/DataType.h index 6713956a..4ae15d02 100644 --- a/hikyuu_cpp/hikyuu/DataType.h +++ b/hikyuu_cpp/hikyuu/DataType.h @@ -25,11 +25,13 @@ #include #include #include -//#include +// #include #include #include #include "Log.h" +#include "utilities/osdef.h" +#include "utilities/cppdef.h" #include "datetime/Datetime.h" #include "utilities/Null.h" #include "utilities/arithmetic.h" diff --git a/hikyuu_cpp/hikyuu/GlobalInitializer.cpp b/hikyuu_cpp/hikyuu/GlobalInitializer.cpp index 9df7c3b0..f7b48248 100644 --- a/hikyuu_cpp/hikyuu/GlobalInitializer.cpp +++ b/hikyuu_cpp/hikyuu/GlobalInitializer.cpp @@ -22,7 +22,7 @@ #include "global/GlobalSpotAgent.h" #include "global/schedule/scheduler.h" #include "indicator/IndicatorImp.h" -#include "global/environment.h" +#include "global/sysinfo.h" #include "debug.h" namespace hku { diff --git a/hikyuu_cpp/hikyuu/global/environment.cpp b/hikyuu_cpp/hikyuu/global/sysinfo.cpp similarity index 96% rename from hikyuu_cpp/hikyuu/global/environment.cpp rename to hikyuu_cpp/hikyuu/global/sysinfo.cpp index 75a028ca..dca09353 100644 --- a/hikyuu_cpp/hikyuu/global/environment.cpp +++ b/hikyuu_cpp/hikyuu/global/sysinfo.cpp @@ -10,7 +10,7 @@ #include #include "hikyuu/utilities/osdef.h" #include "hikyuu/Log.h" -#include "environment.h" +#include "sysinfo.h" namespace hku { diff --git a/hikyuu_cpp/hikyuu/global/environment.h b/hikyuu_cpp/hikyuu/global/sysinfo.h similarity index 100% rename from hikyuu_cpp/hikyuu/global/environment.h rename to hikyuu_cpp/hikyuu/global/sysinfo.h diff --git a/hikyuu_pywrap/main.cpp b/hikyuu_pywrap/main.cpp index b1795dea..ad0f5972 100644 --- a/hikyuu_pywrap/main.cpp +++ b/hikyuu_pywrap/main.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include namespace py = boost::python; using namespace hku; diff --git a/setup.py b/setup.py index 39a80164..fdf39179 100644 --- a/setup.py +++ b/setup.py @@ -128,11 +128,12 @@ def start_build(verbose=False, mode='release', worker_num=2): print(cmd) os.system(cmd) - os.system("xmake -j {} -b {} hikyuu".format(worker_num, - "-v -D" if verbose else "")) if mode == "release": os.system("xmake -j {} -b {} core".format(worker_num, "-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)