setup optimization for C++ complier and linker