Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update googletest & gulrak (filesystem) #3800

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion cmake/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ macro(fetch_googletest)
file(TO_CMAKE_PATH ${CMAKE_MAKE_PROGRAM} CMAKE_MAKE_PROGRAM)

# Set some options used when compiling googletest.
set(CMAKE_CXX_STANDARD 11)

# USD updated to c++17 for USD v23.11
if(USD_VERSION VERSION_GREATER_EQUAL "0.23.11")
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
Expand Down
1 change: 1 addition & 0 deletions cmake/googletest_download.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ExternalProject_Add(googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.10.0
GIT_CONFIG advice.detachedHead=false
GIT_SHALLOW TRUE
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will skip the history which makes the download much smaller.

SOURCE_DIR "${GOOGLETEST_BUILD_ROOT}/googletest-src"
BINARY_DIR "${GOOGLETEST_BUILD_ROOT}/googletest-build"
CMAKE_ARGS
Expand Down
19 changes: 6 additions & 13 deletions cmake/gulrak.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Autodesk
# Copyright 2024 Autodesk
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,6 @@

include(FetchContent)

set(CONTENT_NAME gulrak)

set(FETCHCONTENT_QUIET OFF)

# GULRAK_SOURCE_DIR : Set this to the directory where you have cloned gulrak filesystem repo,
Expand All @@ -26,23 +24,18 @@ if(DEFINED GULRAK_SOURCE_DIR)
file(TO_CMAKE_PATH "${GULRAK_SOURCE_DIR}" GULRAK_SOURCE_DIR)
message(STATUS "**** Building Gulrak From " ${GULRAK_SOURCE_DIR})
FetchContent_Declare(
${CONTENT_NAME}
gulrak
URL ${GULRAK_SOURCE_DIR}
)

string(TOUPPER ${CONTENT_NAME} UPPERGULARK)
mark_as_advanced(FETCHCONTENT_SOURCE_DIR_${UPPERGULARK})
mark_as_advanced(FETCHCONTENT_SOURCE_DIR_GULRAK)
mark_as_advanced(FETCHCONTENT_UPDATES_DISCONNECTED_${UPPERGULARK})

else()
message(STATUS "**** Building Gulrak From Github Repository.")
FetchContent_Declare(
${CONTENT_NAME}
GIT_REPOSITORY https://github.com/gulrak/filesystem.git
GIT_TAG 4e21ab305794f5309a1454b4ae82ab9a0f5e0d25
USES_TERMINAL_DOWNLOAD TRUE
GIT_CONFIG advice.detachedHead=false
gulrak
URL https://github.com/gulrak/filesystem/archive/refs/tags/v1.5.14.zip
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The previous version was 1.5.6 (which is what that git commit pointed to) which seems like a big jump to 1.5.14, but its not that really. There weren't all the dot releases in between. https://github.com/gulrak/filesystem/releases

I also changed it so that it just downloads the release zip file instead of cloning the github repo.

)
endif()

FetchContent_MakeAvailable(${CONTENT_NAME})
FetchContent_MakeAvailable(gulrak)
2 changes: 0 additions & 2 deletions lib/mayaUsd/fileio/jobs/readJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
#include <maya/MStatus.h>
#include <maya/MTime.h>

#include <ghc/filesystem.hpp>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

All these files aren't using filesystem, so removed the header.


#include <map>
#include <string>
#include <unordered_map>
Expand Down
2 changes: 0 additions & 2 deletions lib/usd/translators/shading/mtlxFileTextureReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@
#include <maya/MPlug.h>
#include <maya/MStatus.h>

#include <ghc/filesystem.hpp>

PXR_NAMESPACE_OPEN_SCOPE

class MtlxUsd_FileTextureReader : public MtlxUsd_BaseReader
Expand Down
2 changes: 0 additions & 2 deletions lib/usd/translators/shading/mtlxFileTextureWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
#include <maya/MStatus.h>
#include <maya/MString.h>

#include <ghc/filesystem.hpp>

#include <regex>

PXR_NAMESPACE_OPEN_SCOPE
Expand Down
2 changes: 0 additions & 2 deletions lib/usd/translators/shading/mtlxImageReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
#include <maya/MPlug.h>
#include <maya/MStatus.h>

#include <ghc/filesystem.hpp>

PXR_NAMESPACE_OPEN_SCOPE

class MtlxUsd_ImageReader : public MtlxUsd_BaseReader
Expand Down