cmake

linux zmap

亡梦爱人 提交于 2021-01-31 14:46:44
https://github.com/zmap/zmap ZMap is a fast single packet network scanner designed for Internet-wide network surveys. On a typical desktop computer with a gigabit Ethernet connection, ZMap is capable scanning the entire public IPv4 address space in under 45 minutes. With a 10gigE connection and PF_RING , ZMap can scan the IPv4 address space in under 5 minutes. ZMap operates on GNU/Linux, Mac OS, and BSD. ZMap currently has fully implemented probe modules for TCP SYN scans, ICMP, DNS queries, UPnP, BACNET, and can send a large number of UDP probes . If you are looking to do more involved scans,

Ubuntu安装多个版本的Opencv

本秂侑毒 提交于 2021-01-31 08:32:09
参考: https://www.cnblogs.com/hxzkh/p/8473190.html 将该博主的某一部分摘录出来 ->lsdslam 中的opencv版本 3、编译 opencv 由于这个代码用到了opencv2.4 版本,所以我们要下载对版本。之前一直编译不同,以为是下载的版本有问题,我下载了 2.4.9、2.4.13、2.4.13.5,最后用 2.4.13版本跑通了,当然我不是说 2.4.9、2.4.13.5 等其他 2.4 版本不能跑通。为什么这么说呢?因为我之前之所以出问题编译出错是因为我之前装了 3.1.0的版本,所以不行。所以,你可以试一试,我觉得只要是 2.4. 的版本应该都可以。 这里我简单交代一下我曲折的编译之路。。。然后再给出正确方法。 首先说一下 opencv 版本的问题,之前跑另一个程序需要opencv3,,那时候没玩过这,也不懂,就按默认路径安装了 opencv3.1.0,然后它自己就装到了 usr/local/include、usr/local/lib,还有share什么的,好多个文件夹,导致我卸载都很麻烦,要卸载它,你就得手动删掉它所有安装的路径下的相关文件,这些安装信息在安装时保存在了一个什么 install 文件中,具体我忘了(反正我是运行 unintall 不行,所以才手动一个一个删的)。 就这样,删掉了opencv3.1.0版本

在Codeblocks下配置GoogleTest单元测试工具

纵然是瞬间 提交于 2021-01-31 00:31:37
开发工具 我和我的组员的都是使用的是大一老师推荐的codeblocks,所以,就愉快的决定了工具统一为codeblocks,语言C++。 测试单元 老师推荐的是JUnit和VSTS工具,但同学们从大一到现在最熟悉的还是codeblocks编程软件。既然的其他编程软件能加载测试工具,我想,codeblocks也行,百度后发现googleTest支持codeblocks(我就说会有的。。)。那么接下来,是具体的配置过程。 工具下载 1. googleTest官网上最新版为1.8.0版本的,但我试了并不能成功Build,所以我这里给出1.7版本的。这里还需要下载cMake用来生成cbp文件让codeBlocks识别。 工具下载地址: https://pan.baidu.com/s/1uSu_TioPFOal6MYdM5Zp5A 2.分别解压两个文件后,进入cmake文件夹的bin下,运行cmake-gui。 在“where is the source code”中选择解压后的googletest文件路径,如我的路径为 C:/Users/Administrator/Desktop/googletest-release-1.7.0/googletest-release-1.7.0 , 然后在“where to build the binaries ”可选择在解压路径下新建的一个文件夹路径,如

Android faac x264 rtmp camera2推流b站直播

浪子不回头ぞ 提交于 2021-01-30 01:43:39
package com.zzm.play.x264 ; import android.os.Bundle ; import android.support.annotation. Nullable ; import android.support.v7.app.AppCompatActivity ; import android.view.TextureView ; import android.view.View ; import com.zzm.play.R ; import com.zzm.play.utils.PermissionUtil ; public class MyActivity extends AppCompatActivity { @Override protected void onCreate ( @Nullable Bundle savedInstanceState) { super .onCreate(savedInstanceState) ; setContentView(R.layout. x264_camera2_layout ) ; init() ; doSomeThing() ; } private Camera2Tool camera2Tool ; private TextureView textureView ; private void

Editing versus deleting CMakeCache.txt after moving directory

萝らか妹 提交于 2021-01-29 22:36:54
问题 If CMake is re-executed after the source directory is moved, an error like this is given: CMake Error: The current CMakeCache.txt directory /new-path/CMakeCache.txt is different than the directory /old-path where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt What is the best approach to deal with this? It seems that deleting the cache works. Why might I want to edit CMakeCache.txt , rather than just

Set CMAKE_MAKE_PROGRAM to mingw32-make from inside the CMakeLists.txt

…衆ロ難τιáo~ 提交于 2021-01-29 18:51:05
问题 Following this post, if I run cmake .. inside my build folder with no options I get the error: CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred

/usr/bin/ld: cannot find -lopencv_nonfree

主宰稳场 提交于 2021-01-29 18:50:54
问题 I installed OpenCV 4.1 on Ubuntu 18.04 LTS. The problem is when I compile my project's CMake file, the output is: /usr/bin/ld: cannot find -lopencv_nonfree collect2: error: ld returned 1 exit status CMakeFiles/river_flow_velocity_estimation.dir/build.make:274: recipe for target 'river_flow_velocity_estimation' failed make[2]: *** [river_flow_velocity_estimation] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/river_flow_velocity_estimation.dir/all' failed make[1]: ***

CMAKE cross compile on MacOS adds MacOS SDK to -isysroot in flags.make

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-29 16:28:05
问题 Cmake is ad I'm trying to cross compile for raspberry pi 3+ on a Mac using cmake to generate a makefile. My CMakeLists.txt: cmake_minimum_required (VERSION 3.11.0) project(decatrack) # setup cross toolchain for RPi 3 set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) set(TOOLCHAIN_DIR /Volumes/xtool-build-env/armv8-rpi3-linux-gnueabihf) set(CMAKE_C_COMPILER ${TOOLCHAIN_DIR}/bin/armv8-rpi3-linux-gnueabihf-gcc) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_DIR}/bin/armv8-rpi3-linux-gnueabihf-g++

CMake: add all files on current directory and subdirectories with target_sources()

时间秒杀一切 提交于 2021-01-29 14:50:37
问题 In our C++ project, we have several CMakeLists.txt files (on different directories) listing every single cpp file desired with target_sources() . For example: target_sources(<Project> PUBLIC foo_1.cpp foo_2.cpp foo_3.cpp ) This is fine in case we have few source files, but it's becoming harder for those directories where we have multiple cpp files to be added. Is there a simple way to tell target_resources() to add all files on directory and subdirectories where CMakeList.txt file is? For

How can I get FetchContent to download to a specific location?

妖精的绣舞 提交于 2021-01-29 14:42:55
问题 Following the FetchContent documentation, e.g. using something like FetchContent_Declare( gitache_package_libcwd_r GIT_REPOSITORY "https://github.com/CarloWood/libcwd.git" GIT_TAG "master" ) FetchContent_MakeAvailable( gitache_package_libcwd_r ) The source code is cloned into ${CMAKE_BINARY_DIR}/_deps/gitache_package_libcwd_r-src/ . How can I make it put the source code elsewhere, like /opt/gitache/libcwd_r/src/gitache_package_libcwd_r (as it would be when I'd be using ExternalProject with a