Skip to content

Commit

Permalink
adding configuration elements to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Oct 13, 2023
1 parent 5679c79 commit 44da8f9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,13 @@ set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_RPM_PACKAGE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
include(CPack)

add_library(roaringbitmap::roaring ALIAS roaring)
add_library(roaringbitmap::roaring-headers-cpp ALIAS roaring-headers-cpp)

set_target_properties(
roaring PROPERTIES
VERSION "${ROARING_LIB_VERSION}"
SOVERSION "${ROARING_LIB_SOVERSION}"
WINDOWS_EXPORT_ALL_SYMBOLS YES
)
4 changes: 2 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ if(MSVC)
"$<TARGET_FILE_DIR:toplevel_unit>") # <--this is out-file path
endif()


configure_file(${CMAKE_SOURCE_DIR}/tools/cmake/CTestCustom.cmake ${CMAKE_BINARY_DIR})
get_directory_property(parent_dir PARENT_DIRECTORY)
configure_file("${parent_dir}/tools/cmake/CTestCustom.cmake" "${CMAKE_BINARY_DIR}")
3 changes: 2 additions & 1 deletion tools/cmake/FindCTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ if (CMAKE_VERSION VERSION_GREATER 2.8.10)
else()
target_compile_definitions(${TEST_NAME} PUBLIC ROARING_EXCEPTIONS=0)
endif()
target_include_directories(${TEST_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/cpp)
get_directory_property(parent_dir PARENT_DIRECTORY)
target_include_directories(${TEST_NAME} PRIVATE "${parent_dir}/cpp")

target_link_libraries(${TEST_NAME} roaring cmocka-static)

Expand Down

0 comments on commit 44da8f9

Please sign in to comment.