cmake

Building MariaDB with musl: /usr/bin/ld cannot find -lgcc_s

别来无恙 提交于 2020-12-13 17:50:59
问题 I am trying to build MariaDB v10.3 with a musl tool chain on x86_64 Debian kernel v4.19. I have mainly been using the musl-gcc gcc wrapper to achieve this. The relevant packages I installed are as follows: musl (1.1.21-2): standard C library musl-dev (1.1.21-2): standard C library development files musl-tools (1.1.21-2): standard C library tools To build MariaDB, I first run: CC=/usr/bin/musl-gcc cmake ../ -DWITHOUT_TOKUDB=1 which exits cleanly, and then I follow that up with: make CC=/usr

CMake can't find GLEW

我与影子孤独终老i 提交于 2020-12-13 15:14:54
问题 I've read this [1], but in my case CMake says it can't find glew. I'm on Windows and there is a FindGLEW.cmake file in my CMake modules folder, presumably put there when I installed CMake-3.6. I found GLEW on sourceforge and downloaded the zip file for Windows. I unzipped and installed in C:\Program Files\glew. When I've created my own libraries and used CMake to build and install them, this is the default location they are installed to so I am pretty confident I'm OK here. The snippet from

CMake can't find GLEW

这一生的挚爱 提交于 2020-12-13 15:07:54
问题 I've read this [1], but in my case CMake says it can't find glew. I'm on Windows and there is a FindGLEW.cmake file in my CMake modules folder, presumably put there when I installed CMake-3.6. I found GLEW on sourceforge and downloaded the zip file for Windows. I unzipped and installed in C:\Program Files\glew. When I've created my own libraries and used CMake to build and install them, this is the default location they are installed to so I am pretty confident I'm OK here. The snippet from

CMake can't find GLEW

感情迁移 提交于 2020-12-13 15:06:04
问题 I've read this [1], but in my case CMake says it can't find glew. I'm on Windows and there is a FindGLEW.cmake file in my CMake modules folder, presumably put there when I installed CMake-3.6. I found GLEW on sourceforge and downloaded the zip file for Windows. I unzipped and installed in C:\Program Files\glew. When I've created my own libraries and used CMake to build and install them, this is the default location they are installed to so I am pretty confident I'm OK here. The snippet from

How to feed CMake with vcpkg information?

痴心易碎 提交于 2020-12-13 04:48:40
问题 Suppose I have installed some library with vcpkg and it's numerous dependencied (say cgal ). Now I want to compile some program against these libraries with CMake . How should I tell CMake about all locations of all libraries I have downloaded? Including main library I have installed? I have only one setting in CMake , called "source directory" which will point to my code. Where are settings for libraries? D:\Users\ThirdPartyDesign\CGAL-5.0-examples\CGAL-5.0\examples\Triangulation_2 λ env |

Download and build Lua with modern CMake

我是研究僧i 提交于 2020-12-13 04:03:03
问题 Let's try to build lua via cmake! Motivation: cmake is gaining more attention and support through IDEs like CLion or even Visual Studio 2017 (and newer). This is great if you want to provide platform-independent open-sources and faciliate the entire build-process. Now the problem is that creating a proper CMakeLists.txt isn't that straightforward in my opinion: cmake_minimum_required(VERSION 3.16) include(ExternalProject) set(LUA_VERSION "lua-5.3.5") ExternalProject_Add(lua URL https://www

Download and build Lua with modern CMake

雨燕双飞 提交于 2020-12-13 04:01:33
问题 Let's try to build lua via cmake! Motivation: cmake is gaining more attention and support through IDEs like CLion or even Visual Studio 2017 (and newer). This is great if you want to provide platform-independent open-sources and faciliate the entire build-process. Now the problem is that creating a proper CMakeLists.txt isn't that straightforward in my opinion: cmake_minimum_required(VERSION 3.16) include(ExternalProject) set(LUA_VERSION "lua-5.3.5") ExternalProject_Add(lua URL https://www

Gcc offload compilation options

纵饮孤独 提交于 2020-12-13 03:33:32
问题 I'm trying to build the simplest OpenMP or OpenACC C++ program with GPU offload using gcc-10, CUDA 11 on Ubuntu 18.04 and this CMakeLists.txt file (or OpenMP version): cmake_minimum_required(VERSION 3.18) project(hello VERSION 0.1.0) find_package(OpenACC REQUIRED) add_executable(hello main.cpp) target_compile_options(hello PRIVATE -O3 -fopenacc -foffload=nvptx-none) target_link_libraries (hello OpenACC::OpenACC_CXX) The build fails with: [build] [100%] Linking CXX executable hello [build]

Gcc offload compilation options

女生的网名这么多〃 提交于 2020-12-13 03:31:48
问题 I'm trying to build the simplest OpenMP or OpenACC C++ program with GPU offload using gcc-10, CUDA 11 on Ubuntu 18.04 and this CMakeLists.txt file (or OpenMP version): cmake_minimum_required(VERSION 3.18) project(hello VERSION 0.1.0) find_package(OpenACC REQUIRED) add_executable(hello main.cpp) target_compile_options(hello PRIVATE -O3 -fopenacc -foffload=nvptx-none) target_link_libraries (hello OpenACC::OpenACC_CXX) The build fails with: [build] [100%] Linking CXX executable hello [build]

How do I set CMake policy and property on an external project added using ExternalProject_Add

谁都会走 提交于 2020-12-13 03:21:44
问题 I have a cmake project that uses an external project using CMake's ExternalProject_Add feature. Is there a way to set policy and property on the external project? I would like following policy and property that is set in my project to be forwarded also to external project so that static multi-threaded windows runtime libraries are used instead of dynamic ones. cmake_policy(SET CMP0091 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") 回答1: You can simply add those