Re: [CMake] One project, one platform, 2 compilers

2011-11-21 Thread Michael Hertling
On 11/18/2011 06:17 PM, Paul Hansen wrote: Thank you very much for the answers, David and Michael. I am trying to get a QNX compiler to work with CMake. My host comp runs Ubuntu. I did: cmake -G Unix Makefiles -D CMAKE_C_COMPILER=qcc -D CMAKE_CXX_COMPILER=QCC .. but get

Re: [CMake] One project, one platform, 2 compilers

2011-11-18 Thread Michael Hertling
On 11/17/2011 05:18 PM, Paul Hansen wrote: Hi I have a project that has to be compiled with two different compilers on the same computer. Can I do that from the same CMakeLists.txt file? What do you mean exactly? (1) Compile the project twice, each time completely with a different

Re: [CMake] One project, one platform, 2 compilers

2011-11-18 Thread Paul Hansen
Thank you very much for the answers, David and Michael. I am trying to get a QNX compiler to work with CMake. My host comp runs Ubuntu. I did: cmake -G Unix Makefiles -D CMAKE_C_COMPILER=qcc -D CMAKE_CXX_COMPILER=QCC .. but get dpkg-architecture: warning: Couldn't determine gcc system type,

[CMake] One project, one platform, 2 compilers

2011-11-17 Thread Paul Hansen
Hi I have a project that has to be compiled with two different compilers on the same computer. Can I do that from the same CMakeLists.txt file? Specifically I am wondering: - CMake finds a compiler and makes a test. A colleague has tried to change the compiler variables but CMake made the test

Re: [CMake] One project, one platform, 2 compilers

2011-11-17 Thread David Cole
To use two different compilers, you simply need two different build trees. Same CMakeLists file, but different build trees. You should not specify the compiler in your CMakeLists.txt files at all, but rather set CC and CXX env vars to control the compiler when first generating a build tree. See