diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-04-06 18:02:28 +0200 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-04-06 18:02:28 +0200 |
commit | 6ef38d0873bc424ff72d0eb5363924b00b0cadc2 (patch) | |
tree | d9d605817acb3eec481a221e1e0d2d3956ece894 /CMakeLists.txt | |
parent | 482ad250a4454d993a98488edfe01d7f9dc35de7 (diff) | |
download | MultiMC-6ef38d0873bc424ff72d0eb5363924b00b0cadc2.tar MultiMC-6ef38d0873bc424ff72d0eb5363924b00b0cadc2.tar.gz MultiMC-6ef38d0873bc424ff72d0eb5363924b00b0cadc2.tar.lz MultiMC-6ef38d0873bc424ff72d0eb5363924b00b0cadc2.tar.xz MultiMC-6ef38d0873bc424ff72d0eb5363924b00b0cadc2.zip |
Coverity build and upload target. Also GitFunctions.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d804e730..15f9a13d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,20 +179,9 @@ endif() ADD_CUSTOM_TARGET(version echo "Version: ${MultiMC_VERSION_STRING}") #### Check the current Git commit -execute_process(COMMAND git rev-parse HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - RESULT_VARIABLE GIT_COMMIT_CHECK_RESULTVAR - OUTPUT_VARIABLE GIT_COMMIT_CHECK_OUTVAR - OUTPUT_STRIP_TRAILING_WHITESPACE -) - -IF(GIT_COMMIT_CHECK_RESULTVAR EQUAL 0) - SET(MultiMC_GIT_COMMIT "${GIT_COMMIT_CHECK_OUTVAR}") - MESSAGE(STATUS "Git commit: ${MultiMC_GIT_COMMIT}") -ELSE() - SET(MultiMC_GIT_COMMIT "Unknown") - MESSAGE(STATUS "Failed to check Git commit. ${GIT_COMMIT_CHECK_RESULTVAR}") -ENDIF() +include(GitFunctions) +git_run(COMMAND rev-parse HEAD DEFAULT "Unknown" OUTPUT_VAR MultiMC_GIT_COMMIT) +message(STATUS "Git commit: ${MultiMC_GIT_COMMIT}") OPTION(MultiMC_CODE_COVERAGE "Compiles for code coverage" OFF) IF(MultiMC_CODE_COVERAGE) @@ -789,6 +778,8 @@ ENDIF() INCLUDE(CPack) +include(Coverity) + include_directories(${PROJECT_BINARY_DIR}/include) # Translations |