[CMake] Simple CMake project on Msys2/Win10-64 gives Complex "Platform" error

Konstantin Podsvirov konstantin at podsvirov.pro
Sun May 22 02:28:40 EDT 2016


Hello Michael!

22.05.2016, 04:32, "Michael Enright" <michael.enright at gmail.com>:
> I'm getting a message that says my platform is not known to CMake
> which seems very unlikely. Here are the details.
>
> Today I have installed cmake using pacman on Msys2,
> I created a basic CMakeLists.txt to compile a single c++ file into a
> test application called 'test'. I have tested that the source code
> compiles using g++ directly.

I also have a small experience of using the MSYS2 project.
I will try to share my experience.

> When I try to use "cmake ." to configure this project to build, I get
> a bunch of normal messages, interspersed with REPEATED output of this:
> System is unknown to cmake, create:
> Platform/MINGW64_NT-10.0 to use this system, please send your config
> file to cmake at www.cmake.org so it can be added to cmake
> -- Detecting CXX compile features - done
>
> How do I make this message go away? A detailed walk through of how to
> actually author the file mentioned is an acceptable answer.

Which generator did you use?

Try to use the "MSYS Makefiles":

cmake -G"MSYS Makefiles" ...

Many examples of different projects you can find here:

https://github.com/Alexpux/MINGW-packages

> Also, what's with the scary message about the name 'test' being reserved?
>
> Finally, I know better, normally, than to use "cmake ." but I'm sure
> that is not the source of this issue. As soon As I fix this issue I'll
> throw this directory away and go back to real work.
>
> $ cmake --version
> cmake version: 3.2.3
> ,--
>
> 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

I have the assumption that CMake is not correctly determined by the generator by default
for this environment. But I'm no expert and this question still needs further study.

For publicity will say that I have a project osgQtQuick:

https://github.com/podsvirov/osgqtquick

This project is now included in MSYS2. Here is a script build the package:

https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-osgqtquick/PKGBUILD

--
Regards,
Konstantin Podsvirov


More information about the CMake mailing list