Archived issue #0024331

CMake scripts improvements

Open CASCADEOCCT:Codingclosed7 public notes

Search issues

Description

Current CMake scripts have some limitations and can be improved to:

- Remove prefix '3RDPARTY' from variables that trigger use of 3rd-party products. This would move them to separate group 'USE' which can be more convenient for the user to spot these variables. Note that this is how CMake is described in current documentation.

- Revise help strings associated with CMake variables; for instance variables "3RDPARTY_..._DLL" and "..._LIBRARY" are now documented as "Directory containing... library" while actually they contain full path to the library file

- Enable identification of Tcl8.6 libraries; current code seems to be bound to Tcl 8.5

- Make sure that tests work after installation (with all INSTALL_ options checked). In my case DRAW starts fine but attempt to run testgrid command causes error (most likely we need to define environment variables like TCLLIBPATH):

    Draw[1]> testgrid demo
    can't find package msgcat 1.4

- Option /fp:precise should be explicitly set for Visual Studio projects, as a protection for the case if the project will be converted to use of Intel compiler which use /fp:fast as default (bad for OCCT)

- Generation of CMake scripts (wgenproj) should create env.*.in and draw.* files for all platforms (not only current one)

Public activity

7 archived notes

Participants are labeled by their role within this record.

01Commenter 1
I have pushed some additional corrections related to CMake builds to branch CR24331, please take them into account
02Commenter 2
CR24331_1 OCCT branch and CR24331 WOK branch are ready for reviewing
03Commenter 3
Some remarks (not ctitical, but anyway):

- Please improve description of parameter BUILD_TOOLKITS, I guess it could sound "List of OCCT toolkits to be built (use if whole module is not selected)"

- Then I suggest that possibility to choose configurations other than Debug and Release supported by CMake (e.g. "RelWithDebugInfo") should be enabled in BUILD_TYPE parameter. Should not it be renamed to BUILD_CONFIGURATION, by the way?

- Is it possible with CMake to group OCCT toolkits by modules in VS solution, as we do in WOK generation?

- Probably define No_Exception in Release builds, to exclude run-time checks which are usually done in Debug mode.

- There is a tricky point with options BUILD_ for modules: if you keep BUILD_Draw enabled, this leads to building almost everything due to dependencies. Please give some hint on this in documentation. Perhaps warning can be issued for toolkits which are not selected explicitly for building but taken due to dependency.
04Commenter 4
More serious point: in 64-bit mode (vc9, release) INSTALL produced error:

1> file INSTALL cannot find "D:/DevTools/TclTk85/lib/tcl85".
05Commenter 5
One more point: I suggest that subdirectory adm/cmake_inv should be renamed to adm/templates
06Commenter 6
Additional issue (not sure it was the same on other machine I tried): I have TObj package sources copied by INSTALL project...
07Commenter 7
Reviewed and tested on VS 2010 64-bit, please test / integrate

Related records