Tag: cmake

How to build cpp-netlib with MSVC (cmake)

I tried to do this in MSys git bash on my win 8.1 with MSVC 12 installed, and the latest cmake and git: $> git clone https://github.com/cpp-netlib/cpp-netlib.git $> cd cpp-netlib $> git submodules update –init $> cd deps ## here I unzip the boost folder into boost ## i.e. cpp-netlib/deps/boost/ contains bjam, bootstrap and the […]

Create patch of modified part only

I have a file with 1500 lines, more or less and I modified only one line and used diff -u original.txt modified.txt > original.patch and instead of creating a patch file with the modified part only, it has not only the original, but the modified entirely on that file. Is it possible to have ONLY […]

Install Boost specific modules from GitHub

I’m working on a script that clones Boost official repository and init only the modules I need. I read git submodule man page, and found a way to update only some modules. I don’t even need to compile because I’m only using multi_index. git clone -b boost-1.60.0 https://github.com/boostorg/boost.git boost cd boost git submodule update –init […]

Understanding git and checkout

I’m trying to understand how git works for when I want to install a library. Let’s say I have a library called foo, and it has two versions: foo-1.0 and foo-2.0. So, I run git clone git://github.com/dartsim/dart.git, which downloads all the source files. Then, I decide that I want to install version foo-1.0. So, I […]

Including external header library from github using cmake

There github repository that contains only hpp files with no CMakeList.txt file. I need to include those header files in my project. I do not want to manually clone them then linking against them. I want that each time I call cmake command, cmake will clone them and put them in some inner folder. Is […]

CMake Ninja Git Self Signed Certificate Authority Password Prompts

Short Version: I am using CMake and Ninja with an external dependency in a git repo that requires a password prompt. (The source code must be secured). When building using Makefiles I can use the password prompt and everything continues. With Ninja it locks up at: — Build files have been written to: /path/to/project/hello_cpp/build/sqlite3-download [1/9] […]

CPack: only pack files tracked by git

I’m trying to understand how to use CPack. I want to produce a binary and a source package. The binary one is perfectly fine, including only what’s necessary. In the source distribution, though, there are basically all files present in the project’s root directory – including my CMake build directory from where I ran the […]

Is it good to attach graphic library to git repository or maybe download via cmake?

As in title, I am wondering about what is better, attach graphic libraries(e.g glew, glm, glfw, etc.) in my git repository, or make a special cmake modules that download it while building? I heard that it is not proper to add libraries to repo explicitly, especially if they are large, but making cmake modules for […]

How remove duplicate of the same dependiencies sources in dependent projects

I have two cmake projects. One of them use googletest and second of them use it also. What’s more, I used first project in second project. I have second project on github and googletest is also on github. So I wanna download them when I build my first project by using ExternalProject_Add command. This is […]

How write content to file in cmake DOWNLOAD_COMMAND?

I tried to download only part of repository as it is written here: https://stackoverflow.com/a/28039894/7042963, but I wanna do this in CMakeLists.txt by using ExternalProject_Add DOWNLOAD_COMMAND. However, there are some problems. I cannot write content to file sparse-checkout. File exists, but it is empty. This is my CMakeLists.txt file: include(ExternalProject) message(“CMAKE_CURRENT_BINARY_DIR is set to ${CMAKE_CURRENT_BINARY_DIR}”) ExternalProject_Add(glm […]

Git Baby is a git and github fan, let's start git clone.