From e195a0418d86650e132737716059bff0ec80257f Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Tue, 12 Apr 2022 17:19:28 +0100 Subject: IVGCVSW-6710 Add compile of BareMetalDeserializedGraph sample Change-Id: Ice69c2a22f589f68d302f80500dfe4e514a796d2 Signed-off-by: Jim Flynn --- profiling/common/src/CMakeLists.txt | 6 ------ profiling/common/src/NetworkSockets.cpp | 4 ++++ profiling/common/src/Processes.cpp | 4 ++++ profiling/common/src/Threads.cpp | 4 ++++ 4 files changed, 12 insertions(+), 6 deletions(-) (limited to 'profiling/common/src') diff --git a/profiling/common/src/CMakeLists.txt b/profiling/common/src/CMakeLists.txt index 08d77c2b0f..54fd914bcf 100644 --- a/profiling/common/src/CMakeLists.txt +++ b/profiling/common/src/CMakeLists.txt @@ -21,12 +21,6 @@ include_directories(${PROJECT_SOURCE_DIR}/profiling/common/include) include_directories(${PROJECT_SOURCE_DIR}/common/include) - if(BUILD_UNIT_TESTS) - include_directories(${PROJECT_SOURCE_DIR}/src/profiling - ${PROJECT_SOURCE_DIR}/src/armnnUtils) - target_include_directories(UnitTests PRIVATE ${PROJECT_SOURCE_DIR}/profiling/common/include) - endif() - # will only build a static version of this common code # to simplify the build. No extra .so file to deploy to boards etc. add_library_ex(pipeCommon STATIC ${pipeCommon_sources}) diff --git a/profiling/common/src/NetworkSockets.cpp b/profiling/common/src/NetworkSockets.cpp index 15ad087d1e..84711c6215 100644 --- a/profiling/common/src/NetworkSockets.cpp +++ b/profiling/common/src/NetworkSockets.cpp @@ -3,6 +3,8 @@ // SPDX-License-Identifier: MIT // +#if !defined(ARMNN_DISABLE_SOCKETS) + #include #if defined(__unix__) || defined(__APPLE__) @@ -112,3 +114,5 @@ arm::pipe::Socket Accept(Socket s, sockaddr* addr, socklen_t* addrlen, int flags } // pipe } // arm + +#endif diff --git a/profiling/common/src/Processes.cpp b/profiling/common/src/Processes.cpp index 94e809529a..b8c2941e5a 100644 --- a/profiling/common/src/Processes.cpp +++ b/profiling/common/src/Processes.cpp @@ -18,11 +18,15 @@ namespace pipe int GetCurrentProcessId() { +#if !defined(ARMNN_DISABLE_PROCESSES) #if defined(__unix__) || defined(__APPLE__) return getpid(); #elif defined(_MSC_VER) return ::GetCurrentProcessId(); #endif +#else + return 0; +#endif } } // namespace pipe diff --git a/profiling/common/src/Threads.cpp b/profiling/common/src/Threads.cpp index 10533b77b9..d9e60167e8 100644 --- a/profiling/common/src/Threads.cpp +++ b/profiling/common/src/Threads.cpp @@ -26,6 +26,7 @@ namespace pipe int GetCurrentThreadId() { +#if !defined(ARMNN_DISABLE_THREADS) #if defined(__linux__) return static_cast(gettid()); #elif defined(_MSC_VER) @@ -39,6 +40,9 @@ int GetCurrentThreadId() } return static_cast(threadId); #endif +#else + return 0; +#endif } } // namespace pipe -- cgit v1.2.1