Commit 920d6e9a authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

thrift: fix CMake flags

logs did contain
```
thrift> --     Build shared libraries:                   OFF
```

And upstream README in lib/cpp says:
```
THRIFT-4732:
The CMake build options WITH_SHARED_LIBS and WITH_STATIC_LIBS are deprecated.
The project no longer performs a side-by-side static and shared build; you
tell CMake through BUILD_SHARED_LIBS whether to make shared or static
libraries now.  This is CMake standard behavior.
```
parent 6745d72d
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -64,16 +64,14 @@ stdenv.mkDerivation (finalAttrs: {
  '';

  cmakeFlags = [
    "-DBUILD_JAVASCRIPT:BOOL=OFF"
    "-DBUILD_NODEJS:BOOL=OFF"
    (lib.cmakeBool "BUILD_JAVASCRIPT" false)
    (lib.cmakeBool "BUILD_NODEJS" false)
    (lib.cmakeBool "BUILD_SHARED_LIBS" (!static))
    (lib.cmakeBool "OPENSSL_USE_STATIC_LIBS" static)

    # FIXME: Fails to link in static mode with undefined reference to
    # `boost::unit_test::unit_test_main(bool (*)(), int, char**)'
    "-DBUILD_TESTING:BOOL=${if static then "OFF" else "ON"}"
  ]
  ++ lib.optionals static [
    "-DWITH_STATIC_LIB:BOOL=ON"
    "-DOPENSSL_USE_STATIC_LIBS=ON"
    (lib.cmakeBool "BUILD_TESTING" (!static))
  ];

  doCheck = !static;