He made the remarks during a meeting with a Chinese delegation here, Radio Pakistan reported.
During the meeting, Sharif told the delegation that the military Operation 'Zarb-e-Azb' to flush out terrorists from the North Waziristan has produced very positive results.
He said all terror groups would be targeted irrespective of their agenda and affiliation.
The Prime Minister said friendship with China is the cornerstone of Pakistan's foreign policy.
Also Read
He said institutional exchanges between the parliamentarians are imperative to further promote bilateral friendship.
The prime minister regretted postponement of President Xi Jinping's visit to Pakistan in September and said the people of his country are eagerly looking forward to welcoming him.
Leader of the Chinese delegation Chen Fengxiang expressed sympathy with the bereaved families of Peshawar massacre and extended his country's full support to government of Pakistan.
Separately, Defence Minister Khawaja Asif said security forces are taking all possible steps to eradicate terrorism.
To a question about joint working of Pakistan and Afghanistan, the defense minister said both the countries need to work together to uproot terrorism.
All political parties are unanimous to eliminate terrorism in the country, he said in response to a question.