mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
...
This commit is contained in:
parent
1b978b5d01
commit
3201d83377
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
@ -61,11 +61,6 @@ jobs:
|
|||||||
path: output
|
path: output
|
||||||
- name: Benchmark
|
- name: Benchmark
|
||||||
run: python3 scripts/run_tests.py benchmark
|
run: python3 scripts/run_tests.py benchmark
|
||||||
- name: GCC Build Test
|
|
||||||
run: |
|
|
||||||
SRC=$(find src/ -name "*.cpp")
|
|
||||||
g++ -o main --std=c++17 src/main.cpp $SRC
|
|
||||||
python3 scripts/run_tests.py
|
|
||||||
- name: C Binding Test
|
- name: C Binding Test
|
||||||
run: bash run_c_binding_test.sh
|
run: bash run_c_binding_test.sh
|
||||||
build_macos:
|
build_macos:
|
||||||
@ -112,22 +107,3 @@ jobs:
|
|||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: plugins/flutter/example/build/app/outputs/flutter-apk/output
|
path: plugins/flutter/example/build/app/outputs/flutter-apk/output
|
||||||
# build_web:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v3
|
|
||||||
# - name: Setup emsdk
|
|
||||||
# uses: mymindstorm/setup-emsdk@v12
|
|
||||||
# with:
|
|
||||||
# version: 3.1.25
|
|
||||||
# actions-cache-folder: 'emsdk-cache'
|
|
||||||
# - name: Verify emsdk
|
|
||||||
# run: emcc -v
|
|
||||||
# - name: Compile
|
|
||||||
# run: |
|
|
||||||
# mkdir -p output/web/lib
|
|
||||||
# python3 build.py web
|
|
||||||
# cp web/lib/* output/web/lib
|
|
||||||
# - uses: actions/upload-artifact@v3
|
|
||||||
# with:
|
|
||||||
# path: output
|
|
@ -12,3 +12,8 @@
|
|||||||
#define PK_INLINE_EXPORT PK_EXPORT inline
|
#define PK_INLINE_EXPORT PK_EXPORT inline
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PK_SHARED_MODULE
|
||||||
|
#undef PK_EXPORT
|
||||||
|
#define PK_EXPORT
|
||||||
|
#endif
|
||||||
|
@ -4,8 +4,17 @@ project(test)
|
|||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if(MSVC)
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR- /EHsc /utf-8 /O2")
|
||||||
|
else()
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -fexceptions -O2")
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /FORCE:UNRESOLVED")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#define PK_SHARED_MODULE
|
||||||
#include "pocketpy.h"
|
#include "pocketpy.h"
|
||||||
|
|
||||||
using namespace pkpy;
|
using namespace pkpy;
|
||||||
@ -15,4 +16,14 @@ extern "C" {
|
|||||||
return mod;
|
return mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if _WIN32
|
||||||
|
BOOL WINAPI DllMain(
|
||||||
|
HINSTANCE hinstDLL, // handle to DLL module
|
||||||
|
DWORD fdwReason, // reason for calling function
|
||||||
|
LPVOID lpvReserved ) // reserved
|
||||||
|
{
|
||||||
|
return TRUE; // Successful DLL_PROCESS_ATTACH.
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user