Skip to content

Commit

Permalink
Don't re-generate build time on every CMake run
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Mar 27, 2024
1 parent d3824d7 commit 134133e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ if (ALPAQA_WITH_ACCURATE_BUILD_TIME)
target_sources(alpaqa PRIVATE ${ALPAQA_BUILD_TIME_CPP})
add_dependencies(alpaqa alpaqa-build-time-generate)
else()
include(cmake/BuildTime.cmake)
set(ALPAQA_BUILD_TIME_CPP "${CMAKE_CURRENT_BINARY_DIR}/alpaqa-build-time.cpp")
if (NOT EXISTS ${ALPAQA_BUILD_TIME_CPP})
include(cmake/BuildTime.cmake)
endif()
target_sources(alpaqa PRIVATE ${ALPAQA_BUILD_TIME_CPP})
endif()

Expand Down

0 comments on commit 134133e

Please sign in to comment.