From 661dd91603397fe1b180ad83e29e809cfe4b9f2f Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 13 Nov 2019 20:38:10 -0500 Subject: [PATCH 01/10] Added explicit test with the alias 'test_iso' to run tests for macro expansion for the various C++ standards. --- test/Jamfile.v2 | 5 + test/cpp_standard.cpp | 545 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 550 insertions(+) create mode 100644 test/cpp_standard.cpp diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index fbda6c0..445a8e1 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -262,3 +262,8 @@ alias test_clang_cuda ; explicit test_clang_cuda ; + +alias test_iso + : + [ run cpp_standard.cpp ] + ; diff --git a/test/cpp_standard.cpp b/test/cpp_standard.cpp new file mode 100644 index 0000000..8b926ba --- /dev/null +++ b/test/cpp_standard.cpp @@ -0,0 +1,545 @@ +#include +#include +#include +#include + +static unsigned int indent = 4; +static unsigned int width = 90; + +using std::cout; +using std::istream; + +void print_separator() +{ + std::cout << +"\n\n*********************************************************************\n\n"; +} + +std::string remove_spaces(const std::string ss) + { + + bool inquotes(false); + bool escape(false); + char qchar; + int len(static_cast(ss.length())); + + std::string ret; + + for (int i = 0; i < len; ++i) + { + + char ch(ss[i]); + + if (inquotes) + { + if (escape) + { + escape = false; + } + else if (ch == '\\') + { + escape = true; + } + else if (ch == qchar) + { + inquotes = false; + } + ret.push_back(ch); + } + else + { + if (ch == '\'' || ch == '"') + { + inquotes = true; + qchar = ch; + ret.push_back(ch); + } + else if (ch != ' ') + { + ret.push_back(ch); + } + } + } + + return ret; + } + +int print_macro(const std::string name,const std::string expected, const std::string expansion) +{ + int bret(0); + const std::string sg("Success: "); + const std::string sb("Failure: "); + for(unsigned i = 0; i < indent; ++i) std::cout.put(' '); + if (name == expansion) + { + if (expected == expansion) + { + std::cout << sg; + std::cout << std::setw(width); + cout.setf(istream::left, istream::adjustfield); + std::cout << name; + std::cout << " [no value]\n"; + } + else + { + std::cout << sb; + std::cout << std::setw(width); + cout.setf(istream::left, istream::adjustfield); + std::cout << name; + std::cout << " [no value]: "; + std::cout << " [expected]: "; + std::cout << expected << "\n"; + bret = 1; + } + } + else + { + + std::string sexpected(remove_spaces(expected)); + std::string sexpansion(remove_spaces(expansion)); + + if (sexpected == sexpansion) + { + std::cout << sg; + std::cout << std::setw(width); + cout.setf(istream::left, istream::adjustfield); + std::cout << name; + std::cout << expansion << "\n"; + } + else + { + std::cout << sb; + std::cout << std::setw(width); + cout.setf(istream::left, istream::adjustfield); + std::cout << name; + std::cout << expansion; + std::cout << " [expected]: "; + std::cout << expected << "\n"; + bret = 1; + } + } + return bret; +} + +#if !BOOST_PP_VARIADICS + +#define STRINGIZE(arg) # arg + +#define PRINT_MACRO_RESULTS(X,exp) print_macro(std::string(# X), std::string(# exp), std::string(STRINGIZE(X))) +#define PRINT_MACRO(x) std::string(# x) +#define PRINT_EXPECTED(x) std::string(# x) +#define PRINT_EXPANSION(x) std::string(STRINGIZE(x)) + +#else + +#define STRINGIZE(...) # __VA_ARGS__ + +#define PRINT_MACRO_RESULTS(X,...) print_macro(std::string(# X), std::string(# __VA_ARGS__), std::string(STRINGIZE(X))) +#define PRINT_MACRO(...) std::string(# __VA_ARGS__) +#define PRINT_EXPECTED(...) std::string(# __VA_ARGS__) +#define PRINT_EXPANSION(...) std::string(STRINGIZE(__VA_ARGS__)) + +#endif + +#if __cplusplus > 201703L + +int print_macros_common_c20() +{ + + int bret = 0; + +#define LPAREN() ( +#define G(Q) 42 +#define F(R, X, ...) __VA_OPT__(G R X) ) + +// int x = F(LPAREN(), 0, <:-); + +// replaced by + +// int x = 42; + +bret += PRINT_MACRO_RESULTS(int x = F(LPAREN(), 0, <:-);,int x = 42;); + +#undef LPAREN +#undef G +#undef F + +#define F(...) f(0 __VA_OPT__(,) __VA_ARGS__) +#define G(X, ...) f(0, X __VA_OPT__(,) __VA_ARGS__) +#define SDEF(sname, ...) S sname __VA_OPT__(= { __VA_ARGS__ }) +#define EMP + +// F(a, b, c) +// F() +// F(EMP) + +// replaced by + +// f(0, a, b, c) +// f(0) +// f(0) + +// G(a, b, c) +// G(a, ) +// G(a) + +// replaced by + +// f(0, a, b, c) +// f(0, a) +// f(0, a) + +// SDEF(foo); +// SDEF(bar, 1, 2); + +// replaced by + +// S foo; +// S bar = { 1, 2 }; + +bret += PRINT_MACRO_RESULTS(F(a, b, c),f(0, a, b, c)); +bret += PRINT_MACRO_RESULTS(F(),f(0)); +bret += PRINT_MACRO_RESULTS(F(EMP),f(0)); +bret += PRINT_MACRO_RESULTS(G(a, b, c),f(0, a, b, c)); +bret += PRINT_MACRO_RESULTS(G(a, ),f(0, a)); +bret += PRINT_MACRO_RESULTS(G(a),f(0, a)); +bret += PRINT_MACRO_RESULTS(SDEF(foo);,S foo;); +bret += PRINT_MACRO_RESULTS(SDEF(bar, 1, 2);,S bar = { 1, 2 };); + +#undef F +#undef G +#undef SDEF +#undef EMP + +#define H2(X, Y, ...) __VA_OPT__(X ## Y,) __VA_ARGS__ +#define H3(X, ...) #__VA_OPT__(X##X X##X) +#define H4(X, ...) __VA_OPT__(a X ## X) ## b +#define H5A(...) __VA_OPT__()/**/__VA_OPT__() +#define H5B(X) a ## X ## b +#define H5C(X) H5B(X) + +// H2(a, b, c, d) + +// replaced by + +// ab, c, d + +// H3(, 0) + +// replaced by + +// "" + +// H4(, 1) + +// replaced by + +// a b + +// H5C(H5A()) + +// replaced by + +// ab + +bret += PRINT_MACRO_RESULTS(H2(a, b, c, d),ab, c, d); +bret += PRINT_MACRO_RESULTS(H3(, 0),""); +bret += PRINT_MACRO_RESULTS(H4(, 1),a b); +bret += PRINT_MACRO_RESULTS(H5C(H5A()),ab); + +#undef H2 +#undef H3 +#undef H4 +#undef H5A +#undef H5B +#undef H5C + + return bret; + +} + +#endif + +int print_macros_common_1() +{ + + int bret = 0; + +#define x 3 +#define f(a) f(x * (a)) +#undef x + +#define x 2 +#define g f +#define z z[0] +#define h g(~ +#define m(a) a(w) +#define w 0,1 +#define t(a) a + +// f(y+1) + f(f(z)) % t(t(g)(0) + t)(1); +// g(x+(3,4)-w) | h 5) & m(f)^m(m); + +// results in + +// f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1); +// f(2 * (2+(3,4)-0,1)) | f(2 * ( ~ 5)) & f(2 * (0,1))^m(0,1); + +bret += PRINT_MACRO_RESULTS(f(y+1) + f(f(z)) % t(t(g)(0) + t)(1);,f(2 * (y+1)) + f(2 * (f(2 * (z[0])))) % f(2 * (0)) + t(1);); + +#define PRINT_INPUT g(x+(3,4)-w) | h 5) & m(f)^m(m); + +bret += print_macro + ( + std::string("g(x+(3,4)-w) | h 5) & m(f)^m(m);"), + PRINT_EXPECTED(f(2 * (2+(3,4)-0,1)) | f(2 * ( ~ 5)) & f(2 * (0,1))^m(0,1);), + PRINT_EXPANSION(PRINT_INPUT) + ); + +#undef PRINT_INPUT + +#undef f +#undef x +#undef g +#undef z +#undef h +#undef m +#undef w +#undef t + + return bret; + +} + +int print_macros_common_4() +{ + + int bret = 0; + +#define str(s) # s +#define xstr(s) str(s) +#define debug(s, t) printf("x" # s "= %d, x" # t "= %s", x ## s, x ## t) +#define INCFILE(n) vers ## n +#define glue(a, b) a ## b +#define xglue(a, b) glue(a, b) +#define HIGHLOW "hello" +#define LOW LOW ", world" + +// debug(1, 2); +// fputs(str(strncmp("abc\0d", "abc", ’\4’) // this goes away +// == 0) str(: @\n), s); +// #include xstr(INCFILE(2).h) +// glue(HIGH, LOW); +// xglue(HIGH, LOW) + +// results in + +// printf("x" "1" "= %d, x" "2" "= %s", x1, x2); +// fputs("strncmp(\"abc\\0d\", \"abc\", ’\\4’) == 0" ": @\n", s); +// #include "vers2.h" (after macro replacement, before file access) +// "hello"; +// "hello" ", world" + +bret += PRINT_MACRO_RESULTS(debug(1, 2);,printf("x" "1" "= %d, x" "2" "= %s", x1, x2);); +bret += print_macro + ( + std::string("fputs(str(strncmp(\"abc\\0d\", \"abc\", '\\4') /* this goes away */== 0) str(: @\\n), s);"), + PRINT_EXPECTED(fputs("strncmp(\"abc\\0d\", \"abc\", '\\4') == 0" ": @\n", s);), + PRINT_EXPANSION(fputs(str(strncmp("abc\0d", "abc", '\4') /* this goes away */== 0) str(: @\n), s);) + ); +bret += PRINT_MACRO_RESULTS(xstr(INCFILE(2).h),"vers2.h"); +bret += PRINT_MACRO_RESULTS(glue(HIGH, LOW);,"hello";); + +#if __cplusplus <= 199711L + +bret += print_macro + ( + PRINT_MACRO(xglue(HIGH, LOW)), + std::string("\"hello\" \", world\""), + PRINT_EXPANSION(xglue(HIGH, LOW)) + ); + +#else + +bret += PRINT_MACRO_RESULTS(xglue(HIGH, LOW),"hello" ", world"); + +#endif + +#undef str +#undef xstr +#undef debug +#undef INCFILE +#undef glue +#undef xglue +#undef HIGHLOW +#undef LOW + + return bret; + +} + +#if BOOST_PP_VARIADICS || __cplusplus > 199711L + +int print_macros_common_2() +{ + + int bret = 0; + +#define hash_hash # ## # +#define mkstr(a) # a +#define in_between(a) mkstr(a) +#define join(c, d) in_between(c hash_hash d) + +// char p[] = join(x, y); + +// equivalent to + +// char p[] = "x ## y"; + +bret += PRINT_MACRO_RESULTS(char p[] = join(x, y);,char p[] = "x ## y";); + +#undef hash_hash +#undef mkstr +#undef in_between +#undef join + + return bret; + +} + +int print_macros_common_3() +{ + + int bret = 0; + +#define p() int +#define q(x) x +#define r(x,y) x ## y +#define str(x) # x + +// p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) }; +// char c[2][6] = { str(hello), str() }; + +// results in + +// int i[] = { 1, 23, 4, 5, }; +// char c[2][6] = { "hello", "" }; + +bret += print_macro + ( + PRINT_MACRO(p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };), + PRINT_EXPECTED(int i[] = { 1, 23, 4, 5, };), + PRINT_EXPANSION(p() i[q()] = { q(1), r(2,3), r(4,), r(,5), r(,) };) + ); +bret += print_macro + ( + PRINT_MACRO(char c[2][6] = { str(hello), str() };), + PRINT_EXPECTED(char c[2][6] = { "hello", "" };), + PRINT_EXPANSION(char c[2][6] = { str(hello), str() };) + ); + +#undef p +#undef q +#undef r +#undef str + +bret += print_macros_common_4(); + +#define t(x,y,z) x ## y ## z + +// int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) }; + +// results in + +// int j[] = { 123, 45, 67, 89, 10, 11, 12, }; + +bret += print_macro + ( + PRINT_MACRO(int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) };), + PRINT_EXPECTED(int j[] = { 123, 45, 67, 89, 10, 11, 12, };), + PRINT_EXPANSION(int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) };) + ); + +#undef t + +#define debug(...) fprintf(stderr, __VA_ARGS__) +#define showlist(...) puts(#__VA_ARGS__) +#define report(test, ...) ((test) ? puts(#test) : printf(__VA_ARGS__)) + +// debug("Flag"); +// debug("X = %d\n", x); +// showlist(The first, second, and third items.); +// report(x>y, "x is %d but y is %d", x, y); + +// results in + +// fprintf(stderr, "Flag"); +// fprintf(stderr, "X = %d\n", x); +// puts("The first, second, and third items."); +// ((x>y) ? puts("x>y") : printf("x is %d but y is %d", x, y)); + +#define save_stderr stderr +#undef stderr + +bret += PRINT_MACRO_RESULTS(debug("Flag");,fprintf(stderr, "Flag");); +bret += PRINT_MACRO_RESULTS(debug("X = %d\n", x);,fprintf(stderr, "X = %d\n", x);); + +#define stderr save_stderr + +bret += PRINT_MACRO_RESULTS(showlist(The first, second, and third items.);,puts("The first, second, and third items.");); +bret += PRINT_MACRO_RESULTS(report(x>y, "x is %d but y is %d", x, y);,((x>y) ? puts("x>y") : printf("x is %d but y is %d", x, y));); + +#undef debug +#undef showlist +#undef report + + return bret; + +} + +#endif + +int print_macros() +{ + int bret = 0; + + print_separator(); + + std::cout << "__cplusplus = " << __cplusplus; + + print_separator(); + +#define OBJ_LIKE (1-1) +#define OBJ_LIKE /* white space */ (1-1) /* other */ +#define FTN_LIKE(a) ( a ) +#define FTN_LIKE( a )( /* note the white space */ a /* other stuff on this line */ ) + +#if __cplusplus <= 199711L && !BOOST_PP_VARIADICS + +bret += print_macros_common_1(); +bret += print_macros_common_4(); + +#elif __cplusplus <= 201703L + +bret += print_macros_common_2(); +bret += print_macros_common_1(); +bret += print_macros_common_3(); + +#else + +bret += print_macros_common_c20(); +bret += print_macros_common_2(); +bret += print_macros_common_1(); +bret += print_macros_common_3(); + +#endif + + print_separator(); + + return bret; +} + +int main() +{ + return (print_macros()); +} From da60e76913d1d9eb327152ad1c6b4147cf3ca335 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 13 Nov 2019 20:45:02 -0500 Subject: [PATCH 02/10] Added 'explicit' for test_iso. --- test/Jamfile.v2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 445a8e1..cba56b7 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -267,3 +267,5 @@ alias test_iso : [ run cpp_standard.cpp ] ; + +explicit test_iso ; From bd0db5ce8b7bee650635304c49382bf7529c363d Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 14 Dec 2019 12:45:02 -0500 Subject: [PATCH 03/10] Changed __CUDACC__ to __NVCC__ as other compilers do define __CUDACC__ when compiling CUDA files. --- include/boost/preprocessor/config/config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/preprocessor/config/config.hpp b/include/boost/preprocessor/config/config.hpp index 7abaaf0..30d6411 100644 --- a/include/boost/preprocessor/config/config.hpp +++ b/include/boost/preprocessor/config/config.hpp @@ -80,7 +80,7 @@ # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || (defined __CUDACC__ && !(defined(__clang__) && defined(__CUDA__))) || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || (defined __HP_aCC && !defined __EDG__) || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__)) +# if defined __GCCXML__ || defined __NVCC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || (defined __HP_aCC && !defined __EDG__) || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__)) # define BOOST_PP_VARIADICS 0 # elif defined(_MSC_VER) && defined(__clang__) # define BOOST_PP_VARIADICS 1 @@ -103,7 +103,7 @@ # elif !BOOST_PP_VARIADICS + 1 < 2 # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 1 -# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL) +# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __NVCC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL) # undef BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADICS_MSVC 1 # endif From 688c3f2ee69a99c96b18ccdebaf39c48a0b323fe Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Sat, 14 Dec 2019 13:20:45 -0500 Subject: [PATCH 04/10] Turn off variadic macro support by default for nvcc only when compiling CUDA files. --- include/boost/preprocessor/config/config.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/preprocessor/config/config.hpp b/include/boost/preprocessor/config/config.hpp index 30d6411..78b3f2a 100644 --- a/include/boost/preprocessor/config/config.hpp +++ b/include/boost/preprocessor/config/config.hpp @@ -80,7 +80,7 @@ # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ -# if defined __GCCXML__ || defined __NVCC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || (defined __HP_aCC && !defined __EDG__) || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__)) +# if defined __GCCXML__ || (defined __NVCC__ && defined __CUDACC__) || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || (defined __HP_aCC && !defined __EDG__) || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__)) # define BOOST_PP_VARIADICS 0 # elif defined(_MSC_VER) && defined(__clang__) # define BOOST_PP_VARIADICS 1 @@ -103,7 +103,7 @@ # elif !BOOST_PP_VARIADICS + 1 < 2 # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 1 -# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __NVCC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL) +# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || (defined __NVCC__ && defined __CUDACC__) || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL) # undef BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADICS_MSVC 1 # endif From 1ab9385a91b3865c2753926ab5049c47aabe5baf Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 5 Jan 2020 04:32:16 +0200 Subject: [PATCH 05/10] Add CMake install support, tests --- .travis.yml | 311 +++++++++++++++++++++++-- CMakeLists.txt | 19 +- test/CMakeLists.txt | 33 ++- test/Jamfile.v2 | 26 ++- test/cmake_install_test/CMakeLists.txt | 17 ++ test/cmake_subdir_test/CMakeLists.txt | 17 ++ test/quick.cpp | 39 ++++ 7 files changed, 419 insertions(+), 43 deletions(-) create mode 100644 test/cmake_install_test/CMakeLists.txt create mode 100644 test/cmake_subdir_test/CMakeLists.txt create mode 100644 test/quick.cpp diff --git a/.travis.yml b/.travis.yml index cda9b52..797ef32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,49 +1,322 @@ -# Copyright 2016 Edward Diener +# Copyright 2016-2019 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) language: cpp -sudo: false - -python: "2.7" - -os: - - linux - - osx +dist: xenial branches: only: - master - develop + - /feature\/.*/ + +env: + matrix: + - BOGUS_JOB=true matrix: + + exclude: + - env: BOGUS_JOB=true + include: - - install: true + - os: linux + compiler: g++ + env: TOOLSET=gcc COMPILER=g++ CXXSTD=03,11 + + - os: linux + compiler: g++-4.4 + env: TOOLSET=gcc COMPILER=g++-4.4 CXXSTD=98 + addons: + apt: + packages: + - g++-4.4 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-4.6 + env: TOOLSET=gcc COMPILER=g++-4.6 CXXSTD=03,0x + addons: + apt: + packages: + - g++-4.6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-4.7 + env: TOOLSET=gcc COMPILER=g++-4.7 CXXSTD=03,11 + addons: + apt: + packages: + - g++-4.7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-4.8 + env: TOOLSET=gcc COMPILER=g++-4.8 CXXSTD=03,11 + addons: + apt: + packages: + - g++-4.8 + sources: + - ubuntu-toolchain-r-test + - os: linux + compiler: g++-4.9 + env: TOOLSET=gcc COMPILER=g++-4.9 CXXSTD=03,11 + addons: + apt: + packages: + - g++-4.9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-5 + env: TOOLSET=gcc COMPILER=g++-5 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - g++-5 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-6 + env: TOOLSET=gcc COMPILER=g++-6 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - g++-6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + dist: trusty + compiler: g++-7 + env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 + addons: + apt: + packages: + - g++-7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-8 + env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a + addons: + apt: + packages: + - g++-8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: g++-9 + env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a + addons: + apt: + packages: + - g++-9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++ + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 + + - os: linux + dist: trusty + compiler: /usr/bin/clang++ + env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11 + addons: + apt: + packages: + - clang-3.3 + + - os: linux + dist: trusty + compiler: /usr/bin/clang++ + env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11 + addons: + apt: + packages: + - clang-3.4 + + - os: linux + compiler: clang++-3.5 + env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-3.5 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.6 + env: TOOLSET=clang COMPILER=clang++-3.6 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-3.6 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.7 + env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-3.7 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.8 + env: TOOLSET=clang COMPILER=clang++-3.8 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-3.8 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-3.9 + env: TOOLSET=clang COMPILER=clang++-3.9 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-3.9 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-4.0 + env: TOOLSET=clang COMPILER=clang++-4.0 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-4.0 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-5.0 + env: TOOLSET=clang COMPILER=clang++-5.0 CXXSTD=03,11,14,1z + addons: + apt: + packages: + - clang-5.0 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-6.0 + env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a + addons: + apt: + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + + - os: linux + compiler: clang++-7 + env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a + addons: + apt: + packages: + - clang-7 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-7 + + - os: linux + compiler: clang++-8 + env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a + addons: + apt: + packages: + - clang-8 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-xenial-8 + + - os: linux + compiler: clang++-9 + env: TOOLSET=clang COMPILER=clang++-9 CXXSTD=03,11,14,17,2a + addons: + apt: + packages: + - clang-9 + sources: + - ubuntu-toolchain-r-test + - sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' + key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' + + - os: linux + dist: trusty + compiler: clang++-libc++ + env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z + addons: + apt: + packages: + - libc++-dev + + - os: osx + compiler: clang++ + env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11,14,1z + + - os: linux + env: CMAKE_TEST=1 script: - mkdir __build__ && cd __build__ - - cmake ../test - - cmake --build . + - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor .. + - ctest --output-on-failure -R boost_preprocessor + - os: linux + env: CMAKE_SUBDIR_TEST=1 + install: true + script: + - cd test/cmake_subdir_test && mkdir __build__ && cd __build__ + - cmake .. + - cmake --build . + - cmake --build . --target check + + - os: linux + env: CMAKE_INSTALL_TEST=1 + script: + - mkdir __build__ && cd __build__ + - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor -DCMAKE_INSTALL_PREFIX=~/.local .. + - cmake --build . --target install + - cd ../libs/preprocessor/test/cmake_install_test && mkdir __build__ && cd __build__ + - cmake -DCMAKE_INSTALL_PREFIX=~/.local .. + - cmake --build . + - cmake --build . --target check install: + - BOOST_BRANCH=develop && [ "$TRAVIS_BRANCH" == "master" ] && BOOST_BRANCH=master || true - cd .. - - git clone -b $TRAVIS_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root + - git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - - git submodule update --init tools/build - - git submodule update --init libs/config - git submodule update --init tools/boostdep - - git submodule update --init tools/boost_install - - git submodule update --init libs/headers - cp -r $TRAVIS_BUILD_DIR/* libs/preprocessor - python tools/boostdep/depinst/depinst.py preprocessor - ./bootstrap.sh - ./b2 headers script: - - TOOLSET=gcc,clang - - if [ $TRAVIS_OS_NAME == osx ]; then TOOLSET=clang; fi - - ./b2 libs/preprocessor/test toolset=$TOOLSET + - |- + echo "using $TOOLSET : : $COMPILER ;" > ~/user-config.jam + - ./b2 -j 3 libs/preprocessor/test toolset=$TOOLSET cxxstd=$CXXSTD notifications: email: diff --git a/CMakeLists.txt b/CMakeLists.txt index c0f41f9..0d24bb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,25 @@ -# Copyright 2018 Mike Dev +# Copyright 2019 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt -cmake_minimum_required(VERSION 3.5) -project(BoostPreprocessor LANGUAGES CXX) +cmake_minimum_required(VERSION 3.5...3.16) + +project(boost_preprocessor VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) add_library(boost_preprocessor INTERFACE) add_library(Boost::preprocessor ALIAS boost_preprocessor) target_include_directories(boost_preprocessor INTERFACE include) +if(BOOST_SUPERPROJECT_VERSION) + + include(BoostInstall) + boost_install(TARGETS boost_preprocessor HEADER_DIRECTORY include/) + +endif() + +if(BUILD_TESTING) + + add_subdirectory(test) + +endif() diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b56c870..f1028ba 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,16 +1,31 @@ -# Copyright 2018 Mike Dev +# Copyright 2018, 2019 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt -# -# NOTE: This does NOT run the unit tests for Boost.Preprocessor (yet). -# It only tests, if the CMakeLists.txt file works as expected -cmake_minimum_required( VERSION 3.5 ) +include(BoostTest OPTIONAL RESULT_VARIABLE HAVE_BOOST_TEST) -project( BoostPreprocessorCMakeSelfTest ) +if(NOT HAVE_BOOST_TEST) + return() +endif() -add_subdirectory( .. ${CMAKE_CURRENT_BINARY_DIR}/boost_preprocessor ) +set(tests_common arithmetic array comparison control debug facilities list logical punctuation selection seq slot stringize tuple variadic isempty) +set(tests_c ${tests_common}) +set(tests_cpp ${tests_common} iteration repetition quick) -add_executable( boost_preprocessor_cmake_self_test config_info.cpp ) -target_link_libraries( boost_preprocessor_cmake_self_test Boost::preprocessor ) +set(BOOST_TEST_LINK_LIBRARIES Boost::preprocessor) +include_directories(../../..) # for `include ` to work + +foreach(test IN LISTS tests_c) + + boost_test(TYPE compile SOURCES ${test}.c) + boost_test(TYPE compile NAME ${test}_c_nvm SOURCES ${test}.c COMPILE_DEFINITIONS BOOST_PP_VARIADICS=0) + +endforeach() + +foreach(test IN LISTS tests_cpp) + + boost_test(TYPE compile SOURCES ${test}.cpp) + boost_test(TYPE compile NAME ${test}_cpp_nvm SOURCES ${test}.cpp COMPILE_DEFINITIONS BOOST_PP_VARIADICS=0) + +endforeach() diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index cba56b7..0780b5f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -22,17 +22,17 @@ alias preprocessor : : gcc 3.4 ; - + alias preprocessor : : gcc 4.1 ; - + alias preprocessor : : gcc 4.2 ; - + alias preprocessor : [ compile arithmetic.cpp ] @@ -192,22 +192,22 @@ alias preprocessor_c_nvm : tuple_c_nvm ] ; - + alias preprocessor_isempty : : gcc 3.4 ; - + alias preprocessor_isempty : : gcc 4.1 ; - + alias preprocessor_isempty : : gcc 4.2 ; - + alias preprocessor_isempty : [ compile isempty.cpp ] @@ -216,12 +216,12 @@ alias preprocessor_isempty [ compile-fail isempty_variadic_standard_failure2.cpp : BOOST_PP_VARIADICS=1 ] [ compile vaopt.cpp ] ; - + alias preprocessor_isempty_nvm : [ compile isempty.cpp : BOOST_PP_VARIADICS=0 : isempty_nvm ] ; - + alias preprocessor_isempty_c : [ compile isempty.c @@ -237,7 +237,7 @@ alias preprocessor_isempty_c : isempty_variadic_standard_failure2_c ] ; - + alias preprocessor_isempty_c_nvm : [ compile isempty.c @@ -250,7 +250,7 @@ alias preprocessor_config : [ run config_info.cpp ] ; - + alias test_clang_cuda : [ compile [ cast _ cpp : clang_cuda.cu ] @@ -267,5 +267,7 @@ alias test_iso : [ run cpp_standard.cpp ] ; - + explicit test_iso ; + +compile quick.cpp ; # "Quick" test (for CI) diff --git a/test/cmake_install_test/CMakeLists.txt b/test/cmake_install_test/CMakeLists.txt new file mode 100644 index 0000000..7c788bc --- /dev/null +++ b/test/cmake_install_test/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt + +cmake_minimum_required(VERSION 3.5...3.16) + +project(cmake_install_test LANGUAGES CXX) + +find_package(boost_preprocessor REQUIRED) + +add_executable(quick ../quick.cpp) +target_link_libraries(quick Boost::preprocessor) + +enable_testing() +add_test(quick quick) + +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) diff --git a/test/cmake_subdir_test/CMakeLists.txt b/test/cmake_subdir_test/CMakeLists.txt new file mode 100644 index 0000000..1181e4a --- /dev/null +++ b/test/cmake_subdir_test/CMakeLists.txt @@ -0,0 +1,17 @@ +# Copyright 2018, 2019 Peter Dimov +# Distributed under the Boost Software License, Version 1.0. +# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt + +cmake_minimum_required(VERSION 3.5...3.16) + +project(cmake_subdir_test LANGUAGES CXX) + +add_subdirectory(../.. boostorg/preprocessor) + +add_executable(quick ../quick.cpp) +target_link_libraries(quick Boost::preprocessor) + +enable_testing() +add_test(quick quick) + +add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure -C $) diff --git a/test/quick.cpp b/test/quick.cpp new file mode 100644 index 0000000..1eaac11 --- /dev/null +++ b/test/quick.cpp @@ -0,0 +1,39 @@ +// Copyright 2002 Paul Mensonides +// Copyright 2019 Peter Dimov +// Distributed under the Boost Software License, Version 1.0. +// https://www.boost.org/LICENSE_1_0.txt + +#include +#include "test_macro.h" + +/* equality */ + +BEGIN BOOST_PP_EQUAL(2, 0) == 0 END +BEGIN BOOST_PP_EQUAL(2, 2) == 1 END + +/* inequality */ + +BEGIN BOOST_PP_NOT_EQUAL(2, 0) == 1 END +BEGIN BOOST_PP_NOT_EQUAL(2, 2) == 0 END + +/* less */ + +BEGIN BOOST_PP_LESS(2, 1) == 0 END +BEGIN BOOST_PP_LESS(1, 2) == 1 END + +/* less_equal */ + +BEGIN BOOST_PP_LESS_EQUAL(2, 1) == 0 END +BEGIN BOOST_PP_LESS_EQUAL(1, 2) == 1 END +BEGIN BOOST_PP_LESS_EQUAL(2, 2) == 1 END + +/* greater */ + +BEGIN BOOST_PP_GREATER(2, 1) == 1 END +BEGIN BOOST_PP_GREATER(1, 2) == 0 END + +/* greater_equal */ + +BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END +BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END +BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END From 728c71ba753dc4e691a4a8f6a42e15df5a6c5ea3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 5 Jan 2020 05:07:08 +0200 Subject: [PATCH 06/10] Enable C in test/CMakeLists.txt; add `int main() {}` to quick.cpp --- test/CMakeLists.txt | 2 ++ test/quick.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f1028ba..aba5bf5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -8,6 +8,8 @@ if(NOT HAVE_BOOST_TEST) return() endif() +enable_language(C) + set(tests_common arithmetic array comparison control debug facilities list logical punctuation selection seq slot stringize tuple variadic isempty) set(tests_c ${tests_common}) set(tests_cpp ${tests_common} iteration repetition quick) diff --git a/test/quick.cpp b/test/quick.cpp index 1eaac11..73372a3 100644 --- a/test/quick.cpp +++ b/test/quick.cpp @@ -37,3 +37,7 @@ BEGIN BOOST_PP_GREATER(1, 2) == 0 END BEGIN BOOST_PP_GREATER_EQUAL(2, 1) == 1 END BEGIN BOOST_PP_GREATER_EQUAL(1, 2) == 0 END BEGIN BOOST_PP_GREATER_EQUAL(2, 2) == 1 END + +int main() +{ +} From 6c350c6fc3eff8f942faebb48f83cacd14ae1ce3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 5 Jan 2020 06:46:08 +0200 Subject: [PATCH 07/10] Update appveyor.yml --- appveyor.yml | 72 ++++++++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b43326f..878a552 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,5 +1,6 @@ # Copyright 2017 Edward Diener # Copyright 2018 Mike Dev +# Copyright 2019 Peter Dimov # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt) @@ -8,13 +9,16 @@ version: 1.0.{build}-{branch} shallow_clone: true configuration: - - boost_test - - cmake_self_test + - boost_build_test + - cmake_test + - cmake_subdir_test + - cmake_install_test branches: only: - master - develop + - /feature\/.*/ environment: matrix: @@ -22,41 +26,61 @@ environment: TOOLSET: msvc-9.0,msvc-10.0,msvc-11.0,msvc-12.0,msvc-14.0 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 TOOLSET: msvc-14.1 + - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + TOOLSET: msvc-14.2 build: off +install: + - cd .. + - git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root + - cd boost-root + - git submodule update --init tools/boostdep + - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor\ + - python tools/boostdep/depinst/depinst.py preprocessor + - bootstrap + - b2 headers + for: - matrix: only: - - configuration: cmake_self_test + - configuration: boost_build_test test_script: - - mkdir __build__ - - cd __build__ - - cmake ../test - - cmake --build . + - b2 -j3 libs/preprocessor/test toolset=%TOOLSET% - matrix: only: - - configuration: boost_test - - install: - - cd .. - - git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root - - cd boost-root - - git submodule update --init tools/build - - git submodule update --init libs/config - - git submodule update --init tools/boostdep - - git submodule update --init tools/boost_install - - git submodule update --init libs/headers - - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor - - python tools/boostdep/depinst/depinst.py preprocessor - - bootstrap - - b2 headers + - configuration: cmake_test test_script: - - b2 libs/preprocessor/test toolset=%TOOLSET% - - cd ../preprocessor/test + - mkdir __build__ && cd __build__ + - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor .. + - ctest --output-on-failure -R boost_preprocessor -C Debug +- + matrix: + only: + - configuration: cmake_subdir_test + + test_script: + - cd libs/preprocessor/test/cmake_subdir_test && mkdir __build__ && cd __build__ + - cmake .. + - cmake --build . + - cmake --build . --target check + +- + matrix: + only: + - configuration: cmake_install_test + + test_script: + - mkdir __build__ && cd __build__ + - cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES=preprocessor -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + - cmake --build . --target install + - cd ../libs/preprocessor/test/cmake_install_test && mkdir __build__ && cd __build__ + - cmake -DCMAKE_INSTALL_PREFIX=C:/cmake-prefix .. + - cmake --build . + - cmake --build . --target check From 0332a793f5f037ab7982172debaa364325d66c72 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 5 Jan 2020 06:48:21 +0200 Subject: [PATCH 08/10] Fix Appveyor branch handling --- appveyor.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 878a552..440cb33 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,14 +32,16 @@ environment: build: off install: + - set BOOST_BRANCH=develop + - if "%APPVEYOR_REPO_BRANCH%" == "master" set BOOST_BRANCH=master - cd .. - - git clone -b %APPVEYOR_REPO_BRANCH% https://github.com/boostorg/boost.git boost-root + - git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root - cd boost-root - git submodule update --init tools/boostdep - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor\ - python tools/boostdep/depinst/depinst.py preprocessor - bootstrap - - b2 headers + - b2 -d0 headers for: - From a378d239da0061eb4fbe6f7639e3a55fe80b35c8 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sun, 5 Jan 2020 07:19:59 +0200 Subject: [PATCH 09/10] Disable the Appveyor cmake_test configuration on 2015/2017 as it's too slow; only bootstrap b2 in the boost_build_test configuration --- appveyor.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 440cb33..6121335 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -29,6 +29,13 @@ environment: - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 TOOLSET: msvc-14.2 +matrix: + exclude: + - configuration: cmake_test + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 + - configuration: cmake_test + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + build: off install: @@ -40,8 +47,6 @@ install: - git submodule update --init tools/boostdep - xcopy /s /e /q %APPVEYOR_BUILD_FOLDER% libs\preprocessor\ - python tools/boostdep/depinst/depinst.py preprocessor - - bootstrap - - b2 -d0 headers for: - @@ -50,6 +55,8 @@ for: - configuration: boost_build_test test_script: + - bootstrap + - b2 -d0 headers - b2 -j3 libs/preprocessor/test toolset=%TOOLSET% - From 98f6c75e1e47700a120547e9a556caaec4c17e3f Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 6 Jan 2020 02:34:42 -0500 Subject: [PATCH 10/10] Make the quick.cpp test 'explicit'. --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 0780b5f..42475a5 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -270,4 +270,4 @@ alias test_iso explicit test_iso ; -compile quick.cpp ; # "Quick" test (for CI) +explicit compile quick.cpp ; # "Quick" test (for CI)