Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add misc fixes. #3088

Merged
merged 7 commits into from
Mar 14, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,6 @@ build.*
*.swp
benchmark/*.goto
benchmark/smallscaling
.vscode
CMakeCache.txt
CMakeFiles/*
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ include(GNUInstallDirs)

include(CMakePackageConfigHelpers)

if(MSVC AND NOT DEFINED NOFORTRAN)
set(NOFORTRAN ON)
endif()

#######
if(MSVC)
Expand Down Expand Up @@ -229,7 +232,7 @@ if (NOT NO_CBLAS)
add_subdirectory(utest)
endif()

if (NOT MSVC AND NOT NOFORTRAN)
if (NOT NOFORTRAN)
# Build test and ctest
add_subdirectory(test)
if(NOT NO_CBLAS)
Expand Down
4 changes: 1 addition & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,5 @@ build_script:
- cmake --build .

test_script:
- echo Running Test
- cd utest
- openblas_utest
- ctest -j2

15 changes: 12 additions & 3 deletions ctest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ enable_language(Fortran)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DADD${BU} -DCBLAS")

if(WIN32)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.ps1
"$ErrorActionPreference = \"Stop\"\n"
"Get-Content $args[1] | & $args[0]\n"
)
set(test_helper powershell -ExecutionPolicy Bypass "${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.ps1")
else()
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.sh
"$1 < $2\n"
)
set(test_helper sh "${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.sh")
endif()

foreach(float_type ${FLOAT_TYPES})
string(SUBSTRING ${float_type} 0 1 float_char_upper)
Expand All @@ -21,7 +30,7 @@ foreach(float_type ${FLOAT_TYPES})
c_${float_char}blas1.c)
target_link_libraries(x${float_char}cblat1 ${OpenBLAS_LIBNAME})
add_test(NAME "x${float_char}cblat1"
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/x${float_char}cblat1")
COMMAND $<TARGET_FILE:x${float_char}cblat1>)

#level2
add_executable(x${float_char}cblat2
Expand All @@ -33,7 +42,7 @@ foreach(float_type ${FLOAT_TYPES})
constant.c)
target_link_libraries(x${float_char}cblat2 ${OpenBLAS_LIBNAME})
add_test(NAME "x${float_char}cblat2"
COMMAND sh "${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.sh" "${CMAKE_CURRENT_BINARY_DIR}/x${float_char}cblat2" "${PROJECT_SOURCE_DIR}/ctest/${float_char}in2")
COMMAND ${test_helper} $<TARGET_FILE:x${float_char}cblat2> "${PROJECT_SOURCE_DIR}/ctest/${float_char}in2")

#level3
add_executable(x${float_char}cblat3
Expand All @@ -45,6 +54,6 @@ foreach(float_type ${FLOAT_TYPES})
constant.c)
target_link_libraries(x${float_char}cblat3 ${OpenBLAS_LIBNAME})
add_test(NAME "x${float_char}cblat3"
COMMAND sh "${CMAKE_CURRENT_BINARY_DIR}/test_cblas_helper.sh" "${CMAKE_CURRENT_BINARY_DIR}/x${float_char}cblat3" "${PROJECT_SOURCE_DIR}/ctest/${float_char}in3")
COMMAND ${test_helper} $<TARGET_FILE:x${float_char}cblat3> "${PROJECT_SOURCE_DIR}/ctest/${float_char}in3")

endforeach()
198 changes: 106 additions & 92 deletions lapack-netlib/TESTING/CMakeLists.txt

Large diffs are not rendered by default.

Loading