compiler: gcc: Support versions predating include-fixed/limits.h
GCC versions starting from 4.3.0 until 12.4.0 stored the limits.h header in a directory named include-fixed/ . Before 4.3.0 and after 12.4.0 i.e. from 13.1.0 onward, the header is stored in a directory named include/ . Previously, target.cmake would only detect if the GCC version was 13.1.0 or newer. This patch adds a check to also check if it is older than 4.3.0. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This commit is contained in:
parent
1b399d78fc
commit
46e37b00e7
1 changed files with 2 additions and 1 deletions
|
@ -42,7 +42,8 @@ execute_process(
|
|||
OUTPUT_VARIABLE temp_compiler_version
|
||||
)
|
||||
|
||||
if("${temp_compiler_version}" VERSION_GREATER_EQUAL 13.1.0)
|
||||
if("${temp_compiler_version}" VERSION_LESS 4.3.0 OR
|
||||
"${temp_compiler_version}" VERSION_GREATER_EQUAL 13.1.0)
|
||||
set(fix_header_file include/limits.h)
|
||||
else()
|
||||
set(fix_header_file include-fixed/limits.h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue