Skip to content

Commit 0f6ec03

Browse files
authored
Merge pull request #4 from kpeeters/master
Sync with upstream
2 parents 1bdda28 + 0e11ea9 commit 0f6ec03

File tree

4 files changed

+37
-12
lines changed

4 files changed

+37
-12
lines changed

CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ else()
5151
message(STATUS "Install directory set to ${CMAKE_INSTALL_PREFIX}")
5252
endif()
5353

54+
install(
55+
CODE
56+
"
57+
if (EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/man/man1/cadabra2.1\")
58+
message(FATAL_ERROR \"\nThe location of the Cadabra manual has changed since the last installation. Please remove the old files with 'make deduplicate'.\n\")
59+
endif()
60+
"
61+
)
62+
63+
5464
# Include packaging logic.
5565
include(cmake/packaging.cmake)
5666

libs/pybind11/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,6 @@ if(NOT (CMAKE_VERSION VERSION_LESS 3.0)) # CMake >= 3.0
119119
target_link_libraries(embed INTERFACE pybind11::pybind11 $<BUILD_INTERFACE:${PYTHON_LIBRARIES}>)
120120
endif()
121121

122-
if (NOT PYBIND_MASTER_PROJECT)
123-
install(
124-
CODE
125-
"
126-
if (EXISTS \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/man/man1/cadabra2.1\")
127-
message(FATAL_ERROR \"The location of the Cadabra manual has changed since the last installation. Please remove the old files with make deduplicate.\")
128-
endif()
129-
"
130-
)
131-
endif()
132-
133122
if (PYBIND11_INSTALL)
134123
install(DIRECTORY ${PYBIND11_INCLUDE_DIR}/pybind11 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
135124
# GNUInstallDirs "DATADIR" wrong here; CMake search path wants "share".

tests/forms.cdb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ def test01():
1111

1212
test01()
1313

14+
15+
16+
17+
18+
1419
# A::Matrix;
1520
# A::DifferentialForm(degree=1);
1621
# F::DifferentialForm(degree=2);

tests/implicit.cdb

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,25 @@ def test04():
5050

5151
test04()
5252

53-
53+
def test05():
54+
__cdbkernel__=create_scope()
55+
{a,b,c,d}::Indices(vector);
56+
ex:=(A)_{a b} (B)_{b c} (C)_{c d};
57+
combine(_);
58+
tst:= (A B C)_{a d} - @(ex);
59+
assert(tst==0)
60+
print("Test 05 passed")
61+
62+
test05()
63+
64+
def test06():
65+
__cdbkernel__=create_scope()
66+
{a,b}::Indices(vector);
67+
ex:=(A)_{a b} (B)_{b a};
68+
combine(_);
69+
tst:= (A B)_{b b} - @(ex);
70+
assert(tst==0)
71+
print("Test 06 passed")
72+
73+
test06()
74+

0 commit comments

Comments
 (0)