Mercurial > hg > orthanc-databases
comparison Resources/CMake/PostgreSQLConfiguration.cmake @ 174:77a5d1a5ebfd
fix for msvc
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 11 Dec 2020 18:09:40 +0100 |
parents | 30d3f68631d2 |
children | 1b67c6f8037c |
comparison
equal
deleted
inserted
replaced
173:30d3f68631d2 | 174:77a5d1a5ebfd |
---|---|
181 | 181 |
182 if (CMAKE_COMPILER_IS_GNUCXX OR | 182 if (CMAKE_COMPILER_IS_GNUCXX OR |
183 "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") | 183 "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") |
184 set(PG_PRINTF_ATTRIBUTE "gnu_printf") | 184 set(PG_PRINTF_ATTRIBUTE "gnu_printf") |
185 set(pg_restrict "__restrict") | 185 set(pg_restrict "__restrict") |
186 set(restrict "__restrict") | |
186 else() | 187 else() |
187 set(pg_restrict "") | 188 # The empty string below wouldn't work (it would do an #undef) |
188 endif() | 189 set(pg_restrict " ") |
189 | 190 set(restrict " ") |
191 endif() | |
192 | |
193 if (MSVC) | |
194 set(inline "__inline") | |
195 endif() | |
196 | |
190 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") | 197 if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") |
191 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;winsock2.h;ws2tcpip.h") | 198 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;winsock2.h;ws2tcpip.h") |
192 else() | 199 else() |
193 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;sys/socket.h;netdb.h") | 200 set(CMAKE_EXTRA_INCLUDE_FILES "sys/types.h;sys/socket.h;netdb.h") |
194 endif() | 201 endif() |
195 | 202 |
196 check_type_size("struct addrinfo" HAVE_STRUCT_ADDRINFO) | 203 check_type_size("struct addrinfo" HAVE_STRUCT_ADDRINFO) |
197 check_type_size("struct sockaddr_storage" HAVE_STRUCT_SOCKADDR_STORAGE) | 204 check_type_size("struct sockaddr_storage" HAVE_STRUCT_SOCKADDR_STORAGE) |
198 check_struct_has_member("struct sockaddr_storage" ss_family | 205 check_struct_has_member("struct sockaddr_storage" ss_family |
199 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) | 206 "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) |
200 | 207 |