aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRob Hughes <robert.hughes@arm.com>2020-01-07 09:40:12 +0000
committerRob Hughes <robert.hughes@arm.com>2020-01-24 11:26:42 +0000
commita91479cdcc4e8206a12f43838b0bbdc6ef7f6bb0 (patch)
tree831e2107c7a6f981f77a6609d812f7178a17066c /CMakeLists.txt
parentd466a54e79560f0ccacc6b13cd64e08defbac47c (diff)
downloadarmnn-a91479cdcc4e8206a12f43838b0bbdc6ef7f6bb0.tar.gz
Add ARMNN_DLLEXPORT macro to import/export static data symbols on Windows
Armnn has several static data symbols that are needed by the unit tests. These are now explicitly marked for import when that header is included from the unit test code. See also https://cmake.org/cmake/help/v3.4/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html. Change-Id: I4e71ba659b6321659a1396125b5a9c271578040f Signed-off-by: Robert Hughes <robert.hughes@arm.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 91b9909a08..4c8c3870c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -364,6 +364,7 @@ list(APPEND armnn_sources
src/armnn/CompatibleTypes.hpp
src/armnn/Descriptors.cpp
src/armnn/DeviceSpec.hpp
+ src/armnn/DllExport.hpp
src/armnn/DynamicQuantizationVisitor.cpp
src/armnn/DynamicQuantizationVisitor.hpp
src/armnn/Exceptions.cpp
@@ -529,6 +530,8 @@ endforeach()
add_library_ex(armnn SHARED ${armnn_sources})
+target_compile_definitions(armnn PRIVATE "ARMNN_COMPILING_DLL")
+
target_include_directories(armnn PRIVATE src/armnn)
target_include_directories(armnn PRIVATE src/armnnUtils)
target_include_directories(armnn PRIVATE src/backends)
@@ -743,15 +746,15 @@ if(BUILD_UNIT_TESTS)
src/armnnTfLiteParser/test/GetSubgraphInputsOutputs.cpp
src/armnnTfLiteParser/test/GetInputsOutputs.cpp
)
-
- # Generate SchemaText.cpp file which contains the TfLite schema text as a
+
+ # Generate SchemaText.cpp file which contains the TfLite schema text as a
# static C-array of bytes. This is needed at runtime for TfLite parser tests.
add_custom_command(
OUTPUT SchemaText.cpp
COMMAND cp ${TF_LITE_SCHEMA_INCLUDE_PATH}/schema.fbs g_TfLiteSchemaText
COMMAND xxd -i g_TfLiteSchemaText SchemaText.cpp
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- DEPENDS ${TF_LITE_SCHEMA_INCLUDE_PATH}/schema.fbs
+ DEPENDS ${TF_LITE_SCHEMA_INCLUDE_PATH}/schema.fbs
)
list(APPEND unittest_sources ${CMAKE_CURRENT_BINARY_DIR}/SchemaText.cpp)
endif()