Removing some source files from Unreal build

I have bunch of hpp and cpp files in ThirdParty folder. It looks like Unreal project generation and build system tries to compile all hpp and cpp files found in this folder. I would like to exclude some of these files from compilation. Is there any way to do this?