mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +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 001a57519a)
This commit is contained in:
committed by
Rasmus Munk Larsen
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)
|
||||
|
||||
Reference in New Issue
Block a user