Update comment (project website)

Update comment (project website)

--- cmakemodule/FindSuiteSparse.cmake
+++ cmakemodule/FindSuiteSparse.cmake
@@ -1,8 +1,7 @@
 ## CMake file to locate SuiteSparse and its useful composite projects
 ## The first developpement of this file was made fro Windows users who
-## use the http://code.google.com/p/suitesparse-metis-for-windows/
-## downloaded here :
-## svn checkout http://suitesparse-metis-for-windows.googlecode.com/svn/trunk/ suitesparse-metis-for-windows
+## use:
+##  https://github.com/jlblancoc/suitesparse-metis-for-windows
 ## Anyway, it chould be work also on linux (tested on fedora 17 when you installed suitesparse from yum)
 ##
 ##


PKG: update revision of SertitObject module to get bugfixes

--- Modules/Remote/SertitObject.remote.cmake
+++ Modules/Remote/SertitObject.remote.cmake
@@ -26,5 +26,5 @@
 object-oriented image analysis.
 "
   GIT_REPOSITORY https://github.com/sertit/SertitObject.git
-  GIT_TAG d228e0d65de58496e2410ae8944e715b3970760a
+  GIT_TAG 933963e90bf4b1054b80e099b74b0e41b803ef94
 )


Forgotten file from r269992.

Forgotten file from r269992.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -21,6 +21,9 @@

 /* Define to 1 if you have the `backtrace' function. */
 #cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}
+
+/* Define to 1 if you have the `_Unwind_Backtrace' function. */
+#cmakedefine HAVE_UNWIND_BACKTRACE ${HAVE_UNWIND_BACKTRACE}

 /* Define to 1 if you have the `bcopy' function. */
 #undef HAVE_BCOPY


COMP: fix compilation with Python and tests enabled on Visual Studio

--- CMake/ITKModuleTest.cmake
+++ CMake/ITKModuleTest.cmake
@@ -189,11 +189,21 @@
     set(itk_wrap_python_binary_dir "${ITK_BINARY_DIR}/Wrapping/Generators/Python")
   endif()
   # itk_wrap_python_binary_dir *MUST* contain the WrapITK.pth file
-  set(WrapITK_PTH_FILE "${itk_wrap_python_binary_dir}/WrapITK.pth")
-  if(NOT EXISTS ${WrapITK_PTH_FILE})
-    # Final installed version of ITK will leverage the WrapITK.pth paths, so
-    # the test environment should also use those same paths.
-    message(FATAL_ERROR "The sys.path must be updated with the WrapITK.pth file content.")
+  # Final installed version of ITK will leverage the WrapITK.pth paths, so
+  # the test environment should also use those same paths.
+  if (NOT DEFINED CMAKE_CONFIGURATION_TYPES) # single mode generator (ninja, makefile)
+    set(WrapITK_PTH_FILE "${itk_wrap_python_binary_dir}/WrapITK.pth")
+    if(NOT EXISTS ${WrapITK_PTH_FILE})
+      message(FATAL_ERROR "${WrapITK_PTH_FILE} must exist.")
+    endif()
+  else() # multi-mode generator (Visual Studio, XCode)
+    foreach(config ${CMAKE_CONFIGURATION_TYPES})
+      set(WrapITK_PTH_FILE "${itk_wrap_python_binary_dir}/${config}/WrapITK.pth")
+      if(NOT EXISTS ${WrapITK_PTH_FILE})
+        message(FATAL_ERROR "${WrapITK_PTH_FILE} must exist.")
+      endif()
+      unset(WrapITK_PTH_FILE)
+    endforeach()
   endif()
   unset(WrapITK_PTH_FILE)


Remove unnecessary graphviz libraries.

Remove unnecessary graphviz libraries.

--- salome_adm/cmake_files/FindGraphviz.cmake
+++ salome_adm/cmake_files/FindGraphviz.cmake
@@ -38,17 +38,14 @@
 FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY   NAMES cgraph)
 FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY    NAMES graph)
 FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY      NAMES gvc)
-FIND_LIBRARY(GRAPHVIZ_gvpr_LIBRARY     NAMES gvpr)
 FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan)
-FIND_LIBRARY(GRAPHVIZ_xdot_LIBRARY     NAMES xdot)
+
 SET(GRAPHVIZ_LIBRARIES
   ${GRAPHVIZ_cdt_LIBRARY}
   ${GRAPHVIZ_cgraph_LIBRARY}
   ${GRAPHVIZ_graph_LIBRARY}
   ${GRAPHVIZ_gvc_LIBRARY}
-  ${GRAPHVIZ_gvpr_LIBRARY}
   ${GRAPHVIZ_pathplan_LIBRARY}
-  ${GRAPHVIZ_xdot_LIBRARY}
   )

 # Handle the standard arguments of the find_package() command:


BUG: missing msvc openmp and concrt dll search path

--- SuperBuild/Packaging/PackageHelper.cmake
+++ SuperBuild/Packaging/PackageHelper.cmake
@@ -68,15 +68,30 @@
       if(DEFINED ENV{UniversalCRTSdkDir})
         file(TO_CMAKE_PATH "$ENV{UniversalCRTSdkDir}" UCRT_SDK_DIR)
         list(
-        APPEND
-        PKG_SEARCHDIRS
-        "${UCRT_SDK_DIR}/Redist/ucrt/DLLs/${OTB_TARGET_SYSTEM_ARCH}"
-        ) #ucrt dlls
+          APPEND
+          PKG_SEARCHDIRS
+          "${UCRT_SDK_DIR}/Redist/ucrt/DLLs/${OTB_TARGET_SYSTEM_ARCH}"
+          ) #ucrt dlls
       else()
         message(FATAL_ERROR
 	  "UniversalCRTSdkDir variable not set.
           call vcvarsall.bat <arch> first before starting build.")
       endif()
+
+      #addtional msvc redist dll from VCINSTALLDIR
+      if(DEFINED ENV{VCINSTALLDIR})
+        file(TO_CMAKE_PATH "$ENV{VCINSTALLDIR}" PKG_VCINSTALLDIR)
+        list(
+          APPEND
+          PKG_SEARCHDIRS
+          "${PKG_VCINSTALLDIR}/redist/${OTB_TARGET_SYSTEM_ARCH}/Microsoft.VC140.CRT/"
+          "${PKG_VCINSTALLDIR}/redist/${OTB_TARGET_SYSTEM_ARCH}/Microsoft.VC140.OPENMP/"
+          )
+      else()
+        message(FATAL_ERROR
+	  "VCINSTALLDIR variable not set. call vcvarsall.bat <arch> first before starting build.")
+      endif()
+
     else()
       file(GLOB MXE_GCC_LIB_DIR "${DEPENDENCIES_INSTALL_DIR}/bin/gcc*")
       list(APPEND PKG_SEARCHDIRS ${MXE_GCC_LIB_DIR})
@@ -886,7 +901,7 @@
               string(REGEX MATCHALL "dependencies.(.*[Dd][Ll][Ll])" loader_ov "${loader_ov}")
               string(REGEX REPLACE "dependencies.." "" loader_ov "${loader_ov}")
               # take out string 'Image has the following'
-              string(REGEX REPLACE "Image.has.the.following" "" loader_ov "${loader_ov}")
+              string(REGEX REPLACE "Image.has.the.following" "" loader_ov "${loader_ov}")
               #beware of .DLL and .dll
               string(REGEX REPLACE ".DLL" ".dll" loader_ov "${loader_ov}")
               #convert to cmake list
@@ -1109,11 +1124,11 @@
   rpcrt4.dll
   winspool.drv
   normaliz.dll
-  concrt*.*.dll
   odbc32.dll
   psapi.dll
   python...dll
-  vcomp*.*.dll)
+  delay.load
+  )

 set(LINUX_SYSTEM_DLLS
   libm.so


fix superbuild with ninja

fix superbuild with ninja

Fix the horribly broken PVExternalProject.cmake to actually work with
Ninja. (Note: it works by chance on Windows because it just punts to
plain ExternalProject for that case, but has issues elsewhere.)

--- Superbuild/CMake/PVExternalProject.cmake
+++ Superbuild/CMake/PVExternalProject.cmake
@@ -44,6 +44,8 @@

   # just create a temporary target so we can set target properties.
   add_custom_target(pv-${name})
+  set(binary_dir ${CMAKE_CURRENT_BINARY_DIR}/${name}/src/${name}-build)
+
   _ep_parse_arguments(PVExternalProject_Add pv-${name} _EP_ "${ARGN}")

   get_property(has_process_environment TARGET pv-${name}
@@ -99,8 +101,8 @@
       # GNU make recognizes the string "$(MAKE)" as recursive make, so
       # ensure that it appears directly in the makefile.
       string(REGEX REPLACE "^\\$\\(MAKE\\)" "${CMAKE_MAKE_PROGRAM} -j5" build_cmd "${build_cmd}")
-      set_property(TARGET pv-${name} PROPERTY _EP_BUILD_COMMAND "${build_cmd}")
     endif()
+    set_property(TARGET pv-${name} PROPERTY _EP_BUILD_COMMAND "${build_cmd}")
     set(has_build_command 1)
   endif()


Refactoring of the preprocessor definitions:

1) SIZEOF_FORTRAN_INTEGER anymore is not used.
2) Move SIZEOF_INT and SIZEOF_LONG into the FindOmniOrb.cmake because it needs only for the OmniOrb for WINDOWS platforms.

Add d suffix for the OmiOrb libraries in debug for windows.

--- salome_adm/cmake_files/FindOmniORB.cmake
+++ salome_adm/cmake_files/FindOmniORB.cmake
@@ -54,13 +54,23 @@
 ##############################################################################
 # find libraries
 ##############################################################################
+
+# Win release / debug specific stuff:
+IF (WIN32)
+  IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+    SET(OMNIORB_RD_SUFFIX d)
+  ELSE()
+    SET(OMNIORB_RD_SUFFIX)
+  ENDIF()
+ENDIF()
+
 IF (WIN32)
   FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniORB4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   FIND_LIBRARY( OMNIORB_LIBRARY_omnithread
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omnithread_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   FIND_LIBRARY( OMNIORB_LIBRARY_omniDynamic4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}omniDynamic4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
 ELSE (WIN32)
   FIND_LIBRARY(OMNIORB_LIBRARY_omniORB4 NAMES omniORB4)
   FIND_LIBRARY(OMNIORB_LIBRARY_omnithread NAMES omnithread)
@@ -71,9 +81,9 @@

 IF (WIN32)
   FIND_LIBRARY( OMNIORB_LIBRARY_COS4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COS4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
   FIND_LIBRARY( OMNIORB_LIBRARY_COSDynamic4
-    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4_rt${CMAKE_STATIC_LIBRARY_SUFFIX})
+    NAMES ${CMAKE_STATIC_LIBRARY_PREFIX}COSDynamic4_rt${OMNIORB_RD_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
 ELSE (WIN32)
   FIND_LIBRARY(OMNIORB_LIBRARY_COS4 NAMES COS4)
   FIND_LIBRARY(OMNIORB_LIBRARY_COSDynamic4 NAMES COSDynamic4)
@@ -131,7 +141,9 @@
 SET(IDL_SRV_H .hh)
 SET(OMNIORB_DEFINITIONS "-D__x86__ -DCOMP_CORBA_DOUBLE -DCOMP_CORBA_LONG")
 IF(WIN32)
-  SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__")
+  ## OmniORB isn`t defines SIZEOF_LONG and SIZEOF_INT on WIN32 platform
+  ## Note SIZE_OF_LONG calculates in the SalomeSetupPlatform.cmake
+  SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__WIN32__ -DSIZEOF_INT=4 -DSIZEOF_LONG=${SIZE_OF_LONG}")
 ENDIF()
 IF(APPLE)
   SET(OMNIORB_DEFINITIONS "${OMNIORB_DEFINITIONS} -D__macos__")#for omnithread.h to be checked...


also add C4267 to list of disabled MSVC warnings

apparently there's a dedicated code for size_t conversions

Change-Id: I6e76f03938b34fd385283485c4ee2d44527e534a
Reviewed-on: http://review.couchbase.org/69931
Tested-by: buildbot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -63,7 +63,7 @@

 #MSVC-specific flags for C/C++
 LIST(APPEND LCB_CL_CPPFLAGS /nologo /W3 /MP /EHsc)
-LIST(APPEND LCB_CL_CPPFLAGS /wd4800 /wd4244)
+LIST(APPEND LCB_CL_CPPFLAGS /wd4800 /wd4244 /wd4267)
 list2args(LCB_CL_CPPFLAGS)

 # Common flags for DEBUG


Remove redundant command invocation

Remove redundant command invocation

--- cmake/modules/JEGPFindDependencies.cmake
+++ cmake/modules/JEGPFindDependencies.cmake
@@ -10,5 +10,4 @@

 FetchContent_MakeAvailable(range-v3 jegp_cmake_modules)

-FetchContent_GetProperties(jegp_cmake_modules)
 list(APPEND CMAKE_MODULE_PATH "${jegp_cmake_modules_SOURCE_DIR}")


cmake/qibuild/modules support opencv 2.4.10

Change-Id: Ide720fe30426d4314bf625fbbe41d9c48b44f887
Reviewed-on: http://gerrit.aldebaran.lan/52948
Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com>
Tested-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com>

--- cmake/qibuild/modules/opencv2utils.cmake
+++ cmake/qibuild/modules/opencv2utils.cmake
@@ -2,7 +2,7 @@
 ## Use of this source code is governed by a BSD-style license that can be
 ## found in the COPYING file.

-set(_cv_versions "2.3.1" "2.4.3")
+set(_cv_versions "2.3.1" "2.4.3" "2.4.10")

 function(opencv2_flib name)
   cmake_parse_arguments(ARG "" "" "DEPENDS" ${ARGN})


CMake: - edit macro

CMake:
- edit macro

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -757,6 +757,14 @@
     SET(_script ${CMAKE_CURRENT_BINARY_DIR}/${script})
   ENDIF()

+  IF(WIN32)
+    SET(_ext "bat")
+    SET(_call_cmd "call")
+  ELSE()
+    SET(_ext "sh")
+    SET(_call_cmd ".")
+  ENDIF()
+
   SET(_env)
   FOREACH(_item ${_${PROJECT_NAME}_EXTRA_ENV})
     FOREACH(_val ${_${PROJECT_NAME}_EXTRA_ENV_${_item}})
@@ -764,13 +772,9 @@
         IF(${_item} STREQUAL "LD_LIBRARY_PATH")
           SET(_item PATH)
         ENDIF()
-        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")
-        SET(_ext "bat")
-        SET(_call_cmd "call")
+        STRING(REPLACE "/" "\\" _env "${_env} @SET ${_item}=${_val};%${_item}%\n")
       ELSE(WIN32)
         SET(_env "${_env} export ${_item}=${_val}:\${${_item}}\n")
-        SET(_ext "sh")
-        SET(_call_cmd ".")
       ENDIF(WIN32)
     ENDFOREACH()
   ENDFOREACH()


ensure escaping of preprocessor definition (fix #43)

--- core/rosbuild/core/rosbuild/public.cmake
+++ core/rosbuild/core/rosbuild/public.cmake
@@ -176,8 +176,12 @@
   # Check that the package directory is correct
   _rosbuild_check_package_location()

+  # force automatic escaping of preprocessor definitions
+  cmake_policy(PUSH)
+  cmake_policy(SET CMP0005 NEW)
   # Add ROS_PACKAGE_NAME define
-  add_definitions(-DROS_PACKAGE_NAME='\"${PROJECT_NAME}\"')
+  add_definitions(-DROS_PACKAGE_NAME=\"${PROJECT_NAME}\")
+  cmake_policy(POP)

   # ROS_BUILD_TYPE is set by rosconfig
   # RelWithAsserts is our own type, not supported by CMake


STYLE: remove debug output

Alex

--- CMake/FindPackageHandleStandardArgs.cmake
+++ CMake/FindPackageHandleStandardArgs.cmake
@@ -37,8 +37,6 @@
       SET(${_NAME_UPPER}_FOUND FALSE)
     ENDIF(NOT ${_CURRENT_VAR})
   ENDFOREACH(_CURRENT_VAR)
-
-  MESSAGE(STATUS "found ${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND}")

   IF (${_NAME_UPPER}_FOUND)
     IF (NOT ${_NAME}_FIND_QUIETLY)


Reorganize files into correct group for VS

Don't mix headers with generated files

--- CMake/ctkMacroBuildQtDesignerPlugin.cmake
+++ CMake/ctkMacroBuildQtDesignerPlugin.cmake
@@ -70,11 +70,12 @@
     "${dynamicHeaders};${CMAKE_CURRENT_BINARY_DIR}/${MY_EXPORT_HEADER_PREFIX}Export.h")

   # Make sure variable are cleared
+  SET(MY_MOC_CPP)
   SET(MY_UI_CPP)
   SET(MY_QRC_SRCS)

   # Wrap
-  QT4_WRAP_CPP(MY_SRCS ${MY_MOC_SRCS})
+  QT4_WRAP_CPP(MY_MOC_CPP ${MY_MOC_SRCS})
   QT4_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
   SET(MY_QRC_SRCS "")
   IF(DEFINED MY_RESOURCES)
@@ -87,13 +88,14 @@
     )

   SOURCE_GROUP("Generated" FILES
-    ${MY_MOC_SRCS}
+    ${MY_MOC_CPP}
     ${MY_QRC_SRCS}
     ${MY_UI_CPP}
     )
-
+
   ADD_LIBRARY(${lib_name} ${MY_LIBRARY_TYPE}
     ${MY_SRCS}
+    ${MY_MOC_CPP}
     ${MY_UI_CPP}
     ${MY_QRC_SRCS}
     )


Use CMake commands to build Sync

Use CMake commands to build Sync

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -73,7 +73,7 @@
     if(core_prefix)
         build_existing_realm_core(${core_prefix})
         if(sync_prefix)
-            build_existing_realm_sync(${sync_prefix})
+            build_existing_realm_sync(${sync_prefix} ${core_prefix})
         endif()
     elseif(enable_sync)
         # FIXME: Support building against prebuilt sync binaries.
@@ -240,17 +240,17 @@
         INSTALL_COMMAND ""
         CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory build.debug
                         && cd build.debug
-                        && cmake -D CMAKE_BUILD_TYPE=Debug -DREALM_BUILD_LIB_ONLY=YES -G Ninja ..
+                        && cmake -D CMAKE_BUILD_TYPE=Debug -G Ninja ..
                         && cd ..
                         && ${CMAKE_COMMAND} -E make_directory build.release
                         && cd build.release
-                        && cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -DREALM_BUILD_LIB_ONLY=YES -G Ninja ..
+                        && cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja ..

         BUILD_COMMAND cd build.debug
-                   && cmake --build . --target Core
+                   && ninja Core QueryParser
                    && cd ..
                    && cd build.release
-                   && cmake --build . --target Core
+                   && ninja Core QueryParser
         ${USES_TERMINAL_BUILD}
         ${ARGN}
         )
@@ -315,50 +315,39 @@
 endfunction()

 macro(build_realm_sync)
-    set(cmake_files ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
-    if(REALM_PLATFORM STREQUAL "Android")
-        set(build_cmd sh build.sh build-android)
-    else()
-        set(build_cmd make -C src/realm librealm-sync.a librealm-sync-dbg.a librealm-server.a librealm-server-dbg.a ${MAKE_FLAGS})
-    endif()
+    set(sync_prefix_directory "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync")

     ExternalProject_Add(realm-sync-lib
         DEPENDS realm-core
-        PREFIX ${cmake_files}/realm-sync
+        PREFIX ${sync_prefix_directory}
         BUILD_IN_SOURCE 1
         UPDATE_DISCONNECTED 1
-        BUILD_COMMAND ${build_cmd}
-        CONFIGURE_COMMAND ""
+        BUILD_COMMAND cd build.debug
+                   && ninja Sync SyncServer
+                   && cd ..
+                   && cd build.release
+                   && ninja Sync SyncServer
+        CONFIGURE_COMMAND ${CMAKE_COMMAND} -E make_directory build.debug
+                        && cd build.debug
+                        && cmake -DCMAKE_BUILD_TYPE=Debug -DREALM_BUILD_DOGLESS=OFF -DOPENSSL_ROOT_DIR=/usr -DREALM_CORE_BUILDTREE=${core_directory}/build.debug -G Ninja ..
+                        && cd ..
+                        && ${CMAKE_COMMAND} -E make_directory build.release
+                        && cd build.release
+                        && cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DREALM_BUILD_DOGLESS=OFF -DOPENSSL_ROOT_DIR=/usr -DREALM_CORE_BUILDTREE=${core_directory}/build.release -G Ninja ..
         INSTALL_COMMAND ""
         ${USES_TERMINAL_BUILD}
         ${ARGN}
         )

-    if(APPLE)
-        set(platform "")
-    elseif(REALM_PLATFORM STREQUAL "Android")
-        if(ANDROID_ABI STREQUAL "armeabi-v7a")
-            set(platform "-android-arm-v7a")
-        else()
-            set(platform "-android-${ANDROID_ABI}")
-        endif()
-    endif()
-
-
     ExternalProject_Get_Property(realm-sync-lib SOURCE_DIR)
-    set(sync_directory ${SOURCE_DIR})
-    if(REALM_PLATFORM STREQUAL "Android")
-        set(sync_library_directory ${sync_directory}/android-lib)
-    else()
-        set(sync_library_directory ${sync_directory}/src/realm)
-    endif()
-
-    set(sync_library_debug ${sync_library_directory}/librealm-sync${platform}-dbg.a)
-    set(sync_library_release ${sync_library_directory}/librealm-sync${platform}.a)
-    set(sync_libraries ${sync_library_debug} ${sync_library_release})
+
+    set(sync_debug_binary_dir "${SOURCE_DIR}/build.debug")
+    set(sync_release_binary_dir "${SOURCE_DIR}/build.release")
+    set(sync_library_debug "${sync_debug_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-sync-dbg${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    set(sync_library_release "${sync_release_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-sync${CMAKE_STATIC_LIBRARY_SUFFIX}")

     ExternalProject_Add_Step(realm-sync-lib ensure-libraries
-        BYPRODUCTS ${sync_libraries}
+        BYPRODUCTS ${sync_library_debug} ${sync_library_release}
         DEPENDEES build
         )

@@ -378,12 +367,11 @@
     set_property(TARGET realm-sync PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${sync_directory}/src)

     # Sync server library is built as part of the sync library build
-    set(sync_server_library_debug ${sync_library_directory}/librealm-server${platform}-dbg.a)
-    set(sync_server_library_release ${sync_library_directory}/librealm-server${platform}.a)
-    set(sync_server_libraries ${sync_server_library_debug} ${sync_server_library_release})
+    set(sync_server_library_debug "${sync_debug_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-server-dbg${CMAKE_STATIC_LIBRARY_SUFFIX}")
+    set(sync_server_library_release "${sync_release_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-server${CMAKE_STATIC_LIBRARY_SUFFIX}")

     ExternalProject_Add_Step(realm-sync-lib ensure-server-libraries
-        BYPRODUCTS ${sync_server_libraries}
+        BYPRODUCTS ${sync_server_library_debug} ${sync_server_library_release}
         DEPENDEES build
         )

@@ -400,7 +388,7 @@
     set_property(TARGET realm-sync-server PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES} ${YAML_LDFLAGS})
 endmacro()

-function(build_existing_realm_sync sync_directory)
+function(build_existing_realm_sync sync_directory core_directory)
     get_filename_component(sync_directory ${sync_directory} ABSOLUTE)
     build_realm_sync(URL ""
                      SOURCE_DIR ${sync_directory}


updated library name

updated library name

--- CMake/UseCyclus.cmake
+++ CMake/UseCyclus.cmake
@@ -44,15 +44,15 @@

   # install library
   install(TARGETS ${_dir}
-    LIBRARY DESTINATION lib${AGENT_PATH}
-    COMPONENT ${AGENT_PATH}
+    LIBRARY DESTINATION lib${_dir}
+    COMPONENT ${_dir}
     )

   # install headers
   IF(EXISTS "${BUILD_DIR}/${_name}.h")
     install(FILES ${BUILD_DIR}/${_name}.h
       DESTINATION include/cyclus
-      COMPONENT ${AGENT_PATH}
+      COMPONENT ${_dir}
       )
   ENDIF(EXISTS "${BUILD_DIR}/${_name}.h")


compile with -fno-threadsafe-statics and -fno-rtti to reduce footprint

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -30,10 +30,10 @@

 # set default compilation flags
-set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
+set(_C_FAMILY_FLAGS_INIT "-fno-threadsafe-statics -fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra")
 set(CMAKE_C_FLAGS_INIT   "-std=c99 ${_C_FAMILY_FLAGS_INIT}")
 set(CMAKE_ASM_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -x assembler-with-cpp")
-set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT}")
+set(CMAKE_CXX_FLAGS_INIT "${_C_FAMILY_FLAGS_INIT} -fno-rtti")
 set(CMAKE_MODULE_LINKER_FLAGS_INIT
     "-fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment"
 )


fpta-cmake: backport - don't treat warnings as errors for old MSVC.

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -473,7 +473,9 @@
   # Release builds should not cause extra trouble.
   if(CC_HAS_WERROR AND (CI OR CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Debug"))
     if(MSVC)
-      add_compile_flags("C;CXX" "/WX")
+      if(NOT MSVC_VERSION LESS 1910)
+        add_compile_flags("C;CXX" "/WX")
+      endif()
     elseif(HAVE_STD_C11 AND HAVE_STD_CXX11)
       add_compile_flags("C;CXX" "-Werror")
     endif()


CUDA 6.5 does not support sm_10 anymore and sm_11-sm_13 are deprecated. Stop compiling them with CUDA 6.5

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -52,12 +52,14 @@
 #   This script will modify CUDA_NVCC_FLAGS if system default is not gcc-4.3
 include (nvcc-check)

-set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
-      -gencode arch=compute_10,code=sm_10
-      -gencode arch=compute_11,code=sm_11
-      -gencode arch=compute_12,code=sm_12
-      -gencode arch=compute_13,code=sm_13
-    )
+if("${CUDA_VERSION}" LESS 6.5)
+  set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
+        -gencode arch=compute_10,code=sm_10
+        -gencode arch=compute_11,code=sm_11
+        -gencode arch=compute_12,code=sm_12
+        -gencode arch=compute_13,code=sm_13
+      )
+endif ()

 if("${CUDA_VERSION}" LESS 5.0)
  set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}


Fix error in cmake file.

Fix error in cmake file.

git-svn-id: bd2008fbba0f7d30fd6598b54f2cd88503fdd2e4@580 95f4ed2b-212e-0410-8b90-d31948207fce

--- cmake/FindFreeImage.cmake
+++ cmake/FindFreeImage.cmake
@@ -17,7 +17,7 @@
 		${PROJECT_SOURCE_DIR}/FreeImage
 		DOC "The FreeImage library")
 ELSE (WIN32)
-	FIND_PATH( FREEIMAGE_INCLUDE_PATH GL/glew.h
+	FIND_PATH( FREEIMAGE_INCLUDE_PATH FreeImage.h
 		/usr/include
 		/usr/local/include
 		/sw/include


updated link to xlink

updated link to xlink

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -13,9 +13,9 @@

 hunter_config(
     XLink
-    VERSION "luxonis-2020.2test1"
+    VERSION "luxonis-2020.2tests1"
     URL  "https://github.com/luxonis/XLink/archive/test_usb_info.zip"
-    SHA1 "28b8b0e795659c4c8c7626394d968007026635bc"
+    SHA1 "a7d978843ae819143405445a1e4e3337a9bc7f2c"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )


Call cmake executable in a portable way when copying DLLs

--- cmake/OpenSimMacros.cmake
+++ cmake/OpenSimMacros.cmake
@@ -271,7 +271,7 @@
             get_filename_component(DLL_NAME ${DLL} NAME)
             set(DEST_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR})
             add_custom_command(OUTPUT ${DLL_NAME}
-                               COMMAND cmake -E copy ${DLL} ${DEST_DIR}
+                               COMMAND ${CMAKE_COMMAND} -E copy ${DLL} ${DEST_DIR}
                                COMMENT "Copying ${DLL_NAME} to ${DEST_DIR}")
             list(APPEND DLL_NAMES ${DLL_NAME})
         endforeach()


[MLIR] Bump LLVM repo

[MLIR] Bump LLVM repo

There are some fixes for AVX-512 vectorization.

--- cmake/external_mlir.cmake
+++ cmake/external_mlir.cmake
@@ -20,7 +20,7 @@
 set(MLIR_REPO_URL https://github.com/tensorflow/mlir.git)

 # Change these commit IDs to move to latest stable versions
-set(MLIR_LLVM_COMMIT_ID f707dac742f)
+set(MLIR_LLVM_COMMIT_ID 4fe2732)
 set(MLIR_COMMIT_ID 40fe0fe7)

 # MLIR environment variables. Some of them are used by LIT tool.


Indentation fixups.

Indentation fixups.

svn path=/trunk/; revision=12064

--- cmake/modules/cairo.cmake
+++ cmake/modules/cairo.cmake
@@ -49,19 +49,19 @@

 # Look for cairo headers and libraries with pkg-config
 if(
-   PLD_memcairo
-OR PLD_pdfcairo
-OR PLD_pngcairo
-OR PLD_pscairo
-OR PLD_svgcairo
-OR PLD_xcairo
-OR PLD_extcairo
-OR PLD_wincairo
-)
+    PLD_memcairo
+    OR PLD_pdfcairo
+    OR PLD_pngcairo
+    OR PLD_pscairo
+    OR PLD_svgcairo
+    OR PLD_xcairo
+    OR PLD_extcairo
+    OR PLD_wincairo
+    )
   if(NOT PKG_CONFIG_EXECUTABLE)
     message(STATUS
-    "WARNING: pkg-config not found. Setting cairo drivers to OFF."
-    )
+      "WARNING: pkg-config not found. Setting cairo drivers to OFF."
+      )
     set(PLD_memcairo OFF CACHE BOOL "Enable memcairo device" FORCE)
     set(PLD_pdfcairo OFF CACHE BOOL "Enable pdfcairo device" FORCE)
     set(PLD_pngcairo OFF CACHE BOOL "Enable pngcairo device" FORCE)
@@ -72,35 +72,35 @@
     set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
   endif(NOT PKG_CONFIG_EXECUTABLE)
 endif(
-   PLD_memcairo
-OR PLD_pdfcairo
-OR PLD_pngcairo
-OR PLD_pscairo
-OR PLD_svgcairo
-OR PLD_xcairo
-OR PLD_extcairo
-OR PLD_wincairo
-)
+  PLD_memcairo
+  OR PLD_pdfcairo
+  OR PLD_pngcairo
+  OR PLD_pscairo
+  OR PLD_svgcairo
+  OR PLD_xcairo
+  OR PLD_extcairo
+  OR PLD_wincairo
+  )

 if(
-   PLD_memcairo
-OR PLD_pdfcairo
-OR PLD_pngcairo
-OR PLD_pscairo
-OR PLD_svgcairo
-OR PLD_xcairo
-OR PLD_extcairo
-OR PLD_wincairo
-)
+    PLD_memcairo
+    OR PLD_pdfcairo
+    OR PLD_pngcairo
+    OR PLD_pscairo
+    OR PLD_svgcairo
+    OR PLD_xcairo
+    OR PLD_extcairo
+    OR PLD_wincairo
+    )
   pkg_check_pkgconfig(
-  pangocairo
-  includedir
-  linkdir
-  linkflags
-  cflags
-  version
-  _CAIRO
-  )
+    pangocairo
+    includedir
+    linkdir
+    linkflags
+    cflags
+    version
+    _CAIRO
+    )
   if(linkflags)
     # Check that the pangocairo library version is recent
     # enough to efficiently handle text clipping.
@@ -115,13 +115,13 @@
     if(PLD_xcairo AND X11_COMPILE_FLAGS)
       # Blank-delimited required.
       string(REGEX REPLACE ";" " "
-      cairo_COMPILE_FLAGS "${cflags} ${X11_COMPILE_FLAGS}"
-      )
+	cairo_COMPILE_FLAGS "${cflags} ${X11_COMPILE_FLAGS}"
+	)
       set(cairo_LINK_FLAGS ${linkflags} ${X11_LIBRARIES})
     else(PLD_xcairo AND X11_COMPILE_FLAGS)
       message(STATUS
-       "WARNING: X windows not found. Setting xcairo driver to OFF."
-      )
+	"WARNING: X windows not found. Setting xcairo driver to OFF."
+	)
       # Blank-delimited required.
       set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE)
       # now deal with remaining cairo devices.
@@ -139,11 +139,11 @@
     message("linkflags = ${linkflags}")
     message("cflags = ${cflags}")
     message(STATUS
-       "WARNING: pango and/or cairo not found with pkg-config.\n"
-    "   Disabling cairo drivers.  To enable these drivers you must install\n"
-    "   development versions of pango and cairo and/or set\n"
-    "   the environment variable PKG_CONFIG_PATH appropriately."
-    )
+      "WARNING: pango and/or cairo not found with pkg-config.\n"
+      "   Disabling cairo drivers.  To enable these drivers you must install\n"
+      "   development versions of pango and cairo and/or set\n"
+      "   the environment variable PKG_CONFIG_PATH appropriately."
+      )
     set(PLD_memcairo OFF CACHE BOOL "Enable memcairo device" FORCE)
     set(PLD_pdfcairo OFF CACHE BOOL "Enable pdfcairo device" FORCE)
     set(PLD_pngcairo OFF CACHE BOOL "Enable pngcairo device" FORCE)
@@ -154,15 +154,15 @@
     set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
   endif(linkflags)
 endif(
-   PLD_memcairo
-OR PLD_pdfcairo
-OR PLD_pngcairo
-OR PLD_pscairo
-OR PLD_svgcairo
-OR PLD_xcairo
-OR PLD_extcairo
-OR PLD_wincairo
-)
+  PLD_memcairo
+  OR PLD_pdfcairo
+  OR PLD_pngcairo
+  OR PLD_pscairo
+  OR PLD_svgcairo
+  OR PLD_xcairo
+  OR PLD_extcairo
+  OR PLD_wincairo
+  )

 if(NOT PLD_xcairo)
   set(extXdrawable_true "#")


rosbuild_lite tweaks.

rosbuild_lite tweaks.

--- cmake/rosbuild_lite.cmake
+++ cmake/rosbuild_lite.cmake
@@ -35,7 +35,7 @@

   if (NOT ROS_PACKAGE_PATH)
     if ("$ENV{ROS_PACKAGE_PATH}" STREQUAL "")
-      message(STATUS "*** ROS_PACKAGE_PATH is not set... is your environment set correctly? Setting to default: ${ROS_PACKAGE_PATH}")
+      message(STATUS "*** ROS_PACKAGE_PATH is not set... is your environment set correctly? Setting to default: ${ROS_PACKAGE_PATH_DEFAULT}")
       set(ROS_PACKAGE_PATH ${ROS_PACKAGE_PATH_DEFAULT} CACHE PATH "ROS_PACKAGE_PATH path")
     else()
       set(ROS_PACKAGE_PATH "$ENV{ROS_PACKAGE_PATH}" CACHE PATH "ROS_PACKAGE_PATH path")


SVN_SILENT made messages (.desktop file)

--- plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake
+++ plugins/pintxo/ktpaccountskcm_plugin_pintxo.desktop.cmake
@@ -3,8 +3,12 @@
 Comment=Custom account configuration user interface for accounts using the Pintxo connection manager.
 Comment[cs]=Vlastní uživatelské rozhraní nastavení účtů pro účty používající správce spojení Pintxo.
 Comment[es]=Interfaz de configuración de cuentas personalizadas para las cuentas que usen el gestor de conexiones Pintxo.
+Comment[fi]=Pintxo-yhteyshallintaa käyttävien tilien mukautettu hallintakäyttöliittymä.
+Comment[it]=Interfaccia utente personalizzata di configurazione account per account che usano il gestore di connessioni Pintxo.
 Comment[nl]=Gebruikersinterface voor aangepaste accountconfiguratie voor accounts die de Pintxo verbindingenbeheerder gebruiken.
 Comment[pt]=Interface de utilizador de configuração de contas personalizadas com o gestor de ligações Pintxo.
+Comment[pt_BR]=Interface de configuração de contas personalizadas usando o gerenciador de conexões Pintxo.
+Comment[sl]=Uporabniški vmesnik za prilagoditev računov, ki uporabljajo upravljalnik povezav Pintxo.
 Comment[sv]=Användargränssnitt för anpassad kontoinställning av konton som använder anslutningshanteraren Pintxo.
 Comment[uk]=Інтерфейс користувача для нетипового налаштовування облікових записів, для роботи яких використовуються засоби керування з’єднанням Pintxo.
 Comment[x-test]=xxCustom account configuration user interface for accounts using the Pintxo connection manager.xx
@@ -12,8 +16,12 @@
 Name=Pintxo Account Configuration User Interface
 Name[cs]=Uživatelské rozhraní nastavení účtu Pintxo
 Name[es]=Interfaz de configuración de cuentas Pintxo
+Name[fi]=Pintxo-tilinmäärityksen käyttöliittymä
+Name[it]=Interfaccia utente di configurazione account Pintxo
 Name[nl]=Gebruikersinterface voor Pintxo accountconfiguratie
 Name[pt]=Interface de Configuração de Contas do Pintxo
+Name[pt_BR]=Interface de configuração de contas do Pintxo
+Name[sl]=Uporabniški vmesnik za nastavitev računov Pintxo
 Name[sv]=Användargränssnitt för inställning av Pintxo-konton
 Name[uk]=Інтерфейс користувача для налаштовування облікового запису Pintxo
 Name[x-test]=xxPintxo Account Configuration User Interfacexx


ENH: Must install jsoncpp into jsoncpp-build for find_package(jsoncpp)

--- CMake/Superbuild/External_JsonCpp.cmake
+++ CMake/Superbuild/External_JsonCpp.cmake
@@ -47,8 +47,8 @@
   set( ${proj}_DIR ${CMAKE_BINARY_DIR}/${proj}-build )

   ExternalProject_Add( ${proj}
-    URL ${${proj}_URL}
-    URL_MD5 ${${proj}_HASH_OR_TAG}
+    GIT_REPOSITORY ${${proj}_URL}
+    GIT_TAG ${${proj}_HASH_OR_TAG}
     DOWNLOAD_DIR ${${proj}_SOURCE_DIR}
     SOURCE_DIR ${${proj}_SOURCE_DIR}
     BINARY_DIR ${${proj}_DIR}
@@ -69,7 +69,8 @@
       -DBUILD_SHARED_LIBS:BOOL=OFF
       -DJSONCPP_LIB_BUILD_SHARED:BOOL=OFF
       -DJSONCPP_WITH_TESTS:BOOL=OFF
-    INSTALL_COMMAND "" )
+      -DCMAKE_INSTALL_PREFIX:PATH=${${proj}_DIR}
+    INSTALL_COMMAND make install )

 else( NOT DEFINED ${proj}_DIR AND NOT ${USE_SYSTEM_JSONCPP} )
   if( ${USE_SYSTEM_JSONCPP} )


[cmake] Allow C++ files also in the kernel/ directory

--- kernel/sources.cmake
+++ kernel/sources.cmake
@@ -5,8 +5,11 @@
    KERNEL_NOARCH_SOURCES_GLOB

    "${CMAKE_SOURCE_DIR}/kernel/*.c"
+   "${CMAKE_SOURCE_DIR}/kernel/*.cpp"
    "${CMAKE_SOURCE_DIR}/kernel/*/*.c"
+   "${CMAKE_SOURCE_DIR}/kernel/*/*.cpp"
    "${CMAKE_SOURCE_DIR}/kernel/fs/*/*.c"
+   "${CMAKE_SOURCE_DIR}/kernel/fs/*/*.cpp"
    "${CMAKE_SOURCE_DIR}/common/*.c"
    "${CMAKE_SOURCE_DIR}/common/3rd_party/datetime.c"
    "${CMAKE_SOURCE_DIR}/common/3rd_party/crc32.c"


Updated how snprintf and vsnprintf are discovered by cmake.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -120,13 +120,8 @@
 check_function_exists(isblank HAVE_ISBLANK)
 check_function_exists(strncpy HAVE_STRNCPY)

-if(MSVC14)
-	check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
-	check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
-else(MSVC14)
-	check_function_exists(vsnprintf HAVE_VSNPRINTF)
-	check_function_exists(snprintf HAVE_SNPRINTF)
-endif(MSVC14)
+check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
+check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)

 if (WIN32)
     check_function_exists(_strtoui64 HAVE__STRTOUI64)


aerofc: Remove unused modules

aerofc: Remove unused modules

--- cmake/configs/nuttx_aerofc-v1_default.cmake
+++ cmake/configs/nuttx_aerofc-v1_default.cmake
@@ -12,16 +12,12 @@
 	drivers/led
 	#drivers/px4fmu
 	drivers/boards/aerofc-v1
-	drivers/rgbled_pwm
 	drivers/tap_esc
 	drivers/mpu6500
 	drivers/ms5611
 	drivers/hmc5883
 	drivers/gps
-	drivers/airspeed
-	drivers/meas_airspeed
 	modules/sensors
-	drivers/camera_trigger

 	#
 	# System commands


Added license for CheckFunctionExistsMath.cmake

--- cmake/modules/CheckFunctionExistsMath.cmake
+++ cmake/modules/CheckFunctionExistsMath.cmake
@@ -14,6 +14,16 @@
 #  CMAKE_REQUIRED_INCLUDES = list of include directories
 #  CMAKE_REQUIRED_LIBRARIES = list of libraries to link

+#=============================================================================
+# Copyright 2002-2011 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================

 MACRO(CHECK_FUNCTION_EXISTS_MATH FUNCTION VARIABLE)
   IF("${VARIABLE}" MATCHES "^${VARIABLE}$")


SearchInstalledSoftware.cmake: fix OSX + no Cocoa + X11 setup

`OPENGL_FOUND` and `OPENGL_GLU_FOUND` are only available if
`find_package(OpenGL)` is used, which is not the case if you are
building without Cocoa on OSX.

Check for `OPENGL_LIBRARIES` which is set in both if-statement paths.

Signed-off-by: David Abdurachmanov <2419a0a16e44b15c2b2bf46aca45ed45f4079c78@cern.ch>

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -287,7 +287,7 @@
   else()
     find_package(OpenGL)
   endif()
-  if(NOT OPENGL_FOUND OR NOT OPENGL_GLU_FOUND)
+  if(NOT OPENGL_LIBRARIES)
     if(fail-on-missing)
       message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required")
     else()


[CI] add very verbose option to ctest (cdash current failure)

--- CI/cmake/Docker.cmake
+++ CI/cmake/Docker.cmake
@@ -97,7 +97,7 @@
   # the options needed by ctest to prepare the pipeline (cmake, make ...)
   # like SITE, config file ...
   # If CI_OPTIONS is empty, default.cmake will be used.
-  set(CTEST_OPTIONS ${CI_OPTIONS};-DWITH_DOCKER=0;-V)
+  set(CTEST_OPTIONS ${CI_OPTIONS};-DWITH_DOCKER=0;-VV)

   foreach(_f ${CTEST_OPTIONS})


Forgot LIB_SUFFIX

Forgot LIB_SUFFIX

--- src/yajl.pc.cmake
+++ src/yajl.pc.cmake
@@ -1,5 +1,5 @@
 prefix=${CMAKE_INSTALL_PREFIX}
-libdir=${dollar}{prefix}/lib
+libdir=${dollar}{prefix}/lib${LIB_SUFFIX}
 includedir=${dollar}{prefix}/include/yajl

 Name: Yet Another JSON Library


Factor and update check for variable existance.

    * build-aux/cmake/modules/ProjectInfo.cmake: Here.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -15,6 +15,12 @@
 if(NOT PROJECT_INFO_CMAKE)
   set(PROJECT_INFO_CMAKE TRUE)

+  check_cmake_vars_exists(
+    PROJECT_VERSION_MAJOR
+    PROJECT_VERSION_MINOR
+    PROJECT_LONGNAME
+    )
+
   set(PROJECT_COPYRIGHT_HOLDER "Gostai S.A.S")
   set(PROJECT_COPYRIGHT_YEARS "2006-2008")

@@ -28,15 +34,9 @@

   set(PROJECT_VERSION_PATCH ${PROJECT_REVISION})

-  check_cmake_vars_exists(
-    PROJECT_VERSION_MAJOR
-    PROJECT_VERSION_MINOR
-    PROJECT_VERSION_PATCH
-    )
   set(PROJECT_VERSION
     "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")

-  check_cmake_vars_exists(PROJECT_LONGNAME PROJECT_VERSION)
   set(PROJECT_STRING "${PROJECT_LONGNAME} ${PROJECT_VERSION}")

   set(PROJECT_TARNAME "${PROJECT_NAME}-${PROJECT_VERSION}")


Add the project name in the tag message.

	* build-aux/cmake/modules/ProjectInfo.cmake: Do that.

--- build-aux/cmake/modules/ProjectInfo.cmake
+++ build-aux/cmake/modules/ProjectInfo.cmake
@@ -310,7 +310,7 @@
     ${PROJECT_VERSION})

   # Format the next tag message.
-  set(PROJECT_PROJECT_TAG_MSG "Release ")
+  set(PROJECT_PROJECT_TAG_MSG "Release ${PROJECT_NAME}")
   if(PROJECT_VENDOR)
     set(PROJECT_TAG_MSG "${PROJECT_TAG_MSG} for Gostai")
   else(PROJECT_VENDOR)


fix a bug in FindGlog.cmake

fix a bug in FindGlog.cmake

Summary:
Call `find_package_handle_standard_args()` with a package name of `Glog`
rather than `glog`, so that it sets `Glog_FOUND` rather than `glog_FOUND`.
This argument needs to match the case of our file name (FindGlog.cmake), since
CMake variables are case-sensitive.

Reviewed By: Orvid

Differential Revision: D36678745

fbshipit-source-id: 6a0578103d12684e414664b17f7880664c0141f4

--- build/fbcode_builder/CMake/FindGlog.cmake
+++ build/fbcode_builder/CMake/FindGlog.cmake
@@ -19,7 +19,7 @@

 select_library_configurations(GLOG)

-find_package_handle_standard_args(glog DEFAULT_MSG
+find_package_handle_standard_args(Glog DEFAULT_MSG
   GLOG_LIBRARY
   GLOG_INCLUDE_DIR)


Print packing errors

Print packing errors

[skip ci]

--- cmake/modules/hunter_pack_directory.cmake
+++ cmake/modules/hunter_pack_directory.cmake
@@ -36,27 +36,24 @@
     list(APPEND cmd "${x}")
   endforeach()

-  if(HUNTER_STATUS_DEBUG)
-    set(logging_params "")
-  elseif(HUNTER_STATUS_PRINT)
-    set(logging_params "")
-  else()
-    set(logging_params "OUTPUT_QUIET")
-  endif()
-
   hunter_print_cmd("${dir_to_pack}" "${cmd}")

   execute_process(
       COMMAND ${cmd}
       WORKING_DIRECTORY "${dir_to_pack}"
       RESULT_VARIABLE packing_result
-      ${logging_params}
+      OUTPUT_VARIABLE packing_output
+      ERROR_VARIABLE packing_error
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      ERROR_STRIP_TRAILING_WHITESPACE
   )

   if(packing_result EQUAL 0)
     hunter_status_debug("Packing successful: ${temp}")
   else()
-    hunter_internal_error("Packing failed")
+    hunter_internal_error(
+        "Packing failed (${packing_result}, ${packing_output}, ${packing_error})"
+    )
   endif()

   file(SHA1 "${temp}" archive_sha1)


cmake: fix crosstool-NG version check regex

--- tools/cmake/crosstool_version_check.cmake
+++ tools/cmake/crosstool_version_check.cmake
@@ -12,11 +12,11 @@

 function(crosstool_version_check expected_ctng_version)
     execute_process(
-        COMMAND ${CMAKE_C_COMPILER} -v
-        ERROR_VARIABLE toolchain_stderr
-        OUTPUT_QUIET)
+        COMMAND ${CMAKE_C_COMPILER} --version
+        OUTPUT_VARIABLE toolchain_version
+        ERROR_QUIET)

-    string(REGEX MATCH "crosstool-ng-[0-9a-g\\.-]+" ctng_version "${toolchain_stderr}")
+    string(REGEX REPLACE ".*(crosstool-NG ([^\)]+)).*\n" "\\2" ctng_version "${toolchain_version}")
     # We use FIND to match version instead of STREQUAL because some toolchains are built
     # with longer git hash strings than others. This will match any version which starts with
     # the expected version string.


don't build ctags if on a mac and also using etags because of the case insensitive filesystem

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@50999 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuBuildTagDatabases.cmake
+++ cmake_modules/TokuBuildTagDatabases.cmake
@@ -36,7 +36,9 @@
   )

 option(USE_CTAGS "Build the ctags database." ON)
-if (USE_CTAGS)
+if (USE_CTAGS AND
+    # Macs by default are not case-sensitive, so tags and TAGS clobber each other.  Do etags and not ctags in that case, because Emacs is superior. :P
+    (NOT APPLE OR NOT USE_ETAGS))
   find_program(CTAGS "ctags")
   if (NOT CTAGS MATCHES NOTFOUND)
     add_custom_command(


Revert mistake

Revert mistake

Accidentally changed the linux build to use .obj too for generators!

Former-commit-id: 24d50f6a657336c3014eb09ae521c96201ab9460

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -111,11 +111,11 @@
   else()
     if (NOT target_is_pnacl)
       add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
-                                "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.obj"
+                                "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
         DEPENDS "${args_GENERATOR_TARGET}"
         COMMAND "${CMAKE_BINARY_DIR}/bin/${generator_exec}" ${invoke_args}
         # Create an archive using ar (or similar)
-        COMMAND "${CMAKE_AR}" q "${FILTER_LIB}" "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.obj"
+        COMMAND "${CMAKE_AR}" q "${FILTER_LIB}" "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.o"
         WORKING_DIRECTORY "${SCRATCH_DIR}"
         )
     else()


--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -66,7 +66,7 @@
 Comment[ca@valencia]=Dorsal GStreamer del Phonon
 Comment[cs]=Podpůrná vrstva GStreamer pro Phonon
 Comment[da]=GStreamer-backend til Phonon
-Comment[de]=Phonon-Back-End für GStreamer
+Comment[de]=Phonon-Treiber für GStreamer
 Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon


ulp: fix passing ulp srcs due to cmake_args bug

--- components/ulp/component_ulp_common.cmake
+++ components/ulp/component_ulp_common.cmake
@@ -21,6 +21,10 @@
                         ${ulp_artifacts_prefix}.sym
                         ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}/esp32.ulp.ld)

+    # Replace the separator for the list of ULP source files that will be passed to
+    # the external ULP project. This is a workaround to the bug https://public.kitware.com/Bug/view.php?id=16137.
+    string(REPLACE ";" "|" ulp_s_sources "${ulp_s_sources}")
+
     externalproject_add(${ULP_APP_NAME}
         SOURCE_DIR ${IDF_PATH}/components/ulp/cmake
         BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}
@@ -29,6 +33,8 @@
                     -DCMAKE_TOOLCHAIN_FILE=${IDF_PATH}/components/ulp/cmake/toolchain-ulp.cmake
                     -DULP_S_SOURCES=${ulp_s_sources} -DULP_APP_NAME=${ULP_APP_NAME}
                     -DCOMPONENT_PATH=${COMPONENT_PATH}
+                    # Even though this resolves to a ';' separated list, this is fine. This must be special behavior
+                    # for generator expressions.
                     -DCOMPONENT_INCLUDES=$<TARGET_PROPERTY:${COMPONENT_NAME},INTERFACE_INCLUDE_DIRECTORIES>
                     -DIDF_PATH=${IDF_PATH}
                     -DSDKCONFIG=${SDKCONFIG_HEADER}
@@ -36,6 +42,7 @@
         BUILD_BYPRODUCTS ${ulp_artifacts} ${ulp_artifacts_extras} ${ulp_ps_sources}
                         ${CMAKE_CURRENT_BINARY_DIR}/${ULP_APP_NAME}/${ULP_APP_NAME}
         BUILD_ALWAYS 1
+        LIST_SEPARATOR |
         )

     spaces2list(ULP_EXP_DEP_SRCS)


A bit more relaxed...

A bit more relaxed...

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

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -261,7 +261,8 @@
 # Pass all relevant variables down to configure:
 GET_CMAKE_PROPERTY(_variables VARIABLES)
 FOREACH(_var ${_variables})
-  IF( _var MATCHES "^(TEST|DEAL_II)_" OR
+  IF( _var MATCHES "^(TEST|DEAL_II|ALLOW|WITH|FORCE|COMPONENT)_" OR
+      _var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PARAMETER_GUI)" OR
       _var MATCHES "^(ARPACK|BOOST|FUNCTIONPARSER|HDF5|METIS|MPI|MUMPS)_" OR
       _var MATCHES "^(NETCDF|P4EST|PETSC|SLEPC|THREADS|TBB|TRILINOS)_" OR
       _var MATCHES "^(UMFPACK|ZLIB|LAPACK)_" OR


ENH: remove legacy  (2003?) -flat_namespace flag on MacOSX,as this would prevent the Tcl libraries from being loaded in a Tcl shell. See whole discussion with Tcl people at https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1961211&group_id=10894

--- CMake/vtkDetermineCompilerFlags.cmake
+++ CMake/vtkDetermineCompilerFlags.cmake
@@ -73,8 +73,8 @@
 ENDIF(CMAKE_COMPILER_IS_GNUCXX)

 IF(APPLE)
-  SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -Wl,-flat_namespace,-U,_environ")
-  SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-flat_namespace,-U,_environ")
+  SET(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -Wl,-U,_environ")
+  SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-U,_environ")
   IF(CMAKE_COMPILER_IS_GNUCXX)
     SET(VTK_REQUIRED_C_FLAGS "${VTK_REQUIRED_C_FLAGS} -no-cpp-precomp")
     SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -no-cpp-precomp")


STATUS/DIFFLOG works

STATUS/DIFFLOG works

--- Modules/CakePkg.cmake
+++ Modules/CakePkg.cmake
@@ -233,7 +233,7 @@
     if(output_var_out STREQUAL _)
       set(output_var_option "")
     else()
-      set(output_var_option OUTPUT_VARIABLE output_variable)
+      set(output_var_option OUTPUT_VARIABLE output_variable OUTPUT_STRIP_TRAILING_WHITESPACE)
     endif()
     execute_process(
       COMMAND ${GIT_EXECUTABLE} ${command_line}
@@ -370,7 +370,13 @@
         set(ans "${pk}" PARENT_SCOPE)
         return()
       else()
-        message(FATAL_ERROR "[cake_pkg] The repository ${repo_url} has already been cloned to ${existing_destination}, the current request is to clone it to ${destination}. This sitatuation usually comes up when a repository is cloned as an external dependency to an automatic location then later you add the same repository as a subdirectory to your project. Possible solution: add this repository as subdirectory before all other references to it. You also need to remove the current clone manually, either by removing the directory ${existing_destination} or by calling 'cakepkg REMOVE ...'.")
+        message(FATAL_ERROR "[cake_pkg] The repository ${repo_url} has already been cloned to "
+          "${existing_destination}, the current request is to clone it to ${destination}. This sitatuation "
+          "usually comes up when a repository is cloned as an external dependency to an automatic location "
+          "then later you add the same repository as a subdirectory to your project. Possible solution: "
+          "add this repository as subdirectory before all other references to it. You also need to remove "
+          "the current clone manually, either by removing the directory ${existing_destination} or by calling "
+          "'cakepkg REMOVE ...'.")
       endif()
     endif()

@@ -420,6 +426,32 @@
       message(FATAL_ERROR "[cake_pkg] git clone failed")
     endif()

+    execute_process(COMMAND ${GIT_EXECUTABLE} symbolic-ref -q --short HEAD
+      WORKING_DIRECTORY ${resolved_destination}
+      OUTPUT_VARIABLE o
+      ERROR_VARIABLE e
+      RESULT_VARIABLE r
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(r EQUAL 0)
+      # HEAD is a symbolic ref
+      set(branch "${o}")
+    elseif(r EQUAL 1)
+      # detached head
+      execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
+        WORKING_DIRECTORY ${resolved_destination}
+        OUTPUT_VARIABLE o
+        ERROR_VARIABLE e
+        RESULT_VARIABLE r
+        OUTPUT_STRIP_TRAILING_WHITESPACE)
+        if(r)
+          message(FATAL_ERROR "[cake_pkg] 'git rev-parse HEAD' returned ${r} (${e})")
+        else()
+          set(branch "${o}")
+        endif()
+    else()
+      message(FATAL_ERROR "[cake_pkg] 'git symbolic-ref -q --short HEAD' returned ${r} (${e}).")
+    endif()
+
     if(NOT name)
       set(name "${url_cid}")
     endif()
@@ -433,7 +465,8 @@
       url "${repo_url}"
       project "${project}"
       name "${name}"
-      destination "${resolved_destination}")
+      destination "${resolved_destination}"
+      branch "${branch}")

     set(ans "${pk}" PARENT_SCOPE)

@@ -712,28 +745,114 @@
         message(FATAL_ERROR "[cake_pkg] this option is not implemented")
       else()
         # batch report
-        file(GLOB dirs ${CAKE_PKG_REPOS_DIR}/*)
-        foreach(d ${dirs})
-          if(IS_DIRECTORY "${d}")
-            if(ARG_COMMAND)
-              set(command ${ARG_COMMAND})
-            elseif(ARG_CMDC)
-              set(command cmd /c ${ARG_CMDC})
-            elseif(ARG_SHC)
-              string(REPLACE \; " " v "${ARG_SHC}")
-              cmake_print_variables(ARG_SHC v)
-              set(command sh -c "${v}")
-            else()
-              message(FATAL_ERROR "[cake_pkg] internal error while assembling command")
-            endif()
-            cake_list_to_command_line_like_string(s "${command}")
-            message(STATUS "cd ${d}")
-            message(STATUS "${s}")
+        set(command "")
+        if(ARG_COMMAND)
+          set(command ${ARG_COMMAND})
+        elseif(ARG_CMDC)
+          set(command cmd /c ${ARG_CMDC})
+        elseif(ARG_SHC)
+          string(REPLACE \; " " v "${ARG_SHC}")
+          set(command sh -c "${v}")
+        elseif(ARG_STATUS)
+        elseif(ARG_DIFFLOG)
+        else()
+          message(FATAL_ERROR "[cake_pkg] internal error while assembling command")
+        endif()
+        string(REGEX MATCHALL "\t[0-9]+cid=" pks "${CAKE_REPO_DB}")
+        string(REGEX MATCHALL "[0-9]+" pks "${pks}")
+        cake_list_to_command_line_like_string(s "${command}")
+        foreach(pk ${pks})
+          cake_repo_db_get_field_by_pk(destination "${pk}")
+          set(destination "${ans}")
+          cake_repo_db_get_field_by_pk(branch "${pk}")
+          set(branch "${ans}")
+          cake_repo_db_get_field_by_pk(project "${pk}")
+          set(project "${ans}")
+          cake_repo_db_get_field_by_pk(name "${pk}")
+          set(name "${ans}")
+          if(command)
+            message(STATUS "cd ${destination}")
             execute_process(COMMAND ${command}
-              WORKING_DIRECTORY ${d}
+              WORKING_DIRECTORY "${destination}"
               RESULT_VARIABLE r)
             if(r)
               message(FATAL_ERROR "[cake_pkg] Result: ${r}")
+            endif()
+          elseif(ARG_STATUS OR ARG_DIFFLOG)
+            execute_process(COMMAND ${GIT_EXECUTABLE} status -s
+              WORKING_DIRECTORY "${destination}"
+              OUTPUT_VARIABLE o_gs
+              ERROR_VARIABLE e
+              RESULT_VARIABLE r)
+            if(r)
+              message(FATAL_ERROR "[cake_pkg] 'git status -s' failed: ${r} (${e})")
+            endif()
+            execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline origin/${branch}..HEAD
+              WORKING_DIRECTORY "${destination}"
+              OUTPUT_VARIABLE o_before
+              ERROR_VARIABLE e
+              RESULT_VARIABLE r)
+            if(r)
+              message(FATAL_ERROR "[cake_pkg] 'git log --oneline origin/${branch}..HEAD' failed: ${r} (${e})")
+            endif()
+            execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
+              WORKING_DIRECTORY "${destination}"
+              OUTPUT_VARIABLE o_behind
+              ERROR_VARIABLE e
+              RESULT_VARIABLE r)
+            if(r)
+              message(FATAL_ERROR "[cake_pkg] 'git log --oneline HEAD..origin/${branch}' failed: ${r} (${e})")
+            endif()
+            string(REGEX REPLACE "[^\n]" "" o_before "${o_before}")
+            string(REGEX REPLACE "[^\n]" "" o_behind "${o_behind}")
+            string(LENGTH "${o_before}" o_before)
+            string(LENGTH "${o_behind}" o_behind)
+            if(ARG_STATUS)
+              if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0 OR o_gs)
+                if(o_before EQUAL 0 AND o_behind EQUAL 0)
+                  message(STATUS "${name} (${project}): up to date origin/${branch}")
+                else()
+                  set(s "")
+                  if(o_before EQUAL 0)
+                    set(s "${o_behind} to pull from")
+                  elseif(o_behind EQUAL 0)
+                    set(s "${o_before} to push to")
+                  else()
+                    set(s "diverged (-${o_behind}/+${o_before}) from")
+                  endif()
+                  message(STATUS "${name} (${project}): ${s} [origin/${branch}]")
+                endif()
+                execute_process(COMMAND ${GIT_EXECUTABLE} status -sb
+                  WORKING_DIRECTORY ${destination}
+                  RESULT_VARIABLE r)
+                if(r)
+                  message(FATAL_ERROR "[cake_pkg] 'git status -sb' returned ${r} (${e})")
+                endif()
+              endif()
+            else()
+              # DIFFLOG
+              if(NOT o_before EQUAL 0 OR NOT o_behind EQUAL 0)
+                message(STATUS "${name} (${project})")
+                set(s "")
+                if(NOT o_behind EQUAL 0)
+                  message("\t${o_behind} to pull from [origin/${branch}]:")
+                  execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline HEAD..origin/${branch}
+                    WORKING_DIRECTORY ${destination}
+                    RESULT_VARIABLE r)
+                  if(r)
+                    message(FATAL_ERROR "[cake_pkg] 'git log --oneline HEAD..origin/${branch}' returned ${r} (${e})")
+                  endif()
+                endif()
+                if(NOT o_before EQUAL 0)
+                  message("\t${o_before} to push to [origin/${branch}]:")
+                  execute_process(COMMAND ${GIT_EXECUTABLE} log --oneline origin/${branch}..HEAD
+                    WORKING_DIRECTORY ${destination}
+                    RESULT_VARIABLE r)
+                  if(r)
+                    message(FATAL_ERROR "[cake_pkg] 'git log --oneline origin/${branch}..HEAD' returned ${r} (${e})")
+                  endif()
+                endif()
+              endif()
             endif()
           endif()
         endforeach()


Added advapi32.lib to windows dependencies (for CURL)

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -141,7 +141,7 @@
     SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${CURL_LIBRARY})
     IF(WIN32)
       SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DCURL_STATICLIB)
-      SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} wldap32.lib)
+      SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} wldap32.lib advapi32.lib)
     ENDIF(WIN32)
   ELSE(CURL_FOUND)
     MESSAGE("GLPK library not found, setting DHAVE_CURL=0")


Merging in AddLibrary v0.6 changes

Merging in AddLibrary v0.6 changes

--- _cmake/AddLibrary/LibraryFunction.cmake
+++ _cmake/AddLibrary/LibraryFunction.cmake
@@ -45,6 +45,18 @@
 	foreach(local_dep ${local_target_lib_deps})
 		add_dependencies(${library_name} ${local_dep})
 	endforeach()
+
+	set(all_deps ${dependencies} ${platform_dependencies})
+	list(LENGTH all_deps hasLinkLibs)
+
+	# add link dependencies if present
+	if(hasLinkLibs GREATER 0)
+		target_link_libraries(
+			"${library_name}"
+			${dependencies}
+			${platform_dependencies}
+        )
+	endif()

 	# build a testing library that holds mocks and test dummies
 	set(testing_lib "")


ARROW-3734: [C++] Linking static zstd library fails on Arch x86-64

Author: Dimitri Vorona <vorona@in.tum.de>

Closes #2926 from alendit/fix-zstd-compilation and squashes the following commits:

8d570da5 <Dimitri Vorona> Fix zstd linking path

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1065,12 +1065,12 @@
         "-DZSTD_MULTITHREAD_SUPPORT=off")

     if (MSVC)
-      set(ZSTD_STATIC_LIB "${ZSTD_PREFIX}/lib/zstd_static.lib")
+      set(ZSTD_STATIC_LIB "${ZSTD_PREFIX}/${CMAKE_INSTALL_LIBDIR}/zstd_static.lib")
       if (ARROW_USE_STATIC_CRT)
         set(ZSTD_CMAKE_ARGS ${ZSTD_CMAKE_ARGS} "-DZSTD_USE_STATIC_RUNTIME=on")
       endif()
     else()
-      set(ZSTD_STATIC_LIB "${ZSTD_PREFIX}/lib/libzstd.a")
+      set(ZSTD_STATIC_LIB "${ZSTD_PREFIX}/${CMAKE_INSTALL_LIBDIR}/libzstd.a")
       # Only pass our C flags on Unix as on MSVC it leads to a
       # "incompatible command-line options" error
       set(ZSTD_CMAKE_ARGS ${ZSTD_CMAKE_ARGS}


Add <DEFINES> and <CMAKE_C_LINK_FLAGS> to our custom commands

--- toolchain/Platform/Freescale-chc12.cmake
+++ toolchain/Platform/Freescale-chc12.cmake
@@ -177,8 +177,8 @@
 #
 # Compiler invocation.
 #
-SET (CMAKE_C_COMPILE_OBJECT 			"\"${HC12_PIPER}\" \"${CMAKE_C_COMPILER}\" <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")
-SET (CMAKE_CXX_COMPILE_OBJECT 			"\"${HC12_PIPER}\" \"${CMAKE_CXX_COMPILER}\" <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")
+SET (CMAKE_C_COMPILE_OBJECT 			"\"${HC12_PIPER}\" \"${CMAKE_C_COMPILER}\" <DEFINES> <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")
+SET (CMAKE_CXX_COMPILE_OBJECT 			"\"${HC12_PIPER}\" \"${CMAKE_CXX_COMPILER}\" <DEFINES> <FLAGS> -ObjN=<OBJECT> -EnvERRORFILE=${HC12_ERR_OUTPUT_DIR}/%n.err -Lasm=${HC12_LST_OUTPUT_DIR}/%n.lst <SOURCE>")

 #
 # Librarian invocation.
@@ -195,7 +195,7 @@
 #
 # Link invocation.
 #
-SET (CMAKE_C_LINK_EXECUTABLE "\"${HC12_PIPER}\" \"<CMAKE_LINKER>\" -Add{<OBJECTS>} -Add{${HC12_START12}} -Add{${HC12_RTL_LIBS}} <LINK_FLAGS> <LINK_LIBRARIES> -O<TARGET> ${HC12_LINK_PRM_FILE}")
+SET (CMAKE_C_LINK_EXECUTABLE "\"${HC12_PIPER}\" \"<CMAKE_LINKER>\" -Add{<OBJECTS>} -Add{${HC12_START12}} -Add{${HC12_RTL_LIBS}} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> -O<TARGET> ${HC12_LINK_PRM_FILE}")

 #
 # Create custom output directories.


Revise ctest script for cmake/ctest 2.4

Revise ctest script for cmake/ctest 2.4

--- flies-selenium/src/test/BasicMacros.cmake
+++ flies-selenium/src/test/BasicMacros.cmake
@@ -94,24 +94,20 @@
 	        SET(setting_sign ${_arg})
 	    ENDIF(${_arg} STREQUAL "UNQUOTED")
 	ENDFOREACH(_arg)
-	SET(_find_pattern "${attr_name}[ \\t]*${setting_sign}.*")
+	SET(_find_pattern "\n[ \\t]*${attr_name}[ \\t]*${setting_sign}[^\n]*")
 	SET(_ignore_pattern "[ \\t]*${attr_name}[ \\t]*${setting_sign}")

-	FILE(STRINGS ${setting_file} _txt_content)
+	FILE(READ ${setting_file} _txt_content)
+	SET(_txt_content "\n${_txt_content}\n")
+	STRING(REGEX MATCHALL "${_find_pattern}" _matched_lines "${_txt_content}")
+	MESSAGE("attr_name=${attr_name} _matched_lines=|${_matched_lines}|")
 	SET(_result_line)
-	FOREACH(_line ${_txt_content})
-	    STRING(REGEX MATCH "^#" _commented "${_line}")
-	    IF(_commented)
-		# Commented, skipped.
-	    ELSE()
-		STRING(REGEX MATCH "${_find_pattern}" _matched_line "${_line}")
-		IF (_matched_line)
-		    #	MESSAGE("### _matched_line=${_matched_line}")
-		    STRING(REGEX REPLACE "${_ignore_pattern}" "" _result_line "${_matched_line}")
-		    BREAK()
-		ENDIF(_matched_line)
-	    ENDIF()
-	ENDFOREACH(_line)
+
+	# Last line should get priority.
+	FOREACH(_line ${_matched_line})
+	    SET(_result_line _line)
+	ENDFOREACH()
+
 	#MESSAGE("### _result_line=${_result_line}|")
 	IF(_result_line)
 	    STRING_TRIM(${var} "${_result_line}" ${_UNQUOTED})
@@ -120,7 +116,8 @@
 	ELSE(_result_line)
 	    SET(${var} "")
 	ENDIF(_result_line)
-	#MESSAGE("### var=${var}|")
+	#SET(value "${${var}}")
+	#MESSAGE("### ${var}=${value}|")
     ENDMACRO(SETTING_FILE_GET_ATTRIBUTE var attr_name setting_file)

     MACRO(DATE_FORMAT date_var format)


really fix unix build.

really fix unix build.

--- tools/cmake/ANHPythonBinding.cmake
+++ tools/cmake/ANHPythonBinding.cmake
@@ -107,14 +107,14 @@
 		set(BINDING_PREFIX ../)
     else()
         set(BINDING_POSTFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
-		set(BINDING_PREFIX swgpy/${base_name}/)
+		set(BINDING_PREFIX "")
     endif()

     # Create the Common library
 	ADD_LIBRARY(${name} SHARED ${ANHPYTHONLIB_SOURCES})
 	SET_TARGET_PROPERTIES(${name}
 		PROPERTIES OUTPUT_NAME py_${base_name}
-		LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+		LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/swgpy/${base_name}/
 		RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/swgpy/${base_name}
 		RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/swgpy/${base_name}
 		PREFIX "${BINDING_PREFIX}"


need to revert the jpeg change pat made for now


Provide verapp_profile_check_source_files_conformance_for_target.

This allows users to provide an arbitrary list of source files to check for an unrelated
target - useful for checking only headers.

--- VeraPPUtilities.cmake
+++ VeraPPUtilities.cmake
@@ -251,6 +251,81 @@
                       verapp_import_default_profiles)
 endfunction (verapp_import_default_profiles_into_subdirectory_on_target)

+function (_verapp_check_sources_conformance_invariants MODE)
+
+    if (NOT VERAPP_EXECUTABLE)
+        message (FATAL_ERROR "VERAPP_EXECUTABLE must be set before using "
+                             "this command")
+    endif (NOT VERAPP_EXECUTABLE)
+
+    if (NOT MODE STREQUAL "WARN_ONLY" AND NOT MODE STREQUAL "ERROR")
+        message (FATAL_ERROR "MODE must be WARN_ONLY or ERROR, was ${MODE}")
+    endif (NOT MODE STREQUAL "WARN_ONLY" AND NOT MODE STREQUAL "ERROR")
+
+endfunction (_verapp_check_sources_conformance_invariants)
+
+function (_verapp_profile_check_sources_conformance_for_target VERAPP_DIRECTORY
+                                                               SOURCES_VAR
+                                                               PROFILE
+                                                               TARGET)
+
+    # ERROR passes --error to vera++ so that it
+    # returns a nonzero exit code on failure
+    if (MODE STREQUAL "ERROR")
+        set (_verapp_failure_mode
+             --error)
+    # WARN_ONLY mode just runs vera++ and lets it
+    # print to the stderr. It always returns success
+    # so the build will never fail
+    elseif (MODE STREQUAL "WARN_ONLY")
+        set (_verapp_failure_mode
+             --warning)
+    endif (MODE STREQUAL "ERROR")
+
+    # Double dereference SOURCES_VAR as SOURCES_VAR
+    # just refers to the list name and not the list itself
+    foreach (_source ${${SOURCES_VAR}})
+        add_custom_command (TARGET ${TARGET}
+                            PRE_BUILD
+                            COMMAND
+                            ${VERAPP_EXECUTABLE}
+                            ARGS
+                            ${_source}
+                            --profile ${PROFILE}
+                            --show-rule
+                            ${_verapp_failure_mode}
+                            WORKING_DIRECTORY ${VERAPP_DIRECTORY})
+    endforeach ()
+
+endfunction (_verapp_profile_check_sources_conformance_for_target)
+
+# verapp_profile_check_source_files_list_conformance_for_target
+# Run vera++ on the source files provided after building the target
+# specified
+#
+# VERAPP_DIRECTORY : The directory where the vera++ scripts and profiles
+#                    are stored
+# SOURCES : The sources to check for conformance
+# PROFILE : The vera++ profile to run
+# TARGET : The target to attach to
+# MODE : Either "WARN_ONLY" or "ERROR", the former printing a
+#        warning and continuing or the latter forcing an error
+function (verapp_profile_check_source_files_conformance_for_target VERAPP_DIRECTORY
+                                                                   SOURCES_LIST_VAR
+                                                                   PROFILE
+                                                                   TARGET
+                                                                   MODE)
+
+    _verapp_check_sources_conformance_invariants (${MODE})
+
+    _verapp_profile_check_sources_conformance_for_target (${VERAPP_DIRECTORY}
+                                                          ${SOURCES_LIST_VAR}
+                                                          ${PROFILE}
+                                                          ${TARGET}
+                                                          ${MODE})
+
+endfunction (verapp_profile_check_source_files_conformance_for_target)
+
 # verapp_profile_check_source_files_conformance
 #
 # Run vera++ on the source files used to build the target
@@ -268,57 +343,25 @@
                                                         PROFILE
                                                         TARGET
                                                         MODE)
-    if (NOT VERAPP_EXECUTABLE)
-        message (FATAL_ERROR "VERAPP_EXECUTABLE must be set before using "
-                             "this command")
-    endif (NOT VERAPP_EXECUTABLE)
-
-    if (NOT MODE STREQUAL "WARN_ONLY" AND NOT MODE STREQUAL "ERROR")
-        message (FATAL_ERROR "MODE must be WARN_ONLY or ERROR")
-    endif (NOT MODE STREQUAL "WARN_ONLY" AND NOT MODE STREQUAL "ERROR")
-
-
+
+    _verapp_check_sources_conformance_invariants (${MODE})

     get_target_property (_verapp_profile_check_target_sources
                          ${TARGET}
                          SOURCES)

-    set (_verapp_profile_check_target_sources_paths)
+    set (_sources)
     foreach (_verapp_target_source
              ${_verapp_profile_check_target_sources})
-        list (APPEND _verapp_profile_check_target_sources_paths
+        list (APPEND _sources
               ${_verapp_target_source})
     endforeach (_verapp_target_source)

-    # Convert from a CMake list to a set of files
-    string (REPLACE
-            ";" " "
-            _verapp_profile_check_target_sources_string
-            ${_verapp_profile_check_target_sources})
-
-    # ERROR passes --error to vera++ so that it
-    # returns a nonzero exit code on failure
-    if (MODE STREQUAL "ERROR")
-        set (_verapp_failure_mode
-             --error)
-    # WARN_ONLY mode just runs vera++ and lets it
-    # print to the stderr. It always returns success
-    # so the build will never fail
-    elseif (MODE STREQUAL "WARN_ONLY")
-        set (_verapp_failure_mode
-             --warning)
-    endif (MODE STREQUAL "ERROR")
-
-    add_custom_command (TARGET ${TARGET}
-                        PRE_BUILD
-                        COMMAND
-                        ${VERAPP_EXECUTABLE}
-                        ARGS
-                        ${_verapp_profile_check_target_sources_paths}
-                        --profile ${PROFILE}
-                        --show-rule
-                        ${_verapp_failure_mode}
-                        WORKING_DIRECTORY ${VERAPP_DIRECTORY})
+    _verapp_profile_check_sources_conformance_for_target (${VERAPP_DIRECTORY}
+                                                          _sources
+                                                          ${PROFILE}
+                                                          ${TARGET}
+                                                          ${MODE})

 endfunction (verapp_profile_check_source_files_conformance)


Add pulseaudio support to the rtaudio driver

--- boards/parts/audio/rtaudio/config.cmake
+++ boards/parts/audio/rtaudio/config.cmake
@@ -14,11 +14,18 @@
 pkg_check_modules(jack jack)
 if(JACK_LIB OR jack_FOUND)
   target_compile_definitions(rtaudio PUBLIC "-D__UNIX_JACK__")
-target_link_libraries(rtaudio PUBLIC ${jack_LIBRARIES})
+  target_link_libraries(rtaudio PUBLIC ${jack_LIBRARIES})
 endif()

 # Check for Pulse (any OS)
 pkg_check_modules(pulse libpulse-simple)
+
+if (pulse_FOUND)
+  find_library(PULSE_LIB pulse)
+  find_library(PULSESIMPLE_LIB pulse-simple)
+  target_link_libraries(rtaudio PUBLIC ${PULSE_LIB} ${PULSESIMPLE_LIB})
+  target_compile_definitions(rtaudio PUBLIC "-D__LINUX_PULSE__")
+endif()

 target_include_directories(rtaudio PUBLIC "${rtaudio_SOURCE_DIR}")
 target_link_libraries(rtaudio PUBLIC asound)


fix: Add missing Boost dependency

fix: Add missing Boost dependency

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -57,6 +57,7 @@
   # dependencies
   DEPENDS
     MIRTK{Common,Numerics,Image,PointSet,IO}
+    Boost-1.48 # {math_c99} used, but headers only
     Eigen3
     "VTK-7|6{
       vtkCommonCore,


ENH: add instruction to not use abi cxx11 for exernal project

--- CMake/UseOTB.cmake
+++ CMake/UseOTB.cmake
@@ -22,6 +22,13 @@
 # compiler settings for a project to use OTB.  It should not be
 # included directly, but rather through the OTB_USE_FILE setting
 # obtained from OTBConfig.cmake.
+
+# ABI compatibility
+if ( CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0 )
+    add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)
+  endif()
+endif()

 # Add compiler flags needed to use OTB.
 set(CMAKE_C_FLAGS "${OTB_REQUIRED_C_FLAGS} ${CMAKE_C_FLAGS}")


honor MANUALLY_ADDED_DEPENDENCIES for unity targets

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3456,6 +3456,11 @@
 					message (STATUS "unity target ${_unityTargetName} interface link libraries: ${_unityLinkInterfaceLibraries}")
 				endif()
 			endif()
+			get_target_property(_manualDependencies ${_target} MANUALLY_ADDED_DEPENDENCIES)
+			if (_manualDependencies)
+				cotire_map_libraries("${_linkLibrariesStrategy}" _unityManualDependencies ${_manualDependencies})
+				add_dependencies("${_unityTargetName}" _unityManualDependencies)
+			endif()
 		endif()
 	endif()
 endfunction(cotire_target_link_libraries)


Only copy dll files for plugins in windows build

--- native/cmake/copyQt-windows.cmake
+++ native/cmake/copyQt-windows.cmake
@@ -76,15 +76,21 @@
 )

 foreach (_QtPlugin ${RequiredQtPlugins})
-    set(_IN_FILE "${Qt_PluginsPath}/${_QtPlugin}")
-    set(_OUT_DIR "${OUTPUT_DIR}/plugins")
-    file(TO_NATIVE_PATH ${_IN_FILE} _IN_FILE)
-    file(TO_NATIVE_PATH "${_OUT_DIR}/${_QtPlugin}" _OUT_DIR)
-    add_custom_command(
-            TARGET CopyQtDependencies PRE_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy_directory "${_IN_FILE}" "${_OUT_DIR}"
-            COMMENT "[COPY PLUGIN] ${_IN_FILE} to ${_OUT_DIR}"
-    )
+
+    file(GLOB _PLUGIN_FILES "${Qt_PluginsPath}/${_QtPlugin}/*.dll")
+
+    foreach (_PLUGIN_FILE ${_PLUGIN_FILES})
+        get_filename_component(_PLUGIN_FILE_NAME ${_PLUGIN_FILE} NAME)
+        set(_IN_FILE "${_PLUGIN_FILE}")
+        set(_OUT_DIR "${OUTPUT_DIR}/plugins/${_QtPlugin}/")
+        file(TO_NATIVE_PATH ${_IN_FILE} _IN_FILE)
+        file(TO_NATIVE_PATH "${_OUT_DIR}/${_PLUGIN_FILE_NAME}" _OUT_DIR)
+        add_custom_command(
+                TARGET CopyQtDependencies PRE_BUILD
+                COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_IN_FILE}" "${_OUT_DIR}"
+                COMMENT "[COPY PLUGIN] ${_IN_FILE} to ${_OUT_DIR}"
+        )
+    endforeach ()
 endforeach ()

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


set version to 2017.07.99

set version to 2017.07.99

--- Applications/Diffusion/CPackOptions.cmake
+++ Applications/Diffusion/CPackOptions.cmake
@@ -8,11 +8,12 @@
 # Minor version is the month of release
 set(CPACK_PACKAGE_VERSION_MINOR "07")
 # Patch versioning is not intended to be done
-set(CPACK_PACKAGE_VERSION_PATCH "00")
+set(CPACK_PACKAGE_VERSION_PATCH "99")

 # this should result in names like 2011.09, 2012.06, ...
 # version has to be set explicitly to avoid such things as CMake creating the install directory "MITK Diffusion 2011.."
-set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")#.${CPACK_PACKAGE_VERSION_PATCH}")
+set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+#set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")#.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_PACKAGE_FILE_NAME "MITK-Diffusion-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_ARCH}")


BUG: tar.xz format not supported by all CMake versions

--- SuperBuild/CMake/External_itk.cmake
+++ SuperBuild/CMake/External_itk.cmake
@@ -150,8 +150,8 @@

   ExternalProject_Add(${proj}
     PREFIX ${proj}
-    URL "http://sourceforge.net/projects/itk/files/itk/4.8/InsightToolkit-4.8.0.tar.xz/download"
-    URL_MD5 c92f1a95379759427c9f6e7eb3e77c11
+    URL "http://sourceforge.net/projects/itk/files/itk/4.8/InsightToolkit-4.8.0.tar.gz/download"
+    URL_MD5 2d62f628d9e96cc790fa37947a0f9bc3
     SOURCE_DIR ${ITK_SB_SRC}
     BINARY_DIR ${ITK_SB_BUILD_DIR}
     INSTALL_DIR ${SB_INSTALL_PREFIX}


SuperBuild: fix qt4 build on unix

SuperBuild: fix qt4 build on unix

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -66,7 +66,7 @@
       INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
       CONFIGURE_COMMAND
-        ${QT4_SB_SRC}/configure -prefix ${SB_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support  -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L ${SB_INSTALL_PREFIX}/lib -I ${SB_INSTALL_PREFIX}/include
+        ${QT4_SB_SRC}/configure -prefix ${SB_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support  -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite -L ${SB_INSTALL_PREFIX}/lib -I ${SB_INSTALL_PREFIX}/include -I ${SB_INSTALL_PREFIX}/include/freetype2
       DEPENDS ${${proj}_DEPENDENCIES}
       )
   endif()


In "FindCEGUI.cmake", change "CEGUI_VERSION_MAJOR_DEFAULT" to "9999".

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -371,7 +371,7 @@
 #########################################################

-set(CEGUI_VERSION_MAJOR_DEFAULT "0")
+set(CEGUI_VERSION_MAJOR_DEFAULT "9999")

 # Register var to check change on base
 set(CEGUI_RESET_VARS CEGUI_CONFIG_INCLUDE_DIR CEGUI_INCLUDE_DIR CEGUI_LIBRARY_REL CEGUI_LIBRARY_DBG)


Support EXTERNAL_DIR

Support EXTERNAL_DIR

--- cmake/FindLibUV.cmake
+++ cmake/FindLibUV.cmake
@@ -11,8 +11,12 @@

     include(ExternalProject)

+    if (NOT EXTERNAL_DIR)
+        set(EXTERNAL_DIR ${CMAKE_SOURCE_DIR}/externals)
+    endif (NOT EXTERNAL_DIR)
+
     if (NOT LIBUV_EXTERNAL_PREFIX)
-        set (LIBUV_EXTERNAL_PREFIX ${CMAKE_SOURCE_DIR}/externals/libuv)
+        set (LIBUV_EXTERNAL_PREFIX ${EXTERNAL_DIR}/libuv)
     endif (NOT LIBUV_EXTERNAL_PREFIX)

     # Right, lets download it then!
@@ -27,6 +31,8 @@
         BUILD_IN_SOURCE 1
         INSTALL_COMMAND make install
     )
+
+    FILE(MAKE_DIRECTORY ${LIBUV_EXTERNAL_PREFIX}/include)

     # Set up all the different variables pkg_check_modules would
     set(LIBUV_INCLUDE_DIRS ${LIBUV_EXTERNAL_PREFIX}/include)


Change $CMAKE_BUILD_TYPE} to CMAKE_BUILD TYPE

Without this change, CMake throws error.

--- cmake/build_apk.cmake
+++ cmake/build_apk.cmake
@@ -300,7 +300,7 @@
     set(APK_BUILD_ROOT "${VulkanTestApplications_BINARY_DIR}/${target}-apk/")
     string(REPLACE "\",\"" " " ANDROID_ABIS_SPACES "${ANDROID_ABIS}")

-    if (${CMAKE_BUILD_TYPE} STREQUAL Debug)
+    if (CMAKE_BUILD_TYPE STREQUAL Debug)
       set(ANDROID_ADDITIONAL_PARAMS "android:debuggable=\"true\"")
       list(APPEND CONFIGURABLE_ANDROID_SOURCES
         ${VulkanTestApplications_SOURCE_DIR}/cmake/android_project_template/app/src/main/jni/Android.mk


[scudo][standalone] Correct cmake copy/paste error

Summary:
I mistakenly used a SCUDO variable instead of SCUDO_STANDALONE one. The net
result was that there were more architecture supported than I intended.
Correct that, I'll add more architectures once the bots are enabled and
green for x86.

Reviewers: eugenis, vitalybuka

Reviewed By: vitalybuka

Subscribers: mgorny, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -497,7 +497,7 @@
   filter_available_targets(CFI_SUPPORTED_ARCH ${ALL_CFI_SUPPORTED_ARCH})
   filter_available_targets(ESAN_SUPPORTED_ARCH ${ALL_ESAN_SUPPORTED_ARCH})
   filter_available_targets(SCUDO_SUPPORTED_ARCH ${ALL_SCUDO_SUPPORTED_ARCH})
-  filter_available_targets(SCUDO_STANDALONE_SUPPORTED_ARCH ${ALL_SCUDO_SUPPORTED_ARCH})
+  filter_available_targets(SCUDO_STANDALONE_SUPPORTED_ARCH ${ALL_SCUDO_STANDALONE_SUPPORTED_ARCH})
   filter_available_targets(XRAY_SUPPORTED_ARCH ${ALL_XRAY_SUPPORTED_ARCH})
   filter_available_targets(SHADOWCALLSTACK_SUPPORTED_ARCH
     ${ALL_SHADOWCALLSTACK_SUPPORTED_ARCH})


[OCaml] [cmake] Disable OCaml bindings if ctypes >=0.3 is not found.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -529,10 +529,14 @@
     if( OCAML_VERSION VERSION_LESS "4.00.0" )
       message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.")
     else()
-      message(STATUS "OCaml bindings enabled.")
-      find_ocamlfind_package(ctypes VERSION 0.3)
-      find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
-      set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
+      find_ocamlfind_package(ctypes VERSION 0.3 OPTIONAL)
+      if( HAVE_OCAML_CTYPES )
+        message(STATUS "OCaml bindings enabled.")
+        find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
+        set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
+      else()
+        message(STATUS "OCaml bindings disabled, need ctypes >=0.3.")
+      endif()
     endif()
   endif()
 endif()


removing test+python from the dependency graph

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

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -7,6 +7,8 @@
       if(NOT _ss STREQUAL "global_tests" AND
          NOT _ss STREQUAL "apps" AND
          NOT _ss STREQUAL "tools" AND
+         NOT _ss STREQUAL "test" AND
+         NOT _ss STREQUAL "python" AND
          NOT _ss STREQUAL "documentation")
         PCL_GET_SUBSYS_STATUS(_status ${_ss})
         if(_status)


augment working version

augment working version

--- cmake/gsVersion.cmake
+++ cmake/gsVersion.cmake
@@ -25,7 +25,7 @@

 set(${PROJECT_NAME}_MAJOR_VERSION "0")
 set(${PROJECT_NAME}_MINOR_VERSION "8")
-set(${PROJECT_NAME}_PATCH_VERSION "2")
+set(${PROJECT_NAME}_PATCH_VERSION "3")
 #set(${PROJECT_NAME}_VERSION_TYPE  "alpha")

 # Construct version info


Fix regex in clang version matching

Fix regex in clang version matching

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -8,7 +8,7 @@
 	# If we build with "default" clang, require its package
 	if(CLANG_VERSION_STRING VERSION_GREATER_EQUAL 7.0)
 		# As of clang 7.0, the package does not list the minor version number (clang-7 instead of clang-7.0), so we need to rewrite the version string
-		string (REGEX REPLACE "([0-9]+)\\.*[0-9]+" "\\1" CLANG_VERSION_STRING "${CLANG_VERSION_STRING}")
+		string (REGEX REPLACE "([0-9]+)\\.?[0-9]*" "\\1" CLANG_VERSION_STRING "${CLANG_VERSION_STRING}")
 	endif()
 	set(PACKAGE_DEPENDENCIES "${PACKAGE_DEPENDENCIES}, clang-${CLANG_VERSION_STRING}")
 	if(LLVMLIB_FRONTEND)


THRIFT-3103 cmake is missing RPATH on MacOSX.

--- build/cmake/DefineCMakeDefaults.cmake
+++ build/cmake/DefineCMakeDefaults.cmake
@@ -56,3 +56,15 @@
 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
+#
+# "rpath" support.
+# See http://www.itk.org/Wiki/index.php?title=CMake_RPATH_handling
+#
+# On MacOSX, for shared libraries, enable rpath support.
+set(CMAKE_MACOSX_RPATH TRUE)
+#
+# On any OS, for executables, allow linking with shared libraries in non-system
+# locations and running the executables without LD_PRELOAD or similar.
+# This requires the library to be built with rpath support.
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)


Use try_compile construct that is recognized by older CMake version. Temporarily exclude the ABI check for MSVC as well. Sorry.

--- CMake/Modules/FindUrho3D.cmake
+++ CMake/Modules/FindUrho3D.cmake
@@ -178,9 +178,8 @@
         endif ()
     endif ()
     # Ensure the module has found the library with the right ABI for the chosen compiler and URHO3D_64BIT build option
-    if (NOT IOS)
-        try_compile (COMPILE_RESULT ${CMAKE_BINARY_DIR}/generated/FindUrho3D
-            SOURCES ${CMAKE_CURRENT_LIST_DIR}/CheckUrho3DLibrary.cpp
+    if (NOT IOS AND NOT MSVC)
+        try_compile (COMPILE_RESULT ${CMAKE_BINARY_DIR}/generated/FindUrho3D ${CMAKE_CURRENT_LIST_DIR}/CheckUrho3DLibrary.cpp
             CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${URHO3D_INCLUDE_DIRS}
             LINK_LIBRARIES ${URHO3D_LIBRARIES})
     endif ()


Add git hash to MITK_VERSION_STRING for development versions

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -5,10 +5,13 @@
 set(LIBPOSTFIX "")

 # MITK_VERSION
-set(MITK_VERSION_MAJOR "0")
-set(MITK_VERSION_MINOR "15")
-set(MITK_VERSION_PATCH "1")
+set(MITK_VERSION_MAJOR "2012")
+set(MITK_VERSION_MINOR "02")
+set(MITK_VERSION_PATCH "99")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
+if(MITK_VERSION_PATCH STREQUAL "99")
+  set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")
+endif()

 #-----------------------------------
 # Configuration of module system


plugin version moved to separate define

plugin version moved to separate define

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -8,16 +8,17 @@
 set(PLUGIN_NAME "FBVLC")
 set(PLUGIN_PREFIX "FBVLC")
 set(COMPANY_NAME "RSATom")
+set(PLUGIN_VERSION "0.0.0.6")

 # ActiveX constants:
 set(FBTYPELIB_NAME FBVLCLib)
-set(FBTYPELIB_DESC "FBVLC 0.0.0.6 Type Library")
+set(FBTYPELIB_DESC "FBVLC ${PLUGIN_VERSION} Type Library")
 set(IFBControl_DESC "FBVLC Control Interface")
 set(FBControl_DESC "FBVLC Control Class")
 set(IFBComJavascriptObject_DESC "FBVLC IComJavascriptObject Interface")
 set(FBComJavascriptObject_DESC "FBVLC ComJavascriptObject Class")
 set(IFBComEventSource_DESC "FBVLC IFBComEventSource Interface")
-set(AXVERSION_NUM "0.0.0.6")
+set(AXVERSION_NUM "${PLUGIN_VERSION}")

 # NOTE: THESE GUIDS *MUST* BE UNIQUE TO YOUR PLUGIN/ACTIVEX CONTROL!  YES, ALL OF THEM!
 set(FBTYPELIB_GUID a6283703-2b52-5487-b262-119d9bf8c79c)
@@ -34,7 +35,7 @@
 # strings
 set(FBSTRING_CompanyName "RSATom")
 set(FBSTRING_PluginDescription "VLC Web Plugin (powered by FireBreath)")
-set(FBSTRING_PLUGIN_VERSION "0.0.0.6")
+set(FBSTRING_PLUGIN_VERSION "${PLUGIN_VERSION}")
 set(FBSTRING_LegalCopyright "Copyright 2012 RSATom")
 set(FBSTRING_PluginFileName "np${PLUGIN_NAME}.dll")
 set(FBSTRING_ProductName "FireBreathed VLC")


cmake: Fix get_filename_component() to support 2.8.11 and older

--- cmake/Modules/FindHoudiniEngine.cmake
+++ cmake/Modules/FindHoudiniEngine.cmake
@@ -83,11 +83,19 @@
     )
 list( APPEND _houdiniengine_required_vars HoudiniEngine_${_houdiniengine_lib} )
 list( APPEND HoudiniEngine_LIBRARIES ${HoudiniEngine_${_houdiniengine_lib}} )
-get_filename_component(
-    HoudiniEngine_LIBRARY_DIR
-    ${HoudiniEngine_${_houdiniengine_lib}}
-    DIRECTORY
-    )
+if ( ${CMAKE_VERSION} VERSION_GREATER "2.8.11" )
+    get_filename_component(
+        HoudiniEngine_LIBRARY_DIR
+        ${HoudiniEngine_${_houdiniengine_lib}}
+        DIRECTORY
+        )
+else ()
+    get_filename_component(
+        HoudiniEngine_LIBRARY_DIR
+        ${HoudiniEngine_${_houdiniengine_lib}}
+        PATH
+        )
+endif ()
 list( APPEND _houdiniengine_required_vars HoudiniEngine_LIBRARY_DIR )

 if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )


[CMake] Add -z defs on Solaris

[CMake] Add -z defs on Solaris

Like other ELF targets, shared objects should be linked with -z defs on Solaris.

Tested on x86_64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -169,7 +169,7 @@

 # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
 # build might work on ELF but fail on MachO/COFF.
-if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|FreeBSD|OpenBSD|DragonFly|AIX" OR
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin|FreeBSD|OpenBSD|DragonFly|AIX|SunOS" OR
         WIN32 OR CYGWIN) AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")


[modules] Centralize the module cache.

[modules] Centralize the module cache.

This reduces the build size from 17G to 1.9G on my machine.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -475,7 +475,7 @@
   endif()
   if (LLVM_ENABLE_MODULES)
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(module_flags "-fmodules -fmodules-cache-path=module.cache")
+    set(module_flags "-fmodules -fmodules-cache-path=${PROJECT_BINARY_DIR}/module.cache")
     if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
       # On Darwin -fmodules does not imply -fcxx-modules.
       set(module_flags "${module_flags} -fcxx-modules")


Revert "[Analysis] Link library dependencies to Analysis plugins"

This reverts commit r361340. The following builder has been broken for
the past few days because of this commit:

http://green.lab.llvm.org/green/job/clang-stage2-cmake-RgSan/

Also revert r361399, which was committed to fix r361340.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -914,14 +914,10 @@

 # Plugin support
 # FIXME: Make this configurable.
-if(WIN32 OR CYGWIN)
-  if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
-    set(LLVM_ENABLE_PLUGINS ON)
-  else()
-    set(LLVM_ENABLE_PLUGINS OFF)
-  endif()
+if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
+  set(LLVM_ENABLE_PLUGINS ON)
 else()
-  set(LLVM_ENABLE_PLUGINS ${LLVM_ENABLE_PIC})
+  set(LLVM_ENABLE_PLUGINS OFF)
 endif()

 # By default we should enable LLVM_ENABLE_IDE only for multi-configuration


Fix for ROOT-6751 (etcdir not set)

Fix for ROOT-6751 (etcdir not set)

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -30,41 +30,92 @@

 if(gnuinstall)
   set(prefix ${CMAKE_INSTALL_PREFIX})
-  set(etcdir ${CMAKE_INSTALL_FULL_SYSCONFDIR})
-  set(bindir ${CMAKE_INSTALL_FULL_BINDIR})
-  set(libdir ${CMAKE_INSTALL_FULL_LIBDIR})
-  set(incdir ${CMAKE_INSTALL_FULL_INCLUDEDIR})
-  set(mandir ${CMAKE_INSTALL_FULL_MANDIR})
-  set(plugindir ${CMAKE_INSTALL_FULL_SYSCONFDIR}/plugins)
-  set(datadir ${CMAKE_INSTALL_FULL_DATADIR})
-  set(elispdir ${CMAKE_INSTALL_FULL_ELISPDIR})
-  set(ttffontdir ${CMAKE_INSTALL_FULL_FONTDIR})
-  set(macrodir ${CMAKE_INSTALL_FULL_MACRODIR})
-  set(srcdir ${CMAKE_INSTALL_FULL_SRCDIR})
-  set(iconpath ${CMAKE_INSTALL_FULL_ICONDIR})
-  set(cintincdir ${CMAKE_INSTALL_FULL_CINTINCDIR})
-  set(docdir ${CMAKE_INSTALL_FULL_DOCDIR})
-  set(testdir ${CMAKE_INSTALL_FULL_TESTDIR})
-  set(tutdir ${CMAKE_INSTALL_FULL_TUTDIR})
-  set(aclocaldir ${CMAKE_INSTALL_FULL_ACLOCALDIR})
 else()
   set(prefix $(ROOTSYS))
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_SYSCONFDIR})
+  set(etcdir ${CMAKE_INSTALL_SYSCONFDIR})
+else()
   set(etcdir ${prefix}/${CMAKE_INSTALL_SYSCONFDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_BINDIR})
+  set(bindir ${CMAKE_INSTALL_BINDIR})
+else()
   set(bindir ${prefix}/${CMAKE_INSTALL_BINDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_LIBDIR})
+  set(libdir ${CMAKE_INSTALL_LIBDIR})
+else()
   set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_INCLUDEDIR})
+  set(incdir ${CMAKE_INSTALL_INCLUDEDIR})
+else()
   set(incdir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_MANDIR})
+  set(mandir ${CMAKE_INSTALL_MANDIR})
+else()
   set(mandir ${prefix}/${CMAKE_INSTALL_MANDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_SYSCONFDIR})
+  set(plugindir ${CMAKE_INSTALL_SYSCONFDIR}/plugins)
+else()
   set(plugindir ${prefix}/${CMAKE_INSTALL_SYSCONFDIR}/plugins)
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_DATADIR})
+  set(datadir ${CMAKE_INSTALL_DATADIR})
+else()
   set(datadir ${prefix}/${CMAKE_INSTALL_DATADIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_ELISPDIR})
+  set(elispdir ${CMAKE_INSTALL_ELISPDIR})
+else()
   set(elispdir ${prefix}/${CMAKE_INSTALL_ELISPDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_FONTDIR})
+  set(ttffontdir ${CMAKE_INSTALL_FONTDIR})
+else()
   set(ttffontdir ${prefix}/${CMAKE_INSTALL_FONTDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_MACRODIR})
+  set(macrodir ${CMAKE_INSTALL_MACRODIR})
+else()
   set(macrodir ${prefix}/${CMAKE_INSTALL_MACRODIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_SRCDIR})
+  set(srcdir ${CMAKE_INSTALL_SRCDIR})
+else()
   set(srcdir ${prefix}/${CMAKE_INSTALL_SRCDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_ICONDIR})
+  set(iconpath ${CMAKE_INSTALL_ICONDIR})
+else()
   set(iconpath ${prefix}/${CMAKE_INSTALL_ICONDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_CINTINCDIR})
+  set(cintincdir ${CMAKE_INSTALL_CINTINCDIR})
+else()
   set(cintincdir ${prefix}/${CMAKE_INSTALL_CINTINCDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_DOCDIR})
+  set(docdir ${CMAKE_INSTALL_DOCDIR})
+else()
   set(docdir ${prefix}/${CMAKE_INSTALL_DOCDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_TESTDIR})
+  set(testdir ${CMAKE_INSTALL_TESTDIR})
+else()
   set(testdir ${prefix}/${CMAKE_INSTALL_TESTDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_TUTDIR})
+  set(tutdir ${CMAKE_INSTALL_TUTDIR})
+else()
   set(tutdir ${prefix}/${CMAKE_INSTALL_TUTDIR})
+endif()
+if(IS_ABSOLUTE ${CMAKE_INSTALL_ACLOCALDIR})
+  set(aclocaldir ${CMAKE_INSTALL_ACLOCALDIR})
+else()
   set(aclocaldir ${prefix}/${CMAKE_INSTALL_ACLOCALDIR})
 endif()

@@ -476,12 +527,9 @@

 #---Especial definitions for root-config et al.--------------------------------------------------------------
 if(prefix STREQUAL "$(ROOTSYS)")
-  set(prefix $ROOTSYS)
-  set(bindir $ROOTSYS/bin)
-  set(libdir $ROOTSYS/lib)
-  set(incdir $ROOTSYS/include)
-  set(etcdir $ROOTSYS/etc)
-  set(mandir $ROOTSYS/man/man1)
+  foreach(d prefix bindir libdir incdir etcdir mandir)
+    string(REPLACE "$(ROOTSYS)" "$ROOTSYS"  ${d} ${${d}})
+  endforeach()
 endif()


refs #5537 little cmake cleanup

refs #5537 little cmake cleanup

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@48383 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -128,7 +128,7 @@
 endif ()

 ## set warnings
-set(WARN_FLAGS
+set_cflags_if_supported(
   -Wextra
   -Wbad-function-cast
   -Wno-missing-noreturn
@@ -149,18 +149,12 @@
   #-Wvector-optimization-performance
   )

-option(WARN_ABOUT_PACKED "Warn about useless __attribute__((packed)).  This generates lots of warnings." OFF)
-if (WARN_ABOUT_PACKED)
-  list(APPEND WARN_FLAGS -Wpacked -Wno-error=packed)
-endif ()
-
 if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
   message(WARNING "Disabling -Wcast-align with clang.  TODO: fix casting and re-enable it.")
 else ()
-  list(APPEND WARN_FLAGS -Wcast-align)
-endif ()
-
-set_cflags_if_supported(${WARN_CFLAGS})
+  set_cflags_if_supported(-Wcast-align)
+endif ()
+
 ## always want these
 set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
 set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")


Fix check dependency to pthread

Fix check dependency to pthread

This break compilation on debian jessie.

--- build/FindCheck.cmake
+++ build/FindCheck.cmake
@@ -8,6 +8,7 @@

 find_path(CHECK_INCLUDE_DIRS NAMES check.h)
 find_library(CHECK_LIBRARIES NAMES check)
+find_package(Threads REQUIRED)

 list(APPEND CHECK_LIBRARIES rt)
 list(APPEND CHECK_LIBRARIES m)


Closes #1781

Closes #1781

--- Superbuild/BoostExternal.cmake
+++ Superbuild/BoostExternal.cmake
@@ -73,7 +73,7 @@
   SET(FORCE_64BIT_BUILD ON)
 ENDIF()

-SET(boost_GIT_TAG "origin/v1.67.0")
+SET(boost_GIT_TAG "origin/v1.66.0")
 SET(boost_GIT_URL "https://github.com/CIBC-Internal/boost.git")

 # TODO: fix install step