Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/c-cpp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
gcc-build: true
ninja_build: true
secrets:
CPP_GITHUB_TOKEN: ${{ secrets.CPP_GITHUB_TOKEN }}
CMAIZE_GITHUB_TOKEN: ${{ secrets.CMAIZE_GITHUB_TOKEN }}
# build-with-clang:
# uses: NWChemEx-Project/.github/.github/workflows/c-cpp_tmpl.yaml@master
# with:
# dependencies: 'clang gcovr openblas cblas lapacke scalapack boost eigen3 openmpi'
# clang-build: true
# gcc-build: false
# secrets:
# CPP_GITHUB_TOKEN: ${{ secrets.CPP_GITHUB_TOKEN }}
# CMAIZE_GITHUB_TOKEN: ${{ secrets.CMAIZE_GITHUB_TOKEN }}
31 changes: 16 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ project(tensorwrapper VERSION "${VERSION}" LANGUAGES CXX)

include(FetchContent)
FetchContent_Declare(
nwx_cmake
GIT_REPOSITORY https://github.com/NWChemEx-Project/NWXCMake
nwx_cmake
GIT_REPOSITORY https://github.com/NWChemEx-Project/NWXCMake
)
FetchContent_MakeAvailable(nwx_cmake)
list(APPEND CMAKE_MODULE_PATH "${nwx_cmake_SOURCE_DIR}/cmake")
Expand All @@ -30,7 +30,7 @@ set(
CACHE STRING "" FORCE
)

include(get_cpp)
include(get_cmaize)
include(nwx_cxx_api_docs)
nwx_cxx_api_docs("${CMAKE_CURRENT_SOURCE_DIR}/src"
"${CMAKE_CURRENT_SOURCE_DIR}/include")
Expand All @@ -39,7 +39,7 @@ nwx_cxx_api_docs("${CMAKE_CURRENT_SOURCE_DIR}/src"
option(BUILD_TESTING "Should we build the tests?" OFF)
option(BUILD_PYBINDINGS "Should we build Python3 bindings?" ON)

cpp_find_or_build_dependency(
cmaize_find_or_build_dependency(
utilities
URL github.com/NWChemEx-Project/utilities
PRIVATE TRUE
Expand All @@ -48,7 +48,7 @@ cpp_find_or_build_dependency(
CMAKE_ARGS BUILD_TESTING=OFF
)

cpp_find_or_build_dependency(
cmaize_find_or_build_dependency(
parallelzone
URL github.com/NWChemEx-Project/ParallelZone
PRIVATE TRUE
Expand All @@ -59,10 +59,10 @@ cpp_find_or_build_dependency(

# N.B. If you update the TA version, you may also need to update
# the MADNESS version in the ParallelZone repo.
cpp_find_or_build_dependency(
cmaize_find_or_build_dependency(
tiledarray
URL github.com/ValeevGroup/tiledarray
VERSION fab5dc31fc10d88d381e8421d868d2185f164667
VERSION master # fab5dc31fc10d88d381e8421d868d2185f164667
BUILD_TARGET tiledarray
FIND_TARGET tiledarray
CMAKE_ARGS TA_BUILD_UNITTEST=OFF
Expand All @@ -73,29 +73,30 @@ cpp_find_or_build_dependency(

find_package(Boost REQUIRED COMPONENTS container)

cpp_add_library(
cmaize_add_library(
tensorwrapper
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/src/tensorwrapper"
INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include/tensorwrapper"
DEPENDS nwx::utilities nwx::parallelzone tiledarray Boost::container
INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/include/tensorwrapper"
DEPENDS utilities parallelzone tiledarray Boost::container
)

include(nwx_python_mods)
cppyy_make_python_package(PYTHONIZE MPI BLAS TILED PACKAGE tensorwrapper NAMESPACES tensorwrapper TA DEPPACKAGES parallelzone)

if("${BUILD_TESTING}")
cpp_find_or_build_dependency(
cmaize_find_or_build_dependency(
Catch2
URL github.com/catchorg/Catch2
BUILD_TARGET Catch2
VERSION v2.x
FIND_TARGET Catch2::Catch2
VERSION v2.x
)
cpp_add_tests(
cmaize_add_tests(
test_tensorwrapper
SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/tests"
INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/src/tensorwrapper"
DEPENDS Catch2::Catch2 tensorwrapper
INCLUDE_DIRS "${CMAKE_CURRENT_LIST_DIR}/src/tensorwrapper"
DEPENDS Catch2 tensorwrapper
)
endif()

cmaize_add_package(${PROJECT_NAME} NAMESPACE nwx::)