You can&#39;t set CC and CXX and use them with the Visual Studio generators. Try using a makefile generator instead...<br><br>HTH,<br>David<br><br><br>On Thursday, September 22, 2011, Jaka Katrašnik &lt;<a href="mailto:jaka.katrasnik@gmail.com">jaka.katrasnik@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>&gt;<br>&gt; I&#39;m having trouble using cmake to compile a matlab mex file. When I try to to use cmake with the CC CXX environment variables set to mex I get the following error<br>&gt;<br>&gt; E:\Jaka_docs\cmake tutorial\step1&gt;cmake .<br>
&gt; -- Building for: Visual Studio 10<br>&gt; CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDet<br>&gt; ermineCCompiler.cmake:44 (MESSAGE):<br>&gt;   Could not find compiler set in environment variable CC:<br>
&gt;<br>&gt;   mex.<br>&gt; Call Stack (most recent call first):<br>&gt;   CMakeLists.txt:2 (project)<br>&gt;<br>&gt;<br>&gt; CMake Error: Could not find cmake module file:E:/Jaka_docs/cmake tutorial/step1/<br>&gt; CMakeFiles/CMakeCCompiler.cmake<br>
&gt; CMake Error: Could not find cmake module file:E:/Jaka_docs/cmake tutorial/step1/<br>&gt; CMakeFiles/CMakeCXXCompiler.cmake<br>&gt; -- Configuring incomplete, errors occurred!<br>&gt;<br>&gt;<br>&gt; Has anyone had a similar problem? Do you know of a solution to this?<br>
&gt;<br>&gt; Thank you<br>&gt; Jaka Katrasnik<br>&gt;<br>&gt;