-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changes the logic in the CMake infrastructure somewhat. STREQUAL is an exact match. MATCHES just matches a string in the full string. E.g. ... MATCHES ABC will find for "fooABCbar" and all variants where ABC is present. This may sometimes not be decired. However, in the case for compilers and systems, using matches may be the best choice to allow smaller variations of variables (coming down the road). In this change SYSTEM_PROCESSOR will now use MATCHES instead of STREQUAL. The original code could be dated back to 2015 in 1c36bf1. The same goes for the compiler specifications. Now MATCHES allows a greater variability in the compiler naming conventions. This change results in some logic changes (should be changed if not desired). For instance this change: - elseif(CMAKE_C_COMPILER_ID STREQUAL Clang AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 13) + elseif(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 13) results in ALTIVEC=TRUE for AppleClang compilers at versions >=13. It did not previously. While MATCHES Intel will also match IntelLLVM I have added explicit IntelLLVM to make it clear the intent, this is strictly not needed due to the above. Signed-off-by: Nick Papior <[email protected]>
- Loading branch information
1 parent
1483050
commit 8d1c482
Showing
1 changed file
with
19 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters