Revert "[CMake] Use __libc_start_main rather than fopen when checking for C library"

This reverts commit r352341: it broke the build on macOS which doesn't
seem to provide __libc_start_main in its C library.

git-svn-id: 62ef012455b6b8fcec9c41ca270ebf409aae1006@352411 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -3,7 +3,7 @@
 include(CheckCXXCompilerFlag)
 include(CheckLibraryExists)

-check_library_exists(c __libc_start_main "" LIBUNWIND_HAS_C_LIB)
+check_library_exists(c fopen "" LIBUNWIND_HAS_C_LIB)

 if (NOT LIBUNWIND_USE_COMPILER_RT)
   check_library_exists(gcc_s __gcc_personality_v0 "" LIBUNWIND_HAS_GCC_S_LIB)


Updated execution tests for cmake 3.3.0

Updated execution tests for cmake 3.3.0

--- cmake/dev/gtest.cmake
+++ cmake/dev/gtest.cmake
@@ -14,7 +14,7 @@
                 # Add environment
                 if(WIN32)
                     set_tests_properties(${GTEST_GROUP_NAME}.${GTEST_NAME} PROPERTIES ENVIRONMENT
-                        "PATH=${PROJECT_BINARY_DIR}/lib\\;${fastcdr_LIB_DIR}\\;${Boost_LIBRARY_DIR}\\;$ENV{PATH}")
+                        "PATH=${PROJECT_BINARY_DIR}/lib\\;${fastcdr_LIB_DIR}\\;${Boost_LIBRARY_DIR_RELEASE}\\;$ENV{PATH}")
                 endif()
             endforeach()
         endforeach()


cmake: gcc: add support for compiling for the ARM Cortex-M1

Add support for compiling for the ARM Cortex-M1 CPU via GCC.

Signed-off-by: Henrik Brix Andersen <a076b11c2cc63ccdc903dbe182e1eecc3cbbc094@brixandersen.dk>

--- cmake/gcc-m-cpu.cmake
+++ cmake/gcc-m-cpu.cmake
@@ -8,6 +8,8 @@
     set(GCC_M_CPU cortex-m0)
   elseif(CONFIG_CPU_CORTEX_M0PLUS)
     set(GCC_M_CPU cortex-m0plus)
+  elseif(CONFIG_CPU_CORTEX_M1)
+    set(GCC_M_CPU cortex-m1)
   elseif(CONFIG_CPU_CORTEX_M3)
     set(GCC_M_CPU cortex-m3)
   elseif(CONFIG_CPU_CORTEX_M4)


Don't use any cached veriables.

Don't use any cached veriables.

--- cmake/hardening.cmake
+++ cmake/hardening.cmake
@@ -3,21 +3,21 @@

 	IF(CMAKE_C_COMPILER_ID STREQUAL GNU)
 		IF(CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9.0)
-			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector --param ssp-buffer-size=4" CACHE STRING "" FORCE)
+			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector --param ssp-buffer-size=4")
 		ELSE()
-			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector-strong" CACHE STRING "" FORCE)
+			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector-strong")
 		ENDIF()
 	ELSEIF(CMAKE_C_COMPILER_ID STREQUAL Clang)
 		IF(CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6.0)
-			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector --param ssp-buffer-size=4" CACHE STRING "" FORCE)
+			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector --param ssp-buffer-size=4")
 		ELSE()
-			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector-strong" CACHE STRING "" FORCE)
+			SET(HARDENING_FLAG "${HARDENING_FLAG} -fstack-protector-strong")
 		ENDIF()
 	ENDIF()

-	SET(HARDENING_FLAG "${HARDENING_FLAG} -fpie" CACHE STRING "" FORCE)
+	SET(HARDENING_FLAG "${HARDENING_FLAG} -fpie")
 	IF(CMAKE_C_COMPILER_ID STREQUAL GNU)
-		SET(HARDENING_FLAG "${HARDENING_FLAG} -pie" CACHE STRING "" FORCE)
+		SET(HARDENING_FLAG "${HARDENING_FLAG} -pie")
 	ENDIF()

 	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAG}")


Start working on the next release

Start working on the next release

--- conf/RTFVersion.cmake
+++ conf/RTFVersion.cmake
@@ -8,8 +8,8 @@
 ## manually increase tweak number when required. Set to zero when
 # bumping VERSION_PATCH
 set(RTF_VERSION_MAJOR "1")
-set(RTF_VERSION_MINOR "0")
-set(RTF_VERSION_PATCH "1")
+set(RTF_VERSION_MINOR "1")
+set(RTF_VERSION_PATCH "0")
 set(RTF_VERSION_TWEAK "0")
 set(RTF_VERSION_STRING "")


Squashed 'cmake/' changes from 2fabb10..57838ad

57838ad Adding quote to CFlags of pkg-config to handle correctly space in paths
f441ffb Merge pull request #87 from bchretien/topic/fix-eigen-cmake
97a5a93 eigen.cmake: fix Eigen dependency in generated .pc

git-subtree-dir: cmake
git-subtree-split: 57838adc2c73410b4b2c9af39c014e640fbbac7b

--- eigen.cmake
+++ eigen.cmake
@@ -29,15 +29,16 @@
   ELSEIF(NOT Eigen_REQUIRED)
     SET(Eigen_REQUIRED "eigen3 >= 3.0.0")
   ENDIF()
-
+
   # looking for .pc
   PKG_CHECK_MODULES(_Eigen ${Eigen_REQUIRED})
-
+
   IF(${_Eigen_FOUND})
     SET(${PROJECT_NAME}_CXX_FLAGS "${${PROJECT_NAME}_CXX_FLAGS} ${_Eigen_CFLAGS_OTHER}")
     SET(${PROJECT_NAME}_LINK_FLAGS "${${PROJECT_NAME}_LINK_FLAGS} ${_Eigen_LDFLAGS_OTHER}")
-
+
     INCLUDE_DIRECTORIES(SYSTEM ${_Eigen_INCLUDE_DIRS} )
+    _ADD_TO_LIST(_PKG_CONFIG_REQUIRES "${Eigen_REQUIRED}" ",")
   ELSE()
     # fallback: search for the signature_of_eigen3_matrix_library file
     FIND_PATH(Eigen_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library
@@ -46,5 +47,6 @@
       PATH_SUFFIXES eigen3 eigen
     )
     INCLUDE_DIRECTORIES(SYSTEM ${Eigen_INCLUDE_DIR})
+    PKG_CONFIG_APPEND_CFLAGS(-I"${Eigen_INCLUDE_DIR}")
   ENDIF()
 ENDMACRO(SEARCH_FOR_EIGEN)


Bug 536 - Freetype 2.4.10

Bug 536 - Freetype 2.4.10

--HG--
branch : v1-8

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Fix path for additional freetype header

Fix path for additional freetype header

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -34,7 +34,7 @@
 message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")

 find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
-find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS})
+find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS}  PATH_SUFFIXES freetype2)
 find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
 find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
 make_library_set(FREETYPE_LIBRARY)


(split) BUG: Visual Studio specific fixes

BUG: Location of FLTK_DIR was incorrect

BUG: Need to undef max

ENH: Remove using namespace itk
In general we discourage the "using namespace itk" directive. This
does cause trouble on some Visual Studio builds.

BUG: SNAP test now uses IdentifierType for NumberOfIterations..

Change-Id: I7c640541792a02e7eac343f51acbd89fb5098e19

--- External-FLTK.cmake
+++ External-FLTK.cmake
@@ -28,5 +28,10 @@
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/FLTK-install
 )

-set(FLTK_DIR ${CMAKE_BINARY_DIR}/FLTK-install/lib/FLTK-1.3)
+if (WIN32)
+  set(FLTK_DIR ${CMAKE_BINARY_DIR}/FLTK-install/CMake)
+else()
+  set(FLTK_DIR ${CMAKE_BINARY_DIR}/FLTK-install/lib/FLTK-1.3)
+endif()
+
 set(FLUID_COMMAND ${CMAKE_BINARY_DIR}/FLTK-install/bin/fluid)


set CPPUNIT_MIN_VERSION and CPPUNIT_INSTALLED_VERSION in case we find cppunit.

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

--- cmake/FindCppUnit.cmake
+++ cmake/FindCppUnit.cmake
@@ -5,7 +5,14 @@
 # CPPUNIT_INCLUDE_DIR - the libcppunit include directory
 # CPPUNIT_LIBRARIES - libcppunit library

-include(MacroEnsureVersion)
+include (MacroEnsureVersion)
+
+SET(CPPUNIT_MIN_VERSION 1.12.0)
+
+FIND_PROGRAM(CPPUNIT_CONFIG_EXECUTABLE cppunit-config PATHS
+    /usr/bin
+    /usr/local/bin
+)

 IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)

@@ -14,27 +21,21 @@

 ELSE(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)

-    FIND_PROGRAM(CPPUNIT_CONFIG_EXECUTABLE cppunit-config PATHS
-        /usr/bin
-        /usr/local/bin
-    )
-
     SET(CPPUNIT_INCLUDE_DIR)
     SET(CPPUNIT_LIBRARIES)
-    SET(CPPUNIT_MIN_VERSION 1.12.0)

     IF(CPPUNIT_CONFIG_EXECUTABLE)
         EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_CFLAGS)
-        EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --libs   RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_LIBRARIES)
-	EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version   RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
+        EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_LIBRARIES)
+        EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
         STRING(REGEX REPLACE "-I(.+)" "\\1" CPPUNIT_CFLAGS "${CPPUNIT_CFLAGS}")
     ELSE(CPPUNIT_CONFIG_EXECUTABLE)
         # in case win32 needs to find it the old way?
         FIND_PATH(CPPUNIT_CFLAGS cppunit/TestRunner.h PATHS /usr/include /usr/local/include )
         FIND_LIBRARY(CPPUNIT_LIBRARIES NAMES cppunit PATHS /usr/lib /usr/local/lib )
-	# how can we find cppunit version?
-	message ("ensure you cppunit installed version is at least ${CPPUNIT_MIN_VERSION}")
-	SET (CPPUNIT_INSTALLED_VERSION ${CPPUNIT_MIN_VERSION})
+        # how can we find cppunit version?
+        message ("ensure you cppunit installed version is at least ${CPPUNIT_MIN_VERSION}")
+        SET (CPPUNIT_INSTALLED_VERSION ${CPPUNIT_MIN_VERSION})
     ENDIF(CPPUNIT_CONFIG_EXECUTABLE)

     SET(CPPUNIT_INCLUDE_DIR ${CPPUNIT_CFLAGS} "${CPPUNIT_CFLAGS}/cppunit")
@@ -44,24 +45,34 @@
 # IF(CPPUNIT_INCLUDE_DIR)
 #     message (STATUS "found cppunit include dir: ${CPPUNIT_INCLUDE_DIR}")
 # ENDIF (CPPUNIT_INCLUDE_DIR)
-#
+#
 # IF(CPPUNIT_LIBRARIES)
 #     message (STATUS "found cppunit libraries: ${CPPUNIT_LIBRARIES}")
 # ENDIF (CPPUNIT_LIBRARIES)

 IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
+
   SET(CppUnit_FOUND TRUE)
+
   if(NOT CppUnit_FIND_QUIETLY)
    message(STATUS "Found cppunit: ${CPPUNIT_LIBRARIES}")
   endif(NOT CppUnit_FIND_QUIETLY)
-
-  MACRO_ENSURE_VERSION ("${CPPUNIT_MIN_VERSION}" ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK)
+
+  IF(CPPUNIT_CONFIG_EXECUTABLE)
+    EXEC_PROGRAM(${CPPUNIT_CONFIG_EXECUTABLE} ARGS --version RETURN_VALUE _return_VALUE OUTPUT_VARIABLE CPPUNIT_INSTALLED_VERSION)
+  ENDIF(CPPUNIT_CONFIG_EXECUTABLE)
+
+  macro_ensure_version( ${CPPUNIT_MIN_VERSION} ${CPPUNIT_INSTALLED_VERSION} CPPUNIT_INSTALLED_VERSION_OK )
+
   if (NOT CPPUNIT_INSTALLED_VERSION_OK)
    message ("CppUnit version is too old: found ${CPPUNIT_INSTALLED_VERSION} installed, ${CPPUNIT_MIN_VERSION} or major is required")
    SET(CppUnit_FOUND FALSE)
   endif (NOT CPPUNIT_INSTALLED_VERSION_OK)
+
 ELSE(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
+
   SET(CppUnit_FOUND FALSE CACHE BOOL "Not found cppunit library")
+
 ENDIF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)

 MARK_AS_ADVANCED(CPPUNIT_INCLUDE_DIR CPPUNIT_LIBRARIES)


FindUmfPack: add AMD and COLAMD libraries only if they are found

--HG--
extra : convert_revision : svn%3A283d02a7-25f6-0310-bc7c-ecb5cbfe19da/trunk/kdesupport/eigen2%40917303

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -28,8 +28,8 @@
     find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
     if (AMD_LIBRARY)
       set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${AMD_LIBRARY})
-    else (AMD_LIBRARY)
-      set(UMFPACK_LIBRARIES FALSE)
+    #else (AMD_LIBRARY)
+    #  set(UMFPACK_LIBRARIES FALSE)
     endif (AMD_LIBRARY)

   endif(UMFPACK_LIBRARIES)
@@ -39,8 +39,8 @@
     find_library(COLAMD_LIBRARY colamd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
     if (COLAMD_LIBRARY)
       set(UMFPACK_LIBRARIES ${UMFPACK_LIBRARIES} ${COLAMD_LIBRARY})
-    else (COLAMD_LIBRARY)
-      set(UMFPACK_LIBRARIES FALSE)
+    #else (COLAMD_LIBRARY)
+    #  set(UMFPACK_LIBRARIES FALSE)
     endif (COLAMD_LIBRARY)

   endif(UMFPACK_LIBRARIES)


cmake: uses the new Git_sync_with_repo function to attempt fetching the OpenCL C++ headers

--- cmake/SetupOpenCL.cmake
+++ cmake/SetupOpenCL.cmake
@@ -29,11 +29,12 @@
         set( SIXTRACKL_OPENCL_VERSION_STR "" )
     endif()

-    if( SIXTRACKL_ENABLE_OPENCL AND NOT OpenCL_FOUND )
-        find_package( OpenCL REQUIRED )
+    if( SIXTRACKL_ENABLE_OPENCL )
+        if( NOT OpenCL_FOUND )
+            find_package( OpenCL REQUIRED )
+        endif()

         if( OpenCL_FOUND )
-
             set( SIXTRACKL_OPENCL_LIBRARY
                ${SIXTRACKL_OPENCL_LIBRARY} ${OpenCL_LIBRARY} )

@@ -49,45 +50,136 @@
                 set( CXX_OPENCL_HEADER_NAME "cl.hpp" )
             endif()

-            set( CXX_OPENCL_HEADER
-                 "${OpenCL_INCLUDE_DIR}/CL/${CXX_OPENCL_HEADER_NAME}" )
+            set( CXX_OPENCL_HEADER "${OpenCL_INCLUDE_DIR}/CL/${CXX_OPENCL_HEADER_NAME}" )

             if( NOT EXISTS ${CXX_OPENCL_HEADER} )
-                set( MSG "---- -- Unable to find OpenCL 1.x C++ header " )
-                message( STATUS "${MSG} ${CXX_OPENCL_HEADER}" )
+                message( STATUS "------ Unable to find OpenCl 1.x C++ header" )

-                set( EXT_OCLCXX_DIR "${CMAKE_BINARY_DIR}/ext_opencl_clhpp" )
-                set( CONTRIBUTED_CXX_HEADER
-                     "${EXT_OCLCXX_DIR}/CL/${CXX_OPENCL_HEADER_NAME}" )
+                include( SetupGit )
+                include( SetupPython )

-                if( EXISTS ${CONTRIBUTED_CXX_HEADER} )
-                    set( MSG "---- -- Reuse existing externally contributed " )
-                    set( MSG "${MSG} header ${CONTRIBUTED_CXX_HEADER}" )
-                    message( STATUS ${MSG} )
+                if( Git_FOUND )
+                    message( STATUS "------ Attempt to download headers ... " )
+                    set( khr_cxx_ocl_GIT_REPOSITORY https://github.com/KhronosGroup/OpenCL-CLHPP.git )
+                    set( khr_cxx_ocl_GIT_BRANCH master )
+                    set( khr_cxx_ocl_EXT_DIR "${CMAKE_SOURCE_DIR}/external/CL" )

-                    set( CXX_OPENCL_HEADER ${CONTRIBUTED_CXX_HEADER} )
+                    Git_sync_with_repo( TARGET khr_cxx_ocl
+                        GIT_REPOSITORY ${khr_cxx_ocl_GIT_REPOSITORY}
+                        GIT_BRANCH ${khr_cxx_ocl_GIT_BRANCH} )

-                elseif( NOT SIXTRACK_REQUIRE_OFFLINE_BUILD )
-                    if( NOT SIXTRACKL_USE_LEGACY_CL_HPP )
-                        include( SetupOpenCLFetchOpenCL2CxxHeaders )
-                    else()
-                        include( SetupOpenCLFetchOpenCLCxxHeaders )
+                    if( NOT khr_cxx_ocl_DIR )
+                        message( FATAL_ERROR "------ Unable to fetch C++ OpenCL headers from git repository" )
                     endif()

-                    if( EXISTS ${CONTRIBUTED_CXX_HEADER} )
-                        set( MSG "---- -- successfully provisioned header at" )
-                        message( STATUS "${MSG} ${CONTRIBUTED_CXX_HEADER}" )
+                    if( ${khr_cxx_ocl_SYNC} EQUAL 1 )
+                        if( ${khr_cxx_ocl_UPDATED} EQUAL 0 )
+                            message( STATUS "------ C++ OpenCL headers already sync, no update for embedded library" )
+                        elseif( ${khr_cxx_ocl_UPDATED} EQUAL 1 )
+                            message( STATUS "------ C++ OpenCL headers successfully cloned/pulled from ${khr_cxx_ocl_GIT_REPOSITORY}/${khr_cxx_ocl_GIT_BRANCH}" )
+                            message( STATUS "------ Attempting to update the embedded library at ${khr_cxx_ocl_EXT_DIR} ..." )

-                        set( CXX_OPENCL_HEADER ${CONTRIBUTED_CXX_HEADER} )
+                            set( khr_cxx_ocl_TRANSFERRED_HEADER_FILES 0 )
+                            if( EXISTS "${khr_cxx_ocl_DIR}/LICENSE.txt" )
+                                configure_file( "${khr_cxx_ocl_DIR}/LICENSE.txt"
+                                                "${khr_cxx_ocl_EXT_DIR}/LICENSE.txt" COPYONLY )
+                            endif()
+
+                            if( EXISTS "${khr_cxx_ocl_DIR}/README.md" )
+                                configure_file( "${khr_cxx_ocl_DIR}/README.md"
+                                                "${khr_cxx_ocl_EXT_DIR}/khr_cxx_ocl_README.md" COPYONLY )
+                            endif()
+
+                            if( EXISTS "${khr_cxx_ocl_DIR}/CODE_OF_CONDUCT.md" )
+                                configure_file( "${khr_cxx_ocl_DIR}/CODE_OF_CONDUCT.md"
+                                                "${khr_cxx_ocl_EXT_DIR}/CODE_OF_CONDUCT.md" COPYONLY )
+                            endif()
+
+                            if( EXISTS "${khr_cxx_ocl_DIR}/include/CL/cl2.hpp" )
+                                configure_file( "${khr_cxx_ocl_DIR}/include/CL/cl2.hpp"
+                                                "${khr_cxx_ocl_EXT_DIR}/cl2.hpp" COPYONLY )
+                                set( khr_cxx_ocl_TRANSFERRED_HEADER_FILES 1 )
+                            else()
+                                message( WARNING "------ No CL/cl2.hpp header found inside ${khr_cxx_ocl_DIR}/include -> skipping!" )
+                            endif()
+
+                            if( PYTHONINTERP_FOUND
+                                AND EXISTS "${khr_cxx_ocl_DIR}/gen_cl_hpp.py"
+                                AND EXISTS "${khr_cxx_ocl_DIR}/input_cl.hpp" )
+
+                                execute_process( COMMAND ${PYTHON_EXECUTABLE} gen_cl_hpp.py
+                                    WORKING_DIRECTORY ${khr_cxx_ocl_DIR}
+                                    OUTPUT_VARIABLE EXE_PROCESS_OUTPUT
+                                    RESULT_VARIABLE EXE_PROCESS_RESULT
+                                    ERROR_VARIABLE  EXE_PROCESS_ERROR )
+
+                                if( NOT ( ${EXE_PROCESS_RESULT} EQUAL 0 ) AND EXE_PROCESS_OUTPUT )
+                                    message( STATUS "------ Error python gen_cl_hpp.py: ${EXE_PROCESS_ERROR}" )
+                                endif()
+
+                                if( EXISTS "${khr_cxx_ocl_DIR}/cl.hpp" )
+                                    configure_file( "${khr_cxx_ocl_DIR}/cl.hpp"
+                                                    "${khr_cxx_ocl_EXT_DIR}/cl.hpp" COPYONLY )
+                                    set( khr_cxx_ocl_TRANSFERRED_HEADER_FILES 1 )
+                                else()
+                                    message( WARNING "------ No cl.hpp file present to add to ${khr_cxx_ocl_EXT_DIR} -> skipping!" )
+                                endif()
+
+                            else()
+                                message( WARNING "------ Unable to run generator script gen_cl_hpp.py to create cl.hpp -> skipping!" )
+                            endif()
+
+                            if( ${khr_cxx_ocl_TRANSFERRED_HEADER_FILES} EQUAL 1 )
+                                message( STATUS "------ transfered header files to ${khr_cxx_ocl_EXT_DIR}" )
+                            endif()
+                        else()
+                            message( FATAL_ERROR "------ internal error Git_sync_with_repo" )
+                        endif()
+                    else()
+                        message( WARNING "----- Unable to sync external OpenCL C++ headers -> rely on existing headers instead" )
                     endif()
+                endif()
+
+                if( EXISTS "${CMAKE_SOURCE_DIR}/external/CL" )
+                    set( CXX_OPENCL_HEADER "${CMAKE_SOURCE_DIR}/external/CL/${CXX_OPENCL_HEADER_NAME}" )
+                    set( SIXTRACKL_OPENCL_INCLUDE_DIR ${SIXTRACKL_OPENCL_INCLUDE_DIR}
+                        "${CMAKE_SOURCE_DIR}/external" )
                 endif()
             endif()

-            if( NOT EXISTS ${CXX_OPENCL_HEADER} )
-                set( FAIL_MSG "---- -- Please install the OpenCL 1.x c++" )
-                set( FAIL_MSG "${FAIL_MSG} wrapper header " )
-                set( FAIL_MSG "${FAIL_MSG} ${CXX_OPENCL_HEADER}" )
-                message( FATAL_ERROR ${FAIL_MSG} )
+            if( EXISTS ${CXX_OPENCL_HEADER} )
+                set( SIXTRL_OPENCL_ENABLE_EXCEPTION_STR "" )
+                set( SIXTRL_OPENCL_ENABLES_EXCEPTION_FLAG 0 )
+
+                if( SIXTRACKL_USE_LEGACY_CL_HPP )
+                    set( SIXTRL_OPENCL_CL_HPP "CL/cl.hpp" )
+                    set( SIXTRL_USES_CL2_HPP 0 )
+                    set( SIXTRL_USES_CL_HPP  1 )
+
+                    if( SIXTRL_OPENCL_ENABLE_HOST_EXCEPTIONS )
+                        set( SIXTRL_OPENCL_ENABLES_EXCEPTION_FLAG 1 )
+                        string( APPEND SIXTRL_OPENCL_ENABLE_EXCEPTION_STR
+                                "    #if !defined( __CL_ENABLE_EXCEPTIONS )\r\n" )
+                        string( APPEND SIXTRL_OPENCL_ENABLE_EXCEPTION_STR
+                                "        #define __CL_ENABLE_EXCEPTIONS  \r\n" )
+                        string( APPEND SIXTRL_OPENCL_ENABLE_EXCEPTION_STR
+                                "    #endif /* !defined( __CL_ENABLE_EXCEPTIONS ) */ \r\n" )
+                    endif()
+                else()
+                    set( SIXTRL_OPENCL_CL_HPP "CL/cl2.hpp" )
+                    set( SIXTRL_USES_CL2_HPP 1 )
+                    set( SIXTRL_USES_CL_HPP  0 )
+
+                    if( SIXTRACKL_OPENCL_CXX_ENABLE_EXCEPTIONS )
+                        set( SIXTRL_OPENCL_ENABLES_EXCEPTION_FLAG 1 )
+                        string( APPEND SIXTRL_OPENCL_ENABLE_EXCEPTION_STR
+                                "    #if !defined( CL_HPP_ENABLE_EXCEPTIONS )\r\n" )
+                        string( APPEND SIXTRL_OPENCL_ENABLE_EXCEPTION_STR
+                                "        #define CL_HPP_ENABLE_EXCEPTIONS \r\n" )
+                        string( APPEND SIXTRL_OPENCL_ENABLE_EXCEPTION_STR
+                                "    #endif /* !defined( CL_HPP_ENABLE_EXCEPTIONS ) */ \r\n" )
+                    endif()
+                endif()
             endif()
         endif()
     endif()


use -std=gnu11 and -std=c++14 for C and C++ flags for all STM32F4 projects.

--- cmake/gcc_stm32f4.cmake
+++ cmake/gcc_stm32f4.cmake
@@ -1,5 +1,5 @@
-SET(CMAKE_C_FLAGS "-mthumb -fno-builtin -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wall -std=gnu99 -ffunction-sections -fdata-sections -fomit-frame-pointer -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize" CACHE INTERNAL "c compiler flags")
-SET(CMAKE_CXX_FLAGS "-mthumb -fno-builtin -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wall -std=c++11 -ffunction-sections -fdata-sections -fomit-frame-pointer -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize" CACHE INTERNAL "cxx compiler flags")
+SET(CMAKE_C_FLAGS "-mthumb -fno-builtin -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wall -std=gnu11 -ffunction-sections -fdata-sections -fomit-frame-pointer -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize" CACHE INTERNAL "c compiler flags")
+SET(CMAKE_CXX_FLAGS "-mthumb -fno-builtin -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -Wall -std=c++14 -ffunction-sections -fdata-sections -fomit-frame-pointer -mabi=aapcs -fno-unroll-loops -ffast-math -ftree-vectorize" CACHE INTERNAL "cxx compiler flags")
 SET(CMAKE_ASM_FLAGS "-mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")

 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp -mabi=aapcs" CACHE INTERNAL "executable linker flags")


Link dynamic gcw.so to plplotgnome2${LIB_TAG} target.  This solved the
segfault that was occurring with this device.

Simplify compile and link flags to follow autotools build system model.
Seems to work fine.

svn path=/trunk/; revision=6848

--- cmake/modules/gcw.cmake
+++ cmake/modules/gcw.cmake
@@ -40,14 +40,20 @@
   else(ENABLE_python)
     set(ENABLE_pygcw OFF)
   endif(ENABLE_python)
-  pkgconfig(libgnomeui-2.0 includedir libdir linkflags cflags)
-  if(linkflags AND cflags)
+# linkflags and cflags ignored because not used in autotools side and
+# there is a question whether all that ton of extra potentially interfering
+# libraries might be causing a segfault that is observed for the
+# dynamic devices case.
+#  pkgconfig(libgnomeui-2.0 includedir libdir linkflags cflags)
+#  if(linkflags AND cflags)
     pkgconfig(libgnomeprintui-2.2 includedir libdir linkflags1 cflags1)
     if(linkflags1 AND cflags1)
       # N.B. pkgconfig returns blank-delimited strings so must concatanate
       # results the same way.
-      set(gcw_COMPILE_FLAGS "${cflags} ${cflags1}")
-      set(gcw_LINK_FLAGS "${linkflags} ${linkflags1}")
+      #set(gcw_COMPILE_FLAGS "${cflags} ${cflags1}")
+      #set(gcw_LINK_FLAGS "${linkflags} ${linkflags1}")
+      set(gcw_COMPILE_FLAGS "${cflags1}")
+      set(gcw_LINK_FLAGS "${linkflags1}")
     else(linkflags1 AND cflags1)
       message(STATUS "WARNING: because libgnomeprintui-2.2 not found "
       "setting PLD_gcw and ENABLE_pygcw to OFF"
@@ -55,13 +61,13 @@
       set(PLD_gcw OFF CACHE BOOL "enable gcw device" FORCE)
       set(ENABLE_pygcw OFF)
     endif(linkflags1 AND cflags1)
-  else(linkflags AND cflags)
-    message(STATUS "WARNING: because libgnomeui-2.0 not found "
-    "setting PLD_gcw and ENABLE_pygcw to OFF"
-    )
-    set(PLD_gcw OFF CACHE BOOL "enable gcw device" FORCE)
-    set(ENABLE_pygcw OFF)
-  endif(linkflags AND cflags)
+#  else(linkflags AND cflags)
+#    message(STATUS "WARNING: because libgnomeui-2.0 not found "
+#    "setting PLD_gcw and ENABLE_pygcw to OFF"
+#    )
+#    set(PLD_gcw OFF CACHE BOOL "enable gcw device" FORCE)
+#    set(ENABLE_pygcw OFF)
+#  endif(linkflags AND cflags)
 endif(PLD_gcw)
 if(PLD_gcw)
 #  Check for gthread-2.0 done in cf/gcw.ac, but result not actually used
@@ -91,6 +97,7 @@
     set(gcw_SOURCE
     ${CMAKE_SOURCE_DIR}/drivers/plplotcanvas-hacktext.c
     )
+    set(gcw_LINK_FLAGS ${gcw_LINK_FLAGS} plplotgnome2${LIB_TAG})
   else(ENABLE_DYNDRIVERS)
     set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${gcw_LINK_FLAGS})
     set(gcw_SOURCE


PROTON-1397: bump the so version to 11 on master for 0.18.0

--- proton-c/soversion.cmake
+++ proton-c/soversion.cmake
@@ -1,2 +1,2 @@
-set (PN_LIB_SOMAJOR 10)
+set (PN_LIB_SOMAJOR 11)
 set (PN_LIB_SOMINOR "0.0")


CMake: Added ability of Windows builds to include protobuf headers.

Review: https://reviews.apache.org/r/39076

--- 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ 3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -57,13 +57,14 @@
 set(LIBEV_INCLUDE_DIR       ${LIBEV_ROOT})
 set(LIBEVENT_INCLUDE_DIR    ${LIBEVENT_LIB_ROOT}/include)
 set(PICOJSON_INCLUDE_DIR    ${PICOJSON_ROOT})
-set(PROTOBUF_INCLUDE_DIR    ${PROTOBUF_LIB_ROOT}/include)

 if (WIN32)
-  set(CURL_INCLUDE_DIR ${CURL_ROOT}/include)
-  set(GLOG_INCLUDE_DIR ${GLOG_ROOT}/src/windows)
+  set(CURL_INCLUDE_DIR     ${CURL_ROOT}/include)
+  set(GLOG_INCLUDE_DIR     ${GLOG_ROOT}/src/windows)
+  set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_ROOT}/src)
 else (WIN32)
-  set(GLOG_INCLUDE_DIR ${GLOG_LIB_ROOT}/include)
+  set(GLOG_INCLUDE_DIR     ${GLOG_LIB_ROOT}/include)
+  set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_LIB_ROOT}/include)
 endif (WIN32)

 # Convenience variables for `lib` directories of built third-party dependencies.
@@ -73,8 +74,8 @@

 if (WIN32)
   set(CURL_LIB_DIR     ${CURL_ROOT}/lib)
-  set(GLOG_LIB_DIR     ${GLOG_ROOT}/Debug)
-  set(PROTOBUF_LIB_DIR ${PROTOBUF_ROOT}/vsprojects/Debug)
+  set(GLOG_LIB_DIR     ${GLOG_ROOT}/${CMAKE_BUILD_TYPE})
+  set(PROTOBUF_LIB_DIR ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
 else (WIN32)
   set(GLOG_LIB_DIR     ${GLOG_LIB_ROOT}/lib)
   set(PROTOBUF_LIB_DIR ${PROTOBUF_LIB_ROOT}/lib)
@@ -101,7 +102,11 @@
 endif (WIN32)

 # Convenience variable for `protoc`, the Protobuf compiler.
-set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
+if (NOT WIN32)
+  set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
+else (NOT WIN32)
+  set(PROTOC ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE}/protoc.exe)
+endif (NOT WIN32)

 # Configure the process library, the last of our third-party libraries.
 #######################################################################


Update FindBoost.cmake to support Boost 1.67.0 (#489)

--- cmake/FindBoost.cmake
+++ cmake/FindBoost.cmake
@@ -10,9 +10,12 @@
 # Use this module by invoking find_package with the form::
 #
 #   find_package(Boost
-#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.36.0
+#     [version] [EXACT]      # Minimum or EXACT version e.g. 1.67.0
 #     [REQUIRED]             # Fail with error if Boost is not found
 #     [COMPONENTS <libs>...] # Boost libraries by their canonical name
+#                            # e.g. "date_time" for "libboost_date_time"
+#     [OPTIONAL_COMPONENTS <libs>...]
+#                            # Optional Boost libraries by their canonical name)
 #     )                      # e.g. "date_time" for "libboost_date_time"
 #
 # This module finds headers and requested component libraries OR a CMake
@@ -36,6 +39,15 @@
 #                          - Pass to add_definitions() to have diagnostic
 #                            information about Boost's automatic linking
 #                            displayed during compilation
+#
+# Note that Boost Python components require a Python version suffix
+# (Boost 1.67 and later), e.g. ``python36`` or ``python27`` for the
+# versions built against Python 3.6 and 2.7, respectively.  This also
+# applies to additional components using Python including
+# ``mpi_python`` and ``numpy``.  Earlier Boost releases may use
+# distribution-specific suffixes such as ``2``, ``3`` or ``2.7``.
+# These may also be used as suffixes, but note that they are not
+# portable.
 #
 # This module reads hints about search locations from variables::
 #
@@ -153,7 +165,7 @@
 #   Boost_REALPATH           - Set to ON to resolve symlinks for discovered
 #                              libraries to assist with packaging.  For example,
 #                              the "system" component library may be resolved to
-#                              "/usr/lib/libboost_system.so.1.42.0" instead of
+#                              "/usr/lib/libboost_system.so.1.67.0" instead of
 #                              "/usr/lib/libboost_system.so".  This does not
 #                              affect linking and should not be enabled unless
 #                              the user needs this information.
@@ -187,6 +199,13 @@
 #   target_link_libraries(foo Boost::date_time Boost::filesystem
 #                             Boost::iostreams)
 #
+# Example to find Boost Python 3.6 libraries and use imported targets::
+#
+#   find_package(Boost 1.67 REQUIRED COMPONENTS
+#                python36 numpy36)
+#   add_executable(foo foo.cc)
+#   target_link_libraries(foo Boost::python36 Boost::numpy36)
+#
 # Example to find Boost headers and some *static* (release only) libraries::
 #
 #   set(Boost_USE_STATIC_LIBS        ON)  # only find static libs
@@ -194,7 +213,7 @@
 #   set(Boost_USE_RELEASE_LIBS       ON)  # only find release libs
 #   set(Boost_USE_MULTITHREADED      ON)
 #   set(Boost_USE_STATIC_RUNTIME    OFF)
-#   find_package(Boost 1.36.0 COMPONENTS date_time filesystem system ...)
+#   find_package(Boost 1.66.0 COMPONENTS date_time filesystem system ...)
 #   if(Boost_FOUND)
 #     include_directories(${Boost_INCLUDE_DIRS})
 #     add_executable(foo foo.cc)
@@ -439,20 +458,10 @@
   elseif (GHSMULTI)
     set(_boost_COMPILER "-ghs")
   elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
+    if(MSVC_TOOLSET_VERSION GREATER_EQUAL 141)
       set(_boost_COMPILER "-vc141;-vc140")
-    elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
-      set(_boost_COMPILER "-vc140")
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
-      set(_boost_COMPILER "-vc120")
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
-      set(_boost_COMPILER "-vc110")
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
-      set(_boost_COMPILER "-vc100")
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
-      set(_boost_COMPILER "-vc90")
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
-      set(_boost_COMPILER "-vc80")
+    elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 80)
+      set(_boost_COMPILER "-vc${MSVC_TOOLSET_VERSION}")
     elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.10)
       set(_boost_COMPILER "-vc71")
     elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # Good luck!
@@ -556,6 +565,13 @@
   # required only if the BoostScanDeps.cmake script logic is changed.
   # The addition of a new release should only require it to be run
   # against the new release.
+
+  # Handle Python version suffixes
+  if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
+    set(component "${CMAKE_MATCH_1}")
+    set(component_python_version "${CMAKE_MATCH_2}")
+  endif()
+
   set(_Boost_IMPORTED_TARGETS TRUE)
   if(Boost_VERSION VERSION_LESS 103300)
     message(WARNING "Imported targets and dependency information not available for Boost version ${Boost_VERSION} (all versions older than 1.33)")
@@ -569,7 +585,7 @@
     set(_Boost_FILESYSTEM_DEPENDENCIES system)
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
   elseif(NOT Boost_VERSION VERSION_LESS 103600 AND Boost_VERSION VERSION_LESS 103800)
@@ -577,7 +593,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_WAVE_DEPENDENCIES filesystem system thread)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
   elseif(NOT Boost_VERSION VERSION_LESS 103800 AND Boost_VERSION VERSION_LESS 104300)
@@ -585,7 +601,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES date_time)
     set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
@@ -594,7 +610,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES date_time)
     set(_Boost_WAVE_DEPENDENCIES filesystem system thread date_time)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
@@ -603,7 +619,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random serialization)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES date_time)
     set(_Boost_WAVE_DEPENDENCIES serialization filesystem system thread date_time)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
@@ -612,7 +628,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES date_time)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
@@ -622,7 +638,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES date_time)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
@@ -632,7 +648,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES date_time)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread date_time)
@@ -643,7 +659,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
@@ -655,7 +671,7 @@
     set(_Boost_IOSTREAMS_DEPENDENCIES regex)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time)
@@ -668,7 +684,7 @@
     set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
@@ -681,7 +697,7 @@
     set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l regex random)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
@@ -694,7 +710,7 @@
     set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_RANDOM_DEPENDENCIES system)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
@@ -708,7 +724,7 @@
     set(_Boost_LOG_DEPENDENCIES log_setup date_time system filesystem thread regex chrono atomic)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_RANDOM_DEPENDENCIES system)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
@@ -722,7 +738,7 @@
     set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_RANDOM_DEPENDENCIES system)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_TIMER_DEPENDENCIES chrono system)
@@ -737,7 +753,7 @@
     set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_RANDOM_DEPENDENCIES system)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
@@ -752,7 +768,7 @@
     set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_RANDOM_DEPENDENCIES system)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
@@ -768,13 +784,30 @@
     set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
     set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
     set(_Boost_MPI_DEPENDENCIES serialization)
-    set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
     set(_Boost_RANDOM_DEPENDENCIES system)
     set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
     set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
     set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
+  elseif(NOT Boost_VERSION VERSION_LESS 106500 AND Boost_VERSION VERSION_LESS 106700)
+    set(_Boost_CHRONO_DEPENDENCIES system)
+    set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
+    set(_Boost_COROUTINE_DEPENDENCIES context system)
+    set(_Boost_FIBER_DEPENDENCIES context thread chrono system date_time)
+    set(_Boost_FILESYSTEM_DEPENDENCIES system)
+    set(_Boost_IOSTREAMS_DEPENDENCIES regex)
+    set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
+    set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
+    set(_Boost_MPI_DEPENDENCIES serialization)
+    set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+    set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
+    set(_Boost_RANDOM_DEPENDENCIES system)
+    set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+    set(_Boost_TIMER_DEPENDENCIES chrono system)
+    set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
+    set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
   else()
-    if(NOT Boost_VERSION VERSION_LESS 106500)
+    if(NOT Boost_VERSION VERSION_LESS 106700)
       set(_Boost_CHRONO_DEPENDENCIES system)
       set(_Boost_CONTEXT_DEPENDENCIES thread chrono system date_time)
       set(_Boost_COROUTINE_DEPENDENCIES context system)
@@ -784,14 +817,15 @@
       set(_Boost_LOG_DEPENDENCIES date_time log_setup system filesystem thread regex chrono atomic)
       set(_Boost_MATH_DEPENDENCIES math_c99 math_c99f math_c99l math_tr1 math_tr1f math_tr1l atomic)
       set(_Boost_MPI_DEPENDENCIES serialization)
-      set(_Boost_MPI_PYTHON_DEPENDENCIES python mpi serialization)
-      set(_Boost_NUMPY_DEPENDENCIES python)
+      set(_Boost_MPI_PYTHON_DEPENDENCIES python${component_python_version} mpi serialization)
+      set(_Boost_NUMPY_DEPENDENCIES python${component_python_version})
       set(_Boost_RANDOM_DEPENDENCIES system)
       set(_Boost_THREAD_DEPENDENCIES chrono system date_time atomic)
+      set(_Boost_TIMER_DEPENDENCIES chrono system)
       set(_Boost_WAVE_DEPENDENCIES filesystem system serialization thread chrono date_time atomic)
       set(_Boost_WSERIALIZATION_DEPENDENCIES serialization)
     endif()
-    if(NOT Boost_VERSION VERSION_LESS 106700)
+    if(NOT Boost_VERSION VERSION_LESS 106800)
       message(WARNING "New Boost version may have incorrect or missing dependencies and imported targets")
     endif()
   endif()
@@ -817,6 +851,12 @@
 # _hdrs
 #
 function(_Boost_COMPONENT_HEADERS component _hdrs)
+  # Handle Python version suffixes
+  if(component MATCHES "^(python|mpi_python|numpy)([0-9][0-9]?|[0-9]\\.[0-9])\$")
+    set(component "${CMAKE_MATCH_1}")
+    set(component_python_version "${CMAKE_MATCH_2}")
+  endif()
+
   # Note: new boost components will require adding here.  The header
   # must be present in all versions of Boost providing a library.
   set(_Boost_ATOMIC_HEADERS              "boost/atomic.hpp")
@@ -959,21 +999,12 @@
     else()
       set(_arch_suffix 32)
     endif()
-    if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10)
+    if(MSVC_TOOLSET_VERSION GREATER_EQUAL 141)
       list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.1)
       list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
-      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0)
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
-      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-12.0)
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
-      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-11.0)
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
-      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-10.0)
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
-      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-9.0)
-    elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
-      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-8.0)
+    elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 80)
+      math(EXPR _toolset_major_version "${MSVC_TOOLSET_VERSION} / 10")
+      list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-${_toolset_major_version}.0)
     endif()
     set(${componentlibvar} ${${componentlibvar}} PARENT_SCOPE)
   endif()
@@ -1031,7 +1062,7 @@
   # _Boost_COMPONENT_HEADERS.  See the instructions at the top of
   # _Boost_COMPONENT_DEPENDENCIES.
   set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
-    "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
+    "1.67.0" "1.67" "1.66.0" "1.66" "1.65.1" "1.65.0" "1.65"
     "1.64.0" "1.64" "1.63.0" "1.63" "1.62.0" "1.62" "1.61.0" "1.61" "1.60.0" "1.60"
     "1.59.0" "1.59" "1.58.0" "1.58" "1.57.0" "1.57" "1.56.0" "1.56" "1.55.0" "1.55"
     "1.54.0" "1.54" "1.53.0" "1.53" "1.52.0" "1.52" "1.51.0" "1.51"
@@ -1610,7 +1641,44 @@
     endforeach()
   endif()

+  # Handle Python version suffixes
+  unset(COMPONENT_PYTHON_VERSION_MAJOR)
+  unset(COMPONENT_PYTHON_VERSION_MINOR)
+  if(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\$")
+    set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
+    set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
+  elseif(${COMPONENT} MATCHES "^(python|mpi_python|numpy)([0-9])\\.?([0-9])\$")
+    set(COMPONENT_UNVERSIONED "${CMAKE_MATCH_1}")
+    set(COMPONENT_PYTHON_VERSION_MAJOR "${CMAKE_MATCH_2}")
+    set(COMPONENT_PYTHON_VERSION_MINOR "${CMAKE_MATCH_3}")
+  endif()
+
+  unset(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
+  if (COMPONENT_PYTHON_VERSION_MINOR)
+    # Boost >= 1.67
+    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+    # Debian/Ubuntu (Some versions omit the 2 and/or 3 from the suffix)
+    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-py${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+    # Gentoo
+    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+    # RPMs
+    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}-${COMPONENT_PYTHON_VERSION_MAJOR}${COMPONENT_PYTHON_VERSION_MINOR}")
+  endif()
+  if (COMPONENT_PYTHON_VERSION_MAJOR AND NOT COMPONENT_PYTHON_VERSION_MINOR)
+    # Boost < 1.67
+    list(APPEND _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME "${COMPONENT_UNVERSIONED}${COMPONENT_PYTHON_VERSION_MAJOR}")
+  endif()
+
   # Consolidate and report component-specific hints.
+  if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
+    list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME)
+    if(Boost_DEBUG)
+      message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
+        "Component-specific library search names for ${COMPONENT_NAME}: "
+        "${_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME}")
+    endif()
+  endif()
   if(_Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
     list(REMOVE_DUPLICATES _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT)
     if(Boost_DEBUG)
@@ -1640,28 +1708,30 @@
   # Find RELEASE libraries
   #
   unset(_boost_RELEASE_NAMES)
-  foreach(compiler IN LISTS _boost_COMPILER)
-    list(APPEND _boost_RELEASE_NAMES
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
-  endforeach()
-  list(APPEND _boost_RELEASE_NAMES
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
-  if(_boost_STATIC_RUNTIME_WORKAROUND)
-    set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+  foreach(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
     foreach(compiler IN LISTS _boost_COMPILER)
       list(APPEND _boost_RELEASE_NAMES
-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG} )
     endforeach()
     list(APPEND _boost_RELEASE_NAMES
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
-  endif()
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component} )
+    if(_boost_STATIC_RUNTIME_WORKAROUND)
+      set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
+      foreach(compiler IN LISTS _boost_COMPILER)
+        list(APPEND _boost_RELEASE_NAMES
+          ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+          ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+      endforeach()
+      list(APPEND _boost_RELEASE_NAMES
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
+    endif()
+  endforeach()
   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
-     _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
+    _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
   endif()
   if(Boost_DEBUG)
     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
@@ -1690,27 +1760,29 @@
   # Find DEBUG libraries
   #
   unset(_boost_DEBUG_NAMES)
-  foreach(compiler IN LISTS _boost_COMPILER)
-    list(APPEND _boost_DEBUG_NAMES
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
-  endforeach()
-  list(APPEND _boost_DEBUG_NAMES
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}
-    ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT} )
-  if(_boost_STATIC_RUNTIME_WORKAROUND)
-    set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+  foreach(component IN LISTS _Boost_FIND_LIBRARY_HINTS_FOR_COMPONENT_NAME COMPONENT)
     foreach(compiler IN LISTS _boost_COMPILER)
       list(APPEND _boost_DEBUG_NAMES
-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG} )
     endforeach()
     list(APPEND _boost_DEBUG_NAMES
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
-  endif()
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}
+      ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component} )
+    if(_boost_STATIC_RUNTIME_WORKAROUND)
+      set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
+      foreach(compiler IN LISTS _boost_COMPILER)
+        list(APPEND _boost_DEBUG_NAMES
+          ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+          ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${compiler}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+      endforeach()
+      list(APPEND _boost_DEBUG_NAMES
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}${_boost_ARCHITECTURE_TAG}-${Boost_LIB_VERSION}
+        ${Boost_LIB_PREFIX}${Boost_NAMESPACE}_${component}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
+    endif()
+  endforeach()
   if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
      _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
   endif()
@@ -1777,10 +1849,9 @@
   set(_boost_CHECKED_COMPONENT FALSE)
   set(_Boost_MISSING_COMPONENTS "")
   foreach(COMPONENT ${Boost_FIND_COMPONENTS})
-    string(TOUPPER ${COMPONENT} COMPONENT)
+    string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
     set(_boost_CHECKED_COMPONENT TRUE)
-    if(NOT Boost_${COMPONENT}_FOUND)
-      string(TOLOWER ${COMPONENT} COMPONENT)
+    if(NOT Boost_${UPPERCOMPONENT}_FOUND AND Boost_FIND_REQUIRED_${COMPONENT})
       list(APPEND _Boost_MISSING_COMPONENTS ${COMPONENT})
     endif()
   endforeach()
@@ -2005,4 +2076,4 @@
   CACHE INTERNAL "Components requested for this build tree.")

 # Restore project's policies
-cmake_policy(POP)
+cmake_policy(POP)


fix find cairo

fix find cairo

--- cmake/FindCairo.cmake
+++ cmake/FindCairo.cmake
@@ -124,7 +124,7 @@
   )
 endif()

-if (Cairo_LIBRARY AND NOT TARGET Cairo::Cairo)
+if (NOT TARGET Cairo::Cairo)
     add_library(Cairo::Cairo UNKNOWN IMPORTED GLOBAL)
     set_target_properties(Cairo::Cairo PROPERTIES
         IMPORTED_LOCATION "${Cairo_LIBRARY_RELEASE}"


Update FindVuzix.cmake

Update FindVuzix.cmake

Fix build with a 64-bit CMake on Windows.

--- cmake/FindVuzix.cmake
+++ cmake/FindVuzix.cmake
@@ -65,10 +65,10 @@
 # http://www.boost.org/LICENSE_1_0.txt)

 set(Vuzix_ROOT_DIR
-	"${Vuzix_ROOT_DIR}"
-	CACHE
-	PATH
-	"Directory to search for Vuzix SDK")
+    "${Vuzix_ROOT_DIR}"
+    CACHE
+    PATH
+    "Directory to search for Vuzix SDK")

 if(WIN32)
     # Test 32/64 bits
@@ -80,12 +80,12 @@

     # Get desired program files directory
     set(_PF86_ENV "ProgramFiles(x86)")
-    set(_PF86 $ENV{${_PF86_ENV}})
-    if(NOT "$ENV{${_PF86}}" STREQUAL "")
-    # 32-bit dir: only set on win64
-        file(TO_CMAKE_PATH "$ENV{_PF86}" _progfiles)
+    set(_PF86 "$ENV{${_PF86_ENV}}")
+    if(NOT "${_PF86}" STREQUAL "")
+        # 32-bit dir: only set on win64
+        file(TO_CMAKE_PATH "${_PF86}" _progfiles)
     else()
-    # 32-bit dir on win32
+        # 32-bit dir on win32
         file(TO_CMAKE_PATH "$ENV{ProgramFiles}" _progfiles)
     endif()

@@ -123,8 +123,6 @@
         "${_progfiles}/Vuzix Corporation/VuzixSDK/"
         PATH_SUFFIXES
         ${Vuzix_LIBRARY_PATH_SUFFIX})
-
-

     find_path(Vuzix_INCLUDE_DIR
         NAMES


fix: adolc is now being searched in CMAKE_BINARY_DIR, not the current one.

--- cmake/Findadolc.cmake
+++ cmake/Findadolc.cmake
@@ -51,21 +51,21 @@

         execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
         RESULT_VARIABLE result
-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/adolc-download )
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/adolc-download )
         if(result)
         message(FATAL_ERROR "CMake step for adolc failed: ${result}")
         endif()

         execute_process(COMMAND ${CMAKE_COMMAND} --build .
         RESULT_VARIABLE result
-        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/adolc-download )
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/adolc-download )
         if(result)
         message(FATAL_ERROR "Build step for adolc failed: ${result}")
         endif()

         add_library(adolc SHARED IMPORTED)
-        target_include_directories(adolc INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/adolc-build/include/)
-        set_target_properties(adolc PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/adolc-build/lib64)
+        target_include_directories(adolc INTERFACE ${CMAKE_BINARY_DIR}/adolc-build/include/)
+        set_target_properties(adolc PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/adolc-build/lib64)

         set(CMAKE_CXX_FLAGS "-std=c++11")


Fix: add a hint for PackageManker and add forgotten configure_file

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@511 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -22,7 +22,8 @@
   list(APPEND PACKAGE_EXTENSION ".exe;")
 endif(EXISTS ${NSIS_PROGRAM})
 # dpkg
-find_program(PACKAGE_MAKER_PROGRAM PackageMaker)
+find_program(PACKAGE_MAKER_PROGRAM PackageMaker
+	    HINTS /Developer/Applications/Utilities)
 if(EXISTS ${PACKAGE_MAKER_PROGRAM})
   list(APPEND CPACK_GENERATOR "PackageMaker")
   list(APPEND PACKAGE_EXTENSION ".dmg;")
@@ -40,11 +41,13 @@
   cp *${ext_name} ../../")
     endforeach(ext)
   endif(${before_last} GREATER 0)
+
   #now configure all the 3rdpaty Makefile
   file(GLOB parties ${PCL_SOURCE_DIR}/3rdparty/*)
   foreach(party ${parties})
     if(EXISTS ${party}/Makefile.in)
       configure_file(${party}/Makefile.in ${party}/Makefile @ONLY)
+      configure_file(${party}/cpack.patch.in ${party}/cpack.patch @ONLY)
     endif(EXISTS ${party}/Makefile.in)
   endforeach(party)
 endif(nb_extensions GREATER 0)


COMP: Fix IOSTL Doxygen group and Windows shared build.

Change-Id: Idef2f73738dea7846ac78c303b14a744801cec80

--- Modules/Remote/IOSTL.remote.cmake
+++ Modules/Remote/IOSTL.remote.cmake
@@ -2,6 +2,6 @@
 itk_fetch_module(IOSTL
   "This module contains classes for reading and writing QuadEdgeMeshes using
   the STL (STereoLithography)file format. http://hdl.handle.net/10380/3452"
-  GIT_REPOSITORY https://github.com/luisibanez/ITKSTLMeshIO.git
-  GIT_TAG ebb492ceeb443b9b41845a5a7d48f3e317a37579
+  GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git
+  GIT_TAG 933359a5fd1bac792a3c0af5f4e05e291e153677
   )


Make public dependencies explicitly public

All uses of target_link_libraries with a target must be either all-keyword or all-plain.

--- Modules/CppMicroServices/cmake/usMacroCreateModule.cmake
+++ Modules/CppMicroServices/cmake/usMacroCreateModule.cmake
@@ -126,7 +126,7 @@

 # Link additional libraries
 if(${PROJECT_NAME}_LINK_LIBRARIES OR US_LIBRARIES)
-  target_link_libraries(${${PROJECT_NAME}_TARGET} ${US_LIBRARIES} ${${PROJECT_NAME}_LINK_LIBRARIES})
+  target_link_libraries(${${PROJECT_NAME}_TARGET} PUBLIC ${US_LIBRARIES} ${${PROJECT_NAME}_LINK_LIBRARIES})
 endif()

 if(${PROJECT_NAME}_PRIVATE_LINK_LIBRARIES)


Fix missing estimator modules on win-cmake

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -184,6 +184,9 @@
 add_python_module("tensorflow/python/debug/examples")
 add_python_module("tensorflow/python/debug/lib")
 add_python_module("tensorflow/python/debug/wrappers")
+add_python_module("tensorflow/python/estimator")
+add_python_module("tensorflow/python/estimator/inputs")
+add_python_module("tensorflow/python/estimator/inputs/queues")
 add_python_module("tensorflow/python/framework")
 add_python_module("tensorflow/python/kernel_tests")
 add_python_module("tensorflow/python/layers")


Update DeployQt4 to latest version in CMake.

--- cmake/DeployQt4.cmake
+++ cmake/DeployQt4.cmake
@@ -82,6 +82,7 @@

 include(BundleUtilities)
 set(DeployQt4_cmake_dir "${CMAKE_CURRENT_LIST_DIR}")
+set(DeployQt4_apple_plugins_dir "PlugIns")

 function(write_qt4_conf qt_conf_dir qt_conf_contents)
         set(qt_conf_path "${qt_conf_dir}/qt.conf")
@@ -130,6 +131,9 @@
                 set(qt_conf_dir "${executable}/Contents/Resources")
                 set(executable_path "${executable}")
                 set(write_qt_conf TRUE)
+                if(NOT plugins_dir)
+                        set(plugins_dir "${DeployQt4_apple_plugins_dir}")
+                endif()
         else()
                 get_filename_component(executable_path "${executable}" PATH)
                 if(NOT executable_path)
@@ -141,7 +145,7 @@

         foreach(plugin ${qtplugins})
                 set(installed_plugin_path "")
-                install_qt4_plugin("${plugin}" "${plugins_dir}" "${executable}" 1 installed_plugin_path)
+                install_qt4_plugin("${plugin}" "${executable}" 1 installed_plugin_path)
                 list(APPEND libs ${installed_plugin_path})
         endforeach()

@@ -166,23 +170,19 @@
         set(component ${ARGV5})
         set(configurations ${ARGV6})
         if(EXISTS "${plugin}")
-                if(plugins_dir)
-                        set(plugins_dir "${plugins_dir}")
-                else()
-                        if(APPLE)
-                                set(plugins_dir "PlugIns")
-                        else()
-                                set(plugins_dir "plugins")
-                        endif()
-                endif()
                 if(APPLE)
+                        if(NOT plugins_dir)
+                                set(plugins_dir "${DeployQt4_apple_plugins_dir}")
+                        endif()
                         set(plugins_path "${executable}/Contents/${plugins_dir}")
                 else()
-                        get_filename_component(executable_path "${executable}" PATH)
-                        if(NOT executable_path)
-                                set(executable_path ".")
-                        endif()
-                        set(plugins_path "${executable_path}/${plugins_dir}")
+                        get_filename_component(plugins_path "${executable}" PATH)
+                        if(NOT plugins_path)
+                                set(plugins_path ".")
+                        endif()
+                        if(plugins_dir)
+                                set(plugins_path "${plugins_path}/${plugins_dir}")
+                        endif()
                 endif()

                 set(plugin_group "")
@@ -210,7 +210,7 @@
                         endif()
                         install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
                 endif()
-                set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
+                set(${installed_plugin_path_var} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
         endif()
 endfunction()

@@ -220,11 +220,7 @@
         if(EXISTS "${plugin}")
                 install_qt4_plugin_path("${plugin}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
         else()
-                if(QT_IS_STATIC)
-                        string(TOUPPER "QT_${plugin}_LIBRARY" plugin_var)
-                else()
-                        string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
-                endif()
+                string(TOUPPER "QT_${plugin}_PLUGIN" plugin_var)
                 set(plugin_release_var "${plugin_var}_RELEASE")
                 set(plugin_debug_var "${plugin_var}_DEBUG")
                 set(plugin_release "${${plugin_release_var}}")
@@ -232,10 +228,24 @@
                 if(DEFINED "${plugin_release_var}" AND DEFINED "${plugin_debug_var}" AND NOT EXISTS "${plugin_release}" AND NOT EXISTS "${plugin_debug}")
                         message(WARNING "Qt plugin \"${plugin}\" not recognized or found.")
                 endif()
-                install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
-                install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}" "Debug")
-        endif()
-        set(installed_plugin_path_var "${installed_plugin_path_var}" PARENT_SCOPE)
+                if(NOT EXISTS "${${plugin_debug_var}}")
+                        set(plugin_debug "${plugin_release}")
+                endif()
+
+                if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
+                        install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}_release" "${plugins_dir}" "${component}" "Release|RelWithDebInfo|MinSizeRel")
+                        install_qt4_plugin_path("${plugin_debug}" "${executable}" "${copy}" "${installed_plugin_path_var}_debug" "${plugins_dir}" "${component}" "Debug")
+
+                        if(CMAKE_BUILD_TYPE MATCHES "^Debug$")
+                                set(${installed_plugin_path_var} ${${installed_plugin_path_var}_debug})
+                        else()
+                                set(${installed_plugin_path_var} ${${installed_plugin_path_var}_release})
+                        endif()
+                else()
+                        install_qt4_plugin_path("${plugin_release}" "${executable}" "${copy}" "${installed_plugin_path_var}" "${plugins_dir}" "${component}")
+                endif()
+        endif()
+        set(${installed_plugin_path_var} ${${installed_plugin_path_var}} PARENT_SCOPE)
 endfunction()

 function(install_qt4_executable executable)
@@ -264,15 +274,15 @@
                 set(qt_plugins_dir "")
         endif()

-        if(NOT qtplugins AND QT_LIBRARIES_PLUGINS)
-                set(qtplugins "${QT_LIBRARIES_PLUGINS}")
-        endif()
-
-        foreach(plugin ${qtplugins})
-                set(installed_plugin_paths "")
-                install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
-                list(APPEND libs ${installed_plugin_paths})
-        endforeach()
+        if(QT_IS_STATIC)
+                message(WARNING "Qt built statically: not installing plugins.")
+        else()
+                foreach(plugin ${qtplugins})
+                        set(installed_plugin_paths "")
+                        install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
+                        list(APPEND libs ${installed_plugin_paths})
+                endforeach()
+        endif()

         resolve_qt4_paths(libs)


find also the glibconfig.h which is under a really strange location on windows

--- cmake/FindGLIB2.cmake
+++ cmake/FindGLIB2.cmake
@@ -26,7 +26,7 @@
              PATHS ${PKG_GLIB_LIBRARY_DIRS} )

 find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
-          PATH_SUFFIXES glib-2.0/include
+          PATH_SUFFIXES glib-2.0/include ../lib/glib-2.0/include
           PATHS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH})

 set(GLIB2_INCLUDE_DIR ${GLIB2_MAIN_INCLUDE_DIR})


make cocl_add_xx honor CMAKE_BUILD_TYPE

make cocl_add_xx honor CMAKE_BUILD_TYPE

--- cmake/cocl_impl.cmake
+++ cmake/cocl_impl.cmake
@@ -25,10 +25,18 @@
                     #"$<$<BOOL:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>>:$<JOIN:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>,;>>"
                     # "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>"
                     # "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:$<JOIN:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>,;-I>>"
+            set(G_OPT)
+            if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+                set(G_OPT "-g")
+            endif()
+            if(${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebug")
+                set(G_OPT "-g")
+            endif()
             add_custom_command(
                 OUTPUT ${target_name}.d/${filename}.o
                 COMMAND
                     ${COCL_PATH}
+                    ${G_OPT}
                     --clang-home ${CLANG_HOME}
                     "$<$<BOOL:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>>:$<JOIN:$<TARGET_PROPERTY:${target_name},COMPILE_FLAGS>,;>>;"
                     "$<$<BOOL:$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>>:$<JOIN:-I$<TARGET_PROPERTY:${target_name},INCLUDE_DIRECTORIES>,;-I>>"


[mips] Support building compiler-rt with gcc.

Summary:
This will allow us to enable it on the buildbot (and then enable a
sanitizer buildbot).

The problem is that gcc for Mips does not accept -m32/-m64 like clang does.
We therefore need to use the nearest equivalent -mips32r2/-mips64r2. We must
also specify -mabi=64 in the -mips64r2 case since gcc's default ABI has
traditionally been N32 whereas clang's is N64.

Reviewers: sagar

Reviewed By: sagar

Subscribers: llvm-commits, samsonov, kcc, mohit.bhakkad, Anand.Takale, sagar

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

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@235299 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -177,13 +177,18 @@
       test_target_arch(powerpc64le "" "-m64")
     endif()
   elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
+    # Gcc doesn't accept -m32/-m64 so we do the next best thing and use
+    # -mips32r2/-mips64r2. We don't use -mips1/-mips3 because we want to match
+    # clang's default CPU's. In the 64-bit case, we must also specify the ABI
+    # since the default ABI differs between gcc and clang.
+    # FIXME: Ideally, we would build the N32 library too.
     if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el")
       # regex for mipsel, mips64el
-      test_target_arch(mipsel "" "-m32")
-      test_target_arch(mips64el "" "-m64")
+      test_target_arch(mipsel "" "-mips32r2")
+      test_target_arch(mips64el "" "-mips64r2 -mabi=n64")
     else()
-      test_target_arch(mips "" "-m32")
-      test_target_arch(mips64 "" "-m64")
+      test_target_arch(mips "" "-mips32r2")
+      test_target_arch(mips64 "" "-mips64r2 -mabi=n64")
     endif()
   elseif("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "arm")
     test_target_arch(arm "" "-march=armv7-a")


D33466: Make file non-executable.

D33466: Make file non-executable.

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


Revert "[CMake] Use __libc_start_main rather than fopen when checking for C library"

This reverts commit r352341: it broke the build on macOS which doesn't
seem to provide __libc_start_main in its C library.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@352411 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -7,7 +7,7 @@
   # let the default linking take care of that.
   set(LIBCXX_HAS_C_LIB NO)
 else()
-  check_library_exists(c __libc_start_main "" LIBCXX_HAS_C_LIB)
+  check_library_exists(c fopen "" LIBCXX_HAS_C_LIB)
 endif()

 if (NOT LIBCXX_USE_COMPILER_RT)


cleaned up the dependency graph by manually removing documentation, tools, apps, global_tests

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

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -4,6 +4,10 @@
     set(_dot_file "${PROJECT_BINARY_DIR}/pcl.dot")
     file(WRITE ${_dot_file} "digraph pcl {\n")
     foreach(_ss ${PCL_SUBSYSTEMS})
+      if(NOT _ss STREQUAL "global_tests" AND
+         NOT _ss STREQUAL "apps" AND
+         NOT _ss STREQUAL "tools" AND
+         NOT _ss STREQUAL "documentation")
         PCL_GET_SUBSYS_STATUS(_status ${_ss})
         if(_status)
             file(APPEND ${_dot_file}
@@ -16,6 +20,7 @@
         foreach(_dep ${_deps})
             file(APPEND ${_dot_file} "  \"${_ss}\" -> \"${_dep}\";\n")
         endforeach(_dep)
+      endif()
     endforeach(_ss)

     file(APPEND ${_dot_file}


Fix for linker script path that includes space

I am working on Windows and path to my project contains space. When toolchain generates -T linker switch result looks like this:
-T<Path_before_space> <path_after_space>/${TARGET}_flash.ld
This is interpreted by linker as 2 separate arguments.

I encolsed -T argument with quotes to force treating it as a single argument

--- cmake/gcc_stm32.cmake
+++ cmake/gcc_stm32.cmake
@@ -108,9 +108,9 @@

     GET_TARGET_PROPERTY(TARGET_LD_FLAGS ${TARGET} LINK_FLAGS)
     IF(TARGET_LD_FLAGS)
-        SET(TARGET_LD_FLAGS "-T${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_flash.ld ${TARGET_LD_FLAGS}")
-    ELSE()
-        SET(TARGET_LD_FLAGS "-T${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_flash.ld")
+        SET(TARGET_LD_FLAGS "\"-T${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_flash.ld\" ${TARGET_LD_FLAGS}")
+    ELSE()
+        SET(TARGET_LD_FLAGS "\"-T${CMAKE_CURRENT_BINARY_DIR}/${TARGET}_flash.ld\"")
     ENDIF()
     SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS ${TARGET_LD_FLAGS})
 ENDFUNCTION()


skip examples when packing

skip examples when packing

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@4051 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -103,16 +103,14 @@

 macro(PCL_CPACK_MAKE_COMPS_OPTS _var _current)
     set(_comps_list)
-    foreach(_ss ${PCL_SUBSYSTEMS})
-        if("${_ss}" STREQUAL "global_tests")
-            # we don't install global_tests
-        else("${_ss}" STREQUAL "global_tests")
-            PCL_GET_SUBSYS_STATUS(_status ${_ss})
-            if(_status)
-                set(_comps_list "${_comps_list} ${_ss}")
-                PCL_CPACK_ADD_COMP_INFO(${_var} ${_ss})
-            endif(_status)
-        endif("${_ss}" STREQUAL "global_tests")
+    set(PCL_CPACK_SUBSYSTEMS ${PCL_SUBSYSTEMS})
+    list(REMOVE_ITEM PCL_CPACK_SUBSYSTEMS global_tests examples)
+    foreach(_ss ${PCL_CPACK_SUBSYSTEMS})
+        PCL_GET_SUBSYS_STATUS(_status ${_ss})
+        if(_status)
+            set(_comps_list "${_comps_list} ${_ss}")
+            PCL_CPACK_ADD_COMP_INFO(${_var} ${_ss})
+        endif(_status)
     endforeach(_ss)
     set(CPACK_COMPONENTS_ALL ${_comps_list})
 endmacro(PCL_CPACK_MAKE_COMPS_OPTS)


fix linking for armeabi-v7a-hard

fix linking for armeabi-v7a-hard

--- toolchains/android/armv7-vfp3d16.arch.cmake
+++ toolchains/android/armv7-vfp3d16.arch.cmake
@@ -33,7 +33,7 @@
 option( TNUN_ANDROID_ARM7_HARDFLOAT_ABI "Use hardfloat ABI for armv7 binaries" false )
 if( ${TNUN_ANDROID_ARM7_HARDFLOAT_ABI} )
     add_compile_options( -mhard-float -D_NDK_MATH_NO_SOFTFP=1 )
-    link_libraries( -Wl,-lm_hard )
+    link_libraries( -Wl,--no-warn-mismatch -lm_hard )
 endif()

 # this is *required* to use the following linker flags that routes around


added TEST_MODELS_HASH

added TEST_MODELS_HASH

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,6 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
+set(TEST_MODELS_HASH ff2984cc59aa2082c8215d18582b632362d0ab50)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


Allow custom CPACK_PACKAGE_NAME to be specified from the project CPackConfig.cmake. For example "Project Foo" could have a package name like libprojectfoo. More importantly, the project name can use spaces while the package name don't (which are not allowed in .deb packages).

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -12,16 +12,19 @@
   STRING "Additional build version for packages")
 mark_as_advanced(CMAKE_PACKAGE_VERSION)

+if(NOT CPACK_PACKAGE_NAME)
+  set(CPACK_PACKAGE_NAME ${CPACK_PROJECT_NAME})
+endif()
+
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
-  set(CPACK_PACKAGE_NAME "${CPACK_PROJECT_NAME}${VERSION_ABI}")
+  string(TOLOWER ${CPACK_PACKAGE_NAME} LOWER_PACKAGE_NAME_PREFIX)
+  set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}${VERSION_ABI}")
   set(OLD_PACKAGES)
   foreach(i RANGE ${VERSION_ABI})
-    list(APPEND OLD_PACKAGES "${LOWER_PROJECT_NAME}${i},")
+    list(APPEND OLD_PACKAGES "${LOWER_PACKAGE_NAME_PREFIX}${i},")
   endforeach()
-  list(APPEND OLD_PACKAGES "${LOWER_PROJECT_NAME}")
+  list(APPEND OLD_PACKAGES "${LOWER_PACKAGE_NAME_PREFIX}")
   string(REGEX REPLACE ";" " " OLD_PACKAGES ${OLD_PACKAGES})
-else()
-  set(CPACK_PACKAGE_NAME "${CPACK_PROJECT_NAME}")
 endif()

 if(NOT APPLE)


build: Compile `fmt` as a static library

This restores the old behavior of the build, and makes integration with
Scylla easier.

It's still possible to provide `fmt` from anywhere on the system,
including as a shared library, but not with `configure.py`.

Signed-off-by: Jesse Haber-Kucharsky <526eadea4792054b99d5fa5dd6be9acdd76c5418@scylladb.com>
Message-Id: <00a19e69ddd23c2b9b3e5cdeeb8af6650fc7a9ef.1547531306.git.526eadea4792054b99d5fa5dd6be9acdd76c5418@scylladb.com>

--- recipe/dev.cmake
+++ recipe/dev.cmake
@@ -280,7 +280,7 @@
 cooking_ingredient (fmt
   LOCAL_REBUILD
   CMAKE_ARGS
-    -DBUILD_SHARED_LIBS=ON
+    -DBUILD_SHARED_LIBS=OFF
     -DFMT_DOC=OFF
     -DFMT_LIB_DIR=lib
     -DFMT_TEST=OFF


publishing related stuff

publishing related stuff

git-svn-id: 647c2dfdf120d9af8205d960f30c8711574448cd@1324 6778bc44-b910-0410-a7a0-be141de4315d

--- src/libprojectM/cmake/CPack-projectM.cmake
+++ src/libprojectM/cmake/CPack-projectM.cmake
@@ -6,7 +6,7 @@
 #SET(CPACK_IGNORE_FILES
  # "*~;CMakeCache.txt;CMakeFiles/;.svn;.*.bak;*.Z;_*/;.*.gz;.*.tgz;.*.tar;.*.bz2;.*.zip;.*.rpm;.*.deb;.*.o")
 SET(CPACK_SOURCE_IGNORE_FILES
-  "Makefile;CMakeCache.txt;CMakeFiles/;.*.gz;.*.bz2;.*.Z;.*.zip")
+  "Makefile;CMakeCache.txt;CMakeFiles/;.*.gz;.*.bz2;.*.Z;.*.zip;.*svn")

 #SET(CPACK_BINARY_RPM OFF)
 # #SET(CPACK_BINARY_Z OFF)


corrected archive output directory for ios projects

--- toolchains/ios.toolchain.cmake
+++ toolchains/ios.toolchain.cmake
@@ -74,6 +74,8 @@
 #                                             (13.05.2016.) (Domagoj Saric)
 string( REPLACE "-Rpass=loop-.*" "" TNUN_compiler_optimize_for_speed  "${TNUN_compiler_optimize_for_speed}" )

+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}" )
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}" )

 ################################################################################
 # TNUN_ios_add_universal_build()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Tweak configurability of documentation repo

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -22,15 +22,15 @@
   include(GithubOrganization)
   set(GIT_DOCUMENTATION_REPO GIT_ORIGIN_org)
 endif()
-if(GIT_ORIGIN_ORG)
+if(GIT_DOCUMENTATION_REPO)
   set(GIT_DOCUMENTATION_DIR
     ${CMAKE_SOURCE_DIR}/../${GIT_DOCUMENTATION_REPO}/${PROJECT_NAME}-${VERSION_MAJOR}.${VERSION_MINOR})
-  add_custom_target(github
+  add_custom_target(doxygit
     COMMAND ${CMAKE_COMMAND} -E remove_directory ${GIT_DOCUMENTATION_DIR}
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR}/doc/html ${GIT_DOCUMENTATION_DIR}
     COMMENT "Copying API documentation to ${GIT_DOCUMENTATION_DIR}"
     VERBATIM)
-  add_dependencies(github doxygen)
+  add_dependencies(doxygit doxygen)
 endif()

 make_directory(${CMAKE_BINARY_DIR}/doc/man/man3)


SVN_SILENT made messages (.desktop file)

--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -23,6 +23,7 @@
 Name[pa]=ਡਾਇਰੈਕਟ-ਸ਼ੋ9
 Name[pt]=DirectShow9
 Name[pt_BR]=DirectShow9
+Name[ru]=DirectShow9
 Name[sr]=Дајректшоу‑9
 Name[sr@ijekavian]=Дајректшоу‑9
 Name[sr@ijekavianlatin]=DirectShow‑9
@@ -46,6 +47,7 @@
 Comment[pa]=ਫੋਨੋਨ DirectShow9 ਬੈਕਐਂਡ
 Comment[pt]=Infra-estrutura do DirectShow9 para o Phonon
 Comment[pt_BR]=Infraestrutura do DirectShow9 para o Phonon
+Comment[ru]=Механизм DirectShow9 для Phonon
 Comment[sr]=Дајректшоу‑9 као позадина Фонона
 Comment[sr@ijekavian]=Дајректшоу‑9 као позадина Фонона
 Comment[sr@ijekavianlatin]=DirectShow‑9 kao pozadina Phonona


Changed INSTALL parameter from TARGETS to FILES, since external plugin
configuration files are not in the build directory, neither they're
targets.

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@5910 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/OpenSyncPlugin.cmake
+++ cmake/OpenSyncPlugin.cmake
@@ -23,7 +23,7 @@
 ### Got introduced to be able in future to move those plugins into
 ### a seperated directory, without fixing all plugin build environments
 MACRO( OPENSYNC_EXTERNAL_PLUGIN_INSTALL _pluginName )
-  INSTALL( TARGETS ${_pluginName} DESTINATION ${OPENSYNC_PLUGINDIR} )
+  INSTALL( FILES ${_pluginName} DESTINATION ${OPENSYNC_PLUGINDIR} )
 ENDMACRO( OPENSYNC_EXTERNAL_PLUGIN_INSTALL )

 ## Install format plugin


update: install-component names

update: install-component names

--- cmake/SetupFunctions.cmake
+++ cmake/SetupFunctions.cmake
@@ -154,9 +154,9 @@

   TARGET_LINK_LIBRARIES(${LIB_NAME} ${LIB_DEPENDENCIES})

-  INSTALL(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${DCSC08961_LIBRARY_DIRECTORY} COMPONENT runtime)
+  INSTALL(TARGETS ${LIB_NAME} LIBRARY DESTINATION ${DCSC08961_LIBRARY_DIRECTORY} COMPONENT lib)
   INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/${LIB_NAME} DESTINATION ${DCSC08961_HEADER_DIRECTORY}
-    COMPONENT development)
+    COMPONENT hdr)
 ENDFUNCTION()

 # TEST_SETUP(PREFIX SOURCES ... [DEPENDENCIES ..] [DEBUG])
@@ -248,5 +248,5 @@

   TARGET_LINK_LIBRARIES(${APP_NAME} ${APP_DEPENDENCIES})

-  INSTALL(TARGETS ${APP_NAME} RUNTIME DESTINATION ${DCSC08961_RUNTIME_DIRECTORY} COMPONENT runtime)
-ENDFUNCTION()
+  INSTALL(TARGETS ${APP_NAME} RUNTIME DESTINATION ${DCSC08961_RUNTIME_DIRECTORY} COMPONENT app)
+ENDFUNCTION()


Allow builds to set COMPILER_RT_OS_DIR differently from CMAKE_SYSTEM_NAME

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@303817 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/base-config-ix.cmake
+++ cmake/base-config-ix.cmake
@@ -63,7 +63,9 @@
   set(COMPILER_RT_TEST_COMPILER_ID GNU)
 endif()

-string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR)
+if(NOT DEFINED COMPILER_RT_OS_DIR)
+  string(TOLOWER ${CMAKE_SYSTEM_NAME} COMPILER_RT_OS_DIR)
+endif()
 set(COMPILER_RT_LIBRARY_OUTPUT_DIR
   ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
 set(COMPILER_RT_LIBRARY_INSTALL_DIR


enable additional cfg extra files via project specific global variable

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -45,6 +45,8 @@
 #   use the extensions ``.cmake.develspace.(in|em)`` or
 #   ``.cmake.installspace.(em|in)`` to generate the files only for a
 #   specific case.
+#   If the global variable ${PROJECT_NAME}_CFG_EXTRAS is set it will be
+#   prepended to the explicitly passed argument.
 # :type CFG_EXTRAS: string
 # :param SKIP_CMAKE_CONFIG_GENERATION: the option to skip the generation
 #   of the CMake config files for the package
@@ -301,7 +303,7 @@

   # generate devel space cfg-extras for project
   set(PKG_CFG_EXTRAS "")
-  foreach(extra ${PROJECT_CFG_EXTRAS})
+  foreach(extra ${${PROJECT_NAME}_CFG_EXTRAS} ${PROJECT_CFG_EXTRAS})
     set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
     if (EXISTS ${base})
       list(APPEND PKG_CFG_EXTRAS ${base})
@@ -390,7 +392,7 @@
   # generate and install cfg-extras for project
   set(PKG_CFG_EXTRAS "")
   set(installable_cfg_extras "")
-  foreach(extra ${PROJECT_CFG_EXTRAS})
+  foreach(extra ${${PROJECT_NAME}_CFG_EXTRAS} ${PROJECT_CFG_EXTRAS})
     set(base ${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra})
     if (EXISTS ${base})
       list(APPEND installable_cfg_extras ${base})


Update CMake-generated headers only when their content changes

- this prevents unnecessary decode.cc rebuilds after each CMake run

--- cmake/draco_features.cmake
+++ cmake/draco_features.cmake
@@ -44,13 +44,18 @@

 # Function for generating draco_features.h.
 function(draco_generate_features_h)
-  file(WRITE "${draco_features_file_name}"
+  file(WRITE "${draco_features_file_name}.new"
        "// GENERATED FILE -- DO NOT EDIT\n\n" "#ifndef DRACO_FEATURES_H_\n"
        "#define DRACO_FEATURES_H_\n\n")

   foreach(feature ${draco_features_list})
-    file(APPEND "${draco_features_file_name}" "#define ${feature}\n")
+    file(APPEND "${draco_features_file_name}.new" "#define ${feature}\n")
   endforeach()

-  file(APPEND "${draco_features_file_name}" "\n#endif  // DRACO_FEATURES_H_")
+  file(APPEND "${draco_features_file_name}.new" "\n#endif  // DRACO_FEATURES_H_")
+
+  # Will replace ${draco_features_file_name} only if the file content has changed.
+  # This prevents forced Draco rebuilds after CMake runs.
+  configure_file("${draco_features_file_name}.new" "${draco_features_file_name}")
+  file(REMOVE "${draco_features_file_name}.new")
 endfunction()


Distinguish between core build of the examples in the build tree and
installed examples build to allow common CMakeLists.txt files to be used for
the two separate build systems.

svn path=/trunk/; revision=10158

--- cmake/modules/plplot.cmake
+++ cmake/modules/plplot.cmake
@@ -60,7 +60,14 @@
 include(instdirs)
 include(rpath)

+# Common CMakeList.txt files are used to build the examples in the build
+# tree and also to build the installed examples by the new CMake-based build
+# system devoted to that purpose. Set this fundamental identification to
+# distinguish the two cases.
+set(core_build ON)
+
 option(BUILD_TEST "Compile examples in the build tree and enable ctest" OFF)
+
 # Use bash when available for ctest and install tree test support
 find_program(SH_EXECUTABLE bash)
 find_program(SH_EXECUTABLE win-bash)


increment version number

increment version number

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

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


also search for typekits in FindRTTPlugin

--- lib/orogen/templates/config/FindRTTPlugin.cmake
+++ lib/orogen/templates/config/FindRTTPlugin.cmake
@@ -32,10 +32,18 @@
     # Find plugins
     if(OROCOS_ROOT_DIR)
         # Use location specified by environment variable
-        find_library(RTT_PLUGIN_${COMPONENT}_LIBRARY        NAMES ${PLUGIN_NAME} PATHS ${OROCOS_ROOT_DIR}/lib PATH_SUFFIXES orocos/plugins orocos/plugins/${OROCOS_TARGET}  NO_DEFAULT_PATH)
+        find_library(RTT_PLUGIN_${COMPONENT}_LIBRARY
+            NAMES ${PLUGIN_NAME}
+            PATHS ${OROCOS_ROOT_DIR}/lib
+            PATH_SUFFIXES orocos/plugins orocos/plugins/${OROCOS_TARGET}
+                orocos/types orocos/types/${OROCOS_TARGET}  NO_DEFAULT_PATH)
     else()
         # Use default CMake search process
-        find_library(RTT_PLUGIN_${COMPONENT}_LIBRARY        NAMES ${PLUGIN_NAME} PATHS ${OROCOS_INSTALL}/lib PATH_SUFFIXES orocos/plugins orocos/plugins/${OROCOS_TARGET})
+        find_library(RTT_PLUGIN_${COMPONENT}_LIBRARY
+            NAMES ${PLUGIN_NAME}
+            PATHS ${OROCOS_INSTALL}/lib
+            PATH_SUFFIXES orocos/types orocos/types/${OROCOS_TARGET}
+                orocos/plugins orocos/plugins/${OROCOS_TARGET})
     endif()

     # Set the include dir variables and the libraries and let libfind_process do the rest.


emscripten: fixes for emsdk's switch to upstream-llvm

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -27,7 +27,7 @@
 option(FIPS_EMSCRIPTEN_USE_EMMALLOC "use emmalloc allocator" OFF)
 option(FIPS_EMSCRIPTEN_USE_EMBIND "use embind" OFF)
 option(FIPS_EMSCRIPTEN_ALLOW_MEMORY_GROWTH "allow memory growth" ON)
-option(FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP "use trap-mode clamp for wasm" ON)
+option(FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP "use trap-mode clamp for wasm" OFF)
 option(FIPS_EMSCRIPTEN_DEMANGLE "compile with libcxxabi-provided demangling support" OFF)
 option(FIPS_EMSCRIPTEN_USE_FETCH "use fetch API" OFF)
 option(FIPS_EMSCRIPTEN_USE_MINIMAL_RUNTIME "use the minimal JS runtime" OFF)
@@ -223,7 +223,7 @@
 set(CMAKE_DL_LIBS)

 # c++ compiler flags
-set(CMAKE_CXX_FLAGS "${EMSC_COMMON_FLAGS} ${EMSC_CXX_FLAGS} -std=c++11 -stdlib=libc++ -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-warn-absolute-paths -Wno-expansion-to-defined")
+set(CMAKE_CXX_FLAGS "${EMSC_COMMON_FLAGS} ${EMSC_CXX_FLAGS} -std=c++11 -fstrict-aliasing -Wall -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue -Wno-inconsistent-missing-override -Wno-warn-absolute-paths -Wno-expansion-to-defined")
 set(CMAKE_CXX_FLAGS_RELEASE "${EMSCRIPTEN_OPT} -DNDEBUG")
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -D_DEBUG_ -D_DEBUG -DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_PROFILING "${EMSCRIPTEN_OPT} -DNDEBUG --profiling")


emscripten toolchain file: Try a different quote style for BINARYEN_METHOD (see #163)

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -126,9 +126,9 @@
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s ASSERTIONS=0")

 if (FIPS_EMSCRIPTEN_USE_WASM)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm\"'")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s \"BINARYEN_METHOD='native-wasm'\"")
 elseif(FIPS_EMSCRIPTEN_USE_WASM_ASMJS)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s 'BINARYEN_METHOD=\"native-wasm,asmjs\"'")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1 -s \"BINARYEN_METHOD='native-wasm,asmjs'\"")
 endif()
 set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")


Updated FW to sync with shared changes

Updated FW to sync with shared changes

--- 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 "2d72ac3bbbec5227f59873ea0b14b890a4fbf9bb")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a3a5c940587c0261007aedddf845759831b3c43e")

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


Update FW

Update FW

--- 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 "f51e378bba05af46b060ac58aeb77792093c7a7a")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "fac6ebe5edc638463c3000cecd0b733d29b85d01")

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


Remove deprecated target from the module list which was deleted in previous commit

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -62,7 +62,6 @@
 	systemcmds/dumpfile
 	systemcmds/ver
 	systemcmds/tests
-	systemcmds/mag

 	#
 	# General system control


Remove duplicate include of subdirectory builtins/glew (#5525)

This commit fixes a duplicate include error which occurs on configuring Cmake options.

```
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:538 (add_subdirectory):
  The binary directory

    E:/root-build/builtins/glew

  is already used to build a source directory.  It cannot be used to build
  source directory

    E:/root/builtins/glew

  Specify a unique binary directory name.
```

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -527,8 +527,6 @@
     if(NOT GLEW_FOUND)
       message(STATUS "GLEW not found. Switching on builtin_glew option")
       set(builtin_glew ON CACHE BOOL "Enabled because opengl requested and GLEW not found (${builtin_glew_description})" FORCE)
-      add_subdirectory(builtins/glew)
-      list(APPEND ROOT_BUILTINS GLEW)
     endif()
   endif()
 endif()


Update builtin version of VecCore to 0.7.0


Revert "Fix builtin_gsl on suse LEAP 42.2"

This reverts commit b16aa827eb0a3ec7815b8778a30ae01721893e0f.


Align behaviour for not found TBB and found but not the correct version.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1190,8 +1190,12 @@
     find_package(TBB)
     if(TBB_FOUND)
       if(${TBB_VERSION} VERSION_LESS 4.3)
-        message(STATUS "TBB version < 4.3. Switching on builtin_tbb option")
-        set(builtin_tbb ON CACHE BOOL "" FORCE)
+        if(fail-on-missing)
+          message(FATAL_ERROR "TBB version < 4.3. You can enable the option 'builtin_tbb' to build the library internally")
+        else()
+          message(STATUS "TBB version < 4.3. Switching on builtin_tbb option")
+          set(builtin_tbb ON CACHE BOOL "" FORCE)
+        endif()
       endif()
     endif()
     if(NOT TBB_FOUND)


bump built-in gtest's version from 1.10 to 1.11


Add support for libevent_pthreads.

Add support for libevent_pthreads.

Change-Id: I0f0980b0402a415251035bf5aec2b2afc0f17f26
Reviewed-on: http://gerrit.aldebaran.lan:8080/249
Reviewed-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Tested-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>

--- cmake/qibuild/modules/libevent-config.cmake
+++ cmake/qibuild/modules/libevent-config.cmake
@@ -13,5 +13,7 @@
 else()
   flib(LIBEVENT NAMES event)
   flib(LIBEVENT NAMES event_core)
+  flib(LIBEVENT NAMES event_pthreads)
+  qi_set_global(LIBEVENT_DEPENDS PTHREAD)
 endif()
 export_lib(LIBEVENT)