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 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 9a78599..234e931 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)