2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-22 03:22:28 +00:00

Add CMake compile testing [ci skip]

This commit is contained in:
Matt Borland
2021-03-27 12:18:32 +03:00
parent c2a1916716
commit 860169d71b
10 changed files with 54 additions and 24 deletions

1
test/CMakeLists.txt Normal file
View File

@@ -0,0 +1 @@
add_subdirectory(compile_test)

View File

@@ -0,0 +1,3 @@
file(GLOB SOURCES "*.cpp")
add_library(compile_tests ${SOURCES})
target_compile_features(compile_tests PRIVATE cxx_std_17)

View File

@@ -15,7 +15,8 @@
void compile_and_link_test()
{
TEST_DIST_FUNC(kolmogorov_smirnov)
// TODO: Fails in standalone tests
//TEST_DIST_FUNC(kolmogorov_smirnov)
}
template class boost::math::kolmogorov_smirnov_distribution<float, boost::math::policies::policy<> >;

View File

@@ -6,5 +6,7 @@
// Basic sanity check that header <boost/math/tools/remez.hpp>
// #includes all the files that it needs to.
//
#include <boost/math/tools/remez.hpp>
#ifndef BOOST_MATH_STANDALONE
#include <boost/math/tools/remez.hpp>
#endif

View File

@@ -6,5 +6,6 @@
// Basic sanity check that header <boost/math/tools/solve.hpp>
// #includes all the files that it needs to.
//
#ifndef BOOST_MATH_STANDALONE
#include <boost/math/tools/solve.hpp>
#endif

View File

@@ -6,6 +6,7 @@
// Basic sanity check that header <boost/math/tools/test_data.hpp>
// #includes all the files that it needs to.
//
#ifndef BOOST_MATH_STANDALONE
#include <boost/math/tools/test_data.hpp>
#define T double
@@ -17,5 +18,4 @@ template boost::math::tools::parameter_info<T> boost::math::tools::make_power_pa
template class boost::math::tools::test_data<T>;
template bool boost::math::tools::get_user_parameter_info<T>(boost::math::tools::parameter_info<T>& info, const char* param_name);
#endif

View File

@@ -7,6 +7,8 @@
// #includes all the files that it needs to.
//
#include <array>
#ifndef BOOST_MATH_STANDALONE
#include <boost/math/tools/test.hpp>
//
// Note this header includes no other headers, this is
@@ -33,4 +35,4 @@ void compile_and_link_test()
(boost::math::tools::test<A, F1, F2>(a, f1, f2));
}
#endif

View File

@@ -6,6 +6,7 @@
// Basic sanity check that header <boost/math/tr1.hpp>
// #includes all the files that it needs to.
//
#ifndef BOOST_MATH_STANDALONE
#include <boost/math/tr1.hpp>
//
// Note this header includes no other headers, this is
@@ -364,3 +365,4 @@ void compile_and_link_test()
check_result<double>(boost::math::tr1::trunc(i));
}
#endif