Skip to content

Commit 92964fb

Browse files
committed
cmake - option to build only common schemas
1 parent 159538e commit 92964fb

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

cmake/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,13 @@ option(BUILD_GEOMSERVER "Build IfcGeomServer executable (Open CASCADE is require
8080
option(BUILD_IFCMAX "Build IfcMax, a 3ds Max plug-in, Windows-only." OFF)
8181
option(BUILD_QTVIEWER "Build IfcOpenShell Qt GUI Viewer" OFF) # QtViewer requires Qt6
8282
option(BUILD_PACKAGE "" OFF)
83+
# Most users probably need just common schemas,
84+
# but we're keeping it `OFF` by default to avoid disruption
85+
# (e.g. all Python distribution would need to adapt this option to be set).
86+
option(BUILD_ONLY_COMMON_SCHEMAS
87+
"Build only common IFC schemas (2x3, 4, 4x3_add2). By default all schemas will be built."
88+
OFF)
89+
option(SCHEMA_VERSIONS "Explicitly specify schemas to build." "")
8390

8491
option(WITH_OPENCASCADE "Enable geometry interpretation using Open CASCADE" ON)
8592
option(WITH_CGAL "Enable geometry interpretation using CGAL" ON)
@@ -449,8 +456,8 @@ include_directories(${OPENCOLLADA_INCLUDE_DIRS}
449456
)
450457

451458
if(NOT SCHEMA_VERSIONS)
452-
if(WASM_BUILD)
453-
# super arbitrarily try to keep size down at least a little bit
459+
# `WASM_BUILD` - super arbitrarily try to keep size down at least a little bit
460+
if(BUILD_ONLY_COMMON_SCHEMAS OR WASM_BUILD)
454461
set(SCHEMA_VERSIONS "2x3" "4" "4x3_add2")
455462
else()
456463
set(SCHEMA_VERSIONS "2x3" "4" "4x1" "4x2" "4x3" "4x3_tc1" "4x3_add1" "4x3_add2")

src/ifcparse/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ foreach(file ${IFCPARSE_CPP_FILES_ALL})
1717
endif()
1818
endforeach()
1919

20-
message(STATUS "SCHEMA_VERSIONS from ifcparse: ${SCHEMA_VERSIONS}")
2120
foreach(schema ${SCHEMA_VERSIONS})
2221
list(APPEND IFCPARSE_H_FILES
2322
Ifc${schema}.h

0 commit comments

Comments
 (0)