cmake

CMake can not find g++ compiler on Windows

喜欢而已 提交于 2021-02-04 16:09:18
问题 I have a CMake project I want to compile with g++. The project compiles and runs on Linux. Now I am trying to get it working on Windows. For that reason, I installed MinGW and added it to the PATH and I am using Git Bash. In order to force CMake to use g++ I added these env variables: CC = C:\MinGW\bin\gcc CXX = C:\MinGW\bin\g++ But when I run CMake it does not detect any compilers and tells me: -- The C compiler identification is unkown -- The CXX compiler identification is unkown I created

CMake can not find g++ compiler on Windows

浪尽此生 提交于 2021-02-04 16:08:41
问题 I have a CMake project I want to compile with g++. The project compiles and runs on Linux. Now I am trying to get it working on Windows. For that reason, I installed MinGW and added it to the PATH and I am using Git Bash. In order to force CMake to use g++ I added these env variables: CC = C:\MinGW\bin\gcc CXX = C:\MinGW\bin\g++ But when I run CMake it does not detect any compilers and tells me: -- The C compiler identification is unkown -- The CXX compiler identification is unkown I created

CMake can not find g++ compiler on Windows

只愿长相守 提交于 2021-02-04 16:08:39
问题 I have a CMake project I want to compile with g++. The project compiles and runs on Linux. Now I am trying to get it working on Windows. For that reason, I installed MinGW and added it to the PATH and I am using Git Bash. In order to force CMake to use g++ I added these env variables: CC = C:\MinGW\bin\gcc CXX = C:\MinGW\bin\g++ But when I run CMake it does not detect any compilers and tells me: -- The C compiler identification is unkown -- The CXX compiler identification is unkown I created

CMake can not find g++ compiler on Windows

匆匆过客 提交于 2021-02-04 16:08:17
问题 I have a CMake project I want to compile with g++. The project compiles and runs on Linux. Now I am trying to get it working on Windows. For that reason, I installed MinGW and added it to the PATH and I am using Git Bash. In order to force CMake to use g++ I added these env variables: CC = C:\MinGW\bin\gcc CXX = C:\MinGW\bin\g++ But when I run CMake it does not detect any compilers and tells me: -- The C compiler identification is unkown -- The CXX compiler identification is unkown I created

Stop CMake from prepending `lib` to library names

China☆狼群 提交于 2021-02-04 15:35:13
问题 Sadly, CMake follows the awkward "implicit lib" convention, which inevitably causes problems when library names don't actually follow the convention (e.g. zlib), or have 'lib' as an explicit part of their name. For example, suppose I want to add libusb: add_library(libusb ...) On Windows this will correctly produce libusb.lib . On Unix it will produce the hilarious liblibusb.a . Is there any way to prevent this behaviour? I know I can set the output name explicitly using OUTPUT_NAME but I'd

How to configure project with COMPONENTS in cmake

烂漫一生 提交于 2021-02-04 14:01:47
问题 I want to create a project of projects using cmake which is accessible in a similar manner to that used by Poco. I find that using Poco as an example is crowded and difficult to follow so I am trying to create a minimal version, without macros so that I can see what is going on. I have constructed a repository for this example here. https://github.com/markeastwood82/nomnoms This, and what is written below is currently my best guess at how to solve this problem after some days of reading up /

Building mongo-cxx-driver using CMake ExternalProject_Add

血红的双手。 提交于 2021-02-04 06:13:14
问题 I am trying to build mongo-cxx-driver in a CMake based project. This project is supposed to build on Windows, macOS and in an ubuntu container and I want to ensure that my software on all these platforms will use the same driver version so I cannot afford installing the driver and its dependencies via apt-get , brew etc. So I am left with one option: ExternalProject_Add . But I am having difficulty making that work given how libmongoc is setup. Below is the CMake module I currently have.

Building mongo-cxx-driver using CMake ExternalProject_Add

眉间皱痕 提交于 2021-02-04 06:10:34
问题 I am trying to build mongo-cxx-driver in a CMake based project. This project is supposed to build on Windows, macOS and in an ubuntu container and I want to ensure that my software on all these platforms will use the same driver version so I cannot afford installing the driver and its dependencies via apt-get , brew etc. So I am left with one option: ExternalProject_Add . But I am having difficulty making that work given how libmongoc is setup. Below is the CMake module I currently have.

Building mongo-cxx-driver using CMake ExternalProject_Add

天大地大妈咪最大 提交于 2021-02-04 06:10:01
问题 I am trying to build mongo-cxx-driver in a CMake based project. This project is supposed to build on Windows, macOS and in an ubuntu container and I want to ensure that my software on all these platforms will use the same driver version so I cannot afford installing the driver and its dependencies via apt-get , brew etc. So I am left with one option: ExternalProject_Add . But I am having difficulty making that work given how libmongoc is setup. Below is the CMake module I currently have.

Building mongo-cxx-driver using CMake ExternalProject_Add

喜你入骨 提交于 2021-02-04 06:08:28
问题 I am trying to build mongo-cxx-driver in a CMake based project. This project is supposed to build on Windows, macOS and in an ubuntu container and I want to ensure that my software on all these platforms will use the same driver version so I cannot afford installing the driver and its dependencies via apt-get , brew etc. So I am left with one option: ExternalProject_Add . But I am having difficulty making that work given how libmongoc is setup. Below is the CMake module I currently have.