Make sure the variables used inside the header template are populated.
Prior to this patch we ended up with this in the generated
graphviz_version.h:
#define PACKAGE_VERSION ""
Edit by Matthew Fernandez: Added changelog entry and flipped polarity on the
CMake test case for this.
- Offer .tar.xz files too #454
- Header file graphviz_version.h has no include guards #1929
- regression: newlines embedded in quoted labels / node names are not preserved in 2.46.0 #1931
+- Properly fill graphviz_version.h !1706
## [2.46.0] - 2021-01-18
endif()
# ============================ Set Graphviz version ============================
-configure_file(graphviz_version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h @ONLY)
-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h DESTINATION ${HEADER_INSTALL_DIR})
if (DEFINED VERSION)
set(GRAPHVIZ_VERSION_STRING "${VERSION}")
set(GRAPHVIZ_VERSION_FULL "${GRAPHVIZ_VERSION_STRING}")
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/builddate.h "#define BUILDDATE \"${GRAPHVIZ_VERSION_BUILD}\"")
+configure_file(graphviz_version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h DESTINATION ${HEADER_INSTALL_DIR})
+
message(STATUS "Graphviz version: ${GRAPHVIZ_VERSION_FULL}")
include(config_checks)
subprocess.check_call([cc, '-std=c99', c_src, '-o', exe])
# run the test
- ret = subprocess.call([exe])
-
- # FIXME: this is currently broken in the CMake build
- if os.getenv('build_system') == 'cmake':
- assert ret != 0
- else:
- assert ret == 0
+ subprocess.check_call([exe])