Added special case for setting LTO on gcc 4.8.1

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -8,7 +8,7 @@
 # This bug should be fixed in gcc version 4.8.3
 execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
 			OUTPUT_VARIABLE GCC_VERSION)
-if (GCC_VERSION VERSION_LESS 4.8.3)
+if ((GCC_VERSION VERSION_LESS 4.8.3) AND NOT(GCC_VERSION VERSION_EQUAL 4.8.1))
 	message(STATUS "Compiling with out Link Time Optimizations - LTO OFF")
 else()
 	set(LTO "-flto")


more helpful error message for missing nose

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -137,7 +137,7 @@
   # Check that nosetests is installed.
   find_program(nosetests_path nosetests)
   if(NOT nosetests_path)
-    message(FATAL_ERROR "Can't find nosetests executable")
+    message(FATAL_ERROR "Can't find nosetests executable... try installing package 'python-nose'")
   endif()

   parse_arguments(_nose "WORKING_DIRECTORY" "" ${ARGN})


Fix building error for xcode. & Add header files to project.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -1,12 +1,22 @@

-# header files
+# include and define
 #SET(CMAKE_INCLUDE_DIRECTORIES_BEFORE, ON)
 if(MSVC)
 ADD_DEFINITIONS(-DHAVE_MS_C_RUNTIME)
 ADD_DEFINITIONS(-DHAVE_WIN32_THREADS)
 INCLUDE_DIRECTORIES(AFTER ${M3E_SOURCE_DIR}/src/native/msvc)
+elseif(APPLE)
+ADD_DEFINITIONS(-D_MACOSX)
+ADD_DEFINITIONS(-DHAVE_PTHREADS)
+SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11 -stdlib=libc++")
 endif()
 INCLUDE_DIRECTORIES(AFTER ${M3E_SOURCE_DIR}/src/native/include)
+
+# header files
+FILE(GLOB LIBUTILS_HEADER_FILES
+${M3E_SOURCE_DIR}/src/native/include/cutils/*.h
+${M3E_SOURCE_DIR}/src/native/include/utils/*.h
+)

 # source files
 FILE(GLOB LIBUTILS_SOURCE_FILES
@@ -15,10 +25,12 @@
 ${M3E_SOURCE_DIR}/src/native/libutils/cutils/*.c
 )

-# source code for MSVC
+# header and source code for MSVC
 if(MSVC)
+SET(LIBUTILS_HEADER_FILES ${LIBUTILS_HEADER_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/stdint.h)
+SET(LIBUTILS_HEADER_FILES ${LIBUTILS_HEADER_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/sys/time.h)
 SET(LIBUTILS_SOURCE_FILES ${LIBUTILS_SOURCE_FILES} ${M3E_SOURCE_DIR}/src/native/msvc/sys/time.c)
 endif()

 # target files
-ADD_LIBRARY(utils SHARED ${LIBUTILS_SOURCE_FILES})
+ADD_LIBRARY(utils SHARED ${LIBUTILS_SOURCE_FILES} ${LIBUTILS_HEADER_FILES})


Update firmware commit hash

Update firmware commit hash

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "818aa7c5c13714e5890b63600b32bf45958c92cb")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "c036117a9881a57c344d93b4b9ca625ab5c54e3f")

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


update firmware commit hash

update firmware commit hash

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "ac2b4143d35f2b0e3cf933b2cc210654515f0880")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "fa658cf7633881c1625728060ce62203b3cfcc53")

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


Update device FW

Update device FW

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "95ddfb1f9ac932b662f279e8714e16c322400ac9")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "61ac21aa03a833ba4347e113f9ccd97f9322feaf")

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


recovering cmake option descriptions when forcing values

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -24,11 +24,11 @@
 #---Check for Cocoa/Quartz graphics backend (MacOS X only)
 if(cocoa)
   if(APPLE)
-    set(x11 OFF CACHE BOOL "" FORCE)
-    set(builtin_freetype ON CACHE BOOL "" FORCE)
+    set(x11 OFF CACHE BOOL "Disabled because cocoa requested (${x11_description})" FORCE)
+    set(builtin_freetype ON CACHE BOOL "Enabled because needed for Cocoa graphics (${builtin_freetype_description})" FORCE)
   else()
     message(STATUS "Cocoa option can only be enabled on MacOSX platform")
-    set(cocoa OFF CACHE BOOL "" FORCE)
+    set(cocoa OFF CACHE BOOL "Disabled because only available on MacOSX (${cocoa_description})" FORCE)
   endif()
 endif()

@@ -42,7 +42,7 @@
   find_package(ZLIB)
   if(NOT ZLIB_FOUND)
     message(STATUS "Zlib not found. Switching on builtin_zlib option")
-    set(builtin_zlib ON CACHE BOOL "" FORCE)
+    set(builtin_zlib ON CACHE BOOL "Enabled because Zlib not found (${builtin_zlib_description})" FORCE)
   endif()
 endif()

@@ -57,7 +57,7 @@
   find_Package(Unuran)
   if(NOT UNURAN_FOUND)
     message(STATUS "Unuran not found. Switching on builtin_unuran option")
-    set(builtin_unuran ON CACHE BOOL "" FORCE)
+    set(builtin_unuran ON CACHE BOOL "Enabled because Unuran not found (${builtin_unuran_description})" FORCE)
   endif()
 endif()

@@ -69,7 +69,7 @@
     set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR_freetype2})
   else()
     message(STATUS "FreeType not found. Switching on builtin_freetype option")
-    set(builtin_freetype ON CACHE BOOL "" FORCE)
+    set(builtin_freetype ON CACHE BOOL "Enabled because FreeType not found (${builtin_freetype_description})" FORCE)
   endif()
 endif()
 if(builtin_freetype)
@@ -119,10 +119,9 @@
 if(NOT builtin_pcre)
   message(STATUS "Looking for PCRE")
   find_package(PCRE)
-  if(PCRE_FOUND)
-  else()
+  if(NOT PCRE_FOUND)
     message(STATUS "PCRE not found. Switching on builtin_pcre option")
-    set(builtin_pcre ON CACHE BOOL "" FORCE)
+    set(builtin_pcre ON CACHE BOOL "Enabled because PCRE not found (${builtin_pcre_description})" FORCE)
   endif()
 endif()
 if(builtin_pcre)
@@ -176,7 +175,7 @@
   find_package(LZMA)
   if(NOT LZMA_FOUND)
     message(STATUS "LZMA not found. Switching on builtin_lzma option")
-    set(builtin_lzma ON CACHE BOOL "" FORCE)
+    set(builtin_lzma ON CACHE BOOL "Enabled because LZMA not found (${builtin_lzma_description})" FORCE)
   endif()
 endif()
 if(builtin_lzma)
@@ -226,7 +225,7 @@
   find_package(xxHash)
   if(NOT xxHash_FOUND)
     message(STATUS "xxHash not found. Switching on builtin_xxhash option")
-    set(builtin_xxhash ON CACHE BOOL "" FORCE)
+    set(builtin_xxhash ON CACHE BOOL "Enabled because xxHash not found (${builtin_xxhash_description})" FORCE)
   endif()
 endif()

@@ -241,7 +240,7 @@
   find_package(LZ4)
   if(NOT LZ4_FOUND)
     message(STATUS "LZ4 not found. Switching on builtin_lz4 option")
-    set(builtin_lz4 ON CACHE BOOL "" FORCE)
+    set(builtin_lz4 ON CACHE BOOL "Enabled because LZ4 not found (${builtin_lz4_description})" FORCE)
   endif()
 endif()

@@ -300,7 +299,7 @@
 if(asimage)
   if(NOT x11 AND NOT cocoa AND NOT WIN32)
     message(STATUS "Switching off 'asimage' because neither 'x11' nor 'cocoa' are enabled")
-    set(asimage OFF CACHE BOOL "" FORCE)
+    set(asimage OFF CACHE BOOL "Disabled because neither x11 nor cocoa are enabled (${asimage_description})" FORCE)
   endif()
 endif()
 if(asimage)
@@ -330,7 +329,7 @@
   find_package(AfterImage)
   if(NOT AFTERIMAGE_FOUND)
     message(STATUS "AfterImage not found. Switching on builtin_afterimage option")
-    set(builtin_afterimage ON CACHE BOOL "" FORCE)
+    set(builtin_afterimage ON CACHE BOOL "Enabled because asimage requested and AfterImage not found (${builtin_afterimage_description})" FORCE)
   endif()
 endif()
 if(builtin_afterimage)
@@ -413,7 +412,7 @@
         message(STATUS "GSL not found. Set variable GSL_DIR to point to your GSL installation")
         message(STATUS "               Alternatively, you can also enable the option 'builtin_gsl' to build the GSL libraries internally'")
         message(STATUS "               For the time being switching OFF 'mathmore' option")
-        set(mathmore OFF CACHE BOOL "" FORCE)
+        set(mathmore OFF CACHE BOOL "Disable because builtin_gsl disabled and external GSL not found (${mathmore_description})" FORCE)
       endif()
     endif()
   else()
@@ -436,7 +435,7 @@
       BUILD_BYPRODUCTS ${GSL_LIBRARIES}
     )
     set(GSL_TARGET GSL)
-    set(mathmore ON CACHE BOOL "" FORCE)
+    set(mathmore ON CACHE BOOL "Enabled because builtin_gls requested (${mathmore_description})" FORCE)
   endif()
 endif()

@@ -465,8 +464,8 @@
     if(fail-on-missing)
       message(FATAL_ERROR "Ruby package not found and ruby component required")
     else()
-      set(ruby OFF CACHE BOOL "" FORCE)
       message(STATUS "Ruby not found. Switching off ruby option")
+      set(ruby OFF CACHE BOOL "Disabled because Ruby not found (${ruby_description})" FORCE)
     endif()
   else()
     string(REGEX REPLACE "([0-9]+).*$" "\\1" RUBY_MAJOR_VERSION "${RUBY_VERSION}")
@@ -494,7 +493,7 @@
       message(FATAL_ERROR "OpenGL package (with GLU) not found and opengl option required")
     else()
       message(STATUS "OpenGL (with GLU) not found. Switching off opengl option")
-      set(opengl OFF CACHE BOOL "" FORCE)
+      set(opengl OFF CACHE BOOL "Disabled because OpenGL (with GLU) not found (${opengl_description})" FORCE)
     endif()
   endif()
 endif()
@@ -508,7 +507,7 @@
     find_Package(GLEW)
     if(NOT GLEW_FOUND)
       message(STATUS "GLEW not found. Switching on builtin_glew option")
-      set(builtin_glew ON CACHE BOOL "" FORCE)
+      set(builtin_glew ON CACHE BOOL "Enabled because opengl requested and GLEW not found (${builtin_glew_description})" FORCE)
     endif()
   endif()
 endif()
@@ -519,7 +518,7 @@
   find_Package(gl2ps)
   if(NOT GL2PS_FOUND)
     message(STATUS "gl2ps not found. Switching on builtin_gl2ps option")
-    set(builtin_gl2ps ON CACHE BOOL "" FORCE)
+    set(builtin_gl2ps ON CACHE BOOL "Enabled because opengl requested and gl2ps not found (${builtin_gl2ps_description})" FORCE)
   endif()
 endif()

@@ -532,7 +531,7 @@
       message(FATAL_ERROR "Graphviz package not found and gviz option required")
     else()
       message(STATUS "Graphviz not found. Switching off gviz option")
-      set(gviz OFF CACHE BOOL "" FORCE)
+      set(gviz OFF CACHE BOOL "Disabled because Graphviz not found (${gviz_description})" FORCE)
     endif()
   endif()
 endif()
@@ -546,7 +545,7 @@
       message(FATAL_ERROR "Bonjour/Avahi libraries not found and Bonjour component required")
     else()
       message(STATUS "Bonjour not found. Switching off bonjour option")
-      set(bonjour OFF CACHE BOOL "" FORCE)
+      set(bonjour OFF CACHE BOOL "Disabled because Bonjour not found (${bonjour_description})" FORCE)
     endif()
   endif()
 endif()
@@ -561,7 +560,7 @@
       message(FATAL_ERROR "Kerberos 5 libraries not found and they are required")
     else()
       message(STATUS "Kerberos 5 not found. Switching off krb5 option")
-      set(krb5 OFF CACHE BOOL "" FORCE)
+      set(krb5 OFF CACHE BOOL "Disabled because Kerberos 5 not found (${krb5_description})" FORCE)
     endif()
   endif()
 endif()
@@ -583,7 +582,7 @@
       message(FATAL_ERROR "LibXml2 libraries not found and they are required (xml option enabled)")
     else()
       message(STATUS "LibXml2 not found. Switching off xml option")
-      set(xml OFF CACHE BOOL "" FORCE)
+      set(xml OFF CACHE BOOL "Disabled because LibXml2 not found (${xml_description})" FORCE)
     endif()
   endif()
 endif()
@@ -601,10 +600,10 @@
     if(NOT OPENSSL_FOUND)
       if(WIN32) # builtin OpenSSL does not work on Windows
         message(STATUS "Switching OFF 'ssl' option.")
-        set(ssl OFF CACHE BOOL "" FORCE)
+        set(ssl OFF CACHE BOOL "Disabled because OpenSSL not found and builtin version does not work on Windows (${ssl_description})" FORCE)
       else()
         message(STATUS "OpenSSL not found, switching ON 'builtin_openssl' option.")
-        set(builtin_openssl ON CACHE BOOL "" FORCE)
+        set(builtin_openssl ON CACHE BOOL "Enabled because ssl requested and OpenSSL not found (${builtin_openssl_description})" FORCE)
       endif()
     endif()
   endif()
@@ -624,7 +623,7 @@
       message(FATAL_ERROR "Castor libraries not found and they are required (castor option enabled)")
     else()
       message(STATUS "Castor not found. Switching off castor option")
-      set(castor OFF CACHE BOOL "" FORCE)
+      set(castor OFF CACHE BOOL "Disabled because Castor not found (${castor_description})" FORCE)
     endif()
   endif()
 endif()
@@ -639,7 +638,7 @@
       message(FATAL_ERROR "Castor or DPM libraries not found and one of them is required (rfio option enabled)")
     else()
       message(STATUS "Castor or DPM not found. Switching off rfio option")
-      set(rfio OFF CACHE BOOL "" FORCE)
+      set(rfio OFF CACHE BOOL "Disabled because Castor or DPM not found (${rfio_description})" FORCE)
     endif()
   endif()
 endif()
@@ -653,7 +652,7 @@
       message(FATAL_ERROR "MySQL libraries not found and they are required (mysql option enabled)")
     else()
       message(STATUS "MySQL not found. Switching off mysql option")
-      set(mysql OFF CACHE BOOL "" FORCE)
+      set(mysql OFF CACHE BOOL "Disabled because MySQL not found (${mysql_description})" FORCE)
     endif()
   endif()
 endif()
@@ -667,7 +666,7 @@
       message(FATAL_ERROR "Oracle libraries not found and they are required (orable option enabled)")
     else()
       message(STATUS "Oracle not found. Switching off oracle option")
-      set(oracle OFF CACHE BOOL "" FORCE)
+      set(oracle OFF CACHE BOOL "Disabled because Oracle not found (${oracle_description})" FORCE)
     endif()
   endif()
 endif()
@@ -681,7 +680,7 @@
       message(FATAL_ERROR "ODBC libraries not found and they are required (odbc option enabled)")
     else()
       message(STATUS "ODBC not found. Switching off odbc option")
-      set(odbc OFF CACHE BOOL "" FORCE)
+      set(odbc OFF CACHE BOOL "Disabled because ODBC not found (${odbc_description})" FORCE)
     endif()
   endif()
 endif()
@@ -695,7 +694,7 @@
       message(FATAL_ERROR "PostgreSQL libraries not found and they are required (pgsql option enabled)")
     else()
       message(STATUS "PostgreSQL not found. Switching off pgsql option")
-      set(pgsql OFF CACHE BOOL "" FORCE)
+      set(pgsql OFF CACHE BOOL "Disabled because PostgreSQL not found (${pgsql_description})" FORCE)
     endif()
   endif()
 endif()
@@ -709,7 +708,7 @@
       message(FATAL_ERROR "SQLite libraries not found and they are required (sqlite option enabled)")
     else()
       message(STATUS "SQLite not found. Switching off sqlite option")
-      set(sqlite OFF CACHE BOOL "" FORCE)
+      set(sqlite OFF CACHE BOOL "Disabled because SQLite not found (${sqlite_description})" FORCE)
     endif()
   endif()
 endif()
@@ -723,7 +722,7 @@
       message(FATAL_ERROR "Pythia6 libraries not found and they are required (pythia6 option enabled)")
     else()
       message(STATUS "Pythia6 not found. Switching off pythia6 option")
-      set(pythia6 OFF CACHE BOOL "" FORCE)
+      set(pythia6 OFF CACHE BOOL "Disabled because Pythia6 not found (${pythia6_description})" FORCE)
     endif()
   endif()
 endif()
@@ -737,7 +736,7 @@
       message(FATAL_ERROR "Pythia8 libraries not found and they are required (pythia8 option enabled)")
     else()
       message(STATUS "Pythia8 not found. Switching off pythia8 option")
-      set(pythia8 OFF CACHE BOOL "" FORCE)
+      set(pythia8 OFF CACHE BOOL "Disabled because Pythia8 not found (${pythia8_description})" FORCE)
     endif()
   endif()
 endif()
@@ -754,7 +753,7 @@
         message(STATUS "FFTW3 not found. Set [environment] variable FFTW_DIR to point to your FFTW3 installation")
         message(STATUS "                 Alternatively, you can also enable the option 'builtin_fftw3' to build FFTW3 internally'")
         message(STATUS "                 For the time being switching OFF 'fftw3' option")
-        set(fftw3 OFF CACHE BOOL "" FORCE)
+        set(fftw3 OFF CACHE BOOL "Disabled because FFTW3 not found and builtin_fftw3 disabled (${fftw3_description})" FORCE)
       endif()
     endif()
   endif()
@@ -776,7 +775,7 @@
   )
   set(FFTW_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
   set(FFTW3_TARGET FFTW3)
-  set(fftw3 ON CACHE BOOL "" FORCE)
+  set(fftw3 ON CACHE BOOL "Enabled because builtin_fftw3 requested (${fftw3_description})" FORCE)
 endif()

 #---Check for fitsio-------------------------------------------------------------------
@@ -798,7 +797,7 @@
       BUILD_BYPRODUCTS ${CFITSIO_LIBRARIES}
     )
     set(CFITSIO_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include)
-    set(fitsio ON CACHE BOOL "" FORCE)
+    set(fitsio ON CACHE BOOL "Enabled because builtin_cfitsio requested (${fitsio_description})" FORCE)
     set(CFITSIO_TARGET CFITSIO)
   else()
     message(STATUS "Looking for CFITSIO")
@@ -806,7 +805,7 @@
     if(NOT CFITSIO_FOUND)
       message(STATUS "CFITSIO not found. You can enable the option 'builtin_cfitsio' to build the library internally'")
       message(STATUS "                   For the time being switching off 'fitsio' option")
-      set(fitsio OFF CACHE BOOL "" FORCE)
+      set(fitsio OFF CACHE BOOL "Disabled because CFITSIO not found and builtin_cfitsio disabled (${fitsio_description})" FORCE)
     endif()
   endif()
 endif()
@@ -816,7 +815,7 @@
   if(NOT EXISTS /etc/shadow)  #---TODO--The test always succeeds because the actual file is protected
     if(NOT CMAKE_SYSTEM_NAME MATCHES Linux)
       message(STATUS "Support Shadow password not found. Switching off shadowpw option")
-      set(shadowpw OFF CACHE BOOL "" FORCE)
+      set(shadowpw OFF CACHE BOOL "Disabled because /etc/shadow not found (${shadowpw_description})" FORCE)
     endif()
   endif()
 endif()
@@ -827,7 +826,7 @@
   if(NOT MONALISA_FOUND)
     message(STATUS "Monalisa not found. Set variable MONALISA_DIR to point to your Monalisa installation")
     message(STATUS "For the time being switching OFF 'monalisa' option")
-    set(monalisa OFF CACHE BOOL "" FORCE)
+    set(monalisa OFF CACHE BOOL "Disabled because Monalisa not found (${monalisa_description})" FORCE)
   endif()
 endif()

@@ -845,7 +844,7 @@
         message(STATUS "XROOTD not found. Set environment variable XRDSYS to point to your XROOTD installation")
         message(STATUS "                  Alternatively, you can also enable the option 'builtin_xrootd' to build XROOTD internally")
         message(STATUS "                  For the time being switching OFF 'xrootd' option")
-        set(xrootd OFF CACHE BOOL "" FORCE)
+        set(xrootd OFF CACHE BOOL "Disabled because external XROOTD not found and builtin_xrootd disabled (${xrootd_description})" FORCE)
       endif()
     else()
       set(XROOTD_VERSIONNUM ${xrdversnum})  # variable used internally
@@ -892,7 +891,7 @@
   install(DIRECTORY ${XROOTD_ROOTDIR}/${_LIBDIR_DEFAULT}/ DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries FILES_MATCHING PATTERN "libXrd*")
   install(DIRECTORY ${XROOTD_ROOTDIR}/include/xrootd/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT headers)
   set(XROOTD_TARGET XROOTD)
-  set(xrootd ON CACHE BOOL "" FORCE)
+  set(xrootd ON CACHE BOOL "Enabled because builtin_xrootd requested (${xrootd_description})" FORCE)
 endif()
 if(xrootd AND XROOTD_VERSIONNUM VERSION_GREATER 300030005)
   set(netxng ON)
@@ -914,7 +913,7 @@
       message(STATUS "Alien API not found. Set variable ALIEN_DIR to point to your Alien installation,"
                      "or include the installation of Alien in the CMAKE_PREFIX_PATH.")
       message(STATUS "For the time being switching OFF 'alien' option")
-      set(alien OFF CACHE BOOL "" FORCE)
+      set(alien OFF CACHE BOOL "Disabled because Alien API not found (${alien_description})" FORCE)
     endif()
   endif()
 endif()
@@ -930,7 +929,7 @@
       message(STATUS "Apache Arrow API not found. Set variable ARROW_HOME to point to your Arrow installation,"
                      "or include the installation of Arrow in the CMAKE_PREFIX_PATH.")
       message(STATUS "For the time being switching OFF 'arrow' option")
-      set(arrow OFF CACHE BOOL "" FORCE)
+      set(arrow OFF CACHE BOOL "Disabled because Apache Arrow API not found (${arrow_description})" FORCE)
     endif()
   endif()

@@ -969,7 +968,7 @@
       message(STATUS "GFAL library not found. Set variable GFAL_DIR to point to your gfal installation
                       and the variable SRM_IFCE_DIR to the srm_ifce installation")
       message(STATUS "For the time being switching OFF 'gfal' option")
-      set(gfal OFF CACHE BOOL "" FORCE)
+      set(gfal OFF CACHE BOOL "Disabled because GFAL not found (${gfal_description})" FORCE)
     endif()
   endif()
 endif()
@@ -984,7 +983,7 @@
     else()
       message(STATUS "dCap library not found. Set variable DCAP_DIR to point to your dCache installation")
       message(STATUS "For the time being switching OFF 'dcache' option")
-      set(dcache OFF CACHE BOOL "" FORCE)
+      set(dcache OFF CACHE BOOL "Disabled because dCap not found (${dcache_description})" FORCE)
     endif()
   endif()
 endif()
@@ -998,7 +997,7 @@
     else()
       message(STATUS "ldap library not found. Set variable LDAP_DIR to point to your ldap installation")
       message(STATUS "For the time being switching OFF 'ldap' option")
-      set(ldap OFF CACHE BOOL "" FORCE)
+      set(ldap OFF CACHE BOOL "Disabled because ldap not found (${ldap_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1012,7 +1011,7 @@
     else()
       message(STATUS "globus libraries not found. Set environment var GLOBUS_LOCATION or varibale GLOBUS_DIR to point to your globus installation")
       message(STATUS "For the time being switching OFF 'globus' option")
-      set(globus OFF CACHE BOOL "" FORCE)
+      set(globus OFF CACHE BOOL "Disabled because globus not found (${globus_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1026,7 +1025,7 @@
     else()
       message(STATUS "ftgl library not found. Set variable FTGL_ROOT_DIR to point to your installation")
       message(STATUS "For the time being switching ON 'builtin_ftgl' option")
-      set(builtin_ftgl ON CACHE BOOL "" FORCE)
+      set(builtin_ftgl ON CACHE BOOL "Enabled because ftgl not found but opengl requested (${builtin_ftgl_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1045,7 +1044,7 @@
     else()
       message(STATUS "chirp library not found. Set variable CHIRP_DIR to point to your chirp installation")
       message(STATUS "For the time being switching OFF 'chirp' option")
-      set(chirp OFF CACHE BOOL "" FORCE)
+      set(chirp OFF CACHE BOOL "Disabled because chirp not found (${chirp_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1061,7 +1060,7 @@
     else()
        message(STATUS "R installation not found. Set variable R_DIR to point to your R installation")
        message(STATUS "For the time being switching OFF 'r' option")
-       set(r OFF CACHE BOOL "" FORCE)
+       set(r OFF CACHE BOOL "Disabled because R not found (${r_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1076,7 +1075,7 @@
     else()
       message(STATUS "hdfs library not found. Set variable HDFS_DIR to point to your hdfs installation")
       message(STATUS "For the time being switching OFF 'hdfs' option")
-      set(hdfs OFF CACHE BOOL "" FORCE)
+      set(hdfs OFF CACHE BOOL "Disabled because hdfs not found (${hdfs_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1102,10 +1101,10 @@
       find_package(OpenSSL)
       if(UUID_FOUND AND LIBXML2_FOUND AND (OPENSSL_FOUND OR builtin_openssl))
         message(STATUS "Davix not found, switching ON 'builtin_davix' option.")
-        set(builtin_davix ON CACHE BOOL "" FORCE)
+        set(builtin_davix ON CACHE BOOL "Enabled because external Davix not found but davix requested (${builtin_davix_description})" FORCE)
       else()
         message(STATUS "Davix dependencies not found, switching OFF 'davix' option.")
-        set(davix OFF CACHE BOOL "" FORCE)
+        set(davix OFF CACHE BOOL "Disabled because dependencies not found (${davix_description})" FORCE)
       endif()
     endif()
   endif()
@@ -1148,7 +1147,7 @@
           message(FATAL_ERROR "TBB version < 4.3. You can enable the option 'builtin_tbb' to build the library internally")
         else()
           message(STATUS "TBB version < 4.3. Switching on builtin_tbb option")
-          set(builtin_tbb ON CACHE BOOL "" FORCE)
+          set(builtin_tbb ON CACHE BOOL "Enabled because imt requested and external TBB version < 4.3 (${builtin_tbb})" FORCE)
         endif()
       endif()
     endif()
@@ -1157,7 +1156,7 @@
         message(FATAL_ERROR "TBB not found. You can enable the option 'builtin_tbb' to build the library internally")
       else()
         message(STATUS "TBB not found. Switching on builtin_tbb option")
-        set(builtin_tbb ON CACHE BOOL "" FORCE)
+        set(builtin_tbb ON CACHE BOOL "Enabled because TBB not found and imt requested (${builtin_tbb_description})" FORCE)
       endif()
     endif()
   endif()
@@ -1231,7 +1230,7 @@
     else()
       message(STATUS "OpenCascade libraries not found. Set variable CASROOT to point to your OpenCascade installation")
       message(STATUS "For the time being switching OFF 'geocad' option")
-      set(geocad OFF CACHE BOOL "" FORCE)
+      set(geocad OFF CACHE BOOL "Disabled because OpenCascade not found (${geocad_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1241,29 +1240,29 @@
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.3.0)
       message(STATUS "Vc requires GCC version >= 5.3.0; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-      set(builtin_vc OFF CACHE BOOL "" FORCE)
+      set(vc OFF CACHE BOOL "Disabled because Vc requires GCC version >= 5.3.0 (${vc_description})" FORCE)
+      set(builtin_vc OFF CACHE BOOL "Disabled because Vc requires GCC version >= 5.3.0 (${builtin_vc_description})" FORCE)
     endif()
     if(cxx17 OR CMAKE_CXX_STANDARD EQUAL 17)
       message(STATUS "Vc uses std::for_each_n(), which is not available in GCC; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-      set(builtin_vc OFF CACHE BOOL "" FORCE)
+      set(vc OFF CACHE BOOL "Disabled because std::for_each_n() is not available in GCC (${vc_description})" FORCE)
+      set(builtin_vc OFF CACHE BOOL "Disabled because std::for_each_n() is not available in GCC (${builtin_vc_description})" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
     if ( APPLE AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
       message(STATUS "Vc requires Apple Clang version >= 5.0; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-      set(builtin_vc OFF CACHE BOOL "" FORCE)
+      set(vc OFF CACHE BOOL "Disabled because Apple Clang version >= 5.0 required (${vc_description})" FORCE)
+      set(builtin_vc OFF CACHE BOOL "Disabled because Apple Clang version >= 5.0 required (${builtin_vc_description})" FORCE)
     elseif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
       message(STATUS "Vc requires Clang version >= 3.1; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-      set(builtin_vc OFF CACHE BOOL "" FORCE)
+      set(vc OFF CACHE BOOL "Disabled because Clang version >= 3.1 required (${vc_description})" FORCE)
+      set(builtin_vc OFF CACHE BOOL "Disabled because Clang version >= 3.1 required (${builtin_vc_description})" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
     if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
       message(STATUS "Vc requires MSVC version >= 2011; switching OFF 'vc' option")
-      set(vc OFF CACHE BOOL "" FORCE)
-      set(builtin_vc OFF CACHE BOOL "" FORCE)
+      set(vc OFF CACHE BOOL "Disabled because MSVC version >= 2011 required (${vc_description})" FORCE)
+      set(builtin_vc OFF CACHE BOOL "Disabled because MSVC version >= 2011 required (${builtin_vc_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1272,7 +1271,7 @@
 if(builtin_vc)
   unset(Vc_FOUND)
   unset(Vc_FOUND CACHE)
-  set(vc ON CACHE BOOL "" FORCE)
+  set(vc ON CACHE BOOL "Enabled because builtin_vc requested (${vc_description})" FORCE)
 elseif(vc)
   if(fail-on-missing)
     find_package(Vc 1.3.0 CONFIG QUIET REQUIRED)
@@ -1281,7 +1280,7 @@
     if(NOT Vc_FOUND)
       message(STATUS "Vc library not found, support for it disabled.")
       message(STATUS "Please enable the option 'builtin_vc' to build Vc internally.")
-      set(vc OFF CACHE BOOL "" FORCE)
+      set(vc OFF CACHE BOOL "Disabled because Vc not found (${vc_description})" FORCE)
     endif()
   endif()
   if(Vc_FOUND)
@@ -1356,7 +1355,7 @@
 if(builtin_veccore)
   unset(VecCore_FOUND)
   unset(VecCore_FOUND CACHE)
-  set(veccore ON CACHE BOOL "" FORCE)
+  set(veccore ON CACHE BOOL "Enabled because builtin_veccore requested (${veccore_description})" FORCE)
 elseif(veccore)
   if(vc)
     set(VecCore_COMPONENTS Vc)
@@ -1364,7 +1363,7 @@
   find_package(VecCore 0.4.2 CONFIG QUIET COMPONENTS ${VecCore_COMPONENTS})
   if(NOT VecCore_FOUND)
     message(STATUS "VecCore not found, switching on 'builtin_veccore' option.")
-    set(builtin_veccore ON CACHE BOOL "" FORCE)
+    set(builtin_veccore ON CACHE BOOL "Enabled because veccore requested and not found externally (${builtin_veccore_description})" FORCE)
   else()
     set_property(DIRECTORY APPEND PROPERTY INCLUDE_DIRECTORIES ${VecCore_INCLUDE_DIRS})
   endif()
@@ -1445,7 +1444,7 @@
         message(STATUS "VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH")
         message(STATUS "               Alternatively, you can also enable the option 'builtin_vdt' to build the VDT libraries internally")
         message(STATUS "               For the time being switching OFF 'vdt' option")
-        set(vdt OFF CACHE BOOL "" FORCE)
+        set(vdt OFF CACHE BOOL "Disabled because external vdt not found (${vdt_description})" FORCE)
       endif()
     endif()
   endif()
@@ -1467,7 +1466,7 @@
             DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
     install(DIRECTORY ${CMAKE_BINARY_DIR}/include/vdt
             DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT extra-headers)
-    set(vdt ON CACHE BOOL "" FORCE)
+          set(vdt ON CACHE BOOL "Enabled because builtin_vdt enabled (${vdt_description})" FORCE)
   endif()
 endif()

@@ -1488,7 +1487,7 @@
       message(STATUS "VecGeom not found. Ensure that the installation of VecGeom is in the CMAKE_PREFIX_PATH")
       message(STATUS "              example: CMAKE_PREFIX_PATH=<VecGeom_install_path>/lib/CMake/VecGeom")
       message(STATUS "              For the time being switching OFF 'vecgeom' option")
-      set(vecgeom OFF CACHE BOOL "" FORCE)
+      set(vecgeom OFF CACHE BOOL "Disabled because VecGeom not found (${vecgeom_description})" FORCE)
     endif()
   endif()
 endif()
@@ -1512,8 +1511,9 @@
     else()
       message(STATUS "CUDA not found. Ensure that the installation of CUDA is in the CMAKE_PREFIX_PATH")
       message(STATUS "                For the time being switching OFF 'cuda' option")
-      set(cuda OFF CACHE BOOL "" FORCE)
-      set(tmva-cuda OFF CACHE BOOL "" FORCE)
+      set(cuda OFF CACHE BOOL "Disabled because cuda not found (${cuda_description})" FORCE)
+      # FIXME: tmva-cuda is not used anywhere else. Is this meant to be tmva-gpu?
+      set(tmva-cuda OFF CACHE BOOL "Disabled because cuda not found" FORCE)
     endif()
   endif()
 endif()
@@ -1527,11 +1527,11 @@
   if (tmva AND mathmore AND imt)
     message(STATUS "Using GSL CBLAS for optional parts of TMVA")
   else()
-    set(tmva-cpu OFF CACHE BOOL "" FORCE)
+    set(tmva-cpu OFF CACHE BOOL "Disabled because blas not found and mathmore, imt, or tmva disabled (${tmva-cpu_description})" FORCE)
   endif()
 endif()
 if(NOT CUDA_FOUND)
-  set(tmva-gpu OFF CACHE BOOL "" FORCE)
+  set(tmva-gpu OFF CACHE BOOL "Disabled because cuda not found (${tmva-gpu_description})" FORCE)
 endif()

@@ -1608,7 +1608,7 @@
 foreach(opt afs glite sapdb srp)
   if(${opt})
     message(STATUS ">>> Option '${opt}' not implemented yet! Signal your urgency to pere.mato@cern.ch")
-    set(${opt} OFF CACHE BOOL "" FORCE)
+    set(${opt} OFF CACHE BOOL "Disabled because not implemented yet (${${opt}_description})" FORCE)
   endif()
 endforeach()


Update ios.toolchain.cmake

Update ios.toolchain.cmake

- Fixed default min-version for watchOS to target watchOS SDK 2.0 as default.
- Added arm64_32 to watchOS builds on Xcode 10.0+.
- (BREAKING) Changed watchOS simulator to target x86_64 as default instead of i386 since that architecture has since long been deprecated by Apple (no recent devices comes with 32-bit processors anymore).

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -51,7 +51,7 @@
 #
 # The following variables control the behaviour of this toolchain:
 #
-# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS or WATCHOS
+# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS or WATCHOS or SIMULATOR_WATCHOS
 #    OS = Build for iPhoneOS.
 #    OS64 = Build for arm64 iPhoneOS.
 #    SIMULATOR = Build for x86 i386 iPhone Simulator.
@@ -59,7 +59,7 @@
 #    TVOS = Build for AppleTVOS.
 #    SIMULATOR_TVOS = Build for x86_64 AppleTV Simulator.
 #    WATCHOS = Build for armv7k for WatchOS.
-#    SIMULATOR_WATCHOS = Build for i386 for Watch Simulator.
+#    SIMULATOR_WATCHOS = Build for x86_64 for Watch Simulator.
 # CMAKE_OSX_SYSROOT: Path to the iOS SDK to use.  By default this is
 #    automatically determined from IOS_PLATFORM and xcodebuild, but
 #    can also be manually specified (although this should not be required).
@@ -70,15 +70,15 @@
 # ENABLE_BITCODE: (1|0) Enables or disables bitcode support. Default 1 (true)
 # ENABLE_ARC: (1|0) Enables or disables ARC support. Default 1 (true, ARC enabled by default)
 # ENABLE_VISIBILITY: (1|0) Enables or disables symbol visibility support. Default 0 (false, visibility hidden by default)
-# IOS_ARCH: (armv7 armv7s arm64 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM
-#    OS = armv7 armv7s arm64 arm64e
-#    OS64 = arm64 arm64e
+# IOS_ARCH: (armv7 armv7s armv7k arm64 arm64e arm64_32 i386 x86_64) If specified, will override the default architectures for the given IOS_PLATFORM
+#    OS = armv7 armv7s arm64 + arm64e (if applicable)
+#    OS64 = arm64 + arm64e (if applicable)
 #    SIMULATOR = i386
 #    SIMULATOR64 = x86_64
 #    TVOS = arm64
-#    SIMULATOR_TVOS = x86_64
-#    WATCHOS = armv7k
-#    SIMULATOR_WATCHOS = i386
+#    SIMULATOR_TVOS = x86_64 (i386 has since long been deprecated)
+#    WATCHOS = armv7k + arm64_32 (if applicable)
+#    SIMULATOR_WATCHOS = x86_64 (i386 has since long been deprecated)
 #
 # This toolchain defines the following variables for use externally:
 #
@@ -179,12 +179,16 @@
 elseif (IOS_PLATFORM STREQUAL "WATCHOS")
   set(XCODE_IOS_PLATFORM watchos)
   if(NOT IOS_ARCH)
-    set(IOS_ARCH armv7k)
+    if (XCODE_VERSION VERSION_GREATER 10.0)
+      set(IOS_ARCH armv7k arm64_32)
+    else()
+      set(IOS_ARCH armv7k)
+    endif()
   endif()
 elseif (IOS_PLATFORM STREQUAL "SIMULATOR_WATCHOS")
-  set(XCODE_IOS_PLATFORM  watchsimulator)
-  if(NOT IOS_ARCH)
-    set(IOS_ARCH i386)
+  set(XCODE_IOS_PLATFORM watchsimulator)
+  if(NOT IOS_ARCH)
+    set(IOS_ARCH x86_64)
   endif()
 else()
   message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}")
@@ -217,9 +221,15 @@
 endif()
 # Specify minimum version of deployment target.
 if (NOT DEFINED IOS_DEPLOYMENT_TARGET)
-  # Unless specified, SDK version 8.0 is used by default as minimum target version.
-  set(IOS_DEPLOYMENT_TARGET "8.0"
-      CACHE STRING "Minimum iOS version to build for." )
+  if (IOS_PLATFORM STREQUAL "WATCHOS" OR IOS_PLATFORM STREQUAL "SIMULATOR_WATCHOS")
+    # Unless specified, SDK version 2.0 is used by default as minimum target version (watchOS).
+    set(IOS_DEPLOYMENT_TARGET "2.0"
+            CACHE STRING "Minimum iOS version to build for." )
+  else()
+    # Unless specified, SDK version 8.0 is used by default as minimum target version (iOS, tvOS).
+    set(IOS_DEPLOYMENT_TARGET "8.0"
+            CACHE STRING "Minimum iOS version to build for." )
+  endif()
   message(STATUS "Using the default min-version since IOS_DEPLOYMENT_TARGET not provided!")
 endif()
 # Use bitcode or not


adds support for tvOS and tvOS Simulator builds

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -42,10 +42,12 @@
 # Updated by Alex Stewart (alexs.mac@gmail.com).
 # The following variables control the behaviour of this toolchain:
 #
-# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64
+# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64 or TVOS or SIMULATOR_TVOS
 #    OS = Build for iPhoneOS.
 #    SIMULATOR = Build for x86 i386 iPhone Simulator.
 #    SIMULATOR64 = Build for x86 x86_64 iPhone Simulator.
+#    TVOS = Build for AppleTVOS.
+#    SIMULATOR_TVOS = Build for x86_64 AppleTV Simulator.
 # CMAKE_OSX_SYSROOT: Path to the iOS SDK to use.  By default this is
 #    automatically determined from IOS_PLATFORM and xcodebuild, but
 #    can also be manually specified (although this should not be required).
@@ -119,6 +121,12 @@
   set(IOS_ARCH i386)
 elseif(IOS_PLATFORM STREQUAL "SIMULATOR64")
   set(XCODE_IOS_PLATFORM iphonesimulator)
+  set(IOS_ARCH x86_64)
+elseif (IOS_PLATFORM STREQUAL "TVOS")
+  set(XCODE_IOS_PLATFORM appletvos)
+  set(IOS_ARCH arm64)
+elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS")
+  set(XCODE_IOS_PLATFORM appletvsimulator)
   set(IOS_ARCH x86_64)
 else()
   message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}")
@@ -244,6 +252,12 @@
     set(XCODE_IOS_PLATFORM_VERSION_FLAGS
       "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
   endif()
+elseif (IOS_PLATFORM STREQUAL "TVOS")
+  set(XCODE_IOS_PLATFORM_VERSION_FLAGS
+    "-mtvos-version-min=${IOS_DEPLOYMENT_TARGET}")
+elseif (IOS_PLATFORM STREQUAL "SIMULATOR_TVOS")
+  set(XCODE_IOS_PLATFORM_VERSION_FLAGS
+    "-mtvos-simulator-version-min=${IOS_DEPLOYMENT_TARGET}")
 else()
   # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min.
   set(XCODE_IOS_PLATFORM_VERSION_FLAGS


COMP (#1543): excluded wiimoteactivator from files.cmake

--- Modules/Bundles/org.mitk.inputdevices.wiimote/files.cmake
+++ Modules/Bundles/org.mitk.inputdevices.wiimote/files.cmake
@@ -3,7 +3,7 @@
 )

 SET(INTERNAL_CPP_FILES
-  mitkWiiMoteActivator.cpp
+  # mitkWiiMoteActivator.cpp
 )

 SET(UI_FILES


BUG: Increase and limit itksoftwareguide-dashboard build parallelism

For the ITKSoftware CircleCI builds, this increases the number of compile jobs
to 10. The use off CMAKE_JOB_POOLS also passes the jobs to ExternalProjects,
which prevents too many processes on the CI system, which has many cores and
exhausts available memory.

--- Docker/itksoftwareguide-dashboard/dashboard.cmake
+++ Docker/itksoftwareguide-dashboard/dashboard.cmake
@@ -22,7 +22,6 @@
 set(CTEST_SOURCE_DIRECTORY ${CTEST_DASHBOARD_ROOT}ITKSoftwareGuide)
 set(CTEST_BINARY_DIRECTORY ${CTEST_DASHBOARD_ROOT}ITKSoftwareGuide-build)
 set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})
-set(CTEST_BUILD_FLAGS "-j5")

 find_program(CTEST_GIT_COMMAND NAMES git git.cmd)
 if(NOT DEFINED CTEST_GIT_COMMAND)
@@ -45,6 +44,9 @@
 SITE:STRING=${CTEST_SITE}
 BUILDNAME:STRING=${CTEST_BUILD_NAME}
 ITK_GIT_TAG:STRING=nightly-master
+CMAKE_JOB_POOLS:STRING=compile=10;link=2
+CMAKE_JOB_POOL_COMPILE:STRING=compile
+CMAKE_JOB_POOL_LINK:STRING=link
 ")

 if("$ENV{CIRCLE_PROJECT_REPONAME}")


Modified plugin.cmake to add trace bounds test

--- plugin.cmake
+++ plugin.cmake
@@ -53,6 +53,12 @@
     PLUGIN HistomicsTK
 )

+add_python_test(segmentation_label
+    SUBMODULE TraceBoundsTest
+    DBNAME core_segmentation_trace_bounds
+    PLUGIN HistomicsTK
+)
+
 # front-end tests
 add_web_client_test(
     HistomicsTK_schema "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/plugin_tests/client/parser.js"


- Fixed std.events check for pthread

- Fixed std.events check for pthread

--- modules.cmake
+++ modules.cmake
@@ -58,12 +58,13 @@

 # std.events
 if (MOD_STD_EVENTS)
-	if (CONCURRENCY_FOUND)
+	if (PTHREAD_FOUND)
 		add_definitions(-DHAVE_MOD_STD_EVENTS)
+		clever_use_lib(PTHREAD)
 	else (CONCURRENCY_FOUND)
 		clever_module_msg(std_events "Posix Threads are not present on this system")
 		set(MOD_STD_EVENTS OFF)
-	endif (CONCURRENCY_FOUND)
+	endif (PTHREAD_FOUND)
 endif (MOD_STD_EVENTS)

 clever_module_msg(std_events "${MOD_STD_EVENTS}")


Apply twick only for 1.7

Apply twick only for 1.7

--- properties.cmake
+++ properties.cmake
@@ -38,7 +38,9 @@
 set(OMNI_JAR_F_BACKEND "${OMNI_CLASSPATH}/om-f-back.jar")
 set(OMNI_JAR_C_BACKEND "${OMNI_CLASSPATH}/om-c-back.jar")
 set(OMNI_F2X_FLAGS "")
-set(JAVA_OPT "-Xmx200m -Xms200m")
+if(${Java_VERSION} VERSION_EQUAL "1.7")
+  set(JAVA_OPT "-Xmx200m -Xms200m")
+endif()
 set(FPP "${CMAKE_Fortran_COMPILER}")
 set(CPP_OPT "${FPPFLAGS}")
 set(CLAW_CONF_FILE "claw_f.conf")


Fix MSC exception handling flag

Fix MSC exception handling flag

Apparently /EHc is not recognized but instead /EHsc has to be used.

Change-Id: I70492583b31bca307af70367b3c5ff29ba86720c

--- framework/delibs/cmake/CFlags.cmake
+++ framework/delibs/cmake/CFlags.cmake
@@ -67,10 +67,10 @@

 	# For 3rd party sw disable all warnings
 	set(DE_3RD_PARTY_C_FLAGS	"${CMAKE_C_FLAGS} ${MSC_BASE_FLAGS} /W0")
-	set(DE_3RD_PARTY_CXX_FLAGS	"${CMAKE_CXX_FLAGS} ${MSC_BASE_FLAGS} /EHc /W0")
+	set(DE_3RD_PARTY_CXX_FLAGS	"${CMAKE_CXX_FLAGS} ${MSC_BASE_FLAGS} /EHsc /W0")

 	set(CMAKE_C_FLAGS			"${CMAKE_C_FLAGS} ${MSC_BASE_FLAGS} ${MSC_WARNING_FLAGS}")
-	set(CMAKE_CXX_FLAGS			"${CMAKE_CXX_FLAGS} ${MSC_BASE_FLAGS} /EHc ${MSC_WARNING_FLAGS}")
+	set(CMAKE_CXX_FLAGS			"${CMAKE_CXX_FLAGS} ${MSC_BASE_FLAGS} /EHsc ${MSC_WARNING_FLAGS}")

 else ()
 	message(FATAL_ERROR "DE_COMPILER is not valid")


Fix cmake build to reflect recent changes to the C++ API generation script. Change: 146419788

--- tensorflow/contrib/cmake/tf_cc_ops.cmake
+++ tensorflow/contrib/cmake/tf_cc_ops.cmake
@@ -66,12 +66,16 @@
     add_custom_command(
         OUTPUT ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h
                ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc
-        COMMAND ${tf_cc_op_lib_name}_gen_cc ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc ${cc_ops_include_internal}
+               ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.h
+               ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.cc
+        COMMAND ${tf_cc_op_lib_name}_gen_cc ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc ${tensorflow_source_dir}/tensorflow/cc/ops/op_gen_overrides.pbtxt ${cc_ops_include_internal}
         DEPENDS ${tf_cc_op_lib_name}_gen_cc create_cc_ops_header_dir
     )

     list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}.h)
     list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}.cc)
+    list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.h)
+    list(APPEND tf_cc_ops_generated_files ${cc_ops_target_dir}/${tf_cc_op_lib_name}_internal.cc)
 endforeach()


Remove wrongly hard-coded /usr/pkg/include path for NetBSD

When I started to work with CoreFX it already had wrongly hard-coded optional
path for pkgsrc dependencies it may be /usr/pkg/include, but it's purely
optional path. Also pkgsrc is purely optional on NetBSD (and any other system,
even if it's the default package manager like in SmartOS).

The correct way of handling it via CMake is finding includes (there was a macro
for it) or discovering packages. I went for the latter.

--- src/Native/configure.cmake
+++ src/Native/configure.cmake
@@ -16,7 +16,6 @@
     include_directories(SYSTEM /usr/local/include)
 elseif (CMAKE_SYSTEM_NAME STREQUAL NetBSD)
     set(PAL_UNIX_NAME \"NETBSD\")
-    include_directories(SYSTEM /usr/pkg/include)
 else ()
     message(FATAL_ERROR "Unknown platform.  Cannot define PAL_UNIX_NAME, used by RuntimeInformation.")
 endif ()


Updating Swig git version

Updating Swig git version

This version include a number of improvements to R contributed by
Richard Beare <Richard.Beare@gmail.com>.

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -20,7 +20,7 @@

   if( USE_SWIG_FROM_GIT )
     set(SWIG_GIT_REPOSITORY "${git_protocol}://github.com/swig/swig.git" CACHE STRING "URL of swig git repo")
-    set(SWIG_GIT_TAG "ec91de75b72ccb7ec20fffd5568dd38a966806e7" CACHE STRING "Tag in swig git repo")
+    set(SWIG_GIT_TAG "8890a675f7783436d0c7b61fdb318f30ffb92cde" CACHE STRING "Tag in swig git repo")
     mark_as_advanced(SWIG_GIT_REPO)
     mark_as_advanced(SWIG_GIT_TAG)
   endif()


Need to provide some defaults for the config.h.cmake file.

--- config.h.cmake
+++ config.h.cmake
@@ -2,10 +2,10 @@
 #cmakedefine HAVE_BCOPY 1

 /* Define to 1 if you have the <dlfcn.h> header file. */
-#cmakedefine HAVE_DLFCN_H
+#cmakedefine HAVE_DLFCN_H 1

 /* Define to 1 if you have the <inttypes.h> header file. */
-#cmakedefine HAVE_INTTYPES_H
+#cmakedefine HAVE_INTTYPES_H 1

 /* Define to 1 if the system has the type `long long'. */
 #cmakedefine HAVE_LONG_LONG 1
@@ -20,35 +20,35 @@
 #cmakedefine HAVE_MMAP 1

 /* Define to 1 if you have the <stdint.h> header file. */
-#cmakedefine HAVE_STDINT_H
+#cmakedefine HAVE_STDINT_H 1

 /* Define to 1 if you have the <stdlib.h> header file. */
-#cmakedefine HAVE_STDLIB_H
+#cmakedefine HAVE_STDLIB_H 1

 /* Define to 1 if you have the <strings.h> header file. */
-#cmakedefine HAVE_STRINGS_H
+#cmakedefine HAVE_STRINGS_H 1

 /* Define to 1 if you have the <string.h> header file. */
-#cmakedefine HAVE_STRING_H
+#cmakedefine HAVE_STRING_H 1

 /* Define to 1 if you have the <sys/stat.h> header file. */
-#cmakedefine HAVE_SYS_STAT_H
+#cmakedefine HAVE_SYS_STAT_H 1

 /* Define to 1 if you have the <sys/types.h> header file. */
-#cmakedefine HAVE_SYS_TYPES_H
+#cmakedefine HAVE_SYS_TYPES_H 1

 /* Define to 1 if you have the <unistd.h> header file. */
-#cmakedefine HAVE_UNISTD_H
+#cmakedefine HAVE_UNISTD_H 1

 /* The size of a `long', as computed by sizeof. */
 #cmakedefine SIZEOF_LONG @SIZEOF_LONG@

 /* Define to 1 if you have the ANSI C header files. */
-#cmakedefine STDC_HEADERS
+#cmakedefine STDC_HEADERS 1

 /* Define to empty if `const' does not conform to ANSI C. */
-#cmakedefine const
+#cmakedefine const @ANSI_CONST@

 /* Define as `__inline' if that's what the C compiler calls it, or to nothing
    if it is not supported. */
-#cmakedefine inline
+#cmakedefine inline @COMPILER_INLINE@


Propagate KEGG Server configuration through the Superbuild

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -120,6 +120,8 @@
     -DVisomics_SUPERBUILD:BOOL=OFF
     -DVisomics_C_FLAGS:STRING=${Visomics_C_FLAGS}
     -DVisomics_CXX_FLAGS:STRING=${Visomics_CXX_FLAGS}
+    -DVisomics_KEGG_SERVER_HOSTNAME=${Visomics_KEGG_SERVER_HOSTNAME}
+    -DVisomics_KEGG_SERVER_PORT=${Visomics_KEGG_SERVER_PORT}
     # QtPropertyBrowser
     -DQtPropertyBrowser_DIR:PATH=${QtPropertyBrowser_DIR}
     # VisomicsData


move -rdynamic from a compiler flag to a linker flag

as it should be

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -1206,7 +1206,7 @@
 	if ( NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
 		check_c_compiler_flag(-rdynamic c_rdynamic)
 		if (c_rdynamic)
-			set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -rdynamic")
+			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
 		endif(c_rdynamic)
 	endif()


Related to bug 880: Accept make as well a gmake when searching the MakeCommand. And don't include \n in match expression

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -24,9 +24,9 @@
 # At this stage, we can also add custom flags to the build tool through the user defined EIGEN_TEST_BUILD_FLAGS variable.
 file(READ  "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" EIGEN_DART_CONFIG_FILE)
 # try to grab the default flags
-string(REGEX MATCH "MakeCommand:.*-- (.*)DefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+string(REGEX MATCH "MakeCommand:.*-- (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 if(NOT CMAKE_MATCH_1)
-string(REGEX MATCH "MakeCommand:.*gmake (.*)DefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+string(REGEX MATCH "MakeCommand:.*make (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 endif()
 string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config \"\${CTEST_CONFIGURATION_TYPE}\" -- ${CMAKE_MATCH_1} ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
        EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})


From Pere: CMAKE_CXX_COMPILER_ID is an internal variable and is not defined for Windows. Fixes Savannah #94209

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@44083 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -13,7 +13,7 @@

 #----Test if clang setup works----------------------------------------------------------------------
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   exec_program(${CMAKE_C_COMPILER} ARGS "-v" OUTPUT_VARIABLE _clang_version_info)
   string(REGEX REPLACE "^.*[ ]([0-9]+)\\.[0-9].*$" "\\1" CLANG_MAJOR "${_clang_version_info}")
   string(REGEX REPLACE "^.*[ ][0-9]+\\.([0-9]).*$" "\\1" CLANG_MINOR "${_clang_version_info}")


Fix build when HOOMD-blue is a submodule

--- CMake/git/GetGitRevisionDescription.cmake
+++ CMake/git/GetGitRevisionDescription.cmake
@@ -47,6 +47,15 @@
         set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
         return()
     endif()
+
+    # check if this is a submodule
+    if(NOT IS_DIRECTORY ${GIT_DIR})
+        file(READ ${GIT_DIR} submodule)
+        string(REGEX REPLACE "gitdir: (.*)\n$" "\\1" GIT_DIR_RELATIVE ${submodule})
+        get_filename_component(SUBMODULE_DIR ${GIT_DIR} PATH)
+        get_filename_component(GIT_DIR ${SUBMODULE_DIR}/${GIT_DIR_RELATIVE} ABSOLUTE)
+    endif()
+
     set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
     if(NOT EXISTS "${GIT_DATA}")
         file(MAKE_DIRECTORY "${GIT_DATA}")


Fix minor mingw problem

Fix minor mingw problem

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -260,7 +260,7 @@
 		endif()
 	endif()

-    if (OGRE_BUILD_PLUGIN_CG)
+    if (OGRE_BUILD_PLUGIN_CG AND EXISTS ${Cg_BINARY_DBG} AND EXISTS ${Cg_BINARY_REL})
       # if MinGW or NMake, the release/debug cg.dll's would conflict, so just pick one
       if (MINGW OR (CMAKE_GENERATOR STREQUAL "NMake Makefiles"))
         if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -271,12 +271,10 @@
     			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
         endif ()
       else ()
-	    if(EXISTS ${Cg_BINARY_DBG} AND EXISTS ${Cg_BINARY_REL})
             file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
     		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
     		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
     		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
-		endif()
       endif ()
     endif()


We drop support for python 2.X

We drop support for python 2.X

--- CMake/OTBModuleHeaderTest.cmake
+++ CMake/OTBModuleHeaderTest.cmake
@@ -66,7 +66,7 @@
   if( NOT ${_name}_THIRD_PARTY
       AND EXISTS ${${_name}_SOURCE_DIR}/include
       AND PYTHON_EXECUTABLE
-      AND NOT (PYTHON_VERSION_STRING VERSION_LESS 2.6)
+      AND NOT (PYTHON_VERSION_STRING VERSION_LESS 3)
       AND NOT (${_name} STREQUAL OTBTestKernel)
       AND NOT (CMAKE_GENERATOR MATCHES "^Visual Studio 10.*"))


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -235,13 +235,13 @@
 	endif()

 	# 11. Guardar nuestra version en uso
-	execute_process(
-		COMMAND python ${ARTIFACTS_PATH}/save_package.py --name=${PACKAGE} --version=${VERSION} --depends=${DEPENDS_PATHFILE}
-		WORKING_DIRECTORY "${ARTIFACTS_PATH}"
-		RESULT_VARIABLE artifacts_result)
-	if(artifacts_result)
-		message(FATAL_ERROR "can't save package version: ${PACKAGE} ${VERSION}")
-	endif()
+	# execute_process(
+	# 	COMMAND python ${ARTIFACTS_PATH}/save_package.py --name=${PACKAGE} --version=${VERSION} --depends=${DEPENDS_PATHFILE}
+	# 	WORKING_DIRECTORY "${ARTIFACTS_PATH}"
+	# 	RESULT_VARIABLE artifacts_result)
+	# if(artifacts_result)
+	# 	message(FATAL_ERROR "can't save package version: ${PACKAGE} ${VERSION}")
+	# endif()

 	# 12. hacer find_package tradicional, ahora que tenemos los ficheros de cmake
 	if(${PACKAGE_MODE} STREQUAL "EXACT")


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -27,36 +27,15 @@
 	MESSAGE("DEPENDS_PATHFILE = ${DEPENDS_PATHFILE}")
 endif()

-IF(WIN32)
-	if(MSVC14)
-		set(MSVC_NAME_LOWER "vc140")
-		set(MSVC_NAME_UPPER "VC140")
-	elseif(MSVC13)
-		set(MSVC_NAME_LOWER "vc130")
-		set(MSVC_NAME_UPPER "VC130")
-	elseif(MSVC12)
-		set(MSVC_NAME_LOWER "vc120")
-		set(MSVC_NAME_UPPER "VC120")
-	elseif(MSVC11)
-		set(MSVC_NAME_LOWER "vc110")
-		set(MSVC_NAME_UPPER "VC110")
-	elseif(MSVC10)
-		set(MSVC_NAME_LOWER "vc100")
-		set(MSVC_NAME_UPPER "VC100")
-	elseif(MSVC9)
-		set(MSVC_NAME_LOWER "vc90")
-		set(MSVC_NAME_UPPER "VC90")
-	else(MSVC8)
-		set(MSVC_NAME_LOWER "vc80")
-		set(MSVC_NAME_UPPER "VC80")
-	endif()
-	SET(CMAKI_COMPILER "${MSVC_NAME_UPPER}")
-ELSE()
-	SET(compiler "")
-	get_filename_component(compiler ${CMAKE_CXX_COMPILER} NAME)
-	SET(CMAKI_COMPILER "${compiler}")
-ENDIF()
-
+set(ENV{CMAKI_INFO} COMPILER)
+execute_process(
+	COMMAND bash cmaki_identifier.sh
+	WORKING_DIRECTORY $ENV{CMAKI_INSTALL}
+	OUTPUT_VARIABLE RESULT_VERSION
+	OUTPUT_STRIP_TRAILING_WHITESPACE)
+set(CMAKI_COMPILER "${RESULT_VERSION}")
+
+set(ENV{CMAKI_INFO} ALL)
 execute_process(
 	COMMAND bash cmaki_identifier.sh
 	WORKING_DIRECTORY $ENV{CMAKI_INSTALL}


Fix paths to test binaries.

Fix paths to test binaries.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -227,16 +227,16 @@
             string(REGEX REPLACE ${OCC_TEST} "" OCC_TESTS ${OCC_TESTS})
             string(REGEX MATCH "#[0-9]+: " OCC_TEMP ${OCC_TEST})
             string(REGEX REPLACE ${OCC_TEMP} "" OCC_TEST ${OCC_TEST})
-            exec_program(${CTEST_COVERAGE_COMMAND} ${CTEST_BINARY_DIRECTORY}/Debug ARGS --sources ${CTEST_SOURCE_DIRECTORY}\\source --modules *${CI_BUILD_UUID}* --cover_children --export_type=cobertura -- ${OCC_TEST}.exe)
-            file(READ ${CTEST_BINARY_DIRECTORY}/Debug/${OCC_TEST}Coverage.xml OCC_TESTXML)
+            exec_program(${CTEST_COVERAGE_COMMAND} ${CTEST_BINARY_DIRECTORY} ARGS --sources ${CTEST_SOURCE_DIRECTORY}\\source --modules *${CI_BUILD_UUID}* --cover_children --export_type=cobertura -- ${OCC_TEST}.exe)
+            file(READ ${CTEST_BINARY_DIRECTORY}/${OCC_TEST}Coverage.xml OCC_TESTXML)
             string(REGEX REPLACE "package name=[^ ]+\"" "package name=\"merged\"" OCC_TESTXML ${OCC_TESTXML})
             string(REGEX REPLACE "filename=[^ ]+\\source." "filename=\"source/" OCC_TESTXML ${OCC_TESTXML})
             string(REGEX REPLACE "<source>[^ ]+</source>" "<source>source</source>" OCC_TESTXML ${OCC_TESTXML})
-            file(WRITE ${CTEST_BINARY_DIRECTORY}/Debug/${OCC_TEST}Coverage.xml ${OCC_TESTXML})
+            file(WRITE ${CTEST_BINARY_DIRECTORY}/${OCC_TEST}Coverage.xml ${OCC_TESTXML})
             string(FIND ${OCC_TESTS} "#" OCC_ABORT)
         endwhile()
-        exec_program(python ${CTEST_SOURCE_DIRECTORY} ARGS ci-tools/merge_cobertura.py -p "${CTEST_BINARY_DIRECTORY}\\Debug" -o "${CTEST_BINARY_DIRECTORY}\\Debug\\coverage.xml")
-        set(ENV{COBERTURADIR} "${CTEST_BINARY_DIRECTORY}\\Debug")
+        exec_program(python ${CTEST_SOURCE_DIRECTORY} ARGS ci-tools/merge_cobertura.py -p "${CTEST_BINARY_DIRECTORY}" -o "${CTEST_BINARY_DIRECTORY}\\coverage.xml")
+        set(ENV{COBERTURADIR} "${CTEST_BINARY_DIRECTORY}")
     endif()
     ctest_coverage()
     ctest_submit(PARTS Start Update Configure Build Test Coverage Upload Submit)


Static Lapack linkage

Static Lapack linkage

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -4,6 +4,9 @@

 # --- Lapack ---
 if(WITH_LAPACK)
+  if(WIN32)
+    set(BLA_STATIC 1)
+  endif()
   find_package(LAPACK)
   if(LAPACK_FOUND)
     find_path(LAPACKE_INCLUDE_DIR "lapacke.h")


Avoid using `..` in paths for include dirs.

Summary:
This breaks when using a symlink from llvm/tools/lldb to the lldb source
tree, instead of cloning directly as a child. With this change, we can
build properly, even when using links.

Reviewers: dawn, brucem, zturner

Subscribers: lldb-commits

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

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@251530 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -194,7 +194,7 @@
   add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()

-include_directories(../clang/include)
+include_directories(${CMAKE_SOURCE_DIR}/tools/clang/include)
 include_directories("${CMAKE_CURRENT_BINARY_DIR}/../clang/include")

 # Disable GCC warnings


CMake: Fix some unwanted commentary line wraps on the last change.

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -106,31 +106,26 @@
 # dependencies.  Comes from the llvm-config script, which is built and
 # installed on the bin directory for MinGW or Linux. At the end of the
 # script, you'll see lines like this:
-#
-# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a
-# libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a
-#
+
+# LLVMARMAsmPrinter.o: LLVMARMCodeGen.o libLLVMAsmPrinter.a libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMTarget.a
+
 # This is translated to:
-#
-# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter
-# LLVMCodeGen LLVMCore LLVMSupport LLVMTarget)
-#
+
+# set(MSVC_LIB_DEPS_LLVMARMAsmPrinter LLVMARMCodeGen LLVMAsmPrinter LLVMCodeGen LLVMCore LLVMSupport LLVMTarget)
+
 # It is necessary to remove the `lib' prefix, the `.a' and `.o'
 # suffixes.  Watch out for this line:
-#
-# LLVMExecutionEngine.o LLVMJIT.o: libLLVMCodeGen.a libLLVMCore.a
-# libLLVMSupport.a libLLVMSystem.a libLLVMTarget.a
-#
+
+# LLVMExecutionEngine.o LLVMJIT.o: libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMSystem.a libLLVMTarget.a
+
 # See how there are two elements before the colon. This must be
 # translated as if it were:
-#
-# LLVMExecutionEngine.o: libLLVMCodeGen.a libLLVMCore.a
-# libLLVMSupport.a libLLVMSystem.a libLLVMTarget.a LLVMJIT.o:
-# libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMSystem.a
-# libLLVMTarget.a
-#
+
+# LLVMExecutionEngine.o: libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMSystem.a libLLVMTarget.a
+# LLVMJIT.o: libLLVMCodeGen.a libLLVMCore.a libLLVMSupport.a libLLVMSystem.a libLLVMTarget.a
+
 # TODO: do this transformations on cmake.
-#
+
 # It is very important that the LLVM built for extracting this data
 # must contain all targets, not just X86.


updated info message

updated info message


ENH: Updating niral_utilities to the newest revision.

If itkMacro.h was not included before argio.h, niral_utilies was not compiling. Some ITK constants were not defined.

--- SuperBuild/External_niral_utilities.cmake
+++ SuperBuild/External_niral_utilities.cmake
@@ -77,7 +77,7 @@

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git )
-  set( ${proj}_GIT_TAG dea3323b99be580b6fd2a7214ce60ddb9d7baec2 )
+  set( ${proj}_GIT_TAG 8034509e6598e06842a668e051b8ca84842fcd0c)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -104,9 +104,11 @@
     find_package(${extProjName} REQUIRED)
     message("USING the system ${extProjName}, set ${extProjName}_DIR=${${extProjName}_DIR}")
   endif()
-  # The project is provided using ${extProjName}_DIR, nevertheless since other
-  # project may depend on ${extProjName}, let's add an 'empty' one
-  SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")
+  if( NOT TARGET ${proj} )
+    # The project is provided using ${extProjName}_DIR, nevertheless since other
+    # project may depend on ${extProjName}, let's add an 'empty' one
+    SlicerMacroEmptyExternalProject(${proj} "${${proj}_DEPENDENCIES}")
+  endif()
 endif()

 list(APPEND ${CMAKE_PROJECT_NAME}_SUPERBUILD_EP_VARS ${extProjName}_DIR:PATH)


java: refactor out writing paths to the file

--- Wrapping/Java/MakeJavacResponseFile.cmake
+++ Wrapping/Java/MakeJavacResponseFile.cmake
@@ -1,33 +1,29 @@
 cmake_minimum_required(VERSION 2.8.8)
-
-# Clear the contents of the file
-file(WRITE "${RSP_FILENAME}.tmp" "")

 file(GLOB vtk_java_files "${VTK_BINARY_DIR}/java/vtk/*.java")
 file(GLOB vtk_java_rendering_files "${VTK_BINARY_DIR}/java/vtk/rendering/*.java")
 file(GLOB vtk_java_rendering_awt_files "${VTK_BINARY_DIR}/java/vtk/rendering/awt/*.java")
 file(GLOB vtk_java_sample_files "${VTK_BINARY_DIR}/java/vtk/sample/*.java")

-foreach( java_file IN LISTS vtk_java_files vtk_java_rendering_files
-                            vtk_java_rendering_awt_files vtk_java_sample_files)
-  file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
-endforeach()
+set(all_vtk_java_files vtk_java_rendering_files vtk_java_rendering_awt_files vtk_java_sample_files)

 if(VTK_JAVA_SWT_COMPONENT)
   file(GLOB vtk_java_swt_files "${VTK_BINARY_DIR}/java/vtk/rendering/swt/*.java")
-  foreach( java_file IN LISTS vtk_java_swt_files )
-    file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
-  endforeach()
+  list(APPEND all_vtk_java_files vtk_java_swt_files)
 endif()

 if(VTK_JAVA_JOGL_COMPONENT)
   file(GLOB vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/rendering/jogl/*.java")
   list(APPEND vtk_java_jogl_files "${VTK_BINARY_DIR}/java/vtk/sample/rendering/JoglConeRendering.java")
-  foreach( java_file IN LISTS vtk_java_jogl_files )
-    file(APPEND "${RSP_FILENAME}.tmp" "${java_file}\n")
-  endforeach()
+  list(APPEND all_vtk_java_files vtk_java_jogl_files)
 endif()

-configure_file("${RSP_FILENAME}.tmp" "${RSP_FILENAME}" COPYONLY)
+set(CMAKE_CONFIGURABLE_FILE_CONTENT)
+foreach( java_file IN LISTS ${all_vtk_java_files} )
+  set(CMAKE_CONFIGURABLE_FILE_CONTENT "${CMAKE_CONFIGURABLE_FILE_CONTENT}${java_file}\n")
+endforeach()

-file(REMOVE "${RSP_FILENAME}.tmp")
+configure_file(
+  "${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in"
+  "${RSP_FILENAME}"
+  @ONLY)


print out correct DAOS_ROOT

print out correct DAOS_ROOT

--- cmake/FindDAOS.cmake
+++ cmake/FindDAOS.cmake
@@ -37,7 +37,7 @@
 endif()

-message(STATUS "DAOS_ROOT is is \"$ENV{DAOS_ROOT}\"")
+message(STATUS "DAOS_ROOT is : ${DAOS_ROOT}")
 find_path(DAOS_INCLUDE_DIR daos_api.h ${DAOS_INCLUDE_OPTS})
 find_library(DAOS_LIBRARY libdaos.so ${DAOS_LIBRARY_OPTS})
 find_library(DFS_LIBRARY libdfs.so ${DAOS_LIBRARY_OPTS})


do not put binutils warning on the dashboard

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -123,7 +123,7 @@
          string(REGEX REPLACE "\\([^\\)]*\\)" "" _as_version "${_as_version}")
          string(REGEX MATCH "[1-9]\\.[0-9]+(\\.[0-9]+)?" _as_version "${_as_version}")
          if(_as_version VERSION_LESS "2.18.93")
-            message(WARNING "Your binutils is too old (${_as_version}). Some optimizations of Vc will be disabled.")
+            UserWarning("Your binutils is too old (${_as_version}). Some optimizations of Vc will be disabled.")
             add_definitions(-DVC_NO_XGETBV) # old assembler doesn't know the xgetbv instruction
          endif()
       endif()


Fix nodiscard types unnamed variable again (#220)

--- cmake/bde_ufid.cmake
+++ cmake/bde_ufid.cmake
@@ -426,8 +426,8 @@
                 -Wno-sign-conversion
                 -Wno-string-conversion
                 -Wno-unknown-pragmas
-                -Wno-unused-value
-                -Wunused-result
+                -Wno-unevaluated-expression
+                -Wno-unused-comparison
             >
             $<$<CXX_COMPILER_ID:Clang>:
                 $<IF:${bde_ufid_is_exc},
@@ -461,8 +461,8 @@
                 -Wno-sign-conversion
                 -Wno-string-conversion
                 -Wno-unknown-pragmas
-                -Wno-unused-value
-                -Wunused-result
+                -Wno-unevaluated-expression
+                -Wno-unused-comparison
             >
             $<$<CXX_COMPILER_ID:GNU>:
                 $<${bde_ufid_is_opt}:


Remove debugging of Boost libs.

Remove debugging of Boost libs.

--- CMake/AddBoost.cmake
+++ CMake/AddBoost.cmake
@@ -1,4 +1,4 @@
-set(Boost_DEBUG 1)
+#set(Boost_DEBUG 1)

 message(STATUS "Looking for boost")


Fix issue with external HDF5

Fix issue with external HDF5

In certain cases HDF5 sets HDF5_IS_PARALLEL flag and in other cases sets
HDF5_ENABLE_PARALLEL flag. Updated the logic to check for both.

Change-Id: If923d82d9cfbd40ea05322305d5790438e98ed4e

--- CMake/FindHDF5.cmake
+++ CMake/FindHDF5.cmake
@@ -5,7 +5,7 @@
 # include the default FindHDF5.cmake.
 include(${CMAKE_ROOT}/Modules/FindHDF5.cmake)

-if(HDF5_FOUND AND HDF5_IS_PARALLEL)
+if(HDF5_FOUND AND (HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL))
   include(vtkMPI)
   if(MPI_C_INCLUDE_PATH)
     list(APPEND HDF5_INCLUDE_DIRS ${MPI_C_INCLUDE_PATH})


Fix Windows packaging

Fix Windows packaging

There is a bug in NSIs, it doesn't support file path with only slashes.

--- CMake/msvCPack.cmake
+++ CMake/msvCPack.cmake
@@ -81,6 +81,8 @@

 if(APPLE)
   set(CPACK_PACKAGE_ICON "${MSVTK_SOURCE_DIR}/msvLogo.icns")
+elseif(WIN32)
+  set(CPACK_PACKAGE_ICON "${MSVTK_SOURCE_DIR}\\\\msvLogo.png")
 else()
   set(CPACK_PACKAGE_ICON "${MSVTK_SOURCE_DIR}/msvLogo.png")
 endif()


Fix package name

Fix package name

Use the full version in the package name.

--- CMake/msvCPack.cmake
+++ CMake/msvCPack.cmake
@@ -76,7 +76,7 @@
 set(CPACK_PACKAGE_VERSION_MAJOR "${MSVTK_VERSION_MAJOR}")
 set(CPACK_PACKAGE_VERSION_MINOR "${MSVTK_VERSION_MINOR}")
 set(CPACK_PACKAGE_VERSION_PATCH "${MSVTK_VERSION_PATCH}")
-set(CPACK_PACKAGE_VERSION "${MSVTK_VERSION}")
+set(CPACK_PACKAGE_VERSION "${MSVTK_VERSION_FULL}")
 set(CPACK_SYSTEM_NAME "${MSVTK_OS}-${MSVTK_ARCHITECTURE}")

 if(APPLE)


Ignore stderr from the linker when checking from gold

This was manifesting as a cmake warning when building external clients.
When gcc is using ld.bfd, it calls collect2 which always prints to
stderr, so there's no reason to check it.

Fixes issue 1109.

Review URL: https://codereview.appspot.com/7512043

SVN-Revision: 1973

--- make/utils.cmake
+++ make/utils.cmake
@@ -93,11 +93,11 @@
   else ()
     execute_process(COMMAND ${CMAKE_C_COMPILER} -Wl,--version
       RESULT_VARIABLE ld_result
-      ERROR_VARIABLE ld_error
+      ERROR_QUIET  # gcc's collect2 always writes to stderr, so ignore it.
       OUTPUT_VARIABLE ld_out)
     set(is_gold OFF)
-    if (${ld_result} OR ${ld_error})
-      message(WARNING "failed to get linker version: assuming ld.bfd")
+    if (ld_result)
+      message("failed to get linker version, assuming ld.bfd (${ld_result})")
     elseif ("${ld_out}" MATCHES "GNU gold")
       set(is_gold ON)
     endif ()


add custom_try_compile_clang_silent macro

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -333,6 +333,11 @@
   custom_try_compile_c_cxx("${CLANG}" "c" "${SOURCE1}" "${SOURCE2}" ${RES_VAR}  "-c" ${ARGN})
 endmacro()

+# clang++ try-compile macro
+macro(custom_try_compile_clang_silent SOURCE1 SOURCE2 RES_VAR)
+  custom_try_compile_c_cxx_silent("${CLANG}" "c" "${SOURCE1}" "${SOURCE2}" ${RES_VAR} "-c" ${ARGN})
+endmacro()
+
 # clang++ try-link macro
 macro(custom_try_link_clang SOURCE1 SOURCE2 RES_VAR)
   set(RANDOM_FILENAME "${CMAKE_BINARY_DIR}/compile_test_${RNDNAME}.${SUFFIX}")
@@ -752,7 +757,7 @@
 if(ENABLE_HOST_CPU_DEVICES AND NOT DEFINED ${CL_DISABLE_HALF})
   set(CL_DISABLE_HALF 0)
   message(STATUS "Checking fp16 support")
-  custom_try_compile_c_cxx_silent("${CLANG}" "c" "__fp16 callfp16(__fp16 a) { return a * (__fp16)1.8; };" "__fp16 x=callfp16((__fp16)argc);" RESV -c ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU})
+  custom_try_compile_clang_silent("__fp16 callfp16(__fp16 a) { return a * (__fp16)1.8; };" "__fp16 x=callfp16((__fp16)argc);" RESV ${CLANG_TARGET_OPTION}${LLC_TRIPLE} ${CLANG_MARCH_FLAG}${LLC_HOST_CPU})
   if(RESV)
     set(CL_DISABLE_HALF 1)
   endif()


Fix typo

Fix typo

--- cmake/msvc.cmake
+++ cmake/msvc.cmake
@@ -14,7 +14,7 @@
 ## limitations under the License.                                           ##
 ## ======================================================================== ##

-SET(COMMON_CXX_FLAGS "/EHsc /MP /GR /bigobj /DNOMINMAX ")
+SET(COMMON_CXX_FLAGS "/EHsc /MP /GR /bigobj /D NOMINMAX ")

 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
 SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /fp:fast /Oi /Gy ")


tests: use the input file's absolute path with tests using input files

Otherwise out-of-tree builds fail to run those tests.

Signed-off-by: Josef 'Jeff' Sipek <a620f141433c70aa9e43778305a6c68cbfadfb25@josefsipek.net>

--- cmake/test.cmake
+++ cmake/test.cmake
@@ -56,7 +56,7 @@
 	foreach(TEST ${TESTS})
 		add_test(NAME "${name}:${TEST}"
 			 COMMAND "${CMAKE_BINARY_DIR}/tests/test_${name}"
-			 	 "${TEST}"
+			 	 "${CMAKE_CURRENT_SOURCE_DIR}/${TEST}"
 		)
 		set_tests_properties("${name}:${TEST}" PROPERTIES
 			ENVIRONMENT "UMEM_DEBUG=default,verbose"


ENH: Update ExternalProjectsConfig.cmake

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -28,9 +28,9 @@
   ${github_protocol}://github.com/danmar/cppcheck.git )
 set( Cppcheck_HASH_OR_TAG 1.61 )

-# Common Toolkit snapshot 2013-08-20 16:21:07
+# Common Toolkit snapshot 2013-09-10 20:12:15
 set( CTK_URL ${github_protocol}://github.com/commontk/CTK.git )
-set( CTK_HASH_OR_TAG 76219ba324ce1a976256fb7c7da5705d7e5f214b )
+set( CTK_HASH_OR_TAG 71c234bb8febd32f3b00b068061e93105303ebc0 )

 # TubeTK Image Viewer snapshot 2013-08-21 06:23:25
 set( ImageViewer_URL


display message while creating symbolic link to PCH

--- pch.cmake
+++ pch.cmake
@@ -104,6 +104,9 @@
             add_custom_target( ${_targetName}_PCH_symlink
                 COMMAND
                     ${CMAKE_COMMAND} -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${_targetName}_PCH.dir/${pch_relative_path}.o" "${_output}"
+                COMMENT
+                    "Creating symbolic link to built precompiled header"
+                VERBATIM
             )
             add_dependencies( ${_targetName}_PCH_symlink ${_targetName}_PCH )


Fixed some insane CMake issue.

Fixed some insane CMake issue.

Former-commit-id: 5304be842b3a390627f3e76a1ace8dd5e6d3fb0f

--- test/HalideGenerator.cmake
+++ test/HalideGenerator.cmake
@@ -18,6 +18,8 @@
   # Determine a scratch directory to build and execute the generator. ${target}
   # will include the generated header from this directory.
   halide_generator_output_path(${gen_name} SCRATCH_DIR)
+  file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/" NATIVE_INT_DIR)
+  file(MAKE_DIRECTORY "${NATIVE_INT_DIR}scratch_${gen_name}")

   # CMake 2.8 doesn't have string(CONCAT), so fake it like so:
   string(REPLACE ".lib" "${CMAKE_STATIC_LIBRARY_SUFFIX}" FILTER_LIB "${func_name}.lib" )


CMake: Do not set rpath on web builds.

CMake: Do not set rpath on web builds.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -24,7 +24,9 @@

 # Set compiler variable
 set ("${CMAKE_CXX_COMPILER_ID}" ON)
-set (CMAKE_INSTALL_RPATH "$ORIGIN")
+if (NOT WEB)
+    set (CMAKE_INSTALL_RPATH "$ORIGIN")
+endif ()

 # Configure variables
 set (URHO3D_URL "https://github.com/urho3d/Urho3D")


MITK 2012.09.00 version update

MITK 2012.09.00 version update

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -6,8 +6,8 @@

 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2012")
-set(MITK_VERSION_MINOR "06")
-set(MITK_VERSION_PATCH "99")
+set(MITK_VERSION_MINOR "09")
+set(MITK_VERSION_PATCH "00")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")


Update forge build tag

Update forge build tag

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -22,7 +22,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG 50959f2f04592d23d5207623c43e675bc4a648dc
+    GIT_TAG 823b00b38b7f10dbe7b6469ae60ebf9c11391fde
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


removed GTEST argument form target_link_libraries

--- ament_cmake_gtest/cmake/ament_add_gtest.cmake
+++ ament_cmake_gtest/cmake/ament_add_gtest.cmake
@@ -74,7 +74,7 @@
   if(NOT WIN32)
     set(THREADS_PREFER_PTHREAD_FLAG ON)
     find_package(Threads REQUIRED)
-    target_link_libraries("${target}" ${GTEST_LIBRARIES} Threads::Threads)
+    target_link_libraries("${target}" Threads::Threads)
   endif()
   if(NOT ARG_SKIP_LINKING_MAIN_LIBRARIES)
     target_link_libraries("${target}" ${GTEST_MAIN_LIBRARIES})


moved up multisense version

moved up multisense version

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -148,7 +148,7 @@
   )

 set(multisense-lcm_url http://github.com/mitdrc/multisense-lcm.git)
-set(multisense-lcm_revision 70738692bfdc598a0452ae3dd831465c26e7299e)
+set(multisense-lcm_revision f203addf0901130fdc63132828ae8265fd8ebe1c)
 set(multisense-lcm_depends libmultisense)


Fixed minor bug, not all sources were being analyzed during Arduino library detection

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -381,7 +381,7 @@
 #
 function(setup_arduino_libraries VAR_NAME BOARD_ID SRCS)
     set(LIB_TARGETS)
-    find_arduino_libraries(TARGET_LIBS ${SRCS})
+    find_arduino_libraries(TARGET_LIBS "${SRCS}")
     foreach(TARGET_LIB ${TARGET_LIBS})
         setup_arduino_library(LIB_DEPS ${BOARD_ID} ${TARGET_LIB}) # Create static library instead of returning sources
         list(APPEND LIB_TARGETS ${LIB_DEPS})


fixes issue 1024

fixes issue 1024

Kill infloop.exe by pid instead of name to support simultanous nudge tests
(an alternative would be to add an ordering dependence, but we already bail
earlier if we can't get the pid, so we always have it).

SVN-Revision: 1033

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -104,6 +104,7 @@
 # select(undef, undef, undef, X) sleeps for X seconds where X can be non-int.
 set(SLEEP_SHORT ${PERL} -e "select(undef, undef, undef, 0.1)")
 set(TIMEOUT_SHORT "100")  # *0.1 = 10 seconds
+set(TIMEOUT_SHORT_APP "200")  # *0.1 = 20 seconds
 set(SLEEP_LONG ${PERL} -e "select(undef, undef, undef, 2)")
 set(TIMEOUT_APP "120")

@@ -158,7 +159,7 @@
     execute_process(COMMAND ${SLEEP_SHORT})
     file(READ "${out}" output)
     math(EXPR iters "${iters} + 1")
-    if ("${iters}" STREQUAL "${TIMEOUT_SHORT}")
+    if ("${iters}" STREQUAL "${TIMEOUT_SHORT_APP}")
       message(FATAL_ERROR "Timed out waiting for app to start")
     endif ()
   endwhile()
@@ -253,7 +254,8 @@
     # combine out and err
     set(kill_err "${kill_out}${kill_err}")
   else (UNIX)
-    execute_process(COMMAND "${toolbindir}/DRkill.exe" -exe "${exename}"
+    # we can't kill by name b/c we have multiple tests using infloop.exe (i#1024)
+    execute_process(COMMAND "${toolbindir}/DRkill.exe" -pid "${pid}"
       RESULT_VARIABLE kill_result
       ERROR_VARIABLE kill_err
       OUTPUT_QUIET) # prints "killing process ..."


CMake: Refactor macros and augment comment

--- cmake/configure/configure_boost.cmake
+++ cmake/configure/configure_boost.cmake
@@ -22,6 +22,31 @@
   )

+MACRO(FEATURE_BOOST_CONFIGURE_COMMON)
+  #
+  # Boost version 1.62 - 1.63 checks for the availability of "emplace_hint"
+  # incorrectly: It tests for the preprocessor define
+  # BOOST_NO_CXX11_HDR_UNORDERED_MAP in .../boost/serialization/map.h
+  # thinking that that this define is characteristic for the presence of
+  # std::(multi)map::emplace_hint. This is generally correct, except for
+  # GCC before 4.8, for which the preprocessor variable is defined, but the
+  # function does not exist [1].
+  #
+  # Thus, simply define a BOOST_NO_CXX11_HDR_UNORDERED_MAP if the gcc
+  # compiler version is less than 4.8.
+  #
+  # [1] https://svn.boost.org/trac/boost/ticket/12755
+  #
+  IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
+      CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" )
+    LIST(APPEND BOOST_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
+    LIST(APPEND BOOST_USER_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
+  ENDIF()
+
+  ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs")
+ENDMACRO()
+
+
 MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED)
   #
   # Add rt to the link interface as well, boost/chrono needs it.
@@ -34,7 +59,7 @@
     ENDIF()
   ENDIF()

-  ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs")
+  FEATURE_BOOST_CONFIGURE_COMMON()

   SET(BOOST_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include)

@@ -47,19 +72,6 @@
     LIST(APPEND BOOST_DEFINITIONS "BOOST_ALL_NO_LIB")
     LIST(APPEND BOOST_USER_DEFINITIONS "BOOST_ALL_NO_LIB")
   ENDIF()
-
-  #
-  # Our bundled boost version 1.62 checks for the availability of
-  # "emplace_hint" incorrectly. Thus, simply define
-  # BOOST_NO_CXX11_HDR_UNORDERED_MAP if the gcc compiler version is less
-  # than 4.8.
-  #
-  IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
-      CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" )
-    LIST(APPEND BOOST_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
-    LIST(APPEND BOOST_USER_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
-  ENDIF()
-
 ENDMACRO()

 MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
@@ -76,22 +88,12 @@
       MESSAGE(STATUS "Boost version 1.58 is not compatible with deal.II!")
       SET(${var} FALSE)
     ENDIF()
-
-    #
-    # Newer boost versions check for the availability of "emplace_hint"
-    # incorrectly. Thus, simply define BOOST_NO_CXX11_HDR_UNORDERED_MAP if
-    # the gcc compiler version is less than 4.8.
-    #
-    IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
-        CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" )
-      LIST(APPEND BOOST_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
-      LIST(APPEND BOOST_USER_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
-    ENDIF()
   ENDIF()
 ENDMACRO()

+
 MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL)
-  ENABLE_IF_SUPPORTED(BOOST_CXX_FLAGS "-Wno-unused-local-typedefs")
+  FEATURE_BOOST_CONFIGURE_COMMON()
 ENDMACRO()


[CMake] Change the default value of LLVM_ENABLE_IDE

There really aren't any generator behaviors that we need to take `CMAKE_EXTRA_GENERATOR` into account for. Where we need to take different behaviors for IDEs is mostly in enabling or disabling certain build system features that are optional but trip up the IDE UIs. Like the generation of lots of utility targets.

By changing the LLVM_ENABLE_IDE default to only being on for multi-configuration generators, we allow gating where it will impact the UI presentation, while also supporting optionally disabling the generation if your tooling workflow encounters problems. Presently being able to manually disable extra target generation is useful for Visual Studio 2017's CMake integration where the IDE has trouble displaying and working with the large number of optional targets.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -868,16 +868,19 @@
   set(LLVM_ENABLE_PLUGINS ON)
 endif()

-# Remove LLVM_ENABLE_IDE from the CMake cache. This is a temporary change to
-# allow CMake caches to be cleaned up so that we can change the default for this
-# option and how it is used.
-unset(LLVM_ENABLE_IDE CACHE)
-#set(LLVM_ENABLE_IDE_default OFF)
-#if (XCODE OR MSVC_IDE OR CMAKE_EXTRA_GENERATOR)
-#  set(LLVM_ENABLE_IDE_default ON)
-#endif()
-#option(LLVM_ENABLE_IDE "Generate targets and process sources for use with an IDE"
-#    ${LLVM_ENABLE_IDE_default})
+# By default we should enable LLVM_ENABLE_IDE only for multi-configuration
+# generators. This option disables optional build system features that make IDEs
+# less usable.
+set(LLVM_ENABLE_IDE_default OFF)
+if (CMAKE_CONFIGURATION_TYPES)
+  set(LLVM_ENABLE_IDE_default ON)
+endif()
+option(LLVM_ENABLE_IDE
+       "Disable optional build system features that cause problems for IDE generators"
+       ${LLVM_ENABLE_IDE_default})
+if (CMAKE_CONFIGURATION_TYPES AND NOT LLVM_ENABLE_IDE)
+  message(WARNING "Disabling LLVM_ENABLE_IDE on multi-configuration generators is not recommended.")
+endif()

 function(get_compile_definitions)
   get_directory_property(top_dir_definitions DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)


Fix CMake warning when building with Qt5.x

--- cmake/modules/QEverCloudSetupQt.cmake
+++ cmake/modules/QEverCloudSetupQt.cmake
@@ -8,9 +8,9 @@

 if(USE_QT5)
   find_package(Qt5Core REQUIRED)
-  set(QT_INCLUDES "${QT_INCLUDES} ${Qt5Core_INCLUDE_DIRS}")
-  set(QT_LIBRARIES "${QT_LIBRARIES} ${Qt5Core_LIBRARIES}")
-  set(QT_DEFINITIONS "${QT_DEFINITIONS} ${Qt5Core_DEFINITIONS}")
+  set(QT_INCLUDES "$${Qt5Core_INCLUDE_DIRS}")
+  set(QT_LIBRARIES "${Qt5Core_LIBRARIES}")
+  set(QT_DEFINITIONS "${Qt5Core_DEFINITIONS}")
 else()
   find_package(Qt4 COMPONENTS QTCORE REQUIRED)
   include(${QT_USE_FILE})


[build] amend search path for Cmake modules

Since we are not using symlinks anymore, we need to point to the correct
directory with LLVM cmake modules.

Fixes rdar://problem/57294763

--- cmake/modules/StandaloneOverlay.cmake
+++ cmake/modules/StandaloneOverlay.cmake
@@ -10,7 +10,7 @@

 list(APPEND CMAKE_MODULE_PATH
-  "${SWIFT_SOURCE_ROOT}/llvm/cmake/modules"
+  "${SWIFT_SOURCE_ROOT}/llvm-project/llvm/cmake/modules"
   "${PROJECT_SOURCE_DIR}/../../../../cmake/modules"
   "${PROJECT_SOURCE_DIR}/../../../cmake/modules")


Fixed GCrypt find module.

Fixed GCrypt find module.

--- cmake/Modules/FindGCrypt.cmake
+++ cmake/Modules/FindGCrypt.cmake
@@ -6,7 +6,7 @@
 #  GCRYPT_LIBRARIES - Link these to use GCrypt
 #  GCRYPT_DEFINITIONS - Compiler switches required for using GCrypt
 #
-#  Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
+#  Copyright (c) 2009-2010 Andreas Schneider <mail@cynapses.org>
 #
 #  Redistribution and use is allowed according to the terms of the New
 #  BSD license.
@@ -27,8 +27,8 @@
       /usr/local/include
       /opt/local/include
       /sw/include
+      /usr/lib/sfw/include
   )
-  mark_as_advanced(GCRYPT_INCLUDE_DIR)

   find_library(GCRYPT_LIBRARY
     NAMES
@@ -38,37 +38,23 @@
       /usr/local/lib
       /opt/local/lib
       /sw/lib
+      /usr/sfw/lib/64
+      /usr/sfw/lib
   )
-  mark_as_advanced(GCRYPT_LIBRARY)
-
-  if (GCRYPT_LIBRARY)
-    set(GCRYPT_FOUND TRUE CACHE INTERNAL "Wether the gcrypt library has been found" FORCE)
-  endif (GCRYPT_LIBRARY)

   set(GCRYPT_INCLUDE_DIRS
     ${GCRYPT_INCLUDE_DIR}
   )

-  if (GCRYPT_FOUND)
+  if (GCRYPT_LIBRARY)
     set(GCRYPT_LIBRARIES
-      ${GCRYPT_LIBRARIES}
-      ${GCRYPT_LIBRARY}
+        ${GCRYPT_LIBRARIES}
+        ${GCRYPT_LIBRARY}
     )
-  endif (GCRYPT_FOUND)
+  endif (GCRYPT_LIBRARY)

-  if (GCRYPT_INCLUDE_DIRS AND GCRYPT_LIBRARIES)
-     set(GCRYPT_FOUND TRUE)
-  endif (GCRYPT_INCLUDE_DIRS AND GCRYPT_LIBRARIES)
-
-  if (GCRYPT_FOUND)
-    if (NOT GCrypt_FIND_QUIETLY)
-      message(STATUS "Found GCrypt: ${GCRYPT_LIBRARIES}")
-    endif (NOT GCrypt_FIND_QUIETLY)
-  else (GCRYPT_FOUND)
-    if (GCrypt_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find GCrypt")
-    endif (GCrypt_FIND_REQUIRED)
-  endif (GCRYPT_FOUND)
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(GCrypt DEFAULT_MSG GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIRS)

   # show the GCRYPT_INCLUDE_DIRS and GCRYPT_LIBRARIES variables only in the advanced view
   mark_as_advanced(GCRYPT_INCLUDE_DIRS GCRYPT_LIBRARIES)


cmake

cmake

--- cmake/Modules/FindSFCGAL.cmake
+++ cmake/Modules/FindSFCGAL.cmake
@@ -0,0 +1,77 @@
+#-- SFCGAL finder
+#
+# search variables :
+#     SFCGAL_DIR(cmake/environment) : SFCGAL install directory
+#     SFCGAL_INCLUDE_DIR(cmake) : directory containing SFCGAL.h
+#     SFCGAL_LIBRARY_DIR(cmake) : directory containing SFCGAL libraries
+#
+# defined variables :
+#     SFCGAL_FOUND : true if library found
+#     SFCGAL_INCLUDE_DIRS : full path to SFCGAL libraries
+#     SFCGAL_LIBRARIES : full path to SFCGAL libraries
+#
+
+# -- parse version
+find_path(SFCGAL_INCLUDE_DIR SFCGAL/Kernel.h
+    HINTS $ENV{SFCGAL_DIR} ${SFCGAL_DIR} ${SFCGAL_INCLUDE_DIRS}
+    PATH_SUFFIXES include
+)
+
+# -- parse version
+IF(SFCGAL_INCLUDE_DIR)
+	IF(EXISTS "${SFCGAL_INCLUDE_DIR}/SFCGAL/version.h")
+		FILE(STRINGS "${SFCGAL_INCLUDE_DIR}/SFCGAL/version.h" sfcgal_version_str REGEX "^#define[\t ]+SFCGAL_VERSION[\t ]+\".*\"")
+
+		STRING(REGEX REPLACE "^#define[\t ]+SFCGAL_VERSION[\t ]+\"([^\"]*)\".*" "\\1" SFCGAL_VERSION "${ign_socle_version_str}")
+
+		# from http://www.cmake.org/Wiki/CMakeCompareVersionStrings
+		# Breaks up a string in the form n1.n2.n3 into three parts and stores
+		# them in major, minor, and patch.  version should be a value, not a
+		# variable, while major, minor and patch should be variables.
+		IF(${SFCGAL_VERSION} MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
+			STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" SFCGAL_MAJOR_VERSION "${SFCGAL_VERSION}")
+			STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" SFCGAL_MINOR_VERSION "${SFCGAL_VERSION}")
+			STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" SFCGAL_PATCH_VERSION "${SFCGAL_VERSION}")
+		ELSE()
+			MESSAGE( WARNING "IGN_SOCLE_VERSION (${SFCGAL_VERSION}) doesn't match *.*.* form" )
+		ENDIF()
+
+
+		UNSET(sfcgal_version_str)
+	ELSE()
+		message( WARNING "can't parse SFCGAL version" )
+	ENDIF()
+ENDIF()
+
+
+
+# find library (Release)
+find_library(SFCGAL_LIBRARY NAMES SFCGAL
+	HINTS $ENV{SFCGAL_DIR} ${SFCGAL_DIR}
+	PATH_SUFFIXES lib
+)
+# find library (Debug)
+find_library(SFCGAL_LIBRARY_DEBUG NAMES SFCGALd
+	HINTS $ENV{SFCGAL_DIR} ${SFCGAL_DIR}
+	PATH_SUFFIXES lib
+)
+
+# set output variables
+set( SFCGAL_INCLUDE_DIRS "${SFCGAL_INCLUDE_DIR}" )
+if ( SFCGAL_LIBRARY_DEBUG )
+	set( SFCGAL_LIBRARIES "optimized;${SFCGAL_LIBRARY};debug;${SFCGAL_LIBRARY_DEBUG} )
+else()
+	set( SFCGAL_LIBRARIES ${SFCGAL_LIBRARY} )
+endif()
+
+# handle the QUIETLY and REQUIRED arguments and set <NAME>_FOUND to TRUE
+# if all listed variables are TRUE
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+	SFCGAL DEFAULT_MSG
+    SFCGAL_INCLUDE_DIRS SFCGAL_LIBRARIES
+)
+
+mark_as_advanced(SFCGAL_INCLUDE_DIRS SFCGAL_LIBRARIES)
+
+


Fix extra semicolon in compile/link flags

--- cmake/Modules/SampPlugin.cmake
+++ cmake/Modules/SampPlugin.cmake
@@ -20,8 +20,8 @@
 	set_target_properties(${name} PROPERTIES PREFIX "")

 	if(CMAKE_COMPILER_IS_GNUCC)
-		set_property(TARGET ${name} APPEND PROPERTY COMPILE_FLAGS "-m32")
-		set_property(TARGET ${name} APPEND PROPERTY LINK_FLAGS    "-m32")
+		set_property(TARGET ${name} APPEND_STRING PROPERTY COMPILE_FLAGS " -m32")
+		set_property(TARGET ${name} APPEND_STRING PROPERTY LINK_FLAGS    " -m32")
 	endif()

 	if(UNIX AND NOT WIN32)


Fix clang configuration output

Fix clang configuration output

--- cmake/PlatformLinuxClang.cmake
+++ cmake/PlatformLinuxClang.cmake
@@ -1,4 +1,4 @@
-message(STATUS "Configuring for platform Linux/GCC.")
+message(STATUS "Configuring for platform Linux/Clang.")

 # Enable C++11 support


Condition out looking for libs only on *nix systems as it is not required on Windows

--- cmake/TestForPythonEmbed.cmake
+++ cmake/TestForPythonEmbed.cmake
@@ -4,11 +4,13 @@
 #  PYTHON_EMBEDABLE - True if embedable

 find_package(PythonLibs)
-# Some systems require these libs to be added explicitly
-find_library(DL dl)
-find_library(MATH m)
-find_library(PTHREAD pthread)
-find_library(UTIL util)
+if(UNIX OR LINUX)
+    # Some systems require these libs to be added explicitly
+    find_library(DL dl)
+    find_library(MATH m)
+    find_library(PTHREAD pthread)
+    find_library(UTIL util)
+endif(UNIX OR LINUX)

 if(PYTHONLIBS_FOUND)
 	MESSAGE(STATUS "Checking if Python is Embedable")


[CMake] Print the correct variables

[CMake] Print the correct variables

This didn't get updated after we decided to set PYTHON_MAJOR_VERSION and
PYTHON_MINOR_VERSION in find_python_libs_windows, instead of parsing the
variables ourselves.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@367153 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -226,7 +226,7 @@
     # version for the system provided interpreter and libraries.
     if (NOT PYTHON_VERSION_MAJOR VERSION_EQUAL pythonlibs_major OR
         NOT PYTHON_VERSION_MINOR VERSION_EQUAL pythonlibs_minor)
-      message(FATAL_ERROR "Found incompatible Python interpreter (${python_major}.${python_minor})"
+      message(FATAL_ERROR "Found incompatible Python interpreter (${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})"
                           " and Python libraries (${pythonlibs_major}.${pythonlibs_minor})")
     endif()
   endif()


[CMake] update precondition error message

--- cmake/modules/SwiftUtils.cmake
+++ cmake/modules/SwiftUtils.cmake
@@ -21,7 +21,7 @@
       if (PRECONDITION_MESSAGE)
         message(FATAL_ERROR "Error! ${PRECONDITION_MESSAGE}")
       else()
-        message(FATAL_ERROR "Error! Variable ${var} is false or not set.")
+        message(FATAL_ERROR "Error! Variable ${var} is false, empty or not set.")
       endif()
     endif()
   endif()


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

It was not handling the case of both debug and release libraries for
application and contexts properly.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -627,7 +627,7 @@
             INTERFACE_COMPILE_DEFINITIONS $<TARGET_PROPERTY:${_MAGNUM_WINDOWLESSAPPLICATION_ALIAS},INTERFACE_COMPILE_DEFINITIONS>
             INTERFACE_COMPILE_OPTIONS $<TARGET_PROPERTY:${_MAGNUM_WINDOWLESSAPPLICATION_ALIAS},INTERFACE_COMPILE_OPTIONS>
             INTERFACE_LINK_LIBRARIES $<TARGET_PROPERTY:${_MAGNUM_WINDOWLESSAPPLICATION_ALIAS},INTERFACE_LINK_LIBRARIES>
-            IMPORTED_CONFIGURATIONS ${_MAGNUM_WINDOWLESSAPPLICATION_IMPORTED_CONFIGURATIONS})
+            IMPORTED_CONFIGURATIONS "${_MAGNUM_WINDOWLESSAPPLICATION_IMPORTED_CONFIGURATIONS}")
         if(_MAGNUM_WINDOWLESSAPPLICATION_IMPORTED_LOCATION_RELEASE)
             set_target_properties(Magnum::WindowlessApplication PROPERTIES
                 IMPORTED_LOCATION_RELEASE ${_MAGNUM_WINDOWLESSAPPLICATION_IMPORTED_LOCATION_RELEASE})
@@ -657,7 +657,7 @@
             INTERFACE_COMPILE_DEFINITIONS $<TARGET_PROPERTY:${_MAGNUM_APPLICATION_ALIAS},INTERFACE_COMPILE_DEFINITIONS>
             INTERFACE_COMPILE_OPTIONS $<TARGET_PROPERTY:${_MAGNUM_APPLICATION_ALIAS},INTERFACE_COMPILE_OPTIONS>
             INTERFACE_LINK_LIBRARIES $<TARGET_PROPERTY:${_MAGNUM_APPLICATION_ALIAS},INTERFACE_LINK_LIBRARIES>
-            IMPORTED_CONFIGURATIONS ${_MAGNUM_APPLICATION_IMPORTED_CONFIGURATIONS})
+            IMPORTED_CONFIGURATIONS "${_MAGNUM_APPLICATION_IMPORTED_CONFIGURATIONS}")
         if(_MAGNUM_APPLICATION_IMPORTED_LOCATION_RELEASE)
             set_target_properties(Magnum::Application PROPERTIES
                 IMPORTED_LOCATION_RELEASE ${_MAGNUM_APPLICATION_IMPORTED_LOCATION_RELEASE})
@@ -687,7 +687,7 @@
             INTERFACE_COMPILE_DEFINITIONS $<TARGET_PROPERTY:${_MAGNUM_CONTEXT_ALIAS},INTERFACE_COMPILE_DEFINITIONS>
             INTERFACE_COMPILE_OPTIONS $<TARGET_PROPERTY:${_MAGNUM_CONTEXT_ALIAS},INTERFACE_COMPILE_OPTIONS>
             INTERFACE_LINK_LIBRARIES $<TARGET_PROPERTY:${_MAGNUM_CONTEXT_ALIAS},INTERFACE_LINK_LIBRARIES>
-            IMPORTED_CONFIGURATIONS ${_MAGNUM_CONTEXT_IMPORTED_CONFIGURATIONS})
+            IMPORTED_CONFIGURATIONS "${_MAGNUM_CONTEXT_IMPORTED_CONFIGURATIONS}")
         if(_MAGNUM_CONTEXT_IMPORTED_LOCATION_RELEASE)
             set_target_properties(Magnum::Context PROPERTIES
                 IMPORTED_LOCATION_RELEASE ${_MAGNUM_CONTEXT_IMPORTED_LOCATION_RELEASE})


cmake: Add support for EXTRA_CFLAGS and EXTRA_CXXFLAGS

--- tools/cmake/idf_functions.cmake
+++ tools/cmake/idf_functions.cmake
@@ -164,6 +164,20 @@
     # go into the final binary so have no impact on size)
     list(APPEND compile_options "-ggdb")

+    # Use EXTRA_CFLAGS, EXTRA_CXXFLAGS and EXTRA_CPPFLAGS to add more priority options to the compiler
+    # EXTRA_CPPFLAGS is used for both C and C++
+    # Unlike environments' CFLAGS/CXXFLAGS/CPPFLAGS which work for both host and target build,
+    # these works only for target build
+    set(EXTRA_CFLAGS "$ENV{EXTRA_CFLAGS}")
+    set(EXTRA_CXXFLAGS "$ENV{EXTRA_CXXFLAGS}")
+    set(EXTRA_CPPFLAGS "$ENV{EXTRA_CPPFLAGS}")
+    spaces2list(EXTRA_CFLAGS)
+    spaces2list(EXTRA_CXXFLAGS)
+    spaces2list(EXTRA_CPPFLAGS)
+    list(APPEND c_compile_options ${EXTRA_CFLAGS})
+    list(APPEND cxx_compile_options ${EXTRA_CXXFLAGS})
+    list(APPEND compile_options ${EXTRA_CPPFLAGS})
+
     # Temporary trick to support both gcc5 and gcc8 builds
     list(APPEND compile_definitions "GCC_NOT_5_2_0=${GCC_NOT_5_2_0}")


debian path

debian path

git-svn-id: 53a346f67f76028cd3290d0c97fdb7682ad2a994@11602 358b74ad-2626-0410-af80-f4c3c349ae55

--- imageutilities/cmake/FindCUDASparse.cmake
+++ imageutilities/cmake/FindCUDASparse.cmake
@@ -25,7 +25,7 @@
 find_library(CUDA_SPARSE_LIBRARY
   NAMES cusparse
   PATHS "${CUDA_TOOLKIT_ROOT_DIR}"
-  PATH_SUFFIXES "/lib64" "/lib"
+  PATH_SUFFIXES "/lib64" "/lib" "/lib/x86_64-linux-gnu"
   DOC "Location of sparse library"
   NO_DEFAULT_PATH
 )


add generated constant definitions to library

Summary: when trying to build openr with `getDeps.py` constant definitions where not available since they were not part of the generated thrift lib. this fixes it.

Reviewed By: chadaustin

Differential Revision: D16064417

fbshipit-source-id: ee2b3e061caf67235f4a873405cf6cd6fb663ef4

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -59,12 +59,12 @@
   # Compute the list of generated files
   list(APPEND generated_headers
     "${output_dir}/gen-cpp2/${base}_constants.h"
-    "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_types.h"
     "${output_dir}/gen-cpp2/${base}_types.tcc"
     "${output_dir}/gen-cpp2/${base}_types_custom_protocol.h"
   )
   list(APPEND generated_sources
+    "${output_dir}/gen-cpp2/${base}_constants.cpp"
     "${output_dir}/gen-cpp2/${base}_data.h"
     "${output_dir}/gen-cpp2/${base}_data.cpp"
     "${output_dir}/gen-cpp2/${base}_types.cpp"


Fix cmake typo

Fix cmake typo

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -289,7 +289,7 @@
         set (CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY};-fix")
     endif ()
     set (CMAKE_CXX_CLANG_TIDY "${CMAKE_CXX_CLANG_TIDY};-checks=${CLANG_TIDY_CHECKS}")
-    message (STATUS, "clang-tidy command line is: ${CMAKE_CXX_CLANG_TIDY}")
+    message (STATUS "clang-tidy command line is: ${CMAKE_CXX_CLANG_TIDY}")
 endif ()

 if (EXTRA_CPP_ARGS)


Make windows gpu build project name tensorflow_gpu. (#5794) (#5821)

* Make windows gpu build project name tensorflow_gpu.

* Update tf_python.cmake

oops, fixed :)

(cherry picked from commit f8037317ba5e772f59086e3ba098d07cf83363cf)

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -616,6 +616,12 @@
   COMMAND ${CMAKE_COMMAND} -E copy ${tensorflow_source_dir}/tensorflow/tensorboard/TAG
                                    ${CMAKE_CURRENT_BINARY_DIR}/tf_python/tensorflow/tensorboard/)

-add_custom_command(TARGET tf_python_build_pip_package POST_BUILD
-  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/tf_python/setup.py bdist_wheel
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tf_python)
+if(${tensorflow_ENABLE_GPU})
+  add_custom_command(TARGET tf_python_build_pip_package POST_BUILD
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/tf_python/setup.py bdist_wheel --project_name tensorflow_gpu
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tf_python)
+else()
+  add_custom_command(TARGET tf_python_build_pip_package POST_BUILD
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/tf_python/setup.py bdist_wheel
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tf_python)
+endif(${tensorflow_ENABLE_GPU})


Remove RPM build.

Remove RPM build.

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -4,16 +4,7 @@
 set(CPACK_PACKAGE_VERSION_MAJOR 15)
 set(CPACK_PACKAGE_VERSION_MINOR 05)
 set(CPACK_PACKAGE_VERSION_PATCH 90)
-set(CPACK_GENERATOR "DEB;RPM")
-
-set(RPM_REQUIRES
-    "arcus >= 15.05.90"
-    "protobuf >= 3.0.0"
-    "libstdc++6 >= 4.9.0"
-    "libgcc1 >= 4.9.0"
-)
-string(REPLACE ";" "," RPM_REQUIRES "${RPM_REQUIRES}")
-set(CPACK_RPM_PACKAGE_REQUIRES ${RPM_REQUIRES})
+set(CPACK_GENERATOR "DEB")

 set(DEB_DEPENDS
     "arcus (>= 15.05.90)"


ctest: Move to new dashboard

ctest: Move to new dashboard

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -4,7 +4,6 @@
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "https")
-set(CTEST_DROP_SITE "mock.cryptomilk.org")
+set(CTEST_DROP_SITE "test.cmocka.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
 set(CTEST_DROP_SITE_CDASH TRUE)
-


setting maximum passed output size in Embree project

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -28,3 +28,6 @@
 list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #1478")  # deprecated function used
 list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning #10237") # -lcilkrts linked in dynamically, static library not available")
 list (APPEND CTEST_CUSTOM_WARNING_EXCEPTION "-Wextern-initializer")
+
+SET(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 200000)
+SET(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 800000)