Browse Source

Enable C++11 toolchain.

Branimir Karadžić 9 years ago
parent
commit
90167028bd
4 changed files with 12 additions and 16 deletions
  1. 0 1
      .appveyor.yml
  2. 0 3
      include/bx/bx.h
  3. 11 11
      scripts/toolchain.lua
  4. 1 1
      tests/handle_bench.cpp

+ 0 - 1
.appveyor.yml

@@ -5,7 +5,6 @@ os:
 
 
 environment:
 environment:
   matrix:
   matrix:
-  - TOOLSET: vs2010
   - TOOLSET: vs2012
   - TOOLSET: vs2012
   - TOOLSET: vs2013
   - TOOLSET: vs2013
   - TOOLSET: vs2015
   - TOOLSET: vs2015

+ 0 - 3
include/bx/bx.h

@@ -81,7 +81,4 @@ namespace bx
 
 
 } // namespace bx
 } // namespace bx
 
 
-// Annoying C++0x stuff..
-//namespace std { namespace tr1 {}; using namespace tr1; }
-
 #endif // BX_H_HEADER_GUARD
 #endif // BX_H_HEADER_GUARD

+ 11 - 11
scripts/toolchain.lua

@@ -597,7 +597,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		linkoptions {
 		linkoptions {
 			"-Wl,--gc-sections",
 			"-Wl,--gc-sections",
@@ -679,7 +679,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		links {
 		links {
 			"rt",
 			"rt",
@@ -730,7 +730,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		links {
 		links {
 			"rt",
 			"rt",
@@ -749,7 +749,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		links {
 		links {
 			"rt",
 			"rt",
@@ -792,7 +792,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		linkoptions {
 		linkoptions {
 			"-no-canonical-prefixes",
 			"-no-canonical-prefixes",
@@ -811,7 +811,7 @@ function toolchain(_buildDir, _libDir)
 			"__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it.
 			"__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it.
 		}
 		}
 		buildoptions {
 		buildoptions {
-			"-std=c++0x",
+			"-std=c++11",
 			"-Wfatal-errors",
 			"-Wfatal-errors",
 			"-Wunused-value",
 			"-Wunused-value",
 			"-Wundef",
 			"-Wundef",
@@ -931,7 +931,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		includedirs {
 		includedirs {
 			"$(NACL_SDK_ROOT)/include",
 			"$(NACL_SDK_ROOT)/include",
@@ -1184,7 +1184,7 @@ function toolchain(_buildDir, _libDir)
 		buildoptions {
 		buildoptions {
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		linkoptions {
 		linkoptions {
 		}
 		}
@@ -1200,7 +1200,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 
 
 	configuration { "rpi" }
 	configuration { "rpi" }
@@ -1219,7 +1219,7 @@ function toolchain(_buildDir, _libDir)
 			"-Wundef",
 			"-Wundef",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 		includedirs {
 		includedirs {
 			"/opt/vc/include",
 			"/opt/vc/include",
@@ -1245,7 +1245,7 @@ function toolchain(_buildDir, _libDir)
 			"--sysroot=$(RISCV_DIR)/sysroot",
 			"--sysroot=$(RISCV_DIR)/sysroot",
 		}
 		}
 		buildoptions_cpp {
 		buildoptions_cpp {
-			"-std=c++0x",
+			"-std=c++11",
 		}
 		}
 
 
 	configuration {} -- reset configuration
 	configuration {} -- reset configuration

+ 1 - 1
tests/handle_bench.cpp

@@ -52,7 +52,7 @@ int main()
 		{
 		{
 			typedef std::unordered_map<uint64_t, uint16_t> StdUnorderedMap;
 			typedef std::unordered_map<uint64_t, uint16_t> StdUnorderedMap;
 			StdUnorderedMap map;
 			StdUnorderedMap map;
-//			map.reserve(numElements);
+			map.reserve(numElements);
 			for (uint32_t jj = 0; jj < numElements; ++jj)
 			for (uint32_t jj = 0; jj < numElements; ++jj)
 			{
 			{
 				std::pair<StdUnorderedMap::iterator, bool> ok = map.insert(std::make_pair(uint64_t(jj), uint16_t(jj) ) );
 				std::pair<StdUnorderedMap::iterator, bool> ok = map.insert(std::make_pair(uint64_t(jj), uint16_t(jj) ) );