]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cmake: [win32] Update cmake files
authorLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 5 Feb 2020 14:54:16 +0000 (14:54 +0000)
committerLucian Petrut <lpetrut@cloudbasesolutions.com>
Wed, 19 Feb 2020 08:24:21 +0000 (08:24 +0000)
commitd15481f1a50d29b1afd6de7a2e55965a3d1f3c44
treea49fdebb522182e94ae70227419a2bba0b59c67a
parent138f40754afd0fe2e41e0082f26d63b670ec515c
cmake: [win32] Update cmake files

We'll update the cmake files in order to be able to build ceph
components for Windows targets.

Cross compiling using MINGW is the easiest approach for now.
Subsequently, we'll add support for Clang and MSVC.

This patch provides the following changes:
* include winsock2.h, which provides ntohl on Windows
* avoid unsupported compiler flags when using msvc
* add a custom toolchain file for mingw
* update install command for ceph-common in order to work with mingw
* avoid running test sample when cross compiling
* link against the ws_32 lib
* set argeted Windows version
* skip yasm checks when targeting Windows
* allow multiple redefinitions when using mingw, picking the first one.
  this is a workaround for a mingw TLS bug:
  https://sourceforge.net/p/mingw-w64/bugs/816/

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
CMakeLists.txt
cmake/modules/CephChecks.cmake
cmake/toolchains/mingw32.cmake [new file with mode: 0644]
src/CMakeLists.txt