You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [BSD license](http://github.com/stepcode/stepcode/blob/master/COPYING) allows commercial use. In addition, STEPcode is used in other open source projects such as [BRL-CAD](http://www.brl-cad.org) and [SCView](http://github.com/LaurentBauer/SCView).
21
21
22
-
STEPcode traces its roots to the NIST STEP Class Library (SCL) which was developed between ~1987 and 1998. For more details: [History](History.html)
22
+
STEPcode traces its roots to the NIST STEP Class Library (SCL) which was developed between ~1987 and 1998. For more details: [history](/docs/history/)
23
23
24
24
### Quick Start
25
25
@@ -43,21 +43,10 @@ STEPcode can be used with the following standards because they reuse [Part 11](h
43
43
44
44
Some schemas are [included](/docs/included_schemas/) with STEPcode, but those are not the only ones that it will work with.
45
45
46
-
## Community
47
46
47
+
## More pages
48
48
49
-
The [scl-dev mailing list](http://groups.google.com/forum/?fromgroups#!forum/scl-dev) is hosted on google groups. In spite of the name, this is for both users and developers. The STEPcode project has evolved into a diverse open source community helping improve the accessibility, adoption, and long-term availability of STEP related technologies for CAx developers.
50
-
51
-
#### [Projects](List_of_projects.html) and [tasks](List_of_tasks.html)
52
-
53
-
## Code
54
-
55
-
**The source code is on [GitHub](http://github.com/stepcode/stepcode)**
56
-
57
-
More pages:
58
-
----
59
-
60
-
-[Under the hood](/docs/files_dirs/)
49
+
-[Under the hood](/docs/under_hood/)
61
50
-[Examples](/docs/examples/)
62
51
63
52
We use [Travis-CI](https://travis-ci.org/stepcode/stepcode) and Appveyor for testing. Pull requests are automatically tested, as ismaster when it changes.
The build directory is the directory that cmake is executed from, if executed from the command line.
12
+
13
+
## schema_scanner
14
+
- a tool that writes CMakeLists.txt for each schema specified in SC_BUILD_SCHEMAS
15
+
- this became necessary once exp2cxx was modified to produce individual files for each type/entity in the schema, as CMake can't handle compile-time determination of file names
16
+
- you shouldn't ever have to run this by hand
17
+
18
+
## CMakeFiles
19
+
- temporary files (i.e. `.o` files)
20
+
21
+
## src
22
+
- same as CMakeFiles
23
+
24
+
## schemas/SCHEMA_NAME
25
+
- generated source is written to files here
26
+
27
+
## bin/
28
+
See [executables](/docs/executables/)
29
+
<!-- - `exp2cxx` generates C++ code. Formerly *fedex_plus*
- `check_express` Parses the express and checks for errors. Formerly *fedex*
34
+
- The functionality of exp2cxx/exp2py is a superset of this.
35
+
- `p21read_sdai_SCHEMA_NAME` reads one step file and writes the contents to another
36
+
- It may change whitespace or remove comments; otherwise, the input and output files are supposed to be identical. If they are not identical, either the file does not match the schema, or there is a bug in SC.
37
+
- `lazy_sdai_SCHEMA_NAME` lazy loading test executable for SCHEMA
38
+
- Prints time and memory statistics for various stages including file scanning. Loads a few instances, then exits.-->
39
+
40
+
## lib/
41
+
- contains libraries, including libs created for schemas (prefixed with sdai)
When NIST wrote the STEP Class Libraries, libexpress, fedex_plus, etc, they used makefiles and shell scripts to control the build process. While this allowed them to easily automate the build process, it was not portable.
14
+
15
+
STEPcode, the renamed STEP Class Libraries, now use CMake. CMake is portable, but does impose some restrictions that were not originally present.
16
+
17
+
fedex_plus (now exp2cxx) originally wrote a Makefile fragment containing the names of the generated files. Make would happily use that fragment while compiling the Libraries. At that time, a few large files were generated - but the Makefile fragment meant it would have been relatively easy to split the code into numerous small files. Because CMake must create native build system files before the code generation process begins, it is not possible to utilize the Makefile fragment trick. We included some code in CMake to guess what the file names would be, and it ended up working well. However, splitting up the generated code was a priority and it was not feasible to extend this CMake code to that task.
18
+
19
+
To work around this, we wrote a parser which is built and executed during the configure stage - before CMake has finished reading its files - that reads each EXPRESS input file (schema), determines file names for each TYPE, ENTITY, etc, and writes a CMakeLists.txt. After the CMakeLists.txt is written, add_subdirectory() is called for the dir containing it. CMake is unaware that the file didn't exist until the external command executed; it loads the generated CMakeLists.txt as it would any other file.
20
+
21
+
## The process
22
+
23
+
When CMake runs, all files are written to the [build dir](/docs/build_dir/). First, CMake checks for headers and libraries just like any normal configure process. After that, it checks SC_BUILD_SCHEMAS. If that variable is empty, it defaults to generating and compiling code for every schema it can find. Otherwise, it treats the variable as a semicolon-separated list of schemas to be processed. For each schema, it runs the schema scanner (above), generating a CMakeLists.txt.
24
+
25
+
Depending on options, various libs and tools may or may not be selected for compilation. CMakeLists.txt are processed and native build system files are created. When the src/express CMakeLists.txt is processed, the lexer and parser input files, as well as the code in src/express/generated, are compared against stored hashes. If any of those hashes differ, it indicates that the lexer or parser was modified and the code must be re-generated. If that is true, CMake will stop with an error unless it found perplex, lemon, and re2c. If those were found, they are used to regenerate the code, and then the stored hashes are updated with new values.
26
+
27
+
If code for schemas is to be generated, exp2cxx (or exp2py) must be compiled first. Both of those depend on the lexer/parser in libexpress. Once code is generated, it can be compiled and linked into what is commonly referred to (in STEPcode) as an SDAI library. This name refers to the fact that the code conforms to the API dictated by Part 22, Standard Data Access Interface. SDAI libraries also link against `src/cl*`, the [class libraries](/docs/files_dirs/#class-libraries).
@@ -46,34 +48,16 @@ Configuration options (append to the 'cmake ..' line):
46
48
47
49
#### See Also: [CMake variables](/docs/cmake_vars/)
48
50
49
-
Create c++ for a schema manually:
50
-
---------------------------------
51
+
## Create c++ for a schema manually:
51
52
52
53
`mkdir build/schema_name
53
54
cd build/schema_name
54
55
../bin/exp2cxx path/to/schema.exp`
55
56
56
-
Files created in build dir
57
-
--------------------------
58
-
59
-
-`build/schema_scanner` a tool that writes CMakeLists.txt for each schema specified in SC_BUILD_SCHEMAS
60
-
- this became necessary once exp2cxx was modified to produce individual files for each type/entity in the schema, as CMake can't handle compile-time determination of file names
-`check_express` Parses the express and checks for errors. Formerly *fedex*
71
-
- The functionality of exp2cxx/exp2py is a superset of this.
72
-
-`p21read_sdai_SCHEMA_NAME` reads one step file and writes the contents to another
73
-
- It may change whitespace or remove comments; otherwise, the input and output files are supposed to be identical. If they are not identical, either the file does not match the schema, or there is a bug in SC.
74
-
-`lazy_sdai_SCHEMA_NAME` lazy loading test executable for SCHEMA
75
-
- Prints time and memory statistics for various stages including file scanning. Loads a few instances, then exits.
76
-
-`build/lib/` contains libraries, including libs created for schemas (prefixed with sdai)
77
-
78
-
More options are available - see the man pages, and read comments in the
79
-
various CMakeLists.txt files.
57
+
## More details
58
+
59
+
For a walkthrough of the build process, see [Build Process](/docs/build_process/)
60
+
61
+
For a description of the contents of the build/ dir, see [Build Dir](/docs/build_dir/)
62
+
63
+
More options are available - see [Executables](/docs/executables/), and read comments in the various CMakeLists.txt files.
- reads one step file and writes the contents to another
52
+
- It may change whitespace or remove comments; otherwise, the input and output files are supposed to be identical. If they are not identical, either the file does not match the schema, or there is a bug in SC.
53
+
- TODO document args
54
+
55
+
## lazy_sdai_SCHEMA_NAME
56
+
- lazy loading test executable for SCHEMA
57
+
- Prints time and memory statistics for various stages including file scanning. Loads a few instances, then exits.
58
+
- TODO document args
59
+
60
+
## libexpress common options
61
+
Executables linked with libexpress share some common options, though they don't all make sense for every executable.
This comes from [classes_misc.c:709](https://github.com/stepcode/stepcode/blob/master/src/exp2cxx/classes_misc.c#L709), which is now in a different location due to exp2cxx refactoring. It should be formatted such that doxygen sees it.
10
8
11
9
Attributes are divided into four categories: these are not exclusive as
0 commit comments