Increase win32 executable stack size to 32MB

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -44,7 +44,7 @@
 	# warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification
 	# warning LNK4099: pdb was not found with lib
 	# stack size 16MB
-	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:16777216")
+	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099,4075 /STACK:33554432")

 	# windows likes static
 	if (NOT ETH_STATIC)


Update Clang CMake cache to use cxx-headers, NFC

Apparently libcxx-headers is going away.  Fixes PR35584.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@320271 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -61,7 +61,7 @@
   LTO
   clang-format
   clang-headers
-  libcxx-headers
+  cxx-headers
   ${LLVM_TOOLCHAIN_TOOLS}
   CACHE STRING "")


move Packaging.cmake

move Packaging.cmake

--- cmake/packaging/Packaging.cmake
+++ cmake/packaging/Packaging.cmake
@@ -1,20 +1,48 @@
 include (InstallRequiredSystemLibraries)

-set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
-set(CPACK_GENERATOR "DEB")
+set(CPACK_PACKAGE_NAME ${PROJECT_NAME} CACHE STRING "Name of the package for medInria superproject")
+set(CPACK_GENERATOR "DEB" CACHE STRING "Type of package to build")

 if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
   #GET distribution id
   execute_process(COMMAND lsb_release -irs
     COMMAND sed "s/ //"
     COMMAND sed "s/Fedora/fc/"
-    COMMAND tr -d '\n' # In Ubuntu the string is Ubuntu\n10.04\n
+    COMMAND tr -d '\n'
     OUTPUT_VARIABLE DISTRIB
     OUTPUT_STRIP_TRAILING_WHITESPACE)
   execute_process(COMMAND arch
     OUTPUT_VARIABLE ARCH
     OUTPUT_STRIP_TRAILING_WHITESPACE)
   set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-${DISTRIB}-${ARCH}")
+
+  set (CPACK_PACKAGING_INSTALL_PREFIX /usr/local/medInria CACHE STRING "Prefix where the package be install on linux plateformes")
+  #Write a postinst and prerm script for Linux
+  set( INSTALL_LIBS_DIRECTORIES_STRING "\"${CPACK_PACKAGING_INSTALL_PREFIX}/lib\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/InsightToolkit\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/vtk-5.8\"" )
+
+  set(POSTINST_SCRIPT ${CMAKE_BINARY_DIR}/linux/postinst)
+  file(WRITE ${POSTINST_SCRIPT} "\#!/bin/sh\n" )
+  file(APPEND ${POSTINST_SCRIPT} "set -e\n")
+  file(APPEND ${POSTINST_SCRIPT} "echo ${INSTALL_LIBS_DIRECTORIES_STRING}>/etc/ld.so.conf.d/medInria.conf\n")
+  file(APPEND ${POSTINST_SCRIPT} "ldconfig\n")
+  file(APPEND ${POSTINST_SCRIPT} "ln -s ${CPACK_PACKAGING_INSTALL_PREFIX}/share/applications/medInria.desktop /usr/share/applications/medInria.desktop\n")
+  file(APPEND ${POSTINST_SCRIPT} "ln -s ${CPACK_PACKAGING_INSTALL_PREFIX}/bin/medInria /usr/bin/medInria\n")
+
+  set(PRERM_SCRIPT ${CMAKE_BINARY_DIR}/linux/prerm)
+  file(WRITE ${PRERM_SCRIPT} "\#!/bin/sh\n" )
+  file(APPEND ${PRERM_SCRIPT} "set -e\n")
+  file(APPEND ${PRERM_SCRIPT} "[ -h /usr/share/applications/medInria.desktop ] && rm -f /usr/share/applications/medInria.desktop\n")
+  file(APPEND ${PRERM_SCRIPT} "[ -h /usr/bin/medInria ]  && rm -f /usr/bin/medInria\n")
+  file(APPEND ${PRERM_SCRIPT} "rm -f /etc/ld.so.conf.d/medInria.conf\n")
+
+  set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${POSTINST_SCRIPT};${PRERM_SCRIPT}")
+  set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE ${POSTINST_SCRIPT})
+  set(CPACK_RPM_PRE_UNINSTALL_SCRIPT_FILE ${POSTINST_SCRIPT})
+
+
+set(CPACK_DEBIAN_PACKAGE_DEPENDS "libopenmpi1.3, libqt4-sql-sqlite, libxml++1.0c2a, libboost-all-dev, nvidia-settings")
+set(CPACK_RPM_PACKAGE_REQUIRES "libopenmpi1.3, libqt4-sql-sqlite, libxml++1.0c2a, libboost-all-dev, nvidia-settings")
+
 else("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
   set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
 endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
@@ -25,12 +53,16 @@
 set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_NAME})

 set(CPACK_PACKAGE_VENDOR "http://www.inria.fr/")
-set(CPACK_PACKAGE_CONTACT "Benoît Bleuzé <Benoit.Bleuze@inria.fr>")
-set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.txt)
+set(CPACK_PACKAGE_CONTACT "medInria Team <medinria-userfeedback@inria.fr>")
+
 set(CPACK_PACKAGE_VERSION_MAJOR ${${PROJECT_NAME}_VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${${PROJECT_NAME}_VERSION_MINOR})
-set(CPACK_PACKAGE_VERSION_PATCH ${${PROJECT_NAME}_VERSION_BUILD})
-set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/COPYING.txt)
+set(CPACK_PACKAGE_VERSION_PATCH ${${PROJECT_NAME}_VERSION_PATCH})
+
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/cmake/packaging/Description.txt")
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/cmake/packaging/License.txt")
+set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/cmake/packaging/Readme.txt")
+set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/cmake/packaging/Welcome.txt")

 set(CPACK_BINARY_STGZ OFF)
 set(CPACK_BINARY_TBZ2 OFF)
@@ -91,24 +123,6 @@
     MAKE_NSIS_INSTALLER( nsis  ${PROJECT_SOURCE_DIR}/installerMedinria.nsi  ${${PROJECT_NAME}_VERSION})
 ENDIF(WIN32)

-#Write a postinst and prerm script for Debian
-set( INSTALL_LIBS_DIRECTORIES_STRING "\"${CMAKE_INSTALL_PREFIX}/lib\\n${CMAKE_INSTALL_PREFIX}/lib/InsightToolkit\\n${CMAKE_INSTALL_PREFIX}/lib/vtk-5.8\"" )
-file(WRITE ${CMAKE_BINARY_DIR}/debian/postinst "\#!/bin/sh\n" )
-file(APPEND ${CMAKE_BINARY_DIR}/debian/postinst "set -e\n")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/postinst "echo ${INSTALL_LIBS_DIRECTORIES_STRING}>/etc/ld.so.conf.d/medInria.conf\n")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/postinst "ldconfig\n")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/postinst "ln -s ${CMAKE_INSTALL_PREFIX}/share/applications/medInria.desktop /usr/share/applications/medInria.desktop\n")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/postinst "ln -s ${CMAKE_INSTALL_PREFIX}/bin/medInria /usr/bin/medInria\n")
-
-file(WRITE ${CMAKE_BINARY_DIR}/debian/prerm "\#!/bin/sh\n" )
-file(APPEND ${CMAKE_BINARY_DIR}/debian/prerm "set -e\n")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/prerm "[ -h /usr/share/applications/medInria.desktop ] && rm -f /usr/share/applications/medInria.desktop\n")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/prerm "[ -h /usr/bin/medInria ]  && rm -f /usr/bin/medInria")
-file(APPEND ${CMAKE_BINARY_DIR}/debian/prerm "rm -f /etc/ld.so.conf.d/medInria.conf")
-
-set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/debian/postinst")
-
-set (CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
 foreach(package ${packages})
     if(NOT USE_SYSTEM_${package})
         ExternalProject_Get_Property(${package} binary_dir)


IMP-594: Impala binaries are embedding build-time locations of libraries

--- cmake_modules/FindPICLibs.cmake
+++ cmake_modules/FindPICLibs.cmake
@@ -3,6 +3,7 @@
 # these libraries in the environment, or dynamic linking will be used instead.

 IF (DEFINED ENV{PIC_LIB_PATH})
+    set(CMAKE_SKIP_RPATH TRUE)
     set(Boost_USE_STATIC_LIBS ON)
     set(Boost_USE_STATIC_RUNTIME ON)
     set(LIBBZ2 $ENV{PIC_LIB_PATH}/lib/libbz2.a)


fix if Zorba is built with a different store (name of the tests contained a suffix that doesn't exist anymore) Approved: Chris Hillery

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -544,13 +544,7 @@
     set (willfail 1)
   endif (willfail)

-  # simplestore executable doesn't need an extension
-  SET(SUFFIX)
-  IF (NOT ${ZORBA_STORE_NAME} STREQUAL "simplestore")
-    SET(SUFFIX "_${ZORBA_STORE_NAME}")
-  ENDIF (NOT ${ZORBA_STORE_NAME} STREQUAL "simplestore")
-
-  set_tests_properties ("${testname}${SUFFIX}"
+  set_tests_properties ("${testname}"
     PROPERTIES WILL_FAIL ${willfail})

   # Also store the name and bug ID of this test in our output file


Lighter build for otb

Lighter build for otb

--- CI/configure_option.cmake
+++ CI/configure_option.cmake
@@ -27,9 +27,9 @@

 set (otb_build_project_option
 "BUILD_COOKBOOK:BOOL=OFF
-BUILD_EXAMPLES:BOOL=ON
+BUILD_EXAMPLES:BOOL=OFF
 BUILD_SHARED_LIBS:BOOL=ON
-BUILD_TESTING:BOOL=ON")
+BUILD_TESTING:BOOL=OFF")

 set (otb_use_option
 "OTB_USE_6S:BOOL=ON


Support compilers that are unknown to CMake

Abseil failed to configure with `ABSL_PROPAGATE_CXX_STD` if the compiler was not known to CMake:

    target_compile_features no known features for CXX compiler

Turns the error into a warning by checking `CMAKE_CXX_COMPILE_FEATURES`
before calling `target_compile_features`.

PiperOrigin-RevId: 469254470
Change-Id: Ifba006dcdbf6a7112e382075b24678a792dbc827

--- CMake/AbseilHelpers.cmake
+++ CMake/AbseilHelpers.cmake
@@ -31,6 +31,14 @@
 else()
   set(ABSL_INTERNAL_INCLUDE_WARNING_GUARD "")
 endif()
+
+function(_target_compile_features_if_available TARGET TYPE FEATURE)
+  if(FEATURE IN_LIST CMAKE_CXX_COMPILE_FEATURES)
+    target_compile_features(${TARGET} ${TYPE} ${FEATURE})
+  else()
+    message(WARNING "Feature ${FEATURE} is unknown for the CXX compiler")
+  endif()
+endfunction()

 # absl_cc_library()
 #
@@ -270,7 +278,7 @@
       # Abseil libraries require C++14 as the current minimum standard.
       # Top-level application CMake projects should ensure a consistent C++
       # standard for all compiled sources by setting CMAKE_CXX_STANDARD.
-      target_compile_features(${_NAME} PUBLIC cxx_std_14)
+      _target_compile_features_if_available(${_NAME} PUBLIC cxx_std_14)
     else()
       # Note: This is legacy (before CMake 3.8) behavior. Setting the
       # target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is
@@ -318,7 +326,7 @@
       # Abseil libraries require C++14 as the current minimum standard.
       # Top-level application CMake projects should ensure a consistent C++
       # standard for all compiled sources by setting CMAKE_CXX_STANDARD.
-      target_compile_features(${_NAME} INTERFACE cxx_std_14)
+      _target_compile_features_if_available(${_NAME} INTERFACE cxx_std_14)

       # (INTERFACE libraries can't have the CXX_STANDARD property set, so there
       # is no legacy behavior else case).
@@ -430,7 +438,7 @@
     # Abseil libraries require C++14 as the current minimum standard.
     # Top-level application CMake projects should ensure a consistent C++
     # standard for all compiled sources by setting CMAKE_CXX_STANDARD.
-    target_compile_features(${_NAME} PUBLIC cxx_std_14)
+    _target_compile_features_if_available(${_NAME} PUBLIC cxx_std_14)
   else()
     # Note: This is legacy (before CMake 3.8) behavior. Setting the
     # target-level CXX_STANDARD property to ABSL_CXX_STANDARD (which is


Improve codegeneration log, specially when there are failures

Change-Id: I05d9c6c3e43ee6c1daf9c9e1b61be6cc5a82b31d

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -20,6 +20,47 @@
 include (CMakeParseArguments)

 set (PROCESSED_PREFIX "Processed file:\t")
+
+function (execute_code_generator)
+  set (OPTION_PARAMS
+  )
+
+  set (ONE_VALUE_PARAMS
+    OUTPUT_VARIABLE
+  )
+
+  set (MULTI_VALUE_PARAMS
+    EXEC_PARAMS
+  )
+
+  set (REQUIRED_PARAMS
+    EXEC_PARAMS
+  )
+
+  cmake_parse_arguments("PARAM" "${OPTION_PARAMS}" "${ONE_VALUE_PARAMS}" "${MULTI_VALUE_PARAMS}" ${ARGN})
+
+  foreach (REQUIRED_PARAM ${REQUIRED_PARAMS})
+    if (NOT DEFINED PARAM_${REQUIRED_PARAM})
+      message (FATAL_ERROR "Required param ${REQUIRED_PARAM} is not set")
+    endif()
+  endforeach()
+
+  execute_process(
+    COMMAND ${KurentoModuleCreator_EXECUTABLE} ${PARAM_EXEC_PARAMS}
+    OUTPUT_VARIABLE PROCESSOR_OUTPUT
+    ERROR_VARIABLE PROCESSOR_ERROR
+    RESULT_VARIABLE PROCESSOR_RET
+  )
+
+  if (PROCESSOR_RET)
+    message ("Error calling code generator: " ${PROCESSOR_OUTPUT} )
+    message (FATAL_ERROR "Output error: " ${PROCESSOR_ERROR})
+  endif ()
+
+  if (DEFINED PARAM_OUTPUT_VARIABLE)
+    set (${PARAM_OUTPUT_VARIABLE} ${PROCESSOR_OUTPUT} PARENT_SCOPE)
+  endif()
+endfunction()

 # generate_sources (
 #  MODELS list of models or directories
@@ -90,10 +131,9 @@
     message (FATAL_ERROR "No model files found")
   endif ()

-  message (STATUS "Running code generator")
-  execute_process(
-    COMMAND ${KurentoModuleCreator_EXECUTABLE} ${COMMAND_LINE}
+  execute_code_generator (
     OUTPUT_VARIABLE PROCESSOR_OUTPUT
+    EXEC_PARAMS ${COMMAND_LINE}
   )

   if ("${PROCESSOR_OUTPUT}" STREQUAL "")
@@ -108,12 +148,14 @@
       string(REGEX REPLACE "\t.*" "" _FILE ${_FILE})
       if (${_FILE} MATCHES ".*cpp")
         list (APPEND GENERATED_SOURCE_FILES ${PARAM_GEN_FILES_DIR}/${_FILE})
+        message (STATUS "Generated: ${_FILE}")
       elseif(${_FILE} MATCHES ".*hpp")
         list (APPEND GENERATED_HEADER_FILES ${PARAM_GEN_FILES_DIR}/${_FILE})
+        message (STATUS "Generated: ${_FILE}")
       endif ()
       if (KTOOL_ROM_PROCESSOR_CHECK_FORMAT)
         if (EXISTS ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
-          execute_process (COMMAND rm ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
+          file (REMOVE ${PARAM_GEN_FILES_DIR}/${_FILE}.orig)
         endif()
         execute_process (
           COMMAND astyle
@@ -135,8 +177,6 @@
           message (WARNING "Style incorrect for file: ${PARAM_GEN_FILES_DIR}/${_FILE}")
         endif()
       endif()
-    else()
-      message (" Generator -> ${_FILE}")
     endif()
   endforeach()

@@ -235,17 +275,16 @@

   set(CUSTOM_PREFIX "kurento")

-  set (KTOOL_PROCESSOR_LINE ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR})
+  set (KTOOL_PROCESSOR_LINE -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR})

   if (NOT ${DISABLE_LIBRARIES_GENERATION})
   ###############################################################
   # Calculate modules dependencies
   ###############################################################

-  execute_process(
-    COMMAND ${KTOOL_PROCESSOR_LINE} -it cpp_cmake_dependencies -c ${CMAKE_CURRENT_BINARY_DIR} -lf
-    OUTPUT_VARIABLE PROCESSOR_OUTPUT
-  )
+  execute_code_generator (OUTPUT_VARIABLE PROCESSOR_OUTPUT
+      EXEC_PARAMS ${KTOOL_PROCESSOR_LINE}
+        -it cpp_cmake_dependencies -c ${CMAKE_CURRENT_BINARY_DIR} -lf)

   if ("${PROCESSOR_OUTPUT}" STREQUAL "")
     message (FATAL_ERROR "No cmake dependencies generated")
@@ -262,8 +301,6 @@
       else()
         message (WARNING "Unexpected file generated ${_FILE}")
       endif ()
-    else()
-      message (" Generator -> ${_FILE}")
     endif()
   endforeach()

@@ -342,9 +379,9 @@
   set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
   set(includedir "\${prefix}/${INCLUDE_PREFIX}")

-  execute_process (
-     COMMAND ${KTOOL_PROCESSOR_LINE} -it cpp_pkgconfig -c ${CMAKE_CURRENT_BINARY_DIR} -lf
-     OUTPUT_VARIABLE PROCESSOR_OUTPUT
+  execute_code_generator (OUTPUT_VARIABLE PROCESSOR_OUTPUT
+    EXEC_PARAMS ${KTOOL_PROCESSOR_LINE}
+      -it cpp_pkgconfig -c ${CMAKE_CURRENT_BINARY_DIR} -lf
   )

   if ("${PROCESSOR_OUTPUT}" STREQUAL "")
@@ -364,11 +401,10 @@
           ${CMAKE_CURRENT_BINARY_DIR}/${_OUT_FILE}
           DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
         )
+        message (STATUS "Generated: ${_FILE}")
       else()
         message (WARNING "Unexpected file generated ${_FILE}")
       endif ()
-    else()
-      message (" Generator -> ${_FILE}")
     endif()
   endforeach()

@@ -502,8 +538,8 @@
   # Generate output kmd file
   ###############################################################

-  execute_process(
-    COMMAND ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/kmd
+  execute_code_generator (
+    EXEC_PARAMS -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -o ${CMAKE_CURRENT_BINARY_DIR}/kmd
   )

   file (GLOB_RECURSE FINAL_MODELS ${CMAKE_CURRENT_BINARY_DIR}/kmd/*kmd.json)
@@ -520,8 +556,9 @@
   if (${GENERATE_JAVA_CLIENT_PROJECT})
     find_package(Maven)

-    execute_process(
-      COMMAND ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/java -maven
+    execute_code_generator (
+      EXEC_PARAMS
+        -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/java -maven
     )

     find_program(xmllint_EXECUTABLE NAMES xmllint)
@@ -540,8 +577,9 @@
       message(STATUS "Pom willn ot be indented unless you intall xmllint")
     endif()

-    execute_process(
-      COMMAND ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -o ${CMAKE_BINARY_DIR}/java/src/main/kmd
+    execute_code_generator (
+      EXEC_PARAMS
+        -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -o ${CMAKE_BINARY_DIR}/java/src/main/kmd
     )

     if (${Maven_FOUND})
@@ -570,12 +608,14 @@

     file(WRITE ${CMAKE_BINARY_DIR}/js_project_name "${VALUE_CODE_API_JS_NODENAME}")

-    execute_process(
-      COMMAND ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js -npm
+    execute_code_generator (
+      EXEC_PARAMS
+        -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js -npm
     )

-    execute_process(
-      COMMAND ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js/lib -it js
+    execute_code_generator (
+      EXEC_PARAMS
+        -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js/lib -it js
     )

     if (EXISTS ${CMAKE_SOURCE_DIR}/LICENSE)
@@ -628,8 +668,8 @@
     endif()
   endforeach()

-  execute_process(
-    COMMAND ${KurentoModuleCreator_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -s ${PARAM_KEYS}
+  execute_code_generator (
+    EXEC_PARAMS -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -s ${PARAM_KEYS}
     OUTPUT_VARIABLE PROCESSOR_OUTPUT
   )

@@ -656,8 +696,6 @@
             endif()
           endif()
       endforeach ()
-    else()
-      message (" Generator -> ${_LINE}")
     endif()
   endforeach()


Use modules dir installation installation prefix also for libraries

Change-Id: If1372fa86204e2bd0cb8a48744cd56dfe4a9695f

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -10,7 +10,7 @@
 set (KURENTO_MODULES_DIR /usr/share/kurento/modules CACHE STRING "Directory where kurento modules descriptors can be found")
 mark_as_advanced(KURENTO_MODULES_DIR)

-set (KURENTO_MODULES_DIR_INSTALL_PREFIX kurento/modules CACHE STRING "Directory where kurento modules descriptors are installed (relative to \${CMAKE_INSTAL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR})")
+set (KURENTO_MODULES_DIR_INSTALL_PREFIX kurento/modules CACHE STRING "Directory where kurento modules descriptors are installed (relative to \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}). Also .so module files are installed using this prefix, but relative to \${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})")
 mark_as_advanced(KURENTO_MODULES_DIR_INSTALL_PREFIX)

 include (CMakeParseArguments)
@@ -488,8 +488,8 @@
   install(
     TARGETS ${VALUE_CODE_IMPLEMENTATION_LIB}module
     RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
-    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CUSTOM_PREFIX}/modules
-    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CUSTOM_PREFIX}/modules
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${KURENTO_MODULES_DIR_INSTALL_PREFIX}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${KURENTO_MODULES_DIR_INSTALL_PREFIX}
   )

   execute_process(


2.0 release

2.0 release

--- CMake/cmbNucVersion.cmake
+++ CMake/cmbNucVersion.cmake
@@ -1,5 +1,5 @@
 set (rgg_version_major 2)
 set (rgg_version_minor 0)
 set (rgg_version_patch 0)
-set (rgg_version_suffix "Devel") #Devel
+set (rgg_version_suffix ) #Devel
 set (rgg_version "${rgg_version_major}.${rgg_version_minor}")


Changed link to ACVD tarball to official mitk.org location.

--- CMakeExternals/ACVD.cmake
+++ CMakeExternals/ACVD.cmake
@@ -24,7 +24,7 @@
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
-      URL http://dl.dropboxusercontent.com/u/5822501/ACVD.tar.gz
+      URL http://mitk.org/download/thirdparty/ACVD_8bbb6da1.tar.gz
       URL_MD5 9cbce5e05e288982e05a95cda780fe64
       PATCH_COMMAND ${ACVD_PATCH_COMMAND}
       INSTALL_COMMAND ""


ENH: Update BridgeNumPy to latest version on 2017.01.08 to address ITK-3511

This update addresses bug report ITK-3511 [1]. BridgeNumPy cannot create an
ITK image directly from a transpose of a NumPy array. The array is not C-style
contiguous when computing the transpose. Memory cannot be easily shared between
Python and C++. A specific error message letting the user know what the problem
is is now displayed.

Francois Budin (2):
      ENH: Print useful error message if NumPy array is not C-style contiguous
      Merge pull request #12 from \
          fbudin69500/ENH_better_error_message_for_fortran_data_ordered_arrays

[1] https://issues.itk.org/jira/browse/ITK-3511

Change-Id: I82fcd4558e8169844ff5ae796c47ae4e5251ade2

--- Modules/Remote/BridgeNumPy.remote.cmake
+++ Modules/Remote/BridgeNumPy.remote.cmake
@@ -21,5 +21,5 @@
   See http://insight-journal.org/browse/publication/85
       https://hdl.handle.net/1926/188"
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git
-  GIT_TAG ab8df8c1c8494416d5c8471382413c49c9163d9b
+  GIT_TAG 249e7be2d012c66b605498b1ce2b4b46498e0680
   )


try to use default settings

try to use default settings

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@2510 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/DartConfig.cmake
+++ Numerics/cmake/DartConfig.cmake
@@ -1,11 +1,11 @@
-SET(CTEST_PROJECT_NAME "Siconos")
-SET(NIGHTLY_START_TIME "20:00:00 CET")
-SET(DROP_METHOD "http")
-#SET(DROP_SITE "cdash.inria.fr")
-SET(DROP_SITE "public.kitware.com")
-SET(DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
-SET(DROP_SITE_CDASH TRUE)
-#SET(CTEST_DROP_METHOD "http")
-#SET(CTEST_DROP_SITE "cdash.inria.fr")
-#SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=Siconos")
-SET(CTEST_DROP_SITE_CDASH TRUE)
+#SET(CTEST_PROJECT_NAME "Siconos")
+#SET(NIGHTLY_START_TIME "20:00:00 CET")
+#SET(DROP_METHOD "http")
+##SET(DROP_SITE "cdash.inria.fr")
+#SET(DROP_SITE "public.kitware.com")
+#SET(DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
+#SET(DROP_SITE_CDASH TRUE)
+##SET(CTEST_DROP_METHOD "http")
+##SET(CTEST_DROP_SITE "cdash.inria.fr")
+##SET(CTEST_DROP_LOCATION "/CDash/submit.php?project=Siconos")
+#SET(CTEST_DROP_SITE_CDASH TRUE)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 06)
+SET(KWSYS_DATE_STAMP_MONTH 07)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 05)
+SET(KWSYS_DATE_STAMP_MONTH 06)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/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   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


COMP: niral_utilitiesExternalProject: Run install command in parallel if possible

This commit ensures the specific install command corresponding to the
current generator is used, it explicitly disables the install command if
needed or it lets ExternalProject set the command otherwise.

Warning like the following are fixed:

```
[ 27%] Performing install step for 'CurveCompare'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
```

--- CMake/niral_utilitiesExternalProject.cmake
+++ CMake/niral_utilitiesExternalProject.cmake
@@ -18,8 +18,9 @@

   message(STATUS "Adding external project: ${projectname}")

-  if(_ep_INSTALL)
-    set(install_cmd INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install )
+  set(install_arg)
+  if(NOT _ep_INSTALL)
+    set(install_arg INSTALL_COMMAND ${CMAKE_COMMAND} -E echo)
   endif()

   foreach(var ${_ep_DEPENDS})
@@ -64,7 +65,6 @@
       -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
       -DCMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
       ${_ep_ADDITIONAL_OPTIONS}
-    INSTALL_COMMAND "" #Just in case we don't want to install this project. ${install_cmd} will be empty and nothing will be installed
-    ${install_cmd}
+    ${install_arg}
   )
 endfunction()


Disable iterator debugging on window in Debug mode.

--- salome_adm/cmake_files/SalomeSetupPlatform.cmake
+++ salome_adm/cmake_files/SalomeSetupPlatform.cmake
@@ -93,10 +93,14 @@

   SET(PLATFORM_LIBS Ws2_32.lib)
   LIST(APPEND PLATFORM_LIBS Userenv.lib)      # At least for GEOM suit
+
+  # Disable iterator debugging on WINDOWS in Debug Mode
+  IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+    ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
+    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
+  ENDIF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")

   IF(MACHINE_IS_64)
-    ADD_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
-    ADD_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0) # To avoid runtime error during checking iterators
     SET(SIZE_OF_LONG 4)                          # set sizeof(long) to 4 byte
   ELSE()
     SET(SIZE_OF_LONG ${CMAKE_SIZEOF_VOID_P})     # set sizeof(long) the same as size of pointers


xpBuildDeps for fecpp

xpBuildDeps for fecpp

* issue https://github.com/smanders/externpro/issues/322

--- projects/fecpp.cmake
+++ projects/fecpp.cmake
@@ -25,16 +25,11 @@
   if(NOT (XP_DEFAULT OR XP_PRO_FECPP))
     return()
   endif()
-  if(NOT (XP_DEFAULT OR XP_PRO_BOOST))
-    message(STATUS "fecpp.cmake: requires boost (test code)")
-    set(XP_PRO_BOOST ON CACHE BOOL "include boost" FORCE)
-    patch_boost()
-  endif()
-  build_boost(TARGETS boostTgts)
+  xpBuildDeps(depsTgts ${PRO_FECPP})
   xpGetArgValue(${PRO_FECPP} ARG VER VALUE VER)
   set(XP_CONFIGURE -DXP_NAMESPACE:STRING=xpro -DFECPP_VER=${VER})
   configure_file(${PRO_DIR}/use/usexp-fecpp-config.cmake ${STAGE_DIR}/share/cmake/
     @ONLY NEWLINE_STYLE LF
     )
-  xpCmakeBuild(fecpp "${boostTgts}" "${XP_CONFIGURE}")
+  xpCmakeBuild(fecpp "${depsTgts}" "${XP_CONFIGURE}")
 endfunction()


fix comment

fix comment

--- ios-nocodesign-10-1-arm64-dep-9-0-device-libcxx-hid-sections-lto.cmake
+++ ios-nocodesign-10-1-arm64-dep-9-0-device-libcxx-hid-sections-lto.cmake
@@ -17,7 +17,7 @@
 set(POLLY_XCODE_COMPILER "clang")

 polly_init(
-    "iOS ${IOS_SDK_VERSION} / Universal (arm64 armv7s armv7) / \
+    "iOS ${IOS_SDK_VERSION} / Universal (arm64) / \
 Deployment ${IOS_DEPLOYMENT_SDK_VERSION} / \
 ${POLLY_XCODE_COMPILER} / \
 No code sign / \


ENH: Updates for ITKv5 Remote Module GenericLabelmapInterpolator

New API changes in ITKv5 required updates to remote modules
to support GenericLabelmapInterpolator.

--- SuperBuild/External_ITKv5.cmake
+++ SuperBuild/External_ITKv5.cmake
@@ -151,7 +151,7 @@
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITK.git)
   # set(${proj}_REPOSITORY ${git_protocol}://github.com/stnava/ITK.git)
-  set(${proj}_GIT_TAG 1041cefe65d68eed96dfa5a8a12cb865df6eaba6 ) ## 20190428
+  set(${proj}_GIT_TAG fe34d9caa5d98face1ef422afdfc05d71d38a68c ) ## 20190518 Fix ITKv5 api changes
   set(ITK_VERSION_ID ITK-5.0) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


Fix export of QT_<libname>_LIB variables

Change-Id: I4559f218b1798ef97cdffe974ed4ff54301b2dbd

--- cmake/qibuild/modules/qt5utils.cmake
+++ cmake/qibuild/modules/qt5utils.cmake
@@ -25,7 +25,7 @@
   endforeach()
   set(${prefix}_LIBRARIES ${${prefix}_LIBRARIES} CACHE INTERNAL "" FORCE)
   set(${prefix}_INCLUDE_DIRS ${${name}_INCLUDE_DIRS} CACHE INTERNAL "" FORCE)
-  set(_define ${prefix}_lib)
+  set(_define ${prefix}_LIB)
   string(REPLACE QT5 QT _define ${_define})
   set(${prefix}_DEFINITIONS ${_define} CACHE INTERNAL "" FORCE)


cmake: Add sout modules.

cmake: Add sout modules.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -14,6 +14,7 @@
 # has been set.

 OPTION( ENABLE_HTTPD           "Enable httpd server" ON )
+OPTION( ENABLE_STREAM_OUT      "Enable stream output plugins" ON )
 OPTION( ENABLE_VLM             "Enable vlm" ON )
 OPTION( ENABLE_DYNAMIC_PLUGINS "Enable dynamic plugin" ON )
 OPTION( UPDATE_CHECK           "Enable automatic new version checking" OFF )
@@ -389,6 +390,18 @@
 vlc_enable_modules(spatializer)
 vlc_enable_modules(asf)

+set(enabled ${ENABLE_STREAM_OUT})
+vlc_register_modules(${enabled} access_output_dummy access_output_udp access_output_file access_output_http)
+vlc_register_modules(${enabled} mux_ps mux_avi mux_mp4 mux_asf mux_dummy mux_wav mux_mpjpeg)
+vlc_register_modules(${enabled} packetizer_copy)
+
+vlc_register_modules(${enabled} stream_out_dummy stream_out_standard stream_out_es stream_out_rtp stream_out_description vod_rtsp)
+vlc_register_modules(${enabled} stream_out_duplicate stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge stream_out_autodel)
+vlc_register_modules(${enabled} stream_out_gather)
+# vlc_register_modules(${enabled} stream_out_transrate)
+# vlc_register_modules(${enabled} rtcp)
+vlc_register_modules(${enabled} profile_parser)
+
 if(NOT mingwce)
    set(enabled ON)
 endif(NOT mingwce)
@@ -567,9 +580,12 @@

 find_package(Dvbpsi)
 if(Dvbpsi_FOUND)
+  vlc_register_modules(${ENABLE_STREAM_OUT} sout_ts)
   vlc_enable_modules(ts)
   check_include_files ("stdint.h;dvbpsi/dvbpsi.h;dvbpsi/demux.h;dvbpsi/descriptor.h;dvbpsi/pat.h;dvbpsi/pmt.h;dvbpsi/sdt.h;dvbpsi/dr.h" HAVE_DVBPSI_DR_H)
-  vlc_module_add_link_libraries(ts ${Dvbpsi_LIBRARIES})
+  vlc_module_add_link_libraries(ts      ${Dvbpsi_LIBRARIES})
+  vlc_module_add_link_libraries(sout_ts ${Dvbpsi_LIBRARIES})
+  vlc_module_add_link_libraries(dvb     ${Dvbpsi_LIBRARIES})
 endif(Dvbpsi_FOUND)

 set(CMAKE_REQUIRED_INCLUDES)


Added MobileCommerceiOS library

Added MobileCommerceiOS library

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -194,6 +194,7 @@
 add_target(MAVEN_LIBS maven_libs)
 add_target(MCRYPT mcrypt)
 add_target(MILI mili)
+add_target(MOBILE_COMMERCE_IOS mobile_commerce_ios)
 add_target(MOD_JK mod_jk)
 add_target(MPC mpc)
 add_target(MPFR mpfr)
@@ -411,6 +412,16 @@
 set_libraries(llvm_xcore_info ${LLVM_LIB_DIR} LLVMXCoreInfo)
 set_libraries(marisa_trie ${MARISA_TRIE_PREFIX}/lib marisa)
 set_libraries(mili "")  # Mili is header only.
+set_libraries(mobile_commerce_ios_atg_mobile_client
+              ${MOBILE_COMMERCE_IOS_PREFIX}/lib ATGMobileClient)
+set_libraries(mobile_commerce_ios_atg_gui_elements
+              ${MOBILE_COMMERCE_IOS_PREFIX}/lib ATGUIElements)
+set_libraries(mobile_commerce_ios_ios_rest_client
+              ${MOBILE_COMMERCE_IOS_PREFIX}/lib iOS-rest-client)
+set_libraries(mobile_commerce_ios_atg_mobile_common
+              ${MOBILE_COMMERCE_IOS_PREFIX}/lib ATGMobileCommon)
+set_libraries(mobile_commerce_ios_em_mobile_client
+              ${MOBILE_COMMERCE_IOS_PREFIX}/lib EMMobileClient)
 set_libraries(mpc ${MPC_PREFIX}/lib mpc)
 set_libraries(mpfr ${MPFR_PREFIX}/lib mpfr)
 set_libraries(mysqlcppconn ${MYSQLCPPCONN_PREFIX}/lib mysqlcppconn)
@@ -475,6 +486,11 @@
 add_library_dependencies(shark third_party.boost_serialization)
 add_library_dependencies(protobuf third_party.zlib)
 add_library_dependencies(arabica third_party.boost_thread)
+
+add_library_dependencies(mobile_commerce_ios_atg_mobile_common
+                         third_party.mobile_commerce_ios_ios_rest_client)
+add_framework_dependencies(
+    mobile_commerce_ios_atg_mobile_common CoreData SystemConfiguration)

 # Aliases.
 add_library_dependencies(boost_asio third_party.boost_system)
@@ -527,6 +543,13 @@
     llvm_x86_utils llvm_xcore_asm_printer llvm_xcore_code_gen llvm_xcore_desc
     llvm_xcore_disassembler llvm_xcore_info)
 set_target_for_libraries(
+    ${MOBILE_COMMERCE_IOS_TARGET}
+    mobile_commerce_ios_atg_mobile_client
+    mobile_commerce_ios_atg_gui_elements
+    mobile_commerce_ios_ios_rest_client
+    mobile_commerce_ios_atg_mobile_common
+    mobile_commerce_ios_em_mobile_client)
+set_target_for_libraries(
     ${OPENCV_TARGET} opencv_bioinspired opencv_calib3d opencv_contrib
     opencv_core opencv_cuda opencv_cudaarithm opencv_cudabgsegm
     opencv_cudafeatures2d opencv_cudafilters opencv_cudaimgproc
@@ -565,6 +588,8 @@
     libxml ${LIBXML_PREFIX}/include ${LIBXML_PREFIX}/include/libxml2)
 set_include_directories(marisa_trie ${MARISA_TRIE_PREFIX}/include)
 set_include_directories(mili ${MILI_PREFIX}/include)
+set_include_directories(
+    mobile_commerce_ios ${MOBILE_COMMERCE_IOS_PREFIX}/include)
 set_include_directories(mpc ${MPC_PREFIX}/include)
 set_include_directories(mpfr ${MPFR_PREFIX}/include)
 set_include_directories(mysql ${MYSQL_PREFIX}/include)
@@ -1946,6 +1971,26 @@
   BUILD_COMMAND ${NOP}
   INSTALL_COMMAND find mili | cpio -dp <INSTALL_DIR>/include
   BUILD_IN_SOURCE 1)
+
+################################################################################
+# MobileCommerceiOS.
+if (IS_IOS)
+  string(REGEX REPLACE "^-" "" SDK ${CMAKE_XCODE_EFFECTIVE_PLATFORMS})
+  add_external_project(
+    ${MOBILE_COMMERCE_IOS_TARGET}
+    PREFIX ${MOBILE_COMMERCE_IOS_PREFIX}
+    DOWNLOAD_COMMAND
+        ${GIT} clone --depth 1 git://github.com/QuentinFiard/MobileCommerceiOS
+            ${MOBILE_COMMERCE_IOS_TARGET}
+    CONFIGURE_COMMAND ${NOP}
+    BUILD_COMMAND
+        find .. -name "*.xcodeproj" |
+        xargs -I{} xcodebuild -project {} -configuration Release -sdk ${SDK}
+    INSTALL_COMMAND
+        cd <SOURCE_DIR>/build/Release-${SDK} &&
+        find . -name "*.h" | cpio -dp <INSTALL_DIR>/include &&
+        find . -name "*.a" | cpio -dp <INSTALL_DIR>/lib)
+endif ()

 ################################################################################
 # MPC.


Added include directory for LLVM and Clang libraries

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -744,6 +744,7 @@
       -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
       -DCMAKE_OSX_ARCHITECTURES=${ARCHS}
       -DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX})
+add_include_directory(${CLANG_PREFIX}/include)

 ################################################################################
 # Clang/OpenMP - OpenMP compatible clang compiler.


FIxed typo in ICU commands

FIxed typo in ICU commands

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -1606,9 +1606,7 @@
       cd <SOURCE_DIR> &&
       tar --strip-components 1 -xvf
           ${ICU_PREFIX}/download/icu4c-52_1-src.tgz
-  CONFIGURE_COMMAND echo "${ICU_BUILD_COMMAND}" | sh
-  BUILD_COMMAND make CXXFLAGS="--std=c++11"
-  INSTALL_COMMAND make install)
+  CONFIGURE_COMMAND echo "${ICU_BUILD_COMMAND}" | sh)
 add_external_project_step(${ICU_TARGET} set_install_names
   COMMAND
       ${SET_INSTALL_NAMES} ${CMAKE_INSTALL_NAME_TOOL}


add reminder on usability issue

add reminder on usability issue

--- lib/OpenCogAtomTypes.cmake
+++ lib/OpenCogAtomTypes.cmake
@@ -207,5 +207,17 @@
 ENDFOREACH (LINE)
 FILE(APPEND "${HEADER_FILE}" "} // namespace opencog\n")

+# The following is for symlinking to the build directory
+# FIXME: It doesn't create the symlink consistently. For example, if the
+# the symlinks created are removed from the symlink directory
+# (build/opencog/scm) then running `make build` will not recreate the
+# symlink as the OPENCOG_ADD_ATOM_TYPES macro isn't rerun if the OUTPUT
+# files are already  found in the build directory.
+#
+# Options tested:
+# * Adding a dummy output will ensure the macro is rerun during every build,
+#   but the penality is the time for recompiling the autogenerated c++ code
+#   and any other dependencies.
 INCLUDE("${PROJECT_SRC_DIR}/lib/OpenCogFunctions.cmake")
-PROCESS_GUILE_PATH(${PROJECT_BUILD_DIR} ${PROJECT_CURRENT_BUILD_DIR} ${PROJECT_BUILD_DIR} ${SCM_FILE_NAME})
+PROCESS_GUILE_PATH(${PROJECT_BUILD_DIR} ${PROJECT_CURRENT_BUILD_DIR}
+    ${PROJECT_BUILD_DIR} ${SCM_FILE_NAME})


Remove old documentation

Remove old documentation

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -1,33 +1,4 @@
 # Copyright (C) 2016 OpenCog Foundation
-#
-# 1. The name of the directory and the name of its parent directories is the
-#    name of the module.
-# 2. There must be a .scm file in the same directory as the module. This file
-#    on installation will be copied one directory above its current directory.
-#
-# Types of scm module directory structures
-# 1. Modules that don't have any c++ code modules can exist in their separate
-#    directory. Examples,
-#    * `/repo-name/opencog/some-module/some-module.scm` is imported by
-#      `(use-modules (opencog some-module ))` if `some-module.scm` has an
-#      expression `(define-module (opencog some-module))`
-#    * `/repo-name/opencog/some-module/sub-module/sub-module.scm` is imported
-#      by `(use-modules (opencog some-module sub-module))` if `sub-module.scm`
-#      has an expression `(define-module (opencog some-module sub-module))`
-# 2. If there is a c++ code then the scheme module should be under `scm/`
-#    directory. And on installation or symlinking the `scm/` directory is
-#    escaped. If there are more than one `scm/` directories only the first in
-#    the hierarchy is escaped. As the need arises multiple `scm/` directory
-#    escpaes maybe be added in the future. Examples,
-#    * `/repo-name/opencog/some-module/scm/some-module.scm` is imported by
-#      `(use-modules (opencog some-module ))` if `some-module.scm` has an
-#      expression `(define-module (opencog some-module))`
-#    * `/repo-name/opencog/some-module/scm/sub-module/sub-module.scm` is
-#      imported by `(use-modules (opencog some-module sub-module))` if
-#      `sub-module.scm` has an expression `(define-module (opencog some-module
-#      sub-module))`
-#    Note that in the future the same could be done for python modules with
-#    `py/` or `python/` directories.

 # References:
 # https://www.gnu.org/software/guile/manual/guile.html#Modules-and-the-File-System


Add documentation for ADD_GUILE_MODULE

Add documentation for ADD_GUILE_MODULE

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -44,6 +44,17 @@
 ENDFUNCTION(PROCESS_MODULE_STRUCTURE)

 # ----------------------------------------------------------------------------
+# When cmake is run, a symlink is created at '${CMAKE_BINARY_DIR}/opencog/scm'
+# for all the files specified, following the file tree structure created when
+# installing to /usr/local/share/opencog/scm. It has two keyword arguments,
+#
+# FILES: List of files to be installed/symlinked
+#
+# MODULE_DESTINATION: The absolute path  where the files associated
+#   with the module are installed, with the exception of the
+#   MODULE_FILE(see definition at top of this file). The path for
+#   MODULE_FILE, is inferred from this argument, even if it is the only file to
+#   be installed.
 FUNCTION(ADD_GUILE_MODULE)
     # NOTE: Change PREFIX_DIR_PATH variable if a choice is made to adapt
     # guile's site-package convention.


qt: Skip declarative module

qt: Skip declarative module

--- qt4.cmake
+++ qt4.cmake
@@ -63,6 +63,7 @@
         -nomake demos
         -nomake docs
         -nomake translations
+        -no-declarative # caused a build issue on Linux. easier to just disable for now.
         -no-multimedia
         -no-webkit # Apparently clang segfaults when building webkit...
         -no-audio-backend


beaglebone: treat robotcontrol as system include

This should ignore compiler warnings from the includes.

--- boards/beaglebone/blue/cmake/init.cmake
+++ boards/beaglebone/blue/cmake/init.cmake
@@ -49,7 +49,7 @@
 set(ROBOTCONTROL_LIB_DIR ${install_dir}/src/librobotcontrol-build/library)
 set(ROBOTCONTROL_INC_DIR ${install_dir}/src/librobotcontrol/library/include)

-include_directories(${ROBOTCONTROL_INC_DIR})
+include_directories(SYSTEM ${ROBOTCONTROL_INC_DIR})
 link_directories(${ROBOTCONTROL_LIB_DIR})

 # add to prebuild


Remove duplicate LLVM_NATIVE_ from llvm's config.h

Summary:
Since LLVM_NATIVE_ARCH, LLVM_NATIVE_ASMPARSER, LLVM_NATIVE_ASMPRINTER,
LLVM_NATIVE_DISASSEMBLER, LLVM_NATIVE_TARGET, LLVM_NATIVE_TARGETINFO and
LLVM_NATIVE_TARGETMC are already defined in llvm-config.h, there seems
to be no reason to also define them in config.h.  Also, I can only find
usage of these macros in files that include llvm-config.h.

So let's remove the duplicated macros from config.h.

Reviewers: chandlerc, rnk, mehdi_amini, joerg

Reviewed By: rnk

Subscribers: chapuni, mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D33881

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -350,27 +350,6 @@
 /* Host triple LLVM will be executed on */
 #cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"

-/* LLVM architecture name for the native architecture, if available */
-#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}
-
-/* LLVM name for the native AsmParser init function, if available */
-#cmakedefine LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser
-
-/* LLVM name for the native AsmPrinter init function, if available */
-#cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter
-
-/* LLVM name for the native Disassembler init function, if available */
-#cmakedefine LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler
-
-/* LLVM name for the native Target init function, if available */
-#cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target
-
-/* LLVM name for the native TargetInfo init function, if available */
-#cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo
-
-/* LLVM name for the native target MC init function, if available */
-#cmakedefine LLVM_NATIVE_TARGETMC LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC
-
 /* Define if this is Unixish platform */
 #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}


CMake: added dfPdfs to DooFit library

CMake: added dfPdfs to DooFit library

--- external/FindDooFit.cmake
+++ external/FindDooFit.cmake
@@ -8,7 +8,7 @@
   SET(DooFit_INCLUDES "${DooFit_BASE}/include")
   SET(DooFit_INCLUDE_DIR "${DooFit_BASE}/include")
   SET(DooFit_LIBRARY_DIR "${DooFit_BASE}/lib")
-  SET(DooFit_LIBRARIES "-ldfdoroopdfs -ldfschillerroopdfs -ldfFunctions -ldfFitter -lToy -lBuilder -lPlotting -lConfig -ldfp2vvpdfs -ldfamorosopdf -ldfapollonios -ldfgeneralizedhyperbolic -ldfipatia -ldfipatia2 -ldfjohnsonsu -ldfloggamma -ldfreparamghyp")
+  SET(DooFit_LIBRARIES "-ldfdoroopdfs -ldfschillerroopdfs -ldfFunctions -ldfPdfs -ldfFitter -lToy -lBuilder -lPlotting -lConfig -ldfp2vvpdfs -ldfamorosopdf -ldfapollonios -ldfgeneralizedhyperbolic -ldfipatia -ldfipatia2 -ldfjohnsonsu -ldfloggamma -ldfreparamghyp")
   #SET(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${DooFit_LIBRARY_DIR})
   MESSAGE(STATUS "Looking for DooFit... - found at ${DooFit_BASE}")
 ENDIF(IS_DIRECTORY $ENV{DOOFITSYS})


Updating FindDooFit.cmake

Updating FindDooFit.cmake

--- external/FindDooFit.cmake
+++ external/FindDooFit.cmake
@@ -8,7 +8,7 @@
   SET(DooFit_INCLUDES "${DooFit_BASE}/include")
   SET(DooFit_INCLUDE_DIR "${DooFit_BASE}/include")
   SET(DooFit_LIBRARY_DIR "${DooFit_BASE}/lib")
-  SET(DooFit_LIBRARIES "-lextraroopdfs -lextraroopdfsDict -lToy -lBuilder -lPdf2WsStd -lPlotting -lConfig")
+  SET(DooFit_LIBRARIES "-lextraroopdfs -lToy -lBuilder -lPdf2WsStd -lPlotting -lConfig")
   #SET(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${DooFit_LIBRARY_DIR})
   MESSAGE(STATUS "Looking for DooFit... - found at ${DooFit_BASE}")
 ENDIF(IS_DIRECTORY $ENV{DOOFITSYS})


Add the Clang compiler to CMake

Add the Clang compiler to CMake

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -146,4 +146,20 @@
 	STRING(REGEX REPLACE "([0-9])\\.([0-9])" "\\2"
 		CXX_COMPILER_VERSION_MINOR ${CXX_COMPILER_VERSION})

+ELSEIF(CMAKE_CXX_COMPILER MATCHES "clang")
+	SET(CXX_COMPILER_ID "LLVM")
+	SET(CMAKE_COMPILER_IS_LLVM TRUE CACHE INTERNAL "Is LLVM C++ compiler (llvm)")
+
+	## determine version number of the compiler
+	EXECUTE_PROCESS(COMMAND ${CMAKE_CXX_COMPILER} --version
+		OUTPUT_VARIABLE CXX_COMPILER_VERSION
+	)
+	STRING(STRIP ${CXX_COMPILER_VERSION} CXX_COMPILER_VERSION)
+
+	STRING(REGEX REPLACE ".*([0-9])\\.([0-9]).*" "\\1"
+		CXX_COMPILER_VERSION_MAJOR ${CXX_COMPILER_VERSION})
+	STRING(REGEX REPLACE ".*([0-9])\\.([0-9]).*" "\\2"
+		CXX_COMPILER_VERSION_MINOR ${CXX_COMPILER_VERSION})
+
+	SET(CXX_COMPILER_VERSION "${CXX_COMPILER_VERSION_MAJOR}.${CXX_COMPILER_VERSION_MINOR}")
 ENDIF()


Set correct c++11-option for Clang

Set correct c++11-option for Clang

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -180,5 +180,5 @@
 	SET(CXX_COMPILER_VERSION "${CXX_COMPILER_VERSION_MAJOR}.${CXX_COMPILER_VERSION_MINOR}")

 	## Clang should use c++-11 - mode
-	ADD_BALL_DEFINITIONS("-std=c++11")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 ENDIF()


Added libpthread to list of MSP required libs

--- cmake/CMakeModules/FindMSP.cmake
+++ cmake/CMakeModules/FindMSP.cmake
@@ -6,7 +6,20 @@
 		${OSSIM_INSTALL_PREFIX}/include
 )

+set (MSP_INCLUDE_DIRS ${MSP_INCLUDE_DIRS}
+                      ${MSP_INCLUDE_DIRS}/common
+                      ${MSP_INCLUDE_DIRS}/common/utilities
+                      ${MSP_INCLUDE_DIRS}/common/geometry
+                      ${MSP_INCLUDE_DIRS}/common/math
+                      ${MSP_INCLUDE_DIRS}/common/csmutil
+                      ${MSP_INCLUDE_DIRS}/common/csm)
+
+
 MESSAGE("MSP_HOME = $ENV{MSP_HOME}")
+
+find_library(MSP_LIBRARY00 NAMES pthread )
+set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY00})
+
 find_library(MSP_LIBRARY01 NAMES CSM_PCAPI PATHS $ENV{MSP_HOME}/lib ${OSSIM_DEPENDENCIES}/lib ${OSSIM_INSTALL_PREFIX}/lib${LIBSUFFIX} )
 set (MSP_LIBRARIES ${MSP_LIBRARIES} ${MSP_LIBRARY01})


Change a low-information message in `FindCatch_EP.cmake` to `VERBOSE` (#3425)

--- cmake/Modules/FindCatch_EP.cmake
+++ cmake/Modules/FindCatch_EP.cmake
@@ -34,7 +34,7 @@
 include(TileDBCommon)

 # Search the path set during the superbuild for the EP.
-message(STATUS "searching for catch in ${TILEDB_EP_SOURCE_DIR}")
+message(VERBOSE "searching for catch in ${TILEDB_EP_SOURCE_DIR}")
 set(CATCH_PATHS ${TILEDB_EP_SOURCE_DIR}/ep_catch/single_include)

 if (NOT TILEDB_FORCE_ALL_DEPS OR TILEDB_CATCH_EP_BUILT)


Build system: use PLD_wxwidgets=ON by default

Recent changes have cured the build trouble on Linux for CMake-2.8.12 so
set PLD_wxwidgets=ON by default again.

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -219,7 +219,7 @@
   "tk:tk:ON:I:OFF"
   "tkwin:tkwin:ON:E:OFF"
   "wingcc:wingcc:ON:I:OFF"
-  "wxwidgets:wxwidgets:OFF:I:OFF"
+  "wxwidgets:wxwidgets:ON:I:OFF"
   "wxpng:wxwidgets:OFF:F:ON"
   "xfig:xfig:ON:F:ON"
   "xwin:xwin:ON:I:OFF"


Fix only include OpenNI/Sensor to the installer when WITH_OPENNI selected

Fix to only include installer of OpenNI/Sensor to the All-in-one
Installer when WITH_OPENNI is selected in CMake.

--- cmake/pcl_all_in_one_installer.cmake
+++ cmake/pcl_all_in_one_installer.cmake
@@ -22,61 +22,63 @@
         list(APPEND PCL_3RDPARTY_COMPONENTS ${dep})
     endforeach(dep)

-    if(CMAKE_CL_64)
-        set(OPENNI_PACKAGE "OpenNI-Win64-1.5.4-Dev.msi")
-        set(OPENNI_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_PACKAGE}")
-        set(OPENNI_MD5 c8f9cbe8447a16d32572a4e2c2d00af0)
-        set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource64-5.1.0.msi")
-        set(OPENNI_SENSOR_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
-        set(OPENNI_SENSOR_MD5 badb880116436870943b1b7c447dfa22)
-    else(CMAKE_CL_64)
-        set(OPENNI_PACKAGE "OpenNI-Win32-1.5.4-Dev.msi")
-        set(OPENNI_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_PACKAGE}")
-        set(OPENNI_MD5 996d48f447b41a5501b7d22af27ab251)
-        set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource32-5.1.0.msi")
-        set(OPENNI_SENSOR_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
-        set(OPENNI_SENSOR_MD5 55da1f7541d7c9c98772bddf801c7e1c)
-    endif(CMAKE_CL_64)
+    if(WITH_OPENNI)
+        if(CMAKE_CL_64)
+            set(OPENNI_PACKAGE "OpenNI-Win64-1.5.4-Dev.msi")
+            set(OPENNI_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_PACKAGE}")
+            set(OPENNI_MD5 c8f9cbe8447a16d32572a4e2c2d00af0)
+            set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource64-5.1.0.msi")
+            set(OPENNI_SENSOR_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
+            set(OPENNI_SENSOR_MD5 badb880116436870943b1b7c447dfa22)
+        else(CMAKE_CL_64)
+            set(OPENNI_PACKAGE "OpenNI-Win32-1.5.4-Dev.msi")
+            set(OPENNI_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_PACKAGE}")
+            set(OPENNI_MD5 996d48f447b41a5501b7d22af27ab251)
+            set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource32-5.1.0.msi")
+            set(OPENNI_SENSOR_URL "http://sourceforge.net/projects/pointclouds/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
+            set(OPENNI_SENSOR_MD5 55da1f7541d7c9c98772bddf801c7e1c)
+        endif(CMAKE_CL_64)

-    set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "  IntCmp $OpenNI_selected 0 noinstall_openni_packages\n")
+        set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "  IntCmp $OpenNI_selected 0 noinstall_openni_packages\n")

-    file(DOWNLOAD ${OPENNI_URL} "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_PACKAGE}"
-        STATUS _openni_download_status LOG _openni_download_log
-        EXPECTED_MD5 ${OPENNI_MD5}
-       )
-    list(GET _openni_download_status 0 _error_code)
-    list(GET _openni_download_status 1 _error_message)
-    if(_error_code EQUAL 0)
-        install(
-            FILES "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_PACKAGE}"
-            DESTINATION 3rdParty/OpenNI
-            COMPONENT OpenNI
-        )
-        list(APPEND PCL_3RDPARTY_COMPONENTS OpenNI)
-        set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
-            "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n    ExecWait 'msiexec /i \\\"$INSTDIR\\\\3rdParty\\\\OpenNI\\\\${OPENNI_PACKAGE}\\\" '")
-    else(_error_code EQUAL 0)
-        message("WARNING : Could not download ${OPENNI_URL}, error code : ${_error_code}, error message : ${_error_message}")
-    endif(_error_code EQUAL 0)
+        file(DOWNLOAD ${OPENNI_URL} "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_PACKAGE}"
+            STATUS _openni_download_status LOG _openni_download_log
+            EXPECTED_MD5 ${OPENNI_MD5}
+           )
+        list(GET _openni_download_status 0 _error_code)
+        list(GET _openni_download_status 1 _error_message)
+        if(_error_code EQUAL 0)
+            install(
+                FILES "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_PACKAGE}"
+                DESTINATION 3rdParty/OpenNI
+                COMPONENT OpenNI
+            )
+            list(APPEND PCL_3RDPARTY_COMPONENTS OpenNI)
+            set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
+                "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n    ExecWait 'msiexec /i \\\"$INSTDIR\\\\3rdParty\\\\OpenNI\\\\${OPENNI_PACKAGE}\\\" '")
+        else(_error_code EQUAL 0)
+            message("WARNING : Could not download ${OPENNI_URL}, error code : ${_error_code}, error message : ${_error_message}")
+        endif(_error_code EQUAL 0)

-    file(DOWNLOAD ${OPENNI_SENSOR_URL} "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_SENSOR_PACKAGE}"
-        STATUS _openni_download_status LOG _openni_download_log
-        EXPECTED_MD5 ${OPENNI_SENSOR_MD5}
-       )
-    list(GET _openni_download_status 0 _error_code)
-    list(GET _openni_download_status 1 _error_message)
-    if(_error_code EQUAL 0)
-        install(
-            FILES "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_SENSOR_PACKAGE}"
-            DESTINATION 3rdParty/OpenNI
-            COMPONENT OpenNI
-        )
-        list(APPEND PCL_3RDPARTY_COMPONENTS OpenNI)
-        set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
-            "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n    ExecWait 'msiexec /i \\\"$INSTDIR\\\\3rdParty\\\\OpenNI\\\\${OPENNI_SENSOR_PACKAGE}\\\" '")
-    else(_error_code EQUAL 0)
-        message("WARNING : Could not download ${OPENNI_SENSOR_URL}, error code : ${_error_code}, error message : ${_error_message}")
-    endif(_error_code EQUAL 0)
-    list(REMOVE_DUPLICATES PCL_3RDPARTY_COMPONENTS)
-    set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n  noinstall_openni_packages:\n")
+        file(DOWNLOAD ${OPENNI_SENSOR_URL} "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_SENSOR_PACKAGE}"
+            STATUS _openni_download_status LOG _openni_download_log
+            EXPECTED_MD5 ${OPENNI_SENSOR_MD5}
+           )
+        list(GET _openni_download_status 0 _error_code)
+        list(GET _openni_download_status 1 _error_message)
+        if(_error_code EQUAL 0)
+            install(
+                FILES "${CMAKE_CURRENT_BINARY_DIR}/${OPENNI_SENSOR_PACKAGE}"
+                DESTINATION 3rdParty/OpenNI
+                COMPONENT OpenNI
+            )
+            list(APPEND PCL_3RDPARTY_COMPONENTS OpenNI)
+            set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS
+                "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n    ExecWait 'msiexec /i \\\"$INSTDIR\\\\3rdParty\\\\OpenNI\\\\${OPENNI_SENSOR_PACKAGE}\\\" '")
+        else(_error_code EQUAL 0)
+            message("WARNING : Could not download ${OPENNI_SENSOR_URL}, error code : ${_error_code}, error message : ${_error_message}")
+        endif(_error_code EQUAL 0)
+        list(REMOVE_DUPLICATES PCL_3RDPARTY_COMPONENTS)
+        set(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "${CPACK_NSIS_EXTRA_INSTALL_COMMANDS}\n  noinstall_openni_packages:\n")
+    endif(WITH_OPENNI)
 endif(BUILD_all_in_one_installer)


Update Libevent release.

Update Libevent release.

--- cmake/projects/Libevent/hunter.cmake
+++ cmake/projects/Libevent/hunter.cmake
@@ -9,8 +9,8 @@
 hunter_add_version(
     PACKAGE_NAME Libevent
     VERSION "2.1.8"
-    URL "https://github.com/isaachier/libevent/archive/hunter-2.1.8-p4.tar.gz"
-    SHA1 "241616673bf8b13b69771c4969dc37d8d3954cbd")
+    URL "https://github.com/isaachier/libevent/archive/hunter-2.1.8-p5.tar.gz"
+    SHA1 "c8eed67162a9f226d6b734543f1a179f8f7b73d9")

 hunter_cmake_args(Libevent CMAKE_ARGS
                   EVENT__DISABLE_TESTS=ON


change to fork

change to fork

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -11,7 +11,7 @@
     )
 endif()

-set(bot_core_lcmtypes_url https://github.com/openhumanoids/bot_core_lcmtypes.git)
+set(bot_core_lcmtypes_url https://github.com/iamwolf/bot_core_lcmtypes.git)
 set(bot_core_lcmtypes_revision c29cd6076d13ca2a3ecc23ffcbe28a0a1ab46314)
 set(bot_core_lcmtypes_depends ${lcm_proj})


THRIFT-4081 broke compiling with gcc 4.6.x

--- build/cmake/DefinePlatformSpecifc.cmake
+++ build/cmake/DefinePlatformSpecifc.cmake
@@ -100,7 +100,7 @@

 # GCC and Clang: use C++11
 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.6")
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.6.4")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   endif()
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -Wextra -pedantic")


Exit run_tests.sh with return value (#92)

--- cmake/modules/SerialboxTestScript.cmake
+++ cmake/modules/SerialboxTestScript.cmake
@@ -104,7 +104,8 @@
        "  printf \"\\n  >>>>>>>>>>>>>>>> TESTS FAILED <<<<<<<<<<<<<<<<\\n\\n\"\n"
        "else\n"
        "  printf \"\\n  ALL TESTS PASSED\\n\\n\"\n"
-       "fi\n")
+       "fi\n"
+       "exit $res")
   file(INSTALL ${SERIALBOX_TEST_SCRIPT} DESTINATION ${CMAKE_BINARY_DIR}/install
        FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ)
 endfunction(serialbox_test_end)


glib: remove useless print

glib: remove useless print

--- cmake/qibuild/modules/glib-config.cmake
+++ cmake/qibuild/modules/glib-config.cmake
@@ -1,9 +1,6 @@
 ## Copyright (C) 2011 Aldebaran Robotics

-message(STATUS "HERE")
-
 clean(GLIB)
-

 # Note:
 # when cross-compiling, you should add


Got rid of useless comment.

Got rid of useless comment.

--- cmake/Modules/add_polywog_executable.cmake
+++ cmake/Modules/add_polywog_executable.cmake
@@ -1,4 +1,3 @@
-# This function adds a (serial) unit test executable to be built using cmockery.
 function(add_polywog_executable exe)
   add_executable(${exe} ${ARGN})
   target_link_libraries(${exe} ${POLYWOG_LIBRARIES})


Fix trailing spaces [skip ci]

Fix trailing spaces [skip ci]

--- cmake/core/sugar_install_ios_library.cmake
+++ cmake/core/sugar_install_ios_library.cmake
@@ -35,7 +35,7 @@
       CODE
       "execute_process(
           COMMAND
-          ${cmd}
+          ${cmd}
           WORKING_DIRECTORY
           ${PROJECT_BINARY_DIR}
       )"


GLOBbing is fine, WARNING if install_name_tool not found

--- cmake/modules/XROOTDApplePostInstall.cmake
+++ cmake/modules/XROOTDApplePostInstall.cmake
@@ -8,22 +8,7 @@

 function(xrootd_libs_change_rpath build_libdir install_libdir)

-  set(XROOTD_ALL_LIBRARIES libXrdAppUtils.dylib libXrdBlacklistDecision-4.so
-                           libXrdBwm-4.so libXrdCksCalczcrc32-4.so
-                           libXrdCl.dylib libXrdClProxyPlugin-4.so
-                           libXrdClient.dylib libXrdCmsRedirectLocal-4.so
-                           libXrdCrypto.dylib libXrdCryptoLite.dylib
-                           libXrdFfs.dylib libXrdFileCache-4.so
-                           libXrdN2No2p-4.so libXrdOssSIgpfsT-4.so
-                           libXrdPosix.dylib libXrdPosixPreload.dylib
-                           libXrdPss-4.so libXrdSec-4.so libXrdSecProt-4.so
-                           libXrdSeckrb5-4.so libXrdSecpwd-4.so
-                           libXrdSecsss-4.so libXrdSecunix-4.so
-                           libXrdServer.dylib libXrdSsi-4.so
-                           libXrdSsiLib.dylib libXrdSsiLog-4.so
-                           libXrdSsiShMap.dylib libXrdThrottle-4.so
-                           libXrdUtils.dylib libXrdXml.dylib libXrdXrootd-4.so
-  )
+  file(GLOB XROOTD_ALL_LIBRARIES "${install_libdir}/libXrd*")

   find_program(INSTALL_NAME_TOOL install_name_tool)

@@ -31,13 +16,15 @@
     message(STATUS "Found tool ${INSTALL_NAME_TOOL}")
     message(STATUS "Adjusting LC_RPATH variable of XRootD libraries in ${install_libdir}")

-    foreach(XRD_LIB_PATH IN LISTS XROOTD_ALL_LIBRARIES)
+    foreach(XRD_LIB_PATH ${XROOTD_ALL_LIBRARIES})
       execute_process(COMMAND ${INSTALL_NAME_TOOL} -rpath
                               ${build_libdir} ${install_libdir}
                               ${install_libdir}/${XRD_LIB_PATH}
                       ERROR_QUIET
       )
     endforeach()
+  else()
+    message(WARNING "install_name_tool was not found. LC_RPATH variable will not be modified.")
   endif()

 endfunction()


Revert "changing findRTT cmake logic"

Revert "changing findRTT cmake logic"

This reverts commit 4355bb0be2c18650a06230089fb533953c502fbb.

--- lib/orogen/templates/config/FindOrocosCORBA.cmake
+++ lib/orogen/templates/config/FindOrocosCORBA.cmake
@@ -1,20 +1,20 @@
-IF (NOT OROCOS-RTT_FOUND)
-    FIND_PACKAGE(OROCOS-RTT REQUIRED)
-ENDIF(NOT OROCOS-RTT_FOUND)
+IF (NOT OrocosRTT_FOUND)
+    FIND_PACKAGE(OrocosRTT REQUIRED)
+ENDIF(NOT OrocosRTT_FOUND)

-#pkg_check_modules(OrocosCORBA "orocos-rtt-corba-${OROCOS_TARGET}>=1.99.4")
-IF(NOT OROCOS-RTT_CORBA_FOUND)
+pkg_check_modules(OrocosCORBA "orocos-rtt-corba-${OROCOS_TARGET}>=1.99.4")
+IF(NOT OrocosCORBA_FOUND)
     IF (OrocosCORBA_FIND_REQUIRED)
 	MESSAGE(FATAL_ERROR "RTT has not been built with CORBA support")
     ELSEIF(NOT OrocosCORBA_FIND_QUIETLY)
 	MESSAGE(STATUS "RTT has not been built with CORBA support")
     ENDIF (OrocosCORBA_FIND_REQUIRED)

-ELSE(NOT OROCOS-RTT_CORBA_FOUND)
+ELSE(NOT OrocosCORBA_FOUND)
     LIST(APPEND OROCOS_COMPONENT_INCLUDE ${OrocosCORBA_INCLUDE_DIRS})

     # First, find the actual implementation of the used ORB (TAO or OMNIORB)
-    FIND_FILE( OrocosCORBA_config rtt/transports/corba/rtt-corba-config.h ${OROCOS-RTT_INCLUDE_DIRS})
+    FIND_FILE( OrocosCORBA_config rtt/transports/corba/rtt-corba-config.h ${OrocosRTT_INCLUDE_DIRS})
     FILE(STRINGS ${OrocosCORBA_config} CORBA_IMPLEMENTATION
         REGEX "define RTT_CORBA_IMPLEMENTATION ")
     STRING(STRIP ${CORBA_IMPLEMENTATION} CORBA_IMPLEMENTATION)
@@ -66,5 +66,5 @@
             MESSAGE(FATAL_ERROR "unknown Corba implementation ${CORBA_IMPLEMENTATION}")
         ENDIF (CORBA_IMPLEMENTATION STREQUAL "TAO")
     ENDIF (_orocos_corba_typekit)
-ENDIF(NOT OROCOS-RTT_CORBA_FOUND)
+ENDIF(NOT OrocosCORBA_FOUND)


Fixed typo

Fixed typo

--- cmake/CMakeModules/FindOssimVideo.cmake
+++ cmake/CMakeModules/FindOssimVideo.cmake
@@ -31,7 +31,7 @@
 		lib64
 		lib
 		Frameworks )
-)
+

 # handle the QUIETLY and REQUIRED arguments and set OSSIMVIDEO_FOUND to TRUE if
 # all listed variables are TRUE


git clone增加REQUIRED选项

git clone增加REQUIRED选项

--- project/cmake/modules/ProjectBuildTools.cmake
+++ project/cmake/modules/ProjectBuildTools.cmake
@@ -257,7 +257,7 @@
     if (CMAKE_VERSION VERSION_LESS_EQUAL "3.4")
         include(CMakeParseArguments)
     endif ()
-    set(optionArgs GIT_ENABLE_SUBMODULE)
+    set(optionArgs GIT_ENABLE_SUBMODULE REQUIRED)
     set(oneValueArgs URL WORKING_DIRECTORY REPO_DIRECTORY DEPTH BRANCH COMMIT TAG CHECK_PATH)
     cmake_parse_arguments(project_git_clone_3rd_party "${optionArgs}" "${oneValueArgs}" "" ${ARGN} )

@@ -289,6 +289,14 @@
     find_package(Git)
     if (NOT GIT_FOUND AND NOT Git_FOUND)
         message(FATAL_ERROR "git not found")
+    endif ()
+
+    unset(project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS)
+    if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15")
+        list(APPEND project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS COMMAND_ECHO STDOUT)
+    endif ()
+    if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18")
+        list(APPEND project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE)
     endif ()

     if (PROJECT_RESET_DENPEND_REPOSITORIES AND EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
@@ -297,6 +305,7 @@
             COMMAND ${GIT_EXECUTABLE} reset --hard
             WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
             RESULT_VARIABLE LAST_GIT_RESET_RESULT
+            ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
         )

         if (LAST_GIT_RESET_RESULT AND NOT LAST_GIT_RESET_RESULT EQUAL 0)
@@ -318,65 +327,90 @@
         execute_process(
             COMMAND ${GIT_EXECUTABLE} init
             WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+            ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
         )
         execute_process(
             COMMAND ${GIT_EXECUTABLE} remote add origin "${project_git_clone_3rd_party_URL}"
             WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+            ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
         )

         if (NOT project_git_clone_3rd_party_GIT_BRANCH AND NOT project_git_clone_3rd_party_COMMIT)
             unset(project_git_clone_3rd_party_GIT_CHECK_REPO)
             execute_process(
                 COMMAND ${GIT_EXECUTABLE} ls-remote --symref origin HEAD
+                RESULT_VARIABLE project_git_clone_3rd_party_GIT_LS_REMOTE_RESULT
                 WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
                 OUTPUT_VARIABLE project_git_clone_3rd_party_GIT_CHECK_REPO
+                ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
             )
             if (project_git_clone_3rd_party_GIT_CHECK_REPO AND project_git_clone_3rd_party_GIT_CHECK_REPO MATCHES "ref.*refs/heads/([^ \t]*)[ \t]*HEAD.*")
                 set(project_git_clone_3rd_party_GIT_BRANCH "${CMAKE_MATCH_1}")
             else ()
                 execute_process(
                     COMMAND ${GIT_EXECUTABLE} ls-remote origin HEAD
+                    RESULT_VARIABLE project_git_clone_3rd_party_GIT_LS_REMOTE_RESULT
                     WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
                     OUTPUT_VARIABLE project_git_clone_3rd_party_GIT_CHECK_REPO
+                    ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
                 )
                 if (project_git_clone_3rd_party_GIT_CHECK_REPO MATCHES "^([a-zA-Z0-9]*)[ \t]*HEAD.*")
                     set(project_git_clone_3rd_party_COMMIT "${CMAKE_MATCH_1}")
                 endif ()
             endif ()
             if(NOT project_git_clone_3rd_party_GIT_BRANCH AND NOT project_git_clone_3rd_party_COMMIT)
+                if (NOT project_git_clone_3rd_party_GIT_LS_REMOTE_RESULT EQUAL 0 AND project_git_clone_3rd_party_REQUIRED)
+                    message(FATAL_ERROR "git ls-remote --symref origin(${project_git_clone_3rd_party_URL}) HEAD failed")
+                endif ()
                 # Fallback
                 set(project_git_clone_3rd_party_GIT_BRANCH master)
             endif ()
             unset(project_git_clone_3rd_party_GIT_CHECK_REPO)
+            unset(project_git_clone_3rd_party_GIT_LS_REMOTE_RESULT)
         endif()

         if (project_git_clone_3rd_party_GIT_BRANCH)
             execute_process(
                 COMMAND ${GIT_EXECUTABLE} fetch "--depth=${project_git_clone_3rd_party_DEPTH}" "-n" origin ${project_git_clone_3rd_party_GIT_BRANCH}
+                RESULT_VARIABLE project_git_clone_3rd_party_GIT_FETCH_RESULT
                 WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+                ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
             )
+            if (NOT project_git_clone_3rd_party_GIT_FETCH_RESULT EQUAL 0 AND project_git_clone_3rd_party_REQUIRED)
+                message(FATAL_ERROR "git fetch origin(${project_git_clone_3rd_party_URL}) ${project_git_clone_3rd_party_GIT_BRANCH} failed")
+            endif ()
         else ()
             if (GIT_VERSION_STRING VERSION_GREATER_EQUAL "2.11.0")
                 execute_process(
                     COMMAND ${GIT_EXECUTABLE} fetch "--deepen=${project_git_clone_3rd_party_DEPTH}" "-n" origin ${project_git_clone_3rd_party_COMMIT}
+                    RESULT_VARIABLE project_git_clone_3rd_party_GIT_FETCH_RESULT
                     WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+                    ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
                 )
             else()
                 message(WARNING "It's recommended to use git 2.11.0 or upper to only fetch partly of repository.")
                 execute_process(
                     COMMAND ${GIT_EXECUTABLE} fetch "-n" origin ${project_git_clone_3rd_party_COMMIT}
+                    RESULT_VARIABLE project_git_clone_3rd_party_GIT_FETCH_RESULT
                     WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+                    ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
                 )
             endif()
+            if (NOT project_git_clone_3rd_party_GIT_FETCH_RESULT EQUAL 0 AND project_git_clone_3rd_party_REQUIRED)
+                message(FATAL_ERROR "git fetch origin(${project_git_clone_3rd_party_URL}) ${project_git_clone_3rd_party_GIT_BRANCH} failed")
+            endif ()
         endif()
+        unset(project_git_clone_3rd_party_GIT_FETCH_RESULT)
         execute_process(
             COMMAND ${GIT_EXECUTABLE} reset --hard FETCH_HEAD
             WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+            ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
         )
         if (project_git_clone_3rd_party_GIT_ENABLE_SUBMODULE)
             execute_process(
                 COMMAND ${GIT_EXECUTABLE} submodule update --init -f
                 WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+                ${project_git_clone_3rd_party_EXECUTE_PROCESS_FLAGS}
             )
         endif ()
     endif ()


PackageConfig: Fix automatic component detection, part deux

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -61,8 +61,9 @@
   "            \"not found in \${PACKAGE_PREFIX_DIR}/lib\")\n"
   "        endif()\n"
   "      else()\n"
-  "        set(${UPPER_PROJECT_NAME}_\${_component}_FOUND TRUE)\n"
-  "        set(${UPPER_PROJECT_NAME}_\${_component}_LIBRARY \${\${_component}_libraryname})\n"
+  "        string(TOUPPER \${_component} _COMPONENT)\n"
+  "        set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_FOUND TRUE)\n"
+  "        set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_LIBRARY \${\${_component}_libraryname})\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_component}_libraryname})\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "      endif()\n"
@@ -71,18 +72,20 @@
 # if no component was specified, find all produced libraries
   "    set(${UPPER_PROJECT_NAME}_LIBRARY_NAMES "@LIBRARY_NAMES@")\n"
   "    foreach(_libraryname \${${UPPER_PROJECT_NAME}_LIBRARY_NAMES})\n"
-  "      string(TOUPPER \${_libraryname} _librarynameUC)\n"
-  "      find_library(\${_librarynameUC}_LIBRARY \${_libraryname} NO_DEFAULT_PATH\n"
+  "      string(TOUPPER \${_libraryname} _LIBRARYNAME)\n"
+  "      find_library(\${_LIBRARYNAME}_LIBRARY \${_libraryname} NO_DEFAULT_PATH\n"
   "                   PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
-  "      if(\${_librarynameUC}_LIBRARY MATCHES "\${_librarynameUC}_LIBRARY-NOTFOUND")\n"
+  "      if(\${_LIBRARYNAME}_LIBRARY MATCHES "\${_LIBRARYNAME}_LIBRARY-NOTFOUND")\n"
   "        set(_fail \"\${_libraryname} not found\")\n"
   "        if(_out)\n"
   "          message(\${_output_type} \"   Missing the ${CMAKE_PROJECT_NAME} \"\n"
   "            \"library in \${PACKAGE_PREFIX_DIR}/lib.\")\n"
   "        endif()\n"
   "      else()\n"
-  "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_librarynameUC}_LIBRARY})\n"
+  "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_LIBRARYNAME}_LIBRARY})\n"
   "        string(REPLACE \"${CMAKE_PROJECT_NAME}_\" \"\" _component \${_libraryname})\n"
+  "        string(TOUPPER \${_component} _COMPONENT)\n"
+  "        set(${UPPER_PROJECT_NAME}_\${_COMPONENT}_FOUND TRUE)\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
   "      endif()\n"
   "    endforeach()\n"


Remove inconsistent space

Remove inconsistent space

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -14,7 +14,7 @@
 * Enforces the project has a VERSION set.
 ]]

-include (CMakeParseArguments) #Backwards compatibility
+include(CMakeParseArguments) #Backwards compatibility

 #This must be a macro since project defines scope-local variables
 #that we generally rely on being in the root context.


Read in compiler/linker flags from environment as well

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26926 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_cached_variables.cmake
+++ deal.II/cmake/setup_cached_variables.cmake
@@ -96,6 +96,14 @@

 #
+# Read in CFLAGS, CXXFLAGS and LDFLAGS from environment
+#
+SET_IF_EMPTY(CMAKE_C_FLAGS "$ENV{CFLAGS}")
+SET_IF_EMPTY(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS}")
+SET_IF_EMPTY(CMAKE_SHARED_LINKER_FLAGS "$ENV{LDFLAGS}")
+
+
+#
 # Set cached compiler flags to an empty string:
 #
 SET(deal_ii_used_flags


Fix bug that prevented XCode to switch between Release and Debug build type.

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -19,8 +19,11 @@
     # type (cf. http://www.cmake.org/pipermail/cmake/2006-December/012288.html)
     # Therefore, we re-define the CMAKE_CONFIGURATION_TYPES here according to the value
     # in CMAKE_BUILD_TYPES.
-    set(CMAKE_CONFIGURATION_TYPES ${CMAKE_BUILD_TYPE})
-    message(STATUS ">> Re-defining variable CMAKE_CONFIGURATION_TYPES := ${CMAKE_CONFIGURATION_TYPES}")
+    if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+	set(CMAKE_CONFIGURATION_TYPES "Release;Debug")
+    else ()
+        set(CMAKE_CONFIGURATION_TYPES "Debug;Release")
+    endif ()

 endif()


[CMAKE] Fix bitcoind cross build for OSX

Summary:
Use `CMAKE_<LANG>_FLAGS_INIT` (note the _INIT) variables to set the
target. This variable will set the corresponding `CMAKE_<LANG>_FLAGS`
variable, but is also used to initalize the `CMAKE_REQUIRED_FLAGS` for
various check_xxx functions such as `check_include_file()` or
`check_symbol_exist()`. This fixes the architecture mismatch issue.

Depends on D3031.

Test Plan:
  mkdir buildcmake && cd buildcmake
  cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake \
  -DBUILD_BITCOIN_QT=OFF ..
  ninja
The build should succeed.
Check the generated `src/bitcoind` runs on OSX >= 10.8 (tested on OSX
Sierra 10.12.6).

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3032

--- cmake/platforms/OSX.cmake
+++ cmake/platforms/OSX.cmake
@@ -32,8 +32,8 @@
 	" -mlinker-version=253.9"
 )

-string(APPEND CMAKE_C_FLAGS ${OSX_EXTRA_FLAGS})
-string(APPEND CMAKE_CXX_FLAGS ${OSX_EXTRA_FLAGS} " -stdlib=libc++")
+string(APPEND CMAKE_C_FLAGS_INIT ${OSX_EXTRA_FLAGS})
+string(APPEND CMAKE_CXX_FLAGS_INIT ${OSX_EXTRA_FLAGS} " -stdlib=libc++")

 # Ensure we use an OSX specific version of ar, ranlib and nm.
 find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}-ar)


Added MSVC-specific option to use the statically linked runtime library

--- cmake/PlatformWindowsMSVC.cmake
+++ cmake/PlatformWindowsMSVC.cmake
@@ -50,6 +50,12 @@
       /bigobj       # -> an object file can hold up to 65,536 (2^16) addressable sections,
                     #    /bigobj increases that address capacity to 4,294,967,296 (2^32).
 )
+
+option(OPTION_MSVC_STATIC_RUNTIME "Use statically linked C/C++ runtime library" OFF)
+if (OPTION_MSVC_STATIC_RUNTIME)
+  set(WIN32_COMPILE_FLAGS ${WIN32_COMPILE_FLAGS} $<$<CONFIG:Release>:/MT> $<$<CONFIG:Debug>:/MTd>)
+endif()
+

 # http://support.microsoft.com/kb/154419
 # "Programs that use the Standard C++ library must be compiled


[CMake][Apple-stage2] Don't link with -fno-pie

On Darwin the default is to build PIC and link PIE. We shouldn't need to override that in the Apple Clang distributions.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@268642 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -25,7 +25,6 @@
 set(LLVM_ENABLE_LTO ON CACHE BOOL "")
 set(CMAKE_C_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
 set(CMAKE_CXX_FLAGS "-fno-stack-protector -fno-common -Wno-profile-instr-unprofiled" CACHE STRING "")
-set(CMAKE_EXE_LINKER_FLAGS "-fno-pie" CACHE STRING "")
 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")


Removing the global LINK_FLAGS; we will use it separately for each target

--- cmake/modules/ALICEMacros.cmake
+++ cmake/modules/ALICEMacros.cmake
@@ -181,8 +181,6 @@
     Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
   Endif(CMAKE_Fortran_COMPILER MATCHES g95)

-  Set(LINK_FLAGS "${LINK_FLAGS} -m64")
-
 # I think this is useless
 #  Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES} -L/usr/X11R6/lib -lX11")
   Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
@@ -193,8 +191,6 @@
 #Set(ROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} ${OPENGL_INCLUDE_DIR})
 # Poor man's version of the above
   Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
-
-  Set(LINK_FLAGS "${LINK_FLAGS} -bind_at_load")

 #
 # LD            = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
@@ -237,13 +233,9 @@
     Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
   Endif(CMAKE_Fortran_COMPILER MATCHES g95)

-  Set(LINK_FLAGS "${LINK_FLAGS} -m64")
-
   Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")

   Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
-
-  Set(LINK_FLAGS "${LINK_FLAGS}")

 Endif(ALICE_TARGET STREQUAL linuxx8664gcc)

@@ -276,13 +268,9 @@
     Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
   Endif(CMAKE_Fortran_COMPILER MATCHES g95)

-  Set(LINK_FLAGS "${LINK_FLAGS} -m32")
-
   Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")

   Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
-
-  Set(LINK_FLAGS "${LINK_FLAGS}")

 Endif(ALICE_TARGET STREQUAL linux)

@@ -330,8 +318,6 @@

   Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)

-  Set(LINK_FLAGS "${LINK_FLAGS} -bind_at_load -single_module")
-
 Endif(ALICE_TARGET STREQUAL macosx)

 # solarisCC5
@@ -350,9 +336,7 @@

   Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)

-  Set(LINK_FLAGS "${LINK_FLAGS} -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl")
-
-Set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl")
+  Set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -L/usr/dt/lib -L/usr/openwin/lib -L/usr/ccs/lib -lXm -lXt -lX11 -lm -lgen -ldl -lsocket -lsunmath -lfsu -lfui -lnsl")

 Endif(ALICE_TARGET STREQUAL solarisCC5)


More closely matched arduino upload.

More closely matched arduino upload.

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -450,16 +450,19 @@
     if(DEFINED ${TARGET_NAME}_AFLAGS)
         set(AVRDUDE_FLAGS ${${TARGET_NAME}_AFLAGS})
     endif()
+    if (${${BOARD_ID}.upload.protocol} STREQUAL "stk500")
+        set(${BOARD_ID}.upload.protocol "stk500v1")
+    endif()
     add_custom_target(${TARGET_NAME}-upload
-                     ${ARDUINO_AVRDUDE_PROGRAM}
-                         -U flash:w:${TARGET_NAME}.hex
-                         ${AVRDUDE_FLAGS}
-                         -C ${ARDUINO_AVRDUDE_CONFIG_PATH}
-                         -p ${${BOARD_ID}.build.mcu}
-                         -c ${${BOARD_ID}.upload.protocol}
-                         -b ${${BOARD_ID}.upload.speed}
-                         -P ${PORT}
-                     DEPENDS ${TARGET_NAME})
+                     ${ARDUINO_AVRDUDE_PROGRAM}
+                        ${AVRDUDE_FLAGS}
+                         -C${ARDUINO_AVRDUDE_CONFIG_PATH}
+                         -p${${BOARD_ID}.build.mcu}
+                         -c${${BOARD_ID}.upload.protocol}
+                         -P${PORT} -b${${BOARD_ID}.upload.speed}
+                         -D
+                         -Uflash:w:${CMAKE_BINARY_DIR}/${TARGET_NAME}.hex:i
+                         DEPENDS ${TARGET_NAME})
     if(NOT TARGET upload)
         add_custom_target(upload)
     endif()


- Added library generation support

- Added library generation support

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -97,6 +97,11 @@
                                                  _HDRS       # Headers
                                                  _LIBS       # Libraries to linked in
                                                  _BOARD)     # Board name (such as uno, mega2560, ...)
+    set(INPUT_AUTOLIBS True)
+    if(DEFINED ${TARGET_NAME}_NO_AUTOLIBS AND ${TARGET_NAME}_NO_AUTOLIBS)
+        set(INPUT_AUTOLIBS False)
+    endif()
+
     message(STATUS "Generating ${TARGET_NAME}")

     set(ALL_LIBS)
@@ -111,7 +116,8 @@

     list(APPEND ALL_LIBS ${CORE_LIB} ${INPUT_LIBS})

-    #setup_arduino_target(${TARGET_NAME} "${ALL_SRCS}" "${ALL_LIBS}")
+    add_library(${TARGET_NAME} ${ALL_SRCS})
+    target_link_libraries(${TARGET_NAME} ${ALL_LIBS})
 endfunction()

 function(GENERATE_ARDUINO_FIRMWARE TARGET_NAME)


Fix cmake flag: SWIFT_ENABLE_STDLIBCORE_EXCLUSIVITY_CHECKING

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -245,6 +245,10 @@
     list(APPEND swift_flags "-Xfrontend" "-enable-sil-ownership")
   endif()

+  if(SWIFT_ENABLE_STDLIBCORE_EXCLUSIVITY_CHECKING AND SWIFTFILE_IS_STDLIB)
+    list(APPEND swift_flags "-Xfrontend" "-enforce-exclusivity=checked")
+  endif()
+
   if(SWIFT_EMIT_SORTED_SIL_OUTPUT)
     list(APPEND swift_flags "-Xfrontend" "-emit-sorted-sil")
   endif()


fbcode_builder: fix a minor bug in THRIFT_INCLUDE_DIR argument parsing

Summary:
Fix a minor bug in the argument parsing for `add_fbthrift_cpp_library()`:
only a single value should be supplied for the `THRIFT_INCLUDE_DIR` argument.
This parameter should not accept a list of arguments.

Reviewed By: strager

Differential Revision: D17125810

fbshipit-source-id: 31f354e4d6299d3626a94f3b4b5ff8c58bb0cf7b

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -22,8 +22,8 @@
 #   desired.
 function(add_fbthrift_cpp_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
-  set(one_value_args INCLUDE_DIR)
-  set(multi_value_args SERVICES DEPENDS OPTIONS THRIFT_INCLUDE_DIR)
+  set(one_value_args INCLUDE_DIR THRIFT_INCLUDE_DIR)
+  set(multi_value_args SERVICES DEPENDS OPTIONS)
   fb_cmake_parse_args(
     ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
   )


fix another typo in checkout command for a branch

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -71,7 +71,7 @@
 set(CTEST_SOURCE_DIRECTORY              "${OV_ROOT_DIR}/trunk")

 ## -- BIN Dir
-set(CTEST_BINARY_DIRECTORY              "${OV_ROOT_DIR}/dist")
+set(CTEST_BINARY_DIRECTORY	              "${OV_ROOT_DIR}/dist")

 ## -- DashBoard Root
 set(CTEST_DASHBOARD_ROOT                "${CMAKE_CURRENT_SOURCE_DIR}")
@@ -87,7 +87,7 @@

 ## -- Checkout command
 if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-	set(CTEST_CHECKOUT_COMMAND     "${CTEST_GIT_COMMAND} clone -b {CTEST_BRANCH} git://scm.gforge.inria.fr/openvibe/openvibe.git ${CTEST_SOURCE_DIRECTORY}")
+	set(CTEST_CHECKOUT_COMMAND     "${CTEST_GIT_COMMAND} clone -b ${CTEST_BRANCH} git://scm.gforge.inria.fr/openvibe/openvibe.git ${CTEST_SOURCE_DIRECTORY}")
 endif(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")

 ## -- Update Command


Make sure BOOST_ROOT isn't set when we're searching default system paths

--- util/grappa.cmake
+++ util/grappa.cmake
@@ -31,7 +31,7 @@
   # if boost was not found in third-party, restore any user-specified pointers and search there and in standard paths
   #
   if(NOT Boost_FOUND)
-
+
     # restore any user-specified pointers
     if(Boost_NO_SYSTEM_PATHS_BACKUP)
       set(Boost_NO_SYSTEM_PATHS ${Boost_NO_SYSTEM_PATHS_BACKUP})
@@ -41,6 +41,7 @@
     if(BOOSTROOT_BACKUP)
       set(BOOSTROOT ${BOOSTROOT_BACKUP})
     endif()
+    unset(BOOST_ROOT)
     if(BOOST_ROOT_BACKUP)
       set(BOOST_ROOT ${BOOST_ROOT_BACKUP})
     endif()


Add MPI and Threads to find_mkl_scalapack test

--- tests/find_mkl_scalapack.cmake
+++ tests/find_mkl_scalapack.cmake
@@ -8,6 +8,8 @@
 set(MKL_MESSAGE_PASSING OpenMPI)

 find_package(MKL REQUIRED COMPONENTS ScaLAPACK)
+find_package(Threads REQUIRED)
+find_package(MPI REQUIRED)

 add_definitions(${MKL_DEFINITIONS})
 include_directories(${MKL_INCLUDE_DIRS})
@@ -30,7 +32,7 @@
 )

 add_executable(mkl_scalapack mkl_scalapack.c)
-target_link_libraries(mkl_scalapack ${MKL_LIBRARIES})
+target_link_libraries(mkl_scalapack ${MKL_LIBRARIES} ${MPI_C_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

 # Using GCC requires -lm
 include(CheckFunctionExists)


fbcode_builder: support installing thrift generated header files

Summary:
Update add_thrift_cpp2_library() to add a PUBLIC_HEADER property to the
generated library target, so that the generated headers can be installed using
an `install()` call.  Also add a `HEADER_INSTALL_DIR` property which indicates
the directory they should be installed into.  A `INCLUDE_DIR` argument was
added to customize the include installation path, should anyone care to do so.

This also removes code that was previously incorrectly installing the
generated headers into the source tree.

Reviewed By: wez

Differential Revision: D16853404

fbshipit-source-id: 6f640b2bd347c99804e074fca0209dda37c8a9cf

--- build/fbcode_builder/CMake/ThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/ThriftCppLibrary.cmake
@@ -4,10 +4,26 @@

 include(FBCMakeParseArgs)

+# Generate a C++ library from a thrift file
+#
+# Parameters:
+# - SERVICES <svc1> [<svc2> ...]
+#   The names of the services defined in the thrift file.
+# - DEPENDS <dep1> [<dep2> ...]
+#   A list of other thrift C++ libraries that this library depends on.
+# - OPTIONS <opt1> [<opt2> ...]
+#   A list of options to pass to the thrift compiler.
+# - INCLUDE_DIR <path>
+#   The sub-directory where generated headers will be installed.
+#   Defaults to "include" if not specified.  The caller must still call
+#   install() to install the thrift library if desired.
 function(add_thrift_cpp2_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
+  set(one_value_args INCLUDE_DIR)
   set(multi_value_args SERVICES DEPENDS OPTIONS)
-  fb_cmake_parse_args(ARG "" "" "${multi_value_args}" "${ARGN}")
+  fb_cmake_parse_args(
+    ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
+  )

   get_filename_component(base ${THRIFT_FILE} NAME_WE)
   get_filename_component(
@@ -23,6 +39,9 @@
     "${CMAKE_CURRENT_SOURCE_DIR}/${THRIFT_FILE}"
   )
   get_filename_component(include_prefix ${include_prefix} DIRECTORY)
+  if(NOT DEFINED ARG_INCLUDE_DIR)
+    set(ARG_INCLUDE_DIR "include")
+  endif()

   if (NOT "${include_prefix}" STREQUAL "")
     list(APPEND ARG_OPTIONS "include_prefix=${include_prefix}")
@@ -110,19 +129,11 @@
     ${generated_sources}
   )

-  install(
-    FILES ${generated_headers}
-    DESTINATION $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/gen-cpp2
-  )
-
   target_include_directories(
     "${LIB_NAME}"
-    PRIVATE
-      ${CMAKE_SOURCE_DIR}
-      ${CMAKE_BINARY_DIR}
     PUBLIC
-      ${FOLLY_INCLUDE_DIR}
-      ${FBTHRIFT_INCLUDE_DIR}
+      "$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>"
+      "$<INSTALL_INTERFACE:${ARG_INCLUDE_DIR}>"
   )
   target_link_libraries(
     "${LIB_NAME}"
@@ -132,14 +143,27 @@
       Folly::folly
   )

+  # Add ${generated_headers} to the PUBLIC_HEADER property for ${LIB_NAME}
+  #
+  # This allows callers to install it using
+  # "install(TARGETS ${LIB_NAME} PUBLIC_HEADER)"
+  # However, note that CMake's PUBLIC_HEADER behavior is rather inflexible,
+  # and does have any way to preserve header directory structure.  Callers
+  # must be careful to use the correct PUBLIC_HEADER DESTINATION parameter
+  # when doing this, to put the files the correct directory themselves.
+  # We define a HEADER_INSTALL_DIR property with the include directory prefix,
+  # so typically callers should specify the PUBLIC_HEADER DESTINATION as
+  # "$<TARGET_PROPERTY:${LIB_NAME},HEADER_INSTALL_DIR>"
+  set_property(
+    TARGET "${LIB_NAME}"
+    PROPERTY PUBLIC_HEADER ${generated_headers}
+  )
+
   set_target_properties(
     "${LIB_NAME}"
     PROPERTIES
       EXPORT_PROPERTIES "THRIFT_INCLUDE_DIRECTORY"
       THRIFT_INCLUDE_DIRECTORY "${CMAKE_SOURCE_DIR}"
+      HEADER_INSTALL_DIR "${ARG_INCLUDE_DIR}/${include_prefix}/gen-cpp2"
   )
-
-  get_property(thrift_include_directory
-    TARGET "${LIB_NAME}"
-    PROPERTY THRIFT_INCLUDE_DIRECTORY)
 endfunction()


build linux platform once for tests

build linux platform once for tests

--- toolchains/linux.tests.cmake
+++ toolchains/linux.tests.cmake
@@ -16,7 +16,7 @@
 include_directories(${CORE_INCLUDE_DIRS})
 include_directories(${CORE_LIBRARIES_INCLUDE_DIRS})

-set(LINUX_PLATFORM_SRC
+add_library(linux_platform
   ${PROJECT_SOURCE_DIR}/linux/src/platform_linux.cpp
   ${PROJECT_SOURCE_DIR}/linux/src/urlWorker.cpp
 )
@@ -32,9 +32,10 @@

     set(EXECUTABLE_NAME "${test_name}.out")

-    add_executable(${EXECUTABLE_NAME} ${_src_file_path} ${LINUX_PLATFORM_SRC})
+    add_executable(${EXECUTABLE_NAME} ${_src_file_path})

-    target_link_libraries(${EXECUTABLE_NAME} core -lcurl glfw ${GLFW_LIBRARIES})
+    target_link_libraries(${EXECUTABLE_NAME}
+      core linux_platform -lcurl glfw ${GLFW_LIBRARIES})

     set(LAST_TARGET ${EXECUTABLE_NAME})


Quote incoming variables for CPM_Export* functions.

Solves bugs related to exporting multiple targets or definitions.

--- CPM.cmake
+++ CPM.cmake
@@ -692,13 +692,13 @@
 # As with ExportAdditionalIncludeDirectory, this only exposes the definition
 # to the direct consumer of the module. None of the consumer's parents.
 macro(CPM_ExportAdditionalDefinition def)
-  set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} ${def} PARENT_SCOPE)
-  set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} ${def})
+  set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} "${def}" PARENT_SCOPE)
+  set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} "${def}")
 endmacro()

 macro(CPM_ExportAdditionalLibraryTarget def)
-  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} ${def} PARENT_SCOPE)
-  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} ${def})
+  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} "${def}" PARENT_SCOPE)
+  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} "${def}")
 endmacro()

 # We use this code in multiple places to check that we don't have preprocessor


Hard-coded raptor include path in FindRAPTOR module

--- source/raptor/FindRAPTOR.cmake
+++ source/raptor/FindRAPTOR.cmake
@@ -46,6 +46,7 @@
               /usr/local/include/raptor2    # Homebrew
               $ENV{HOME}/.linuxbrew/include/raptor2  # linuxbrew
               $ENV{LINUXBREW}/include/raptor2
+              /home/linuxbrew/.linuxbrew/include/raptor2
               /usr/include/raptor2
              NO_DEFAULT_PATH)

@@ -74,7 +75,7 @@
     find_library(RAPTOR_LIBRARY NAMES raptor2 libraptor2)
     endif ()
     message("Found Raptor at ${RAPTOR_LIBRARY}")
-    message("home: $ENV{HOME}")
+    message("home: $ENV{LINUXBREW}")
     message("user: $ENV{USER}")
     file(GLOB_RECURSE include_files LIST_DIRECTORIES true $ENV{LINUXBREW}/include/*)
     message("${include_files}")


Fix redundant include to GitHubInfo which comes with ProjectInfo

--- Common.cmake
+++ Common.cmake
@@ -139,7 +139,6 @@
 include(CommonLibrary)
 include(Compiler)
 include(Coverage)
-include(GithubInfo)
 include(GitTargets)
 include(Maturity)
 include(ProjectInfo)


ENH: install selftester script in packages

--- SuperBuild/Packaging/InstallSupportFiles.cmake
+++ SuperBuild/Packaging/InstallSupportFiles.cmake
@@ -299,6 +299,17 @@
   ##################### install cli and gui scripts #######################
   install(PROGRAMS ${PKG_APP_SCRIPTS}  DESTINATION ${PKG_STAGE_BIN_DIR})

+  ########################## selftest script ##############################
+  if(WIN32)
+    set(PACKAGE_SELFTEST_SCRIPT selftester.bat)
+  else()
+    set(PACKAGE_SELFTEST_SCRIPT selftester.sh)
+  endif()
+  install(
+    FILES ${PACKAGE_SUPPORT_FILES_DIR}/${PACKAGE_SELFTEST_SCRIPT}
+    DESTINATION ${PKG_STAGE_BIN_DIR}
+    )
+

 endfunction()


Eigen creates directory where it downloads tar file

--- modules/LookUpEigen3.cmake
+++ modules/LookUpEigen3.cmake
@@ -18,6 +18,7 @@
       endif()
   endif()
   if(NOT file_found)
+      file(MAKE_DIRECTORY "${EXTERNAL_ROOT}")
       find_package(Wget)
       if(WGET_FOUND)
           execute_process(COMMAND ${WGET_EXECUTABLE}


FIX: warning during SimpleRTK configure

FIX: warning during SimpleRTK configure

--- utilities/SimpleRTK/CMake/srtkSourceVersion.cmake
+++ utilities/SimpleRTK/CMake/srtkSourceVersion.cmake
@@ -47,7 +47,7 @@
 endif()

 # find the closest anotated tag with the v prefix for version
-git_describe(_GIT_TAG "--match=v*")
+git_describe(_GIT_TAG "--match=v* --tags")

 git_commits_since("${PROJECT_SOURCE_DIR}/Version.cmake" _GIT_VERSION_COUNT)


no quotes around cmake build type

no quotes around cmake build type

--- src/cake.cmake
+++ src/cake.cmake
@@ -380,6 +380,7 @@
 	cake_message(FATAL_ERROR "Last option '${last_switch}' missing parameter.")
 endif()

+
 if(opt_configs)
 	list(REMOVE_DUPLICATES opt_configs)
 endif()
@@ -486,7 +487,7 @@
 				file(REMOVE_RECURSE ${binary_dir})
 			endif()
 			if(config AND NOT multi_config_generator)
-				set(cbt -DCMAKE_BUILD_TYPE=\"${config}\")
+				set(cbt "-DCMAKE_BUILD_TYPE=${config}")
 			else()
 				unset(cbt)
 			endif()


add src/logic_gates.cc to srcs

add src/logic_gates.cc to srcs

--- eugenics/build_list.cmake
+++ eugenics/build_list.cmake
@@ -1,3 +1,4 @@
-# rest of .cc's
+# rest of .cc's, prepended with 'src/'
 set(SRCS
+  src/logic_gates.cc
 )


CMake: Added Static postfix to libs in static build

--- CMake/Utils/OgreInstall.cmake
+++ CMake/Utils/OgreInstall.cmake
@@ -11,10 +11,16 @@
 endif ()

 function(ogre_install_lib LIBNAME)
+  # add static prefix, if compiling static version
+  if (OGRE_STATIC)
+    set_target_properties(${LIBNAME} PROPERTIES
+      OUTPUT_NAME ${LIBNAME}Static
+    )
+  endif ()
   install(TARGETS ${LIBNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	LIBRARY DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	ARCHIVE DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
+	LIBRARY DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
+	ARCHIVE DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
   )
   install(TARGETS ${LIBNAME}
     RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS DEBUG
@@ -24,10 +30,16 @@
 endfunction(ogre_install_lib)

 function(ogre_install_plugin PLUGINNAME)
+  # add static prefix, if compiling static version
+  if (OGRE_STATIC)
+    set_target_properties(${PLUGINNAME} PROPERTIES
+      OUTPUT_NAME ${PLUGINNAME}Static
+    )
+  endif ()
   install(TARGETS ${PLUGINNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	LIBRARY DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	ARCHIVE DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
+	LIBRARY DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
+	ARCHIVE DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
   )
   install(TARGETS ${PLUGINNAME}
     RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS DEBUG
@@ -39,7 +51,7 @@
 function(ogre_install_sample SAMPLENAME)
   if (OGRE_INSTALL_SAMPLES)
     install(TARGETS ${SAMPLENAME}
-      RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo OPTIONAL
+      RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None OPTIONAL
     )
     install(TARGETS ${SAMPLENAME}
       RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS DEBUG OPTIONAL


Update MITK-Data pointer

Update MITK-Data pointer

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,14 +13,13 @@

 if(BUILD_TESTING)

-  set(revision_tag 578a7578)
+  set(revision_tag ab6c5213c778de18f1600975e8818541fd988803)
   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})
   #endif()

   ExternalProject_Add(${proj}
     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz
-    URL_MD5 c7e6573a559d70363231c22ba7eabcb8
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""