This is an automated email from the git hooks/post-receive script. misterc-guest pushed a commit to annotated tag upstream/2.3.0_0.20161019_af07bc1+dfsg in repository seqan2.
commit 97da30dcb5e22030cbbeb46790967798947b9f16 Author: Michael R. Crusoe <[email protected]> Date: Thu Oct 20 02:19:09 2016 -0700 New upstream version 2.3.0~0.20161019~af07bc1+dfsg --- apps/alf/CMakeLists.txt | 4 +- apps/bs_tools/CMakeLists.txt | 8 +-- apps/bs_tools/casbar.h | 14 ++--- apps/bs_tools/casbar_score.h | 2 + apps/dfi/CMakeLists.txt | 4 +- apps/dfi/dfi.cpp | 2 + apps/fiona/CMakeLists.txt | 10 ++-- apps/fx_tools/CMakeLists.txt | 4 +- apps/gustaf/CMakeLists.txt | 4 +- apps/insegt/CMakeLists.txt | 4 +- apps/mason2/CMakeLists.txt | 8 +-- apps/micro_razers/CMakeLists.txt | 4 +- apps/ngs_roi/CMakeLists.txt | 6 ++- apps/pair_align/CMakeLists.txt | 4 +- apps/param_chooser/CMakeLists.txt | 4 +- apps/rabema/CMakeLists.txt | 6 ++- apps/razers/CMakeLists.txt | 4 +- apps/razers/readSimulator.h | 2 + apps/razers3/CMakeLists.txt | 10 ++-- apps/razers3/readSimulator.h | 2 + apps/rep_sep/CMakeLists.txt | 4 +- apps/sak/CMakeLists.txt | 4 +- apps/sam2matrix/CMakeLists.txt | 4 +- apps/samcat/CMakeLists.txt | 8 +-- apps/searchjoin/CMakeLists.txt | 6 ++- apps/seqan_tcoffee/CMakeLists.txt | 4 +- apps/seqcons2/CMakeLists.txt | 6 ++- apps/sgip/CMakeLists.txt | 4 +- apps/snp_store/CMakeLists.txt | 8 +-- apps/splazers/CMakeLists.txt | 4 +- apps/splazers/readSimulator.h | 2 + apps/stellar/CMakeLists.txt | 4 +- apps/tree_recon/CMakeLists.txt | 4 +- apps/yara/CMakeLists.txt | 10 ++-- include/seqan/bam_io/cigar.h | 19 ++++--- include/seqan/blast/blast_tabular_in.h | 1 + include/seqan/graph_align/graph_impl_align.h | 12 +++++ include/seqan/graph_types/graph_impl_automaton.h | 55 +++++++++++++++++++ include/seqan/graph_types/graph_impl_directed.h | 64 ++++++++++++++++++++++- include/seqan/graph_types/graph_impl_hmm.h | 12 +++++ include/seqan/graph_types/graph_impl_tree.h | 12 +++++ include/seqan/graph_types/graph_impl_undirected.h | 50 ++++++++++++++++++ include/seqan/graph_types/graph_interface.h | 14 +++++ include/seqan/index/pump_extender7.h | 24 ++++----- include/seqan/index/shape_threshold.h | 2 + include/seqan/journaled_set/score_biaffine.h | 31 ++++++++--- include/seqan/parallel/parallel_lock.h | 24 ++++++--- include/seqan/pipe/pipe_edit_environment.h | 2 + include/seqan/platform.h | 13 +++++ include/seqan/seeds/banded_chain_alignment_impl.h | 19 ++++++- tests/align/CMakeLists.txt | 4 +- tests/align_extend/CMakeLists.txt | 4 +- tests/align_profile/CMakeLists.txt | 4 +- tests/align_split/CMakeLists.txt | 4 +- tests/alignment_free/CMakeLists.txt | 4 +- tests/arg_parse/CMakeLists.txt | 4 +- tests/bam_io/CMakeLists.txt | 6 ++- tests/basic/CMakeLists.txt | 4 +- tests/bed_io/CMakeLists.txt | 4 +- tests/blast/CMakeLists.txt | 4 +- tests/consensus/CMakeLists.txt | 4 +- tests/consensus_v2/CMakeLists.txt | 4 +- tests/find/CMakeLists.txt | 4 +- tests/gff_io/CMakeLists.txt | 4 +- tests/graph_algorithms/CMakeLists.txt | 4 +- tests/graph_align/CMakeLists.txt | 4 +- tests/graph_align/test_graph_impl_align.h | 10 ++++ tests/graph_msa/CMakeLists.txt | 4 +- tests/graph_types/CMakeLists.txt | 4 +- tests/graph_types/test_graph_types_types.cpp | 58 +++++++++++++++++++- tests/index/CMakeLists.txt | 6 ++- tests/journaled_set/CMakeLists.txt | 4 +- tests/journaled_string_tree/CMakeLists.txt | 6 ++- tests/map/CMakeLists.txt | 4 +- tests/misc/CMakeLists.txt | 4 +- tests/modifier/CMakeLists.txt | 4 +- tests/modifier_cyclic_shape/CMakeLists.txt | 4 +- tests/multiple_translation_units/CMakeLists.txt | 4 +- tests/parallel/CMakeLists.txt | 6 ++- tests/parse_lm/CMakeLists.txt | 4 +- tests/pipe/CMakeLists.txt | 4 +- tests/platform/CMakeLists.txt | 4 +- tests/random/CMakeLists.txt | 4 +- tests/realign/CMakeLists.txt | 4 +- tests/reduced_aminoacid/CMakeLists.txt | 4 +- tests/roi_io/CMakeLists.txt | 4 +- tests/score/CMakeLists.txt | 4 +- tests/seeds/CMakeLists.txt | 4 +- tests/seeds/test_align_banded_chain_impl.cpp | 18 +++++++ tests/seq_io/CMakeLists.txt | 8 +-- tests/sequence/CMakeLists.txt | 4 +- tests/sequence_journaled/CMakeLists.txt | 4 +- tests/simple_intervals_io/CMakeLists.txt | 4 +- tests/statistics/CMakeLists.txt | 4 +- tests/store/CMakeLists.txt | 6 ++- tests/stream/CMakeLists.txt | 8 +-- tests/swift_local/CMakeLists.txt | 4 +- tests/tabix_io/CMakeLists.txt | 6 ++- tests/translation/CMakeLists.txt | 6 ++- tests/ucsc_io/CMakeLists.txt | 4 +- tests/vcf_io/CMakeLists.txt | 4 +- util/cmake/SeqAnBuildSystem.cmake | 17 ++++-- 102 files changed, 692 insertions(+), 157 deletions(-) diff --git a/apps/alf/CMakeLists.txt b/apps/alf/CMakeLists.txt index dd46ac5..081ec24 100644 --- a/apps/alf/CMakeLists.txt +++ b/apps/alf/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.1.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/bs_tools/CMakeLists.txt b/apps/bs_tools/CMakeLists.txt index 1b9aa03..1272a0f 100644 --- a/apps/bs_tools/CMakeLists.txt +++ b/apps/bs_tools/CMakeLists.txt @@ -22,9 +22,11 @@ endif () # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (Boost) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (Boost) + find_package (SeqAn REQUIRED) +endif () if (NOT Boost_FOUND OR NOT ZLIB_FOUND) message (STATUS " Boost or zlib not found: Not building bs_tools.") diff --git a/apps/bs_tools/casbar.h b/apps/bs_tools/casbar.h index 5ee5ad9..1831843 100755 --- a/apps/bs_tools/casbar.h +++ b/apps/bs_tools/casbar.h @@ -722,13 +722,13 @@ int readMatchesFromSamBam( { switch (record.cigar[i].operation) { - case 'D': std::cout << 'D' << record.cigar[i].count; - // case 'N': std::cout << 'N' << record.cigar[i].count; - // case 'P': std::cout << 'P' << record.cigar[i].count; - case 'I': std::cout << 'I' << record.cigar[i].count; - case 'M': std::cout << 'M' << record.cigar[i].count; - // case 'S': std::cout << 'S' << record.cigar[i].count; - case 'X': std::cout << 'X' << record.cigar[i].count; + case 'D': std::cout << 'D' << record.cigar[i].count; break; + // case 'N': std::cout << 'N' << record.cigar[i].count; break; + // case 'P': std::cout << 'P' << record.cigar[i].count; break; + case 'I': std::cout << 'I' << record.cigar[i].count; break; + case 'M': std::cout << 'M' << record.cigar[i].count; break; + // case 'S': std::cout << 'S' << record.cigar[i].count; break; + case 'X': std::cout << 'X' << record.cigar[i].count; break; } } std::cout << std::endl; diff --git a/apps/bs_tools/casbar_score.h b/apps/bs_tools/casbar_score.h index 847fced..50ece61 100644 --- a/apps/bs_tools/casbar_score.h +++ b/apps/bs_tools/casbar_score.h @@ -188,6 +188,7 @@ assignTargetFreqs(Score<TValue, BsTagList<TBsProfileScore, TModel, TCellDescript me.targetFreqs[i][1] += (estMethLevel/sum)/4.0; // C me.targetFreqs[i][2] += (1.0/sum)/4.0; // G me.targetFreqs[i][3] += ((1.0-estMethLevel)/sum)/4.0; // T + SEQAN_FALLTHROUGH case -1: // Ref gap refGap = 1; // Helper to take ref gap into account break; @@ -263,6 +264,7 @@ assignTargetFreqs(Score<TValue, BsTagList<TBsProfileScore, TModel, TCellDescript me.targetFreqs[i][1] += (1.0/sum)/4.0; // C me.targetFreqs[i][2] += (estMethLevel/sum)/4.0; // G me.targetFreqs[i][3] += (1.0/sum)/4.0; // T + SEQAN_FALLTHROUGH case -1: // Ref gap refGap = 1; break; diff --git a/apps/dfi/CMakeLists.txt b/apps/dfi/CMakeLists.txt index 28aca24..224aafa 100644 --- a/apps/dfi/CMakeLists.txt +++ b/apps/dfi/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "2.1.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/dfi/dfi.cpp b/apps/dfi/dfi.cpp index 3bedb96..97a1ac2 100644 --- a/apps/dfi/dfi.cpp +++ b/apps/dfi/dfi.cpp @@ -836,6 +836,7 @@ int main(int argc, const char *argv[]) case 1: return runDFI<PredMinFreq, PredMaxFreq, AminoAcid> (getArgumentValues(parser, 0), options.minFreq, options.maxFreq, options.maximal, options); case 2: return runDFI<PredMinFreq, PredMaxFreq, Dna> (getArgumentValues(parser, 0), options.minFreq, options.maxFreq, options.maximal, options); } + break; case 1: switch (options.alphabet) { @@ -843,6 +844,7 @@ int main(int argc, const char *argv[]) case 1: return runDFI<PredMinSupp, PredEmerging, AminoAcid> (getArgumentValues(parser, 0), options.minSupp, options.growthRate, options.maximal, options); case 2: return runDFI<PredMinSupp, PredEmerging, Dna> (getArgumentValues(parser, 0), options.minSupp, options.growthRate, options.maximal, options); } + break; case 2: switch (options.alphabet) { diff --git a/apps/fiona/CMakeLists.txt b/apps/fiona/CMakeLists.txt index 7b1a457..19c0915 100644 --- a/apps/fiona/CMakeLists.txt +++ b/apps/fiona/CMakeLists.txt @@ -17,10 +17,12 @@ set (SEQAN_APP_VERSION "0.2.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (ZLIB) -find_package (Boost) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (ZLIB) + find_package (Boost) + find_package (SeqAn REQUIRED) +endif () # Stop here if we cannot find Boost or OpenMP. if (NOT Boost_FOUND OR NOT OPENMP_FOUND) diff --git a/apps/fx_tools/CMakeLists.txt b/apps/fx_tools/CMakeLists.txt index b1dba00..4fff732 100644 --- a/apps/fx_tools/CMakeLists.txt +++ b/apps/fx_tools/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "0.2.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/gustaf/CMakeLists.txt b/apps/gustaf/CMakeLists.txt index ba8de50..bb869c7 100644 --- a/apps/gustaf/CMakeLists.txt +++ b/apps/gustaf/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.0.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/insegt/CMakeLists.txt b/apps/insegt/CMakeLists.txt index c121b5d..618234b 100644 --- a/apps/insegt/CMakeLists.txt +++ b/apps/insegt/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.1.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/mason2/CMakeLists.txt b/apps/mason2/CMakeLists.txt index a2f93ad..fe446fe 100644 --- a/apps/mason2/CMakeLists.txt +++ b/apps/mason2/CMakeLists.txt @@ -17,9 +17,11 @@ set (SEQAN_APP_VERSION "2.0.5") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () if (NOT ZLIB_FOUND) message (STATUS " ZLIB not found: MASON2 will not be built.") diff --git a/apps/micro_razers/CMakeLists.txt b/apps/micro_razers/CMakeLists.txt index 2bfe6de..c964ce3 100644 --- a/apps/micro_razers/CMakeLists.txt +++ b/apps/micro_razers/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.0.7") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/ngs_roi/CMakeLists.txt b/apps/ngs_roi/CMakeLists.txt index 1c35b9c..975f7cd 100644 --- a/apps/ngs_roi/CMakeLists.txt +++ b/apps/ngs_roi/CMakeLists.txt @@ -18,8 +18,10 @@ set (SEQAN_APP_VERSION "0.2.8") # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/pair_align/CMakeLists.txt b/apps/pair_align/CMakeLists.txt index 2a8d343..7141472 100644 --- a/apps/pair_align/CMakeLists.txt +++ b/apps/pair_align/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.3.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/param_chooser/CMakeLists.txt b/apps/param_chooser/CMakeLists.txt index 8172966..c52ce86 100644 --- a/apps/param_chooser/CMakeLists.txt +++ b/apps/param_chooser/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "0.0.5") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/rabema/CMakeLists.txt b/apps/rabema/CMakeLists.txt index b329515..eaba075 100644 --- a/apps/rabema/CMakeLists.txt +++ b/apps/rabema/CMakeLists.txt @@ -17,8 +17,10 @@ set (SEQAN_APP_VERSION "1.2.6") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () if (NOT ZLIB_FOUND) message (STATUS " ZLIB not found: RABEMA will not be built.") diff --git a/apps/razers/CMakeLists.txt b/apps/razers/CMakeLists.txt index aafa2d0..5af8db4 100644 --- a/apps/razers/CMakeLists.txt +++ b/apps/razers/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.5.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/razers/readSimulator.h b/apps/razers/readSimulator.h index 2aaa3df..bc04f2d 100644 --- a/apps/razers/readSimulator.h +++ b/apps/razers/readSimulator.h @@ -305,6 +305,7 @@ void simulateReads( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; @@ -331,6 +332,7 @@ void simulateReads( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; diff --git a/apps/razers3/CMakeLists.txt b/apps/razers3/CMakeLists.txt index bcb8e32..a4b347f 100644 --- a/apps/razers3/CMakeLists.txt +++ b/apps/razers3/CMakeLists.txt @@ -23,10 +23,12 @@ if (SEQAN_TRAVIS_BUILD) endif () # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (ZLIB) -find_package (BZip2) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (ZLIB) + find_package (BZip2) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/razers3/readSimulator.h b/apps/razers3/readSimulator.h index f08ee0e..aa3df4c 100644 --- a/apps/razers3/readSimulator.h +++ b/apps/razers3/readSimulator.h @@ -308,6 +308,7 @@ void simulateReads( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; @@ -334,6 +335,7 @@ void simulateReads( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; diff --git a/apps/rep_sep/CMakeLists.txt b/apps/rep_sep/CMakeLists.txt index c7a6535..55ee89a 100644 --- a/apps/rep_sep/CMakeLists.txt +++ b/apps/rep_sep/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "0.1.7") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/sak/CMakeLists.txt b/apps/sak/CMakeLists.txt index 3d6425e..dd7b49e 100644 --- a/apps/sak/CMakeLists.txt +++ b/apps/sak/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "0.4.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/sam2matrix/CMakeLists.txt b/apps/sam2matrix/CMakeLists.txt index b27a258..ceb2576 100644 --- a/apps/sam2matrix/CMakeLists.txt +++ b/apps/sam2matrix/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "0.3.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/samcat/CMakeLists.txt b/apps/samcat/CMakeLists.txt index a517812..a9dfa1b 100644 --- a/apps/samcat/CMakeLists.txt +++ b/apps/samcat/CMakeLists.txt @@ -17,9 +17,11 @@ set (SEQAN_APP_VERSION "0.3.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/searchjoin/CMakeLists.txt b/apps/searchjoin/CMakeLists.txt index 8cca23c..f3cde97 100644 --- a/apps/searchjoin/CMakeLists.txt +++ b/apps/searchjoin/CMakeLists.txt @@ -17,8 +17,10 @@ set (SEQAN_APP_VERSION "0.5.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/seqan_tcoffee/CMakeLists.txt b/apps/seqan_tcoffee/CMakeLists.txt index 346b1c8..54ce1d8 100644 --- a/apps/seqan_tcoffee/CMakeLists.txt +++ b/apps/seqan_tcoffee/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.13.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/seqcons2/CMakeLists.txt b/apps/seqcons2/CMakeLists.txt index b6355fa..37d1fe5 100644 --- a/apps/seqcons2/CMakeLists.txt +++ b/apps/seqcons2/CMakeLists.txt @@ -17,8 +17,10 @@ set (SEQAN_APP_VERSION "2.0.5") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/sgip/CMakeLists.txt b/apps/sgip/CMakeLists.txt index 3cdd6d7..3e9b2b3 100755 --- a/apps/sgip/CMakeLists.txt +++ b/apps/sgip/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.4.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/snp_store/CMakeLists.txt b/apps/snp_store/CMakeLists.txt index 5a3221d..08a709c 100644 --- a/apps/snp_store/CMakeLists.txt +++ b/apps/snp_store/CMakeLists.txt @@ -17,9 +17,11 @@ set (SEQAN_APP_VERSION "1.3.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (Boost) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (Boost) + find_package (SeqAn REQUIRED) +endif () if (NOT Boost_FOUND OR NOT ZLIB_FOUND) message (STATUS " Boost or zlib not found: Not building snp_store.") diff --git a/apps/splazers/CMakeLists.txt b/apps/splazers/CMakeLists.txt index dda53b9..0731a5e 100644 --- a/apps/splazers/CMakeLists.txt +++ b/apps/splazers/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.3.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () if (NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message (STATUS " Not building splazers on 32bit architectures.") diff --git a/apps/splazers/readSimulator.h b/apps/splazers/readSimulator.h index 8c84453..4c53fee 100644 --- a/apps/splazers/readSimulator.h +++ b/apps/splazers/readSimulator.h @@ -308,6 +308,7 @@ void simulateReads( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; @@ -334,6 +335,7 @@ void simulateReads( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; diff --git a/apps/stellar/CMakeLists.txt b/apps/stellar/CMakeLists.txt index 5be5713..b6ba635 100644 --- a/apps/stellar/CMakeLists.txt +++ b/apps/stellar/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.4.7") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/tree_recon/CMakeLists.txt b/apps/tree_recon/CMakeLists.txt index e18c3af..045d62b 100644 --- a/apps/tree_recon/CMakeLists.txt +++ b/apps/tree_recon/CMakeLists.txt @@ -17,7 +17,9 @@ set (SEQAN_APP_VERSION "1.4.4") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/apps/yara/CMakeLists.txt b/apps/yara/CMakeLists.txt index 1098717..9b70998 100644 --- a/apps/yara/CMakeLists.txt +++ b/apps/yara/CMakeLists.txt @@ -20,10 +20,12 @@ if (COMPILER_MSVC) endif () # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (ZLIB) -find_package (BZip2) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (ZLIB) + find_package (BZip2) + find_package (SeqAn REQUIRED) +endif () # Warn if OpenMP was not found. if (NOT OPENMP_FOUND) diff --git a/include/seqan/bam_io/cigar.h b/include/seqan/bam_io/cigar.h index 9a75797..8a61fef 100644 --- a/include/seqan/bam_io/cigar.h +++ b/include/seqan/bam_io/cigar.h @@ -145,18 +145,19 @@ inline bool operator==(CigarElement<TOperation, TCount> const & lhs, // ---------------------------------------------------------------------------- template <typename TOperation, typename TCount> +[[deprecated("The behavior is not clear. This function should not be used anymore.")]] uint32_t toBamCigarElement(CigarElement<TOperation, TCount> const & cigarElement) { char operation = 0; switch (cigarElement.operation) { - case 'X': operation += 1; - case '=': operation += 1; - case 'P': operation += 1; - case 'H': operation += 1; - case 'S': operation += 1; - case 'N': operation += 1; - case 'D': operation += 1; - case 'I': operation += 1; + case 'X': operation += 1; SEQAN_FALLTHROUGH + case '=': operation += 1; SEQAN_FALLTHROUGH + case 'P': operation += 1; SEQAN_FALLTHROUGH + case 'H': operation += 1; SEQAN_FALLTHROUGH + case 'S': operation += 1; SEQAN_FALLTHROUGH + case 'N': operation += 1; SEQAN_FALLTHROUGH + case 'D': operation += 1; SEQAN_FALLTHROUGH + case 'I': operation += 1; SEQAN_FALLTHROUGH case 'M': break; } return (cigarElement.count << 4) | operation; @@ -648,6 +649,7 @@ unsigned cigarToGapAnchorRead(TGaps & gaps, TCigarString const & cigar) if (atBegin) beginGaps += cigar[i].count; insertGaps(it, cigar[i].count); + SEQAN_FALLTHROUGH case 'I': case 'M': case 'S': @@ -677,6 +679,7 @@ unsigned cigarToGapAnchorContig(TGaps & gaps, TCigarString const & cigar) if (atBegin) beginGaps += cigar[i].count; insertGaps(it, cigar[i].count); + SEQAN_FALLTHROUGH case 'D': case 'M': case 'N': diff --git a/include/seqan/blast/blast_tabular_in.h b/include/seqan/blast/blast_tabular_in.h index 16224ca..c4d5eea 100644 --- a/include/seqan/blast/blast_tabular_in.h +++ b/include/seqan/blast/blast_tabular_in.h @@ -548,6 +548,7 @@ _readField(BlastMatch<TAlignRow0, TAlignRow1, TPos, TQId, TSId> & match, break; case BlastMatchField<>::Enum::P_POS: match.alignStats.alignmentSimilarity = lexicalCast<double>(context._stringBuffer); + break; case BlastMatchField<>::Enum::FRAMES: { clear(context._setBuffer2); diff --git a/include/seqan/graph_align/graph_impl_align.h b/include/seqan/graph_align/graph_impl_align.h index 76c436a..d78aa7d 100644 --- a/include/seqan/graph_align/graph_impl_align.h +++ b/include/seqan/graph_align/graph_impl_align.h @@ -666,6 +666,18 @@ getAdjacencyMatrix(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, ////////////////////////////////////////////////////////////////////////////// +template<typename TVector, typename TStringSet, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + Graph<Alignment<TStringSet, TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + getVertexAdjacencyVector(vectIn, vectOut, g.data_align, vertex); +} + +////////////////////////////////////////////////////////////////////////////// + template<typename TStringSet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Alignment<TStringSet, TCargo, TSpec> > >::Type findEdge(Graph<Alignment<TStringSet, TCargo, TSpec> > const& g, diff --git a/include/seqan/graph_types/graph_impl_automaton.h b/include/seqan/graph_types/graph_impl_automaton.h index 1adb8e1..ce5128e 100644 --- a/include/seqan/graph_types/graph_impl_automaton.h +++ b/include/seqan/graph_types/graph_impl_automaton.h @@ -574,6 +574,61 @@ getAdjacencyMatrix(Graph<Automaton<TAlphabet, TCargo, TSpec> > const& g, ////////////////////////////////////////////////////////////////////////////// +template<typename TVector, typename TAlphabet, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + Graph<Automaton<TAlphabet, TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + typedef Graph<Automaton<TAlphabet, TCargo, TSpec> > TGraph; + typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor; + typedef typename Size<TGraph>::Type TGraphSize; + typedef typename EdgeType<TGraph>::Type TEdgeStump; + typedef typename Size<TVector>::Type TSize; + typedef typename Iterator<String<AutomatonEdgeArray<TEdgeStump, TAlphabet> > const, Standard>::Type TIterConst; + typedef typename Value<TVector>::Type TMatValue; + + TVertexDescriptor nilVal = getNil<TVertexDescriptor>(); + TSize lenVectIn = inDegree(g, vertex); + TSize lenVectOut = outDegree(g, vertex); + clear(vectIn); + clear(vectOut); + resize(vectIn, lenVectIn, 0); + resize(vectOut, lenVectOut, 0); + TIterConst itIn = begin(g.data_vertex, Standard()); + TIterConst itEndIn = end(g.data_vertex, Standard()); + TSize count = 0; + TVertexDescriptor pos = 0; + for(; itIn != itEndIn; ++itIn, ++pos) + { + if (idInUse(g.data_id_managerV, pos)) + { + for(TSize i = 0; i < static_cast<TSize>(ValueSize<TAlphabet>::VALUE); ++i) + { + if ((*itIn).data_edge[i].data_target == vertex) + { + TVertexDescriptor source = pos; + vectIn[count] = static_cast<TMatValue>(static_cast<TGraphSize>(vectIn[count]) + source); + ++count; + } + } + } + } + count = 0; + for(TSize i = 0; i < static_cast<TSize>(ValueSize<TAlphabet>::VALUE); ++i) + { + TVertexDescriptor target = static_cast<TVertexDescriptor>(getTarget(& g.data_vertex[vertex].data_edge[i])); + if ( target != nilVal) + { + vectOut[count] = static_cast<TMatValue>(static_cast<TGraphSize>(vectOut[count]) + target); + ++count; + } + } +} + +////////////////////////////////////////////////////////////////////////////// + template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor, typename TLabel> inline typename EdgeDescriptor<Graph<Automaton<TAlphabet, TCargo, TSpec> > >::Type findEdge(Graph<Automaton<TAlphabet, TCargo, TSpec> >& g, diff --git a/include/seqan/graph_types/graph_impl_directed.h b/include/seqan/graph_types/graph_impl_directed.h index b9261cd..4fd7dc4 100644 --- a/include/seqan/graph_types/graph_impl_directed.h +++ b/include/seqan/graph_types/graph_impl_directed.h @@ -33,7 +33,7 @@ #ifndef SEQAN_HEADER_GRAPH_IMPL_DIRECTED_H #define SEQAN_HEADER_GRAPH_IMPL_DIRECTED_H -// TODO(holtgrew): The graph uses linked lists for storing edges. Thus, the graphs are not guaranteed to have good cache locality. We should also have a forward star/adjacency array implementation. +// TODO(holtgrew): The graph uses linked lists for storing edges. Thus, the graphs are not guaranteed to have good cache locality. namespace seqan { @@ -892,6 +892,68 @@ getAdjacencyMatrix(Graph<Directed<TCargo, TSpec> > const & g, ////////////////////////////////////////////////////////////////////////////// +template<typename TVector, typename TGraph, typename TVertex> +inline void +_getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + TGraph const & g, + TVertex const & vertex) +{ + typedef typename Size<TGraph>::Type TGraphSize; + typedef typename EdgeType<TGraph>::Type TEdgeStump; + typedef typename Size<TVector>::Type TSize; + typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor; + typedef typename Iterator<String<TEdgeStump*> const, Standard>::Type TIterConst; + typedef typename Value<TVector>::Type TMatValue; + + TSize lenVectIn = inDegree(g, vertex); + TSize lenVectOut = outDegree(g, vertex); + clear(vectIn); + clear(vectOut); + resize(vectIn, lenVectIn, 0); + resize(vectOut, lenVectOut, 0); + TIterConst itIn = begin(g.data_vertex, Standard()); + TIterConst itEndIn = end(g.data_vertex, Standard()); + TSize count = 0; + for(; itIn != itEndIn; ++itIn) + { + TEdgeStump * currentIn = *itIn; + while(currentIn != 0) + { + if ((TVertexDescriptor) getTarget(currentIn) == vertex) + { + TVertexDescriptor source = sourceVertex(g, currentIn); + vectIn[count] = static_cast<TMatValue>(static_cast<TGraphSize>(vectIn[count]) + source); + ++count; + } + currentIn = getNextT(currentIn); + } + } + count = 0; + TEdgeStump * currentOut = getValue(g.data_vertex, vertex); + while(currentOut != 0) + { + TVertexDescriptor target = targetVertex(g, currentOut); + vectOut[count] = static_cast<TMatValue>(static_cast<TGraphSize>(vectOut[count]) + target); + currentOut = getNextT(currentOut); + ++count; + } +} + +////////////////////////////////////////////////////////////////////////////// + +template<typename TVector, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + Graph<Directed<TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + _getVertexAdjacencyVector(vectIn, vectOut, g, vertex); +} + +////////////////////////////////////////////////////////////////////////////// + template <typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Directed<TCargo, TSpec> > >::Type findEdge(Graph<Directed<TCargo, TSpec> > const & g, diff --git a/include/seqan/graph_types/graph_impl_hmm.h b/include/seqan/graph_types/graph_impl_hmm.h index adea5a4..98aa06d 100644 --- a/include/seqan/graph_types/graph_impl_hmm.h +++ b/include/seqan/graph_types/graph_impl_hmm.h @@ -462,6 +462,18 @@ getAdjacencyMatrix(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, ////////////////////////////////////////////////////////////////////////////// +template<typename TVector, typename TAlphabet, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + Graph<Hmm<TAlphabet, TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + getVertexAdjacencyVector(vectIn, vectOut, g.data_model, vertex); +} + +////////////////////////////////////////////////////////////////////////////// + template<typename TAlphabet, typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Hmm<TAlphabet, TCargo, TSpec> > >::Type findEdge(Graph<Hmm<TAlphabet, TCargo, TSpec> > const& g, diff --git a/include/seqan/graph_types/graph_impl_tree.h b/include/seqan/graph_types/graph_impl_tree.h index a3decae..121620c 100644 --- a/include/seqan/graph_types/graph_impl_tree.h +++ b/include/seqan/graph_types/graph_impl_tree.h @@ -639,6 +639,18 @@ getAdjacencyMatrix(Graph<Tree<TCargo, TSpec> > const& g, ////////////////////////////////////////////////////////////////////////////// +template<typename TVector, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + Graph<Tree<TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + _getVertexAdjacencyVector(vectIn, vectOut, g, vertex); +} + +////////////////////////////////////////////////////////////////////////////// + template<typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Tree<TCargo, TSpec> > >::Type findEdge(Graph<Tree<TCargo, TSpec> >& g, diff --git a/include/seqan/graph_types/graph_impl_undirected.h b/include/seqan/graph_types/graph_impl_undirected.h index 3634775..8fa3e20 100644 --- a/include/seqan/graph_types/graph_impl_undirected.h +++ b/include/seqan/graph_types/graph_impl_undirected.h @@ -689,6 +689,56 @@ getAdjacencyMatrix(Graph<Undirected<TCargo, TSpec> > const& g, ////////////////////////////////////////////////////////////////////////////// +template<typename TVector, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectOut, + Graph<Undirected<TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + typedef Graph<Undirected<TCargo, TSpec> > TGraph; + typedef typename Size<TGraph>::Type TGraphSize; + typedef typename VertexDescriptor<TGraph>::Type TVertexDescriptor; + typedef typename EdgeType<TGraph>::Type TEdgeStump; + typedef typename Size<TVector>::Type TSize; + typedef typename Value<TVector>::Type TMatValue; + + TSize lenVectOut = outDegree(g, vertex); + clear(vectOut); + resize(vectOut, lenVectOut, 0); + TSize count=0; + TEdgeStump * currentOut = g.data_vertex[vertex]; + while(currentOut!=0) + { + TVertexDescriptor target = targetVertex(g, currentOut); + if (target == vertex) + { + currentOut = getNextT(currentOut); + } else + { + vectOut[count] = static_cast<TMatValue>(static_cast<TGraphSize>(vectOut[count]) + target); + currentOut = getNextS(currentOut); + } + ++count; + } +} + +template<typename TVector, typename TCargo, typename TSpec, typename TVertex> +inline void +getVertexAdjacencyVector(TVector & vectIn, + TVector & vectOut, + Graph<Undirected<TCargo, TSpec> > const & g, + TVertex const & vertex) +{ + // vectIn and vectOut are equal for undirected graphs + getVertexAdjacencyVector(vectOut, g, vertex); + clear(vectIn); + resize(vectIn, length(vectOut), 0); + for(unsigned i = 0; i < length(vectOut); ++i) + vectIn[i] = vectOut[i]; +} + +////////////////////////////////////////////////////////////////////////////// + template<typename TCargo, typename TSpec, typename TVertexDescriptor> inline typename EdgeDescriptor<Graph<Undirected<TCargo, TSpec> > >::Type findEdge(Graph<Undirected<TCargo, TSpec> > const& g, diff --git a/include/seqan/graph_types/graph_interface.h b/include/seqan/graph_types/graph_interface.h index cebb167..efb38bf 100644 --- a/include/seqan/graph_types/graph_interface.h +++ b/include/seqan/graph_types/graph_interface.h @@ -568,6 +568,20 @@ struct Alphabet<Graph<Hmm<TAlphabet, TCargo, TSpec> > const> { */ /*! + * @fn Graph#getVertexAdjacencyVector + * @brief Build an adjacency vector representation of a vertex of the graph. + * + * @signature void getVertexAdjacencyVector(vectIn, vectOut, g, vertex); + * + * @param[out] vectIn A @link String @endlink filled with <tt>n</tt> elements of @link IntegerConcept @endlink + * where <tt>vectIn[i]</tt> gives the id number of the source vertex + * @param[out] vectOut A @link String @endlink filled with <tt>n</tt> elements of @link IntegerConcept @endlink + * where <tt>vectOut[i]</tt> gives the id number of the target vertex + * @param[in] g The Graph under exploration. + * @param[in] vertex The vertex to compute ajacency vector for. + */ + +/*! * @fn Graph#findEdge * @brief Finds an edge. * diff --git a/include/seqan/index/pump_extender7.h b/include/seqan/index/pump_extender7.h index 1b1a949..0e8adc7 100644 --- a/include/seqan/index/pump_extender7.h +++ b/include/seqan/index/pump_extender7.h @@ -140,28 +140,28 @@ namespace seqan switch (r) { case 6: /* 6 */ cp___(o6,0, *textIn); ++textIn; o6.i1 = p--; - + SEQAN_FALLTHROUGH case 5: /* 5 */ cp___(o5,0,cp___(o6,1, *textIn)); ++textIn; o5.i1 = p--; - + SEQAN_FALLTHROUGH case 4: /* 4 */ o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn).i2; ++nameIn; o4.i1 = p--; cp___(o4,0,cp___(o5,1,cp___(o6,2, *textIn))); ++textIn; - + SEQAN_FALLTHROUGH case 3: /* 3 */ cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3, *textIn)))); ++textIn; o3.i1 = p--; - + SEQAN_FALLTHROUGH case 2: /* 2 */ o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn).i2; ++nameIn; o2.i1 = p--; cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4, *textIn))))); ++textIn; - + SEQAN_FALLTHROUGH case 1: /* 1 */ o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn).i2; ++nameIn; o1.i1 = p--; cp___(o1,0,cp___(o2,1,cp___(o3,2, *textIn))); ++textIn; if (r >= 6) push(out6, o6); if (r >= 5) push(out5, o5); if (r >= 4) push(out124, o4); - + SEQAN_FALLTHROUGH case 0:; } @@ -393,28 +393,28 @@ namespace seqan switch (r) { case 6: /* 6 */ cp___(o6,0, *textIn); ++textIn; o6.i1 = p; ++p; - + SEQAN_FALLTHROUGH case 5: /* 5 */ cp___(o5,0,cp___(o6,1, *textIn)); ++textIn; o5.i1 = p; ++p; - + SEQAN_FALLTHROUGH case 4: /* 4 */ o4.i2[0] = o5.i2[0] = o6.i2[0] = (*nameIn4).i2; ++nameIn4; o4.i1 = p; ++p; cp___(o4,0,cp___(o5,1,cp___(o6,2, *textIn))); ++textIn; - + SEQAN_FALLTHROUGH case 3: /* 3 */ cp___(o3,0,cp___(o4,1,cp___(o5,2,cp___(o6,3, *textIn)))); ++textIn; o3.i1 = p; ++p; - + SEQAN_FALLTHROUGH case 2: /* 2 */ o2.i2[0] = o3.i2[0] = o4.i2[1] = o5.i2[1] = o6.i2[1] = (*nameIn2).i2; ++nameIn2; o2.i1 = p; ++p; cp___(o2,0,cp___(o3,1,cp___(o4,2,cp___(o5,3,cp___(o6,4, *textIn))))); ++textIn; - + SEQAN_FALLTHROUGH case 1: /* 1 */ o1.i2[0] = o2.i2[1] = o3.i2[1] = o4.i2[2] = o5.i2[2] = o6.i2[2] = (*nameIn1).i2; ++nameIn1; o1.i1 = p; ++p; cp___(o1,0,cp___(o2,1,cp___(o3,2, *textIn))); ++textIn; if (r >= 6) push(out6, o6); if (r >= 5) push(out5, o5); if (r >= 4) push(out124, o4); - + SEQAN_FALLTHROUGH case 0:; } diff --git a/include/seqan/index/shape_threshold.h b/include/seqan/index/shape_threshold.h index c0f8592..d4ab53d 100644 --- a/include/seqan/index/shape_threshold.h +++ b/include/seqan/index/shape_threshold.h @@ -699,6 +699,7 @@ void initPatterns( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; @@ -719,6 +720,7 @@ void initPatterns( case SEQAN_DELETE: ++del; + SEQAN_FALLTHROUGH case SEQAN_INSERT: ++err; diff --git a/include/seqan/journaled_set/score_biaffine.h b/include/seqan/journaled_set/score_biaffine.h index 57e3dfe..88e6296 100644 --- a/include/seqan/journaled_set/score_biaffine.h +++ b/include/seqan/journaled_set/score_biaffine.h @@ -90,13 +90,6 @@ class Score<TScoreValue, BiAffine> _gapOpenHorizontal(gapOpenHorizontal), _gapExtendVertical(gapExtendVertical), _gapOpenVertical(gapOpenVertical) {} - - Score(Score const & other) : _match(other._match), - _mismatch(other._mismatch), - _gapExtendHorizontal(other._gapExtendHorizontal), - _gapOpenHorizontal(other._gapOpenHorizontal), - _gapExtendVertical(other._gapExtendVertical), - _gapOpenVertical(other._gapOpenVertical) {} }; // ============================================================================ @@ -187,17 +180,39 @@ setScoreMatch(Score<TScoreValue, BiAffine> & scoringScheme, TScoreValue const & } // ---------------------------------------------------------------------------- +// Function scoreMatch() +// ---------------------------------------------------------------------------- + +template <typename TScoreValue> +inline TScoreValue +scoreMatch(Score<TScoreValue, BiAffine> const & scoringScheme) +{ + return scoringScheme._match; +} + +// ---------------------------------------------------------------------------- // Function setScoreMismatch() // ---------------------------------------------------------------------------- template <typename TScoreValue> inline void -setScoreMismatch(Score<TScoreValue, BiAffine> & scoringScheme, TScoreValue const & score) +setScoreMismatch(Score<TScoreValue, BiAffine> & scoringScheme, TScoreValue const & score) { scoringScheme._mismatch = score; } // ---------------------------------------------------------------------------- +// Function scoreMismatch() +// ---------------------------------------------------------------------------- + +template <typename TScoreValue> +inline TScoreValue +scoreMismatch(Score<TScoreValue, BiAffine> const & scoringScheme) +{ + return scoringScheme._mismatch; +} + +// ---------------------------------------------------------------------------- // Function setScoreGap() // ---------------------------------------------------------------------------- diff --git a/include/seqan/parallel/parallel_lock.h b/include/seqan/parallel/parallel_lock.h index 028f95d..ba48e26 100644 --- a/include/seqan/parallel/parallel_lock.h +++ b/include/seqan/parallel/parallel_lock.h @@ -213,14 +213,26 @@ struct ScopedWriteLock<TLock, Serial> inline void yieldProcessor() { -#if defined(__arm__) || defined(_M_ARM) - asm volatile ("yield" ::: "memory"); -#elif defined(STDLIB_VS) +#if defined(STDLIB_VS) // Visual Studio - all platforms. YieldProcessor(); -#elif defined(__SSE2__) - _mm_pause(); +#elif defined(__arm__) || defined(__aarch64__) // ARM. + __asm__ __volatile__ ("yield" ::: "memory"); +#elif defined(__sparc) || defined(__sparc__) // SPARC +#if definde(__SUNPRO_C) + __asm __volatile__ ("rd %%ccr, %%g0\n\t" + "rd %%ccr, %%g0\n\t" + "rd %%ccr, %%g0") #else - __asm__ __volatile__("rep; nop" : : ); + __asm __volatile__ ("rd %ccr, %g0\n\t" + "rd %ccr, %g0\n\t" + "rd %ccr, %g0") +#endif // defined(__SUNPRO_C) +#elif defined(__ppc__) || defined(__ppc64__) || defined(_ARCH_PPC) || defined(_ARCH_PPC64) // PowerPC + __asm__ __volatile__ ("or 27,27,27" ::: "memory"); +#elif defined(__SSE2__) // AMD and Intel + _mm_pause(); +#else // everything else. + asm volatile ("nop" ::: "memory"); // default operation - does nothing => Might lead to passive spinning. #endif } diff --git a/include/seqan/pipe/pipe_edit_environment.h b/include/seqan/pipe/pipe_edit_environment.h index 17b197f..a5522f3 100644 --- a/include/seqan/pipe/pipe_edit_environment.h +++ b/include/seqan/pipe/pipe_edit_environment.h @@ -209,6 +209,7 @@ namespace seqan case INSERT_EOS_: state = INSERT_; + SEQAN_FALLTHROUGH case INSERT_: case INSERT_LAST_: // before INSERT_ (prev=orig, ++in; tmp=prev) holds @@ -244,6 +245,7 @@ namespace seqan } assignValue(tmp.i2, errorPos, (TValue) 0); } + break; default:; } return *this; diff --git a/include/seqan/platform.h b/include/seqan/platform.h index 60bc6b6..9511300 100644 --- a/include/seqan/platform.h +++ b/include/seqan/platform.h @@ -398,6 +398,19 @@ typedef int8_t __int8; // nolint // backwards compatibility #define SEQAN_UNUSED_TYPEDEF SEQAN_UNUSED +// eliminate fallthrough warnings +#define SEQAN_FALLTHROUGH +#if defined(__has_cpp_attribute) + #if __has_cpp_attribute(fallthrough) + #undef SEQAN_FALLTHROUGH + #if __cplusplus < 201500 && defined(COMPILER_GCC) + #define SEQAN_FALLTHROUGH [[gnu::fallthrough]]; + #else + #define SEQAN_FALLTHROUGH [[fallthrough]]; + #endif + #endif +#endif + // HAS_EXECINFO // note that this is always set by FindSeqAn.cmake // this is a fallback for non cmake environments diff --git a/include/seqan/seeds/banded_chain_alignment_impl.h b/include/seqan/seeds/banded_chain_alignment_impl.h index 6203472..a99a14e 100644 --- a/include/seqan/seeds/banded_chain_alignment_impl.h +++ b/include/seqan/seeds/banded_chain_alignment_impl.h @@ -81,6 +81,20 @@ struct BandedChainTracking // ============================================================================ // ---------------------------------------------------------------------------- +// Function _checkScoreOverflow() +// ---------------------------------------------------------------------------- + +template <typename TDist, + typename TScoreValue, typename TScoreSpec> +inline bool _checkScoreOverflow(TDist const distance, + Score<TScoreValue, TScoreSpec> const & score) +{ + auto mxScore = _max(scoreMatch(score), std::abs(scoreMismatch(score))); + return static_cast<decltype(BitsPerValue<TScoreValue>::VALUE)>(bitScanReverse(mxScore) + bitScanReverse(distance)) + <= BitsPerValue<TScoreValue>::VALUE - 1; +} + +// ---------------------------------------------------------------------------- // Function _isLastSeed() // ---------------------------------------------------------------------------- @@ -769,7 +783,6 @@ _initializeBandedChain(TTraceSet & globalTraceSet, // The first anchor does not cross the first row or column. Hence we have to fill the gap first. if (horizontalNextGridOrigin != 0u || verticalNextGridOrigin != 0u) { - // INITIALIZATION _initiaizeBeginningOfBandedChain(scoutState, upperDiagonal(band) + 1, 1 - lowerDiagonal(band), scoreSchemeGap, dpProfile); @@ -803,6 +816,8 @@ _initializeBandedChain(TTraceSet & globalTraceSet, gridEnd.i1 = _min(length(seqH), endPositionH(seed) + bandExtension); gridEnd.i2 = _min(length(seqV), endPositionV(seed) + bandExtension); + SEQAN_ASSERT(_checkScoreOverflow(gridEnd.i1 - gridBegin.i1 + gridEnd.i2 - gridBegin.i2, scoreSchemeGap)); + // Define area covering the infixes. infixH = infix(seqH, gridBegin.i1, gridEnd.i1); infixV = infix(seqV, gridBegin.i2, gridEnd.i2); @@ -904,6 +919,8 @@ _computeGapArea(TTraceSet & globalTraceSet, TGridPoint gridEnd(beginPositionH(currentSeed) + 1 + bandExtension + _horizontalBandShiftBeginPoint(currentSeed), beginPositionV(currentSeed) + 1 + bandExtension + _verticalBandShiftBeginPoint(currentSeed)); + SEQAN_ASSERT(_checkScoreOverflow(gridEnd.i1 - gridBegin.i1 + gridEnd.i2 - gridBegin.i2, scoreScheme)); + // Define infix area for alignment. TInfixH infixH = infix(seqH, gridBegin.i1, gridEnd.i1); TInfixV infixV = infix(seqV, gridBegin.i2, gridEnd.i2); diff --git a/tests/align/CMakeLists.txt b/tests/align/CMakeLists.txt index 6276232..c028716 100644 --- a/tests/align/CMakeLists.txt +++ b/tests/align/CMakeLists.txt @@ -23,7 +23,9 @@ endif () # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/align_extend/CMakeLists.txt b/tests/align_extend/CMakeLists.txt index 05cbef8..b89f1b4 100644 --- a/tests/align_extend/CMakeLists.txt +++ b/tests/align_extend/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/align_extend") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/align_profile/CMakeLists.txt b/tests/align_profile/CMakeLists.txt index 858e79c..868c689 100644 --- a/tests/align_profile/CMakeLists.txt +++ b/tests/align_profile/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/align_profile") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/align_split/CMakeLists.txt b/tests/align_split/CMakeLists.txt index 40c988e..580b00d 100644 --- a/tests/align_split/CMakeLists.txt +++ b/tests/align_split/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/align_split") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/alignment_free/CMakeLists.txt b/tests/alignment_free/CMakeLists.txt index 5164354..bfb1120 100644 --- a/tests/alignment_free/CMakeLists.txt +++ b/tests/alignment_free/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/alignment_free") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/arg_parse/CMakeLists.txt b/tests/arg_parse/CMakeLists.txt index fa530ed..b341e15 100644 --- a/tests/arg_parse/CMakeLists.txt +++ b/tests/arg_parse/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/arg_parse") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/bam_io/CMakeLists.txt b/tests/bam_io/CMakeLists.txt index c3bc83d..9b0708a 100644 --- a/tests/bam_io/CMakeLists.txt +++ b/tests/bam_io/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/bam_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/basic/CMakeLists.txt b/tests/basic/CMakeLists.txt index ba294ba..bb15a93 100644 --- a/tests/basic/CMakeLists.txt +++ b/tests/basic/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/basic") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/bed_io/CMakeLists.txt b/tests/bed_io/CMakeLists.txt index a4f0427..86cd079 100644 --- a/tests/bed_io/CMakeLists.txt +++ b/tests/bed_io/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/bed_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/blast/CMakeLists.txt b/tests/blast/CMakeLists.txt index 870f0dc..a75bd56 100644 --- a/tests/blast/CMakeLists.txt +++ b/tests/blast/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/blast") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/consensus/CMakeLists.txt b/tests/consensus/CMakeLists.txt index 5e5dde1..cce1c39 100644 --- a/tests/consensus/CMakeLists.txt +++ b/tests/consensus/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/consensus") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/consensus_v2/CMakeLists.txt b/tests/consensus_v2/CMakeLists.txt index d95a3b2..53858b9 100644 --- a/tests/consensus_v2/CMakeLists.txt +++ b/tests/consensus_v2/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/consensus_v2") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/find/CMakeLists.txt b/tests/find/CMakeLists.txt index 38c9c4c..2176919 100644 --- a/tests/find/CMakeLists.txt +++ b/tests/find/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/find") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/gff_io/CMakeLists.txt b/tests/gff_io/CMakeLists.txt index 6adf994..2ecaff7 100644 --- a/tests/gff_io/CMakeLists.txt +++ b/tests/gff_io/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/gff_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/graph_algorithms/CMakeLists.txt b/tests/graph_algorithms/CMakeLists.txt index f170553..1dfbd93 100644 --- a/tests/graph_algorithms/CMakeLists.txt +++ b/tests/graph_algorithms/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/graph_algorithms") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/graph_align/CMakeLists.txt b/tests/graph_align/CMakeLists.txt index 228617f..a552d3f 100644 --- a/tests/graph_align/CMakeLists.txt +++ b/tests/graph_align/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/graph_align") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/graph_align/test_graph_impl_align.h b/tests/graph_align/test_graph_impl_align.h index d91deba..22dcef6 100644 --- a/tests/graph_align/test_graph_impl_align.h +++ b/tests/graph_align/test_graph_impl_align.h @@ -230,6 +230,16 @@ SEQAN_DEFINE_TEST(Test_Refinement_AlignmentGraphNoEdgeWeights) SEQAN_ASSERT_EQ(getValue(mat, 0 * len + 2), getValue(mat, 2 * len + 0)); SEQAN_ASSERT_EQ(getValue(mat, 1 * len + 4), getValue(mat, 4 * len + 1)); SEQAN_ASSERT_EQ(getValue(mat, 2 * len + 4), getValue(mat, 4 * len + 2)); + + // Vertex Adjacency vectors + String<unsigned int> vectIn, vectOut; + getVertexAdjacencyVector(vectIn, vectOut, g, 2u); + SEQAN_ASSERT(length(vectIn) == 2); + SEQAN_ASSERT(length(vectOut) == 2); + SEQAN_ASSERT(vectIn[0] == 4); + SEQAN_ASSERT(vectIn[1] == 0); + SEQAN_ASSERT(vectOut[0] == 4); + SEQAN_ASSERT(vectOut[1] == 0); } ////////////////////////////////////////////////////////////////////////////// diff --git a/tests/graph_msa/CMakeLists.txt b/tests/graph_msa/CMakeLists.txt index 9a4b282..85bdd50 100644 --- a/tests/graph_msa/CMakeLists.txt +++ b/tests/graph_msa/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/graph_msa") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/graph_types/CMakeLists.txt b/tests/graph_types/CMakeLists.txt index d46fa5a..dd58f1f 100644 --- a/tests/graph_types/CMakeLists.txt +++ b/tests/graph_types/CMakeLists.txt @@ -16,7 +16,9 @@ message (STATUS "Configuring tests/graph_types") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # Clang 3.2.0 has a bug that prevents test_graph_types from compiling. See # http://llvm.org/bugs/show_bug.cgi?id=14538 diff --git a/tests/graph_types/test_graph_types_types.cpp b/tests/graph_types/test_graph_types_types.cpp index b01afa8..b782697 100644 --- a/tests/graph_types/test_graph_types_types.cpp +++ b/tests/graph_types/test_graph_types_types.cpp @@ -201,6 +201,18 @@ SEQAN_DEFINE_TEST(test_graph_types_types_directed) SEQAN_ASSERT(getValue(mat, 2 * len + 4) == 1); SEQAN_ASSERT(getValue(mat, 2 * len + 2) == 0); + // Vertex Adjacency vectors + String<unsigned int> vectIn, vectOut; + getVertexAdjacencyVector(vectIn, vectOut, g, 1u); + SEQAN_ASSERT(length(vectIn) == 0); + SEQAN_ASSERT(vectOut[0] == 4); + SEQAN_ASSERT(length(vectOut) == 1); + getVertexAdjacencyVector(vectIn, vectOut, g, 4u); + SEQAN_ASSERT(length(vectIn) == 2); + SEQAN_ASSERT(vectIn[0] == 1); + SEQAN_ASSERT(vectIn[1] == 2); + SEQAN_ASSERT(length(vectOut) == 0); + //____________________________________________________________________________ //Graph with edge cargo and edge ids typedef Pair<char, int> TPair; @@ -459,6 +471,18 @@ SEQAN_DEFINE_TEST(test_graph_types_types_directed) SEQAN_ASSERT(getValue(mat4, 1 * len4 + 4) == 1); SEQAN_ASSERT(getValue(mat4, 2 * len4 + 4) == 1); SEQAN_ASSERT(getValue(mat4, 2 * len4 + 2) == 0); + + // Vertex Adjacency vectors + String<unsigned int> vectIn4, vectOut4; + getVertexAdjacencyVector(vectIn4, vectOut4, g4, 1u); + SEQAN_ASSERT(length(vectIn4) == 0); + SEQAN_ASSERT(vectOut4[0] == 4); + SEQAN_ASSERT(length(vectOut4) == 1); + getVertexAdjacencyVector(vectIn4, vectOut4, g4, 4u); + SEQAN_ASSERT(length(vectIn4) == 2); + SEQAN_ASSERT(vectIn4[0] == 1); + SEQAN_ASSERT(vectIn4[1] == 2); + SEQAN_ASSERT(length(vectOut4) == 0); } SEQAN_DEFINE_TEST(test_graph_types_types_undirected) @@ -617,6 +641,16 @@ SEQAN_DEFINE_TEST(test_graph_types_types_undirected) SEQAN_ASSERT(getValue(mat, 1 * len + 4) == getValue(mat, 4 * len + 1)); SEQAN_ASSERT(getValue(mat, 2 * len + 4) == getValue(mat, 4 * len + 2)); + // Vertex Adjacency vectors + String<unsigned int> vectIn, vectOut; + getVertexAdjacencyVector(vectIn, vectOut, g, 2u); + SEQAN_ASSERT(length(vectIn) == 2); + SEQAN_ASSERT(vectIn[0] == 4); + SEQAN_ASSERT(vectIn[1] == 0); + SEQAN_ASSERT(vectOut[0] == 4); + SEQAN_ASSERT(vectOut[1] == 0); + SEQAN_ASSERT(length(vectOut) == 2); + //____________________________________________________________________________ //Graph with edge cargo and edge ids typedef Pair<char, int> TPair; @@ -975,6 +1009,18 @@ SEQAN_DEFINE_TEST(test_graph_types_types_automaton) SEQAN_ASSERT(getValue(mat, 2 * len + 4) == 1); SEQAN_ASSERT(getValue(mat, 0 * len + 2) == 0); + // Vertex Adjacency vectors + String<unsigned int> vectIn, vectOut; + getVertexAdjacencyVector(vectIn, vectOut, g, 1u); + SEQAN_ASSERT(length(vectIn) == 0); + SEQAN_ASSERT(length(vectOut) == 1); + SEQAN_ASSERT(vectOut[0] == 4); + getVertexAdjacencyVector(vectIn, vectOut, g, 4u); + SEQAN_ASSERT(length(vectIn) == 2); + SEQAN_ASSERT(length(vectOut) == 0); + SEQAN_ASSERT(vectIn[0] == 1); + SEQAN_ASSERT(vectIn[1] == 2); + // Test iterators typedef Iterator<StandardAutomaton, VertexIterator>::Type TVertexIterator; TVertexIterator itVert(g); @@ -1479,7 +1525,8 @@ SEQAN_DEFINE_TEST(test_graph_types_types_word_tree) childC2C1C1C1 = addChild(g, childC2C1C1); childC2C1C1C2 = addChild(g, childC2C1C1); childC4 = addChild(g, rootV); - String<unsigned int> mat; // Adjacency matrix + String<unsigned int> mat; + // Adjacency matrix getAdjacencyMatrix(g, mat); unsigned int len = (unsigned int) std::sqrt((double) length(mat)); SEQAN_ASSERT(getValue(mat, 0 * len + 8) == 1); @@ -1489,6 +1536,15 @@ SEQAN_DEFINE_TEST(test_graph_types_types_word_tree) SEQAN_ASSERT(getValue(mat, 0 * len + 4) == 0); SEQAN_ASSERT(numEdges(g) == 8); SEQAN_ASSERT(numVertices(g) == 9); + // Vertex Adjacency vectors + String<unsigned int> vectIn, vectOut; + getVertexAdjacencyVector(vectIn, vectOut, g, 5u); + SEQAN_ASSERT(length(vectIn) == 1); + SEQAN_ASSERT(length(vectOut) == 2); + SEQAN_ASSERT(vectIn[0] == 4); + SEQAN_ASSERT(vectOut[0] == 7); + SEQAN_ASSERT(vectOut[1] == 6); + // Transpose the graph transpose(g); SEQAN_ASSERT(numEdges(g) == 8); SEQAN_ASSERT(numVertices(g) == 9); diff --git a/tests/index/CMakeLists.txt b/tests/index/CMakeLists.txt index 343d72a..eed4089 100644 --- a/tests/index/CMakeLists.txt +++ b/tests/index/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/index") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/journaled_set/CMakeLists.txt b/tests/journaled_set/CMakeLists.txt index 38bb44e..625aef1 100644 --- a/tests/journaled_set/CMakeLists.txt +++ b/tests/journaled_set/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/journaled_set") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/journaled_string_tree/CMakeLists.txt b/tests/journaled_string_tree/CMakeLists.txt index c20c8d7..690d0cb 100644 --- a/tests/journaled_string_tree/CMakeLists.txt +++ b/tests/journaled_string_tree/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/journaled_string_tree") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/map/CMakeLists.txt b/tests/map/CMakeLists.txt index fc9f599..66b57a0 100644 --- a/tests/map/CMakeLists.txt +++ b/tests/map/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/map") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/misc/CMakeLists.txt b/tests/misc/CMakeLists.txt index bdd109e..46df3fd 100644 --- a/tests/misc/CMakeLists.txt +++ b/tests/misc/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/misc") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/modifier/CMakeLists.txt b/tests/modifier/CMakeLists.txt index 2baaa98..5c82f02 100644 --- a/tests/modifier/CMakeLists.txt +++ b/tests/modifier/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/modifier") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/modifier_cyclic_shape/CMakeLists.txt b/tests/modifier_cyclic_shape/CMakeLists.txt index 43d7d4f..e38751a 100644 --- a/tests/modifier_cyclic_shape/CMakeLists.txt +++ b/tests/modifier_cyclic_shape/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/modifier_cyclic_shape") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/multiple_translation_units/CMakeLists.txt b/tests/multiple_translation_units/CMakeLists.txt index 9bc4f3c..df2a47d 100644 --- a/tests/multiple_translation_units/CMakeLists.txt +++ b/tests/multiple_translation_units/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/multiple_translation_units") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/parallel/CMakeLists.txt b/tests/parallel/CMakeLists.txt index b5583d5..245675d 100644 --- a/tests/parallel/CMakeLists.txt +++ b/tests/parallel/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/parallel") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/parse_lm/CMakeLists.txt b/tests/parse_lm/CMakeLists.txt index b681fe4..1bfc210 100644 --- a/tests/parse_lm/CMakeLists.txt +++ b/tests/parse_lm/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/parse_lm") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/pipe/CMakeLists.txt b/tests/pipe/CMakeLists.txt index d301421..6847ef4 100644 --- a/tests/pipe/CMakeLists.txt +++ b/tests/pipe/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/pipe") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/platform/CMakeLists.txt b/tests/platform/CMakeLists.txt index 012785a..5960929 100644 --- a/tests/platform/CMakeLists.txt +++ b/tests/platform/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/platform") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/random/CMakeLists.txt b/tests/random/CMakeLists.txt index 00b3b67..91a1b75 100644 --- a/tests/random/CMakeLists.txt +++ b/tests/random/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/random") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/realign/CMakeLists.txt b/tests/realign/CMakeLists.txt index b0f963d..e88c3ec 100644 --- a/tests/realign/CMakeLists.txt +++ b/tests/realign/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/realign") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/reduced_aminoacid/CMakeLists.txt b/tests/reduced_aminoacid/CMakeLists.txt index 0cceb9f..7d3daef 100644 --- a/tests/reduced_aminoacid/CMakeLists.txt +++ b/tests/reduced_aminoacid/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/reduced_aminoacid") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/roi_io/CMakeLists.txt b/tests/roi_io/CMakeLists.txt index 3ecc42f..edfeaf9 100644 --- a/tests/roi_io/CMakeLists.txt +++ b/tests/roi_io/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/roi_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/score/CMakeLists.txt b/tests/score/CMakeLists.txt index bcd57d3..05661a8 100644 --- a/tests/score/CMakeLists.txt +++ b/tests/score/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/score") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/seeds/CMakeLists.txt b/tests/seeds/CMakeLists.txt index c016c06..9d3cb76 100644 --- a/tests/seeds/CMakeLists.txt +++ b/tests/seeds/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/seeds") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/seeds/test_align_banded_chain_impl.cpp b/tests/seeds/test_align_banded_chain_impl.cpp index 82e2bcc..af04e69 100644 --- a/tests/seeds/test_align_banded_chain_impl.cpp +++ b/tests/seeds/test_align_banded_chain_impl.cpp @@ -1075,6 +1075,23 @@ SEQAN_DEFINE_TEST(test_banded_chain_alignment_band_extensions_affine) testBandedChainAlignmentBandExtension(seqan::AffineGaps()); } +SEQAN_DEFINE_TEST(test_banded_chain_score_overflow_detection) +{ + using namespace seqan; + Score<int8_t> score(2, -5, -2); + SEQAN_ASSERT(!_checkScoreOverflow(127, score)); + SEQAN_ASSERT(_checkScoreOverflow(50, score)); + SEQAN_ASSERT(_checkScoreOverflow(24, score)); + SEQAN_ASSERT(_checkScoreOverflow(15, score)); + + Score<int32_t> score2(2, -5, -2); + SEQAN_ASSERT(_checkScoreOverflow(655536, score2)); + SEQAN_ASSERT(_checkScoreOverflow(127, score2)); + SEQAN_ASSERT(_checkScoreOverflow(50, score2)); + SEQAN_ASSERT(_checkScoreOverflow(24, score2)); + SEQAN_ASSERT(_checkScoreOverflow(15, score2)); +} + SEQAN_BEGIN_TESTSUITE(test_banded_chain_impl) { SEQAN_CALL_TEST(test_banded_chain_alignment_empty_set_linear); @@ -1090,5 +1107,6 @@ SEQAN_BEGIN_TESTSUITE(test_banded_chain_impl) SEQAN_CALL_TEST(test_banded_chain_alignment_band_extensions_linear); SEQAN_CALL_TEST(test_banded_chain_alignment_band_extensions_affine); SEQAN_CALL_TEST(test_banded_chain_alignment_issue_1020); + SEQAN_CALL_TEST(test_banded_chain_score_overflow_detection); } SEQAN_END_TESTSUITE diff --git a/tests/seq_io/CMakeLists.txt b/tests/seq_io/CMakeLists.txt index f2ad42d..c2ec8fa 100644 --- a/tests/seq_io/CMakeLists.txt +++ b/tests/seq_io/CMakeLists.txt @@ -15,9 +15,11 @@ message (STATUS "Configuring tests/seq_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (BZip2) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (BZip2) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/sequence/CMakeLists.txt b/tests/sequence/CMakeLists.txt index 34011ef..da008e6 100644 --- a/tests/sequence/CMakeLists.txt +++ b/tests/sequence/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/sequence") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup # ---------------------------------------------------------------------------- diff --git a/tests/sequence_journaled/CMakeLists.txt b/tests/sequence_journaled/CMakeLists.txt index 8e3238d..a352b79 100644 --- a/tests/sequence_journaled/CMakeLists.txt +++ b/tests/sequence_journaled/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/sequence_journaled") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/simple_intervals_io/CMakeLists.txt b/tests/simple_intervals_io/CMakeLists.txt index 4fd7e80..557469e 100644 --- a/tests/simple_intervals_io/CMakeLists.txt +++ b/tests/simple_intervals_io/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/simple_intervals_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/statistics/CMakeLists.txt b/tests/statistics/CMakeLists.txt index 4fdc834..5815bee 100644 --- a/tests/statistics/CMakeLists.txt +++ b/tests/statistics/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/statistics") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/store/CMakeLists.txt b/tests/store/CMakeLists.txt index 25fa08c..00f5ab2 100644 --- a/tests/store/CMakeLists.txt +++ b/tests/store/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/store") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/stream/CMakeLists.txt b/tests/stream/CMakeLists.txt index 9765f90..ec5c87e 100644 --- a/tests/stream/CMakeLists.txt +++ b/tests/stream/CMakeLists.txt @@ -15,9 +15,11 @@ message (STATUS "Configuring tests/stream") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (BZip2) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (BZip2) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/swift_local/CMakeLists.txt b/tests/swift_local/CMakeLists.txt index b8497ef..e92dc7d 100644 --- a/tests/swift_local/CMakeLists.txt +++ b/tests/swift_local/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/find_swift") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/tabix_io/CMakeLists.txt b/tests/tabix_io/CMakeLists.txt index 8f3a735..9c0feba 100644 --- a/tests/tabix_io/CMakeLists.txt +++ b/tests/tabix_io/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/tabix_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (ZLIB) -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (ZLIB) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/translation/CMakeLists.txt b/tests/translation/CMakeLists.txt index 692cee7..60be705 100644 --- a/tests/translation/CMakeLists.txt +++ b/tests/translation/CMakeLists.txt @@ -15,8 +15,10 @@ message (STATUS "Configuring tests/translation") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (OpenMP) -find_package(SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (OpenMP) + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/ucsc_io/CMakeLists.txt b/tests/ucsc_io/CMakeLists.txt index e7eaf8c..0963216 100644 --- a/tests/ucsc_io/CMakeLists.txt +++ b/tests/ucsc_io/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/test_ucsc_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/tests/vcf_io/CMakeLists.txt b/tests/vcf_io/CMakeLists.txt index d17da17..4327a68 100644 --- a/tests/vcf_io/CMakeLists.txt +++ b/tests/vcf_io/CMakeLists.txt @@ -15,7 +15,9 @@ message (STATUS "Configuring tests/vcf_io") # ---------------------------------------------------------------------------- # Search SeqAn and select dependencies. -find_package (SeqAn REQUIRED) +if (NOT "${SEQAN_BUILD_SYSTEM}" STREQUAL "DEVELOP") + find_package (SeqAn REQUIRED) +endif () # ---------------------------------------------------------------------------- # Build Setup diff --git a/util/cmake/SeqAnBuildSystem.cmake b/util/cmake/SeqAnBuildSystem.cmake index 0b6d2f5..ce28c25 100644 --- a/util/cmake/SeqAnBuildSystem.cmake +++ b/util/cmake/SeqAnBuildSystem.cmake @@ -303,6 +303,16 @@ macro (seqan_build_system_init) # TODO(h-2): for icc on windows, replace the " -" in SEQAN_CXX_FLAGS with " /" # find out whether clang/c2 takes - or / options + # search dependencies once, globally, if in DEVELOP + if (SEQAN_BUILD_SYSTEM STREQUAL "DEVELOP") + message (STATUS "Scanning dependencies once in DEVELOP mode...") + find_package(OpenMP) + find_package(ZLIB) + find_package(BZip2) + find_package(Boost) + find_package(SeqAn REQUIRED) + endif () + endmacro (seqan_build_system_init) # --------------------------------------------------------------------------- @@ -714,11 +724,8 @@ function (seqan_register_demos PREFIX) ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/[!.]*.cu) - # Find SeqAn with all dependencies. - find_package (OpenMP) - find_package (ZLIB) - find_package (BZip2) - find_package (SeqAn REQUIRED) + # NOTE(h-2): we do not need to search for dependencies, because this is + # done globally for DEVELOP (and demos are only built with DEVELOP) # Supress unused parameter warnings for demos. if (COMPILER_GCC OR COMPILER_CLANG) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/seqan2.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
