View Issue Details

IDProjectCategoryView StatusLast Update
0029328Open CASCADEOCCT:Configurationpublic2023-09-29 17:49
ReporterabvAssigned To 
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Target VersionUnscheduled 
Summary0029328: Configuration, CMake scripts - use MATCHES instead of STREQUAL to check for compiler type
DescriptionCurrently in the OCCT's own CMake scripts the checks for compiler type are made using STREQUAL operator. This seems to be not the best practice: both Cotire and OCE do that check using MATCHES operator.
Additional information
and documentation updates
D:\ABV\OCCT\occt\adm\cmake>grep -i clang *

cotire.cmake: # Compiler id for Apple Clang is now AppleClang
cotire.cmake: if (_option_COMPILER_ID MATCHES "Clang")
cotire.cmake: set (_prologue "#pragma clang system_header")
cotire.cmake: elseif (_compilerID MATCHES "Clang")
cotire.cmake: # Clang options used
cotire.cmake: elseif (_compilerID MATCHES "GNU|Clang")
cotire.cmake: # GCC / Clang options used
cotire.cmake: elseif (_compilerID MATCHES "Clang")
cotire.cmake: # Clang options used
cotire.cmake: elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
cotire.cmake: # all Clang versions have PCH support
cotire.cmake: # PCH compilation not supported by GCC / Clang for multi-architecture builds (e.g., i386, x86_64)
cotire.cmake: if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang|Intel|MSVC")
cotire.cmake: elseif (CMAKE_${_language}_COMPILER_ID MATCHES "Clang")
cotire.cmake: # Clang looks for a precompiled header corresponding to the prefix header with the extension .pch appended
cotire.cmake: if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
cotire.cmake: # GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma
cotire.cmake: if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
cotire.cmake: if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
cotire.cmake: # GNU and Clang require indirect compilation of the prefix header to make them honor the system_header pragma
cotire.cmake: if (CMAKE_${_language}_COMPILER_ID MATCHES "GNU|Clang")
cotire.cmake: C_CLANG_TIDY CXX_CLANG_TIDY)

occt_defs_flags.cmake:elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
occt_defs_flags.cmake:elseif ("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
occt_macros.cmake: elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
TagsNo tags attached.
Test case numberNot needed

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2017-11-16 08:56 abv New Issue
2017-11-16 08:56 abv Assigned To => bugmaster
2017-11-23 14:32 bugmaster Assigned To bugmaster => apn
2017-11-23 14:32 bugmaster Status new => assigned
2019-07-19 17:11 apn Test case number => Not needed
2019-07-19 17:11 apn Target Version => 7.5.0
2020-09-11 15:37 utverdov Assigned To apn => inv
2020-09-11 15:40 utverdov Target Version 7.5.0 => 7.6.0
2020-09-11 17:08 bugmaster Assigned To inv => bugmaster
2021-09-03 14:13 bugmaster Target Version 7.6.0 => 7.7.0
2022-10-24 10:38 szy Target Version 7.7.0 => 7.8.0
2023-08-01 15:09 dpasukhi Target Version 7.8.0 => Unscheduled
2023-09-29 17:49 vglukhik Assigned To bugmaster =>