diff --git a/CMakeLists.txt b/CMakeLists.txt index e10d0ace..1e154f41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/run_tests.sh b/run_tests.sh index 6ce5f06e..d86170b4 100644 --- a/run_tests.sh +++ b/run_tests.sh @@ -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 diff --git a/scripts/genstub.py b/scripts/genstub.py index 0ce8aafa..6283d4d4 100644 --- a/scripts/genstub.py +++ b/scripts/genstub.py @@ -34,4 +34,4 @@ with open('src2/pocketpy_c.c', 'w') as f: #endif ''') - f.write('\n'.join(a)) \ No newline at end of file + f.write('\n'.join(a))