diff --git a/CMakeLists.txt b/CMakeLists.txt index 083b369517e8..ee649dc7d86b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,16 +96,6 @@ if (NOT NUMA_LIBRARY) message(FATAL_ERROR "NUMA library not found") endif() - -CPMAddPackage( - NAME reflect - GITHUB_REPOSITORY boost-ext/reflect - GIT_TAG v1.1.1 -) -add_library(reflect INTERFACE) -target_include_directories(reflect SYSTEM INTERFACE ${reflect_SOURCE_DIR}) -add_library(reflect::reflect ALIAS reflect) - ############################################################################################################################ # Constructing interface libs for common compiler flags, header directories, and libraries # These interface libs are linked with PUBLIC scope at lowest common target (tt_metal/common) and at tt_metal_libs level @@ -142,6 +132,7 @@ endif() add_library(metal_header_directories INTERFACE) target_include_directories(metal_header_directories INTERFACE ${PROJECT_SOURCE_DIR}/tt_metal/hw/inc) +target_include_directories(metal_header_directories SYSTEM INTERFACE ${reflect_SOURCE_DIR}) foreach(lib ${BoostPackages}) target_include_directories(metal_header_directories INTERFACE ${Boost${lib}_SOURCE_DIR}/include) endforeach() diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake index 622489e7fdd9..025edeae1b89 100644 --- a/cmake/dependencies.cmake +++ b/cmake/dependencies.cmake @@ -48,3 +48,13 @@ if (googletest_ADDED) target_link_libraries(gtest PRIVATE c++ c++abi) target_link_libraries(gtest_main PRIVATE c++ c++abi) endif() + +############################################################################################################################ +# boost-ext reflect : https://github.com/boost-ext/reflect +############################################################################################################################ + +CPMAddPackage( + NAME reflect + GITHUB_REPOSITORY boost-ext/reflect + GIT_TAG v1.1.1 +) diff --git a/tests/tt_metal/tt_metal/CMakeLists.txt b/tests/tt_metal/tt_metal/CMakeLists.txt index 0ddd85d85192..e0bfbb805696 100644 --- a/tests/tt_metal/tt_metal/CMakeLists.txt +++ b/tests/tt_metal/tt_metal/CMakeLists.txt @@ -1,6 +1,6 @@ add_library(test_metal_common_libs INTERFACE) -target_link_libraries(test_metal_common_libs INTERFACE tt_metal test_common_libs reflect::reflect) +target_link_libraries(test_metal_common_libs INTERFACE tt_metal test_common_libs) set (TT_METAL_TESTS test_bmm @@ -41,7 +41,7 @@ set (TT_METAL_TESTS foreach (TEST ${TT_METAL_TESTS}) add_executable(${TEST} ${CMAKE_CURRENT_SOURCE_DIR}/${TEST}) - target_link_libraries(${TEST} PUBLIC test_metal_common_libs reflect::reflect) + target_link_libraries(${TEST} PUBLIC test_metal_common_libs) target_include_directories(${TEST} PRIVATE ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tests/tt_metal/tt_metal/unit_tests_common/CMakeLists.txt b/tests/tt_metal/tt_metal/unit_tests_common/CMakeLists.txt index 6d530fc084df..2c83963f163d 100644 --- a/tests/tt_metal/tt_metal/unit_tests_common/CMakeLists.txt +++ b/tests/tt_metal/tt_metal/unit_tests_common/CMakeLists.txt @@ -27,7 +27,7 @@ set(UNIT_TESTS_COMMON_SRC ${CMAKE_CURRENT_SOURCE_DIR}/watcher/test_waypoint.cpp ) add_library(unit_tests_common_o OBJECT ${UNIT_TESTS_COMMON_SRC}) -target_link_libraries(unit_tests_common_o PUBLIC compiler_flags metal_header_directories gtest gtest_main reflect::reflect) +target_link_libraries(unit_tests_common_o PUBLIC compiler_flags metal_header_directories gtest gtest_main) target_include_directories(unit_tests_common_o PUBLIC ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tests/ttnn/unit_tests/gtests/CMakeLists.txt b/tests/ttnn/unit_tests/gtests/CMakeLists.txt index 3bee41905b42..359a0301929b 100644 --- a/tests/ttnn/unit_tests/gtests/CMakeLists.txt +++ b/tests/ttnn/unit_tests/gtests/CMakeLists.txt @@ -9,7 +9,7 @@ set(TTNN_UNIT_TESTS_SRC add_executable(unit_tests_ttnn ${TTNN_UNIT_TESTS_SRC}) -target_link_libraries(unit_tests_ttnn PUBLIC test_common_libs ttnn_lib tt_metal tt_eager reflect::reflect) +target_link_libraries(unit_tests_ttnn PUBLIC test_common_libs ttnn_lib tt_metal tt_eager) target_include_directories(unit_tests_ttnn PRIVATE ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tt_eager/CMakeLists.txt b/tt_eager/CMakeLists.txt index 4cbcf1d24609..c98993e972be 100644 --- a/tt_eager/CMakeLists.txt +++ b/tt_eager/CMakeLists.txt @@ -11,7 +11,7 @@ set(TT_EAGER_OBJECTS # Defaults to a shared lib, static lib for production python wheel add_library(tt_eager ${TT_EAGER_OBJECTS}) -target_link_libraries(tt_eager PUBLIC compiler_flags linker_flags tt_metal ttnn_lib reflect::reflect) # linker_flags = -rdynamic if tracy enabled +target_link_libraries(tt_eager PUBLIC compiler_flags linker_flags tt_metal ttnn_lib) # linker_flags = -rdynamic if tracy enabled target_include_directories(tt_eager PUBLIC ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tt_eager/queue/CMakeLists.txt b/tt_eager/queue/CMakeLists.txt index 81a7b106b8ff..c6d7ab6ff292 100644 --- a/tt_eager/queue/CMakeLists.txt +++ b/tt_eager/queue/CMakeLists.txt @@ -4,7 +4,7 @@ set(QUEUE_SRCS ) add_library(queue OBJECT ${QUEUE_SRCS}) -target_link_libraries(queue PUBLIC metal_header_directories compiler_flags reflect::reflect) +target_link_libraries(queue PUBLIC metal_header_directories compiler_flags) target_include_directories(queue PUBLIC ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tt_eager/tensor/CMakeLists.txt b/tt_eager/tensor/CMakeLists.txt index 3f854da346e3..adfbdf2fede5 100644 --- a/tt_eager/tensor/CMakeLists.txt +++ b/tt_eager/tensor/CMakeLists.txt @@ -9,7 +9,7 @@ set(TENSOR_SRCS add_library(tensor OBJECT ${TENSOR_SRCS}) -target_link_libraries(tensor PUBLIC metal_header_directories compiler_flags reflect::reflect) +target_link_libraries(tensor PUBLIC metal_header_directories compiler_flags) target_include_directories(tensor PUBLIC ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tt_eager/tt_dnn/op_library/CMakeLists.txt b/tt_eager/tt_dnn/op_library/CMakeLists.txt index 1cd0e90bf0ad..0ca8aad97b00 100644 --- a/tt_eager/tt_dnn/op_library/CMakeLists.txt +++ b/tt_eager/tt_dnn/op_library/CMakeLists.txt @@ -219,7 +219,7 @@ set(TT_DNN_SRCS add_library(tt_dnn OBJECT ${TT_DNN_SRCS}) -target_link_libraries(tt_dnn PUBLIC metal_header_directories compiler_flags umd_device reflect::reflect) +target_link_libraries(tt_dnn PUBLIC metal_header_directories compiler_flags umd_device) target_include_directories(tt_dnn PUBLIC ${UMD_HOME} ${PROJECT_SOURCE_DIR} diff --git a/tt_metal/CMakeLists.txt b/tt_metal/CMakeLists.txt index 52c7ffd0f5a1..c32a79077dda 100644 --- a/tt_metal/CMakeLists.txt +++ b/tt_metal/CMakeLists.txt @@ -18,7 +18,7 @@ set(TT_METAL_OBJECTS add_library(tt_metal ${TT_METAL_OBJECTS}) -target_link_libraries(tt_metal PUBLIC umd_device metal_common_libs reflect::reflect) +target_link_libraries(tt_metal PUBLIC umd_device metal_common_libs) target_precompile_headers(tt_metal PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/third_party/magic_enum/magic_enum.hpp diff --git a/tt_metal/detail/CMakeLists.txt b/tt_metal/detail/CMakeLists.txt index ef2966ab15ab..f8a668b41296 100644 --- a/tt_metal/detail/CMakeLists.txt +++ b/tt_metal/detail/CMakeLists.txt @@ -4,4 +4,4 @@ set(DETAIL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/reports/memory_reporter.cpp) add_library(detail OBJECT ${DETAIL_SRC}) -target_link_libraries(detail PUBLIC common reflect::reflect) +target_link_libraries(detail PUBLIC common) diff --git a/tt_metal/impl/CMakeLists.txt b/tt_metal/impl/CMakeLists.txt index 8746bf5c30d9..957247652a22 100644 --- a/tt_metal/impl/CMakeLists.txt +++ b/tt_metal/impl/CMakeLists.txt @@ -21,7 +21,7 @@ set(IMPL_SRC ) add_library(impl OBJECT ${IMPL_SRC}) -target_link_libraries(impl PRIVATE Boost::smart_ptr reflect::reflect) +target_link_libraries(impl PRIVATE Boost::smart_ptr) target_link_libraries(impl PUBLIC common) target_include_directories(impl PUBLIC ${PROJECT_SOURCE_DIR}/tt_metal ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/tt_metal/jit_build/CMakeLists.txt b/tt_metal/jit_build/CMakeLists.txt index 2ddaf453110e..a6879db41d9e 100644 --- a/tt_metal/jit_build/CMakeLists.txt +++ b/tt_metal/jit_build/CMakeLists.txt @@ -7,4 +7,4 @@ set(JIT_BUILD_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/settings.cpp) add_library(jit_build OBJECT ${JIT_BUILD_SRCS}) -target_link_libraries(jit_build PUBLIC common reflect::reflect) +target_link_libraries(jit_build PUBLIC common) diff --git a/tt_metal/llrt/CMakeLists.txt b/tt_metal/llrt/CMakeLists.txt index 775759c825c5..62e097abc6ac 100644 --- a/tt_metal/llrt/CMakeLists.txt +++ b/tt_metal/llrt/CMakeLists.txt @@ -8,5 +8,5 @@ set(LLRT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/tt_memory.cpp) add_library(llrt OBJECT ${LLRT_SRC}) -target_link_libraries(llrt PUBLIC common reflect::reflect) +target_link_libraries(llrt PUBLIC common) target_compile_options(llrt PRIVATE -Wno-int-to-pointer-cast) diff --git a/tt_metal/tools/profiler/CMakeLists.txt b/tt_metal/tools/profiler/CMakeLists.txt index ea9d33729db6..691002c5b3e8 100644 --- a/tt_metal/tools/profiler/CMakeLists.txt +++ b/tt_metal/tools/profiler/CMakeLists.txt @@ -4,4 +4,4 @@ set(PROFILER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/tt_metal_profiler.cpp) add_library(profiler OBJECT ${PROFILER_SRC}) -target_link_libraries(profiler PUBLIC common reflect::reflect) +target_link_libraries(profiler PUBLIC common) diff --git a/ttnn/CMakeLists.txt b/ttnn/CMakeLists.txt index 6d3b1549c428..c8262b3a3a27 100644 --- a/ttnn/CMakeLists.txt +++ b/ttnn/CMakeLists.txt @@ -17,7 +17,7 @@ set(TTNN_SRCS add_library(ttnn_lib OBJECT ${TTNN_SRCS}) target_compile_options(ttnn_lib PUBLIC -MP -Wno-int-to-pointer-cast -fno-var-tracking) target_link_libraries(ttnn_lib - PUBLIC compiler_flags metal_header_directories metal_common_libs reflect::reflect + PUBLIC compiler_flags metal_header_directories metal_common_libs ) target_include_directories(ttnn_lib PUBLIC ${UMD_HOME}