Compare commits
22 Commits
master
...
kimkulling
Author | SHA1 | Date |
---|---|---|
Kim Kulling | 65672a02b8 | |
Kim Kulling | 3036de89d3 | |
Kim Kulling | 26df0b50e5 | |
Kim Kulling | 8bd943abc6 | |
Kim Kulling | 3a39648358 | |
Kim Kulling | 7c81fa89e7 | |
Kim Kulling | b65e84d759 | |
Kim Kulling | 709a8f2f79 | |
Kim Kulling | f499d947ff | |
Kim Kulling | 718c517dcd | |
Kim Kulling | 2beab55a4e | |
Kim Kulling | a53bca85cb | |
Kim Kulling | 200e34f0ca | |
Kim Kulling | f8b3023db3 | |
Kim Kulling | 0142bc35f7 | |
Kim Kulling | c740977594 | |
Kim Kulling | 1587c61ee7 | |
Kim Kulling | ecd144b63e | |
Kim Kulling | efc046752c | |
Kim Kulling | b2437e5b59 | |
Kim Kulling | af31856221 | |
Kim Kulling | a5d661e303 |
|
@ -16,9 +16,13 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, ubuntu-latest-clang++]
|
||||
name: [ubuntu-latest-g++, macos-latest-clang++, windows-latest-cl.exe, windows-latest-clang.exe, ubuntu-latest-clang++]
|
||||
# For Windows msvc, for Linux and macOS let's use the clang compiler, use gcc for Linux.
|
||||
include:
|
||||
- name: windows-latest-clang.exe
|
||||
os: windows-latest
|
||||
cxx: clang++.exe
|
||||
cc: clang.exe
|
||||
- name: windows-latest-cl.exe
|
||||
os: windows-latest
|
||||
cxx: cl.exe
|
||||
|
@ -65,13 +69,13 @@ jobs:
|
|||
${{ runner.os }}-DX_SDK
|
||||
|
||||
- name: Download DXSetup
|
||||
if: contains(matrix.name, 'windows') && steps.dxcache.outputs.cache-hit != 'true'
|
||||
if: contains(matrix.name, 'windows-latest-cl.exe') && steps.dxcache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
curl -s -o DXSDK_Jun10.exe --location https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
|
||||
cmd.exe /c start /wait .\DXSDK_Jun10.exe /U /O /F /S /P "${{ github.workspace }}\DX_SDK"
|
||||
|
||||
- name: Set Windows specific CMake arguments
|
||||
if: contains(matrix.name, 'windows')
|
||||
if: contains(matrix.name, 'windows-latest-cl.exe')
|
||||
id: windows_extra_cmake_args
|
||||
run: echo ":set-output name=args::=-DASSIMP_BUILD_ASSIMP_TOOLS=1 -DASSIMP_BUILD_ASSIMP_VIEW=1" >> $GITHUB_OUTPUT
|
||||
|
||||
|
|
|
@ -1346,7 +1346,6 @@ add_compile_options(
|
|||
IF (ASSIMP_WARNINGS_AS_ERRORS)
|
||||
MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
|
||||
IF (MSVC)
|
||||
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang" ) # clang-cl
|
||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror
|
||||
-Wno-microsoft-enum-value
|
||||
|
@ -1397,6 +1396,7 @@ IF (ASSIMP_WARNINGS_AS_ERRORS)
|
|||
-Wno-undefined-func-template
|
||||
-Wno-declaration-after-statement
|
||||
-Wno-deprecated-declarations
|
||||
-Wno-deprecated-non-prototype
|
||||
)
|
||||
ELSE()
|
||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
|
||||
#include "gzguts.h"
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-non-prototype"
|
||||
|
||||
/* gzclose() is in a separate file so that it is linked in only if it is used.
|
||||
That way the other gzclose functions can be used instead to avoid linking in
|
||||
unneeded compression or decompression routines. */
|
||||
|
@ -23,3 +26,6 @@ int ZEXPORT gzclose(file)
|
|||
return gzclose_r(file);
|
||||
#endif
|
||||
}
|
||||
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@ z_const char * const z_errmsg[10] = {
|
|||
(z_const char *)""
|
||||
};
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-non-prototype"
|
||||
|
||||
const char * ZEXPORT zlibVersion()
|
||||
{
|
||||
|
@ -321,6 +323,7 @@ void ZLIB_INTERNAL zcfree(opaque, ptr)
|
|||
(void)opaque;
|
||||
free(ptr);
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
#endif /* MY_ZCALLOC */
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
@ -45,32 +45,34 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW64__) || defined(__MINGW32__)
|
||||
#define TMP_PATH "./"
|
||||
# define TMP_PATH "./"
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
#define TMP_PATH "/tmp/"
|
||||
# define TMP_PATH "/tmp/"
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# ifndef _CRT_SECURE_NO_WARNINGS
|
||||
# define _CRT_SECURE_NO_WARNINGS
|
||||
# endif
|
||||
#include <io.h>
|
||||
inline FILE* MakeTmpFile(char* tmplate)
|
||||
{
|
||||
auto pathtemplate = _mktemp(tmplate);
|
||||
inline FILE* MakeTmpFile(char* tmplate) {
|
||||
char *pathtemplate = tmplate;
|
||||
int err = _mktemp_s(pathtemplate, std::strlen(pathtemplate));
|
||||
EXPECT_EQ(err, 0);
|
||||
EXPECT_NE(pathtemplate, nullptr);
|
||||
if(pathtemplate == nullptr)
|
||||
{
|
||||
if(pathtemplate == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
auto* fs = std::fopen(pathtemplate, "w+");
|
||||
EXPECT_NE(fs, nullptr);
|
||||
EXPECT_NE(fs, nullptr); return fs;
|
||||
|
||||
return fs;
|
||||
}
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
inline FILE* MakeTmpFile(char* tmplate)
|
||||
{
|
||||
inline FILE* MakeTmpFile(char* tmplate) {
|
||||
auto fd = mkstemp(tmplate);
|
||||
EXPECT_NE(-1, fd);
|
||||
if(fd == -1)
|
||||
{
|
||||
if(fd == -1) {
|
||||
return nullptr;
|
||||
}
|
||||
auto fs = fdopen(fd, "w+");
|
||||
|
|
|
@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -89,7 +87,7 @@ TEST_F( IOStreamBufferTest, open_close_Test ) {
|
|||
auto* fs = MakeTmpFile(fname);
|
||||
ASSERT_NE(nullptr, fs);
|
||||
|
||||
auto written = std::fwrite( data, sizeof(*data), dataCount, fs );
|
||||
auto written = std::fwrite(data, sizeof(*data), dataCount, fs);
|
||||
EXPECT_NE( 0U, written );
|
||||
auto flushResult = std::fflush( fs );
|
||||
ASSERT_EQ(0, flushResult);
|
||||
|
|
Loading…
Reference in New Issue