<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>I’m experimenting with using a compiler other than my system compiler (gcc 4.4.3) on my linux system. I’ve built gcc 4.7.2, and installed it. Everything works when I build only on my local system, but I have a large cluster of computers available on an
ice cream (icecc) network that I can use to speed up compiles. I am able to build a simple hello world on the command line with ice cream. However cmake does something strange which means it thinks the compiler is broke.</div>
<div> </div>
<div>I have found a work around, which means settings environment variables ICECC_CC, ICECC_CXX and ICECC_VERSION, and then use /usr/bin/icecc as the compiler. However I want to set these once at cmake time and have them persists. Tests show that this is
not happening, while they are set I can build as expected. However when I log out and return cmake/ice cream will use the system compiler the next time unless I remember to set these variables. This is okay for tests, but I’m getting ready to spread this
process to others and I know someone will forget to set the right environment variables and thus not use the compiler they want to use. My question is how can I have cmake look at these variables and make sure they are set in my make/ninja files every time
I build.</div>
<div> </div>
<div>Note that while we can possibly consider it a bug in my system setup that I need to set ICECC_CC and ICECC_CXX; but ICECC_VERSION is something the user needs to set. Thus I really want cmake to make sure this variable is set the same as the first run
of cmake. </div>
<div> </div>
<div>I’m using cmake 2.8.11</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div>cmake -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc-4.8 -DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++-4.8 ../GSD</div>
<div>-- The C compiler identification is unknown</div>
<div>-- The CXX compiler identification is unknown</div>
<div>-- Check for working C compiler: /usr/lib/icecc/bin/gcc-4.8</div>
<div>CMake Error: your C compiler: "/usr/lib/icecc/bin/gcc-4.8" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.</div>
<div>CMake Error: Internal CMake error, TryCompile configure of cmake failed</div>
<div>-- Check for working C compiler: /usr/lib/icecc/bin/gcc-4.8 -- broken</div>
<div>CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):</div>
<div> The C compiler "/usr/lib/icecc/bin/gcc-4.8" is not able to compile a simple</div>
<div> test program.</div>
<div> </div>
<div> It fails with the following output:</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> CMake will not be able to correctly generate this project.</div>
<div>Call Stack (most recent call first):</div>
<div> CMakeLists.txt:19 (PROJECT)</div>
<div> </div>
<div> </div>
<div>CMake Error: your C compiler: "/usr/lib/icecc/bin/gcc-4.8" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.</div>
<div>CMake Error: your CXX compiler: "/usr/lib/icecc/bin/g++-4.8" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.</div>
<div>-- Configuring incomplete, errors occurred!</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div> CMake will not be able to correctly generate this project.</div>
<div>Call Stack (most recent call first):</div>
<div> CMakeLists.txt:19 (PROJECT)</div>
<div> </div>
<div> </div>
<div>-- Configuring incomplete, errors occurred!</div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
</body>
</html>