Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions BLAS/SRC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ set_target_properties(
SOVERSION ${LAPACK_MAJOR_VERSION}
)
lapack_install_library(${BLASLIB})

if( TEST_FORTRAN_COMPILER )
add_dependencies( ${BLASLIB} run_test_zcomplexabs run_test_zcomplexdiv run_test_zcomplexmult run_test_zminMax )
endif()
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,40 @@ if(_is_coverage_build)
find_package(codecov)
endif()

# By default test Fortran compiler complex abs and complex division
option(TEST_FORTRAN_COMPILER "Test Fortran compiler complex abs and complex division" ON)
if( TEST_FORTRAN_COMPILER )

add_executable( test_zcomplexabs ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexabs.f )
add_custom_target( run_test_zcomplexabs
COMMAND test_zcomplexabs 2> test_zcomplexabs.err
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
COMMENT "Running test_zcomplexabs in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zcomplexabs.err"
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexabs.f )

add_executable( test_zcomplexdiv ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexdiv.f )
add_custom_target( run_test_zcomplexdiv
COMMAND test_zcomplexdiv 2> test_zcomplexdiv.err
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
COMMENT "Running test_zcomplexdiv in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zcomplexdiv.err"
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexdiv.f )

add_executable( test_zcomplexmult ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexmult.f )
add_custom_target( run_test_zcomplexmult
COMMAND test_zcomplexmult 2> test_zcomplexmult.err
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
COMMENT "Running test_zcomplexmult in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zcomplexmult.err"
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zcomplexmult.f )

add_executable( test_zminMax ${LAPACK_SOURCE_DIR}/INSTALL/test_zminMax.f )
add_custom_target( run_test_zminMax
COMMAND test_zminMax 2> test_zminMax.err
WORKING_DIRECTORY ${LAPACK_BINARY_DIR}/INSTALL
COMMENT "Running test_zminMax in ${LAPACK_BINARY_DIR}/INSTALL with stderr: test_zminMax.err"
SOURCES ${LAPACK_SOURCE_DIR}/INSTALL/test_zminMax.f )

endif()

# By default static library
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)

Expand Down
13 changes: 13 additions & 0 deletions INSTALL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@ add_executable(secondtst_INT_ETIME second_INT_ETIME.f secondtst.f)
add_executable(secondtst_INT_CPU_TIME second_INT_CPU_TIME.f secondtst.f)
add_executable(testieee tstiee.f)
add_executable(testversion ilaver.f LAPACK_version.f)

if( NOT TARGET test_zcomplexabs )
add_executable( test_zcomplexabs test_zcomplexabs.f )
endif()
if( NOT TARGET test_zcomplexdiv )
add_executable( test_zcomplexdiv test_zcomplexdiv.f )
endif()
if( NOT TARGET test_zcomplexmult )
add_executable( test_zcomplexmult test_zcomplexmult.f )
endif()
if( NOT TARGET test_zminMax )
add_executable( test_zminMax test_zminMax.f )
endif()
22 changes: 19 additions & 3 deletions INSTALL/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
TOPSRCDIR = ..
include $(TOPSRCDIR)/make.inc

.PHONY: all testlsame testslamch testdlamch testsecond testdsecnd testieee testversion
all: testlsame testslamch testdlamch testsecond testdsecnd testieee testversion
.PHONY: all testlsame testslamch testdlamch testsecond testdsecnd testieee testversion test_zcomplexabs test_zcomplexdiv test_zcomplexmult test_zminMax
all: testlsame testslamch testdlamch testsecond testdsecnd testieee testversion test_zcomplexabs test_zcomplexdiv test_zcomplexmult test_zminMax

testlsame: lsame.o lsametst.o
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^
Expand All @@ -27,6 +27,18 @@ testieee: tstiee.o $(TOPSRCDIR)/SRC/ieeeck.o $(TOPSRCDIR)/SRC/ilaenv.o $(TOPSRCD
testversion: ilaver.o LAPACK_version.o
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^

test_zcomplexabs: test_zcomplexabs.o
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^

test_zcomplexdiv: test_zcomplexdiv.o
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^

test_zcomplexmult: test_zcomplexmult.o
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^

test_zminMax: test_zminMax.o
$(FC) $(FFLAGS) $(LDFLAGS) -o $@ $^

.PHONY: run
run: all
./testlsame
Expand All @@ -36,13 +48,17 @@ run: all
./testdsecnd
./testieee
./testversion
./test_zcomplexabs 2> test_zcomplexabs.err
./test_zcomplexdiv 2> test_zcomplexdiv.err
./test_zcomplexmult 2> test_zcomplexmult.err
./test_zminMax 2> test_zminMax.err

.PHONY: clean cleanobj cleanexe cleantest
clean: cleanobj cleanexe cleantest
cleanobj:
rm -f *.o
cleanexe:
rm -f test*
rm -f testlsame testslamch testdlamch testsecond testdsecnd testieee testversion test_zcomplexabs test_zcomplexdiv test_zcomplexmult test_zminMax
cleantest:
rm -f core

Expand Down
Loading