Last active
February 23, 2016 15:08
-
-
Save usagi/1208f5ee5b01bdce9a54 to your computer and use it in GitHub Desktop.
Git が dirty か判定する方法と CMake での応用例 ref: http://qiita.com/usagi/items/34e65259b4fdbd2c245e
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
| git diff --shortstat --exit-code --quiet |
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
| execute_process( | |
| COMMAND git diff --shortstat --exit-code --quiet | |
| WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | |
| RESULT_VARIABLE version_git_dirty_flag | |
| ) | |
| if( version_git_dirty_flag ) | |
| message( "repository is dirty." ) | |
| endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment