Some trivial changes to compile under most recent MSVC as a CMake sub-project (#9275)
* Add a workaround for Filament's breaking change to add_subdirectory for Abseil, see: https://github.com/google/filament/issues/8611 * Fix #pragma warning syntax for MSVC * Only search for an external Abseil dependency if a new option FILAMENT_USE_EXTERNAL_ABSL is set
This commit is contained in:
@@ -82,8 +82,8 @@ class JobSystem;
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning push
|
||||
#pragma warning disable : 4996
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
namespace filament {
|
||||
@@ -663,7 +663,7 @@ FILAMENT_DOWNCAST(View)
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma warning pop
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // TNT_FILAMENT_DETAILS_VIEW_H
|
||||
|
||||
+7
-1
@@ -1,4 +1,10 @@
|
||||
add_subdirectory(../ "${CMAKE_CURRENT_BINARY_DIR}/abseil")
|
||||
option(FILAMENT_USE_EXTERNAL_ABSL "Use find_package to locate an external Abseil dependency" OFF)
|
||||
|
||||
if (FILAMENT_USE_EXTERNAL_ABSL)
|
||||
find_package(absl CONFIG QUIET)
|
||||
else()
|
||||
add_subdirectory(../ "${CMAKE_CURRENT_BINARY_DIR}/abseil")
|
||||
endif()
|
||||
|
||||
# To make Abseil easy for clients to link against, we create a dummy target just for installation
|
||||
# purposes and combine all of Abseil's libraries into a single, easy to link against static library.
|
||||
|
||||
Reference in New Issue
Block a user