fix debug/release build propagation to sub projects

fix #1864: debug/release build propagation to sub projects