Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Protopipe] Move version from cmake file to header file but keep sha in cmake file (#30967)

fcmironfc937cc05c95
diff --git a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt b/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt
index c77fa6ae689..38b0e941721 100644
--- a/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt
+++ b/src/plugins/intel_npu/tools/protopipe/CMakeLists.txt
@@ -5,17 +5,6 @@
set(TARGET_NAME protopipe)
-if (NOT DEFINED PROJECT_NAME)
- set(STANDALONE true)
-endif()
-
-# Enable CMP0048 policy
-if(POLICY CMP0048)
- cmake_policy(SET CMP0048 NEW)
-endif()
-
-project(protopipe VERSION 1.0.0)
-
execute_process(
COMMAND git rev-parse --short HEAD
OUTPUT_VARIABLE GIT_SHA
@@ -28,12 +17,13 @@ configure_file(
@ONLY
)
-if (STANDALONE)
+if (NOT DEFINED PROJECT_NAME)
if(WIN32)
cmake_minimum_required(VERSION 3.16)
else()
cmake_minimum_required(VERSION 3.13)
endif()
+ project(protopipe_standalone)
include("cmake/standalone.cmake")
return()
endif()
diff --git a/src/plugins/intel_npu/tools/protopipe/version.hpp.in b/src/plugins/intel_npu/tools/protopipe/version.hpp.in
index 7870c90c703..e1ca909d49a 100644
--- a/src/plugins/intel_npu/tools/protopipe/version.hpp.in
+++ b/src/plugins/intel_npu/tools/protopipe/version.hpp.in
@@ -1,8 +1,3 @@
#pragma once
-#define VERSION_MAJOR "@PROJECT_VERSION_MAJOR@"
-#define VERSION_MINOR "@PROJECT_VERSION_MINOR@"
-#define VERSION_PATCH "@PROJECT_VERSION_PATCH@"
-#define VERSION_SHA "@GIT_SHA@"
-
-#define APP_VERSION "v@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@-@GIT_SHA@"
+#define APP_VERSION "v1.0.0-@GIT_SHA@"