[CMake] CMAKE - troubles finding executables/paths - Windows 7 / MinGW

Bill Lorensen bill.lorensen at gmail.com
Tue May 31 12:57:24 EDT 2011


Steve,

I'm not sure why cmake won't find mingw's make. I build with mingw
every day. If I run the cmake gui from a fresh build tree, I get the
same error. Then I use the gui to browse to the location of make.exe
and then all runs fine.

Bill


On Tue, May 31, 2011 at 12:08 PM, Steve Westenbroek <smwesten at usgs.gov> wrote:
> [disclaimer: portions of the text below is from an earlier contribution that
> I made to stackoverflow.com; I'll cross-post any solutions as well!]
>
> Greetings,
>
> I have reached the end of my rope with Cmake; it has so much potential, but
> I cannot seem to make it find the basic system tools (i.e. "make") in order
> to function.
>
> SYMPTOMS
>
> Cmake and the Cmake GUI produce the following (after deleting the
> CMakeCache.txt file):
>
> Processing top-level CMakelists.txt for project swb
> 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.
>
> I am focusing on finding "make" in this question, however, I've also had
> many of the same issues with CMake failing to find libraries and other
> utility files (linker, nm, ar, etc.). The techniques I list below seem to
> enable CMake to find these files when running under Linux.
>
> SYSTEM
>
> Windows 7 (64-bit); multiple versions of MinGW (32-bit/64-bit); Cmake 2.8.4;
> NONSTANDARD install location for MinGW (c:/MinGW-32 ).
>
> THINGS I HAVE TRIED
>
> 1) CMakelists.txt contains "SET( CMAKE_MAKE_PROGRAM c:/MinGW-32/bin/make.exe
> FORCE )" within the first 10 lines of the file.
>
> 2) Previous versions of CMakelists.txt contained:
>
>  find_program(CMAKE_MAKE_PROGRAM
>   NAMES make
>         make.exe
>   DOC "Find a suitable make program for building under Windows/MinGW"
>   HINTS c:/MinGW-32/bin )
>
> 3) Set CMAKE_MAKE_PROGRAM in a cmd.exe environment variable prior to running
> either CMake or CMake-GUI.
>
> 4) Use of a "toolchain" file which identifies CMAKE_MAKE_PROGRAM as well as
> CMAKE_C_COMPILER, etc.
>
> QUESTION(S)
>
> How does one enable CMake to find my make program without user intervention
> with the Windows 7 (64-bit) / MinGW combination? Nothing I have tried thus
> far seems to make any difference; Cmake simply is unable to find "make.exe"
> even when explicitly given the fully qualified name.
>
> Thanks!
>
>  - Steve Westenbroek
> _______________________________________________
> 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
>


More information about the CMake mailing list