mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Re-implement Travis Boost linking fix.
Use a better macro by detecting Travis specifically.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user