[CMake] Best way to build and test same project with different compilers?

Rolf Eike Beer eike at sf-mail.de
Fri May 17 12:18:53 EDT 2013


Zaak Beekman wrote:
> Hi,
> I'm pretty new to CMake/CTest, and I was wondering what the best way to
> switch between compilers is when testing and building the same project with
> multiple compilers. It seems deleting the CMake cache from cmake-gui
> doesn't always work to switch compilers (which I am specifying with `export
> CC=icc; export CXX=icpc; export FC=ifort` in my environment). It would be
> great if I could have multiple build directories, one for each compiler. Is
> there a good way to do this, possibly in CMakeLists.txt?

Use different binary dirs, one for each compiler.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130517/4755095c/attachment.pgp>


More information about the CMake mailing list