-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bayestyper: add arm64/aarch64 builds (#52076)
* bayestyper: add arm64/aarch64 builds * remove from blacklist * Update build.sh * Update bayestyper.patch
- Loading branch information
Showing
7 changed files
with
150 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 6bc8406..3a9a766 100755 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -42,9 +42,39 @@ else(${BUILD_STATIC} EQUAL 0) | ||
endif(${BUILD_STATIC} EQUAL 0) | ||
|
||
|
||
-FIND_PACKAGE(Boost COMPONENTS iostreams program_options system filesystem serialization REQUIRED) | ||
+# When user specifies boost paths to use, we need to disable searching from the | ||
+# environment and from using cmake's internal boost variables. | ||
+if (BOOST_ROOT OR BOOST_INCLUDEDIR OR BOOST_LIBRARYDIR OR DEFINED ENV{BOOST_ROOT} OR DEFINED ENV{BOOST_INCLUDEDIR} OR DEFINED ENV{BOOST_LIBRARYDIR}) | ||
+ # Don't search for system include dirs for boost | ||
+ set(Boost_NO_SYSTEM_PATHS ON) | ||
+ # Disable excessive warning messages when using multiple boost versions | ||
+ set(Boost_NO_WARN_NEW_VERSION ON) | ||
+endif() | ||
+ | ||
+# Use the OLD way of looking for Boost | ||
+# The NEW way only respects BOOST_ROOT, not these more-specific variables. | ||
+if (BOOST_INCLUDEDIR OR BOOST_LIBRARYDIR OR DEFINED ENV{BOOST_INCLUDEDIR} OR DEFINED ENV{BOOST_LIBRARYDIR}) | ||
+ # Ignore cmake boost variables | ||
+ set(Boost_NO_BOOST_CMAKE ON) | ||
+endif() | ||
+ | ||
+set( Boost_USE_STATIC_LIBS OFF ) | ||
+set( Boost_USE_MULTITHREADED TRUE ) | ||
+set( Boost_DEBUG ON ) | ||
+ | ||
+find_package(Boost 1.71.0 COMPONENTS iostreams program_options system filesystem serialization REQUIRED) | ||
message(STATUS ${Boost_LIBRARIES}) | ||
|
||
+if(Boost_FOUND) | ||
+ include_directories(${Boost_INCLUDE_DIRS}) | ||
+ LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) | ||
+endif() | ||
+ | ||
+MESSAGE("Boost configuration results:") | ||
+MESSAGE(" Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIR}") | ||
+MESSAGE(" Boost_LIBRARY_DIRS: ${Boost_LIBRARY_DIRS}") | ||
+MESSAGE(" Boost_LIBRARIES: ${Boost_LIBRARIES}") | ||
+ | ||
add_subdirectory(${CMAKE_SOURCE_DIR}/external/kmc_api) | ||
add_subdirectory(${CMAKE_SOURCE_DIR}/src/vcf++) | ||
add_subdirectory(${CMAKE_SOURCE_DIR}/src/kmerBloom) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
diff --git i/include/vcf++/VcfFile.hpp w/include/vcf++/VcfFile.hpp | ||
index 4a2f69e..aaf49be 100644 | ||
--- i/include/vcf++/VcfFile.hpp | ||
+++ w/include/vcf++/VcfFile.hpp | ||
@@ -35,8 +35,8 @@ THE SOFTWARE. | ||
#include <string> | ||
#include <unordered_set> | ||
|
||
-#include "boost/iostreams/filtering_stream.hpp" | ||
-#include "boost/iostreams/filter/gzip.hpp" | ||
+#include <boost/iostreams/filtering_stream.hpp> | ||
+#include <boost/iostreams/filter/gzip.hpp> | ||
|
||
#include "Variant.hpp" | ||
#include "VcfMetaData.hpp" | ||
diff --git i/src/vcf++/CMakeLists.txt w/src/vcf++/CMakeLists.txt | ||
index c8a6142..beddd90 100755 | ||
--- i/src/vcf++/CMakeLists.txt | ||
+++ w/src/vcf++/CMakeLists.txt | ||
@@ -3,6 +3,8 @@ project(vcf++) | ||
SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/lib) | ||
|
||
include_directories(${CMAKE_SOURCE_DIR}/include/vcf++ ${Boost_INCLUDE_DIRS}) | ||
+message(STATUS "====== DEBUG Boost_INCLUDE_DIRS: " ${Boost_INCLUDE_DIRS}) | ||
+message(STATUS "====== DEBUG Boost_LIB_DIRS: " ${Boost_LIB_DIRS}) | ||
link_directories(${Boost_LIB_DIRS}) | ||
|
||
add_library(${PROJECT_NAME} VcfFile.cpp Variant.cpp Allele.cpp VcfMetaData.cpp AttributeSet.cpp Sample.cpp Utils.cpp Attribute.cpp JoiningString.cpp Stats.cpp AttributeFilter.cpp SampleAlleleAttributeFilter.cpp FastaReader.cpp FastaRecord.cpp Auxiliaries.cpp Trio.cpp Contig.cpp Regions.cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
#!/bin/bash | ||
|
||
mkdir build && cd build | ||
cmake .. | ||
make | ||
|
||
mkdir -p ${PREFIX}/bin | ||
|
||
cp ../bin/bayesTyper ${PREFIX}/bin | ||
cp ../bin/bayesTyperTools ${PREFIX}/bin | ||
export INCLUDES="-I${PREFIX}/include" | ||
export CPLUS_INCLUDE_PATH="${PREFIX}/include" | ||
export LIBPATH="-L${PREFIX}/lib" | ||
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" | ||
export CXXFLAGS="${CXXFLAGS} -O3 -std=c++14 -I${PREFIX}/include" | ||
|
||
if [[ `uname` == "Darwin" ]]; then | ||
export CONFIG_ARGS="-DCMAKE_FIND_FRAMEWORK=NEVER -DCMAKE_FIND_APPBUNDLE=NEVER" | ||
export CXXFLAGS="${CXXFLAGS} -Wno-dev -Wno-deprecated-declarations -Wno-unused-command-line-argument" | ||
else | ||
export CONFIG_ARGS="" | ||
fi | ||
|
||
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \ | ||
-DCMAKE_CXX_COMPILER="${CXX}" \ | ||
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ | ||
-DBOOST_ROOT="${PREFIX}" \ | ||
"${CONFIG_ARGS}" | ||
cmake --build build -j "${CPU_COUNT}" | ||
|
||
chmod 0755 bin/* | ||
mv bin/bayesTyper ${PREFIX}/bin | ||
mv bin/bayesTyperTools ${PREFIX}/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/external/kmc_api/kmer_defs.h b/external/kmc_api/kmer_defs.h | ||
index 8328822..89ae5e0 100644 | ||
--- a/external/kmc_api/kmer_defs.h | ||
+++ b/external/kmc_api/kmer_defs.h | ||
@@ -33,7 +33,12 @@ | ||
|
||
|
||
#include <stdio.h> | ||
- #include <ext/algorithm> | ||
+ #if defined(__clang__) | ||
+ #include <algorithm> | ||
+ #elif defined(__GNUC__) | ||
+ #include <ext/algorithm> | ||
+ using __gnu_cxx::copy_n; | ||
+ #endif | ||
#include <iostream> | ||
using namespace std; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
diff --git a/external/kmc_api/stdafx.h b/external/kmc_api/stdafx.h | ||
index 5b8d29d..3610d6c 100644 | ||
--- a/external/kmc_api/stdafx.h | ||
+++ b/external/kmc_api/stdafx.h | ||
@@ -1,4 +1,4 @@ | ||
#include <stdio.h> | ||
-#include <ext/algorithm> | ||
+#include <algorithm> | ||
#include <iostream> | ||
using namespace std; |