+
Skip to content

add cmake support #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
cmake_minimum_required(VERSION 2.8)
project(bwa)

set(CFLAGS
-g
-Wall
-Wno-unused-function
-O2)

set(WRAP_MALLOC
-DUSE_MALLOC_WRAPPERS)

set(LIBS
m
z
pthread)

exec_program(uname
ARGS -s
OUTPUT_VARIABLE target)

if(target STREQUAL "Linux")
set(LIBS
rt
${LIBS})
endif()

add_definitions(-DHAVE_PTHREAD ${WRAP_MALLOC})
string(REPLACE ";" " " CMAKE_C_FLAGS "${CFLAGS}")

set(LOBJS_FILES
utils.c
kthread.c
kstring.c
ksw.c
bwt.c
bntseq.c
bwa.c
bwamem.c
bwamem_pair.c
bwamem_extra.c
malloc_wrap.c
QSufSort.c
bwt_gen.c
rope.c
rle.c
is.c
bwtindex.c)

set(AOBJS_FILES
bwashm.c
bwase.c
bwaseqio.c
bwtgap.c
bwtaln.c
bamlite.c
bwape.c
kopen.c
pemerge.c
maxk.c
bwtsw2_core.c
bwtsw2_main.c
bwtsw2_aux.c
bwt_lite.c
bwtsw2_chain.c
fastmap.c
bwtsw2_pair.c)


add_library(bwa_static ${LOBJS_FILES})

add_executable(bwa ${AOBJS_FILES} main.c)
target_link_libraries(bwa bwa_static)

add_executable(bwamem-lite example.c)
target_link_libraries(bwamem-lite bwa_static)

target_link_libraries(bwa ${LIBS})
target_link_libraries(bwamem-lite ${LIBS})
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载