Which env was changed with cmake --config command

I used some opensource libraries in my own project with cmake, the build type is release by default with cmake --build . command, but the build type of opensource libraries becomes debug, it will be ok if I use cmake --build . --config Release command, so how can I keep same build type with opensource libraries? also which env is changed with --config parameter?