Android: Set LIBRARY_OUTPUT_PATH_ROOT to build dir instead of the source dir

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -1616,7 +1616,7 @@
 endif()

 # setup output directories
-set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_SOURCE_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" )
+set( LIBRARY_OUTPUT_PATH_ROOT ${CMAKE_BINARY_DIR} CACHE PATH "root for library output, set this to change where android libs are installed to" )
 set( CMAKE_INSTALL_PREFIX "${ANDROID_TOOLCHAIN_ROOT}/user" CACHE STRING "path for installing" )

 if(NOT _CMAKE_IN_TRY_COMPILE)


use pcl 1.7.2

use pcl 1.7.2

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -317,7 +317,7 @@
   ExternalProject_Add(
     pcl
     GIT_REPOSITORY http://github.com/pointcloudlibrary/pcl.git
-    GIT_TAG pcl-1.7.1
+    GIT_TAG pcl-1.7.2
     CMAKE_CACHE_ARGS
       ${default_cmake_args}
       ${eigen_args}


Fixed cmake bug with NO_LAPACK=1

Fixed cmake bug with NO_LAPACK=1

--- cmake/f_check.cmake
+++ cmake/f_check.cmake
@@ -27,7 +27,10 @@
 endif ()

 if (NOT NO_LAPACK)
-enable_language(Fortran)
+  enable_language(Fortran)
+else()
+  include(CMakeForceCompiler)
+  CMAKE_FORCE_Fortran_COMPILER(gfortran GNU)
 endif()

 if (NOT ONLY_CBLAS)


ENH: Add go doc

ENH: Add go doc

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -77,6 +77,15 @@
 # /cmake/external/*.cmake:
 #
 #   cc_test(example_test SRCS example_test.cc DEPS example glog gflags)
+#
+# To build a go static library using Golang, use the go_ prefixed version:
+#
+#   go_library(example STATIC)
+#
+# To build a go shared library using Golang, use the go_ prefixed version:
+#
+#   go_library(example SHARED)
+#

 if(NOT APPLE)
     find_package(Threads REQUIRED)
@@ -248,15 +257,6 @@
 file(MAKE_DIRECTORY ${GOPATH})
 set(PADDLE_IN_GOPATH "${GOPATH}/src/github.com/PaddlePaddle/Paddle")

-# Because api.go defines a GO wrapper to ops and tensor, it depends on
-# both.  This implies that if any of tensor.{h,cc}, ops.{h,cu}, or
-# api.go is changed, api need to be re-built.
-# go_library(api
-#   SRCS
-#   api.go
-#   DEPS
-#   tensor # Because ops depend on tensor, this line is optional.
-#   ops)
 function(go_library TARGET_NAME)
   set(options STATIC static SHARED shared)
   set(oneValueArgs "")
@@ -296,7 +296,7 @@
     COMMAND rm -rf ${PADDLE_IN_GOPATH}
     COMMAND ln -sf ${CMAKE_SOURCE_DIR} ${PADDLE_IN_GOPATH}
     # Automatically get all dependencies specified in the source code
-    COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get -d .
+    COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} get -d ./..
     # Golang build source code
     COMMAND env GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
     -o "${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}"


Restore LAPACKE files for Xgeqpf, Xggsvd and Xggsvp

These were inadvertently dropped from the list in my PR #1095

--- cmake/lapacke.cmake
+++ cmake/lapacke.cmake
@@ -70,6 +70,8 @@
   lapacke_cgeqlf_work.c
   lapacke_cgeqp3.c
   lapacke_cgeqp3_work.c
+  lapacke_cgeqpf.c
+  lapacke_cgeqpf_work.c
   lapacke_cgeqr.c
   lapacke_cgeqr_work.c
   lapacke_cgeqr2.c
@@ -140,8 +142,12 @@
   lapacke_cggqrf_work.c
   lapacke_cggrqf.c
   lapacke_cggrqf_work.c
+  lapacke_cggsvd.c
+  lapacke_cggsvd_work.c
   lapacke_cggsvd3.c
   lapacke_cggsvd3_work.c
+  lapacke_cggsvp.c
+  lapacke_cggsvp_work.c
   lapacke_cggsvp3.c
   lapacke_cggsvp3_work.c
   lapacke_cgtcon.c
@@ -683,6 +689,8 @@
   lapacke_dgeqlf_work.c
   lapacke_dgeqp3.c
   lapacke_dgeqp3_work.c
+  lapacke_dgeqpf.c
+  lapacke_dgeqpf_work.c
   lapacke_dgeqr.c
   lapacke_dgeqr_work.c
   lapacke_dgeqr2.c
@@ -753,8 +761,12 @@
   lapacke_dggqrf_work.c
   lapacke_dggrqf.c
   lapacke_dggrqf_work.c
+  lapacke_dggsvd.c
+  lapacke_dggsvd_work.c
   lapacke_dggsvd3.c
   lapacke_dggsvd3_work.c
+  lapacke_dggsvp.c
+  lapacke_dggsvp_work.c
   lapacke_dggsvp3.c
   lapacke_dggsvp3_work.c
   lapacke_dgtcon.c
@@ -1249,6 +1261,8 @@
   lapacke_sgeqlf_work.c
   lapacke_sgeqp3.c
   lapacke_sgeqp3_work.c
+  lapacke_sgeqpf.c
+  lapacke_sgeqpf_work.c
   lapacke_sgeqr.c
   lapacke_sgeqr_work.c
   lapacke_sgeqr2.c
@@ -1319,8 +1333,12 @@
   lapacke_sggqrf_work.c
   lapacke_sggrqf.c
   lapacke_sggrqf_work.c
+  lapacke_sggsvd.c
+  lapacke_sggsvd_work.c
   lapacke_sggsvd3.c
   lapacke_sggsvd3_work.c
+  lapacke_sggsvp.c
+  lapacke_sggsvp_work.c
   lapacke_sggsvp3.c
   lapacke_sggsvp3_work.c
   lapacke_sgtcon.c
@@ -1809,6 +1827,8 @@
   lapacke_zgeqlf_work.c
   lapacke_zgeqp3.c
   lapacke_zgeqp3_work.c
+  lapacke_zgeqpf.c
+  lapacke_zgeqpf_work.c
   lapacke_zgeqr.c
   lapacke_zgeqr_work.c
   lapacke_zgeqr2.c
@@ -1879,8 +1899,12 @@
   lapacke_zggqrf_work.c
   lapacke_zggrqf.c
   lapacke_zggrqf_work.c
+  lapacke_zggsvd.c
+  lapacke_zggsvd_work.c
   lapacke_zggsvd3.c
   lapacke_zggsvd3_work.c
+  lapacke_zggsvp.c
+  lapacke_zggsvp_work.c
   lapacke_zggsvp3.c
   lapacke_zggsvp3_work.c
   lapacke_zgtcon.c


clean messages

clean messages

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -156,8 +156,6 @@

 			# 5. compilo y genera el paquete en local
 			message("Generating artifact ${PACKAGE} ...")
-			MESSAGE("run in ${ARTIFACTS_PATH}")
-			MESSAGE("python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY} -o")
 			execute_process(
 				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY} -o
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"


Simplify logic generating argument to pass to ExternalProject

See #418

--- CMake/ctkMacroCheckExternalProjectDependency.cmake
+++ CMake/ctkMacroCheckExternalProjectDependency.cmake
@@ -259,7 +259,6 @@
       if(NOT TARGET ${_sb_PROJECT})
         set_property(GLOBAL APPEND PROPERTY ${_sb_PROJECT}_EP_${_ep_property} ${varname_and_vartype})
         _sb_extract_varname_and_vartype(${varname_and_vartype} _varname)
-        set_property(GLOBAL APPEND PROPERTY ${_sb_PROJECT}_EP_PROPERTIES ${_ep_property})
       else()
         message(FATAL_ERROR "Function _sb_append_to_cmake_args not allowed is project already added !")
       endif()
@@ -312,20 +311,14 @@
   _sb_collect_args(${_ALL_PROJECT_IDENTIFIER})

   set(_ep_arguments "")
-  get_property(_proj_properties GLOBAL PROPERTY ${proj}_EP_PROPERTIES)
-  get_property(_all_properties GLOBAL PROPERTY ${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTIES)
-  set(_properties ${_proj_properties} ${_all_properties})
-  if(_properties)
-    list(REMOVE_DUPLICATES _properties)
-    foreach(property ${_properties})
-      get_property(${proj}_EP_PROPERTY_${property} GLOBAL PROPERTY ${proj}_EP_PROPERTY_${property})
-      get_property(${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property} GLOBAL PROPERTY ${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property})
-      if(${proj}_EP_PROPERTY_${property} OR ${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property})
-        list(APPEND _ep_arguments ${property}
-          ${${proj}_EP_PROPERTY_${property}} ${${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property}})
-      endif()
-    endforeach()
-  endif()
+  foreach(property CMAKE_ARGS CMAKE_CACHE_ARGS)
+    get_property(${proj}_EP_PROPERTY_${property} GLOBAL PROPERTY ${proj}_EP_PROPERTY_${property})
+    get_property(${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property} GLOBAL PROPERTY ${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property})
+    if(${proj}_EP_PROPERTY_${property} OR ${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property})
+      list(APPEND _ep_arguments ${property}
+        ${${proj}_EP_PROPERTY_${property}} ${${_ALL_PROJECT_IDENTIFIER}_EP_PROPERTY_${property}})
+    endif()
+  endforeach()

   list(APPEND _ep_arguments LIST_SEPARATOR ${EP_LIST_SEPARATOR})


Changed the default for davix option (CMake)

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -50,16 +50,19 @@
   set(memstat_defvalue OFF)
   set(explicitlink_defvalue ON)
   set(cocoa_defvalue OFF)
+  set(davix_defvalue OFF)
 elseif(APPLE)
   set(x11_defvalue OFF)
   set(memstat_defvalue ON)
   set(explicitlink_defvalue ON)
   set(cocoa_defvalue ON)
+  set(davix_defvalue OFF)
 else()
   set(x11_defvalue ON)
   set(memstat_defvalue ON)
   set(explicitlink_defvalue ON)
   set(cocoa_defvalue OFF)
+  set(davix_defvalue ON)
 endif()

 ROOT_BUILD_OPTION(afdsmgrd OFF "Dataset manager for PROOF-based analysis facilities")
@@ -86,7 +89,7 @@
 ROOT_BUILD_OPTION(clarens ON "Clarens RPC support, optionally used by PROOF")
 ROOT_BUILD_OPTION(cling ON "Enable new CLING C++ interpreter")
 ROOT_BUILD_OPTION(cocoa ${cocoa_defvalue} "Use native Cocoa/Quartz graphics backend (MacOS X only)")
-ROOT_BUILD_OPTION(davix ON "DavIx library for HTTP/WEBDAV access")
+ROOT_BUILD_OPTION(davix ${davix_defvalue} "DavIx library for HTTP/WEBDAV access")
 ROOT_BUILD_OPTION(dcache ON "dCache support, requires libdcap from DESY")
 ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")
 ROOT_BUILD_OPTION(explicitlink ${explicitlink_defvalue} "Explicitly link with all dependent libraries")


Changed build option comment to reflect reality

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -119,7 +119,7 @@
 ROOT_BUILD_OPTION(builtin_llvm ON "Built the LLVM internally")
 ROOT_BUILD_OPTION(builtin_tbb OFF "Built the TBB internally")
 ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
-ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 5.1.x or clang")
+ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
 ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
 ROOT_BUILD_OPTION(castor ON "CASTOR support, requires libshift from CASTOR >= 1.5.2")
 ROOT_BUILD_OPTION(ccache OFF "Enable ccache usage for speeding up builds")


vita.toolchain.cmake: Remove CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY

On newer cmake (as seen on 3.10.1), this results in it not finding `make`,
resulting in build errors on every homebrew.

--- cmake_toolchain/vita.toolchain.cmake
+++ cmake_toolchain/vita.toolchain.cmake
@@ -109,6 +109,5 @@
 set( CMAKE_INSTALL_PREFIX "${VITASDK}/arm-vita-eabi" CACHE PATH "default install path" )

 # only search for libraries and includes in vita toolchain
-set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
 set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )


Fixed CMAKE_PLATFORM_INFO_DIR variable name

--- cmaked/CMakeDetermineDCompiler.cmake
+++ cmaked/CMakeDetermineDCompiler.cmake
@@ -137,7 +137,7 @@
 ENDIF(MSVC_D_ARCHITECTURE_ID)
 # configure variables set in this file for fast reload later on
 CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeDCompiler.cmake.in
-  "${CMAKE_PLATFORM_ROOT_BIN}/CMakeDCompiler.cmake"
+  "${CMAKE_PLATFORM_INFO_DIR}/CMakeDCompiler.cmake"
   @ONLY IMMEDIATE # IMMEDIATE must be here for compatibility mode <= 2.0
   )
 SET(CMAKE_D_COMPILER_ENV_VAR "DC")


Let InstallPackage.cmake run find_library each time

--- cmake/InstallPackage.cmake
+++ cmake/InstallPackage.cmake
@@ -161,6 +161,8 @@
             set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
         endif()
         pkg_message(DEBUG "Looking for ${pkg_link_type_msg} library names ${PKG_LIBRARY_NAMES}")
+        unset(${pkg_find_name}_LIBRARY)
+        unset(${pkg_find_name}_LIBRARY CACHE)
         find_library(${pkg_find_name}_LIBRARY
                 NAMES ${PKG_LIBRARY_NAMES}
                 HINTS ${pkg_install_dir} ${${pkg_find_name}_ROOT} ${${pkg_name}_ROOT}


cmake: remove trailing whitespaces

cmake: remove trailing whitespaces

--- cmake/Modules/Macros.cmake
+++ cmake/Modules/Macros.cmake
@@ -6,7 +6,7 @@

 MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
   SET(DEFAULT_ARGS)
-  FOREACH(arg_name ${arg_names})
+  FOREACH(arg_name ${arg_names})
     SET(${prefix}_${arg_name})
   ENDFOREACH(arg_name)
   FOREACH(option ${option_names})
@@ -15,16 +15,16 @@

   SET(current_arg_name DEFAULT_ARGS)
   SET(current_arg_list)
-  FOREACH(arg ${ARGN})
-    SET(larg_names ${arg_names})
-    LIST(FIND larg_names "${arg}" is_arg_name)
+  FOREACH(arg ${ARGN})
+    SET(larg_names ${arg_names})
+    LIST(FIND larg_names "${arg}" is_arg_name)
     IF (is_arg_name GREATER -1)
       SET(${prefix}_${current_arg_name} ${current_arg_list})
       SET(current_arg_name ${arg})
       SET(current_arg_list)
     ELSE (is_arg_name GREATER -1)
-      SET(loption_names ${option_names})
-      LIST(FIND loption_names "${arg}" is_option)
+      SET(loption_names ${option_names})
+      LIST(FIND loption_names "${arg}" is_option)
       IF (is_option GREATER -1)
          SET(${prefix}_${arg} TRUE)
       ELSE (is_option GREATER -1)


[cmake] increment version and ABI version

--- cmake/SiconosVersion.cmake
+++ cmake/SiconosVersion.cmake
@@ -1,6 +1,6 @@
 # --- set siconos current version ---
 set(MAJOR_VERSION 4)
-set(MINOR_VERSION 4)
+set(MINOR_VERSION 5)
 set(PATCH_VERSION 0)
 set(SICONOS_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")

@@ -32,7 +32,7 @@
 # If any interfaces have been removed since the last public release, then set
 # age to 0.

-set(SO_current 6)
+set(SO_current 7)
 set(SO_revision 0)
 set(SO_age 0)


Pass along Linux c++11 ABI option, and MSVC runtime.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -120,10 +120,18 @@
     set(ENV_COMMAND env -i PATH=${firebase_command_line_path} HOME=${firebase_command_line_home} )
   endif()

-  set(CMAKE_SUBBUILD_OPTIONS -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}")
+  set(CMAKE_SUBBUILD_OPTIONS)
   message("CMake generator: ${CMAKE_GENERATOR}")
   message("CMake generator platform: ${CMAKE_GENERATOR_PLATFORM}")
-
+  message("CMake toolchain file: ${CMAKE_TOOLCHAIN_FILE}")
+
+  if (CMAKE_BUILD_TYPE)
+    # If Release or Debug were specified, pass it along.
+    set(CMAKE_SUBBUILD_OPTIONS
+        ${CMAKE_SUBBUILD_OPTIONS}
+        -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}")
+  endif()
+
   if(APPLE)
     # Propagate MacOS build flags.
     if(CMAKE_OSX_ARCHITECTURES)
@@ -133,43 +141,43 @@
     endif()
   elseif(MSVC)
     # Propagate MSVC build flags.
-    set(CMAKE_SUBBUILD_OPTIONS
-        ${CMAKE_SUBBUILD_OPTIONS}
-        -A "${CMAKE_GENERATOR_PLATFORM}")
     if(MSVC_RUNTIME_LIBRARY_STATIC)
       if (CMAKE_BUILD_TYPE STREQUALS "Debug")
-        set(CMAKE_SUBBUILD_OPTIONS
-            ${CMAKE_SUBBUILD_OPTIONS}
-            -DCMAKE_C_FLAGS=/MTd
-            -DCMAKE_CXX_FLAGS=/MTd)
+        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MTd")
       else()  // build type
-        set(CMAKE_SUBBUILD_OPTIONS
-          ${CMAKE_SUBBUILD_OPTIONS}
-          -DCMAKE_C_FLAGS=/MT
-          -DCMAKE_CXX_FLAGS=/MT)
+        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MT")
       endif()  // build type
     else()  // runtime library
       if (CMAKE_BUILD_TYPE STREQUALS "Debug")
-        set(CMAKE_SUBBUILD_OPTIONS
-            ${CMAKE_SUBBUILD_OPTIONS}
-            -DCMAKE_C_FLAGS=/MDd
-            -DCMAKE_CXX_FLAGS=/MDd)
+        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MDd")
       else()  // build type
-        set(CMAKE_SUBBUILD_OPTIONS
-            ${CMAKE_SUBBUILD_OPTIONS}
-            -DCMAKE_C_FLAGS=/MD
-            -DCMAKE_CXX_FLAGS=/MD)
+        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MD")
       endif()  // build type
-    endif()  // runtime library
+    set(CMAKE_SUBBUILD_OPTIONS
+        ${CMAKE_SUBBUILD_OPTIONS}
+        -DCMAKE_C_FLAGS=${SUBBUILD_MSVC_RUNTIME_FLAG}
+        -DCMAKE_CXX_FLAGS=${SUBBUILD_MSVC_RUNTIME_FLAG}
+        -A "${CMAKE_GENERATOR_PLATFORM}")
   else()
     # Propagate Linux build flags.
+    if("${CMAKE_CXX_FLAGS}" MATCHES "-D_GLIBCXX_USE_CXX11_ABI=0")
+      set(SUBBUILD_USE_CXX11_ABI 0)
+    else
+      set(SUBBUILD_USE_CXX11_ABI 1)
+    endif()
+    # TODO: Set the above variable
     if(CMAKE_LIBRARY_PATH MATCHES "/usr/lib/i386-linux-gnu")
       set(CMAKE_SUBBUILD_OPTIONS
           ${CMAKE_SUBBUILD_OPTIONS}
           -DCMAKE_SYSTEM_PROCESSOR=i386
-          -DCMAKE_C_FLAGS=-m32
-          -DCMAKE_CXX_FLAGS=-m32
+          -DCMAKE_C_FLAGS="-m32 -D_GLIBCXX_USE_CXX11_ABI=${SUBBUILD_USE_CXX11_ABI}"
+          -DCMAKE_CXX_FLAGS="-m32 -D_GLIBCXX_USE_CXX11_ABI=${SUBBUILD_USE_CXX11_ABI}"
           -DCMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu)
+    else()
+      set(CMAKE_SUBBUILD_OPTIONS
+          ${CMAKE_SUBBUILD_OPTIONS}
+          -DCMAKE_C_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=${SUBBUILD_USE_CXX11_ABI}"
+          -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=${SUBBUILD_USE_CXX11_ABI}")
     endif()
   endif()
   message("Sub-build options: ${CMAKE_SUBBUILD_OPTIONS}")


Bump version

Bump version

--- cmake/ospray_options.cmake
+++ cmake/ospray_options.cmake
@@ -20,7 +20,7 @@

 SET(OSPRAY_VERSION_MAJOR 1)
 SET(OSPRAY_VERSION_MINOR 4)
-SET(OSPRAY_VERSION_PATCH 1)
+SET(OSPRAY_VERSION_PATCH 2)
 SET(OSPRAY_VERSION_GITHASH 0)
 IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git)
   FIND_PACKAGE(Git)


getting opengm now from ilastik/opengm

getting opengm now from ilastik/opengm

--- opengm.cmake
+++ opengm.cmake
@@ -13,7 +13,7 @@

 external_git_repo (opengm
     HEAD
-    https://github.com/opengm/opengm)
+    https://github.com/ilastik/opengm)

 message ("Installing ${opengm_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")


avoid repeated finding

avoid repeated finding

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -45,6 +45,10 @@
 ###############################################################################

 # lint_cmake: -convention/filename, -package/stdargs
+
+if(DEFINED Connext_FOUND)
+  return()
+endif()

 set(Connext_FOUND FALSE)


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -45,6 +45,7 @@
 Name[pl]=GStreamer
 Name[pt]=GStreamer
 Name[pt_BR]=GStreamer
+Name[ro]=GStreamer
 Name[ru]=GStreamer
 Name[se]=GStreamer
 Name[sk]=GStreamer
@@ -97,6 +98,7 @@
 Comment[pl]=Obsługa GStreamera przez Phonon
 Comment[pt]=Infra-estrutura do GStreamer para o Phonon
 Comment[pt_BR]=Infraestrutura do GStreamer para o Phonon
+Comment[ro]=Suportul GStreamer pentru Phonon
 Comment[ru]=Механизм GStreamer для Phonon
 Comment[se]=Phonon GStreamer duogášmohtor
 Comment[sk]=GStreamer podsystém


fix linking exe against matlab libs on ubuntu (once again the compiler here was overly sensitive about the order of the arguments)

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -87,9 +87,10 @@
 endfunction()

 function(add_mex)
-  # useage:  add_mex(target source1 source2 [OBJECT])
-  # if OBJECT is passed in, then it doesn't expect a mexFunction symbol to be defined, and compiles it to e.g., libtarget.so, for eventual linking against another mex file
+  # useage:  add_mex(target source1 source2 [SHARED,EXECUTABLE])
   # note: builds the mex file inplace (not into some build directory)
+  # if SHARED is passed in, then it doesn't expect a mexFunction symbol to be defined, and compiles it to e.g., libtarget.so, for eventual linking against another mex file
+  # if EXECUTABLE is passed in, then it adds an executable target, which is linked against the appropriate matlab libraries.

   list(GET ARGV 0 target)
   list(REMOVE_AT ARGV 0)
@@ -145,7 +146,22 @@
     COMPILE_FLAGS "-DMATLAB_MEX_FILE"
     )

-  if (isshared EQUAL -1 AND isexe EQUAL -1)
+  if (isexe GREATER -1)
+    # see note below
+    if (NOT TARGET last)
+      set(dummy_c_file ${CMAKE_CURRENT_BINARY_DIR}/dummy.c)
+      add_custom_command(COMMAND ${CMAKE_COMMAND} -E touch ${dummy_c_file}
+                         OUTPUT ${dummy_c_file})
+      add_library(last STATIC ${dummy_c_file})
+      target_link_libraries(last ${MEX_CLIBS})
+    endif()
+
+    target_link_libraries(${target} last)
+  elseif (isshared GREATER -1)
+    set_target_properties(${target} PROPERTIES
+      LINK_FLAGS "${MEX_CLIBS}"
+      )
+  else()
     # note: on ubuntu, gcc did not like the MEX_CLIBS coming along with LINK_FLAGS (it only works if they appear after the input files).  this is a nasty trick that I found online
     if (NOT TARGET last)
       set(dummy_c_file ${CMAKE_CURRENT_BINARY_DIR}/dummy.c)
@@ -165,10 +181,6 @@
       LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
       )
     target_link_libraries(${target} last)
-  else()
-    set_target_properties(${target} PROPERTIES
-      LINK_FLAGS "${MEX_CLIBS}"
-      )
   endif()

   # todo: add CLIBS or CXXLIBS to LINK_FLAGS selectively based in if it's a c or cxx target (always added CXX above)


Change of slashes was done in the wrong variable.

--- scripts/PythonPackage.cmake
+++ scripts/PythonPackage.cmake
@@ -73,7 +73,6 @@
             "from os.path import dirname"
             "print(dirname(${PACKAGE}.__file__))"
         )
-        FILE(TO_CMAKE_PATH ${arguments} python_include)
         execute_process(
             COMMAND ${LOCALPYTHON} -c "${arguments}"
             WORKING_DIRECTORY "${PYPACK_WORKING_DIRECTORY}"
@@ -82,7 +81,8 @@
             OUTPUT_VARIABLE OUTPUT
         )
         if("${LOCATION_WAS_FOUND}" STREQUAL "0")
-            string(STRIP "${OUTPUT}" ${PACKAGE}_LOCATION)
+            string(STRIP "${OUTPUT}" OUTPUT)
+            FILE(TO_CMAKE_PATH ${OUTPUT} ${PACKAGE}_LOCATION)
         endif()
     endif()
     find_package_handle_standard_args(${PACKAGE}


Added finder for newer version of Armadillo

--- CMake/FindArmadillo.cmake
+++ CMake/FindArmadillo.cmake
@@ -55,6 +55,7 @@
   /usr/local/include
   /opt/include
   /afs/desy.de/user/y/yoon/armadillo-3.910.1/include
+  $ENV{ARMA_DIR}/include
   #/afs/desy.de/user/y/yoon/armadillo-3.800.2/include
   PATH_SUFFIXES armadillo armadillo_bits
   )
@@ -67,9 +68,8 @@
   /usr/lib
   /usr/local/lib
   /opt/lib
-  /afs/desy.de/user/y/yoon/armadillo-3.910.1
-  #/afs/desy.de/user/y/yoon/armadillo-3.800.2
-#  /usr/lib64
+  /usr/lib64
+  $ENV{ARMA_DIR}
   PATH_SUFFIXES
   )

@@ -81,7 +81,7 @@
 endif (ARMADILLO_INCLUDES)

 if (ARMADILLO_LIBRARIES)
-  MESSAGE("ARMA LIB FOUND")
+  MESSAGE("ARMA LIB FOUND: ${ARMADILLO_LIBRARIES}")
 endif (ARMADILLO_LIBRARIES)

 if (ARMADILLO_INCLUDES AND ARMADILLO_LIBRARIES)
@@ -105,6 +105,9 @@
 # Newer versions use arma_version.hpp
 if (EXISTS "${ARMADILLO_INCLUDES}/arma_version.hpp")
   set(ARMA_VERSION_FILE "${ARMADILLO_INCLUDES}/arma_version.hpp")
+elseif (EXISTS "${ARMADILLO_INCLUDES}/armadillo_bits/arma_version.hpp")
+  set(ARMA_VERSION_FILE "${ARMADILLO_INCLUDES}/armadillo_bits/arma_version.hpp")
+  message (STATUS "FIND_ARMA: YEAH I FOUNZ IT!!!")
 else ()
   if (EXISTS "${ARMADILLO_INCLUDES}/version.hpp")
     set(ARMA_VERSION_FILE "${ARMADILLO_INCLUDES}/version.hpp")
@@ -120,6 +123,10 @@
     file(READ ${ARMA_VERSION_FILE} _contents)
     if(_contents)
         if (EXISTS "${ARMADILLO_INCLUDES}/arma_version.hpp")
+          string(REGEX REPLACE ".*#define ARMA_VERSION_MAJOR \([0-9]+\).*" "\\1" ARMA_MAJOR_VERSION "${_contents}")
+          string(REGEX REPLACE ".*#define ARMA_VERSION_MINOR \([0-9]+\).*" "\\1" ARMA_MINOR_VERSION "${_contents}")
+          string(REGEX REPLACE ".*#define ARMA_VERSION_PATCH \([0-9]+\).*" "\\1" ARMA_PATCH_VERSION "${_contents}")
+        elseif (EXISTS "${ARMADILLO_INCLUDES}/armadillo_bits/arma_version.hpp")
           string(REGEX REPLACE ".*#define ARMA_VERSION_MAJOR \([0-9]+\).*" "\\1" ARMA_MAJOR_VERSION "${_contents}")
           string(REGEX REPLACE ".*#define ARMA_VERSION_MINOR \([0-9]+\).*" "\\1" ARMA_MINOR_VERSION "${_contents}")
           string(REGEX REPLACE ".*#define ARMA_VERSION_PATCH \([0-9]+\).*" "\\1" ARMA_PATCH_VERSION "${_contents}")


Fix #386: Allow GOMC to run on older GPUs

--- CMake/GOMCCUDASetup.cmake
+++ CMake/GOMCCUDASetup.cmake
@@ -1,16 +1,16 @@
 # Find CUDA is enabled, set it up

 if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-    message("-- Debug build type detected, passing : '-g -G --keep' to nvcc")
-    set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -g -G --keep")
+	message("-- Debug build type detected, passing : '-g -G --keep' to nvcc")
+	set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -g -G --keep")
 endif()

 set(GEN_COMP_flag "-DGOMC_CUDA -DTHRUST_IGNORE_DEPRECATED_CPP_DIALECT ")

 if (GOMC_NVTX_ENABLED)
-    message("-- Enabling profiling with NVTX for GPU")
-    set(GEN_COMP_flag "${GEN_COMP_flag} -DGOMC_NVTX_ENABLED")
+	message("-- Enabling profiling with NVTX for GPU")
+	set(GEN_COMP_flag "${GEN_COMP_flag} -DGOMC_NVTX_ENABLED")
 endif()

@@ -32,9 +32,7 @@

 # Set host compiler
 set(CCBIN "-ccbin=${CMAKE_CXX_COMPILER}")
-
-# set flags for CUDA nvcc
-set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${CCBIN} -Wno-deprecated-gpu-targets")
+set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} ${CCBIN} -Wno-deprecated-gpu-targets" )

 include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})

@@ -45,17 +43,17 @@
     set_target_properties(GPU_NVT PROPERTIES
         CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_NVT_name}
-        COMPILE_FLAGS "${GPU_NVT_flags}
-        CUDA_ARCHITECTURES 35 60 70")
-    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-        message("-- Debug build type detected, GPU_NVT setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
-        set_property(TARGET GPU_NVT PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
-    endif()
+        CUDA_ARCHITECTURES	35 60 70
+        COMPILE_FLAGS "${GPU_NVT_flags}")
+	if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+		message("-- Debug build type detected, GPU_NVT setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
+    	set_property(TARGET GPU_NVT PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
+	endif()
     if(WIN32)
         target_link_libraries(GPU_NVT ws2_32)
     endif()
     if(MPI_FOUND)
-        target_link_libraries(GPU_NVT ${MPI_LIBRARIES})
+	    target_link_libraries(GPU_NVT ${MPI_LIBRARIES})
     endif()
 endif()

@@ -65,17 +63,17 @@
     set_target_properties(GPU_GEMC PROPERTIES
         CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_GE_name}
-        COMPILE_FLAGS "${GPU_GE_flags}
-        CUDA_ARCHITECTURES 35 60 70")
-    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-        message("-- Debug build type detected, GPU_GEMC setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
-        set_property(TARGET GPU_GEMC PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
-    endif()
+        CUDA_ARCHITECTURES 35 60 70
+        COMPILE_FLAGS "${GPU_GE_flags}")
+	if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+		message("-- Debug build type detected, GPU_GEMC setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
+    	set_property(TARGET GPU_GEMC PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
+	endif()
     if(WIN32)
         target_link_libraries(GPU_GEMC ws2_32)
     endif()
     if(MPI_FOUND)
-        target_link_libraries(GPU_GEMC ${MPI_LIBRARIES})
+	    target_link_libraries(GPU_GEMC ${MPI_LIBRARIES})
     endif()
 endif()

@@ -85,17 +83,17 @@
     set_target_properties(GPU_GCMC PROPERTIES
         CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_GC_name}
-        COMPILE_FLAGS "${GPU_GC_flags}
-        CUDA_ARCHITECTURES 35 60 70")
-    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-        message("-- Debug build type detected, GPU_GCMC setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
-        set_property(TARGET GPU_GCMC PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
-    endif()
+        CUDA_ARCHITECTURES 35 60 70
+        COMPILE_FLAGS "${GPU_GC_flags}")
+	if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+		message("-- Debug build type detected, GPU_GCMC setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
+    	set_property(TARGET GPU_GCMC PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
+	endif()
     if(WIN32)
         target_link_libraries(GPU_GCMC ws2_32)
     endif()
     if(MPI_FOUND)
-        target_link_libraries(GPU_GCMC ${MPI_LIBRARIES})
+	    target_link_libraries(GPU_GCMC ${MPI_LIBRARIES})
     endif()
 endif()

@@ -105,16 +103,16 @@
     set_target_properties(GPU_NPT PROPERTIES
         CUDA_SEPARABLE_COMPILATION ON
         OUTPUT_NAME ${GPU_NPT_name}
-        COMPILE_FLAGS "${GPU_NPT_flags}
-        CUDA_ARCHITECTURES 35 60 70")
-    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-        message("-- Debug build type detected, GPU_NPT setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
-        set_property(TARGET GPU_NPT PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
-    endif()
+        CUDA_ARCHITECTURES 35 60 70
+        COMPILE_FLAGS "${GPU_NPT_flags}")
+	if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+		message("-- Debug build type detected, GPU_NPT setting CUDA_RESOLVE_DEVICE_SYMBOLS ON")
+    	set_property(TARGET GPU_NPT PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
+	endif()
     if(WIN32)
         target_link_libraries(GPU_NPT ws2_32)
     endif()
     if(MPI_FOUND)
-        target_link_libraries(GPU_NPT ${MPI_LIBRARIES})
+	    target_link_libraries(GPU_NPT ${MPI_LIBRARIES})
     endif()
 endif()


PKG: install startup scripts in prefix directory

--- CMake/PackageHelper.cmake
+++ CMake/PackageHelper.cmake
@@ -293,7 +293,7 @@
         install(FILES
           ${Monteverdi_SOURCE_DIR}/Packaging/${EXE_FILE}${SCR_EXT}
           DESTINATION
-          "${PKG_STAGE_DIR}/bin")
+          "${PKG_STAGE_DIR}")
       endif()
     endif()
   endforeach()


SWD-170

SWD-170

Some documentation.

Adding the CMAKE_CL_64 for registry parsing.

git-svn-id: ffa0477179a225c7c90b98ebb17cced7db4a2d00@351 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -74,6 +74,7 @@
 #
 # Defined functions
 # --------------
+# * ``add_matlab_mex`` adds a target compiling a MEX file.
 # * ``add_matlab_unit_test`` adds a Matlab unit test file as a test to the project.
 # * ``matlab_extract_all_installed_versions_from_registry`` parses the registry for all Matlab versions. Available on Windows only.
 #   The part of the registry parsed is dependent on the host processor
@@ -522,17 +523,14 @@
 #          [LINK_TO target1 target2 ...]
 #       )
 #
-#   The function arguments are:
-#   * `NAME` name of the target.
-#   * `LINK_TO`: additional link dependencies. The target already links to libmex and libmx.
-#   * `SRC`: list of source files.
-#
-#   If OUTPUT_NAME is given, it overrides the default name defined as being the name of the target without any prefix and
-#   with ${Matlab_MEX_EXTENSION} suffix.
-#   Use the option REDUCE_VISIBILITY to hide every symbols inside the compiled MEX file. This is useful in case their is a
-#   symbol clash between the libraries shipped with Matlab, and the libraries to which the target is linking against. This
+#   `NAME` name of the target. `SRC` is a list of source files. `LINK_TO` is a list of additional link dependencies.
+#   The target already links to libmex and libmx.
+#   If `OUTPUT_NAME` is given, it overrides the default name defined as being the name of the target without any prefix and
+#   with `${Matlab_MEX_EXTENSION}` suffix.
+#   Use the option `REDUCE_VISIBILITY` to hide every symbols inside the compiled MEX file. This is useful in case their is a
+#   symbol collision between the libraries shipped with Matlab, and the libraries to which the target is linking with. This
 #   option is ignored on DLL platforms.
-#   If DOCUMENTATION is given, the file documentation.m is considered as being the documentation file for the MEX file. This
+#   If `DOCUMENTATION` is given, the file documentation.m is considered as being the documentation file for the MEX file. This
 #   file is copied into the same folder with the same name as the final mex file, and with extension .m. In that case, typing
 #   `help <name>` should print the documentation contained in this file.
 #
@@ -633,7 +631,7 @@

     # testing if we are able to extract the needed information from the registry
     set(matlab_versions_from_registry)
-    matlab_extract_all_installed_versions_from_registry(TRUE matlab_versions_from_registry)
+    matlab_extract_all_installed_versions_from_registry(CMAKE_CL_64 matlab_versions_from_registry)

     # the returned list is empty, doing the search on all known versions
     if(NOT matlab_versions_from_registry)


COMP: define OSSIM_STATIC only when building internal ossim

--- CMake/CommonDefinitions.cmake
+++ CMake/CommonDefinitions.cmake
@@ -12,9 +12,12 @@
 SET(OTB_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})

 # OSSIM_STATIC macro
-IF(NOT OTB_BUILD_SHARED_LIBS)
-  ADD_DEFINITIONS(-DOSSIM_STATIC)
-ENDIF(NOT OTB_BUILD_SHARED_LIBS)
+# Using an external static library of ossim is not supported
+IF (WIN32)
+  IF(NOT OTB_BUILD_SHARED_LIBS AND NOT OTB_USE_EXTERNAL_OSSIM)
+    ADD_DEFINITIONS(-DOSSIM_STATIC)
+  ENDIF(NOT OTB_BUILD_SHARED_LIBS AND NOT OTB_USE_EXTERNAL_OSSIM)
+ENDIF (WIN32)

 # On Visual Studio 8 MS deprecated C. This removes all 1.276E1265 security
 # warnings


BUG: force ZLIB_LIBRARY to the correct path

--- CMake/External_OpenJpeg.cmake
+++ CMake/External_OpenJpeg.cmake
@@ -29,9 +29,9 @@
   if(USE_SYSTEM_ZLIB)
     set(OPENJPEG_SB_ZLIB_CONFIG)
   else()
-    set(OPENJPEG_SB_ZLIB_CONFIG
-      -DZLIB_INCLUDE_DIR:STRING=${CMAKE_INSTALL_PREFIX}/include
-      -DZLIB_LIBRARY:STRING=${CMAKE_INSTALL_PREFIX}/lib/libzlib.so
+    set(OPENJPEG_SB_ZLIB_CONFIG
+      -DZLIB_ROOT:STRING=${CMAKE_INSTALL_PREFIX}
+      -DZLIB_LIBRARY:PATH=${CMAKE_INSTALL_PREFIX}/lib/libz.so
       )
     list(APPEND ${proj}_DEPENDENCIES ZLIB)
   endif()


Add threading library's include directory to Ogre include directories in FindOGRE.cmake

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -285,6 +285,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${Boost_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
       endif ()
     elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 2)
       find_package(POCO QUIET)
@@ -292,6 +293,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${POCO_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${POCO_INCLUDE_DIRS})
       endif ()
     elseif (OGRE_CONFIG_THREAD_PROVIDER EQUAL 3)
       find_package(TBB QUIET)
@@ -299,6 +301,7 @@
         set(OGRE_DEPS_FOUND FALSE)
       else ()
         set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${TBB_LIBRARIES})
+        set(OGRE_INCLUDE_DIRS ${OGRE_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS})
       endif ()
     endif ()
   endif ()


COMP: Removed additional bracket

COMP: Removed additional bracket

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

 if(BUILD_TESTING)

-  set(revision_tag 470c1d98)) # first 8 characters of hash-tag
+  set(revision_tag 470c1d98) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


correct tag

correct tag

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

 if(BUILD_TESTING)

-  set(revision_tag a6f397a4)
+  set(revision_tag ef63f005) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


las plugin: fix linking against static boost library under windows

Signed-off-by: Daniel Wendt <fd925492bcb7f14637d68aeb32a3c6e2a0301a87@linux.com>

--- CMakeModules/FindLIBLAS.cmake
+++ CMakeModules/FindLIBLAS.cmake
@@ -101,5 +101,8 @@
     if(Boost_FOUND)
         set(LIBLAS_LIBRARIES ${LIBLAS_LIBRARY} )
         set(LIBLAS_FOUND "YES")
+        if(WIN32)
+            link_directories(${Boost_LIBRARY_DIRS})
+        endif()
     endif()
 endif()


removed -Wfloat=equal

removed -Wfloat=equal

--- cmake/EnableCompilerWarnings.cmake
+++ cmake/EnableCompilerWarnings.cmake
@@ -89,7 +89,6 @@
             -Wenum-compare
             -Wexplicit-ownership-type
             -Wextern-initializer
-            -Wfloat-equal
             -Wgnu-array-member-paren-init
             -Wheader-guard
             -Wheader-hygiene


Remove unused internal method

Remove unused internal method

Change-Id: Ia96e76900cb7ec702cca6fdf941bfa094bae90aa
Reviewed-on: http://gerrit.aldebaran.lan/87023
Reviewed-by: ngargaud <cc1f618ae68946993764fd1e75c94e934d965a38@aldebaran-robotics.com>
Tested-by: ngargaud <cc1f618ae68946993764fd1e75c94e934d965a38@aldebaran-robotics.com>

--- cmake/qibuild/internal/stage.cmake
+++ cmake/qibuild/internal/stage.cmake
@@ -625,24 +625,3 @@
 ")
   _qi_install_redist_file(${_redist_file} ${target} ${_l_target})
 endfunction()
-
-#
-# Use install_name_tool to set rpath on target \p name
-#
-function(_qi_set_apple_rpath name subfolder)
-# We need to set a rpath into libraries in addition to binaries, in case they are the
-    # starting point of loading chain: for instance an unrelated binary performing
-    # a dlopen.
-    set(_dotdot "")
-    if(subfolder)
-      # Get path from subfolder to lib
-      file(RELATIVE_PATH _dotdot "/${subfolder}" /)
-    endif()
-    find_program(install_name_tool install_name_tool)
-    # INSTALL_RPATH has no effect, although the linker supports -rpath.
-    # So create a post-processing target
-    # Add an extra ../ to dotdot to go from lib to root dir
-    add_custom_command(TARGET "${name}" POST_BUILD
-      COMMAND ${install_name_tool} -add_rpath "@loader_path/../${_dotdot}" $<TARGET_FILE:${name}>
-    )
-endfunction()


Removed premature reference to PROJECT_SOURCE_DIR that causes trouble in certain symlink environments, #3064

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -133,7 +133,7 @@
   set(ROSBUILD_init_called 1)

   # Infer package name from directory name.
-  get_filename_component(_project ${PROJECT_SOURCE_DIR} NAME)
+  get_filename_component(_project ${CMAKE_SOURCE_DIR} NAME)
   message("[rosbuild] Building package ${_project}")

   project(${_project})


QT_QTMULTIMEDIA only depends on alsa on linux

Change-Id: I6f31913a068fe270bea734b3308c653a3ee8a943

--- cmake/qibuild/modules/qt_qtmultimedia-config.cmake
+++ cmake/qibuild/modules/qt_qtmultimedia-config.cmake
@@ -9,6 +9,8 @@
 set(_libame "QtMultimedia")

 qt_flib(${_suffix} ${_libame})
-qi_set_global(QT_QTMULTIMEDIA_DEPENDS "ALSALIB")
+if(UNIX AND NOT APPLE)
+  qi_set_global(QT_QTMULTIMEDIA_DEPENDS "ALSALIB")
+endif()
 export_lib(QT_${_suffix})
 set(_ROOT_DIR)


RNV: win32  building.

RNV: win32  building.

--- salome_adm/cmake_files/FindSalomeOmniORBPy.cmake
+++ salome_adm/cmake_files/FindSalomeOmniORBPy.cmake
@@ -35,7 +35,13 @@
     ENDIF()
   ENDIF()

-  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORBPy OMNIORB_PYTHON_BACKEND 4)
+  IF(WINDOWS)
+    SET(DIR_COUNT 3)
+  ELSE(WINDOWS)
+    SET(DIR_COUNT 4)
+  ENDIF(WINDOWS)
+
+  SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(OmniORBPy OMNIORB_PYTHON_BACKEND ${DIR_COUNT})
   #MARK_AS_ADVANCED()
 ELSE()
   IF(NOT SalomeOmniORBPy_FIND_QUIETLY)


--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -18,6 +18,7 @@
 Name[pt_BR]=Mensagens instantâneas
 Name[ru]=Система обмена сообщениями
 Name[sk]=Priama komunikácia
+Name[sl]=Hipno sporočanje
 Name[sv]=Direktmeddelanden
 Name[tr]=Anında Mesajlaşma
 Name[uk]=Миттєвий обмін повідомленнями
@@ -43,6 +44,7 @@
 Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
 Comment[ru]=Начать общение с любым вашим контактом или изменить ваш статус в системе обмена сообщениями
 Comment[sk]=Spustiť rozhovor s nejakým z vašich IM kontaktov alebo zmeniť váš IM stav
+Comment[sl]=Začnite klepet s katerimkoli izmed vaših stikov hipnega sporočanja ali spremenite vaše stanje
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[tr]=IM kişilerinizden biriyle sohbete başlayın veya IM durumunuzu değiştirin
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями


Add /usr/local/include to include path for native shims.

CMake does not add the /usr/local/include to the compiler include search
paths by default. This breaks the build on FreeBSD, where all libraries
are installed in /usr/local instead of /usr. So add /usr/local/include
as include path for all shims.

--- src/Native/configure.cmake
+++ src/Native/configure.cmake
@@ -1,6 +1,10 @@
 include(CheckFunctionExists)
 include(CheckStructHasMember)
 include(CheckCXXSourceCompiles)
+
+#CMake does not include /usr/local/include into the include search path
+#thus add it manually. This is required on FreeBSD.
+include_directories(/usr/local/include)

 check_function_exists(
     stat64


Updated Script node with json and ctypes libraries

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "8ce35ca215473e2b1e6acc1f8afa33134b33d2df")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a7b77e897e1967661cd58410316f6f9d1d62246d")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Hotfix: fix NN memory allocation regression

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "04b3c29581c258502fb50540f3954bd49aac7f90")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c02b60f1b735fedef3b52b838e5b3c65affd6c61")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


cmake: Reduce flash size for px4fmu-v2 build

Removes Iridium SBD support

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -50,7 +50,7 @@
 	drivers/bst
 ##TO FIT drivers/snapdragon_rc_pwm
 	drivers/lis3mdl
-	drivers/iridiumsbd
+	#drivers/iridiumsbd
 	drivers/ulanding

 	#


Forgotten -fPIC

Forgotten -fPIC

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -117,7 +117,7 @@
     ExternalProject_Add(
       PCRE
       URL ${CMAKE_SOURCE_DIR}/core/pcre/src/pcre-${pcre_version}.tar.gz
-      CONFIGURE_COMMAND ./configure --prefix <INSTALL_DIR> --disable-shared
+      CONFIGURE_COMMAND ./configure --with-pic --disable-shared
                         CC=${CMAKE_C_COMPILER} CFLAGS=${_pcre_cflags}
       INSTALL_COMMAND ""
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1)


macOS flags for custom schemes: -isysroot and -mmacosx-version-min

--- cmake/modules/hunter_dump_cmake_flags.cmake
+++ cmake/modules/hunter_dump_cmake_flags.cmake
@@ -37,6 +37,21 @@
     if(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE)
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fembed-bitcode")
       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fembed-bitcode")
+    endif()
+  endif()
+
+  if(APPLE AND NOT IOS)
+    if(NOT "${CMAKE_OSX_SYSROOT}" STREQUAL "")
+      if(NOT EXISTS "${CMAKE_OSX_SYSROOT}")
+        hunter_internal_error("Not exists: '${CMAKE_OSX_SYSROOT}'")
+      endif()
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
+    endif()
+
+    if(NOT "${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
     endif()
   endif()


Fix PEPARSE_INCLUDE_DIR for cross-compiling (#101)

--- pe-parser-library/cmake/peparse-config.cmake
+++ pe-parser-library/cmake/peparse-config.cmake
@@ -1,4 +1,8 @@
-find_path(PEPARSE_INCLUDE_DIR $<SHELL_PATH:"parser-library/parse.h">)
+if(CMAKE_CROSSCOMPILING)
+  find_path(PEPARSE_INCLUDE_DIR "parser-library/parse.h")
+else()
+  find_path(PEPARSE_INCLUDE_DIR $<SHELL_PATH:"parser-library/parse.h">)
+endif()
 find_library(PEPARSE_LIBRARIES NAMES "libpe-parser-library" "pe-parser-library")

 include(FindPackageHandleStandardArgs)


Disable autolinking on VS. Script cleanup

--- blocks/boost/install/install.cmake
+++ blocks/boost/install/install.cmake
@@ -142,15 +142,15 @@
         endif()
     else()
         if(BII_BOOST_VERBOSE)
-            message(STATUS "Boost boostrapping aborted! b2 file already exists. Set BII_BOOST_BOOTSTRAP_FORCE to override")
+            message(STATUS "Boost bootstrapping aborted! b2 file already exists. Set BII_BOOST_BOOTSTRAP_FORCE to override")
         endif()
     endif()
 endfunction()

 function(BII_BOOST_BUILD)
-    include(ExternalProject)
-
-    message(STATUS "Building Boost ${BII_BOOST_VERSION} components with toolset ${BII_BOOST_TOOLSET}...")
+    if(BII_BOOST_LIBS)
+        message(STATUS "Building Boost ${BII_BOOST_VERSION} components with toolset ${BII_BOOST_TOOLSET}...")
+    endif()

     foreach(lib ${BII_BOOST_LIBS})
         message(STATUS "Building ${lib} library...")
@@ -168,18 +168,13 @@
 function(BII_BOOST_INSTALL)
     BII_BOOST_INSTALL_SETUP()

-    if(TRUE OR (NOT (EXISTS ${BIICODE_ENV_DIR}/boost/__BII_BOOST_SETUP_${BII_BOOST_VERSION}_${BII_BOOST_TOOLSET}_READY)) OR (${BII_BOOST_BUILD_FORCE}))
-        if(BII_BOOST_VERBOSE)
-            BII_BOOST_PRINT_SETUP()
-        endif()
-
-        BII_BOOST_DOWNLOAD()
-        BII_BOOST_BOOTSTRAP()
-        BII_BOOST_BUILD()
-
-        #Mark current setup (toolset + version) as built
-        file(WRITE ${BIICODE_ENV_DIR}/boost/__BII_BOOST_SETUP_${BII_BOOST_VERSION}_${BII_BOOST_TOOLSET}_READY "Biicode boost ${BII_BOOST_VERSION} w/ ${BII_BOOST_TOOLSET} toolset setup ready to use")
-    endif()
+    if(BII_BOOST_VERBOSE)
+        BII_BOOST_PRINT_SETUP()
+    endif()
+
+    BII_BOOST_DOWNLOAD()
+    BII_BOOST_BOOTSTRAP()
+    BII_BOOST_BUILD()

     set(BOOST_ROOT       "${BII_BOOST_DIR}"         CACHE INTERNAL "Boost root directory")
     set(BOOST_INCLUDEDIR "${BOOST_ROOT}"            CACHE INTERNAL "Boost include directory")
@@ -208,7 +203,13 @@
         include_directories(${Boost_INCLUDE_DIR})

         if(MSVC)
-            link_directories(${Boost_LIBRARYDIR})
+            #Disable auto-linking with MSVC
+            add_definitions(-DBOOST_ALL_NO_LIB)
+
+            #Use static linking if not specified
+            if(NOT (Boost_USE_STATIC_LIBS))
+                set(Boost_USE_STATIC_LIBS ON PARENT_SCOPE)
+            endif()
         endif()

         add_definitions( "-DHAS_BOOST" )


MINIFICPP-1189 win/debug: expect correct yaml lib

Signed-off-by: Arpad Boda <aboda@apache.org>

This closes #751

--- cmake/BundledYamlCpp.cmake
+++ cmake/BundledYamlCpp.cmake
@@ -18,7 +18,11 @@
 function(use_bundled_yamlcpp SOURCE_DIR BINARY_DIR)
     # Define byproducts
     if (WIN32)
-        set(BYPRODUCT "lib/libyaml-cppmd.lib")
+        if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+            set(BYPRODUCT "lib/libyaml-cppmdd.lib")
+        else()
+            set(BYPRODUCT "lib/libyaml-cppmd.lib")
+        endif()
     else()
         set(BYPRODUCT "lib/libyaml-cpp.a")
     endif()


Separation of commands for better error handling

--- cmake/External_build.cmake
+++ cmake/External_build.cmake
@@ -5,25 +5,50 @@
   message(STATUS "INSTALL_COMMANDS: ${INSTALL_COMMANDS}")
   message(STATUS "COMMANDS: ${COMMANDS}")

+  # Build external project
   execute_process(
     COMMAND ${CMAKE_COMMAND} --build . --verbose --parallel --config ${CONFIG}
-    COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CONFIG}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMAND_ECHO STDOUT
     RESULT_VARIABLE BUILD_RESULT)

   if(NOT "${BUILD_RESULT}" STREQUAL "0")
     message(FATAL_ERROR "Fatal error while building external project ${TARGET}")
   endif()

+  # Install external project
   execute_process(
-    COMMAND ${CMAKE_COMMAND} -E make_directory ${INSTALL_DIR}
-    ${INSTALL_COMMANDS}
-    ${COMMANDS}
-    COMMAND ${CMAKE_COMMAND} -E touch EXTERNAL_BUILT_${CONFIG}
+    COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CONFIG}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMAND_ECHO STDOUT
     RESULT_VARIABLE INSTALL_RESULT)

   if(NOT "${INSTALL_RESULT}" STREQUAL "0")
     message(FATAL_ERROR "Fatal error while installing external project ${TARGET}")
   endif()
+
+  # Execute commands (mostly for copying files)
+  execute_process(
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${INSTALL_DIR}
+    ${INSTALL_COMMANDS}
+    ${COMMANDS}
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    COMMAND_ECHO STDOUT
+    RESULTS_VARIABLE COMMANDS_RESULTS)
+
+  foreach(COMMAND_RESULT IN LISTS COMMANDS_RESULTS)
+    if(NOT "${COMMAND_RESULT}" STREQUAL "0")
+      message(FATAL_ERROR "Fatal error while executing install commands for external project ${TARGET}")
+    endif()
+  endforeach()
+
+  # Execute commands (mostly for copying files)
+  execute_process(
+    COMMAND ${CMAKE_COMMAND} -E touch EXTERNAL_BUILT_${CONFIG}
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    RESULT_VARIABLE TOUCH_RESULT)
+
+  if(NOT "${TOUCH_RESULT}" STREQUAL "0")
+    message(WARNING "Could not create EXTERNAL_BUILT file for external project ${TARGET}")
+  endif()
 endif()


Updated OpenVINO for Ubuntu to 2021.4.2, warning: may not work for CPU: https://github.com/openvinotoolkit/openvino/issues/10344

--- cmake/ModuleOpenVINO.cmake
+++ cmake/ModuleOpenVINO.cmake
@@ -12,8 +12,9 @@
 	)
     else()
         fast_download_dependency(openvino
-                2021.1
-                70c5c352748dabf85f119027c281fb37a968421ef6c7cf47de8fd520acb41b99
+                2021.4.2
+                9e3fd9733cfdfc1312bd436abfcff74992cfb5c33e09e36e25a627617c608fa3
         )
+
     endif()
 endif()


cmake: clang: Add the runtime library to the link command

When building with clang symbols from the runtime library, like
__divdi3 were not being resolved. To fix this we add the "library path
for the currently used compiler runtime library" to the link path.

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

--- cmake/compiler/clang.cmake
+++ cmake/compiler/clang.cmake
@@ -33,5 +33,20 @@
   list(APPEND isystem_include_flags -isystem ${isystem_include_dir})
 endforeach()

+execute_process(
+  COMMAND ${CMAKE_C_COMPILER} ${TOOLCHAIN_C_FLAGS} --print-libgcc-file-name
+  OUTPUT_VARIABLE LIBGCC_FILE_NAME
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+assert_exists(LIBGCC_FILE_NAME)
+
+get_filename_component(LIBGCC_DIR ${LIBGCC_FILE_NAME} DIRECTORY)
+
+assert_exists(LIBGCC_DIR)
+
+list(APPEND LIB_INCLUDE_DIR "-L\"${LIBGCC_DIR}\"")
+list(APPEND TOOLCHAIN_LIBS gcc)
+
 set(CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--unresolved-symbols=ignore-in-object-files)
 string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")


Fix LTO flags for Visual Studio compilation with old Cmake versions(<3.13) (#471)

Signed-off-by: Kochin Ivan <322d74381b505d2ff864bbdf31c9fa2072d65bfa@intel.com>

--- cmake/compilers/MSVC.cmake
+++ cmake/compilers/MSVC.cmake
@@ -70,6 +70,6 @@
 endif()

 set(TBB_IPO_COMPILE_FLAGS $<$<NOT:$<CONFIG:Debug>>:/GL>)
-set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-LTCG -INCREMENTAL:NO>)
+set(TBB_IPO_LINK_FLAGS $<$<NOT:$<CONFIG:Debug>>:-LTCG> $<$<NOT:$<CONFIG:Debug>>:-INCREMENTAL:NO>)

 set(TBB_OPENMP_FLAG /openmp)


Add CFLAGS back in for windows.

Add CFLAGS back in for windows.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -153,6 +153,9 @@
     if (CMAKE_BUILD_TYPE STREQUAL "Debug")
       set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS}
           --config Debug)
+    else
+      set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS}
+          --config Release)
     endif()
     if(MSVC_RUNTIME_LIBRARY_STATIC)
       set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
@@ -162,9 +165,13 @@
           -DCMAKE_CXX_FLAGS_DEBUG="/MTd")
       if (CMAKE_BUILD_TYPE STREQUAL "Debug")
         set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_C_FLAGS="/MTd"
+            -DCMAKE_CXX_FLAGS="/MTd"
             -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug)
       else()
         set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_C_FLAGS="/MT"
+            -DCMAKE_CXX_FLAGS="/MT"
             -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded)
       endif()
     else()  # dynamic (DLL) runtime
@@ -175,9 +182,13 @@
           -DCMAKE_CXX_FLAGS_DEBUG="/MDd")
       if (CMAKE_BUILD_TYPE STREQUAL "Debug")
         set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_C_FLAGS="/MDd"
+            -DCMAKE_CXX_FLAGS="/MDd"
             -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL)
       else()
         set(CMAKE_SUB_CONFIGURE_OPTIONS ${CMAKE_SUB_CONFIGURE_OPTIONS}
+            -DCMAKE_C_FLAGS="/MD"
+            -DCMAKE_CXX_FLAGS="/MD"
             -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL)
       endif()
     endif()


Added Win32 support. For Win32 compilers (not cygwin) the cmake file looks for the bgd library using the dll package from here: http://www.boutell.com/gd/ . Don't check for png and jpeg since it's compiled in.

Also small code changes: if jpeg or png library is not found not the whole gd library is turned off (GD_FOUND "NO") - instead only this part of the driver is turned off (SET(GD_SUPPORTS_JPEG "NO")).

svn path=/trunk/; revision=7136

--- cmake/modules/FindGD.cmake
+++ cmake/modules/FindGD.cmake
@@ -14,7 +14,12 @@
 /usr/include
 )

-SET(GD_NAMES ${GD_NAMES} gd)
+if(WIN32 AND NOT CYGWIN)
+  SET(GD_NAMES ${GD_NAMES} bgd)
+else(WIN32)
+  SET(GD_NAMES ${GD_NAMES} gd)
+endif(WIN32 AND NOT CYGWIN)
+
 FIND_LIBRARY(GD_LIBRARY
   NAMES ${GD_NAMES}
   PATHS /usr/lib /usr/local/lib
@@ -28,64 +33,70 @@
 ENDIF (GD_LIBRARY AND GD_INCLUDE_DIR)

 IF (GD_FOUND)
-   INCLUDE(CheckLibraryExists)
-   GET_FILENAME_COMPONENT(GD_LIB_PATH ${GD_LIBRARY} PATH)
-   GET_FILENAME_COMPONENT(GD_LIB ${GD_LIBRARY} NAME)
+  IF (WIN32 AND NOT CYGWIN)
+    SET(GD_SUPPORTS_PNG ON)
+    SET(GD_SUPPORTS_JPEG ON)
+    SET(GD_SUPPORTS_GIF ON)
+    get_filename_component(GD_LIBRARY_DIR ${GD_LIBRARY} PATH)
+  ELSE (WIN32 AND NOT CYGWIN)
+    INCLUDE(CheckLibraryExists)
+    GET_FILENAME_COMPONENT(GD_LIB_PATH ${GD_LIBRARY} PATH)
+    GET_FILENAME_COMPONENT(GD_LIB ${GD_LIBRARY} NAME)

-   CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImagePng" "${GD_LIB_PATH}" GD_SUPPORTS_PNG)
-   IF (GD_SUPPORTS_PNG)
+    CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImagePng" "${GD_LIB_PATH}" GD_SUPPORTS_PNG)
+    IF (GD_SUPPORTS_PNG)
      find_package(PNG)
      IF (PNG_FOUND)
        SET(GD_LIBRARIES ${GD_LIBRARIES} ${PNG_LIBRARIES})
        SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${PNG_INCLUDE_DIR})
      ELSE (PNG_FOUND)
-       SET(GD_FOUND "NO")
+       SET(GD_SUPPORTS_PNG "NO")
      ENDIF (PNG_FOUND)
-   ENDIF (GD_SUPPORTS_PNG)
+    ENDIF (GD_SUPPORTS_PNG)

-   CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageJpeg" "${GD_LIB_PATH}" GD_SUPPORTS_JPEG)
-   IF (GD_SUPPORTS_JPEG)
+    CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageJpeg" "${GD_LIB_PATH}" GD_SUPPORTS_JPEG)
+    IF (GD_SUPPORTS_JPEG)
      find_package(JPEG)
      IF (JPEG_FOUND)
        SET(GD_LIBRARIES ${GD_LIBRARIES} ${JPEG_LIBRARIES})
        SET(GD_INCLUDE_DIR ${GD_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
      ELSE (JPEG_FOUND)
-       SET(GD_FOUND "NO")
+       SET(GD_SUPPORTS_JPEG "NO")
      ENDIF (JPEG_FOUND)
-   ENDIF (GD_SUPPORTS_JPEG)
+    ENDIF (GD_SUPPORTS_JPEG)

-   CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageGif" "${GD_LIB_PATH}" GD_SUPPORTS_GIF)
+    CHECK_LIBRARY_EXISTS("${GD_LIBRARY}" "gdImageGif" "${GD_LIB_PATH}" GD_SUPPORTS_GIF)

-   # Trim the list of include directories
-   SET(GDINCTRIM)
-   FOREACH(GD_DIR ${GD_INCLUDE_DIR})
+    # Trim the list of include directories
+    SET(GDINCTRIM)
+    FOREACH(GD_DIR ${GD_INCLUDE_DIR})
     SET(GD_TMP_FOUND OFF)
     FOREACH(GD_TRIMMED ${GDINCTRIM})
       IF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
-	SET(GD_TMP_FOUND ON)
+    SET(GD_TMP_FOUND ON)
       ENDIF ("${GD_DIR}" STREQUAL "${GD_TRIMMED}")
     ENDFOREACH(GD_TRIMMED ${GDINCTRIM})
     IF (NOT GD_TMP_FOUND)
       SET(GDINCTRIM "${GDINCTRIM}" "${GD_DIR}")
     ENDIF (NOT GD_TMP_FOUND)
-  ENDFOREACH(GD_DIR ${GD_INCLUDE_DIR})
-  SET(GD_INCLUDE_DIR ${GDINCTRIM})
+    ENDFOREACH(GD_DIR ${GD_INCLUDE_DIR})
+    SET(GD_INCLUDE_DIR ${GDINCTRIM})

-  SET(GD_LIBRARY_DIR)
-  # Generate trimmed list of library directories and list of libraries
-  FOREACH(GD_LIB ${GD_LIBRARIES})
+    SET(GD_LIBRARY_DIR)
+    # Generate trimmed list of library directories and list of libraries
+    FOREACH(GD_LIB ${GD_LIBRARIES})
     GET_FILENAME_COMPONENT(GD_NEXTLIBDIR ${GD_LIB} PATH)
     SET(GD_TMP_FOUND OFF)
     FOREACH(GD_LIBDIR ${GD_LIBRARY_DIR})
       IF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
-	SET(GD_TMP_FOUND ON)
+    SET(GD_TMP_FOUND ON)
       ENDIF ("${GD_NEXTLIBDIR}" STREQUAL "${GD_LIBDIR}")
     ENDFOREACH(GD_LIBDIR ${GD_LIBRARIES})
     IF (NOT GD_TMP_FOUND)
       SET(GD_LIBRARY_DIR "${GD_LIBRARY_DIR}" "${GD_NEXTLIBDIR}")
     ENDIF (NOT GD_TMP_FOUND)
-  ENDFOREACH(GD_LIB ${GD_LIBRARIES})
-
+    ENDFOREACH(GD_LIB ${GD_LIBRARIES})
+  ENDIF (WIN32 AND NOT CYGWIN)
 ENDIF (GD_FOUND)

 IF (GD_FOUND)


fbcode_builder: use build interface generator expression for thrift include directories

Summary:
Fix an error about source directories being included in the include
path in add_thrift_cpp2_library. I don't know why this was failing for
fb303 and not for other projects, but adding a generation expression
appears to fix the issue.

Reviewed By: strager

Differential Revision: D15725024

fbshipit-source-id: 6c02fed6c6703733cf9e0b130c0f90b70e3ea300


Bumped hardcoded fallback version number

--- cmake/DetermineTomvizVersion.cmake
+++ cmake/DetermineTomvizVersion.cmake
@@ -7,7 +7,7 @@
 #   tomviz_version
 #   tomviz_version_long

-set(hardcoded_tomviz_version "0.8.0")
+set(hardcoded_tomviz_version "0.9.0")

 function(_set_version_vars versiontext)
   string(REGEX MATCH "([0-9]+)\\.([0-9]+)\\.([0-9]+)[-]*(.*)" version_matches "${versiontext}")


Refs #2315. Fixed error

Refs #2315. Fixed error

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -23,7 +23,7 @@
                 set(${package}ExternalDir ${EPROSIMA_PACKAGE_EXTERNAL_DIR}/${package})
             endif()

-            if(NOT EXISTS "${${package}ExternalDir}/cmake_install.cmake")
+            if(NOT EXISTS "${${package}ExternalDir}/build/cmake_install.cmake")
                 if(MINION)
                     set(CMAKE_INSTALL_PREFIX_ "${CMAKE_INSTALL_PREFIX}")
                 else()


Fix: Dev: Fixed issue with luawrapper config naming. !minor


Fix wrong function name in cmake script

Fix wrong function name in cmake script


Quick fix.

Quick fix.

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@31348 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_pickup_tests.cmake
+++ deal.II/cmake/macros/macro_pickup_tests.cmake
@@ -80,8 +80,7 @@
     SET(_add_output)
     IF(EXISTS ${TEST_OVERRIDE_LOCATION}/${_category}/${_test})
       SET(_add_output
-        "Note: Default comparison file ${_comparison} overriden by"
-        "${TEST_OVERRIDE_LOCATION}/${_category}/${_test}"
+        "!!NOTE!! Comparison file overriden by ${TEST_OVERRIDE_LOCATION}/${_category}/${_test}"
         )
       SET(_comparison "${TEST_OVERRIDE_LOCATION}/${_category}/${_test}")
     ENDIF()


small change on cmake

small change on cmake

--- jps3dConfig.cmake
+++ jps3dConfig.cmake
@@ -1,6 +1,6 @@
 # - Config file for the jps3d package
 # It defines the following variables
-#  JPS3D_INCLUDE_DIRS - include directories for motion_primitive_library
+#  JPS3D_INCLUDE_DIRS - include directories for JPS3D
 #  JPS3D_LIBRARIES    - libraries to link against

 # Compute paths


Implement file generate in terms of copy, not rename

Renaming an in-use file is an invalid operation on Windows.

--- CMakeUnit.cmake
+++ CMakeUnit.cmake
@@ -557,19 +557,18 @@
     _cmake_unit_get_created_source_file_contents (CONTENTS NAME ${ARGN})

     string (RANDOM SALT)
-    string (SHA1 TMP_LOCATION "${NAME}-${CONTENTS}-${SALT}")
-
-    # Truncate to ten characters, to keep Windows happy.
-    string (SUBSTRING "${TMP_LOCATION}" 0 10 TMP_LOCATION)
-
-    _cmake_unit_write_out_file_without_semicolons ("${TMP_LOCATION}"
+    _cmake_unit_write_out_file_without_semicolons ("${NAME}${SALT}"
                                                    CONTENTS ${CONTENTS})
+    file (RENAME "${CMAKE_CURRENT_SOURCE_DIR}/${NAME}${SALT}"
+                 "${CMAKE_CURRENT_BINARY_DIR}/${NAME}${SALT}")

     set (WRITE_SOURCE_FILE_SCRIPT
-         "${CMAKE_CURRENT_BINARY_DIR}/Write${TMP_LOCATION}.cmake")
+         "${CMAKE_CURRENT_BINARY_DIR}/Write${NAME}${SALT}.cmake")
     file (WRITE "${WRITE_SOURCE_FILE_SCRIPT}"
-          "file (RENAME \"${CMAKE_CURRENT_SOURCE_DIR}/${TMP_LOCATION}\"\n"
-          "      \"${CMAKE_CURRENT_BINARY_DIR}/${NAME}\")\n")
+          "file (READ \"${CMAKE_CURRENT_BINARY_DIR}/${NAME}${SALT}\"\n"
+          "      GENERATED_FILE_CONTENTS)\n"
+          "file (WRITE \"${CMAKE_CURRENT_BINARY_DIR}/${NAME}\"\n"
+          "      \"\${GENERATED_FILE_CONTENTS}\")\n")

     # Generate target name, convert temporary location to lowercase.


cmake-unit: Handle generate rule being invoked twice

Either this is a bug in cmake or a bug in MSBuild, but
our header file can occasionally be generated multiple times. If
that happens, then we need to make sure we don't re-generate it
since its template is deleted on running the generate step.

--- CMakeUnit.cmake
+++ CMakeUnit.cmake
@@ -579,12 +579,13 @@
     set (WRITE_SOURCE_FILE_SCRIPT
          "${CMAKE_CURRENT_BINARY_DIR}/Write${NAME}${SALT}.cmake")
     file (WRITE "${WRITE_SOURCE_FILE_SCRIPT}"
-          "file (READ \"${TMP_BINARY_DIR_LOCATION}\"\n"
-          "      GENERATED_FILE_CONTENTS)\n"
-          "file (WRITE \"${CMAKE_CURRENT_BINARY_DIR}/${NAME}\"\n"
-          "      \"\${GENERATED_FILE_CONTENTS}\")\n"
-          "file (REMOVE \"${TMP_BINARY_DIR_LOCATION}\")\n")
-
+          "if (NOT EXISTS \"${CMAKE_CURRENT_BINARY_DIR}/${NAME}\")\n"
+          "    file (READ \"${TMP_BINARY_DIR_LOCATION}\"\n"
+          "          GENERATED_FILE_CONTENTS)\n"
+          "    file (WRITE \"${CMAKE_CURRENT_BINARY_DIR}/${NAME}\"\n"
+          "          \"\${GENERATED_FILE_CONTENTS}\")\n"
+          "    file (REMOVE \"${TMP_BINARY_DIR_LOCATION}\")\n"
+          "endif ()\n")

     # Generate target name, convert temporary location to lowercase, limit to
     # 10 characters so that we don't hit file name size limits on Windows.


samples: use find_program to detect wayland-scanner in cmake

--- builder/FindPackages.cmake
+++ builder/FindPackages.cmake
@@ -534,10 +534,9 @@
       pkg_get_variable(WAYLAND_SCANNER_BIN_PATH wayland-scanner bindir)
       pkg_get_variable(WAYLAND_SCANNER_BIN wayland-scanner wayland_scanner)
       if ( WAYLAND_SCANNER_BIN_PATH AND WAYLAND_SCANNER_BIN )
-        find_file(
+        find_program(
             WAYLAND_SCANNER_BINARY_PATH ${WAYLAND_SCANNER_BIN}
-            PATHS ${WAYLAND_SCANNER_BIN_PATH}
-            NO_DEFAULT_PATH)
+            PATHS ${WAYLAND_SCANNER_BIN_PATH})
       endif()
     endif()
   endif()


Fix CMake config file for building against.

--- osvrConfig.cmake
+++ osvrConfig.cmake
@@ -2,9 +2,9 @@
 find_package(Boost QUIET)

 include("${CMAKE_CURRENT_LIST_DIR}/osvrTargets.cmake")
-target_link_libraries(osvr::osvrUtilCpp INTERFACE ${Boost_INCLUDE_DIRS})
-target_link_libraries(osvr::osvrClientKitCpp INTERFACE ${Boost_INCLUDE_DIRS})
-target_link_libraries(osvr::osvrPluginKitCpp INTERFACE ${Boost_INCLUDE_DIRS})
+set_property(TARGET osvr::osvrUtilCpp APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
+set_property(TARGET osvr::osvrClientKitCpp APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})
+set_property(TARGET osvr::osvrPluginKitCpp APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIRS})

 function(osvr_add_plugin NAME)
     add_library(${NAME} MODULE ${ARGN})


Fixed a typo in the cmake script

Fixed a typo in the cmake script

--- python_module/cmake/add_python_export_library.cmake
+++ python_module/cmake/add_python_export_library.cmake
@@ -25,6 +25,12 @@
   # This grabs the parent of the leaf
   get_filename_component(PYTHON_MODULE_DIRECTORY_PREFIX "${TMP}.txt" PATH)

+  message("TMP: ${TMP}")
+  message("PYTHON_MODULE_DIRECTORY: ${PYTHON_MODULE_DIRECTORY}")
+  message("PYTHON_MODULE_DIRECTORY_PREFIX: ${PYTHON_MODULE_DIRECTORY_PREFIX}")
+  message("PYTHON_PACKAGE_NAME: ${PYTHON_PACKAGE_NAME}")
+  message("CATKIN_DEVEL_PREFIX: ${CATKIN_DEVEL_PREFIX}")
+

   set(SETUP_PY "${CMAKE_CURRENT_SOURCE_DIR}/setup.py")
   if(EXISTS ${SETUP_PY})
@@ -38,7 +44,7 @@
 # fetch values from package.xml
 setup_args = generate_distutils_setup(
     packages=['${PYTHON_PACKAGE_NAME}'],
-    package_dir={'':'${PTYHON_MODULE_DIRECTORY_PREFIX}'})
+    package_dir={'':'${PYTHON_MODULE_DIRECTORY_PREFIX}'})

 setup(**setup_args)
 ")


Making default no compression

Making default no compression

--- cmake/cmake_celix/BundlePackaging.cmake
+++ cmake/cmake_celix/BundlePackaging.cmake
@@ -18,6 +18,9 @@

 set(CELIX_NO_POSTFIX_BUILD_TYPES RelWithDebInfo Release CACHE STRING "The build type used for creating bundle without a build type postfix.")
+set(CELIX_DEFAULT_JAR_COMMAND_ARGUMENTS -cfm0 CACHE STRING "Default no compression is applied")
+set(CELIX_DEFAULT_ZIP_COMMAND_ARGUMENTS -rq0 CACHE STRING "Default no compression is applied")
+

 find_program(JAR_COMMAND jar NO_CMAKE_FIND_ROOT_PATH)

@@ -272,7 +275,7 @@
     if(JAR_COMMAND)
         add_custom_command(OUTPUT ${BUNDLE_FILE}
             COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_CONTENT_DIR}
-            COMMAND ${JAR_COMMAND} -cfm ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
+            COMMAND ${JAR_COMMAND} ${CELIX_DEFAULT_JAR_COMMAND_ARGUMENTS} ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
             DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -282,7 +285,7 @@

         add_custom_command(OUTPUT ${BUNDLE_FILE}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE_GEN_DIR}/MANIFEST.MF META-INF/MANIFEST.MF
-            COMMAND ${ZIP_COMMAND} -rq ${BUNDLE_FILE} *
+            COMMAND ${ZIP_COMMAND} ${CELIX_DEFAULT_ZIP_COMMAND_ARGUMENTS} ${BUNDLE_FILE} *
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
             DEPENDS ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}


PARQUET-977: Merge ExternalProject_Add's versioned by BUILD_BYPRODUCTS

(and fix bugs in brotli_ep by this)

Author: rip.nsk <rip.nsk@gmail.com>

Closes #332 from rip-nsk/PARQUET-977 and squashes the following commits:

5c7f6e6 [rip.nsk] PARQUET-977: Merge ExternalProject_Add's versioned by BUILD_BYPRODUCTS (and fix bugs in brotli_ep by this)

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -144,23 +144,19 @@
     set(ZLIB_STATIC_LIB_NAME libz.a)
   endif()
   set(ZLIB_STATIC_LIB "${ZLIB_PREFIX}/lib/${ZLIB_STATIC_LIB_NAME}")
-  set(ZLIB_VENDORED 1)
   set(ZLIB_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                       -DCMAKE_INSTALL_PREFIX=${ZLIB_PREFIX}
                       -DCMAKE_C_FLAGS=${EP_C_FLAGS}
                       -DBUILD_SHARED_LIBS=OFF)

   if (CMAKE_VERSION VERSION_GREATER "3.2")
-    # BUILD_BYPRODUCTS is a 3.2+ feature
-    ExternalProject_Add(zlib_ep
-      URL "http://zlib.net/fossils/zlib-1.2.8.tar.gz"
-      BUILD_BYPRODUCTS "${ZLIB_STATIC_LIB}"
-      CMAKE_ARGS ${ZLIB_CMAKE_ARGS})
-  else()
-    ExternalProject_Add(zlib_ep
-      URL "http://zlib.net/fossils/zlib-1.2.8.tar.gz"
-      CMAKE_ARGS ${ZLIB_CMAKE_ARGS})
-  endif()
+    set(ZLIB_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${ZLIB_STATIC_LIB}")
+  endif()
+  ExternalProject_Add(zlib_ep
+    URL "http://zlib.net/fossils/zlib-1.2.8.tar.gz"
+    ${ZLIB_BUILD_BYPRODUCTS}
+    CMAKE_ARGS ${ZLIB_CMAKE_ARGS})
+  set(ZLIB_VENDORED 1)
 else()
   set(ZLIB_VENDORED 0)
 endif()
@@ -180,7 +176,6 @@
 find_package(Thrift)

 if (NOT THRIFT_FOUND)
-
   set(THRIFT_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/thrift_ep/src/thrift_ep-install")
   set(THRIFT_HOME "${THRIFT_PREFIX}")
   set(THRIFT_INCLUDE_DIR "${THRIFT_PREFIX}/include")
@@ -198,7 +193,6 @@
     ENDIF()
   ENDIF()
   set(THRIFT_COMPILER "${THRIFT_PREFIX}/bin/thrift")
-  set(THRIFT_VENDORED 1)
   set(THRIFT_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                         "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}"
                         "-DCMAKE_C_FLAGS=${EP_C_FLAGS}"
@@ -226,20 +220,14 @@
   endif()

   if (CMAKE_VERSION VERSION_GREATER "3.2")
-    # BUILD_BYPRODUCTS is a 3.2+ feature
-    ExternalProject_Add(thrift_ep
-      URL "http://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz"
-      BUILD_BYPRODUCTS "${THRIFT_STATIC_LIB}" "${THRIFT_COMPILER}"
-      CMAKE_ARGS ${THRIFT_CMAKE_ARGS}
-      STEP_TARGETS flex_step libevent_step
-      DEPENDS ${THRIFT_DEPENDENCIES})
-  else()
-    ExternalProject_Add(thrift_ep
-      URL "http://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz"
-      CMAKE_ARGS ${THRIFT_CMAKE_ARGS}
-      STEP_TARGETS flex_step libevent_step
-      DEPENDS ${THRIFT_DEPENDENCIES})
-  endif()
+    set(THRIFT_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${THRIFT_STATIC_LIB}" "${THRIFT_COMPILER}")
+  endif()
+  ExternalProject_Add(thrift_ep
+    URL "http://archive.apache.org/dist/thrift/${THRIFT_VERSION}/thrift-${THRIFT_VERSION}.tar.gz"
+    ${THRIFT_BUILD_BYPRODUCTS}
+    CMAKE_ARGS ${THRIFT_CMAKE_ARGS}
+    STEP_TARGETS flex_step libevent_step
+    DEPENDS ${THRIFT_DEPENDENCIES})

   if (MSVC)
     ExternalProject_Get_Property(thrift_ep SOURCE_DIR)
@@ -305,7 +293,6 @@
     set(SNAPPY_STATIC_LIB_NAME snappy)
   endif()
   set(SNAPPY_STATIC_LIB "${SNAPPY_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  set(SNAPPY_VENDORED 1)
   set(SNAPPY_SRC_URL "https://github.com/google/snappy/releases/download/${SNAPPY_VERSION}/snappy-${SNAPPY_VERSION}.tar.gz")

   if (${UPPERCASE_BUILD_TYPE} EQUAL "RELEASE")
@@ -314,6 +301,10 @@
     else()
       set(SNAPPY_CXXFLAGS "CXXFLAGS='-DNDEBUG -O2'")
     endif()
+  endif()
+
+  if (CMAKE_VERSION VERSION_GREATER "3.2")
+    set(SNAPPY_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}")
   endif()

   if (MSVC)
@@ -327,46 +318,26 @@
                       ${CMAKE_COMMAND} -E copy
                       ${CMAKE_SOURCE_DIR}/cmake_modules/SnappyConfig.h
                       ./config.h)
-    if (CMAKE_VERSION VERSION_GREATER "3.2")
-      # BUILD_BYPRODUCTS is a 3.2+ feature
-      ExternalProject_Add(snappy_ep
-        UPDATE_COMMAND ${SNAPPY_UPDATE_COMMAND}
-        BUILD_IN_SOURCE 1
-        BUILD_COMMAND ${MAKE}
-        INSTALL_DIR ${SNAPPY_PREFIX}
-        URL ${SNAPPY_SRC_URL}
-        CMAKE_ARGS ${SNAPPY_CMAKE_ARGS}
-        BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}")
-    else()
-      ExternalProject_Add(snappy_ep
-        UPDATE_COMMAND ${SNAPPY_UPDATE_COMMAND}
-        BUILD_IN_SOURCE 1
-        BUILD_COMMAND ${MAKE}
-        INSTALL_DIR ${SNAPPY_PREFIX}
-        URL ${SNAPPY_SRC_URL}
-        CMAKE_ARGS ${SNAPPY_CMAKE_ARGS})
-    endif()
-  else()
-    if (CMAKE_VERSION VERSION_GREATER "3.2")
-      # BUILD_BYPRODUCTS is a 3.2+ feature
-      ExternalProject_Add(snappy_ep
-        CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}" ${SNAPPY_CXXFLAGS}
-        BUILD_IN_SOURCE 1
-        BUILD_COMMAND ${MAKE}
-        INSTALL_DIR ${SNAPPY_PREFIX}
-        URL ${SNAPPY_SRC_URL}
-        BUILD_BYPRODUCTS "${SNAPPY_STATIC_LIB}")
-    else()
-      ExternalProject_Add(snappy_ep
-        CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}" ${SNAPPY_CXXFLAGS}
-        BUILD_IN_SOURCE 1
-        BUILD_COMMAND ${MAKE}
-        INSTALL_DIR ${SNAPPY_PREFIX}
-        URL ${SNAPPY_SRC_URL})
-    endif()
-  endif()
-else()
-    set(SNAPPY_VENDORED 0)
+    ExternalProject_Add(snappy_ep
+      UPDATE_COMMAND ${SNAPPY_UPDATE_COMMAND}
+      BUILD_IN_SOURCE 1
+      BUILD_COMMAND ${MAKE}
+      INSTALL_DIR ${SNAPPY_PREFIX}
+      URL ${SNAPPY_SRC_URL}
+      CMAKE_ARGS ${SNAPPY_CMAKE_ARGS}
+      ${SNAPPY_BUILD_BYPRODUCTS})
+  else()
+    ExternalProject_Add(snappy_ep
+      CONFIGURE_COMMAND ./configure --with-pic "--prefix=${SNAPPY_PREFIX}" ${SNAPPY_CXXFLAGS}
+      BUILD_IN_SOURCE 1
+      BUILD_COMMAND ${MAKE}
+      INSTALL_DIR ${SNAPPY_PREFIX}
+      URL ${SNAPPY_SRC_URL}
+      ${SNAPPY_BUILD_BYPRODUCTS})
+  endif()
+  set(SNAPPY_VENDORED 1)
+else()
+  set(SNAPPY_VENDORED 0)
 endif()

 include_directories(SYSTEM ${SNAPPY_INCLUDE_DIR})
@@ -393,7 +364,6 @@
   set(BROTLI_LIBRARY_ENC "${BROTLI_PREFIX}/${BROTLI_LIB_DIR}/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(BROTLI_LIBRARY_DEC "${BROTLI_PREFIX}/${BROTLI_LIB_DIR}/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(BROTLI_LIBRARY_COMMON "${BROTLI_PREFIX}/${BROTLI_LIB_DIR}/${CMAKE_LIBRARY_ARCHITECTURE}/${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX}")
-  set(BROTLI_VENDORED 1)
   set(BROTLI_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                         "-DCMAKE_CXX_FLAGS=${EP_CXX_FLAGS}"
                         "-DCMAKE_C_FLAGS=${EX_C_FLAGS}"
@@ -402,17 +372,14 @@
                         -DBUILD_SHARED_LIBS=OFF)

   if (CMAKE_VERSION VERSION_GREATER "3.2")
-    # BUILD_BYPRODUCTS is a 3.2+ feature
-    ExternalProject_Add(brotli_ep
-      URL "https://github.com/google/brotli/archive/${BROTLI_VERSION}.tar.gz"
-      BUILD_BYPRODUCTS "${BROTLI_LIBRARY_ENC}" "${BROTLI_LIBRARY_DEC}" "${BROTLI_LIBRARY_COMMON}"
-      CMAKE_ARGS ${BROTLI_CMAKE_ARGS}
-      STEP_TARGETS headers_copy)
-  else()
-    ExternalProject_Add(brotli_ep
-      URL "https://github.com/google/brotli/archive/${BROTLI_VERSION}.tar.gz"
-      CMAKE_ARGS ${BROTLI_CMAKE_ARGS})
-  endif()
+    set(BROTLI_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${BROTLI_LIBRARY_ENC}" "${BROTLI_LIBRARY_DEC}" "${BROTLI_LIBRARY_COMMON}")
+  endif()
+
+  ExternalProject_Add(brotli_ep
+    URL "https://github.com/google/brotli/archive/${BROTLI_VERSION}.tar.gz"
+    ${BROTLI_BUILD_BYPRODUCTS}
+    CMAKE_ARGS ${BROTLI_CMAKE_ARGS}
+    STEP_TARGETS headers_copy)
   if (MSVC)
     ExternalProject_Get_Property(brotli_ep SOURCE_DIR)

@@ -421,6 +388,7 @@
       DEPENDEES build
       WORKING_DIRECTORY ${SOURCE_DIR})
   endif()
+  set(BROTLI_VENDORED 1)
 else()
   set(BROTLI_VENDORED 0)
 endif()
@@ -456,7 +424,6 @@
       "${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
     set(GTEST_MAIN_STATIC_LIB
       "${GTEST_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    set(GTEST_VENDORED 1)

     set(GTEST_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
                          -DCMAKE_INSTALL_PREFIX=${GTEST_PREFIX}
@@ -464,16 +431,14 @@
                          -DCMAKE_CXX_FLAGS=${GTEST_CMAKE_CXX_FLAGS})

     if (CMAKE_VERSION VERSION_GREATER "3.2")
-      # BUILD_BYPRODUCTS is a 3.2+ feature
-      ExternalProject_Add(googletest_ep
-        URL "https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz"
-        BUILD_BYPRODUCTS ${GTEST_STATIC_LIB} ${GTEST_MAIN_STATIC_LIB}
-        CMAKE_ARGS ${GTEST_CMAKE_ARGS})
-    else()
-      ExternalProject_Add(googletest_ep
-        URL "https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz"
-        CMAKE_ARGS ${GTEST_CMAKE_ARGS})
+      set(GTEST_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${GTEST_STATIC_LIB}" "${GTEST_MAIN_STATIC_LIB}")
     endif()
+
+    ExternalProject_Add(googletest_ep
+      URL "https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz"
+      ${GTEST_BUILD_BYPRODUCTS}
+      CMAKE_ARGS ${GTEST_CMAKE_ARGS})
+    set(GTEST_VENDORED 1)
   else()
     find_package(GTest REQUIRED)
     set(GTEST_VENDORED 0)
@@ -503,13 +468,11 @@

 if(PARQUET_BUILD_BENCHMARKS AND NOT IGNORE_OPTIONAL_PACKAGES)
   add_custom_target(runbenchmark ctest -L benchmark)
-

   if("$ENV{GBENCHMARK_HOME}" STREQUAL "")
     set(GBENCHMARK_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/gbenchmark_ep/src/gbenchmark_ep-install")
     set(GBENCHMARK_INCLUDE_DIR "${GBENCHMARK_PREFIX}/include")
     set(GBENCHMARK_STATIC_LIB "${GBENCHMARK_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}benchmark${CMAKE_STATIC_LIBRARY_SUFFIX}")
-    set(GBENCHMARK_VENDORED 1)
     set(GBENCHMARK_CMAKE_ARGS
           "-DCMAKE_BUILD_TYPE=Release"
           "-DCMAKE_INSTALL_PREFIX:PATH=${GBENCHMARK_PREFIX}"
@@ -518,17 +481,15 @@
     if (APPLE)
       set(GBENCHMARK_CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS} "-DBENCHMARK_USE_LIBCXX=ON")
     endif()
+
     if (CMAKE_VERSION VERSION_GREATER "3.2")
-      # BUILD_BYPRODUCTS is a 3.2+ feature
-      ExternalProject_Add(gbenchmark_ep
-        URL "https://github.com/google/benchmark/archive/v${GBENCHMARK_VERSION}.tar.gz"
-        BUILD_BYPRODUCTS "${GBENCHMARK_STATIC_LIB}"
-        CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS})
-    else()
-      ExternalProject_Add(gbenchmark_ep
-        URL "https://github.com/google/benchmark/archive/v${GBENCHMARK_VERSION}.tar.gz"
-        CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS})
+      set(GBENCHMARK_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${GBENCHMARK_STATIC_LIB}")
     endif()
+    ExternalProject_Add(gbenchmark_ep
+      URL "https://github.com/google/benchmark/archive/v${GBENCHMARK_VERSION}.tar.gz"
+      ${GBENCHMARK_BUILD_BYPRODUCTS}
+      CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS})
+    set(GBENCHMARK_VENDORED 1)
   else()
     find_package(GBenchmark REQUIRED)
     set(GBENCHMARK_VENDORED 0)
@@ -590,30 +551,23 @@

   set(ARROW_URL "https://github.com/apache/arrow/archive/${ARROW_VERSION}.tar.gz")

-  if (MSVC)
-    if (CMAKE_VERSION VERSION_GREATER "3.2")
-      # BUILD_BYPRODUCTS is a 3.2+ feature
-      ExternalProject_Add(arrow_ep
-        URL ${ARROW_URL}
-        BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}" "${ARROW_STATIC_LIB}"
-        # With CMake 3.7.0 there is a SOURCE_SUBDIR argument which we can use
-        # to specify that the CMakeLists.txt of Arrow is located in cpp/
-        #
-        # See https://gitlab.kitware.com/cmake/cmake/commit/a8345d65f359d75efb057d22976cfb92b4d477cf
-        CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
-        CMAKE_GENERATOR "NMake Makefiles"
-        CMAKE_GENERATOR_PLATFORM "x64"
-        BUILD_COMMAND nmake COMMAND nmake install
-        STEP_TARGETS copy_dll_step)
-    else()
-      ExternalProject_Add(arrow_ep
-        URL ${ARROW_URL}
-        CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
-        CMAKE_GENERATOR "NMake Makefiles"
-        CMAKE_GENERATOR_PLATFORM "x64"
-        BUILD_COMMAND nmake COMMAND nmake install
-        STEP_TARGETS copy_dll_step)
-    endif()
+  if (CMAKE_VERSION VERSION_GREATER "3.2")
+    set(ARROW_BUILD_BYPRODUCTS BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}" "${ARROW_STATIC_LIB}")
+  endif()
+
+  if (MSVC)
+    ExternalProject_Add(arrow_ep
+      URL ${ARROW_URL}
+      ${ARROW_BUILD_BYPRODUCTS}
+      # With CMake 3.7.0 there is a SOURCE_SUBDIR argument which we can use
+      # to specify that the CMakeLists.txt of Arrow is located in cpp/
+      #
+      # See https://gitlab.kitware.com/cmake/cmake/commit/a8345d65f359d75efb057d22976cfb92b4d477cf
+      CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
+      CMAKE_GENERATOR "NMake Makefiles"
+      CMAKE_GENERATOR_PLATFORM "x64"
+      BUILD_COMMAND nmake COMMAND nmake install
+      STEP_TARGETS copy_dll_step)

     ExternalProject_Get_Property(arrow_ep SOURCE_DIR)
     ExternalProject_Add_Step(arrow_ep copy_dll_step
@@ -622,23 +576,15 @@
       DEPENDEES build
       WORKING_DIRECTORY ${SOURCE_DIR})
   else()
-    if (CMAKE_VERSION VERSION_GREATER "3.2")
-      # BUILD_BYPRODUCTS is a 3.2+ feature
-      ExternalProject_Add(arrow_ep
-        URL ${ARROW_URL}
-        BUILD_BYPRODUCTS "${ARROW_SHARED_LIB}" "${ARROW_STATIC_LIB}"
-        # With CMake 3.7.0 there is a SOURCE_SUBDIR argument which we can use
-        # to specify that the CMakeLists.txt of Arrow is located in cpp/
-        #
-        # See https://gitlab.kitware.com/cmake/cmake/commit/a8345d65f359d75efb057d22976cfb92b4d477cf
-        CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
-        CMAKE_ARGS ${ARROW_CMAKE_ARGS})
-    else()
-      ExternalProject_Add(arrow_ep
-        URL ${ARROW_URL}
-        CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
-        CMAKE_ARGS ${ARROW_CMAKE_ARGS})
-    endif()
+    ExternalProject_Add(arrow_ep
+      URL ${ARROW_URL}
+      ${ARROW_BUILD_BYPRODUCTS}
+      # With CMake 3.7.0 there is a SOURCE_SUBDIR argument which we can use
+      # to specify that the CMakeLists.txt of Arrow is located in cpp/
+      #
+      # See https://gitlab.kitware.com/cmake/cmake/commit/a8345d65f359d75efb057d22976cfb92b4d477cf
+      CONFIGURE_COMMAND "${CMAKE_COMMAND}" ${ARROW_CMAKE_ARGS} ${CMAKE_CURRENT_BINARY_DIR}/arrow_ep-prefix/src/arrow_ep/cpp
+      CMAKE_ARGS ${ARROW_CMAKE_ARGS})
   endif()
   set(ARROW_VENDORED 1)
 else()


Typo - Build fix

Typo - Build fix

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -129,7 +129,7 @@

 set(OSGEARTH_BASE_DIR ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/osgearth-prefix/src)
 # NOTE: setting the OSGEARTH_INCLUDES as an internal cache variable, makes it accessible to other modules.
-set(OSGEARTH_INCLUDES ${OSGEARTH_BASE_DIR}/osgEarth/src CACHE INTERNAL "")
+set(OSGEARTH_INCLUDES ${OSGEARTH_BASE_DIR}/osgearth/src CACHE INTERNAL "")

 set(OSGEARTH_COMPONENTS osgEarth osgEarthAnnotation osgEarthFeatures osgEarthSymbology osgEarthUtil)
 if(OMEGA_OS_WIN)


remove unnecessary rpath Cmake logic

remove unnecessary rpath Cmake logic

--- external/cmake/metis.cmake
+++ external/cmake/metis.cmake
@@ -47,26 +47,6 @@
   )
   add_dependencies(External project_metis)

-set(CMAKE_MACOSX_RPATH TRUE)
-
-# use, i.e. don't skip the full RPATH for the build tree
-set(CMAKE_SKIP_BUILD_RPATH FALSE)
-
-# when building, don't use the install RPATH already
-# (but later on when installing)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-
-# add the automatically determined parts of the RPATH
-# which point to directories outside the build tree to the install RPATH
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-
-# the RPATH to be used when installing, but only if it's not a system directory
-list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
-if("${isSystemDir}" STREQUAL "-1")
-   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-endif()
-
-
   # Extract the installation directory
   ExternalProject_Get_Property(project_metis install_dir)


Update ITK superbuild version to 4.12.0 release

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -51,7 +51,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG d6c46070becb30882240631fee71a75ef244c2c2) # v4.12 after RC3
+set(ITK_TAG_COMMAND GIT_TAG v4.12.0) # 4.12.0 tag

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


Placing rpi64 before rpi

Placing rpi64 before rpi

--- core/cmake/platforms.cmake
+++ core/cmake/platforms.cmake
@@ -27,14 +27,14 @@
   set(CTEST_CMAKE_GENERATOR "Ninja")
   set(TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchains/mxe.cmake")

+elseif (PLATFORM MATCHES rpi64)
+  set(CTEST_CMAKE_GENERATOR "Ninja")
+  set(TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchains/rpi64.cmake")
+
 elseif (PLATFORM MATCHES rpi)
   set(CTEST_CMAKE_GENERATOR "Ninja")
   set(TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchains/rpi.cmake")

-elseif (PLATFORM MATCHES rpi64)
-  set(CTEST_CMAKE_GENERATOR "Ninja")
-  set(TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/toolchains/rpi64.cmake")
-
 else()
   message(FATAL_ERROR "UNSUPPORTED PLATFORM!")
 endif()


make the gtest folder name rarer

make the gtest folder name rarer

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -586,9 +586,9 @@
   if (NOT GTEST_FOUND)
     # gtest is installed but there might not be any library (e.g. Ubuntu Precise), so build it
     if (EXISTS "/usr/src/gtest")
-      if (NOT EXISTS "${CMAKE_BINARY_DIR}/gtest")
+      if (NOT EXISTS "${CMAKE_BINARY_DIR}/_gtest_from_src")
         # for now, this would only work on Ubuntu
-        add_subdirectory("/usr/src/gtest/" ${CMAKE_BINARY_DIR}/gtest)
+        add_subdirectory("/usr/src/gtest/" ${CMAKE_BINARY_DIR}/_gtest_from_src)
       endif()
     else()
       message(WARNING "GTest not found; C++ tests will fail to build.")


BUG: Enable using only FFT Factory Register Manager

Generate FFT factory register manager when
ITK_NO_IO_FACTORY_REGISTER_MANAGER is set to 1.

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -243,7 +243,11 @@
     set(${_format}_${factory_lc}_module_name ${Module})
     set(${_format}_${factory_lc}_factory_name ${_format}${_factory_name})
   endforeach()
-  if(NOT ITK_NO_IO_FACTORY_REGISTER_MANAGER)
+  if(_factory_name MATCHES "IO" AND ITK_NO_IO_FACTORY_REGISTER_MANAGER)
+    # pass generation IO factory registration
+  elseif(_factory_name MATCHES "FFT" AND ITK_NO_FFT_FACTORY_REGISTER_MANAGER)
+    # pass generation of FFT factory registration
+  else()
     _configure_FactoryRegisterManager("${_factory_name}" "${LIST_OF_${factory_uc}_FORMATS}")
   endif()
 endforeach()


Add generate/build status messages

Add generate/build status messages

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -236,7 +236,9 @@
       h_generate_result
   )

-  if(NOT ${h_generate_result} EQUAL 0)
+  if(${h_generate_result} EQUAL 0)
+    hunter_status_debug("Generate step successful (dir: ${h_work_dir})")
+  else()
     hunter_fatal_error("generate step failed (dir: ${h_work_dir})")
   endif()

@@ -255,7 +257,9 @@

   hunter_unlock()

-  if(NOT ${h_build_result} EQUAL 0)
+  if(${h_build_result} EQUAL 0)
+    hunter_status_debug("Build step successful (dir: ${h_work_dir})")
+  else()
     hunter_fatal_error("build step failed (dir: ${h_work_dir}")
   endif()


 - исправлен запуск многопроходного бизона в cmake - возможность создавать bison defines

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12663 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/split-bison.cmake
+++ rdo/packages/cmake/trunk/split-bison.cmake
@@ -33,7 +33,7 @@
 	SET(BISON_${INPUT_FILE}_OUTPUT_HEADER)
 	IF(${ARGC} GREATER 4 OR ${ARGC} EQUAL 4)
 		SET(BISON_${INPUT_FILE}_OUTPUT_HEADER ${GRAMMA_H})
-		SET(BISON_DEFINE --defines=${BISON_${INPUT_FILE}_OUTPUT_HEADER})
+		SET(BISON_DEFINE -defines ${BISON_${INPUT_FILE}_OUTPUT_HEADER})
 		LIST(APPEND OUTPUT_FILE ${BISON_${INPUT_FILE}_OUTPUT_HEADER})
 	ENDIF()


Made FindFilesystem.cmake work with gcc-8's libstdc++

gcc-8's libstdc++.so contains experimental filesystem
symbols which make the linker happy but don't match
the definitions in the header files. According to the
devs it is necessary to force linking against libstdc++fs.a

This change requires the std::filesystem test program not only
to compile but also to run properly. In the GCC-8 case it segfaults
and the detection will choose linking against libstdc++fs.a
over not linking.

--- cmake/FindFilesystem.cmake
+++ cmake/FindFilesystem.cmake
@@ -104,7 +104,7 @@

 include(CMakePushCheckState)
 include(CheckIncludeFileCXX)
-include(CheckCXXSourceCompiles)
+include(CheckCXXSourceRuns)

 cmake_push_check_state()

@@ -180,12 +180,17 @@

         int main() {
             auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path();
-            return static_cast<int>(cwd.string().size());
+            for (auto &_ : @CXX_FILESYSTEM_NAMESPACE@::directory_iterator{cwd}) {
+                (void) _;
+            }
+            auto root = cwd.root_directory();
+            (void) root;
+            return 0;
         }
     ]] code @ONLY)

     # Try to compile a simple filesystem program without any linker flags
-    check_cxx_source_compiles("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED)
+    check_cxx_source_runs("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED)

     set(can_link ${CXX_FILESYSTEM_NO_LINK_NEEDED})

@@ -194,13 +199,13 @@
         # Add the libstdc++ flag
         set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++fs -lstdc++)
         set(CMAKE_REQUIRED_FLAGS "-std=c++17")
-        check_cxx_source_compiles("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED)
+        check_cxx_source_runs("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED)
         set(can_link ${CXX_FILESYSTEM_STDCPPFS_NEEDED})
         if(NOT CXX_FILESYSTEM_STDCPPFS_NEEDED)
             # Try the libc++ flag
             set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lc++fs)
             set(CMAKE_REQUIRED_FLAGS "-std=c++17")
-            check_cxx_source_compiles("${code}" CXX_FILESYSTEM_CPPFS_NEEDED)
+            check_cxx_source_runs("${code}" CXX_FILESYSTEM_CPPFS_NEEDED)
             set(can_link ${CXX_FILESYSTEM_CPPFS_NEEDED})
         endif()
     endif()


Better FindQScintilla.cmake

Better FindQScintilla.cmake

--- cmake/FindQScintilla.cmake
+++ cmake/FindQScintilla.cmake
@@ -7,47 +7,36 @@
 # QSCINTILLA_LIBRARY - where to find the QScintilla library (not for general use)

 # copyright (c) 2007 Thomas Moenicke thomas.moenicke@kdemail.net
+# Heavily based on https://git.io/viwyp
 #
 # Redistribution and use is allowed according to the terms of the FreeBSD license.

-SET(QSCINTILLA_FOUND FALSE)
+find_path(QSCINTILLA_INCLUDE_DIR
+  NAMES Qsci qsciglobal.h
+  PATHS "${Qt5Core_INCLUDE_DIRS}" /usr/include/x86_64-linux-gnu/qt5
+  PATH_SUFFIXES Qsci
+)

-IF(Qt5_FOUND)
-    FIND_PATH(QSCINTILLA_INCLUDE_DIR qsciglobal.h
-    "${QT_INCLUDE_DIR}/Qsci" /usr/include /usr/include/Qsci
-    )
+find_library(QSCINTILLA_LIBRARY
+  NAMES qt5scintilla2 libqt5scintilla2
+  PATHS ${Qt5Core_LIBRARIES}
+)

-    SET(QSCINTILLA_NAMES ${QSCINTILLA_NAMES} qscintilla2 libqscintilla2)
-    FIND_LIBRARY(QSCINTILLA_LIBRARY
-        NAMES ${QSCINTILLA_NAMES}
-        PATHS ${QT_LIBRARY_DIR}
-    )
+include(FindPackageHandleStandardArgs)

-    IF (QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
+message(STATUS ${QSCINTILLA_INCLUDE_DIR})
+message(STATUS ${QSCINTILLA_LIBRARY})

-        SET(QSCINTILLA_LIBRARIES ${QSCINTILLA_LIBRARY})
-        SET(QSCINTILLA_FOUND TRUE)
+find_package_handle_standard_args(
+  QScintilla
+  FOUND_VAR QSCINTILLA_FOUND
+  REQUIRED_VARS QSCINTILLA_INCLUDE_DIR QSCINTILLA_LIBRARY
+  VERSION_VAR QSCINTILLA_VERSION
+)

-        IF (CYGWIN)
-            IF(BUILD_SHARED_LIBS)
-            # No need to define QSCINTILLA_USE_DLL here, because it's default for Cygwin.
-            ELSE(BUILD_SHARED_LIBS)
-            SET (QSCINTILLA_DEFINITIONS -DQSCINTILLA_STATIC)
-            ENDIF(BUILD_SHARED_LIBS)
-        ENDIF (CYGWIN)
+message(STATUS ${QSCINTILLA_VERSION})

-    ENDIF (QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR)
-ENDIF()
+set(QSCINTILLA_LIBRARIES ${QSCINTILLA_LIBRARY})
+set(QSCINTILLA_INCLUDE_DIRS ${QSCINTILLA_INCLUDE_DIR})

-IF (QSCINTILLA_FOUND)
-  IF (NOT QScintilla_FIND_QUIETLY)
-    MESSAGE(STATUS "Found QScintilla2: ${QSCINTILLA_LIBRARY}")
-  ENDIF (NOT QScintilla_FIND_QUIETLY)
-ELSE (QSCINTILLA_FOUND)
-  IF (QScintilla_FIND_REQUIRED)
-    MESSAGE(FATAL_ERROR "Could not find QScintilla library")
-  ENDIF (QScintilla_FIND_REQUIRED)
-ENDIF (QSCINTILLA_FOUND)
-
-MARK_AS_ADVANCED(QSCINTILLA_INCLUDE_DIR QSCINTILLA_LIBRARY)
-
+mark_as_advanced(QSCINTILLA_INCLUDE_DIR QSCINTILLA_LIBRARY)


[Fuchsia] Include install-distribution-stripped in bootstrap targets

This enables the use of install-distribution-stripped target in the
2-stage builds.

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

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

--- cmake/caches/Fuchsia.cmake
+++ cmake/caches/Fuchsia.cmake
@@ -38,6 +38,7 @@
   clang-test-depends
   distribution
   install-distribution
+  install-distribution-stripped
   clang CACHE STRING "")

 get_cmake_property(variableNames VARIABLES)


update mkl version, and add mkl-mac version

test=develop

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -15,14 +15,6 @@
 IF(NOT ${WITH_MKLML})
   return()
 ENDIF(NOT ${WITH_MKLML})
-
-IF(APPLE)
-    MESSAGE(WARNING
-        "Mac is not supported with MKLML in Paddle yet."
-        "Force WITH_MKLML=OFF")
-    SET(WITH_MKLML OFF CACHE STRING "Disable MKLML package in Windows and MacOS" FORCE)
-    return()
-ENDIF()

 INCLUDE(ExternalProject)
 SET(MKLML_DST_DIR       "mklml")
@@ -47,10 +39,13 @@
 IF((NOT DEFINED MKLML_VER) OR (NOT DEFINED MKLML_URL))
     MESSAGE(STATUS "use pre defined download url")
     if(WIN32)
-        SET(MKLML_VER "mklml_win_2019.0.20180710" CACHE STRING "" FORCE)
+        SET(MKLML_VER "mklml_win_2019.0.1.20180928" CACHE STRING "" FORCE)
         SET(MKLML_URL "https://paddlepaddledeps.cdn.bcebos.com/${MKLML_VER}.zip" CACHE STRING "" FORCE)
+    elseif(APPLE)
+        SET(MKLML_VER "mklml_mac_2019.0.1.20180928" CACHE STRING "" FORCE)
+        SET(MKLML_URL "http://paddlepaddledeps.cdn.bcebos.com/${MKLML_VER}.tgz" CACHE STRING "" FORCE)
     else()
-        SET(MKLML_VER "mklml_lnx_2019.0.20180710" CACHE STRING "" FORCE)
+        SET(MKLML_VER "mklml_lnx_2019.0.1.20180928" CACHE STRING "" FORCE)
         SET(MKLML_URL "http://paddlepaddledeps.cdn.bcebos.com/${MKLML_VER}.tgz" CACHE STRING "" FORCE)
     ENDIF()
 endif()


Fix mysql-test directory in RPMs.

Fix mysql-test directory in RPMs.

While here:

 - split INSTALL_*DIR variables into two sections, first set the major
   variables, then second set the minor ones, using the major where
   appropriate.

 - format the settings for easier parsing (at least with a wide terminal)

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -107,26 +107,29 @@
 SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
 SET(INSTALL_MYSQLDATADIR_STANDALONE "data")

+#
 # RPM layout
-SET(INSTALL_BINDIR_RPM "bin")
-SET(INSTALL_SBINDIR_RPM "sbin")
+#
+SET(INSTALL_BINDIR_RPM              "bin")
+SET(INSTALL_INCLUDEDIR_RPM          "include/mysql")
 IF(64BIT)
-  SET(INSTALL_LIBDIR_RPM "lib64")
+  SET(INSTALL_LIBDIR_RPM            "lib64")
 ELSE()
-  SET(INSTALL_LIBDIR_RPM "lib")
+  SET(INSTALL_LIBDIR_RPM            "lib")
 ENDIF()
-SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/mysql/plugin")
-SET(INSTALL_DOCDIR_RPM "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
-SET(INSTALL_MANDIR_RPM "share/man")
-SET(INSTALL_INCLUDEDIR_RPM "include/mysql")
-SET(INSTALL_MYSQLSHAREDIR_RPM "share/mysql")
-SET(INSTALL_SHAREDIR_RPM "share")
-SET(INSTALL_SCRIPTDIR_RPM "bin")
-SET(INSTALL_MYSQLTESTDIR_RPM "mysql-test")
-SET(INSTALL_SQLBENCHROOTDIR_RPM "")
-SET(INSTALL_DOCREADMEDIR_RPM "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
-SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
-SET(INSTALL_MYSQLDATADIR_RPM "var")
+SET(INSTALL_SBINDIR_RPM             "sbin")
+SET(INSTALL_SHAREDIR_RPM            "share")
+#
+SET(INSTALL_DOCDIR_RPM              "${INSTALL_SHAREDIR_RPM}/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
+SET(INSTALL_DOCREADMEDIR_RPM        "${INSTALL_DOCDIR_RPM}")
+SET(INSTALL_MANDIR_RPM              "${INSTALL_SHAREDIR_RPM}/man")
+SET(INSTALL_MYSQLDATADIR_RPM        "var")
+SET(INSTALL_MYSQLSHAREDIR_RPM       "${INSTALL_SHAREDIR_RPM}/mysql")
+SET(INSTALL_MYSQLTESTDIR_RPM        "${INSTALL_SHAREDIR_RPM}/mysql-test")
+SET(INSTALL_PLUGINDIR_RPM           "${INSTALL_LIBDIR_RPM}/mysql/plugin")
+SET(INSTALL_SCRIPTDIR_RPM           "${INSTALL_BINDIR_RPM}")
+SET(INSTALL_SQLBENCHROOTDIR_RPM     "")
+SET(INSTALL_SUPPORTFILESDIR_RPM     "${INSTALL_SHAREDIR_RPM}/mysql")

 # DEB layout
 SET(INSTALL_BINDIR_DEB "bin")


Reversing earlier change: CMake 2.6.3 solves the issue of the import libraries for MSYS

svn path=/trunk/; revision=9827

--- cmake/modules/wingcc.cmake
+++ cmake/modules/wingcc.cmake
@@ -29,20 +29,10 @@

 if(PLD_wingcc)
   message(STATUS "Looking for gdi32 header and library")
-  if(NOT MSYS)
-    find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
-    if(GDI32_LIBRARY)
-      find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
-    endif(GDI32_LIBRARY)
-  else(NOT MSYS)
-    # Use fixed names instead
-    # Note: MINGWLIBPATH gave problem: CACHE unknown component
-    get_filename_component(msys_BIN ${CMAKE_C_COMPILER} PATH)
-    set(msys_LIBDIR ${msys_BIN}/../lib)
-    #get_filename_component(msys_LIBDIR ${msys_LIBS} PATH)
-    set(GDI32_LIBRARY ${msys_LIBDIR}/libgdi32.a)
-    set(COMDLG32_LIBRARY ${msys_LIBDIR}/libcomdlg32.a)
-  endif(NOT MSYS)
+  find_library(GDI32_LIBRARY gdi32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+  if(GDI32_LIBRARY)
+    find_library(COMDLG32_LIBRARY comdlg32 HINTS ${MINGWLIBPATH} ${BORLANDLIBPATH})
+  endif(GDI32_LIBRARY)
   if(GDI32_LIBRARY AND COMDLG32_LIBRARY)
     message(STATUS "Looking for gdi32 header and library - found")
     set(wingcc_LINK_FLAGS "${GDI32_LIBRARY};${COMDLG32_LIBRARY}")


libRaptorQ: always turn LTO off

libRaptorQ: always turn LTO off

--- projects/libraptorq.cmake
+++ projects/libraptorq.cmake
@@ -47,13 +47,8 @@
     -DOVERRIDE_CMAKE_GENERATOR=OFF
     -DPROFILING=OFF
     -DBUILD_SHARED_LIB=OFF
+    -DLTO=OFF # Solaris and MacOSX linker error when LTO turned ON, Linux incomplete library
     )
-  if(${CMAKE_SYSTEM_NAME} STREQUAL SunOS OR ${CMAKE_SYSTEM_NAME} STREQUAL Darwin)
-    # TODO: Solaris and MacOSX linker error when LTO turned ON
-    list(APPEND XP_CONFIGURE -DLTO=OFF)
-  else()
-    list(APPEND XP_CONFIGURE -DLTO=ON)
-  endif()
   configure_file(${PRO_DIR}/use/usexp-libraptorq-config.cmake ${STAGE_DIR}/share/cmake/
     @ONLY NEWLINE_STYLE LF
     )


place constraints: added comments on place constraints in Cmake

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -81,6 +81,14 @@
   #   will be defined by the BOARD being used. See DEFINE_BOARD.
   # * OUT_EBLIF - Input path to EBLIF file.
   # * INPUT_IO_FILE - Path to input io file, as specified by ADD_FPGA_TARGET.
+  #
+  # PLACE_TOOL_CONSTR_CMD variables:
+  #
+  # * PLACE_TOOL_CONSTR - Value of PLACE_TOOL_CONSTR property of <arch>.
+  #
+  # This command enables the possibility to add an additional step consisting
+  # on the addition of extra placement constraints through the usage of the chosen
+  # script.
   #
   # HLC_TO_BIT_CMD variables:
   #


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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