diff --git a/source/op/pt/CMakeLists.txt b/source/op/pt/CMakeLists.txt index 46ea38c193..c7df0d40eb 100644 --- a/source/op/pt/CMakeLists.txt +++ b/source/op/pt/CMakeLists.txt @@ -13,6 +13,7 @@ find_package(MPI) if(MPI_FOUND) target_link_libraries(deepmd_op_pt INTERFACE MPI::MPI_CXX) target_compile_definitions(deepmd_op_pt PRIVATE USE_MPI) + set(CMAKE_CXX_COMPILER mpicxx) endif() if(CMAKE_TESTING_ENABLED)