mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +00:00
Fixes for 4.3 compilation
This commit is contained in:
@@ -3,19 +3,34 @@
|
||||
add_executable(test_ifcopenshell_geometry
|
||||
test_ifcopenshell_geometry.cpp
|
||||
)
|
||||
if(NOT TARGET parse_schema_ifc2x3)
|
||||
message(FATAL_ERROR "test_ifcopenshell_geometry requires SCHEMA_VERSIONS to include 2x3.")
|
||||
list(GET SCHEMA_VERSIONS -1 IFCGEOM_TEST_SCHEMA_VERSION)
|
||||
set(IFCGEOM_TEST_SCHEMA_TARGET parse_schema_ifc${IFCGEOM_TEST_SCHEMA_VERSION})
|
||||
set(IFCGEOM_TEST_MAPPING_TARGET geometry_mapping_ifc${IFCGEOM_TEST_SCHEMA_VERSION})
|
||||
if(NOT TARGET ${IFCGEOM_TEST_SCHEMA_TARGET})
|
||||
message(FATAL_ERROR "test_ifcopenshell_geometry requires ${IFCGEOM_TEST_SCHEMA_TARGET}.")
|
||||
endif()
|
||||
if(NOT TARGET ${IFCGEOM_TEST_MAPPING_TARGET})
|
||||
message(FATAL_ERROR "test_ifcopenshell_geometry requires ${IFCGEOM_TEST_MAPPING_TARGET}.")
|
||||
endif()
|
||||
target_include_directories(test_ifcopenshell_geometry PRIVATE "${CMAKE_SOURCE_DIR}/../src")
|
||||
target_link_libraries(test_ifcopenshell_geometry PRIVATE Catch2::Catch2WithMain IfcGeom IfcParse parse_schema_ifc2x3)
|
||||
add_dependencies(test_ifcopenshell_geometry geometry_mapping_ifc2x3 geometry_kernel_passthrough)
|
||||
target_compile_definitions(test_ifcopenshell_geometry PRIVATE
|
||||
IfcSchema=Ifc${IFCGEOM_TEST_SCHEMA_VERSION}
|
||||
"IFCGEOM_TEST_SCHEMA_HEADER=\"ifcparse/schemas/Ifc${IFCGEOM_TEST_SCHEMA_VERSION}.h\""
|
||||
)
|
||||
target_link_libraries(test_ifcopenshell_geometry PRIVATE
|
||||
Catch2::Catch2WithMain
|
||||
IfcGeom
|
||||
IfcParse
|
||||
${IFCGEOM_TEST_SCHEMA_TARGET}
|
||||
)
|
||||
add_dependencies(test_ifcopenshell_geometry ${IFCGEOM_TEST_MAPPING_TARGET} geometry_kernel_passthrough)
|
||||
catch_discover_tests(test_ifcopenshell_geometry
|
||||
DL_PATHS
|
||||
$<TARGET_FILE_DIR:Catch2::Catch2>
|
||||
$<TARGET_FILE_DIR:Catch2::Catch2WithMain>
|
||||
$<TARGET_FILE_DIR:IfcGeom>
|
||||
$<TARGET_FILE_DIR:IfcParse>
|
||||
$<TARGET_FILE_DIR:parse_schema_ifc2x3>
|
||||
$<TARGET_FILE_DIR:${IFCGEOM_TEST_SCHEMA_TARGET}>
|
||||
$<TARGET_FILE_DIR:plugin>
|
||||
# Catch2 discovery uses DL_PATHS in order; CTest PATH prepends reverse it.
|
||||
$<TARGET_FILE_DIR:IfcGeom>
|
||||
|
||||
@@ -6,10 +6,9 @@
|
||||
|
||||
#include "ifcgeom/Converter.h"
|
||||
#include "ifcgeom/kernel_registry.h"
|
||||
#define IfcSchema Ifc2x3
|
||||
#include "ifcparse/hierarchy_helper.h"
|
||||
#include "ifcparse/macros.h"
|
||||
#include "ifcparse/schemas/Ifc2x3.h"
|
||||
#include IFCGEOM_TEST_SCHEMA_HEADER
|
||||
|
||||
namespace {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user