diff --git a/test/stage.py b/test/stage.py index 3b65cc4d1..8eaf0ca7f 100644 --- a/test/stage.py +++ b/test/stage.py @@ -6,11 +6,24 @@ from BoostBuild import Tester t = Tester() t.write("project-root.jam", "import gcc ;") -t.write("Jamfile", """ + +t.write( + "Jamfile", +""" lib a : a.cpp ; stage dist : a a.h auxilliary/1 ; """) -t.write("a.cpp", "") + +t.write( + "a.cpp", +""" +int +#ifdef _WIN32 +__declspec(dllexport) +#endif +must_export_something; +""") + t.write("a.h", "") t.write("auxilliary/1", "") @@ -37,11 +50,16 @@ t.expect_addition("rs/a.dll") t.write("project-root.jam", """ path-constant DIST : dist ; """) + t.write("Jamfile", "build-project d ;") -t.write("d/Jamfile",""" + +t.write( + "d/Jamfile", +""" exe a : a.cpp ; stage dist : a : $(DIST) ; """) + t.write("d/a.cpp", "int main() { return 0;}\n") t.run_build_system() diff --git a/v2/test/stage.py b/v2/test/stage.py index 3b65cc4d1..8eaf0ca7f 100644 --- a/v2/test/stage.py +++ b/v2/test/stage.py @@ -6,11 +6,24 @@ from BoostBuild import Tester t = Tester() t.write("project-root.jam", "import gcc ;") -t.write("Jamfile", """ + +t.write( + "Jamfile", +""" lib a : a.cpp ; stage dist : a a.h auxilliary/1 ; """) -t.write("a.cpp", "") + +t.write( + "a.cpp", +""" +int +#ifdef _WIN32 +__declspec(dllexport) +#endif +must_export_something; +""") + t.write("a.h", "") t.write("auxilliary/1", "") @@ -37,11 +50,16 @@ t.expect_addition("rs/a.dll") t.write("project-root.jam", """ path-constant DIST : dist ; """) + t.write("Jamfile", "build-project d ;") -t.write("d/Jamfile",""" + +t.write( + "d/Jamfile", +""" exe a : a.cpp ; stage dist : a : $(DIST) ; """) + t.write("d/a.cpp", "int main() { return 0;}\n") t.run_build_system()