cmake

Clean copied files from external project

非 Y 不嫁゛ 提交于 2020-05-23 21:09:40
问题 As a part of my build process I'm building the webserver lighttpd. The following CMakeLists.txt is working: include(ExternalProject) ExternalProject_Add( lighttpd URL ${PROJECT_SOURCE_DIR}/ext/lighttpd.tar.gz CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_OUTPUT_PATH}/lighttpd ) ExternalProject_Add_Step( lighttpd copy2bin COMMAND ${CMAKE_COMMAND} -E copy_directory ${EXTERNAL_OUTPUT_PATH}/lighttpd/sbin ${EXECUTABLE_OUTPUT_PATH} COMMAND ${CMAKE_COMMAND} -E copy_directory ${EXTERNAL_OUTPUT_PATH}

Clean copied files from external project

。_饼干妹妹 提交于 2020-05-23 21:09:10
问题 As a part of my build process I'm building the webserver lighttpd. The following CMakeLists.txt is working: include(ExternalProject) ExternalProject_Add( lighttpd URL ${PROJECT_SOURCE_DIR}/ext/lighttpd.tar.gz CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_OUTPUT_PATH}/lighttpd ) ExternalProject_Add_Step( lighttpd copy2bin COMMAND ${CMAKE_COMMAND} -E copy_directory ${EXTERNAL_OUTPUT_PATH}/lighttpd/sbin ${EXECUTABLE_OUTPUT_PATH} COMMAND ${CMAKE_COMMAND} -E copy_directory ${EXTERNAL_OUTPUT_PATH}

change compiler in CMAKE sub_directory CMakeLists.txt file

我的未来我决定 提交于 2020-05-23 08:54:40
问题 I would like to change CMAKE_C_COMPILER and CMAKE_CXX_COMPILER in an inner sub_directory being compiled as part of a bigger project. changing from GNU to intel compiler. however, outside of this directory nothing has to chagne. is that possible? Thanks 回答1: Instead of using add_subdirectory consider making the subdirectory a self-contained CMake project, which can be configured and built independently of the bigger project. You can then add the subdirectory to your bigger project as an

How to cross compile with cmake + arm-none-eabi on windows?

别等时光非礼了梦想. 提交于 2020-05-23 05:12:30
问题 I like to automate the cross compiling for several projects on a Windows build server. I have some problems with the arm cross compiler. Setting it up seems a bit difficult. The cmake compiler check fails with a linking error(see below). My experimental project looks like: main.cpp - a test programm CMakeLists.txt - the cmake build script cmake/STM32F2xx.cmake - the special settings for the ARM STM32F2xx-series I am using 3 Packages: cmake-3.8.0-win64-x64.msi -cmake for windows mingw-w64

Naming convention for components and namespaces in cmake

假如想象 提交于 2020-05-22 05:42:26
问题 In Short: Is there any preferred naming convention for cmake library targets - in particular when using namespaces? Note: Unless there is really an objective reason for it, I'm not asking about personal preferences, but whether there is either an "official" (e.g. recommended by kitware) or established (which might deviate) convention. Details: Lets say I have a library/framework foo which has the individual components bar and baz . So far, my naming convention looks like this: add_library(foo

Naming convention for components and namespaces in cmake

风流意气都作罢 提交于 2020-05-22 05:41:03
问题 In Short: Is there any preferred naming convention for cmake library targets - in particular when using namespaces? Note: Unless there is really an objective reason for it, I'm not asking about personal preferences, but whether there is either an "official" (e.g. recommended by kitware) or established (which might deviate) convention. Details: Lets say I have a library/framework foo which has the individual components bar and baz . So far, my naming convention looks like this: add_library(foo

Naming convention for components and namespaces in cmake

∥☆過路亽.° 提交于 2020-05-22 05:40:00
问题 In Short: Is there any preferred naming convention for cmake library targets - in particular when using namespaces? Note: Unless there is really an objective reason for it, I'm not asking about personal preferences, but whether there is either an "official" (e.g. recommended by kitware) or established (which might deviate) convention. Details: Lets say I have a library/framework foo which has the individual components bar and baz . So far, my naming convention looks like this: add_library(foo

Cannot use .dll from OpenCV with CMake

懵懂的女人 提交于 2020-05-17 04:24:50
问题 I have the following CMakeLists.txt cmake_minimum_required(VERSION 3.12) project( project_360_visual ) find_package( OpenCV REQUIRED ) set(SOURCE_FILES ${CMAKE_SOURCE_DIR}/src/project_360_visual.cpp ${CMAKE_SOURCE_DIR}/src/projection.cpp) set(INCLUDE_FILES ${CMAKE_SOURCE_DIR}/include/project_360_visual.h ${CMAKE_SOURCE_DIR}/include/projection.h) LINK_DIRECTORIES(c:/opencv/build/bin/Release) add_library(opencv_tracking430 SHARED IMPORTED GLOBAL) set_target_properties(opencv_tracking430

CMake is not able to find LAPACK sgemm on macOS

生来就可爱ヽ(ⅴ<●) 提交于 2020-05-16 22:36:27
问题 I'm trying to compile this code, but when running cmake .. in the build folder I get the messages: -- Looking for Fortran sgemm -- Looking for Fortran sgemm - not found -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success -- Found Threads: TRUE -- Looking for Fortran dgemm -- Looking for Fortran dgemm - found -- Found BLAS: /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System

Finding correct cmake configuration for yaml-cpp library

亡梦爱人 提交于 2020-05-16 03:17:08
问题 I was trying to use yaml-cpp in my project. It took me half an hour to correctly link the library by experimenting with the following names. After I finally stumbled across them in this file, I settled for this: find_package(yaml-cpp REQUIRED) include_directories(${YAML_INCLUDE_DIRS}) target_link_libraries(${YAML_CPP_LIBRARIES}) It works, but the way I was searching for those seems brainless. How is it remotely possible to figure out the correct name of the include variables? It could be YAML