diff --git a/paddle/fluid/framework/CMakeLists.txt b/paddle/fluid/framework/CMakeLists.txt index fc20b61f36a209b21a335a7b122d7396575da5b9..c9b6213cf680c64ab88c9ae284e57bb3cec04acc 100755 --- a/paddle/fluid/framework/CMakeLists.txt +++ b/paddle/fluid/framework/CMakeLists.txt @@ -1208,6 +1208,13 @@ else() SRCS convert_utils.cc DEPS data_type place) endif() + +# every source file that includes "dnnl.h" must depends on mkldnn +# or, the first one should depends on mkldnn +if(WITH_MKLDNN) + add_dependencies(fluid_convert_utils mkldnn) +endif() + cc_test( convert_utils_test SRCS convert_utils_test.cc