Support cuda 11 with jetson (#47741)

Support cuda 11 with jetson (#47741)

--- cmake/cuda.cmake
+++ cmake/cuda.cmake
@@ -6,6 +6,7 @@
   add_definitions(-DWITH_NV_JETSON)
   set(paddle_known_gpu_archs "53 62 72")
   set(paddle_known_gpu_archs10 "53 62 72")
+  set(paddle_known_gpu_archs11 "53 62 72")
 elseif(NEW_RELEASE_ALL)
   message("Using New Release Strategy - All Arches Packge")
   add_definitions(-DNEW_RELEASE_ALL)


Fixed typo (for disabling warnings)

Fixed typo (for disabling warnings)

--- cmake/msvc.cmake
+++ cmake/msvc.cmake
@@ -1,7 +1,7 @@
 #message(WARNING "setting msvc compiler flags")

 set(COMMON_CXX_FLAGS "/DNOMINMAX /W3 /openmp /MP /GR /permissive- /Zc:twoPhase-")
-if (DISABLE_WARINGS)
+if (DISABLE_WARNINGS)
   set(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} /w")
 endif()


Added lex-models and codestar to build process.

--- cmake/sdks.cmake
+++ cmake/sdks.cmake
@@ -33,6 +33,7 @@
 list(APPEND C2J_LIST "codecommit:2015-04-13")
 list(APPEND C2J_LIST "codedeploy:2014-10-06")
 list(APPEND C2J_LIST "codepipeline:2015-07-09")
+list(APPEND C2J_LIST "codestar:2017-04-19")
 list(APPEND C2J_LIST "cognito-identity:2014-06-30")
 list(APPEND C2J_LIST "cognito-sync:2014-06-30")
 list(APPEND C2J_LIST "config:2014-11-12")
@@ -71,6 +72,7 @@
 list(APPEND C2J_LIST "kms:2014-11-01")
 list(APPEND C2J_LIST "lambda:2015-03-31")
 list(APPEND C2J_LIST "lex:2016-11-28")
+list(APPEND C2J_LIST "lex-models:2017-04-19")
 list(APPEND C2J_LIST "lightsail:2016-11-28")
 list(APPEND C2J_LIST "logs:2014-03-28")
 list(APPEND C2J_LIST "machinelearning:2014-12-12")


use color output for CTEST_FAILURE_MESSAGE

--- ctest_ext.cmake
+++ ctest_ext.cmake
@@ -567,8 +567,8 @@
     endif()

     if(CTEST_FAILURE_MESSAGE)
-        message(FATAL_ERROR "Testing failed with following message: ${CTEST_FAILURE_MESSAGE}")
+        message(FATAL_ERROR "${CTEST_EXT_TEXT_STYLE_BOLD_RED}Testing failed with following message: ${CTEST_FAILURE_MESSAGE}${CTEST_EXT_TEXT_STYLE_RESET}")
     else()
-        message("Testing passed OK")
+        message("${CTEST_EXT_TEXT_STYLE_BOLD_GREEN}Testing passed OK${CTEST_EXT_TEXT_STYLE_RESET}")
     endif()
 endfunction()


CFlags

CFlags

--- cmake/CFlags.cmake
+++ cmake/CFlags.cmake
@@ -1,4 +1,4 @@
-set(CMAKE_CXX_FLAGS "-std=c++0x -ftemplate-depth=500 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_FLAGS "-std=c++0x -ftemplate-depth=500 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare -Wdelete-non-virtual-dtor${CMAKE_CXX_FLAGS}")
 set(CMAKE_C_FLAGS "-std=c11 -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -Wall -pedantic ${CMAKE_C_FLAGS}")

 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lprotobuf -lz -lpthread")


[c++] Add -Wno-deprecated-declarations for AppleClang

Compilation of Bond on macOS Big Sur 11.2.2 with Xcode 12.4 with Apple
Clang version 12.0.0 (clang-1200.0.32.29) and Boost 1.75.0 fails due to
Boost.Locale's use of the now-depcreated `std::auto_ptr`:

```
In file included from /usr/local/include/boost/locale.hpp:24:
/usr/local/include/boost/locale/util.hpp:203:59: error: 'auto_ptr<boost::locale::util::base_converter>' is deprecated [-Werror,-Wdeprecated-declarations]
    std::locale create_codecvt(std::locale const &in,std::auto_ptr<base_converter> cvt,character_facet_type type);
```

Add `-Wno-deprecated-declarations` to the AppleClang compiler options.
This is what is done for Clang.

Signed-off-by: Juan Cruz Viotti <ee759b1936af4d7bd0d0e5363e6b1ea438e6a390@jviotti.com>

--- cmake/Config.cmake
+++ cmake/Config.cmake
@@ -163,6 +163,8 @@
     --std=c++11
     -Wall
     -Werror
+    # Suppress warnings in Boost about using deprecated types like std::auto_ptr
+    -Wno-deprecated-declarations
     -Wno-null-dereference
     -Wno-unknown-warning-option
     -Wno-unused-local-typedefs)


Slight tweak for warnings on old XCode.

Slight tweak for warnings on old XCode.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -101,14 +101,19 @@
       -Wno-global-constructors
       -Wno-missing-prototypes
       -Wno-padded
-      -Wno-reserved-id-macro
     )

-  if(NOT "${_TARGET}" STREQUAL "cellml")
-    list(APPEND _COMPILE_OPTIONS
-      --system-header-prefix=gtest/
-    )
-  endif()
+    if (${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 7.0.0)
+      list(APPEND _COMPILE_OPTIONS
+        -Wno-reserved-id-macro
+      )
+    endif()
+
+    if(NOT "${_TARGET}" STREQUAL "cellml")
+      list(APPEND _COMPILE_OPTIONS
+        --system-header-prefix=gtest/
+      )
+    endif()

     set_target_properties(${_TARGET} PROPERTIES
       COMPILE_OPTIONS "${_COMPILE_OPTIONS}"


Update CMake version requirements

Update CMake version requirements

--- cmake/y3/get.cmake
+++ cmake/y3/get.cmake
@@ -15,7 +15,7 @@
 # limitations under the License.
 #

-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.12)

 string(REPLACE "," ";" PACKAGES "${BUILD}")
 set(BUILD_DIR ${CMAKE_BINARY_DIR}/.build)


desktop: fix External_SDL2 SOURCE_DIR

desktop: fix External_SDL2 SOURCE_DIR

--- desktop/External_SDL2.cmake
+++ desktop/External_SDL2.cmake
@@ -4,5 +4,5 @@
 	PREFIX ${SDL2_DIR}
 	CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR>
 	DOWNLOAD_COMMAND ""
-	SOURCE_DIR ../../SDL
+	SOURCE_DIR ../SDL
 )


fixed link directories

fixed link directories


cmake: fix CPU_BASELINE=NATIVE on MSVS

cmake: fix CPU_BASELINE=NATIVE on MSVS

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -392,7 +392,7 @@
 if(_add_native_flag)
   set(_varname "HAVE_CPU_NATIVE_SUPPORT")
   ocv_check_compiler_flag(CXX "-march=native" "${_varname}" "")
-  if(_varname)
+  if(${_varname})
     set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} -march=native")
   else()
     set(_varname "HAVE_CPU_HOST_SUPPORT")
@@ -402,8 +402,8 @@
       set(_flag "-xHost")
     endif()
     ocv_check_compiler_flag(CXX "${_flag}" "${_varname}" "")
-    if(_varname)
-      set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} ${flag}")
+    if(${_varname})
+      set(CPU_BASELINE_FLAGS "${CPU_BASELINE_FLAGS} ${_flag}")
     endif()
   endif()
 endif()


This should fix the cmake error about breakpad not having a CMakeLists.txt

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -12,6 +12,7 @@
     GIT_SUBMODULES breakpad
     SOURCE_DIR ${CMAKE_THIRD_PARTY_DIR}/breakpad
     UPDATE_COMMAND ""
+    CONFIGURE_COMMAND ""
     BUILD_COMMAND msbuild <SOURCE_DIR>/src/client/windows/handler/exception_handler.vcxproj /nologo /t:rebuild /m:2 /property:Configuration=${CONFIGURATION_TYPE}
     INSTALL_COMMAND ""
   )
@@ -28,7 +29,7 @@
   #  breakpad
   #  generate-gyp
   #  DEPENDEES download
-  #  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp/gyp ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/client/windows/breakpad_client.gyp
+  #  COMMAND ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/tools/gyp/gyp.bat ${CMAKE_THIRD_PARTY_DIR}/breakpad/src/client/windows/breakpad_client.gyp
   #)

   ExternalProject_Add_Step(


look for phonon headers in PHONON_INCLUDE_DIR too (in case != kdeheaders)

svn path=/trunk/KDE/kdebindings/smoke/; revision=833239

--- phonon/generate.pl.cmake
+++ phonon/generate.pl.cmake
@@ -103,7 +103,7 @@

 my @kdeheaders = ();
 $kdeprefix = "@KDE_PREFIX@";
-$kdeinc= '@kde_includes@';
+$kdeinc= ('@kde_includes@', '@PHONON_INCLUDE_DIR@' )
 $kdeinc =~ s/\${prefix}/$kdeprefix/; # Remove ${prefix} in src != build
 -d $kdeinc or die "Couldn't process $kdeinc: $!\n";


Only use dlopen for GSI on non-proper builds, since we hard-coded the .so versions.  #4483

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -736,7 +736,7 @@

 #####################################
 # Do we want to link in the GSI libraries or dlopen() them at runtime?
-if (HAVE_EXT_GLOBUS AND LINUX)
+if (HAVE_EXT_GLOBUS AND LINUX AND NOT PROPER)
 	set( DLOPEN_GSI_LIBS TRUE )
 endif()


Removed cmake gen file

Removed cmake gen file

--- AddTemplateAssembly.cmake
+++ AddTemplateAssembly.cmake
@@ -1,21 +0,0 @@
-cmake_minimum_required(VERSION 2.8.8)
-include(ExternalProject)
-find_package(Git REQUIRED)
-
-ExternalProject_Add(
-    template-assembly
-    PREFIX ${CMAKE_BINARY_DIR}/template-assembly
-    GIT_REPOSITORY https://github.com/mattbierner/Template-Assembly.git
-    TIMEOUT 10
-    UPDATE_COMMAND ""
-    CONFIGURE_COMMAND ""
-    BUILD_COMMAND ""
-    INSTALL_COMMAND ""
-    LOG_DOWNLOAD ON
-   )
-
-
-# Expose required variable (TEMPLATEASSEMBLY_INCLUDE_DIR) to parent scope
-ExternalProject_Get_Property(template-assembly source_dir)
-set(includeDir ${source_dir}/include ${source_dir}/instructions-set)
-set(TEMPLATEASSEMBLY_INCLUDE_DIR ${includeDir} CACHE INTERNAL "Path to include folder for TemplateAssembly")


Change MacOS package generator to DMG, although it does not make much sense with global installs at the moment

--- deploy/packages/pack-template.cmake
+++ deploy/packages/pack-template.cmake
@@ -24,7 +24,7 @@
         set(OPTION_PACK_GENERATOR "NSIS" CACHE STRING "Package targets")
     elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
         # MacOS X installer
-        set(OPTION_PACK_GENERATOR "PackageMaker" CACHE STRING "Package targets")
+        set(OPTION_PACK_GENERATOR "DragNDrop" CACHE STRING "Package targets")
     else()
         # Linux package
         set(OPTION_PACK_GENERATOR "DEB;RPM" CACHE STRING "Package targets")


Remove dependency from pack-target to ALL_BUILD, as this leads to problems with nested projects.

--- deploy/packages/pack-template.cmake
+++ deploy/packages/pack-template.cmake
@@ -249,6 +249,3 @@

 # Set dependencies
 add_dependencies(pack pack-${project_name})
-if(MSVC)
-    add_dependencies(pack-${project_name} ALL_BUILD)
-endif()


Set min OSX SDK to 10.8

Set min OSX SDK to 10.8

--- cmake/mac.cmake
+++ cmake/mac.cmake
@@ -1,5 +1,5 @@
-SET(SDK_MIN "10.9")
-SET(SDK "10.9")
+SET(SDK_MIN "10.8")
+SET(SDK "10.8")
 SET(DEV_SDK "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK}.sdk")

 ADD_DEFINITIONS(


build: Detect pthread flags and pass them to the linker

--- cmake/tbb.cmake
+++ cmake/tbb.cmake
@@ -1,3 +1,6 @@
+# locate required libs
+find_package(Threads)
+
 # build tbb
 set(tbb_PREFIX ${CMAKE_BINARY_DIR}/contrib/tbb-prefix)
 set(tbb_INSTALL ${CMAKE_BINARY_DIR}/contrib/tbb-install)
@@ -29,4 +32,4 @@
     )

 include_directories(${tbb_SRC}/include)
-set(tbb_LIB ${tbb_INSTALL}/lib/libtbb.a ${CMAKE_DL_LIBS})
+set(tbb_LIB ${tbb_INSTALL}/lib/libtbb.a ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT})


cmake: fixed GCC shared_ptr test

cmake: fixed GCC shared_ptr test

--- cmake/Modules/LibPKMNCompilerCheck.cmake
+++ cmake/Modules/LibPKMNCompilerCheck.cmake
@@ -10,9 +10,9 @@
 INCLUDE(CheckCXXSourceCompiles)
 INCLUDE(CheckIncludeFileCXX)

-IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+IF(CMAKE_COMPILER_IS_GNUCXX)
     SET(CMAKE_REQUIRED_FLAGS "-std=c++0x")
-ENDIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)

 CHECK_CXX_SOURCE_COMPILES("
     enum testenum: short


COMP: Fix qt5_get_moc_flags/qt5_create_moc_command deprecation CMake warnings

This commit updates ctkMacroGenerateMocs to internally use
qt5_generate_moc and fix deprecation warnings reported when
building against Qt >= 5.15.0

See https://doc.qt.io/qt-5/qtcore-cmake-qt5-generate-moc.html
and https://doc.qt.io/qt-5/cmake-command-reference.html#qt5-core

Example of warnings:

  CMake Warning (dev) at /path/to/Support/Qt/5.15.2/clang_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:44 (message):
    qt5_get_moc_flags is not part of the official API, and might be removed in
    Qt 6.
  Call Stack (most recent call first):
    /path/to/Support/Qt/5.15.2/clang_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:86 (_qt5_warn_deprecated)
    /path/to/Projects/S-r/CTK/CMake/ctkMacroGenerateMocs.cmake:8 (QT5_GET_MOC_FLAGS)
    /path/to/Projects/S-r/CTK/CMake/ctkMacroGenerateMocs.cmake:43 (QT4_GENERATE_MOCS)
    Modules/Loadable/VolumeRendering/Testing/Cxx/CMakeLists.txt:41 (QT5_GENERATE_MOCS)

  CMake Warning (dev) at /path/to/Support/Qt/5.15.2/clang_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:44 (message):
    qt5_create_moc_command is not part of the official API, and might be
    removed in Qt 6.
  Call Stack (most recent call first):
    /path/to/Support/Qt/5.15.2/clang_64/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:120 (_qt5_warn_deprecated)
    /path/to/Projects/S-r/CTK/CMake/ctkMacroGenerateMocs.cmake:32 (QT5_CREATE_MOC_COMMAND)
    /path/to/Projects/S-r/CTK/CMake/ctkMacroGenerateMocs.cmake:43 (QT4_GENERATE_MOCS)
    Modules/Loadable/VolumeRendering/Testing/Cxx/CMakeLists.txt:41 (QT5_GENERATE_MOCS)
  This warning is for project developers.  Use -Wno-dev to suppress it.

Co-authored-by: Andras Lasso <bf5e972943f0e90adb0d9bfa939dcc72ce410bec@queensu.ca>

--- CMake/ctkMacroGenerateMocs.cmake
+++ CMake/ctkMacroGenerateMocs.cmake
@@ -3,9 +3,14 @@

 include(MacroAddFileDependencies)

-function(QT4_GENERATE_MOCS)
+function(_ctk_generate_mocs)
   if(CTK_QT_VERSION VERSION_GREATER "4")
-    QT5_GET_MOC_FLAGS(_moc_flags)
+    if(Qt5_VERSION VERSION_LESS "5.15.0")
+      QT5_GET_MOC_FLAGS(_moc_flags)
+    else()
+       # _moc_flags is not needed because it is internally handled
+       # by qt5_generate_moc called below.
+    endif()
   else()
     QT4_GET_MOC_FLAGS(_moc_flags)
   endif()
@@ -28,8 +33,12 @@
     if(CTK_QT_VERSION VERSION_GREATER "4")
       if(Qt5_VERSION VERSION_LESS "5.6")
         QT5_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "")
+      elseif(Qt5_VERSION VERSION_LESS "5.15.0")
+        QT5_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "" "")
       else()
-        QT5_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "" "")
+        # qt5_generate_moc internally calls qt5_get_moc_flags and ensure
+        # no warnings are reported.
+        qt5_generate_moc(${abs_file} ${moc_file})
       endif()
     else()
       QT4_CREATE_MOC_COMMAND(${abs_file} ${moc_file} "${_moc_flags}" "" "")
@@ -38,7 +47,12 @@
   endforeach()
 endfunction()

+# create a Qt4 alias
+macro(QT4_GENERATE_MOCS)
+  _ctk_generate_mocs(${ARGN})
+endmacro()
+
 # create a Qt5 alias
 macro(QT5_GENERATE_MOCS)
-  QT4_GENERATE_MOCS(${ARGN})
+  _ctk_generate_mocs(${ARGN})
 endmacro()


update

update

--- src/x0/sysconfig.h.cmake
+++ src/x0/sysconfig.h.cmake
@@ -16,16 +16,21 @@
 #cmakedefine HAVE_SYSLOG_H
 #cmakedefine HAVE_PWD_H

+#cmakedefine HAVE_AIO_H
+#cmakedefine HAVE_LIBAIO_H
 #cmakedefine HAVE_ZLIB_H
 #cmakedefine HAVE_GNUTLS_H
-#cmakedefine WITH_LUA
-#cmakedefine WITH_PCRE
-#cmakedefine WITH_ZLIB
+#cmakedefine HAVE_LUA_H
+#cmakedefine HAVE_PCRE_H

 #cmakedefine HAVE_INOTIFY_CREATE1
 #cmakedefine HAVE_FORK
 #cmakedefine HAVE_CHROOT
 #cmakedefine HAVE_PATHCONF
 #cmakedefine HAVE_SENDFILE
+#cmakedefine HAVE_POSIX_FADVISE
+#cmakedefine HAVE_READAHEAD
+
+#cmakedefine BUILD_STATIC

 #endif


Fix macro

Fix macro

--- CMake/Modules/AtomicUtils.cmake
+++ CMake/Modules/AtomicUtils.cmake
@@ -1,27 +1,27 @@
 macro(GroupSources curdir)

-    if (NOT MSVC)
-        return()
-    endif()
+    if (MSVC)

     file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/${curdir} ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/*)

     foreach(child ${children})

         if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/${child})
-
+
             if ("${curdir}" STREQUAL "")
                 GroupSources(${child})
             else()
                 GroupSources(${curdir}/${child})
             endif()
         else()
-
-            string(REPLACE "/" "\\" groupname ${curdir})
+
+            string(REPLACE "/" "\\" groupname ${curdir})
             source_group(${groupname} FILES ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/${child})
-
+
         endif()

     endforeach()

-endmacro()+    endif()
+
+endmacro()


Enforce -Werror.

Enforce -Werror.

--- build/cmake/Unix.cmake
+++ build/cmake/Unix.cmake
@@ -12,10 +12,7 @@
 		endif()

 		# Compiler warning flags
-		set(RAINBOW_CXX_WARNINGS "-Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wsign-promo -pedantic")
-		if(CMAKE_CXX_COMPILER MATCHES "clang")
-			set(RAINBOW_CXX_WARNINGS "${RAINBOW_CXX_WARNINGS} -Werror")
-		endif()
+		set(RAINBOW_CXX_WARNINGS "-Werror -pedantic -Wall -Wextra -Wold-style-cast -Woverloaded-virtual -Wsign-promo")
 	endif()

 	# Set CFLAGS and CXXFLAGS


build: don't attempt to run config.guess on Windows

When cross-compiling LLVM to android from Windows (for LLVMSupport), we would
attempt to execute `config.guess` to determine the host triple since
`CMAKE_SYSTEM_NAME` is not Windows and `CMAKE_C_COMPILER` will be set to GNU or
Clang.  This will fail as `config.guess` is a shell script which cannot be
executed on Windows.  Simply log a warning instead.  The user can specify the
value for this instead in those cases.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@363420 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 963f1cb84dc62b9bc2ade12013d55a3b03571327)

--- cmake/modules/GetHostTriple.cmake
+++ cmake/modules/GetHostTriple.cmake
@@ -15,16 +15,20 @@
       set( value "i686-pc-windows-gnu" )
     endif()
   else( MSVC )
-    set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
-    execute_process(COMMAND sh ${config_guess}
-      RESULT_VARIABLE TT_RV
-      OUTPUT_VARIABLE TT_OUT
-      OUTPUT_STRIP_TRAILING_WHITESPACE)
-    if( NOT TT_RV EQUAL 0 )
-      message(FATAL_ERROR "Failed to execute ${config_guess}")
-    endif( NOT TT_RV EQUAL 0 )
-    # Defer to dynamic detection of the host AIX version.
-    string(REGEX REPLACE "-aix[0-9][^-]*" "-aix" value ${TT_OUT})
+    if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
+      message(WARNING "unable to determine host target triple")
+    else()
+      set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
+      execute_process(COMMAND sh ${config_guess}
+        RESULT_VARIABLE TT_RV
+        OUTPUT_VARIABLE TT_OUT
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+      if( NOT TT_RV EQUAL 0 )
+        message(FATAL_ERROR "Failed to execute ${config_guess}")
+      endif( NOT TT_RV EQUAL 0 )
+      # Defer to dynamic detection of the host AIX version.
+      string(REGEX REPLACE "-aix[0-9][^-]*" "-aix" value ${TT_OUT})
+    endif()
   endif( MSVC )
   set( ${var} ${value} PARENT_SCOPE )
 endfunction( get_host_triple var )


[cmake] Remove logic that is now done in base/CMakeLists.txt.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -263,17 +263,6 @@
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  headerfiles "${headerfiles}")
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/v7/inc/" ""  headerfiles "${headerfiles}")

-  # Replace the non-standard folder layout of Core.
-  if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
-    # FIXME: Glob these folders.
-    set(core_folders base clib clingutils cont dictgen doc foundation lzma lz4
-                     macosx meta metacling multiproc newdelete pcre rint
-                     rootcling_stage1 textinput thread unix winnt zip)
-    foreach(core_folder ${core_folders})
-      string(REPLACE "${CMAKE_SOURCE_DIR}/core/${core_folder}/inc/" ""  headerfiles "${headerfiles}")
-    endforeach()
-  endif()
-
   # Check that each path here is relative so that it no longer points to the build folder.
   # If we don't do this, then for example the modulemap might contain absolute paths to the
   # build folder which would break module compilation.


[cmake] OpenBSD uses libc++.

[cmake] OpenBSD uses libc++.

Therefore, do not generate a libstdcxx.modulemap. See also #58497.

--- cmake/modules/SwiftCXXUtils.cmake
+++ cmake/modules/SwiftCXXUtils.cmake
@@ -2,6 +2,5 @@
 set(SWIFT_LIBSTDCXX_PLATFORMS
     "LINUX"
     "FREEBSD"
-    "OPENBSD"
     "CYGWIN"
     "HAIKU")


Specify type of ITK CMake variables for caching

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -59,14 +59,14 @@
       -DCMAKE_LIBRARY_PATH=${SUPERBUILD_INSTALL_DIR}/lib
       -DCMAKE_INCLUDE_PATH=${SUPERBUILD_INSTALL_DIR}
       -DCMAKE_INSTALL_PREFIX=${${proj}_INSTALL_DIR}
-	    -DBUILD_SHARED_LIBS=ON
+	    -DBUILD_SHARED_LIBS:BOOL=ON
       -DCMAKE_BUILD_TYPE=${EXTERNAL_PROJECT_BUILD_TYPE}
       -DHDF5_ROOT=${HDF5_ROOT}
       -DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}
       -DHDF5_LIBRARIES=${HDF5_LIBRARIES}
-      -DITK_USE_SYSTEM_HDF5=ON
-      -DBUILD_TESTING=${BUILD_TESTING_${proj}}
-      -DBUILD_EXAMPLES=OFF
+      -DITK_USE_SYSTEM_HDF5:BOOL=ON
+      -DBUILD_TESTING:BOOL=${BUILD_TESTING_${proj}}
+      -DBUILD_EXAMPLES:BOOL=OFF
       -DITK_SKIP_PATH_LENGTH_CHECKS:BOOL=${ITK_SKIP_PATH_LENGTH_CHECKS}
     DEPENDS ${${proj}_DEPENDENCIES}
   )


fixup: Fix conditional on visibility of symbols Was working locally because of CMake cache

--- toolchains/iOS.toolchain.cmake
+++ toolchains/iOS.toolchain.cmake
@@ -72,7 +72,7 @@
 # Hidden visibilty is required for cxx on iOS
 set (CMAKE_C_FLAGS_INIT "")

-if (BUILD_IOS_FRAMEWORK)
+if (NOT BUILD_IOS_FRAMEWORK)
     set (CMAKE_CXX_FLAGS_INIT "-fvisibility=hidden -fvisibility-inlines-hidden -isysroot ${CMAKE_OSX_SYSROOT}")
 endif ()


+ Make CMaek notice when the file is out-of-date.

--- src/rezplugins/build_system/cmake_files/RezInstallDoxygen.cmake
+++ src/rezplugins/build_system/cmake_files/RezInstallDoxygen.cmake
@@ -113,6 +113,7 @@

 		add_custom_command(
 			OUTPUT ${dest_dir}/Doxyfile
+			DEPENDS ${doxyfile}
 			COMMAND ${CMAKE_COMMAND} -E make_directory ${dest_dir}
 			COMMAND ${CMAKE_COMMAND} -E copy ${doxyfile} ${dest_dir}/Doxyfile
 			COMMAND echo PROJECT_NAME = \"${_proj_name}\" >> ${dest_dir}/Doxyfile


cmake/BuildPCRE2.cmake: -DPCRE2_EXP_DECL=extern should not be general [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -79,7 +79,7 @@
 #
 # For linkage in static mode
 #
-ADD_DEFINITIONS(-DPCRE2_EXP_DECL=extern)
+# ADD_DEFINITIONS(-DPCRE2_EXP_DECL=extern)

 SET (PCRE2_FOUND FALSE)
 MARK_AS_ADVANCED (


CMake: generic "warnings as errors" macro

--- cmake/CMakeALICE.cmake
+++ cmake/CMakeALICE.cmake
@@ -334,3 +334,17 @@
     endforeach()

 endfunction()
+
+# Treat warnings as errors. This is applied at module level: just add the line:
+#
+#   ali_warnings_as_errors()
+#
+# to the relevant CMakeLists.txt.
+macro(ali_warnings_as_errors)
+  if(${CMAKE_CXX_COMPILER_ID} MATCHES Clang OR CMAKE_COMPILER_IS_GNUCXX)
+    if (NOT ${CMAKE_SYSTEM_VERSION} MATCHES el5)
+      message(STATUS "Treating warnings as errors under ${CMAKE_CURRENT_SOURCE_DIR}")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
+    endif()
+  endif()
+endmacro()


cleanup

cleanup

--- cmake/get-libpng.cmake
+++ cmake/get-libpng.cmake
@@ -9,26 +9,21 @@

 set(LIBPNG_VERSION "1.6.24")

-set(LIBPNG_CMAKE_ARGS
-    ${COMMON_CMAKE_ARGS}
-      -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_CONFIGURATION_TYPES=Release
-      -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-      -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
-      -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
-      -DBUILD_SHARED_LIBS=FALSE
-      -DPNG_SHARED=off
-      -DPNG_STATIC=on
-      -DPNG_TESTS=off
-      -DZLIB_LIBRARY:FILEPATH=${DEPENDENCY_INSTALL_DIR}/zlib/lib/zlib.lib
-      -DZLIB_INCLUDE_DIR:PATH=${DEPENDENCY_INSTALL_DIR}/zlib/include
+set(LIBPNG_CMAKE_ARGS ${COMMON_CMAKE_ARGS}
+    -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+    -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    -DCMAKE_CONFIGURATION_TYPES=Release
+    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
+    -DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+    -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
+    -DBUILD_SHARED_LIBS=FALSE
+    -DPNG_SHARED=off
+    -DPNG_STATIC=on
+    -DPNG_TESTS=off
+    -DZLIB_LIBRARY:FILEPATH=${DEPENDENCY_INSTALL_DIR}/zlib/lib/zlib.lib
+    -DZLIB_INCLUDE_DIR:PATH=${DEPENDENCY_INSTALL_DIR}/zlib/include
 )

-#BUILD_COMMAND   "msbuild ${DEPENDENCY_EXTRACT_DIR}/src/libpng/projects/vstudio/vstudio.sln /t:libpng /p:Configuration=Release /p:Platform=Win32 /v:minimal"
-#INSTALL_COMMAND
-#  COMMAND ${CMAKE_COMMAND} -E copy "${DEPENDENCY_EXTRACT_DIR}/src/libpng/projects/vstudio/Release Library/libpng16.lib" "${DEPENDENCY_INSTALL_DIR}/lib/libpng16.lib"
-
 ExternalProject_Add(
   libpng
   DEPENDS             zlib


Adding the -Wnon-virtual-dtor GCC/CLang flag in maintainer mode

--- cmake/maintainer.cmake
+++ cmake/maintainer.cmake
@@ -51,7 +51,7 @@
 ENDIF()
 # Set warning flags for G++/Clang++
 IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
-  SET(MY_MAINTAINER_CXX_WARNINGS "${MY_CXX_WARNING_FLAGS}")
+  SET(MY_MAINTAINER_CXX_WARNINGS "${MY_CXX_WARNING_FLAGS} -Wnon-virtual-dtor")
 ENDIF()

 IF(MYSQL_MAINTAINER_MODE MATCHES "ON")


Corrects some of the generated names in cython extensions

Induced by swithing purify to using cookoff python functionality.

--- scripts/PythonModule.cmake
+++ scripts/PythonModule.cmake
@@ -258,7 +258,8 @@
     get_pyx_dependencies(${source} DEPENDENCIES ${included_dirs})

     # Call cython
-    get_filename_component(cy_module ${source} NAME_WE)
+    string(REGEX REPLACE "\\.pyx" "" cy_module "${source}")
+    string(REGEX REPLACE "\\.pxd" "" cy_module "${cy_module}")
     unset(arguments)
     if(cython_EXECUTABLE)
         set(arguments ${cython_EXECUTABLE})
@@ -290,7 +291,7 @@
     )

     # Extension name
-    get_filename_component(extension ${cy_module} NAME_WE)
+    string(REGEX MATCH "[^\\.]*$" extension ${cy_module})
     if("${extension}" STREQUAL "")
         set(extension ${cy_module})
     endif()
@@ -308,7 +309,9 @@
 endfunction()

 function(_pm_cython_full_module_name outvar module source)
-    get_filename_component(cy_module ${source} NAME_WE)
+    string(REGEX REPLACE "\\.pyx" "" cy_module "${source}")
+    string(REGEX REPLACE "\\.pxd" "" cy_module "${cy_module}")
+    string(REGEX REPLACE "\\.py" "" cy_module "${cy_module}")
     if("${cy_module}" MATCHES "^${module}")
         set(full_module ${cy_module})
     else()


Deleted Find opencl file

Deleted Find opencl file

--- FindOpenCL.cmake
+++ FindOpenCL.cmake
@@ -1,54 +0,0 @@
-# - Try to find OpenCL
-# Once done this will define
-#
-#  OPENCL_FOUND        - system has OpenCL
-#  OPENCL_INCLUDE_DIR  - the OpenCL include directory
-#  OPENCL_LIBRARIES    - link these to use OpenCL
-#
-# WIN32 should work, but is untested
-
-IF (WIN32)
-
-    FIND_PATH(OPENCL_INCLUDE_DIR CL/cl.h )
-
-    # TODO this is only a hack assuming the 64 bit library will
-    # not be found on 32 bit system
-    FIND_LIBRARY(OPENCL_LIBRARIES opencl ) #used to say opencl64
-    IF( OPENCL_LIBRARIES )
-        FIND_LIBRARY(OPENCL_LIBRARIES opencl ) #used to say opencl32
-    ENDIF( OPENCL_LIBRARIES )
-
-ELSE (WIN32)
-
-    # Unix style platforms
-    # We also search for OpenCL in the NVIDIA GPU SDK default location
-    #SET(OPENCL_INCLUDE_DIR  "$ENV{OPENCL_HOME}/common/inc"
-    #   CACHE PATH "path to Opencl Include files")
-
-    #message(***** OPENCL_INCLUDE_DIR: "${OPENCL_INCLUDE_DIR}" ********)
-
-	# does not work. WHY?
-    #SET(inc  $ENV{CUDA_LOCAL}/../OpenCL/common/inc /usr/include)
-    FIND_PATH(OPENCL_INCLUDE_DIR CL/cl.hpp PATHS $ENV{AMDAPPSDKROOT}/include )
-
-    message("lib path: $ENV{LD_LIBRARY_PATH}")
-    #FIND_LIBRARY(OPENCL_LIBRARIES OpenCL $ENV{LD_LIBRARY_PATH})
-    FIND_LIBRARY(OPENCL_LIBRARIES OpenCL $ENV{AMDAPPSDKROOT}/lib/x86_64)
-    message("==============")
-    message("opencl_libraries: ${OPENCL_LIBRARIES}")
-
-    #message(***** OPENCL ENV: "$ENV{GPU_SDK}" ********)
-
-#~/NVIDIA_GPU_Computing_SDK/OpenCL/common/inc/
-
-
-ENDIF (WIN32)
-
-SET( OPENCL_FOUND "NO" )
-IF(OPENCL_LIBRARIES )
-    SET( OPENCL_FOUND "YES" )
-ENDIF(OPENCL_LIBRARIES)
-
-MARK_AS_ADVANCED(
-  OPENCL_INCLUDE_DIR
-)


Fix name in FindRTLSDR module

Fix name in FindRTLSDR module

--- FindRTLSDR.cmake
+++ FindRTLSDR.cmake
@@ -49,7 +49,7 @@
     include(FindPackageHandleStandardArgs)
     # handle the QUIETLY and REQUIRED arguments and set LibRTLSDR_FOUND to TRUE
     # if all listed variables are TRUE
-    find_package_handle_standard_args(rtlsdr  DEFAULT_MSG
+    find_package_handle_standard_args(RTLSDR  DEFAULT_MSG
                                       RTLSDR_LIBRARY RTLSDR_INCLUDE_DIR)

     mark_as_advanced(RTLSDR_INCLUDE_DIR RTLSDR_LIBRARY)


BUG - missing create_type_visit_func in public interface (#188)

--- src/rttr/rttr.cmake
+++ src/rttr/rttr.cmake
@@ -160,6 +160,8 @@
                  detail/variant_sequential_view/variant_sequential_view_creator_impl.h
                  detail/variant_sequential_view/variant_sequential_view_creator.h
                  detail/visitor/visitor_iterator.h
+                 detail/visitor/create_type_visitor_func.h
+                 detail/visitor/create_type_visitor_func_impl.h
                  detail/visitor/method_visitor_invoker.h
                  detail/visitor/constructor_visitor_invoker.h
                  detail/visitor/property_visitor_invoker.h


copy numpy_eigen libs to correct folder

copy numpy_eigen libs to correct folder

--- numpy_eigen/cmake/add_python_export_library.cmake
+++ numpy_eigen/cmake/add_python_export_library.cmake
@@ -68,10 +68,10 @@
   )

     # Cause the library to be output in the correct directory.
-  set(PYTHON_LIB_DIR ${CATKIN_DEVEL_PREFIX}/${PROJECT_NAME}/lib/python2.7/dist-packages)
+  set(PYTHON_LIB_DIR ${CATKIN_DEVEL_PREFIX}/lib/python2.7/dist-packages/${PROJECT_NAME}/)
   add_custom_command(TARGET ${TARGET_NAME}
     POST_BUILD
-    COMMAND mkdir -p ${PYTHON_LIB_DIR} && cp -v ${PYLIB_OUTPUT_FILE} ${PYTHON_LIB_DIR}/${PYLIB_SO_NAME}
+    COMMAND cp -v ${PYLIB_OUTPUT_FILE} ${PYTHON_LIB_DIR}/${PYLIB_SO_NAME}
     WORKING_DIRECTORY ${CATKIN_DEVEL_PREFIX}
     COMMENT "Copying library files to python directory" )


Switch URL to github

Switch URL to github

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -160,7 +160,7 @@

   ### --- End Project specific additions
-  set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
+  set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
   set(${proj}_GIT_TAG fc03bcc92b11326b87c232c14eb234fc1f791f9f) ##
   set(ITK_VERSION_ID ITK-4.9) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID


Added boost_log -> boost_filesystem dependency

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -475,6 +475,7 @@
 add_framework_dependencies(sw_reveal_view_controller CoreGraphics)

 add_library_dependencies(boost_filesystem third_party.boost_system)
+add_library_dependencies(boost_log third_party.boost_filesystem)
 add_library_dependencies(boost_thread third_party.boost_atomic)
 if (IS_IOS)
   add_library_dependencies(boost_iostreams bz2)


Libraries can also be test targets

Libraries can also be test targets

--- functions.cmake
+++ functions.cmake
@@ -151,7 +151,7 @@

 function(vespa_add_library TARGET)
     cmake_parse_arguments(ARG
-        "STATIC;OBJECT;INTERFACE"
+        "STATIC;OBJECT;INTERFACE;TEST"
         "INSTALL;OUTPUT_NAME"
         "DEPENDS;AFTER;SOURCES"
         ${ARGN})
@@ -178,6 +178,8 @@
     add_library(${TARGET} ${LINKAGE} ${LIBRARY_TYPE} ${SOURCE_FILES})
     __add_dependencies_to_target()

+    __handle_test_targets()
+
     if(ARG_INSTALL)
         install(TARGETS ${TARGET} DESTINATION ${ARG_INSTALL})
     endif()
@@ -201,15 +203,7 @@
     add_executable(${TARGET} ${ARG_SOURCES})
     __add_dependencies_to_target()

-    # If this is a test executable, add it to the test target for this module
-    # If building of unit tests is not specified, exclude this target from the all target
-    if(ARG_TEST)
-        __add_test_target_to_module(${TARGET})
-
-        if(EXCLUDE_TESTS_FROM_ALL)
-            set_target_properties(${TARGET} PROPERTIES EXCLUDE_FROM_ALL TRUE)
-        endif()
-    endif()
+    __handle_test_targets()

     if(ARG_INSTALL)
         install(TARGETS ${TARGET} DESTINATION ${ARG_INSTALL})
@@ -439,6 +433,18 @@
     set_property(GLOBAL APPEND PROPERTY MODULE_${MODULE_NAME}_TEST_TARGETS ${TARGET})
 endfunction()

+function(__handle_test_targets)
+    # If this is a test executable, add it to the test target for this module
+    # If building of unit tests is not specified, exclude this target from the all target
+    if(ARG_TEST)
+        __add_test_target_to_module(${TARGET})
+
+        if(EXCLUDE_TESTS_FROM_ALL)
+            set_target_properties(${TARGET} PROPERTIES EXCLUDE_FROM_ALL TRUE)
+        endif()
+    endif()
+endfunction()
+
 function(__create_module_targets PROPERTY_POSTFIX TARGET_POSTFIX)
     get_property(VESPA_MODULES GLOBAL PROPERTY VESPA_MODULES)
     set(OUTPUT_ALL_TARGET "all_${TARGET_POSTFIX}s")


Escape $ in env lookup to preserve the command.

--- functions.cmake
+++ functions.cmake
@@ -543,7 +543,7 @@

 function(install_java_artifact_dependencies NAME)
     install(DIRECTORY "target/dependency/" DESTINATION lib/jars/${NAME} FILES_MATCHING PATTERN "*.jar")
-    install(CODE "execute_process(COMMAND bash -c \"cd $ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib/jars && ln -sf ${NAME}/*.jar .\")")
+    install(CODE "execute_process(COMMAND bash -c \"cd \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/lib/jars && ln -sf ${NAME}/*.jar .\")")
 endfunction()

 function(install_fat_java_artifact NAME)
@@ -551,7 +551,7 @@
 endfunction()

 function(install_symlink TARGET LINK)
-    install(CODE "execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${TARGET} $ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LINK})")
+    install(CODE "execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${TARGET} \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LINK})")
 endfunction(install_symlink)

 function(add_auxilliary_modules)


fbcode_builder: ThriftCppLibrary: the output depends on the thrift templates

Summary:
Update ThriftCppLibrary.cmake to record that the output depends on the thrift
`cpp2` template files.  The `THRIFT_TEMPLATE_FILES` variable was defined in
D16062657 but doesn't appear to be used anywhere.  This uses it, and also
updates it to only match the C++ template files.

Reviewed By: wez

Differential Revision: D16738442

fbshipit-source-id: aa4097e9ec1d009ef1e3ee2efd03ffa19a82ed12


Switched to using builtin OpenSSL helper

--- src/ibp/cmake/FindOpenSSL.cmake
+++ src/ibp/cmake/FindOpenSSL.cmake
@@ -1,103 +0,0 @@
-# - Try to find the OpenSSL encryption library
-# Once done this will define
-#
-#  OPENSSL_FOUND - system has the OpenSSL library
-#  OPENSSL_INCLUDE_DIR - the OpenSSL include directory
-#  OPENSSL_LIBRARIES - The libraries needed to use OpenSSL
-
-if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-
-  # in cache already
-  SET(OPENSSL_FOUND TRUE)
-
-else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-
-  FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h
-     $ENV{HOME}/include/
-     /usr/include/
-     /usr/local/include/
-     $ENV{ProgramFiles}/OpenSSL/include/
-     $ENV{SystemDrive}/OpenSSL/include/
-  )
-
-  if(WIN32 AND MSVC)
-      # /MD and /MDd are the standard values - if somone wants to use
-      # others, the libnames have to change here too
-      # see http://www.openssl.org/support/faq.html#PROG2 for their meaning
-
-      FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-      FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-      FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-      FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD
-        PATHS
-        $ENV{ProgramFiles}/OpenSSL/lib/VC/
-        $ENV{SystemDrive}/OpenSSL/lib/VC/
-      )
-
-      IF(MSVC_IDE)
-        IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-            SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE} debug ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG})
-        ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-          MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl")
-        ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE)
-      ELSE(MSVC_IDE)
-        STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
-        IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-          SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG} ${LIB_EAY_DEBUG})
-        ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-          SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE} ${LIB_EAY_RELEASE})
-        ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
-      ENDIF(MSVC_IDE)
-      MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE LIB_EAY_DEBUG LIB_EAY_RELEASE)
-  else(WIN32 AND MSVC)
-
-   FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD libeay32 libeay32MD
-      PATHS
-      $ENV{HOME}/lib/
-      /usr/lib
-      /usr/local/lib
-   )
-   FIND_LIBRARY(CRYPTO_LIBRARIES crypto
-      PATHS
-      $ENV{HOME}/lib/
-      /usr/lib
-      /usr/local/lib
-   )
-
-  endif(WIN32 AND MSVC)
-
-  if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-     set(OPENSSL_FOUND TRUE)
-  endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-
-  if (CRYPTO_LIBRARIES)
-     set(CRYPTO_FOUND TRUE)
-     message(STATUS "Found libcrypto: ${CRYPTO_LIBRARIES}")
-  endif (CRYPTO_LIBRARIES)
-
-  if (OPENSSL_FOUND)
-     if (NOT OpenSSL_FIND_QUIETLY)
-        message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES} ${OPENSSL_INCLUDE_DIR}")
-     endif (NOT OpenSSL_FIND_QUIETLY)
-  else (OPENSSL_FOUND)
-     if (OpenSSL_FIND_REQUIRED)
-        message(FATAL_ERROR "Could NOT find OpenSSL")
-     endif (OpenSSL_FIND_REQUIRED)
-  endif (OPENSSL_FOUND)
-
-  MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES)
-
-endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES)
-


ENH: Update LAPACK

ENH: Update LAPACK

List of changes:

$ git shortlog 97bc1b834..c5471e8be --no-merges
Azzam Haidar (2):
      fixing BUG related to replacing ILAENV by ILAENV2STAGE. fixing LAPACK issues #262
      forgot to fix the EXTERNAL for the ILAENV2STAGE

Jean-Christophe Fillion-Robin (3):
      cmake: Fix LAPACKE include directory associated with the build interface
      cmake: Set LAPACK_LIBRARIES in LAPACK config file
      cmake: Update LAPACKE_LIBRARIES in LAPACKE config file to include LAPACK libraries

Malcolm Roberts (1):
      Add -b (bin) option to lapack_testing.py

Sergey Kosukhin (1):
      Add missing comma in alahd.f.

--- SuperBuild/External_LAPACK.cmake
+++ SuperBuild/External_LAPACK.cmake
@@ -35,7 +35,7 @@

   ExternalProject_SetIfNotDefined(
     ${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
-    "97bc1b834b517c03e9eaf8b9fc6f79f26c16b320"
+    "c5471e8be2754345ec650c8d3b08c6eb680ebd0c"
     QUIET
     )


Fixing generation of version number with git due to incorrect working directory for git to run from.

--- Support/cmp/cmpCMakeMacros.cmake
+++ Support/cmp/cmpCMakeMacros.cmake
@@ -825,9 +825,18 @@
         execute_process(COMMAND ${GIT_EXECUTABLE} describe
             OUTPUT_VARIABLE DVERS
             RESULT_VARIABLE did_run
+            ERROR_VARIABLE err_dvers
+            WORKING_DIRECTORY ${${PROJECT_NAME}_SOURCE_DIR}
          )
+         if (0)
+            message(STATUS "${PROJECT_NAME}_SOURCE_DIR: ${${PROJECT_NAME}_SOURCE_DIR}")
+            message(STATUS "GIT_EXECUTABLE: ${GIT_EXECUTABLE}")
+            message(STATUS "did_run: ${did_run}")
+            message(STATUS "err_dvers: ${err_dvers}")
+            message(STATUS "DVERS: ${DVERS}")
+          endif()
         string(STRIP ${DVERS} DVERS)
-       # message(STATUS "DVERS: ${DVERS}")
+       #
         string(REPLACE  "-" ";" VERSION_LIST ${DVERS})
        # message(STATUS "VERSION_LIST: ${VERSION_LIST}")
         list(GET VERSION_LIST 0 VERSION_GEN_VER_MAJOR)


Add variable to disable sub projects

Add variable to disable sub projects

--- SubProject.cmake
+++ SubProject.cmake
@@ -23,6 +23,9 @@
 # - CMAKE_BINARY_DIR should be changed to PROJECT_BINARY_DIR
 # - CMAKE_SOURCE_DIR should be changed to PROJECT_SOURCE_DIR
 #
+# Respects the following variables:
+# - DISABLE_SUBPROJECTS: when set, does not load sub projects. Useful for
+#   example for continuous integration builds
 # A sample project can be found at https://github.com/Eyescale/Collage.git

 include(${CMAKE_CURRENT_LIST_DIR}/GitExternal.cmake)
@@ -76,7 +79,7 @@
 endfunction()

 macro(git_subproject name url tag)
-  if(NOT BUILDYARD)
+  if(NOT BUILDYARD AND NOT DISABLE_SUBPROJECTS)
     string(TOUPPER ${name} NAME)
     if(NOT ${NAME}_FOUND)
       get_property(__included GLOBAL PROPERTY ${name}_IS_SUBPROJECT)


ENH: use http protocol by default for ITK download - makes more sense for naive users who may not be able to download b/c behind firewall

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -15,12 +15,12 @@
 include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake)

 #-----------------------------------------------------------------------------
-# Git protocole option
-#-----------------------------------------------------------------------------
-option(${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL "If behind a firewall turn this off to use http instead." ON)
-set(git_protocol "git")
-if(NOT ${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL)
-  set(git_protocol "http")
+# Git protocol option
+#-----------------------------------------------------------------------------
+option(${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL "For development, turn this on to use the git protocol instead." OFF)
+set(git_protocol "http")
+if( ${CMAKE_PROJECT_NAME}_USE_GIT_PROTOCOL)
+  set(git_protocol "git")
 endif()

 find_package(Git REQUIRED)


COMP: Remove useless CMake return()

COMP: Remove useless CMake return()

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -50,11 +50,6 @@
 # Slicer Extension
 option( DTIAtlasBuilder_BUILD_SLICER_EXTENSION "Build DTIAtlasBuilder as a Slicer extension" OFF )
 if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )
-
-  if(APPLE OR WIN32)
-    message(WARNING "2013-02-20: The development team is aware that there are build issues specific to MacOSX / Windows and is working on it.")
-    return()
-  endif()

   if(NOT Slicer_SOURCE_DIR)
     set(EXTENSION_NAME DTIAtlasBuilder)


fix broken `alpakaConfig.cmake`

fix broken `alpakaConfig.cmake`

move debug output of common variables after debug level definition

--- alpakaConfig.cmake
+++ alpakaConfig.cmake
@@ -85,14 +85,6 @@
 # Add module search path
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_ALPAKA_ROOT_DIR}/cmake/modules/")

-IF(${ALPAKA_DEBUG} GREATER 1)
-    MESSAGE(STATUS "_ALPAKA_ROOT_DIR : ${_ALPAKA_ROOT_DIR}")
-    MESSAGE(STATUS "_ALPAKA_COMMON_FILE : ${_ALPAKA_COMMON_FILE}")
-    MESSAGE(STATUS "_ALPAKA_ADD_EXECUTABLE_FILE : ${_ALPAKA_ADD_EXECUTABLE_FILE}")
-    MESSAGE(STATUS "_ALPAKA_ADD_LIBRARY_FILE : ${_ALPAKA_ADD_LIBRARY_FILE}")
-    MESSAGE(STATUS "CMAKE_BUILD_TYPE : ${CMAKE_BUILD_TYPE}")
-ENDIF()
-
 #-------------------------------------------------------------------------------
 # Options.
 #-------------------------------------------------------------------------------
@@ -121,6 +113,17 @@
 # Drop-down combo box in cmake-gui.
 SET(ALPAKA_DEBUG "0" CACHE STRING "Debug level")
 SET_PROPERTY(CACHE ALPAKA_DEBUG PROPERTY STRINGS "0;1;2")
+
+#-------------------------------------------------------------------------------
+# Debug output of common variables.
+#-------------------------------------------------------------------------------
+IF(${ALPAKA_DEBUG} GREATER 1)
+    MESSAGE(STATUS "_ALPAKA_ROOT_DIR : ${_ALPAKA_ROOT_DIR}")
+    MESSAGE(STATUS "_ALPAKA_COMMON_FILE : ${_ALPAKA_COMMON_FILE}")
+    MESSAGE(STATUS "_ALPAKA_ADD_EXECUTABLE_FILE : ${_ALPAKA_ADD_EXECUTABLE_FILE}")
+    MESSAGE(STATUS "_ALPAKA_ADD_LIBRARY_FILE : ${_ALPAKA_ADD_LIBRARY_FILE}")
+    MESSAGE(STATUS "CMAKE_BUILD_TYPE : ${CMAKE_BUILD_TYPE}")
+ENDIF()

 #-------------------------------------------------------------------------------
 # Find Boost.


Generators: updated the library gathering loop


Fix glfw build config for tests

Fix glfw build config for tests

--- toolchains/unitTests.cmake
+++ toolchains/unitTests.cmake
@@ -13,17 +13,15 @@

 set(OSX_PLATFORM_SRC ${PROJECT_SOURCE_DIR}/osx/src/platform_osx.mm)

-find_package(PkgConfig REQUIRED)
-pkg_search_module(GLFW REQUIRED glfw3>=3.1)
+file(GLOB TEST_SOURCES tests/unit/*.cpp)

-list(APPEND GLFW_LDFLAGS
-        "-framework OpenGL"
-        "-framework Cocoa"
-        "-framework IOKit"
-        "-framework CoreFoundation"
-        "-framework CoreVideo")
-
-file(GLOB TEST_SOURCES tests/unit/*.cpp)
+# configure glfw
+set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "Build the GLFW example programs")
+set(GLFW_BUILD_TESTS OFF CACHE BOOL "Build the GLFW test programs")
+set(GLFW_BUILD_DOCS OFF CACHE BOOL "Build the GLFW documentation")
+set(GLFW_INSTALL OFF CACHE BOOL "Generate installation target")
+add_subdirectory(${PROJECT_SOURCE_DIR}/glfw)
+include_directories(${PROJECT_SOURCE_DIR}/glfw/include)

 # create an executable per test
 foreach(_src_file_path ${TEST_SOURCES})
@@ -34,8 +32,8 @@

     add_executable(${EXECUTABLE_NAME} ${_src_file_path} ${OSX_PLATFORM_SRC})

-    target_link_libraries(${EXECUTABLE_NAME} -lcurl)
-    target_link_libraries(${EXECUTABLE_NAME} core ${GLFW_LDFLAGS})
+    target_link_libraries(${EXECUTABLE_NAME} core glfw ${GLFW_LIBRARIES})
+
 endforeach(_src_file_path ${TEST_SOURCES})

 # copy resources in order to make tests with resources dependency


added pythn option to default dashboard setup

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -166,6 +166,7 @@
 MITK_USE_Poco:BOOL=${MITK_USE_Poco}
 MITK_USE_SOFA:BOOL=${MITK_USE_SOFA}
 MITK_USE_QT:BOOL=${MITK_USE_QT}
+MITK_USE_Python:BOOL=${MITK_USE_Python}
 ${ADDITIONAL_CMAKECACHE_OPTION}
 ")


Compability with older asn1c

Compability with older asn1c

--- cmake-modules/FindAsn1c.cmake
+++ cmake-modules/FindAsn1c.cmake
@@ -6,7 +6,8 @@
 message(STATUS "Found asn1c: ${ASN1C}")

 # -fnative-types is required for compat with asn1c <= 0.9.24
-set(ASN1C_FLAGS ${ASN1C_FLAGS} -fline-refs -fskeletons-copy -fnative-types -pdu=all)
+# -fline-refs isn't available on Ubuntu 16.04
+set(ASN1C_FLAGS ${ASN1C_FLAGS} -fskeletons-copy -fnative-types -pdu=all)

 define_property(GLOBAL PROPERTY ASN1_FILES_GLOBAL
                 BRIEF_DOCS "List of all input files for asn1c"


Issue 2904: Error with FLANN definitions in FindFLANN.cmake

Corrected FLANN definitions that made an error when compiling pcl statically

--- cmake/Modules/FindFLANN.cmake
+++ cmake/Modules/FindFLANN.cmake
@@ -50,7 +50,7 @@
 if(FLANN_USE_STATIC)
   set(FLANN_RELEASE_NAME flann_cpp_s)
   set(FLANN_DEBUG_NAME flann_cpp_s-gd)
-  set(FLANN_DEFINITIONS ${FLANN_DEFINITIONS} "-DFLANN_STATIC")
+  set(FLANN_DEFINITIONS ${FLANN_DEFINITIONS} "FLANN_STATIC")
 else()
   set(FLANN_RELEASE_NAME flann_cpp)
   set(FLANN_DEBUG_NAME flann_cpp-gd)


Add report on finding coverage and nose.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -35,7 +35,17 @@
 if(Python_Interpreter_FOUND)
   get_filename_component(PYTHON_DIR ${Python_EXECUTABLE} DIRECTORY)
   find_program(COVERAGE_EXE NAMES  ${PRFERRED_COVERAGE_NAMES} coverage HINTS ${PYTHON_DIR})
+  if(COVERAGE_EXE)
+    message(STATUS "Found Coverage: ${COVERAGE_EXE}")
+  else()
+    message(STATUS "Did not find Coverage.")
+  endif()
   find_program(NOSETESTS_EXE NAMES  ${PRFERRED_NOSETESTS_NAMES} nosetests HINTS ${PYTHON_DIR})
+  if(NOSETESTS_EXE)
+    message(STATUS "Found Nose: ${NOSETESTS_EXE}")
+  else()
+    message(STATUS "Did not find Nose.")
+  endif()
 endif()

 find_package(Doxygen)


cmake: remove usage of deprecated gccarmemb variant

gccarmemb was deprecated 2 years ago, so remove it.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/generic_toolchain.cmake
+++ cmake/generic_toolchain.cmake
@@ -36,12 +36,6 @@
   endif()
 endif()

-# Until we completely deprecate it
-if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "gccarmemb")
-  message(WARNING "gccarmemb is deprecated, please use gnuarmemb instead")
-  set(ZEPHYR_TOOLCHAIN_VARIANT "gnuarmemb")
-endif()
-
 # Host-tools don't unconditionally set TOOLCHAIN_HOME anymore,
 # but in case Zephyr's SDK toolchain is used, set TOOLCHAIN_HOME
 if("${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "zephyr")


cmake: linker: lld: add missing -imacros flag

The autoconf.h macros were not passed to the CMake custom command for
linker script generation.

Signed-off-by: Gerard Marull-Paretas <bedb45f43a286e49f4dcda039a436b216ae61ef3@nordicsemi.no>

--- cmake/linker/lld/target.cmake
+++ cmake/linker/lld/target.cmake
@@ -44,6 +44,7 @@
     -MD -MF ${linker_script_gen}.dep -MT ${linker_script_gen}
     -D_LINKER
     -D_ASMLANGUAGE
+    -imacros ${AUTOCONF_H}
     ${current_includes}
     ${current_defines}
     ${template_script_defines}


Added a test for accessing an ENV variable in a cmake script.

--- tests/examplefiles/main.cmake
+++ tests/examplefiles/main.cmake
@@ -1,6 +1,7 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)

 SET( SOURCES back.c io.c main.c )
+SET( PATH $ENV{PATH} )
 MESSAGE( ${SOURCES}   )      # three arguments, prints "back.cio.cmain.c"
 MESSAGE( "${SOURCES}" )      # one argument,    prints "back.c;io.c;main.c"
 MESSAGE( "" )                # one argument,    prints "" an empty line


Fix cmake warnings

Fix cmake warnings

Running cmake command under Windows as

cmake -G "Visual Studio 12 Win64" /path/to/vk-gl-cts

or

cmake /path/to/vk-gl-cts

there are policy warnings CMP0054 stating:
"Only interpret if() arguments as variables or keywords when unquoted"

Fix: remove unnecessary quoting at complaining lines.
Also do not use dereferencing (i.e. ${var}) on variable due to cmake
does dereferencing automatically on variables in if statement. Good
explanation is at https://stackoverflow.com/questions/25809332/

Components: Framework

VK-GL-CTS issue: 492

Change-Id: I5258f4a5145588efb34ba2356ba25004277f9213

--- framework/delibs/cmake/Defs.cmake
+++ framework/delibs/cmake/Defs.cmake
@@ -68,21 +68,19 @@
 DE_MAKE_ENV_BOOL("DE_OS" "IOS")

 # Prevent mixed compile with GCC and Clang
-if (NOT ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU") EQUAL ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"))
+if (NOT (CMAKE_C_COMPILER_ID MATCHES "GNU") EQUAL (CMAKE_CXX_COMPILER_ID MATCHES "GNU"))
 	message(FATAL_ERROR "CMake C and CXX compilers do not match. Both or neither must be GNU.")
-elseif (NOT ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang") EQUAL ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
+elseif (NOT (CMAKE_C_COMPILER_ID MATCHES "Clang") EQUAL (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
 	message(FATAL_ERROR "CMake C and CXX compilers do not match. Both or neither must be Clang.")
 endif ()

 # Compiler detection
 if (NOT DEFINED DE_COMPILER)
-	# \note " x" postfix is to work around bug in CMake that causes
-	#       "MSVC" to translate to something completely different
-	if (("${CMAKE_C_COMPILER_ID} x" MATCHES "MSVC") OR MSVC)
+	if ((CMAKE_C_COMPILER_ID MATCHES "MSVC") OR MSVC)
 		set(DE_COMPILER "DE_COMPILER_MSC")
-	elseif ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+	elseif (CMAKE_C_COMPILER_ID MATCHES "GNU")
 		set(DE_COMPILER "DE_COMPILER_GCC")
-	elseif ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
+	elseif (CMAKE_C_COMPILER_ID MATCHES "Clang")
 		set(DE_COMPILER "DE_COMPILER_CLANG")

 	# Guess based on OS


Added options to build STIR executables and its own Python interface

both default to OFF

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -37,14 +37,17 @@
   ### --- Project specific additions here
   set(STIR_Install_Dir ${SUPERBUILD_INSTALL_DIR})

+  option(BUILD_STIR_EXECUTABLES "Build all STIR executables" OFF)
+  option(BUILD_STIR_SWIG_PYTHON "Build STIR Python interface" OFF)

   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY ${${proj}_URL}
     GIT_TAG ${STIR_TAG}
     SOURCE_DIR ${SOURCE_DOWNLOAD_CACHE}/${proj}
-    CMAKE_ARGS -DGRAPHICS=None
-        -DBUILD_EXECUTABLES=OFF
+    CMAKE_ARGS
+        -DBUILD_EXECUTABLES=${BUILD_STIR_EXECUTABLES}
+        -DBUILD_SWIG_PYTHON=${BUILD_STIR_SWIG_PYTHON}
         -DBUILD_TESTING=OFF
         -DBUILD_DOCUMENTATION=OFF
         -DCMAKE_POSITION_INDEPENDENT_CODE=ON


Add major, minor and patch version numbers to libsourcey.h


CMake: Android - always select first (and possibly only) target

--- CMake/Utils/AndroidMacros.cmake
+++ CMake/Utils/AndroidMacros.cmake
@@ -88,7 +88,7 @@
         add_custom_command(
             TARGET ${ANDROID_PROJECT_TARGET}
             POST_BUILD
-            COMMAND ${ANDROID_EXECUTABLE} update project  --target ${ANDROID_TARGET} --path "${NDKOUT}"
+            COMMAND ${ANDROID_EXECUTABLE} update project  --target 1 --path "${NDKOUT}"
             WORKING_DIRECTORY ${NDKOUT}
         )


FindMagnum.cmake: use ${LIB_SUFFIX} properly.

CorradeLibSuffix.cmake wasn't included at all, thus no convenient
autodetection was done.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -318,6 +318,7 @@
 endif()

 # Installation dirs
+include(CorradeLibSuffix)
 set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
 set(MAGNUM_PLUGINS_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
 set(MAGNUM_PLUGINS_FONT_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/fonts)


Set source to dirty

Set source to dirty

--- Applications/mitkDiffusion/CPackOptions.cmake
+++ Applications/mitkDiffusion/CPackOptions.cmake
@@ -8,7 +8,7 @@
 # Minor version is the month of release
 set(CPACK_PACKAGE_VERSION_MINOR "12")
 # Patch versioning is not intended to be done
-set(CPACK_PACKAGE_VERSION_PATCH "00")
+set(CPACK_PACKAGE_VERSION_PATCH "99")

 # this should result in names like 2011.09, 2012.06, ...
 # version has to be set explicitly to avoid such things as CMake creating the install directory "MITK Diffusion 2011.."


ENH: Turn bridge modules off by default.

When a bridge module requires system installed third party
libraires (the module contains itk-module-init.cmake in the module dir),
it should by default be turned off even when its corresponding group
build option is ON.

For example, when ITKGroup_Video is ON, ITKBridgeOpenCV and
ITKBridgeVXL should not be included in the build system, unless users
manually turn them on via the corresponding module option: Module_ITKBridge[VXL/OpenCV].

Change-Id: Ib17ab13e396c967873bd816a4b30a6d8584a5bdd

--- CMake/ITKGroups.cmake
+++ CMake/ITKGroups.cmake
@@ -49,9 +49,12 @@
   set( ${group}_module_list )
   file( GLOB_RECURSE _module_files ${ITK_SOURCE_DIR}/Modules/${group}/itk-module.cmake )
   foreach( _module_f ${_module_files} )
-    file( STRINGS ${_module_f} _module_line REGEX "itk_module[ \n]*\\([ \n]*ITK[A-Za-z0-9]*" )
-    string( REGEX MATCH "ITK[A-Za-z0-9]*" _module_name ${_module_line} )
-    list( APPEND ${group}_module_list ${_module_name} )
+    get_filename_component (module_file_dir ${_module_f} PATH)
+    if (NOT EXISTS "${module_file_dir}/itk-module-init.cmake")
+      file( STRINGS ${_module_f} _module_line REGEX "itk_module[ \n]*\\([ \n]*ITK[A-Za-z0-9]*" )
+      string( REGEX MATCH "ITK[A-Za-z0-9]*" _module_name ${_module_line} )
+      list( APPEND ${group}_module_list ${_module_name} )
+    endif()
   endforeach()
 endforeach()


BUG: VTKLibraryDepends.cmake14.in is in the source tree.

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -208,6 +208,6 @@
   CONFIGURE_FILE(${VTK_BINARY_DIR}/VTKLibraryDepends.cmake.in
                  ${VTK_BINARY_DIR}/VTKLibraryDepends.cmake @ONLY)
 ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
-  CONFIGURE_FILE(${VTK_BINARY_DIR}/VTKLibraryDepends.cmake14.in
+  CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKLibraryDepends.cmake14.in
                  ${VTK_BINARY_DIR}/VTKLibraryDepends.cmake @ONLY)
 ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)


ENH: Automatic move of files to module Filtering/TimeSeries

--- Modules/Filtering/TimeSeries/otb-module.cmake
+++ Modules/Filtering/TimeSeries/otb-module.cmake
@@ -4,6 +4,9 @@
   DEPENDS
     OTBITK

+  TEST_DEPENDS
+    OTBTestKernel
+
   DESCRIPTION
     "${DOCUMENTATION}"
 )


Changed the regex replacement command with get_filename_component() command.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -392,9 +392,9 @@
             add_dependencies (${TARGET_NAME} RESOURCE_CHECK_${TARGET_NAME})
         else ()
             # Create symbolic links to allow debugging/running the main executable within Xcode itself
-            string (REGEX REPLACE "\\)/.*$" ")" TARGET_LOC ${TARGET_LOC})
+            get_filename_component (PATH ${TARGET_LOC} PATH)
             add_custom_command (TARGET ${TARGET_NAME} POST_BUILD
-                COMMAND for dir in CoreData Data\; do cmake -E create_symlink ../../../../Bin/$$dir ${TARGET_LOC}/$$dir\; done
+                COMMAND for dir in CoreData Data\; do cmake -E create_symlink ../../../../Bin/$$dir ${PATH}/$$dir\; done
                 COMMENT "Create symbolic links to allow debugging/running the main executable within Xcode itself")
         endif ()
     endif ()


always link to gfortran for gotoblas, it seems to be harmless for 1.x but needed for 2.x

--- bench/btl/cmake/FindGOTO.cmake
+++ bench/btl/cmake/FindGOTO.cmake
@@ -16,8 +16,8 @@
 find_library(GOTO_LIBRARIES gotoblas PATHS $ENV{GOTODIR} ${LIB_INSTALL_DIR})

 if(GOTO_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
-  set(GOTO_LIBRARIES ${GOTO_LIBRARIES} "-lpthread")
-endif(GOTO_LIBRARIES AND CMAKE_COMPILER_IS_GNUCXX)
+  set(GOTO_LIBRARIES ${GOTO_LIBRARIES} "-lpthread -lgfortran")
+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(GOTO DEFAULT_MSG


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,6 +1,5 @@
 [Desktop Entry]
 Name=Instant Messaging
-Name[ast]=Mensaxería nel intre
 Name[bs]=Brze poruke
 Name[ca]=Missatgeria instantània
 Name[ca@valencia]=Missatgeria instantània


COMP(#17199): temporarily deactivated tests because of a bug in mitk::IOUtil (17199)

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -34,9 +34,9 @@
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
-   mitkNavigationToolStorageSerializerTest.cpp
+   #mitkNavigationToolStorageSerializerTest.cpp # deactivated because of bug 17199
    mitkNavigationToolStorageDeserializerTest.cpp
-   mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp
+   #mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp # deactivated because of bug 17199
    # -----------------------------------------------------------------------
 )


update accelerator version.

update accelerator version.

--- cmake-scripts/accelerator.cmake
+++ cmake-scripts/accelerator.cmake
@@ -3,7 +3,7 @@
 include(ExternalProject)

 set(accelerator_URL https://github.com/Yeolar/accelerator.git)
-set(accelerator_TAG v1.0.0)
+set(accelerator_TAG e2538b5ede1f77c89f4142a77d06ee0a5030d151)
 set(accelerator_BUILD ${CMAKE_CURRENT_BINARY_DIR}/accelerator/)
 set(accelerator_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/accelerator/src/accelerator)
 set(accelerator_STATIC_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/accelerator/src/accelerator/libaccelerator.a)


common changes in windows build

common changes in windows build

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -3,15 +3,16 @@

 # C++11 check and activation
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB")
 	execute_process(
 		COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
 	if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
 		message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
 	endif ()
 elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB")
 elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+	set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -DSHAREDLIB")
 else ()
 	message(FATAL_ERROR "Your C++ compiler does not support C++11. You have ${CMAKE_CXX_COMPILER_ID}")
 endif ()
@@ -19,7 +20,7 @@

 # Initialize CXXFLAGS
-set(CMAKE_CXX_FLAGS                "-std=c++11 -Wall -Wno-unknown-pragmas -Wextra -DSHAREDLIB")
+# CMAKE_CXX_FLAGS was set before
 set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DETH_DEBUG")
 set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DETH_RELEASE")
 set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG -DETH_RELEASE")


Remove unused jsonrpcstub code in cmake/ Fixes https://github.com/ethereum/solidity/issues/779

--- cmake/EthExecutableHelper.cmake
+++ cmake/EthExecutableHelper.cmake
@@ -141,45 +141,3 @@
 		set(${KEY} ${VALUE})
 	endif()
 endmacro()
-
-macro(jsonrpcstub_client_create SPEC CLIENTNAME CLIENTDIR CLIENTFILENAME)
-	if (ETH_JSON_RPC_STUB)
-		add_custom_target(${SPEC}stub)
-		add_custom_command(
-		TARGET ${SPEC}stub
-		POST_BUILD
-		DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${SPEC}"
-		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-		COMMAND ${CMAKE_COMMAND} -DETH_SPEC_PATH="${CMAKE_CURRENT_SOURCE_DIR}/${SPEC}" -DETH_SOURCE_DIR="${CMAKE_SOURCE_DIR}" -DETH_CMAKE_DIR="${ETH_CMAKE_DIR}"
-			-DETH_CLIENT_DIR="${CLIENTDIR}"
-			-DETH_CLIENT_NAME=${CLIENTNAME}
-			-DETH_CLIENT_FILENAME=${CLIENTFILENAME}
-			-DETH_JSON_RPC_STUB="${ETH_JSON_RPC_STUB}"
-			-P "${ETH_SCRIPTS_DIR}/jsonrpcstub.cmake"
-			)
-		add_dependencies(${EXECUTABLE} ${SPEC}stub)
-	endif ()
-endmacro()
-
-macro(jsonrpcstub_create SPEC SERVERNAME SERVERDIR SERVERFILENAME CLIENTNAME CLIENTDIR CLIENTFILENAME)
-	if (ETH_JSON_RPC_STUB)
-		add_custom_target(${SPEC}stub)
-		add_custom_command(
-		TARGET ${SPEC}stub
-		POST_BUILD
-		DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${SPEC}"
-		WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-		COMMAND ${CMAKE_COMMAND} -DETH_SPEC_PATH="${CMAKE_CURRENT_SOURCE_DIR}/${SPEC}" -DETH_SOURCE_DIR="${CMAKE_SOURCE_DIR}" -DETH_CMAKE_DIR="${ETH_CMAKE_DIR}"
-			-DETH_CLIENT_DIR="${CLIENTDIR}"
-			-DETH_CLIENT_NAME=${CLIENTNAME}
-			-DETH_CLIENT_FILENAME=${CLIENTFILENAME}
-			-DETH_SERVER_DIR="${SERVERDIR}"
-			-DETH_SERVER_NAME=${SERVERNAME}
-			-DETH_SERVER_FILENAME=${SERVERFILENAME}
-			-DETH_JSON_RPC_STUB="${ETH_JSON_RPC_STUB}"
-			-P "${ETH_SCRIPTS_DIR}/jsonrpcstub.cmake"
-			)
-		add_dependencies(${EXECUTABLE} ${SPEC}stub)
-	endif ()
-endmacro()
-


Adding CMake version check for libMesh builds.

--- cmake/Modules/FindLIBMESH.cmake
+++ cmake/Modules/FindLIBMESH.cmake
@@ -1,5 +1,9 @@
 # Finds the libMesh installation using CMake's PkgConfig
 # module and creates a libmesh imported target
+
+if (${CMAKE_VERSION} VERSION_LESS 3.12.0)
+    message((FATAL_ERROR "OpenMC builds with libMesh support require CMake version 3.12.0 or greater."))
+endif()

 include(FindPkgConfig)
 set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${LIBMESH_PC}")


Updated library dependencies.

Updated library dependencies.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@119592 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,9 +1,8 @@
-set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaAsmPrinter LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
@@ -12,12 +11,10 @@
 set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMBlackfinAsmPrinter LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCellSPUAsmPrinter LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
@@ -37,14 +34,14 @@
 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMMCJIT LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMipsAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsCodeGen LLVMMipsInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPTXAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMPTXInfo LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMObject LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport)
@@ -52,12 +49,10 @@
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
 set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSparcInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
 set(MSVC_LIB_DEPS_LLVMSystem )
-set(MSVC_LIB_DEPS_LLVMSystemZAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport LLVMSystem)
@@ -67,7 +62,6 @@
 set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMXCoreAsmPrinter LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)


Update library dependencies changed in the System -> Support merge.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@120308 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLVMLibDeps.cmake
+++ cmake/modules/LLVMLibDeps.cmake
@@ -1,68 +1,67 @@
 set(MSVC_LIB_DEPS_LLVMARMAsmParser LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMARMCodeGen LLVMARMAsmPrinter LLVMARMInfo LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMARMDisassembler LLVMARMCodeGen LLVMARMInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMARMInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAlphaCodeGen LLVMAlphaInfo LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMAlphaInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMAnalysis LLVMCore LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMArchive LLVMBitReader LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAsmParser LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMAsmPrinter LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBitReader LLVMCore LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMBitWriter LLVMCore LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMBlackfinCodeGen LLVMAsmPrinter LLVMBlackfinInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMBlackfinInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
+set(MSVC_LIB_DEPS_LLVMCBackend LLVMAnalysis LLVMCBackendInfo LLVMCodeGen LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa)
 set(MSVC_LIB_DEPS_LLVMCBackendInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMCellSPUCodeGen LLVMAsmPrinter LLVMCellSPUInfo LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCellSPUInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMCodeGen LLVMAnalysis LLVMCore LLVMMC LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMCppBackend LLVMCore LLVMCppBackendInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMCppBackendInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMSystem LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMExecutionEngine LLVMCore LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMInstCombine LLVMAnalysis LLVMCore LLVMSupport LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMInstrumentation LLVMAnalysis LLVMCore LLVMSupport LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMInterpreter LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMJIT LLVMCodeGen LLVMCore LLVMExecutionEngine LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMLinker LLVMArchive LLVMBitReader LLVMCore LLVMSupport LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMBlazeAsmPrinter LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMBlazeCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMBlazeAsmPrinter LLVMMBlazeInfo LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMBlazeDisassembler LLVMMBlazeCodeGen LLVMMBlazeInfo LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMBlazeInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMC LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystem LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
-set(MSVC_LIB_DEPS_LLVMMCJIT LLVMExecutionEngine LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMMCDisassembler LLVMARMAsmParser LLVMARMCodeGen LLVMARMDisassembler LLVMARMInfo LLVMAlphaCodeGen LLVMAlphaInfo LLVMBlackfinCodeGen LLVMBlackfinInfo LLVMCBackend LLVMCBackendInfo LLVMCellSPUCodeGen LLVMCellSPUInfo LLVMCppBackend LLVMCppBackendInfo LLVMMBlazeAsmParser LLVMMBlazeCodeGen LLVMMBlazeDisassembler LLVMMBlazeInfo LLVMMC LLVMMCParser LLVMMSP430CodeGen LLVMMSP430Info LLVMMipsCodeGen LLVMMipsInfo LLVMPTXCodeGen LLVMPTXInfo LLVMPowerPCCodeGen LLVMPowerPCInfo LLVMSparcCodeGen LLVMSparcInfo LLVMSupport LLVMSystemZCodeGen LLVMSystemZInfo LLVMX86AsmParser LLVMX86CodeGen LLVMX86Disassembler LLVMX86Info LLVMXCoreCodeGen LLVMXCoreInfo)
+set(MSVC_LIB_DEPS_LLVMMCJIT LLVMExecutionEngine LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMCParser LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMMSP430AsmPrinter LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMSP430CodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMSP430AsmPrinter LLVMMSP430Info LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMSP430Info LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMMipsCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMMipsInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMMipsInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMObject LLVMSupport LLVMSystem)
+set(MSVC_LIB_DEPS_LLVMObject LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMPTXCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPTXInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPTXInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMPowerPCAsmPrinter LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMPowerPCCodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMPowerPCAsmPrinter LLVMPowerPCInfo LLVMSelectionDAG LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMPowerPCInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils)
-set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMSystem LLVMTarget)
-set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMSystem LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMScalarOpts LLVMAnalysis LLVMCore LLVMInstCombine LLVMSupport LLVMTarget LLVMTransformUtils)
+set(MSVC_LIB_DEPS_LLVMSelectionDAG LLVMAnalysis LLVMCodeGen LLVMCore LLVMMC LLVMSupport LLVMTarget)
+set(MSVC_LIB_DEPS_LLVMSparcCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSparcInfo LLVMSupport LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSparcInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMSystem )
+set(MSVC_LIB_DEPS_LLVMSupport )
 set(MSVC_LIB_DEPS_LLVMSystemZCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystemZInfo LLVMTarget)
 set(MSVC_LIB_DEPS_LLVMSystemZInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMSystem LLVMTarget LLVMipa)
-set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMSystem LLVMTarget LLVMX86Info)
-set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMSystem LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMTarget LLVMCore LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMTransformUtils LLVMAnalysis LLVMCore LLVMSupport LLVMTarget LLVMipa)
+set(MSVC_LIB_DEPS_LLVMX86AsmParser LLVMMC LLVMMCParser LLVMSupport LLVMTarget LLVMX86Info)
+set(MSVC_LIB_DEPS_LLVMX86AsmPrinter LLVMMC LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMX86CodeGen LLVMAnalysis LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMX86AsmPrinter LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Disassembler LLVMMC LLVMSupport LLVMX86Info)
 set(MSVC_LIB_DEPS_LLVMX86Info LLVMMC LLVMSupport)
 set(MSVC_LIB_DEPS_LLVMXCoreCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMMC LLVMSelectionDAG LLVMSupport LLVMTarget LLVMXCoreInfo)
 set(MSVC_LIB_DEPS_LLVMXCoreInfo LLVMMC LLVMSupport)
-set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport LLVMSystem)
-set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMSystem LLVMTarget LLVMTransformUtils LLVMipa)
+set(MSVC_LIB_DEPS_LLVMipa LLVMAnalysis LLVMCore LLVMSupport)
+set(MSVC_LIB_DEPS_LLVMipo LLVMAnalysis LLVMCore LLVMScalarOpts LLVMSupport LLVMTarget LLVMTransformUtils LLVMipa)


linux fix

linux fix

--- CMakeExternals/Python.cmake
+++ CMakeExternals/Python.cmake
@@ -40,9 +40,9 @@
       -DBUILTIN_CRYPT:BOOL=ON
       -DBUILTIN_CSTRINGIO:BOOL=ON
       -DBUILTIN_CSV:BOOL=ON
-      -DBUILTIN_CTYPES:BOOL=ON
-      -DBUILTIN_CTYPES_TEST:BOOL=ON
-      -DBUILTIN_CURSES:BOOL=ON
+      -DBUILTIN_CTYPES:BOOL=OFF
+      #-DBUILTIN_CTYPES_TEST:BOOL=OFF
+      #-DBUILTIN_CURSES:BOOL=ON
       -DBUILTIN_DATETIME:BOOL=ON
       -DBUILTIN_DBM:BOOL=ON
       -DBUILTIN_ELEMENTTREE:BOOL=ON
@@ -100,7 +100,7 @@
   ExternalProject_Add(${proj}
     GIT_REPOSITORY "git://github.com/davidsansome/python-cmake-buildsystem.git"
     GIT_TAG "3c5864f210a8d0ae1196be7c691252e16e459f59"
-    SOURCE_DIR ${proj}-src
+    SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
     PREFIX ${proj}-cmake
     BINARY_DIR ${proj}-build
     INSTALL_DIR ${proj}-install


change problematic list_filter function

change problematic list_filter function

newer cmake gave warning about changed behaviour of quoted variables:
CMP0054 for cmake/Modules/LibAddMacros.cmake:335 (IF)

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -289,53 +289,30 @@
 	set (TOOLS ${TMP} CACHE STRING ${TOOLS_DOC} FORCE)
 endmacro (remove_tool)

-# LIST_FILTER(<list> <regexp_var> [<regexp_var> ...]
-#              [OUTPUT_VARIABLE <variable>])
-# Removes items from <list> which match any of the specified
-# regular expressions. An optional argument OUTPUT_VARIABLE
+# LIST_FILTER(<list> <regexp_var>
+# Removes items from <list> which match the specified
+# regular expression. An optional argument OUTPUT_VARIABLE
 # specifies a variable in which to store the matched items instead of
 # updating <list>
 # As regular expressions can not be given to macros (see bug #5389), we pass
 # variable names whose content is the regular expressions.
 #
-# copied from http://www.cmake.org/Wiki/CMakeMacroListOperations
-MACRO(list_filter)
-  cmake_parse_arguments(LIST_FILTER "" "OUTPUT_VARIABLE" "" ${ARGV})
-  set(LIST_FILTER_DEFAULT_ARGS ${LIST_FILTER_UNPARSED_ARGUMENTS})
-  # Check arguments.
-  LIST(LENGTH LIST_FILTER_DEFAULT_ARGS LIST_FILTER_default_length)
-  IF(${LIST_FILTER_default_length} EQUAL 0)
-    MESSAGE(FATAL_ERROR "LIST_FILTER: missing list variable.")
-  ENDIF(${LIST_FILTER_default_length} EQUAL 0)
-  IF(${LIST_FILTER_default_length} EQUAL 1)
-    MESSAGE(FATAL_ERROR "LIST_FILTER: missing regular expression variable.")
-  ENDIF(${LIST_FILTER_default_length} EQUAL 1)
-  # Reset output variable
-  IF(NOT LIST_FILTER_OUTPUT_VARIABLE)
-    SET(LIST_FILTER_OUTPUT_VARIABLE "LIST_FILTER_internal_output")
-  ENDIF(NOT LIST_FILTER_OUTPUT_VARIABLE)
-  SET(${LIST_FILTER_OUTPUT_VARIABLE})
-  # Extract input list from arguments
-  LIST(GET LIST_FILTER_DEFAULT_ARGS 0 LIST_FILTER_input_list)
-  LIST(REMOVE_AT LIST_FILTER_DEFAULT_ARGS 0)
-  FOREACH(LIST_FILTER_item ${${LIST_FILTER_input_list}})
-    set(add_item "1")
-    FOREACH(LIST_FILTER_regexp_var ${LIST_FILTER_DEFAULT_ARGS})
-      FOREACH(LIST_FILTER_regexp ${${LIST_FILTER_regexp_var}})
-        IF(${LIST_FILTER_item} MATCHES ${LIST_FILTER_regexp})
-          set(add_item "0")
-        ENDIF(${LIST_FILTER_item} MATCHES ${LIST_FILTER_regexp})
-      ENDFOREACH(LIST_FILTER_regexp ${${LIST_FILTER_regexp_var}})
-    ENDFOREACH(LIST_FILTER_regexp_var)
-    if (add_item)
-      LIST(APPEND ${LIST_FILTER_OUTPUT_VARIABLE} ${LIST_FILTER_item})
-    endif()
-  ENDFOREACH(LIST_FILTER_item)
-  # If OUTPUT_VARIABLE is not specified, overwrite the input list.
-  IF(${LIST_FILTER_OUTPUT_VARIABLE} STREQUAL "LIST_FILTER_internal_output")
-    SET(${LIST_FILTER_input_list} ${${LIST_FILTER_OUTPUT_VARIABLE}})
-  ENDIF(${LIST_FILTER_OUTPUT_VARIABLE} STREQUAL "LIST_FILTER_internal_output")
-ENDMACRO(list_filter)
+# For example:
+#set (XXX "gi_a;gi_b;swig_a;gi_c;swig_d;x;y")
+#set (YYY "swig_.*")
+#list_filter(XXX YYY)
+#message (STATUS "XXX is ${XXX}") will be gi_a;gi_b;gi_c;x;y
+#
+function(list_filter result regex)
+	set(newlist)
+	foreach(r ${${result}})
+		if(r MATCHES ${${regex}})
+		else()
+			list(APPEND newlist ${r})
+		endif()
+	endforeach()
+	set(${result} ${newlist} PARENT_SCOPE)
+endfunction()

 #find string in list with regex
 function(list_find input_list regexp_var output)


see if this fixes code coverage reporting

--- cmake/modules/CodeCoverage.cmake
+++ cmake/modules/CodeCoverage.cmake
@@ -150,7 +150,7 @@
 		${_testrunner} ${ARGV3}

 		# Running gcovr
-		COMMAND ${GCOVR_PATH} -x -r . -e '${CMAKE_SOURCE_DIR}/tests/' -e '${CMAKE_SOURCE_DIR}/bson/' -o ${_outputname}.xml
+		COMMAND ${GCOVR_PATH} -x -r . -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
 		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 		COMMENT "Running gcovr to produce Cobertura code coverage report."
 	)


add arm64 support for M1 Mac

add arm64 support for M1 Mac

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -9,6 +9,8 @@
 function(get_swift_host_arch result_var_name)
   if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
     set("${result_var_name}" "x86_64" PARENT_SCOPE)
+  elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
+    set("${result_var_name}" "arm64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
     set("${result_var_name}" "aarch64" PARENT_SCOPE)
   elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")


Fixed GLFW build on systems having lib64 set as the CMAKE_INSTALL_LIBDIR  (#1737)

--- cmake/projects/glfw/hunter.cmake
+++ cmake/projects/glfw/hunter.cmake
@@ -11,6 +11,7 @@
 include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)
+include(GNUInstallDirs)

 hunter_add_version(
     PACKAGE_NAME
@@ -107,7 +108,7 @@
     # Patching of glfw3Targets.cmake required as it has full paths due to the lack
     # of imported targets for x11 packages. This should be removed when
     # https://github.com/ruslo/hunter/issues/486 is implemented
-      "lib/cmake/glfw3/glfw3Targets.cmake"
-      "lib/pkgconfig/glfw3.pc"
+      "${CMAKE_INSTALL_LIBDIR}/cmake/glfw3/glfw3Targets.cmake"
+      "${CMAKE_INSTALL_LIBDIR}/pkgconfig/glfw3.pc"

 )


Try to find FlexLexer.h associated with the flex binary being used.

--- cmake_modules/CMakeUseFlex.cmake
+++ cmake_modules/CMakeUseFlex.cmake
@@ -29,7 +29,6 @@

 IF(NOT FLEX_EXECUTABLE)
   MESSAGE(STATUS "Looking for flex")
-  FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h)
   FIND_PROGRAM(FLEX_EXECUTABLE flex)
   IF(FLEX_EXECUTABLE)
     EXEC_PROGRAM(
@@ -40,15 +39,22 @@
     # Extract major and minor versions
     STRING (REGEX REPLACE "[^0-9]*([0-9]+)..*" "\\1" FLEX_MAJOR_VERSION_TMP ${FLEX_VERSION})
     STRING (REGEX REPLACE "[^0-9]*[0-9]+\\.([0-9]+).*" "\\1" FLEX_MINOR_VERSION_TMP ${FLEX_VERSION})
-	STRING (REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+[a-z]*).*" "\\1" FLEX_REVISION_VERSION_TMP ${FLEX_VERSION})
+    STRING (REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+[a-z]*).*" "\\1" FLEX_REVISION_VERSION_TMP ${FLEX_VERSION})
     MESSAGE(STATUS "Found flex -- ${FLEX_EXECUTABLE}, version: " ${FLEX_MAJOR_VERSION_TMP} "." ${FLEX_MINOR_VERSION_TMP} "." ${FLEX_REVISION_VERSION_TMP})
     SET (FLEX_MAJOR_VERSION ${FLEX_MAJOR_VERSION_TMP} CACHE STRING "The flex major version" FORCE)
     SET (FLEX_MINOR_VERSION ${FLEX_MINOR_VERSION_TMP} CACHE STRING "The flex minor version" FORCE)
-	SET (FLEX_REVISION_VERSION ${FLEX_REVISION_VERSION_TMP} CACHE STRING "The flex revision version" FORCE)
+    SET (FLEX_REVISION_VERSION ${FLEX_REVISION_VERSION_TMP} CACHE STRING "The flex revision version" FORCE)
+
+    # Find the FlexLexer.h header. Try our best to find the one associated
+    # with the flex binary we're actually using.
+    GET_FILENAME_COMPONENT(_flex_path "${FLEX_EXECUTABLE}" PATH)
+    GET_FILENAME_COMPONENT(_flex_hint "${_flex_path}/../include" ABSOLUTE)
+    FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h HINTS "${_flex_hint}")
+
   ELSE (FLEX_EXECUTABLE)
     SET (FLEX_MAJOR_VERSION "0")
     SET (FLEX_MINOR_VERSION "0")
-	  SET (FLEX_REVISION_VERSION "0")
+    SET (FLEX_REVISION_VERSION "0")
   ENDIF(FLEX_EXECUTABLE)
   SET (FLEX_VERSION_FULL ${FLEX_MAJOR_VERSION}.${FLEX_MINOR_VERSION}.${FLEX_REVISION_VERSION} CACHE STRING "The Flex version" FORCE)
 ENDIF(NOT FLEX_EXECUTABLE)
@@ -74,7 +80,7 @@
       COMMAND "${CMAKE_COMMAND}"
       ARGS -E copy_if_different
          "${FLEX_INCLUDE_DIR}/FlexLexer.h"
-	 "${FLEXLEXERH}")
+         "${FLEXLEXERH}")
     SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}/${PATH}/${PREFIX}.cpp")
     ADD_CUSTOM_COMMAND(
       OUTPUT "${OUTFILE}"


Auto detect boost.Test library

Auto detect boost.Test library

--- configuration/boost-config.cmake
+++ configuration/boost-config.cmake
@@ -53,3 +53,15 @@
 if(Boost_MPI_FOUND AND Boost_SERIALIZATION_FOUND)
   set(K52_BOOST_LIBRARIES ${K52_BOOST_LIBRARIES} boost_mpi boost_serialization)
 endif(Boost_MPI_FOUND AND Boost_SERIALIZATION_FOUND)
+
+# Detecting Boost.Test library - unit test framework
+find_package(Boost COMPONENTS unit_test_framework)
+if(NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
+  message("boost component [unit test framework] has not been found : ${Boost_ERROR_REASON}")
+endif(NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
+
+if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
+  add_definitions(-DBUILD_WITH_BOOST_UNIT_TESTS)
+  set(BUILD_WITH_BOOST_UNIT_TESTS)
+  set(K52_BOOST_LIBRARIES ${K52_BOOST_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARIES})
+endif(Boost_UNIT_TEST_FRAMEWORK_FOUND)


ldgen: remove unused variables

ldgen: remove unused variables

--- tools/cmake/ldgen.cmake
+++ tools/cmake/ldgen.cmake
@@ -46,13 +46,8 @@
     # Create command to invoke the linker script generator tool.
     idf_build_get_property(sdkconfig SDKCONFIG)
     idf_build_get_property(root_kconfig __ROOT_KCONFIG)
-    idf_build_get_property(kconfigs KCONFIGS)
-    idf_build_get_property(kconfig_projbuilds KCONFIG_PROJBUILDS)

     idf_build_get_property(python PYTHON)
-
-    string(REPLACE ";" " " kconfigs "${kconfigs}")
-    string(REPLACE ";" " " kconfig_projbuilds "${kconfig_projbuilds}")

     idf_build_get_property(config_env_path CONFIG_ENV_PATH)


ENH: Use gtest_discover_tests if available

This method is new with CMake 3.10, it runs the executable to
determine the gtests available. This removes the need to re-run CMake
when the tests are modified to determine the tests implemented.

Change-Id: If085aa8c3a547c870ddf8e870bf46eaecada53c2

--- CMake/ITKModuleTest.cmake
+++ CMake/ITKModuleTest.cmake
@@ -241,25 +241,29 @@
   itk_module_target_label(${exe})

   include(GoogleTest)
-  if( ITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK )
-     # This advanced behavior is only available through the
-     # command line.  It is intended to be used only when writing GoogleTests,
-     # to require the developer to explicitly ask for introspection of
-     # gtest instrumented files by the time-consumeing re-running of cmake
-     # for the entire project
-     #
-     # use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=ON ."  to
-     #           Disable the slow introspection (i.e. while writing gtests)
-     # use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=OFF ." to
-     #           enable the slow introspection (during all other development)
+
+  # CMake 3.10 added this method, to avoid configure time introspection
+  if(NOT CMAKE_CROSSCOMPILING AND COMMAND gtest_discover_tests)
+    gtest_discover_tests( ${exe} )
+  else()
+    set(_skip_dependency)
+    if( ITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK )
+      # This advanced behavior is only available through the
+      # command line.  It is intended to be used only when writing GoogleTests,
+      # to require the developer to explicitly ask for introspection of
+      # gtest instrumented files by the time-consumeing re-running of cmake
+      # for the entire project
+      #
+      # use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=ON ."  to
+      #           Disable the slow introspection (i.e. while writing gtests)
+      # use "cmake -DITK_SKIP_GTEST_DEPENDANCY_AUTO_CHECK:BOOL=OFF ." to
+      #           enable the slow introspection (during all other development)
+      set(_skip_dependency "SKIP_DEPENDENCY")
+    endif()
     gtest_add_tests(TARGET ${exe}
-                    SOURCES ${KitTests}
-                    SKIP_DEPENDENCY
-                   )
-  else()
-    gtest_add_tests(TARGET ${exe}
-                    SOURCES ${KitTests}
-                   )
+      SOURCES ${KitTests}
+      ${_skip_dependency}
+      )
   endif()
   # TODO need to label the produced ctests
 endfunction()


type-o in variable name

type-o in variable name

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1285 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -183,10 +183,10 @@
         message (STATUS "trying brute-force search ")

         # take names to be directory names, and include "."
-        set (PKG_NAMES ${PKG_NAMES} ".")
+        set (${PREFIX}_PATH_NAMES ${PKG_NAMES} ".")

         # generate a combination of possible search paths
-        sagase_generate_paths (include_paths library_paths NAMES ${PKG_NAMES} PREFIXES ${PKG_PREFIXES})
+        sagase_generate_paths (include_paths library_paths NAMES ${${PREFIX}_PATH_NAMES} PREFIXES ${PKG_PREFIXES})

         # all C and C++ headers
         set (HEADER_POSTFIXES ".h" ".hpp" ".hh" ".hxx")
@@ -206,9 +206,9 @@
         foreach (component_ ${PKG_COMPONENTS})

             # get header path
-            foreach (pkgname_ ${PKG_NAMES})
+            foreach (pathnames_ ${${PREFIX}_PATH_NAMES})
                 foreach (header_extension_ ${HEADER_POSTFIXES})
-                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pkgname_}/${component_}${header_extension_} ${include_paths})
+                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pathnames_}/${component_}${header_extension_} ${include_paths})

                     if (${PREFIX}_${component_}_INCLUDE_DIR)
                         set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})


[Config] Added support for Python 3.10

[Config] Added support for Python 3.10

--- config/FindPython/Support.cmake
+++ config/FindPython/Support.cmake
@@ -25,7 +25,7 @@
   message (FATAL_ERROR "FindPython: INTERNAL ERROR")
 endif()
 if (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 3)
-  set(_${_PYTHON_PREFIX}_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
+  set(_${_PYTHON_PREFIX}_VERSIONS 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
 elseif (_${_PYTHON_PREFIX}_REQUIRED_VERSION_MAJOR EQUAL 2)
   set(_${_PYTHON_PREFIX}_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
 else()


correct compile_shader cmake function when including vortex2d project

--- cmake/Macros.cmake
+++ cmake/Macros.cmake
@@ -19,6 +19,8 @@
     endif()
 endfunction()

+set(vortex2d_macro__internal_dir ${CMAKE_CURRENT_LIST_DIR} CACHE INTERNAL "")
+
 # Function to compile the shaders and generate a C++ source file to include
 function(compile_shader)
     cmake_parse_arguments(SHADER "" "OUTPUT" "SOURCES" ${ARGN})
@@ -30,7 +32,7 @@
     endif()
     message("Using compiler: ${GLSL_VALIDATOR}")

-    set(COMPILE_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/../Scripts/GenerateSPIRV.py)
+    set(COMPILE_SCRIPT ${vortex2d_macro__internal_dir}/../Scripts/GenerateSPIRV.py)
     add_custom_command(
        OUTPUT "${SHADER_OUTPUT}.h" "${SHADER_OUTPUT}.cpp"
        COMMAND ${PYTHON_EXECUTABLE} ${COMPILE_SCRIPT} --compiler ${GLSL_VALIDATOR} --output ${SHADER_OUTPUT} ${SHADER_SOURCES}


Upgrade to Qt 5.5 (and Qt Creator 3.4.2) (#667) [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -31,8 +31,16 @@

     IF(NOT ARCHITECTURE_COMPILE)
         MESSAGE(FATAL_ERROR "We could not determine your architecture. Please clean your OpenCOR environment and try again...")
-    ELSEIF(NOT ${ARCHITECTURE} EQUAL 32 AND NOT ${ARCHITECTURE} EQUAL 64)
-        MESSAGE(FATAL_ERROR "OpenCOR can only be built in 32-bit or 64-bit mode...")
+    ELSE()
+        IF(APPLE)
+            IF(NOT ${ARCHITECTURE} EQUAL 64)
+                MESSAGE(FATAL_ERROR "OpenCOR can only be built in 64-bit mode...")
+            ENDIF()
+        ELSE()
+            IF(NOT ${ARCHITECTURE} EQUAL 32 AND NOT ${ARCHITECTURE} EQUAL 64)
+                MESSAGE(FATAL_ERROR "OpenCOR can only be built in 32-bit or 64-bit mode...")
+            ENDIF()
+        ENDIF()
     ENDIF()

     # By default, we are building a release version of OpenCOR, unless we are


Some minor work for building our tests.

Some minor work for building our tests.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -543,9 +543,13 @@
                 ADD_EXECUTABLE(${TEST_NAME}
                     ../../../../tests/testsutils.cpp

+                    ../../fileinterface.cpp
+                    ../../guiinterface.cpp
+                    ../../i18ninterface.cpp
                     ../../plugin.cpp
                     ../../plugininfo.cpp
                     ../../pluginmanager.cpp
+                    ../../solverinterface.cpp

                     ${TEST_SOURCE_FILE}
                     ${TEST_SOURCES_MOC}


Remove trailing whitespace

Remove trailing whitespace

--- android-ndk-r16b-api-21-armeabi-v7a-clang-libcxx.cmake
+++ android-ndk-r16b-api-21-armeabi-v7a-clang-libcxx.cmake
@@ -23,7 +23,7 @@

 polly_init(
     "Android NDK ${ANDROID_NDK_VERSION} / \
-API ${CMAKE_SYSTEM_VERSION} / ${CMAKE_ANDROID_ARCH_ABI} / \
+API ${CMAKE_SYSTEM_VERSION} / ${CMAKE_ANDROID_ARCH_ABI} / \
 32-bit ARM / Clang / c++11 support / libc++ static"
     "Unix Makefiles"
 )


Add 'found' message to Luabind cmake file.

--- cmake/FindLuabind.cmake
+++ cmake/FindLuabind.cmake
@@ -64,6 +64,9 @@
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Luabind  DEFAULT_MSG  LUABIND_LIBRARIES LUABIND_INCLUDE_DIR)

 IF( NOT LUABIND_FIND_QUIETLY )
+    IF( LUABIND_FOUND )
+        MESSAGE(STATUS "Found Luabind: ${LUABIND_LIBRARY}" )
+    ENDIF()
     IF( LUABIND_LIBRARY_DBG )
         MESSAGE(STATUS "Luabind debug library availible: ${LUABIND_LIBRARY_DBG}")
     ENDIF()


Fixed OpenSSL version regex

Fixed OpenSSL version regex

Starting with OpenSSL 1.0.2 source code is reformatted.
This patch takes care of the differences in the define
spacing.

--- cmake/FindOpenSSL.cmake
+++ cmake/FindOpenSSL.cmake
@@ -268,7 +268,7 @@
     set(OPENSSL_VERSION "${_OPENSSL_VERSION}")
   elseif(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
     file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
-         REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+         REGEX "^#.?define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")

     # The version number is encoded as 0xMNNFFPPS: major minor fix patch status
     # The status gives if this is a developer or prerelease and is ignored here.