Skip to content

Commit 96df4b9

Browse files
committed
Avoid truncating cblas.h when compiling gencblas target
1 parent 29dc8e0 commit 96df4b9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ if(NOT NO_CBLAS)
252252
message (STATUS "Generating cblas.h in ${CMAKE_INSTALL_INCLUDEDIR}")
253253
254254
ADD_CUSTOM_TARGET(gencblas
255-
COMMAND ${SED} 's/common/openblas_config/g' ${CMAKE_CURRENT_SOURCE_DIR}/cblas.h > "${CMAKE_BINARY_DIR}/cblas.h"
255+
COMMAND ${SED} 's/common/openblas_config/g' ${CMAKE_CURRENT_SOURCE_DIR}/cblas.h > "${CMAKE_BINARY_DIR}/cblas.tmp"
256+
COMMAND cp "${CMAKE_BINARY_DIR}/cblas.tmp" "${CMAKE_BINARY_DIR}/cblas.h"
256257
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cblas.h
257258
)
258259
add_dependencies( ${OpenBLAS_LIBNAME} gencblas)

0 commit comments

Comments
 (0)