From da9e3a2ca3c58e4813cfcb5b1807b93dd46866be Mon Sep 17 00:00:00 2001 From: Michael Stevens Date: Fri, 13 Aug 2004 14:07:54 +0000 Subject: [PATCH] Test Macro's defined in Jamfiles Test header undef stupid compiler faults complex tests disabled when ICL fails to link [SVN r24460] --- Jamfile | 10 ++++++++++ Jamfile.v2 | 44 ++++++++++++++++++++++++++++++++++++++------ test1/Jamfile | 4 ---- test1/test1.hpp | 30 +++++++++--------------------- test1/test12.cpp | 2 -- test2/Jamfile | 1 - test2/test2.hpp | 15 ++++++++++----- test3/Jamfile | 4 +--- test3/test3.hpp | 38 ++++++++++++-------------------------- test4/Jamfile | 3 --- test4/test4.hpp | 24 +++++++++--------------- test5/Jamfile | 3 --- test5/test5.hpp | 24 +++++++++--------------- test6/Jamfile | 3 --- test6/test6.hpp | 23 +++++++++-------------- test7/Jamfile | 2 -- test7/test7.hpp | 15 --------------- 17 files changed, 107 insertions(+), 138 deletions(-) diff --git a/Jamfile b/Jamfile index 591919d2..0d033faf 100644 --- a/Jamfile +++ b/Jamfile @@ -27,6 +27,7 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test2/test2.cpp @@ -36,6 +37,7 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test3/test3.cpp @@ -45,6 +47,9 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + USE_MAP_ARRAY USE_STD_MAP + USE_SPARSE_VECTOR USE_COMPRESSED_VECTOR USE_COORDINATE_VECTOR USE_SPARSE_MATRIX USE_COMPRESSED_MATRIX USE_COORDINATE_MATRIX <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test4/test4.cpp @@ -54,6 +59,7 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test5/test5.cpp @@ -63,6 +69,7 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test6/test6.cpp @@ -72,6 +79,7 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] # Test7 checks uBLAS operation with interval types. @@ -84,6 +92,8 @@ test-suite numeric/uBLAS # : # input files # : # requirements # BOOST_UBLAS_USE_INTERVAL +# USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY +# <*>"BOOST_UBLAS_NO_ELEMENT_PROXIES" # ] [ compile concepts.cpp : # requirements diff --git a/Jamfile.v2 b/Jamfile.v2 index b818be1d..3bd290ff 100644 --- a/Jamfile.v2 +++ b/Jamfile.v2 @@ -6,11 +6,21 @@ # Bring in rules for testing import testing ; +# Macros determining features to tests: +# Value types: USE_FLOAT USE_DOUBLE USE_STD_COMPLEX +# Proxies: USE_RANGE USE_SLICE +# Storage types: USE_BOUNDED_ARRAY USE_UNBOUNDED_ARRAY +# Vector types: USE_STD_VECTOR USE_BOUNDED_VECTOR +# Matrix types: USE_MATRIX USE_BOUNDED_MATRIX USE_VECTOR_OF_VECTOR +# Adaptors: USE_ADAPTOR +# +# Sparse storage: USE_MAP_ARRAY USE_STD_MAP +# Sparse vectors: USE_SPARSE_VECTOR USE_COMPRESSED_VECTOR USE_COORDINATE_VECTOR +# Sparse matrices: USE_SPARSE_MATRIX USE_COMPRESSED_MATRIX USE_COORDINATE_MATRIX USE_SPARSE_VECTOR_OF_SPARSE_VECTOR USE_GENERALIZED_VECTOR_OF_VECTOR + project : requirements -# Useful for GCC-3.3 on some platforms (MacOS-X) -# <*>"-fabi-version=0" ; test-suite numeric/uBLAS @@ -21,31 +31,50 @@ test-suite numeric/uBLAS : # args : # input files : # requirements + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test2/test2.cpp test2/test21.cpp test2/test22.cpp test2/test23.cpp + : : : + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test3/test3.cpp test3/test31.cpp test3/test32.cpp test3/test33.cpp + : : : + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + USE_MAP_ARRAY USE_STD_MAP + USE_SPARSE_VECTOR USE_COMPRESSED_VECTOR USE_COORDINATE_VECTOR USE_SPARSE_MATRIX USE_COMPRESSED_MATRIX USE_COORDINATE_MATRIX + vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test4/test4.cpp test4/test41.cpp test4/test42.cpp test4/test43.cpp + : : : + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test5/test5.cpp test5/test51.cpp test5/test52.cpp test5/test53.cpp + : : : + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] [ run test6/test6.cpp test6/test61.cpp test6/test62.cpp test6/test63.cpp + : : : + USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY + vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" ] # Test7 checks uBLAS operation with interval types. # This causes too much compiler badness. Issues need to be addressed for VC7.1 VC8 CW9 and Intel 8 (windows) @@ -53,11 +82,14 @@ test-suite numeric/uBLAS # test7/test71.cpp # test7/test72.cpp # test7/test73.cpp -# : # args -# : # input files -# : # requirements -# BOOST_UBLAS_USE_INTERVAL +# : : : +# BOOST_UBLAS_USE_INTERVAL +# USE_DOUBLE USE_STD_COMPLEX USE_RANGE USE_SLICE USE_UNBOUNDED_ARRAY +# vacpp:"BOOST_UBLAS_NO_ELEMENT_PROXIES" # ] [ compile concepts.cpp + : # requirements + EXTERNAL + intel-linux:"-Xc" ] ; diff --git a/test1/Jamfile b/test1/Jamfile index e131e985..dbfef0d7 100644 --- a/test1/Jamfile +++ b/test1/Jamfile @@ -22,10 +22,6 @@ exe test1 : $(SOURCES).cpp : $(BOOST_ROOT) $(BOOST_ROOT) - BOOST_UBLAS_SAFE -# USE_BOUNDED_VECTOR -# USE_BOUNDED_MATRIX - USE_RANGE # <*>"-fabi-version=0" <*>"-Xc" ; diff --git a/test1/test1.hpp b/test1/test1.hpp index 53dc029f..badf582f 100644 --- a/test1/test1.hpp +++ b/test1/test1.hpp @@ -36,31 +36,19 @@ void initialize_matrix (M &m) { } void test_vector (); - void test_matrix_vector (); - void test_matrix (); -// #define USE_FLOAT -#define USE_DOUBLE -// MSVC Version 6.0 & 7.0 have problems with std complex -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300) -#define USE_STD_COMPLEX + +// Disable some tests for truly broken compilers + // MSVC Version 6.0 & 7.0 have problems compiling with std::complex +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +#undef USE_STD_COMPLEX #endif -#define USE_RANGE -#define USE_SLICE - -// #define USE_BOUNDED_ARRAY -#define USE_UNBOUNDED_ARRAY -// #define USE_STD_VECTOR - -// #define USE_BOUNDED_VECTOR - -#define USE_MATRIX -// #define USE_BOUNDED_MATRIX -// #define USE_VECTOR_OF_VECTOR - + // Intel for Windows fails to link when a std::complex is returned! +#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800) && defined(__ICL) +#undef USE_STD_COMPLEX #endif - +#endif diff --git a/test1/test12.cpp b/test1/test12.cpp index cf93e385..905ca612 100644 --- a/test1/test12.cpp +++ b/test1/test12.cpp @@ -298,5 +298,3 @@ void test_matrix_vector () { #endif #endif } - - diff --git a/test2/Jamfile b/test2/Jamfile index e9f5df8b..9e4c3849 100644 --- a/test2/Jamfile +++ b/test2/Jamfile @@ -22,7 +22,6 @@ exe test2 : $(SOURCES).cpp : $(BOOST_ROOT) $(BOOST_ROOT) - BOOST_UBLAS_SAFE # <*>"-fabi-version=0" <*>"-Xc" ; diff --git a/test2/test2.hpp b/test2/test2.hpp index f275641b..e809321f 100644 --- a/test2/test2.hpp +++ b/test2/test2.hpp @@ -81,11 +81,16 @@ struct test_blas_3 { void operator () (); }; -#define USE_FLOAT -#define USE_DOUBLE -// MSVC Version 6.0 & 7.0 have problems with std complex -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300) -#define USE_STD_COMPLEX + +// Disable some tests for truly broken compilers + // MSVC Version 6.0 & 7.0 have problems compiling with std::complex +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +#undef USE_STD_COMPLEX +#endif + + // Intel for Windows fails to link when a std::complex is returned! +#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800) && defined(__ICL) +#undef USE_STD_COMPLEX #endif #endif diff --git a/test3/Jamfile b/test3/Jamfile index 09e07b6a..76589e0b 100644 --- a/test3/Jamfile +++ b/test3/Jamfile @@ -22,9 +22,7 @@ exe test3 : $(SOURCES).cpp : $(BOOST_ROOT) $(BOOST_ROOT) - BOOST_UBLAS_SAFE - USE_RANGE - <*>"-Xc" # <*>"-fabi-version=0" + <*>"-Xc" ; diff --git a/test3/test3.hpp b/test3/test3.hpp index 01950682..34e24664 100644 --- a/test3/test3.hpp +++ b/test3/test3.hpp @@ -36,36 +36,22 @@ void initialize_matrix (M &m) { } void test_vector (); - void test_matrix_vector (); - void test_matrix (); -// #define USE_FLOAT -#define USE_DOUBLE -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300) -#define USE_STD_COMPLEX +// FIXME range and slice are failing +#undef USE_RANGE +#undef USE_SLICE + +// Disable some tests for truly broken compilers + // MSVC Version 6.0 & 7.0 have problems compiling with std::complex +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +#undef USE_STD_COMPLEX #endif -//FIXME range and slice are failing -//#define USE_RANGE -//#define USE_SLICE - -#define USE_MAP_ARRAY -#define USE_STD_MAP - -#define USE_SPARSE_VECTOR -#define USE_COMPRESSED_VECTOR -#define USE_COORDINATE_VECTOR - -#define USE_SPARSE_MATRIX -// #define USE_SPARSE_VECTOR_OF_SPARSE_VECTOR -// #define USE_GENERALIZED_VECTOR_OF_VECTOR -#define USE_COMPRESSED_MATRIX -#define USE_COORDINATE_MATRIX - + // Intel for Windows fails to link when a std::complex is returned! +#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800) && defined(__ICL) +#undef USE_STD_COMPLEX #endif - - - +#endif diff --git a/test4/Jamfile b/test4/Jamfile index 4534eda4..68323962 100644 --- a/test4/Jamfile +++ b/test4/Jamfile @@ -22,9 +22,6 @@ exe test4 : $(SOURCES).cpp : $(BOOST_ROOT) $(BOOST_ROOT) - BOOST_UBLAS_SAFE - USE_RANGE - USE_ADAPTOR # <*>"-fabi-version=0" <*>"-Xc" ; diff --git a/test4/test4.hpp b/test4/test4.hpp index 846424e1..5c20a00d 100644 --- a/test4/test4.hpp +++ b/test4/test4.hpp @@ -44,25 +44,19 @@ void initialize_matrix (M &m) { } void test_vector (); - void test_matrix_vector (); - void test_matrix (); -// #define USE_FLOAT -#define USE_DOUBLE -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300) -#define USE_STD_COMPLEX + +// Disable some tests for truly broken compilers + // MSVC Version 6.0 & 7.0 have problems compiling with std::complex +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +#undef USE_STD_COMPLEX #endif -#define USE_RANGE -#define USE_SLICE - -// #define USE_BOUNDED_ARRAY -#define USE_UNBOUNDED_ARRAY -// #define USE_STD_VECTOR - -// define USE_ADAPTOR + // Intel for Windows fails to link when a std::complex is returned! +#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800) && defined(__ICL) +#undef USE_STD_COMPLEX #endif - +#endif diff --git a/test5/Jamfile b/test5/Jamfile index c0ac125a..c85b61cd 100644 --- a/test5/Jamfile +++ b/test5/Jamfile @@ -22,9 +22,6 @@ exe test5 : $(SOURCES).cpp : $(BOOST_ROOT) $(BOOST_ROOT) - BOOST_UBLAS_SAFE - USE_RANGE - USE_ADAPTOR # <*>"-fabi-version=0" <*>"-Xc" ; diff --git a/test5/test5.hpp b/test5/test5.hpp index 59a0929b..ab633ceb 100644 --- a/test5/test5.hpp +++ b/test5/test5.hpp @@ -61,25 +61,19 @@ void initialize_matrix (M &m) { void test_vector (); - void test_matrix_vector (); - void test_matrix (); -// #define USE_FLOAT -#define USE_DOUBLE -#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1300) -#define USE_STD_COMPLEX + +// Disable some tests for truly broken compilers + // MSVC Version 6.0 & 7.0 have problems compiling with std::complex +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +#undef USE_STD_COMPLEX #endif -#define USE_RANGE -#define USE_SLICE - -// #define USE_BOUNDED_ARRAY -#define USE_UNBOUNDED_ARRAY -// #define USE_STD_VECTOR - -// #define USE_ADAPTOR + // Intel for Windows fails to link when a std::complex is returned! +#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800) && defined(__ICL) +#undef USE_STD_COMPLEX #endif - +#endif diff --git a/test6/Jamfile b/test6/Jamfile index 7157b0eb..16f3748a 100644 --- a/test6/Jamfile +++ b/test6/Jamfile @@ -22,9 +22,6 @@ exe test6 : $(SOURCES).cpp : $(BOOST_ROOT) $(BOOST_ROOT) - BOOST_UBLAS_SAFE - USE_RANGE - USE_ADAPTOR # <*>"-fabi-version=0" <*>"-Xc" ; diff --git a/test6/test6.hpp b/test6/test6.hpp index e6f0109b..1df5aef5 100644 --- a/test6/test6.hpp +++ b/test6/test6.hpp @@ -61,24 +61,19 @@ void initialize_matrix (M &m) { void test_vector (); - void test_matrix_vector (); - void test_matrix (); -// #define USE_FLOAT -#define USE_DOUBLE -// #define USE_STD_COMPLEX - -// #define USE_RANGE -// #define USE_SLICE - -// #define USE_BOUNDED_ARRAY -#define USE_UNBOUNDED_ARRAY -// #define USE_STD_VECTOR - -// #define USE_ADAPTOR +// Disable some tests for truly broken compilers + // MSVC Version 6.0 & 7.0 have problems compiling with std::complex +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) +#undef USE_STD_COMPLEX #endif + // Intel for Windows fails to link when a std::complex is returned! +#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800) && defined(__ICL) +#undef USE_STD_COMPLEX +#endif +#endif diff --git a/test7/Jamfile b/test7/Jamfile index 958fe40a..e31f96e1 100644 --- a/test7/Jamfile +++ b/test7/Jamfile @@ -23,8 +23,6 @@ exe test7 : $(BOOST_ROOT) $(BOOST_ROOT) BOOST_UBLAS_USE_INTERVAL - BOOST_UBLAS_SAFE - USE_RANGE # <*>"-fabi-version=0" <*>"-Xc" ; diff --git a/test7/test7.hpp b/test7/test7.hpp index ba6f7c47..b81a8628 100644 --- a/test7/test7.hpp +++ b/test7/test7.hpp @@ -36,24 +36,9 @@ void initialize_matrix (M &m) { } void test_vector (); - void test_matrix_vector (); - void test_matrix (); -// #define USE_FLOAT -#define USE_DOUBLE -#define USE_STD_COMPLEX - -#define USE_RANGE -#define USE_SLICE - -// #define USE_BOUNDED_ARRAY -#define USE_UNBOUNDED_ARRAY -// #define USE_STD_VECTOR - -#define USE_MATRIX -// #define USE_VECTOR_OF_VECTOR #endif