Added speedup project code.
This commit is contained in:
34
content/posts/python-speedup/code/CMakeLists.txt
Normal file
34
content/posts/python-speedup/code/CMakeLists.txt
Normal file
@ -0,0 +1,34 @@
|
||||
cmake_minimum_required(VERSION 3.30)
|
||||
|
||||
project(
|
||||
pyspeed
|
||||
VERSION 0.1.0
|
||||
DESCRIPTION "C++ extension for Python speedup"
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE SRCFILES "src/*.cpp")
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS true)
|
||||
set(CMAKE_EXECUTABLE_ENABLE_EXPORTS TRUE)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
add_compile_options(
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wpedantic
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-value
|
||||
-Wno-missing-field-initializers
|
||||
-Wno-gnu-zero-variadic-macro-arguments
|
||||
-Wno-narrowing
|
||||
-Wno-pointer-arith
|
||||
-Wno-clobbered
|
||||
-fmacro-prefix-map=${CMAKE_SOURCE_DIR}/=
|
||||
)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(python REQUIRED IMPORTED_TARGET python3)
|
||||
|
||||
add_library(speedup SHARED src/speedup.cpp)
|
||||
target_link_libraries(speedup PkgConfig::python)
|
||||
Reference in New Issue
Block a user