changed lib folder path

changed lib folder path

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

--- CMakeModules/Python.cmake
+++ CMakeModules/Python.cmake
@@ -16,7 +16,7 @@

   if (MSVC)
     include_directories (${REX_DEP_PATH}/Python/include)
-    link_directories (${REX_DEP_PATH}/Python)
+    link_directories (${REX_DEP_PATH}/Python/lib)
   else()
     include_directories(${python_INCLUDE_DIRS})
     link_directories(${python_LIBRARY_DIRS})


Add License to FindGoolgMock.cmake file

Add License to FindGoolgMock.cmake file

--- CMake/FindGoogleMock.cmake
+++ CMake/FindGoogleMock.cmake
@@ -1,5 +1,17 @@
 # This file is a part of the OpenSurgSim project.
-# Copyright 2012-2013, SimQuest Solutions Inc.
+# Copyright 2014, SimQuest Solutions Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.

 # - Try to find the Google Mock Source directory


Update DCMQI to v1.2.3

Update DCMQI to v1.2.3

--- CMakeExternals/DCMQI.cmake
+++ CMakeExternals/DCMQI.cmake
@@ -27,7 +27,7 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       GIT_REPOSITORY https://github.com/qiicr/dcmqi.git
-      GIT_TAG 99192b76
+      GIT_TAG v1.2.3
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


ENH: Bump SimpleITKFilters remote module

The module update include the NPasteImageFilter and update to the CI
build system to Github Actions.

--- Modules/Remote/SimpleITKFilters.remote.cmake
+++ Modules/Remote/SimpleITKFilters.remote.cmake
@@ -49,5 +49,5 @@
   contains a discrete hessian, and a composite filter to compute objectness."
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSimpleITKFilters.git
-  GIT_TAG 043d96d61aa3fafe16033de142932862104fa043
+  GIT_TAG ce51d77771a54e7e0791fadb15e50dc38cbd8358
   )


FIX (#5714): also remove the .cpp from the "NOT APPLE" part

--- Modules/QmitkExt/files.cmake
+++ Modules/QmitkExt/files.cmake
@@ -68,6 +68,7 @@
  QmitkTransferFunctionGeneratorWidget.cpp
  QmitkSelectableGLWidget.cpp
  QmitkToolReferenceDataSelectionBox.cpp
+ QmitkToolWorkingDataSelectionBox.cpp
  QmitkToolGUIArea.cpp
  QmitkToolSelectionBox.cpp
  # QmitkPropertyListPopup.cpp
@@ -123,7 +124,7 @@
  QmitkBaseFunctionalityComponent.cpp
  QmitkFunctionalityComponentContainer.cpp
  QmitkFunctionalityComponents/QmitkThresholdComponent.cpp
- QmitkToolWorkingDataSelectionBox.cpp
+
  )
 ENDIF()


Add lidarviewcore packaging on MacOs

Add lidarviewcore packaging on MacOs

--- Superbuild/Projects/apple/lidarview.bundle.cmake
+++ Superbuild/Projects/apple/lidarview.bundle.cmake
@@ -121,6 +121,7 @@
     "${lidarview_appname}"
     MODULES paraview
     	    lidarview
+	    lidarviewcore
 	    vtk
             vtkmodules
             ${python_modules}


fbcode_builder: minor fixup to normalize python installation paths

Summary:
This just strips off a trailing '/' from the `INSTALL_DIR` property that we
set on python targets, to avoid having double-slashes in the paths that we use
during installation.  This shouldn't really have any material difference other
than cleaning up the paths that get printed during the installation phase.

Reviewed By: chadaustin

Differential Revision: D17089207

fbshipit-source-id: ab36bb76c19fa60fe037f7a5290ccfd6bdbf13b0

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -326,6 +326,7 @@
   if(NOT IS_ABSOLUTE "${abs_install_dir}")
     set(abs_install_dir "${CMAKE_INSTALL_PREFIX}/${abs_install_dir}")
   endif()
+  string(REGEX REPLACE "/$" "" abs_install_dir "${abs_install_dir}")
   set_target_properties(
     "${LIB_NAME}.py_lib_install"
     PROPERTIES


getdeps: export a property that contains the path to the output executable

Summary:
Export a property that indicates the path to the test executable.  This is
useful for callers that want to install the binary or run it from other CMake
rules.

Reviewed By: simpkins

Differential Revision: D17647146

fbshipit-source-id: b32e2694e44a07d7c234e53a7a5c8443cb144487

--- build/fbcode_builder/CMake/FBPythonBinary.cmake
+++ build/fbcode_builder/CMake/FBPythonBinary.cmake
@@ -156,6 +156,12 @@
   # Add an "ALL" target that depends on force ${EXE_NAME},
   # so that ${EXE_NAME} will be included in the default list of build targets.
   add_custom_target("${EXE_NAME}.GEN_PY_EXE" ALL DEPENDS "${output_file}")
+
+  # Allow resolving the executable path for the target that we generate
+  # via a generator expression like:
+  # "WATCHMAN_WAIT_PATH=$<TARGET_PROPERTY:watchman-wait.GEN_PY_EXE,EXECUTABLE>"
+  set_property(TARGET "${EXE_NAME}.GEN_PY_EXE"
+      PROPERTY EXECUTABLE "${CMAKE_CURRENT_BINARY_DIR}/${output_file}")
 endfunction()

 #


add newline

add newline

--- indra/cmake/FindFMODEX.cmake
+++ indra/cmake/FindFMODEX.cmake
@@ -63,4 +63,3 @@
   FMODEX_LIBRARY
   FMODEX_INCLUDE_DIR
   )
-


Windows build: copy cfitsio.dll to phd2 executable directory to allow running phd2 from the Visual Studio debugger when cfitsio.dll is not on PATH

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -202,6 +202,9 @@
     cfitsio
     PRIVATE FF_NO_UNISTD_H
     PRIVATE _CRT_SECURE_NO_WARNINGS)
+
+  set(PHD_COPY_EXTERNAL_DBG ${PHD_COPY_EXTERNAL_DBG} ${CMAKE_BINARY_DIR}/tmp_cmakecfitsio/Debug/cfitsio.dll)
+  set(PHD_COPY_EXTERNAL_REL ${PHD_COPY_EXTERNAL_REL} ${CMAKE_BINARY_DIR}/tmp_cmakecfitsio/Release/cfitsio.dll)
 endif()


Update golang flags to strip binary

Update golang flags to strip binary

--- golang.cmake
+++ golang.cmake
@@ -36,6 +36,10 @@
     file(GLOB GO_EXECUTABLE_SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.go")
   endif()

+  if (NOT CMAKE_GO_FLAGS)
+      set(CMAKE_GO_FLAGS "-ldflags=\"-s\"")
+  endif()
+
   add_custom_target(${GO_EXECUTABLE_TARGET}  COMMAND GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build
     -o "${CMAKE_CURRENT_BINARY_DIR}/${GO_EXECUTABLE_NAME}"
     ${CMAKE_GO_FLAGS} ${GO_EXECUTABLE_SOURCE_FILES}
@@ -69,6 +73,10 @@
     file(GLOB GO_LIBRARY_SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.go")
   endif()

+  if (NOT CMAKE_GO_FLAGS)
+      set(CMAKE_GO_FLAGS "-ldflags=\"-s\"")
+  endif()
+
   add_custom_target(${GO_LIBRARY_TARGET} COMMAND GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
     -o "${CMAKE_CURRENT_BINARY_DIR}/${GO_LIBRARY_NAME}"
     ${CMAKE_GO_FLAGS} ${GO_LIBRARY_SOURCE_FILES}


Update ITK superbuild to 4.8.1 release

Update ITK superbuild to 4.8.1 release

Change-Id: Ib7d893c6eada99e0d418a2595986602b17027a5f

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,8 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 3eaba76ccecb4128e91073b1e45058675a365025)
-# right before v4.8.1 release
+set(ITK_TAG_COMMAND GIT_TAG v4.8.1)

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Updating ITK Superbuild version to 4.6.1

Change-Id: I3a8ea0881415f0a20d290605dce17af396ba456b

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.6.0 )
+set(ITK_TAG_COMMAND GIT_TAG v4.6.1 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


BUG: Remove unused variables from Qt5 external cmake and find_packate

--- SuperBuild/External_Qt5.cmake
+++ SuperBuild/External_Qt5.cmake
@@ -41,18 +41,11 @@
 # project may depend on ${extProjName}, let's add an 'empty' one
 SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")

-find_package(Qt5 COMPONENTS Core Widgets Svg OpenGL REQUIRED)
-
 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS
-    QT_QMAKE_EXECUTABLE:PATH
-    QT_MOC_EXECUTABLE:PATH
-    QT_UIC_EXECUTABLE:PATH
-    ${PRIMARY_PROJECT_NAME}_USE_QT:BOOL
+    QT_QMAKE_EXECUTABLE:PATH
 )
 _expand_external_project_vars()
 set(COMMON_EXTERNAL_PROJECT_ARGS ${${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_ARGS})

-set(QT_LIBRARIES ${Qt5_Widgets_LIBRARIES} Qt5::Svg CACHE INTERNAL "Qt5 libraries")
-
 ProjectDependancyPop(CACHED_extProjName extProjName)
 ProjectDependancyPop(CACHED_proj proj)


ITK_BUILD_ALL_MODULES has been renamed ITK_BUILD_DEFAULT_MODULES

Change-Id: I7be8bc1df7fb46c7a36a7e49551ef4da58a86e39

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -2,8 +2,8 @@
 # Get and build itk

 if( NOT ITK_TAG )
-  # ITK master 2013-08-14
-  set( ITK_TAG "80fd1523d2294044c0da7bea5919f8119c1a800e" )
+  # ITK master 2013-09-08
+  set( ITK_TAG "130d80b376e61a30661d7e7fcbd98ed338dd48fb" )
 endif()

 set( _vtk_args )
@@ -36,7 +36,7 @@
     -DBUILD_SHARED_LIBS:BOOL=OFF
     -DBUILD_EXAMPLES:BOOL=OFF
     -DBUILD_TESTING:BOOL=OFF
-    -DITK_BUILD_ALL_MODULES:BOOL=ON
+    -DITK_BUILD_DEFAULT_MODULES:BOOL=ON
     -DModule_ITKReview:BOOL=ON
     ${_vtk_args}
     ${_opencv_args}


fix for cuda 5.5 bin directory structure

--- build/cmake/custom_scripts/schism_cuda.cmake
+++ build/cmake/custom_scripts/schism_cuda.cmake
@@ -13,13 +13,18 @@
 option(SCHISM_CUDA_BUILD_KEEP_INTERMEDIATE_FILES   "Keep the generated intermediate files"  ON)

 if (WIN32)
-    set(SCM_CUDA_SHARED_LIB_NAME "cudart64_50_32" CACHE STRING "schism cuda internal" FORCE)
-endif (WIN32)
+    if (MSVC10)
+        set (SCM_CUDA_NVCC_OPTIONS --cl-version 2010 CACHE STRING "schism cuda internal" FORCE)
+        set(SCM_CUDA_SHARED_LIB_NAME "cudart64_50_32" CACHE STRING "schism cuda internal" FORCE)
+    endif(MSVC10)

-if (WIN32)
-    #todo make gencode variable
-    set(SCM_CUDA_NVCC_OPTIONS --use-local-env --cl-version 2010 --compile CACHE STRING "schism cuda internal" FORCE)
-    set(SCM_CUDA_NVCC_PATH                  ${GLOBAL_EXT_DIR}/bin/cuda           CACHE PATH   "schism cuda internal")
+    if (MSVC11)
+        set (SCM_CUDA_NVCC_OPTIONS --cl-version 2012 CACHE STRING "schism cuda internal" FORCE)
+        set(SCM_CUDA_SHARED_LIB_NAME "cudart64_55" CACHE STRING "schism cuda internal" FORCE)
+    endif(MSVC11)
+
+    set(SCM_CUDA_NVCC_OPTIONS ${SCM_CUDA_NVCC_OPTIONS} --use-local-env --compile CACHE STRING "schism cuda internal" FORCE)
+    set(SCM_CUDA_NVCC_PATH                  ${GLOBAL_EXT_DIR}/bin/cuda/bin       CACHE PATH   "schism cuda internal")
     if (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})
         set(SCM_CUDA_NVCC_OPTIONS  ${SCM_CUDA_NVCC_OPTIONS} --machine 64 -ccbin \"$(VCInstallDir)bin/x86_amd64/cl.exe\"  CACHE STRING "schism cuda internal" FORCE)
 	else (${SCHISM_PLATFORM} MATCHES ${PLATFORM_WIN64})


Added link to custom libcxx libraries for iOS

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -122,7 +122,7 @@
 function(add_external_project NAME)
   ExternalProject_Add(${NAME} ${ARGN})
   set_target_properties(${NAME} PROPERTIES EXCLUDE_FROM_ALL TRUE)
-  if (NOT IS_IOS AND NOT NAME MATCHES "^third_party.libcxx")
+  if (NOT NAME MATCHES "^third_party.libcxx")
     add_dependencies(${NAME} ${LIBCXX_TARGET})
   endif ()
 endfunction()
@@ -638,16 +638,14 @@
 set(PCREGREP ${PCRE_PREFIX}/bin/pcregrep)
 set(XZ ${XZ_PREFIX}/bin/xz)

-if (NOT IS_IOS)
-  # Bypassing default C++ library.
-  set(CMAKE_CXX_FLAGS
-      "${CMAKE_CXX_FLAGS} -I${LIBCXX_PREFIX}/include/c++/v1")
-  set(LINKER_FLAGS
-      "-L${LIBCXX_PREFIX}/lib -lc++ -L${LIBCXXABI_PREFIX}/lib -lc++abi")
-  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
-  set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${LINKER_FLAGS}")
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}")
-endif ()
+# Bypassing default C++ library.
+set(CMAKE_CXX_FLAGS
+    "${CMAKE_CXX_FLAGS} -I${LIBCXX_PREFIX}/include/c++/v1")
+set(LINKER_FLAGS
+    "-L${LIBCXX_PREFIX}/lib -lc++ -L${LIBCXXABI_PREFIX}/lib -lc++abi")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")
+# set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} ${LINKER_FLAGS}")
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LINKER_FLAGS}")

 # Escaping architectures.


Fix OpenMPI detection pkg_search_module lets us know if ompi-cxx was found. MpidotH is never used.

--- cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake
+++ cMake/FreeCAD_Helpers/SetupSalomeSMESH.cmake
@@ -100,9 +100,8 @@
                 add_compile_options(${OPENMPI_CFLAGS})
                 link_directories(${OPENMPI_LIBRARY_DIRS})
                 link_libraries(${OPENMPI_LIBRARIES})
-                find_file(MpidotH mpi.h PATHS ${OPENMPI_INCLUDE_DIRS} NO_DEFAULT_PATH)
-                if(NOT MpidotH)
-                    message( WARNING "mpi.h was not found. Check for error above.")
+                if(NOT OPENMPI_FOUND)
+                    message( WARNING "ompi-cxx was not found. Check for error above.")
                 endif()
             endif()
             set(SMESH_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/3rdParty/salomesmesh/inc)


win32 mingw compile fix

win32 mingw compile fix

svn path=/trunk/kdesupport/strigi/; revision=638670

--- src/streams/compat/jstreamsconfig.h.cmake
+++ src/streams/compat/jstreamsconfig.h.cmake
@@ -138,8 +138,8 @@

  #include <windows.h>
  #include <io.h>
- #ifndef snprintf
- 	#define snprintf _snprintf
+ #if !defined(snprintf) && !defined(__MINGW32__)
+    #define snprintf _snprintf
  #endif

 //for some reason linux is not picking up HAVE_SSIZE_T properly


COMP: do not include gdal headers from ImportGDAL, this is done in otbIncludeDirectories

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -14,8 +14,6 @@
      MESSAGE(FATAL_ERROR
              "Cannot find GDAL. Set GDAL_INCLUDE_DIR and GDAL_LIBRARY")
   ENDIF(NOT GDAL_FOUND)
-
-  INCLUDE_DIRECTORIES(${GDAL_INCLUDE_DIR})

   MESSAGE(STATUS "  GDAL includes : ${GDAL_INCLUDE_DIR}")
   MESSAGE(STATUS "  GDAL library  : ${GDAL_LIBRARY}")


added openjpeg-2.4 to OpenJpeg_include_paths (#2829)

--- src/cmake/modules/FindOpenJpeg.cmake
+++ src/cmake/modules/FindOpenJpeg.cmake
@@ -56,18 +56,21 @@

 # Generic search paths
 set (OpenJpeg_include_paths
+     /usr/local/include/openjpeg-2.4
      /usr/local/include/openjpeg-2.3
      /usr/local/include/openjpeg-2.2
      /usr/local/include/openjpeg-2.1
      /usr/local/include/openjpeg-2.0
      /usr/local/include/openjpeg
      /usr/local/include
+     /usr/include/openjpeg-2.4
      /usr/include/openjpeg-2.3
      /usr/include/openjpeg-2.2
      /usr/include/openjpeg-2.1
      /usr/include/openjpeg
      /usr/include
      /opt/local/include
+     /opt/local/include/openjpeg-2.4
      /opt/local/include/openjpeg-2.3
      /opt/local/include/openjpeg-2.2
      /opt/local/include/openjpeg-2.1
@@ -88,6 +91,7 @@
        ${OpenJpeg_library_paths}
       )
   set (OpenJpeg_include_paths
+       ${OpenJpeg_ROOT}/include/openjpeg-2.4
        ${OpenJpeg_ROOT}/include/openjpeg-2.3
        ${OpenJpeg_ROOT}/include/openjpeg-2.2
        ${OpenJpeg_ROOT}/include/openjpeg-2.1


enable rpath on clblas/develop

enable rpath on clblas/develop

--- src/cmake/build_clBLAS.cmake
+++ src/cmake/build_clBLAS.cmake
@@ -25,7 +25,8 @@
     -DBUILD_CLIENT:BOOL=OFF
     -DBUILD_TEST:BOOL=OFF
     -DBUILD_KTEST:BOOL=OFF
-    -DADD_RPATH:BOOL=ON
+    # -DADD_RPATH:BOOL=ON
+    -DCMAKE_MACOSX_RPATH:BOOL=ON
     -DSUFFIX_LIB:STRING=
     -DCORR_TEST_WITH_ACML:BOOL=OFF
     -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo


Cmake: Fixed execute_git function in git-download to print error.

--- src/cmake/git-download.cmake
+++ src/cmake/git-download.cmake
@@ -1,7 +1,6 @@
 find_package(Git REQUIRED)

 function(execute_git)
-    set(options "")
     set(oneValueArgs
         WORKING_DIRECTORY
         OUTPUT_VARIABLE
@@ -15,17 +14,18 @@
         set(args_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
     endif()

-    #message("Running git-command: git ${args_COMMAND}")
+    message("Running git-command: git ${args_COMMAND}")

     execute_process(
         COMMAND ${GIT_EXECUTABLE} ${args_COMMAND}
         OUTPUT_VARIABLE GIT_RESULT
+        ERROR_VARIABLE GIT_ERROR
         RESULT_VARIABLE RETURN_CODE
         WORKING_DIRECTORY ${args_WORKING_DIRECTORY}
     )

     if(NOT "${RETURN_CODE}" STREQUAL "0")
-        message(FATAL_ERROR "Failed to run git command.")
+        message(FATAL_ERROR "Failed to run 'git ${args_COMMAND}' \n\tError code ${RETURN_CODE}: ${GIT_ERROR}")
     endif()

     set(${args_OUTPUT_VARIABLE} ${GIT_RESULT} PARENT_SCOPE)


Shrink the output: strip local symbols

Shrink the output: strip local symbols

On linux we also hide the static library symbols we use.

Saves a megabyte on linux, about 400 kb on OSX.

--- Plugin/cmake/AddPlugin.cmake
+++ Plugin/cmake/AddPlugin.cmake
@@ -67,16 +67,24 @@
         add_library(${name}_test_lib ALIAS ${name})
     endif()

+    # With the GNU toolchain we can hide the symbols from static libraries
+    # we link in, which lets us save a bit of space after stripping.
+    if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+        target_link_libraries(${name} "-Wl,--exclude-libs,ALL")
+    endif()

     if(ENABLE_DEPLOY)
         if(ENABLE_OSX_BUNDLE)
             SET(target_filename "${name}.bundle")
+            SET(strip_filename "${name}.bundle/Contents/MacOS/${name}")
         else()
             SET(target_filename $<TARGET_FILE:${name}>)
+            SET(strip_filename $<TARGET_FILE_NAME:${name}>)
         endif()
         add_custom_target("Deploy${name}" ALL
-            COMMAND rm -rf ${arg_PLUGINS_DIR}/${target_filename}
-            COMMAND cp -r ${target_filename} ${arg_PLUGINS_DIR}
+            COMMAND rm -rf "${arg_PLUGINS_DIR}/${target_filename}"
+            COMMAND cp -rp "${target_filename}" "${arg_PLUGINS_DIR}"
+            COMMAND strip -x "${arg_PLUGINS_DIR}/${strip_filename}"
             DEPENDS ${name}
         )
     endif()


Fix typo in check of default template arguments

Call to cxx11_check_feature for default template arguments contains
a typo, resulting in wrong CMake variable getting set. Resolve typo
so that call uses correctly spelt and documentated variable name.

--- CMake/cmake-cxx11/Modules/CheckCXX11Features.cmake
+++ CMake/cmake-cxx11/Modules/CheckCXX11Features.cmake
@@ -172,7 +172,7 @@
 cxx11_check_feature("cstdint" HAS_CXX11_CSTDINT_H)
 cxx11_check_feature("cstddef_nullptr_t" HAS_CXX11_CSTDDEF_NULLPTR_T)
 cxx11_check_feature("decltype" HAS_CXX11_DECLTYPE)
-cxx11_check_feature("default_template_arguments" HAS_CXX11_DEFAULT_TEMPLATE_ARGUMETS)
+cxx11_check_feature("default_template_arguments" HAS_CXX11_DEFAULT_TEMPLATE_ARGUMENTS)
 cxx11_check_feature("initializer_list" HAS_CXX11_INITIALIZER_LIST)
 cxx11_check_feature("lambda" HAS_CXX11_LAMBDA)
 cxx11_check_feature("lib_regex" HAS_CXX11_LIB_REGEX)


cmake: protect GMIO_HAVE_STDINT_H and GMIO_HAVE_STDBOOL_H from multiple definitions

--- src/gmio_core/config.h.cmake
+++ src/gmio_core/config.h.cmake
@@ -18,26 +18,37 @@
 #ifndef GMIO_CONFIG_H_CMAKE
 #define GMIO_CONFIG_H_CMAKE

+/* C99 */
+#ifndef GMIO_HAVE_STDINT_H
 #cmakedefine GMIO_HAVE_STDINT_H
+#endif
+
+#ifndef GMIO_HAVE_STDBOOL_H
 #cmakedefine GMIO_HAVE_STDBOOL_H
+#endif
+
 #cmakedefine GMIO_HAVE_STRTOF_FUNC
 #cmakedefine GMIO_HAVE_POWF_FUNC

+/* POSIX */
 #cmakedefine GMIO_HAVE_SYS_TYPES_H
 #cmakedefine GMIO_HAVE_SYS_STAT_H
 #cmakedefine GMIO_HAVE_POSIX_FILENO_FUNC
 #cmakedefine GMIO_HAVE_POSIX_FSTAT64_FUNC
 #cmakedefine GMIO_HAVE_WIN__FSTAT64_FUNC

+/* alloca()-like */
+#cmakedefine GMIO_HAVE_BSD_ALLOCA_FUNC
+#cmakedefine GMIO_HAVE_WIN__ALLOCA_FUNC
+
+/* Compiler byte-swap functions */
 #cmakedefine GMIO_HAVE_GCC_BUILTIN_BSWAP16_FUNC
 #cmakedefine GMIO_HAVE_GCC_BUILTIN_BSWAP32_FUNC

 #cmakedefine GMIO_HAVE_MSVC_BUILTIN_BSWAP_FUNC

+/* Target architecture */
 #cmakedefine GMIO_HOST_IS_BIG_ENDIAN
-
-#cmakedefine GMIO_HAVE_BSD_ALLOCA_FUNC
-#cmakedefine GMIO_HAVE_WIN__ALLOCA_FUNC

 #if defined(__APPLE__)
 #  if defined(__i386__) || defined(__ppc__)


BUG: Remove duplicate inclusion of wrapping submodules.

This block is the same as the one above it.

Also, rename the "file" variable because it has the same name as a CMake
command.

Change-Id: Ic7261accb231d3f91fb9cc598460b3ec625f27d7

--- Wrapping/TypedefMacros.cmake
+++ Wrapping/TypedefMacros.cmake
@@ -168,9 +168,9 @@
   # - the order is important for the order of creation of python template
   # - the typemaps files are always the same, and the rebuild can be avoided
   list(SORT wrap_cmake_files)
-  foreach(file ${wrap_cmake_files})
+  foreach(_file ${wrap_cmake_files})
     # get the module name from module.wrap
-    get_filename_component(module "${file}" NAME_WE)
+    get_filename_component(module "${_file}" NAME_WE)

     # if the module is already in the list, it means that it is already included
     # ... and do not include excluded modules
@@ -188,36 +188,6 @@
       itk_load_submodule("${module}")
     endif()
   endforeach()
-
-  # Now search for other *.wrap files to include
-  file(GLOB wrap_cmake_files "${WRAPPER_LIBRARY_SOURCE_DIR}/*.wrap")
-  # sort the list of files so we are sure to always get the same order on all system
-  # and for all builds. That's important for several reasons:
-  # - the order is important for the order of creation of python template
-  # - the typemaps files are always the same, and the rebuild can be avoided
-  list(SORT wrap_cmake_files)
-  foreach(file ${wrap_cmake_files})
-    # get the module name from wrap_module.cmake
-    get_filename_component(module "${file}" NAME_WE)
-    string(REGEX REPLACE "^wrap_" "" module "${module}")
-
-    # if the module is already in the list, it means that it is already included
-    # ... and do not include excluded modules
-    set(will_include 1)
-    foreach(already_included ${WRAPPER_LIBRARY_GROUPS})
-      if("${already_included}" STREQUAL "${module}")
-        set(will_include 0)
-      endif()
-    endforeach()
-
-    if(${will_include})
-      # Add the module name to the list. WRITE_MODULE_FILES uses this list
-      # to create the master library wrapper file.
-      list(APPEND WRAPPER_LIBRARY_GROUPS "${module}")
-      itk_load_submodule("${module}")
-    endif()
-  endforeach()
-
 endmacro()


change to version 3.5.1

change to version 3.5.1

--- tensorflow/contrib/cmake/external/protobuf.cmake
+++ tensorflow/contrib/cmake/external/protobuf.cmake
@@ -16,7 +16,7 @@

 set(PROTOBUF_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/protobuf/src/protobuf/src)
 set(PROTOBUF_URL https://github.com/google/protobuf.git)
-set(PROTOBUF_TAG 860bd12fec5c69e6529565165532b3d5108a7d97)
+set(PROTOBUF_TAG 106ffc04be1abf3ff3399f54ccf149815b287dd9)

 if(WIN32)
   set(protobuf_STATIC_LIBRARIES


Fix indenting issue.

Fix indenting issue.

Signed-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>

--- xc7/make/project_xray.cmake
+++ xc7/make/project_xray.cmake
@@ -47,7 +47,7 @@
 endfunction()

 function(PROJECT_XRAY_TILE)
-    set(options FUSED_SITES)
+  set(options FUSED_SITES)
   set(oneValueArgs PART TILE)
   set(multiValueArgs SITE_TYPES)
   cmake_parse_arguments(


[OGRE-84] Build device and simulator libraries to separate locations

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -11,10 +11,10 @@

 # Default build output paths
 if (NOT OGRE_ARCHIVE_OUTPUT)
-  set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
 endif ()
 if (NOT OGRE_LIBRARY_OUTPUT)
-  set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
 endif ()
 if (NOT OGRE_RUNTIME_OUTPUT)
   set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin)


Add missing cache path for Vulkan header when using CMake FindVulkan (#875)

This fixes compilation errors of "fatal error: 'vulkan/vulkan.h' file
not found" when using CMake 3.7's FindVulkan.

--- src/vulkan/find_vulkan.cmake
+++ src/vulkan/find_vulkan.cmake
@@ -107,6 +107,10 @@
       message(STATUS "Amber: Using Vulkan from Vulkan SDK at $ENV{VULKAN_SDK}")
       # Use the imported library target set up by find_package.
       set(VULKAN_LIB Vulkan::Vulkan)
+      set(VulkanHeaders_INCLUDE_DIR "${Vulkan_INCLUDE_DIR}"
+          CACHE PATH "vk headers dir" FORCE)
+      set(VulkanHeaders_INCLUDE_DIRS "${Vulkan_INCLUDE_DIRS}"
+          CACHE PATH "vk headers dir" FORCE)
     endif()
   endif()
 endif()


Fixed some cmake problem with older versions of cmake

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -4,7 +4,8 @@
 # - KRISLIBRARY_DEP_LIBRARIES
 # - KRISLIBRARY_DEP_DEFINITIONS

-cmake_policy(SET CMP0074 NEW)
+#turns off warning for newer versions of CMake
+#cmake_policy(SET CMP0074 NEW)

 IF(NOT KRISLIBRARY_ROOT)
   SET(KRISLIBRARY_ROOT "${CMAKE_SOURCE_DIR}/.."


tests: fix link failure and stack overflow on Mingw w64

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -206,6 +206,13 @@

 if(MINGW)
   set_source_files_properties(${tests_files} PROPERTIES COMPILE_FLAGS "-Wno-narrowing")
+
+  # required for tests on MinGW Win64
+  if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--stack,16777216")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj")
+  endif()
+
 endif()

 add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})


Fix overeager stripping of compile flag (#716)

The existing regex strips all occurrences of the given string from
`${CMAKE_CXX_FLAGS}`, regardless of whether it is just a substring of a
flag. For instance, `-Werror=format-security` gets truncated to
`=format-security`.

The new regex makes sure that only whole words get replaced.

Signed-off-by: Christoph Erhardt <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@sicherha.de>

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -18,7 +18,7 @@
     set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_OPTIONS ${_tbb_compile_options})
     unset(_tbb_compile_options)
     if (CMAKE_CXX_FLAGS)
-        string(REGEX REPLACE ${flag} "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+        string(REGEX REPLACE "(^|[ \t\r\n]+)${flag}($|[ \t\r\n]+)" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
     endif()
 endmacro()


- added compatibility with CMake < 2.8.12 which lacks the DIRECTORY   get_filename_component argument

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -131,7 +131,7 @@
 endmacro(add_pytest)

 function(downloadAndCheckMD5 url target md5chksum)
-  get_filename_component(targetDir ${target} DIRECTORY)
+  get_filename_component(targetDir ${target} PATH)
   message("Downloading ${url}...")
   file(DOWNLOAD "${url}" "${target}"
     STATUS status)
@@ -145,6 +145,9 @@
       execute_process(COMMAND curl -L -O "${url}" WORKING_DIRECTORY ${targetDir})
     endif(WIN32)
   endif()
+  if (NOT EXISTS ${target})
+    MESSAGE(FATAL_ERROR "The download of ${url} failed.")
+  endif()
   execute_process(COMMAND ${CMAKE_COMMAND} -E md5sum ${target} OUTPUT_VARIABLE md5list)
   string(REGEX REPLACE ":" ";" md5list "${md5list}")
   list(GET md5list 0 md5)


constant consistency creates continuums

constant consistency creates continuums

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -204,8 +204,8 @@
 #option(DEBUG_SPEW "more debug" OFF)
 set(TORQUE_NO_DSO_GENERATION ON)

-option(TORQUE_UseZenity "use the Zenity backend for NFD" OFF)
-mark_as_advanced(TORQUE_UseZenity)
+option(TORQUE_USE_ZENITY "use the Zenity backend for NFD" OFF)
+mark_as_advanced(TORQUE_USE_ZENITY)

 if(WIN32)
     # warning C4800: 'XXX' : forcing value to bool 'true' or 'false' (performance warning)
@@ -463,7 +463,7 @@
        # Add other flags to the compiler
        add_definitions(${GTK3_CFLAGS_OTHER})

-	   if(TORQUE_UseZenity)
+	   if(TORQUE_USE_ZENITY)
 			set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "nfd_gtk.c" )
 	   else()
 			set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "simple_exec.h" "nfd_zenity.c")


TEST: Test input should not be a temporary file

--- Modules/Learning/Supervised/test/tests-shark.cmake
+++ Modules/Learning/Supervised/test/tests-shark.cmake
@@ -9,7 +9,7 @@

 otb_add_test(NAME leTuSharkRFMachineLearningModelCanRead COMMAND otbSupervisedTestDriver
   otbSharkRFMachineLearningModelCanRead
-  ${TEMP}/shark_rf_model.txt
+  ${INPUTDATA}/Classification/otbSharkImageClassificationFilter_RFmodel.txt
   )

 otb_add_test(NAME leTuSharkRFMachineLearningModelCanReadFail COMMAND otbSupervisedTestDriver


COMP: update shark version

COMP: update shark version

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -30,8 +30,8 @@

 ExternalProject_Add(SHARK
   PREFIX SHARK
-  URL "https://github.com/Shark-ML/Shark/archive/a0d1f816f474b968adbf7592bff199a96a87efc1.zip"
-  URL_MD5 ed0e8eb73743b39a93775599761a9273
+  URL "https://github.com/Shark-ML/Shark/archive/d63962161d9e7229c804373f812015f84a121139.zip"
+  URL_MD5 abc434362a692c66184679e45ad9f974
   SOURCE_DIR ${SHARK_SB_SRC}
   BINARY_DIR ${SHARK_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


Added missing file from last commit [skip ci]

--- cmake/Qt5PrintSupport/Qt5PrintSupportConfig.cmake
+++ cmake/Qt5PrintSupport/Qt5PrintSupportConfig.cmake
@@ -60,8 +60,8 @@

     set(_Qt5PrintSupport_OWN_INCLUDE_DIRS "${_qt5PrintSupport_install_prefix}/include/" "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport")
     set(Qt5PrintSupport_PRIVATE_INCLUDE_DIRS
-        "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.14.0"
-        "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.14.0/QtPrintSupport"
+        "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.15.5"
+        "${_qt5PrintSupport_install_prefix}/include/QtPrintSupport/5.15.5/QtPrintSupport"
     )
     include("${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake" OPTIONAL)

@@ -105,7 +105,7 @@
     foreach(_module_dep ${_Qt5PrintSupport_MODULE_DEPENDENCIES})
         if (NOT Qt5${_module_dep}_FOUND)
             find_package(Qt5${_module_dep}
-                5.14.0 ${_Qt5PrintSupport_FIND_VERSION_EXACT}
+                5.15.5 ${_Qt5PrintSupport_FIND_VERSION_EXACT}
                 ${_Qt5PrintSupport_DEPENDENCIES_FIND_QUIET}
                 ${_Qt5PrintSupport_FIND_DEPENDENCIES_REQUIRED}
                 PATHS "${CMAKE_CURRENT_LIST_DIR}/.." NO_DEFAULT_PATH


CMake: Also remove ninja file during "make distclean" (autopilot macro)

--- cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+++ cmake/macros/macro_deal_ii_invoke_autopilot.cmake
@@ -168,7 +168,9 @@
     COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target clean
     COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target runclean
     COMMAND ${CMAKE_COMMAND} -E remove_directory CMakeFiles
-    COMMAND ${CMAKE_COMMAND} -E remove CMakeCache.txt cmake_install.cmake Makefile
+    COMMAND ${CMAKE_COMMAND} -E remove
+      CMakeCache.txt cmake_install.cmake Makefile
+      build.ninja rules.ninja .ninja_deps .ninja_log
     COMMENT "distclean invoked"
     )


Added new url_sha1_cmake scheme for cvmatio module.

--- cmake/projects/cvmatio/hunter.cmake
+++ cmake/projects/cvmatio/hunter.cmake
@@ -33,11 +33,13 @@
 )

 # Pick a download scheme
-hunter_pick_scheme(
-    DEFAULT
-    url_sha1_release_debug # For separate release/debug generators, like Makefile
-    COMBINED
-    url_sha1_combined_release_debug # For Xcode and Visual Studio
-)
+# hunter_pick_scheme(
+#     DEFAULT
+#     url_sha1_release_debug # For separate release/debug generators, like Makefile
+#     COMBINED
+#     url_sha1_combined_release_debug # For Xcode and Visual Studio
+# )
+
+hunter_pick_scheme(DEFAULT url_sha1_cmake)

 hunter_download(PACKAGE_NAME cvmatio)


Fix formatting in add_dependencies.cmake.

--- add_dependencies.cmake
+++ add_dependencies.cmake
@@ -34,7 +34,7 @@
 set(CUDA_SEPARABLE_COMPILATION ON)
 set(CUDA_VERBOSE_BUILD OFF)
 if(UNIX)
-set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3;-std=c++11)
+  set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3;-std=c++11)
 else()
   if(MSVC)
     add_compile_options(/FS)
@@ -92,9 +92,9 @@

 if(UNIX)
   if (${CUDA_VERSION} VERSION_GREATER "6")
-  #message(status "Cuda version > 6 found: ${CUDA_VERSION}")
-  #message(status "CudaRT libraries ${CUDA_CUDART_LIBRARY} dir:${CUDA_TOOLKIT_ROOT_DIR}")
-  find_library(CUDA_CUDARTDEV_LIBRARY cudadevrt PATHS ${CUDA_TOOLKIT_ROOT_DIR} PATH_SUFFIXES lib64 lib )
+    #message(status "Cuda version > 6 found: ${CUDA_VERSION}")
+    #message(status "CudaRT libraries ${CUDA_CUDART_LIBRARY} dir:${CUDA_TOOLKIT_ROOT_DIR}")
+    find_library(CUDA_CUDARTDEV_LIBRARY cudadevrt PATHS ${CUDA_TOOLKIT_ROOT_DIR} PATH_SUFFIXES lib64 lib )
   else()
     set(CUDA_CUDARTDEV_LIBRARY)
   endif()
@@ -117,7 +117,7 @@
   pkg_check_modules(EIGEN3 REQUIRED eigen3)
   include_directories(${EIGEN3_INCLUDE_DIRS})
 else()
-   set(EIGEN3_INCLUDE_DIR "$ENV{EIGEN_INCLUDE_DIR}" )
+  set(EIGEN3_INCLUDE_DIR "$ENV{EIGEN_INCLUDE_DIR}" )
   if(NOT EIGEN3_INCLUDE_DIR)
     message(FATAL_ERROR "Please point the environment variable EIGEN_INCLUDE_DIR to the include directory of your Eigen installation.")
   else()
@@ -140,33 +140,33 @@
   FIND_PATH(
     assimp_INCLUDE_DIRS
     NAMES assimp/postprocess.h assimp/scene.h assimp/version.h assimp/config.h assimp/cimport.h
-    PATHS ${ASSIMP_DIR}
-    PATH_SUFFIXES include
-	)
-
+    PATHS ${ASSIMP_DIR}
+    PATH_SUFFIXES include
+    )
+
   FIND_LIBRARY(
     assimp_LIBRARIES_DEBUG
     NAMES assimp assimp-${MSVC_PREFIX}-mtd
     PATHS ${ASSIMP_DIR}
-	PATH_SUFFIXES lib lib64 lib32)
-
+    PATH_SUFFIXES lib lib64 lib32)
+
   FIND_LIBRARY(
     assimp_LIBRARIES_RELEASE
     NAMES assimp assimp-${MSVC_PREFIX}-mt
     PATHS ${ASSIMP_DIR}
-	PATH_SUFFIXES lib lib64 lib32)
-
+    PATH_SUFFIXES lib lib64 lib32)
+
   FIND_FILE(assimp_DLL_DEBUG
     NAMES assimp.dll assimp-${MSVC_PREFIX}-mtd.dll
-	PATHS ${ASSIMP_DIR}
-	PATH_SUFFIXES bin
+    PATHS ${ASSIMP_DIR}
+    PATH_SUFFIXES bin
     )
   FIND_FILE(assimp_DLL_RELEASE
     NAMES assimp.dll assimp-${MSVC_PREFIX}-mt.dll
-	PATHS ${ASSIMP_DIR}
-	PATH_SUFFIXES bin
-    )
-
+    PATHS ${ASSIMP_DIR}
+    PATH_SUFFIXES bin
+    )
+
   IF (assimp_INCLUDE_DIRS AND assimp_LIBRARIES_DEBUG AND assimp_LIBRARIES_RELEASE)
     SET(assimp_FOUND TRUE)
   ENDIF ()
@@ -175,12 +175,12 @@
     IF (NOT assimp_FIND_QUIETLY)
       MESSAGE(STATUS "Found asset importer library: ${assimp_LIBRARIES}")
     ENDIF (NOT assimp_FIND_QUIETLY)
-	set(ASSIMP_INCLUDE_DIRS ${assimp_INCLUDE_DIRS})
-	set(ASSIMP_LIBRARIES_DEBUG ${assimp_LIBRARIES_DEBUG})
-	set(ASSIMP_LIBRARIES_RELEASE ${assimp_LIBRARIES_RELEASE})
-	set(ASSIMP_LIBRARIES ${assimp_LIBRARIES_RELEASE})
-	get_filename_component(ASSIMP_LIBRARIES_DIR ${assimp_DLL_RELEASE} DIRECTORY)
-
+    set(ASSIMP_INCLUDE_DIRS ${assimp_INCLUDE_DIRS})
+    set(ASSIMP_LIBRARIES_DEBUG ${assimp_LIBRARIES_DEBUG})
+    set(ASSIMP_LIBRARIES_RELEASE ${assimp_LIBRARIES_RELEASE})
+    set(ASSIMP_LIBRARIES ${assimp_LIBRARIES_RELEASE})
+    get_filename_component(ASSIMP_LIBRARIES_DIR ${assimp_DLL_RELEASE} DIRECTORY)
+
   ELSE (assimp_FOUND)
     MESSAGE(FATAL_ERROR "Could not find asset importer library")
   ENDIF (assimp_FOUND)
@@ -206,7 +206,7 @@
   Qt5::Gui
   Qt5::Quick
   Qt5::Xml
-)
+  )

 set(Boost_USE_STATIC_LIBS   ON)
 find_package(Boost 1.58.0 COMPONENTS date_time timer filesystem system serialization REQUIRED)
@@ -217,8 +217,8 @@
 include(${ITK_USE_FILE})
 if(MSVC)
 else()
-add_definitions("-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0")
-add_definitions("-DVCL_NEEDS_INLINE_INSTANTIATION=0")
+  add_definitions("-DVCL_CAN_STATIC_CONST_INIT_FLOAT=0")
+  add_definitions("-DVCL_NEEDS_INLINE_INSTANTIATION=0")
 endif()
 list(APPEND LIBRARIES ${ITK_LIBRARIES})

@@ -235,36 +235,36 @@
 include_directories(${Clipper_INCLUDE_DIR})
 list(APPEND LIBRARIES ${Clipper_LIBRARIES})

-if(MSVC)
-	try_run(CPU_TEST_RUN_RESULT_VAR CPU_TEST_COMPILE_RESULT_VAR
-		${CMAKE_BINARY_DIR}
-		${CMAKE_SOURCE_DIR}/scripts/cpu_test.cpp
-		RUN_OUTPUT_VARIABLE CPU_TEST_OUTPUT
-	)
-    #message(STATUS "CPU_TEST_RUN_RESULT_VAR: ${CPU_TEST_RUN_RESULT_VAR}")
-	#message(STATUS "CPU_TEST_OUTPUT: ${CPU_TEST_OUTPUT}")
-
-	list(FIND CPU_TEST_OUTPUT "SSE2" HAS_SSE2)
-	list(FIND CPU_TEST_OUTPUT "USE_AVX" HAS_AVX)
-	if (${HAS_SSE2} GREATER -1)
-	set(HAS_SSE2 true)
-	else()
-	set(HAS_SSE2 false)
-	endif()
-	if (${HAS_AVX} GREATER -1)
-	set(HAS_AVX true)
-	else()
-	set(HAS_AVX false)
-	endif()
-
-	#message(STATUS "SSE2: ${HAS_SSE2}   USE_AVX: ${HAS_AVX}")
-	if (HAS_AVX)
-	    message(STATUS "Has AVX")
-		set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} /arch:AVX2 /FS /MP /openmp")
-	else()
-		set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} /FS /MP /openmp")
-	endif()
-	add_definitions("-D_USE_MATH_DEFINES")
+if(MSVC)
+  try_run(CPU_TEST_RUN_RESULT_VAR CPU_TEST_COMPILE_RESULT_VAR
+    ${CMAKE_BINARY_DIR}
+    ${CMAKE_SOURCE_DIR}/scripts/cpu_test.cpp
+    RUN_OUTPUT_VARIABLE CPU_TEST_OUTPUT
+    )
+  #message(STATUS "CPU_TEST_RUN_RESULT_VAR: ${CPU_TEST_RUN_RESULT_VAR}")
+  #message(STATUS "CPU_TEST_OUTPUT: ${CPU_TEST_OUTPUT}")
+
+  list(FIND CPU_TEST_OUTPUT "SSE2" HAS_SSE2)
+  list(FIND CPU_TEST_OUTPUT "USE_AVX" HAS_AVX)
+  if (${HAS_SSE2} GREATER -1)
+    set(HAS_SSE2 true)
+  else()
+    set(HAS_SSE2 false)
+  endif()
+  if (${HAS_AVX} GREATER -1)
+    set(HAS_AVX true)
+  else()
+    set(HAS_AVX false)
+  endif()
+
+  #message(STATUS "SSE2: ${HAS_SSE2}   USE_AVX: ${HAS_AVX}")
+  if (HAS_AVX)
+    message(STATUS "Has AVX")
+    set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} /arch:AVX2 /FS /MP /openmp")
+  else()
+    set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} /FS /MP /openmp")
+  endif()
+  add_definitions("-D_USE_MATH_DEFINES")
 else()
   #  -Wno-unused-local-typedefs is just because of ITK 4.5 with 4.7 it is not necessary any more
   set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -g -fPIC  -Wno-unused-local-typedefs")


Build with debugging info.

Build with debugging info.

--- add_dependencies.cmake
+++ add_dependencies.cmake
@@ -28,7 +28,7 @@
 include_directories(${Qt5Quick_INCLUDE_DIRS})

-set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")
+set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror -g")

 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 #set(CMAKE_AUTORCC ON) needs cmake 3.2.1


BUG: Fix hostname extraction in Software Guide dashboard build.

--- Docker/itksoftwareguide-dashboard/dashboard.cmake
+++ Docker/itksoftwareguide-dashboard/dashboard.cmake
@@ -5,7 +5,7 @@
 #############################

 # Build identification.
-set( CTEST_SITE "ENV${HOSTNAME}.docker" )
+set( CTEST_SITE "$ENV{HOSTNAME}.docker" )
 set( CTEST_BUILD_NAME "Linux GCC Software Guide" )
 set( CTEST_BUILD_CONFIGURATION MinSizeRel )
 set( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
@@ -29,7 +29,7 @@
 list( APPEND CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}" )

 # Start with a fresh build tree.
-ctest_empty_binary_directory( ${CTEST_BINARY_DIRECTORY} )
+ctest_empty_binary_directory( ${CTEST_BINARY_DIRECTORY}/ )

 # Initial cache.
 file( WRITE ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt "


Fix typo in taglib_c.pc

Fix typo in taglib_c.pc

Patch by Modestas Vainius to fix a bug reported in Debian - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524696

git-svn-id: 7928e23e4d58c5ca14aa7b47c53aeff82ee1dd0c@1038111 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

--- bindings/c/taglib_c.pc.cmake
+++ bindings/c/taglib_c.pc.cmake
@@ -9,4 +9,4 @@
 Requires: taglib
 Version: ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
 Libs: -L${LIB_INSTALL_DIR} -ltag_c
-Cflags: -I=${INCLUDE_INSTALL_DIR}/taglib
+Cflags: -I${INCLUDE_INSTALL_DIR}/taglib


ENH: make it a fatal error in cmake if the loaded commands can not be compiled, so cmake does not report that Unknown CMake Command "VTK_MAKE_INSTANTIATOR2" for all errors of this type.

--- CMake/vtkCompileCMakeExtensions.cmake
+++ CMake/vtkCompileCMakeExtensions.cmake
@@ -10,10 +10,11 @@
     TRY_COMPILE("${result_var}" "${build_dir}" "${source_dir}"
                 VTK_LOADED_COMMANDS
                 OUTPUT_VARIABLE VTK_COMPILE_CMAKE_EXTENSIONS_OUTPUT)
+    SET(${result_var} 0)
     IF("${result_var}")
       MESSAGE(STATUS "Compiling VTK CMake commands - done")
     ELSE("${result_var}")
-      MESSAGE(STATUS "Compiling VTK CMake commands - failed")
+      MESSAGE(FATAL_ERROR "Compiling VTK CMake commands - failed")
       MESSAGE("Failed to compile VTK extensions to CMake")
       WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
         "Building of VTK extensions failed with the following output:\n"


ARROW-5026: [Python][Packaging] Fix gandiva.dll detection on non Windows

This is a workaround for 0.13.0 release. We should do real fix after
0.13.0 release.

Author: Kouhei Sutou <kou@clear-code.com>

Closes #4043 from kou/python-conda-gandiva-non-windows and squashes the following commits:

1ce1fe91 <Kouhei Sutou>  Fix gandiva.dll detection on non Windows

--- cpp/cmake_modules/FindGandiva.cmake
+++ cpp/cmake_modules/FindGandiva.cmake
@@ -48,8 +48,13 @@

   # TODO: ARROW-5021
   set(GANDIVA_SEARCH_LIB_PATH "${GANDIVA_HOME}/lib")
-  # TODO: ARROW-5025
-  set(GANDIVA_SEARCH_SHARED_LIB_PATH "${GANDIVA_HOME}/bin")
+  if(WIN32)
+    # TODO: ARROW-5025
+    set(GANDIVA_SEARCH_SHARED_LIB_PATH "${GANDIVA_HOME}/bin")
+  else()
+    # TODO: ARROW-5026
+    set(GANDIVA_SEARCH_SHARED_LIB_PATH "${GANDIVA_HOME}/lib")
+  endif()

   find_path(GANDIVA_INCLUDE_DIR gandiva/expression_registry.h
             PATHS ${GANDIVA_SEARCH_HEADER_PATHS}


ENH: use CMAKE_PREFIX_PATH simplifies dependencies handling

--- CMake/External_OpenJpeg.cmake
+++ CMake/External_OpenJpeg.cmake
@@ -17,29 +17,19 @@
   # handle dependencies : TIFF, ZLIB, ...
   # although they seem un-used by the openjp2 codec
   if(USE_SYSTEM_TIFF)
-    set(OPENJPEG_SB_TIFF_CONFIG)
+    # TODO : handle specific prefix
   else()
-    set(OPENJPEG_SB_TIFF_CONFIG
-      -DTIFF_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-      -DTIFF_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libtiff${CMAKE_SHARED_LIBRARY_SUFFIX}
-      )
     list(APPEND ${proj}_DEPENDENCIES TIFF)
   endif()

   if(USE_SYSTEM_ZLIB)
-    set(OPENJPEG_SB_ZLIB_CONFIG)
+    # TODO : handle specific prefix
   else()
-    set(OPENJPEG_SB_ZLIB_CONFIG
-      -DZLIB_ROOT:STRING=${CMAKE_INSTALL_PREFIX}
-      -DZLIB_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libz${CMAKE_SHARED_LIBRARY_SUFFIX}
-      )
     list(APPEND ${proj}_DEPENDENCIES ZLIB)
   endif()

   if(MSVC)
   #TODO: add LCMS dependency
-  set(OPENJPEG_SB_TIFF_CONFIG)
-  set(OPENJPEG_SB_ZLIB_CONFIG)
   endif()

   ExternalProject_Add(${proj}
@@ -60,8 +50,7 @@
         -DBUILD_SHARED_LIBS:BOOL=ON
         -DBUILD_TESTING:BOOL=OFF
         -DBUILD_THIRDPARTY:BOOL=OFF
-        ${OPENJPEG_SB_TIFF_CONFIG}
-        ${OPENJPEG_SB_ZLIB_CONFIG}
+        -DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX}
         DEPENDS ${${proj}_DEPENDENCIES}
         CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )


Update PythonQt to patched-6

Update PythonQt to patched-6

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -66,7 +66,7 @@
     message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}")
   endif()

-  set(revision_tag 503597ba3274f59cd68347f11926340ec4f33471)
+  set(revision_tag f9c7e6a8e7c9ca7953b7128e820a81c93ed2cc56)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()


CheckForGoogleMockCompilerFlags: Set flags variable properly

--- CheckForGoogleMockCompilerFlags.cmake
+++ CheckForGoogleMockCompilerFlags.cmake
@@ -20,6 +20,7 @@
     if (HAVE_${FLAG_VARIABLE})

         set (${CXXFLAGS_VARIABLE}
+             "${${CXXFLAGS_VARIABLE}} ${${FLAG_VARIABLE}}"
              PARENT_SCOPE)

     endif ()


Updated android.toolchain.cmake : set ANDROID_DEFAULT_NDK_API_LEVEL 9

--- cmake/android.toolchain.cmake
+++ cmake/android.toolchain.cmake
@@ -217,7 +217,7 @@
 set( ANDROID_SUPPORTED_ABIS_x86 "x86" )
 set( ANDROID_SUPPORTED_ABIS_mipsel "mips" )

-set( ANDROID_DEFAULT_NDK_API_LEVEL 8 )
+set( ANDROID_DEFAULT_NDK_API_LEVEL 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_x86 9 )
 set( ANDROID_DEFAULT_NDK_API_LEVEL_mips 9 )


Restore some lost CMake logic when finding libXml2.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -27,6 +27,7 @@
 find_package(Sphinx)
 find_package(SWIG 3)

+# Find libxml2
 set(HAVE_LIBXML2_CONFIG FALSE)
 if(MSVC)
   # If we want to use config packages on Windows with Visual Studio,
@@ -39,8 +40,16 @@
   find_package(LibXml2 CONFIG QUIET)
   if(LibXml2_FOUND)
     set(HAVE_LIBXML2_CONFIG TRUE)
+    foreach(_XML2_VAR LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR LIBXML2_XMLLINT_EXECUTABLE)
+      if(DEFINED ${_XML2_VAR} AND NOT ${${_XML2_VAR}})
+        unset(${_XML2_VAR} CACHE)
+      endif()
+    endforeach()
   else()
     find_package(LibXml2 REQUIRED)
+    if(LibXml2_FOUND)
+      unset(LibXml2_DIR CACHE)
+    endif()
   endif()
 else()
   find_package(LibXml2 REQUIRED)


Use protobuf v3.2.0 for MOBILE_INFERENCE compiling.

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -188,14 +188,24 @@
         SET(OPTIONAL_CACHE_ARGS "-DZLIB_ROOT:STRING=${ZLIB_ROOT}")
     ENDIF()

+    SET(PROTOBUF_REPO "https://github.com/google/protobuf.git")
+    SET(PROTOBUF_TAG "9f75c5aa851cd877fb0d93ccc31b8567a6706546")
+    IF(MOBILE_INFERENCE)
+        SET(PROTOBUF_REPO "https://github.com/qingqing01/protobuf.git")
+        SET(PROTOBUF_TAG "v3.2.0")
+        IF(NOT BUILD_FOR_HOST)
+            SET(OPTIONAL_ARGS ${OPTIONAL_ARGS} "-Dprotobuf_BUILD_PROTOC_BINARIES=OFF")
+        ENDIF()
+    ENDIF()
+
     ExternalProject_Add(
         ${TARGET_NAME}
         ${EXTERNAL_PROJECT_LOG_ARGS}
         PREFIX          ${PROTOBUF_SOURCES_DIR}
         UPDATE_COMMAND  ""
         DEPENDS         zlib
-        GIT_REPOSITORY  "https://github.com/google/protobuf.git"
-        GIT_TAG         "9f75c5aa851cd877fb0d93ccc31b8567a6706546"
+        GIT_REPOSITORY  ${PROTOBUF_REPO}
+        GIT_TAG         ${PROTOBUF_TAG}
         CONFIGURE_COMMAND
         ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/${TARGET_NAME}/cmake
             ${OPTIONAL_ARGS}
@@ -213,7 +223,11 @@
     )
 ENDFUNCTION()

-SET(PROTOBUF_VERSION 3.1)
+IF(NOT MOBILE_INFERENCE)
+    SET(PROTOBUF_VERSION 3.1)
+ELSE()
+    SET(PROTOBUF_VERSION 3.2)
+ENDIF()
 IF(CMAKE_CROSSCOMPILING)
     build_protobuf(protobuf_host TRUE)
     LIST(APPEND external_project_dependencies protobuf_host)


dont abort on old VTK version

dont abort on old VTK version

--- cmakemodules/script_vtk.cmake
+++ cmakemodules/script_vtk.cmake
@@ -7,12 +7,13 @@
 IF(NOT DISABLE_VTK)
 	FIND_PACKAGE(VTK)
 	IF (VTK_FOUND)
+		SET(CMAKE_MRPT_HAS_VTK 1)
+
 		# vtkStructuredGrid added after 5.10.0rc2 or above
 		# constraint on the version - putting this in FIND_PACKAGE doesn't work.
 		IF (${VTK_MAJOR_VERSION} LESS 5 OR (${VTK_MAJOR_VERSION} EQUAL 5 AND VTK_MINOR_VERSION LESS 10))
-			MESSAGE(FATAL_ERROR "Current VTK version (${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) is less than version 5.10 (the required minimum). Exiting.")
+			MESSAGE("Current VTK version (${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION}) is less than version 5.10 (the required minimum). Disabling VTK.")
+			SET(CMAKE_MRPT_HAS_VTK 0)
 		ENDIF()
-
-		SET(CMAKE_MRPT_HAS_VTK 1)
 	ENDIF()
 ENDIF()


Updates for finding Tinyxml.

Updates for finding Tinyxml.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@3787 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- cmake/ThirdPartyTinyxml.cmake
+++ cmake/ThirdPartyTinyxml.cmake
@@ -27,8 +27,14 @@
         COMMAND ${CMAKE_COMMAND} -E tar jxf ${TPSRC}/tinyxml_2_4_3.tar.bz2
         WORKING_DIRECTORY ${TPSRC}
     )
+    SET(TINYXML_INCLUDE_DIR ${TPSRC}/tinyxml)
+    SET(TINYXML_LIB tinyxml)
+    SET(TINYXML_BASE ${TPSRC})
+    SET(TINYXML_SRC_DIR ${TPSRC}/tinyxml)
+ELSE (THIRDPARTY_BUILD_TINYXML)
+    INCLUDE (FindTinyXml)
 ENDIF (THIRDPARTY_BUILD_TINYXML)
+INCLUDE_DIRECTORIES(${TINYXML_BASE})

-INCLUDE (FindTinyXml)
-SET(TINYXML_LIB tinyxml)
-SET(TINYXML_BASE ${TPSRC})
+
+


Remove quotes

Remove quotes

--- cmake/circle_continuous.cmake
+++ cmake/circle_continuous.cmake
@@ -13,11 +13,11 @@
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
 set(cfg_options
   -DPYTHON_COVERAGE=ON
-  -DPYTHON_VERSION="$ENV{PYTHON_VERSION}"
-  -DPYTHON_COVERAGE_EXECUTABLE="$ENV{COVERAGE_EXECUTABLE}"
-  -DVIRTUALENV_EXECUTABLE="$ENV{VIRTUALENV_EXECUTABLE}"
-  -DFLAKE8_EXECUTABLE="$ENV{FLAKE8_EXECUTABLE}"
-  -DPYTHON_EXECUTABLE="$ENV{PYTHON_EXECUTABLE}"
+  -DPYTHON_VERSION=$ENV{PYTHON_VERSION}
+  -DPYTHON_COVERAGE_EXECUTABLE=$ENV{COVERAGE_EXECUTABLE}
+  -DVIRTUALENV_EXECUTABLE=$ENV{VIRTUALENV_EXECUTABLE}
+  -DFLAKE8_EXECUTABLE=$ENV{FLAKE8_EXECUTABLE}
+  -DPYTHON_EXECUTABLE=$ENV{PYTHON_EXECUTABLE}
 )

 ctest_start("Continuous")


Enable strict iterators for debug builds

Reference: https://wiki.qt.io/Iterators

By default, it sometimes becomes possible to assign non-const iterators to
const-iterators. Thinking of an iterator as a typedef of some pointer type,
C++ allows assignment of a non-const pointer to a const pointer. To
illustrate:

QMap<QString, QString> map;

/* code compiles and works fine but find() returns the non-const
   QMap::iterator that detaches!
*/
QMap<QString, QString>::const_iterator it = map.find("girish");


Relax requirements for external BOOST for DEAL_WITH_ZLIB=OFF

--- cmake/modules/FindBOOST.cmake
+++ cmake/modules/FindBOOST.cmake
@@ -46,9 +46,15 @@

 # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
 LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-FIND_PACKAGE(Boost 1.59 COMPONENTS
-  iostreams serialization system thread
-  )
+IF(DEAL_II_WITH_ZLIB)
+  FIND_PACKAGE(Boost 1.59 COMPONENTS
+    iostreams serialization system thread
+    )
+ELSE()
+  FIND_PACKAGE(Boost 1.59 COMPONENTS
+    serialization system thread
+    )
+ENDIF()
 LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)

 #
@@ -59,7 +65,11 @@

   # temporarily disable ${CMAKE_SOURCE_DIR}/cmake/modules for module lookup
   LIST(REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
-  FIND_PACKAGE(Boost 1.59 COMPONENTS iostreams serialization system thread)
+  IF(DEAL_II_WITH_ZLIB)
+    FIND_PACKAGE(Boost 1.59 COMPONENTS iostreams serialization system thread)
+  ELSE()
+    FIND_PACKAGE(Boost 1.59 COMPONENTS serialization system thread)
+  ENDIF()
   LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules/)
 ENDIF()


Put pkgconfig files in lib in the build tree

--- cmake/support/configure.cmake
+++ cmake/support/configure.cmake
@@ -125,7 +125,7 @@

 function (vistk_configure_pkgconfig module)
   if (UNIX)
-    set(pkgconfig_file "${vistk_binary_dir}/${module}.pc")
+    set(pkgconfig_file "${vistk_binary_dir}/lib/pkgconfig/${module}.pc")

     vistk_configure_file(vistk-${module}.pc
       "${CMAKE_CURRENT_SOURCE_DIR}/${module}.pc.in"


PARQUET-925: Use detected ARROW_LIBS from ARROW_LIB_PATH

Author: Uwe L. Korn <uwe@apache.org>

Closes #274 from xhochy/arrow_python-fixes and squashes the following commits:

f379663 [Uwe L. Korn] Use detected ARROW_LIBS from ARROW_LIB_PATH

--- cmake_modules/FindArrow.cmake
+++ cmake_modules/FindArrow.cmake
@@ -56,7 +56,7 @@
   set(ARROW_LIB_NAME libarrow)
   set(ARROW_IO_LIB_NAME libarrow_io)

-  set(ARROW_LIBS ${ARROW_SEARCH_LIB_PATH})
+  get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY)
   set(ARROW_STATIC_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.a)
   set(ARROW_SHARED_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})


MODIFIED: Added 1 more possible path for finding the Mysql lib and headers to the CMake mysql module. Patch by ZymoticB. http://arcemu.org/forums/index.php?showtopic=25205 Commited by dfighter1985.

--- cmake_modules/FindMySQL.cmake
+++ cmake_modules/FindMySQL.cmake
@@ -15,12 +15,13 @@
   /usr/local/include/mysql
   /usr/include/mysql
   /usr/local/mysql/include
+  /opt/local/include/mysql5/mysql
 )

 SET(MYSQL_NAMES mysqlclient mysqlclient_r)
 FIND_LIBRARY(MYSQL_LIBRARY
   NAMES ${MYSQL_NAMES}
-  PATHS /usr/lib /usr/lib/mysql /usr/local/lib /usr/local/mysql/lib /usr/local/lib/mysql
+  PATHS /usr/lib /usr/lib/mysql /usr/local/lib /usr/local/mysql/lib /usr/local/lib/mysql /opt/local/lib/mysql5/mysql
 )

 IF (MYSQL_INCLUDE_DIR AND MYSQL_LIBRARY)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   28)
+SET(KWSYS_DATE_STAMP_DAY   29)


Checks cmake version prior to using cookoff

--- cmake/GreatCMakeCookOffConfig.cmake
+++ cmake/GreatCMakeCookOffConfig.cmake
@@ -4,6 +4,13 @@
 set(GREAT_CMAKE_COOKOFF_SCRIPT_DIR ${CMAKE_CURRENT_LIST_DIR}/../scripts CACHE DOC
     "Path to GreatCMakeCookOff script directory")
 macro(initialize_cookoff)
+    if(CMAKE_VERSION VERSION_LESS 2.8)
+        message(FATAL_ERROR "The GreatCMakeCookOff requires CMake > 2.8")
+    endif()
+    cmake_policy(GET CMP0012 policy_twelve)
+    if(NOT ${policy_twelve} STREQUAL "NEW")
+        message(FATAL_ERROR "The GreatCMakeCookOff requires policy CMP0012 NEW")
+    endif()
     list(APPEND CMAKE_MODULE_PATH ${GREAT_CMAKE_COOKOFF_MODULE_DIR}
         ${GREAT_CMAKE_COOKOFF_SCRIPT_DIR})
 endmacro()


cmake: support Broadwell and newer GCC -march

* you can now select 'broadwell' as target and it will autodetect Intel
Model 61 as broadwell
* newer GCC versions use the Intel codenames for -march, so we prefer
that now in the cmake code, too

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -73,6 +73,8 @@
          # Any recent Intel CPU except NetBurst
          if(_cpu_model EQUAL 62)
             set(TARGET_ARCHITECTURE "ivy-bridge")
+         elseif(_cpu_model EQUAL 61)
+            set(TARGET_ARCHITECTURE "broadwell")
          elseif(_cpu_model EQUAL 60)
             set(TARGET_ARCHITECTURE "haswell")
          elseif(_cpu_model EQUAL 58)
@@ -144,7 +146,7 @@
 endmacro()

 macro(OptimizeForArchitecture)
-   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"haswell\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\", \"AMD 14h\", \"AMD 16h\".")
+   set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used.\nSetting the value to \"auto\" will try to optimize for the architecture where cmake is called.\nOther supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"haswell\", \"broadwell\", \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\", \"AMD 14h\", \"AMD 16h\".")
    set(_force)
    if(NOT _last_target_arch STREQUAL "${TARGET_ARCHITECTURE}")
       message(STATUS "target changed from \"${_last_target_arch}\" to \"${TARGET_ARCHITECTURE}\"")
@@ -190,12 +192,29 @@
       list(APPEND _march_flag_list "corei7")
       list(APPEND _march_flag_list "core2")
       list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4.1" "sse4.2")
+   elseif(TARGET_ARCHITECTURE STREQUAL "broadwell")
+      list(APPEND _march_flag_list "broadwell")
+      list(APPEND _march_flag_list "haswell")
+      list(APPEND _march_flag_list "core-avx2")
+      list(APPEND _march_flag_list "ivybridge")
+      list(APPEND _march_flag_list "core-avx-i")
+      list(APPEND _march_flag_list "sandybridge")
+      list(APPEND _march_flag_list "corei7-avx")
+      list(APPEND _march_flag_list "westmere")
+      list(APPEND _march_flag_list "nehalem")
+      list(APPEND _march_flag_list "core2")
+      list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4.1" "sse4.2" "avx" "avx2" "rdrnd" "f16c" "fma" "bmi" "bmi2")
    elseif(TARGET_ARCHITECTURE STREQUAL "haswell")
+      list(APPEND _march_flag_list "haswell")
       list(APPEND _march_flag_list "core-avx2")
+      list(APPEND _march_flag_list "ivybridge")
       list(APPEND _march_flag_list "core-avx-i")
+      list(APPEND _march_flag_list "sandybridge")
       list(APPEND _march_flag_list "corei7-avx")
-      list(APPEND _march_flag_list "core2")
-      list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4.1" "sse4.2" "avx" "avx2" "rdrnd" "f16c" "fma")
+      list(APPEND _march_flag_list "westmere")
+      list(APPEND _march_flag_list "nehalem")
+      list(APPEND _march_flag_list "core2")
+      list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "ssse3" "sse4.1" "sse4.2" "avx" "avx2" "rdrnd" "f16c" "fma" "bmi" "bmi2")
    elseif(TARGET_ARCHITECTURE STREQUAL "ivy-bridge")
       list(APPEND _march_flag_list "core-avx-i")
       list(APPEND _march_flag_list "corei7-avx")


SuperBuild: mantis-1192 take out unused itk dependencies

--- SuperBuild/CMake/External_itk.cmake
+++ SuperBuild/CMake/External_itk.cmake
@@ -101,14 +101,7 @@
   endforeach()

   # declare dependencies
-  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(ITK TIFF EXPAT PNG ZLIB FFTW)
-
-  ADD_SUPERBUILD_CMAKE_VAR(ITK TIFF_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(ITK TIFF_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(ITK EXPAT_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(ITK EXPAT_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(ITK PNG_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(ITK PNG_LIBRARY)
+  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(ITK ZLIB FFTW)
   ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_INCLUDE_DIR)
   ADD_SUPERBUILD_CMAKE_VAR(ITK ZLIB_LIBRARY)


Use gcc-ar and gcc-ranlib to support link time optimization with gcc >= 4.9.

--- linux/gcc.cmake
+++ linux/gcc.cmake
@@ -1,6 +1,8 @@
 # this one is important
 SET(CMAKE_SYSTEM_NAME Linux)

-SET(CMAKE_C_COMPILER "gcc")
-SET(CMAKE_CXX_COMPILER "g++")
+SET(CMAKE_C_COMPILER gcc)
+SET(CMAKE_CXX_COMPILER g++)
+SET(CMAKE_AR gcc-ar)
+SET(CMAKE_RANLIB gcc-ranlib)


add support for Orin GPU

add support for Orin GPU

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -243,12 +243,13 @@
       endif()
       if(NOT _nvcc_res EQUAL 0)
         message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
-        # TX1 (5.3) TX2 (6.2) Xavier (7.2) V100 (7.0)
+        # TX1 (5.3) TX2 (6.2) Xavier (7.2) V100 (7.0) Orin (8.7)
         ocv_filter_available_architecture(__cuda_arch_bin
             5.3
             6.2
             7.2
             7.0
+            8.7
         )
       else()
         set(__cuda_arch_bin "${_nvcc_out}")


[Build System: CMake] Add back the missing install_name_dir for the standard library.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1028,6 +1028,10 @@

   if(SWIFTLIB_SINGLE_SDK IN_LIST SWIFT_APPLE_PLATFORMS)
     set(install_name_dir "@rpath")
+
+    if(SWIFTLIB_SINGLE_IS_STDLIB)
+      set(install_name_dir "${SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR}")
+    endif()

     # Always use @rpath for XCTest
     if(module_name STREQUAL "XCTest")


Some work towards upgrading to Qt 5.6.1 LTS + Qt WebKit (#1015).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -993,8 +993,8 @@
     # test things both from within Qt Creator and without first having to deploy
     # OpenCOR

-    IF(   "${LIBRARY_NAME}" STREQUAL "QtWebKit"
-       OR "${LIBRARY_NAME}" STREQUAL "QtWebKitWidgets")
+    IF(   "${LIBRARY_NAME}" STREQUAL "Qt5WebKit"
+       OR "${LIBRARY_NAME}" STREQUAL "Qt5WebKitWidgets")
         SET(REAL_QT_LIBRARY_DIR ${QT_WEBKIT_BINARIES_DIR})
     ELSE()
         SET(REAL_QT_BINARY_DIR ${QT_BINARY_DIR})


python: install pandas and matplotlib in venv


iox-#142 remove u postfix

iox-#142 remove u postfix

Signed-off-by: Kraus Mathias (CC-AD/ESW1) <8e179faa490d2a9c134c46102c4361276a2b4d71@de.bosch.com>

--- iceoryx_posh/cmake/iceoryx_posh_deployment.cmake
+++ iceoryx_posh/cmake/iceoryx_posh_deployment.cmake
@@ -1,26 +1,26 @@
 # configure deployment
 if(NOT IOX_MAX_PORT_NUMBER)
-    set(IOX_MAX_PORT_NUMBER 1024u)
+    set(IOX_MAX_PORT_NUMBER 1024)
 endif()

 if(NOT IOX_MAX_INTERFACE_NUMBER)
-    set(IOX_MAX_INTERFACE_NUMBER 4u)
+    set(IOX_MAX_INTERFACE_NUMBER 4)
 endif()

 if(NOT IOX_MAX_SUBSCRIBERS_PER_PUBLISHER)
-    set(IOX_MAX_SUBSCRIBERS_PER_PUBLISHER 256u)
+    set(IOX_MAX_SUBSCRIBERS_PER_PUBLISHER 256)
 endif()

 if(NOT IOX_MAX_CHUNKS_ALLOCATE_PER_SENDER)
-    set(IOX_MAX_CHUNKS_ALLOCATE_PER_SENDER 8u)
+    set(IOX_MAX_CHUNKS_ALLOCATE_PER_SENDER 8)
 endif()

 if(NOT IOX_MAX_HISTORY_CAPACITY_OF_CHUNK_DISTRIBUTOR)
-    set(IOX_MAX_HISTORY_CAPACITY_OF_CHUNK_DISTRIBUTOR 16u)
+    set(IOX_MAX_HISTORY_CAPACITY_OF_CHUNK_DISTRIBUTOR 16)
 endif()

 if(NOT IOX_MAX_CHUNKS_HELD_PER_RECEIVER)
-    set(IOX_MAX_CHUNKS_HELD_PER_RECEIVER 256u)
+    set(IOX_MAX_CHUNKS_HELD_PER_RECEIVER 256)
 endif()

 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/iceoryx_posh_deployment.hpp.in"


cmake: In FindHoudiniEngine, output path to the lib directory

Output path to HoudiniEngine_LIBRARY_DIR.

--- cmake/Modules/FindHoudiniEngine.cmake
+++ cmake/Modules/FindHoudiniEngine.cmake
@@ -2,6 +2,7 @@
 #   HoudiniEngine_FOUND
 #   HoudiniEngine_INCLUDE_DIRS
 #   HoudiniEngine_LIBRARIES
+#   HoudiniEngine_LIBRARY_DIR
 #
 # Hints for finding package:
 #   HoudiniEngine_ROOT
@@ -74,6 +75,12 @@
     )
 list( APPEND _houdiniengine_required_vars HoudiniEngine_${_houdiniengine_lib} )
 list( APPEND HoudiniEngine_LIBRARIES ${HoudiniEngine_${_houdiniengine_lib}} )
+get_filename_component(
+    HoudiniEngine_LIBRARY_DIR
+    ${HoudiniEngine_${_houdiniengine_lib}}
+    DIRECTORY
+    )
+list( APPEND _houdiniengine_required_vars HoudiniEngine_LIBRARY_DIR )

 ########################################
 # Create library target


Disable MSVC 2015's warning about zero extending after ~ and others

Very often in LLVM we have APIs that take a bitwidth and a uint64_t that
we pass immediates such as ~0U to. Consider APInt, Constant, and
MachineInstrBuilder::addImm. Fixing all uses of these APIs to manually
extend their arguments to uint64_t doesn't seem worth it.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -328,6 +328,7 @@
         # C4592 is disabled because of false positives in Visual Studio 2015
         # Update 1. Re-evaluate the usefulness of this diagnostic with Update 2.
     -wd4592 # Suppress ''var': symbol will be dynamically initialized (implementation limitation)
+    -wd4319 # Suppress ''operator' : zero extending 'type' to 'type' of greater size'

 	# Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
 	# support the 'aligned' attribute in the way that clang sources requires (for
@@ -336,7 +337,7 @@
 	# When we switch to requiring a version of MSVC that supports the 'alignas'
 	# specifier (MSVC 2015?) this warning can be re-enabled.
     -wd4324 # Suppress 'structure was padded due to __declspec(align())'
-
+
     # Promoted warnings.
     -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.


Fix directory name

Fix directory name

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -814,8 +814,8 @@
                  DESTINATION ${CMAKE_INSTALL_BINDIR})
 endif()

-install(FILES ${CMAKE_BINARY_DIR}/include/RConfigOptions.h
-              ${CMAKE_BINARY_DIR}/include/compiledata.h
+install(FILES ${CMAKE_BINARY_DIR}/ginclude/RConfigOptions.h
+              ${CMAKE_BINARY_DIR}/ginclude/compiledata.h
               DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

 install(FILES ${CMAKE_BINARY_DIR}/etc/root.mimes


Allow customization of iOS deployment target by IOS_DEPLOYMENT_SDK_VERSION

--- os/iphone.cmake
+++ os/iphone.cmake
@@ -106,6 +106,19 @@
   )
 endif()

+string(COMPARE EQUAL "${IOS_DEPLOYMENT_SDK_VERSION}" "" _is_empty)
+if(_is_empty)
+  set(
+      CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET
+      "${IOS_SDK_VERSION}"
+  )
+else()
+  set(
+      CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET
+      "${IOS_DEPLOYMENT_SDK_VERSION}"
+  )
+endif()
+
 # Emulate OpenCV toolchain --
 set(IOS YES)
 # -- end


CMake: Boost include are one directory deeper under Win32

--- salome_adm/cmake_files/FindSalomeBoost.cmake
+++ salome_adm/cmake_files/FindSalomeBoost.cmake
@@ -28,7 +28,12 @@
 SET(Boost_USE_STATIC_RUNTIME     OFF)
 SET(Boost_NO_BOOST_CMAKE         ON)

-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 1)
+IF(WIN32)
+  # Under windows, one extra sub-directory in the boost installation hierarchy:
+  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
+ELSE()
+  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Boost Boost_INCLUDE_DIRS 2)
+ENDIF()
 IF(Boost_FOUND OR BOOST_FOUND)
    MESSAGE(STATUS "Boost include dirs is: ${Boost_INCLUDE_DIRS}")
 ENDIF()


ilastik-gui.cmake: Mac builds require py2app

--- ilastik-gui.cmake
+++ ilastik-gui.cmake
@@ -21,10 +21,18 @@
 include (qimage2ndarray)
 include (vtk)

+if (APPLE)
+    include (py2app)
+endif()
+
 set (ilastik-gui_NAME ${ilastik_NAME}-gui)

 # Add a few dependencies to GUI ilastik build
 add_dependencies( ${ilastik_NAME} ${qt4_NAME} ${pyqt4_NAME} ${qimage2ndarray_NAME} ${vtk_NAME} )
+
+if (APPLE)
+    add_dependencies( ${ilastik_NAME} ${py2app_NAME} )
+endif()

 add_custom_target (${ilastik-gui_NAME} ALL
     DEPENDS     ${ilastik_NAME}


SuperBuild: wrong md5sum for ossim

SuperBuild: wrong md5sum for ossim

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -48,7 +48,7 @@
   ExternalProject_Add(${proj}
     PREFIX ${proj}
     URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
-    URL_MD5 d41d8cd98f00b204e9800998ecf8427e
+    URL_MD5 f77d574ab2817bcc36633f77824facb5
     BINARY_DIR ${OSSIM_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
     DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


COMP: pass BOOST_ROOT to SuperElastixApplication in SuperBuild SuperElastix/SuperElastix#15

--- SuperBuild/ExternalApplications.cmake
+++ SuperBuild/ExternalApplications.cmake
@@ -28,6 +28,7 @@
     -DSuperElastix_DIR:PATH=${SuperElastix_DIR}
     -DITK_DIR:PATH=${ITK_DIR}
     -DELASTIX_USE_FILE:PATH=${ELASTIX_USE_FILE}
+	-DBOOST_ROOT:PATH=${BOOST_ROOT}
   DEPENDS ${SUPERELASTIX_DEPENDENCIES}
   INSTALL_COMMAND ""
 )


ENH: attempt to add branch name in Cdash build name

--- SuperBuild/CTestConfig.cmake
+++ SuperBuild/CTestConfig.cmake
@@ -9,6 +9,14 @@
 set(CTEST_PROJECT_NAME "SuperElastix")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

+execute_process (
+    COMMAND ${GIT_EXECUTABLE} name-rev --name-only HEAD
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    OUTPUT_VARIABLE SELX_BRANCH_NAME
+)
+
+set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}/${SELX_BRANCH_NAME}")
+
 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "my.cdash.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=SuperElastix")


OGRE_SAMPLES_LIST should have been updated in ogre_config_sample_lib, not ogre_config_sample_exe

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401689

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -290,12 +290,6 @@
   endif (CMAKE_COMPILER_IS_GNUCXX)
   ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)

-  # Add sample to the list of link targets
-  # Global property so that we can build this up across entire sample tree
-  # since vars are local to containing scope of directories / functions
-  get_property(OGRE_SAMPLES_LIST GLOBAL PROPERTY "OGRE_SAMPLES_LIST")
-  set_property (GLOBAL PROPERTY "OGRE_SAMPLES_LIST" ${OGRE_SAMPLES_LIST} ${SAMPLENAME})
-
 endfunction(ogre_config_sample_common)

 function(ogre_config_sample_exe SAMPLENAME)
@@ -326,6 +320,13 @@
 		  CONFIGURATIONS RelWithDebInfo
 		  )
   endif ()
+
+  # Add sample to the list of link targets
+  # Global property so that we can build this up across entire sample tree
+  # since vars are local to containing scope of directories / functions
+  get_property(OGRE_SAMPLES_LIST GLOBAL PROPERTY "OGRE_SAMPLES_LIST")
+  set_property (GLOBAL PROPERTY "OGRE_SAMPLES_LIST" ${OGRE_SAMPLES_LIST} ${SAMPLENAME})
+
 endfunction(ogre_config_sample_lib)


CMake export broke install directory structures; disabled for the moment.

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -48,33 +48,35 @@
 function(ogre_install_target TARGETNAME SUFFIX EXPORT)

 	if(EXPORT)
-	  install(TARGETS ${TARGETNAME}
-		EXPORT Ogre-exports
+	  install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
 		BUNDLE DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
 		RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
 		LIBRARY DESTINATION "lib${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
 		ARCHIVE DESTINATION "lib${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
 		FRAMEWORK DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
-
+      )
+	  install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
 		BUNDLE DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
 		RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
 		LIBRARY DESTINATION "lib${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
 		ARCHIVE DESTINATION "lib${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
 		FRAMEWORK DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
-
+      )
+	  install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
 		BUNDLE DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
 		RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
 		LIBRARY DESTINATION "lib${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
 		ARCHIVE DESTINATION "lib${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
 		FRAMEWORK DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
-
+      )
+	  install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
 		BUNDLE DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
 		RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
 		LIBRARY DESTINATION "lib${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
 		ARCHIVE DESTINATION "lib${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
 		FRAMEWORK DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
 	  )
-	  install(EXPORT Ogre-exports DESTINATION lib)
+	  #install(EXPORT Ogre-exports DESTINATION lib)
 	else()
 	  install(TARGETS ${TARGETNAME}
 		BUNDLE DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
@@ -82,19 +84,22 @@
 		LIBRARY DESTINATION "lib${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
 		ARCHIVE DESTINATION "lib${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
 		FRAMEWORK DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
-
+      )
+	  install(TARGETS ${TARGETNAME}
 		BUNDLE DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
 		RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
 		LIBRARY DESTINATION "lib${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
 		ARCHIVE DESTINATION "lib${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
 		FRAMEWORK DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
-
+      )
+	  install(TARGETS ${TARGETNAME}
 		BUNDLE DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
 		RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
 		LIBRARY DESTINATION "lib${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
 		ARCHIVE DESTINATION "lib${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
 		FRAMEWORK DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
-
+      )
+	  install(TARGETS ${TARGETNAME}
 		BUNDLE DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
 		RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
 		LIBRARY DESTINATION "lib${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug


archive: depends on zlib

archive: depends on zlib

--- cmake/qibuild/modules/archive-config.cmake
+++ cmake/qibuild/modules/archive-config.cmake
@@ -4,10 +4,6 @@
 fpath(ARCHIVE archive.h PATH_SUFFIXES archive)

 flib(ARCHIVE NAMES archive)
-
-if (APPLE)
-  set(ARCHIVE_DEPENDS "ZLIB")
-endif()
-
+set(ARCHIVE_DEPENDS "ZLIB")
 export_lib(ARCHIVE)


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

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -77,7 +77,7 @@

   file(
     GLOB_RECURSE THRIFT_TEMPLATE_FILES
-    FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/*.mustache"
+    FOLLOW_SYMLINKS "${FBTHRIFT_TEMPLATES_DIR}/cpp2/*.mustache"
   )

   # Emit the rule to run the thrift compiler
@@ -101,6 +101,7 @@
       "${THRIFT_FILE}"
     DEPENDS
       ${ARG_DEPENDS}
+      ${THRIFT_TEMPLATE_FILES}
   )

   # Now emit the library rule to compile the sources


BUG: Improve otbIncludeDirectories.cmake to add otbossimplugins/ossim/otb into the include directories path

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -45,6 +45,8 @@
   ${OTB_SOURCE_DIR}/Utilities/otbossim/include
   ${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim
   ${OTB_SOURCE_DIR}/Utilities/otbossimplugins
+# Add otbossimplugins/ossim/otb into the include directories path
+  ${OTB_SOURCE_DIR}/Utilities/otbossimplugins/ossim/otb
   ${OTB_SOURCE_DIR}/Utilities/dxflib
   ${OTB_SOURCE_DIR}/Utilities/InsightJournal
   ${OTB_SOURCE_DIR}/Utilities/otb6S


ARROW-10873: [C++] Apple Silicon is reported as arm64 in CMake

I'll add a CI entry soon that cross-compiles using `conda`, for now I keep submitting patches when things break for me.

Closes #8893 from xhochy/ARROW-10873

Authored-by: Uwe L. Korn <5f6f0a63dee51498bdd8036770b3bad30ce7a5ac@quantco.com>
Signed-off-by: Krisztián Szűcs <6bab32dc957a05a87930e779f272342e159326fa@gmail.com>

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -24,7 +24,7 @@
 message(STATUS "System processor: ${CMAKE_SYSTEM_PROCESSOR}")

 if(NOT DEFINED ARROW_CPU_FLAG)
-  if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64")
+  if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64|arm64")
     set(ARROW_CPU_FLAG "armv8")
   elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv7")
     set(ARROW_CPU_FLAG "armv7")


cmake: add_complex_library add EXPORT parameter

EXPORT is an optional parameter. If set the module is also
marked for export.

--- cmake/ComplexLibrary.cmake
+++ cmake/ComplexLibrary.cmake
@@ -67,7 +67,7 @@
 	set(PREFIX "COMPLEX_LIBRARY")

 	cmake_parse_arguments(${PREFIX}
-		""
+		"EXPORT"
 		"MODULE;TYPE;MONOLITHIC"
 		"SOURCES"
 		${ARGN})
@@ -76,6 +76,10 @@
 		add_library(${${PREFIX}_MODULE} ${${PREFIX}_TYPE} ${${PREFIX}_SOURCES})
 	else()
 		add_library(${${PREFIX}_MODULE} ${${PREFIX}_SOURCES})
+	endif()
+	if (${PREFIX}_EXPORT)
+		message("exporting ${${PREFIX}_MODULE}")
+		export_complex_library(LIBNAME ${${PREFIX}_MODULE})
 	endif()

 endmacro(add_complex_library)


specify a path to check for when finding librdkafka

--- cmake/FindLibRDKafka.cmake
+++ cmake/FindLibRDKafka.cmake
@@ -19,6 +19,7 @@

 find_path(LibRDKafka_ROOT_DIR
         NAMES include/librdkafka/rdkafkacpp.h
+        PATHS /usr/local
         )

 find_library(LibRDKafka_LIBRARIES
@@ -28,7 +29,7 @@

 find_library(LibRDKafka_C_LIBRARIES
         NAMES rdkafka
-        HINTS ${LibRDKafka_ROT_DIR}/lib
+        HINTS ${LibRDKafka_ROOT_DIR}/lib
         )

 find_path(LibRDKafka_INCLUDE_DIR


Add SET (CMAKE_VISIBILITY_INLINES_HIDDEN 1)

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -86,6 +86,7 @@
   SET (CMAKE_C_VISIBILITY_PRESET   hidden)
   SET (CMAKE_CXX_VISIBILITY_PRESET hidden)
   SET (CMAKE_POSITION_INDEPENDENT_CODE ON)
+  SET (CMAKE_VISIBILITY_INLINES_HIDDEN 1)
   if (("${CMAKE_C_COMPILER_ID} x" MATCHES "MSVC") OR MSVC)
     # Loosely based on http://www.hdfgroup.org/ftp/HDF/HDF_Current/src/unpacked/config/cmake/ConfigureChecks.cmake
     GET_DIRECTORY_PROPERTY (_DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)


[build] Disable LTO for mac. (#4027)

[build] Disable LTO for mac. (#4027)

--- cmake/TaichiCXXFlags.cmake
+++ cmake/TaichiCXXFlags.cmake
@@ -17,12 +17,11 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++")
 endif ()

+# Do not enable lto for APPLE since it made linking extremely slow.
 if (WIN32)
     if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=thin")
     endif()
-elseif(APPLE)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto=thin")
 endif()

 if (WIN32)


FIX: add eigen3 interface deps

FIX: add eigen3 interface deps

--- cmake/external/eigen.cmake
+++ cmake/external/eigen.cmake
@@ -5,7 +5,7 @@
 INCLUDE_DIRECTORIES(${EIGEN_SOURCE_DIR}/src/eigen3)

 ExternalProject_Add(
-    eigen3
+    extern_eigen3
     ${EXTERNAL_PROJECT_LOG_ARGS}
     # for latest version, please get from official website
     # URL            "https://bitbucket.org/eigen/eigen/get/3.3.4.tar.gz"
@@ -26,4 +26,7 @@
     TEST_COMMAND      ""
 )

-LIST(APPEND external_project_dependencies eigen3)
+ADD_LIBRARY(eigen3 INTERFACE)
+ADD_DEPENDENCIES(eigen3 extern_eigen3)
+
+LIST(APPEND external_project_dependencies extern_eigen3)


Fixed SYMBIFLOW_INSTALL_LIST and SYMBIFLOW_NO_INSTALL_LIST check bug

Signed-off-by: Maciej Kurc <572803cc6e8d7bb35033942e4b03254951a2e0d6@antmicro.com>

--- common/cmake/install.cmake
+++ common/cmake/install.cmake
@@ -78,8 +78,8 @@
   # ~~~

   set(options)
-  set(oneValueArgs ENTITY INSTALL_LIST NO_INSTALL_LIST VAR)
-  set(multiValueArgs)
+  set(oneValueArgs ENTITY VAR)
+  set(multiValueArgs INSTALL_LIST NO_INSTALL_LIST)
   cmake_parse_arguments(
     CHECK_INSTALL_LIST
     "${options}"


export generated defines directory so that the library can be used via add_subdirectory from another CMake-based project (#268)

--- Build.cmake
+++ Build.cmake
@@ -135,6 +135,6 @@
    TARGET_LINK_LIBRARIES(${G3LOG_LIBRARY} ${PLATFORM_LINK_LIBRIES})

    # Kjell: This is likely not necessary, except for Windows?
-   TARGET_INCLUDE_DIRECTORIES(${G3LOG_LIBRARY} PUBLIC ${LOG_SRC})
+   TARGET_INCLUDE_DIRECTORIES(${G3LOG_LIBRARY} PUBLIC ${LOG_SRC} "${CMAKE_CURRENT_BINARY_DIR}/include")


Support clap in cmake, always define HAVE_JACK

Signed-off-by: falkTX <d7e5958cbb080ba57e41fb602ade747e1a2da17c@falktx.com>

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -22,7 +22,7 @@
 # add_subdirectory(DPF)
 #
 # dpf_add_plugin(MyPlugin
-#   TARGETS lv2 vst2 vst3
+#   TARGETS clap lv2 vst2 vst3
 #   UI_TYPE opengl
 #   FILES_DSP
 #       src/MyPlugin.cpp
@@ -71,7 +71,7 @@
 #
 #   `TARGETS` <tgt1>...<tgtN>
 #       a list of one of more of the following target types:
-#       `jack`, `ladspa`, `dssi`, `lv2`, `vst2`, `vst3`
+#       `jack`, `ladspa`, `dssi`, `lv2`, `vst2`, `vst3`, `clap`
 #
 #   `UI_TYPE` <type>
 #       the user interface type: `opengl` (default), `cairo`
@@ -162,6 +162,8 @@
       dpf__build_vst2("${NAME}" "${_dgl_library}")
     elseif(_target STREQUAL "vst3")
       dpf__build_vst3("${NAME}" "${_dgl_library}")
+    elseif(_target STREQUAL "clap")
+      dpf__build_clap("${NAME}" "${_dgl_library}")
     else()
       message(FATAL_ERROR "Unrecognized target type for plugin: ${_target}")
     endif()
@@ -429,6 +431,39 @@
      "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents/Info.plist" @ONLY)
     file(COPY "${DPF_ROOT_DIR}/utils/plugin.bundle/Contents/PkgInfo"
      DESTINATION "${PROJECT_BINARY_DIR}/bin/${NAME}.vst3/Contents")
+  endif()
+endfunction()
+
+# dpf__build_clap
+# ------------------------------------------------------------------------------
+#
+# Add build rules for a VST2 plugin.
+#
+function(dpf__build_clap NAME DGL_LIBRARY)
+  dpf__create_dummy_source_list(_no_srcs)
+
+  dpf__add_module("${NAME}-clap" ${_no_srcs})
+  dpf__add_plugin_main("${NAME}-clap" "clap")
+  dpf__add_ui_main("${NAME}-clap" "clap" "${DGL_LIBRARY}")
+  dpf__set_module_export_list("${NAME}-clap" "clap")
+  target_link_libraries("${NAME}-clap" PRIVATE "${NAME}-dsp" "${NAME}-ui")
+  set_target_properties("${NAME}-clap" PROPERTIES
+    LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
+    ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/clap/$<0:>"
+    OUTPUT_NAME "${NAME}"
+    PREFIX ""
+    SUFFIX ".clap")
+
+  if(APPLE)
+    set_target_properties("${NAME}-clap" PROPERTIES
+      LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.clap/Contents/MacOS/$<0:>"
+      OUTPUT_NAME "${NAME}"
+      SUFFIX "")
+    set(INFO_PLIST_PROJECT_NAME "${NAME}")
+    configure_file("${DPF_ROOT_DIR}/utils/plugin.bundle/Contents/Info.plist"
+      "${PROJECT_BINARY_DIR}/bin/${NAME}.clap/Contents/Info.plist" @ONLY)
+    file(COPY "${DPF_ROOT_DIR}/utils/plugin.bundle/Contents/PkgInfo"
+      DESTINATION "${PROJECT_BINARY_DIR}/bin/${NAME}.clap/Contents")
   endif()
 endfunction()

@@ -690,6 +725,7 @@
     C_VISIBILITY_PRESET "hidden"
     CXX_VISIBILITY_PRESET "hidden"
     VISIBILITY_INLINES_HIDDEN TRUE)
+  target_compile_definitions("${NAME}" PUBLIC "HAVE_JACK")
   if(WIN32)
     target_compile_definitions("${NAME}" PUBLIC "NOMINMAX")
   endif()


PEP 3149

PEP 3149

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -52,6 +52,21 @@
     CACHE BOOL "Python install path")
 message(STATUS "Python install path: ${PYTHON_INSTALL_PATH}")

+if (NOT WIN32)
+    execute_process(
+        COMMAND ${PYTHON_BIN} -c "from distutils.sysconfig import get_config_var; print(get_config_var('SOABI'))"
+        OUTPUT_VARIABLE PYTHON_EXTENSION_SOABI_tmp
+        )
+    string(STRIP ${PYTHON_EXTENSION_SOABI_tmp} PYTHON_EXTENSION_SOABI_tmp)
+    if (NOT "${PYTHON_EXTENSION_SOABI_tmp}" STREQUAL "None")
+        set(PYTHON_EXTENSION_SOABI_tmp ".${PYTHON_EXTENSION_SOABI_tmp}")
+    else()
+        set(PYTHON_EXTENSION_SOABI_tmp "")
+    endif()
+endif()
+set(PYTHON_EXTENSION_SOABI ${PYTHON_EXTENSION_SOABI_tmp}
+    CACHE STRING "Suffix for python extensions")
+
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PYTHON DEFAULT_MSG PYTHON_LIBRARY PYTHON_INCLUDE_PATH PYTHON_INSTALL_PATH)

@@ -99,6 +114,7 @@
         add_library(${name} SHARED ${ARGN})
     ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set_target_properties(${name} PROPERTIES PREFIX "")
+    set_target_properties(${name} PROPERTIES OUTPUT_NAME "${name}${PYTHON_EXTENSION_SOABI}")
     target_link_libraries(${name} ${PYTHON_LIBRARY})
     IF(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
         set_target_properties(${name} PROPERTIES SUFFIX ".pyd")


remove redundant clean targets

remove redundant clean targets

--- cmake/LLVMIRUtil.cmake
+++ cmake/LLVMIRUtil.cmake
@@ -13,7 +13,7 @@

 set(LLVM_IR_UTIL_VERSION_MAJOR "2")
 set(LLVM_IR_UTIL_VERSION_MINOR "4")
-set(LLVM_IR_UTIL_VERSION_PATCH "0")
+set(LLVM_IR_UTIL_VERSION_PATCH "1")

 string(CONCAT LLVM_IR_UTIL_VERSION
   ${LLVM_IR_UTIL_VERSION_MAJOR} "."
@@ -139,9 +139,6 @@
   endforeach()

   ## postamble
-  # clean up
-  set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-    ${FULL_OUT_LLVMIR_FILES})

   # setup custom target
   add_custom_target(${TRGT} DEPENDS ${FULL_OUT_LLVMIR_FILES})
@@ -221,9 +218,6 @@
   endforeach()

   ## postamble
-  # clean up
-  set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-    ${FULL_OUT_LLVMIR_FILES})

   # setup custom target
   add_custom_target(${TRGT} DEPENDS ${FULL_OUT_LLVMIR_FILES})
@@ -300,10 +294,6 @@

   ## postamble

-  # clean up
-  set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-    ${FULL_OUT_LLVMIR_FILES})
-
   # setup custom target
   add_custom_target(${TRGT} DEPENDS ${FULL_OUT_LLVMIR_FILES})

@@ -379,10 +369,6 @@

   ## postamble

-  # clean up
-  set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-    ${FULL_OUT_LLVMIR_FILES})
-
   # setup custom target
   add_custom_target(${TRGT} DEPENDS ${FULL_OUT_LLVMIR_FILES})

@@ -467,9 +453,6 @@
     VERBATIM)

   ## postamble
-  # clean up
-  set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
-    ${FULL_OUT_LLVMIR_FILES})
 endfunction()


cmake: Introduce zephyr_check_compiler_flag()

zephyr_check_compiler_flag is introduced to resolve
https://github.com/zephyrproject-rtos/zephyr/issues/5633

The time spent when invoking CMake is halved with a warm cache.

See the API documentation for details.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -10,6 +10,7 @@
 # 1.2.1 zephyr_interface_library_*
 # 1.3. generate_inc_*
 # 1.4. board_*
+# 1.5. Misc.
 # 2. Kconfig-aware extensions
 # 2.1 *_if_kconfig
 # 2.2 Misc
@@ -583,6 +584,69 @@
     # Arguments explicitly given with board_runner_args() come
     # last, so they take precedence.
     ${explicit}
+    )
+endfunction()
+
+# 1.5. Misc.
+
+# zephyr_check_compiler_flag is a part of Zephyr's toolchain
+# infrastructure. It should be used when testing toolchain
+# capabilities and it should normally be used in place of the
+# functions:
+#
+# check_compiler_flag
+# check_c_compiler_flag
+# check_cxx_compiler_flag
+#
+# See check_compiler_flag() for API documentation as it has the same
+# API.
+#
+# It is implemented as a wrapper on top of check_compiler_flag, which
+# again wraps the CMake-builtin's check_c_compiler_flag and
+# check_cxx_compiler_flag.
+#
+# It takes time to check for compatibility of flags against toolchains
+# so we cache the capability test results in USER_CACHE_DIR (This
+# caching comes in addition to the caching that CMake does in the
+# build folder's CMakeCache.txt)
+function(zephyr_check_compiler_flag lang option check)
+  # Locate the cache
+  set_ifndef(
+    ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE
+    ${USER_CACHE_DIR}/ToolchainCapabilityDatabase.cmake
+    )
+
+  # Read the cache
+  include(${ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE} OPTIONAL)
+
+  # We need to create a unique key wrt. testing the toolchain
+  # capability. This key must be a valid C identifier that includes
+  # everything that can affect the toolchain test.
+  set(key_string "")
+  set(key_string "${key_string}ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_")
+  set(key_string "${key_string}${TOOLCHAIN_SIGNATURE}_")
+  set(key_string "${key_string}${lang}_")
+  set(key_string "${key_string}${option}_")
+  set(key_string "${key_string}${CMAKE_REQUIRED_FLAGS}_")
+
+  string(MAKE_C_IDENTIFIER ${key_string} key)
+
+  # Check the cache
+  if(DEFINED ${key})
+    set(${check} ${${key}} PARENT_SCOPE)
+    return()
+  endif()
+
+  # Test the flag
+  check_compiler_flag(${lang} "${option}" inner_check)
+
+  set(${check} ${inner_check} PARENT_SCOPE)
+
+  # Populate the cache
+  file(
+    APPEND
+    ${ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE}
+    "set(${key} ${inner_check})\n"
     )
 endfunction()


Exported config needs threads too

Exported config needs threads too

--- cmake/s2n-config.cmake
+++ cmake/s2n-config.cmake
@@ -1,5 +1,7 @@
 include(CMakeFindDependencyMacro)

 find_dependency(LibCrypto)
+set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_package(Threads REQUIRED)

 include(${CMAKE_CURRENT_LIST_DIR}/@CMAKE_PROJECT_NAME@-targets.cmake)


Add /std:c++17 for appveyor

Add /std:c++17 for appveyor

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -11,7 +11,7 @@

 if (MSVC)
   list(APPEND SPAGHETTI_FLAGS /MP)
-  list(APPEND SPAGHETTI_FLAGS_CXX /EHsc)
+  list(APPEND SPAGHETTI_FLAGS_CXX /EHsc /std:c++17)

   list(APPEND SPAGHETTI_DEFINITIONS UNICODE _UNICODE _CRT_SECURE_NO_WARNINGS NOMINMAX)
   list(APPEND SPAGHETTI_DEFINITIONS _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING)


Fix XCode version check.

Fix XCode version check.

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -1,23 +1,20 @@
+
+#message(STATUS "XCODE VERSION :: ${XCODE_VERSION}")

 # Check compiler and version
-if ("${XCODE_VERSION}")
-	# check regex, it's just a quick-hack for now but should work if the
-	# version string format returned by ${XCODE_VERSION} does not change.
-	# required format is <MAJOR>.<MINOR>.<PATCH>
-	string(REGEX REPLACE "^([0-9]+).*" "\\1" XCODE_MAJOR "${XCODE_VERSION}")
-	string(LENGTH ${XCODE_MAJOR} XCODE_MAJOR_LENGTH)
-	string(REGEX MATCH "[0-4]" XCODE_MAJOR_TO_OLD ${XCODE_MAJOR})
+if ("${XCODE_VERSION}" VERSION_LESS "5")

-	# Reject XCode < Version 5
-	if (NOT (${XCODE_MAJOR_LENGTH} EQUAL 1 AND "${XCODE_MAJOR_TO_OLD}" GREATER ""))
-	    message(STATUS "Configuring for platform MacOS with XCode Version 5+.")
-	else ()
-	    message(FATAL_ERROR "Insufficient XCode Version (upgrade to XCode 5.x or higher)!")
-	endif()
+    if ("${XCODE_VERSION}" VERSION_GREATER "0")
+	message(FATAL_ERROR "Insufficient XCode Version (upgrade to XCode 5.x or higher)!")
+    else ()
+	message (STATUS "Configuring for platform MacOS without XCode, using plain make.")
+    endif ()
+
 else ()
-    message (STATUS "Configuring for platform MacOS without XCode, using plain make.")
+
+	message(STATUS "Configuring for platform MacOS with XCode Version 5+.")
+
 endif()
-

 # removed according to http://comments.gmane.org/gmane.editors.lyx.cvs/38306
 #set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")


test.cmake: add qi_create_test_helper()

test.cmake: add qi_create_test_helper()

Change-Id: I69ef4a08997175be71357f4b8228fcd960618f67

--- cmake/qibuild/tests.cmake
+++ cmake/qibuild/tests.cmake
@@ -102,3 +102,17 @@
 function(qi_add_test test_name target_name)
   _qi_add_test(${test_name} ${target_name} ${ARGN})
 endfunction()
+
+#! Add a test helper
+# Creat a binary that will not be run as a test, but rather used
+# by an other test.
+# The binary will be deployed along with the actual tests.
+function(qi_create_test_helper name)
+  qi_create_bin(${name} NO_INSTALL ${ARGN})
+  if(TARGET ${name})
+    install(TARGETS ${name}
+            DESTINATION "bin"
+            COMPONENT "test")
+    set_target_properties(${name} PROPERTIES FOLDER tests)
+  endif()
+endfunction()


Test to bring in dependencies via CMake ExternalProject. Testing for libcryptopp only

--- cmake/EthDependenciesDeprecated.cmake
+++ cmake/EthDependenciesDeprecated.cmake
@@ -1,6 +1,19 @@
 # search for and configure dependencies

 # deprecated. TODO will rewrite to proper CMake packages
+
+
+include(ExternalProject)
+
+ExternalProject_Add(project_cryptopp
+  URL http://www.cryptopp.com/cryptopp562.zip
+  BINARY_DIR project_cryptopp-prefix/src/project_cryptopp
+  CONFIGURE_COMMAND ""
+  BUILD_COMMAND make -j 3
+  INSTALL_COMMAND ""
+)
+
+

@@ -11,24 +24,9 @@
 	set(CRYPTOPP_ID /usr/x86_64-w64-mingw32/include/cryptopp)
 else()
 	# Look for available Crypto++ version and if it is >= 5.6.2
-	find_path(ID cryptlib.h
-		../cryptopp/src
-		../../cryptopp/src
-		/usr/include/cryptopp
-		/usr/include/crypto++
-		/usr/local/include/cryptopp
-		/usr/local/include/crypto++
-		/opt/local/include/cryptopp
-		/opt/local/include/crypto++
-		)
-	find_library(LS NAMES cryptoppeth cryptopp
-		../cryptopp/src/../target/build/release
-		../../cryptopp/src/../target/build/release
-		PATHS
-		/usr/lib
-		/usr/local/lib
-		/opt/local/lib
-		)
+
+	set(CRYPTOPP_ID ${CMAKE_CURRENT_BINARY_DIR}/project_cryptopp-prefix/src/project_cryptopp)
+	set(CRYPTOPP_LS cryptopp)

 	if (ID AND LS)
 		message(STATUS "Found Crypto++: ${ID}, ${LS}")
@@ -180,9 +178,8 @@
 	set(QTQML 1)
 endif()

-if(CRYPTOPP_ID)
-	include_directories(${CRYPTOPP_ID})
-endif()
+include_directories(${CRYPTOPP_ID})
+
 if(PYTHON_ID)
 	include_directories(${PYTHON_ID})
 endif()


pcre2 build

pcre2 build

--- cmake/MyPackageCheckCommonSizes.cmake
+++ cmake/MyPackageCheckCommonSizes.cmake
@@ -14,8 +14,9 @@
   #
   FOREACH (_sign "" "u")
     FOREACH (_size 8 16 32 64)
-      SET (_MYTYPE    MYPACKAGE_${_sign}INT${_size})
-      SET (_MYTYPEDEF MYPACKAGE_${_sign}INT${_size}_TYPEDEF)
+      SET (_mytype    MYPACKAGE_${_sign}int${_size})
+      STRING (TOUPPER ${_mytype} _MYTYPE)
+      SET (_MYTYPEDEF ${_MYTYPE}_TYPEDEF)

       SET (HAVE_${_MYTYPE} FALSE)
       SET (${_MYTYPE} "")


Add extra guard fo BOOST setup

Add extra guard fo BOOST setup

--- cmake/configure/configure_boost.cmake
+++ cmake/configure/configure_boost.cmake
@@ -16,6 +16,16 @@
 #
 # Configuration for the boost library:
 #
+
+IF(NOT FEATURE_ZLIB_PROCESSED)
+  MESSAGE(FATAL_ERROR "\n"
+    "Internal build system error: The configuration of "
+    "DEAL_II_WITH_BOOST depends on "
+    "DEAL_II_WITH_ZLIB, but CONFIGURE_FEATURE(BOOST) "
+    "was called before CONFIGURE_FEATURE(ZLIB).\n\n"
+    )
+ENDIF()
+

 SET(DEAL_II_WITH_BOOST ON # Always true. We need it :-]
   CACHE BOOL "Build deal.II with support for boost." FORCE


Fix ist -> list typo

Fix ist -> list typo

Help with builds

--- cmake/modules/AddSwiftUnittests.cmake
+++ cmake/modules/AddSwiftUnittests.cmake
@@ -29,7 +29,7 @@
     set(new_libnames)
     foreach(dep ${libnames})
       if("${dep}" MATCHES "^(LLVM|Clang|gtest)" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
-        ist(APPEND new_libnames "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
+        list(APPEND new_libnames "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
       else()
         list(APPEND new_libnames "${dep}")
       endif()


[CMake] Don't pass in MSVC warning flags as definitions.

NFC currently but required as a prerequisite for using
the Microsoft resource compiler in conjunction with
CMake's ninja generator, which knows how to filter flags
appropriately, but not definitions.

Differential Revision: http://reviews.llvm.org/D8188

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -253,7 +253,9 @@
     -D_CRT_NONSTDC_NO_WARNINGS
     -D_SCL_SECURE_NO_DEPRECATE
     -D_SCL_SECURE_NO_WARNINGS
-
+    )
+
+  set(msvc_warning_flags
     # Disabled warnings.
     -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
     -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
@@ -282,14 +284,19 @@

   # Enable warnings
   if (LLVM_ENABLE_WARNINGS)
-    add_llvm_definitions( /W4 )
+    append("/W4" msvc_warning_flags)
     if (LLVM_ENABLE_PEDANTIC)
       # No MSVC equivalent available
     endif (LLVM_ENABLE_PEDANTIC)
   endif (LLVM_ENABLE_WARNINGS)
   if (LLVM_ENABLE_WERROR)
-    add_llvm_definitions( /WX )
+    append("/WX" msvc_warning_flags)
   endif (LLVM_ENABLE_WERROR)
+
+  foreach(flag ${msvc_warning_flags})
+    append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endforeach(flag)
+
 elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
   if (LLVM_ENABLE_WARNINGS)
     append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)


Fix for ROOT-6893 - Davix not enabled by default after building it with the davix option

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -206,6 +206,11 @@
 set(davixlibdir ${DAVIX_LIBRARY_DIR})
 set(davixlib ${DAVIX_LIBRARY})
 set(davixincdir ${DAVIX_INCLUDE_DIR})
+if(davix)
+  set(useoldwebfile no)
+else()
+  set(useoldwebfile yes)
+endif()

 set(buildnetxng ${value${netxng}})
 if(netxng)


cmake: Added -Wnon-virtual-dtor to compiler warnings.

--- cmake/modules/TelepathyDefaults.cmake
+++ cmake/modules/TelepathyDefaults.cmake
@@ -48,7 +48,8 @@
         sign-compare
         pointer-arith
         format-security
-        init-self)
+        init-self
+        non-virtual-dtor)
     set(undesired
         missing-field-initializers
         unused-parameter)


CI: take into account the build result to launch tests

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -146,6 +146,8 @@

 if ( NOT _build_rv EQUAL 0 )
   message( SEND_ERROR "An error occurs during ctest_build.")
+  #don't execute tests as the build failed
+  set(ci_skip_testing 1)
 endif()

 # ----------------------------- Test -------------------------------------------


openblas.cmake: Set NO_AFFINITY=1 Makefile variable. (Otherwise, on linux, importing numpy restricts the entire python process to 1 CPU Core!)

--- openblas.cmake
+++ openblas.cmake
@@ -22,7 +22,7 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ""
-    BUILD_COMMAND       make -j8 NO_AVX=1
+    BUILD_COMMAND       make NO_AVX=1 NO_AFFINITY=1 -j8
     BUILD_IN_SOURCE     1
     INSTALL_COMMAND     make PREFIX=${BUILDEM_DIR} install &&
                         ln -fs libopenblas.so ${BUILDEM_DIR}/lib/libblas.so &&