mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +08:00
Fix parsing of version for nvhpc
As the first line of the version is empty it crashes, so delete first line if it is empty (cherry picked from commit 001a57519a7aa909d3bf0cd8c6ec8a9cd19d9c70)
This commit is contained in:
parent
cbb6ae6296
commit
85868564df
@ -478,6 +478,7 @@ macro(ei_get_compilerver VAR)
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${EIGEN_CXX_FLAG_VERSION}
|
||||
OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "^[ \n\r]+" "" eigen_cxx_compiler_version_string ${eigen_cxx_compiler_version_string})
|
||||
string(REGEX REPLACE "[\n\r].*" "" eigen_cxx_compiler_version_string ${eigen_cxx_compiler_version_string})
|
||||
|
||||
ei_get_compilerver_from_cxx_version_string("${eigen_cxx_compiler_version_string}" CNAME CVER)
|
||||
|
Loading…
x
Reference in New Issue
Block a user