Skip to content

Commit

Permalink
Add cmake option to skip git version file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bkille committed Nov 3, 2023
1 parent b9a643f commit be6dbb6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ endif()

message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")

option(SKIP_VERSION_FILE "Do not create src/mashmap_git_version.hpp" OFF)
option(OPTIMIZE_FOR_NATIVE "Build with -march=native" ON)
option(LARGE_CONTIG "Use 64-bit integers instead of 32 bit for sequence coordinates" OFF)
if (LARGE_CONTIG)
Expand Down Expand Up @@ -111,5 +112,7 @@ install(TARGETS mashmap DESTINATION bin)
install(TARGETS mashmap-align DESTINATION bin)

# version stuff
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/include)
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/generate_git_version.sh ${CMAKE_SOURCE_DIR}/src)
if (NOT SKIP_VERSION_FILE)
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/include)
execute_process(COMMAND bash ${CMAKE_SOURCE_DIR}/scripts/generate_git_version.sh ${CMAKE_SOURCE_DIR}/src)
endif ()

0 comments on commit be6dbb6

Please sign in to comment.