update FindGflags.cmake to work on CentOS 8.x (#1409)

Summary:
Update FindGflags.cmake to work on recent CentOS and RedHat distributions.

On these distributions the CMake package configuration installed by the
gflags-devel RPM is slightly broken, and sets `gflags_INCLUDE_DIR` to a
directory that does not exist.  This happens because `/lib64` is symlinked to
`/usr/lib64`, and CMake ends up searching `/lib64` before `/usr/lib64` by
default when searching for packages.  Therefore it finds `gflags-config.cmake`
via the `/lib64` symlink.  However, `gflags-config.cmake` computes the include
directory relative to where its config file was found, and this relative path
computation only works when using the actual `/usr/lib64` path where it was
installed.  When found via `/lib64` it returns a bogus `//include` path that
does not exist.

This updates `FindGflags.cmake` to verify if the `gflags_INCLUDE_DIR` path
actually exists, and set it to a sane location instead.

This also updates the code to use the `gflags-shared` target that is exported
by the default gflags package configuration if it was only built as a shared
library.

Pull Request resolved: https://github.com/facebook/folly/pull/1409

Reviewed By: yfeldblum

Differential Revision: D23588288

fbshipit-source-id: b68a717953ae0521f568d7bcfd05ca33cd6dc578

--- build/fbcode_builder/CMake/FindGflags.cmake
+++ build/fbcode_builder/CMake/FindGflags.cmake
@@ -41,6 +41,16 @@
   # Re-export the config-specified libs with our local names
   set(LIBGFLAGS_LIBRARY ${gflags_LIBRARIES})
   set(LIBGFLAGS_INCLUDE_DIR ${gflags_INCLUDE_DIR})
+  if(NOT EXISTS "${gflags_INCLUDE_DIR}")
+    # The gflags-devel RPM on recent RedHat-based systems is somewhat broken.
+    # RedHat symlinks /lib64 to /usr/lib64, and this breaks some of the
+    # relative path computation performed in gflags-config.cmake.  The package
+    # config file ends up being found via /lib64, but the relative path
+    # computation it does only works if it was found in /usr/lib64.
+    # If gflags_INCLUDE_DIR does not actually exist, simply default it to
+    # /usr/include on these systems.
+    set(LIBGFLAGS_INCLUDE_DIR "/usr/include")
+  endif()
   set(LIBGFLAGS_FOUND ${gflags_FOUND})
   # cmake module compat
   set(GFLAGS_FOUND ${gflags_FOUND})
@@ -76,6 +86,20 @@
 # Compat with the gflags CONFIG based detection
 if (LIBGFLAGS_FOUND AND NOT TARGET gflags)
   add_library(gflags UNKNOWN IMPORTED)
-  set_target_properties(gflags PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}")
-  set_target_properties(gflags PROPERTIES IMPORTED_LINK_INTERFACE_LANGUAGES "C" IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}")
+  if(TARGET gflags-shared)
+    # If the installed gflags CMake package config defines a gflags-shared
+    # target but not gflags, just make the gflags target that we define
+    # depend on the gflags-shared target.
+    target_link_libraries(gflags INTERFACE gflags-shared)
+    # Export LIBGFLAGS_LIBRARY as the gflags-shared target in this case.
+    set(LIBGFLAGS_LIBRARY gflags-shared)
+  else()
+    set_target_properties(
+      gflags
+      PROPERTIES
+        IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+        IMPORTED_LOCATION "${LIBGFLAGS_LIBRARY}"
+        INTERFACE_INCLUDE_DIRECTORIES "${LIBGFLAGS_INCLUDE_DIR}"
+    )
+  endif()
 endif()


FindSodium: Do not create target unconditionally (#430)

Summary:
This fixes  https://github.com/facebook/fbthrift/issues/429

Pull Request resolved: https://github.com/facebook/fbthrift/pull/430

Reviewed By: iahs

Differential Revision: D28832985

Pulled By: vitaut

fbshipit-source-id: 0719f27207d11bb7970cc43c621640c425d8f55d

--- build/fbcode_builder/CMake/FindSodium.cmake
+++ build/fbcode_builder/CMake/FindSodium.cmake
@@ -254,7 +254,10 @@
 else()
     set(_LIB_TYPE SHARED)
 endif()
-add_library(sodium ${_LIB_TYPE} IMPORTED)
+
+if(NOT TARGET sodium)
+    add_library(sodium ${_LIB_TYPE} IMPORTED)
+endif()

 set_target_properties(sodium PROPERTIES
     INTERFACE_INCLUDE_DIRECTORIES "${sodium_INCLUDE_DIR}"


Update FW, add initial support for IMX582/IMX586

--- 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 "0647981afd0f2f366666641f51b51494ea0b62b1")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "b15c025a88fadb8901e99faf37ad14834b268c0b")

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


Updating firmware. (#44)

Updating firmware. (#44)

Adding GET_MESSAGE_PART for SPI api..

--- 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 "f8870d221dbac29efc8b4d66b051647ee2bd804b")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "0450e1fd6b11c892d3c75b3794a7b9839796afd2")

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


aerofc-v1:Does not have uavcan

aerofc-v1:Does not have uavcan

--- cmake/configs/nuttx_aerofc-v1_default.cmake
+++ cmake/configs/nuttx_aerofc-v1_default.cmake
@@ -1,7 +1,5 @@

 px4_nuttx_configure(HWCLASS m4 CONFIG nsh ROMFS y ROMFSROOT px4fmu_common)
-
-set(config_uavcan_num_ifaces 2)

 set(config_module_list
 	#


px4fmu-v2 disable sdp3x to save flash (#10600)

 - fixes #10599

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -31,7 +31,7 @@
 	#drivers/differential_pressure/ets
 	drivers/differential_pressure/ms4525
 	drivers/differential_pressure/ms5525
-	drivers/differential_pressure/sdp3x
+	#drivers/differential_pressure/sdp3x
 	drivers/distance_sensor/ll40ls
 	#drivers/distance_sensor/mb12xx
 	drivers/distance_sensor/sf0x


FMUv5: Enable DDS

FMUv5: Enable DDS

--- cmake/configs/nuttx_px4fmu-v5_default.cmake
+++ cmake/configs/nuttx_px4fmu-v5_default.cmake
@@ -140,6 +140,9 @@
 	modules/systemlib/mixer
 	modules/uORB

+	# micro RTPS
+	modules/micrortps_bridge/micrortps_client
+
 	#
 	# Libraries
 	#
@@ -210,6 +213,14 @@
 	#examples/ekf_att_pos_estimator
 )

+set(config_rtps_send_topics
+   sensor_combined
+   )
+
+set(config_rtps_receive_topics
+   sensor_baro
+   )
+
 set(config_extra_builtin_cmds
 	serdis
 	sercon


Fail if monalisa is not found and fail-on-missing=ON

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -849,11 +849,15 @@

 #---Monalisa support----------------------------------------------------------------
 if(monalisa)
-  find_package(Monalisa)
-  if(NOT MONALISA_FOUND)
-    message(STATUS "Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation")
-    message(STATUS "For the time being switching OFF 'monalisa' option")
-    set(monalisa OFF CACHE BOOL "" FORCE)
+  if(fail-on-missing)
+    find_package(Monalisa REQUIRED)
+  else()
+    find_package(Monalisa)
+    if(NOT MONALISA_FOUND)
+      message(STATUS "Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation")
+      message(STATUS "For the time being switching OFF 'monalisa' option")
+      set(monalisa OFF CACHE BOOL "" FORCE)
+    endif()
   endif()
 endif()


Fail to configure if fail-on-missing=ON and LZ4 is not found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -243,10 +243,14 @@
   foreach(suffix FOUND INCLUDE_DIR LIBRARY LIBRARY_DEBUG LIBRARY_RELEASE)
     unset(LZ4_${suffix} CACHE)
   endforeach()
-  find_package(LZ4)
-  if(NOT LZ4_FOUND)
-    message(STATUS "LZ4 not found. Switching on builtin_lz4 option")
-    set(builtin_lz4 ON CACHE BOOL "Enabled because LZ4 not found (${builtin_lz4_description})" FORCE)
+  if(fail-on-missing)
+    find_package(LZ4 REQUIRED)
+  else()
+    find_package(LZ4)
+    if(NOT LZ4_FOUND)
+      message(STATUS "LZ4 not found. Switching on builtin_lz4 option")
+      set(builtin_lz4 ON CACHE BOOL "Enabled because LZ4 not found (${builtin_lz4_description})" FORCE)
+    endif()
   endif()
 endif()


Fix check for matching versions of Python and its libraries

On Windows, these are e.g. 3.5 and 3.5.5, so comparing for
equality is too strict.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -476,7 +476,7 @@
     endif()
   endif()

-  if(NOT "${PYTHON_VERSION_STRING}" STREQUAL "${PYTHONLIBS_VERSION_STRING}")
+  if(NOT "${PYTHONLIBS_VERSION_STRING}" MATCHES "${PYTHON_VERSION_STRING}")
     message(FATAL_ERROR "Version mismatch between Python interpreter (${PYTHON_VERSION_STRING})"
     " and libraries (${PYTHONLIBS_VERSION_STRING}).\nROOT cannot work with this configuration. "
     "Please specify only PYTHON_EXECUTABLE to CMake with an absolute path to ensure matching versions are found.")


Fail to configure if fail-on-missing=ON and Freetype is not found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -75,14 +75,19 @@
 #---Check for Freetype---------------------------------------------------------------
 if(NOT builtin_freetype)
   message(STATUS "Looking for Freetype")
-  find_package(Freetype)
-  if(FREETYPE_FOUND)
-    set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR_freetype2})
-  else()
-    message(STATUS "FreeType not found. Switching on builtin_freetype option")
-    set(builtin_freetype ON CACHE BOOL "Enabled because FreeType not found (${builtin_freetype_description})" FORCE)
-  endif()
-endif()
+  if(fail-on-missing)
+    find_package(Freetype REQUIRED)
+  else()
+    find_package(Freetype)
+    if(FREETYPE_FOUND)
+      set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR_freetype2})
+    else()
+      message(STATUS "FreeType not found. Switching on builtin_freetype option")
+      set(builtin_freetype ON CACHE BOOL "Enabled because FreeType not found (${builtin_freetype_description})" FORCE)
+    endif()
+  endif()
+endif()
+
 if(builtin_freetype)
   set(freetype_version 2.6.1)
   message(STATUS "Building freetype version ${freetype_version} included in ROOT itself")


Correct rule generation for builtin libraries.

The builtin Vdt and Vc builds, when enabled, cause some targets
to depend on libraries (libvdt.so, libVc.a) that are the output
of the ExternalProject command.  However, unless they are explicitly
listed as outputs (as done in this patch), the build tool may not
know how to generate them.

Typically, this isn't a problem because the builtins are done
sufficiently early in the build and it's nearly impossible to hit the
Vc dependency before the library is installed.

However, some build tools (such as ninja) explicitly check for missing
libraries and refuse to attempt the build because no rule explicitly
builds the missing library.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1252,6 +1252,7 @@
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}
     )
     set(Vc_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
     set(Vc_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX})
@@ -1283,6 +1284,7 @@
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
+      BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}vdt${CMAKE_SHARED_LIBRARY_SUFFIX}
     )
     set(VDT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
     set(VDT_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}vdt${CMAKE_SHARED_LIBRARY_SUFFIX})


Fix typo in documentation path

Fix typo in documentation path

--- Projects/win32/velodyneviewer.bundle.cmake
+++ Projects/win32/velodyneviewer.bundle.cmake
@@ -65,7 +65,7 @@
         DESTINATION "bin"
         COMPONENT ${AppName})

-install(FILES "${SuperBuild_BINARY_DIR}/velodyneviewer/src/velodyneviewer/Doc/VeloView_Developer_Guide.pdf"
+install(FILES "${SuperBuild_BINARY_DIR}/velodyneviewer/src/velodyneviewer/Documentation/VeloView_Developer_Guide.pdf"
         DESTINATION "doc"
         COMPONENT ${AppName})


download osgEarth using http

download osgEarth using http

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -128,7 +128,7 @@
 ExternalProject_Add(
     osgearth
     DEPENDS ${OSGEARTH_DEPENDS}
-    URL https://omegalib.googlecode.com/files/osgearth-10db273f4f.tar.gz
+    URL http://omegalib.googlecode.com/files/osgearth-10db273f4f.tar.gz
     CMAKE_ARGS
         ${OSGEARTH_ARGS}
     INSTALL_COMMAND ""


scripts: add compile flag -fno-omit-frame-pointer (#196)

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -208,6 +208,11 @@
     # We want access to the PRI* print format macros.
     add_definitions(-D__STDC_FORMAT_MACROS)

+    # -fno-omit-frame-pointer
+    #   use frame pointers to allow simple stack frame walking for backtraces.
+    #   This has a small perf hit but worth it for the ability to profile in production
+    add_definitions(-fno-omit-frame-pointer)
+
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y" CACHE STRING "" FORCE)

     #  -Wall: Enable all warnings.


Improves status message.

Improves status message.

--- internal/macro_utils.cmake
+++ internal/macro_utils.cmake
@@ -50,7 +50,7 @@
       MESSAGE(STATUS "* unresolved package: ${missing_package_uri}")
     ENDFOREACH()
   ELSE()
-    MESSAGE(STATUS "     OK: ${friendly_package_uri} (${_TYPE})")
+    MESSAGE(STATUS "OK: ${friendly_package_uri} (${_TYPE})")
   ENDIF()
 ENDFUNCTION()

@@ -242,8 +242,7 @@
     IF(NOT EXISTS ${path})
       MESSAGE(FATAL_ERROR "specified path doesn't exist: ${path}")
     ENDIF()
-
-    #MESSAGE(STATUS "******************* path: ${path}")
+
     IF(IS_DIRECTORY "${path}")
       LIST(APPEND dir_paths ${path})
     ELSE()


Code to add pthread when using MKL

Code to add pthread when using MKL

This makes it possible to compile on ubuntu with enthought

--- modules/FindCBLAS.cmake
+++ modules/FindCBLAS.cmake
@@ -13,10 +13,10 @@
     if(CBLAS_FIND_REQUIRED)
       if(NOT BLAS_LIBRARIES AND NOT BLAS_INCLUDE_DIR)
           message(FATAL_ERROR "Could not find a blas library")
-      elseif(NOT BLAS_INCLUDE_DIR)
-          message(FATAL_ERROR "Could not figure out blas include dir")
       elseif(NOT BLAS_LIBRARIES)
           message(FATAL_ERROR "Could not figure out blas library")
+      elseif(NOT BLAS_INCLUDE_DIR AND NOT BLAS_INCLUDE_DIR_OPTIONAL)
+          message(FATAL_ERROR "Could not figure out blas include dir")
       endif()
     endif()
 endmacro()
@@ -28,18 +28,30 @@
 include(FindPkgConfig)
 pkg_search_module(CBLAS cblas)
 if(NOT CBLAS_FOUND AND PKG_CONFIG_FOUND)
-	pkg_search_module(ATLAS atlas)
+    pkg_search_module(ATLAS atlas)
 else()
-	set(BLAS_LIBRARIES ${CBLAS_LIBRARIES})
-	set(BLAS_INCLUDE_DIR ${CBLAS_INCLUDE_DIRS})
+    set(BLAS_LIBRARIES ${CBLAS_LIBRARIES})
+    set(BLAS_INCLUDE_DIR ${CBLAS_INCLUDE_DIRS})
 endif()

-# Corrects for deficiencies in cmake find_package(BLAS)
+# include -pthread so MKL can be included on Ubuntu + enthought
+include(CheckCCompilerFlag)
+check_c_compiler_flag(-pthread use_pthread_flag)
+if(use_pthread_flag)
+    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
+endif()
 find_package(BLAS QUIET)
+if(use_pthread_flag)
+    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -pthread")
+endif()

 # Adds pthread if necessary
-if("${BLAS_LIBRARIES}" MATCHES "mkl" AND "${BLAS_LIBRARIES}" MATCHES "thread")
-    list(APPEND BLAS_LIBRARIES "-lpthread")
+if("${BLAS_LIBRARIES}" MATCHES "mkl"
+    AND "${BLAS_LIBRARIES}" MATCHES "thread"
+    AND NOT "${CMAKE_THREAD_LIBS_INIT}" STREQUAL "")
+    list(APPEND BLAS_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
 endif()

 # Figures out atlas if necessary
@@ -63,15 +75,15 @@
 function(include_directories_from_library_paths OUTVAR)
     set(results)
     foreach(path ${ARGN})
-		string(REGEX REPLACE "(.*)/lib(64)?/.*" "\\1/include" current "${path}")
+        string(REGEX REPLACE "(.*)/lib(64)?/.*" "\\1/include" current "${path}")
         if(NOT "${current}" STREQUAL "/include" AND IS_DIRECTORY "${current}")
             list(APPEND results "${current}")
         endif()
     endforeach()
-	if(NOT "${results}" STREQUAL "")
+    if(NOT "${results}" STREQUAL "")
         list(REMOVE_DUPLICATES results)
         set(${OUTVAR} ${results} PARENT_SCOPE)
-	endif()
+    endif()
 endfunction()
 # find_package blas does not look for cblas.h
 if(NOT BLAS_INCLUDE_DIR AND BLAS_LIBRARIES)
@@ -79,4 +91,28 @@
     find_path(BLAS_INCLUDE_DIR NAMES cblas.h mkl.h HINTS ${directories})
 endif()

+if(use_pthread_flag)
+    if(NOT CMAKE_LIB_THREADS_INIT)
+        find_library(PTHREAD_LIBRARY pthread)
+        if(PTHREAD_LIBRARY)
+            set(CMAKE_THREAD_LIBS_INIT ${PTHREAD_LIBRARY})
+        endif()
+    endif()
+    # Add -pthread to CMAKE_C(XX)_FLAGS
+    set(BLAS_CMAKE_C_FLAGS -pthread)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+    # Add CMAKE_THREAD_LIBS_INIT right before iomp5
+    set(index 0)
+    foreach(library ${BLAS_LIBRARIES})
+        if("${library}" MATCHES "iomp5")
+            list(INSERT BLAS_LIBRARIES ${index} "${CMAKE_THREAD_LIBS_INIT}")
+            break()
+        elseif("${library}" STREQUAL "${CMAKE_THREAD_LIBS_INIT}")
+            break()
+        endif()
+        math(EXPR index "${index} + 1")
+    endforeach()
+endif()
+
 found_or_not_found_blas()


ENH: Update BatchMake version for SuperBuild

--- CMake/CMakeCommonExternalDefinitions.cmake
+++ CMake/CMakeCommonExternalDefinitions.cmake
@@ -170,8 +170,10 @@
   else(OPT_USE_SYSTEM_BatchMake)
     set(proj BatchMake)
     ExternalProject_Add(${proj}
-    CVS_REPOSITORY ":pserver:anoncvs:@batchmake.org:/cvsroot/BatchMake"
-    CVS_MODULE "BatchMake"
+    GIT_REPOSITORY git://batchmake.org/BatchMake.git
+    GIT_TAG "8addbdb62f0135ba01ffe12ddfc32121b6d66ef5"
+#    CVS_REPOSITORY ":pserver:anoncvs:@batchmake.org:/cvsroot/BatchMake"
+#    CVS_MODULE "BatchMake"
     SOURCE_DIR BatchMake
     BINARY_DIR BatchMake-build
     CMAKE_GENERATOR ${gen}


ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.3 -j1.4 Wrapping/Tcl/vtkDetermineTkResources.cmake)

--- Wrapping/Tcl/vtkDetermineTkResources.cmake
+++ Wrapping/Tcl/vtkDetermineTkResources.cmake
@@ -1,26 +1,18 @@
 IF (WIN32)
   IF (NOT BORLAND)
-   IF(NOT CYGWIN)
-    VTK_GET_TCL_TK_VERSION ("TCL_TK_MAJOR_VERSION" "TCL_TK_MINOR_VERSION")
-    IF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
-      SET (VTK_TK_RESOURCE_FILE_TRY
-           "${VTK_SOURCE_DIR}/Utilities/TclTk/resources/tk${TCL_TK_MAJOR_VERSION}.${TCL_TK_MINOR_VERSION}/win/rc/tk.rc")
-      IF (EXISTS ${VTK_TK_RESOURCE_FILE_TRY})
-        SET(VTK_TK_RESOURCE_FILE ${VTK_TK_RESOURCE_FILE_TRY} CACHE INTERNAL
-              "The tk.rc resource file required to add the proper resources to a Tk command-line interpreter (i.e. vtk.exe)")
-      ENDIF (EXISTS ${VTK_TK_RESOURCE_FILE_TRY})
-    ENDIF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
-    IF (VTK_TK_RESOURCE_FILE)
-      GET_FILENAME_COMPONENT(TK_RESOURCE_PATH ${VTK_TK_RESOURCE_FILE} PATH)
-      INCLUDE_DIRECTORIES(${TK_RESOURCE_PATH})
-      CONFIGURE_FILE(
-        ${VTK_SOURCE_DIR}/Wrapping/Tcl/resources/vtk.rc.in
-        ${VTK_BINARY_DIR}/Wrapping/Tcl/resources/vtk.rc)
-      INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/resources")
-      SET(VTK_EXE_RESOURCE_FILES
-          "${VTK_BINARY_DIR}/Wrapping/Tcl/resources/vtk.rc")
-    ENDIF (VTK_TK_RESOURCE_FILE)
-   ENDIF(NOT CYGWIN)
+    IF(NOT CYGWIN)
+      VTK_GET_TCL_TK_VERSION ("TCL_TK_MAJOR_VERSION" "TCL_TK_MINOR_VERSION")
+      IF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
+        SET (VTK_TK_RESOURCE_FILE_TRY
+          "${VTK_SOURCE_DIR}/Utilities/TclTk/resources/tk${TCL_TK_MAJOR_VERSION}.${TCL_TK_MINOR_VERSION}/win/rc/tk.rc")
+        IF (EXISTS ${VTK_TK_RESOURCE_FILE_TRY})
+          GET_FILENAME_COMPONENT(dir ${VTK_TK_RESOURCE_FILE_TRY} PATH)
+          SET(VTK_TK_RESOURCES_DIR ${dir} CACHE INTERNAL
+            "The directory where the tk.rc and other Tk resource files can be found. They are required to add the proper resources to a Tk command-line interpreter (vtk.exe for example)")
+          INCLUDE_DIRECTORIES(${VTK_TK_RESOURCES_DIR})
+        ENDIF (EXISTS ${VTK_TK_RESOURCE_FILE_TRY})
+      ENDIF (TCL_TK_MAJOR_VERSION AND TCL_TK_MINOR_VERSION)
+    ENDIF(NOT CYGWIN)
   ENDIF (NOT BORLAND)
 ENDIF (WIN32)


Set default versions for dependencies

Set default versions for dependencies

--- configure.cmake
+++ configure.cmake
@@ -1,6 +1,7 @@
 # Copyright (c) 2011, Christian Rorvik
 # Distributed under the Simplified BSD License (See accompanying file LICENSE.txt)

+vpm_set_default_version(boost proxy)
 vpm_depend(boost)

 add_definitions(-DBOOST_TEST_ALTERNATIVE_INIT_API)


restore message() for help

restore message() for help

--- src/cake.cmake
+++ src/cake.cmake
@@ -135,6 +135,7 @@
 			break()
 		endif()
 		string(SUBSTRING "${i}" 1 -1 i)
+		message("${i}")
 	endforeach()
 	return()
 endif()


update PCL_SUFFIX in trunk's FindPCL.cmake

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@1920 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- doc/tutorials/content/sources/FindPCL.cmake
+++ doc/tutorials/content/sources/FindPCL.cmake
@@ -37,7 +37,7 @@

 include(FindPackageHandleStandardArgs)
 #set a suffix based on project name and version
-set(PCL_SUFFIX pcl-1.0)
+set(PCL_SUFFIX pcl-1.2)
 #set a suffix for debug libraries
 set(PCL_DEBUG_SUFFIX "-gd")


Additional fix for previous commit, to make SALOME_INSTALL_SCRIPTS macro working when installing scripts from root directory

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -154,7 +154,11 @@
   # get relativa path (from CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR)
   STRING(REGEX REPLACE ${CMAKE_SOURCE_DIR} "" rel_dir ${CMAKE_CURRENT_SOURCE_DIR})
   # convert "/" to "_"
-  STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})
+  IF(rel_dir)
+    STRING(REGEX REPLACE "/" "_" unique_name ${rel_dir})
+  ELSE(rel_dir)
+    SET(unique_name _)
+  ENDIF(rel_dir)

   ENDFOREACH(file ${file_list})
   # Generate only one target for all requested Python script compilation.


fixed issue 1026: winthread fail on drheapstat

git-svn-id: fe3cd4388a6e5a968b09397a3d721fe124e8117a@1042 5b54908e-ead4-fc18-b48a-0285e6dbc711

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -406,7 +406,7 @@
     # line, since %ANYLINE can insert a paren at the beginning of the line.
     # FIXME PR 470723: add Dr. Heapstat-specific tests
     if (NOT TOOL_DR_HEAPSTAT OR
-        NOT "${line}" MATCHES "^~~")
+        NOT "${line}" MATCHES "~~")
       strip_trailing_newline_regex(line "${line}")
       set(msg "stderr failed to match \"${line}\"")
       # try to find what was meant to match


Remove legacy_stdio_definitions.lib

Remove legacy_stdio_definitions.lib

Dependency was added by PR #1566. No longer needed now that DX SDK has
been replaced.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -642,13 +642,6 @@

    if(TORQUE_OPENGL)
       addLib(OpenGL32.lib)
-   endif()
-
-   # JTH: DXSDK is compiled with older runtime, and MSVC 2015+ is when __vsnprintf is undefined.
-   # This is a workaround by linking with the older legacy library functions.
-   # See this for more info: http://stackoverflow.com/a/34230122
-   if (MSVC14)
-      addLib(legacy_stdio_definitions.lib)
    endif()
 endif()


prevent directory paths as file-name

prevent directory paths as file-name

--- lib/OpenCogFunctions.cmake
+++ lib/OpenCogFunctions.cmake
@@ -11,15 +11,24 @@
 # 3. The same logic would apply for python
 # 4. Everything should be explicit

-FUNCTION(ADD_GUILE_MODULE MODULE_FILE)
+FUNCTION(ADD_GUILE_MODULE SCHEME_FILE)
 # MODULE_FILE: The name of the file that defines the module. It has the same
 #       name as the directory it is in, or the name of the parent directory of
 #       current directory if it is in a folder named 'scm' and used to define
 #       the module.

+FOREACH(FILE_NAME ${ARGV})
+    # NOTE: Directory paths are not allowed as module names.
+    STRING(REGEX MATCH "([a-z0-9/-]+)/([a-z0-9/-]*)" "" ${FILE_NAME})
+    IF(CMAKE_MATCH_2)
+        MESSAGE(FATAL_ERROR "Only files found in "
+            "${CMAKE_CURRENT_SOURCE_DIR} are allowed")
+    ENDIF()
+    SET(MODULE_FILE ${FILE_NAME})
+
     # Check if the file exists
     IF(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE})
-        MESSAGE(FATAL_ERROR "${MODULE_FILE} file does not exist in"
+        MESSAGE(FATAL_ERROR "${MODULE_FILE} file does not exist in "
             ${CMAKE_CURRENT_SOURCE_DIR})
     ENDIF()

@@ -62,7 +71,7 @@
             COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/opencog/scm/${MODULE_FILE_DIR_PATH}
             COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_FILE}" "${GUILE_SYMLINK_DIR}/${MODULE_FILE_DIR_PATH}/${MODULE_FILE}"
         )
-        INSTALL (FILES
+        INSTALL(FILES
             ${MODULE_FILE}
             DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILE_DIR_PATH}"
         )
@@ -76,5 +85,6 @@
             DESTINATION "${GUILE_INSTALL_DIR}/${MODULE_FILES_DIR_PATH}"
         )
     ENDIF()
+ENDFOREACH(FILE_NAME)

 ENDFUNCTION(ADD_GUILE_MODULE)


Rajout de lib boost au link pour l'api QT de débuggage

git-svn-id: d30e9ebd5e731d506e3e731e014b27e1f54e3bfc@70 a734f7ea-df10-47d3-a172-9f42111c9061

--- source/cmake_modules/FindWS_Commons.cmake
+++ source/cmake_modules/FindWS_Commons.cmake
@@ -92,7 +92,7 @@
     QT4_WRAP_CPP(qt_MOC ${CMAKE_SOURCE_DIR}/WS_commons/qt/mainwindow.h)
     add_executable(${WS_NAME} ${WS_SOURCES} ${qt_UI} ${qt_MOC} ${CMAKE_SOURCE_DIR}/WS_commons/qt/main.h)
     INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/WS_commons)
-    target_link_libraries(${WS_NAME} ${QT_LIBRARIES} ${WS_LIBS})
+    target_link_libraries(${WS_NAME} ${QT_LIBRARIES} ${WS_LIBS} ${Boost_LIBRARIES})

   ENDIF(WS_FCGI)
 ENDMACRO(MAKE_WS)


ENH: HAS_VTK flag added. Test for VTK being built with STDLIB added.

--- Utilities/ITKFindVTK.cmake
+++ Utilities/ITKFindVTK.cmake
@@ -105,3 +105,17 @@
 IF (USE_BUILT_VTK AND USE_INSTALLED_VTK)
   MESSAGE ("Warning. Please make sure that only ONE of the USE_INSTALLED_VTK or USE_BUILT_VTK setting is set to ON.")
 ENDIF (USE_BUILT_VTK AND USE_INSTALLED_VTK)
+
+
+IF(USE_VTK_FILE)
+  # Verify if VTK was built using ansi.
+  # This is required in order to be compatible with ITK
+  IF(VTK_USE_ANSI_STDLIB)
+    SET(HAS_VTK 1 CACHE INTERNAL "VTK Headers and Libraries are available")
+  ELSE( VTK_USE_ANSI_STDLIB )
+    MESSAGE ("Warning. Your VTK was not built with the VTK_USE_ANSI_STDLIB option ON. Please reconfigure and recompile VTK with this option before trying to use it with ITK.")
+  ENDIF( VTK_USE_ANSI_STDLIB )
+ENDIF(USE_VTK_FILE)
+
+
+


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Change C++ standard version from 11 to 14

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -19,7 +19,7 @@

 set(DEFAULT_PROJECT_OPTIONS
     DEBUG_POSTFIX             "d"
-    CXX_STANDARD              11
+    CXX_STANDARD              14
     LINKER_LANGUAGE           "CXX"
     POSITION_INDEPENDENT_CODE ON
     CXX_VISIBILITY_PRESET     "hidden"


Generalizing to fix msvs errors

Generalizing to fix msvs errors

--- cmake/External_gtest.cmake
+++ cmake/External_gtest.cmake
@@ -6,6 +6,8 @@

 set(GTEST_PREFIX "googletest")
 set(GTEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/${GTEST_PREFIX}")
+set(GTEST_INCLUDES "${GTEST_DIR}/src/googletest-${gtest_version}/include")
+
 ExternalProject_Add(
     googletest-${gtest_version}
     DOWNLOAD_DIR "${GTEST_DIR}/src" # The only dir option which is required
@@ -69,24 +71,29 @@
         IMPORTED_LOCATION           "${GTEST_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
 endif()

+# the gtest include directory exists only after it is build, but it is used/needed
+# for the set_target_properties call below, so make it to avoid an error
+file(MAKE_DIRECTORY ${GTEST_INCLUDES})
+
 # Create a libgtest target to be used as a dependency by test programs
-add_library(libgtest IMPORTED SHARED GLOBAL)
-add_dependencies(libgtest gtest)
-add_library(libgtest_main IMPORTED SHARED GLOBAL)
-add_dependencies(libgtest_main gtest)
+if (CMAKE_SHARED_LIBRARY_PREFIX)
+  add_library("${CMAKE_SHARED_LIBRARY_PREFIX}gtest" IMPORTED SHARED GLOBAL)
+  add_dependencies("${CMAKE_SHARED_LIBRARY_PREFIX}gtest" gtest)
+else()
+  set_target_properties("${CMAKE_SHARED_LIBRARY_PREFIX}gtest" IMPORTED SHARED GLOBAL)
+endif()
+add_library(${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main IMPORTED SHARED GLOBAL)
+add_dependencies(${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main gtest)

 # Set gtest properties
 ExternalProject_Get_Property(gtest source_dir binary_dir)
-set_target_properties(libgtest PROPERTIES
+set_target_properties(${CMAKE_SHARED_LIBRARY_PREFIX}gtest PROPERTIES
     "IMPORTED_LOCATION" "${binary_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}gtest${CMAKE_SHARED_LIBRARY_SUFFIX}"
     "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}"
-#    "INTERFACE_INCLUDE_DIRECTORIES" "${source_dir}/include"
+    "INTERFACE_INCLUDE_DIRECTORIES" "${source_dir}/include"
 )
-set_target_properties(libgtest_main PROPERTIES
+set_target_properties(${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main PROPERTIES
     "IMPORTED_LOCATION" "${binary_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}gtest_main${CMAKE_SHARED_LIBRARY_SUFFIX}"
     "IMPORTED_LINK_INTERFACE_LIBRARIES" "${CMAKE_THREAD_LIBS_INIT}"
-#    "INTERFACE_INCLUDE_DIRECTORIES" "${source_dir}/include"
+    "INTERFACE_INCLUDE_DIRECTORIES" "${source_dir}/include"
 )
-
-# I couldn't make it work with INTERFACE_INCLUDE_DIRECTORIES
-include_directories("${source_dir}/include")


Update ModuleOpenVINO.cmake

Update ModuleOpenVINO.cmake

Updated SHA for OpenVINO on linux to fix onnx reader issues

--- cmake/ModuleOpenVINO.cmake
+++ cmake/ModuleOpenVINO.cmake
@@ -13,7 +13,7 @@
     else()
         fast_download_dependency(openvino
                 2021.4.2
-                9e3fd9733cfdfc1312bd436abfcff74992cfb5c33e09e36e25a627617c608fa3
+		6a47b44b4d80e41ef22d6df19b829e59b985c202b9ab596056570a6d1c65c21e
         )

     endif()


fixed binary destination for packages

fixed binary destination for packages

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -107,7 +107,7 @@
   set(CATKIN_GLOBAL_SHARE_DESTINATION share)

   # set project specific install destinations
-  set(CATKIN_PACKAGE_BIN_DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}/${PROJECT_NAME})
+  set(CATKIN_PACKAGE_BIN_DESTINATION ${CATKIN_GLOBAL_LIBEXEC_DESTINATION}/${PROJECT_NAME})
   set(CATKIN_PACKAGE_ETC_DESTINATION ${CATKIN_GLOBAL_ETC_DESTINATION}/${PROJECT_NAME})
   set(CATKIN_PACKAGE_INCLUDE_DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${PROJECT_NAME})
   set(CATKIN_PACKAGE_LIB_DESTINATION ${CATKIN_GLOBAL_LIB_DESTINATION})


compiler-flags: slight ASAN/UBSAN tuning

--- cmake/compiler-flags.cmake
+++ cmake/compiler-flags.cmake
@@ -53,35 +53,35 @@
     CMAKE_SHARED_LINKER_FLAGS_COVERAGE
     CMAKE_SHARED_MODULE_FLAGS_COVERAGE )

-set(SANITIZATION_BASE "-fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common -U_FORTIFY_SOURCE")
+set(SANITIZATION_BASE "-fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common")
 set(SANITIZATION_DEFAULTS "${SANITIZATION_BASE} -O1 -fstack-protector-strong")

-set(asan "${SANITIZATION_DEFAULTS} -fsanitize=address")
+set(asan "-fsanitize=address -U_FORTIFY_SOURCE")
 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
   set(asan "${asan} -fsanitize-address-use-after-scope")
 endif()
 SET(CMAKE_CXX_FLAGS_ASAN
-    "${asan}"
+    "${SANITIZATION_DEFAULTS} ${asan}"
     CACHE STRING "Flags used by the C++ compiler during ASAN builds."
     FORCE )
 SET(CMAKE_C_FLAGS_ASAN
-    "${asan}"
+    "${SANITIZATION_DEFAULTS} ${asan}"
     CACHE STRING "Flags used by the C compiler during ASAN builds."
     FORCE )
 MARK_AS_ADVANCED(
     CMAKE_CXX_FLAGS_ASAN
     CMAKE_C_FLAGS_ASAN )

-set(ubsan "${SANITIZATION_DEFAULTS} -fsanitize=undefined -fno-sanitize-recover=undefined")
+set(ubsan "-fsanitize=undefined -fno-sanitize-recover=undefined")
 if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
   set(ubsan "${ubsan} -fsanitize=integer -fno-sanitize-recover=integer")
 endif()
 SET(CMAKE_CXX_FLAGS_UBSAN
-    "${ubsan}"
+    "${SANITIZATION_DEFAULTS} ${ubsan}"
     CACHE STRING "Flags used by the C++ compiler during UBSAN builds."
     FORCE )
 SET(CMAKE_C_FLAGS_UBSAN
-    "${ubsan}"
+    "${SANITIZATION_DEFAULTS} ${ubsan}"
     CACHE STRING "Flags used by the C compiler during UBSAN builds."
     FORCE )
 MARK_AS_ADVANCED(


Use updated reduced-size clDNN (#3023)

Use updated reduced-size clDNN (#3023)

* Use updated reduced-size clDNN

* Remove the obsolete BOOST_VERSION variable

--- cmake/external_cldnn.cmake
+++ cmake/external_cldnn.cmake
@@ -22,8 +22,7 @@
 #------------------------------------------------------------------------------

 set(CLDNN_GIT_REPO_URL https://github.com/intel/clDNN.git)
-set(CLDNN_GIT_LABEL a05c9f29c5690a4beb9cd8c9f712cfb4399b2a6d)
-set(BOOST_VERSION 1.64.0)
+set(CLDNN_GIT_LABEL 7cdec74c3307bbe98c5c0b7bd0e17536f60a3c12)
 set(OUT_DIR ${EXTERNAL_PROJECTS_ROOT}/cldnn/out)

 ExternalProject_Add(
@@ -41,7 +40,6 @@
                 ${NGRAPH_FORWARD_CMAKE_ARGS}
                 -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
                 # -DCLDNN__OUTPUT_DIR=out/Debug
-                -DCLDNN__BOOST_VERSION=${BOOST_VERSION}
                 -DCLDNN__INCLUDE_TESTS=OFF
                 -DCLDNN__INCLUDE_CORE_INTERNAL_TESTS=OFF
                 -DCLDNN__INCLUDE_TUTORIAL=OFF


fix for JIT compiler

fix for JIT compiler

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@9061 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsJITConfigXml.cmake
+++ cmake/gsJITConfigXml.cmake
@@ -39,15 +39,21 @@
   string(REPLACE "-fvisibility=hidden"         "" JIT_C_FLAGS ${JIT_C_FLAGS})
   string(REPLACE "-fvisibility-inlines-hidden" "" JIT_C_FLAGS ${JIT_C_FLAGS})

+  # Create a set of shared library variable specific to C++
+  # For 90% of the systems, these are the same flags as the C versions
+  # so if these are not set just copy the flags from the c version
   if(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
     set(JIT_CXX_FLAGS "${JIT_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
   else()
     set(JIT_CXX_FLAGS "${JIT_CXX_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
   endif()

+  # Create a set of shared library variable specific to CUDA
+  # For 90% of the systems, these are the same flags as the C versions
+  # so if these are not set just copy the flags from the c version
   if(NOT DEFINED CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS)
   else()
-    set(JIT_CUDA_FLAGS    "${JIT_CUDA_FLAGS} ${CUDA_NVCC_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS}")
+    set(JIT_CUDA_FLAGS "${JIT_CUDA_FLAGS} ${CUDA_NVCC_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_CUDA_FLAGS}")
   endif()

   # Create a set of shared library variable specific to Fortran


Install libs directly into %{_libdir}

Install libs directly into %{_libdir}

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -104,11 +104,11 @@
 SET(INSTALL_BINDIR_RPM "bin")
 SET(INSTALL_SBINDIR_RPM "sbin")
 IF(64BIT)
-  SET(INSTALL_LIBDIR_RPM "lib64/mysql")
+  SET(INSTALL_LIBDIR_RPM "lib64")
 ELSE()
-  SET(INSTALL_LIBDIR_RPM "lib/mysql")
+  SET(INSTALL_LIBDIR_RPM "lib")
 ENDIF()
-SET(INSTALL_PLUGINDIR_RPM "${INSTALL_LIBDIR_RPM}/plugin")
+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")


Tidy.

Tidy.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -14,54 +14,60 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

 # The purpose of this file is to set the default installation layout.
-# Currently, there are 2 different installation layouts ,
-# one is used in tar.gz packages (Windows zip is about the same), another one
-# in RPMs.
-
-# There are currently 2 layouts defines, named STANDALONE (tar.gz layout)
-# and UNIX (rpm layout). To force a directory layout when invoking cmake use
-# -DINSTALL_LAYOUT=[STANDALONE|UNIX].
-# This wil use a predefined layout. There is a possibility to further fine-tune
-# installation directories. Several variables are can be overwritten
 #
-# - INSTALL_BINDIR     (directory with client executables and Unix shell scripts)
-# - INSTALL_SBINDIR    (directory with mysqld)
-# - INSTALL_LIBDIR     (directory with client end embedded libraries)
-# - INSTALL_PLUGINDIR  (directory for plugins)
-# - INSTALL_INCLUDEDIR (directory for MySQL headers)
-# - INSTALL_DOCDIR     (documentation)
-# - INSTALL_MANDIR     (man pages)
-# - INSTALL_SCRIPTDIR  (several scripts, rarely used)
-# - INSTALL_MYSQLSHAREDIR (MySQL character sets and localized error messages)
-# - INSTALL_SHAREDIR  (location of aclocal/mysql.m4)
-# - INSTALL_SQLBENCHDIR (sql-bench)
-# - INSTALL_MYSQLTESTDIR (mysql-test)
-# - INSTALL_DOCREADMEDIR (readme and similar)
+# The current choices of installation layout are:
+#
+#  STANDALONE
+#    Build with prefix=/usr/local/mysql, create tarball with install prefix="."
+#    and relative links.  Windows zip uses the same tarball layout but without
+#    the build prefix.
+#
+#  RPM
+#    Build as per default RPM layout, with prefix=/usr
+#
+#  SVR4
+#    Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
+#
+# To force a directory layout, use -DINSTALL_LAYOUT=<layout>.
+#
+# The default is STANDALONE.
+#
+# There is the possibility to further fine-tune installation directories.
+# Several variables can be overwritten:
+#
+# - INSTALL_BINDIR          (directory with client executables and scripts)
+# - INSTALL_SBINDIR         (directory with mysqld)
+# - INSTALL_LIBDIR          (directory with client end embedded libraries)
+# - INSTALL_PLUGINDIR       (directory for plugins)
+# - INSTALL_INCLUDEDIR      (directory for MySQL headers)
+# - INSTALL_DOCDIR          (documentation)
+# - INSTALL_MANDIR          (man pages)
+# - INSTALL_SCRIPTDIR       (several scripts, rarely used)
+# - INSTALL_MYSQLSHAREDIR   (MySQL character sets and localized error messages)
+# - INSTALL_SHAREDIR        (location of aclocal/mysql.m4)
+# - INSTALL_SQLBENCHDIR     (sql-bench)
+# - INSTALL_MYSQLTESTDIR    (mysql-test)
+# - INSTALL_DOCREADMEDIR    (readme and similar)
 # - INSTALL_SUPPORTFILESDIR (used only in standalone installer)

-# Default installation layout on Unix is UNIX (kent wants it so)
 IF(NOT INSTALL_LAYOUT)
-  IF(WIN32)
-    SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
-  ELSE()
-    SET(DEFAULT_INSTALL_LAYOUT "UNIX")
-  ENDIF()
+  SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
 ENDIF()

-SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
-CACHE STRING  "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
+SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
+CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")

-IF(NOT INSTALL_LAYOUT MATCHES "STANDALONE")
-  IF(NOT INSTALL_LAYOUT MATCHES "UNIX")
-    # XXX not keen on this, how many more will we need? prefer to just bail...
-    IF(NOT INSTALL_LAYOUT MATCHES "SVR4")
-      SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
-    ENDIF()
-  ENDIF()
-ENDIF()
+#IF(NOT INSTALL_LAYOUT MATCHES "STANDALONE")
+#  IF(NOT INSTALL_LAYOUT MATCHES "UNIX")
+#    # XXX not keen on this, how many more will we need? prefer to just bail...
+#    IF(NOT INSTALL_LAYOUT MATCHES "SVR4")
+#      SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}")
+#    ENDIF()
+#  ENDIF()
+#ENDIF()

 IF(UNIX)
-  IF(INSTALL_LAYOUT MATCHES "UNIX")
+  IF(INSTALL_LAYOUT MATCHES "UNIX")
     SET(default_prefix "/usr")
   ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
     SET(default_prefix "/opt/mysql/mysql")
@@ -69,67 +75,64 @@
     SET(default_prefix "/usr/local/mysql")
   ENDIF()
   IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-    SET(CMAKE_INSTALL_PREFIX ${default_prefix}
+    SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
-  SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
+  SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
     CACHE PATH "config directory (for my.cnf)")
   MARK_AS_ADVANCED(SYSCONFDIR)
 ENDIF()

-
-
- # STANDALONE layout
- SET(INSTALL_BINDIR_STANDALONE "bin")
- SET(INSTALL_SBINDIR_STANDALONE "bin")
- SET(INSTALL_LIBDIR_STANDALONE "lib")
- SET(INSTALL_INCLUDEDIR_STANDALONE "include")
- SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
- SET(INSTALL_DOCDIR_STANDALONE "docs")
- SET(INSTALL_MANDIR_STANDALONE "man")
- SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
- SET(INSTALL_SHAREDIR_STANDALONE "share")
- SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
- SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
- SET(INSTALL_SQLBENCHROOTDIR_STANDALONE ".")
- SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
- SET(INSTALL_SUPPORTFILESDIR_STANDALONE "support-files")
- SET(INSTALL_MYSQLDATADIR_STANDALONE "data")
-
- # SVR4 layout
- SET(INSTALL_BINDIR_SVR4 "bin")
- SET(INSTALL_SBINDIR_SVR4 "bin")
- SET(INSTALL_LIBDIR_SVR4 "lib")
- SET(INSTALL_INCLUDEDIR_SVR4 "include")
- SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
- SET(INSTALL_DOCDIR_SVR4 "docs")
- SET(INSTALL_MANDIR_SVR4 "man")
- SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
- SET(INSTALL_SHAREDIR_SVR4 "share")
- SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
- SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
- SET(INSTALL_SQLBENCHROOTDIR_SVR4 ".")
- SET(INSTALL_DOCREADMEDIR_SVR4 ".")
- SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
- SET(MYSQL_DATADIR "/var/lib/mysql")
-
- # UNIX layout
- SET(INSTALL_BINDIR_UNIX "bin")
- SET(INSTALL_SBINDIR_UNIX "sbin")
- SET(INSTALL_LIBDIR_UNIX "lib/mysql")
- SET(INSTALL_PLUGINDIR_UNIX "lib/mysql/plugin")
- SET(INSTALL_DOCDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
- SET(INSTALL_MANDIR_UNIX "share/mysql/man")
- SET(INSTALL_INCLUDEDIR_UNIX "include/mysql")
- SET(INSTALL_MYSQLSHAREDIR_UNIX "share/mysql")
- SET(INSTALL_SHAREDIR_UNIX "share")
- SET(INSTALL_SCRIPTDIR_UNIX "bin")
- SET(INSTALL_MYSQLTESTDIR_UNIX "mysql-test")
- SET(INSTALL_SQLBENCHROOTDIR_UNIX "")
- SET(INSTALL_DOCREADMEDIR_UNIX "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
- SET(INSTALL_SUPPORTFILESDIR_UNIX "")
- SET(INSTALL_MYSQLDATADIR_UNIX "var")
+# STANDALONE layout
+SET(INSTALL_BINDIR_STANDALONE "bin")
+SET(INSTALL_SBINDIR_STANDALONE "bin")
+SET(INSTALL_LIBDIR_STANDALONE "lib")
+SET(INSTALL_INCLUDEDIR_STANDALONE "include")
+SET(INSTALL_PLUGINDIR_STANDALONE "lib/plugin")
+SET(INSTALL_DOCDIR_STANDALONE "docs")
+SET(INSTALL_MANDIR_STANDALONE "man")
+SET(INSTALL_MYSQLSHAREDIR_STANDALONE "share")
+SET(INSTALL_SHAREDIR_STANDALONE "share")
+SET(INSTALL_SCRIPTDIR_STANDALONE "scripts")
+SET(INSTALL_MYSQLTESTDIR_STANDALONE "mysql-test")
+SET(INSTALL_SQLBENCHROOTDIR_STANDALONE ".")
+SET(INSTALL_DOCREADMEDIR_STANDALONE ".")
+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_LIBDIR_RPM "lib/mysql")
+SET(INSTALL_PLUGINDIR_RPM "lib/mysql/plugin")
+SET(INSTALL_DOCDIR_RPM "share/mysql/doc/MySQL-server-${MYSQL_NO_DASH_VERSION}")
+SET(INSTALL_MANDIR_RPM "share/mysql/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 "")
+SET(INSTALL_MYSQLDATADIR_RPM "var")
+
+# SVR4 layout
+SET(INSTALL_BINDIR_SVR4 "bin")
+SET(INSTALL_SBINDIR_SVR4 "bin")
+SET(INSTALL_LIBDIR_SVR4 "lib")
+SET(INSTALL_INCLUDEDIR_SVR4 "include")
+SET(INSTALL_PLUGINDIR_SVR4 "lib/plugin")
+SET(INSTALL_DOCDIR_SVR4 "docs")
+SET(INSTALL_MANDIR_SVR4 "man")
+SET(INSTALL_MYSQLSHAREDIR_SVR4 "share")
+SET(INSTALL_SHAREDIR_SVR4 "share")
+SET(INSTALL_SCRIPTDIR_SVR4 "scripts")
+SET(INSTALL_MYSQLTESTDIR_SVR4 "mysql-test")
+SET(INSTALL_SQLBENCHROOTDIR_SVR4 ".")
+SET(INSTALL_DOCREADMEDIR_SVR4 ".")
+SET(INSTALL_SUPPORTFILESDIR_SVR4 "support-files")
+SET(MYSQL_DATADIR "/var/lib/mysql")

 # Clear cached variables if install layout was changed
 IF(OLD_INSTALL_LAYOUT)
@@ -139,12 +142,12 @@
 ENDIF()
 SET(OLD_INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE INTERNAL "")

-# Set INSTALL_FOODIR variables for chosen  layout
-# (for example,  INSTALL_BINDIR will be defined  as
-# ${INSTALL_BINDIR_STANDALONE} by  default if STANDALONE layout is chosen)
-FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
+# Set INSTALL_FOODIR variables for chosen layout (for example, INSTALL_BINDIR
+# will be defined  as ${INSTALL_BINDIR_STANDALONE} by default if STANDALONE
+# layout is chosen)
+FOREACH(var BIN SBIN LIB MYSQLSHARE SHARE PLUGIN INCLUDE SCRIPT DOC MAN
   MYSQLTEST SQLBENCHROOT DOCREADME SUPPORTFILES MYSQLDATA)
-  SET(INSTALL_${var}DIR  ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
+  SET(INSTALL_${var}DIR  ${INSTALL_${var}DIR_${INSTALL_LAYOUT}}
   CACHE STRING "${var} installation directory" ${FORCE})
   MARK_AS_ADVANCED(INSTALL_${var}DIR)
 ENDFOREACH()


Added function checks for snprintf and _snprintf.

svn path=/trunk/; revision=8486

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -190,6 +190,11 @@
   check_function_exists(_isnan _HAVE_ISNAN)
   set(HAVE_ISNAN ${_HAVE_ISNAN} CACHE INTERNAL "Have function _isnan")
 endif(NOT HAVE_ISNAN)
+check_function_exists(snprintf HAVE_SNPRINTF)
+if(NOT HAVE_SNPRINTF)
+  check_function_exists(_snprintf _HAVE_SNPRINTF)
+  set(HAVE_SNPRINTF ${_HAVE_SNPRINTF} CACHE INTERNAL "Have function _sprintf")
+endif(NOT HAVE_SNPRINTF)

 # =======================================================================
 # Language bindings


removed serialization until we have it in the binaries too - will add separately to each module that needs it for now

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@3442 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -12,7 +12,7 @@
 endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)

 #find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams serialization mpi)
-find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams serialization)
+find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)


qi_create_lib: Support MODULE mode.

qi_create_lib: Support MODULE mode.

Change-Id: I751bf1d5457f1978e9cf6363f5be01587a7891a3
Reviewed-on: http://gerrit.aldebaran.lan:8080/17359
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -144,9 +144,13 @@

-#! Create a library
+#! Create a library or a module
 #
 # The target name should be unique.
+#
+# To build a module (library loaded at runtime), use::
+#
+#   qi_create_lib(myLib MODULE SRC ....)
 #
 # If you need your library to be static, use::
 #
@@ -171,6 +175,9 @@
 #
 # \arg:name the target name
 # \argn: sources files, like the SRC group, argn and SRC will be merged
+# \flag:STATIC force a static library
+# \flag:SHARED force a shared library
+# \flag:MODULE build a module (library loadable at runtime)
 # \flag:NO_INSTALL Do not create install rules for the target
 # \flag:EXCLUDE_FROM_ALL Do not include the target in the 'all' target,
 #                        This target will not be built by default, you will
@@ -192,7 +199,7 @@
 # \example:target
 function(qi_create_lib name)
   cmake_parse_arguments(ARG
-    "NOBINDLL;NO_INSTALL;NO_FPIC;SHARED;STATIC;INTERNAL"
+    "NOBINDLL;NO_INSTALL;NO_FPIC;SHARED;STATIC;MODULE;INTERNAL"
     "SUBFOLDER"
     "SRC;SUBMODULE;DEPENDS" ${ARGN})

@@ -243,6 +250,9 @@
     set(_type "STATIC")
   endif()

+  if(ARG_MODULE)
+    set(_type "MODULE")
+  endif()

   qi_verbose("create lib ${name} ${_type}")


CMake: Fix CXX flags form command line being ignored

--- src/cmake/configure_build.cmake
+++ src/cmake/configure_build.cmake
@@ -9,9 +9,11 @@
 # Per-compiler configuration.

 if(CMAKE_COMPILER_IS_GNUCXX)
-	set(CMAKE_CXX_FLAGS "-Wall -Wno-sign-compare -fno-strict-aliasing")
+	set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
 elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
-	set(PLATFORM_CFLAGS "-Wall -Wno-sign-compare -fno-strict-aliasing")
+	set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare -fno-strict-aliasing")
 endif()

 if(APPLE)


linux: get correct dir names for packaging

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -8,7 +8,7 @@
   COMPONENT superbuild)

 # install all tomviz libraries
-install(DIRECTORY "${install_location}/lib/tomviz-${tomviz_version}"
+install(DIRECTORY "${install_location}/lib/tomviz"
   DESTINATION "lib"
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild)
@@ -19,7 +19,7 @@
     # FIXME: we can reconfigure Qt to be built with inbuilt sqllite support to
     # avoid the need for plugins.
     "${install_location}/plugins/"
-    DESTINATION "lib/tomviz-${tomviz_version}"
+    DESTINATION "lib/tomviz"
     COMPONENT superbuild
     PATTERN "*.a" EXCLUDE
     PATTERN "tomviz-${tomviz_version}" EXCLUDE


[fixed] typo with BoostFileSystem-->BoostFilesystem

--- src/Boost/Filesystem/cmake/Dependencies.cmake
+++ src/Boost/Filesystem/cmake/Dependencies.cmake
@@ -1,4 +1,4 @@
 BOTG_DefineTPLDependencies(
-    "BoostFileSystem"        #LIB
+    "BoostFilesystem"        #LIB
     "GTest"                  #TEST
 )


replace cmake escape character with double backslash

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -49,10 +49,17 @@

 function(bd_regression testname)
   file(TO_NATIVE_PATH "${PYTHON_EXECUTABLE}" PYTHON_EXECUTABLE)
+
   file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/executeBeamdynRegressionCase.py" TEST_SCRIPT)
   file(TO_NATIVE_PATH "${CTEST_BEAMDYN_EXECUTABLE}" BEAMDYN_EXECUTABLE)
   file(TO_NATIVE_PATH "${CMAKE_CURRENT_LIST_DIR}/.." SOURCE_DIRECTORY)
   file(TO_NATIVE_PATH "${CTEST_BUILD_DIR}" BUILD_DIRECTORY)
+
+  string(REPLACE "\\" "\\\\" TEST_SCRIPT ${TEST_SCRIPT})
+  string(REPLACE "\\" "\\\\" BEAMDYN_EXECUTABLE ${BEAMDYN_EXECUTABLE})
+  string(REPLACE "\\" "\\\\" SOURCE_DIRECTORY ${SOURCE_DIRECTORY})
+  string(REPLACE "\\" "\\\\" BUILD_DIRECTORY ${BUILD_DIRECTORY})
+
   add_test(
     ${testname} ${PYTHON_EXECUTABLE}
        ${TEST_SCRIPT}


build: correct the variable name for cross-compiling

A typo snuck into the cross-compiling path and due to the machine that it was
tested on hvaing `/bin/llvm-tblgen`, the build succeeded.  Correct the typo to
ensure that we use the correct tblgen.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -63,8 +63,8 @@
   endif()

   if(CMAKE_CROSSCOMPILING)
-    set(LLVM_NATIVE_BUILD "${LLVM_BINARY_DIR}/NATIVE")
-    if(NOT EXISTS "${LLVM_NATIVE_BUILD}")
+    set(LLVM_NATIVE_BUILD_DIR "${LLVM_BINARY_DIR}/NATIVE")
+    if(NOT EXISTS "${LLVM_NATIVE_BUILD_DIR}")
       message(FATAL_ERROR
         "Attempting to cross-compile swift standalone but no native LLVM build
         found.  Please cross-compile LLVM as well.")


Remove unnecessary copyright comment. (see #249)

--- build/cmake/DefineInstallationPaths.cmake
+++ build/cmake/DefineInstallationPaths.cmake
@@ -1,23 +1,3 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-
 # Define the default install paths
 set(BIN_INSTALL_DIR "bin" CACHE PATH "The binary install dir (default: bin)")
 set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}" CACHE PATH "The library install dir (default: lib${LIB_SUFFIX})")


[FIXED-#1533] remove old -Wno

[FIXED-#1533] remove old -Wno

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -225,7 +225,7 @@
 if (CMAKE_COMPILER_IS_GNUCXX OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL)
   # Tune warnings for GCC.
   set (CMAKE_CXX_WARNING_LEVEL 4)
-  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -W -Wall -Wno-long-long -fstrict-aliasing -Wstrict-aliasing")
+  set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -W -Wall -pedantic -fstrict-aliasing -Wstrict-aliasing")
   set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)

   # Determine GCC version.
@@ -239,16 +239,6 @@
          __GCC_VERSION ${__GCC_VERSION})
   STRING(REGEX REPLACE ".*([0-9])\\.([0-9]).*" "\\1\\20"
          _GCC_VERSION ${__GCC_VERSION})
-
-  # Add -Wno-longlong if the GCC version is < 4.0.0.  Add -pedantic flag but
-  # disable warnings for variadic macros with GCC >= 4.0.0.  Earlier versions
-  # warn because of anonymous variadic macros in pedantic mode but do not have
-  # a flag to disable these warnings.
-  if (400 GREATER _GCC_VERSION)
-    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -Wno-long-long")
-  else (400 GREATER _GCC_VERSION)
-    set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -pedantic -Wno-variadic-macros")
-  endif (400 GREATER _GCC_VERSION)

   # Force GCC to keep the frame pointer when debugging is enabled.  This is
   # mainly important for 64 bit but does not get into the way on 32 bit either


Port to the @lst-file support in lupdate.

Change-Id: Iac9e528e0da526a5a879a914e3e22cfb50e60cdc
Reviewed-by: Oswald Buddenhagen <6a8868beda3e139b5ac22b2534a23d3e6ba81819@nokia.com>
Reviewed-by: Clinton Stimpson <06507031b99bae4eb6a9495b9bca03a07a2284cf@elemtech.com>
Reviewed-by: Stephen Kelly <b039a7232b458ac8785f8e91519ad165c3ac28cd@kdab.com>

--- src/linguist/Qt5LinguistToolsMacros.cmake
+++ src/linguist/Qt5LinguistToolsMacros.cmake
@@ -42,38 +42,32 @@
     set(_lupdate_options ${_LUPDATE_OPTIONS})

     set(_my_sources)
-    set(_my_dirs)
     set(_my_tsfiles)
-    set(_ts_pro)
     foreach(_file ${_lupdate_files})
         get_filename_component(_ext ${_file} EXT)
         get_filename_component(_abs_FILE ${_file} ABSOLUTE)
         if(_ext MATCHES "ts")
             list(APPEND _my_tsfiles ${_abs_FILE})
         else()
-            if(NOT _ext)
-                list(APPEND _my_dirs ${_abs_FILE})
-            else()
-                list(APPEND _my_sources ${_abs_FILE})
-            endif()
+            list(APPEND _my_sources ${_abs_FILE})
         endif()
     endforeach()
     foreach(_ts_file ${_my_tsfiles})
         if(_my_sources)
-          # make a .pro file to call lupdate on, so we don't make our commands too
+          # make a list file to call lupdate on, so we don't make our commands too
           # long for some systems
           get_filename_component(_ts_name ${_ts_file} NAME_WE)
-          set(_ts_pro ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lupdate.pro)
-          set(_pro_srcs)
-          foreach(_pro_src ${_my_sources})
-              set(_pro_srcs "${_pro_srcs} \"${_pro_src}\"")
+          set(_ts_lst_file "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_ts_name}_lst_file")
+          set(_lst_file_srcs)
+          foreach(_lst_file_src ${_my_sources})
+              set(_lst_file_srcs "${_lst_file_src}\n${_lst_file_srcs}")
           endforeach()
-          file(WRITE ${_ts_pro} "SOURCES = ${_pro_srcs}")
+          file(WRITE ${_ts_lst_file} "${_lst_file_srcs}")
         endif()
         add_custom_command(OUTPUT ${_ts_file}
             COMMAND ${QT_LUPDATE_EXECUTABLE}
-            ARGS ${_lupdate_options} ${_ts_pro} ${_my_dirs} -ts ${_ts_file}
-            DEPENDS ${_my_sources} ${_ts_pro} VERBATIM)
+            ARGS ${_lupdate_options} "@${_ts_lst_file}" -ts ${_ts_file}
+            DEPENDS ${_my_sources} ${_ts_lst_file} VERBATIM)
     endforeach()
     qt5_add_translation(${_qm_files} ${_my_tsfiles})
     set(${_qm_files} ${${_qm_files}} PARENT_SCOPE)


Replace space in system processor name with a dash

Replace space in system processor name with a dash to avoid potential
issues when using the system processor name.

--- toolchain.cmake
+++ toolchain.cmake
@@ -17,7 +17,7 @@

 #
 set( CMAKE_SYSTEM_NAME "Generic" )
-set( CMAKE_SYSTEM_PROCESSOR "Parallax P8X32A" )
+set( CMAKE_SYSTEM_PROCESSOR "Parallax-P8X32A" )

 # locate build tools
 find_program( PARALLAX_P8X32A_C_COMPILER   propeller-elf-gcc )


Add detection of naming threads using pthreads

--- src/vistk/pipeline/thread_naming.cmake
+++ src/vistk/pipeline/thread_naming.cmake
@@ -2,6 +2,64 @@

 include(CMakePushCheckState)
 include(CheckFunctionExists)
+
+if (CMAKE_USE_PTHREADS_INIT)
+  cmake_push_check_state()
+  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+  check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
+  check_function_exists(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP)
+  cmake_pop_check_state()
+
+  if (HAVE_PTHREAD_SETNAME_NP OR HAVE_PTHREAD_SET_NAME_NP)
+    set(thread_naming_defines
+      ${thread_naming_defines}
+      HAVE_PTHREAD_NAMING)
+  endif ()
+
+  if (HAVE_PTHREAD_SETNAME_NP)
+    set(thread_naming_defines
+      ${thread_naming_defines}
+      HAVE_PTHREAD_SETNAME_NP)
+
+    set(cmakefiles_dir
+      "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles")
+    set(pthread_setname_np_takes_id_path
+      "${cmakefiles_dir}/pthread_setname_np_takes_id.cxx")
+    file(WRITE "${pthread_setname_np_takes_id_path}"
+"
+#include <pthread.h>
+
+#include <cstdlib>
+
+int
+main()
+{
+  pthread_t const tid = pthread_self();
+
+  pthread_setname_np(tid, \"test\");
+
+  return EXIT_SUCCESS;
+}
+")
+    try_compile(PTHREAD_SETNAME_NP_TAKES_ID
+      "${cmakefiles_dir}/pthread_setname_np_takes_id"
+      "${pthread_setname_np_takes_id_path}"
+      CMAKE_FLAGS
+        "-DLINK_LIBRARIES=${CMAKE_THREAD_LIBS_INIT}")
+
+    if (PTHREAD_SETNAME_NP_TAKES_ID)
+      set(thread_naming_defines
+        ${thread_naming_defines}
+        PTHREAD_SETNAME_NP_TAKES_ID)
+    endif ()
+  endif ()
+
+  if (HAVE_PTHREAD_SET_NAME_NP)
+    set(thread_naming_defines
+      ${thread_naming_defines}
+      HAVE_PTHREAD_SET_NAME_NP)
+  endif ()
+endif ()

 cmake_push_check_state()
 check_function_exists(setproctitle HAVE_SETPROCTITLE)


CMake: Bugfix: Clear compile variables prior to populating

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@32290 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_cached_variables.cmake
+++ deal.II/cmake/setup_cached_variables.cmake
@@ -282,7 +282,7 @@
   # file).
   #
   SET(${_flag}_SAVED ${${_flag}})
-  SET(${_flag})
+  SET(${_flag} "")
 ENDFOREACH()

 FOREACH(_variable


From Carlo Comporesi, adding support of finding libcurl in 3rd party dependencies

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@7996 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -59,6 +59,7 @@
             SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
             MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
         ENDIF(FREETYPE_FOUND)
+        FIND_DEPENDENCY(CURL curl/curl.h libcurl ${OSG_3RDPARTY_BIN} "D")
         FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
         #FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal_i" ${OSG_3RDPARTY_BIN})
         FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D")


test: Fix test output conversion for CastXML-format results

When using `TEST_UPDATE` to convert the actual test output to the
expected test output we must convert the `CastXML` element as we
already do for `GCC_XML`.

--- test/run.cmake
+++ test/run.cmake
@@ -91,6 +91,7 @@
     set(update_xml "${actual_xml}")
     string(REGEX REPLACE "^<\\?xml version=\"1.0\"\\?>" "^<\\\\?xml version=\"1.0\"\\\\?>" update_xml "${update_xml}")
     string(REGEX REPLACE "([(*)])" "\\\\\\1" update_xml "${update_xml}")
+    string(REGEX REPLACE "<CastXML[^>]*>" "<CastXML[^>]*>" update_xml "${update_xml}")
     string(REGEX REPLACE "<GCC_XML[^>]*>" "<GCC_XML[^>]*>" update_xml "${update_xml}")
     string(REGEX REPLACE "mangled=\"[^\"]*\"" "mangled=\"[^\"]+\"" update_xml "${update_xml}")
     string(REGEX REPLACE "artificial=\"1\"( throw=\"\")?" "artificial=\"1\"( throw=\"\")?" update_xml "${update_xml}")
@@ -100,6 +101,7 @@
       string(REGEX REPLACE "<Base type=\"([^\"]*)\" access=\"([^\"]*)\" virtual=\"0\" offset=\"[0-9]+\"/>" "<Base type=\"\\1\" access=\"\\2\" virtual=\"0\" offset=\"[0-9]+\"/>" update_xml "${update_xml}")
     endif()
     string(REGEX REPLACE "</GCC_XML>$" "</GCC_XML>$" update_xml "${update_xml}")
+    string(REGEX REPLACE "</CastXML>$" "</CastXML>$" update_xml "${update_xml}")
     file(WRITE "${expect_xml_file}" "${update_xml}\n")
   endif()


CMake: Bugfix: Replace all "-" by "_" for some internal variable name

ENABLE_IF_SUPPORTED incorrectly exported invalid (cpp) macro definitions
containing a dash "-". Fix this by replacing all dashes with underscores
"_".

--- cmake/macros/macro_enable_if_supported.cmake
+++ cmake/macros/macro_enable_if_supported.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2013 by the deal.II authors
+## Copyright (C) 2012 - 2014 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -26,7 +26,7 @@
   IF(NOT "${_flag_stripped}" STREQUAL "")
     STRING(REGEX REPLACE "^-" "" _flag_name "${_flag_stripped}")
     STRING(REPLACE "," "" _flag_name "${_flag_name}")
-    STRING(REPLACE "--" "__" _flag_name "${_flag_name}")
+    STRING(REPLACE "-" "_" _flag_name "${_flag_name}")
     STRING(REPLACE "++" "__" _flag_name "${_flag_name}")
     CHECK_CXX_COMPILER_FLAG(
       "${_flag_stripped}"


Improved Freetype module

Improved Freetype module

--- modules/FindFreetype.cmake
+++ modules/FindFreetype.cmake
@@ -64,7 +64,7 @@
   PATH_SUFFIXES include/freetype2 include
 )

-find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
+find_path(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h freetype2/config/ftheader.h
   HINTS
     ENV FREETYPE_DIR
     ${_PC_FREETYPE_INCLUDE_DIRS}
@@ -79,6 +79,9 @@
 	${CMAKE_BINARY_DIR}
   PATH_SUFFIXES include/freetype2 include/freetype include
 )
+
+message(STATUS "${FREETYPE_INCLUDE_DIR_ft2build}")
+message(STATUS "${FREETYPE_INCLUDE_DIR_freetype2}")

 find_library(FREETYPE_LIBRARY
   NAMES freetype libfreetype freetype219 freetype6


- add Storm to the list of automated tested endpoints

--- test/functional/ctest_functional.cmake
+++ test/functional/ctest_functional.cmake
@@ -8,6 +8,7 @@

 set(http_desy_base "https://vm-dcache-deploy6.desy.de:2880/dteam/davix-tests" CACHE STRING "dCache test instance to use")
 set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam" CACHE STRING "DPM test instance to use" )
+set(http_storm_base "https://gridhttps-storm-atlas.cr.cnaf.infn.it:8443/webdav/dteam/davix-tests/" CACHE STRING "Storm test instance to use")
 set(http_dynaFed_base "http://dav-federation.cern.ch/myfed/dteam/")
 set(http_lcgdm_file "${http_lcgdm_base}/davix-tests/testread0011")
 set(http_dynaFed_file "${http_dynaFed_base}/davix-tests/testread0011")
@@ -17,11 +18,19 @@
 set(metalink_url_direct "http://download.documentfoundation.org/libreoffice/stable/4.1.6/deb/x86_64/LibreOffice_4.1.6_Linux_x86-64_deb.tar.gz.meta4")

 test_dav_endpoint_ronly( ${http_desy_base} "proxy")
+test_valid_write_read_generic("${http_desy_base}" "proxy")

+# DPM tests
 test_dav_endpoint_rw( "${http_lcgdm_base}" "proxy")
-
 test_valid_delete_all("${http_lcgdm_base}"  "proxy")
 test_valid_read_generic("${http_lcgdm_base}" "proxy")
+test_valid_write_read_generic("${http_lcgdm_base}" "proxy")
+
+# Storm tests
+test_dav_endpoint_rw( "${http_storm_base}" "proxy")
+test_valid_delete_all("${http_storm_base}"  "proxy")
+test_valid_read_generic("${http_storm_base}" "proxy")
+test_valid_write_read_generic("${http_storm_base}" "proxy")

 # localhost generic server, ex : "davserver -n -D /tmp"
 test_dav_endpoint_rw("http://localhost:8008" "")
@@ -50,9 +59,6 @@
 test_valid_delete_all("${http_desy_base}"  "proxy")

-test_valid_write_read_generic("${http_lcgdm_base}" "proxy")
-test_valid_write_read_generic("${http_desy_base}" "proxy")
-
 # test replicas listing
 test_replica_listing_existing("${http_lcgdm_file}" "proxy")
 test_replica_listing_existing("${http_dynaFed_file}" "proxy")


minor fix

minor fix

--- libmrio.cmake
+++ libmrio.cmake
@@ -19,7 +19,7 @@
   message(STATUS "NetCDF_c++4 library: ${NETCDF_CPP4_LIBRARY}")
   target_link_libraries(libmrio netcdf_c++4)

-  target_compile_definitions(libmrio PRIVATE LIBMRIO_WITH_NETCDF)
+  target_compile_definitions(libmrio PUBLIC LIBMRIO_WITH_NETCDF)
 endif()

 if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")


Update ParaView for transfer function widget

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "95fe92d907a8702b1669b68d5aecf777ae72bcda")
+  set(_paraview_revision "c18638951d4e79a4c9ecc662824ecba6547782ba")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


add link openssl and libz for libcurl

add link openssl and libz for libcurl

--- 3rd_party/libcurl/libcurl.cmake
+++ 3rd_party/libcurl/libcurl.cmake
@@ -89,19 +89,34 @@
     EchoWithColor(COLOR YELLOW "-- Libcurl: Dynamic symbol test in ${3RD_PARTY_LIBCURL_LINK_NAME} failed, try static symbols")

     if(MSVC)
+        if (ZLIB_FOUND)
+            list(APPEND 3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS ${ZLIB_LIBRARIES})
+        endif()
+
         try_compile(3RD_PARTY_LIBCURL_TRY_COMPILE_RESULT
             ${CMAKE_BINARY_DIR} "${CMAKE_BINARY_DIR}/try_run_libcurl_test.c"
             CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${3RD_PARTY_LIBCURL_INC_DIR}
             COMPILE_DEFINITIONS /D CURL_STATICLIB
-            LINK_LIBRARIES ${3RD_PARTY_LIBCURL_LINK_NAME}
+            LINK_LIBRARIES ${3RD_PARTY_LIBCURL_LINK_NAME} ${3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS}
             OUTPUT_VARIABLE 3RD_PARTY_LIBCURL_TRY_COMPILE_STA_MSG
         )
     else()
+        unset(3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS)
+        if (OPENSSL_FOUND)
+            list(APPEND 3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
+        else ()
+            list(APPEND 3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS ssl crypto)
+        endif()
+        if (ZLIB_FOUND)
+            list(APPEND 3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS ${ZLIB_LIBRARIES})
+        else ()
+            list(APPEND 3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS z)
+        endif()
         try_run(3RD_PARTY_LIBCURL_TRY_RUN_RESULT 3RD_PARTY_LIBCURL_TRY_COMPILE_RESULT
             ${CMAKE_BINARY_DIR} "${CMAKE_BINARY_DIR}/try_run_libcurl_test.c"
             CMAKE_FLAGS -DINCLUDE_DIRECTORIES=${3RD_PARTY_LIBCURL_INC_DIR}
             COMPILE_DEFINITIONS -DCURL_STATICLIB
-            LINK_LIBRARIES ${3RD_PARTY_LIBCURL_LINK_NAME}
+            LINK_LIBRARIES ${3RD_PARTY_LIBCURL_LINK_NAME} ${3RD_PARTY_LIBCURL_TRY_RUN_STATIC_LINK_LIBS} rt
             COMPILE_OUTPUT_VARIABLE 3RD_PARTY_LIBCURL_TRY_COMPILE_STA_MSG
             RUN_OUTPUT_VARIABLE 3RD_PARTY_LIBCURL_TRY_RUN_OUT
         )


tests: Turn debug crypto on in ctest.

tests: Turn debug crypto on in ctest.

--- tests/ctest-default.cmake
+++ tests/ctest-default.cmake
@@ -13,7 +13,7 @@
 set(CTEST_BUILD_CONFIGURATION "Debug")

 ## The build options for the project
-set(CTEST_BUILD_OPTIONS "-DWITH_TESTING=ON -DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DWITH_GCRYPT=OFF")
+set(CTEST_BUILD_OPTIONS "-DWITH_TESTING=ON -DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DDEBUG_CRYPTO=ON -DWITH_GCRYPT=OFF")

 #set(CTEST_CUSTOM_MEMCHECK_IGNORE torture_rand)


Issue #198: not checking include dirs and library dirs in FFmpeg discovery script

--- src/cmake/ffmpeg/FindFFmpeg.cmake
+++ src/cmake/ffmpeg/FindFFmpeg.cmake
@@ -41,6 +41,11 @@
 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(
     FFmpeg DEFAULT_MSG
-    FFmpeg_LIBS FFmpeg_INCLUDE_DIRS
-    FFmpeg_LIBRARY_DIRS
+    FFmpeg_LIBS
 )
+
+# excluded FFmpeg_INCLUDE_DIRS and FFmpeg_LIBRARY_DIRS
+# from the above check, because pkg-config does not
+# report them if FFmpeg libraries are installed in
+# standard system-wide locations already known to the
+# system compiler


rename and add beamdyn regression tests

rename and add beamdyn regression tests

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -113,4 +113,5 @@
 of_Regression("5MW_Land_BD_DLL_WTurb"                  "openfast;beamdyn;aerodyn15;servodyn")

 # BeamDyn regression tests
-bd_regression(bd_isotropic_rollup)
+bd_regression(isotropic_rollup)
+bd_regression(static_cantilever_beam)


CMake: -edit SALOME_GENERATE_TESTS_ENVIRONMENT macro.

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -801,32 +801,56 @@
 # and puts this variable into <output> argument.
 #
 MACRO(SALOME_GENERATE_TESTS_ENVIRONMENT output)
-  SET(_env)
-  SET(_WIN_LD_LIBRARY OFF)
-  FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
-    IF(${_item} STREQUAL "LD_LIBRARY_PATH")
-      SET(_WIN_LD_LIBRARY ON)
-    ENDIF()
-    SET(_env_${_item})
-    FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
-      IF(WIN32)
-        SET(_env_${_item} "${_val};${_env_${_item}}")
-      ELSE()
-        SET(_env_${_item} "${_val}:${_env_${_item}}")
-      ENDIF()
-    ENDFOREACH()
-  ENDFOREACH()
-
-  IF(_WIN_LD_LIBRARY AND WIN32)
-    SET(_env_PATH "${_env_PATH} ${_env_LD_LIBRARY_PATH}")
-  ENDIF()
-
-  FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
-    IF(NOT(WIN32 AND ${_item} STREQUAL "LD_LIBRARY_PATH"))
-      SET(_env "${_item}=${_env_${_item}} ${_env}")
-    ENDIF()
-  ENDFOREACH()
-  SET(${output} ${_env})
+ SET(_env)
+ SET(_WIN_LD_LIBRARY OFF)
+ FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+   IF(${_item} STREQUAL "LD_LIBRARY_PATH")
+     SET(_WIN_LD_LIBRARY ON)
+   ENDIF()
+   SET(_env_${_item})
+   FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
+     IF(WIN32)
+       STRING(REPLACE "/" "\\" _val "${_val}")
+       SET(_env_${_item} "${_val};${_env_${_item}}")
+     ELSE()
+       SET(_env_${_item} "${_val}:${_env_${_item}}")
+     ENDIF()
+   ENDFOREACH()
+ ENDFOREACH()
+
+ IF(_WIN_LD_LIBRARY AND WIN32)
+   SET(_env_PATH "${_env_PATH}$ENV{LD_LIBRARY_PATH};${_env_LD_LIBRARY_PATH}")
+ ENDIF()
+
+ IF(WIN32)
+   SET(sep ",")
+ ELSE()
+   SET(sep ";")
+ ENDIF()
+
+ FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
+   IF(WIN32)
+     IF(NOT ${_item} STREQUAL "LD_LIBRARY_PATH")
+       SET(_env "${_item}=$ENV{${_item}};${_env_${_item}}${sep}${_env}")
+     ENDIF()
+   ELSE()
+     SET(_env "${_item}=$ENV{${_item}}:${_env_${_item}}${sep}${_env}")
+   ENDIF()
+ ENDFOREACH()
+
+ # Get module name as substring of "Salome<ModuleName>"
+ STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
+ SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")
+
+ # Creating follow string for Windows environement:
+ # "VAR1_ENV=1\;2\;3\;...\;...\;...;VAR2_ENV=1\;2\;3\;...\;...\;...;VAR3_ENV=1\;2\;3\;...\;...\;...;..."
+ IF(WIN32)
+   STRING(REGEX REPLACE "\\\\*;" "\\\\;" _env "${_env}")
+   STRING(REGEX REPLACE "\\\\*;*," ";" _env "${_env}")
+ ENDIF()
+
+ SET(${output} "${_env}")
+
 ENDMACRO(SALOME_GENERATE_TESTS_ENVIRONMENT)

 #########################################################################


Issue #33: Build VL with Qt5 examples if Qt5 is on.

--- CMake/ExternalProjects/VL.cmake
+++ CMake/ExternalProjects/VL.cmake
@@ -64,7 +64,7 @@
       -DCMAKE_PREFIX_PATH:PATH=${MYPROJECT_PREFIX_PATH}
       -DCMAKE_INSTALL_PREFIX:PATH=${proj_INSTALL}
       -DVL_GUI_QT5_SUPPORT:BOOL=${MYPROJECT_USE_QT}
-      -DVL_GUI_QT5_EXAMPLES:BOOL=0
+      -DVL_GUI_QT5_EXAMPLES:BOOL=${MYPROJECT_USE_QT}
       -DVL_GUI_QT4_SUPPORT:BOOL=0
       -DVL_GUI_QT4_EXAMPLES:BOOL=0
       -DVL_USER_DATA_OBJECT:BOOL=1


Fixed CMake script of FindOpenBLAS.

Fixed CMake script of FindOpenBLAS.

--- CMakeScripts/FindOpenBLAS.cmake
+++ CMakeScripts/FindOpenBLAS.cmake
@@ -26,7 +26,7 @@
         $ENV{OpenBLAS_HOME}/lib
  )

-FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${ATLAS_POSSIBLE_INCLUDE_PATHS})
+FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS})
 FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})

 SET(OpenBLAS_FOUND ON)


Fixes multiple definitions in different translation units (C++11 only?)

--- Code/RDGeneral/versions.h.cmake
+++ Code/RDGeneral/versions.h.cmake
@@ -5,10 +5,10 @@
 //   @@ All Rights Reserved  @@
 //
 namespace RDKit {
-  const char *rdkitVersion="@RDKit_RELEASENAME@";
+  const char * const rdkitVersion="@RDKit_RELEASENAME@";

   // The Boost version as detected at build time.
   // CMake's Boost_LIB_VERSION is defined by the FindBoost.cmake module
   // to be the same as the value from <boost/version.hpp>
-  const char *boostVersion="@Boost_LIB_VERSION@";
+  const char * const boostVersion="@Boost_LIB_VERSION@";
 }


Update the SimpleITK_DIR version to the current SimpleITK version

--- SuperBuild/External_SimpleITKExamples.cmake
+++ SuperBuild/External_SimpleITKExamples.cmake
@@ -20,7 +20,7 @@
       --no-warn-unused-cli
       -C "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt"
       ${ep_common_args}
-      -DSimpleITK_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/SimpleITK-1.0/
+      -DSimpleITK_DIR:PATH=${CMAKE_INSTALL_PREFIX}/lib/cmake/SimpleITK-1.1/
       -DCMAKE_SKIP_RPATH:BOOL=ON
       -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
     BUILD_COMMAND ${BUILD_COMMAND_STRING}


incompressible restart test

incompressible restart test

--- phSolver/incompressible/test/testing.cmake
+++ phSolver/incompressible/test/testing.cmake
@@ -10,3 +10,10 @@
 )
 add_test(compareIncompressible
   diff ${CDIR}/restart-dat.4.1.ref ${CDIR}/4-procs_case/restart-dat.4.1)
+add_test(
+  NAME incompressibleRestart
+  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phastaIC.exe
+  WORKING_DIRECTORY ${CASES}/incompressible
+)
+add_test(compareIncompressibleRestart
+  diff ${CDIR}/restart-dat.8.1.ref ${CDIR}/4-procs_case/restart-dat.8.1)


Testing ossim dependencies

Testing ossim dependencies

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -262,8 +262,8 @@
       SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_INSTALL_PREFIX}/include")
    ENDIF()
    IF(OSSIM_DEPENDENCIES)
-      SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${OSSIM_DEPENDENCIES}/lib${LIBSUFFIX}")
-      SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEPENDENCIES}/include")
+      SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${OSSIM_DEPENDENCIES}/lib;${OSSIM_DEPENDENCIES}/lib64")
+      SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEPENDENCIES}/include;${OSSIM_DEPENDENCIES}/kakadu/include")
    ENDIF()
 #   SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};/usr/lib;/usr/local/lib;/usr/lib64;/usr/lib/x86_64-linux-gnu")
    SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEV_HOME}/ossim/include;/usr/include;/usr/local/include")


Homer_s's patch for compiling with boost 1.47

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -41,7 +41,7 @@
 #set(Boost_DEBUG                 ON)
 set(Boost_MINIMUM_VERSION       "1.43.0")

-set(Boost_ADDITIONAL_VERSIONS "1.46.2" "1.46.1" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.43" "1.43.0" )
+set(Boost_ADDITIONAL_VERSIONS "1.47.0" "1.46.1" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.43" "1.43.0" )

 set(LUXRAYS_BOOST_COMPONENTS thread filesystem system)
 find_package(Boost ${Boost_MINIMUM_VERSION} COMPONENTS ${LUXRAYS_BOOST_COMPONENTS})
@@ -58,6 +58,8 @@
 if (Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
   link_directories(${Boost_LIBRARY_DIRS})
+  # Don't use latest boost versions interfaces
+  ADD_DEFINITIONS(-DBOOST_FILESYSTEM_VERSION=2)
 endif ()


BUG: Environment variables not tested correctly

--- CMake/TubeTKTestEnvironmentVariables.cmake
+++ CMake/TubeTKTestEnvironmentVariables.cmake
@@ -25,15 +25,19 @@
 # variables.
 # It verifies that ITK_BUILD_DIR and TubeTK_BUILD_DIR are set as environment
 # variables and that their values match the values passed to the script.
-if( DEFINED $ENV{ITK_BUILD_DIR})
+if( NOT DEFINED ENV{ITK_BUILD_DIR})
   message(FATAL_ERROR "ITK_BUILD_DIR environment variable not set.")
 endif()
 if(NOT "$ENV{ITK_BUILD_DIR}" STREQUAL "${ITK_BUILD_DIR}")
-  message(FATAL_ERROR "ITK_BUILD_DIR environment variable does not match ITK_DIR set in this project.")
+  message(FATAL_ERROR "ITK_BUILD_DIR environment variable does "
+          "not match ITK_DIR set in this project. Expected:\n"
+          "${ITK_BUILD_DIR}\ngot:\n$ENV{ITK_BUILD_DIR}")
 endif()
-if( DEFINED $ENV{TubeTK_BUILD_DIR})
+if( NOT DEFINED ENV{TubeTK_BUILD_DIR})
   message(FATAL_ERROR "TubeTK_BUILD_DIR environment variable not set.")
 endif()
 if(NOT "$ENV{TubeTK_BUILD_DIR}" STREQUAL "${TubeTK_BUILD_DIR}")
-  message(FATAL_ERROR "TubeTK_BUILD_DIR environment variable does not match current directory path.")
+  message(FATAL_ERROR "TubeTK_BUILD_DIR environment variable does "
+          "not match current directory path. Expected:\n"
+          "${TubeTK_BUILD_DIR}\ngot:\n$ENV{TubeTK_BUILD_DIR}")
 endif()


Removed mitkToFImageGrabberCreator

Removed mitkToFImageGrabberCreator

--- Modules/ToFHardware/files.cmake
+++ Modules/ToFHardware/files.cmake
@@ -1,6 +1,5 @@
 SET(CPP_FILES
   mitkKinectDevice.cpp
-  mitkToFImageGrabberCreator.cpp
   mitkToFImageGrabber.cpp
   mitkToFOpenCVImageGrabber.cpp
   mitkToFCameraDevice.cpp


STYLE: Space before parens in External_ImageViewer.cmake.

Change-Id: I8c8835bc6a4a3891fd7387031f021ed477300fe3

--- CMake/Superbuild/External_ImageViewer.cmake
+++ CMake/Superbuild/External_ImageViewer.cmake
@@ -37,7 +37,7 @@
 # Sanity checks
 if( DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR} )
   message( FATAL_ERROR "${proj}_DIR variable is defined but corresponds to non-existing directory" )
-endif( DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR})
+endif( DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR} )

 set( ${proj}_DEPENDENCIES "")
 if( NOT TubeTK_BUILD_SLICER_EXTENSION )


From Torben Dannhauer, update to reflect addition of NVTT to Windows 3rdPartyPackage

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -92,6 +92,8 @@
             SET(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY} CACHE FILEPATH "" FORCE)
             SET(LIBXML2_XMLLINT_EXECUTABLE ${OSG_3RDPARTY_BIN}/bin/xmllint.exe CACHE FILEPATH "Path to xmllint executable" FORCE)
         ENDIF(LIBXML2_FOUND)
+        #FIND_DEPENDENCY(DEPNAME INCLUDEFILE LIBRARY_NAMES_BASE SEARCHPATHLIST DEBUGSUFFIX EXSUFFIX)
+        FIND_Package(NVTT)
 #luigi#INCLUDE(FindOSGDepends.cmake)
 ENDMACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)

@@ -104,10 +106,25 @@

 OPTION(USE_3DPARTY_BIN "Set to ON to use Mike prebuilt dependencies situated side of OpenSceneGraph source.  Use OFF for avoiding." ON)
 IF(USE_3DPARTY_BIN)
+
+    # Check Architecture
+    IF( CMAKE_SIZEOF_VOID_P EQUAL 4 )
+        MESSAGE( STATUS "32 bit architecture detected" )
+        SET(DESTINATION_ARCH "x86")
+    ENDIF()
+    IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+        MESSAGE( STATUS "64 bit architecture detected" )
+        SET(DESTINATION_ARCH "x64")
+    ENDIF()
+
     GET_FILENAME_COMPONENT(PARENT_DIR ${PROJECT_SOURCE_DIR} PATH)
     SET(TEST_3DPARTY_DIR "${PARENT_DIR}/3rdparty")
     IF(NOT EXISTS ${TEST_3DPARTY_DIR})
-        IF(MSVC71)
+        SET(3RDPARTY_DIR_BY_ENV $ENV{OSG_3RDPARTY_DIR})
+        IF(3RDPARTY_DIR_BY_ENV)
+            MESSAGE( STATUS "3rdParty-Package ENV variable found:${3RDPARTY_DIR_BY_ENV}/${DESTINATION_ARCH}" )
+            SET(TEST_3DPARTY_DIR "${3RDPARTY_DIR_BY_ENV}/${DESTINATION_ARCH}")
+        ELSEIF(MSVC71)
             SET(TEST_3DPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs71")
         ELSEIF(MSVC80)
             SET(TEST_3DPARTY_DIR "${PARENT_DIR}/3rdParty_win32binaries_vs80sp1")
@@ -117,6 +134,7 @@
     ENDIF(NOT EXISTS ${TEST_3DPARTY_DIR})
     SET(ACTUAL_3DPARTY_DIR "${TEST_3DPARTY_DIR}" CACHE PATH "Location of 3rdparty dependencies")
     IF(EXISTS ${ACTUAL_3DPARTY_DIR})
+        SET (3rdPartyRoot ${ACTUAL_3DPARTY_DIR})
         SEARCH_3RDPARTY(${ACTUAL_3DPARTY_DIR})
     ENDIF(EXISTS ${ACTUAL_3DPARTY_DIR})
 ENDIF(USE_3DPARTY_BIN)


From Mattias Helsing, "I just made Find3rdPartyDependencies search for curllib if it can't
find libcurl. Mike's 3rdParty only has curllib.

I realize now that the in appended file I have earlier removed
searching for freetype219 since I have it but it will break the build
of osg."

git-svn-id: 23b6355f2bb369032457de4eb5f713ee134f73a8@8210 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -52,14 +52,14 @@

 MACRO(SEARCH_3RDPARTY OSG_3RDPARTY_BIN)
         FIND_DEPENDENCY(TIFF tiff.h libtiff ${OSG_3RDPARTY_BIN} "D")
-        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype219;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
+        FIND_DEPENDENCY(FREETYPE ft2build.h "freetype;freetype234;freetype234MT;freetype235" ${OSG_3RDPARTY_BIN} "_D")
         IF(FREETYPE_FOUND)
             #forcing subsequent FindFreeType stuff to not search for other variables.... kind of a hack
             SET(FREETYPE_INCLUDE_DIR_ft2build ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
             SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
             MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
         ENDIF(FREETYPE_FOUND)
-        FIND_DEPENDENCY(CURL curl/curl.h libcurl ${OSG_3RDPARTY_BIN} "D")
+        FIND_DEPENDENCY(CURL curl/curl.h "libcurl;curllib" ${OSG_3RDPARTY_BIN} "D")
         FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
         #FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal_i" ${OSG_3RDPARTY_BIN})
         FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D")


fixed: use CG_ROOT variable to locate Cg framework on OS X.

       Many thanks to David Kabala for the patch!

git-svn-id: 9c86407f91444b2cc93bb44d37d96a685973386f@2439 4683daeb-ad0f-0410-a623-93161e962ae5

--- Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
+++ Source/Contrib/CgFXMaterial/CMake/FindCg.cmake
@@ -12,7 +12,8 @@
 ##

 IF(APPLE)
-    FIND_LIBRARY(CG_LIBRARY Cg)
+    FIND_LIBRARY(CG_LIBRARY Cg
+                 PATHS ${CG_ROOT} ENV CG_ROOT)
     MARK_AS_ADVANCED (CG_LIBRARY)
     SET(CG_LIBRARY_RELEASE ${CG_LIBRARY}/Cg)
     SET(CG_LIBRARY_DEBUG ${CG_LIBRARY}/Cg)


Correctly get binary name in android run_binary_test (#4403)

--- build_tools/cmake/iree_run_binary_test.cmake
+++ build_tools/cmake/iree_run_binary_test.cmake
@@ -70,8 +70,6 @@
   string(REPLACE "::" "_" _TEST_BINARY_EXECUTABLE ${_TEST_BINARY_TARGET})

   if(ANDROID)
-    # TODO(gcmn): Fix this on android
-    return()
     set(_ANDROID_REL_DIR "${_PACKAGE_PATH}/${_RULE_NAME}")
     set(_ANDROID_ABS_DIR "/data/local/tmp/${_ANDROID_REL_DIR}")

@@ -82,7 +80,7 @@
         ${_TEST_NAME}
       COMMAND
         "${CMAKE_SOURCE_DIR}/build_tools/cmake/run_android_test.${IREE_HOST_SCRIPT_EXT}"
-        "${_ANDROID_REL_DIR}/${_NAME}"
+        "${_ANDROID_REL_DIR}/$<TARGET_FILE_NAME:${_TEST_BINARY_EXECUTABLE}>"
         ${_RULE_ARGS}
     )
     # Use environment variables to instruct the script to push artifacts


cmake/HextForceCPP14: only check -std flag on GCC and Clang

--- cmake/HextForceCPP14.cmake
+++ cmake/HextForceCPP14.cmake
@@ -1,9 +1,11 @@
 INCLUDE(CheckCXXCompilerFlag)
-CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CPP14)
-IF(COMPILER_SUPPORTS_CPP14)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
-ELSE(COMPILER_SUPPORTS_CPP14)
-  MESSAGE(SEND_ERROR "${CMAKE_CXX_COMPILER} does not support the flag -std=c++14.")
-  MESSAGE(FATAL_ERROR "C++14 is required.")
-ENDIF(COMPILER_SUPPORTS_CPP14)
+IF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CPP14)
+  IF(COMPILER_SUPPORTS_CPP14)
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
+  ELSE(COMPILER_SUPPORTS_CPP14)
+    MESSAGE(SEND_ERROR "${CMAKE_CXX_COMPILER} does not support the flag -std=c++14.")
+    MESSAGE(FATAL_ERROR "C++14 is required.")
+  ENDIF(COMPILER_SUPPORTS_CPP14)
+ENDIF(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")


Fix typo : SVR5=>SVR4

Fix typo : SVR5=>SVR4

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -86,7 +86,7 @@
     SET(CMAKE_INSTALL_PREFIX ${default_prefix}
       CACHE PATH "install prefix" FORCE)
   ENDIF()
-  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR5")
+  SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR4")
   LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
   IF(ind EQUAL -1)
     MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."


[CMake] Properly conditionalize installation of lld libraries

In what appears to be a copy-and-paste error, lld currently only
installs libraries if the lld tools are configured to build.

Instead, lld should allow the libraries to be installed even if the lld
tools are not being built. Additionally, if users want to only install
the tools and not the libraries, the LLVM way of doing that is by
checking for LLVM_INSTALL_TOOLCHAIN_ONLY.

This fixes PR35960.

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@327126 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLD.cmake
+++ cmake/modules/AddLLD.cmake
@@ -10,7 +10,7 @@
   llvm_add_library(${name} ${ARG_ENABLE_SHARED} ${ARG_UNPARSED_ARGUMENTS})
   set_target_properties(${name} PROPERTIES FOLDER "lld libraries")

-  if (LLD_BUILD_TOOLS)
+  if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
     if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
         NOT LLVM_DISTRIBUTION_COMPONENTS)
       set(export_to_lldtargets EXPORT lldTargets)


Aerocore 2: Switch to logger

Aerocore 2: Switch to logger

--- cmake/configs/nuttx_aerocore2_default.cmake
+++ cmake/configs/nuttx_aerocore2_default.cmake
@@ -95,8 +95,8 @@
 	#
 	# Logging
 	#
-	#modules/logger
-	modules/sdlog2
+	modules/logger
+	#modules/sdlog2

 	#
 	# Library modules


cmake: add missing newline

cmake: add missing newline

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1469,7 +1469,6 @@

 endif()

-
 #------------------------------------------------------------------------------------
 if(webui)
   ExternalProject_Add(
@@ -1480,4 +1479,4 @@
      BUILD_COMMAND ""
      INSTALL_COMMAND ""
      SOURCE_DIR ${CMAKE_BINARY_DIR}/ui5/distribution)
-endif()+endif()


added additional search path for COI

added additional search path for COI

--- common/cmake/FindCOI.cmake
+++ common/cmake/FindCOI.cmake
@@ -16,7 +16,7 @@

 FIND_PATH(COI_INCLUDE_PATH source/COIProcess_source.h /opt/intel/mic/coi/include /usr/include/intel-coi)
 FIND_PATH(COI_HOST_LIBRARY_DIR libcoi_host.so /opt/intel/mic/coi/host-linux-release/lib/)
-FIND_PATH(COI_DEV_LIBRARY_DIR libcoi_device.so /opt/intel/mic/coi/device-linux-release/lib/ /opt/mpss/3.1/sysroots/k1om-mpss-linux/usr/lib64/)
+FIND_PATH(COI_DEV_LIBRARY_DIR libcoi_device.so /opt/intel/mic/coi/device-linux-release/lib/ /opt/mpss/3.1/sysroots/k1om-mpss-linux/usr/lib64/  /opt/mpss/3.1.2/sysroots/k1om-mpss-linux/usr/lib64/ )

 IF (COI_INCLUDE_PATH AND COI_HOST_LIBRARY_DIR AND COI_DEV_LIBRARY_DIR)
   SET(COI_FOUND TRUE)


Set boost_INCLUDE_DIR to boost-1_55 for win32 builds

During the change from boost version 1.54 to 1.55, the boost_INCLUDE_DIR was not properly updated in the case of win32.

--- superbuild/External-Boost.cmake
+++ superbuild/External-Boost.cmake
@@ -33,7 +33,7 @@
 )

 if( WIN32 )
-  set( Boost_INCLUDE_DIR ${INSTALL_DEPECENCIES_DIR}/include/boost-1_54 )
+  set( Boost_INCLUDE_DIR ${INSTALL_DEPECENCIES_DIR}/include/boost-1_55 )
   set( BOOST_ROOT ${INSTALL_DEPECENCIES_DIR} )
 else()
   set( Boost_INCLUDE_DIR ${INSTALL_DEPECENCIES_DIR}/include )


STYLE: Line too long in External_KWStyle.cmake

--- CMake/Superbuild/External_KWStyle.cmake
+++ CMake/Superbuild/External_KWStyle.cmake
@@ -33,7 +33,8 @@

 # Sanity checks.
 if( KWSTYLE_EXECUTABLE AND NOT EXISTS ${KWSTYLE_EXECUTABLE} )
-  message( FATAL_ERROR "The KWSTYLE_EXECUTABLE variable is defined, but corresponds to a nonexistent file" )
+  message( FATAL_ERROR
+    "KWSTYLE_EXECUTABLE is defined, but corresponds to a nonexistent file" )
 endif( KWSTYLE_EXECUTABLE AND NOT EXISTS ${KWSTYLE_EXECUTABLE} )

 set( ${proj}_DEPENDENCIES "" )


ENH: Merge changes from main tree into VTK-5-2 branch. (cvs -q up -j1.27 -j1.29 DartConfig.cmake)

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,53 +0,0 @@
-# Dashboard is opened for submissions for a 24 hour period starting at
-# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
-SET (NIGHTLY_START_TIME "22:00:00 EDT")
-
-# Dart server to submit results (used by client)
-IF(NOT DROP_METHOD)
-  SET(DROP_METHOD http)
-ENDIF(NOT DROP_METHOD)
-IF(DROP_METHOD MATCHES http)
-  SET (DROP_SITE "public.kitware.com")
-  SET (DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi")
-ELSE(DROP_METHOD MATCHES http)
-  SET (DROP_SITE "public.kitware.com")
-  SET (DROP_LOCATION "/incoming")
-  SET (DROP_SITE_USER "ftpuser")
-  SET (DROP_SITE_PASSWORD "public")
-ENDIF(DROP_METHOD MATCHES http)
-
-SET (TRIGGER_SITE
-       "http://${DROP_SITE}/cgi-bin/Submit-vtk-TestingResults.pl")
-
-# Project Home Page
-SET (PROJECT_URL "http://www.vtk.org")
-
-# Dart server configuration
-SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/vtk-rollup-dashboard.sh")
-SET (CVS_WEB_URL "http://${DROP_SITE}/cgi-bin/viewcvs.cgi/")
-SET (CVS_WEB_CVSROOT "VTK")
-SET (USE_DOXYGEN "On")
-SET (DOXYGEN_URL "http://www.vtk.org/doc/nightly/html/" )
-SET (GNATS_WEB_URL "${PROJECT_URL}/Bug/query.php?projects=1&status%5B%5D=1&status%5B%5D=2&status%5B%5D=3&status%5B%5D=4&status%5B%5D=6&op=doquery")
-SET (USE_GNATS "On")
-
-# copy over the testing logo
-CONFIGURE_FILE(${VTK_SOURCE_DIR}/TestingLogo.gif ${VTK_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
-
-# Continuous email delivery variables
-SET (CONTINUOUS_FROM "lorensen@crd.ge.com")
-SET (SMTP_MAILHOST "public.kitware.com")
-SET (CONTINUOUS_MONITOR_LIST "lorensen@crd.ge.com millerjv@crd.ge.com ken.martin@kitware.com")
-SET (CONTINUOUS_BASE_URL "${PROJECT_URL}/Testing")
-
-SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES ON)
-SET (DELIVER_BROKEN_BUILD_EMAIL "Continuous Nightly")
-SET (EMAIL_FROM "vtk-dashboard@public.kitware.com")
-SET (DARTBOARD_BASE_URL "${PROJECT_URL}/Testing")
-
-SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_CONFIGURE_FAILURES 1)
-SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_ERRORS 1)
-SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_BUILD_WARNINGS 1)
-SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_NOT_RUNS 1)
-SET (DELIVER_BROKEN_BUILD_EMAIL_WITH_TEST_FAILURES 1)
-


Changed Android toolchain to work with hunter

--- os/android.toolchain.cmake
+++ os/android.toolchain.cmake
@@ -1143,6 +1143,7 @@
   endif()
  endif()
  set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "assembler" )
+ set( CMAKE_C_PREPROCESSOR "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-gcc${TOOL_OS_SUFFIX}"     CACHE PATH "preprocessor" )
  set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-strip${TOOL_OS_SUFFIX}"   CACHE PATH "strip" )
  set( CMAKE_AR           "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ar${TOOL_OS_SUFFIX}"      CACHE PATH "archive" )
  set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_ROOT}/bin/${ANDROID_TOOLCHAIN_MACHINE_NAME}-ld${TOOL_OS_SUFFIX}"      CACHE PATH "linker" )
@@ -1165,8 +1166,8 @@
 endif()

 # Force set compilers because standard identification works badly for us
-include( CMakeForceCompiler )
-CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU )
+#include( CMakeForceCompiler ) AWP: I've disabled this to work with hunter
+#CMAKE_FORCE_C_COMPILER( "${CMAKE_C_COMPILER}" GNU ) AWP: I've disabled this to work with hunter
 if( ANDROID_COMPILER_IS_CLANG )
  set( CMAKE_C_COMPILER_ID Clang )
 endif()
@@ -1178,7 +1179,8 @@
 endif()
 set( CMAKE_C_HAS_ISYSROOT 1 )
 set( CMAKE_C_COMPILER_ABI ELF )
-CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU )
+set( CMAKE_C_SOURCE_FILE_EXTENSIONS c)
+#CMAKE_FORCE_CXX_COMPILER( "${CMAKE_CXX_COMPILER}" GNU ) AWP: I've disabled this to work with hunter
 if( ANDROID_COMPILER_IS_CLANG )
  set( CMAKE_CXX_COMPILER_ID Clang)
 endif()


Export ZLIB version as well

Export ZLIB version as well

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

--- deal.II/cmake/configure/configure_zlib.cmake
+++ deal.II/cmake/configure/configure_zlib.cmake
@@ -19,3 +19,8 @@
 #

 CONFIGURE_FEATURE(ZLIB)
+
+# Export ZLIB_VERSION:
+IF(DEFINED ZLIB_VERSION_STRING)
+  SET(ZLIB_VERSION ${ZLIB_VERSION_STRING})
+ENDIF()


Add custom step for b2 instead of using build step

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -20,7 +20,6 @@
   #[[ Reset variables. ]]
   set(patch_cmd "")
   set(configure_cmd "")
-  set(build_cmd "")
   set(install_cmd "")

   set(BOOST_ROOT ${ep_prefix})
@@ -185,12 +184,12 @@
     if(WIN32)

       set(bootstrap_cmd if not exist b2.exe \( call bootstrap.bat ${bootstrap_args} \))
-      set(build_cmd cd <SOURCE_DIR> && b2 ${b2_options} ${b2_properties} stage)
+      set(b2_cmd b2 ${b2_options} ${b2_properties} stage)

     else()

       set(bootstrap_cmd test -e ./b2 || ./bootstrap.sh ${bootstrap_args})
-      set(build_cmd cd <SOURCE_DIR> && ./b2 ${b2_options} ${b2_properties} stage)
+      set(b2_cmd ./b2 ${b2_options} ${b2_properties} stage)

       #[[ We already told Boost if we want to use GCC or Clang but so far we
           were not able to specify the exact same compiler we set in CMake
@@ -243,10 +242,6 @@
     set(configure_cmd ${dummy_cmd}) #[[ Do nothing ]]
   endif()

-  if(NOT build_cmd)
-    set(build_cmd ${dummy_cmd}) #[[ Do nothing ]]
-  endif()
-
   if(WIN32)
     set(install_cmd
       if not exist $<SHELL_PATH:${ep_prefix}/include/boost/config.hpp>
@@ -264,18 +259,23 @@
     URL_MD5 ${md5}
     PATCH_COMMAND ${patch_cmd}
     CONFIGURE_COMMAND ${configure_cmd}
-    BUILD_COMMAND ${build_cmd}
+    BUILD_COMMAND ""
     INSTALL_COMMAND ${install_cmd}
   )

-  if(bootstrap_cmd)
-    ExternalProject_Add_Step(${proj} bootstrap
-      COMMAND ${bootstrap_cmd}
-      DEPENDEES patch
-      DEPENDERS configure
-      WORKING_DIRECTORY <SOURCE_DIR>
-    )
-  endif()
+  ExternalProject_Add_Step(${proj} bootstrap
+    COMMAND ${bootstrap_cmd}
+    DEPENDEES patch
+    DEPENDERS configure
+    WORKING_DIRECTORY <SOURCE_DIR>
+  )
+
+  ExternalProject_Add_Step(${proj} b2
+    COMMAND ${b2_cmd}
+    DEPENDEES bootstrap
+    DEPENDERS build
+    WORKING_DIRECTORY <SOURCE_DIR>
+  )

   if(WIN32)