From be6dbb6dc22fc04b7241a834cc9f1ca2db17d226 Mon Sep 17 00:00:00 2001 From: Bryce Lorenz Kille Date: Fri, 3 Nov 2023 17:37:27 -0500 Subject: [PATCH] Add cmake option to skip git version file creation --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ff08dc1..9a32105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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 ()