Skip to content

Commit

Permalink
Cleanup, remove unnecessary comments etc
Browse files Browse the repository at this point in the history
  • Loading branch information
atemerev committed Oct 21, 2024
1 parent 71f11c5 commit 8a7f8a4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ compile_commands.json
neuron_parquet.*
Session.vim
spack*
.aider*
15 changes: 0 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,53 +40,38 @@ find_package(CLI11)
find_package(Catch2)
find_package(Python 3.8 COMPONENTS Interpreter Development.Module REQUIRED)

# Add HighFive if not found
if(NOT HighFive_FOUND)
set(HDF5_IS_PARALLEL ON CACHE BOOL "Enable parallel HDF5" FORCE)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/highfive)
endif()

# Add CLI11 if not found
if(NOT CLI11_FOUND)
add_subdirectory(${CMAKE_SOURCE_DIR}/deps/cli11)
endif()

# Add Catch2 if not found
if(NOT ${Catch2_FOUND})
add_subdirectory(deps/catch2 EXCLUDE_FROM_ALL)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/deps/catch2/extras)
endif()

# Set build type if not specified
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif()

# Find nanobind
execute_process(
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
find_package(nanobind CONFIG REQUIRED)

# Add subdirectories
add_subdirectory(src)

# Enable testing
enable_testing()
add_subdirectory(tests)

# Add the index writer library
add_library(index_writer STATIC
src/index/index.cpp
)

set_target_properties(index_writer PROPERTIES POSITION_INDEPENDENT_CODE ON)

# Link index_writer against HighFive and its dependencies
target_link_libraries(index_writer PRIVATE HighFive HDF5::HDF5)

# Add the Python module
nanobind_add_module(index_writer_py src/index/index_bindings.cpp)

target_include_directories(index_writer_py PRIVATE ${HighFive_INCLUDE_DIRS})
Expand Down

0 comments on commit 8a7f8a4

Please sign in to comment.