Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions llvm/cmake/modules/AddLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function(llvm_update_compile_flags name)
endfunction()

function(add_llvm_symbol_exports target_name export_file)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
set(native_export_file "${target_name}.exports")
add_custom_command(OUTPUT ${native_export_file}
COMMAND sed -e "s/^/_/" < ${export_file} > ${native_export_file}
Expand All @@ -108,7 +108,7 @@ function(add_llvm_symbol_exports target_name export_file)
COMMENT "Creating export file for ${target_name}")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-exported_symbols_list,\"${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}\"")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
# FIXME: `-Wl,-bE:` bypasses whatever handling there is in the build
# compiler driver to defer to the specified export list.
set(native_export_file "${export_file}")
Expand Down Expand Up @@ -268,7 +268,7 @@ if (NOT DEFINED LLVM_LINKER_DETECTED AND NOT WIN32)
endif()
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
include(CheckLinkerFlag)
# Linkers that support Darwin allow a setting to internalize all symbol exports,
# aiding in reducing binary size and often is applicable for executables.
Expand Down Expand Up @@ -315,11 +315,11 @@ function(add_link_opts target_name)
# linker in a context where the optimizations are not important.
if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if(NOT LLVM_NO_DEAD_STRIP)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
# ld64's implementation of -dead_strip breaks tools that use plugins.
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-dead_strip")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "SunOS" AND LLVM_LINKER_IS_SOLARISLD)
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS" AND LLVM_LINKER_IS_SOLARISLD)
# Support for ld -z discard-unused=sections was only added in
# Solaris 11.4. GNU ld ignores it, but warns every time.
check_linker_flag(CXX "-Wl,-z,discard-unused=sections" LINKER_SUPPORTS_Z_DISCARD_UNUSED)
Expand All @@ -333,7 +333,7 @@ function(add_link_opts target_name)
LINK_FLAGS " -Wl,--gc-sections")
endif()
else() #LLVM_NO_DEAD_STRIP
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-bnogc")
endif()
Expand All @@ -345,7 +345,7 @@ function(add_link_opts target_name)
LINK_FLAGS " -Wl,-no_warn_duplicate_libraries")
endif()

if(ARG_SUPPORT_PLUGINS AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if(ARG_SUPPORT_PLUGINS AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set_property(TARGET ${target_name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-brtl")
endif()
Expand Down Expand Up @@ -667,7 +667,7 @@ function(llvm_add_library name)
# that are used across shared objects which we can't hide.
if (LLVM_BUILD_LLVM_DYLIB_VIS AND NOT BUILD_SHARED_LIBS AND NOT APPLE AND
(NOT (WIN32 OR CYGWIN) OR ((MINGW OR CYGWIN) AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")) AND
NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX") AND
NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX") AND
NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)

set_target_properties(${name} PROPERTIES
Expand Down Expand Up @@ -1094,7 +1094,7 @@ macro(add_llvm_executable name)
llvm_update_compile_flags(${name})
endif()

if (ARG_SUPPORT_PLUGINS AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if (ARG_SUPPORT_PLUGINS AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(LLVM_NO_DEAD_STRIP On)
endif()

Expand Down Expand Up @@ -1417,7 +1417,7 @@ function(export_executable_symbols target)
# CMake doesn't set CMAKE_EXE_EXPORTS_${lang}_FLAG on Solaris, so
# ENABLE_EXPORTS has no effect. While Solaris ld defaults to -rdynamic
# behaviour, GNU ld needs it.
if (APPLE OR ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
if (APPLE OR "${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
set_property(TARGET ${target} APPEND_STRING PROPERTY
LINK_FLAGS " -rdynamic")
endif()
Expand Down Expand Up @@ -2540,7 +2540,7 @@ function(llvm_setup_rpath name)
if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "AIX" AND BUILD_SHARED_LIBS)
# $ORIGIN is not interpreted at link time by aix ld.
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
# hardcode the rpath to build/install lib dir first in this mode.
Expand All @@ -2549,7 +2549,7 @@ function(llvm_setup_rpath name)
elseif(UNIX)
set(_build_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
if("${CMAKE_SYSTEM_NAME}" MATCHES "(FreeBSD|DragonFly)")
set_property(TARGET ${name} APPEND_STRING PROPERTY
LINK_FLAGS " -Wl,-z,origin ")
endif()
Expand All @@ -2567,7 +2567,7 @@ function(llvm_setup_rpath name)
# On AIX, the tool chain doesn't support modifying rpaths/libpaths for XCOFF
# on install at the moment, so BUILD_WITH_INSTALL_RPATH is required.
if("${CMAKE_BUILD_RPATH}" STREQUAL "")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin|AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin|AIX")
set_property(TARGET ${name} PROPERTY BUILD_WITH_INSTALL_RPATH ON)
else()
set_property(TARGET ${name} APPEND PROPERTY BUILD_RPATH "${_build_rpath}")
Expand Down
25 changes: 15 additions & 10 deletions llvm/cmake/modules/HandleLLVMOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ if(WIN32 OR CYGWIN)
elseif(FUCHSIA OR UNIX)
set(LLVM_ON_WIN32 0)
set(LLVM_ON_UNIX 1)
if(APPLE OR ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if(APPLE OR "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(LLVM_HAVE_LINK_VERSION_SCRIPT 0)
else()
set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
Expand All @@ -249,7 +249,7 @@ set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
set(LTDL_SHLIB_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})

# We use *.dylib rather than *.so on darwin, but we stick with *.so on AIX.
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_MODULE_SUFFIX})
else()
set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
Expand All @@ -260,7 +260,7 @@ if(APPLE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-flat_namespace -Wl,-undefined -Wl,dynamic_lookup")
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
# RHEL7 has ar and ranlib being non-deterministic by default. The D flag forces determinism,
# however only GNU version of ar and ranlib (2.27) have this option.
# RHEL DTS7 is also affected by this, which uses GNU binutils 2.28
Expand Down Expand Up @@ -292,7 +292,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
endif()
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
# -fPIC does not enable the large code model for GCC on AIX but does for XL.
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
append("-mcmodel=large" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
Expand Down Expand Up @@ -328,7 +328,7 @@ endif()
# by dlclose(). We need that since the CLI API relies on cross-references
# between global objects which became horribly broken when one of the libraries
# is unloaded.
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,nodelete")
endif()
Expand Down Expand Up @@ -454,13 +454,13 @@ if( LLVM_ENABLE_PIC )
# to SEGV (GCC PR target/96607).
# clang with -O3 -fPIC generates code that SEGVs.
# Both can be worked around by compiling with -O instead.
if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS" AND LLVM_NATIVE_ARCH STREQUAL "Sparc")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS" AND LLVM_NATIVE_ARCH STREQUAL "Sparc")
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O[23]" "-O")
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O[23]" "-O")
endif()
endif()

if((NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX")) AND
if((NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")) AND
(NOT (WIN32 OR CYGWIN) OR ((MINGW OR CYGWIN) AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")))
# GCC for MinGW does nothing about -fvisibility-inlines-hidden, but warns
# about use of the attributes. As long as we don't use the attributes (to
Expand Down Expand Up @@ -708,7 +708,7 @@ endif ()
if ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(module_flags "-fmodules -fmodules-cache-path=${PROJECT_BINARY_DIR}/module.cache")
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
# On Darwin -fmodules does not imply -fcxx-modules.
set(module_flags "${module_flags} -fcxx-modules")
endif()
Expand Down Expand Up @@ -1123,7 +1123,7 @@ endif()
# But MinSizeRel seems to add that automatically, so maybe disable these
# flags instead if LLVM_NO_DEAD_STRIP is set.
if(NOT CYGWIN AND NOT MSVC)
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND
if(NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin" AND
NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if (CMAKE_CXX_COMPILER_ID MATCHES "XL")
append("-qfuncsect" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
Expand Down Expand Up @@ -1315,9 +1315,14 @@ endif()
# linking (due to incompatibility). With MSVC, note that the plugin has to
# explicitly link against (exactly one) tool so we can't unilaterally turn on
# LLVM_ENABLE_PLUGINS when it's enabled.
if("${CMAKE_SYSTEM_NAME}" MATCHES AIX)
set(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION OFF)
else()
set(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION ON)
endif()
CMAKE_DEPENDENT_OPTION(LLVM_EXPORT_SYMBOLS_FOR_PLUGINS
"Export symbols from LLVM tools so that plugins can import them" OFF
"NOT ${CMAKE_SYSTEM_NAME} MATCHES AIX" ${LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_AIX_default})
"LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_OPTION" ${LLVM_EXPORT_SYMBOLS_FOR_PLUGINS_AIX_default})
if(BUILD_SHARED_LIBS AND LLVM_EXPORT_SYMBOLS_FOR_PLUGINS)
message(FATAL_ERROR "BUILD_SHARED_LIBS not compatible with LLVM_EXPORT_SYMBOLS_FOR_PLUGINS")
endif()
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Target/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ add_llvm_component_library(LLVMTarget
# that are used across shared objects which we can't hide.
if (NOT BUILD_SHARED_LIBS AND NOT APPLE AND
(NOT (WIN32 OR CYGWIN) OR ((MINGW OR CYGWIN) AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")) AND
NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX") AND
NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX") AND
NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
# Set default visibility to hidden, so we don't export all the Target classes
# in libLLVM.so.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/TargetParser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if (HAS_WERROR_GLOBAL_CTORS AND NOT LLVM_HAS_NOGLOBAL_CTOR_MUTEX)
endif()

# Solaris code uses kstat, so specify dependency explicitly for shared builds.
if (${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
set(system_libs kstat)
endif()

Expand Down
4 changes: 2 additions & 2 deletions llvm/tools/llvm-jitlink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ add_llvm_tool(llvm-jitlink
EXPORT_SYMBOLS
)

if(${CMAKE_SYSTEM_NAME} MATCHES "Haiku")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Haiku")
target_link_libraries(llvm-jitlink PRIVATE network)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
target_link_libraries(llvm-jitlink PRIVATE socket)
endif()
6 changes: 3 additions & 3 deletions llvm/unittests/Support/DynamicLibrary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set_output_directory(DynamicLibraryLib
)

# FIXME: Find out why AIX fails with new DynamicLibrary symbols behavior.
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
add_llvm_unittest(DynamicLibraryTests
DynamicLibraryTest.cpp
)
Expand All @@ -28,7 +28,7 @@ else()
)
endif()
target_link_libraries(DynamicLibraryTests PRIVATE DynamicLibraryLib)
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
export_executable_symbols(DynamicLibraryTests)
endif()

Expand Down Expand Up @@ -64,7 +64,7 @@ endfunction(dynlib_add_module)

# Revert -Wl,-z,nodelete on this test since it relies on the file
# being unloaded.
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
string(REPLACE "-Wl,-z,nodelete" "" CMAKE_MODULE_LINKER_FLAGS
${CMAKE_MODULE_LINKER_FLAGS})
endif()
Expand Down
2 changes: 1 addition & 1 deletion mlir/cmake/modules/FindSyclRuntime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if(NOT DEFINED ENV{CMPLR_ROOT})
else()
get_filename_component(ONEAPI_VER "$ENV{CMPLR_ROOT}" NAME)
if(ONEAPI_VER VERSION_LESS 2024.0)
if(LINUX OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux"))
if(LINUX OR ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux"))
set(SyclRuntime_ROOT "$ENV{CMPLR_ROOT}/linux")
elseif(WIN32)
set(SyclRuntime_ROOT "$ENV{CMPLR_ROOT}/windows")
Expand Down
2 changes: 1 addition & 1 deletion offload/cmake/OpenMPTesting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (${OPENMP_STANDALONE_BUILD})
if (MSVC OR XCODE)
set(DEFAULT_LIT_ARGS "${DEFAULT_LIT_ARGS} --no-progress-bar")
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(DEFAULT_LIT_ARGS "${DEFAULT_LIT_ARGS} --time-tests --timeout=1800")
endif()
set(OPENMP_LIT_ARGS "${DEFAULT_LIT_ARGS}" CACHE STRING "Options for lit.")
Expand Down
2 changes: 1 addition & 1 deletion openmp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ set(ENABLE_LIBOMPTARGET ON)
# there is no point in trying to compile libomptarget on other OSes.
# 32-bit systems are not supported either.
if (APPLE OR WIN32 OR WASM OR NOT "cxx_std_17" IN_LIST CMAKE_CXX_COMPILE_FEATURES
OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8 OR ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8 OR "${CMAKE_SYSTEM_NAME}"MATCHES "AIX")
set(ENABLE_LIBOMPTARGET OFF)
endif()

Expand Down
2 changes: 1 addition & 1 deletion openmp/cmake/OpenMPTesting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if (${OPENMP_STANDALONE_BUILD})
if (MSVC OR XCODE)
set(DEFAULT_LIT_ARGS "${DEFAULT_LIT_ARGS} --no-progress-bar")
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if ("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(DEFAULT_LIT_ARGS "${DEFAULT_LIT_ARGS} --time-tests --timeout=3000")
endif()
set(OPENMP_LIT_ARGS "${DEFAULT_LIT_ARGS}" CACHE STRING "Options for lit.")
Expand Down
2 changes: 1 addition & 1 deletion openmp/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ set(LIBOMP_ASMFLAGS "" CACHE STRING
"Appended user specified assembler flags.")
set(LIBOMP_LDFLAGS "" CACHE STRING
"Appended user specified linker flags.")
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(LIBOMP_LIBFLAGS "-lperfstat" CACHE STRING
"Appended user specified linked libs flags. (e.g., -lm)")
if("${LIBOMP_ARCH}" STREQUAL "ppc")
Expand Down
6 changes: 3 additions & 3 deletions openmp/runtime/cmake/LibompHandleFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@ function(libomp_get_libflags libflags)
if(LIBOMP_HAVE_SHM_OPEN_WITH_LRT)
libomp_append(libflags_local -lrt)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly|FreeBSD|OpenBSD")
if("${CMAKE_SYSTEM_NAME}" MATCHES "DragonFly|FreeBSD|OpenBSD")
libomp_append(libflags_local "-Wl,--no-as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
libomp_append(libflags_local "-lm")
libomp_append(libflags_local "-Wl,--as-needed" LIBOMP_HAVE_AS_NEEDED_FLAG)
if (${CMAKE_SYSTEM_NAME} STREQUAL "DragonFly")
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
libomp_append(libflags_local "-lkvm")
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux|NetBSD|SunOS")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux|NetBSD|SunOS")
libomp_append(libflags_local -lm)
endif()
set(libflags_local ${libflags_local} ${LIBOMP_LIBFLAGS})
Expand Down
4 changes: 2 additions & 2 deletions openmp/runtime/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ else()
# Unix specific files
libomp_append(LIBOMP_CXXFILES z_Linux_util.cpp)
libomp_append(LIBOMP_CXXFILES kmp_gsupport.cpp)
if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
libomp_append(LIBOMP_GNUASMFILES z_AIX_asm.S) # AIX assembly file
else()
libomp_append(LIBOMP_GNUASMFILES z_Linux_asm.S) # Unix assembly file
Expand Down Expand Up @@ -218,7 +218,7 @@ if(OPENMP_MSVC_NAME_SCHEME)
LINK_FLAGS "${LIBOMP_CONFIGURED_LDFLAGS}"
LINKER_LANGUAGE ${LIBOMP_LINKER_LANGUAGE}
)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
set(LIBOMP_SHARED_OUTPUT_NAME "omp" CACHE STRING "Output name for the shared libomp runtime library.")
set_target_properties(omp PROPERTIES
OUTPUT_NAME "${LIBOMP_SHARED_OUTPUT_NAME}"
Expand Down
4 changes: 2 additions & 2 deletions third-party/benchmark/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ endif(HAVE_LIB_RT)


# We need extra libraries on Windows
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if("${CMAKE_SYSTEM_NAME}" MATCHES "Windows")
target_link_libraries(benchmark PRIVATE shlwapi)
endif()

# We need extra libraries on Solaris
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
if("${CMAKE_SYSTEM_NAME}" MATCHES "SunOS")
target_link_libraries(benchmark PRIVATE kstat)
endif()

Expand Down
2 changes: 1 addition & 1 deletion third-party/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if(WIN32)
endif()

# Google Test requires headers which need _ALL_SOURCE to build on AIX
if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
if (UNIX AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
remove_definitions("-D_XOPEN_SOURCE=700")
add_definitions("-D_ALL_SOURCE")
endif()
Expand Down