简体   繁体   中英

Maintaining multiple builds for different compiler versions

I am developing a C++ library and I use a Makefile to compile and create a build. I wish to maintain multiple builds for different gcc compiler versions. What is the best way to do this?

If you are ready to go with autotools, autoconf/automake let you do this through out of tree builds . You can configure as many build you want if you separate each build into its own directory (not the source directory).

Configuring compiler and compiler options is usually a simple matter of bash command line.

mkdir mingw-build
cd mingw-build
CXX=mingw32-g++ ../myproject/configure ...
cd ..

mkdir native-build
cd native-build
CXX=g++ ../myproject/configure ...
cd ..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM