cp %{SOURCE1} .
%build
+# flatbuffers build occasionally fails when using -j${BUILD_THREADS} with an error similar to:
+# /mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:17: error: 'MyGame' has not been declared
+# /mnt/source/flatbuffers/flatbuffers-1.6.0/samples/sample_binary.cpp:19:25: error: 'Sample' is not a namespace-name
+# ...
+# Disabling build tests gets rid of this flakiness and makes the compilation faster.
%{cmake} \
-DFLATBUFFERS_INSTALL=ON \
-DFLATBUFFERS_BUILD_SHAREDLIB=ON \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
+ -DFLATBUFFERS_BUILD_TESTS=OFF \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-DCMAKE_INSTALL_LIBDIR=%{_libdir} \
-DCMAKE_INSTALL_BINDIR=%{_bindir} \
-DCMAKE_BUILD_TYPE=Release .
%{__make} %{?_smp_mflags}
-%check
-make test
-
%install
%{__make} DESTDIR=%{?buildroot:%{buildroot}} install