Something from adversarial review

This commit is contained in:
2026-06-05 13:26:33 -04:00
parent b656569fc0
commit 9487dd4778
5 changed files with 29 additions and 27 deletions
+3 -5
View File
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.16)
include("${CMAKE_CURRENT_LIST_DIR}/cppbessotOdbHeaderDiscovery.cmake")
if(NOT DEFINED CPPBESSOT_ODB_EXECUTABLE OR CPPBESSOT_ODB_EXECUTABLE STREQUAL "")
message(FATAL_ERROR "CPPBESSOT_ODB_EXECUTABLE is required")
@@ -8,10 +9,7 @@ if(NOT DEFINED CPPBESSOT_VERSION_DIR OR CPPBESSOT_VERSION_DIR STREQUAL "")
endif()
set(_include_dir "${CPPBESSOT_VERSION_DIR}/generated-cpp-source/include")
file(GLOB _headers "${_include_dir}/*/model/*.h")
if(NOT _headers)
message(FATAL_ERROR "No model headers found under ${_include_dir}")
endif()
cppbessot_odb_find_object_headers(_object_headers "${_include_dir}")
foreach(_backend IN ITEMS sqlite pgsql)
if(_backend STREQUAL "sqlite")
@@ -25,7 +23,7 @@ foreach(_backend IN ITEMS sqlite pgsql)
execute_process(
COMMAND "${CPPBESSOT_ODB_EXECUTABLE}" -I "${_include_dir}" --std c++11 -d "${_backend}" -q
-o "${_out_dir}" --changelog-dir "${_out_dir}" ${_headers}
-o "${_out_dir}" --changelog-dir "${_out_dir}" ${_object_headers}
RESULT_VARIABLE _result
OUTPUT_VARIABLE _stdout
ERROR_VARIABLE _stderr