Created
February 19, 2019 11:30
-
-
Save holgerschurig/8632074405363e37c0f1bc65fc363d0e to your computer and use it in GitHub Desktop.
compile commands looking for main directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let ((default-directory (or (locate-dominating-file "." ".git") | |
(locate-dominating-file "." ".svn") | |
(locate-dominating-file "." "CMakeLists.txt") | |
(locate-dominating-file "." "GNUmakefile") | |
(locate-dominating-file "." "Makefile") | |
default-directory))) | |
(cd (or (locate-dominating-file (buffer-file-name) ".git") ".")) | |
(compile compile-command) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment