@@ -34,7 +34,7 @@ include(CMakeDependentOption)
3434### Require out-of-source builds
3535file (TO_CMAKE_PATH "${PROJECT_BINARY_DIR } /CMakeLists.txt" LOC_PATH )
3636if (EXISTS "${LOC_PATH} " )
37- message (FATAL_ERROR "You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles." )
37+ message (FATAL_ERROR "You cannot build in a source directory (or any directory with a CMakeLists.txt file). Please make a build subdirectory. Feel free to remove CMakeCache.txt and CMakeFiles." )
3838endif ()
3939
4040# Ensure builds on Windows export all symbols
@@ -69,7 +69,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
6969###### OPTIONS ######
7070# Enable testing
7171option (BUILD_TESTS "Build unit tests" ON )
72- if (BUILD_TESTS)
72+ if (BUILD_TESTS)
7373 enable_testing ()
7474endif ()
7575
@@ -93,10 +93,10 @@ set(default_build_type "Release")
9393if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
9494 message (STATUS "Setting build type to '${default_build_type} ' as none was specified." )
9595 set (CMAKE_BUILD_TYPE "${default_build_type} " CACHE
96- STRING "Choose the type of build." FORCE )
96+ STRING "Choose the type of build." FORCE )
9797 # Set the possible values of build type for cmake-gui
9898 set_property (CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
99- "Debug" "Release" "MinSizeRel" "RelWithDebInfo" )
99+ "Debug" "Release" "MinSizeRel" "RelWithDebInfo" )
100100endif ()
101101
102102###### TARGETS ######
@@ -115,47 +115,48 @@ add_subdirectory(sampling)
115115add_subdirectory (tuple )
116116add_subdirectory (req )
117117add_subdirectory (quantiles )
118+ add_subdirectory (count )
118119
119120if (WITH_PYTHON)
120121 add_subdirectory (python )
121122endif ()
122123
123- target_link_libraries (datasketches INTERFACE hll cpc kll fi theta sampling req quantiles )
124+ target_link_libraries (datasketches INTERFACE hll cpc kll fi theta sampling req quantiles count )
124125
125126if (COVERAGE)
126127 find_program (LCOV_PATH NAMES "lcov" )
127128 find_program (GENHTML_PATH NAMES "genhtml" )
128129 if (NOT LCOV_PATH-NOTFOUND AND NOT GENHTML_PATH-NOTFOUND)
129130 add_custom_target (coverage_report
130- COMMAND ${LCOV_PATH} --capture --exclude '*/test/*' --exclude '/Library/*' --exclude '/usr/include/*' --directory . --output-file lcov.info
131- COMMAND ${GENHTML_PATH} --legend lcov.info --output-directory coverage --demangle-cpp )
132- endif ()
131+ COMMAND ${LCOV_PATH} --capture --exclude '*/test/*' --exclude '/Library/*' --exclude '/usr/include/*' --directory . --output-file lcov.info
132+ COMMAND ${GENHTML_PATH} --legend lcov.info --output-directory coverage --demangle-cpp )
133+ endif ()
133134endif ()
134135
135136
136137# # Installation
137138install (TARGETS datasketches
138- EXPORT ${PROJECT_NAME }
139- PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /DataSketches
140- INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /DataSketches
141- )
139+ EXPORT ${PROJECT_NAME }
140+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /DataSketches
141+ INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} /DataSketches
142+ )
142143
143144# Packaging
144145include (CMakePackageConfigHelpers )
145146write_basic_package_version_file (
146- "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfigVersion.cmake"
147- VERSION ${PROJECT_VERSION }
148- COMPATIBILITY SameMajorVersion
147+ "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfigVersion.cmake"
148+ VERSION ${PROJECT_VERSION }
149+ COMPATIBILITY SameMajorVersion
149150)
150151configure_package_config_file (
151- cmake/DataSketchesConfig.cmake.in
152- "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfig.cmake"
153- INSTALL_DESTINATION lib/DataSketches/cmake
154- PATH_VARS CMAKE_INSTALL_INCLUDEDIR
152+ cmake/DataSketchesConfig.cmake.in
153+ "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfig.cmake"
154+ INSTALL_DESTINATION lib/DataSketches/cmake
155+ PATH_VARS CMAKE_INSTALL_INCLUDEDIR
155156)
156157install (EXPORT ${PROJECT_NAME } DESTINATION lib/DataSketches/cmake)
157158install (FILES "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfigVersion.cmake"
158- "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfig.cmake"
159+ "${CMAKE_CURRENT_BINARY_DIR } /DataSketchesConfig.cmake"
159160 DESTINATION lib/DataSketches/cmake)
160161
161162
0 commit comments