[CMake] Question of using cmake in Windows

2014-06-23 Thread jici gao
Hi,

I am using cmake (3.0.0) to setup environment for my compiling on Windows
and require mingw-w64 compiler. I pretty much followed your instruction
with Method 2 here:
http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F

But cmake output always showed that it is building for Visual Studio 12
2013 and the c compiler identification is MSVC 18.0.21005.1 not the
mingw-w64 compiler I want.

I usually deleted all files under the build subdir to remove cached stuff
before start over.

However the cmake gui version is much better which allows to delete the
cached stuff and then I can specify the generator for the making, say
MinGW. I was able to specify the right compiler.

So why only cmake gui version works for me, not the cmake command?

Thanks in advance.
Jici
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread Bill Hoffman

On 6/23/2014 12:24 PM, jici gao wrote:


So why only cmake gui version works for me, not the cmake command?
Use the -G option to the cmake on the command line to pick a generator. 
 cmake --help should list the ones supported by your version of cmake.



-Bill

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread jici gao
Ok, run cmake -G MinGW Makefiles
-DCMAKE_C_COMPILER=/c/mingw-w64-4.9.0/mingw64/bin
I got this error:
CMake Error: the source directory  does not appear to contain
CMakeLists.txt

What I am missing?

Thanks again!


On Mon, Jun 23, 2014 at 9:32 AM, Bill Hoffman bill.hoff...@kitware.com
wrote:

 On 6/23/2014 12:24 PM, jici gao wrote:


 So why only cmake gui version works for me, not the cmake command?

 Use the -G option to the cmake on the command line to pick a generator.
  cmake --help should list the ones supported by your version of cmake.


 -Bill

 --

 Powered by www.kitware.com

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

 Kitware offers various services to support the CMake community. For more
 information on each offering, please visit:

 CMake Support: http://cmake.org/cmake/help/support.html
 CMake Consulting: http://cmake.org/cmake/help/consulting.html
 CMake Training Courses: http://cmake.org/cmake/help/training.html

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

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/cmake

-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread John Drescher
 Ok, run cmake -G MinGW Makefiles
 -DCMAKE_C_COMPILER=/c/mingw-w64-4.9.0/mingw64/bin
 I got this error:
 CMake Error: the source directory  does not appear to contain
 CMakeLists.txt

 What I am missing?


You are not passing the folder of the source.

John
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake