test with PK_ENABLE_OS=1

This commit is contained in:
blueloveTH 2024-01-20 22:59:54 +08:00
parent 5ce5285d4b
commit 5603a0de1e
3 changed files with 4 additions and 8 deletions

View File

@ -1,15 +1,11 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.12)
project(pocketpy)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
set(Python3_EXECUTABLE "python3")
else()
find_package(Python3 COMPONENTS Interpreter)
endif()
find_package(Python3 COMPONENTS Interpreter)
execute_process(
COMMAND ${Python3_EXECUTABLE} prebuild.py

View File

@ -1,6 +1,6 @@
python3 prebuild.py
SRC=$(find src/ -name "*.cpp")
clang++ -std=c++17 --coverage -O1 -stdlib=libc++ -Wfatal-errors -o main src2/main.cpp $SRC -Iinclude
clang++ -std=c++17 --coverage -O1 -stdlib=libc++ -Wfatal-errors -o main src2/main.cpp $SRC -Iinclude -DPK_ENABLE_OS=1
python3 scripts/run_tests.py
# if prev error exit

View File

@ -34,4 +34,4 @@ with open('src2/pocketpy_c.c', 'w') as f:
#endif
''')
f.write('\n'.join(a))
f.write('\n'.join(a))