Skip to content

Commit d46150a

Browse files
author
Rob Patro
committed
add quiet build flag, fix warnings ing BooPHF.hpp
1 parent 3c0c990 commit d46150a

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

CMakeLists.txt

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ enable_testing()
44

55
project (RapMap)
66

7-
set(CPACK_PACKAGE_VERSION "0.3.0")
7+
set(CPACK_PACKAGE_VERSION "0.4.0")
88
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
9-
set(CPACK_PACKAGE_VERSION_MINOR "3")
9+
set(CPACK_PACKAGE_VERSION_MINOR "4")
1010
set(CPACK_PACKAGE_VERSION_PATCH "0")
1111
set(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
1212
set(CPACK_GENERATOR "TGZ")
1313
set(CPACK_SOURCE_GENERATOR "TGZ")
1414
set(CPACK_PACKAGE_VENDOR "Stony Brook University")
15-
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "RapMap - Wicked-fast quasi/pseudo/lightweight alignment")
15+
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "RapMap - Wicked-fast qasi-mapping")
1616
set(CPACK_PACKAGE_NAME
1717
"${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
1818
set(CPACK_SOURCE_PACKAGE_FILE_NAME
@@ -26,8 +26,12 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
2626
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -DEMPHF_USE_POPCOUNT")
2727
#endif(SSE4_2_FOUND)
2828

29-
set (WARNING_IGNORE_FLAGS "-Wno-deprecated-register -Wno-c++11-narrowing -Wno-unknown-pragmas")
30-
set (BOOST_CXX_FLAGS "-Wno-deprecated-register -std=c++11")
29+
if (APPLE)
30+
set (WARNING_IGNORE_FLAGS "-Wno-deprecated-register -Wno-unknon-pragmas -Wreturn-type -Werror=return-type")
31+
else()
32+
set (WARNING_IGNORE_FLAGS "-Wno-unknown-pragmas -Wreturn-type -Werror=return-type")
33+
endif()
34+
3135
## Prefer static to dynamic libraries
3236
SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
3337

@@ -38,7 +42,14 @@ else()
3842
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native")
3943
endif()
4044

41-
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -funroll-loops -fPIC -fomit-frame-pointer -O4 -DHAVE_ANSI_TERM -Wall -std=c++11 -Wno-unknown-pragmas -Wreturn-type -Werror=return-type")
45+
46+
if (QUIET_BUILD)
47+
set(WALL "")
48+
else()
49+
set(WALL "-Wall")
50+
endif()
51+
52+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -funroll-loops -fPIC -fomit-frame-pointer -O4 -DHAVE_ANSI_TERM ${WALL} -std=c++11")
4253

4354
##
4455
# OSX is strange (some might say, stupid in this regard). Deal with it's quirkines here.
@@ -98,10 +109,6 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
98109
endif()
99110

100111
set (WARNING_IGNORE_FLAGS "${WARNING_IGNORE_FLAGS} -Wno-unused-local-typedefs")
101-
set (BOOST_TOOLSET "gcc")
102-
set (BOOST_CONFIGURE_TOOLSET "--with-toolset=gcc")
103-
set (BCXX_FLAGS "-std=c++11")
104-
set (BOOST_EXTRA_FLAGS toolset=gcc cxxflags=${BCXX_FLAGS})
105112
# Tentatively, we support clang now
106113
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
107114
set(CLANG TRUE)
@@ -111,10 +118,6 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
111118
if (HAVE_LIBCPP)
112119
message ("It appears that you're compiling with clang and that libc++ is available, so I'll use that")
113120
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
114-
set (BOOST_TOOLSET "clang")
115-
set (BOOST_CONFIGURE_TOOLSET "--with-toolset=clang")
116-
set (BCXX_FLAGS "-stdlib=libc++ -DBOOST_HAS_INT128")
117-
set (BOOST_EXTRA_FLAGS toolset=clang cxxflags=${BCXX_FLAGS} linkflags="-stdlib=libc++")
118121
set (JELLYFISH_CXX_FLAGS "-stdlib=libc++")
119122
# Otherwise, use libstdc++ (and make it static)
120123
else()

include/BooPHF.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,11 +533,11 @@ we need this 2-functors scheme because HashFunctors won't work with unordered_ma
533533
//for debug purposes
534534
void print() const
535535
{
536-
printf("bit array of size %lli: \n",_size);
536+
printf("bit array of size %lu: \n",_size);
537537
for(uint64_t ii = 0; ii< _size; ii++)
538538
{
539539
if(ii%10==0)
540-
printf(" (%llu) ",ii);
540+
printf(" (%lu) ",ii);
541541
int val = (_bitArray[ii >> 6] >> (ii & 63 ) ) & 1;
542542
printf("%i",val);
543543
}
@@ -546,7 +546,7 @@ we need this 2-functors scheme because HashFunctors won't work with unordered_ma
546546
printf("rank array : size %lu \n",_ranks.size());
547547
for (uint64_t ii = 0; ii< _ranks.size(); ii++)
548548
{
549-
printf("%llu : %lli, ",ii,_ranks[ii]);
549+
printf("%lu : %lu, ",ii,_ranks[ii]);
550550
}
551551
printf("\n");
552552
}

0 commit comments

Comments
 (0)