2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Accomodate msvc

[SVN r17746]
This commit is contained in:
Dave Abrahams
2003-03-06 17:54:16 +00:00
parent f7b870e26d
commit 222d39dde5
10 changed files with 46 additions and 12 deletions

View File

@@ -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")

View File

@@ -8,7 +8,11 @@
// http://www.boost.org
//
void foo();
void
# ifdef _WIN32
__declspec(dllimport)
# endif
foo();
int main()
{

View File

@@ -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

View File

@@ -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'

View File

@@ -7,7 +7,11 @@ t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", "lib a : a.cpp : <include>. ;")
t.write("a.cpp", """
#include <a.h>
void foo() {}
void
# ifdef _WIN32
__declspec(dllexport)
# endif
foo() {}
""")
t.write("a.h", "")

View File

@@ -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")

View File

@@ -8,7 +8,11 @@
// http://www.boost.org
//
void foo();
void
# ifdef _WIN32
__declspec(dllimport)
# endif
foo();
int main()
{

View File

@@ -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

View File

@@ -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'

View File

@@ -7,7 +7,11 @@ t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", "lib a : a.cpp : <include>. ;")
t.write("a.cpp", """
#include <a.h>
void foo() {}
void
# ifdef _WIN32
__declspec(dllexport)
# endif
foo() {}
""")
t.write("a.h", "")