thank you  Eric, I try to do what you explained,I don't if I got it correctly
I got the same message, may I miss something

OK I see, this is not the way it works.
> 1) You write a CMakeLists.txt and associated C/C++ files in a folder
> 2) You create another directory
> 3) You ask CMake to **generate** the Code Blocks project from the
> CMakeLists.txt

I did the following things:
1-create a folder pCMake1 and put CMakeLists.txt and main.cpp
2-create a bin foler in pCMake1
3-run cmake-gui and put
source code c:/pCMake1
binaries c:/pCMakes1/Bin

then push Generate it asks:
specify generator : CodeBlocks -MinGW MakesFiles
check use default native compiler

I check that the path variable are there CMake2.8 and CodeBlocks/MinGW

and I get:
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.

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.

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.

Missing variable is:

CMAKE_C_COMPILER_ENV_VAR







---- Message d'origine ----
>De : "Eric Noulard" <eric.noul...@gmail.com>
>À : paspa...@noos.fr
>Objet : Re: Re: [CMake] message could not create named generator CodeBlocks -MinGW Makefiles
>Date : 17/02/2012 13:18:15 CET
>Copie à : cmake@cmake.org
>
>2012/2/17 <paspa...@noos.fr>:
> > Hello Eric,
> >
> > thank you for your suggestions and support
> >
> > I am going to try to detail more what I did:
> >
> > - Install CMake on Program Files/CMake 2.8/bin
> > - Install CodeBlocks with its windows installer at the same time he asks
> if
> > we want the gcc compiler I said ok
> > and he installed MinGW in Program Files/CodeBlocks/MinGW
> > - as you suggested he didn't set the path variable so now the path
> variable
> > are:
> > C:\Program Files\CMake 2.8\bin;C:\Program Files\CodeBlocks\MinGW;
> > - I created a codeblock printhello project named pCMake
> >
> > then at this step I didn't know what to do exactly:
> >
> > First Attempt:
> > I put a CMakeLists.txt file in the codeblocks "Others" folders with the
> file
> > containing:
> > cmake_minimum_required(2.8)
> > project(pCMake)
> > add_executable(pCMake main.cpp)
> >
> > and in the Project Properties/Project Settings : I set :
> > Makefile:CMakeLists and check "This is a custom MakeFile"
>
> OK I see, this is not the way it works.
> 1) You write a CMakeLists.txt and associated C/C++ files in a folder
> 2) You create another directory
> 3) You ask CMake to **generate** the Code Blocks project from the
> CMakeLists.txt
>
> May be you could read the beginning of thoses documents:
> http://www.cmake.org/cmake/help/cmake_tutorial.html
> https://github.com/TheErk/CMake-tutorial/raw/master/CMake-tutorial-8feb2012.p
> df
>
> in order to have a better idea of the CMake workflow.
>
>
> > Second Attempt:
> > use CMake cmake-gui interface
> > where is the source code:C:\pCMake
> > where to buid the binaries:C:\pCMake
>
> It is better habit to have separate directories for sources and binaries.
> see:
> http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees
>
>
> > I push the button: Generate
> > specify the generator for this project:
> > select in the combo :CodeBlocks-MinGW MakeFiles
> > check Use Default native compilers
> >
> > result:
> > CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
> >
> > cmake_minimum_required called with unknown argument "2.8"
>
> you have a syntax error in your CMakeLists.txt
> you should write
> cmake_minimum_required(VERSION 2.8)
>
> read on the documentation:
> http://www.cmake.org/cmake/help/documentation.html
>
> > 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.
>
> find "make.exe" program in your Code::Blocks install and add the path to it
> to your PATH.
>
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to