armadillo/armadillo-tests.patch

88 lines
2.4 KiB
Diff
Raw Normal View History

Index: armadillo-7.500.0/tests/Makefile.in
===================================================================
--- /dev/null
+++ armadillo-7.500.0/tests/Makefile.in
@@ -0,0 +1,38 @@
+
+LIB_FLAGS = -L@PROJECT_SOURCE_DIR@ -larmadillo
+
+ifeq (${ARMA_USE_LAPACK},true)
+ LIB_FLAGS += -llapack
+endif
+ifeq (${ARMA_USE_BLAS},true)
+ LIB_FLAGS += -lblas
+endif
+ifeq (${ARMA_USE_SUPERLU},true)
+ LIB_FLAGS += -lsuperlu
+endif
+ifeq (${ARMA_USE_ARPACK},true)
+ LIB_FLAGS += -larpack
+endif
+
+#LIB_FLAGS = -lblas -llapack
+#LIB_FLAGS = -lopenblas -llapack
+
+CXX_FLAGS = -I@PROJECT_SOURCE_DIR@/include -std=c++11 -Wshadow -Wall -pedantic -O0
+#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O0 -DARMA_DONT_USE_WRAPPER
+#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O2
+
+OBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+
+%.o: %.cpp $(DEPS)
+ $(CXX) $(CXX_FLAGS) -o $@ -c $<
+
+main: $(OBJECTS)
+ $(CXX) $(CXX_FLAGS) -o $@ $(OBJECTS) $(LIB_FLAGS)
+
+
+all: main
+
+.PHONY: clean
+
+clean:
+ rm -f main *.o
Index: armadillo-7.500.0/CMakeLists.txt
===================================================================
--- armadillo-7.500.0.orig/CMakeLists.txt
+++ armadillo-7.500.0/CMakeLists.txt
@@ -453,6 +453,10 @@ set(ARMADILLO_LIB_DIR "${PROJECT_BI
set(ARMADILLO_CMAKE_DIR "${PROJECT_BINARY_DIR}")
+# Configure tests/Makefile.in for running tests without installing first
+message(STATUS "Configuring tests/Makefile")
+configure_file(${PROJECT_SOURCE_DIR}/tests/Makefile.in ${PROJECT_SOURCE_DIR}/tests/Makefile)
+
message(STATUS "Generating '${PROJECT_BINARY_DIR}/ArmadilloConfig.cmake'")
# copy/change config and configVersion file (modify only the @xyz@ variables)
configure_file(${PROJECT_SOURCE_DIR}/cmake_aux/InstallFiles/ArmadilloConfig.cmake.in
Index: armadillo-7.500.0/tests/Makefile
===================================================================
--- armadillo-7.500.0.orig/tests/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-
-LIB_FLAGS = -larmadillo
-#LIB_FLAGS = -lblas -llapack
-#LIB_FLAGS = -lopenblas -llapack
-
-CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O0
-#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O0 -DARMA_DONT_USE_WRAPPER
-#CXX_FLAGS = -std=c++11 -Wshadow -Wall -pedantic -O2
-
-OBJECTS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
-
-%.o: %.cpp $(DEPS)
- $(CXX) $(CXX_FLAGS) -o $@ -c $< $
-
-main: $(OBJECTS)
- $(CXX) $(CXX_FLAGS) -o $@ $(OBJECTS) $(LIB_FLAGS)
-
-
-all: main
-
-.PHONY: clean
-
-clean:
- rm -f main *.o