Add test of installed <openblas_config.h>

This commit is contained in:
River Dillon 2021-07-10 00:39:52 -07:00
parent 220f6a1c55
commit cecc2c65aa
3 changed files with 28 additions and 2 deletions

View File

@ -34,9 +34,9 @@ endif
LAPACK_NOOPT := $(filter-out -O0 -O1 -O2 -O3 -Ofast,$(LAPACK_FFLAGS))
SUBDIRS_ALL = $(SUBDIRS) test ctest utest exports benchmark ../laswp ../bench cpp_thread_test
SUBDIRS_ALL = $(SUBDIRS) test ctest utest test_install exports benchmark ../laswp ../bench cpp_thread_test
.PHONY : all libs netlib $(RELA) test ctest shared install
.PHONY : all libs netlib $(RELA) test ctest test_install shared install
.NOTPARALLEL : all libs $(RELA) prof lapack-test install blas-test
all :: libs netlib $(RELA) tests shared
@ -155,6 +155,11 @@ endif
endif
endif
test_install :
mkdir -p install
PREFIX=install $(MAKE) install
$(MAKE) -C test_install all
libs :
ifeq ($(CORE), UNKNOWN)
$(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
@$(MAKE) -C relapack clean
@rm -f *.grd Makefile.conf_last config_last.h
@(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt)
@rm -rf install
@echo Done.

15
test_install/Makefile Normal file
View File

@ -0,0 +1,15 @@
#
# tests of installed headers and libs
#
INSTALLDIR = ../install
.PHONY: all
all: test_sched_include
test_sched_include: test_sched_include.c
$(CC) -c -I$(INSTALLDIR)/include $<
.PHONY: clean
clean:
rm -f *.o

View File

@ -0,0 +1,5 @@
// tests that inclusion of openblas_config.h works with musl
#include <openblas_config.h>
cpu_set_t* cpu_set = NULL;