From 222d39dde5409fb41e1e83f68c520f956e53b88f Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Thu, 6 Mar 2003 17:54:16 +0000 Subject: [PATCH] Accomodate msvc [SVN r17746] --- test/chain.py | 5 +++-- test/direct-request-test/a.cpp | 6 +++++- test/direct-request-test/b.cpp | 10 +++++++++- test/direct_request_test.py | 2 +- test/path_features.py | 6 +++++- v2/test/chain.py | 5 +++-- v2/test/direct-request-test/a.cpp | 6 +++++- v2/test/direct-request-test/b.cpp | 10 +++++++++- v2/test/direct_request_test.py | 2 +- v2/test/path_features.py | 6 +++++- 10 files changed, 46 insertions(+), 12 deletions(-) diff --git a/test/chain.py b/test/chain.py index 5d46c0ab6..5fadbee45 100644 --- a/test/chain.py +++ b/test/chain.py @@ -37,15 +37,16 @@ else IMPORT $(__name__) : create : : create ; -exe a : l ; +exe a : l dummy.cpp ; -# needs to be static lib for Windows - main can't appear in DLL +# needs to be static lib for Windows - main cannot appear in DLL static-lib l : a.cpp b.cpp ; make b.cpp : : create ; ''') t.write("a.cpp", "") +t.write("dummy.cpp", "// msvc needs at least one object file\n") t.run_build_system() t.expect_addition("bin/$toolset/debug/a.exe") diff --git a/test/direct-request-test/a.cpp b/test/direct-request-test/a.cpp index aa1e1c6b3..60ca46b55 100644 --- a/test/direct-request-test/a.cpp +++ b/test/direct-request-test/a.cpp @@ -8,7 +8,11 @@ // http://www.boost.org // -void foo(); +void +# ifdef _WIN32 +__declspec(dllimport) +# endif +foo(); int main() { diff --git a/test/direct-request-test/b.cpp b/test/direct-request-test/b.cpp index 0aab8acf9..43cb4bcd4 100644 --- a/test/direct-request-test/b.cpp +++ b/test/direct-request-test/b.cpp @@ -9,5 +9,13 @@ // #ifdef MACROS -void foo() {} +void +# ifdef _WIN32 +__declspec(dllexport) +# endif +foo() {} #endif + +# ifdef _WIN32 +int __declspec(dllexport) force_implib_creation; +# endif diff --git a/test/direct_request_test.py b/test/direct_request_test.py index 2eaaacaf3..a7f8fe5e7 100644 --- a/test/direct_request_test.py +++ b/test/direct_request_test.py @@ -11,7 +11,7 @@ t.set_tree("direct-request-test") t.run_build_system(extra_args="define=MACROS") t.expect_addition("bin/$toolset/debug/" - * (List("a.o b.o b.dll a.exe"))) + * (List("a.obj b.obj b.dll a.exe"))) # Regression test: direct build request was not working # when there's more than one level of 'build-project' diff --git a/test/path_features.py b/test/path_features.py index 975947387..c57a87e54 100644 --- a/test/path_features.py +++ b/test/path_features.py @@ -7,7 +7,11 @@ t.write("project-root.jam", "import gcc ;") t.write("Jamfile", "lib a : a.cpp : . ;") t.write("a.cpp", """ #include -void foo() {} +void +# ifdef _WIN32 +__declspec(dllexport) +# endif +foo() {} """) t.write("a.h", "") diff --git a/v2/test/chain.py b/v2/test/chain.py index 5d46c0ab6..5fadbee45 100644 --- a/v2/test/chain.py +++ b/v2/test/chain.py @@ -37,15 +37,16 @@ else IMPORT $(__name__) : create : : create ; -exe a : l ; +exe a : l dummy.cpp ; -# needs to be static lib for Windows - main can't appear in DLL +# needs to be static lib for Windows - main cannot appear in DLL static-lib l : a.cpp b.cpp ; make b.cpp : : create ; ''') t.write("a.cpp", "") +t.write("dummy.cpp", "// msvc needs at least one object file\n") t.run_build_system() t.expect_addition("bin/$toolset/debug/a.exe") diff --git a/v2/test/direct-request-test/a.cpp b/v2/test/direct-request-test/a.cpp index aa1e1c6b3..60ca46b55 100644 --- a/v2/test/direct-request-test/a.cpp +++ b/v2/test/direct-request-test/a.cpp @@ -8,7 +8,11 @@ // http://www.boost.org // -void foo(); +void +# ifdef _WIN32 +__declspec(dllimport) +# endif +foo(); int main() { diff --git a/v2/test/direct-request-test/b.cpp b/v2/test/direct-request-test/b.cpp index 0aab8acf9..43cb4bcd4 100644 --- a/v2/test/direct-request-test/b.cpp +++ b/v2/test/direct-request-test/b.cpp @@ -9,5 +9,13 @@ // #ifdef MACROS -void foo() {} +void +# ifdef _WIN32 +__declspec(dllexport) +# endif +foo() {} #endif + +# ifdef _WIN32 +int __declspec(dllexport) force_implib_creation; +# endif diff --git a/v2/test/direct_request_test.py b/v2/test/direct_request_test.py index 2eaaacaf3..a7f8fe5e7 100644 --- a/v2/test/direct_request_test.py +++ b/v2/test/direct_request_test.py @@ -11,7 +11,7 @@ t.set_tree("direct-request-test") t.run_build_system(extra_args="define=MACROS") t.expect_addition("bin/$toolset/debug/" - * (List("a.o b.o b.dll a.exe"))) + * (List("a.obj b.obj b.dll a.exe"))) # Regression test: direct build request was not working # when there's more than one level of 'build-project' diff --git a/v2/test/path_features.py b/v2/test/path_features.py index 975947387..c57a87e54 100644 --- a/v2/test/path_features.py +++ b/v2/test/path_features.py @@ -7,7 +7,11 @@ t.write("project-root.jam", "import gcc ;") t.write("Jamfile", "lib a : a.cpp : . ;") t.write("a.cpp", """ #include -void foo() {} +void +# ifdef _WIN32 +__declspec(dllexport) +# endif +foo() {} """) t.write("a.h", "")