file(GLOB_RECURSE SOURCES "src/*.cpp")
+file(GLOB_RECURSE TESTS "src/*.test.cpp")
+list(REMOVE_ITEM SOURCES ${TESTS})
add_library(enco_core STATIC ${SOURCES})
set_target_properties(enco_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(enco_core PUBLIC include)
target_link_libraries(enco_core coco_core)
target_link_libraries(enco_core coco_generic)
+
+nncc_find_package(GTest QUIET)
+
+if(NOT GTest_FOUND)
+ return()
+endif(NOT GTest_FOUND)
+
+add_executable(enco_core_test ${TESTS})
+target_link_libraries(enco_core_test gtest_main)
+target_link_libraries(enco_core_test enco_core)
+add_test(enco_core_test enco_core_test)
--- /dev/null
+#ifndef __ANN_IR_DTYPE_H__
+#define __ANN_IR_DTYPE_H__
+
+#include <cstdint>
+
+namespace ann
+{
+
+enum class DType
+{
+ UNK,
+ S32,
+ F32
+};
+
+template <typename T> DType dtype(void);
+
+} // namespace ann
+
+#endif // __ANN_IR_DTYPE_H__
--- /dev/null
+#include "DType.h"
+
+#include <gtest/gtest.h>
+
+TEST(ANN_IR_DTYPE, dtype)
+{
+ ASSERT_EQ(ann::dtype<int>(), ann::DType::S32);
+ ASSERT_EQ(ann::dtype<float>(), ann::DType::F32);
+}