# file : tests/cc/modules/testscript # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : MIT; see accompanying LICENSE file crosstest = false test.arguments = config.cxx="$recall($cxx.path)" .include ../../common.test +cat <+build/bootstrap.build using test EOI +cat <=build/root.build cxx.std = experimental # Force modules except for VC where we need at least 15u3. # cxx.features.modules = ($cxx.id != "msvc") using cxx hxx{*}: extension = hxx mxx{*}: extension = mxx cxx{*}: extension = cxx exe{*}: test = true EOI # Determine if we have module support. # +$* noop <=test.mxx #if __cpp_modules >= 201704 export #endif module foo.test; export int f (int); EOI +cat <=test.cxx module foo.test; int f (int i) {return i - 1;} EOI +cat <=driver.cxx import foo.test; int main (int argc, char*[]) {return f (argc);} EOI : bmi-combined : : Test combined interface/implementation unit specified as bmi{}. : if ($cxx.id != "gcc") cp ../test.mxx ./ && cat >+test.mxx <+test.mxx <