Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Oct 16, 2023
1 parent 2cd25fd commit 008e720
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,20 @@ jobs:
- name: 'Configure CMake'
run: |
$archexts = '${{ matrix.ArchExts }}'
switch('${{ matrix.Platform }}') {
'x86' { $arch = 'Win32' }
'x64' { $arch = 'x64' }
'x64' {
$arch = 'x64'
if(($archext -eq 'SSE') -or ($archext -eq 'SSE2')) {
$archexts = ''
}
}
}
rm -force ".\Content\Translations\*.po"
cmake -B ".\_build\" -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -A $arch -D CMAKE_SYSTEM_PROCESSOR=$arch -D NCINE_ARCH_EXTENSIONS="${{ matrix.ArchExts }}" -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_STRIP_BINARIES=ON -D NCINE_COPY_DEPENDENCIES=ON -D CMAKE_GENERATOR_TOOLSET=v142
cmake -B ".\_build\" -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -A $arch -D CMAKE_SYSTEM_PROCESSOR=$arch -D NCINE_ARCH_EXTENSIONS=$archexts -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_STRIP_BINARIES=ON -D NCINE_COPY_DEPENDENCIES=ON -D CMAKE_GENERATOR_TOOLSET=v142
- name: 'Build'
run: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/windows_clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,20 @@ jobs:
- name: 'Configure CMake'
run: |
$archexts = '${{ matrix.ArchExts }}'
switch('${{ matrix.Platform }}') {
'x86' { $arch = 'Win32' }
'x64' { $arch = 'x64' }
'x64' {
$arch = 'x64'
if(($archext -eq 'SSE') -or ($archext -eq 'SSE2')) {
$archexts = ''
}
}
}
rm -force ".\Content\Translations\*.po"
cmake -B ".\_build\" -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -A $arch -D CMAKE_SYSTEM_PROCESSOR=$arch -D NCINE_ARCH_EXTENSIONS="${{ matrix.ArchExts }}" -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_STRIP_BINARIES=ON -D NCINE_COPY_DEPENDENCIES=ON -T ClangCL
cmake -B ".\_build\" -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -A $arch -D CMAKE_SYSTEM_PROCESSOR=$arch -D NCINE_ARCH_EXTENSIONS=$archexts -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_STRIP_BINARIES=ON -D NCINE_COPY_DEPENDENCIES=ON -T ClangCL
- name: 'Build'
run: |
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/windows_v143.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,20 @@ jobs:
- name: 'Configure CMake'
run: |
$archexts = '${{ matrix.ArchExts }}'
switch('${{ matrix.Platform }}') {
'x86' { $arch = 'Win32' }
'x64' { $arch = 'x64' }
'x64' {
$arch = 'x64'
if(($archext -eq 'SSE') -or ($archext -eq 'SSE2')) {
$archexts = ''
}
}
}
rm -force ".\Content\Translations\*.po"
cmake -B ".\_build\" -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -A $arch -D CMAKE_SYSTEM_PROCESSOR=$arch -D NCINE_ARCH_EXTENSIONS="${{ matrix.ArchExts }}" -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_STRIP_BINARIES=ON -D NCINE_COPY_DEPENDENCIES=ON -D CMAKE_GENERATOR_TOOLSET=v143
cmake -B ".\_build\" -D CMAKE_BUILD_TYPE=${{ matrix.BuildType }} -A $arch -D CMAKE_SYSTEM_PROCESSOR=$arch -D NCINE_ARCH_EXTENSIONS=$archexts -D NCINE_PREFERRED_BACKEND=${{ matrix.Backend }} -D NCINE_STRIP_BINARIES=ON -D NCINE_COPY_DEPENDENCIES=ON -D CMAKE_GENERATOR_TOOLSET=v143
- name: 'Build'
run: |
Expand Down
6 changes: 4 additions & 2 deletions Sources/nCine/Threading/PosixThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace nCine
void Thread::SetName(const char* name)
{
if (_sharedBlock == nullptr || _sharedBlock->_handle == 0) {
return 0;
return;
}

const auto nameLength = strnlen(name, MaxThreadNameLength);
Expand Down Expand Up @@ -287,13 +287,15 @@ namespace nCine
# else
pthread_getaffinity_np(_sharedBlock->_handle, sizeof(cpu_set_t), &affinityMask.cpuSet_);
# endif

return affinityMask;
}

void Thread::SetAffinityMask(ThreadAffinityMask affinityMask)
{
if (_sharedBlock == nullptr || _sharedBlock->_handle == 0) {
LOGW("Cannot set the affinity mask for a not yet created thread");
return affinityMask;
return;
}

# if defined(DEATH_TARGET_APPLE)
Expand Down

0 comments on commit 008e720

Please sign in to comment.