Commit bb819abc authored by Artur Wojcik's avatar Artur Wojcik
Browse files

a few more changes

parent e276fc95
...@@ -439,7 +439,7 @@ if(NOT DEFINED INSTANCES_ONLY) ...@@ -439,7 +439,7 @@ if(NOT DEFINED INSTANCES_ONLY)
) )
add_subdirectory(example) add_subdirectory(example)
if(BUILD_TESTING) if(BUILD_TESTING)
add_subdirectory(test) add_subdirectory(test)
endif() endif()
rocm_package_setup_component(profiler rocm_package_setup_component(profiler
......
# SPDX-License-Identifier: MIT
# Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
include(FetchContent) include(FetchContent)
set(GOOGLETEST_DIR "" CACHE STRING "Location of local GoogleTest repo to build against") set(GOOGLETEST_DIR "" CACHE STRING "Location of local GoogleTest repo to build against")
...@@ -9,11 +6,8 @@ if(GOOGLETEST_DIR) ...@@ -9,11 +6,8 @@ if(GOOGLETEST_DIR)
set(FETCHCONTENT_SOURCE_DIR_GOOGLETEST ${GOOGLETEST_DIR} CACHE STRING "GoogleTest source directory override") set(FETCHCONTENT_SOURCE_DIR_GOOGLETEST ${GOOGLETEST_DIR} CACHE STRING "GoogleTest source directory override")
endif() endif()
set(BUILD_GMOCK OFF CACHE INTERNAL "")
set(INSTALL_GTEST OFF CACHE INTERNAL "")
FetchContent_Declare( FetchContent_Declare(
googletest GTest
GIT_REPOSITORY https://github.com/google/googletest.git GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571 GIT_TAG f8d7d77c06936315286eb55f8de22cd23c188571
SYSTEM SYSTEM
...@@ -23,22 +17,36 @@ if(WIN32) ...@@ -23,22 +17,36 @@ if(WIN32)
set(gtest_force_shared_crt ON CACHE_INTERNAL "") set(gtest_force_shared_crt ON CACHE_INTERNAL "")
endif() endif()
set(BUILD_GMOCK OFF CACHE INTERNAL "")
set(INSTALL_GTEST OFF CACHE INTERNAL "")
# Store the current value of BUILD_SHARED_LIBS # Store the current value of BUILD_SHARED_LIBS
set(__build_shared_libs ${BUILD_SHARED_LIBS}) set(__build_shared_libs ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "") set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(googletest) FetchContent_MakeAvailable(GTest)
# Restore the old value of BUILD_SHARED_LIBS # Restore the old value of BUILD_SHARED_LIBS
set(BUILD_SHARED_LIBS ${__build_shared_libs} CACHE BOOL "Type of libraries to build" FORCE) set(BUILD_SHARED_LIBS ${__build_shared_libs} CACHE BOOL "Type of libraries to build" FORCE)
set(BUILD_GMOCK OFF CACHE INTERNAL "")
set(INSTALL_GTEST OFF CACHE INTERNAL "")
set(GTEST_CXX_FLAGS set(GTEST_CXX_FLAGS
-Wno-undef -Wno-undef
-Wno-global-constructors -Wno-reserved-identifier
-Wno-zero-as-null-pointer-constant -Wno-global-constructors
-Wno-switch-enum -Wno-missing-noreturn
-Wno-float-equal -Wno-disabled-macro-expansion
-Wno-unused-member-function) -Wno-used-but-marked-unused
-Wno-switch-enum
-Wno-zero-as-null-pointer-constant
-Wno-unused-member-function
-Wno-comma
-Wno-old-style-cast
-Wno-deprecated
-Wno-unsafe-buffer-usage
)
if(WIN32) if(WIN32)
list(APPEND GTEST_CXX_FLAGS list(APPEND GTEST_CXX_FLAGS
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment