Archived issue #0026787

Do not declare redundant macros WNT, LIN, LININTEL, WIN32, WIN64 within samples project files

Open CASCADEOCCT:Samplesclosed12 public notes

Search issues

Description

The macros WNT, WIN32, WIN64, LIN, LININTEL have been dropped within #0022972 from OCCT.
However, they still defined in some samples. E.g. samples/mfc/standard/04_Viewer3d/adm/win/vc10/Viewer3d.vcxproj:
       <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;WNT;WINVER=0x0500;%(PreprocessorDefinitions)</PreprocessorDefinitions>


It is better to clean up sample project from this stuff.

Steps to reproduce

N/A

Public activity

12 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: ski
Date: Fri Oct 23 16:12:34 2015 +0300

    0026787: Do not declare redundant macros WNT, LIN, WIN32, WIN64 within samples project files
    
    Redundant macros were removed.
02Author
-    !macx | equals(MACOSX_USE_GLX, true): DEFINES += LIN LININTEL
+    !macx | equals(MACOSX_USE_GLX, true): DEFINES += __linux__ LININTEL


-    DEFINES +=WNT WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS
+    DEFINES += _WIN32 NO_COMMONSAMPLE_EXPORTS NO_IESAMPLE_EXPORTS

note that macros _WIN32 and __linux__ are implicitly predefined by compiler within appropriate platform.
There is no much sense defining them explicitly within project settings.
LININTEL usage should be dropped as well.

03Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
04Commenter 4
Dear kgv,

occt branch CR26787 was rebased on current state of master (with applied remarks).

Products branch CR26787 was created.

Please, review.
05Author
Please check compilation of changed samples on all supported platforms.
06Commenter 6
Dear Commenter 1,
Branch CR26787 from occt git-repository (and CR26787 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
[revision removed]

Number of compiler warnings:

occt component :
Linux: 1 (1 on master)
Windows: 0 (0 on master)

products component :
Linux: 39 (39 on master)
Windows: 0 (0 on master)

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 92715858 / 92334582 [+0.41%]
Total CPU difference: 19784.67999999976 / 19731.449999999688 [+0.27%]
products component :
Total MEMORY difference: 26251657 / 26272952 [-0.08%]
Total CPU difference: 7457.359999999993 / 7371.560000000013 [+1.16%]

Testing on Windows:
occt component :
Total MEMORY difference: 58037751 / 58043302 [-0.01%]
Total CPU difference: 18403.03236739902 / 18133.197437699022 [+1.49%]
products component :
Total MEMORY difference: 17162482 / 17167510 [-0.03%]
Total CPU difference: 5729.745128899976 / 5658.655473199974 [+1.26%]

There are no differences in images found by testdiff.
07Commenter 1
08Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
09Commenter 9
occt branch CR26787 and product branch CR26787 were updated and rebased on current state of master.

Compilation of products qt samples ACIS, DXP and Parasolid was fixed.
For other qt samples on Linux platform (in products) separate issue #26824 was created.

Problems of products java samples compilation were not related to the fix.

Problems of products qt samples and mfc samples (on Windows) compilation were caused by redundant macros in products source code.

Dear kgv, please review.
10Author
Please check samples compilation on updated branches.
11Commenter 1
All the samples are compiled without errors except registered in 0026824.
Compilation of OCCT and Products qt samples on Linux platform was included to Jenkins certification system for each branch
12Commenter 2
Branch [archived branch] has been deleted by Author.

[revision removed]

Related records