diff --git a/src/FastANI/CMakeLists.txt b/src/FastANI/CMakeLists.txt index 92dd225..f2ac771 100644 --- a/src/FastANI/CMakeLists.txt +++ b/src/FastANI/CMakeLists.txt @@ -33,7 +33,8 @@ foreach(_header ${FASTANI_HEADERS}) set(FASTANI_GENERATED_HEADERS ${FASTANI_GENERATED_HEADERS} ${CMAKE_CURRENT_BINARY_DIR}/include/${_header}) endforeach() -add_library(fastani src/cgi/core_genome_identity.cpp ${FASTANI_GENERATED_HEADERS}) +file(COPY omp.h DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/src) +add_library(fastani src/cgi/core_genome_identity.cpp omp.cpp ${FASTANI_GENERATED_HEADERS}) target_compile_definitions(fastani PUBLIC USE_BOOST=1 BOOST_NO_EXCEPTIONS=1) target_include_directories(fastani PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/include/src) diff --git a/src/pyfastani/omp.cpp b/src/FastANI/omp.cpp similarity index 88% rename from src/pyfastani/omp.cpp rename to src/FastANI/omp.cpp index f6c6889..54fe02a 100644 --- a/src/pyfastani/omp.cpp +++ b/src/FastANI/omp.cpp @@ -9,3 +9,5 @@ int omp_get_thread_num(void) { int omp_get_num_threads(void) { return 1; } + +void omp_set_num_threads(int) {} diff --git a/src/pyfastani/omp.h b/src/FastANI/omp.h similarity index 86% rename from src/pyfastani/omp.h rename to src/FastANI/omp.h index d55ee42..5c80f12 100644 --- a/src/pyfastani/omp.h +++ b/src/FastANI/omp.h @@ -8,6 +8,7 @@ extern "C" { extern int omp_get_thread_num(void); extern int omp_get_num_threads(void); +extern void omp_set_num_threads(int); #ifdef __cplusplus } diff --git a/src/pyfastani/CMakeLists.txt b/src/pyfastani/CMakeLists.txt index 336e0e9..62510f5 100644 --- a/src/pyfastani/CMakeLists.txt +++ b/src/pyfastani/CMakeLists.txt @@ -1,4 +1,4 @@ add_subdirectory(_sequtils) cython_extension(_fasta LINKS sequtils ) -cython_extension(_fastani LINKS fastani sequtils SOURCES omp.cpp _utils.cpp) \ No newline at end of file +cython_extension(_fastani LINKS fastani sequtils SOURCES _utils.cpp) \ No newline at end of file