Re-implement Travis Boost linking fix.

Use a better macro by detecting Travis specifically.
This commit is contained in:
Oliver Hamlet
2015-07-12 18:37:30 +01:00
parent 97215ad027
commit d41c2760e7
4 changed files with 11 additions and 5 deletions
+5
View File
@@ -193,6 +193,11 @@ link_directories ("${LIBLOADORDER_ROOT}/build"
# System-Specific Settings
##############################
# If building on Travis, set a preprocessor definition.
IF ($ENV{TRAVIS})
add_definitions (-DTRAVIS)
ENDIF ()
# Settings when compiling for Windows. Since it's a Windows-only app this is always true, but useful to check for copy/paste into other projects.
IF (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions (-DUNICODE -D_UNICODE -DLIBLO_STATIC)
+1
View File
@@ -28,6 +28,7 @@ along with LOOT. If not, see
#include "backend/error.h"
#include "backend/globals.h"
#include "backend/game/game.h"
#include "tests/fixtures.h"
class Game : public SkyrimTest {};
-5
View File
@@ -29,11 +29,6 @@ along with LOOT. If not, see
#include <gtest/gtest.h>
#ifdef __GNUC__ // Workaround for GCC linking error.
#pragma message("GCC detected: Defining BOOST_NO_CXX11_SCOPED_ENUMS and BOOST_NO_SCOPED_ENUMS to avoid linking errors for boost::filesystem::copy_file().")
#define BOOST_NO_CXX11_SCOPED_ENUMS
#define BOOST_NO_SCOPED_ENUMS // For older versions.
#endif
#include <boost/filesystem.hpp>
class GameTest : public ::testing::Test {
+5
View File
@@ -22,6 +22,11 @@
<http://www.gnu.org/licenses/>.
*/
#ifdef TRAVIS
#pragma message("This is a Travis build, so defining BOOST_NO_CXX11_SCOPED_ENUMS to avoid boost::filesystem::copy_file() linking errors.")
#define BOOST_NO_CXX11_SCOPED_ENUMS
#endif
#include "api/test_api.h"
#include "backend/game/test_game.h"
#include "backend/game/test_game_settings.h"