File tree 1 file changed +6
-5
lines changed
cmake/developer_package/api_validator
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: Apache-2.0
3
3
#
4
4
5
- function (ov_search_api_validator)
5
+ macro (ov_search_api_validator)
6
6
if (NOT ENABLE_API_VALIDATOR)
7
7
return ()
8
8
endif ()
@@ -15,8 +15,6 @@ function(ov_search_api_validator)
15
15
string (REPLACE "\\ " "" WINDOWS_SDK_VERSION $ENV{WindowsSDKVersion} )
16
16
set (CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION ${WINDOWS_SDK_VERSION} )
17
17
message (STATUS "Use ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} Windows SDK version" )
18
- # set to parent scope as well for later usage in '_ov_add_api_validator_post_build_step'
19
- set (CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION ${WINDOWS_SDK_VERSION} PARENT_SCOPE)
20
18
else ()
21
19
message (FATAL_ERROR "WindowsSDKVersion environment variable is not set,\
22
20
can't find Windows SDK version. Try to use vcvarsall.bat script" )
@@ -47,9 +45,12 @@ can't find Windows SDK version. Try to use vcvarsall.bat script")
47
45
message (STATUS "Found apivalidator: ${ONECORE_API_VALIDATOR} " )
48
46
endif ()
49
47
endif ()
50
- endfunction ()
48
+ endmacro ()
49
+
51
50
52
- ov_search_api_validator()
51
+ if (ENABLE_API_VALIDATOR)
52
+ ov_search_api_validator()
53
+ endif ()
53
54
54
55
function (_ov_add_api_validator_post_build_step_recursive)
55
56
cmake_parse_arguments (API_VALIDATOR "" "TARGET" "" ${ARGN} )
You can’t perform that action at this time.
0 commit comments