Commit b0b4b460 authored by Rolf Eike Beer's avatar Rolf Eike Beer

Remove .* expressions from beginning and end of MATCHES regexs

All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
parent 5bd48ac5
...@@ -34,20 +34,20 @@ else() ...@@ -34,20 +34,20 @@ else()
endif() endif()
#silence duplicate symbol warnings on AIX #silence duplicate symbol warnings on AIX
if(CMAKE_SYSTEM MATCHES "AIX.*") if(CMAKE_SYSTEM MATCHES "AIX")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
endif() endif()
endif() endif()
if(CMAKE_SYSTEM MATCHES "IRIX.*") if(CMAKE_SYSTEM MATCHES "IRIX")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-woff84 -no_auto_include")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15") set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-woff15")
endif() endif()
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*") if(CMAKE_SYSTEM MATCHES "OSF1-V")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
endif() endif()
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
set(PACKAGE_VERSION "@CVF_VERSION@") set(PACKAGE_VERSION "@CVF_VERSION@")
if("@CVF_VERSION@" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\..*") # strip the tweak version if("@CVF_VERSION@" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version
set(CVF_VERSION_NO_TWEAK "${CMAKE_MATCH_1}") set(CVF_VERSION_NO_TWEAK "${CMAKE_MATCH_1}")
else() else()
set(CVF_VERSION_NO_TWEAK "@CVF_VERSION@") set(CVF_VERSION_NO_TWEAK "@CVF_VERSION@")
endif() endif()
if("${PACKAGE_FIND_VERSION}" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\..*") # strip the tweak version if("${PACKAGE_FIND_VERSION}" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version
set(REQUESTED_VERSION_NO_TWEAK "${CMAKE_MATCH_1}") set(REQUESTED_VERSION_NO_TWEAK "${CMAKE_MATCH_1}")
else() else()
set(REQUESTED_VERSION_NO_TWEAK "${PACKAGE_FIND_VERSION}") set(REQUESTED_VERSION_NO_TWEAK "${PACKAGE_FIND_VERSION}")
......
...@@ -247,7 +247,7 @@ function(get_bundle_main_executable bundle result_var) ...@@ -247,7 +247,7 @@ function(get_bundle_main_executable bundle result_var)
break() break()
endif() endif()
if(line MATCHES "^.*<key>CFBundleExecutable</key>.*$") if(line MATCHES "<key>CFBundleExecutable</key>")
set(line_is_main_executable 1) set(line_is_main_executable 1)
endif() endif()
endforeach() endforeach()
...@@ -287,7 +287,7 @@ endfunction() ...@@ -287,7 +287,7 @@ endfunction()
function(get_dotapp_dir exe dotapp_dir_var) function(get_dotapp_dir exe dotapp_dir_var)
set(s "${exe}") set(s "${exe}")
if(s MATCHES "^.*/.*\\.app/.*$") if(s MATCHES "/.*\\.app/")
# If there is a ".app" parent directory, # If there is a ".app" parent directory,
# ascend until we hit it: # ascend until we hit it:
# (typical of a Mac bundle executable) # (typical of a Mac bundle executable)
......
...@@ -31,10 +31,10 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS) ...@@ -31,10 +31,10 @@ if(NOT CMAKE_SKIP_COMPATIBILITY_TESTS)
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
include(TestCXXAcceptsFlag) include(TestCXXAcceptsFlag)
set(CMAKE_TRY_ANSI_CXX_FLAGS "") set(CMAKE_TRY_ANSI_CXX_FLAGS "")
if(CMAKE_SYSTEM MATCHES "IRIX.*") if(CMAKE_SYSTEM MATCHES "IRIX")
set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std") set(CMAKE_TRY_ANSI_CXX_FLAGS "-LANG:std")
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF.*") if(CMAKE_SYSTEM MATCHES "OSF")
set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname") set(CMAKE_TRY_ANSI_CXX_FLAGS "-std strict_ansi -nopure_cname")
endif() endif()
# if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see # if CMAKE_TRY_ANSI_CXX_FLAGS has something in it, see
......
...@@ -138,7 +138,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) ...@@ -138,7 +138,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") elseif("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-) set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-)
elseif(COMPILER_BASENAME MATCHES "qcc(\\.exe)?$") elseif(COMPILER_BASENAME MATCHES "qcc(\\.exe)?$")
if(CMAKE_C_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?.*$") if(CMAKE_C_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?")
set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-) set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-)
endif() endif()
endif () endif ()
......
...@@ -135,7 +135,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX) ...@@ -135,7 +135,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_CXX_COMPILER_TARGET}-) set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_CXX_COMPILER_TARGET}-)
elseif(COMPILER_BASENAME MATCHES "QCC(\\.exe)?$") elseif(COMPILER_BASENAME MATCHES "QCC(\\.exe)?$")
if(CMAKE_CXX_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?.*$") if(CMAKE_CXX_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?")
set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-) set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-)
endif() endif()
endif () endif ()
......
...@@ -52,10 +52,10 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src) ...@@ -52,10 +52,10 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n") "Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[") file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
foreach(info ${ABI_STRINGS}) foreach(info ${ABI_STRINGS})
if("${info}" MATCHES ".*INFO:sizeof_dptr\\[0*([^]]*)\\].*") if("${info}" MATCHES "INFO:sizeof_dptr\\[0*([^]]*)\\]")
set(ABI_SIZEOF_DPTR "${CMAKE_MATCH_1}") set(ABI_SIZEOF_DPTR "${CMAKE_MATCH_1}")
endif() endif()
if("${info}" MATCHES ".*INFO:abi\\[([^]]*)\\].*") if("${info}" MATCHES "INFO:abi\\[([^]]*)\\]")
set(ABI_NAME "${CMAKE_MATCH_1}") set(ABI_NAME "${CMAKE_MATCH_1}")
endif() endif()
endforeach() endforeach()
......
...@@ -356,30 +356,30 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) ...@@ -356,30 +356,30 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 6 REGEX "INFO:") CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 6 REGEX "INFO:")
set(COMPILER_ID_TWICE) set(COMPILER_ID_TWICE)
foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS}) foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
if("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*") if("${info}" MATCHES "INFO:compiler\\[([^]\"]*)\\]")
if(COMPILER_ID) if(COMPILER_ID)
set(COMPILER_ID_TWICE 1) set(COMPILER_ID_TWICE 1)
endif() endif()
set(COMPILER_ID "${CMAKE_MATCH_1}") set(COMPILER_ID "${CMAKE_MATCH_1}")
endif() endif()
if("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*") if("${info}" MATCHES "INFO:platform\\[([^]\"]*)\\]")
set(PLATFORM_ID "${CMAKE_MATCH_1}") set(PLATFORM_ID "${CMAKE_MATCH_1}")
endif() endif()
if("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*") if("${info}" MATCHES "INFO:arch\\[([^]\"]*)\\]")
set(ARCHITECTURE_ID "${CMAKE_MATCH_1}") set(ARCHITECTURE_ID "${CMAKE_MATCH_1}")
endif() endif()
if("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*") if("${info}" MATCHES "INFO:compiler_version\\[([^]\"]*)\\]")
string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${CMAKE_MATCH_1}") string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${CMAKE_MATCH_1}")
string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}") string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}")
endif() endif()
if("${info}" MATCHES ".*INFO:simulate\\[([^]\"]*)\\].*") if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]")
set(SIMULATE_ID "${CMAKE_MATCH_1}") set(SIMULATE_ID "${CMAKE_MATCH_1}")
endif() endif()
if("${info}" MATCHES ".*INFO:simulate_version\\[([^]\"]*)\\].*") if("${info}" MATCHES "INFO:simulate_version\\[([^]\"]*)\\]")
string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${CMAKE_MATCH_1}") string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${CMAKE_MATCH_1}")
string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}") string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
endif() endif()
if("${info}" MATCHES ".*INFO:qnxnto") if("${info}" MATCHES "INFO:qnxnto")
set(COMPILER_QNXNTO 1) set(COMPILER_QNXNTO 1)
endif() endif()
endforeach() endforeach()
......
...@@ -130,7 +130,7 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN) ...@@ -130,7 +130,7 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\"" ARGS ${CMAKE_Fortran_COMPILER_ID_FLAGS_LIST} -E "\"${CMAKE_ROOT}/Modules/CMakeTestGNU.c\""
OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN) OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
if(NOT CMAKE_COMPILER_RETURN) if(NOT CMAKE_COMPILER_RETURN)
if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" ) if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_GNU")
set(CMAKE_Fortran_COMPILER_ID "GNU") set(CMAKE_Fortran_COMPILER_ID "GNU")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the Fortran compiler is GNU succeeded with " "Determining if the Fortran compiler is GNU succeeded with "
...@@ -141,10 +141,10 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN) ...@@ -141,10 +141,10 @@ if(NOT CMAKE_Fortran_COMPILER_ID_RUN)
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n") "the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
endif() endif()
if(NOT CMAKE_Fortran_PLATFORM_ID) if(NOT CMAKE_Fortran_PLATFORM_ID)
if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_MINGW.*" ) if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_MINGW")
set(CMAKE_Fortran_PLATFORM_ID "MinGW") set(CMAKE_Fortran_PLATFORM_ID "MinGW")
endif() endif()
if("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_CYGWIN.*" ) if("${CMAKE_COMPILER_OUTPUT}" MATCHES "THIS_IS_CYGWIN")
set(CMAKE_Fortran_PLATFORM_ID "Cygwin") set(CMAKE_Fortran_PLATFORM_ID "Cygwin")
endif() endif()
endif() endif()
......
...@@ -397,7 +397,7 @@ endif() ...@@ -397,7 +397,7 @@ endif()
# to shut down warning about space in buildtree # to shut down warning about space in buildtree
# some recent RPM version should support space in different places. # some recent RPM version should support space in different places.
# not checked [yet]. # not checked [yet].
if(CPACK_TOPLEVEL_DIRECTORY MATCHES ".* .*") if(CPACK_TOPLEVEL_DIRECTORY MATCHES " ")
message(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.") message(FATAL_ERROR "${RPMBUILD_EXECUTABLE} can't handle paths with spaces, use a build directory without spaces for building RPMs.")
endif() endif()
......
...@@ -288,7 +288,7 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All") ...@@ -288,7 +288,7 @@ if (BLA_VENDOR STREQUAL "IBMESSL" OR BLA_VENDOR STREQUAL "All")
endif () endif ()
#BLAS in acml library? #BLAS in acml library?
if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All")
if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR if( ((BLA_VENDOR STREQUAL "ACML") AND (NOT BLAS_ACML_LIB_DIRS)) OR
((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR ((BLA_VENDOR STREQUAL "ACML_MP") AND (NOT BLAS_ACML_MP_LIB_DIRS)) OR
((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS)) ((BLA_VENDOR STREQUAL "ACML_GPU") AND (NOT BLAS_ACML_GPU_LIB_DIRS))
...@@ -465,7 +465,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All") ...@@ -465,7 +465,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR BLA_VENDOR STREQUAL "All")
endif () endif ()
#BLAS in intel mkl 10 library? (em64t 64bit) #BLAS in intel mkl 10 library? (em64t 64bit)
if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
if (NOT WIN32) if (NOT WIN32)
set(LM "-lm") set(LM "-lm")
endif () endif ()
...@@ -532,7 +532,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") ...@@ -532,7 +532,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide") "mkl_blas95 mkl_intel_lp64 mkl_intel_thread mkl_core guide")
# mkl >= 10.3 # mkl >= 10.3
if (CMAKE_C_COMPILER MATCHES ".+gcc.*") if (CMAKE_C_COMPILER MATCHES ".+gcc")
list(APPEND BLAS_SEARCH_LIBS list(APPEND BLAS_SEARCH_LIBS
"mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core gomp") "mkl_blas95_lp64 mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
else () else ()
...@@ -600,7 +600,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") ...@@ -600,7 +600,7 @@ if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All")
"mkl_intel_lp64 mkl_intel_thread mkl_core guide") "mkl_intel_lp64 mkl_intel_thread mkl_core guide")
# mkl >= 10.3 # mkl >= 10.3
if (CMAKE_C_COMPILER MATCHES ".+gcc.*") if (CMAKE_C_COMPILER MATCHES ".+gcc")
list(APPEND BLAS_SEARCH_LIBS list(APPEND BLAS_SEARCH_LIBS
"mkl_intel_lp64 mkl_gnu_thread mkl_core gomp") "mkl_intel_lp64 mkl_gnu_thread mkl_core gomp")
else () else ()
......
...@@ -684,7 +684,7 @@ if(Boost_INCLUDE_DIR) ...@@ -684,7 +684,7 @@ if(Boost_INCLUDE_DIR)
set(_Boost_VERSION_REGEX "([0-9]+)") set(_Boost_VERSION_REGEX "([0-9]+)")
set(_Boost_LIB_VERSION_REGEX "\"([0-9_]+)\"") set(_Boost_LIB_VERSION_REGEX "\"([0-9_]+)\"")
foreach(v VERSION LIB_VERSION) foreach(v VERSION LIB_VERSION)
if("${_boost_VERSION_HPP_CONTENTS}" MATCHES ".*#define BOOST_${v} ${_Boost_${v}_REGEX}.*") if("${_boost_VERSION_HPP_CONTENTS}" MATCHES "#define BOOST_${v} ${_Boost_${v}_REGEX}")
set(Boost_${v} "${CMAKE_MATCH_1}") set(Boost_${v} "${CMAKE_MATCH_1}")
endif() endif()
endforeach() endforeach()
......
...@@ -1194,7 +1194,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files) ...@@ -1194,7 +1194,7 @@ macro(CUDA_WRAP_SRCS cuda_target format generated_files)
foreach(file ${ARGN}) foreach(file ${ARGN})
# Ignore any file marked as a HEADER_FILE_ONLY # Ignore any file marked as a HEADER_FILE_ONLY
get_source_file_property(_is_header ${file} HEADER_FILE_ONLY) get_source_file_property(_is_header ${file} HEADER_FILE_ONLY)
if(${file} MATCHES ".*\\.cu$" AND NOT _is_header) if(${file} MATCHES "\\.cu$" AND NOT _is_header)
# Allow per source file overrides of the format. # Allow per source file overrides of the format.
get_source_file_property(_cuda_source_format ${file} CUDA_SOURCE_PROPERTY_FORMAT) get_source_file_property(_cuda_source_format ${file} CUDA_SOURCE_PROPERTY_FORMAT)
......
...@@ -253,7 +253,7 @@ if( NOT HDF5_FOUND ) ...@@ -253,7 +253,7 @@ if( NOT HDF5_FOUND )
list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} ) list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} )
# find the HDF5 include directories # find the HDF5 include directories
if(${LANGUAGE} MATCHES "Fortran.*") if(${LANGUAGE} MATCHES "Fortran")
set(HDF5_INCLUDE_FILENAME hdf5.mod) set(HDF5_INCLUDE_FILENAME hdf5.mod)
else() else()
set(HDF5_INCLUDE_FILENAME hdf5.h) set(HDF5_INCLUDE_FILENAME hdf5.h)
......
...@@ -37,7 +37,7 @@ if(ICOTOOL_EXECUTABLE) ...@@ -37,7 +37,7 @@ if(ICOTOOL_EXECUTABLE)
ERROR_QUIET ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if("${_icotool_version}" MATCHES "^icotool \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*") if("${_icotool_version}" MATCHES "^icotool \\([^\\)]*\\) ([0-9\\.]+[^ \n]*)")
set( ICOTOOL_VERSION_STRING set( ICOTOOL_VERSION_STRING
"${CMAKE_MATCH_1}" "${CMAKE_MATCH_1}"
) )
......
...@@ -183,7 +183,7 @@ endif () ...@@ -183,7 +183,7 @@ endif ()
#acml lapack #acml lapack
if (BLA_VENDOR MATCHES "ACML.*" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "ACML" OR BLA_VENDOR STREQUAL "All")
if (BLAS_LIBRARIES MATCHES ".+acml.+") if (BLAS_LIBRARIES MATCHES ".+acml.+")
set (LAPACK_LIBRARIES ${BLAS_LIBRARIES}) set (LAPACK_LIBRARIES ${BLAS_LIBRARIES})
endif () endif ()
...@@ -233,7 +233,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR ...@@ -233,7 +233,7 @@ if (BLA_VENDOR STREQUAL "Generic" OR
endif () endif ()
endif () endif ()
#intel lapack #intel lapack
if (BLA_VENDOR MATCHES "Intel*" OR BLA_VENDOR STREQUAL "All") if (BLA_VENDOR MATCHES "Intel" OR BLA_VENDOR STREQUAL "All")
if (NOT WIN32) if (NOT WIN32)
set(LM "-lm") set(LM "-lm")
endif () endif ()
......
...@@ -87,7 +87,7 @@ find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin ...@@ -87,7 +87,7 @@ find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin
if(QT_QMAKE_EXECUTABLE_FINDQT) if(QT_QMAKE_EXECUTABLE_FINDQT)
exec_program(${QT_QMAKE_EXECUTABLE_FINDQT} ARGS "-query QT_VERSION" exec_program(${QT_QMAKE_EXECUTABLE_FINDQT} ARGS "-query QT_VERSION"
OUTPUT_VARIABLE QTVERSION) OUTPUT_VARIABLE QTVERSION)
if(QTVERSION MATCHES "4.*") if(QTVERSION MATCHES "4")
set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt4 qmake program.") set(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE_FINDQT} CACHE PATH "Qt4 qmake program.")
set(QT4_INSTALLED TRUE) set(QT4_INSTALLED TRUE)
endif() endif()
......
...@@ -295,12 +295,12 @@ if(QT_UIC_EXECUTABLE) ...@@ -295,12 +295,12 @@ if(QT_UIC_EXECUTABLE)
endif() endif()
set(_QT_UIC_VERSION_3 FALSE) set(_QT_UIC_VERSION_3 FALSE)
if("${QTVERSION_UIC}" MATCHES ".* 3..*") if("${QTVERSION_UIC}" MATCHES " 3.")
set(_QT_UIC_VERSION_3 TRUE) set(_QT_UIC_VERSION_3 TRUE)
endif() endif()
set(_QT_MOC_VERSION_3 FALSE) set(_QT_MOC_VERSION_3 FALSE)
if("${QTVERSION_MOC}" MATCHES ".* 3..*") if("${QTVERSION_MOC}" MATCHES " 3.")
set(_QT_MOC_VERSION_3 TRUE) set(_QT_MOC_VERSION_3 TRUE)
endif() endif()
......
...@@ -184,7 +184,7 @@ if(SQUISH_CLIENT_EXECUTABLE) ...@@ -184,7 +184,7 @@ if(SQUISH_CLIENT_EXECUTABLE)
execute_process(COMMAND "${SQUISH_CLIENT_EXECUTABLE}" --version execute_process(COMMAND "${SQUISH_CLIENT_EXECUTABLE}" --version
OUTPUT_VARIABLE _squishVersionOutput OUTPUT_VARIABLE _squishVersionOutput
ERROR_QUIET ) ERROR_QUIET )
if("${_squishVersionOutput}" MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+).*$") if("${_squishVersionOutput}" MATCHES "([0-9]+)\\.([0-9]+)\\.([0-9]+)")
set(SQUISH_VERSION_MAJOR "${CMAKE_MATCH_1}") set(SQUISH_VERSION_MAJOR "${CMAKE_MATCH_1}")
set(SQUISH_VERSION_MINOR "${CMAKE_MATCH_2}") set(SQUISH_VERSION_MINOR "${CMAKE_MATCH_2}")
set(SQUISH_VERSION_PATCH "${CMAKE_MATCH_3}") set(SQUISH_VERSION_PATCH "${CMAKE_MATCH_3}")
......
...@@ -162,12 +162,12 @@ if(CMAKE_USE_PTHREADS_INIT) ...@@ -162,12 +162,12 @@ if(CMAKE_USE_PTHREADS_INIT)
set(CMAKE_USE_PTHREADS_INIT 1) set(CMAKE_USE_PTHREADS_INIT 1)
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V*") if(CMAKE_SYSTEM MATCHES "OSF1-V")
set(CMAKE_USE_PTHREADS_INIT 0) set(CMAKE_USE_PTHREADS_INIT 0)
set(CMAKE_THREAD_LIBS_INIT ) set(CMAKE_THREAD_LIBS_INIT )
endif() endif()
if(CMAKE_SYSTEM MATCHES "CYGWIN_NT*") if(CMAKE_SYSTEM MATCHES "CYGWIN_NT")
set(CMAKE_USE_PTHREADS_INIT 1) set(CMAKE_USE_PTHREADS_INIT 1)
set(Threads_FOUND TRUE) set(Threads_FOUND TRUE)
set(CMAKE_THREAD_LIBS_INIT ) set(CMAKE_THREAD_LIBS_INIT )
......
...@@ -85,7 +85,7 @@ if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h") ...@@ -85,7 +85,7 @@ if(ZLIB_INCLUDE_DIR AND EXISTS "${ZLIB_INCLUDE_DIR}/zlib.h")
# only append a TWEAK version if it exists: # only append a TWEAK version if it exists:
set(ZLIB_VERSION_TWEAK "") set(ZLIB_VERSION_TWEAK "")
if( "${ZLIB_H}" MATCHES "^.*ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+).*$") if( "${ZLIB_H}" MATCHES "ZLIB_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+\\.([0-9]+)")
set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}") set(ZLIB_VERSION_TWEAK "${CMAKE_MATCH_1}")
set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}") set(ZLIB_VERSION_STRING "${ZLIB_VERSION_STRING}.${ZLIB_VERSION_TWEAK}")
endif() endif()
......
...@@ -560,7 +560,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") ...@@ -560,7 +560,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
if(WX_LIB_DIR) if(WX_LIB_DIR)
# If building shared libs, define WXUSINGDLL to use dllimport. # If building shared libs, define WXUSINGDLL to use dllimport.
if(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") if(WX_LIB_DIR MATCHES "[dD][lL][lL]")
set(wxWidgets_DEFINITIONS WXUSINGDLL) set(wxWidgets_DEFINITIONS WXUSINGDLL)
DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") DBG_MSG_V("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}")
endif() endif()
...@@ -668,7 +668,7 @@ else() ...@@ -668,7 +668,7 @@ else()
if(_wx_result EQUAL 0) if(_wx_result EQUAL 0)
foreach(_opt_name debug static unicode universal) foreach(_opt_name debug static unicode universal)
string(TOUPPER ${_opt_name} _upper_opt_name) string(TOUPPER ${_opt_name} _upper_opt_name)
if(_wx_selected_config MATCHES ".*${_opt_name}.*") if(_wx_selected_config MATCHES "${_opt_name}")
set(wxWidgets_DEFAULT_${_upper_opt_name} ON) set(wxWidgets_DEFAULT_${_upper_opt_name} ON)
else() else()
set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) set(wxWidgets_DEFAULT_${_upper_opt_name} OFF)
......
...@@ -203,7 +203,7 @@ endif() ...@@ -203,7 +203,7 @@ endif()
# Make sure the combination of SDK and Deployment Target are allowed # Make sure the combination of SDK and Deployment Target are allowed
if(CMAKE_OSX_DEPLOYMENT_TARGET) if(CMAKE_OSX_DEPLOYMENT_TARGET)
if("${_CMAKE_OSX_SYSROOT_PATH}" MATCHES "^.*/MacOSX([0-9]+\\.[0-9]+)[^/]*\\.sdk") if("${_CMAKE_OSX_SYSROOT_PATH}" MATCHES "/MacOSX([0-9]+\\.[0-9]+)[^/]*\\.sdk")
set(_sdk_ver "${CMAKE_MATCH_1}") set(_sdk_ver "${CMAKE_MATCH_1}")
elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$") elseif("${_CMAKE_OSX_SYSROOT_ORIG}" MATCHES "^macosx([0-9]+\\.[0-9]+)$")
set(_sdk_ver "${CMAKE_MATCH_1}") set(_sdk_ver "${CMAKE_MATCH_1}")
......
...@@ -2,7 +2,7 @@ set(CMAKE_DL_LIBS "") ...@@ -2,7 +2,7 @@ set(CMAKE_DL_LIBS "")
if(CMAKE_SYSTEM MATCHES "OSF1-1.[012]") if(CMAKE_SYSTEM MATCHES "OSF1-1.[012]")
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF1-1.*") if(CMAKE_SYSTEM MATCHES "OSF1-1")
# OSF/1 1.3 from OSF using ELF, and derivatives, including AD2 # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
set(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic") set(CMAKE_C_COMPILE_OPTIONS_PIC "-fpic")
set(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie") set(CMAKE_C_COMPILE_OPTIONS_PIE "-fpie")
...@@ -12,7 +12,7 @@ endif() ...@@ -12,7 +12,7 @@ endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*") if(CMAKE_SYSTEM MATCHES "OSF1-V")
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared -Wl,-expect_unresolved,\\*") # -shared
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,") set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG "-Wl,-rpath,")
......
if(CMAKE_SYSTEM MATCHES "SunOS-4.*") if(CMAKE_SYSTEM MATCHES "SunOS-4")
set(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC") set(CMAKE_C_COMPILE_OPTIONS_PIC "-PIC")
set(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE") set(CMAKE_C_COMPILE_OPTIONS_PIE "-PIE")
set(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC") set(CMAKE_SHARED_LIBRARY_C_FLAGS "-PIC")
......
...@@ -181,7 +181,7 @@ macro(SWIG_ADD_MODULE name language) ...@@ -181,7 +181,7 @@ macro(SWIG_ADD_MODULE name language)
set(swig_dot_i_sources) set(swig_dot_i_sources)
set(swig_other_sources) set(swig_other_sources)
foreach(it ${ARGN}) foreach(it ${ARGN})
if(${it} MATCHES ".*\\.i$") if(${it} MATCHES "\\.i$")
set(swig_dot_i_sources ${swig_dot_i_sources} "${it}") set(swig_dot_i_sources ${swig_dot_i_sources} "${it}")
else() else()
set(swig_other_sources ${swig_other_sources} "${it}") set(swig_other_sources ${swig_other_sources} "${it}")
......
...@@ -312,7 +312,7 @@ else() ...@@ -312,7 +312,7 @@ else()
if(CMAKE_ANSI_CFLAGS) if(CMAKE_ANSI_CFLAGS)
set(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_ANSI_CFLAGS}") set(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*") if(CMAKE_SYSTEM MATCHES "OSF1-V")
set(VTK_REQUIRED_CXX_FLAGS set(VTK_REQUIRED_CXX_FLAGS
"${VTK_REQUIRED_CXX_FLAGS} -timplicit_local -no_implicit_include") "${VTK_REQUIRED_CXX_FLAGS} -timplicit_local -no_implicit_include")
endif() endif()
......
...@@ -798,7 +798,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ...@@ -798,7 +798,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
set(CTEST_package_X11_TEST ${CTEST_TEST_CPACK}) set(CTEST_package_X11_TEST ${CTEST_TEST_CPACK})
set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK}) set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK})
if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*") if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
find_program(RPMBUILD NAMES rpmbuild) find_program(RPMBUILD NAMES rpmbuild)
endif() endif()
# Do not try to build RPM # Do not try to build RPM
...@@ -899,7 +899,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release ...@@ -899,7 +899,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
if(APPLE) if(APPLE)
list(APPEND GENLST "DragNDrop") list(APPEND GENLST "DragNDrop")
endif() endif()
if (NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*") if (NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE) list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE)
if (NOT ${RPM_ACTIVE} EQUAL -1) if (NOT ${RPM_ACTIVE} EQUAL -1)
list(APPEND GENLST "RPM") list(APPEND GENLST "RPM")
......
...@@ -70,7 +70,7 @@ if(NOT 2.4 EQUAL 2.4) ...@@ -70,7 +70,7 @@ if(NOT 2.4 EQUAL 2.4)
message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*") if(CMAKE_SYSTEM MATCHES "OSF1-V")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
endif() endif()
......
...@@ -70,7 +70,7 @@ if(NOT 2.4 EQUAL 2.4) ...@@ -70,7 +70,7 @@ if(NOT 2.4 EQUAL 2.4)
message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4")
endif() endif()
if(CMAKE_SYSTEM MATCHES "OSF1-V.*") if(CMAKE_SYSTEM MATCHES "OSF1-V")
if(NOT CMAKE_COMPILER_IS_GNUCXX) if(NOT CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
endif() endif()
......
...@@ -10,7 +10,7 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Makefile") ...@@ -10,7 +10,7 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Makefile")
ERROR_QUIET ERROR_QUIET
TIMEOUT 10) TIMEOUT 10)
string(TOUPPER "${makeVersionOutput}" MAKE_VERSION_OUTPUT) string(TOUPPER "${makeVersionOutput}" MAKE_VERSION_OUTPUT)
if("${MAKE_VERSION_OUTPUT}" MATCHES ".*GNU MAKE.*") if("${MAKE_VERSION_OUTPUT}" MATCHES "GNU MAKE")
# build a library which we can search during the test # build a library which we can search during the test
add_library(foo STATIC foo.cpp) add_library(foo STATIC foo.cpp)
......
...@@ -30,7 +30,7 @@ endif() ...@@ -30,7 +30,7 @@ endif()
# Verify that the implementation files are named correctly. # Verify that the implementation files are named correctly.
foreach(lib pcStatic pcShared) foreach(lib pcStatic pcShared)
file(STRINGS "${${lib}_file}" info LIMIT_COUNT 1 REGEX "INFO:[^[]*\\[") file(STRINGS "${${lib}_file}" info LIMIT_COUNT 1 REGEX "INFO:[^[]*\\[")
if(NOT "${info}" MATCHES ".*INFO:symbol\\[${lib}\\].*") if(NOT "${info}" MATCHES "INFO:symbol\\[${lib}\\]")
message(SEND_ERROR "No INFO:symbol[${lib}] found in:\n ${${lib}_file}") message(SEND_ERROR "No INFO:symbol[${lib}] found in:\n ${${lib}_file}")
endif() endif()
endforeach() endforeach()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment