Skip to content

Commit cecc2c6

Browse files
author
River Dillon
committed
Add test of installed <openblas_config.h>
1 parent 220f6a1 commit cecc2c6

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ endif
3434

3535
LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast,$(LAPACK_FFLAGS))
3636

37-
SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test
37+
SUBDIRS_ALL = $(SUBDIRS) test ctest utest test_install exports benchmark ../laswp ../bench cpp_thread_test
3838

39-
.PHONY : all libs netlib $(RELA) test ctest shared install
39+
.PHONY : all libs netlib $(RELA) test ctest test_install shared install
4040
.NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test
4141

4242
all :: libs netlib $(RELA) tests shared
@@ -155,6 +155,11 @@ endif
155155
endif
156156
endif
157157

158+
test_install :
159+
mkdir -p install
160+
PREFIX=install $(MAKE) install
161+
$(MAKE) -C test_install all
162+
158163
libs :
159164
ifeq ($(CORE), UNKNOWN)
160165
$(error OpenBLAS: Detecting CPU failed. Please set TARGET explicitly, e.g. make TARGET=your_cpu_target. Please read README for the detail.)
@@ -399,4 +404,5 @@ endif
399404
@$(MAKE) -C relapack clean
400405
@rm -f *.grd Makefile.conf_last config_last.h
401406
@(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt)
407+
@rm -rf install
402408
@echo Done.

test_install/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# tests of installed headers and libs
3+
#
4+
5+
INSTALLDIR = ../install
6+
7+
.PHONY: all
8+
all: test_sched_include
9+
10+
test_sched_include: test_sched_include.c
11+
$(CC) -c -I$(INSTALLDIR)/include $<
12+
13+
.PHONY: clean
14+
clean:
15+
rm -f *.o

test_install/test_sched_include.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// tests that inclusion of openblas_config.h works with musl
2+
3+
#include <openblas_config.h>
4+
5+
cpu_set_t* cpu_set = NULL;

0 commit comments

Comments
 (0)