Only oil I know of that is recommended for both gasoline and diesel engines is Shell Rotella T6 which is a full synthetic oil. I use it in everything, boat, motorcycle, lawnmower, car, truck and of course my diesel tractors and RTV.
Most oils are recommended for only one type of engine. Diesel oil usually has a higher detergent additive than motor oil for a gasoline engine to deal with the carbon from the diesel. As for the weight of the motor oil, you need to observe the OEM recommendation for temperatures. The Shell T6 is 5W40 which is ok for me to use in everything including my Honda CRV that recommends 0W20. I personally wont run 20W oil in anything, it is my opinion that when hot, 20W oil is just too thin for proper lubrication.
Using just one oil that suits my situation saves me lots of space on my shelves and I don't end up with half a dozen different oil cans and partially full cans to deal with.
I know that manufacturers of cars thin the oil as much as possible to squeeze another MPG from the engines so they can meet the EPA requirements. I am not as concerned about getting 30 MPG vs 29 MPG as I am about engine longevity most especially in the new high revving, high HP 4 cylinder engines.