Fix non-openmp build. (#5566)

* Add test to Jenkins.
* Fix threading utils tests.
* Require thread library.
This commit is contained in:
Jiaming Yuan
2020-04-20 12:16:38 +08:00
committed by GitHub
parent b2827a80e1
commit ccd30e4491
9 changed files with 52 additions and 24 deletions

View File

@@ -301,9 +301,12 @@ std::unique_ptr<DMatrix> CreateSparsePageDMatrix(
batch_count++;
row_count += batch.Size();
}
#if defined(_OPENMP)
EXPECT_GE(batch_count, 2);
EXPECT_EQ(row_count, dmat->Info().num_row_);
#else
#warning "External memory doesn't work with Non-OpenMP build "
#endif // defined(_OPENMP)
return dmat;
}