Smoking while living in Texas.

Does anyone know if it’s illegal to smoke weed while your pregnant? My husband said his ex smoked her entire pregnancy and the dr even suggested it, over taking pills. I’m just nervous that CPS will get involved. Has anyone tested positive for marijuana at birth?