From edc9022131b77cec3fe5a662766e36fa9a71d23e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Feb 2018 11:50:23 +0200 Subject: Enable modules support only for VC 15u5 and up, drop hacks for earlier --- tests/cc/modules/testscript | 58 ++++++++------------------------------------- 1 file changed, 10 insertions(+), 48 deletions(-) (limited to 'tests/cc') diff --git a/tests/cc/modules/testscript b/tests/cc/modules/testscript index a2b057d..ac46451 100644 --- a/tests/cc/modules/testscript +++ b/tests/cc/modules/testscript @@ -22,10 +22,10 @@ cxx.features.modules = true using cxx -# We forced modules but for VC we need at least 15u3 (19.11). So "unforce" +# We forced modules but for VC we need at least 15u5 (19.12). So "unforce" # them in this case. # -if ($cxx.id == 'msvc' && $cxx.version.major == 19 && $cxx.version.minor < 11) +if ($cxx.id == 'msvc' && $cxx.version.major == 19 && $cxx.version.minor < 12) cxx.features.modules = false hxx{*}: extension = hxx @@ -53,11 +53,7 @@ EOI # define LIBFOO_EXPORT #endif -#if __cpp_modules >= 201704 -export -#endif -module foo.core; - +export module foo.core; export LIBFOO_EXPORT int f (int); EOI @@ -123,10 +119,7 @@ $* test clean <=core.mxx - #if __cpp_modules >= 201704 - export - #endif - module bar.core; + export module bar.core; EOI : separator @@ -202,11 +195,7 @@ $* test clean <=base.mxx - #if __cpp_modules >= 201704 - export - #endif - module foo.base; - + export module foo.base; export import foo.core; EOI @@ -215,10 +204,7 @@ $* test clean <= 201704 - export - #endif - module foo.extra; + export module foo.extra; export { @@ -231,10 +217,7 @@ $* test clean <=foo.mxx - #if __cpp_modules >= 201704 - export - #endif - module foo; + export module foo; export { @@ -290,8 +273,6 @@ $* test clean <=base.mxx export module foo.base; import foo.core; @@ -329,10 +310,7 @@ $* test clean <=foo-core.mxx; - #if __cpp_modules >= 201704 - export - #endif - module foo.core; + export module foo.core; export inline int f (int i) {return i - 2;} EOI $* update <=core.mxx; - #if __cpp_modules >= 201704 - export - #endif - module foo.core; + export module foo.core; export __symexport int f (int); @@ -381,18 +356,5 @@ cat <=driver.cxx; $* test clean <=core.mxx; - export module foo.core; - export int f (int); + lib{foo}: mxx{core} cxx{core-f} # @@ VC: core-g EOI -$* test <'exe{test}: cxx{driver core} mxx{core}'; -touch core.mxx; # Test use of cached .ii's. -$* test clean <'exe{test}: cxx{driver core} mxx{core}' -- cgit v1.1