Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitebdfb10

Browse files
authored
CMake minor cleanup (#110)
1 parentc1e6b25 commitebdfb10

File tree

4 files changed

+19
-13
lines changed

4 files changed

+19
-13
lines changed

‎CMakeLists.txt‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ cmake_minimum_required (VERSION 3.20)
55

66
set(UVATLAS_VERSION 1.8.4)
77

8+
if(DEFINED XBOX_CONSOLE_TARGET)
9+
set(CMAKE_TRY_COMPILE_TARGET_TYPE"STATIC_LIBRARY")
10+
endif()
11+
812
project (UVAtlas
913
VERSION${UVATLAS_VERSION}
1014
DESCRIPTION"UVAtlas Isochart Atlas Library"
@@ -184,7 +188,11 @@ if(DEFINED XBOX_CONSOLE_TARGET)
184188
message(FATAL_ERROR"Microsoft GDK with Xbox Extensions environment needs to be set for Xbox One.")
185189
endif()
186190
target_compile_definitions(${PROJECT_NAME}PUBLIC _GAMING_XBOX _GAMING_XBOX_XBOXONE)
191+
else()
192+
message(FATAL_ERROR"Unknown XBOX_CONSOLE_TARGET")
187193
endif()
194+
elseif(WINDOWS_STORE)
195+
target_compile_definitions(${PROJECT_NAME}PUBLIC WINAPI_FAMILY=WINAPI_FAMILY_APP)
188196
endif()
189197

190198
#--- Package
@@ -302,6 +310,9 @@ endif()
302310

303311
if(CMAKE_CXX_COMPILER_IDMATCHES"Clang")
304312
set(WarningsLib -Wall -Wpedantic -Wextra)
313+
if(CMAKE_CXX_COMPILER_VERSIONVERSION_GREATER_EQUAL 16.0)
314+
list(APPEND WarningsLib"-Wno-unsafe-buffer-usage")
315+
endif()
305316
target_compile_options(${PROJECT_NAME}PRIVATE${WarningsLib})
306317

307318
set(WarningsEXE${WarningsLib}"-Wno-c++98-compat""-Wno-c++98-compat-pedantic""-Wno-switch""-Wno-switch-enum""-Wno-exit-time-destructors""-Wno-switch""-Wno-switch-enum""-Wno-language-extension-token""-Wno-missing-prototypes")
@@ -379,10 +390,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
379390
endif()
380391

381392
if(WIN32)
382-
if(WINDOWS_STORE)
383-
target_compile_definitions(${PROJECT_NAME}PRIVATE WINAPI_FAMILY=WINAPI_FAMILY_APP)
384-
endif()
385-
386393
if(WINDOWS_STOREOR (${DIRECTX_ARCH}MATCHES"^arm64")OR (DEFINED XBOX_CONSOLE_TARGET))
387394
set(WINVER 0x0A00)
388395
elseif(${DIRECTX_ARCH}MATCHES"^arm")

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
8585
##Trademarks
8686

8787
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
88+
89+
Thanks to Andrew Farrier and Scott Matloff for their on-going help with code reviews.

‎UVAtlas/geodesics/datatypes.h‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,16 @@ namespace GeodesicDist
131131
{
132132
memset(this,0,sizeof(EdgeWindow));
133133
}
134-
EdgeWindow(const EdgeWindow& R)
135-
{
136-
memcpy(this, &R,sizeof(EdgeWindow));
137-
}
138134
// trick constructor
139135
EdgeWindow(constuint32_t R)
140136
{
141137
if (R ==0)
142138
memset(this,0,sizeof(EdgeWindow));
143139
}
144140

141+
EdgeWindow(const EdgeWindow&) =default;
142+
EdgeWindow&operator=(const EdgeWindow&) =default;
143+
145144
#ifdef _PREFAST_
146145
#pragma warning(pop)
147146
#endif

‎UVAtlas/geodesics/minheap.hpp‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ namespace Internal
2626
m_data = R;
2727
}
2828

29-
ReverseComparison&operator=(const ReverseComparison& R)
30-
{
31-
m_data = R.m_data;
32-
return *this;
33-
}
29+
ReverseComparison(const ReverseComparison&) =default;
30+
ReverseComparison&operator=(const ReverseComparison&) =default;
31+
3432
booloperator>(const ReverseComparison& R)
3533
{
3634
return m_data < R.m_data;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp