cmake

CMake third-party library installation

折月煮酒 提交于 2020-06-12 07:27:10
问题 I'm new in programming. And for my study project I need to install a third-party library for using with CMake (GitHub project). I use Arch OS on my PC. Usually I build all non-repository packages in: ~/aur . CMake version is 3.17. Then I try to build a library according to the instructions: ... cmake --config Debug "-DCMAKE_BUILD_TYPE=Debug" .. it makes me an error: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they

Is there a way to disallow “experimental” C++17 in CMake configuration?

自古美人都是妖i 提交于 2020-06-11 08:02:28
问题 I have set the following in my CMakeLists.txt: set (CMAKE_CXX_STANDARD 17) set (CMAKE_CXX_STANDARD_REQUIRED ON) set (CMAKE_CXX_EXTENSIONS OFF) However, CMake still allows g++ 6, even though it doesn't fully support c++17 (it has a c++1z standard, but not a c++17 standard). Is there a way to tell CMake to only allow compilers that fully support the standard and not just pieces of it? FWIW, I also tried setting cxx_relaxed_constexpr, which I think should have been the relevant language feature,

Parallel iteration over lists in makefile or CMake file

旧街凉风 提交于 2020-06-10 07:56:23
问题 Is there a way to loop over multiple lists in parallel in a makefile or CMake file? I would like to do something like the following in CMake, except AFAICT this syntax isn't supported: set(a_values a0 a1 a2) set(b_values b0 b1 b2) foreach(a in a_values b in b_values) do_something_with(a b) endforeach(a b) This would execute: do_something_with(a0 b0) do_something_with(a1 b1) do_something_with(a2 b2) I would accept an answer in either CMake or Make, though CMake would be preferred. Thanks! 回答1:

Wrong compiler used in the target offload process in CLion during CUDA compilation

痴心易碎 提交于 2020-06-09 04:21:47
问题 I'm trying to configure a very simple CUDA project in CLion 2020.1. I'm on Fedora 31 (default gcc is 9.3), but compiled gcc 8.2 from source to use it with Cuda Toolkit 10.2. The Cuda samples compile and run fine using the provided make, so the compiler is working and playing nicely with nvcc. In CLion, I have googletest downloaded with Conan. The Conan profile specifies 8.2 as the gcc version to be used. All references to GCC in CMakeOutput.log are to the correct bin file. And yet, I keep

Installing dlib with python 3.8 windows 10 error

眉间皱痕 提交于 2020-06-08 12:37:33
问题 I cant install dlib on python with cmd , I have downloaded cmake and putted it on PATH, or is there any plugin i have to download it first ? Or does my pip's environment is located at a wrong place ? Or do I have to change my python to 64 bit instead of 32 bit ? If I have to do so , please let me know the way to do it , I am a newbie C:\Users\Yusuf>python -m pip install dlib --user Collecting dlib Using cached https://files.pythonhosted.org/packages/63/92

How to Create Packages with CMake

隐身守侯 提交于 2020-06-01 08:18:49
问题 . +-- MyPack | +-- Lib1 | | +-- include | | | +-- Lib1.h | | +-- src | | | +-- Lib2.cpp | | +-- CMakeLists.txt | +-- Lib2 | | +-- include | | | +-- Lib2.h | | +-- src | | | +-- Lib2.cpp | | +-- CMakeLists.txt | +-- CMakeLists.txt +-- SubProject1 | +-- CMakeLists.txt +-- SubProject2 | +-- CMakeLists.txt +-- CMakeLists.txt Hi all. I'm new to CMake and I'm trying to obtain something like the following. Considering the above directory tree of my C++ project: I have a directory (let's say "MyPack"

CMake/C++: How to deploy a binary with the necessary shared library?

夙愿已清 提交于 2020-06-01 07:42:05
问题 I'm struggling with the task to generate a binary deployed with the required shared libraries. I created a "hello world" for Qt 5.12 plugins, the app runs as expected in my Ubuntu 18.04 machine, but make install gives an error. I tried the fixup_bundle() approach for resolving dependencies. obs.: I never done this before, I'm new to cmake . cmake_minimum_required(VERSION 3.17) project(plug-use LANGUAGES CXX) set(PROJECT_VERSION_MAJOR 1) set(PROJECT_VERSION_MINOR 0) set(PROJECT_VERSION_PATCH 0

Wrong compiler used in the target offload process in CLion during CUDA compilation

霸气de小男生 提交于 2020-06-01 07:37:45
问题 I'm trying to configure a very simple CUDA project in CLion 2020.1. I'm on Fedora 31 (default gcc is 9.3), but compiled gcc 8.2 from source to use it with Cuda Toolkit 10.2. The Cuda samples compile and run fine using the provided make, so the compiler is working and playing nicely with nvcc. In CLion, I have googletest downloaded with Conan. The Conan profile specifies 8.2 as the gcc version to be used. All references to GCC in CMakeOutput.log are to the correct bin file. And yet, I keep

CMake FindPackage fails for custom built boost libraries

瘦欲@ 提交于 2020-06-01 07:14:42
问题 I am trying to build a native Android project that requires Boost library. I have built Boost for the platforms I am targeting using this git project. But for some reason find_package() for Boost fails to find the Boost header paths Below is the project structure and for the Android app, and location where I have placed the Boost library. android_app ├── src │ └──<folder> │ └──<folder> │ └──CMakeLists.txt └── lib └── boost_armeabi-v7a ├── include │ └── boost_1_68_0 │ └──boost │ ├──align.hpp │

CMake FindPackage fails for custom built boost libraries

。_饼干妹妹 提交于 2020-06-01 07:13:26
问题 I am trying to build a native Android project that requires Boost library. I have built Boost for the platforms I am targeting using this git project. But for some reason find_package() for Boost fails to find the Boost header paths Below is the project structure and for the Android app, and location where I have placed the Boost library. android_app ├── src │ └──<folder> │ └──<folder> │ └──CMakeLists.txt └── lib └── boost_armeabi-v7a ├── include │ └── boost_1_68_0 │ └──boost │ ├──align.hpp │