mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Added cross-build check fix in support of https://github.com/Unidata/netcdf-c/issues/753
This commit is contained in:
parent
69a418c27d
commit
2281f3e133
@ -93,7 +93,6 @@ INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
|
|||||||
INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceRuns.cmake)
|
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
|
||||||
INCLUDE(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
|
INCLUDE(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
|
||||||
@ -1207,14 +1206,12 @@ MARK_AS_ADVANCED(ENABLE_SHARED_LIBRARY_VERSION)
|
|||||||
SET(SIGNED_TEST_SOURCE "\n
|
SET(SIGNED_TEST_SOURCE "\n
|
||||||
#include <stdlib.h>\n
|
#include <stdlib.h>\n
|
||||||
int main(void) {\n
|
int main(void) {\n
|
||||||
char is_signed = (char) - 1;\n
|
char error_if_char_is_signed[((char)-1) < 0 ? -1 : 1];\n
|
||||||
if(is_signed < 0)\n
|
error_if_char_is_signed[0] = 0;
|
||||||
return 1;\n
|
return -;\n
|
||||||
else\n
|
|
||||||
return 0;\n
|
|
||||||
}\n")
|
}\n")
|
||||||
|
|
||||||
CHECK_C_SOURCE_RUNS("${SIGNED_TEST_SOURCE}" __CHAR_UNSIGNED__)
|
CHECK_C_SOURCE_COMPILES("${SIGNED_TEST_SOURCE}" __CHAR_UNSIGNED__)
|
||||||
|
|
||||||
# Library include checks
|
# Library include checks
|
||||||
CHECK_INCLUDE_FILE("math.h" HAVE_MATH_H)
|
CHECK_INCLUDE_FILE("math.h" HAVE_MATH_H)
|
||||||
|
Loading…
Reference in New Issue
Block a user