From f3f4e2b4250fa6d091d470da9257017c2f640d7c Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Mon, 15 Aug 2016 13:29:37 -0400 Subject: [PATCH] Tidy up 32 and 64 bit build support (fix #49): This fixes up support for building both 32 and 64 bit targets, especially on Windows. --- .gitignore | 30 ------------------------------ CMakeLists.txt | 2 +- Jamroot | 1 + bin/.gitignore | 4 ++++ bin/README.md | 8 ++++++++ bin64/.gitignore | 4 ++++ bin64/README.md | 10 ++++++++++ 7 files changed, 28 insertions(+), 31 deletions(-) delete mode 100644 .gitignore create mode 100644 bin/.gitignore create mode 100644 bin/README.md create mode 100644 bin64/.gitignore create mode 100644 bin64/README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e51312d9..00000000 --- a/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -docs/ -._* -*.mode1v3 -*.pbxuser -*.perspectivev3 -*.user -*.ncb -*.suo -*.obj -*.ilk -*.pch -*.pdb -*.dep -*.idb -*.manifest -*.manifest.res -*.o -*.opensdf -*.d -*.sdf -xcuserdata -contents.xcworkspacedata -.DS_Store -.svn -profile -bin/ -node_modules/ -cov-int/ -nohup.out -venv/ diff --git a/CMakeLists.txt b/CMakeLists.txt index b1e16381..eaf24de9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project (Beast) set_property (GLOBAL PROPERTY USE_FOLDERS ON) if (WIN32) - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /W4 /wd4100 /D_SCL_SECURE_NO_WARNINGS=1 /D_CRT_SECURE_NO_WARNINGS=1") + set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /W4 /wd4100 /bigobj /D _WIN32_WINNT=0x0601 /D_SCL_SECURE_NO_WARNINGS=1 /D_CRT_SECURE_NO_WARNINGS=1") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO") else() set(Boost_USE_STATIC_LIBS ON) diff --git a/Jamroot b/Jamroot index f0f9f097..78951028 100644 --- a/Jamroot +++ b/Jamroot @@ -100,6 +100,7 @@ project beast clang:-std=c++11 msvc:_SCL_SECURE_NO_WARNINGS=1 msvc:_CRT_SECURE_NO_WARNINGS=1 + msvc:-bigobj LINUX:_XOPEN_SOURCE=600 LINUX:_GNU_SOURCE=1 SOLARIS:_XOPEN_SOURCE=500 diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 00000000..4071339b --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,4 @@ +* +*/ +!.gitignore +!README.md diff --git a/bin/README.md b/bin/README.md new file mode 100644 index 00000000..0f47df95 --- /dev/null +++ b/bin/README.md @@ -0,0 +1,8 @@ +# Build output directory + +To build examples and tests for 32-bit on Windows, change to +this directory and use: + +``` +cmake .. +``` diff --git a/bin64/.gitignore b/bin64/.gitignore new file mode 100644 index 00000000..4071339b --- /dev/null +++ b/bin64/.gitignore @@ -0,0 +1,4 @@ +* +*/ +!.gitignore +!README.md diff --git a/bin64/README.md b/bin64/README.md new file mode 100644 index 00000000..d31a8ee9 --- /dev/null +++ b/bin64/README.md @@ -0,0 +1,10 @@ +# Build output directory + +To build examples and tests for 64-bit on Windows, change to +this directory and use: + +``` +cmake -G"Visual Studio 14 2015 Win64" .. +``` + +For later versions of Visual Studio edit the string as appropriate.