disabled qt dependency on osx

disabled qt dependency on osx

--- cmake/dependencies.cmake
+++ cmake/dependencies.cmake
@@ -45,7 +45,7 @@

 # ==== Find dependencies.
 find_package(CUDA 4.0 QUIET)
-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     find_package(Qt4 4.5.0 COMPONENTS QtCore QtGui QtXml QtOpenGL QtTest QUIET)
     find_package(Qwt5 QUIET)
 endif ()


header only: remove package config

header only: remove package config

--- cmake/jsonrpcpp.pc.cmake
+++ cmake/jsonrpcpp.pc.cmake
@@ -1,12 +0,0 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
-
-Name: @PROJECT_NAME@
-Description: @PROJECT_DESCRIPTION@
-URL: @PROJECT_URL@
-Version: @PROJECT_VERSION@
-
-Libs: -L${libdir} -ljsonrpcpp
-Cflags: -I${includedir}


SSE/SSE2 instruction sets are enabled by default when compiling in 64bit with MSVC

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

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -127,7 +127,7 @@
           else (HAVE_SSE4_1_EXTENSIONS)
               message(STATUS "No SSE extensions found")
           endif(HAVE_SSE4_1_EXTENSIONS)
-      elseif (MSVC)
+      elseif (MSVC AND NOT CMAKE_CL_64)
           if(HAVE_SSE2_EXTENSIONS)
               SET(SSE_FLAGS "${SSE_FLAGS} /arch:SSE2")
               message(STATUS "Found SSE2 extensions, using flags: ${SSE_FLAGS}")


Use proper extension on the avx512 testcase filename

The need to call it .tmp existed only when it was generated by a tmpfile call, and the "-x c" option to tell the compiler it is actually a C source is not universally supported (this broke the test with clang-cl at least)

--- cmake/system_check.cmake
+++ cmake/system_check.cmake
@@ -109,10 +109,10 @@
 endif()

 if (X86_64 OR X86)
-  file(WRITE ${PROJECT_BINARY_DIR}/avx512.tmp "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
-execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -c -v -o ${PROJECT_BINARY_DIR}/avx512.o -x c ${PROJECT_BINARY_DIR}/avx512.tmp OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
+  file(WRITE ${PROJECT_BINARY_DIR}/avx512.c "#include <immintrin.h>\n\nint main(void){ __asm__ volatile(\"vbroadcastss -4 * 4(%rsi), %zmm2\"); }")
+execute_process(COMMAND ${CMAKE_C_COMPILER} -march=skylake-avx512 -c -v -o ${PROJECT_BINARY_DIR}/avx512.o ${PROJECT_BINARY_DIR}/avx512.c OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE NO_AVX512)
 if (NO_AVX512 EQUAL 1)
 set (CCOMMON_OPT "${CCOMMON_OPT} -DNO_AVX512")
 endif()
-  file(REMOVE "avx512.tmp" "avx512.o")
+  file(REMOVE "avx512.c" "avx512.o")
 endif()


COMP: Add missing quote escapes in the module description.

--- itk-module.cmake
+++ itk-module.cmake
@@ -3,7 +3,7 @@

 A more detailed description can be found in the Insight Journal article::

-  Mueller, D. "Fast Marching Minimal Path Extraction in ITK"
+  Mueller, D. \"Fast Marching Minimal Path Extraction in ITK\"
   http://hdl.handle.net/1926/1332
   http://www.insight-journal.org/browse/publication/213
   March, 2008.


Made USE_VTK=ON default behaviour.

Made USE_VTK=ON default behaviour.

Elaborated on versioning mechanism. LIB_VERSION value is tightly integrated with install target now.

--- system_definitions.cmake
+++ system_definitions.cmake
@@ -11,30 +11,52 @@
 #

 #
+# Establish the version number for this build.
+# This is only relevant for releases. 0.0.0.0 is chosen here
+# simply as a stub.
+#
+#set(LIB_VERSION 0.0.0.0 CACHE STRING "Library version number for release purposes" FORCE)
+set(LIB_VERSION 0.0.0.0 CACHE STRING "Library version number for release purposes")
+mark_as_advanced(LIB_VERSION)
+
+#
 # Establish the list of components in this system
 #
 set(COMPONENTS sheaves fiber_bundles geometry fields tools CACHE STRING "List of components in this system" FORCE)

+#
 # Set the default value for install location
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-    if(LINUX64GNU OR LINUX64INTEL)
-      set(CMAKE_INSTALL_PREFIX
-        "$ENV{HOME}/SheafSystem" CACHE PATH "SheafSystem install prefix" FORCE
+#
+if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND LIB_VERSION MATCHES "0.0.0.0" )
+    if(LINUX64GNU OR LINUX64INTEL)
+      set(CMAKE_INSTALL_PREFIX
+        "$ENV{HOME}/SheafSystem" CACHE PATH "SheafSystem install prefix"
         )
     else()
       set(CMAKE_INSTALL_PREFIX
-        "$ENV{USERPROFILE}/SheafSystem" CACHE PATH "SheafSystem install prefix" FORCE
-        )
-    endif()
-endif()
-
+        "$ENV{USERPROFILE}/SheafSystem" CACHE PATH "SheafSystem install prefix"
+        )
+    endif()
+else()
+    if(LINUX64GNU OR LINUX64INTEL)
+      set(CMAKE_INSTALL_PREFIX
+        "$ENV{HOME}/SheafSystem-${LIB_VERSION}" CACHE PATH "SheafSystem install prefix"
+        )
+    else()
+      set(CMAKE_INSTALL_PREFIX
+        "$ENV{USERPROFILE}/SheafSystem-${LIB_VERSION}" CACHE PATH "SheafSystem install prefix"
+        )
+    endif()
+endif()
+
+#
 # Now fix the install path.
+#
 file(TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX} CMAKE_INSTALL_PREFIX)

 #
 # Platform definitions
 #
-
 # OS is 64 bit Windows, compiler is cl
 if(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" AND MSVC AND CMAKE_SIZEOF_VOID_P MATCHES "8")
     set(WIN64MSVC ON CACHE BOOL "MS compiler in use.")
@@ -77,6 +99,7 @@
 endif(NOT CMAKE_BUILD_TYPE)

 set_property(GLOBAL PROPERTY DEBUG_CONFIGURATIONS "Debug-contracts" "Debug-no-contracts")
+
 #
 #  Type of system documentation to build: Dev or User
 #
@@ -85,7 +108,7 @@
 #
 # True if we want geometry to link against VTK
 #
-set(USE_VTK CACHE BOOL "Set to link geometry against VTK libs.")
+set(USE_VTK ON CACHE BOOL "Set to link geometry against VTK libs.")

 #
 # Toggle multi-process compilation in win32.
@@ -148,15 +171,6 @@
 elseif(WIN64MSVC OR WIN64INTEL)
     set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR} CACHE STRING "System install location")
 endif()
-
-#
-# Establish the version number for this build.
-# This is only relevant for releases. 1.1.1 is chosen here
-# simply as a stub.
-#
-set(LIB_VERSION 0.0.0.0 CACHE STRING "Library version number for release purposes")
-
-mark_as_advanced(LIB_VERSION)

 #
 # Set the cmake module path.


let user override "namespaces" (conflicts or whatever)

--- FindICU.cmake
+++ FindICU.cmake
@@ -40,7 +40,7 @@
 #   endif(ICU_FOUND)

 #=============================================================================
-# Copyright (c) 2011-2012, julp
+# Copyright (c) 2011-2013, julp
 #
 # Distributed under the OSI-approved BSD License
 #
@@ -51,9 +51,15 @@
 find_package(PkgConfig QUIET)

 ########## Private ##########
-set(ICU_PUBLIC_VAR_NS "ICU")                          # Prefix for all ICU relative public variables
-set(ICU_PRIVATE_VAR_NS "_${ICU_PUBLIC_VAR_NS}")       # Prefix for all ICU relative internal variables
-set(PC_ICU_PRIVATE_VAR_NS "_PC${ICU_PRIVATE_VAR_NS}") # Prefix for all pkg-config relative internal variables
+if(NOT DEFINED ICU_PUBLIC_VAR_NS)
+    set(ICU_PUBLIC_VAR_NS "ICU")                          # Prefix for all ICU relative public variables
+endif(NOT DEFINED ICU_PUBLIC_VAR_NS)
+if(NOT DEFINED ICU_PRIVATE_VAR_NS)
+    set(ICU_PRIVATE_VAR_NS "_${ICU_PUBLIC_VAR_NS}")       # Prefix for all ICU relative internal variables
+endif(NOT DEFINED ICU_PRIVATE_VAR_NS)
+if(NOT DEFINED PC_ICU_PRIVATE_VAR_NS)
+    set(PC_ICU_PRIVATE_VAR_NS "_PC${ICU_PRIVATE_VAR_NS}") # Prefix for all pkg-config relative internal variables
+endif(NOT DEFINED PC_ICU_PRIVATE_VAR_NS)

 function(icudebug _VARNAME)
     if(${ICU_PUBLIC_VAR_NS}_DEBUG)


Clean-up lwIP for ChibiOS targets (#1779)

***NO_CI***

--- CMake/Modules/FindCHIBIOS_LWIP.cmake
+++ CMake/Modules/FindCHIBIOS_LWIP.cmake
@@ -87,91 +87,6 @@
     # netif
     ethernet.c
     slipif.c
-
-    # 6LoWPAN
-    # lowpan6.c
-
-    # PPP
-    auth.c
-	ccp.c
-	chap-md5.c
-	chap_ms.c
-	chap-new.c
-	demand.c
-	eap.c
-	ecp.c
-	eui64.c
-	fsm.c
-	ipcp.c
-	ipv6cp.c
-	lcp.c
-	magic.c
-	mppe.c
-	multilink.c
-	ppp.c
-	pppapi.c
-	pppcrypt.c
-	pppoe.c
-	pppol2tp.c
-	pppos.c
-	upap.c
-	utils.c
-    vj.c
-
-    # PPP SSL
-	arc4.c
-	des.c
-	md4.c
-	md5.c
-	sha1.c
-
-    # APPS!
-
-    # SNMPv2c agent
-    # snmp_asn1.c
-	# snmp_core.c
-	# snmp_mib2.c
-	# snmp_mib2_icmp.c
-	# snmp_mib2_interfaces.c
-	# snmp_mib2_ip.c
-	# snmp_mib2_snmp.c
-	# snmp_mib2_system.c
-	# snmp_mib2_tcp.c
-	# snmp_mib2_udp.c
-	# snmp_msg.c
-	# snmpv3.c
-	# snmp_netconn.c
-	# snmp_pbuf_stream.c
-	# snmp_raw.c
-	# snmp_scalar.c
-	# snmp_table.c
-	# snmp_threadsync.c
-	# snmp_traps.c
-	# snmpv3_mbedtls.c
-	# snmpv3_dummy.c
-
-    # http server
-    # fs.c
-    # httpd.c
-
-    # iperf server
-    # lwiperf.c
-
-	# SNTP client
-	# this one is added below if NF_NETWORKING_SNTP option is ON
-    # sntp.c
-
-    # MDNS responder
-    mdns.c
-
-    # NetBIOS server
-    # netbiosns.c
-
-    # TFTP server
-    # tftp_server.c
-
-    # MQTT client
-    # mqtt.c
 )

 if(NF_NETWORKING_SNTP)
@@ -188,20 +103,11 @@
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/core/ipv6
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/api
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/netif
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/netif/ppp
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/netif/ppp/polarssl

             ${CMAKE_SOURCE_DIR}/targets/CMSIS-OS/ChibiOS/Lwip

             # APPS:
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/snmp
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/httpd
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/lwiperf
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/sntp
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/mdns
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/netbiosns
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/tftp
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/ext/lwip/src/apps/mqtt

         CMAKE_FIND_ROOT_PATH_BOTH
     )


fixed include paths in globals.cmake

fixed include paths in globals.cmake

--- globals.cmake
+++ globals.cmake
@@ -119,8 +119,8 @@

 option(MIRRAGE_ENABLE_CLANG_FORMAT "Includes a clangformat target, that automatically formats the source files." OFF)
 if(MIRRAGE_ENABLE_CLANG_FORMAT)
-	include(clang-format.cmake)
+	include(${MIRRAGE_ROOT_DIR}/clang-format.cmake)
 endif()

-include(embed_assets.cmake)
+include(${MIRRAGE_ROOT_DIR}/embed_assets.cmake)


Moved include of language options before ITK external

This should ensure the python variable are defined for ITK when
wrap ITK is enabled.

Change-Id: Iccafb2036ee85e1af81203cd8bd1c3cda790704f

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -212,6 +212,13 @@
   -DBUILD_EXAMPLES:BOOL=OFF
 )

+
+#
+# Use CMake file which present options for wrapped languages, and finds languages as needed
+#
+include(SITKLanguageOptions)
+
+
 #$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
 include(ExternalProject)
 #------------------------------------------------------------------------------
@@ -240,13 +247,6 @@
 endif()
 include(External_ITK)
 list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES ITK)
-
-
-#
-# Use CMake file which present options for wrapped languages, and finds languages as needed
-#
-include(SITKLanguageOptions)
-

 #------------------------------------------------------------------------------
 # List of external projects


Turn ospray off on linux

Turn ospray off on linux

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -76,7 +76,10 @@

 ###########################################
 # Configure ospray
-OPTION(WITH_OSPRAY "Build Ospray." ON)
+OPTION(WITH_OSPRAY "Build Ospray." OFF)
+IF(APPLE)
+  SET(WITH_OSPRAY ON)
+ENDIF()
 IF(WIN32) # needs VS2017--turn off for now
   SET(WITH_OSPRAY OFF)
 ENDIF()
@@ -109,12 +112,12 @@
     SET(BUILD_TESTING OFF)
     SET(DOWNLOAD_TOOLKITS OFF)
     SET(BUILD_WITH_SCIRUN_DATA OFF)
-  ELSE()
+  ELSE()
     SET(WITH_OSPRAY OFF)
 	SET(BUILD_TESTING OFF)
 	SET(DOWNLOAD_TOOLKITS OFF)
 	SET(BUILD_WITH_SCIRUN_DATA OFF)
-
+
     IF(CMAKE_C_COMPILER_ID MATCHES "GNU")
       SET(BUILD_HEADLESS ON)
       SET(BUILD_WITH_PYTHON OFF)


REFAC: update geotiff version from 1.5.1 to 1.7.0

--- SuperBuild/CMake/External_geotiff.cmake
+++ SuperBuild/CMake/External_geotiff.cmake
@@ -37,8 +37,8 @@

 ExternalProject_Add(GEOTIFF
   PREFIX GEOTIFF
-  URL "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.5.1.tar.gz"
-  URL_MD5 6d0fa650c206791bc7d5e60ef625ea77
+  URL "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.7.0.tar.gz"
+  URL_MD5 e57b69098d70a008ddfc65b675cbfcf4
   SOURCE_DIR ${GEOTIFF_SB_SRC}
   BINARY_DIR ${GEOTIFF_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


remove openjpeg version for now

remove openjpeg version for now

--- Utilities/gdcm/CMake/FindOpenJPEG.cmake
+++ Utilities/gdcm/CMake/FindOpenJPEG.cmake
@@ -22,7 +22,7 @@
 FIND_PACKAGE(OpenJPEG QUIET NO_MODULE)

 if( NOT OpenJPEG_DIR )
-SET(OPENJPEG_MAJOR_VERSION 1) # FIXME ?
+#SET(OPENJPEG_MAJOR_VERSION 1) # FIXME ?
 FIND_PATH(OPENJPEG_INCLUDE_DIR
   NAMES openjpeg.h #openjpeg-1.0/openjpeg.h
   PATHS /usr/local/include


cmake/cpu.cmake: remove unused variable

cmake/cpu.cmake: remove unused variable

Change-Id: I9dc228ab4ae5f1a9e2af742f37fd7b887f96d671

--- cmake/cpu.cmake
+++ cmake/cpu.cmake
@@ -58,7 +58,6 @@
       "-mno-sse4.1;-mno-sse2;;-mno-dspr2;;-mno-msa")
 endif()

-set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
 set(WEBP_SIMD_FILES_TO_INCLUDE)
 set(WEBP_SIMD_FLAGS_TO_INCLUDE)


Removed --recursive from automatic git submodule pull

--- cmake/Git.cmake
+++ cmake/Git.cmake
@@ -25,7 +25,8 @@
 option(GIT_SUBMODULE "Check submodules during build" ON)
 if(GIT_SUBMODULE)
     message(STATUS "Submodule update")
-    execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
+    # Check always if a --recursive is really needed. All dependencies do not require them (yet)!
+    execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                     RESULT_VARIABLE GIT_SUBMOD_RESULT)
     if(NOT GIT_SUBMOD_RESULT EQUAL "0")


Provide support for CMake on Android studio 2.2.

Change-Id: Ib3508c20a220b29d42f963cf154cd9ab5236ed6e
(cherry picked from commit a80e8cfdf2b3a574042efa9620d818d845f7bb5f)

--- cmake/cpu.cmake
+++ cmake/cpu.cmake
@@ -1,27 +1,7 @@
 ## Check for SIMD extensions.
-set(WEBP_SIMD_FLAGS "SSE2;SSE41;AVX2")
-set(WEBP_SIMD_FILE_EXTENSIONS "_sse2.c;_sse41.c;_avx2.c")
-if(MSVC)
-  # MSVC does not have a SSE4 flag but AVX2 support implies
-  # SSE4 support.
-  set(SIMD_ENABLE_FLAGS "/arch:SSE2;/arch:AVX2;/arch:AVX2")
-  set(SIMD_DISABLE_FLAGS)
-else()
-  set(SIMD_ENABLE_FLAGS "-msse2;-msse4.1;-mavx2")
-  set(SIMD_DISABLE_FLAGS "-mno-sse2;-mno-sse4.1;-mno-avx2")
-endif()

-set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
-set(WEBP_SIMD_FILES_TO_INCLUDE)
-set(WEBP_SIMD_FLAGS_TO_INCLUDE)
-
-list(LENGTH WEBP_SIMD_FLAGS WEBP_SIMD_FLAGS_LENGTH)
-math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
-
-foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
-  list(GET WEBP_SIMD_FLAGS ${I_SIMD} WEBP_SIMD_FLAG)
-  list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
-  set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
+function(webp_check_compiler_flag WEBP_SIMD_FLAG)
+  unset(WEBP_HAVE_FLAG_LOCAL CACHE)
   check_c_source_compiles("
       #include \"${CMAKE_CURRENT_LIST_DIR}/../src/dsp/dsp.h\"
       int main(void) {
@@ -30,10 +10,60 @@
         #endif
         return 0;
       }
-    "
-    WEBP_HAVE_${WEBP_SIMD_FLAG}
+    " WEBP_HAVE_FLAG_LOCAL
   )
+  if(WEBP_HAVE_FLAG_LOCAL)
+    set(WEBP_HAVE_${WEBP_SIMD_FLAG} 1 PARENT_SCOPE)
+  else()
+    set(WEBP_HAVE_${WEBP_SIMD_FLAG} 0 PARENT_SCOPE)
+  endif()
+endfunction()

+# those are included in the names of WEBP_USE_* in c++ code.
+set(WEBP_SIMD_FLAGS "SSE2;SSE41;AVX2;MIPS32;MIPS_DSP_R2;NEON;MSA")
+set(WEBP_SIMD_FILE_EXTENSIONS "_sse2.c;_sse41.c;_avx2.c;_mips32.c;_mips_dsp_r2.c;_neon.c;_msa.c")
+if(MSVC)
+  # MSVC does not have a SSE4 flag but AVX2 support implies
+  # SSE4 support.
+  set(SIMD_ENABLE_FLAGS "/arch:SSE2;/arch:AVX2;/arch:AVX2;;;;")
+  set(SIMD_DISABLE_FLAGS)
+else()
+  set(SIMD_ENABLE_FLAGS "-msse2;-msse4.1;-mavx2;-mips32;-mdspr2;-mfpu=neon;-mmsa")
+  set(SIMD_DISABLE_FLAGS "-mno-sse2;-mno-sse4.1;-mno-avx2;;-mno-dspr2;;-mno-msa")
+endif()
+
+set(WEBP_SIMD_FILES_TO_NOT_INCLUDE)
+set(WEBP_SIMD_FILES_TO_INCLUDE)
+set(WEBP_SIMD_FLAGS_TO_INCLUDE)
+
+if(${ANDROID})
+  if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
+    # This is because Android studio uses the configuration
+    # "-march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16"
+    # that does not trigger neon optimizations but should
+    # (as this configuration does not exist anymore).
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon ")
+  endif()
+endif()
+
+list(LENGTH WEBP_SIMD_FLAGS WEBP_SIMD_FLAGS_LENGTH)
+math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
+
+foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
+  list(GET WEBP_SIMD_FLAGS ${I_SIMD} WEBP_SIMD_FLAG)
+
+  # First try with no extra flag added as the compiler might have default flags
+  # (especially on Android).
+  unset(WEBP_HAVE_${WEBP_SIMD_FLAG} CACHE)
+  set(CMAKE_REQUIRED_FLAGS)
+  webp_check_compiler_flag(${WEBP_SIMD_FLAG})
+  if(NOT WEBP_HAVE_${WEBP_SIMD_FLAG})
+    list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
+    set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
+    webp_check_compiler_flag(${WEBP_SIMD_FLAG})
+  else()
+    set(SIMD_COMPILE_FLAG " ")
+  endif()
   # Check which files we should include or not.
   list(GET WEBP_SIMD_FILE_EXTENSIONS ${I_SIMD} WEBP_SIMD_FILE_EXTENSION)
   file(GLOB SIMD_FILES "${CMAKE_CURRENT_LIST_DIR}/../"
@@ -54,9 +84,12 @@
     if(SIMD_DISABLE_FLAGS)
       list(GET SIMD_DISABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
       include(CheckCCompilerFlag)
-      check_c_compiler_flag(${SIMD_COMPILE_FLAG} HAS_COMPILE_FLAG)
-      if(HAS_COMPILE_FLAG)
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SIMD_COMPILE_FLAG}")
+      if(SIMD_COMPILE_FLAG)
+        unset(HAS_COMPILE_FLAG CACHE)
+        check_c_compiler_flag(${SIMD_COMPILE_FLAG} HAS_COMPILE_FLAG)
+        if(HAS_COMPILE_FLAG)
+          set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SIMD_COMPILE_FLAG}")
+        endif()
       endif()
     endif()
   endif()


CTest: Updated CTestConfig.cmake to new CDash on jwein2.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
 set(CTEST_PROJECT_NAME "ViennaFVM")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "my.cdash.org")
-set(CTEST_DROP_LOCATION "/submit.php?project=ViennaFVM")
+set(CTEST_DROP_SITE "jwein2.iue.tuwien.ac.at:50000")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ViennaFVM")
 set(CTEST_DROP_SITE_CDASH TRUE)


ENH: Changed CDash URL

ENH: Changed CDash URL

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -13,8 +13,8 @@
 set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "www.cdash.org")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=CDash")
+set(CTEST_DROP_SITE "open.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=CDash")
 set(CTEST_DROP_SITE_CDASH TRUE)
 set(CTEST_CDASH_VERSION "1.6")
 set(CTEST_CDASH_QUERY_VERSION TRUE)


COMP: Don't guard find_package calls with _FOUND variable checks.

If a project (e.g. OpenCV) puts the _FOUND variable in the CMake cache,
its config file would not be read any more and hence certain
CMake variables would not have their proper value on subsequent
CMake configure runs.

--- CMake/mitkMacroFindDependency.cmake
+++ CMake/mitkMacroFindDependency.cmake
@@ -11,45 +11,45 @@
   endif()

   string(TOUPPER "${_mitk_fd_dep}" _mitk_fd_dep_uc)
+
+  if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
+    set(_mitk_fd_quiet_arg QUIET)
+  endif()
+  set(_mitk_fd_required_arg)
+  if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
+    set(_mitk_fd_required_arg REQUIRED)
+  endif()
+
+  get_property(_mitk_fd_is_transitive GLOBAL PROPERTY
+    _CMAKE_${_mitk_fd_dep}_TRANSITIVE_DEPENDENCY
+  )
+
+  # Prefer config mode first because it finds external
+  # <proj>Config.cmake files pointed at by <proj>_DIR variables.
+  # Otherwise, existing Find<proj>.cmake files could fail.
+  # (e.g. in the case of GLEW and the FindGLEW.cmake file shipped
+  # with CMake).
+  find_package(${_mitk_fd_dep} ${ARGN}
+    QUIET
+    CONFIG
+  )
+  if(NOT (${_mitk_fd_dep}_FOUND OR ${_mitk_fd_dep_uc}_FOUND))
+    find_package(${_mitk_fd_dep} ${ARGN}
+      ${cmake_fd_quiet_arg}
+      ${cmake_fd_required_arg}
+    )
+  endif()
+
+  if(NOT DEFINED _mitk_fd_is_transitive OR _mitk_fd_is_transitive)
+    set_property(GLOBAL PROPERTY _CMAKE_${_mitk_fd_dep}_TRANSITIVE_DEPENDENCY TRUE)
+  endif()
+
   if (NOT (${_mitk_fd_dep}_FOUND OR ${_mitk_fd_dep_uc}_FOUND))
-    if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
-      set(_mitk_fd_quiet_arg QUIET)
-    endif()
-    set(_mitk_fd_required_arg)
-    if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
-      set(_mitk_fd_required_arg REQUIRED)
-    endif()
+    set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${_mitk_fd_dep} could not be found.")
+    set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
+    return()
+  endif()
+  set(_mitk_fd_required_arg)
+  set(_mitk_fd_quiet_arg)

-    get_property(_mitk_fd_is_transitive GLOBAL PROPERTY
-      _CMAKE_${_mitk_fd_dep}_TRANSITIVE_DEPENDENCY
-    )
-
-    # Prefer config mode first because it finds external
-    # <proj>Config.cmake files pointed at by <proj>_DIR variables.
-    # Otherwise, existing Find<proj>.cmake files could file
-    # (e.g. in the case of GLEW and the FindGLEW.cmake file shipped
-    # with CMake).
-    find_package(${_mitk_fd_dep} ${ARGN}
-      QUIET
-      CONFIG
-    )
-    if(NOT (${_mitk_fd_dep}_FOUND OR ${_mitk_fd_dep_uc}_FOUND))
-      find_package(${_mitk_fd_dep} ${ARGN}
-        ${cmake_fd_quiet_arg}
-        ${cmake_fd_required_arg}
-      )
-    endif()
-
-    if(NOT DEFINED _mitk_fd_is_transitive OR _mitk_fd_is_transitive)
-      set_property(GLOBAL PROPERTY _CMAKE_${_mitk_fd_dep}_TRANSITIVE_DEPENDENCY TRUE)
-    endif()
-
-    if (NOT (${_mitk_fd_dep}_FOUND OR ${_mitk_fd_dep_uc}_FOUND))
-      set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${_mitk_fd_dep} could not be found.")
-      set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
-      return()
-    endif()
-    set(_mitk_fd_required_arg)
-    set(_mitk_fd_quiet_arg)
-  endif()
 endmacro()


fdatasync is not documented on Snow Leopard and is not in unistd.h CMake finds it as it is expored by system libraries, though attempts to use it will result bring a warning. Fix by using CHECK_SYMBOL_EXISTS instead of CHECK_FUNCTION_EXISTS

--- configure.cmake
+++ configure.cmake
@@ -21,6 +21,7 @@
 INCLUDE (CheckFunctionExists)
 INCLUDE (CheckCCompilerFlag)
 INCLUDE (CheckCSourceRuns)
+INCLUDE (CheckSymbolExists)

 # Sometimes it is handy to know if PIC option
@@ -521,7 +522,7 @@
 CHECK_FUNCTION_EXISTS_UNIX (fchmod HAVE_FCHMOD)
 CHECK_FUNCTION_EXISTS_UNIX (fcntl HAVE_FCNTL)
 CHECK_FUNCTION_EXISTS_UNIX (fconvert HAVE_FCONVERT)
-CHECK_FUNCTION_EXISTS_UNIX (fdatasync HAVE_FDATASYNC)
+CHECK_SYMBOL_EXISTS_UNIX(fdatasync "unistd.h" HAVE_FDATASYNC)
 CHECK_FUNCTION_EXISTS_UNIX (fesetround HAVE_FESETROUND)
 CHECK_FUNCTION_EXISTS_UNIX (fpsetmask HAVE_FPSETMASK)
 CHECK_FUNCTION_EXISTS_UNIX (fseeko HAVE_FSEEKO)
@@ -657,7 +658,7 @@
 #
 # Tests for symbols
 #
-INCLUDE (CheckSymbolExists)
+
 CHECK_SYMBOL_EXISTS_UNIX(sys_errlist "stdio.h" HAVE_SYS_ERRLIST)
 CHECK_SYMBOL_EXISTS_UNIX(madvise "sys/mman.h" HAVE_DECL_MADVISE)
 CHECK_SYMBOL_EXISTS_UNIX(tzname "time.h" HAVE_TZNAME)


Do not create /.git folder when the project is configured

A .git folder kept popping up on in the root folder of my and many of my coworkers' computers.
It was really annoying, because it confused git clients to think that all folder is under revision control
and we had to delete the folder manually. After that the .git folder appeared again, and again...
It remained a mystery for several years ... until now.

We've finally found the culprit: it was a copy-paste error in sitkCheckSourceTree.cmake.
This commit fixes the issue.

--- CMake/sitkCheckSourceTree.cmake
+++ CMake/sitkCheckSourceTree.cmake
@@ -3,8 +3,8 @@
     NOT EXISTS "${SimpleITK_SOURCE_DIR}/.git/hooks/pre-commit")
   # Silently ignore the error if the hooks directory is read-only.
   execute_process(
-    COMMAND ${CMAKE_COMMAND} -E copy ${ITK_SOURCE_DIR}/CMake/pre-commit
-                                     ${ITK_SOURCE_DIR}/.git/hooks/pre-commit
+    COMMAND ${CMAKE_COMMAND} -E copy ${SimpleITK_SOURCE_DIR}/CMake/pre-commit
+                                     ${SimpleITK_SOURCE_DIR}/.git/hooks/pre-commit
     OUTPUT_VARIABLE _output
     ERROR_VARIABLE  _output
     RESULT_VARIABLE _result


Changed MatchPoint to a new version with nicer install rules for a clean external projects dir.
Fixed T20151

Signed-off-by: Ralf Floca <fec4a647ab34f54e20bea9a9e3e1c74f13aefc78@dkfz-heidelberg.de>

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -26,8 +26,8 @@
       set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
     else()
       set(download_step
-          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1481.tar.gz
-          URL_MD5 82b9b1bb3f909f2e00397e285ce8c981
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1610.tar.gz
+          URL_MD5 a9508c8d9ab58a20cf8fa45adb972a02
          )
     endif()


GitExternal: fix update of named tags (eg master)

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -69,6 +69,16 @@
       )
     if(nok)
       message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n")
+    endif()
+
+    # update tag
+    execute_process(COMMAND ${GIT_EXECUTABLE} rebase FETCH_HEAD
+      RESULT_VARIABLE RESULT OUTPUT_VARIABLE OUTPUT ERROR_VARIABLE OUTPUT
+      WORKING_DIRECTORY "${DIR}")
+    if(RESULT)
+      message(STATUS "git rebase failed, aborting ${DIR} merge")
+      execute_process(COMMAND ${GIT_EXECUTABLE} rebase --abort
+        WORKING_DIRECTORY "${DIR}")
     endif()
   else()
     message(STATUS "Can't update git external ${DIR}: Not a git repository")


Revert GitExternal to be standalone

Revert GitExternal to be standalone

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -16,7 +16,6 @@
 endif()

 include(CMakeParseArguments)
-include(CommonProcess)

 function(GIT_EXTERNAL DIR REPO TAG)
   cmake_parse_arguments(GIT_EXTERNAL "" "" "RESET" ${ARGN})
@@ -25,34 +24,42 @@

   if(NOT EXISTS "${DIR}")
     message(STATUS "git clone ${REPO} ${DIR}")
-    common_process("git clone ${DIR}" FATAL_ERROR
+    execute_process(
       COMMAND "${GIT_EXECUTABLE}" clone "${REPO}" "${DIR}"
       RESULT_VARIABLE nok ERROR_VARIABLE error
       WORKING_DIRECTORY "${GIT_EXTERNAL_DIR}")
+    if(nok)
+      message(FATAL_ERROR "${DIR} git clone failed: ${error}\n")
+    endif()
   endif()

   if(IS_DIRECTORY "${DIR}/.git")
     foreach(GIT_EXTERNAL_RESET_FILE ${GIT_EXTERNAL_RESET})
-      common_process("git reset ${GIT_EXTERNAL_RESET_FILE}" STATUS
+      execute_process(
         COMMAND "${GIT_EXECUTABLE}" reset -q "${GIT_EXTERNAL_RESET_FILE}"
         RESULT_VARIABLE nok ERROR_VARIABLE error
         WORKING_DIRECTORY "${DIR}")
-      common_process("git checkout -- ${GIT_EXTERNAL_RESET_FILE}" STATUS
+      execute_process(
         COMMAND "${GIT_EXECUTABLE}" checkout -q -- "${GIT_EXTERNAL_RESET_FILE}"
         RESULT_VARIABLE nok ERROR_VARIABLE error
         WORKING_DIRECTORY "${DIR}")
     endforeach()

-    common_process("Update {$DIR}" STATUS
-      COMMAND "${GIT_EXECUTABLE}" fetch --all -q
+    execute_process(COMMAND "${GIT_EXECUTABLE}" fetch --all -q
       RESULT_VARIABLE nok ERROR_VARIABLE error
       WORKING_DIRECTORY "${DIR}")
+    if(nok)
+      message(STATUS "Update of ${DIR} failed:\n   ${error}")
+    endif()

-    common_process("${DIR} git checkout ${TAG}" STATUS
+    execute_process(
       COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
       RESULT_VARIABLE nok ERROR_VARIABLE error
       WORKING_DIRECTORY "${DIR}"
       )
+    if(nok)
+      message(STATUS "${DIR} git checkout ${TAG} failed: ${error}\n")
+    endif()
   else()
     message(STATUS "Can't update git external ${DIR}: Not a git repository")
   endif()


[ManageReleseOnFedora] Remove debug message

--- Modules/ManageReleaseOnFedora.cmake
+++ Modules/ManageReleaseOnFedora.cmake
@@ -102,7 +102,7 @@

     MACRO(_use_fedpkg_make_targets srpm)
 	SET(_tags ${ARGN})
-	MESSAGE("_tags=${_tags}")
+	#MESSAGE("_tags=${_tags}")
 	#commit
 	IF (DEFINED CHANGE_SUMMARY)
 	    SET (COMMIT_MSG  "-m \"${CHANGE_SUMMARY}\"")
@@ -251,7 +251,7 @@
 		ENDIF("${_arg}" STREQUAL "NORAWHIDE")
 	    ENDFOREACH(_arg)

-	    MESSAGE("_koji_dist_tags=${_koji_dist_tags}")
+	    #MESSAGE("_koji_dist_tags=${_koji_dist_tags}")
 	    IF("${_koji_dist_tags}" STREQUAL "")
 		SET(_koji_dist_tags ${FEDORA_CURRENT_RELEASE_TAGS})
 	    ENDIF("${_koji_dist_tags}" STREQUAL "")


cmake(cpp): Add model_builder wrappers

cmake(cpp): Add model_builder wrappers


CMAKE_FEDORA_MODULE_DIR: cmake-fedora modules dir

--- Modules/ManageEnvironment.cmake
+++ Modules/ManageEnvironment.cmake
@@ -169,12 +169,11 @@
     SET(CMAKE_FEDORA_TMP_DIR "${CMAKE_BINARY_DIR}/NO_PACK")
 ENDIF(NOT CMAKE_FEDORA_TMP_DIR)

-# Current cmake-fedora module
-
+## Current cmake-fedora module
+## Include itself to get MANAGE_ENVIRONMENT_PATH
+INCLUDE(ManageEnvironment RESULT_VARIABLE MANAGE_ENVIRONMENT_PATH)
 GET_FILENAME_COMPONENT(CMAKE_FEDORA_MODULE_DIR
-    "${MANAGE_ENVIRONMENT_PATH}" PATH)
-SET(CMAKE_FEDORA_MODULE_DIR "${CMAKE_FEDORA_MODULE_DIR}"
-    CACHE PATH "cmake-fedora Modules path" FORCE)
+    "${MANAGE_ENVIRONMENT_PATH}" PATH CACHE)

 ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_FEDORA_TMP_DIR}
     COMMAND cmake -E make_directory ${CMAKE_FEDORA_TMP_DIR}


Dashboard : dart.irisa.fr -> dash.inria.fr

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

--- Numerics/cmake/DartConfig.cmake
+++ Numerics/cmake/DartConfig.cmake
@@ -1,13 +1,14 @@
-#set(CTEST_PROJECT_NAME "Siconos")
-#set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
-
-#set(CTEST_DROP_METHOD "http")
-#set(CTEST_DROP_SITE "cdash.irisa.fr")
-#set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Siconos")
-#set(CTEST_DROP_SITE_CDASH TRUE)
-
-SET (DROP_METHOD "xmlrpc")
-SET (DROP_SITE "http://dart.irisa.fr")
-SET (DROP_LOCATION "Siconos")
-SET (COMPRESS_SUBMISSION ON)
-SET (NIGHTLY_START_TIME "9:00PM")
+IF(WITH_DART_IRISA)
+  SET (DROP_METHOD "xmlrpc")
+  SET (DROP_SITE "http://dart.irisa.fr")
+  SET (DROP_LOCATION "Siconos")
+  SET (COMPRESS_SUBMISSION ON)
+  SET (NIGHTLY_START_TIME "9:00PM")
+ELSE(WITH_DART_IRISA)
+  SET(CTEST_PROJECT_NAME "Siconos")
+  SET(NIGHTLY_START_TIME "00:00:00 EST")
+  SET(DROP_METHOD "http")
+  SET(DROP_SITE "cdash.inria.fr")
+  SET(DROP_LOCATION "/CDash/submit.php?project=Siconos")
+  SET(DROP_SITE_CDASH TRUE)
+ENDIF(WITH_DART_IRISA)


added python dir

added python dir

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -19,10 +19,11 @@

   # all libs with a python loader module
   set(_VTK_PYTHON_TARGETS )
-  # Wrapping tools and dependencies
-  set(_VTK_PYTHON_WRAPPED_MODULES vtkWrappingPythonCore vtkWrappingTools)
-  # additional utilities
-  set(_VTK_UTILITY_DEPS
+
+  # python wrapping and dependencies
+  set(_VTK_PYTHON_DEPS
+    vtkWrappingPythonCore
+    vtkWrappingTools
     verdict
     vtksqlite
     vtkproj4
@@ -35,10 +36,6 @@
     vtkexoIIc
     vtkoggtheora )

-  foreach(t ${_VTK_UTILITY_DEPS})
-    list(APPEND _VTK_PYTHON_WRAPPED_MODULES ${t})
-  endforeach()
-
   # find all vtk python wrapped targets
   foreach(_lib ${VTK_LIBRARIES})
     # exclude system libs
@@ -46,13 +43,13 @@
       # use only python wrapped modules
       if(TARGET ${_lib}PythonD)
         list(APPEND _VTK_PYTHON_TARGETS ${_lib}Python)
-        list(APPEND _VTK_PYTHON_WRAPPED_MODULES ${_lib})
+        list(APPEND _VTK_PYTHON_DEPS ${_lib})
       endif()
     endif()
   endforeach()

   # install all targets that are python wrapped
-  foreach(_lib ${_VTK_PYTHON_WRAPPED_MODULES})
+  foreach(_lib ${_VTK_PYTHON_DEPS})
     get_target_property(_target_lib_debug   ${_lib} IMPORTED_LOCATION_DEBUG)
     get_target_property(_target_lib_release ${_lib} IMPORTED_LOCATION_RELEASE)
     get_filename_component(_target_filename_debug   "${_target_lib_debug}" NAME)
@@ -108,7 +105,7 @@

   # install vtk python
   install(DIRECTORY ${VTK_DIR}/Wrapping/Python/vtk
-          DESTINATION bin
+          DESTINATION bin/Python
           USE_SOURCE_PERMISSIONS
           COMPONENT Runtime)


cmake: tweak votca tools find module

cmake: tweak votca tools find module

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -26,7 +26,7 @@
 pkg_check_modules(PC_VOTCA_TOOLS libvotca_tools)
 find_path(VOTCA_TOOLS_INCLUDE_DIR votca/tools/version.h HINTS ${PC_VOTCA_TOOLS_INCLUDE_DIRS})

-find_path(VOTCA_TOOLS_HAS_SQLITE3 votca/tools/database.h HINTS ${PC_VOTCA_TOOLS_INCLUDE_DIRS})
+find_path(VOTCA_TOOLS_HAS_SQLITE3 votca/tools/database.h HINTS ${VOTCA_TOOLS_INCLUDE_DIR} ${PC_VOTCA_TOOLS_INCLUDE_DIRS})
 if (VOTCA_TOOLS_HAS_SQLITE3)
   #due to include <sqlite3.h> in database.h
   find_package(SQLITE3 REQUIRED)


Squashed 'CMakeModules/' changes from 2979d55..ebfa49d

ebfa49d Merge pull request #1 from arpg/private_linkage
40245bc Makes def_library link privately.

git-subtree-dir: CMakeModules
git-subtree-split: ebfa49d8c26ef31a783425596febca3f457820ec

--- def_library.cmake
+++ def_library.cmake
@@ -2,7 +2,7 @@
 include(SetSourceFlags)

 function(def_library lib)
-
+
   string(TOUPPER ${lib} LIB)

   set(LIB_OPTIONS)
@@ -62,11 +62,11 @@
     endif()

     if(lib_DEPENDS)
-      target_link_libraries(${lib} ${lib_DEPENDS})
+      target_link_libraries(${lib} PRIVATE ${lib_DEPENDS})
     endif()

     if(lib_LINK_LIBS)
-      target_link_libraries(${lib} ${lib_LINK_LIBS})
+      target_link_libraries(${lib} PRIVATE ${lib_LINK_LIBS})
     endif()

     if(ANDROID)
@@ -75,7 +75,7 @@
       if(NOT GNUSTL_SHARED_LIBRARY)
 	message(FATAL_ERROR "Could not find required GNU STL shared library.")
       endif()
-      target_link_libraries(${lib} log android z -pthread ${GNUSTL_SHARED_LIBRARY})
+      target_link_libraries(${lib} PRIVATE log android z -pthread ${GNUSTL_SHARED_LIBRARY})
     endif()

     if(lib_PACKAGE)


[cmake] Show color in diagnostics messages from Clang

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -20,6 +20,10 @@
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
 endif()

+# Show color in diagnostics messages from Clang.
+if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
+endif()

 if (NOT WIN32)
   # Clang/GCC


PKG: missing fonts in standalone packages

--- Packaging/install_qtdev_files.cmake
+++ Packaging/install_qtdev_files.cmake
@@ -42,5 +42,8 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/Files/qt.conf
     DESTINATION ${PKG_STAGE_DIR}/bin
     )
-
+
+  if(IS_DIRECTORY "${SUPERBUILD_INSTALL_DIR}/lib/fonts")
+    install_without_message("${SUPERBUILD_INSTALL_DIR}/lib/fonts" "lib")
+  endif()
 endfunction()


android: set all zlib variables used by downstream packages

--- cmake/OpenCVFindLibsGrfmt.cmake
+++ cmake/OpenCVFindLibsGrfmt.cmake
@@ -17,8 +17,10 @@
     unset(_zlib_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES)
   endif()
   if(ZLIB_FOUND AND ANDROID)
-    if(ZLIB_LIBRARIES MATCHES "/usr/lib.*/libz.so$")
+    if(ZLIB_LIBRARY MATCHES "/usr/lib.*/libz.so$")
+      set(ZLIB_LIBRARY z)
       set(ZLIB_LIBRARIES z)
+      set(ZLIB_LIBRARY_RELEASE z)
     endif()
   endif()
 endif()


Windows packaging : creates the bundle for packaging, and sets nsis for cpack.

--- cmake/packaging/Packaging.cmake
+++ cmake/packaging/Packaging.cmake
@@ -64,7 +64,7 @@
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_NAME})
 set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_NAME})

-set(CPACK_PACKAGE_VENDOR "http://www.inria.fr/")
+set(CPACK_PACKAGE_VENDOR "http://med.inria.fr/")
 set(CPACK_PACKAGE_CONTACT "medInria Team <medinria-userfeedback@inria.fr>")

 set(CPACK_PACKAGE_VERSION_MAJOR ${${PROJECT_NAME}_VERSION_MAJOR})
@@ -86,17 +86,99 @@
 set(CPACK_SOURCE_TZ OFF)
 set(CPACK_SOURCE_ZIP OFF)

-foreach(package ${packages})
-    if(NOT USE_SYSTEM_${package})
-        ExternalProject_Get_Property(${package} binary_dir)
-        set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${binary_dir};${package};ALL;${package}")
+if (NOT WIN32)
+	foreach(package ${packages})
+		if(NOT USE_SYSTEM_${package})
+			ExternalProject_Get_Property(${package} binary_dir)
+			set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${binary_dir};${package};ALL;${package}")
+		endif()
+	endforeach()
+	foreach(dir ${PRIVATE_PLUGINS_DIRS})
+			set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${dir};${dir};ALL;${dir}")
+	endforeach()
+else (NOT WIN32)
+	set(DISTRIB windows)
+	set(CPACK_PACKAGE_TYPE NSIS)
+	set(CPACK_PACKAGING_INSTALL_PREFIX "")
+	set(CPACK_PACKAGE_INSTALL_DIRECTORY "medInria-${${PROJECT_NAME}_VERSION}")
+	set(CPACK_MONOLITHIC_INSTALL 1)
+
+	if(CMAKE_CL_64)
+		SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+		#  - Text used in the installer GUI
+		SET(CPACK_NSIS_PACKAGE_NAME "medInria (Win64)")
+		#  - Registry key used to store info about the installation
+		SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "medInria ${${PROJECT_NAME}_VERSION} (Win64)")
+		SET(MSVC_ARCH x64)
+
+	else(CMAKE_CL_64)
+	    SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
+		SET(CPACK_NSIS_PACKAGE_NAME "medInria")
+		SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "medInria ${${PROJECT_NAME}_VERSION}")
+		SET(MSVC_ARCH x86)
+	endif(CMAKE_CL_64)
+
+	set(CPACK_PACKAGE_FILE_NAME "medInria-${${PROJECT_NAME}_VERSION}-${MSVC_ARCH}")
+
+	set(ICON_PATH "${PROJECT_SOURCE_DIR}/medInria/app/medInria/medInria.ico")
+
+	# The icon to install the application.
+	set(CPACK_NSIS_MUI_ICON ${ICON_PATH})
+
+	# The icon to uninstall the application.
+	set(CPACK_NSIS_MUI_UNIICON ${ICON_PATH})
+
+	# Add a desktop shortcut
+	set(CPACK_CREATE_DESKTOP_LINKS "medInria")
+
+	# The icon in the Add/Remove control panel
+	set(CPACK_NSIS_INSTALLED_ICON_NAME bin\\\\medInria.exe)
+
+	# Add medinria to the PATH
+	set(CPACK_NSIS_MODIFY_PATH "ON")
+
+	# Add shortcut in the Startup menu
+	set(CPACK_PACKAGE_EXECUTABLES "medInria" "medInria")
+
+	# Add a link to the application website in the Startup menu.
+	set(CPACK_NSIS_MENU_LINKS "http://med.inria.fr/" "Homepage for medInria")
+
+	# Run medInria after installation
+	set(CPACK_NSIS_MUI_FINISHPAGE_RUN "medInria.exe")
+
+	# Delete the Startup menu link after uninstallation
+	set(CPACK_NSIS_DELETE_ICONS_EXTRA "
+		Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\*.*'
+	")
+
+	if (NOT PRIVATE_PLUGINS_DIRS STREQUAL "")
+        message(WARNING "PRIVATE_PLUGINS_DIRS : Be careful to use '/' in your plugin paths and to end each path with '/' to copy the private plugins in the same level as the public plugins. Do no forget to separate each path with ';'")
+        foreach(pluginpath ${PRIVATE_PLUGINS_DIRS})
+            install(DIRECTORY ${pluginpath} DESTINATION plugins COMPONENT Runtime FILES_MATCHING PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}")
+        endforeach(pluginpath)
+    else(NOT PRIVATE_PLUGINS_DIRS STREQUAL "")
+        message(WARNING "PACKAGING : If you want to add private plugins to your package don't forget to set the PRIVATE_PLUGINS_DIRS variable in the cache.")
     endif()
-endforeach()

-foreach(dir ${PRIVATE_PLUGINS_DIRS})
-        set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${dir};${dir};ALL;${dir}")
-endforeach()
-
+	#${CMAKE_CFG_INTDIR}
+    set(APP "\${CMAKE_INSTALL_PREFIX}/bin/medInria.exe")
+
+    list(APPEND libSearchDirs ${QT_PLUGINS_DIR}/* ${QT_BINARY_DIR} ${ITK_DIR}/bin/Release ${DCMTK_DIR}/bin/Release ${VTK_DIR}/bin/Release ${QTDCM_DIR}/bin/Release ${TTK_DIR}/bin/Release ${dtk_DIR}/bin/Release ${RPI_DIR}/bin/Release ${CMAKE_INSTALL_PREFIX}/bin)
+    set(PLUGINS "\${CMAKE_INSTALL_PREFIX}/plugins/")
+
+	install(CODE "
+	file(INSTALL ${medInria_DIR}/bin/Release/ DESTINATION \${CMAKE_INSTALL_PREFIX}/bin\)
+	file(INSTALL ${medInria_DIR}/plugins/Release/ DESTINATION \${CMAKE_INSTALL_PREFIX}/plugins\)
+    file(INSTALL ${QT_PLUGINS_DIR}/imageformats DESTINATION \${CMAKE_INSTALL_PREFIX}/bin)
+    file(INSTALL \${PLUGINS} DESTINATION \${CMAKE_INSTALL_PREFIX}/plugins )
+    file(INSTALL ${QT_PLUGINS_DIR}/sqldrivers/qsqlite4.dll DESTINATION \${CMAKE_INSTALL_PREFIX}/bin/sqldrivers\)
+    file(INSTALL ${QT_BINARY_DIR}/QtSvg4.dll DESTINATION \${CMAKE_INSTALL_PREFIX}/bin)
+    file(GLOB_RECURSE PLUGINS
+      \${CMAKE_INSTALL_PREFIX}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\)
+    include(BundleUtilities)
+    fixup_bundle(\"${APP}\"   \"\${PLUGINS}\"   \"${libSearchDirs}\")
+    " COMPONENT Runtime)
+endif()

 if (APPLE)
 	set(CPACK_BINARY_TGZ ON)


remove windows stuff from packaging

remove windows stuff from packaging

--- cmake/packaging/Packaging.cmake
+++ cmake/packaging/Packaging.cmake
@@ -18,7 +18,6 @@

   set (CPACK_PACKAGING_INSTALL_PREFIX /usr/local/medInria CACHE STRING "Prefix where the package be install on linux plateformes")
   #Write a postinst and prerm script for Linux
-  set( INSTALL_LIBS_DIRECTORIES_STRING \"${CPACK_PACKAGING_INSTALL_PREFIX}/lib\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/InsightToolkit\\n${CPACK_PACKAGING_INSTALL_PREFIX}/lib/vtk-5.8\" )

   set(POSTINST_SCRIPT ${CMAKE_BINARY_DIR}/linux/postinst)
   file(WRITE ${POSTINST_SCRIPT} "\#!/bin/sh\n" )
@@ -76,55 +75,6 @@
 set(CPACK_SOURCE_TZ OFF)
 set(CPACK_SOURCE_ZIP OFF)

-
-#Windows
-IF(WIN32)
-	MACRO( MAKE_NSIS_INSTALLER TARGET INPUT VERSION)
-		FIND_FILE(MAKENSIS makensis.exe
-			"C:/Program Files/NSIS/"
-            "C:/Program Files (x86)/NSIS/"
-			)
-        #MESSAGE("makensis found?: ${MAKENSIS}")
-		IF( MAKENSIS )
-            #MESSAGE("makensis found")
-			FILE(TO_CMAKE_PATH "$ENV{SYSTEMROOT}" SYSTEMROOT)
-			IF(CMAKE_CL_64)
-				SET(MSVC_ARCH x64)
-                set(PROGFILES_DIR "$PROGRAMFILES64")
-			ELSE(CMAKE_CL_64)
-				SET(MSVC_ARCH x86)
-                set(PROGFILES_DIR "$PROGRAMFILES")
-			ENDIF(CMAKE_CL_64)
-			SET(NSIS_OPTIONS
-				${NSIS_OPTIONS}
-				"/DmedInriaDIR=${EXECUTABLE_OUTPUT_PATH}"
-				"/DmedInriaLIBDIR=${LIBRARY_OUTPUT_PATH}/release"
-				"/DVERSION=${VERSION}"
-				"/DSRCDIR=${PROJECT_SOURCE_DIR}"
-				"/DINST_PREFIX=${CMAKE_INSTALL_PREFIX}"
-				#must be changed but ${CMAKE_INSTALL_PREFIX} has slashes not backslashes...
-
-                "/DPACK_INSTALLDIR=${PROGFILES_DIR}\\inria"
-				"/DPROJECT_NAME=${PROJECT_NAME}"
-				"/DMED_EXECUTABLE=${PROJECT_NAME}.exe"
-                "/DMED_INSTALLER_EXE=${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-win32-${MSVC_ARCH}.exe"
-				)
-            #MESSAGE(${NSIS_OPTIONS})
-			ADD_CUSTOM_COMMAND(
-				TARGET ${TARGET} POST_BUILD
-				COMMAND ${MAKENSIS}
-				ARGS ${NSIS_OPTIONS} ${INPUT}
-				)
-		ENDIF( MAKENSIS )
-	ENDMACRO( MAKE_NSIS_INSTALLER )
-
-	ADD_CUSTOM_TARGET(nsis
-		COMMENT "Create an installer for windows"
-		DEPENDS install
-	)
-    MAKE_NSIS_INSTALLER( nsis  ${PROJECT_SOURCE_DIR}/installerMedinria.nsi  ${${PROJECT_NAME}_VERSION})
-ENDIF(WIN32)
-
 foreach(package ${packages})
     if(NOT USE_SYSTEM_${package})
         ExternalProject_Get_Property(${package} binary_dir)


luajit.cmake: Add lib_buffer.c

luajit.cmake: Add lib_buffer.c

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -238,6 +238,7 @@
   ${LUAJIT_DIR}/src/lib_debug.c
   ${LUAJIT_DIR}/src/lib_jit.c
   ${LUAJIT_DIR}/src/lib_ffi.c
+  ${LUAJIT_DIR}/src/lib_buffer.c
 )

 SET(SRC_LIBAUX


server: fix copy paste error

server: fix copy paste error

--- server/cmake/Utils.cmake
+++ server/cmake/Utils.cmake
@@ -19,5 +19,5 @@
 macro(add_linker_flag FLAG)
     set(CMAKE_EXE_LINKER_FLAGS      "${CMAKE_EXE_LINKER_FLAGS} ${FLAG}")
     set(CMAKE_SHARED_LINKER_FLAGS   "${CMAKE_SHARED_LINKER_FLAGS} ${FLAG}")
-    set(CMAKE_MODULE_LINKER_FLAGS   "${CMAKE_SHARED_LINKER_FLAGS} ${FLAG}")
+    set(CMAKE_MODULE_LINKER_FLAGS   "${CMAKE_MODULE_LINKER_FLAGS} ${FLAG}")
 endmacro()


Update boost compute version to 1.70

Update boost compute version to 1.70

Boost Compute has a bug in the older versions. This version is
required for the OpenCL version of scan

--- CMakeModules/boost_package.cmake
+++ CMakeModules/boost_package.cmake
@@ -7,14 +7,14 @@

 find_package(Boost)

-if("${Boost_VERSION}" VERSION_LESS 106100)
-  set(VER boost-1.61.0)
-  set(MD5 7e1c433b48825d8cb2effa963823aec8)
+if("${Boost_VERSION}" VERSION_LESS 107000)
+  set(VER 1.70.0)
+  set(MD5 e160ec0ff825fc2850ea4614323b1fb5)
   include(ExternalProject)

   ExternalProject_Add(
     boost_compute
-    URL       https://github.com/boostorg/compute/archive/${VER}.tar.gz
+    URL       https://github.com/boostorg/compute/archive/boost-${VER}.tar.gz
     URL_MD5   ${MD5}
     INSTALL_COMMAND ""
     CONFIGURE_COMMAND ""
@@ -22,7 +22,11 @@
     )

   ExternalProject_Get_Property(boost_compute source_dir)
-  message(STATUS "BOOST_COMPUTE: ${source_dir}")
+
+  if(NOT EXISTS ${source_dir}/include)
+      message(WARNING "WARN: Found Boost v${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}."
+                      " Required ${VER}. Build will download Boost Compute.")
+  endif()
   make_directory(${source_dir}/include)

   if(NOT TARGET Boost::boost)
@@ -37,7 +41,9 @@
     )
 endif()

-# NOTE: BOOST_CHRONO_HEADER_ONLY is required for Windows because otherwise it
-# will try to link with libboost-chrono.
-set_target_properties(Boost::boost PROPERTIES INTERFACE_COMPILE_DEFINITIONS
-  "BOOST_CHRONO_HEADER_ONLY;BOOST_COMPUTE_THREAD_SAFE;BOOST_COMPUTE_HAVE_THREAD_LOCAL")
+if(TARGET Boost::boost)
+  # NOTE: BOOST_CHRONO_HEADER_ONLY is required for Windows because otherwise it
+  # will try to link with libboost-chrono.
+  set_target_properties(Boost::boost PROPERTIES INTERFACE_COMPILE_DEFINITIONS
+    "BOOST_CHRONO_HEADER_ONLY;BOOST_COMPUTE_THREAD_SAFE;BOOST_COMPUTE_HAVE_THREAD_LOCAL")
+endif()


change ilplib from static to dynamic

change ilplib from static to dynamic

--- source/ConfigureChecks.cmake
+++ source/ConfigureChecks.cmake
@@ -40,10 +40,7 @@
   msgpack
   )

-FIND_PACKAGE(ilplib REQUIRED COMPONENTS
-  ilplib
-)
-
+FIND_PACKAGE(ilplib REQUIRED)
 FIND_PACKAGE(idmlib REQUIRED)
 FIND_PACKAGE(imllib REQUIRED)
 FIND_PACKAGE(xml2 REQUIRED)


[OGRE-282] Remove strange Apple specific code in FindOgre

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -232,9 +232,6 @@

 make_library_set(OGRE_LIBRARY)

-if(APPLE)
-  set(OGRE_LIBRARY_DBG ${OGRE_LIB_SEARCH_PATH})
-endif()
 if (OGRE_INCOMPATIBLE)
   set(OGRE_LIBRARY "NOTFOUND")
 endif ()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


COMP: updating ITK location in windows dashboard script

--- Testing/Dashboard/pxDashboard_LKEB_win7-64_VS2008.cmake
+++ Testing/Dashboard/pxDashboard_LKEB_win7-64_VS2008.cmake
@@ -36,7 +36,7 @@

 SET( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=D:/toolkits/ITK/4.0.0/binVS2008
+ITK_DIR:PATH=D:/toolkits/ITK/latest_release/bin_VS2008

 // Some ITKTools settings, defining the configuration
 ITKTOOLS_BUILD_TESTING:BOOL=ON


Parallel builds progress system finished. Resolves #3

--- blocks/boost/install/build_jobs.cmake
+++ blocks/boost/install/build_jobs.cmake
@@ -1,9 +1,22 @@
 include(toeb/cmakepp/cmakepp)
 include(boost/install/snake)
+
+function(__update_progress_message)
+	ref_set(${libs_ahead} "")
+	map_foreach("${__job_handles}" "[](handle lib) ref_append_string(${libs_ahead} \"\ \${lib}\")")
+endfunction()

 function(__job_success_handler process_handle)
 	map_get("${__job_handles}" "${process_handle}")
 	ans(lib)
+
+	#Remove handle from map after success
+	map_remove("${__job_handles}" "${process_handle}")
+
+	#Update libs list
+	__update_progress_message()
+
+

 	assign(output = process_handle.stdout)
 	assign(error = process_handle.stderr)
@@ -11,13 +24,27 @@
 	assign(output = process_handle.stdout)
 	assign(wd = process_handle.start_info.working_directory)

+	set(finish_message "Finished building ${lib} library")
+
 	#Maybe we need curses for this...
-	echo_append("\r                                                                            ")
-	message("\rFinished building ${lib} library:")
-	message("Working directory: ${wd}")
-	message("Return value: ${result}")
-	message("stdout: ${output}")
-	message("stderr: ${error}")
+	if(NOT WIN32)
+		string(LENGTH ${finish_message} finish_message_length)
+		ref_get(${progress_message_length})
+		ans(progress_message_length)
+		string_repeat(" " "${progress_message_length}")
+		ans(CLEAR)
+
+		echo_append("\r${CLEAR}")
+		message("\r${finish_message}")
+	endif()
+
+	if(VERBOSE)
+		message("Process info:")
+		message(" - Working directory: ${wd}")
+		message(" - Return value: ${result}")
+		message(" - stdout: ${output}")
+		message(" - stderr: ${error}")
+	endif()
 endfunction()

 function(__job_error_handler process_handle)
@@ -30,7 +57,10 @@
 endfunction()

 function(__global_progress_handler ticks)
-	set(MESSAGE "Go for churros...")
+	ref_get(${libs_ahead})
+	ans(libs_ahead)
+
+	set(MESSAGE "Building${libs_ahead} libraries...")
 	string(LENGTH ${MESSAGE} SNAKE_LENGTH)
 	math(EXPR WINDOW "${SNAKE_LENGTH}")
 	math(EXPR MAX "(${WINDOW} + ${SNAKE_LENGTH})")
@@ -39,7 +69,11 @@

 	generate_snake("${MESSAGE}" "${PROGRESS_COUNTER}" "${SNAKE_LENGTH}" "${WINDOW}" SNAKE)

-	echo_append("\rBuilding Boost components, please wait [${SNAKE}]")
+	set(PROGRESS_MESSAGE "Building Boost components, please wait [${SNAKE}]")
+	string(LENGTH "${PROGRESS_MESSAGE}" PROGRESS_MESSAGE_LENGTH)
+	ref_set("${progress_message_length}" "${PROGRESS_MESSAGE_LENGTH}")
+
+	echo_append("\r${PROGRESS_MESSAGE}")
 endfunction()

 function(__execute_success_handler handle)
@@ -67,6 +101,13 @@
 		map_set("${__job_handles}" "${handle}" "${lib}")
 	endforeach()

+	ref_new()
+	ans(libs_ahead)
+	__update_progress_message()
+
+	ref_new()
+	ans(progress_message_length)
+
 	process_wait_all(${handles_list} --idle-callback __global_progress_handler
 		                             --task-complete-callback __job_success_handler)
 endfunction()


remove debug output.

remove debug output.

--- cmake/ArangoDBInstall.cmake
+++ cmake/ArangoDBInstall.cmake
@@ -34,11 +34,6 @@
 # install ----------------------------------------------------------------------
 install(DIRECTORY ${PROJECT_SOURCE_DIR}/Documentation/man/
   DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/man)
-
-get_cmake_property(_variableNames VARIABLES)
-foreach (_variableName ${_variableNames})
-    message(STATUS "${_variableName}=${${_variableName}}")
-endforeach()

 install_readme(README README.txt)
 install_readme(README.md README.md)


Always print the ALIROOT_SERIAL, even in a branch

--- cmake/CheckGitVersion.cmake
+++ cmake/CheckGitVersion.cmake
@@ -48,7 +48,7 @@
                           WORKING_DIRECTORY ${AliRoot_SOURCE_DIR}
                           OUTPUT_STRIP_TRAILING_WHITESPACE
                           RESULT_VARIABLE revcount
-                          OUTPUT_VARIABLE ALIROOT_SERIAL)
+                          OUTPUT_VARIABLE ALIROOT_SERIAL_ORIGINAL)

         # GIT_REFSPEC is empty for detached mode = tags in detached mode or checkout to specific hash
@@ -77,6 +77,7 @@
         else()
             set(SHORT_BRANCH ${ALIROOT_GIT_TAG})
             set(ALIROOT_REVISION ${GIT_SHORT_SHA1})
+            set(ALIROOT_SERIAL ${ALIROOT_SERIAL_ORIGINAL})
         endif()

         set(ALIROOT_BRANCH ${SHORT_BRANCH})
@@ -86,7 +87,7 @@
         string(REPLACE "-" "." ALIROOT_VERSION_RPM ${ALIROOT_VERSION})

-        message(STATUS "Aliroot branch/tag: \"${ALIROOT_VERSION}\" - Revision:  \"${GIT_SHORT_SHA1}\" - Serial: \"${ALIROOT_SERIAL}\"")
+        message(STATUS "Aliroot branch/tag: \"${ALIROOT_VERSION}\" - Revision:  \"${GIT_SHORT_SHA1}\" - Serial: \"${ALIROOT_SERIAL_ORIGINAL}\"")

     else()
         message(STATUS "Git not installed. I can't tell you which revision you are using!")


Make comments in FindGMP.cmake more cmake-default

--- cmake/Modules/FindGMP.cmake
+++ cmake/Modules/FindGMP.cmake
@@ -1,15 +1,16 @@
-# Try to find GMP library
-# If found the following variables are defined:
+# - Try to find GMP library
+# Once done this will define the following variables:
 #
 #   GMP_FOUND - system has GMP
 #   GMP_INCLUDE_DIRS - GMP include directory
 #   GMP_LIBRARIES - link these to use GMP
-#   GMP_DEFINITIONS - compiler switches required for GMP
+#   GMP_DEFINITIONS - compiler switches required for using GMP
 #
-# Based on CMake module (part of libssh) by Andreas Schneider <asn@cynapses.org>
+# Based on FindArgp.cmake module by Andreas Schneider <asn@cynapses.org>
+# FindArgp.cmake is a part of libssh project.
 #
-# Redistribution and use is allowed according to the terms of
-# the New BSD license.
+# Redistribution and use is allowed according to
+# the terms of the New BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #


tbb: don't search library in ENV{LD_LIBRARY_PATH}

ENV{LIBRARY_PATH} is enough

--- cmake/OpenCVDetectTBB.cmake
+++ cmake/OpenCVDetectTBB.cmake
@@ -41,9 +41,9 @@
 function(ocv_tbb_env_guess _found)
   find_path(TBB_ENV_INCLUDE NAMES "tbb/tbb.h" PATHS ENV CPATH NO_DEFAULT_PATH)
   find_path(TBB_ENV_INCLUDE NAMES "tbb/tbb.h")
-  find_library(TBB_ENV_LIB NAMES "tbb" PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+  find_library(TBB_ENV_LIB NAMES "tbb" PATHS ENV LIBRARY_PATH NO_DEFAULT_PATH)
   find_library(TBB_ENV_LIB NAMES "tbb")
-  find_library(TBB_ENV_LIB_DEBUG NAMES "tbb_debug" PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH)
+  find_library(TBB_ENV_LIB_DEBUG NAMES "tbb_debug" PATHS ENV LIBRARY_PATH NO_DEFAULT_PATH)
   find_library(TBB_ENV_LIB_DEBUG NAMES "tbb_debug")
   if (TBB_ENV_INCLUDE AND (TBB_ENV_LIB OR TBB_ENV_LIB_DEBUG))
     ocv_tbb_verify()


Sanitize address

Sanitize address

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -530,14 +530,14 @@
 		)
 	endif()

-	set(max_optimization -Os)
+	set(max_optimization -O1)

 	set(optimization_flags
 		-fno-strict-aliasing
-		-fomit-frame-pointer
 		-funsafe-math-optimizations
 		-ffunction-sections
 		-fdata-sections
+		-g -fsanitize=address -fno-omit-frame-pointer
 		)

 	if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -25,7 +25,7 @@
 # NOTE: no names with spaces!

 hunter_config(puffin-stream VERSION 0.2.2.0)
-hunter_config(puffin-buffer VERSION 0.3.1.0)
+hunter_config(puffin-buffer VERSION 0.3.2.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


fix xxhash compile on macos test=develop

--- cmake/external/xxhash.cmake
+++ cmake/external/xxhash.cmake
@@ -7,7 +7,11 @@
 IF(WITH_STATIC_LIB)
   SET(BUILD_CMD make lib)
 ELSE()
-  SET(BUILD_CMD sed -i "s/-Wstrict-prototypes -Wundef/-Wstrict-prototypes -Wundef -fPIC/g" ${XXHASH_SOURCE_DIR}/src/extern_xxhash/Makefile && make lib)
+  IF(APPLE)
+    SET(BUILD_CMD sed -i \"\" "s/-Wstrict-prototypes -Wundef/-Wstrict-prototypes -Wundef -fPIC/g" ${XXHASH_SOURCE_DIR}/src/extern_xxhash/Makefile && make lib)
+  ELSE(APPLE)
+    SET(BUILD_CMD sed -i "s/-Wstrict-prototypes -Wundef/-Wstrict-prototypes -Wundef -fPIC/g" ${XXHASH_SOURCE_DIR}/src/extern_xxhash/Makefile && make lib)
+  ENDIF(APPLE)
 ENDIF()

 ExternalProject_Add(


Fixes unknown compiler flags warning

Fixes unknown compiler flags warning

--- cmake/megamol_options.cmake
+++ cmake/megamol_options.cmake
@@ -22,8 +22,10 @@

 # Set CXX flags for debug mode
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG -D_DEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -D_NDEBUG -O3 -g0")
-if(UNIX)
+if(WIN32)
+  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -D_NDEBUG")
+elseif(UNIX)
+  set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG -D_NDEBUG -O3 -g0")
   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
 endif()


[cmake] Fix typo where a varible was checked for Apple instead of Darwin

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1682,7 +1682,7 @@
         XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS ${ARG_ENTITLEMENTS}
       )
     endif()
-  elseif(APPLE AND CMAKE_HOST_SYSTEM_NAME MATCHES APPLE)
+  elseif(APPLE AND CMAKE_HOST_SYSTEM_NAME MATCHES Darwin)
     if(NOT CMAKE_CODESIGN)
       set(CMAKE_CODESIGN xcrun codesign)
     endif()


Add a FIXME.

Add a FIXME.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -77,6 +77,9 @@
 endfunction(add_llvm_symbol_exports)

 function(add_dead_strip target_name)
+  # FIXME: With MSVS, consider compiling with /Gy and linking with /OPT:REF?
+  # But MinSizeRel seems to add that automatically, so maybe disable these
+  # flags instead if LLVM_NO_DEAD_STRIP is set.
   if(NOT CYGWIN AND NOT MINGW AND NOT MSVC)
     if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
        SET(CMAKE_CXX_FLAGS


[cmake] Quote the path to the target exports file, fixes PR23313

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -108,7 +108,7 @@
       COMMENT "Creating export file for ${target_name}")
     set(export_file_linker_flag "${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
     if(MSVC)
-      set(export_file_linker_flag "/DEF:${export_file_linker_flag}")
+      set(export_file_linker_flag "/DEF:\"${export_file_linker_flag}\"")
     endif()
     set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                  LINK_FLAGS " ${export_file_linker_flag}")


[cmake] Allow EH usage with clang-cl

[cmake] Allow EH usage with clang-cl

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -8,9 +8,9 @@
     set(update_src_props ON)
   endif()

-  # LLVM_REQUIRES_EH is an internal flag that individual
-  # targets can use to force EH
-  if((LLVM_REQUIRES_EH OR LLVM_ENABLE_EH) AND NOT CLANG_CL)
+  # LLVM_REQUIRES_EH is an internal flag that individual targets can use to
+  # force EH
+  if(LLVM_REQUIRES_EH OR LLVM_ENABLE_EH)
     if(NOT (LLVM_REQUIRES_RTTI OR LLVM_ENABLE_RTTI))
       message(AUTHOR_WARNING "Exception handling requires RTTI. Enabling RTTI for ${name}")
       set(LLVM_REQUIRES_RTTI ON)


use lcm/lcm.h as header name for LCM module search

--- cmake/modules/FindLCM.cmake
+++ cmake/modules/FindLCM.cmake
@@ -32,4 +32,4 @@
 endmacro()

-pkg_config_find_module(LCM lcm lcm.h lcm lcm)
+pkg_config_find_module(LCM lcm lcm/lcm.h lcm lcm)


use CMAKE_COMMAND

use CMAKE_COMMAND

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -28,8 +28,8 @@
     set(RE2C_BIN "${re2c_BINARY_DIR}/re2c")

     if(BUILD_RE2C_WITH_CMAKE)
-        execute_process(COMMAND cmake ${RE2C_SRC} WORKING_DIRECTORY ${re2c_BINARY_DIR})
-        execute_process(COMMAND make WORKING_DIRECTORY ${re2c_BINARY_DIR})
+        execute_process(COMMAND ${CMAKE_COMMAND} ${RE2C_SRC} WORKING_DIRECTORY ${re2c_BINARY_DIR})
+        execute_process(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY ${re2c_BINARY_DIR})
     else()
         if(NOT EXISTS "${RE2C_SRC}/configure")
             execute_process(COMMAND ./autogen.sh WORKING_DIRECTORY ${RE2C_SRC})


[libc++] Fix linker script generation

[libc++] Fix linker script generation

Handle the case when libc++abi and libunwind are being built together
with libc++ in the runtimes build. This logic was used in the previous
implementation but dropped in r374116.

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

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

--- cmake/Modules/DefineLinkerScript.cmake
+++ cmake/Modules/DefineLinkerScript.cmake
@@ -31,7 +31,9 @@
   set(link_libraries)
   if (interface_libs)
     foreach(lib IN LISTS interface_libs)
-      if (TARGET "${lib}")
+      if (TARGET "${lib}" OR
+          (${lib} MATCHES "cxxabi(_static|_shared)?" AND HAVE_LIBCXXABI) OR
+          (${lib} MATCHES "unwind(_static|_shared)?" AND HAVE_LIBUNWIND))
         list(APPEND link_libraries "${CMAKE_LINK_LIBRARY_FLAG}$<TARGET_PROPERTY:${lib},OUTPUT_NAME>")
       else()
         list(APPEND link_libraries "${CMAKE_LINK_LIBRARY_FLAG}${lib}")


support for QNX (#33)

support for QNX (#33)

compiler ID for QNX is QCC

--- cmake/common/check_configuration.cmake
+++ cmake/common/check_configuration.cmake
@@ -16,7 +16,8 @@
     # Check C++11
     include(CheckCXXCompilerFlag)
     if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG OR
-        CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+        CMAKE_CXX_COMPILER_ID MATCHES "QCC")
         check_cxx_compiler_flag(-std=c++14 SUPPORTS_CXX14)
         set(HAVE_CXX14 0)
         set(HAVE_CXX1Y 0)


bootloader: disable psram cache bug fix for bootloader

The psram cache bug fix was also being applied to the bootloader binary (for cmake),
which doesnt do any psram access.

Applying this fix would increase the binary size, as much as 300 bytes in worst case scenarios

--- components/esp32/project_include.cmake
+++ components/esp32/project_include.cmake
@@ -1,4 +1,4 @@
-if(CONFIG_SPIRAM_CACHE_WORKAROUND)
+if(CONFIG_SPIRAM_CACHE_WORKAROUND AND NOT BOOTLOADER_BUILD)
     # We do this here as well as in CMakeLists.txt, because targets that
     # are not part of the ESP-IDF build system (for cases where a generic
     # non-IDF CMakeLists.txt file is imported into a component) don't depend


[nrfconnect] Added workaround fixing improper select method operation. (#3800)

Select method is not working properly, because of the internal Zephyr's
implementation problem with casting timeval types.

* Added compile definition to force using time_t type of size equal
to the long size and fix problem until the real problem solution
will be merged in the Zephyr project.

--- config/nrfconnect/nrfconnect-app.cmake
+++ config/nrfconnect/nrfconnect-app.cmake
@@ -52,6 +52,9 @@
 # Load NCS/Zephyr build system
 # ==================================================
 find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
+
+# TODO: temporary fix forcing time_t size to be equal long size - remove it after merging fix from Zephyr project.
+zephyr_compile_definitions(_USE_LONG_TIME_T)

 # ==================================================
 # General settings


[Build] Generalised the module_python_add CMake macro to any type of scripts (Shell, Python, Perl, Ruby, etc).

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1483,8 +1483,15 @@
 endmacro (module_binary_add)

 ##
-# Add a Python script to be installed
-macro (module_python_add _script_file)
+# Add a (Shell, Python, Perl, Ruby, etc) script to be installed.
+#
+# The parameter is the relative file path of the (template) script to
+# be installed. That template file must end with the '.in' suffix.
+# Indeed, the project variables (wrapped by @@ signs) of the template file
+# are evaluated and expanded thanks to the configure command.
+# The '.in' extension of the script is dropped once installed.
+#
+macro (module_script_add _script_file)
   #
   set (_full_script_src_path ${CMAKE_CURRENT_SOURCE_DIR}/${_script_file}.in)
   set (_full_script_path ${CMAKE_CURRENT_BINARY_DIR}/${_script_file})
@@ -1492,11 +1499,14 @@
 	#
     configure_file (${_full_script_src_path} ${_full_script_path} @ONLY)

-    # Add the 'scripts_${MODULE_NAME}' target, depending on the
-    # converted (Python) scripts
-    add_custom_target (scripts_${MODULE_NAME} ALL DEPENDS ${_full_script_path})
-
-    # Install the (Python) script file
+	# Extract the file name (only) from the full file path
+	get_filename_component (_script_alone ${_script_file} NAME)
+
+	# Add the 'scripts_${MODULE_NAME}' target, depending on the
+    # converted (Shell, Python, Perl, Ruby, etc) scripts
+    add_custom_target (${_script_alone}_script ALL DEPENDS ${_full_script_path})
+
+    # Install the (Shell, Python, Perl, Ruby, etc) script file
     install (PROGRAMS ${_full_script_path} DESTINATION bin COMPONENT devel)

   else (EXISTS ${_full_script_src_path})
@@ -1505,7 +1515,6 @@
   endif (EXISTS ${_full_script_src_path})

   # Register the binary target in the project (for reporting purpose)
-  get_filename_component (_script_alone ${_script_file} NAME)
   list (APPEND PROJ_ALL_BIN_TARGETS ${_script_alone})
   set (PROJ_ALL_BIN_TARGETS ${PROJ_ALL_BIN_TARGETS} PARENT_SCOPE)

@@ -1514,7 +1523,7 @@
   list (APPEND ${MODULE_NAME}_ALL_EXECS ${_script_alone})
   set (${MODULE_NAME}_ALL_EXECS ${${MODULE_NAME}_ALL_EXECS} PARENT_SCOPE)

-endmacro (module_python_add)
+endmacro (module_script_add)

 ##
 # Installation of the CMake import helper, so that third party projects


Make sure we use the x64 toolchain when cross-compiling from ARM.

The effect of this changeset is to explicitly state that we're building
for x86_64 when cross-compiling from an Apple M1 machine.

This is necessary as CMake will default to building using the ARM64
toolchain if CMAKE_OSX_ARCHITECTURES is unset.

--- contrib/cmake/build_from_scratch.cmake
+++ contrib/cmake/build_from_scratch.cmake
@@ -38,7 +38,6 @@
 	before first running this script, copy it to 3rdParty_sdk/vcpkg/pdfium once the script has created that folder
 	and it will be built during the first run - avoid disabling it by leaving out those steps flags of course.
 ]]
-
 function(usage_exit err_msg)
     message(FATAL_ERROR
 "${err_msg}
@@ -235,6 +234,28 @@
         )
     endif()

+    # Are we building for OSX?
+    if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+        # Determine the host's architecture.
+        execute_process(
+            COMMAND uname -m
+            OUTPUT_VARIABLE HOST_ARCHITECTURE
+            OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+        # Are we building on Apple Silicon?
+        if (HOST_ARCHITECTURE STREQUAL "arm64")
+            # Are we building for x86_64?
+            if (VCPKG_OSX_ARCHITECTURES STREQUAL "x86_64")
+                # Then make sure we build using the correct toolchain.
+                set(_toolchain_cross_compile_args
+                    "-DCMAKE_OSX_ARCHITECTURES=${VCPKG_OSX_ARCHITECTURES}")
+            endif ()
+        endif ()
+
+        # Clean up after ourselves.
+        unset(HOST_ARCHITECTURE)
+    endif ()
+
     foreach(_config "Debug" "Release")
         set(_build_dir "${_sdk_dir}/build-${_triplet}-${_config}")
         file(MAKE_DIRECTORY ${_build_dir})


fixed boost alignment define only for gcc

--- cmake/UbiTrackFindCoreLibraries.cmake
+++ cmake/UbiTrackFindCoreLibraries.cmake
@@ -20,7 +20,9 @@

 # always use supplied boost bindings
 set(BOOSTBINDINGS_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/modules/utcore/3rd/boost-bindings")
-add_definitions("-DBOOST_UBLAS_BOUNDED_ARRAY_ALIGN=__attribute__ ((aligned (16)))")
+IF(CMAKE_COMPILER_IS_GNUCXX)
+  add_definitions("-DBOOST_UBLAS_BOUNDED_ARRAY_ALIGN=__attribute__ ((aligned (16)))")
+ENDIF(CMAKE_COMPILER_IS_GNUCXX)
 add_definitions(-DBOOST_SPIRIT_USE_OLD_NAMESPACE)
 set(HAVE_BOOSTBINDINGS 1)


Don't append ".a" for LLVM/Clang/gtest dependencies on Windows

--- cmake/modules/AddSwiftUnittests.cmake
+++ cmake/modules/AddSwiftUnittests.cmake
@@ -28,8 +28,8 @@

     set(new_libnames)
     foreach(dep ${libnames})
-      if("${dep}" MATCHES "^(LLVM|Clang|gtest)")
-        list(APPEND new_libnames "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
+      if("${dep}" MATCHES "^(LLVM|Clang|gtest)" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+        ist(APPEND new_libnames "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
       else()
         list(APPEND new_libnames "${dep}")
       endif()


[cmake] Replace -Wall with /W4 in clang-cl options now that -Wall aliases -Weverything

Instead, reuse the code-path for cl.exe that adds /W4 , which for clang-cl
aliases clang's "-Wall -Wextra" which matches what clang-cl's /Wall
previously aliased.

This should restore the verbosity of a Windows selfhost build back to
its previous levels.

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -458,64 +458,66 @@
   endif(LLVM_ENABLE_MODULES)
 endif( MSVC )

-if (MSVC AND NOT CLANG_CL)
-  set(msvc_warning_flags
-    # Disabled warnings.
-    -wd4141 # Suppress ''modifier' : used more than once' (because of __forceinline combined with inline)
-    -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
-    -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
-    -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
-    -wd4258 # Suppress ''var' : definition from the for loop is ignored; the definition from the enclosing scope is used'
-    -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
-    -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
-    -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'
-    -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized'
-    -wd4355 # Suppress ''this' : used in base member initializer list'
-    -wd4456 # Suppress 'declaration of 'var' hides local variable'
-    -wd4457 # Suppress 'declaration of 'var' hides function parameter'
-    -wd4458 # Suppress 'declaration of 'var' hides class member'
-    -wd4459 # Suppress 'declaration of 'var' hides global declaration'
-    -wd4503 # Suppress ''identifier' : decorated name length exceeded, name was truncated'
-    -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'
-    -wd4722 # Suppress 'function' : destructor never returns, potential memory leak
-    -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'
-    -wd4100 # Suppress 'unreferenced formal parameter'
-    -wd4127 # Suppress 'conditional expression is constant'
-    -wd4512 # Suppress 'assignment operator could not be generated'
-    -wd4505 # Suppress 'unreferenced local function has been removed'
-    -wd4610 # Suppress '<class> can never be instantiated'
-    -wd4510 # Suppress 'default constructor could not be generated'
-    -wd4702 # Suppress 'unreachable code'
-    -wd4245 # Suppress 'signed/unsigned mismatch'
-    -wd4706 # Suppress 'assignment within conditional expression'
-    -wd4310 # Suppress 'cast truncates constant value'
-    -wd4701 # Suppress 'potentially uninitialized local variable'
-    -wd4703 # Suppress 'potentially uninitialized local pointer variable'
-    -wd4389 # Suppress 'signed/unsigned mismatch'
-    -wd4611 # Suppress 'interaction between '_setjmp' and C++ object destruction is non-portable'
-    -wd4805 # Suppress 'unsafe mix of type <type> and type <type> in operation'
-    -wd4204 # Suppress 'nonstandard extension used : non-constant aggregate initializer'
-    -wd4577 # Suppress 'noexcept used with no exception handling mode specified; termination on exception is not guaranteed'
-    -wd4091 # Suppress 'typedef: ignored on left of '' when no variable is declared'
-        # C4592 is disabled because of false positives in Visual Studio 2015
-        # Update 1. Re-evaluate the usefulness of this diagnostic with Update 2.
-    -wd4592 # Suppress ''var': symbol will be dynamically initialized (implementation limitation)
-    -wd4319 # Suppress ''operator' : zero extending 'type' to 'type' of greater size'
-
-    # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
-    # support the 'aligned' attribute in the way that clang sources requires (for
-    # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
-    # avoid unwanted alignment warnings.
-    # When we switch to requiring a version of MSVC that supports the 'alignas'
-    # specifier (MSVC 2015?) this warning can be re-enabled.
-    -wd4324 # Suppress 'structure was padded due to __declspec(align())'
-
-    # Promoted warnings.
-    -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
-
-    # Promoted warnings to errors.
-    -we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
-    )
+if (MSVC)
+  if (NOT CLANG_CL)
+    set(msvc_warning_flags
+      # Disabled warnings.
+      -wd4141 # Suppress ''modifier' : used more than once' (because of __forceinline combined with inline)
+      -wd4146 # Suppress 'unary minus operator applied to unsigned type, result still unsigned'
+      -wd4180 # Suppress 'qualifier applied to function type has no meaning; ignored'
+      -wd4244 # Suppress ''argument' : conversion from 'type1' to 'type2', possible loss of data'
+      -wd4258 # Suppress ''var' : definition from the for loop is ignored; the definition from the enclosing scope is used'
+      -wd4267 # Suppress ''var' : conversion from 'size_t' to 'type', possible loss of data'
+      -wd4291 # Suppress ''declaration' : no matching operator delete found; memory will not be freed if initialization throws an exception'
+      -wd4345 # Suppress 'behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized'
+      -wd4351 # Suppress 'new behavior: elements of array 'array' will be default initialized'
+      -wd4355 # Suppress ''this' : used in base member initializer list'
+      -wd4456 # Suppress 'declaration of 'var' hides local variable'
+      -wd4457 # Suppress 'declaration of 'var' hides function parameter'
+      -wd4458 # Suppress 'declaration of 'var' hides class member'
+      -wd4459 # Suppress 'declaration of 'var' hides global declaration'
+      -wd4503 # Suppress ''identifier' : decorated name length exceeded, name was truncated'
+      -wd4624 # Suppress ''derived class' : destructor could not be generated because a base class destructor is inaccessible'
+      -wd4722 # Suppress 'function' : destructor never returns, potential memory leak
+      -wd4800 # Suppress ''type' : forcing value to bool 'true' or 'false' (performance warning)'
+      -wd4100 # Suppress 'unreferenced formal parameter'
+      -wd4127 # Suppress 'conditional expression is constant'
+      -wd4512 # Suppress 'assignment operator could not be generated'
+      -wd4505 # Suppress 'unreferenced local function has been removed'
+      -wd4610 # Suppress '<class> can never be instantiated'
+      -wd4510 # Suppress 'default constructor could not be generated'
+      -wd4702 # Suppress 'unreachable code'
+      -wd4245 # Suppress 'signed/unsigned mismatch'
+      -wd4706 # Suppress 'assignment within conditional expression'
+      -wd4310 # Suppress 'cast truncates constant value'
+      -wd4701 # Suppress 'potentially uninitialized local variable'
+      -wd4703 # Suppress 'potentially uninitialized local pointer variable'
+      -wd4389 # Suppress 'signed/unsigned mismatch'
+      -wd4611 # Suppress 'interaction between '_setjmp' and C++ object destruction is non-portable'
+      -wd4805 # Suppress 'unsafe mix of type <type> and type <type> in operation'
+      -wd4204 # Suppress 'nonstandard extension used : non-constant aggregate initializer'
+      -wd4577 # Suppress 'noexcept used with no exception handling mode specified; termination on exception is not guaranteed'
+      -wd4091 # Suppress 'typedef: ignored on left of '' when no variable is declared'
+          # C4592 is disabled because of false positives in Visual Studio 2015
+          # Update 1. Re-evaluate the usefulness of this diagnostic with Update 2.
+      -wd4592 # Suppress ''var': symbol will be dynamically initialized (implementation limitation)
+      -wd4319 # Suppress ''operator' : zero extending 'type' to 'type' of greater size'
+
+      # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
+      # support the 'aligned' attribute in the way that clang sources requires (for
+      # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
+      # avoid unwanted alignment warnings.
+      # When we switch to requiring a version of MSVC that supports the 'alignas'
+      # specifier (MSVC 2015?) this warning can be re-enabled.
+      -wd4324 # Suppress 'structure was padded due to __declspec(align())'
+
+      # Promoted warnings.
+      -w14062 # Promote 'enumerator in switch of enum is not handled' to level 1 warning.
+
+      # Promoted warnings to errors.
+      -we4238 # Promote 'nonstandard extension used : class rvalue used as lvalue' to error.
+      )
+  endif(NOT CLANG_CL)

   # Enable warnings
   if (LLVM_ENABLE_WARNINGS)
@@ -538,10 +540,17 @@
   foreach(flag ${msvc_warning_flags})
     append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   endforeach(flag)
-endif (MSVC AND NOT CLANG_CL)
+endif (MSVC)

 if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
-  append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # Don't add -Wall for clang-cl, because it maps -Wall to -Weverything for
+  # MSVC compatibility.  /W4 is added above instead.
+  if (NOT CLANG_CL)
+    append("-Wall" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif()
+
+  append("-W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   append("-Wcast-qual" CMAKE_CXX_FLAGS)

   # Turn off missing field initializer warnings for gcc to avoid noise from


[CMake] Fix LLVM_ENABLE_LTO option on Windows

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -11,7 +11,7 @@
 include(CheckCCompilerFlag)
 include(CheckCXXCompilerFlag)

-if(CMAKE_LINKER MATCHES "lld-link.exe" OR (WIN32 AND LLVM_USE_LINKER STREQUAL "lld"))
+if(CMAKE_LINKER MATCHES "lld-link\.exe" OR (WIN32 AND LLVM_USE_LINKER STREQUAL "lld") OR LLVM_ENABLE_LLD)
   set(LINKER_IS_LLD_LINK TRUE)
 else()
   set(LINKER_IS_LLD_LINK FALSE)


[t:4871] add test_stress_openclose.tdb to the list of stress tests that get ignored for valgrind/drd conflicts and things like that

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -48,6 +48,12 @@
   ydb/upgrade-test-4.tdb
   )

+## osx's pthreads prefer writers, so this test will deadlock
+if (@CMAKE_SYSTEM_NAME@ STREQUAL Darwin)
+  list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE portability/test-pthread-rwlock-rwr)
+  list(APPEND CTEST_CUSTOM_TESTS_IGNORE portability/test-pthread-rwlock-rwr)
+endif ()
+
 ## tests that are supposed to crash will generate memcheck failures
 set(tests_that_should_fail
   ft/test-assertA
@@ -71,6 +77,7 @@
   test_stress6.tdb
   test_stress7.tdb
   test_stress_hot_indexing.tdb
+  test_stress_openclose.tdb
   test_stress_with_verify.tdb
   )
 foreach(test ${stress_tests})
@@ -93,13 +100,8 @@
 endforeach(test)

 set(tdb_tests_that_should_fail "ydb/${stress_tests}")
-## osx's pthreads prefer writers, so this test will deadlock
-if (@CMAKE_SYSTEM_NAME@ STREQUAL Darwin)
-  list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE portability/test-pthread-rwlock-rwr)
-  list(APPEND CTEST_CUSTOM_TESTS_IGNORE portability/test-pthread-rwlock-rwr)
-endif ()
+string(REGEX REPLACE ";" ";ydb/" stress_tests "${stress_tests}")

-string(REGEX REPLACE ";" ";ydb/" stress_tests "${stress_tests}")
 set(recover_stress_tests
   ydb/recover-test_stress1.abortrecover
   ydb/recover-test_stress2.abortrecover


COMP:  Improve coverage information.

COMP:  Improve coverage information.

Coverage should not include third party tools
that we have no intention of testing.

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -30,10 +30,7 @@
 #-- #Reset maximum number of warnings so that they all show up.
 set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)

-#set(CTEST_CUSTOM_COVERAGE_EXCLUDE $ {CTEST_CUSTOM_COVERAGE_EXCLUDE}
-#    "./SlicerExecutionModel/"
-#    "./SlicerExecutionModel/.*"
-#    "./SlicerExecutionModel/.*/.*"
-#    ".*SlicerExecutionModel.*"
-#    "SlicerExecutionModel"
-#    )
+set(CTEST_CUSTOM_COVERAGE_EXCLUDE ${CTEST_CUSTOM_COVERAGE_EXCLUDE}
+  ".*Temporary/.*"
+  ".*boost.*"
+)


typechecker-regex-prototype: remove GHC_TARGET_PLATFORM2

--- cmake/Modules/FindHaskell.cmake
+++ cmake/Modules/FindHaskell.cmake
@@ -10,7 +10,7 @@
 #  GHC_QUICKCHECK_FOUND  - True if the QuickCheck library is available
 #  GHC_VERSION			 - The numeric version of the ghc executable
 #  GHC_TARGET_PLATFORM	 - The target platform string of ghc
-#  GHC_TARGET_PLATFORM2	 - The target platform string of ghc - sanitized alternate version (darwin -> osx)
+#                          sanitized (darwin -> osx, unknown-linux -> linux)
 #  CABAL_DYNLIB_PATH     - The default path where cabal installs dynamic libraries
 #  CABAL_CUSTOM_TARGET   - The default dependencies of the custom Setup.hs for plugins
 #  HASKELL_FOUND         - True if the whole required haskell environment exists
@@ -51,8 +51,8 @@
 	)

 	# correct the mapping..
-	string (REPLACE "apple-darwin" "osx" GHC_TARGET_PLATFORM2 ${GHC_TARGET_PLATFORM})
-	string (REPLACE "unknown-linux" "linux" GHC_TARGET_PLATFORM2 ${GHC_TARGET_PLATFORM2})
+	string (REPLACE "apple-darwin" "osx" GHC_TARGET_PLATFORM ${GHC_TARGET_PLATFORM})
+	string (REPLACE "unknown-linux" "linux" GHC_TARGET_PLATFORM ${GHC_TARGET_PLATFORM})

 	# normalize the result variables, 0 means success which corresponds to 1 in cmake booleans
 	if (GHC_HSPEC_FOUND EQUAL 0)


change: exclude directory with testing framework

--- cmake/common/clang-format.cmake
+++ cmake/common/clang-format.cmake
@@ -6,7 +6,7 @@
 #######################

 add_custom_target(
-        format
-        COMMAND find src tests -iname *.h -o -iname *.hpp -o -iname *.c -iname *.cpp | xargs clang-format -style=file -i
-        WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+    format
+    COMMAND find src tests -type f '\(' -iname *.h -o -iname *.hpp -o -iname *.c -o -iname *.cpp '\)' -not -path "*/tests/tools/*"  | xargs clang-format -style=file -i
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
 )


[CMake] Replace manual fatal error messages in SwiftSource.cmake with preconditions

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -1,3 +1,5 @@
+include(SwiftUtils)
+
 # Process the sources within the given variable, pulling out any Swift
 # sources to be compiled with 'swift' directly. This updates
 # ${sourcesvar} in place with the resulting list and ${externalvar} with the
@@ -31,17 +33,9 @@
   endif()

   # Check arguments.
-  if ("${SWIFTSOURCES_SDK}" STREQUAL "")
-    message(FATAL_ERROR "Should specify an SDK")
-  endif()
-
-  if ("${SWIFTSOURCES_ARCHITECTURE}" STREQUAL "")
-    message(FATAL_ERROR "Should specify an architecture")
-  endif()
-
-  if("${SWIFTSOURCES_INSTALL_IN_COMPONENT}" STREQUAL "")
-    message(FATAL_ERROR "INSTALL_IN_COMPONENT is required")
-  endif()
+  precondition(SWIFTSOURCES_SDK "Should specify an SDK")
+  precondition(SWIFTSOURCES_ARCHITECTURE "Should specify an architecture")
+  precondition(SWIFTSOURCES_INSTALL_IN_COMPONENT "INSTALL_IN_COMPONENT is required")

   # Clear the result variable.
   set("${dependency_target_out_var_name}" "" PARENT_SCOPE)
@@ -175,9 +169,7 @@
   list(LENGTH SWIFTFILE_OUTPUT num_outputs)
   list(GET SWIFTFILE_OUTPUT 0 first_output)

-  if (${num_outputs} EQUAL 0)
-    message(FATAL_ERROR "OUTPUT must not be empty")
-  endif()
+  precondition(num_outputs MESSAGE "OUTPUT must not be empty")

   foreach(output ${SWIFTFILE_OUTPUT})
     if (NOT IS_ABSOLUTE "${output}")
@@ -189,17 +181,9 @@
     message(FATAL_ERROR "Cannot set both IS_MAIN and IS_STDLIB")
   endif()

-  if("${SWIFTFILE_SDK}" STREQUAL "")
-    message(FATAL_ERROR "Should specify an SDK")
-  endif()
-
-  if("${SWIFTFILE_ARCHITECTURE}" STREQUAL "")
-    message(FATAL_ERROR "Should specify an architecture")
-  endif()
-
-  if("${SWIFTFILE_INSTALL_IN_COMPONENT}" STREQUAL "")
-    message(FATAL_ERROR "INSTALL_IN_COMPONENT is required")
-  endif()
+  precondition(SWIFTFILE_SDK MESSAGE "Should specify an SDK")
+  precondition(SWIFTFILE_ARCHITECTURE MESSAGE "Should specify an architecture")
+  precondition(SWIFTFILE_INSTALL_IN_COMPONENT MESSAGE "INSTALL_IN_COMPONENT is required")

   if ("${SWIFTFILE_MODULE_NAME}" STREQUAL "")
     get_filename_component(SWIFTFILE_MODULE_NAME "${first_output}" NAME_WE)


cmake: exclude Private dir from installation

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -351,7 +351,8 @@
     swift_install_in_component(DIRECTORY "${specific_module_dir}"
                                DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"
                                COMPONENT "${SWIFTFILE_INSTALL_IN_COMPONENT}"
-                               OPTIONAL)
+                               OPTIONAL
+                               PATTERN "Private" EXCLUDE)
   else()
     swift_install_in_component(FILES ${module_outputs}
                                DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/swift/${library_subdir}"


fix finding xerces on windows

fix finding xerces on windows

--- cmake_modules/FindXercesC.cmake
+++ cmake_modules/FindXercesC.cmake
@@ -29,13 +29,12 @@
 ENDIF (XERCESC_INCLUDE AND XERCESC_LIBRARY)

 IF(XERCESC_FOUND)
-#  IF(NOT XERCESC_FIND_QUIETLY)
+  IF(NOT XERCESC_FIND_QUIETLY)
     MESSAGE(STATUS "Found Xerces-C: ${XERCESC_LIBRARY}")
     MESSAGE(STATUS "              : ${XERCESC_INCLUDE}")
-#  ENDIF(NOT XERCESC_FIND_QUIETLY)
+  ENDIF(NOT XERCESC_FIND_QUIETLY)
 ELSE(XERCESC_FOUND)
-#  MESSAGE(FATAL_ERROR "Could not find Xerces-C")
-  MESSAGE(STATUS "Could not find Xerces-C, libraries will not be linked")
+  MESSAGE(FATAL_ERROR "Could not find Xerces-C")
 ENDIF(XERCESC_FOUND)

 MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARY)


Fix doxygen target

Fix doxygen target

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -75,7 +75,7 @@
   ${DOXYGEN_EXECUTABLE} ${DOXYGEN_CONFIG_FILE}
   WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc
   COMMENT "Generating API documentation using doxygen" VERBATIM
-  DEPENDS ${PROJECT_NAME}_doxygen_install project_info)
+  DEPENDS ${PROJECT_NAME}_doxygen_install project_info_${PROJECT_NAME})

 if(NOT TARGET doxygen_html)
   add_custom_target(doxygen_html)


Update AWSSDKConfig.cmake

Update AWSSDKConfig.cmake

fix default_root to calculated root

--- AWSSDK/AWSSDKConfig.cmake
+++ AWSSDK/AWSSDKConfig.cmake
@@ -17,10 +17,10 @@

 # Compute the default installation root relative to this file.
 # from xx/lib/cmake/AWSSDK/xx.cmake to xx/
-get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
-get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
-get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
+get_filename_component(AWSSDK_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+get_filename_component(AWSSDK_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
+get_filename_component(AWSSDK_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
+get_filename_component(AWSSDK_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH)
 if(AWSSDK_DEFAULT_ROOT_DIR STREQUAL "/")
   set(AWSSDK_DEFAULT_ROOT_DIR "")
 endif()


ENH: Disable Boost on Hippo

ENH: Disable Boost on Hippo

--- Hippo_Kitware_TubeTK_Nightly.cmake
+++ Hippo_Kitware_TubeTK_Nightly.cmake
@@ -87,11 +87,11 @@
 set( SITE_NIGHTLY_MEMORY OFF )
 set( SITE_NIGHTLY_PACKAGE ON )
 set( SITE_NIGHTLY_UPLOAD ON )
-set( SITE_NIGHTLY_DOCUMENTATION ON )
+set( SITE_NIGHTLY_DOCUMENTATION OFF )
 set( SITE_NIGHTLY_STYLE OFF )
-set( SITE_NIGHTLY_BOOST ON )
+set( SITE_NIGHTLY_BOOST OFF )
 set( SITE_NIGHTLY_CPPCHECK ON )
-set( SITE_NIGHTLY_LIBSVM ON )
+set( SITE_NIGHTLY_LIBSVM OFF )

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

@@ -127,8 +127,6 @@

 set( SITE_EXECUTABLE_DIRS "${SITE_KWSTYLE_DIR}" )
 set( ENV{PATH} "${SITE_EXECUTABLE_DIRS}:$ENV{PATH}" )
-
-set( CTEST_CUSTOM_WARNING_EXCEPTION "/usr/local/include/boost" ${CTEST_CUSTOM_WARNING_EXCEPTION} )

 set( SITE_C_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized" )
 set( SITE_CXX_FLAGS "-fPIC -fdiagnostics-show-option -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field" )


Append 'opencmiss.zinc' to Python bindings install prefix.

--- bindings/python/InstallConfig.cmake
+++ bindings/python/InstallConfig.cmake
@@ -8,20 +8,20 @@
 set(_PYTHON_DESTINATION_PREFIX lib/python${PYTHONLIBS_MAJOR_VERSION}.${PYTHONLIBS_MINOR_VERSION})

 install(TARGETS ${SWIG_MODULE_TARGETS}
-    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss/zinc
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss.zinc/opencmiss/zinc
     COMPONENT PythonBindings
 )
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/setup.py
-    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss.zinc
     COMPONENT PythonBindings
 )
 install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/\${CMAKE_INSTALL_CONFIG_NAME}/opencmiss
-    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss.zinc
     COMPONENT PythonBindings
     FILES_MATCHING PATTERN "*.py"
 )
 install(FILES "${BASE_PYTHON_PACKAGE_DIR}/README.txt"
-    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>
+    DESTINATION ${_PYTHON_DESTINATION_PREFIX}/$<CONFIG>/opencmiss.zinc
     COMPONENT PythonBindings
 )


CodeGenerator: Copy module descriptor to js generated project

Change-Id: I96d516c8d0315d5b4dd1250304327ed92b2f8c80

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -785,6 +785,11 @@
         -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js/lib -it js
     )

+    execute_code_generator (
+      EXEC_PARAMS
+        -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -o ${CMAKE_BINARY_DIR}/js/src
+    )
+
     if (EXISTS ${CMAKE_SOURCE_DIR}/LICENSE)
       file (READ ${CMAKE_SOURCE_DIR}/LICENSE LICENSE)
       file (WRITE ${CMAKE_BINARY_DIR}/js/LICENSE ${LICENSE})


> EN COURS - task references #211: Mise à jour de Ogre vers v1-9.0 stable

--- CMake/ConfigXsilium.cmake
+++ CMake/ConfigXsilium.cmake
@@ -103,7 +103,7 @@
 	set(XSILIUM_DEP_DIR ${ROOT}/Library/Dependencies/Source)
 	set(XSILIUM_DEP_WIN_DIR ${ROOT}/Dependencies/Win32)

-	set(OGRE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Bin)
+	set(OGRE_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
 	SET(OGRE_SOURCE_DIR ${OGREPATH})
 	SET(OGRE_WORK_DIR ${OGRE_BINARY_DIR})
 	set(OGRE_TEMPLATES_DIR ${ROOT}/CMake/Templates)


COMP: Specify the install name for Poco libs on Mac.

--- CMakeExternals/Poco.cmake
+++ CMakeExternals/Poco.cmake
@@ -29,6 +29,7 @@
       CMAKE_ARGS
         ${ep_common_args}
         -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
+        -DCMAKE_INSTALL_NAME_DIR:STRING=<INSTALL_DIR>/lib
       DEPENDS ${proj_DEPENDENCIES}
      )


Fix GitExternal rebase target

Fix GitExternal rebase target

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -154,7 +154,7 @@
     "if(NOT IS_DIRECTORY \"${DIR}/.git\")\n"
     "  message(FATAL_ERROR \"Can't update git external ${__dir}: Not a git repository\")\n"
     "endif()\n"
-    # check if we are already on the requested tag
+    # check if we are already on the requested tag (nothing to do)
     "execute_process(COMMAND \"${GIT_EXECUTABLE}\" rev-parse --short HEAD\n"
     "  OUTPUT_VARIABLE currentref OUTPUT_STRIP_TRAILING_WHITESPACE\n"
     "  WORKING_DIRECTORY \"${DIR}\")\n"
@@ -174,7 +174,7 @@
     "    WORKING_DIRECTORY \"${DIR}\")\n"
     "endforeach()\n"
     "\n"
-    # fetch latest update
+    # fetch updates
     "execute_process(COMMAND \"${GIT_EXECUTABLE}\" fetch origin -q\n"
     "  RESULT_VARIABLE nok ERROR_VARIABLE error\n"
     "  WORKING_DIRECTORY \"${DIR}\")\n"
@@ -182,30 +182,42 @@
     "  message(FATAL_ERROR \"Fetch for ${__dir} failed:\n   \${error}\")\n"
     "endif()\n"
     "\n"
-    # update tag
-    "execute_process(COMMAND \"${GIT_EXECUTABLE}\" rebase FETCH_HEAD\n"
-    "  RESULT_VARIABLE nok ERROR_VARIABLE error OUTPUT_VARIABLE output\n"
-    "  WORKING_DIRECTORY \"${DIR}\")\n"
-    "if(nok)\n"
-    "  execute_process(COMMAND \"${GIT_EXECUTABLE}\" rebase --abort\n"
-    "    WORKING_DIRECTORY \"${DIR}\" ERROR_QUIET OUTPUT_QUIET)\n"
-    "  message(FATAL_ERROR \"Rebase ${__dir} failed:\n\${output}\${error}\")\n"
-    "endif()\n"
-    "\n"
-    # checkout requested tag
-    "execute_process(\n"
-    "  COMMAND \"${GIT_EXECUTABLE}\" checkout -q \"${TAG}\"\n"
-    "  RESULT_VARIABLE nok ERROR_VARIABLE error\n"
-    "  WORKING_DIRECTORY \"${DIR}\")\n"
-    "if(nok)\n"
-    "  message(FATAL_ERROR \"git checkout ${TAG} in ${__dir} failed: ${error}\n\")\n"
-    "endif()\n"
+  )
+  if("${TAG}" MATCHES "^[0-9a-f]+$")
+    # requested TAG is a SHA1, just switch to it
+    file(APPEND ${__rebase_cmake}
+      # checkout requested tag
+      "execute_process(\n"
+      "  COMMAND \"${GIT_EXECUTABLE}\" checkout -q \"${TAG}\"\n"
+      "  RESULT_VARIABLE nok ERROR_VARIABLE error\n"
+      "  WORKING_DIRECTORY \"${DIR}\")\n"
+      "if(nok)\n"
+      "  message(FATAL_ERROR \"git checkout ${TAG} in ${__dir} failed: ${error}\n\")\n"
+      "endif()\n"
     )
+  else()
+    # requested TAG is a branch
+    file(APPEND ${__rebase_cmake}
+      # switch to requested branch
+      "execute_process(\n"
+      "  COMMAND \"${GIT_EXECUTABLE}\" checkout -q \"${TAG}\"\n"
+      "  OUTPUT_QUIET ERROR_QUIET WORKING_DIRECTORY \"${DIR}\")\n"
+      # try to rebase it
+      "execute_process(COMMAND \"${GIT_EXECUTABLE}\" rebase FETCH_HEAD\n"
+      "  RESULT_VARIABLE nok ERROR_VARIABLE error OUTPUT_VARIABLE output\n"
+      "  WORKING_DIRECTORY \"${DIR}\")\n"
+      "if(nok)\n"
+      "  execute_process(COMMAND \"${GIT_EXECUTABLE}\" rebase --abort\n"
+      "    WORKING_DIRECTORY \"${DIR}\" ERROR_QUIET OUTPUT_QUIET)\n"
+      "  message(FATAL_ERROR \"Rebase ${__dir} failed:\n\${output}\${error}\")\n"
+      "endif()\n"
+    )
+  endif()

   if(NOT GIT_EXTERNAL_SCRIPT_MODE)
     add_custom_target(${__target}-rebase
       COMMAND ${CMAKE_COMMAND} -P ${__rebase_cmake}
-      COMMENT "Rebasing ${__dir}")
+      COMMENT "Rebasing ${__dir} [${TAG}]")
     set_target_properties(${__target}-rebase PROPERTIES
       EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER git)
     if(NOT TARGET rebase)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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