Skip to content

Commit

Permalink
Fix review findings
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjoe authored and lambdafu committed Oct 31, 2018
1 parent bdcb579 commit e17cea1
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
62 changes: 31 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ add_custom_target(tests)
enable_testing()

# PEGTL
set(TAO-PEGTL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/pegtl)
set(PEGTL_INCLUDE_DIR ${TAO-PEGTL_ROOT}/include)
set(PEGTL_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/pegtl)
set(PEGTL_INCLUDE_DIR ${PEGTL_ROOT}/include)
set(PEGTL_BUILD_TESTS OFF CACHE BOOL "")
add_subdirectory(${TAO-PEGTL_ROOT} EXCLUDE_FROM_ALL)
add_subdirectory(${PEGTL_ROOT} EXCLUDE_FROM_ALL)


# Rang
Expand All @@ -74,10 +74,10 @@ set(SPDLOG_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/spdlog)
set(SPDLOG_INCLUDE_DIR ${SPDLOG_ROOT}/include)

# json
set(TAOCPP-JSON_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/json)
set(JSON_INCLUDE_DIR ${TAOCPP-JSON_ROOT}/include)
set(JSON_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/json)
set(JSON_INCLUDE_DIR ${JSON_ROOT}/include)
set(TAOCPP_JSON_BUILD_TESTS OFF CACHE BOOL "")
add_subdirectory(${TAOCPP-JSON_ROOT} EXCLUDE_FROM_ALL)
add_subdirectory(${JSON_ROOT} EXCLUDE_FROM_ALL)

# CodeCoverage

Expand All @@ -86,30 +86,30 @@ ProcessorCount(PROCESSOR_COUNT)

if(CMAKE_BUILD_TYPE MATCHES Debug)

option(COVERAGE "Create coverage data")

if(COVERAGE)

include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()

set(COVERAGE_EXCLUDES '*/3rdparty/*' '*/usr/*' '*/nix/store/*')
SETUP_TARGET_FOR_COVERAGE(
NAME coverage
EXECUTABLE ctest
DEPENDENCIES tests
)
SETUP_TARGET_FOR_COVERAGE_HTML(
NAME coverage-html
EXECUTABLE ctest
DEPENDENCIES tests
)
SETUP_TARGET_FOR_COVERAGE_COBERTURA(
NAME coverage-data
EXECUTABLE ctest
DEPENDENCIES tests
)
endif(COVERAGE)
option(COVERAGE "Create coverage data")

if(COVERAGE)

include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()

set(COVERAGE_EXCLUDES '*/3rdparty/*' '*/usr/*' '*/nix/store/*')
SETUP_TARGET_FOR_COVERAGE(
NAME coverage
EXECUTABLE ctest
DEPENDENCIES tests
)
SETUP_TARGET_FOR_COVERAGE_HTML(
NAME coverage-html
EXECUTABLE ctest
DEPENDENCIES tests
)
SETUP_TARGET_FOR_COVERAGE_COBERTURA(
NAME coverage-data
EXECUTABLE ctest
DEPENDENCIES tests
)
endif(COVERAGE)

endif(CMAKE_BUILD_TYPE MATCHES Debug)

Expand Down Expand Up @@ -145,7 +145,7 @@ pkg_check_modules(botan-2 REQUIRED IMPORTED_TARGET botan-2)
pkg_check_modules(libusb-1.0 REQUIRED IMPORTED_TARGET libusb-1.0)
pkg_check_modules(gnutls REQUIRED IMPORTED_TARGET gnutls)

find_package(Boost COMPONENTS locale REQUIRED)
find_package(Boost COMPONENTS locale date_time REQUIRED)

find_package(CURL REQUIRED)
find_package(Threads)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ Development builds have extra dependencies:
To enable a debug build, set the CMAKE_BUILD_TYPE flag (default is `Release`):

```bash
# cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON ..
# cmake --build build --target coverage
$ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERAGE=ON ..
$ cmake --build build --target coverage
```

Other targets:
Expand Down
10 changes: 4 additions & 6 deletions neopg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ target_include_directories(neopg PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${TAO-PEGTL_ROOT}/include> #TODO(Bjoe) use tao::pegtl
$<BUILD_INTERFACE:${TAOCPP-JSON_ROOT}/include> #TODO(Bjoe) use taocpp::json
$<BUILD_INTERFACE:${CURL_INCLUDE_DIRS}> #TODO(Bjoe) use curl::curl
$<BUILD_INTERFACE:${PEGTL_ROOT}/include>
$<BUILD_INTERFACE:${JSON_ROOT}/include>
$<BUILD_INTERFACE:${CURL_INCLUDE_DIRS}>
)


Expand All @@ -98,9 +98,7 @@ target_compile_options(neopg

target_link_libraries(neopg PUBLIC
PkgConfig::botan-2
# tao::pegtl
# taocpp::json
${CURL_LDFLAGS} ${CURL_LIBRARIES} #TODO(Bjoe) use curl::curl
${CURL_LDFLAGS} ${CURL_LIBRARIES}
)

add_library(neopg::neopg ALIAS neopg)
Expand Down

0 comments on commit e17cea1

Please sign in to comment.