Skip to content

Commit

Permalink
Use -no_warn_duplicate_libraries flag only for AppleClang version >= …
Browse files Browse the repository at this point in the history
…15.0
  • Loading branch information
egorodet committed Dec 11, 2023
1 parent eb7a3df commit 46b2179
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
18 changes: 16 additions & 2 deletions CMake/MethaneBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,6 @@ else() # Clang or GCC on Linux/MacOS
target_link_options(MethaneBuildOptions INTERFACE
# -flto - use the link-time optimizer
$<$<CONFIG:Release>:-flto>
# Disable useless warnings
LINKER:--no_warn_duplicate_libraries
)

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") # GCC
Expand All @@ -181,6 +179,22 @@ else() # Clang or GCC on Linux/MacOS

elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")

EXECUTE_PROCESS(COMMAND clang --version OUTPUT_VARIABLE CLANG_FULL_VERSION_STRING)
string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${CLANG_FULL_VERSION_STRING})

# Warn about requirement to set OSX architectures for fat-binary starting with XCode & Clang v12.0
# Build architectures have to be set with cmake generator command line option -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
if (NOT CMAKE_OSX_ARCHITECTURES AND CLANG_VERSION_STRING VERSION_GREATER_EQUAL 12.0)
message(WARNING "Apple Clang v12.0 requires build architectures to be set explicitly with cmake generator option -DCMAKE_OSX_ARCHITECTURES=\"arm64;x86_64\"")
endif()

# Disable duplicate libraries warning for AppleClang >= 15.0
if (CLANG_VERSION_STRING VERSION_GREATER_EQUAL 15.0)
target_link_options(MethaneBuildOptions INTERFACE
LINKER:-no_warn_duplicate_libraries
)
endif()

if(METHANE_RHI_PIMPL_INLINE_ENABLED AND METHANE_GFX_API EQUAL METHANE_GFX_METAL)
target_compile_options(MethaneBuildOptions INTERFACE
# Compile all C++ sources as Objective-C++ in case of RHI PIMPL inlining
Expand Down
10 changes: 0 additions & 10 deletions CMake/MethaneGlobalOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,6 @@ if(WIN32)

elseif(APPLE)

if (NOT CMAKE_OSX_ARCHITECTURES)
# Warn about requirement to set OSX architectures for fat-binary starting with XCode & Clang v12.0
# Build architectures have to be set with cmake generator command line option -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
EXECUTE_PROCESS(COMMAND clang --version OUTPUT_VARIABLE CLANG_FULL_VERSION_STRING)
string(REGEX REPLACE ".*clang version ([0-9]+\\.[0-9]+).*" "\\1" CLANG_VERSION_STRING ${CLANG_FULL_VERSION_STRING})
if (CLANG_VERSION_STRING VERSION_GREATER_EQUAL 12.0)
message(WARNING "Apple Clang v12.0 requires build architectures to be set explicitly with cmake generator option -DCMAKE_OSX_ARCHITECTURES=\"arm64;x86_64\"")
endif()
endif()

# Set OS deployment target minimum version
if (DEPLOYMENT_TARGET)
set(CMAKE_OSX_DEPLOYMENT_TARGET "${DEPLOYMENT_TARGET}")
Expand Down

24 comments on commit 46b2179

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_VK_Release Test Results

  • ✅ 0 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 0 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_DX_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 925 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win32_DX_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 913 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu_VK_Release Test Results

  • ✅ 3168 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 11841 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_VK_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 921 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_MTL_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 932 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win32_VK_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 915 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_VK_Release Test Results

  • ✅ 0 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 0 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_VK_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 921 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win32_VK_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 915 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_DX_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 925 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win32_DX_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 913 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_MTL_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 932 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu_VK_Release Test Results

  • ✅ 3168 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 11841 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_DX_SonarScan Tests Code Coverage

Code Coverage

Package Line Rate Branch Rate Health
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneDataEventsTest.exe 95% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneDataRangeSetTest.exe 91% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneDataTypesTest.exe 98% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneGraphicsCameraTest.exe 61% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneGraphicsRhiTest.exe 48% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneGraphicsTypesTest.exe 98% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethanePlatformInputTest.exe 43% 100%
D:\a\MethaneKit\MethaneKit\Build\Output\Ninja-Win-DX-Scan\Install\Tests\MethaneUserInterfaceTypesTest.exe 9% 100%
Summary 36% (4834 / 13382) 100% (0 / 0)

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu_VK_SonarScan Tests Code Coverage

Code Coverage

Package Line Rate Branch Rate Health
Default 40% 100%
Summary 40% (8247 / 20599) 100% (0 / 0)

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_MTL_SonarScan Tests Code Coverage

Code Coverage

Package Line Rate Branch Rate Health
Default 51% 22%
Summary 51% (12792 / 25161) 22% (3472 / 15834)

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_DX_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 925 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win64_VK_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 921 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_MTL_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 932 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MacOS_VK_Release Test Results

  • ✅ 0 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 0 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win32_VK_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 915 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Win32_DX_Release Test Results

  • ✅ 3167 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 913 ms. run duration

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu_VK_Release Test Results

  • ✅ 3168 tests passed
  • ❌ 0 tests failed
  • ⚠️ 0 tests skipped
  • ⏱️ 11841 ms. run duration

Please sign in to comment.