Michael Ragazzon 6 lat temu
rodzic
commit
965a9544fd
3 zmienionych plików z 8 dodań i 3 usunięć
  1. 3 2
      .travis.yml
  2. 4 0
      Build/CMakeLists.txt
  3. 1 1
      Include/Rocket/Core/Vector3.inl

+ 3 - 2
.travis.yml

@@ -4,8 +4,8 @@ dist: trusty
 matrix:
   include:
     - os: osx
-      osx_image: xcode8.3
-      env: ARCH=OSX CC=clang
+      osx_image: xcode9.4
+      env: ARCH=OSX
       language: c++
       compiler: clang
     - os: linux
@@ -51,6 +51,7 @@ matrix:
 install:
   - if [[ "$CC" == "clang" ]]; then export CC=clang-6.0 CXX=clang++-6.0; fi
   - if [[ "$CC" == "gcc" ]]; then export CC=gcc-7 CXX=g++-7; fi
+  - if [[ "$ARCH" == "OSX" ]]; then export CC=clang CXX=clang++; fi
   - cd "$TRAVIS_BUILD_DIR/Build"
   - if [[ "$ARCH" == "x86_64" ]]; then cmake -DBUILD_LUA_BINDINGS=ON -DBUILD_SAMPLES=ON .; fi
   - if [[ "$ARCH" == "OSX" ]]; then cmake -G Xcode .; fi

+ 4 - 0
Build/CMakeLists.txt

@@ -49,6 +49,10 @@ if(POLICY CMP0042)
   cmake_policy(SET CMP0042 NEW)
 endif(POLICY CMP0042)
 
+if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+endif()
+
 project(libRocket C CXX)
 
 # paths

+ 1 - 1
Include/Rocket/Core/Vector3.inl

@@ -72,7 +72,7 @@ Vector3< Type > Vector3< Type >::Normalise() const
 }
 
 template <>
-Vector3< float > Vector3< float >::Normalise() const
+inline Vector3< float > Vector3< float >::Normalise() const
 {
 	float magnitude = Magnitude();
 	if (Math::IsZero(magnitude))