build: (fixes #798) ignore the version.cache build profile

This commit is contained in:
Gabriel Ferreira
2022-10-31 10:24:12 -03:00
parent 4185406a42
commit b857ca3732

View File

@@ -196,6 +196,16 @@ function(configure_embedded_version)
set(NS3_${varname} ${varvalue})
endforeach()
set(NS3_VERSION_CLOSEST_TAG ${NS3_CLOSEST_TAG})
# We overwrite the build profile from version.cache with the current build
# profile
if(${cmakeBuildType} STREQUAL relwithdebinfo)
set(NS3_VERSION_BUILD_PROFILE default)
elseif((${cmakeBuildType} STREQUAL release) AND ${NS3_NATIVE_OPTIMIZATIONS})
set(NS3_VERSION_BUILD_PROFILE optimized)
else()
set(NS3_VERSION_BUILD_PROFILE ${cmakeBuildType})
endif()
endif()
set(DIRTY)