This commit is contained in:
Zengtudor 2024-10-19 11:36:13 +08:00
parent 720a206c9b
commit 1410ff270a
7 changed files with 322 additions and 268 deletions

5
.gitignore vendored
View File

@ -1,3 +1,8 @@
/.*
/build*
/*.txt
!CMakeLists.txt
# ---> C++
# Prerequisites
*.d

35
CMakeLists.txt Normal file
View File

@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.10)
project(dna)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
message("It's in ${CMAKE_BUILD_TYPE} mode.")
file(GLOB_RECURSE SRC_HPPS CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.hpp)
foreach(SRC_HPP IN LISTS SRC_HPPS)
message("found header : ${SRC_HPP}")
endforeach()
file(GLOB_RECURSE SRC_CPPS CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp)
foreach(SRC_CPP IN LISTS SRC_CPPS)
message("found cpp : ${SRC_CPP}")
endforeach()
add_executable(${PROJECT_NAME}_bin ${SRC_HPPS} ${SRC_CPPS})
add_subdirectory(pybind11)
pybind11_add_module(${PROJECT_NAME} ${SRC_HPPS} ${SRC_CPPS})
target_compile_definitions(${PROJECT_NAME} PRIVATE DNA_IS_PYBIND)

5
py_example.py Normal file
View File

@ -0,0 +1,5 @@
import dna
# help(dna)
dna.dna_reverse("filteredReads.txt","reversedSequence.txt")

1
src/dna.hpp Normal file
View File

@ -0,0 +1 @@
#pragma once

8
src/main.cpp Normal file
View File

@ -0,0 +1,8 @@
#include "dna.hpp"
#include <iostream>
#include
int main(){
}