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:
@@ -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")
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
// http://www.boost.org
|
||||
//
|
||||
|
||||
void foo();
|
||||
void
|
||||
# ifdef _WIN32
|
||||
__declspec(dllimport)
|
||||
# endif
|
||||
foo();
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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", "")
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
// http://www.boost.org
|
||||
//
|
||||
|
||||
void foo();
|
||||
void
|
||||
# ifdef _WIN32
|
||||
__declspec(dllimport)
|
||||
# endif
|
||||
foo();
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user