Skip to content

Commit

Permalink
Rename the executable to lowercase f
Browse files Browse the repository at this point in the history
  • Loading branch information
srirampc committed Jul 28, 2023
1 parent 548a119 commit 88c0cf9
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project(FastANI
LANGUAGES CXX)
#
# Main executable
add_executable(FastANI src/cgi/core_genome_identity.cpp src/cgi/main.cpp)
target_include_directories(FastANI PUBLIC "src/")
add_executable(fastANI src/cgi/core_genome_identity.cpp src/cgi/main.cpp)
target_include_directories(fastANI PUBLIC "src/")
#
# by default, static linking
option(GSL_SHARED "Build using shared libraries" ON)
Expand All @@ -17,15 +17,15 @@ find_package(ZLIB 1.1 REQUIRED)
if(${ZLIB_FOUND})
message("Using zlib library v${ZLIB_VERSION_STRING}")
endif(${ZLIB_FOUND})
target_link_libraries(FastANI PUBLIC ZLIB::ZLIB)
target_link_libraries(fastANI PUBLIC ZLIB::ZLIB)
#
# openmp dependency
find_package(OpenMP)
if(${OpenMP_CXX_FOUND})
message("Using OpenMP_CXX v${OpenMP_CXX_VERSION}")
target_link_libraries(FastANI PUBLIC ${OpenMP_CXX_LIBRARIES})
target_include_directories(FastANI PUBLIC ${OpenMP_CXX_INCLUDE_DIRS})
target_compile_options(FastANI PUBLIC ${OpenMP_CXX_FLAGS})
target_link_libraries(fastANI PUBLIC ${OpenMP_CXX_LIBRARIES})
target_include_directories(fastANI PUBLIC ${OpenMP_CXX_INCLUDE_DIRS})
target_compile_options(fastANI PUBLIC ${OpenMP_CXX_FLAGS})
else()
message("NOTE: OpenMP not found; Compiling as a single threaded app...")
endif(${OpenMP_CXX_FOUND})
Expand All @@ -35,53 +35,53 @@ find_package(GSL 1.6)
if(${GSL_FOUND})
message("GSL v${GSL_VERSION} Found: ${GSL_LIBDIR}")
if(${GSL_SHARED})
target_link_libraries(FastANI PUBLIC ${GSL_LIBRARIES})
target_link_libraries(fastANI PUBLIC ${GSL_LIBRARIES})
else()
# GSL_LIBDIR is not documented
target_link_libraries(FastANI PUBLIC
target_link_libraries(fastANI PUBLIC
${GSL_LIBDIR}/libgsl.a
${GSL_LIBDIR}/libgslcblas.a)
endif(${GSL_SHARED})
target_include_directories(FastANI PUBLIC ${GSL_INCLUDE_DIRS})
target_include_directories(fastANI PUBLIC ${GSL_INCLUDE_DIRS})
else()
set(Boost_USE_STATIC_LIBS ON) # only find static libs
set(Boost_USE_DEBUG_LIBS OFF) # ignore debug libs and
set(Boost_USE_RELEASE_LIBS ON) # only find release libs
set(Boost_USE_MULTITHREADED ON)
find_package(Boost 1.45 REQUIRED COMPONENTS math_c99)
target_link_libraries(FastANI PUBLIC ${Boost_MATCH_C99_LIBRARY})
target_include_directories(FastANI PUBLIC ${Boost_INCLUDE_DIRS})
target_compile_definitions(FastANI PUBLIC USE_BOOST=1)
target_link_libraries(fastANI PUBLIC ${Boost_MATCH_C99_LIBRARY})
target_include_directories(fastANI PUBLIC ${Boost_INCLUDE_DIRS})
target_compile_definitions(fastANI PUBLIC USE_BOOST=1)
endif(${GSL_FOUND})
#
#
if(${BUILD_TESTING})
add_subdirectory(ext/Catch2)
include(CTest)
include(Catch)
add_executable(FastANITest tests/fastani_tests.cpp src/cgi/core_genome_identity.cpp)
target_include_directories(FastANITest PUBLIC "src/"
add_executable(fastANITest tests/fastani_tests.cpp src/cgi/core_genome_identity.cpp)
target_include_directories(fastANITest PUBLIC "src/"
${OpenMP_CXX_INCLUDE_DIRS})
target_compile_options(FastANITest PUBLIC
target_compile_options(fastANITest PUBLIC
--coverage -g -O0 -fprofile-arcs -ftest-coverage ${OpenMP_CXX_FLAGS})
target_link_libraries(FastANITest PRIVATE
target_link_libraries(fastANITest PRIVATE
Catch2::Catch2 Catch2::Catch2WithMain
ZLIB::ZLIB GSL::gsl GSL::gslcblas
${OpenMP_CXX_LIBRARIES}
gcov)
catch_discover_tests(FastANITest)
catch_discover_tests(fastANITest)
file(COPY tests/data DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(lcov lcov -c -d .. -o FastANITest.out
COMMAND genhtml -o ../lcov/ FastANITest.out
DEPENDS FastANITest)
add_custom_target(lcov2 lcov -c -d ./ -o FastANITest.info
COMMAND lcov -e FastANITest.info "*/FastANI/src/*/*.cpp" "*/FastANI/src/*/*.hpp" > coverage.info
add_custom_target(lcov lcov -c -d .. -o fastANITest.out
COMMAND genhtml -o ../lcov/ fastANITest.out
DEPENDS fastANITest)
add_custom_target(lcov2 lcov -c -d ./ -o fastANITest.info
COMMAND lcov -e fastANITest.info "*/FastANI/src/*/*.cpp" "*/FastANI/src/*/*.hpp" > coverage.info
COMMAND lcov --list coverage.info |tee coverage_list.txt
COMMAND lcov --summary coverage.info |tee coverage_summary.txt
DEPENDS FastANITest)
DEPENDS fastANITest)
endif(${BUILD_TESTING})

install(TARGETS FastANI DESTINATION bin)
install(TARGETS fastANI DESTINATION bin)

set(CPACK_GENERATOR "TGZ")
set(CPACK_SOURCE_GENERATOR "TGZ")
Expand Down

0 comments on commit 88c0cf9

Please sign in to comment.