Skip to content

Commit 7012e76

Browse files
authored
CMake: Check pointer size at configure time (#2197)
* Check pointer size at configure time * Relax check to warning
1 parent b1c1fa2 commit 7012e76

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,12 @@ if(BUILD_SHARED_LIBS AND WIN32 AND HTTPLIB_COMPILE)
117117
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
118118
endif()
119119

120-
if( CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_SYSTEM_VERSION} VERSION_LESS "10.0.0")
120+
if(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ${CMAKE_SYSTEM_VERSION} VERSION_LESS "10.0.0")
121121
message(SEND_ERROR "Windows ${CMAKE_SYSTEM_VERSION} or lower is not supported. Please use Windows 10 or later.")
122122
endif()
123+
if(CMAKE_SIZEOF_VOID_P LESS 8)
124+
message(WARNING "Pointer size ${CMAKE_SIZEOF_VOID_P} is not supported. Please use a 64-bit compiler.")
125+
endif()
123126

124127
# Set some variables that are used in-tree and while building based on our options
125128
set(HTTPLIB_IS_COMPILED ${HTTPLIB_COMPILE})

0 commit comments

Comments
 (0)