Skip to content

Commit

Permalink
Added dummy file and rule to prevent new version tags in code to spee…
Browse files Browse the repository at this point in the history
…d up rebuilds on git pull
  • Loading branch information
hkhauke committed May 29, 2024
1 parent 5cca140 commit 6fb257b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmake/fragments/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ option(JVX_TRACK_MEMORY_LEAKS "Better track memory leaks - mainly in windows." O
option(JVX_GCC_LINKER_SYMBOLIC "Activate symbolic link option for gcc - required by ffmpeg in linux." OFF)
option(JVX_USE_SIMULINK "Activate Simulink (Matlab) projects." OFF)
option(JVX_BUILD_FOR_WINDOWS_XP "Activate defines for Windows XP." OFF)

option(JVX_GENERATE_VERSION_TAG_DUMMY "Activate using a dummy version tag for development to prevent full rebuilds" OFF)

set(JVXRT_SUBMODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/sources/sub-projects" CACHE STRING "Path to submodule folder")
set(JVXRT_SUBMODULE_FLUTTER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/flutter" CACHE STRING "Path to flutter submodules")
Expand Down
12 changes: 8 additions & 4 deletions sources/jvxLibraries/jvx-system-min/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ endif(DEFINED JVX_SDK_PATH)
set(PROJECT_NAME jvx-system-min)
include(${JVX_CMAKE_DIR}/common_local_lib_head.cmake)

if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h" OR JVX_FORCE_GENERATE_NEW_VERSION_TAG)
message("${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h generated since tags have changed.")
configure_file(include/jvx_system_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h)
if(JVX_GENERATE_VERSION_TAG_DUMMY)
configure_file(include/jvx_system_config_dummy.h ${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h)
else()
message("${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h NOT generated to avoid build dependency, use <JVX_FORCE_GENERATE_NEW_VERSION_TAG> to force generation.")
if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h" OR JVX_FORCE_GENERATE_NEW_VERSION_TAG)
message("${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h generated since tags have changed.")
configure_file(include/jvx_system_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h)
else()
message("${CMAKE_CURRENT_BINARY_DIR}/jvx_system_config.h NOT generated to avoid build dependency, use <JVX_FORCE_GENERATE_NEW_VERSION_TAG> to force generation.")
endif()
endif()

# add a target to generate API documentation with Doxygen
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef __JVX_SYSTEM_CONFIG_H__
#define __JVX_SYSTEM_CONFIG_H__

#ifndef JVX_SYSTEM_USE_DATA_FORMAT_FLOAT
/* #undef JVX_SYSTEM_USE_DATA_FORMAT_FLOAT */
#endif

#define JVX_IDENT_STRING "jvx-rt-750619"
#define JVX_VERSION_STRING "dummy-hash"
#define JVX_DATA_STRING "dummy-date"

#ifdef JVX_SYSTEM_USE_DATA_FORMAT_FLOAT
#define JVX_DATA_FORMAT_FLOAT
#else
#define JVX_DATA_FORMAT_DOUBLE
#endif


#endif

0 comments on commit 6fb257b

Please sign in to comment.