You can use the undocumented command line options -B
and -H
to specify your build directory and source directory respectively. So, from your project’s root, you can do:
cmake -Bbuild -H.
(Where build is your build directory path.)
More Related Contents:
- How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake
- How to build & install GLFW 3 and use it in a Linux project
- How can I get CMake to find my alternative Boost installation?
- How to use CMAKE_INSTALL_PREFIX
- Making CMake print commands before executing
- How to compile GLUT + OpenGL project with CMake and Kdevelop in linux?
- sh: 1: Syntax error: "(" unexpected error
- How do I write a bash script to restart a process if it dies?
- How to compare two strings in dot separated version format in Bash?
- Using awk to print all columns from the nth to the last
- Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
- Threads vs Processes in Linux [closed]
- Can I change ‘rpath’ in an already compiled binary?
- What are the return values of system calls in Assembly?
- How to set Linux environment variables with Ansible
- What does localhost means inside a Docker container?
- Are some allocators lazy?
- What’s the difference between “statically linked” and “not a dynamic executable” from Linux ldd?
- Recursively counting files in a Linux directory
- Creating a bootable ISO image with custom bootloader
- Is there a way to get gcc to output raw binary?
- Append date to filename in linux
- How do I get the path of a process in Unix / Linux?
- How do I get the difference between two dates under bash [duplicate]
- Meaning of tilde in Linux bash (not home directory)
- How do I delete all lines in a file starting from after a matching line?
- Should I use libc++ or libstdc++? [closed]
- Linux shell sort file according to the second column?
- Why do we need a bootloader in an embedded device?
- library path when dynamically loaded?