You can'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 <<a href="mailto:jaka.katrasnik@gmail.com">jaka.katrasnik@gmail.com</a>> wrote:<br>
> Hi,<br>><br>> I'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>><br>> E:\Jaka_docs\cmake tutorial\step1>cmake .<br>
> -- Building for: Visual Studio 10<br>> CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDet<br>> ermineCCompiler.cmake:44 (MESSAGE):<br>> Could not find compiler set in environment variable CC:<br>
><br>> mex.<br>> Call Stack (most recent call first):<br>> CMakeLists.txt:2 (project)<br>><br>><br>> CMake Error: Could not find cmake module file:E:/Jaka_docs/cmake tutorial/step1/<br>> CMakeFiles/CMakeCCompiler.cmake<br>
> CMake Error: Could not find cmake module file:E:/Jaka_docs/cmake tutorial/step1/<br>> CMakeFiles/CMakeCXXCompiler.cmake<br>> -- Configuring incomplete, errors occurred!<br>><br>><br>> Has anyone had a similar problem? Do you know of a solution to this?<br>
><br>> Thank you<br>> Jaka Katrasnik<br>><br>>