Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
Add make clean files thingie, but does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoe committed Jul 9, 2018
1 parent c5858a9 commit 7e45d85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,13 @@ add_custom_target(
COMMAND ${CMAKE_COMMAND}
-DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
-DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR}
-DOUTPUT_FILE="${PROJECT_BINARY_DIR}/src/version_info.txt"
-P ${CMAKE_MODULE_PATH}/CreateGitVersionInfo.cmake
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating version info"
)

set_property( DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES "${OUTPUT_FILE}")
#include( ${CMAKE_MODULE_PATH}/CreateGitVersionInfo.cmake )
#create_git_version_info( ${PROJECT_SOURCE_DIR} )

Expand Down
4 changes: 3 additions & 1 deletion CMakeModules/CreateGitVersionInfo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ Published on ${KICAD_VERSION_DATE}

set( _wvi_write_version_file ON )

set( OUTPUT_FILE "${PROJECT_BINARY_DIR}/src/version_info.txt")
#set( OUTPUT_FILE "${PROJECT_BINARY_DIR}/src/version_info.txt")



# Only write the header if it has changed, to avoid rebuilds
if( EXISTS ${OUTPUT_FILE} )
Expand Down

0 comments on commit 7e45d85

Please sign in to comment.