<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transational//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=UTF-8">
</HEAD>
<BODY>thank you Eric, I try to do what you explained,I don't if I got it correctly<br>I got the same message, may I miss something<br><br> OK I see, this is not the way it works.<br>
> 1) You write a CMakeLists.txt and associated C/C++ files in a folder<br>
> 2) You create another directory<br>
> 3) You ask CMake to **generate** the Code Blocks project from the <br>
> CMakeLists.txt<br><br>I did the following things:<br>1-create a folder pCMake1 and put CMakeLists.txt and main.cpp<br>2-create a bin foler in pCMake1<br>3-run cmake-gui and put <br>source code c:/pCMake1<br>binaries c:/pCMakes1/Bin<br><br>then push Generate it asks:<br>specify generator : CodeBlocks -MinGW MakesFiles<br>check use default native compiler<br><br>I check that the path variable are there CMake2.8 and CodeBlocks/MinGW<br><br>and I get:<span style=" color:#ff0000;"><br>CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.</span>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">Missing variable is:</span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ff0000;">CMAKE_C_COMPILER_ENV_VAR</span></p><br><br><br><br><br><br>
---- Message d'origine ----<br>
>De : "Eric Noulard" <eric.noulard@gmail.com><br>
>À : pasparis@noos.fr<br>
>Objet : Re: Re: [CMake] message could not create named generator CodeBlocks -MinGW Makefiles<br>
>Date : 17/02/2012 13:18:15 CET<br>
>Copie à : cmake@cmake.org<br>
><br>
>2012/2/17 <pasparis@noos.fr>:<br>
> > Hello Eric,<br>
> ><br>
> > thank you for your suggestions and support<br>
> ><br>
> > I am going to try to detail more what I did:<br>
> ><br>
> > - Install CMake on Program Files/CMake 2.8/bin<br>
> > - Install CodeBlocks with its windows installer at the same time he asks <br>
> if<br>
> > we want the gcc compiler I said ok<br>
> > and he installed MinGW in Program Files/CodeBlocks/MinGW<br>
> > - as you suggested he didn't set the path variable so now the path <br>
> variable<br>
> > are:<br>
> > C:\Program Files\CMake 2.8\bin;C:\Program Files\CodeBlocks\MinGW;<br>
> > - I created a codeblock printhello project named pCMake<br>
> ><br>
> > then at this step I didn't know what to do exactly:<br>
> ><br>
> > First Attempt:<br>
> > I put a CMakeLists.txt file in the codeblocks "Others" folders with the <br>
> file<br>
> > containing:<br>
> > cmake_minimum_required(2.8)<br>
> > project(pCMake)<br>
> > add_executable(pCMake main.cpp)<br>
> ><br>
> > and in the Project Properties/Project Settings : I set :<br>
> > Makefile:CMakeLists and check "This is a custom MakeFile"<br>
> <br>
> OK I see, this is not the way it works.<br>
> 1) You write a CMakeLists.txt and associated C/C++ files in a folder<br>
> 2) You create another directory<br>
> 3) You ask CMake to **generate** the Code Blocks project from the <br>
> CMakeLists.txt<br>
> <br>
> May be you could read the beginning of thoses documents:<br>
> http://www.cmake.org/cmake/help/cmake_tutorial.html<br>
> https://github.com/TheErk/CMake-tutorial/raw/master/CMake-tutorial-8feb2012.p<br>
> df<br>
> <br>
> in order to have a better idea of the CMake workflow.<br>
> <br>
> <br>
> > Second Attempt:<br>
> > use CMake cmake-gui interface<br>
> > where is the source code:C:\pCMake<br>
> > where to buid the binaries:C:\pCMake<br>
> <br>
> It is better habit to have separate directories for sources and binaries.<br>
> see:<br>
> http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees<br>
> <br>
> <br>
> > I push the button: Generate<br>
> > specify the generator for this project:<br>
> > select in the combo :CodeBlocks-MinGW MakeFiles<br>
> > check Use Default native compilers<br>
> ><br>
> > result:<br>
> > CMake Error at CMakeLists.txt:1 (cmake_minimum_required):<br>
> ><br>
> > cmake_minimum_required called with unknown argument "2.8"<br>
> <br>
> you have a syntax error in your CMakeLists.txt<br>
> you should write<br>
> cmake_minimum_required(VERSION 2.8)<br>
> <br>
> read on the documentation:<br>
> http://www.cmake.org/cmake/help/documentation.html<br>
> <br>
> > CMake Error: CMake was unable to find a build program corresponding to<br>
> > "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to<br>
> > select a different build tool.<br>
> <br>
> find "make.exe" program in your Code::Blocks install and add the path to it<br>
> to your PATH.<br>
> <br>
> <br>
> <br>
> -- <br>
> Erk<br>
> Membre de l'April - « promouvoir et défendre le logiciel libre » -<br>
> http://www.april.org<br>
> </BODY></HTML>