ENH: Bump Cppcheck to version that fixes CFGDIR specification

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -33,7 +33,7 @@

 # Cppcheck
 set( Cppcheck_URL ${github_protocol}://github.com/KitwareMedical/cppcheck.git )
-set( Cppcheck_HASH_OR_TAG 04abdc98b089aee5d23795f78a9e335ac176e017 )
+set( Cppcheck_HASH_OR_TAG a9c9482d6e1b42457aedf8065e21523654f46124 )

 # TubeTK Image Viewer
 set( ImageViewer_URL


BUG: Bump ParameterSerializer version.

BUG: Bump ParameterSerializer version.

Fixes issues with finding JsonCpp.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -60,7 +60,7 @@
 # TubeTK Parameter Serializer snapshot 2013-12-20 01:04)
 set( ParameterSerializer_URL
   ${github_protocol}://github.com/TubeTK/TubeTK-ParameterSerializer.git )
-set( ParameterSerializer_HASH_OR_TAG 67b34735c201d95cbfabf04f29bd120a12c63812 )
+set( ParameterSerializer_HASH_OR_TAG 4b41039e4e8e1098f41bbff13527ab9f5ee26188 )

 # Slicer Execution Model (TubeTK fork) snapshot 2013-08-05 10:16:50
 set( SlicerExecutionModel_URL


BUG: Fix the ITK clone URL.

BUG: Fix the ITK clone URL.

This is a follow-up to
KitwareMedical/TubeTK@2b3fe664eee25653dc0c391feae95ff87079d768

The github.com/Slicer/ITK.git repository does not have a copy of the ITK
master branch and the commit is missing.

This causes the build failure:

Error
  CMake Error at Stamp/ITK/ITK-download-Release.cmake:16 (message):
    Command failed: 1

     'C:/Program Files (x86)/CMake/bin/cmake.exe' '-P' '/.../TubeTK-Release/tmp/ITK/ITK-gitclone.cmake'

    See also

      /.../TubeTK-Release/Stamp/ITK/ITK-download-*.log

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -86,7 +86,7 @@
 set( CTK_HASH_OR_TAG caaf2c8cdee08e95bc823ab92865e1e9153dcc04 )

 # Insight Segmentation and Registration Toolkit
-set( ITK_URL ${github_protocol}://github.com/Slicer/ITK.git )
+set( ITK_URL ${github_protocol}://github.com/InsightSoftwareConsortium/ITK.git )
 set( ITK_HASH_OR_TAG 58a7203f9ec431f9fe71ac087d0bd7e02b495634 )

 # Slicer Execution Model


modules: updated FindMagnumIntegration.cmake.

--- modules/FindMagnumIntegration.cmake
+++ modules/FindMagnumIntegration.cmake
@@ -227,9 +227,7 @@
         elseif(_component STREQUAL Dart)
             find_package(DART 6.0.0 CONFIG REQUIRED)
             set_property(TARGET MagnumIntegration::${_component} APPEND PROPERTY
-                INTERFACE_INCLUDE_DIRECTORIES ${DART_INCLUDE_DIRS})
-            set_property(TARGET MagnumIntegration::${_component} APPEND PROPERTY
-                INTERFACE_LINK_LIBRARIES ${DART_LIBRARIES})
+                INTERFACE_LINK_LIBRARIES dart)

             set(_MAGNUMINTEGRATION_${_COMPONENT}_INCLUDE_PATH_NAMES ConvertShapeNode.h)


Removed unnecessary prints

Removed unnecessary prints

Former-commit-id: 0d99f1c4d380c431e450a79aaa1c04891d524287

--- cmake-modules/FindOpenMP.cmake
+++ cmake-modules/FindOpenMP.cmake
@@ -87,9 +87,7 @@
     list(APPEND CMAKE_MODULE_PATH ${BACKUP})
     unset(BACKUP)
     if(OpenMP_FOUND AND TARGET OpenMP::OpenMP_CXX)
-        include (cmake-modules/PrintTargetProperties.cmake)
         set_target_properties(OpenMP::OpenMP_CXX PROPERTIES INTERFACE_COMPILE_DEFINITIONS "_OPENMP")
-        print_target_properties(OpenMP::OpenMP_CXX)
         check_omp_compiles(OpenMP::OpenMP_CXX)
         if(OMP_COMPILES AND TARGET OpenMP::OpenMP_CXX)
             add_library(openmp::openmp INTERFACE IMPORTED)


FIX: for LAPACK on windows, add -DLAPACK_COMPLEX_STRUCTURE=1

--- cmake/DependenciesConfig.cmake
+++ cmake/DependenciesConfig.cmake
@@ -45,6 +45,8 @@
   find_package(LAPACK REQUIRED)
   find_package(LAPACKE REQUIRED)
   add_definitions(-DEIGEN_USE_BLAS -DEIGEN_USE_LAPACKE)
+  # needed because MSVC does not have support for c-type _Complex
+  add_definitions(-DLAPACK_COMPLEX_STRUCTURE=1)
   message(STATUS LAPACK: ${LAPACK_LIBRARIES})
 endmacro(configure_lapack)


Fix binary directory used in CMake try_compile commands

Old paths can have problems with cross-compilation

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -49,8 +49,9 @@
 # --- OpenMP ---
 if(NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
   set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/omptest.cpp")
-  FILE(WRITE "${_fname}" "#ifndef _OPENMP\n#error\n#endif\nint main() { return 0; }\n")
-  TRY_COMPILE(HAVE_OPENMP "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp" "${_fname}")
+  file(WRITE "${_fname}" "#ifndef _OPENMP\n#error\n#endif\nint main() { return 0; }\n")
+  try_compile(HAVE_OPENMP "${CMAKE_BINARY_DIR}" "${_fname}")
+  file(REMOVE "${_fname}")
 else()
   set(HAVE_OPENMP 0)
 endif()
@@ -65,8 +66,9 @@
 # --- Concurrency ---
 if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
   set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
-  FILE(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
-  TRY_COMPILE(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp" "${_fname}")
+  file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
+  try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
+  file(REMOVE "${_fname}")
 else()
   set(HAVE_CONCURRENCY 0)
 endif()


Removed fatal message from python test

Removed fatal message from python test

git-svn-id: 39e099a8ed5324aded674b764a67f7a08796d9a7@1139 662fdd30-d327-0410-a531-f549c87e1e9e

--- cmake/TestForPythonEmbed.cmake
+++ cmake/TestForPythonEmbed.cmake
@@ -11,7 +11,7 @@
 	    MESSAGE(STATUS "Python is embedable")
             SET(PYTHON_EMBEDABLE TRUE)
 	ELSE(NOT BUILD_RUN_RETURN)
-	    MESSAGE(FATAL_ERROR "Python is not embedable")
+	    MESSAGE(STATUS "Python is not embedable")
 	ENDIF(NOT BUILD_RUN_RETURN)
 ELSE(PYTHONLIBS_FOUND)
     MESSAGE(STATUS "Python is not embedable")


change linking order for Gurobi - seemed to be important

--- cmake/modules/FindGUROBI.cmake
+++ cmake/modules/FindGUROBI.cmake
@@ -11,7 +11,7 @@
   # in cache already
   set(GUROBI_FOUND TRUE)
   set(GUROBI_INCLUDE_DIRS "${GUROBI_INCLUDE_DIR}" )
-  set(GUROBI_LIBRARIES "${GUROBI_LIBRARY};${GUROBI_CXX_LIBRARY}" )
+  set(GUROBI_LIBRARIES "${GUROBI_CXX_LIBRARY};${GUROBI_LIBRARY}" )
 else (GUROBI_INCLUDE_DIR)

 find_path(GUROBI_INCLUDE_DIR


Fixed warning in CMake when MATLAB not found

--- cmake/modules/FindMATLAB.cmake
+++ cmake/modules/FindMATLAB.cmake
@@ -84,14 +84,22 @@
   if((NOT DEFINED MATLAB_ROOT)
       OR ("${MATLAB_ROOT}" STREQUAL ""))
     # get path to the Matlab root directory
+
     execute_process(
       COMMAND which matlab
-      COMMAND xargs readlink
-      COMMAND xargs dirname
-      COMMAND xargs dirname
-      COMMAND xargs echo -n
-      OUTPUT_VARIABLE MATLAB_ROOT
-      )
+      OUTPUT_VARIABLE MATLAB_BIN_EXISTS
+    )
+
+    IF (MATLAB_BIN_EXISTS)
+      execute_process(
+        COMMAND which matlab
+        COMMAND xargs readlink
+        COMMAND xargs dirname
+        COMMAND xargs dirname
+        COMMAND xargs echo -n
+        OUTPUT_VARIABLE MATLAB_ROOT
+        )
+    ENDIF (MATLAB_BIN_EXISTS)
   endif()

   # Check if this is a Mac


Reenable FindLibXml2 on Windows and confirm its at least 2.8 or newer

Summary:
GnuWin32 installs libxml2 2.4. This isn't recent enough for lldb's
usage and thus the build fails. Searching for libxml2 was disabled
due to this build failure.

However, the gdb-remote plugin requires libxml2 to parse various
gdb-remote protocol packets. Thus check and confirm that the libxml2
version is at least 2.8 and disable it if not.

Reviewers: compnerd, zturner

Reviewed By: compnerd

Subscribers: mgorny

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

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -315,11 +315,7 @@
   endif()
 endif()

-if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows"))
-  # Skip Libxml2 on Windows.  In CMake 3.4 and higher, the algorithm for
-  # finding libxml2 got "smarter", and it can now locate the version which is
-  # in gnuwin32, even though that version does not contain the headers that
-  # LLDB uses.
+if (NOT LIBXML2_FOUND)
   find_package(LibXml2)
 endif()

@@ -348,12 +344,10 @@
        ${SECURITY_LIBRARY}
        ${DEBUG_SYMBOLS_LIBRARY})
   include_directories(${LIBXML2_INCLUDE_DIR})
-else()
-  if (LIBXML2_FOUND)
-    add_definitions( -DLIBXML2_DEFINED )
-    list(APPEND system_libs ${LIBXML2_LIBRARIES})
-    include_directories(${LIBXML2_INCLUDE_DIR})
-  endif()
+elseif(LIBXML2_FOUND AND LIBXML2_VERSION_STRING VERSION_GREATER 2.8)
+  add_definitions( -DLIBXML2_DEFINED )
+  list(APPEND system_libs ${LIBXML2_LIBRARIES})
+  include_directories(${LIBXML2_INCLUDE_DIR})
 endif()

 if( WIN32 AND NOT CYGWIN )


Fix android-i386 build broken by previous commit

I foolishly thought I could simplify the condition to cover all android
targets. I was wrong - i386 headers don't define __NR_accept.

Revert back to enabling the workaround on arm an mips only.

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -412,7 +412,8 @@
     add_definitions(-DLLDB_USE_BUILTIN_DEMANGLER)
 endif()

-if ((CMAKE_SYSTEM_NAME MATCHES "Android") AND LLVM_BUILD_STATIC)
+if ((CMAKE_SYSTEM_NAME MATCHES "Android") AND LLVM_BUILD_STATIC AND
+    ((ANDROID_ABI MATCHES "armeabi") OR (ANDROID_ABI MATCHES "mips")))
   add_definitions(-DANDROID_BUILD_STATIC)
 endif()


ENH: use http URL for libtiff (ftp is an alias to osgeo server)

--- CMake/External_libtiff.cmake
+++ CMake/External_libtiff.cmake
@@ -28,7 +28,7 @@
   else()
     ExternalProject_Add(${proj}
       PREFIX ${proj}
-      URL "ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.3.tar.gz"
+      URL "http://download.osgeo.org/libtiff/tiff-4.0.3.tar.gz"
       URL_MD5 051c1068e6a0627f461948c365290410
       BINARY_DIR ${LIBTIFF_SB_BUILD_DIR}
       INSTALL_DIR ${CMAKE_INSTALL_PREFIX}


Comments and cmake_minimum_required removed because they are not necessary.

--- CMake/GenerateDoxyfile.cmake
+++ CMake/GenerateDoxyfile.cmake
@@ -1,10 +1,6 @@
-cmake_minimum_required(VERSION 2.8)
-
 # We need to modify the Doxyfile slightly.  We'll copy the Doxyfile into the
 # build directory, update the location of the source, and then run Doxygen and
 # it will generate the documentation into the build directory.
-
-message(STATUS "Hurble ${CMAKE_CURRENT_SOURCE_DIR}")

 # First, read the Doxyfile in as a variable.
 file(READ "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile" DOXYFILE_CONTENTS)
@@ -29,7 +25,5 @@
     DOXYFILE_AUXVAR "${DOXYFILE_CONTENTS}"
 )

-message(STATUS "Ready to go ${DESTDIR}")
-
 # Save the Doxyfile to its new location.
 file(WRITE "${DESTDIR}/Doxyfile" "${DOXYFILE_AUXVAR}")


Installed version of samples.cfg should reference samples plugins in ./

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -17,16 +17,16 @@
   set(OGRE_MEDIA_DIR_DBG "../../${OGRE_MEDIA_PATH}")
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")
-  set(OGRE_SAMPLES_DIR_REL "Samples")
-  set(OGRE_SAMPLES_DIR_DBG "Samples")
+  set(OGRE_SAMPLES_DIR_REL ".")
+  set(OGRE_SAMPLES_DIR_DBG ".")
 elseif (UNIX)
   set(OGRE_MEDIA_PATH "share/OGRE/media")
   set(OGRE_MEDIA_DIR_REL "../${OGRE_MEDIA_PATH}")
   set(OGRE_MEDIA_DIR_DBG "../../${OGRE_MEDIA_PATH}")
   set(OGRE_PLUGIN_DIR_REL "../lib/OGRE")
   set(OGRE_PLUGIN_DIR_DBG "../../lib/OGRE")
-  set(OGRE_SAMPLES_DIR_REL "../lib/OGRE/Samples")
-  set(OGRE_SAMPLES_DIR_DBG "../lib/OGRE/Samples")
+  set(OGRE_SAMPLES_DIR_REL "../lib/OGRE")
+  set(OGRE_SAMPLES_DIR_DBG "../lib/OGRE")
 endif ()

 # configure plugins.cfg


made setting CMAKE_MODULE_PATH nondestructively


ENH: new macro for _SB_ variables, support cmake alias for prefix

--- CMake/SuperBuild_Macro.cmake
+++ CMake/SuperBuild_Macro.cmake
@@ -34,8 +34,10 @@

 # Macro ADD_SYSTEM_PREFIX : defines a system prefix for the given project
 #   - creates a cache variable SYSTEM_${PROJECT}_PREFIX
+#   - if CMAKE_ALIAS is defined, it is used to add an entry in cache
+#       -D${CMAKE_ALIAS}:PATH=${SYSTEM_${PROJECT}_PREFIX}
 macro(ADD_SYSTEM_PREFIX)
-  cmake_parse_arguments(NEW_SYSPREFIX  "" "PROJECT" "" ${ARGN})
+  cmake_parse_arguments(NEW_SYSPREFIX  "" "PROJECT;CMAKE_ALIAS" "" ${ARGN})
   set(SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX "" CACHE PATH "Set a custom system prefix")
   mark_as_advanced(SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX)
   if(USE_SYSTEM_${NEW_SYSPREFIX_PROJECT})
@@ -43,5 +45,21 @@
   else()
     set_property(CACHE SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX PROPERTY TYPE INTERNAL)
   endif()
-
+  if(NOT ${NEW_SYSPREFIX_CMAKE_ALIAS} STREQUAL "")
+    if(NOT SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX STREQUAL "")
+      set(ITEM_FOR_CMAKE_CACHE
+        "-D${NEW_SYSPREFIX_CMAKE_ALIAS}:PATH=${SYSTEM_${NEW_SYSPREFIX_PROJECT}_PREFIX}")
+      list(APPEND SYSTEM_${NEW_SYSLOC_PROJECT}_CMAKE_CACHE ${ITEM_FOR_CMAKE_CACHE})
+    endif()
+  endif()
 endmacro(ADD_SYSTEM_PREFIX)
+
+# Macro SETUP_SUPERBUILD
+# Initialize usefull variables to build a superbuild project
+macro(SETUP_SUPERBUILD)
+  cmake_parse_arguments(NEW_SB "" "PROJECT" "" ${ARGN})
+  set(${NEW_SB_PROJECT}_DEPENDENCIES)
+  set(${NEW_SB_PROJECT}_SB_BUILD_DIR ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/build)
+  set(${NEW_SB_PROJECT}_SB_SRC ${CMAKE_BINARY_DIR}/${NEW_SB_PROJECT}/src/${NEW_SB_PROJECT})
+  set(${NEW_SB_PROJECT}_SB_CONFIG)
+endmacro(SETUP_SUPERBUILD)


ENH: Tcl/Tk 8.5

ENH: Tcl/Tk 8.5

--- CMake/FindTCL.cmake
+++ CMake/FindTCL.cmake
@@ -125,6 +125,8 @@
   "${TK_LIBRARY_PATH_PARENT}/include"
   "${TCL_INCLUDE_PATH}"
   "${TK_INCLUDE_PATH}"
+  ${TCL_FRAMEWORK_INCLUDES}
+  ${TK_FRAMEWORK_INCLUDES}
   "${TCL_TCLSH_PATH_PARENT}/include"
   "${TK_WISH_PATH_PARENT}/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ActiveState\\ActiveTcl\\${ActiveTcl_CurrentVersion}]/include"
@@ -134,7 +136,6 @@
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.3;Root]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.2;Root]/include"
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Scriptics\\Tcl\\8.0;Root]/include"
-  ${TCL_FRAMEWORK_INCLUDES}
   "$ENV{ProgramFiles}/Tcl/include"
   "C:/Program Files/Tcl/include"
   "C:/Tcl/include"


Update veloview version to 1.0.6

Update veloview version to 1.0.6

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 1)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 5)
+set (VV_VERSION_PATCH 6)


Fix link flags with tracing. (#3531)

Fix link flags with tracing. (#3531)

Closes 3392

--- build_tools/cmake/iree_copts.cmake
+++ build_tools/cmake/iree_copts.cmake
@@ -39,7 +39,7 @@
 )

 if(${IREE_ENABLE_RUNTIME_TRACING})
-  set (CMAKE_EXE_LINKER_FLAGS -ldl)
+  string (APPEND CMAKE_EXE_LINKER_FLAGS -ldl)
 endif()

 iree_select_compiler_opts(IREE_DEFAULT_COPTS


Static linking for cluster compatibility

Former-commit-id: 86ea04cdc36a3547a2a25aad5bd8e10e0c974db0

--- cmake-modules/Fetch_OpenBLAS.cmake
+++ cmake-modules/Fetch_OpenBLAS.cmake
@@ -38,13 +38,13 @@
     include(ExternalProject)
     ExternalProject_Add(library_OpenBLAS
             GIT_REPOSITORY      https://github.com/xianyi/OpenBLAS.git
-            GIT_TAG             v0.3.2
+            GIT_TAG             v0.3.0
             PREFIX              "${INSTALL_DIRECTORY}/OpenBLAS"
             UPDATE_COMMAND ""
             TEST_COMMAND ""
             CONFIGURE_COMMAND ""
             BUILD_IN_SOURCE 1
-            BUILD_COMMAND $(MAKE) USE_THREAD=${OpenBLAS_MULTITHREADED} USE_OPENMP=${OpenBLAS_USE_OPENMP} OPENBLAS_NUM_THREADS=1 NUM_THREADS=1 BINARY64=1 QUIET_MAKE=1 TARGET=NEHALEM
+            BUILD_COMMAND $(MAKE) USE_THREAD=${OpenBLAS_MULTITHREADED} USE_OPENMP=${OpenBLAS_USE_OPENMP} OPENBLAS_NUM_THREADS=1 NUM_THREADS=1 BINARY64=1 QUIET_MAKE=0 TARGET=SANDYBRIDGE
             INSTALL_COMMAND $(MAKE) PREFIX=<INSTALL_DIR> install
             )
     #NO_LAPACKE=${OpenBLAS_USE_OTHER} NO_CBLAS=${OpenBLAS_USE_OTHER} BINARY64=1 QUIET_MAKE=0


CMake: Fix name of external CMake file

CMake: Fix name of external CMake file

Before this update building the man pages would fail on a
case-sensitive file system.

Thank you to Stefan Husmann (@stefanhusmann) for reporting the problem.

See also: https://issues.libelektra.org/3143

--- scripts/cmake/Modules/LibAddMacros.cmake
+++ scripts/cmake/Modules/LibAddMacros.cmake
@@ -568,7 +568,7 @@
 						    -D
 						    MANPAGE=${OUTFILE}
 						    -P
-						    ${CMAKE_SOURCE_DIR}/scripts/cmake/ElektraManpage.cmake)
+						    ${CMAKE_SOURCE_DIR}/scripts/cmake/ElektraManPage.cmake)
 			add_custom_target (man-${NAME} ALL DEPENDS ${OUTFILE})
 			add_dependencies (man man-${NAME})
 		endif (RONN_LOC)


[cmake] Remove dead link directory.

[cmake] Remove dead link directory.

This was added some time ago in case we want to build clang separate from llvm
just like we do swift. We do not actually support that though.

Currently, this just results in the main llvm binary directory being added for a
second time to the link path (i.e. this work iw asted). Thus just remove the
line but leave in a *NOTE* to deliver the message that this is where the clang
link path in such a case would need to go.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -241,11 +241,9 @@
     include_directories(${INCLUDE_DIR})
   endforeach ()

-  link_directories(
-      "${LLVM_LIBRARY_DIR}"
-      # FIXME: if we want to support separate Clang builds and mix different
-      # build configurations of Clang and Swift, this line should be adjusted.
-      "${PATH_TO_CLANG_BUILD}/${CMAKE_CFG_INTDIR}/lib")
+  # *NOTE* if we want to support separate Clang builds as well as separate LLVM
+  # builds, the clang build directory needs to be added here.
+  link_directories("${LLVM_LIBRARY_DIR}")

   set(LIT_ARGS_DEFAULT "-sv")
   if(XCODE)


Change formatting and fix a typo

Change formatting and fix a typo

--- data/findOpenFrameworks-v0.9.cmake
+++ data/findOpenFrameworks-v0.9.cmake
@@ -79,10 +79,10 @@
         ${OF_PATH}/libs/boost/lib/vs/${AR}/libboost_system-vc140-mt-1_58.lib
         )
 endif(DEBUG_MODE)
-    list(APPEND OF_INCLUDE_PATH
-        ${OF_PATH}/libs/boost/include
-        ${OF_PATH}/libs/boost/include/boost
-        )
+list(APPEND OF_INCLUDE_PATH
+    ${OF_PATH}/libs/boost/include
+    ${OF_PATH}/libs/boost/include/boost
+    )

 # CAIRO
@@ -96,7 +96,7 @@
 list(APPEND OF_INCLUDE_PATH ${OF_PATH}/libs/cairo/include/cairo)

-# FMOEX
+# FMODEX
 if (AR STREQUAL "x64")
     list(APPEND OF_LIBS ${OF_PATH}/libs/fmodex/lib/vs/${AR}/fmodex64_vc.lib)
 else()
@@ -261,17 +261,17 @@
 # OPENFRAMEORKS
 list(APPEND OF_INCLUDE_PATH
     ${OF_PATH}/libs/openFrameworks
+    ${OF_PATH}/libs/openFrameworks/3d
+    ${OF_PATH}/libs/openFrameworks/app
+    ${OF_PATH}/libs/openFrameworks/communication
+    ${OF_PATH}/libs/openFrameworks/events
+    ${OF_PATH}/libs/openFrameworks/gl
+    ${OF_PATH}/libs/openFrameworks/graphics
+    ${OF_PATH}/libs/openFrameworks/math
+    ${OF_PATH}/libs/openFrameworks/sound
     ${OF_PATH}/libs/openFrameworks/types
-    ${OF_PATH}/libs/openFrameworks/sound
+    ${OF_PATH}/libs/openFrameworks/utils
     ${OF_PATH}/libs/openFrameworks/video
-    ${OF_PATH}/libs/openFrameworks/3d
-    ${OF_PATH}/libs/openFrameworks/math
-    ${OF_PATH}/libs/openFrameworks/events
-    ${OF_PATH}/libs/openFrameworks/utils
-    ${OF_PATH}/libs/openFrameworks/gl
-    ${OF_PATH}/libs/openFrameworks/app
-    ${OF_PATH}/libs/openFrameworks/graphics
-    ${OF_PATH}/libs/openFrameworks/communication
     )

 if (USE_PRECOMPILED_LIB)


RP-48

RP-48

variables renaming

git-svn-id: 609522d7d408cfa97e9ff3bac4923f7fa96011fc@160 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -630,38 +630,41 @@
 endif()

 if(APPLE)
-  set(MATLAB_BIN1 "mac") # i should be for intel
-  set(MATLAB_suffix32 "i")
-  set(MATLAB_suffix64 "i64")
+  set(_matlab_bin_prefix "mac") # i should be for intel
+  set(_matlab_bin_suffix_32bits "i")
+  set(_matlab_bin_suffix_64bits "i64")
 elseif(UNIX)
-  set(MATLAB_BIN1 "gln")
-  set(MATLAB_suffix32 "x86")
-  set(MATLAB_suffix64 "xa64")
+  set(_matlab_bin_prefix "gln")
+  set(_matlab_bin_suffix_32bits "x86")
+  set(_matlab_bin_suffix_64bits "xa64")
 else()
-  set(MATLAB_BIN1 "win")
-  set(MATLAB_suffix32 "32")
-  set(MATLAB_suffix64 "64")
-endif()
-
-
-
-
-set(MATLAB_BIN_DIR ${Matlab_ROOT_DIR}/bin)
+  set(_matlab_bin_prefix "win")
+  set(_matlab_bin_suffix_32bits "32")
+  set(_matlab_bin_suffix_64bits "64")
+endif()
+
+
+
 set(MATLAB_INCLUDE_DIR_TO_LOOK ${Matlab_ROOT_DIR}/extern/include)
 if(_matlab_64Build)
-  set(MATLAB_BIN_DIR_ARCH ${Matlab_ROOT_DIR}/bin/${MATLAB_BIN1}${MATLAB_suffix64}  CACHE PATH "Matlab directory for architecture specific binaries")
-  set(MATLAB_EXTERN_LIB_DIR ${Matlab_ROOT_DIR}/extern/lib/${MATLAB_BIN1}${MATLAB_suffix64} CACHE PATH "Matlab directory for link")
+  set(_matlab_current_suffix ${_matlab_bin_suffix_64bits})
 else()
-  set(MATLAB_BIN_DIR_ARCH ${Matlab_ROOT_DIR}/bin/${MATLAB_BIN1}${MATLAB_suffix32} CACHE PATH "Matlab directory for architecture specific binaries" )
-  set(MATLAB_EXTERN_LIB_DIR ${Matlab_ROOT_DIR}/extern/lib/${MATLAB_BIN1}${MATLAB_suffix64} CACHE PATH "Matlab directory for link")
-endif()
+  set(_matlab_current_suffix ${_matlab_bin_suffix_32bits})
+endif()
+
+set(Matlab_BINARIES_DIR
+    ${Matlab_ROOT_DIR}/bin/${_matlab_bin_prefix}${_matlab_current_suffix}
+    CACHE PATH "Matlab directory for architecture specific binaries" )
+set(Matlab_EXTERN_LIBRARY_DIR
+    ${Matlab_ROOT_DIR}/extern/lib/${_matlab_bin_prefix}${_matlab_current_suffix}
+    CACHE PATH "Matlab libraries directory")

 if(WIN32)
-  set(MATLAB_LIB_DIR_FOR_LOOKUP ${MATLAB_EXTERN_LIB_DIR}/microsoft)
-  set(MATLAB_LIB_PREFIX_FOR_LOOKUP "lib")
+  set(_matlab_lib_dir_for_search ${Matlab_EXTERN_LIBRARY_DIR}/microsoft)
+  set(_matlab_lib_prefix_for_search "lib")
 else()
-  set(MATLAB_LIB_DIR_FOR_LOOKUP ${MATLAB_BIN_DIR_ARCH})
-  set(MATLAB_LIB_PREFIX_FOR_LOOKUP "lib")
+  set(_matlab_lib_dir_for_search ${Matlab_BINARIES_DIR})
+  set(_matlab_lib_prefix_for_search "lib")
 endif()

 unset(_matlab_64Build)
@@ -678,12 +681,12 @@

 if(MATLAB_FIND_DEBUG)
-  message(STATUS "[MATLAB] [DEBUG]MATLAB_LIB_PREFIX_FOR_LOOKUP = ${MATLAB_LIB_PREFIX_FOR_LOOKUP} | MATLAB_LIB_DIR_FOR_LOOKUP = ${MATLAB_LIB_DIR_FOR_LOOKUP}")
+  message(STATUS "[MATLAB] [DEBUG]_matlab_lib_prefix_for_search = ${_matlab_lib_prefix_for_search} | _matlab_lib_dir_for_search = ${_matlab_lib_dir_for_search}")
 endif()

 # WARNING: this thing pollutes the CMAKE_FIND_LIBRARY_PREFIXES global variable.
 # Should it be restored afterwards? Is there a more appropriate way to do that?
-set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} ${MATLAB_LIB_PREFIX_FOR_LOOKUP})
+set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES} ${_matlab_lib_prefix_for_search})

 set(_matlab_required_variables)
@@ -701,7 +704,7 @@
 find_library(
   Matlab_MEX_LIBRARY
   mex
-  PATHS ${MATLAB_LIB_DIR_FOR_LOOKUP}
+  PATHS ${_matlab_lib_dir_for_search}
   NO_DEFAULT_PATH
 )
 list(APPEND _matlab_required_variables Matlab_MEX_LIBRARY)
@@ -719,7 +722,7 @@
   find_program(
     Matlab_MEX_COMPILER
     "mex"
-    PATHS ${MATLAB_BIN_DIR_ARCH}
+    PATHS ${Matlab_BINARIES_DIR}
     DOC "Matlab MEX compiler"
     NO_DEFAULT_PATH
   )
@@ -755,7 +758,7 @@
   find_library(
     Matlab_MX_LIBRARY
     mx
-    PATHS ${MATLAB_LIB_DIR_FOR_LOOKUP}
+    PATHS ${_matlab_lib_dir_for_search}
     NO_DEFAULT_PATH
   )

@@ -770,7 +773,7 @@
   find_library(
     Matlab_ENG_LIBRARY
     eng
-    PATHS ${MATLAB_LIB_DIR_FOR_LOOKUP}
+    PATHS ${_matlab_lib_dir_for_search}
     NO_DEFAULT_PATH
   )
   if(Matlab_ENG_LIBRARY)
@@ -783,6 +786,8 @@
 unset(_matlab_find_mex_compiler)
 unset(_matlab_find_mx)
 unset(_matlab_find_eng)
+
+unset(_matlab_lib_dir_for_search)

 set(Matlab_LIBRARIES ${Matlab_MEX_LIBRARY} ${Matlab_MX_LIBRARY} ${Matlab_ENG_LIBRARY})
@@ -802,8 +807,12 @@
 endif()

 unset(_matlab_required_variables)
-
-
+unset(_matlab_bin_prefix)
+unset(_matlab_bin_suffix_32bits)
+unset(_matlab_bin_suffix_64bits)
+unset(_matlab_current_suffix)
+unset(_matlab_lib_dir_for_search)
+unset(_matlab_lib_prefix_for_search)

 if(Matlab_INCLUDE_DIRS AND Matlab_LIBRARIES)
   mark_as_advanced(
@@ -818,6 +827,7 @@
     Matlab_VERSION_STRING
     Matlab_PROGRAM
     Matlab_MEX_EXTENSION
+    Matlab_BINARIES_DIR
   )
 endif()


set prefixes manually

set prefixes manually

--- sundials/config/FindKLU.cmake
+++ sundials/config/FindKLU.cmake
@@ -18,7 +18,7 @@
 #
 # Set library prefixes for Windows
 IF(WIN32)
-  set(CMAKE_FIND_LIBRARY_PREFIXES ${CMAKE_FIND_LIBRARY_PREFIXES})
+  set(CMAKE_FIND_LIBRARY_PREFIXES "lib")
   set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
 endif()


Use replace to change -O3 to -O2 so other arguments are kept intact.

--- CMake/ExternalAssimp.cmake
+++ CMake/ExternalAssimp.cmake
@@ -13,7 +13,9 @@
 )

 IF(APPLE)
-LIST(APPEND assimp_CMAKE_ARGS -DCMAKE_CXX_FLAGS_RELEASE="-O2")
+    # Work around a compiler crash building assimp on Mac
+    STRING(REPLACE "-O3" "-O2" assimp_CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE})
+    LIST(APPEND assimp_CMAKE_ARGS -DCMAKE_CXX_FLAGS_RELEASE=${assimp_CXX_FLAGS})
 ENDIF(APPLE)

 ExternalProject_Add(assimp


COMP: update gith hash

COMP: update gith hash

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -25,7 +25,7 @@
 endif()

 if(NOT DEFINED DCMTK_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
-  set(revision_tag DCMTK-3.6.1_20160216)
+  set(revision_tag d7deba3b3c98fd0d3c354da3d99c9cda5beb7833)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()


PackageConfig fix

PackageConfig fix

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -37,7 +37,7 @@
 # add helper stuff from CMakePackageConfigHelpers
   "@PACKAGE_INIT@\n"
   "\n"
-  "set(${CMAKE_PROJECT_NAME}_PREFIX_DIR ${PACKAGE_PREFIX_DIR})\n"
+  "set(${CMAKE_PROJECT_NAME}_PREFIX_DIR \${PACKAGE_PREFIX_DIR})\n"
 # reset before using them
   "set(_output_type)\n"
   "set(_out)\n"


${COMPANY_DOMAIN} renamed to ${PROJECT_DOMAIN}

--- src/PluginConfig.cmake
+++ src/PluginConfig.cmake
@@ -11,7 +11,7 @@
 set(PLUGIN_DESCRIPTION "Web Plugin powered by Firebreath/Qt Qml/Vlc")
 set(PRODUCT_NAME "Chimera Web Plugin")
 set(PROJECT_OWNER "Sergey Radionov")
-set(COMPANY_DOMAIN "WebChimera.org")
+set(PROJECT_DOMAIN "WebChimera.org")
 set(COPYRIGHT_YEARS "2014")
 set(PLUGIN_MIMETYPE "application/x-chimera-plugin")

@@ -47,9 +47,9 @@
 # these are the pieces that are relevant to using it from Javascript
 set(ACTIVEX_PROGID "${PLUGIN_NAME}.${PLUGIN_NAME}")
 if( FB_PLATFORM_ARCH_32 )
-    set(MOZILLA_PLUGINID "${COMPANY_DOMAIN}/${PLUGIN_NAME}")  # No 32bit postfix to maintain backward compatability.
+    set(MOZILLA_PLUGINID "${PROJECT_DOMAIN}/${PLUGIN_NAME}")  # No 32bit postfix to maintain backward compatability.
 else( FB_PLATFORM_ARCH_32 )
-    set(MOZILLA_PLUGINID "${COMPANY_DOMAIN}/${PLUGIN_NAME}_${FB_PLATFORM_ARCH_NAME}")
+    set(MOZILLA_PLUGINID "${PROJECT_DOMAIN}/${PLUGIN_NAME}_${FB_PLATFORM_ARCH_NAME}")
 endif( FB_PLATFORM_ARCH_32 )

 # strings


BUG: missing executable extension for Win32

--- vtkGenerateVTKConfig.cmake
+++ vtkGenerateVTKConfig.cmake
@@ -170,6 +170,10 @@
   SET(VTK_RUNTIME_DIRS_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_LIB_DIR})
 ENDIF(WIN32)

+IF(WIN32)
+  SET(VTK_EXE_EXT ".exe")
+ENDIF(WIN32)
+
 # Executable locations.
 SET(VTK_TCL_HOME_CONFIG "")
 SET(VTK_JAVA_JAR_CONFIG "")
@@ -181,17 +185,17 @@
 SET(VTK_WRAP_TCL_INIT_EXE_CONFIG "")
 SET(VTK_DOXYGEN_HOME_CONFIG "")
 IF(VTK_WRAP_TCL)
-  SET(VTK_WRAP_TCL_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTcl)
-  SET(VTK_WRAP_TCL_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTclInit)
+  SET(VTK_WRAP_TCL_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTcl${VTK_EXE_EXT})
+  SET(VTK_WRAP_TCL_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapTclInit${VTK_EXE_EXT})
   SET(VTK_TCL_HOME_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_TCL_DIR}/tcl)
 ENDIF(VTK_WRAP_TCL)
 IF(VTK_WRAP_PYTHON)
-  SET(VTK_WRAP_PYTHON_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPython)
-  SET(VTK_WRAP_PYTHON_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPythonInit)
+  SET(VTK_WRAP_PYTHON_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPython${VTK_EXE_EXT})
+  SET(VTK_WRAP_PYTHON_INIT_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapPythonInit${VTK_EXE_EXT})
 ENDIF(VTK_WRAP_PYTHON)
 IF(VTK_WRAP_JAVA)
-  SET(VTK_PARSE_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkParseJava)
-  SET(VTK_WRAP_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapJava)
+  SET(VTK_PARSE_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkParseJava${VTK_EXE_EXT})
+  SET(VTK_WRAP_JAVA_EXE_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_BIN_DIR}/vtkWrapJava${VTK_EXE_EXT})
   SET(VTK_JAVA_JAR_CONFIG ${DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_JAVA_DIR}/vtk.jar)
 ENDIF(VTK_WRAP_JAVA)


fix wrong medinria-plugins git repository (we should use the read-only one, especially for ci)

--- externals/medInria-plugins.cmake
+++ externals/medInria-plugins.cmake
@@ -15,7 +15,7 @@
 set(${medInria-plugins_enabling_variable}_INCLUDE_DIRS medInria-plugins_INCLUDE_DIRS)
 set(${medInria-plugins_enabling_variable}_FIND_PACKAGE_CMD medInria-plugins)

-set(location_args GIT_REPOSITORY "git@dev-med.inria.fr:medinria/medinria-plugins.git" )
+set(location_args GIT_REPOSITORY "git://dev-med.inria.fr/medinria/medinria-plugins.git" )

 #     message(STATUS "Adding project:${proj}")
 ExternalProject_Add(${proj}


GC HAVE_LIBDL, HAVE_LIBM and HAVE_LIBOLE32

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -105,17 +105,8 @@
 /* Define to 1 if you have the `isatty' function. */
 #cmakedefine HAVE_ISATTY 1

-/* Define if you have the libdl library or equivalent. */
-#cmakedefine HAVE_LIBDL ${HAVE_LIBDL}
-
 /* Define to 1 if you have the 'edit' library (-ledit). */
 #cmakedefine HAVE_LIBEDIT ${HAVE_LIBEDIT}
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
-/* Define to 1 if you have the `ole32' library (-lole32). */
-#undef HAVE_LIBOLE32

 /* Define to 1 if you have the `psapi' library (-lpsapi). */
 #cmakedefine HAVE_LIBPSAPI ${HAVE_LIBPSAPI}


Lower A* factor back to 1.0

Lower A* factor back to 1.0

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- xc7/make/arch_define.cmake
+++ xc7/make/arch_define.cmake
@@ -27,6 +27,7 @@
       --allow_dangling_combinational_nodes on \
       --disable_errors check_unbuffered_edges:check_route \
       --congested_routing_iteration_threshold 0.8 \
+      --astar_fac 1.0 \
       --suppress_warnings \${OUT_NOISY_WARNINGS},sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R"
     RR_PATCH_TOOL
       ${symbiflow-arch-defs_SOURCE_DIR}/xc7/utils/prjxray_routing_import.py


update qibuild.cmake

update qibuild.cmake

--- cmake/samples/fooproject/qibuild.cmake
+++ cmake/samples/fooproject/qibuild.cmake
@@ -6,89 +6,16 @@
 # This file is part of the qibuild project    #
 ###############################################

-set(QIBUILD_BOOTSTRAP_VERSION 8)
+set(QIBUILD_BOOTSTRAP_VERSION 9)

-
-##
-# Create a use_qibuild.cmake file in CMAKE_BINARY_DIR,
-# and include it.
-# This allow us to find all qibuild/qibuild.cmake
-function(bootstrap)
-  find_program(PYTHON_EXECUTABLE NAMES python2 python python.exe
-    PATHS
-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.6\\InstallPath]
-      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.7\\InstallPath]
-  )
-
-
-  if(NOT PYTHON_EXECUTABLE)
-    message(STATUS
-      "
-      Could not find python executable.
-
-      Please check your setup.
-
-      "
-    )
-    message(FATAL_ERROR "")
-  endif()
-
-  get_filename_component(_python_root ${PYTHON_EXECUTABLE} PATH)
-  find_program(QI_BUILD_EXECUTABLE NAMES qibuild.py qibuild
-    PATHS
-      "${_python_root}/Scripts"
-  )
-
-  if(NOT QI_BUILD_EXECUTABLE)
-    message(STATUS
-      "
-      Could not find qibuild executable.
-
-      Please check your setup.
-
-      "
-    )
-    message(FATAL_ERROR "")
-  endif()
-  set(_cmd ${PYTHON_EXECUTABLE} ${QI_BUILD_EXECUTABLE})
-  set(_cmd ${_cmd} configure --single --bootstrap "--build-directory=${CMAKE_BINARY_DIR}")
-  execute_process(
-      COMMAND ${_cmd}
-      RESULT_VARIABLE  _retcode
-      OUTPUT_VARIABLE  _stdout
-      ERROR_VARIABLE   _stderr
-      WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-      )
-  if(NOT ${_retcode} EQUAL 0)
-    message(STATUS
-        "
-        qibuild bootstrap fail!
-        Log:
-        ====
-        ${_cmd}
-        ${_stdout}
-        ${_stderr}
-
-        ===
-
-        Please file a bug report with a comple CMake log
-        "
-    )
-      message(FATAL_ERROR "")
-  endif()
-endfunction()
-
-
-include(qibuild/general OPTIONAL RESULT_VARIABLE _qibuild_found)
-if(_qibuild_found)
-  return()
+# Someone used qibuild and generated a dependencies.cmake
+# file (for the dependencies and where to find qibuild/cmake file),
+# so just use it.
+if(EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
+  include(${CMAKE_BINARY_DIR}/dependencies.cmake)
 endif()

-if(NOT EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
-  bootstrap()
-endif()
-
-include(${CMAKE_BINARY_DIR}/dependencies.cmake)
-
-
+# Someone called cmake with a toolchain file that is
+# able to find qibuild/cmake code, so just include it.
+# Else, fail loudly.
 include(qibuild/general)


fix(cmake/Modules/CleanOlean.cmake): problem with 'clean-olean'

For some reason it was not working anymore on OSX

--- src/cmake/Modules/CleanOlean.cmake
+++ src/cmake/Modules/CleanOlean.cmake
@@ -1,8 +1,8 @@
-FILE(GLOB_RECURSE OLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR} *.olean)
-FILE(GLOB_RECURSE D_FILES     ${CMAKE_CURRENT_SOURCE_DIR} *.d)
-FILE(GLOB_RECURSE CLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR} *.clean)
-FILE(GLOB_RECURSE ILEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR} *.ilean)
-FILE(GLOB_RECURSE TAGS_FILES  ${CMAKE_CURRENT_SOURCE_DIR} TAGS)
+FILE(GLOB_RECURSE OLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.olean)
+FILE(GLOB_RECURSE D_FILES     ${CMAKE_CURRENT_SOURCE_DIR}/*.d)
+FILE(GLOB_RECURSE CLEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.clean)
+FILE(GLOB_RECURSE ILEAN_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.ilean)
+FILE(GLOB_RECURSE TAGS_FILES  ${CMAKE_CURRENT_SOURCE_DIR}/TAGS)

 IF(OLEAN_FILES)
   FILE(REMOVE ${OLEAN_FILES})


adding dependency on LabelMap module

adding dependency on LabelMap module

--- itk-module.cmake
+++ itk-module.cmake
@@ -13,6 +13,7 @@
 itk_module(ITKOBBLabelMap
   DEPENDS
     ITKCommon
+    ITKLabelMap
   TEST_DEPENDS
     ITKTestKernel
     ITKMetaIO


ENG-22235: fix CMake flags to allow compiling with latest XCode on MacOS (#1157)

--- tools/VoltDBCompilation.cmake
+++ tools/VoltDBCompilation.cmake
@@ -67,7 +67,9 @@
   -fvisibility=default
   -DBOOST_SP_DISABLE_THREADS -DBOOST_DISABLE_THREADS -DBOOST_ALL_NO_LIB
   -Wno-deprecated-declarations  -Wno-unknown-pragmas
-  -Wno-ignored-qualifiers -fno-strict-aliasing
+  -Wno-ignored-qualifiers
+  -Wno-deprecated-copy -Wno-unused-but-set-variable
+  -fno-strict-aliasing
   -DVOLT_LOG_LEVEL=${VOLT_LOG_LEVEL}
   -D_USE_MATH_DEFINES
 )
@@ -141,10 +143,6 @@
           MESSAGE ("GCC Version ${CMAKE_CXX_COMPILER_VERSION} is not verified for building VoltDB.")
           VOLTDB_ADD_COMPILE_OPTIONS(-Wno-error=class-memaccess)

-          # Only need to ignore deprecated-copy in a debug build
-          IF (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9" AND (VOLTDB_BUILD_TYPE STREQUAL "DEBUG" OR VOLTDB_BUILD_TYPE STREQUAL "MEMCHECK"))
-             VOLTDB_ADD_COMPILE_OPTIONS(-Wno-deprecated-copy)
-          ENDIF()
         ENDIF()
       ENDIF()
     ENDIF()


Remove . from generated wast and abi const char* variable name.

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -137,10 +137,11 @@
     VERBATIM
   )
   set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${target}.wast)
-
+  STRING (REPLACE "." "_" TARGET_VARIABLE "${target}")
+
   add_custom_command(OUTPUT ${DESTINATION_FOLDER}/${target}.wast.hpp
     DEPENDS ${DESTINATION_FOLDER}/${target}.wast
-    COMMAND echo "const char* ${target}_wast = R\"=====("  > ${DESTINATION_FOLDER}/${target}.wast.hpp
+    COMMAND echo "const char* ${TARGET_VARIABLE}_wast = R\"=====("  > ${DESTINATION_FOLDER}/${target}.wast.hpp
     COMMAND cat ${DESTINATION_FOLDER}/${target}.wast >> ${DESTINATION_FOLDER}/${target}.wast.hpp
     COMMAND echo ")=====\";"  >> ${DESTINATION_FOLDER}/${target}.wast.hpp
     COMMENT "Generating ${target}.wast.hpp"
@@ -150,7 +151,7 @@
   if (EXISTS ${DESTINATION_FOLDER}/${target}.abi )
     add_custom_command(OUTPUT ${DESTINATION_FOLDER}/${target}.abi.hpp
       DEPENDS ${DESTINATION_FOLDER}/${target}.abi
-      COMMAND echo "const char* ${target}_abi = R\"=====("  > ${DESTINATION_FOLDER}/${target}.abi.hpp
+      COMMAND echo "const char* ${TARGET_VARIABLE}_abi = R\"=====("  > ${DESTINATION_FOLDER}/${target}.abi.hpp
       COMMAND cat ${DESTINATION_FOLDER}/${target}.abi >> ${DESTINATION_FOLDER}/${target}.abi.hpp
       COMMAND echo ")=====\";"  >> ${DESTINATION_FOLDER}/${target}.abi.hpp
       COMMENT "Generating ${target}.abi.hpp"


Add image module to fix cmake build

Add image module to fix cmake build

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -263,6 +263,7 @@
 add_python_module("tensorflow/contrib/grid_rnn/python")
 add_python_module("tensorflow/contrib/grid_rnn/python/kernel_tests")
 add_python_module("tensorflow/contrib/grid_rnn/python/ops")
+add_python_module("tensorflow/contrib/image")
 add_python_module("tensorflow/contrib/input_pipeline")
 add_python_module("tensorflow/contrib/input_pipeline/python")
 add_python_module("tensorflow/contrib/input_pipeline/python/ops")


ManageArchive: SOURCE_ARCHIVE_CONTENTS_ADD now accept multiple files

--- Modules/ManageArchive.cmake
+++ Modules/ManageArchive.cmake
@@ -95,19 +95,23 @@
     SOURCE_ARCHIVE_CONTENTS_SET("${SOURCE_ARCHIVE_CONTENTS}")
 ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_FAST)

-FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD filename)
-    GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
-    FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
-    LIST(FIND SOURCE_ARCHIVE_CONTENTS "${_f}" _index)
-    IF(_index LESS 0)
+FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD)
+    FOREACH(filename ${ARGN})
+	GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
+	FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
+	LIST(FIND SOURCE_ARCHIVE_CONTENTS "${_f}" _index)
+	IF(_index LESS 0)
+	    SOURCE_ARCHIVE_CONTENTS_ADD_FAST("${_f}")
+	ENDIF(_index LESS 0)
+    ENDFOREACH(filename)
+ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD)
+
+FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK)
+    FOREACH(filename ${ARGN})
+	GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
+	FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
 	SOURCE_ARCHIVE_CONTENTS_ADD_FAST("${_f}")
-    ENDIF(_index LESS 0)
-ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD)
-
-FUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK filename)
-    GET_FILENAME_COMPONENT(_file "${filename}" ABSOLUTE)
-    FILE(RELATIVE_PATH _f ${CMAKE_SOURCE_DIR} "${_file}")
-    SOURCE_ARCHIVE_CONTENTS_ADD_FAST("${_f}")
+    ENDFOREACH(filename)
 ENDFUNCTION(SOURCE_ARCHIVE_CONTENTS_ADD_NO_CHECK)

 # Internal:  SOURCE_ARCHIVE_GET_CONTENTS()


i#1569 AArch64: Handle AArch64 in runsuite_common_pre.cmake.

On AArch64 we set ARCH_IS_X86 to OFF, and KERNEL_IS_X64 to ON,
and we skip 32-bit builds.

Review-URL: https://codereview.appspot.com/310170043

--- suite/runsuite_common_pre.cmake
+++ suite/runsuite_common_pre.cmake
@@ -283,7 +283,7 @@

 # Detect if the arch is x86
 if (NOT DEFINED ARCH_IS_X86)
-  if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm")
+  if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|aarch64)")
     set(ARCH_IS_X86 OFF)
   else ()
     set(ARCH_IS_X86 ON)
@@ -311,7 +311,7 @@
       RESULT_VARIABLE cmd_result)
     # If for some reason uname fails (not on PATH), assume the kernel is x64
     # anyway.
-    if (cmd_result OR "${machine}" MATCHES "x86_64")
+    if (cmd_result OR "${machine}" MATCHES "x86_64|aarch64")
       set(KERNEL_IS_X64 ON)
     else ()
       set(KERNEL_IS_X64 OFF)
@@ -403,6 +403,11 @@
     return()
   endif ()
   if (is64 AND arg_32_only)
+    return()
+  endif ()
+
+  # Skip 32-bit builds on an AArch64 machine.
+  if (NOT is64 AND CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
     return()
   endif ()


Pass SKBUILD to ExternalProjects

Pass SKBUILD to ExternalProjects

Change-Id: I15798a5ac9278d353872619bf9ad8ddfb978fe8f

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -252,7 +252,9 @@
   MEMORYCHECK_SUPPRESSIONS_FILE
   MEMORYCHECK_COMMAND
   SITE
-  BUILDNAME )
+  BUILDNAME
+
+  SKBUILD )

 if( APPLE )
   list( APPEND ep_common_list


hdf5: Disable hdf5 library name encoding

--- Resources/HDF5Macros.cmake
+++ Resources/HDF5Macros.cmake
@@ -78,13 +78,7 @@
     ENDIF (WIN32 AND NOT MINGW)
   ENDIF (${libtype} MATCHES "SHARED")

-  SET_TARGET_PROPERTIES (${libtarget}
-      PROPERTIES
-      DEBUG_OUTPUT_NAME          ${LIB_DEBUG_NAME}
-      RELEASE_OUTPUT_NAME        ${LIB_RELEASE_NAME}
-      MINSIZEREL_OUTPUT_NAME     ${LIB_RELEASE_NAME}
-      RELWITHDEBINFO_OUTPUT_NAME ${LIB_RELEASE_NAME}
-  )
+  # library names not mangled in this reduced distribution

   #----- Use MSVC Naming conventions for Shared Libraries
   IF (MINGW AND BUILD_SHARED_LIBS)


correct bitcode support for iOS updated (toolchain ID 3) debug marker mode added comments added

--- flags/bitcode.cmake
+++ flags/bitcode.cmake
@@ -7,12 +7,16 @@
   set(POLLY_FLAGS_BITCODE_ 1)
 endif()

-include(polly_add_cache_flag)
+set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE YES)

-polly_add_cache_flag(CMAKE_CXX_FLAGS "-fembed-bitcode")
+# It is not enough to set ENABLE_BITCODE to get binaries built with real bitcode information inside
+# We should set BITCODE_GENERATION_MODE to "bitcode" for release builds and to "marker" for debug builds
+# Only release builds usually need real bitcode for submission to Apple AppStore, so we'll save time on build
+#
+# https://medium.com/@heitorburger/static-libraries-frameworks-and-bitcode-6d8f784478a9

-# We can't use 'ENABLE_BITCODE' because
-# it only adds '-fembed-bitcode-marker':
-# * https://stackoverflow.com/a/31346742
+set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE[variant=Debug] "marker")
+set(CMAKE_XCODE_ATTRIBUTE_BITCODE_GENERATION_MODE "bitcode")

-list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "bitcode.2")
+list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "bitcode.3")
+


PKG: include libstdc++ for better compatibility

--- SuperBuild/Packaging/PackageGlobals.cmake
+++ SuperBuild/Packaging/PackageGlobals.cmake
@@ -47,7 +47,6 @@
 set(LINUX_SYSTEM_DLLS
   libm.so
   libc.so
-  libstdc*
   libgcc_s.so
   librt.so
   libdl.so
@@ -134,6 +133,8 @@
   libpng12.so.0
   libexpat.so.1
   libfontconfig.so.1
+  libstdc\\+\\+.so.6
   )
+# libstdc++ is not actually part of GTK but we want to include it anyway in linux package

 set(ALLOWED_SYSTEM_DLLS ${GTK_LIB_LIST_1} ${GTK_LIB_LIST_2})


Changing cmake to test the tests (Jenkins)

Change-Id: I4f499c6325cdab399a51385c5acb73a665d9a9ae

--- arm-toolchain.cmake
+++ arm-toolchain.cmake
@@ -1,12 +1,9 @@
 cmake_minimum_required(VERSION 2.8)
 INCLUDE(CMakeForceCompiler)
-set(ARM_PREFIX arm-none-linux-gnueabi)
-#set(ARM_PREFIX arm-frc-linux-gnueabi)
+set(ARM_PREFIX arm-frc-linux-gnueabi)
 set(CMAKE_SYSTEM_NAME Linux)
 CMAKE_FORCE_CXX_COMPILER(${ARM_PREFIX}-g++ GNU)
 CMAKE_FORCE_C_COMPILER(${ARM_PREFIX}-gcc GNU)
 set(CMAKE_CXX_FLAGS "-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -Wall -Wno-psabi" CACHE STRING "" FORCE)
 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3" CACHE STRING "" FORCE)
 set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g" CACHE STRING "" FORCE) # still want debugging for release?
-#SET(CMAKE_FIND_ROOT_PATH /usr/arm-frc-linux-gnueabi)
-SET(CMAKE_FIND_ROOT_PATH $ENV{USER_HOME}/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/arm-none-linux-gnueabi/libc)


Fixed

Fixed

--- cmake/CMLFlags.cmake
+++ cmake/CMLFlags.cmake
@@ -21,7 +21,7 @@

 OPTION(CML_NO_MATH "Use math.h" BOOL:FALSE)
 IF(CML_NO_MATH)
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_MATH=\"${CML_NO_ALIASES}\"")
+	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_MATH=\"${CML_NO_MATH}\"")
 ELSE()
 	MESSAGE(STATUS "Using math.h")
 ENDIF()


Fixed

Fixed

--- cmake/CMLFlags.cmake
+++ cmake/CMLFlags.cmake
@@ -7,14 +7,14 @@

 OPTION(CML_NO_STDBOOL "Use stdbool.h" BOOL:FALSE)
 IF(CML_NO_STDBOOL)
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_STDBOOL=\"${CML_NO_ALIASES}\"")
+	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_STDBOOL=\"${CML_NO_STDBOOL}\"")
 ELSE()
 	MESSAGE(STATUS "Using stdbool.h")
 ENDIF()

 OPTION(CML_NO_STDINT "Use stdint.h" BOOL:FALSE)
 IF(CML_NO_STDINT)
-	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_STDINT=\"${CML_NO_ALIASES}\"")
+	SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCML_NO_STDINT=\"${CML_NO_STDINT}\"")
 ELSE()
 	MESSAGE(STATUS "Using stdint.h")
 ENDIF()


got moved to 3rd party modules..

got moved to 3rd party modules..

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

--- cmake/Compiler.cmake
+++ cmake/Compiler.cmake
@@ -1,13 +0,0 @@
-# Copyright (c) 2007 Daniel Gollub <dgollub@suse.de>
-
-IF ( WIN32 )
-	SET( SYMBOLS_VISIBILITY "" )
-ENDIF ( WIN32 )
-
-IF ( CMAKE_COMPILER_IS_GNUCC )
-	SET( SYMBOLS_VISIBILITY "-fvisibility=hidden" )
-ENDIF ( CMAKE_COMPILER_IS_GNUCC )
-
-IF (CMAKE_SYSTEM MATCHES "SunOS-5*.")
-	SET( SYMBOLS_VISIBILITY "-xldscope=hidden" )
-ENDIF (CMAKE_SYSTEM MATCHES "SunOS-5*.")


fix message

fix message

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -214,7 +214,7 @@
             endif ()
         endif ()
         if (NOT OGRE_DEPS_FOUND)
-            pkg_message(OGRE "Could not find all required dependencies for the Ogre package.")
+            message(status "Could not find all required dependencies for the Ogre package.")
             set(OGRE_FOUND FALSE)
         endif ()
     endif()


Clean up find order

Clean up find order

--- cmake/FindVAST.cmake
+++ cmake/FindVAST.cmake
@@ -32,35 +32,35 @@
             /opt/local/include
             /sw/include
             ${CMAKE_INSTALL_PREFIX}/include)
-find_path(VAST_INCLUDE_CONF_DIR
-          NAMES
-            "vast/config.hpp"
-          HINTS
-            ${header_hints}
-            /usr/include
-            /usr/local/include
-            /opt/local/include
-            /sw/include
-            ${CMAKE_INSTALL_PREFIX}/include)
 mark_as_advanced(VAST_INCLUDE_DIR)
-mark_as_advanced(VAST_INCLUDE_CONF_DIR)
 set(VAST_INCLUDE_DIRS ${VAST_INCLUDE_DIRS} ${VAST_INCLUDE_DIR})
-set(VAST_INCLUDE_DIRS ${VAST_INCLUDE_DIRS} ${VAST_INCLUDE_CONF_DIR})
 if (NOT "${VAST_INCLUDE_DIR}" STREQUAL "VAST_INCLUDE_DIR-NOTFOUND")
-  # mark as found (set back to false in case library cannot be found)
-  set(VAST_FOUND true)
-  # add to VAST_INCLUDE_DIRS only if path isn't already set
-  set(duplicate false)
-  foreach (p ${VAST_INCLUDE_DIRS})
-    if (${p} STREQUAL ${VAST_INCLUDE_DIR})
-      set(duplicate true)
-    endif ()
-  endforeach ()
-  if (NOT duplicate)
-    set(VAST_INCLUDE_DIRS ${VAST_INCLUDE_DIRS} ${VAST_INCLUDE_DIR})
-  endif()
-  # look for (.dll|.so|.dylib) file, again giving hints for non-installed VASTs
-  # skip probe_event as it is header only
+  find_path(VAST_INCLUDE_CONF_DIR
+        NAMES
+          "vast/config.hpp"
+        HINTS
+          ${header_hints}
+          /usr/include
+          /usr/local/include
+          /opt/local/include
+          /sw/include
+          ${CMAKE_INSTALL_PREFIX}/include)
+  if (NOT "${VAST_INCLUDE_DIR}" STREQUAL "VAST_INCLUDE_DIR-NOTFOUND")
+    # mark as found (set back to false in case library cannot be found)
+    set(VAST_FOUND true)
+    # add to VAST_INCLUDE_CONF_DIRS only if path isn't already set
+    set(duplicate false)
+    foreach (p ${VAST_INCLUDE_DIRS})
+      if (${p} STREQUAL ${VAST_INCLUDE_CONF_DIR})
+        set(duplicate true)
+      endif ()
+    endforeach ()
+    if (NOT duplicate)
+      set(VAST_INCLUDE_DIRS ${VAST_INCLUDE_DIRS} ${VAST_INCLUDE_CONF_DIR})
+    endif()
+    mark_as_advanced(VAST_INCLUDE_CONF_DIR)
+    # look for (.dll|.so|.dylib) file, again giving hints for non-installed VASTs
+    # skip probe_event as it is header only
     if (VAST_ROOT_DIR)
       set(library_hints "${VAST_ROOT_DIR}/lib")
     endif ()
@@ -80,6 +80,7 @@
     else ()
       set(VAST_LIBRARIES ${VAST_LIBRARIES} ${VAST_LIBRARY})
     endif ()
+  endif ()
 endif ()

 # let CMake check whether all requested components have been found


remove exist test, and add optional to Config.h installation

--- cmake/dtkBuild.cmake
+++ cmake/dtkBuild.cmake
@@ -199,9 +199,7 @@
   cmake)
 endif()

-if(EXISTS ${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Config.h)
-  install(FILES  ${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Config.h DESTINATION include/${PROJECT_NAME})
-endif()
+install(FILES  ${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Config.h DESTINATION include/${PROJECT_NAME} OPTIONAL)

 if(EXISTS ${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}Plugin.cmake)
 install(FILES


Upgrade to 0.2.2

Upgrade to 0.2.2

--- cmake/packages.cmake
+++ cmake/packages.cmake
@@ -23,7 +23,7 @@
 endif ()

 set (PACKAGE_NAME        "${CMAKE_PROJECT_NAME}")
-set (PACKAGE_VERSION     "0.2.1.${GIT_CHECKIN_COUNT}")
+set (PACKAGE_VERSION     "0.2.2.${GIT_CHECKIN_COUNT}")
 set (PACKAGE_STRING      "${PACKAGE_NAME} ${PACKAGE_VERSION}")
 set (PACKAGE_TARNAME     "${PACKAGE_NAME}-${PACKAGE_VERSION}")
 set (PACKAGE_BUGREPORT   "https://github.com/Qihoo360/evpp/issues")


Improve support for C projects

Improve support for C projects

--- cmake/DevBaseCompiler.cmake
+++ cmake/DevBaseCompiler.cmake
@@ -62,6 +62,9 @@
     # TODO Maybe add:
     # -Wconversion
     # -Wsign-conversion
+    set(CMAKE_C_FLAGS
+        "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow"
+    )
     set(CMAKE_CXX_FLAGS
         "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -ftemplate-backtrace-limit=0"
     )
@@ -102,6 +105,15 @@
 endif()

+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
+
+    # Make linker report any unresolved symbols.
+    set(CMAKE_SHARED_LINKER_FLAGS
+        "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
+endif()
+
+
 if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")


Use Android API 21 (maximum level from NDK)

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

 hunter_config(Android-Build-Tools VERSION 22.0.1)
-hunter_config(Android-Google-APIs VERSION 22) # API 22
-hunter_config(Android-Google-APIs-Intel-x86-Atom-System-Image VERSION 22) # API 22
+hunter_config(Android-Google-APIs VERSION 21) # API 21
+hunter_config(Android-Google-APIs-Intel-x86-Atom-System-Image VERSION 21) # API 21
 hunter_config(Android-Google-Repository VERSION 19)
-hunter_config(Android-Intel-x86-Atom-System-Image VERSION 22) # API 22
+hunter_config(Android-Intel-x86-Atom-System-Image VERSION 21) # API 21
 hunter_config(Android-Modules VERSION 1.0.0)
 hunter_config(Android-SDK VERSION 0.0.1)
-hunter_config(Android-SDK-Platform VERSION 22_r02) # API 22
+hunter_config(Android-SDK-Platform VERSION 21_r02) # API 21
 hunter_config(Android-SDK-Platform-tools VERSION r22)
 hunter_config(Android-SDK-Tools VERSION 24.3)
 hunter_config(Android-Support-Repository VERSION 15)
@@ -62,7 +62,7 @@
 hunter_config(PNG VERSION 1.6.16-p3)
 hunter_config(RapidJSON VERSION 0.11-hunter)
 hunter_config(Sober VERSION 0.1.1) # Relax warnings
-hunter_config(Sources-for-Android-SDK VERSION 22) # API 22
+hunter_config(Sources-for-Android-SDK VERSION 21) # API 21
 hunter_config(Sugar VERSION 1.2.2)
 hunter_config(TIFF VERSION 4.0.2-p3)
 hunter_config(Washer VERSION 0.1.2)


[cmake] add option + doc string for DEV_MODE_STRICT

--- cmake/default_options.cmake
+++ cmake/default_options.cmake
@@ -25,7 +25,8 @@
 option(WITH_CXX "Enable CXX compiler for numerics. Default = ON" ON)
 option(WITH_UNSTABLE "Enable this to include all 'unstable' sources. Default=OFF" OFF)
 option(BUILD_SHARED_LIBS "Building of shared libraries. Default = ON" ON)
-option(DEV_MODE "Compilation flags setup for developpers. Default = OFF" OFF)
+option(DEV_MODE "Compilation flags setup for developers. Default = OFF" OFF)
+option(DEV_MODE_STRICT "Compilation flags setup for developers (extra strict, conversion warnings). Default = OFF" OFF)
 option(WITH_BULLET "compilation with Bullet Bindings. Default = OFF" OFF)
 option(WITH_OCC "compilation with OpenCascade Bindings. Default = OFF" OFF)
 option(WITH_MUMPS "Compilation with the MUMPS solver. Default = OFF" OFF)


Bumped MKL-DNN version to 0.17

Bumped MKL-DNN version to 0.17

test=develop

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -53,7 +53,7 @@
     ${EXTERNAL_PROJECT_LOG_ARGS}
     DEPENDS             ${MKLDNN_DEPENDS}
     GIT_REPOSITORY      "https://github.com/01org/mkl-dnn.git"
-    GIT_TAG             "21fb5f2af1dd14e132af4f1b79160977ee487818"
+    GIT_TAG             "830a10059a018cd2634d94195140cf2d8790a75a"
     PREFIX              ${MKLDNN_SOURCES_DIR}
     UPDATE_COMMAND      ""
     CMAKE_ARGS          -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}


fix compile issue test=develop (#16447)

fix compile issue test=develop (#16447)

--- cmake/external/ngraph.cmake
+++ cmake/external/ngraph.cmake
@@ -57,20 +57,25 @@
 ExternalProject_Add(
     ${NGRAPH_PROJECT}
     ${EXTERNAL_PROJECT_LOG_ARGS}
-    DEPENDS             ${MKLDNN_PROJECT} ${MKLML_PROJECT}
-    GIT_REPOSITORY      ${NGRAPH_GIT_REPO}
-    GIT_TAG             ${NGRAPH_GIT_TAG}
-    PREFIX              ${NGRAPH_SOURCES_DIR}
-    UPDATE_COMMAND      ""
-    CMAKE_ARGS          -DCMAKE_INSTALL_PREFIX=${NGRAPH_INSTALL_DIR}
-    CMAKE_ARGS          -DNGRAPH_UNIT_TEST_ENABLE=FALSE
-    CMAKE_ARGS          -DNGRAPH_TOOLS_ENABLE=FALSE
-    CMAKE_ARGS          -DNGRAPH_INTERPRETER_ENABLE=FALSE
-    CMAKE_ARGS          -DNGRAPH_DEX_ONLY=TRUE
-    CMAKE_ARGS          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-    CMAKE_ARGS          -DMKLDNN_INCLUDE_DIR=${MKLDNN_INC_DIR}
-    CMAKE_ARGS          -DMKLDNN_LIB_DIR=${MKLDNN_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}
-    CMAKE_ARGS          -DMKLML_LIB_DIR=${MKLML_INSTALL_DIR}/lib
+    DEPENDS                  ${MKLDNN_PROJECT} ${MKLML_PROJECT}
+    GIT_REPOSITORY           ${NGRAPH_GIT_REPO}
+    GIT_TAG                  ${NGRAPH_GIT_TAG}
+    PREFIX                   ${NGRAPH_SOURCES_DIR}
+    UPDATE_COMMAND           ""
+    CMAKE_GENERATOR          ${CMAKE_GENERATOR}
+    CMAKE_GENERATOR_PLATFORM ${CMAKE_GENERATOR_PLATFORM}
+    CMAKE_GENERATOR_TOOLSET  ${CMAKE_GENERATOR_TOOLSET}
+    CMAKE_ARGS               -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+    CMAKE_ARGS               -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+    CMAKE_ARGS               -DCMAKE_INSTALL_PREFIX=${NGRAPH_INSTALL_DIR}
+    CMAKE_ARGS               -DNGRAPH_UNIT_TEST_ENABLE=FALSE
+    CMAKE_ARGS               -DNGRAPH_TOOLS_ENABLE=FALSE
+    CMAKE_ARGS               -DNGRAPH_INTERPRETER_ENABLE=FALSE
+    CMAKE_ARGS               -DNGRAPH_DEX_ONLY=TRUE
+    CMAKE_ARGS               -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    CMAKE_ARGS               -DMKLDNN_INCLUDE_DIR=${MKLDNN_INC_DIR}
+    CMAKE_ARGS               -DMKLDNN_LIB_DIR=${MKLDNN_INSTALL_DIR}/${CMAKE_INSTALL_LIBDIR}
+    CMAKE_ARGS               -DMKLML_LIB_DIR=${MKLML_INSTALL_DIR}/lib
 )

 add_dependencies(ngraph ${NGRAPH_PROJECT})


Revert "Revert "Move clang feature flags settings out of LLVM core and into cfe""

It turns out this commit was fine. The problem was in the legacy build system (fixed r213010).

This reverts commit r213005.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -632,22 +632,6 @@
   set(HOST_OS ${CMAKE_SYSTEM_NAME})
   set(HOST_ARCH ${CMAKE_SYSTEM_PROCESSOR})

-  if (CLANG_ENABLE_ARCMT)
-    set(ENABLE_CLANG_ARCMT "1")
-  else()
-    set(ENABLE_CLANG_ARCMT "0")
-  endif()
-  if (CLANG_ENABLE_REWRITER)
-    set(ENABLE_CLANG_REWRITER "1")
-  else()
-    set(ENABLE_CLANG_REWRITER "0")
-  endif()
-  if (CLANG_ENABLE_STATIC_ANALYZER)
-    set(ENABLE_CLANG_STATIC_ANALYZER "1")
-  else()
-    set(ENABLE_CLANG_STATIC_ANALYZER "0")
-  endif()
-
   configure_file(${input} ${output} @ONLY)
 endfunction()


increase the size of the image, we need more space now. (#3370)

--- cmake/packages/bundle.cmake
+++ cmake/packages/bundle.cmake
@@ -35,8 +35,8 @@

 # we wrap HDIUTIL to inject our own parameter:
 find_program(HDIUTIL_EXECUTABLE hdiutil)
-# for now 260MB seems to be enough:
-set(CMAKE_DMG_SIZE 260)
+# for now 280MB seems to be enough:
+set(CMAKE_DMG_SIZE 280)
 configure_file("${PROJECT_SOURCE_DIR}/Installation/MacOSX/Bundle/hdiutilwrapper.sh.in"
   "${CMAKE_CURRENT_BINARY_DIR}/hdiutilwrapper.sh"
   @ONLY)


Android: CMake minimum version is 3.7.1

Android: CMake minimum version is 3.7.1

--- os/android.cmake
+++ os/android.cmake
@@ -31,8 +31,8 @@

 set(CMAKE_SYSTEM_NAME "Android")

-if(CMAKE_VERSION VERSION_LESS 3.7)
-  polly_fatal_error("Minimum CMake version for Android is 3.7")
+if(CMAKE_VERSION VERSION_LESS 3.7.1)
+  polly_fatal_error("Minimum CMake version for Android is 3.7.1")
 endif()

 macro(find_host_program)


Removed default ON for plugins

Removed default ON for plugins

--- cmake/CMakeModules/OssimCommonVariables.cmake
+++ cmake/CMakeModules/OssimCommonVariables.cmake
@@ -272,10 +272,6 @@
    OPTION(BUILD_OSSIM_VIDEO "Set to ON to build the video decoding library.  Use OFF to skip this module." OFF)
    OPTION(BUILD_OSSIM_PLANET "Set to ON to build the 3-D visualization module.  Use OFF to skip this module." OFF)
    OPTION(BUILD_OSSIM_GUI "Set to ON to build the new ossimGui library and geocell application." ON)
-   OPTION(BUILD_MRSID_PLUGIN "Set to ON to build the MrSID plugin library." ON)
-   OPTION(BUILD_KAKADU_PLUGIN "Set to ON to build the Kakadu plugin library." ON)
-   OPTION(BUILD_PDAL_PLUGIN "Set to ON to build the PDAL plugin library." ON)
-   OPTION(BUILD_GDAL_PLUGIN "Set to ON to build the GDAL plugin library." ON)
    OPTION(BUILD_OMS "Set to ON to build the oms api library." ON)
    OPTION(BUILD_OSSIM_WMS "Set to ON to build the wms api library." ON)


Store in cache the directory of ParMETIS pulled from GitHub during installation

--- cmake/external_projects/ElMath/ParMETIS.cmake
+++ cmake/external_projects/ElMath/ParMETIS.cmake
@@ -93,6 +93,7 @@

   # Extract the source and install directories
   ExternalProject_Get_Property(project_parmetis source_dir install_dir)
+  set(PARMETIS_DIR ${install_dir} CACHE STRING "Directory where ParMETIS is be installed")
   set(PARMETIS_INCLUDE_DIR "${install_dir}/include")

   # Add targets for libmetis and libparmetis (either shared or static)


fixed: don't search default directories if user specifies custom locations

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

--- CMake/FindOpenEXR.cmake
+++ CMake/FindOpenEXR.cmake
@@ -1,5 +1,5 @@
-# - Find collada dom libraries
-# Find the collada dom libraries and headers
+# - Find OpenEXR image format libraries
+# Find the OpenEXR high dynamic range (HDR) image format libraries and headers
 #
 # This module specifies the following variables:
 #  OPENEXR_INCLUDE_DIR
@@ -11,9 +11,13 @@
 #  OPENEXR_LIBRARY_RELEASE      release library
 #
 #  You can control where this module attempts to locate libraries and headers:
-#  OPENEXR_ROOT_DIR
-#  OPENEXR_INCLUDE_DIR
-#  OPENEXR_LIBRARY_DIR
+#
+#  OPENEXR_ROOT_DIR          look for headers in ${OPENEXR_ROOT_DIR}/include/OpenEXR
+#                            look for libs in    ${OPENEXR_ROOT_DIR}/lib
+#  OPENEXR_INCLUDE_DIR       look for headers in ${OPENEXR_INCLUDE_DIR}/OpenEXR
+#  OPENEXR_LIBRARY_DIR       look for libs in    ${OPENEXR_LIBRARY_DIR}
+#
+#  Note: Setting these variables will skip searching the system default paths.

 # default include search paths
@@ -21,17 +25,13 @@
     ~/Library/Frameworks
     /Library/Frameworks
     /usr/local/include
-    /usr/local/include/colladadom
     /usr/include
-    /usr/include/colladadom
     /sw/include
     /opt/local/include
-    /opt/local/include/colladadom
-    /opt/include
-    /opt/include/colladadom)
+    /opt/include)

 # default library search paths
-SET(__NVIDIAPARFSDK_LIBRARY_SEARCH_DIRS
+SET(__OPENEXR_LIBRARY_SEARCH_DIRS
     ~/Library/Frameworks
     /Library/Frameworks
     /usr/local/lib64
@@ -48,7 +48,7 @@
 IF(OPENEXR_ROOT_DIR)
     FILE(TO_CMAKE_PATH ${OPENEXR_ROOT_DIR} OPENEXR_ROOT_DIR)

-    SET(__OPENEXR_INCLUDE_SEARCH_DIRS "${OPENEXR_ROOT_DIR}/OpenEXR"
+    SET(__OPENEXR_INCLUDE_SEARCH_DIRS "${OPENEXR_ROOT_DIR}/include"
                                       "${__OPENEXR_INCLUDE_SEARCH_DIRS}")

     SET(__OPENEXR_LIBDIR_SUFFIX_IN "${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR}")
@@ -56,7 +56,12 @@
     STRING(TOLOWER ${__OPENEXR_LIBDIR_SUFFIX_IN} __OPENEXR_LIBDIR_SUFFIX)

     SET(__OPENEXR_LIBRARY_SEARCH_DIRS "${OPENEXR_ROOT_DIR}/lib/${__OPENEXR_LIBDIR_SUFFIX}"
-                                            "${__OPENEXR_LIBRARY_SEARCH_DIRS}")
+                                      "${OPENEXR_ROOT_DIR}/lib"
+                                      "${__OPENEXR_LIBRARY_SEARCH_DIRS}")
+
+    # skip default paths since the user specified explicit ones
+    SET(__OPENEXR_NO_DEFAULT_INC_PATH NO_DEFAULT_PATH)
+    SET(__OPENEXR_NO_DEFAULT_LIB_PATH NO_DEFAULT_PATH)
 ENDIF(OPENEXR_ROOT_DIR)

@@ -65,6 +70,7 @@
     FILE(TO_CMAKE_PATH ${OPENEXR_INCLUDE_DIR} OPENEXR_INCLUDE_DIR)
     SET(__OPENEXR_INCLUDE_SEARCH_DIRS "${OPENEXR_INCLUDE_DIR}"
                                       "${__OPENEXR_INCLUDE_SEARCH_DIRS}")
+    SET(__OPENEXR_NO_DEFAULT_INC_PATH NO_DEFAULT_PATH)
 ENDIF(OPENEXR_INCLUDE_DIR)

 # handle OPENEXR_LIBRARY_DIR input variable
@@ -72,46 +78,47 @@
     FILE(TO_CMAKE_PATH ${OPENEXR_LIBRARY_DIR} OPENEXR_LIBRARY_DIR)
     SET(__OPENEXR_LIBRARY_SEARCH_DIRS "${OPENEXR_LIBRARY_DIR}"
                                       "${__OPENEXR_LIBRARY_SEARCH_DIRS}")
+    SET(__OPENEXR_NO_DEFAULT_LIB_PATH NO_DEFAULT_PATH)
 ENDIF(OPENEXR_LIBRARY_DIR)

 # locate headers
 FIND_PATH(OPENEXR_INCLUDE_DIR OpenEXR/ImfIO.h
-    PATHS ${__OPENEXR_INCLUDE_SEARCH_DIRS})
+    PATHS ${__OPENEXR_INCLUDE_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_INC_PATH})

 # locate libraries
 FIND_LIBRARY(OPENEXR_LIBRARY_IMF_RELEASE
     NAMES IlmImf
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_HALF_RELEASE
     NAMES Half ilmhalf
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_IEX_RELEASE
     NAMES Iex ilmiex
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_ILMTHREAD_RELEASE
     NAMES IlmThread
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_IMF_DEBUG
     NAMES IlmImf-d IlmImfd
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_HALF_DEBUG
     NAMES Half-d Halfd ilmhalf-d ilmhalfd
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_IEX_DEBUG
     NAMES Iex-d Iexd ilmiex-d ilmiexd
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})

 FIND_LIBRARY(OPENEXR_LIBRARY_ILMTHREAD_DEBUG
     NAMES IlmThread-d IlmThreadd
-    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS})
+    PATHS ${__OPENEXR_LIBRARY_SEARCH_DIRS} ${__OPENEXR_NO_DEFAULT_LIB_PATH})


disable runtime checks in debug mode by default.

Each target should specifically turn this on if required.

--- build_options.cmake
+++ build_options.cmake
@@ -54,7 +54,7 @@
     endforeach()
 endfunction()

-TNUN_add_compile_options( Debug ${TNUN_compiler_debug_flags} ${TNUN_compiler_debug_symbols} ${TNUN_compiler_runtime_sanity_checks} )
+TNUN_add_compile_options( Debug ${TNUN_compiler_debug_flags} ${TNUN_compiler_debug_symbols} )
 TNUN_add_compile_options( Release ${TNUN_compiler_release_flags} )

 option( TNUN_DEBUG_SYMBOLS_IN_RELEASE "Generate debug symbols for easier debugging of release builds" false )


commit

commit

now the correct libraries get copied. Now works under windows and linux

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -572,6 +572,7 @@
     endif()

     set(VTKM_VER 1.4)
+    set(LIB_VER 1)

     if(WIN32)
       set(VTKM_CONT_IMPORT_LIB "lib/vtkm_cont-${VTKM_VER}.lib")
@@ -581,9 +582,9 @@
       set(VTKM_RENDERER_LIB "bin/vtkm_rendering-${VTKM_VER}.dll")
       set(VTKM_WORKLET_LIB "bin/vtkm_worklet-${VTKM_VER}.dll")
     else()
-      set(VTKM_CONT_LIB "lib/libvtkm_cont-${VTKM_VER}.so")
-      set(VTKM_RENDERER_LIB "lib/libvtkm_rendering-${VTKM_VER}.so")
-      set(VTKM_WORKLET_LIB "lib/libvtkm_worklet-${VTKM_VER}.so")
+      set(VTKM_CONT_LIB "lib/libvtkm_cont-${VTKM_VER}.so.${LIB_VER}")
+      set(VTKM_RENDERER_LIB "lib/libvtkm_rendering-${VTKM_VER}.so.${LIB_VER}")
+      set(VTKM_WORKLET_LIB "lib/libvtkm_worklet-${VTKM_VER}.so.${LIB_VER}")

     endif()

@@ -596,7 +597,7 @@
 	      "<INSTALL_DIR>/${VTKM_CONT_IMPORT_LIB}"
 	      "<INSTALL_DIR>/${VTKM_RENDERER_IMPORT_LIB}"
 	      "<INSTALL_DIR>/${VTKM_WORKLET_IMPORT_LIB}"
-        "<INSTALL_DIR>/${VTKM_CONT_LIB}"
+              "<INSTALL_DIR>/${VTKM_CONT_LIB}"
 	      "<INSTALL_DIR>/${VTKM_RENDERER_LIB}"
 	      "<INSTALL_DIR>/${VTKM_WORKLET_LIB}"
       CMAKE_ARGS


turn off extra packages for nopumi nightly tests

--- cdash/nightly.cmake
+++ cdash/nightly.cmake
@@ -155,8 +155,8 @@
   "-DCMAKE_EXE_LINKER_FLAGS=-ldl ${flags} -pthread"
   "-DCMAKE_Fortran_COMPILER=mpifort"
   "-DENGPAR_FORTRAN_INTERFACE=ON"
-  "-DENABLE_PARMETIS=ON"
-  "-DENABLE_ZOLTAN=ON"
+  "-DENABLE_PARMETIS=OFF"
+  "-DENABLE_ZOLTAN=OFF"
   "-DENABLE_PUMI=OFF"
   "-DSCOREC_PREFIX=/usr/local/pumi/core/"
   "-DIS_TESTING=ON"


Adding some of the new size-optimized flags to the config. (#7782)

Adding `-DIREE_SIZE_OPTIMIZED=1` should now turn off most extra features.

--- build_tools/cmake/iree_copts.cmake
+++ build_tools/cmake/iree_copts.cmake
@@ -331,25 +331,15 @@
 # Size-optimized build flags
 #-------------------------------------------------------------------------------

-  # TODO(#898): add a dedicated size-constrained configuration.
+# TODO(#898): add a dedicated size-constrained configuration.
 if(${IREE_SIZE_OPTIMIZED})
   iree_select_compiler_opts(IREE_SIZE_OPTIMIZED_DEFAULT_COPTS
-    CLANG_OR_GCC
-      "-DIREE_STATUS_MODE=0"
-      "-DIREE_HAL_MODULE_STRING_UTIL_ENABLE=0"
-      "-DIREE_VM_EXT_I64_ENABLE=0"
-      "-DIREE_VM_EXT_F32_ENABLE=0"
     MSVC_OR_CLANG_CL
       "/GS-"
       "/GL"
       "/Gw"
       "/Gy"
       "/DNDEBUG"
-      "/DIREE_STATUS_MODE=0"
-      "/DIREE_FLAGS_ENABLE_CLI=0"
-      "/DIREE_HAL_MODULE_STRING_UTIL_ENABLE=0"
-      "/DIREE_VM_EXT_I64_ENABLE=0"
-      "/DIREE_VM_EXT_F32_ENABLE=0"
       "/Os"
       "/Oy"
       "/Zi"
@@ -362,12 +352,23 @@
       "-opt:ref,icf"
   )
   # TODO(#898): make this only impact the runtime (IREE_RUNTIME_DEFAULT_...).
+  # These flags come from iree/base/config.h:
   set(IREE_DEFAULT_COPTS
       "${IREE_DEFAULT_COPTS}"
-      "${IREE_SIZE_OPTIMIZED_DEFAULT_COPTS}")
+      "${IREE_SIZE_OPTIMIZED_DEFAULT_COPTS}"
+      "-DIREE_STATUS_MODE=0"
+      "-DIREE_STATISTICS_ENABLE=0"
+      "-DIREE_HAL_MODULE_STRING_UTIL_ENABLE=0"
+      "-DIREE_HAL_COMMAND_BUFFER_VALIDATION_ENABLE=0"
+      "-DIREE_VM_BACKTRACE_ENABLE=0"
+      "-DIREE_VM_EXT_I64_ENABLE=0"
+      "-DIREE_VM_EXT_F32_ENABLE=0"
+      "-DIREE_VM_EXT_F64_ENABLE=0"
+  )
   set(IREE_DEFAULT_LINKOPTS
       "${IREE_DEFAULT_LINKOPTS}"
-      "${IREE_SIZE_OPTIMIZED_DEFAULT_LINKOPTS}")
+      "${IREE_SIZE_OPTIMIZED_DEFAULT_LINKOPTS}"
+  )
 endif()

 #-------------------------------------------------------------------------------


Fix linux build

Fix linux build

--- modules/nanomsg.cmake
+++ modules/nanomsg.cmake
@@ -2,13 +2,10 @@

   # Save old compiler flags
   set(CMAKE_C_FLAGS_OLD ${CMAKE_C_FLAGS})
-  message(${CMAKE_C_FLAGS})
-  message(${CMAKE_C_FLAGS_OLD})

   # Setup new compiler flags
   if(NOT MSVC)
     set(CMAKE_C_FLAGS "")
-    message(${CMAKE_C_FLAGS})
   else()
     # Disable some compile warnings
     # C4100: 'identifier' : unreferenced formal parameter
@@ -43,6 +40,5 @@

   # Restore old compiler flags
   set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS_OLD})
-  message(${CMAKE_C_FLAGS})

 endif()


COMP: Eliminate superbuild variables not used in extern projs.

--- CMake/Superbuild/External_ImageViewer.cmake
+++ CMake/Superbuild/External_ImageViewer.cmake
@@ -67,9 +67,7 @@
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
       -DCMAKE_BUILD_TYPE:STRING=${build_type}
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
-      -DUSE_SYSTEM_ITK:BOOL=TRUE
       -DITK_DIR:PATH=${ITK_DIR}
-      -DUSE_SYSTEM_SlicerExecutionModel:BOOL=TRUE
       -DSlicerExecutionModel_DIR:PATH=${SlicerExecutionModel_DIR}
       -DImageViewer_USE_SUPERBUILD:BOOL=FALSE
       -DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}


Prefer the installed DirectX SDK path to avoid link error with VS2010 (64bit).

--- Source/CMake/Modules/FindDirect3D.cmake
+++ Source/CMake/Modules/FindDirect3D.cmake
@@ -37,28 +37,28 @@
 endif ()

 set (DIRECTX_INC_SEARCH_PATH
+    "C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
+    "C:/Program Files/Microsoft DirectX SDK*/Include"
     "$ENV{DIRECTX_ROOT}/Include"
-    "$ENV{DXSDK_DIR}/Include"
-    "C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
-    "C:/Program Files/Microsoft DirectX SDK*/Include")
-find_path (DIRECT3D_INCLUDE_DIRS d3dx9.h ${DIRECTX_INC_SEARCH_PATH})
+    "$ENV{DXSDK_DIR}/Include")
+find_path (DIRECT3D_INCLUDE_DIRS d3dcompiler.h ${DIRECTX_INC_SEARCH_PATH})

 if (CMAKE_CL_64)
     set (DIRECTX_LIB_SEARCH_PATH
+        "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x64"
+        "C:/Program Files/Microsoft DirectX SDK*/Lib/x64"
         "$ENV{DIRECTX_ROOT}/Lib/x64"
-        "$ENV{DXSDK_DIR}/Lib/x64"
-        "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x64"
-        "C:/Program Files/Microsoft DirectX SDK*/Lib/x64")
+        "$ENV{DXSDK_DIR}/Lib/x64")
 else ()
     set (DIRECTX_LIB_SEARCH_PATH
+        "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib"
+        "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x86"
+        "C:/Program Files/Microsoft DirectX SDK*/Lib"
+        "C:/Program Files/Microsoft DirectX SDK*/Lib/x86"
         "$ENV{DIRECTX_ROOT}/Lib"
         "$ENV{DIRECTX_ROOT}/Lib/x86"
         "$ENV{DXSDK_DIR}/Lib"
-        "$ENV{DXSDK_DIR}/Lib/x86"
-        "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib"
-        "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/x86"
-        "C:/Program Files/Microsoft DirectX SDK*/Lib"
-        "C:/Program Files/Microsoft DirectX SDK*/Lib/x86")
+        "$ENV{DXSDK_DIR}/Lib/x86")
 endif ()
 find_library (DIRECT3D_LIBRARIES d3d9 ${DIRECTX_LIB_SEARCH_PATH})
 find_library (DIRECT3D_COMPILER_LIBRARIES d3dcompiler ${DIRECTX_LIB_SEARCH_PATH})


Static linking for cluster compatibility

Former-commit-id: b71e8766bc1c72685e2eb5dc9e59f135a91d846b

--- cmake-modules/Fetch_OpenBLAS.cmake
+++ cmake-modules/Fetch_OpenBLAS.cmake
@@ -44,7 +44,7 @@
             TEST_COMMAND ""
             CONFIGURE_COMMAND ""
             BUILD_IN_SOURCE 1
-            BUILD_COMMAND $(MAKE) USE_THREAD=${OpenBLAS_MULTITHREADED} USE_OPENMP=${OpenBLAS_USE_OPENMP} OPENBLAS_NUM_THREADS=1 NUM_THREADS=1 BINARY64=1 QUIET_MAKE=0 TARGET=SANDYBRIDGE
+            BUILD_COMMAND $(MAKE) USE_THREAD=${OpenBLAS_MULTITHREADED} USE_OPENMP=${OpenBLAS_USE_OPENMP} OPENBLAS_NUM_THREADS=1 NUM_THREADS=1 BINARY64=1 QUIET_MAKE=1 TARGET=SANDYBRIDGE
             INSTALL_COMMAND $(MAKE) PREFIX=<INSTALL_DIR> install
             )
     #NO_LAPACKE=${OpenBLAS_USE_OTHER} NO_CBLAS=${OpenBLAS_USE_OTHER} BINARY64=1 QUIET_MAKE=0


Installed MacosX Bundle now embed fully working plugins

--- cmake/radium_setup_functions.cmake
+++ cmake/radium_setup_functions.cmake
@@ -14,6 +14,8 @@
 endif()

 include(CMakeParseArguments)
+include(CMakePackageConfigHelpers)
+
 # Introduction of two customs properties in the buildchain
 # these properties allow identify dependency resources when configuring/installing a target.
 define_property(TARGET
@@ -151,16 +153,12 @@
         get_target_property(rscPrefix ${lib} RADIUM_TARGET_RESOURCES_PREFIX)
         if (NOT ${rscPrefix} STREQUAL "rscPrefix-NOTFOUND")
             get_target_property(rscLocation ${lib} RADIUM_TARGET_INSTALLED_RESOURCES)
- #           message(STATUS " [configure_radium_app] Found lib ${lib} resources location to be : ${rscLocation} !" )
             list(APPEND depsRsc ${rscLocation})
- #       else()
- #           message(STATUS " [configure_radium_app] No resources for lib  ${lib} !" )
         endif ()
     endforeach()
     if (ARGS_USE_PLUGINS)
+        install(CODE "
         message(STATUS \"Installing ${ARGS_NAME} with plugins\")
-        # TODO : fix rpath for plugins that use helper libs (can't load helper.dylib)
-        install(CODE "
         include(BundleUtilities)
         set(BU_CHMOD_BUNDLE_ITEMS TRUE)
         file(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/bin/${ARGS_NAME}.app/Contents/Resources)
@@ -182,8 +180,19 @@
             list( APPEND InstalledPlugins ${CMAKE_INSTALL_PREFIX}/bin/${ARGS_NAME}.app/Contents/Plugins/lib/\${plugin} )
         endforeach ()
         fixup_bundle(${CMAKE_INSTALL_PREFIX}/bin/${ARGS_NAME}.app \"\${InstalledPlugins}\" \"${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_PREFIX}/bin/${ARGS_NAME}.app/Contents/Plugins/lib/\")
-        "
-            )
+        # TODO : fix rpath for plugins that use helper libs (can't load helper.dylib)
+        # install_name_tool -add_rpath @loader_path/. thelib
+        foreach(helper \${InstalledPlugins} )
+            # get the name (.dylib) of the helper
+            get_filename_component(FileHelper \${helper} NAME )
+            # change the LC_LOAD_DYLIB path of the helper in any plugin that uses it
+            foreach(plugin \${InstalledPlugins} )
+                if (NOT \${plugin} STREQUAL \${helper})
+                    execute_process(COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change @executable_path/../Frameworks/\${FileHelper} @loader_path/\${FileHelper} \${plugin})
+                endif()
+            endforeach()
+        endforeach()
+        ")
     else ()
         install(CODE "
             message(STATUS \"Installing ${ARGS_NAME} without plugins\")
@@ -275,7 +284,6 @@
     endforeach ()
 endfunction()

-
 # ------------------------------------------------------------------------------
 # Library configuration functions
 # ------------------------------------------------------------------------------
@@ -288,8 +296,7 @@
 # )
 #
 # The resources will be fetched from the target installation directory <prefix>/Resources
-# TODO modify the installation directory access to allow customisable install
-
+# TODO modify the resources installation directory access to allow customisable install
 function(radium_exported_resources)
     # parse and verify args
     cmake_parse_arguments(
@@ -587,8 +594,7 @@
     endif ()
 endfunction()

-
-include(CMakePackageConfigHelpers)
+# ---------------------------------------------------------------------------------------------

 # mandatory parameters :
 #   NAME : The name of the package to install


refs #6566 fix third party default dir for jemalloc, and error text, and remove TOKU_SVNROOT

--- cmake_modules/TokuThirdParty.cmake
+++ cmake_modules/TokuThirdParty.cmake
@@ -1,12 +1,9 @@
-# TODO(leif): will need to be smarter about this when we do trunk/tags/branches
-set(TOKU_SVNROOT "${TokuDB_SOURCE_DIR}/../.." CACHE FILEPATH "The top of the tokudb source tree, usod to find xz sources, jemalloc sources, test data files, etc.")
-
 include(ExternalProject)

 ## add jemalloc with an external project
-set(JEMALLOC_SOURCE_DIR "${TOKU_SVNROOT}/jemalloc-3.3.0" CACHE FILEPATH "Where to find jemalloc sources.")
+set(JEMALLOC_SOURCE_DIR "${TokuDB_SOURCE_DIR}/third_party/jemalloc" CACHE FILEPATH "Where to find jemalloc sources.")
 if (NOT EXISTS "${JEMALLOC_SOURCE_DIR}/configure")
-  message(FATAL_ERROR "Can't find jemalloc sources.  Please check them out to ${JEMALLOC_SOURCE_DIR} or modify TOKU_SVNROOT (${TOKU_SVNROOT}) or JEMALLOC_SOURCE_DIR.")
+  message(FATAL_ERROR "Can't find jemalloc sources.  Please check them out to ${JEMALLOC_SOURCE_DIR} or modify JEMALLOC_SOURCE_DIR.")
 endif ()
 set(jemalloc_configure_opts "CC=${CMAKE_C_COMPILER}" "--with-jemalloc-prefix=" "--with-private-namespace=tokudb_jemalloc_internal_" "--enable-cc-silence")
 if (NOT CMAKE_BUILD_TYPE MATCHES Release)


Update Cache version

Update Cache version

--- scripts/create-toolchain-info.cmake
+++ scripts/create-toolchain-info.cmake
@@ -34,7 +34,7 @@
 file(
     WRITE
     "${TOOLCHAIN_INFO_FILE}"
-    "Cache version: 4\n"
+    "Cache version: 5\n"
     "Polly toolchains:\n"
     "    IPHONEOS_ARCHS: ${IPHONEOS_ARCHS}\n"
     "    IPHONESIMULATOR_ARCHS: ${IPHONESIMULATOR_ARCHS}\n"


[C++] allow to explicitly avoid propagating CMake flags when using AddExternalProject

when adding an external dependency via AddExternalProject,
some compiler related CMake flags (CMAKE_C_COMPILER, CMAKE_CXX_COMPILER and
CMAKE_CXX_FLAGS), which have been set for the joynr CMake project,
are by default applied to that dependency as well.

if this behavior is not wanted (e.g. to avoid compiling the external dependency
with incompatible CXX_FLAGS), the newly added parameter "NO_PROPAGATE_CMAKE_ARGS"
can be given to AddExternalProject.

Change-Id: I0c41848ffb08ea932d69c23bc420e78e43815db0

--- cpp/CMake/AddExternalProject.cmake
+++ cpp/CMake/AddExternalProject.cmake
@@ -22,10 +22,20 @@
             LOG_DOWNLOAD ON
             LOG_CONFIGURE ON
             LOG_BUILD ON
-            CMAKE_CACHE_ARGS "-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}"
-                             "-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}"
-                             "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
         )
+
+        list(FIND INPUT_ARGS "NO_PROPAGATE_CMAKE_ARGS" NO_PROPAGATE_CMAKE_ARGS_INDEX)
+        if (NO_PROPAGATE_CMAKE_ARGS_INDEX EQUAL -1)
+            list(
+                APPEND
+                DEFAULT_EP_ARGS
+                CMAKE_CACHE_ARGS "-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}"
+                                 "-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}"
+                                 "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
+            )
+        else()
+            list(REMOVE_AT INPUT_ARGS ${NO_PROPAGATE_CMAKE_ARGS_INDEX})
+        endif()

         # if CMAKE_VERSION > 3.2 ninja generator can be used by NOT removing BUILD_BYPRODUCTS
         # otherwise, BUILD_BYPRODUCTS and the following value from the argument list is removed


Add more flags for sanitziers

Add more flags for sanitziers

--- sequoia-engine/cmake/SequoiaEngineSetCXXFlags.cmake
+++ sequoia-engine/cmake/SequoiaEngineSetCXXFlags.cmake
@@ -13,8 +13,10 @@
 ##
 ##===------------------------------------------------------------------------------------------===##

+include(CheckCXXSourceRuns)
 include(SequoiaCheckAndSetCXXFlag)
-include(CheckCXXSourceRuns)
+include(SequoiaEnableClangMSan)
+include(SequoiaEnableClangASan)

 # sequoia_engine_set_msvc_arch_flag
 # ---------------------------------
@@ -165,6 +167,18 @@
       sequoia_check_and_set_cxx_flag("-Werror" HAVE_GCC_WERROR)
     endif()

+    # Clang sanitizers
+    if(SEQUOIA_ENGINE_MSAN)
+      sequoia_enable_clang_msan(
+        BLACKLIST_SRC
+          "/usr/lib/*"
+      )
+    endif()
+
+    if(SEQUOIA_ENGINE_ASAN)
+      sequoia_enable_clang_asan()
+    endif()
+
     sequoia_check_and_set_cxx_flag("-Wall" HAVE_GCC_WALL)
     sequoia_check_and_set_cxx_flag("-W" HAVE_GCC_W)
     sequoia_check_and_set_cxx_flag("-Wformat" HAVE_GCC_WFORMAT)
@@ -183,6 +197,8 @@
     sequoia_check_and_set_cxx_flag("-Wno-sign-promo" HAVE_GCC_WNO_SIGN_PROMO)
     sequoia_check_and_set_cxx_flag("-Wno-sign-compare" HAVE_GCC_WNO_SIGN_COMPARE)
     sequoia_check_and_set_cxx_flag("-Wno-unused-parameter" HAVE_GCC_WNO_UNUSDED_PARAMETER)
+    sequoia_check_and_set_cxx_flag("-Wno-undefined-var-template"
+                                   HAVE_CLANG_WNO_UNDEFINED_VAR_TEMPLATE)

     if(BUILD_SHARED_LIBS)
       sequoia_check_and_set_cxx_flag("-fPIC" HAVE_GCC_PIC)
@@ -192,8 +208,6 @@
       if(SEQUOIA_COMPILER_CLANG)
         sequoia_check_and_set_cxx_flag("-Qunused-arguments" HAVE_CLANG_UNUSED_ARGUMENTS)
         sequoia_check_and_set_cxx_flag("-fcolor-diagnostics" HAVE_CLANG_COLOR_DIAGNOSTICS)
-        sequoia_check_and_set_cxx_flag("-Wno-undefined-var-template"
-                                       HAVE_CLANG_WNO_UNDEFINED_VAR_TEMPLATE)
       endif()

       if(SEQUOIA_COMPILER_GNU)


Build the dependencies automatically

Build the dependencies automatically

The dependencies are generated with deb-shlibs

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -1,3 +1,4 @@
+set(CPACK_DEB_COMPONENT_INSTALL ON)
 SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Andreas Grob <vilarion@illarion.org>")
 set(CPACK_PACKAGE_VENDOR "Illarion e.V.")
 set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
@@ -6,5 +7,6 @@
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.txt")
 set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
-set(CPACK_PACKAGE_FILE_NAME "illarion")
-set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-system1.67.0, libboost-graph1.67.0, libc6 (>= 2.14), libgcc1 (>= 1:3.0), liblua5.2-0, libpqxx-6.2 (>= 6.2), libstdc++6 (>= 6)")
+set(CPACK_DEBIAN_FILE_NAME "illarion.deb")
+set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)


Fix the homepage url and the vendor.

Fix the homepage url and the vendor.

git-svn-id: b1dee0d48e635e16c3b356ce77271b225d4db9f7@766 7dcaeef0-15fb-0310-b436-a5af3365683c

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -5,7 +5,6 @@

 ### general settings
 set(CPACK_PACKAGE_NAME ${APPLICATION_NAME})
-set(CPACK_PACKAGE_VENDOR "${APPLICATION_NAME} developers")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The SSH library")
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
 set(CPACK_PACKAGE_VENDOR "The SSH Library Development Team")
@@ -33,7 +32,7 @@

 set(CPACK_NSIS_DISPLAY_NAME "The SSH Library")
 set(CPACK_NSIS_COMPRESSOR "/SOLID zlib")
-set(CPACK_NSIS_MENU_LINKS "http://0xbadc0de.be/wiki/libssh:libssh" "libssh homepage")
+set(CPACK_NSIS_MENU_LINKS "http://www.libssh.org/" "libssh homepage")

 set(CPACK_PACKAGE_FILE_NAME ${APPLICATION_NAME}-${CPACK_PACKAGE_VERSION})


Fix NSIS installer creation.

Fix NSIS installer creation.

git-svn-id: b1dee0d48e635e16c3b356ce77271b225d4db9f7@253 7dcaeef0-15fb-0310-b436-a5af3365683c

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -7,11 +7,11 @@
 set(CPACK_PACKAGE_NAME ${APPLICATION_NAME})
 set(CPACK_PACKAGE_VENDOR "${APPLICATION_NAME} developers")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The SSH library")
-set(CPACK_PACKAGING_INSTALL_PREFIX "libssh")
-set(CPACK_PACKAGE_VENDOR "The SSH Libaray Development Team")
+set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README")
+set(CPACK_PACKAGE_VENDOR "The SSH Library Development Team")
+set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
+set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")

-set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
-set(CPACK_TOPLEVEL_DIRECTORY ${CMAKE_BINARY_DIR}/nsis)

 ### versions
 set(CPACK_PACKAGE_VERSION_MAJOR "0")
@@ -19,38 +19,33 @@
 set(CPACK_PACKAGE_VERSION_PATCH "90")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

-### source package settings
+
+### source generator
 set(CPACK_SOURCE_GENERATOR "TGZ")
 set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;tags;cscope.*")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")

-### install dirs
-# C:\Program Files\name
-set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})

-### nsis
+### nsis generator
 set(CPACK_GENERATOR "NSIS")

+set(CPACK_PACKAGE_INSTALL_DIRECTORY "libssh")
+
 set(CPACK_NSIS_DISPLAY_NAME "The SSH Library")
-#set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
 set(CPACK_NSIS_COMPRESSOR "/SOLID zlib")
+set(CPACK_NSIS_MENU_LINKS "http://0xbadc0de.be/wiki/libssh:libssh" "libssh homepage")
+
+set(CPACK_PACKAGE_FILE_NAME ${APPLICATION_NAME}-${CPACK_PACKAGE_VERSION})

 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
 set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
-
 set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION
   "Libraries used to build programs which use libssh")
 set(CPACK_COMPONENT_HEADERS_DESCRIPTION
   "C/C++ header files for use with libssh")
-
 set(CPACK_COMPONENT_HEADERS_DEPENDS libraries)
-
 #set(CPACK_COMPONENT_APPLICATIONS_GROUP "Runtime")
-#set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
-#set(CPACK_COMPONENT_HEADERS_GROUP "Development")
-
-set(CPACK_COMPONENTS_ALL "libraries;headers")
-
-set(CPACK_NSIS_MENU_LINKS "http://0xbadc0de.be/wiki/libssh:libssh" "libssh homepage")
+set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
+set(CPACK_COMPONENT_HEADERS_GROUP "Development")

 include(CPack)


Closer to ITKv4 file

Closer to ITKv4 file

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,7 @@
+SET(CTEST_PROJECT_NAME "RTK")
+SET(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")
+
 SET(CTEST_DROP_METHOD "http")
 SET(CTEST_DROP_SITE "my.cdash.org")
 SET(CTEST_DROP_LOCATION "/submit.php?project=RTK")
 SET(CTEST_DROP_SITE_CDASH TRUE)
-SET(CTEST_PROJECT_NAME "RTK")
-SET(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")
-


ignore more "wanted" warnings

ignore more "wanted" warnings

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -1,7 +1,10 @@
-set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "used uninitialized in this function")
-set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "warning is a GCC extension")
-set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "^-- ") # Ignore output from cmake
-set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION} "^\\*\\*\\* WARNING non-zero return value in ctest from: make") # Ignore output from ctest
+set(CTEST_CUSTOM_WARNING_EXCEPTION ${CTEST_CUSTOM_WARNING_EXCEPTION}
+   "used uninitialized in this function"
+   "GCC < 4.3 does not have full support for SSE2 intrinsics." # Ignore self-made warning, though what I really want is a message when the warning is absent
+   "call to 'Vc::Warnings::_operator_bracket_warning' declared with attribute warning"
+   "warning is a GCC extension"
+   "^-- "  # Ignore output from cmake
+   "^\\*\\*\\* WARNING non-zero return value in ctest from: make"  # Ignore output from ctest

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION} "^make\\[[1-9]\\]: ")
 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION} "^collect2: ld returned . exit status")


remove more debug messages

remove more debug messages

--- VigraAddDep.cmake
+++ VigraAddDep.cmake
@@ -205,7 +205,7 @@
 # will take care of exporting as global variables the variables defined by the builtin find_package(), and to make
 # the imported targets defined by the builtin find_package() global.
 macro(find_package_plus_no_import _VAD_NAME)
-  message(STATUS "Invoking the patched 'find_package()' function for dependency ${_VAD_NAME}.  perl: ${PERL_EXECUTABLE}")
+  message(STATUS "Invoking the patched 'find_package()' function for dependency ${_VAD_NAME}.")
   # As a first step we want to erase from the cache all the variables that were exported by a previous call
   # to find_package_plus(). These variables are stored in a variable called VAD_NEW_VARS_${_VAD_NAME}, which we will
   # also remove.


fix var_is_cached: uninitialized cache variables behave like regular ones, detect as _not_ cached

Change-Id: I7d1ca5bdeaf87c0ccd885099e2f27552a2f0b90e

--- VigraAddDep.cmake
+++ VigraAddDep.cmake
@@ -184,7 +184,8 @@

 function(var_is_cached _VAR _CACHED_RESVAR)
   get_property(_vad_cv_isdefined CACHE ${_VAR} PROPERTY TYPE)
-  if ("${_vad_cv_isdefined}" STREQUAL "")
+  # cmake cache vars do not need a type -> UNINITIALIZED -> but then they are also NOT STORED in the cache!
+  if ("${_vad_cv_isdefined}" STREQUAL "" OR "${_vad_cv_isdefined}" STREQUAL "UNINITIALIZED")
    set(${_CACHED_RESVAR} FALSE PARENT_SCOPE)
   else()
    set(${_CACHED_RESVAR} TRUE PARENT_SCOPE)


修订git拉取的兼容性

修订git拉取的兼容性

--- project/cmake/modules/ProjectBuildTools.cmake
+++ project/cmake/modules/ProjectBuildTools.cmake
@@ -325,17 +325,27 @@
         )

         if (NOT project_git_clone_3rd_party_GIT_BRANCH AND NOT project_git_clone_3rd_party_COMMIT)
+            unset(project_git_clone_3rd_party_GIT_CHECK_REPO)
             execute_process(
                 COMMAND ${GIT_EXECUTABLE} ls-remote --symref origin HEAD
                 WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
                 OUTPUT_VARIABLE project_git_clone_3rd_party_GIT_CHECK_REPO
             )
-            string(REGEX REPLACE ".*refs/heads/([^ \t]*)[ \t]*HEAD.*" "\\1" project_git_clone_3rd_party_GIT_BRANCH ${project_git_clone_3rd_party_GIT_CHECK_REPO})
-            if(NOT project_git_clone_3rd_party_GIT_BRANCH OR project_git_clone_3rd_party_GIT_BRANCH STREQUAL project_git_clone_3rd_party_GIT_CHECK_REPO)
-                string(REGEX REPLACE "([^ \t]*)[ \t]*HEAD.*" "\\1" project_git_clone_3rd_party_GIT_BRANCH ${project_git_clone_3rd_party_GIT_CHECK_REPO})
-                if(NOT project_git_clone_3rd_party_GIT_BRANCH OR project_git_clone_3rd_party_GIT_BRANCH STREQUAL project_git_clone_3rd_party_GIT_CHECK_REPO)
-                    set(project_git_clone_3rd_party_GIT_BRANCH master)
+            if (project_git_clone_3rd_party_GIT_CHECK_REPO AND project_git_clone_3rd_party_GIT_CHECK_REPO MATCHES "ref.*refs/heads/([^ \t]*)[ \t]*HEAD.*")
+                set(project_git_clone_3rd_party_GIT_BRANCH "${CMAKE_MATCH_1}")
+            else ()
+                execute_process(
+                    COMMAND ${GIT_EXECUTABLE} ls-remote origin HEAD
+                    WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+                    OUTPUT_VARIABLE project_git_clone_3rd_party_GIT_CHECK_REPO
+                )
+                if (project_git_clone_3rd_party_GIT_CHECK_REPO MATCHES "^([a-zA-Z0-9]*)[ \t]*HEAD.*")
+                    set(project_git_clone_3rd_party_COMMIT "${CMAKE_MATCH_1}")
                 endif ()
+            endif ()
+            if(NOT project_git_clone_3rd_party_GIT_BRANCH AND NOT project_git_clone_3rd_party_COMMIT)
+                # Fallback
+                set(project_git_clone_3rd_party_GIT_BRANCH master)
             endif ()
             unset(project_git_clone_3rd_party_GIT_CHECK_REPO)
         endif()


cmake: use pkg-config to search for tbb

cmake: use pkg-config to search for tbb

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -79,10 +79,12 @@
         set(TBB_ARCH_PLATFORM ia32)
     endif( )

+    find_package(PkgConfig)
+    pkg_check_modules(PC_TBB QUIET tbb)

     #Find TBB header files
     find_path( TBB_INCLUDE_DIRS
-        NAMES tbb/tbb.h
+        NAMES tbb/tbb.h ${PC_TBB_INCLUDEDIR} ${PC_TBB_INCLUDE_DIRS}
         HINTS ${TBB_ROOT}/include
         DOC "TBB header file path"
     )
@@ -91,13 +93,13 @@

     #Find TBB Libraries
     set (_TBB_LIBRARY_DIR ${TBB_ROOT}/lib/${TBB_ARCH_PLATFORM} )
-    find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
+    find_library(TBB_LIBRARY ${_TBB_LIB_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib ${PC_TBB_LIBDIR} ${PC_TBB_LIBRARY_DIRS}
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
+    find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib ${PC_TBB_LIBDIR} ${PC_TBB_LIBRARY_DIRS}
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
+    find_library(TBB_LIBRARY_DEBUG ${_TBB_LIB_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib ${PC_TBB_LIBDIR} ${PC_TBB_LIBRARY_DIRS}
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)
-    find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib
+    find_library(TBB_MALLOC_LIBRARY_DEBUG ${_TBB_LIB_MALLOC_DEBUG_NAME} HINTS ${_TBB_LIBRARY_DIR}/${TBB_COMPILER} ${TBB_ROOT}/lib ${PC_TBB_LIBDIR} ${PC_TBB_LIBRARY_DIRS}
                 PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH)

     message ("TBB_LIBRARY:" ${TBB_LIBRARY})


rez override fix

rez override fix

--- cmake/FindUsd.cmake
+++ cmake/FindUsd.cmake
@@ -22,7 +22,9 @@
     message(STATUS "Rez Houdini USD override")
     set(USE_HOUDINI_USD TRUE)
     set(HOUDINI_ROOT $ENV{HFS})
-else()
+endif()
+
+if(DEFINED ENV{REZ_USD_ROOT})
     message(STATUS "Rez Pixar USD override")
     set(USE_HOUDINI_USD FALSE)
     set(USD_ROOT $ENV{REZ_USD_ROOT})


emscripten: remove Java dependency, no longer required by the emscripten sdk

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -11,8 +11,6 @@
 set(FIPS_PLATFORM_NAME "emsc")
 set(FIPS_EMSCRIPTEN 1)
 set(FIPS_POSIX 1)
-
-find_package(Java COMPONENTS Runtime)

 # tweakable options
 option(FIPS_EMSCRIPTEN_USE_FS "enable FS module" OFF)
@@ -119,11 +117,7 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=0")
 endif()
 if (FIPS_EMSCRIPTEN_USE_CLOSURE)
-    if (Java_FOUND)
-        set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --closure 1")
-    else()
-        message(WARNING "skipping emscripten closure pass because no Java runtime found")
-    endif()
+    set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --closure 1")
 endif()
 if (FIPS_EMSCRIPTEN_DEMANGLE)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s DEMANGLE_SUPPORT=1")


Update FW: changes for IMX214/OV7251, other fixes

--- 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 "a452469b565b39417056d50e20d97a978cda7f29")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "70c0b8e0e8c47a63a0991cccd2088ac5ce5e825f")

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


Bump version of Vc to 1.3.2

Bump version of Vc to 1.3.2

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1303,10 +1303,10 @@
 endif()

 if(vc AND NOT Vc_FOUND AND NOT (veccore OR builtin_veccore))
-  set(Vc_VERSION "1.3.0")
+  set(Vc_VERSION "1.3.2")
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
-  set(Vc_SRC_MD5 "a248e904f0b1a330ad8f37ec50cbad30")
+  set(Vc_SRC_MD5 "f996a2dcab9f0ef3e21ba0d0feba9c3e")
   set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/VC-prefix/install")
   set(Vc_ROOTDIR "${Vc_DESTDIR}/${CMAKE_INSTALL_PREFIX}")
   set(Vc_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}")


Import of r48212 from trunk.

Import of r48212 from trunk.

From Pere: CMake: pass MD5 check for lzma download.

git-svn-id: 9d02132d8e1217b86764d694e1605987040d84e5@48224 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -71,6 +71,7 @@
     ExternalProject_Add(
 	  LZMA
 	  URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}-win32.tar.gz
+	  URL_MD5  65693dc257802b6778c28ed53ecca678
 	  PREFIX LZMA
 	  INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND "" BUILD_COMMAND ""
@@ -83,6 +84,7 @@
     ExternalProject_Add(
       LZMA
       URL ${CMAKE_SOURCE_DIR}/core/lzma/src/xz-${lzma_version}.tar.gz
+      URL_MD5 858405e79590e9b05634c399497f4ba7
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --with-pic --disable-shared
       BUILD_IN_SOURCE 1)


[cmake] Update tbb to 2019U9:

[cmake] Update tbb to 2019U9:

Should fix https://github.com/intel/tbb/issues/134

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1136,8 +1136,8 @@
 endif()

 if(builtin_tbb)
-  set(tbb_builtin_version 2019_U8)
-  set(tbb_sha256 7b1fd8caea14be72ae4175896510bf99c809cd7031306a1917565e6de7382fba)
+  set(tbb_builtin_version 2019_U9)
+  set(tbb_sha256 15652f5328cf00c576f065e5cd3eaf3317422fe82afb67a9bcec0dc065bd2abe)
   if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
     set(_tbb_compiler compiler=clang)
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)


Changed the builtin_tbb version to 44_20160128

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1085,7 +1085,7 @@
     endif()
   endif()
   if(builtin_tbb)
-    set(tbb_version 42_20140122)
+    set(tbb_version 44_20160128)
     ExternalProject_Add(
       TBB
       URL ${repository_tarfiles}/tbb${tbb_version}oss_src.tgz