Skip to content

Commit 476a7d6

Browse files
committed
Fix cmake bug
1 parent bc7d01f commit 476a7d6

File tree

1 file changed

+20
-21
lines changed

1 file changed

+20
-21
lines changed

runtime/tests/nnfw_api/CMakeLists.txt

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ set_target_properties(nnfw_api_test_utils PROPERTIES POSITION_INDEPENDENT_CODE O
1717

1818
nnfw_find_package(ARMCompute QUIET)
1919
if(ARMCompute_FOUND)
20-
target_compile_definitions(nnfw_api_test_utils PRIVATE TEST_ACL_BACKEND)
20+
target_compile_definitions(nnfw_api_test_utils PUBLIC TEST_ACL_BACKEND)
2121
endif(ARMCompute_FOUND)
2222

2323
if(BUILD_XNNPACK_BACKEND)
2424
nnfw_find_package(Xnnpack QUIET)
2525
if(Xnnpack_FOUND)
26-
target_compile_definitions(nnfw_api_test_utils PRIVATE TEST_XNNPACK_BACKEND)
26+
target_compile_definitions(nnfw_api_test_utils PUBLIC TEST_XNNPACK_BACKEND)
2727
endif(Xnnpack_FOUND)
2828
endif(BUILD_XNNPACK_BACKEND)
2929

3030
nnfw_find_package(Opencl_Headers QUIET)
3131
if(Opencl_Headers_FOUND)
32-
target_compile_definitions(nnfw_api_test_utils PRIVATE TEST_GPU_CL_BACKEND)
32+
target_compile_definitions(nnfw_api_test_utils PUBLIC TEST_GPU_CL_BACKEND)
3333
endif(Opencl_Headers_FOUND)
3434

3535
set(RUNTIME_NNFW_API_TEST_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/lib ${CMAKE_CURRENT_SOURCE_DIR}/src)
@@ -61,48 +61,47 @@ endfunction()
6161

6262
# MathOps - Basic mathematical, comparison, and bitwise operations
6363
create_nnfw_test_group("MathOps"
64-
"src/GenModelTests/one_op_tests/MathOps/**/*.test.cc"
65-
"src/GenModelTests/one_op_tests/MathOps/**/*.test.cpp")
64+
"src/GenModelTests/one_op_tests/MathOps/*.test.cc"
65+
"src/GenModelTests/one_op_tests/MathOps/*.test.cpp")
6666

6767
# NeuralNetworkOps - Core neural network layer operations
6868
create_nnfw_test_group("NeuralNetworkOps"
69-
"src/GenModelTests/one_op_tests/NeuralNetworkOps/**/*.test.cc"
70-
"src/GenModelTests/one_op_tests/NeuralNetworkOps/**/*.test.cpp")
69+
"src/GenModelTests/one_op_tests/NeuralNetworkOps/*.test.cc"
70+
"src/GenModelTests/one_op_tests/NeuralNetworkOps/*.test.cpp")
7171

7272
# ActivationNormOps - Activation functions and normalization layers
7373
create_nnfw_test_group("ActivationNormOps"
74-
"src/GenModelTests/one_op_tests/ActivationNormOps/**/*.test.cc"
75-
"src/GenModelTests/one_op_tests/ActivationNormOps/**/*.test.cpp")
74+
"src/GenModelTests/one_op_tests/ActivationNormOps/*.test.cc")
7675

7776
# TensorDataOps - Operations that transform tensor data structures, shapes, layouts, and manipulate tensor data
7877
create_nnfw_test_group("TensorDataOps"
79-
"src/GenModelTests/one_op_tests/TensorDataOps/**/*.test.cc"
80-
"src/GenModelTests/one_op_tests/TensorDataOps/**/*.test.cpp")
78+
"src/GenModelTests/one_op_tests/TensorDataOps/*.test.cc"
79+
"src/GenModelTests/one_op_tests/TensorDataOps/*.test.cpp")
8180

8281
# IndexingDataOps - Data indexing, lookup, and generation operations
8382
create_nnfw_test_group("IndexingDataOps"
84-
"src/GenModelTests/one_op_tests/IndexingDataOps/**/*.test.cc"
85-
"src/GenModelTests/one_op_tests/IndexingDataOps/**/*.test.cpp")
83+
"src/GenModelTests/one_op_tests/IndexingDataOps/*.test.cc"
84+
"src/GenModelTests/one_op_tests/IndexingDataOps/*.test.cpp")
8685

8786
# ReductionStatsOps - Reduction operations and statistical computations
8887
create_nnfw_test_group("ReductionStatsOps"
89-
"src/GenModelTests/one_op_tests/ReductionStatsOps/**/*.test.cc"
90-
"src/GenModelTests/one_op_tests/ReductionStatsOps/**/*.test.cpp")
88+
"src/GenModelTests/one_op_tests/ReductionStatsOps/*.test.cc"
89+
"src/GenModelTests/one_op_tests/ReductionStatsOps/*.test.cpp")
9190

9291
# ControlFlowOps - Control flow and conditional execution operations
9392
create_nnfw_test_group("ControlFlowOps"
94-
"src/GenModelTests/one_op_tests/ControlFlowOps/**/*.test.cc"
95-
"src/GenModelTests/one_op_tests/ControlFlowOps/**/*.test.cpp")
93+
"src/GenModelTests/one_op_tests/ControlFlowOps/*.test.cc"
94+
"src/GenModelTests/one_op_tests/ControlFlowOps/*.test.cpp")
9695

9796
# TypeConversionOps - Data type conversion and quantization operations
9897
create_nnfw_test_group("TypeConversionOps"
99-
"src/GenModelTests/one_op_tests/TypeConversionOps/**/*.test.cc"
100-
"src/GenModelTests/one_op_tests/TypeConversionOps/**/*.test.cpp")
98+
"src/GenModelTests/one_op_tests/TypeConversionOps/*.test.cc"
99+
"src/GenModelTests/one_op_tests/TypeConversionOps/*.test.cpp")
101100

102101
# AdvancedSpecialOps - Advanced and special-purpose operations
103102
create_nnfw_test_group("AdvancedSpecialOps"
104-
"src/GenModelTests/one_op_tests/AdvancedSpecialOps/**/*.test.cc"
105-
"src/GenModelTests/one_op_tests/AdvancedSpecialOps/**/*.test.cpp")
103+
"src/GenModelTests/one_op_tests/AdvancedSpecialOps/*.test.cc"
104+
"src/GenModelTests/one_op_tests/AdvancedSpecialOps/*.test.cpp")
106105

107106
file(GLOB_RECURSE ONE_OP_TRAINS_SRC "src/GenModelTests/one_op_trains/*.test.cc" "src/GenModelTests/one_op_trains/*.test.cpp")
108107
add_executable(nnfw_api_gtest_one_op_trains main.cc ${ONE_OP_TRAINS_SRC})

0 commit comments

Comments
 (0)