Compare commits

...

22 Commits

Author SHA1 Message Date
Kim Kulling 65672a02b8
Update utIOStreamBuffer.cpp 2024-09-10 21:57:58 +02:00
Kim Kulling 3036de89d3
Update utIOStreamBuffer.cpp 2024-09-10 20:59:51 +02:00
Kim Kulling 26df0b50e5
Use correct warning switch off 2024-09-10 20:30:43 +02:00
Kim Kulling 8bd943abc6
Update CMakeLists.txt 2024-09-10 19:37:01 +02:00
Kim Kulling 3a39648358
Update gzclose.c
Fix compiler warning
2024-09-10 19:16:31 +02:00
Kim Kulling 7c81fa89e7
Update zutil.c
Disable warning.
2024-09-10 19:10:15 +02:00
Kim Kulling b65e84d759
Merge branch 'master' into kimkulling/add_windows_clang_issue-5519 2024-09-10 18:39:00 +02:00
Kim Kulling 709a8f2f79
Merge branch 'master' into kimkulling/add_windows_clang_issue-5519 2024-08-30 13:23:52 +02:00
Kim Kulling f499d947ff
Merge branch 'master' into kimkulling/add_windows_clang_issue-5519 2024-07-09 10:42:44 +02:00
Kim Kulling 718c517dcd
Update UnitTestFileGenerator.h 2024-04-18 14:54:25 +02:00
Kim Kulling 2beab55a4e
Merge branch 'master' into kimkulling/add_windows_clang_issue-5519 2024-04-18 10:44:44 +01:00
Kim Kulling a53bca85cb
Use save mktemp on windows 2024-04-18 11:44:33 +02:00
Kim Kulling 200e34f0ca
Update UnitTestFileGenerator.h 2024-04-09 21:15:15 +02:00
Kim Kulling f8b3023db3
Update UnitTestFileGenerator.h 2024-04-09 21:09:02 +02:00
Kim Kulling 0142bc35f7
Update UnitTestFileGenerator.h 2024-04-09 21:00:07 +02:00
Kim Kulling c740977594
Update UnitTestFileGenerator.h 2024-04-09 19:37:35 +01:00
Kim Kulling 1587c61ee7
Update UnitTestFileGenerator.h 2024-04-09 19:31:45 +01:00
Kim Kulling ecd144b63e
Update UnitTestFileGenerator.h 2024-04-09 19:13:25 +01:00
Kim Kulling efc046752c
Update ccpp.yml: Fix the filter 2024-04-09 14:56:23 +02:00
Kim Kulling b2437e5b59
Update ccpp.yml 2024-04-09 13:06:26 +02:00
Kim Kulling af31856221
Update ccpp.yml
- Build the viewer onl< with msvc
2024-04-09 11:14:55 +02:00
Kim Kulling a5d661e303
Update ccpp.yml
- Add windows clang build step
- Help to evaluate https://github.com/assimp/assimp/issues/5519
2024-04-09 11:03:12 +02:00
6 changed files with 33 additions and 20 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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 */

View File

@ -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+");

View File

@ -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);