From bfce1c8b9dd8449f1cd540ee98778f1825d2d3b0 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sun, 17 Nov 2013 14:16:45 -0500 Subject: [PATCH 1/2] Change windows submodule to point to https url --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 1321102..1dce683 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "Windows"] path = Windows - url = git@github.com:Mokosha/FasTC-MSVCLibs.git + url = https://github.com/Mokosha/FasTC-MSVCLibs.git From 86741f7a8944c14dfdfd35af2b60e28b723c5e5e Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sun, 17 Nov 2013 14:17:00 -0500 Subject: [PATCH 2/2] Fix some configuration issues with VS2012 --- Base/test/CMakeLists.txt | 6 ++++++ CLTool/src/tc.cpp | 2 +- GTest/cmake/internal_utils.cmake | 1 + PVRTCEncoder/test/CMakeLists.txt | 11 +++++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Base/test/CMakeLists.txt b/Base/test/CMakeLists.txt index 42caebd..ff349c8 100644 --- a/Base/test/CMakeLists.txt +++ b/Base/test/CMakeLists.txt @@ -59,6 +59,12 @@ SET(TESTS FOREACH(TEST ${TESTS}) SET(TEST_NAME Test_Base_${TEST}) SET(TEST_MODULE Test${TEST}.cpp) + + # HACK for MSVC 2012... + IF(MSVC) + ADD_DEFINITIONS(-D_VARIADIC_MAX=10) + ENDIF() + ADD_EXECUTABLE(${TEST_NAME} ${TEST_MODULE}) TARGET_LINK_LIBRARIES(${TEST_NAME} FasTCBase) TARGET_LINK_LIBRARIES(${TEST_NAME} gtest_main) diff --git a/CLTool/src/tc.cpp b/CLTool/src/tc.cpp index 04438b9..d562901 100644 --- a/CLTool/src/tc.cpp +++ b/CLTool/src/tc.cpp @@ -98,7 +98,7 @@ void ExtractBasename(const char *filename, char *buf, size_t bufSz) { } } - uint64 numChars = ext - base + 1; + size_t numChars = ext - base + 1; size_t toCopy = ::std::min(numChars, bufSz); memcpy(buf, base, toCopy); buf[toCopy - 1] = '\0'; diff --git a/GTest/cmake/internal_utils.cmake b/GTest/cmake/internal_utils.cmake index 8cb2189..f0ad219 100644 --- a/GTest/cmake/internal_utils.cmake +++ b/GTest/cmake/internal_utils.cmake @@ -71,6 +71,7 @@ macro(config_compiler_and_linker) set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1") set(cxx_no_exception_flags "-D_HAS_EXCEPTIONS=0") set(cxx_no_rtti_flags "-GR-") + add_definitions(-D_VARIADIC_MAX=10) elseif (CMAKE_COMPILER_IS_GNUCXX) set(cxx_base_flags "-Wall -Wshadow") set(cxx_exception_flags "-fexceptions") diff --git a/PVRTCEncoder/test/CMakeLists.txt b/PVRTCEncoder/test/CMakeLists.txt index 4ca9ee6..57de2e6 100644 --- a/PVRTCEncoder/test/CMakeLists.txt +++ b/PVRTCEncoder/test/CMakeLists.txt @@ -63,6 +63,12 @@ SET(TESTS FOREACH(TEST ${TESTS}) SET(TEST_NAME Test_PVRTCEncoder_${TEST}) SET(TEST_MODULE ${TEST}Test.cpp) + + # HACK for MSVC 2012... + IF(MSVC) + ADD_DEFINITIONS(-D_VARIADIC_MAX=10) + ENDIF() + ADD_EXECUTABLE(${TEST_NAME} ${TEST_MODULE}) TARGET_LINK_LIBRARIES(${TEST_NAME} PVRTCEncoder) TARGET_LINK_LIBRARIES(${TEST_NAME} gtest_main) @@ -91,6 +97,11 @@ IF(PVRTEXLIB_FOUND) INCLUDE_DIRECTORIES( ${PVRTEXLIB_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${FasTC_SOURCE_DIR}/Core/include ) + # HACK for MSVC 2012... + IF(MSVC) + ADD_DEFINITIONS(-D_VARIADIC_MAX=10) + ENDIF() + # The cpp file to compile for the test ADD_EXECUTABLE(${TEST_NAME} DecompTestPVR.cpp)