diff --git a/cmake/generic.cmake b/cmake/generic.cmake index 1bf77867b098db5470dff0c5e17d78731198e054..3d05bad64b3bfebf861625cdaedc3e4fa777b019 100644 --- a/cmake/generic.cmake +++ b/cmake/generic.cmake @@ -303,8 +303,12 @@ function(cc_library TARGET_NAME) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${source}.h) list(APPEND cc_library_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/${source}.h) endif() - if(NOT ${source_file} MATCHES "framework.pb.cc") - list(APPEND full_path_src ${CMAKE_CURRENT_SOURCE_DIR}/${source_file}) + if(${source_file} MATCHES "__generated_code__.cc") + list(APPEND full_path_src ${source_file}) + else() + if(NOT ${source_file} MATCHES "framework.pb.cc") + list(APPEND full_path_src ${CMAKE_CURRENT_SOURCE_DIR}/${source_file}) + endif() endif() endforeach() set(__lite_cc_files ${__lite_cc_files} ${full_path_src} CACHE INTERNAL "") diff --git a/lite/core/mir/memory_optimize_pass.cc b/lite/core/mir/memory_optimize_pass.cc index 6956e805c673d8776d7bdd414dce0a5ddfcd965a..ef6dfcff0980b4831c446f7abe501a0752b26508 100644 --- a/lite/core/mir/memory_optimize_pass.cc +++ b/lite/core/mir/memory_optimize_pass.cc @@ -77,7 +77,6 @@ void MemoryOptimizePass::CollectLifeCycleByDevice( auto outputs = op_node->outlinks; std::vector requires(inputs.begin(), inputs.end()); requires.insert(requires.end(), outputs.begin(), outputs.end()); - auto& stmt = op_node->AsStmt(); for (Node* node : requires) { CHECK(node->IsArg()); auto& arg = node->AsArg();