Skip to content

Commit 093add1

Browse files
committed
Add SPDX headers, remove compile_flags.txt. (Use
`-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate automatically.)
1 parent 21a906f commit 093add1

File tree

10 files changed

+42
-11
lines changed

10 files changed

+42
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
scripts
66
venv
77
build*
8+
compile_flags.txt
89
._*
910
tensor_test_files

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ target_include_directories(${PROJECT_NAME}
4646
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
4747
${HDF5_INCLUDE_DIRS})
4848

49-
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
50-
add_subdirectory(examples)
51-
add_subdirectory(test)
52-
endif()
53-
5449
# Installation rules - these are always needed when the library is built
5550
install(TARGETS binsparse
5651
EXPORT binsparse-targets
@@ -87,3 +82,8 @@ install(FILES
8782
"${CMAKE_CURRENT_BINARY_DIR}/binsparse-config.cmake"
8883
"${CMAKE_CURRENT_BINARY_DIR}/binsparse-config-version.cmake"
8984
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/binsparse)
85+
86+
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
87+
add_subdirectory(examples)
88+
add_subdirectory(test)
89+
endif()

compile_flags.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/cpp/tensor_test.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Binsparse Developers
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
17
#include "../tensor_test.c"

examples/tensor_test.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Binsparse Developers
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
17
#include <binsparse/read_tensor.h>
28
#include <binsparse/tensor.h>
39
#include <binsparse/write_tensor.h>

include/binsparse/read_tensor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Binsparse Developers
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
17
#pragma once
28

39
#ifdef __cplusplus

include/binsparse/tensor.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Binsparse Developers
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
17
#pragma once
28

39
#include <binsparse/array.h>

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
target_sources(binsparse PRIVATE
66
read_matrix.c
7-
src/read_tensor.c
7+
read_tensor.c
88
write_matrix.c
9-
src/write_tensor.c
9+
write_tensor.c
1010
)

src/write_tensor.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2024 Binsparse Developers
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
17
#include <assert.h>
28
#include <binsparse/tensor.h>
39
#include <unistd.h>

test/julia/tensor_test.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# SPDX-FileCopyrightText: 2024 Binsparse Developers
2+
#
3+
# SPDX-License-Identifier: BSD-3-Clause
4+
15
using Finch;
26
using HDF5;
37

0 commit comments

Comments
 (0)