Skip to content

Commit 464c01a

Browse files
authored
[CMake] Fix usage of lowercase or in condition (#1117)
CMake is a strange animal and some things are case sensitive, while others aren't. It seems that `if(<condition>)` logical operator `OR` is case sensitive, and `or` was not cutting it. At least for CMake 3.26.4. If some CMake version allows `or`, it should also allow `OR`, so this change should not be a problem for those versions. Most of the time these pieces are not actually hit, because the build system sets `SwiftTesting_MACROS` to `NO`, so this is skipped, which might explain why it has not been a problem.
1 parent 72afbb4 commit 464c01a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ if(SwiftTesting_MACRO STREQUAL "<auto>")
6666
if(NOT SwiftTesting_BuildMacrosAsExecutables)
6767
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
6868
set(SwiftTesting_MACRO_PATH "${SwiftTesting_MACRO_INSTALL_PREFIX}/lib/swift/host/plugins/testing/libTestingMacros.dylib")
69-
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" or CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
69+
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "FreeBSD")
7070
set(SwiftTesting_MACRO_PATH "${SwiftTesting_MACRO_INSTALL_PREFIX}/lib/swift/host/plugins/libTestingMacros.so")
7171
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
7272
set(SwiftTesting_MACRO_PATH "${SwiftTesting_MACRO_INSTALL_PREFIX}/bin/TestingMacros.dll")

0 commit comments

Comments
 (0)