TTT

CMake build script should merge includes

Bug #695679 reported by Johannes T
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TTT
Invalid
Low
Johannes T

Bug Description

The CMake build script should merge the contents of all includes into one file (ttt.h). At the moment only ttt.h include all other includes.

Related branches

Revision history for this message
Johannes T (jo-ey) wrote :

I see the following possibilities to create a usable ttt.h:
1) CMake
2) C
3) Scheme (the planned-to-use tinyscheme)

Comments must be filtered out to create a reasonably sized header, I think this will hardly be possible with CMake. I think the solution to go with is to implement this in C. This will guarantee to work on all platforms (on which the lib itself compiles). It must be possible to compile the C lib only (without Scheme extensions) and to have a suitable header file.

Revision history for this message
Johannes T (jo-ey) wrote :

The created header should be registered in the CMakeLists.txt file with the command

SET_SOURCE_FILES_PROPERTIES(${rootdir}/inc/ttt.h PROPERTIES GENERATED TRUE)

and then created with

ADD_CUSTOM_COMMAND(OUTPUT inc/ttt.h ...)

and then be added to the input files for libttt. Please note that for SET_SOURCE_FILES_PROPERTIES an absolute path should be used.

Revision history for this message
Johannes T (jo-ey) wrote :

A small C utility program (filter_c_comments) was added to accomplish the task.

Changed in ttt:
status: New → Fix Committed
Johannes T (jo-ey)
Changed in ttt:
status: Fix Committed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.