update FindSuiteSparse.cmake according to new approach to build suitesparse project (but keeping backward compatibility)

--- example-projects/FindSuiteSparse.cmake
+++ example-projects/FindSuiteSparse.cmake
@@ -157,25 +157,54 @@
 		endif()

 		## try to find filepath lib name (looking for very important lib file)
-		find_library(SuiteSparse_${suitesparseCompUC}_LIBRARY
-			NAMES 			${suitesparseComp} ${suitesparseCompLC} ${suitesparseCompUC}
+		find_library(SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE
+			NAMES 			lib${suitesparseComp} 	lib${suitesparseCompLC} lib${suitesparseCompUC}
+							${suitesparseComp} 		${suitesparseCompLC} 	${suitesparseCompUC}
 			PATHS 			/opt/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
 							/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
 							/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
 							${SuiteSparse_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
 							${${suitesparseCompUC}_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
 							${${suitesparseCompUC}_DIR}
-			PATH_SUFFIXES	Release Debug
+			PATH_SUFFIXES	Release
 		)
-		## check if found
-		if(NOT SuiteSparse_${suitesparseCompUC}_LIBRARY)
-			message(WARNING "   Failed to find ${suitesparseComp} :\nSuiteSparse_${suitesparseCompUC}_LIBRARY not found.\nCheck you write correctly the component name (case sensitive),\nor set the SuiteSparse_${suitesparseCompUC}_DIR to look inside")
-		else()
-			list(APPEND SuiteSparse_LIBRARIES	${SuiteSparse_${suitesparseCompUC}_LIBRARY})
+		find_library(SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG
+			NAMES 			${suitesparseComp}d		${suitesparseCompLC}d 		${suitesparseCompUC}d
+							lib${suitesparseComp}d 	lib${suitesparseCompLC}d 	lib${suitesparseCompUC}d
+			PATHS 			/opt/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+							/usr/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+							/usr/local/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+							${SuiteSparse_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+							${${suitesparseCompUC}_DIR}/lib${SuiteSparse_SEARCH_LIB_POSTFIX}
+							${${suitesparseCompUC}_DIR}
+			PATH_SUFFIXES	Debug
+		)
+
+		## check and auto complete release with debug if release missing and vice versa
+		if(SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE)
+			if(NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG)
+				set(SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG ${SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE} CACHE PATH "Path to a library." FORCE)
+			endif()
+		endif()
+		if(SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG)
+			if(NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE)
+				set(SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE ${SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG} CACHE PATH "Path to a library." FORCE)
+			endif()
+		endif()
+
+		## check and append the and SuiteSparse_LIBRARIES list, and warn if not found (release and debug) otherwise
+		if(NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE AND NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG)
+			message(WARNING "   Failed to find ${suitesparseComp} :
+			Check you write correctly the component name (case sensitive),
+			or set the SuiteSparse_${suitesparseCompUC}_DIR to look inside,
+			or set directly SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG and SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE
+			")
+		else()
+			list(APPEND SuiteSparse_LIBRARIES	optimized "${SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE}" debug "${SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG}")
 		endif()

 		## here we allow to find at least the include OR the lib dir and just warn if one of both missing
-		if(NOT SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR AND NOT SuiteSparse_${suitesparseCompUC}_LIBRARY)
+		if(NOT SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR AND NOT SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE)
 			set(SuiteSparse_${suitesparseCompUC}_FOUND OFF)
 		else()
 			set(SuiteSparse_${suitesparseCompUC}_FOUND ON)
@@ -186,7 +215,8 @@
 			set(SuiteSparse_${suitesparseCompUC}_DIR "$ENV{SuiteSparse_${suitesparseCompUC}_DIR}" CACHE PATH "${suitesparseComp} root directory")
 		else()
 			mark_as_advanced(SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR)
-			mark_as_advanced(SuiteSparse_${suitesparseCompUC}_LIBRARY)
+			mark_as_advanced(SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE)
+			mark_as_advanced(SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG)
 			if(DEFINED SuiteSparse_${suitesparseCompUC}_DIR)
 				mark_as_advanced(SuiteSparse_${suitesparseCompUC}_DIR)
 			endif()
@@ -195,7 +225,8 @@
 		if(SuiteSparse_VERBOSE)
 			message(STATUS "   SuiteSparse_${suitesparseCompUC}_FOUND = ${SuiteSparse_${suitesparseCompUC}_FOUND} : ")
 			message(STATUS "      * SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR = ${SuiteSparse_${suitesparseCompUC}_INCLUDE_DIR}")
-			message(STATUS "      * SuiteSparse_${suitesparseCompUC}_LIBRARY = ${SuiteSparse_${suitesparseCompUC}_LIBRARY}")
+			message(STATUS "      * SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG = ${SuiteSparse_${suitesparseCompUC}_LIBRARY_DEBUG}")
+			message(STATUS "      * SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE = ${SuiteSparse_${suitesparseCompUC}_LIBRARY_RELEASE}")
 		endif()

 		list(APPEND SuiteSparse_FOUND_LIST SuiteSparse_${suitesparseCompUC}_FOUND)


Do not warn about missing override

Do not warn about missing override

--- build_settings.cmake
+++ build_settings.cmake
@@ -17,7 +17,7 @@
 set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately after linking the test executable")

 # Warnings
-set(WARN_OPTS "-Wsuggest-override -Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+set(WARN_OPTS "-Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")


Fix color BGRA ordering for X11

Fix color BGRA ordering for X11

--- cmake/FindSkia.cmake
+++ cmake/FindSkia.cmake
@@ -107,6 +107,10 @@
 endif()

 if(UNIX AND NOT APPLE)
+  # Change the kN32_SkColorType ordering to BGRA to work in X windows.
+  target_compile_definitions(skia INTERFACE
+    SK_R32_SHIFT=16)
+
   # Needed for SkFontMgr on Linux
   find_library(FONTCONFIG_LIBRARY fontconfig)
   target_link_libraries(skia INTERFACE


choose C compiler flags depending on C compiler

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -2,9 +2,13 @@

 if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
   set(CMAKE_Fortran_FLAGS_INIT "-fopenmp -Wall -Wextra -Wconversion -std=f2008 -pedantic")
-  set(CMAKE_C_FLAGS_INIT "-Wall -std=c99")
 elseif(CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
   set(CMAKE_Fortran_FLAGS_INIT "-openmp -stand f08")
+endif()
+
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
+  set(CMAKE_C_FLAGS_INIT "-Wall -std=c99")
+elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel")
   set(CMAKE_C_FLAGS_INIT "-std=c99")
 endif()


Use CheckIncludeFileCXX instead of CheckIncludeFile

CheckIncludeFile uses the C compiler instead of the C++ compiler to check
headers. Using it also requires the calling project to enable C.

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -46,7 +46,7 @@

 get_filename_component(_currentDir "${CMAKE_CURRENT_LIST_FILE}" PATH)
 include("${_currentDir}/AddCompilerFlag.cmake")
-include(CheckIncludeFile)
+include(CheckIncludeFileCXX)

 macro(_my_find _list _value _ret)
    list(FIND ${_list} "${_value}" _found)
@@ -519,7 +519,7 @@
                set(_resultVar "HAVE_${_header}")
                string(REPLACE "." "_" _resultVar "${_resultVar}")
                if(_header)
-                  CHECK_INCLUDE_FILE("${_header}" ${_resultVar} "-m${_flag}")
+                  CHECK_INCLUDE_FILE_CXX("${_header}" ${_resultVar} "-m${_flag}")
                   if(NOT ${_resultVar})
                      set(_useVar "USE_${_flag}")
                      string(TOUPPER "${_useVar}" _useVar)


update for Ivy Bridge Xeon

update for Ivy Bridge Xeon

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -71,7 +71,9 @@
 	if(_vendor_id STREQUAL "GenuineIntel")
 if(_cpu_family EQUAL 6)
 # Any recent Intel CPU except NetBurst
-if(_cpu_model EQUAL 58)
+if(_cpu_model EQUAL 62)
+	set(TARGET_ARCHITECTURE "ivy-bridge")
+	elseif(_cpu_model EQUAL 58)
 	set(TARGET_ARCHITECTURE "ivy-bridge")
 	elseif(_cpu_model EQUAL 47) # Xeon E7 4860
 	set(TARGET_ARCHITECTURE "westmere")


Fixed typo in message

Fixed typo in message

--- cmake_modules/CMakeRunTargets.cmake
+++ cmake_modules/CMakeRunTargets.cmake
@@ -138,10 +138,9 @@
   if(NOT ALLOCV_FOUND)
     set(ALLOCV_LIBRARY "")
     set(ALLOCV_INCLUDE_DIR "")
-    message("Not building allocvand no usable allocv binary found. Not linking application to allocv")
+    message("Not building allocv and no usable allocv binary found. Not linking application to allocv")
   endif(NOT ALLOCV_FOUND)
 endif(TARGET allocv${DEBUG_SUFFIX})
-

 include_directories(${ALLOCORE_DEP_INCLUDE_DIRS})


Use the ParaView release tag

Use the ParaView release tag

--- versions.cmake
+++ versions.cmake
@@ -80,7 +80,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision locally before proposing a move
-  set(_paraview_revision "b9a216aa78b1570bbd6e73133730782f4a6efdae")
+  set(_paraview_revision "tomviz/1.3.0")
 endif()
 # Locally patched ParaView repo, or main repo
 #set(_paraview_repo "https://gitlab.kitware.com/paraview/paraview.git")


node requires python (all platforms) and nasm (on Windows)

issue https://github.com/smanders/externpro/issues/219

--- projects/node.cmake
+++ projects/node.cmake
@@ -7,6 +7,18 @@
   string(TOUPPER ${NODE_NEWVER} NV)
   if(NOT (XP_DEFAULT OR XP_PRO_NODE${OV} OR XP_PRO_NODE${NV}))
     return()
+  endif()
+  find_package(PythonInterp)
+  if(NOT PYTHONINTERP_FOUND)
+    message(AUTHOR_WARNING "Unable to build node, required python not found")
+    return()
+  endif()
+  if(WIN32)
+    find_package(nasm)
+    if(NOT NASM_FOUND)
+      message(AUTHOR_WARNING "Unable to build node, required nasm not found")
+      return()
+    endif()
   endif()
   if(XP_DEFAULT)
     set(NODE_VERSIONS ${NODE_OLDVER} ${NODE_NEWVER})


Fix the CMake type for visibility preset variables

Suggested-by: Hans Johnson <d13cfb4aa0a5c45ca30cefb7698889bb95ff5378@uiowa.edu>

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -48,7 +48,7 @@
   set( ITK_BUILD_SHARED_LIBS ON )
 else()
   set( ITK_BUILD_SHARED_LIBS OFF )
-  list( APPEND ep_itk_args"-DCMAKE_C_VISIBILITY_PRESET:BOOL=hidden" "-DCMAKE_CXX_VISIBILITY_PRESET:BOOL=hidden" )
+  list( APPEND ep_itk_args"-DCMAKE_C_VISIBILITY_PRESET:STRING=hidden" "-DCMAKE_CXX_VISIBILITY_PRESET:STRING=hidden" )
 endif()


Fix CPack

Fix CPack

--- KetaRollerCPack.cmake
+++ KetaRollerCPack.cmake
@@ -8,6 +8,8 @@
 SET(CPACK_PACKAGE_VERSION_MINOR "1")
 SET(CPACK_PACKAGE_VERSION_PATCH "0")
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "KetaRoller")
+set(CPACK_SOURCE_IGNORE_FILES
+   "/build/;/.bzr/;~$;/.git/;/.kdev4/;/installatio/;${CPACK_SOURCE_IGNORE_FILES}")
 IF(WIN32 AND NOT UNIX)
   # There is a bug in NSI that does not handle full unix paths properly. Make
   # sure there is at least one set of four (4) backlasshes.
@@ -26,10 +28,8 @@
 INCLUDE(CPack)

 if (APPLE)
-    set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/cpack/README.txt")
-    set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/cpack/LICENSE.txt")
     set(CPACK_SET_DESTDIR ON)
-   set(CPACK_PACKAGE_RELOCATABLE OFF)
+    set(CPACK_PACKAGE_RELOCATABLE OFF)
 endif (APPLE)

 include(CPack)


MDEV-4544 : Update MSI installer to use latest HeidiSQL 8.0

--- win/packaging/heidisql.cmake
+++ win/packaging/heidisql.cmake
@@ -1,4 +1,4 @@
-SET(HEIDISQL_BASE_NAME "HeidiSQL_7.0_Portable")
+SET(HEIDISQL_BASE_NAME "HeidiSQL_8.0_Portable")
 SET(HEIDISQL_ZIP "${HEIDISQL_BASE_NAME}.zip")
 SET(HEIDISQL_URL "http://heidisql.googlecode.com/files/${HEIDISQL_ZIP}")
 SET(HEIDISQL_DOWNLOAD_DIR ${THIRD_PARTY_DOWNLOAD_LOCATION}/${HEIDISQL_BASE_NAME})


remove unnecessary quoting

remove unnecessary quoting


BUG: Do not try to install targets that do not exist when building externally.

Addresses:

  CMake Error: INSTALL(EXPORT) given unknown export "LesionSizingToolkitTargets"

The LesionSizingToolkit uses (abuses?) the src directory to build some executables, but
it does not yet create any targets to export. Avoid configuration errors in
this use case.

Change-Id: I73b275cf09ecdf699a0e7bc62e66f0dd2258c2e1

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -86,7 +86,7 @@
 set(${itk-module}_TARGETS_FILE_BUILD "${${itk-module}-targets-build}")
 itk_module_impl()

-if(EXISTS ${CMAKE_SOURCE_DIR}/src/CMakeLists.txt AND NOT ${itk-module}_NO_SRC)
+if(EXISTS ${CMAKE_SOURCE_DIR}/src/CMakeLists.txt AND NOT ${itk-module}_NO_SRC AND "${${itk-module}-targets}")
   install(EXPORT ${${itk-module}-targets} DESTINATION "${ITK_INSTALL_PACKAGE_DIR}/Modules"
           COMPONENT Development)
 endif()


FindOGRE.cmake should pick up OGRE_SDK defined as a CMake variable before the environment variable

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -88,7 +88,7 @@
   )
 endif ()
 set(OGRE_PREFIX_PATH
-  ${OGRE_HOME} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK}
+  ${OGRE_HOME} ${OGRE_SDK} ${ENV_OGRE_HOME} ${ENV_OGRE_SDK}
   ${OGRE_PREFIX_GUESSES}
 )
 create_search_paths(OGRE)


Make the revision tag customizable + VS 2010 workaround.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,9 +13,15 @@

 IF(BUILD_TESTING)

+  SET(revision_tag 4fa450c29ebd819419)
+  IF(${proj}_REVISION_TAG)
+    SET(revision_tag ${${proj}_REVISION_TAG})
+  ENDIF()
+
   ExternalProject_Add(${proj}
     GIT_REPOSITORY http://git.mitk.org/MITK-Data.git
-    GIT_TAG "origin/master"
+    GIT_TAG ${revision_tag}
+    UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""
     INSTALL_COMMAND ""


COMP: change revision tag number of mitk-data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 0b113ebe)
+  set(revision_tag d96c6dab)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Update PythonQt for QSocketNotifier for Qt5

See:
https://github.com/commontk/PythonQt/pull/63

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -78,7 +78,7 @@
   endif()

   if (CTK_QT_VERSION VERSION_GREATER "4")
-    set(revision_tag 8462a54a3281aff550730530c999cee4eb453bea) # patched-8
+    set(revision_tag 30d788f4543b87f2e9fcade063d9007447c0e95d) # patched-8
   else()
     set(revision_tag 1afe4f8906345063b25047652e8962f641010a55) # patched-5
   endif()


Bump version to 0.4.0

Bump version to 0.4.0

--- CMakeModules/FCLVersion.cmake
+++ CMakeModules/FCLVersion.cmake
@@ -1,8 +1,8 @@
 # set the version in a way CMake can use
 set(FCL_MAJOR_VERSION 0)
-set(FCL_MINOR_VERSION 3)
-set(FCL_PATCH_VERSION 2)
+set(FCL_MINOR_VERSION 4)
+set(FCL_PATCH_VERSION 0)
 set(FCL_VERSION "${FCL_MAJOR_VERSION}.${FCL_MINOR_VERSION}.${FCL_PATCH_VERSION}")

 # increment this when we have ABI changes
-set(FCL_ABI_VERSION 5)
+set(FCL_ABI_VERSION 6)


Add trace when not retrieving the archive

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -71,6 +71,12 @@

 if (clone_res)
   message( SEND_ERROR "Problem in retreiving the archive")
+  message( "Command : COMMAND ${GIT} clone ${REMOTE} --branch ${BRANCH_NAME} \
+    --depth 1 superbuild-artifact")
+  message( "Result :")
+  message( "clone_res = ${clone_res}" )
+  message( "clone_out = ${clone_out}" )
+  message( "clone_err = ${clone_err}" )
   return()
 endif()


Be smarter about whether Boost is required or not

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -96,7 +96,12 @@
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
 # Optional Boost libs (Boost_${COMPONENT}_FOUND
-macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" FALSE "" "")
+if(OGRE_BUILD_COMPONENT_PROPERTY)
+	set(OGRE_BOOST_REQUIRED TRUE)
+else ()
+	set(OGRE_BOOST_REQUIRED FALSE)
+endif()
+macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" ${OGRE_BOOST_REQUIRED} "" "")
 macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "")


CMake: drop extra win libs with SDL2 linking

not needed see https://github.com/OGRECave/ogre/pull/1541

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -296,10 +296,6 @@
         INTERFACE_LINK_LIBRARIES "${SDL2_LIBRARIES}"
     )
   endif()
-  if(SDL2_FOUND AND WIN32 AND NOT SDL2_BINARY)
-    # fix linking static SDL2 on windows
-    set_property(TARGET SDL2::SDL2 APPEND PROPERTY INTERFACE_LINK_LIBRARIES winmm.lib imm32.lib version.lib)
-  endif()
 endif()

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


STYLE: Remove old cmake < 2.8.5 specific code

We are requiring at least cmake 2.8.6

Change-Id: I46183691bea6496967ebb0181b5de577e7320510

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -135,8 +135,7 @@
 # Variables ExternalData_TIMEOUT_INACTIVITY and ExternalData_TIMEOUT_ABSOLUTE
 # set the download inactivity and absolute timeouts, in seconds.  The defaults
 # are 60 seconds and 300 seconds, respectively.  Set either timeout to 0
-# seconds to disable enforcement.  The inactivity timeout is enforced only
-# with CMake >= 2.8.5.
+# seconds to disable enforcement.

 #=============================================================================
 # Copyright 2010-2013 Kitware, Inc.
@@ -307,13 +306,7 @@
 endfunction()

 function(_ExternalData_random var)
-  if(NOT ${CMAKE_VERSION} VERSION_LESS 2.8.5)
-    string(RANDOM LENGTH 6 random)
-  elseif(EXISTS /dev/urandom)
-    file(READ /dev/urandom random LIMIT 4 HEX)
-  else()
-    message(FATAL_ERROR "CMake >= 2.8.5 required in this environment")
-  endif()
+  string(RANDOM LENGTH 6 random)
   set("${var}" "${random}" PARENT_SCOPE)
 endfunction()


use working ctk version for mitk

use working ctk version for mitk

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag 6d277f4c60fa5cfceb54053ad057a7a0fe8e22f5)
+    SET(revision_tag 31d144ecab0c7a8bdc5d8e2ec8b33972ce8e490d)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


COMP: Again updating hash due to wrong CTK tarball

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -61,7 +61,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 2302f8101c95ae493c3b049febc554af
+      URL_MD5 9827947580ae250e6bb29e2bd2399da4
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


[Build] CtestDriver, fix typo

[Build] CtestDriver, fix typo

--- Build/CTestDriver.cmake
+++ Build/CTestDriver.cmake
@@ -23,7 +23,7 @@
 message(STATUS "MODULE is: ${MODULE}")
 message(STATUS "MODE is: ${MODE}")
 message(STATUS "SOURCE_DIRECTORY is: ${SOURCE_DIRECTORY}")
-message(STATUS "BINARY_DIRECTORY is: ${BINARY_DIRECTORY}")x
+message(STATUS "BINARY_DIRECTORY is: ${BINARY_DIRECTORY}")

 message(STATUS "cmake module path is: ${CMAKE_MODULE_PATH}")


Add support for POWER9 CPUs on Linux.

Add support for POWER9 CPUs on Linux.

--- CMake/unix_config.cmake
+++ CMake/unix_config.cmake
@@ -13,6 +13,9 @@
     elseif(${MACHINE} MATCHES "aarch64-linux-gnu")
         set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -mstrict-align -ftree-vectorize")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mstrict-align -ftree-vectorize")
+    elseif(${MACHINE} MATCHES "powerpc64(le)?-linux-gnu")
+        set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -ftree-vectorize")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftree-vectorize")
     else()
         set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -mssse3")
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3")


[Fix] Corrected copy-paste mistake in Linux-side.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@941 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Ogre.cmake
+++ CMakeModules/Ogre.cmake
@@ -13,7 +13,7 @@
       C:/OgreSDK
       $ENV{PROGRAMFILES}/OgreSDK C:/Ogre $ENV{REX_DEP_PATH}/ogre)
 elseif (UNIX)
-  set(CAELUM_PREFIX_GUESSES
+  set(OGRE_PREFIX_GUESSES
       /opt/OGRE
       /opt/ogre
       /usr/local


forget from commit.

forget from commit.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1045 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/PoCo.cmake
+++ CMakeModules/PoCo.cmake
@@ -19,6 +19,7 @@
     /usr/lib
     /usr/lib/PoCo
     /usr/lib/Poco
+    /usr/local/include/Poco
     /usr/local/Poco
     $ENV{HOME}/PoCo
     $ENV{HOME}/Poco


cmake: double quote variable to avoid missing paramter error if empty

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -132,7 +132,7 @@
 		string (STRIP "${OS_PRETTY_NAME}" OS_PRETTY_NAME)
 	endif (NOT APPLE)
 	set (OS_DISTRIB "${OS_NAME}${OS_VERSION_ID}")
-	string (REPLACE " " "-" OS_DISTRIB ${OS_DISTRIB}) # replace spaces with dashes, since rpm-build can't handle paths with spaces
+	string (REPLACE " " "-" OS_DISTRIB "${OS_DISTRIB}") # replace spaces with dashes, since rpm-build can't handle paths with spaces
 	if (NOT OS_DISTRIB)
 		set (OS_DISTRIB "unix")
 	endif (NOT OS_DISTRIB)


CI: update android build

CI: update android build

--- ci-build.cmake
+++ ci-build.cmake
@@ -52,8 +52,9 @@
 if(DEFINED ENV{ANDROID})
     set(CROSS
         -DANDROID_NATIVE_API_LEVEL=21
-        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r12b
-        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CMake/toolchain/android.toolchain.cmake)
+        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r13
+        -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CMake/toolchain/android.toolchain.cmake
+        "-DANDROID_ABI=armeabi-v7a with NEON")

     set(RENDERSYSTEMS
         -DOGRE_BUILD_RENDERSYSTEM_GLES2=TRUE
@@ -66,10 +67,10 @@

     message(STATUS "Downloading Android NDK")
     file(DOWNLOAD
-        http://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
-        ./android-ndk-r12b-linux-x86_64.zip)
+        http://dl.google.com/android/repository/android-ndk-r13-linux-x86_64.zip
+        ./android-ndk-r13-linux-x86_64.zip)
     message(STATUS "Extracting Android NDK")
-    execute_process(COMMAND unzip android-ndk-r12b-linux-x86_64.zip OUTPUT_QUIET)
+    execute_process(COMMAND unzip android-ndk-r13-linux-x86_64.zip OUTPUT_QUIET)
 endif()

 execute_process(COMMAND cmake


Renamed PP_QUD to PP_QDR and removed slower pairings.

--- cmake/pp.cmake
+++ cmake/pp.cmake
@@ -13,9 +13,7 @@
 message("      PP_METHD=BASIC    Basic extension field arithmetic.")
 message("      PP_METHD=LAZYR    Lazy reduced extension field arithmetic.\n")

-message("      PP_METHD=R_ATE    R-ate pairing.")
-message("      PP_METHD=O_ATE    O-ate pairing.")
-message("      PP_METHD=X_ATE    X-ate pairing.\n")
+message("      PP_METHD=O_ATE    Optimal ate pairing.\n")

 # Choose the arithmetic methods.
 if (NOT PP_METHD)
@@ -26,7 +24,7 @@
 	message(FATAL_ERROR "Incomplete PP_METHD specification: ${PP_METHD}")
 endif(PP_LEN LESS 3)

-list(GET PP_METHD 0 PP_QUD)
+list(GET PP_METHD 0 PP_QDR)
 list(GET PP_METHD 1 PP_EXT)
 list(GET PP_METHD 2 PP_MAP)
 set(PP_METHD ${PP_METHD} CACHE STRING "Bilinear pairings arithmetic method.")


minor fix in mex message

minor fix in mex message

--- Examples/Examples.cmake
+++ Examples/Examples.cmake
@@ -167,7 +167,7 @@
 	)
 else()
 	message(STATUS "Matlab not found so mexMTF is disabled")
-	message("\n\tIf Matlab is installed but not detected, mexMTF can be compiled by running the command in mtf_mex_cmd.txt at the MATLAB prompt after:\n\t * removing all semi colons\n\t * replacing all occurences of the type '-l<full path to library>' with '<full path to library>'\n\t * replacing all occurences of the type '-l-L<path to library folder>' with '-L<path to library folder>'\n")
+	message("\n\tIf Matlab is installed but not detected, mexMTF can be compiled by running the command in 'mtf_mex_cmd.txt' at the MATLAB prompt after:\n\t * removing all semi colons\n\t * replacing all occurences of the type '-l<full path to library>' with '<full path to library>'\n\t * replacing all occurences of the type '-l-L<path to library folder>' with '-L<path to library folder>'\n")
 	addPrefixAndSuffix("${MTF_LIBS}" "-l"  " " MEX_MTF_LIBS)
 	addPrefixAndSuffix("${MTF_DEFINITIONS}" "${DEFINITION_SWITCH}" " " MEX_MTF_DEFINITIONS)
 	addPrefixAndSuffix("${MTF_INCLUDE_DIRS}" "${INCLUDE_SWITCH}\"" "\" " MEX_MTF_INCLUDE_DIRS)


[CMake] Correct Mingw script.

[CMake] Correct Mingw script.

--- EMULATOR/PLATFORM/Mingw.cmake
+++ EMULATOR/PLATFORM/Mingw.cmake
@@ -5,6 +5,8 @@
 #Find libs
 find_package(SDL2 REQUIRED)
 find_package(OpenGL REQUIRED)
+#We want to link GLEW statically
+set(GLEW_USE_STATIC_LIBS ON)
 find_package(GLEW REQUIRED)

 #We want to link GLEW statically


config: Add missing config values.

config: Add missing config values.

--- config.h.cmake
+++ config.h.cmake
@@ -8,4 +8,6 @@
 #cmakedefine BINARYDIR "${BINARYDIR}"
 #cmakedefine SOURCEDIR "${SOURCEDIR}"

+#cmakedefine HAVE_CLOCK_GETTIME
+
 #cmakedefine WITH_LOG4C 1


Correct usage

Correct usage

--- Modules/ManageRPMScript.cmake
+++ Modules/ManageRPMScript.cmake
@@ -12,7 +12,7 @@
       [\"-Dconfig_replace=<file1;file2>\"]
       [\"-D<var>=<value>\"]
     -P <CmakeModulePath>/ManageRPMScript.cmake
-  Make project spec file according to spec_in and CMakeCache.txt.
+  Make project spec file according to spec_in and prj_info.cmake
   Options:
     -Dconfig_replace: List of configure files that should use
       %config instead of %config(noreplace)


do not try to deploy DLL if building with Mingw-W64

--- Shared/CMake/JamomaPack.cmake
+++ Shared/CMake/JamomaPack.cmake
@@ -1,10 +1,12 @@
 if(WIN32)
 # We need to deploy our DLLs too.
-find_package(LibXml2 CONFIG)
-get_target_property(XML2_DLL xml2 IMPORTED_LOCATION)
-install(FILES "${XML2_DLL}"
-		DESTINATION support)
-
+if (NOT MINGW-W64)
+  find_package(LibXml2 CONFIG)
+  get_target_property(XML2_DLL xml2 IMPORTED_LOCATION)
+  install(FILES "${XML2_DLL}"
+	  DESTINATION support)
+endif()
+
 # TODO portaudio, sndfile, etc...
 endif()


COMP: update CIP git tag

COMP: update CIP git tag

Comment of the reference CIP tag: COMP: replace Slicer_* cmake
variables with corresponding CIP_* variables. Though these variables
are not defined currently, renamed for future use when CIP standalone
package needs to be created.

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -25,7 +25,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/acil-bwh/ChestImagingPlatform.git"
-    GIT_TAG "2ed4062859db304e80120fa0acf00ed692847bbd" # use develop branch to include CLI modules
+    GIT_TAG "50e6d77d743b5fcf50772e042f65bff80f0e6876" # use develop branch to include CLI modules
     #DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Remove this line and uncomment GIT_REPOSITORY and GIT_TAG"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build


Clarify cmake version

Clarify cmake version

--- build_api.cmake
+++ build_api.cmake
@@ -5,7 +5,7 @@

 # Might be reviewed
-cmake_minimum_required(VERSION 3.3)
+cmake_minimum_required(VERSION 3.2)

 # Set for latter use
 set(CORE_DIR ${CMAKE_CURRENT_LIST_DIR})


[cmake] and apparently we lost gtest/pthread again

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -123,6 +123,7 @@
 macro(BEGIN_TESTCASES)
 	include_sys_dir(${DUNE_STUFF_TEST_DIR}/gtest )
 	add_library(gtest_dune_stuff STATIC ${DUNE_STUFF_TEST_DIR}/gtest/gtest-all.cc)
+  target_link_libraries(gtest_dune_stuff pthread)

 	file( GLOB test_sources "${CMAKE_CURRENT_SOURCE_DIR}/*.cc" )
 	foreach( source ${test_sources} )


updated NIFTI module to find the common Windows install locations

--- cmake/FindNIFTI.cmake
+++ cmake/FindNIFTI.cmake
@@ -20,6 +20,7 @@
 FIND_PATH(NIFTI_INCLUDE_DIRS
 NAMES nifti1.h
 PATHS ${NIFTI_DIR}
+HINTS "C:/Program Files (x86)/NIFTI" "C:/Program Files/NIFTI"
 PATH_SUFFIXES include nifti include/nifti
 DOC "The include directory containing nifti1.h"
 )
@@ -28,18 +29,21 @@
 FIND_LIBRARY(NIFTI_NIFTICDF_LIBRARY
 NAMES nifticdf
 PATHS ${NIFTI_DIR}
+HINTS "C:/Program Files (x86)/NIFTI" "C:/Program Files/NIFTI"
 PATH_SUFFIXES lib
 DOC "The library file libnifticdf.so"
 )
 FIND_LIBRARY(NIFTI_NIFTIIO_LIBRARY
 NAMES niftiio
 PATHS ${NIFTI_DIR}
+HINTS "C:/Program Files (x86)/NIFTI" "C:/Program Files/NIFTI"
 PATH_SUFFIXES lib
 DOC "The library file libniftiiof.so"
 )
 FIND_LIBRARY(NIFTI_ZNZ_LIBRARY
 NAMES znz
 PATHS ${NIFTI_DIR}
+HINTS "C:/Program Files (x86)/NIFTI" "C:/Program Files/NIFTI"
 PATH_SUFFIXES lib
 DOC "The library file libznz.so"
 )


cmake needs to be taught a lesson in debian paths

--- cmake/Findclang.cmake
+++ cmake/Findclang.cmake
@@ -6,9 +6,9 @@
 # CLANG_INCLUDE_DIR
 # CLANG_LIBRARY

-find_path(CLANG_INCLUDE_DIR NAMES clang-c/Index.h)
+find_path(CLANG_INCLUDE_DIR NAMES clang-c/Index.h PATHS /usr/lib/llvm-3.7/include/)

-find_library(CLANG_LIBRARY NAMES clang)
+find_library(CLANG_LIBRARY NAMES clang PATHS /usr/lib/llvm-3.7/lib/)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(CLANG DEFAULT_MSG CLANG_LIBRARY CLANG_INCLUDE_DIR)


CMake: do not test for pthread and dl libraries on Windows (except
Cygwin). Fixes PR 5368.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -39,7 +39,9 @@
 check_include_file(malloc/malloc.h HAVE_MALLOC_MALLOC_H)
 check_include_file(memory.h HAVE_MEMORY_H)
 check_include_file(ndir.h HAVE_NDIR_H)
-check_include_file(pthread.h HAVE_PTHREAD_H)
+if( NOT LLVM_ON_WIN32 )
+  check_include_file(pthread.h HAVE_PTHREAD_H)
+endif()
 check_include_file(setjmp.h HAVE_SETJMP_H)
 check_include_file(signal.h HAVE_SIGNAL_H)
 check_include_file(stdint.h HAVE_STDINT_H)
@@ -63,10 +65,12 @@
 check_include_file(windows.h HAVE_WINDOWS_H)

 # library checks
-check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
-check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
-check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
-check_library_exists(dl dlopen "" HAVE_LIBDL)
+if( NOT LLVM_ON_WIN32 )
+  check_library_exists(pthread pthread_create "" HAVE_LIBPTHREAD)
+  check_library_exists(pthread pthread_getspecific "" HAVE_PTHREAD_GETSPECIFIC)
+  check_library_exists(pthread pthread_rwlock_init "" HAVE_PTHREAD_RWLOCK_INIT)
+  check_library_exists(dl dlopen "" HAVE_LIBDL)
+endif()

 # function checks
 check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
@@ -86,7 +90,9 @@
 check_symbol_exists(mkdtemp "stdlib.h;unistd.h" HAVE_MKDTEMP)
 check_symbol_exists(mkstemp "stdlib.h;unistd.h" HAVE_MKSTEMP)
 check_symbol_exists(mktemp "stdlib.h;unistd.h" HAVE_MKTEMP)
-check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
+if( NOT LLVM_ON_WIN32 )
+  check_symbol_exists(pthread_mutex_lock pthread.h HAVE_PTHREAD_MUTEX_LOCK)
+endif()
 check_symbol_exists(sbrk unistd.h HAVE_SBRK)
 check_symbol_exists(strtoll stdlib.h HAVE_STRTOLL)
 check_symbol_exists(strerror string.h HAVE_STRERROR)


r10893/sofa : push ddba438..bce568c

r10893/sofa : push ddba438..bce568c

* commit bce568c321a7346bc216aa0ae248e09ff563a99b
Undo the remove_duplicate from 10889; causes a weird bug.

   1 files changed, 1 insertions(+), 1 deletions(-)

Former-commit-id: a8ad63d286599e6e35fadb2e566d406bfc74bc8a

--- cmake/functions.cmake
+++ cmake/functions.cmake
@@ -445,7 +445,7 @@

             # set the updated compiler definitions of the current project
             set(definitions_list ${dependenciesCompilerDefines} ${GLOBAL_PROJECT_OPTION_COMPILER_DEFINITIONS_${projectName}})
-            sofa_remove_duplicates(definitions_list)
+            #sofa_remove_duplicates(definitions_list)
             set(GLOBAL_PROJECT_REGISTERED_COMPILER_DEFINITIONS_${projectName} ${definitions_list} CACHE INTERNAL "${projectName} compiler definitions from option and dependencies options" FORCE)

             if(TARGET ${projectName})


Fix bug #5

Fix bug #5

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

--- cmake/pcl_utils.cmake
+++ cmake/pcl_utils.cmake
@@ -123,13 +123,13 @@
 macro(DISSECT_VERSION)
     # Find version components
     string(REGEX REPLACE "^([0-9]+).*" "\\1"
-        PROJECT_MAJOR_VERSION "${PROJECT_VERSION}")
+        PCL_MAJOR_VERSION "${PCL_VERSION}")
     string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1"
-        PROJECT_MINOR_VERSION "${PROJECT_VERSION}")
+        PCL_MINOR_VERSION "${PCL_VERSION}")
     string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1"
-        PROJECT_REVISION_VERSION "${PROJECT_VERSION}")
+        PCL_REVISION_VERSION "${PCL_VERSION}")
     string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.[0-9]+(.*)" "\\1"
-        PROJECT_CANDIDATE_VERSION "${PROJECT_VERSION}")
+        PCL_CANDIDATE_VERSION "${PCL_VERSION}")
 endmacro(DISSECT_VERSION)

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


Packaging: added instalation of Qt5 libs and plugins

--- cmake/BALLPackageConfig.cmake
+++ cmake/BALLPackageConfig.cmake
@@ -11,6 +11,12 @@
 SET(CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/cmake/installer/Welcome.rtf")

 IF (WIN32 AND NOT UNIX)
+	# Install Qt5 dynamic libraries and its plugins
+	GET_TARGET_PROPERTY(Qt5Core_LOCATION Qt5::Core LOCATION)
+	GET_FILENAME_COMPONENT(Qt5_DLL_PATH ${Qt5Core_LOCATION} PATH)
+	INSTALL(DIRECTORY ${Qt5_DLL_PATH}/ DESTINATION ${BALL_RUNTIME_INSTALL_DIRECTORY} USE_SOURCE_PERMISSIONS COMPONENT "Runtime" FILES_MATCHING PATTERN "*.dll")
+	INSTALL(DIRECTORY ${Qt5_DLL_PATH}/../plugins DESTINATION ${BALL_RUNTIME_INSTALL_DIRECTORY} USE_SOURCE_PERMISSIONS COMPONENT "Runtime")
+
 	SET(BALL_WIN_ARCHITECTURE "win32")
 	IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
 		SET(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")


fix freeimage include dir

fix freeimage include dir

--- cmake/Dependencies_core.cmake
+++ cmake/Dependencies_core.cmake
@@ -22,36 +22,6 @@
 PackageHelperTarget(png_static PNG_FOUND)
 PackageHelperTarget(assimp ASSIMP_FOUND)
 PackageHelperTarget(glog GLOG_FOUND)
-
-#
-#  # Without submodules we use find_package to find the required dependencies
-#  find_package(Eigen3 3.3.90 QUIET REQUIRED)
-#  PackageHelperTarget(Eigen3::Eigen EIGEN3_FOUND)
-#
-##  find_package(glfw3 CONFIG QUIET REQUIRED)
-##  PackageHelperTarget(glfw GLFW_FOUND)
-##  SET(SAIGA_USE_GLFW 1)
-#
-#  find_package(ZLIB QUIET)
-#  PackageHelper(ZLIB ${ZLIB_FOUND} "${ZLIB_INCLUDE_DIRS}" "${ZLIB_LIBRARIES}")
-#  if(ZLIB_FOUND)
-#    SET(SAIGA_USE_ZLIB 1)
-#  endif()
-#
-#
-#  find_package(PNG QUIET)
-#  PackageHelper(PNG ${PNG_FOUND} "${PNG_INCLUDE_DIRS}" "${PNG_LIBRARIES}")
-#  if(PNG_FOUND)
-#    SET(SAIGA_USE_PNG 1)
-#  endif()
-#
-#  find_package(ASSIMP QUIET)
-#  PackageHelper(ASSIMP ${ASSIMP_FOUND} "${ASSIMP_INCLUDE_DIRS}" "${ASSIMP_LIBRARIES}")
-#  if(ASSIMP_FOUND)
-#    SET(SAIGA_USE_ASSIMP 1)
-#  endif()
-#endif()
-

 #openmp
 if (SAIGA_CXX_WCLANG)
@@ -87,14 +57,6 @@
 ############# Optional Libraries ###############

-#GLFW
-#find_package(GLFW 3.2 QUIET)
-#PackageHelper(GLFW ${GLFW_FOUND} "${GLFW_INCLUDE_DIR}" "${GLFW_LIBRARIES}")
-
-
-#target_link_libraries(main PRIVATE glfw)
-
-
 #openal
 find_package(OpenAL QUIET)
 if (OPENAL_FOUND)
@@ -118,25 +80,11 @@
 endif ()
 PackageHelper(Opus ${OPUS_FOUND} "${OPUS_INCLUDE_DIRS}" "${OPUS_LIBRARIES}")

-
-#libfreeimage
-#find_package(FreeImagePlus QUIET)
-#PackageHelper(FreeImagePlus ${FREEIMAGEPLUS_FOUND} "${FREEIMAGEPLUS_INCLUDE_PATH}" "${FREEIMAGEPLUS_LIBRARIES}")
 find_package(FreeImage QUIET)
-PackageHelper(FreeImage ${FREEIMAGE_FOUND} "${FREEIMAGE_INCLUDE_PATH}" "${FREEIMAGE_LIBRARIES}")
-#if (FREEIMAGE_FOUND AND FREEIMAGEPLUS_FOUND)
+PackageHelper(FreeImage ${FREEIMAGE_FOUND} "${FREEIMAGE_INCLUDE_DIRS}" "${FREEIMAGE_LIBRARIES}")
 if (FREEIMAGE_FOUND)
     SET(SAIGA_USE_FREEIMAGE 1)
 endif ()
-
-
-#c++17 filesystem
-#find_package(Filesystem REQUIRED QUIET)
-#SET(SAIGA_USE_FILESYSTEM 1)
-#PackageHelperTarget(std::filesystem FILESYSTEM_FOUND)
-#if(FILESYSTEM_FOUND)
-#endif()
-

 #openmesh
 find_package(OpenMesh QUIET)
@@ -145,7 +93,6 @@
 endif ()
 PackageHelper(OpenMesh ${OPENMESH_FOUND} "${OPENMESH_INCLUDE_DIRS}" "${OPENMESH_LIBRARIES}")

-
 set(CORE_INCLUDES ${PACKAGE_INCLUDES})
 set(CORE_LIBS ${LIBS})
 set(CORE_TARGETS ${LIB_TARGETS})


Update CMake module path for TBB

Update CMake module path for TBB

For some reason TBB wasn't updated to use ${CMAKE_CURRENT_SOURCE_DIR}

--- cmake/TileDB-Superbuild.cmake
+++ cmake/TileDB-Superbuild.cmake
@@ -111,7 +111,7 @@
 endif()

 if (TILEDB_TBB)
-  include(${CMAKE_SOURCE_DIR}/cmake/Modules/FindTBB_EP.cmake)
+  include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/FindTBB_EP.cmake)
 endif()

 if (TILEDB_TESTS)


test=develop

test=develop

--- cmake/external/openblas.cmake
+++ cmake/external/openblas.cmake
@@ -27,7 +27,7 @@

     SET(CBLAS_SOURCES_DIR ${THIRD_PARTY_PATH}/openblas)
     SET(CBLAS_INSTALL_DIR ${THIRD_PARTY_PATH}/install/openblas)
-    SET(CBLAS_INCLUDE_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)
+    SET(CBLAS_INC_DIR "${CBLAS_INSTALL_DIR}/include" CACHE PATH "openblas include directory." FORCE)

     SET(CBLAS_LIBRARIES
         "${CBLAS_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}openblas${CMAKE_STATIC_LIBRARY_SUFFIX}"
@@ -96,7 +96,7 @@
     ENDIF(NOT WIN32)
     SET(CBLAS_PROVIDER openblas)
     IF(WITH_C_API)
-        INSTALL(DIRECTORY ${CBLAS_INCLUDE_DIR} DESTINATION third_party/openblas)
+        INSTALL(DIRECTORY ${CBLAS_INC_DIR} DESTINATION third_party/openblas)
         # Because libopenblas.a is a symbolic link of another library, thus need to
         # install the whole directory.
         IF(ANDROID)
@@ -117,8 +117,8 @@
 ENDIF(NOT ${CBLAS_FOUND})

 MESSAGE(STATUS "BLAS library: ${CBLAS_LIBRARIES}")
-MESSAGE(STATUS "BLAS Include: ${CBLAS_INCLUDE_DIR}")
-INCLUDE_DIRECTORIES(${CBLAS_INCLUDE_DIR})
+MESSAGE(STATUS "BLAS Include: ${CBLAS_INC_DIR}")
+INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})

 # FIXME(gangliao): generate cblas target to track all high performance
 # linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)


cmake/modules/FindNUMPY.cmake: Removed unneeded comment.

--- cmake/modules/FindNUMPY.cmake
+++ cmake/modules/FindNUMPY.cmake
@@ -1,6 +1,6 @@
 #adapted from vigra source code

-#FIND_PACKAGE(PythonInterp)
+
 IF(PYTHONINTERP_FOUND)
     IF(NOT PYTHON_NUMPY_INCLUDE_DIR)
         execute_process ( COMMAND ${PYTHON_EXECUTABLE} -c


Give more information about found version of wxwidgets.

svn path=/trunk/; revision=9886

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -57,6 +57,9 @@
     )
   # Convert wxWidgets_LIBRARIES to full pathname form.
   cmake_link_flags(wxwidgets_LINK_FLAGS "${wxWidgets_LIBRARIES}")
+  message(STATUS "wxWidgets found")
+  message(STATUS "wxwidgets_COMPILE_FLAGS = ${wxwidgets_COMPILE_FLAGS}")
+  message(STATUS "wxwidgets_LINK_FLAGS = ${wxwidgets_LINK_FLAGS}")
   include(agg)
   if(HAVE_AGG)
     set(


Use any <mod>_ROOT environment variable as path hint

--- cmake_include/Utilities.cmake
+++ cmake_include/Utilities.cmake
@@ -125,7 +125,8 @@
 #     to look for the module. The name of the module is passed via the
 #     MOD_NAME keywoard argument.
 # 3.) If no  pkg-config module is available, the function looks in the
-#     default search paths.
+#     default search paths. It can use the environment variable
+#     ${MOD_NAME}_ROOT as a path hint.
 #
 # Arguments:
 #   Positional arguments:
@@ -193,7 +194,7 @@

         #if pkg-config was not successful we have to do this the hard way
         if(NOT ${VAR}_FOUND)
-            find_library(${VAR}_LIBFILES NAME ${LIB_NAMES} PATHS)
+            find_library(${VAR}_LIBFILES NAME ${LIB_NAMES} PATHS ENV ${MOD_NAME}_ROOT)
             if(${${VAR}_LIBFILES} MATCHES "${VAR}_LIBFILES-NOTFOUND")
                 set(STATUS "Could not find ${VAR} runtime binaries!")
                 set(HAVE_${VAR} FALSE PARENT_SCOPE)
@@ -203,7 +204,7 @@
                 message(STATUS "${VAR} libraries: ${${VAR}_LIBFILES}")
             endif()

-            find_file(${VAR}_HDRFILES NAME ${HEADER_NAMES} PATHS)
+            find_file(${VAR}_HDRFILES NAME ${HEADER_NAMES} PATHS ENV ${MOD_NAME}_ROOT)
             if(${${VAR}_HDRFILES} MATCHES "${VAR}_HDRFILES-NOTFOUND")
                 message(STATUS "Could not find ${VAR} header files!")
                 set(HAVE_${VAR} FALSE PARENT_SCOPE)


remove workaround for now obsolete version of clang

--- cmakemodules/script_pcl.cmake
+++ cmakemodules/script_pcl.cmake
@@ -15,13 +15,6 @@
 	# --------------------------------------------
 	find_package(PCL COMPONENTS io common registration visualization segmentation surface QUIET)
 	if(PCL_FOUND AND PCL_IO_FOUND AND PCL_COMMON_FOUND AND PCL_REGISTRATION_FOUND AND PCL_VISUALIZATION_FOUND AND PCL_SURFACE_FOUND)
-
-		# Filter: It seems clang + c++11 fails to build against PCL (for clang <3.5):
-		if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND NOT ${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER "3.4")
-			message(WARNING "Disabling PCL because of incompatibility between clang ${CMAKE_CXX_COMPILER_VERSION} and PCL with c++11 enabled")
-			set(DISABLE_PCL ON)
-			return()
-		endif ()

 		set(CMAKE_MRPT_HAS_PCL 1)
 		set(CMAKE_MRPT_HAS_PCL_SYSTEM 1)


CELIX-73: Fixed the FindCunit module to use the correct search paths

git-svn-id: b0a1bd8fd09963d3661abf01547333b64b62a32b@1524747 13f79535-47bb-0310-9956-ffa450edef68

--- cmake/modules/FindCUnit.cmake
+++ cmake/modules/FindCUnit.cmake
@@ -19,10 +19,10 @@
 	include(FindCurses)
 endif (NOT WIN32)

-FIND_PATH(CUNIT_INCLUDE_DIR Basic.h
-  /usr/local/include/CUnit
-  /usr/include/CUnit
-  /opt/local/include/CUnit
+FIND_PATH(CUNIT_INCLUDE_DIR CUnit/Basic.h
+  /usr/local/include
+  /usr/include
+  /opt/local/include
 )

 FIND_PATH(CUNIT_SHARE_DIR CUnit-List.dtd


add CMAKE_INSTALL_PREFIX to DEFAULT_SOUNDFONT

addresses #332

--- cmake_admin/DefaultDirs.cmake
+++ cmake_admin/DefaultDirs.cmake
@@ -6,7 +6,7 @@
   set (DEFAULT_SOUNDFONT "C:\\\\soundfonts\\\\default.sf2" CACHE STRING
        "Default soundfont file")
 else ( WIN32 )
-  set (DEFAULT_SOUNDFONT "share/soundfonts/default.sf2" CACHE STRING
+  set (DEFAULT_SOUNDFONT "${CMAKE_INSTALL_PREFIX}/share/soundfonts/default.sf2" CACHE STRING
        "Default soundfont file")
 endif ( WIN32 )
 mark_as_advanced (DEFAULT_SOUNDFONT)


Minor change to ensure paths are right

Minor change to ensure paths are right

--- cmake_modules/FindGamma.cmake
+++ cmake_modules/FindGamma.cmake
@@ -47,7 +47,7 @@
     NAMES
 	  Gamma.h
     PATHS
-	../../Gamma/Gamma
+	${CMAKE_SOURCE_DIR}/../../Gamma/Gamma
       /usr/include/Gamma
       /usr/local/include/Gamma
       /opt/local/include/Gamma
@@ -59,10 +59,10 @@
 	  Gamma
 	  libGamma
     PATHS
-	../../Gamma/build/lib
+	${CMAKE_SOURCE_DIR}/../../Gamma/build/lib
       /usr/lib
+      /opt/local/lib
       /usr/local/lib
-      /opt/local/lib
       /sw/lib
   )


Fixed a build error related to a git formatting-cmake formatting change.

--- VERSION.cmake
+++ VERSION.cmake
@@ -13,7 +13,8 @@
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
     OUTPUT_VARIABLE GIT_DESCRIBE_TAGS ERROR_QUIET)
   if(GIT_DESCRIBE_TAGS)
-    string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION "${GIT_DESCRIBE_TAGS}")
+    string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION_INTERMEDIATE "${GIT_DESCRIBE_TAGS}")
+    string(REPLACE "\n" "" GIT_REVISION "${GIT_REVISION_INTERMEDIATE}")
     if(GIT_REVISION)
       set(PROJECT_VERSION_FULL "${GIT_REVISION}")
     endif(GIT_REVISION)


disable integer sanitization on android as it is not supported

--- toolchains/android-studio.toolchain.cmake
+++ toolchains/android-studio.toolchain.cmake
@@ -49,6 +49,8 @@
     #                                         (11.08.2016. Nenad Miksa)
     unset( TNUN_compiler_runtime_sanity_checks )
     unset( TNUN_linker_runtime_sanity_checks )
+    unset( TNUN_compiler_runtime_integer_checks )
+    unset( TNUN_linker_runtime_integer_checks )
 else()
     include( "${CMAKE_CURRENT_LIST_DIR}/gcc.cmake" )
 endif()


Fix for win32

Fix for win32

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -52,10 +52,20 @@
 endforeach(lib)

 # I think that this is already handled by boost.
-if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
+# if(OTB_TARGET_SYSTEM_ARCH_IS_X64)
+#   set(BOOST_SB_CONFIG
+#     ${BOOST_SB_CONFIG}
+#     address-model=64)
+# endif()
+
+# This is needed because otherwise boost is building both x32 and x64 lib,
+# and during packages on win32 we are installing all libs.
+# See Packaging/install_importlibs.cmake
+
+if ( WIN32 )
   set(BOOST_SB_CONFIG
     ${BOOST_SB_CONFIG}
-    address-model=64)
+    address-model=32)
 endif()

 set(BOOST_SB_CONFIG


add Mathematica 11.1 to list of known versions

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -244,7 +244,7 @@
 	# Mathematica products in order of preference
 	set (_MathematicaApps "Mathematica" "gridMathematica Server")
 	# Mathematica product versions in order of preference
-	set (_MathematicaVersions "11.0" "10.4" "10.3" "10.2" "10.1" "10.0" "9.0" "8.0" "7.0" "6.0" "5.2")
+	set (_MathematicaVersions "11.1" "11.0" "10.4" "10.3" "10.2" "10.1" "10.0" "9.0" "8.0" "7.0" "6.0" "5.2")
 	# search for explicitly requested application version first
 	if (Mathematica_FIND_VERSION AND Mathematica_FIND_VERSION_EXACT)
 		foreach (_product IN LISTS _MathematicaApps)


add Mathematica 11.2 support

add Mathematica 11.2 support

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -244,7 +244,7 @@
 	# Mathematica products in order of preference
 	set (_MathematicaApps "Mathematica" "gridMathematica Server")
 	# Mathematica product versions in order of preference
-	set (_MathematicaVersions "11.1" "11.0" "10.4" "10.3" "10.2" "10.1" "10.0" "9.0" "8.0" "7.0" "6.0" "5.2")
+	set (_MathematicaVersions "11.2" "11.1" "11.0" "10.4" "10.3" "10.2" "10.1" "10.0" "9.0" "8.0" "7.0" "6.0" "5.2")
 	# search for explicitly requested application version first
 	if (Mathematica_FIND_VERSION AND Mathematica_FIND_VERSION_EXACT)
 		foreach (_product IN LISTS _MathematicaApps)
@@ -1958,12 +1958,12 @@
 			else()
 				set (_versionLine "")
 			endif()
-		elseif (Mathematica_MathLink_INCLUDE_DIR AND
+		elseif (DEFINED Mathematica_MathLink_INCLUDE_DIR AND
 			EXISTS "${Mathematica_MathLink_INCLUDE_DIR}/mathlink.h")
 			# parse version number from mathlink.h
 			file (STRINGS "${Mathematica_MathLink_INCLUDE_DIR}/mathlink.h" _versionLine
 				REGEX ".*define.*MLMATHVERSION.*")
-		elseif (Mathematica_MathLink_HOST_INCLUDE_DIR AND
+		elseif (DEFINED Mathematica_MathLink_HOST_INCLUDE_DIR AND
 			EXISTS "${Mathematica_MathLink_HOST_INCLUDE_DIR}/mathlink.h")
 			# parse version number from mathlink.h
 			file (STRINGS "${Mathematica_MathLink_HOST_INCLUDE_DIR}/mathlink.h" _versionLine
@@ -2033,11 +2033,13 @@
 			if (DEFINED Mathematica_WSTP_FIND_VERSION_MAJOR)
 				set (_wstpInterface "${Mathematica_WSTP_FIND_VERSION_MAJOR}")
 			else()
-				file (STRINGS "${_file}" _wstpInterfaceLine REGEX ".*define.*WSINTERFACE.*")
-				string (REGEX REPLACE "[^0-9]*([0-9]+).*" "\\1" _wstpInterface
-					${_wstpInterfaceLine})
-			endif()
-			file (STRINGS "${_file}" _wstpRevisionLine REGEX ".*define.*WSREVISION.*")
+				file (STRINGS "${_file}" _wstpInterfaceLine REGEX ".*define.*(WS|ML)INTERFACE.*")
+				if (_wstpInterfaceLine)
+					string (REGEX REPLACE "[^0-9]*([0-9]+).*" "\\1" _wstpInterface
+						${_wstpInterfaceLine})
+				endif()
+			endif()
+			file (STRINGS "${_file}" _wstpRevisionLine REGEX ".*define.*(WS|ML)REVISION.*")
 			string (REGEX REPLACE "[^0-9]*([0-9]+).*" "\\1" _wstpRevision
 				${_wstpRevisionLine})
 			if (DEFINED _wstpInterface AND DEFINED _wstpRevision)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Added libclang version 3.9.0, in addition to 3.9, to FindLibClang.cmake

--- cmake/Modules/FindLibClang.cmake
+++ cmake/Modules/FindLibClang.cmake
@@ -14,7 +14,8 @@
 #               Known LLVM release numbers.

 # most recent versions come first
-set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.9
+set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.9.0
+  3.9
   3.8.1
   3.8
   3.7.1


Fix bug introduced by a5378b9bf27e2e3a6812aea5163243e417c03f23

If the python files and schema were modifed the CMake files that contain
the generated targets would not be recreated. Now the CMake code
explicitly maintains a list of files that the generation of the target
files depends on so that if any of those files change regeneration
is forced.

--- cmake/add_svcomp_benchmark.cmake
+++ cmake/add_svcomp_benchmark.cmake
@@ -1,8 +1,30 @@
+# List of additional files that generation of target
+# include files should depend on. This ensures that if these
+# files change the files containing the benchmark targets
+# get regenerated (i.e. OUTPUT_FILE in add_svcomp_benchmark())
+set(SVCOMP_ADDITIONAL_GEN_CMAKE_INC_DEPS
+  "${CMAKE_SOURCE_DIR}/svcb/benchmark.py"
+  "${CMAKE_SOURCE_DIR}/svcb/build.py"
+  "${CMAKE_SOURCE_DIR}/svcb/schema.py"
+  "${CMAKE_SOURCE_DIR}/svcb/schema.yml"
+  "${CMAKE_SOURCE_DIR}/svcb/util.py"
+  "${CMAKE_SOURCE_DIR}/svcb-emit-cmake-decls.py"
+)
+
 macro(add_svcomp_benchmark BENCHMARK_DIR)
   set(INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${BENCHMARK_DIR}/spec.yml)
   set(OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${BENCHMARK_DIR}_targets.cmake)
   # Only re-generate the file if necessary so that re-configure is as fast as possible
-  if ("${INPUT_FILE}" IS_NEWER_THAN "${OUTPUT_FILE}")
+  set(_should_force_regen FALSE)
+  foreach (dep ${SVCOMP_ADDITIONAL_GEN_CMAKE_INC_DEPS})
+    if (NOT EXISTS "${dep}")
+      message(FATAL_ERROR "Dependency \"${dep}\" does not exist")
+    endif()
+    if ("${dep}" IS_NEWER_THAN "${OUTPUT_FILE}")
+      set(_should_force_regen TRUE)
+    endif()
+  endforeach()
+  if (("${INPUT_FILE}" IS_NEWER_THAN "${OUTPUT_FILE}") OR ${_should_force_regen})
     message(STATUS "Generating \"${OUTPUT_FILE}\"")
     execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/svcb-emit-cmake-decls.py
                             ${INPUT_FILE}
@@ -18,4 +40,8 @@
   include(${OUTPUT_FILE})
   # Let CMake know that configuration depends on the benchmark specification file
   set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${INPUT_FILE}")
+  foreach (dep ${SVCOMP_ADDITIONAL_GEN_CMAKE_INC_DEPS})
+    set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dep}")
+  endforeach()
+  unset(_should_force_regen)
 endmacro()


cmake fix export paths for ninja

cmake fix export paths for ninja

-make nuttx build a bit quieter

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -222,27 +222,22 @@

 	# export
 	file(GLOB_RECURSE config_files ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}/*)
-	add_custom_command(OUTPUT ${CONFIG}.export
+	add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CONFIG}.export
 		COMMAND ${ECHO} Configuring NuttX for ${CONFIG}
-		COMMAND ${MAKE} -C${nuttx_src}/nuttx -j${THREADS}
-			-r --quiet distclean
-		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG}
-			${nuttx_src}/nuttx/configs
-		COMMAND cd ${nuttx_src}/nuttx/tools &&
-			./configure.sh ${CONFIG}/nsh
+		COMMAND ${MAKE} -C${nuttx_src}/nuttx -r --quiet distclean
+		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/nuttx-configs/${CONFIG} ${nuttx_src}/nuttx/configs
+		COMMAND cd ${nuttx_src}/nuttx/tools && ./configure.sh ${CONFIG}/nsh
 		COMMAND ${ECHO} Exporting NuttX for ${CONFIG}
-		COMMAND ${MAKE} -C ${nuttx_src}/nuttx -j${THREADS}
-			-r CONFIG_ARCH_BOARD=${CONFIG} export
-		COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip
-			${CONFIG}.export
+		COMMAND ${MAKE} --quiet -C ${nuttx_src}/nuttx -j${THREADS} -r CONFIG_ARCH_BOARD=${CONFIG} export
+		COMMAND ${CP} -r ${nuttx_src}/nuttx/nuttx-export.zip ${CMAKE_BINARY_DIR}/${CONFIG}.export
 		DEPENDS ${config_files} ${DEPENDS} __nuttx_copy_${CONFIG})

 	# extract
 	add_custom_command(OUTPUT nuttx_export_${CONFIG}.stamp
 		COMMAND ${RM} -rf ${nuttx_src}/nuttx-export
-		COMMAND ${UNZIP} ${CONFIG}.export -d ${nuttx_src}
+		COMMAND ${UNZIP} -q ${CMAKE_BINARY_DIR}/${CONFIG}.export -d ${nuttx_src}
 		COMMAND ${TOUCH} nuttx_export_${CONFIG}.stamp
-		DEPENDS ${DEPENDS} ${CONFIG}.export)
+		DEPENDS ${DEPENDS} ${CMAKE_BINARY_DIR}/${CONFIG}.export)

 	add_custom_target(${OUT}
 		DEPENDS nuttx_export_${CONFIG}.stamp)


Use our custom IPython

Use our custom IPython

--- CMake/Externals/External_IPython.cmake
+++ CMake/Externals/External_IPython.cmake
@@ -23,8 +23,9 @@

   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
-    GIT_REPOSITORY "${git_protocol}://github.com/ipython/ipython.git"
-    GIT_TAG "rel-3.2.0"
+    GIT_REPOSITORY "${git_protocol}://github.com/jcfr/IPython.git"
+    # Topic rel-3.2.0-integrate-zmq-kernalapp-with-pythonqt
+    GIT_TAG "f3760f9256540f3b58713ab16cdfabf02564e539"
     SOURCE_DIR ${proj}
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""


Remove cmake policy warning

Remove cmake policy warning

--- cmake/common/CommonAPICodeGenCommonConfig.cmake
+++ cmake/common/CommonAPICodeGenCommonConfig.cmake
@@ -178,7 +178,7 @@

 	get_library_name(LIBRARY_NAME ${interface})
 	set(PKGCONFIG_FILENAME ${LIBRARY_NAME}.pc)
-    file(WRITE ${PROJECT_BINARY_DIR}/${PKGCONFIG_FILENAME} "prefix=@CMAKE_INSTALL_PREFIX@
+    file(WRITE ${PROJECT_BINARY_DIR}/${PKGCONFIG_FILENAME} "prefix=${CMAKE_INSTALL_PREFIX}
 exec_prefix=\${prefix}
 libdir=\${prefix}/lib
 includedir=\${prefix}/include
@@ -187,8 +187,8 @@
 Description: ${interface} Common-API Service
 Version:
 Requires: CommonAPI
-Libs: -Wl,--no-as-needed,-l${LIBRARY_NAME}_Backend,--as-needed -l${LIBRARY_NAME}_Backend -L\${libdir} @DEVELOPMENT_LIBRARY_PATH@
-Cflags: @DEVELOPMENT_INCLUDE_PATH@ -I\${includedir}/CommonAPIServices
+Libs: -Wl,--no-as-needed,-l${LIBRARY_NAME}_Backend,--as-needed -l${LIBRARY_NAME}_Backend -L\${libdir} ${DEVELOPMENT_LIBRARY_PATH}
+Cflags: ${DEVELOPMENT_INCLUDE_PATH} -I\${includedir}/CommonAPIServices
 ")

     install(FILES ${PROJECT_BINARY_DIR}/${PKGCONFIG_FILENAME} DESTINATION lib/pkgconfig)


[perf-test] [cmake] Refactor out arch/optset specific code from swift_benchmark_compile into swift_benchmark_compile_archopts.

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -20,6 +20,287 @@
   set(${RUNCMD_VARIABLE} ${${RUNCMD_VARIABLE}} PARENT_SCOPE)
 endfunction(runcmd)

+function (swift_benchmark_compile_archopts)
+  cmake_parse_arguments(BENCH_COMPILE_ARCHOPTS "" "PLATFORM;ARCH;OPT" "" ${ARGN})
+  set(sdk ${${BENCH_COMPILE_ARCHOPTS_PLATFORM}_sdk})
+  set(ver ${${BENCH_COMPILE_ARCHOPTS_PLATFORM}_ver})
+  set(triple_platform ${${BENCH_COMPILE_ARCHOPTS_PLATFORM}_triple_platform})
+
+  set(target "${BENCH_COMPILE_ARCHOPTS_ARCH}-apple-${triple_platform}${ver}")
+
+  set(objdir "${CMAKE_CURRENT_BINARY_DIR}/${BENCH_COMPILE_ARCHOPTS_OPT}-${target}")
+  file(MAKE_DIRECTORY "${objdir}")
+
+  string(REGEX REPLACE "_.*" "" optflag "${BENCH_COMPILE_ARCHOPTS_OPT}")
+  string(REGEX REPLACE "^[^_]+" "" opt_suffix "${BENCH_COMPILE_ARCHOPTS_OPT}")
+
+  set(benchvar "BENCHOPTS${opt_suffix}")
+  if (NOT DEFINED ${benchvar})
+    message(FATAL_ERROR "Invalid benchmark configuration ${BENCH_COMPILE_ARCHOPTS_OPT}")
+  endif()
+
+  set(bench_flags "${${benchvar}}")
+
+  set(common_options
+      "-c"
+      "-sdk" "${sdk}"
+      "-target" "${target}"
+      "-F" "${sdk}/../../../Developer/Library/Frameworks"
+      "-${BENCH_COMPILE_ARCHOPTS_OPT}"
+      "-D" "INTERNAL_CHECKS_ENABLED"
+      "-D" "SWIFT_ENABLE_OBJECT_LITERALS"
+      "-no-link-objc-runtime")
+
+  # Always optimize the driver modules.
+  # Note that we compile the driver for Ounchecked also with -Ounchecked
+  # (and not with -O), because of <rdar://problem/19614516>.
+  string(REPLACE "Onone" "O" driver_opt "${optflag}")
+
+  set(common_options_driver
+      "-c"
+      "-sdk" "${sdk}"
+      "-target" "${target}"
+      "-F" "${sdk}/../../../Developer/Library/Frameworks"
+      "-${driver_opt}"
+      "-D" "INTERNAL_CHECKS_ENABLED"
+      "-D" "SWIFT_ENABLE_OBJECT_LITERALS"
+      "-no-link-objc-runtime")
+
+  set(bench_library_objects)
+  set(bench_library_sibfiles)
+  foreach(module_name ${BENCH_DRIVER_LIBRARY_MODULES})
+    if("${module_name}" STREQUAL "DriverUtils")
+      set(extra_sources "${srcdir}/utils/ArgParse.swift")
+    endif()
+
+    set(objfile "${objdir}/${module_name}.o")
+    set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+    list(APPEND bench_library_objects "${objfile}")
+    set(source "${srcdir}/utils/${module_name}.swift")
+    add_custom_command(
+        OUTPUT "${objfile}"
+        DEPENDS ${stdlib_dependencies} "${source}" ${extra_sources}
+        COMMAND "${SWIFT_EXEC}"
+        ${common_options_driver}
+        ${BENCH_DRIVER_LIBRARY_FLAGS}
+        "-force-single-frontend-invocation"
+        "-parse-as-library"
+        "-module-name" "${module_name}"
+        "-emit-module" "-emit-module-path" "${swiftmodule}"
+        "-o" "${objfile}"
+        "${source}" ${extra_sources})
+    if(SWIFT_BENCHMARK_EMIT_SIB)
+      set(sibfile "${objdir}/${module_name}.sib")
+      list(APPEND bench_library_sibfiles "${sibfile}")
+      add_custom_command(
+          OUTPUT "${sibfile}"
+          DEPENDS
+            ${stdlib_dependencies} "${srcdir}/utils/${module_name}.swift"
+            ${extra_sources}
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options_driver}
+          ${BENCH_DRIVER_LIBRARY_FLAGS}
+          "-force-single-frontend-invocation"
+          "-parse-as-library"
+          "-module-name" "${module_name}"
+          "-emit-sib"
+          "-o" "${sibfile}"
+          "${srcdir}/utils/${module_name}.swift" ${extra_sources})
+    endif()
+  endforeach()
+
+  foreach(module_name ${BENCH_LIBRARY_MODULES})
+    set(objfile "${objdir}/${module_name}.o")
+    set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+    list(APPEND bench_library_objects "${objfile}")
+    add_custom_command(
+        OUTPUT "${objfile}"
+        DEPENDS
+          ${stdlib_dependencies} "${srcdir}/utils/${module_name}.swift"
+          ${extra_sources}
+        COMMAND "${SWIFT_EXEC}"
+        ${common_options}
+        "-force-single-frontend-invocation"
+        "-parse-as-library"
+        "-module-name" "${module_name}"
+        "-emit-module" "-emit-module-path" "${swiftmodule}"
+        "-o" "${objfile}"
+        "${srcdir}/utils/${module_name}.swift" ${extra_sources})
+    if (SWIFT_BENCHMARK_EMIT_SIB)
+      set(sibfile "${objdir}/${module_name}.sib")
+      list(APPEND bench_library_sibfiles "${sibfile}")
+      add_custom_command(
+          OUTPUT "${sibfile}"
+          DEPENDS
+            ${stdlib_dependencies} "${srcdir}/utils/${module_name}.swift"
+            ${extra_sources}
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options}
+          "-force-single-frontend-invocation"
+          "-parse-as-library"
+          "-module-name" "${module_name}"
+          "-emit-sib"
+          "-o" "${sibfile}"
+          "${srcdir}/utils/${module_name}.swift" ${extra_sources})
+    endif()
+  endforeach()
+
+  set(SWIFT_BENCH_OBJFILES)
+  set(SWIFT_BENCH_SIBFILES)
+  foreach(module_name ${SWIFT_BENCH_MODULES})
+    if(module_name)
+      set(objfile "${objdir}/${module_name}.o")
+      set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+      list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
+      add_custom_command(
+          OUTPUT "${objfile}"
+          DEPENDS
+            ${stdlib_dependencies} ${bench_library_objects}
+            "${srcdir}/single-source/${module_name}.swift"
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options}
+          "-parse-as-library"
+          ${bench_flags}
+          "-module-name" "${module_name}"
+          "-emit-module" "-emit-module-path" "${swiftmodule}"
+          "-I" "${objdir}"
+          "-o" "${objfile}"
+          "${srcdir}/single-source/${module_name}.swift")
+      if (SWIFT_BENCHMARK_EMIT_SIB)
+        set(sibfile "${objdir}/${module_name}.sib")
+        list(APPEND SWIFT_BENCH_SIBFILES "${sibfile}")
+        add_custom_command(
+            OUTPUT "${sibfile}"
+            DEPENDS
+              ${stdlib_dependencies} ${bench_library_sibfiles}
+              "${srcdir}/single-source/${module_name}.swift"
+            COMMAND "${SWIFT_EXEC}"
+            ${common_options}
+            "-parse-as-library"
+            ${bench_flags}
+            "-module-name" "${module_name}"
+            "-I" "${objdir}"
+            "-emit-sib"
+            "-o" "${sibfile}"
+            "${srcdir}/single-source/${module_name}.swift")
+      endif()
+    endif()
+  endforeach()
+
+  foreach(module_name ${SWIFT_MULTISOURCE_BENCHES})
+    if ("${bench_flags}" MATCHES "-whole-module.*" AND
+        NOT "${bench_flags}" MATCHES "-num-threads.*")
+      # Regular whole-module-compilation: only a single object file is
+      # generated.
+      set(objfile "${objdir}/${module_name}.o")
+      list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
+      set(sources)
+      foreach(source ${${module_name}_sources})
+        list(APPEND sources "${srcdir}/multi-source/${source}")
+      endforeach()
+      add_custom_command(
+          OUTPUT "${objfile}"
+          DEPENDS
+            ${stdlib_dependencies} ${bench_library_objects} ${sources}
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options}
+          ${bench_flags}
+          "-parse-as-library"
+          "-emit-module" "-module-name" "${module_name}"
+          "-I" "${objdir}"
+          "-o" "${objfile}"
+          ${sources})
+    else()
+
+      # No whole-module-compilation or multi-threaded compilation.
+      # There is an output object file for each input file. We have to write
+      # an output-map-file to specify the output object file names.
+      set(sources)
+      set(objfiles)
+      set(json "{\n")
+      foreach(source ${${module_name}_sources})
+          list(APPEND sources "${srcdir}/multi-source/${source}")
+
+          get_filename_component(basename "${source}" NAME_WE)
+          set(objfile "${objdir}/${module_name}/${basename}.o")
+
+              string(CONCAT json "${json}"
+    "  \"${srcdir}/multi-source/${source}\": { \"object\": \"${objfile}\" },\n")
+
+          list(APPEND objfiles "${objfile}")
+          list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
+      endforeach()
+      string(CONCAT json "${json}" "}")
+      file(WRITE "${objdir}/${module_name}/outputmap.json" ${json})
+
+      add_custom_command(
+          OUTPUT ${objfiles}
+          DEPENDS
+            ${stdlib_dependencies} ${bench_library_objects} ${sources}
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options}
+          ${bench_flags}
+          "-parse-as-library"
+          "-module-name" "${module_name}"
+          "-I" "${objdir}"
+          "-output-file-map" "${objdir}/${module_name}/outputmap.json"
+          ${sources})
+    endif()
+  endforeach()
+
+  set(module_name "main")
+  set(source "${srcdir}/utils/${module_name}.swift")
+  add_custom_command(
+      OUTPUT "${objdir}/${module_name}.o"
+      DEPENDS
+        ${stdlib_dependencies}
+        ${bench_library_objects} ${SWIFT_BENCH_OBJFILES}
+        ${bench_library_sibfiles} ${SWIFT_BENCH_SIBFILES} "${source}"
+      COMMAND "${SWIFT_EXEC}"
+      ${common_options}
+      "-force-single-frontend-invocation"
+      "-emit-module" "-module-name" "${module_name}"
+      "-I" "${objdir}"
+      "-o" "${objdir}/${module_name}.o"
+      "${source}")
+  list(APPEND SWIFT_BENCH_OBJFILES "${objdir}/${module_name}.o")
+
+  if("${BENCH_COMPILE_ARCHOPTS_PLATFORM}" STREQUAL "macosx")
+    set(OUTPUT_EXEC "${bindir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}")
+  else()
+    set(OUTPUT_EXEC "${bindir}/Benchmark_${BENCH_COMPILE_ARCHOPTS_OPT}-${target}")
+  endif()
+
+  add_custom_command(
+      OUTPUT "${OUTPUT_EXEC}"
+      DEPENDS
+        ${bench_library_objects} ${SWIFT_BENCH_OBJFILES}
+        "adhoc-sign-swift-stdlib-${BENCH_COMPILE_ARCHOPTS_PLATFORM}"
+      COMMAND
+        "${CLANG_EXEC}"
+        "-fno-stack-protector"
+        "-fPIC"
+        "-Werror=date-time"
+        "-fcolor-diagnostics"
+        "-O3"
+        "-Wl,-search_paths_first"
+        "-Wl,-headerpad_max_install_names"
+        "-target" "${target}"
+        "-isysroot" "${sdk}"
+        "-arch" "${BENCH_COMPILE_ARCHOPTS_ARCH}"
+        "-F" "${sdk}/../../../Developer/Library/Frameworks"
+        "-m${triple_platform}-version-min=${ver}"
+        "-lobjc"
+        "-L${SWIFT_LIBRARY_PATH}/${BENCH_COMPILE_ARCHOPTS_PLATFORM}"
+        "-Xlinker" "-rpath"
+        "-Xlinker" "@executable_path/../lib/swift/${BENCH_COMPILE_ARCHOPTS_PLATFORM}"
+        ${bench_library_objects}
+        ${SWIFT_BENCH_OBJFILES}
+        "-o" "${OUTPUT_EXEC}"
+      COMMAND
+        "codesign" "-f" "-s" "-" "${OUTPUT_EXEC}")
+  set(new_output_exec "${OUTPUT_EXEC}" PARENT_SCOPE)
+endfunction()

 function(swift_benchmark_compile)
   cmake_parse_arguments(SWIFT_BENCHMARK_COMPILE "" "PLATFORM" "" ${ARGN})
@@ -43,286 +324,13 @@

   set(platform_executables)
   foreach(arch ${${SWIFT_BENCHMARK_COMPILE_PLATFORM}_arch})
+    set(platform_executables)
     foreach(optset ${SWIFT_OPTIMIZATION_LEVELS})
-      set(sdk ${${SWIFT_BENCHMARK_COMPILE_PLATFORM}_sdk})
-      set(ver ${${SWIFT_BENCHMARK_COMPILE_PLATFORM}_ver})
-      set(triple_platform ${${SWIFT_BENCHMARK_COMPILE_PLATFORM}_triple_platform})
-
-      set(target "${arch}-apple-${triple_platform}${ver}")
-
-      set(objdir "${CMAKE_CURRENT_BINARY_DIR}/${optset}-${target}")
-      file(MAKE_DIRECTORY "${objdir}")
-
-      string(REGEX REPLACE "_.*" "" optflag "${optset}")
-      string(REGEX REPLACE "^[^_]+" "" opt_suffix "${optset}")
-
-      set(benchvar "BENCHOPTS${opt_suffix}")
-      if (NOT DEFINED ${benchvar})
-        message(FATAL_ERROR "Invalid benchmark configuration ${optset}")
-      endif()
-
-      set(bench_flags "${${benchvar}}")
-
-      set(common_options
-          "-c"
-          "-sdk" "${sdk}"
-          "-target" "${target}"
-          "-F" "${sdk}/../../../Developer/Library/Frameworks"
-          "-${optset}"
-          "-D" "INTERNAL_CHECKS_ENABLED"
-          "-D" "SWIFT_ENABLE_OBJECT_LITERALS"
-          "-no-link-objc-runtime")
-
-      # Always optimize the driver modules.
-      # Note that we compile the driver for Ounchecked also with -Ounchecked
-      # (and not with -O), because of <rdar://problem/19614516>.
-      string(REPLACE "Onone" "O" driver_opt "${optflag}")
-
-      set(common_options_driver
-          "-c"
-          "-sdk" "${sdk}"
-          "-target" "${target}"
-          "-F" "${sdk}/../../../Developer/Library/Frameworks"
-          "-${driver_opt}"
-          "-D" "INTERNAL_CHECKS_ENABLED"
-          "-D" "SWIFT_ENABLE_OBJECT_LITERALS"
-          "-no-link-objc-runtime")
-
-      set(bench_library_objects)
-      set(bench_library_sibfiles)
-      foreach(module_name ${BENCH_DRIVER_LIBRARY_MODULES})
-        if("${module_name}" STREQUAL "DriverUtils")
-          set(extra_sources "${srcdir}/utils/ArgParse.swift")
-        endif()
-
-        set(objfile "${objdir}/${module_name}.o")
-        set(swiftmodule "${objdir}/${module_name}.swiftmodule")
-        list(APPEND bench_library_objects "${objfile}")
-        set(source "${srcdir}/utils/${module_name}.swift")
-        add_custom_command(
-            OUTPUT "${objfile}"
-            DEPENDS ${stdlib_dependencies} "${source}" ${extra_sources}
-            COMMAND "${SWIFT_EXEC}"
-            ${common_options_driver}
-            ${BENCH_DRIVER_LIBRARY_FLAGS}
-            "-force-single-frontend-invocation"
-            "-parse-as-library"
-            "-module-name" "${module_name}"
-            "-emit-module" "-emit-module-path" "${swiftmodule}"
-            "-o" "${objfile}"
-            "${source}" ${extra_sources})
-        if(SWIFT_BENCHMARK_EMIT_SIB)
-          set(sibfile "${objdir}/${module_name}.sib")
-          list(APPEND bench_library_sibfiles "${sibfile}")
-          add_custom_command(
-              OUTPUT "${sibfile}"
-              DEPENDS
-                ${stdlib_dependencies} "${srcdir}/utils/${module_name}.swift"
-                ${extra_sources}
-              COMMAND "${SWIFT_EXEC}"
-              ${common_options_driver}
-              ${BENCH_DRIVER_LIBRARY_FLAGS}
-              "-force-single-frontend-invocation"
-              "-parse-as-library"
-              "-module-name" "${module_name}"
-              "-emit-sib"
-              "-o" "${sibfile}"
-              "${srcdir}/utils/${module_name}.swift" ${extra_sources})
-        endif()
-      endforeach()
-
-      foreach(module_name ${BENCH_LIBRARY_MODULES})
-        set(objfile "${objdir}/${module_name}.o")
-        set(swiftmodule "${objdir}/${module_name}.swiftmodule")
-        list(APPEND bench_library_objects "${objfile}")
-        add_custom_command(
-            OUTPUT "${objfile}"
-            DEPENDS
-              ${stdlib_dependencies} "${srcdir}/utils/${module_name}.swift"
-              ${extra_sources}
-            COMMAND "${SWIFT_EXEC}"
-            ${common_options}
-            "-force-single-frontend-invocation"
-            "-parse-as-library"
-            "-module-name" "${module_name}"
-            "-emit-module" "-emit-module-path" "${swiftmodule}"
-            "-o" "${objfile}"
-            "${srcdir}/utils/${module_name}.swift" ${extra_sources})
-        if (SWIFT_BENCHMARK_EMIT_SIB)
-          set(sibfile "${objdir}/${module_name}.sib")
-          list(APPEND bench_library_sibfiles "${sibfile}")
-          add_custom_command(
-              OUTPUT "${sibfile}"
-              DEPENDS
-                ${stdlib_dependencies} "${srcdir}/utils/${module_name}.swift"
-                ${extra_sources}
-              COMMAND "${SWIFT_EXEC}"
-              ${common_options}
-              "-force-single-frontend-invocation"
-              "-parse-as-library"
-              "-module-name" "${module_name}"
-              "-emit-sib"
-              "-o" "${sibfile}"
-              "${srcdir}/utils/${module_name}.swift" ${extra_sources})
-        endif()
-      endforeach()
-
-      set(SWIFT_BENCH_OBJFILES)
-      set(SWIFT_BENCH_SIBFILES)
-      foreach(module_name ${SWIFT_BENCH_MODULES})
-        if(module_name)
-          set(objfile "${objdir}/${module_name}.o")
-          set(swiftmodule "${objdir}/${module_name}.swiftmodule")
-          list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
-          add_custom_command(
-              OUTPUT "${objfile}"
-              DEPENDS
-                ${stdlib_dependencies} ${bench_library_objects}
-                "${srcdir}/single-source/${module_name}.swift"
-              COMMAND "${SWIFT_EXEC}"
-              ${common_options}
-              "-parse-as-library"
-              ${bench_flags}
-              "-module-name" "${module_name}"
-              "-emit-module" "-emit-module-path" "${swiftmodule}"
-              "-I" "${objdir}"
-              "-o" "${objfile}"
-              "${srcdir}/single-source/${module_name}.swift")
-          if (SWIFT_BENCHMARK_EMIT_SIB)
-            set(sibfile "${objdir}/${module_name}.sib")
-            list(APPEND SWIFT_BENCH_SIBFILES "${sibfile}")
-            add_custom_command(
-                OUTPUT "${sibfile}"
-                DEPENDS
-                  ${stdlib_dependencies} ${bench_library_sibfiles}
-                  "${srcdir}/single-source/${module_name}.swift"
-                COMMAND "${SWIFT_EXEC}"
-                ${common_options}
-                "-parse-as-library"
-                ${bench_flags}
-                "-module-name" "${module_name}"
-                "-I" "${objdir}"
-                "-emit-sib"
-                "-o" "${sibfile}"
-                "${srcdir}/single-source/${module_name}.swift")
-          endif()
-        endif()
-      endforeach()
-
-      foreach(module_name ${SWIFT_MULTISOURCE_BENCHES})
-        if ("${bench_flags}" MATCHES "-whole-module.*" AND
-            NOT "${bench_flags}" MATCHES "-num-threads.*")
-          # Regular whole-module-compilation: only a single object file is
-          # generated.
-          set(objfile "${objdir}/${module_name}.o")
-          list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
-          set(sources)
-          foreach(source ${${module_name}_sources})
-            list(APPEND sources "${srcdir}/multi-source/${source}")
-          endforeach()
-          add_custom_command(
-              OUTPUT "${objfile}"
-              DEPENDS
-                ${stdlib_dependencies} ${bench_library_objects} ${sources}
-              COMMAND "${SWIFT_EXEC}"
-              ${common_options}
-              ${bench_flags}
-              "-parse-as-library"
-              "-emit-module" "-module-name" "${module_name}"
-              "-I" "${objdir}"
-              "-o" "${objfile}"
-              ${sources})
-        else()
-
-          # No whole-module-compilation or multi-threaded compilation.
-          # There is an output object file for each input file. We have to write
-          # an output-map-file to specify the output object file names.
-          set(sources)
-          set(objfiles)
-          set(json "{\n")
-          foreach(source ${${module_name}_sources})
-              list(APPEND sources "${srcdir}/multi-source/${source}")
-
-              get_filename_component(basename "${source}" NAME_WE)
-              set(objfile "${objdir}/${module_name}/${basename}.o")
-
-              string(CONCAT json "${json}"
-    "  \"${srcdir}/multi-source/${source}\": { \"object\": \"${objfile}\" },\n")
-
-              list(APPEND objfiles "${objfile}")
-              list(APPEND SWIFT_BENCH_OBJFILES "${objfile}")
-          endforeach()
-          string(CONCAT json "${json}" "}")
-          file(WRITE "${objdir}/${module_name}/outputmap.json" ${json})
-
-          add_custom_command(
-              OUTPUT ${objfiles}
-              DEPENDS
-                ${stdlib_dependencies} ${bench_library_objects} ${sources}
-              COMMAND "${SWIFT_EXEC}"
-              ${common_options}
-              ${bench_flags}
-              "-parse-as-library"
-              "-module-name" "${module_name}"
-              "-I" "${objdir}"
-              "-output-file-map" "${objdir}/${module_name}/outputmap.json"
-              ${sources})
-        endif()
-      endforeach()
-
-      set(module_name "main")
-      set(source "${srcdir}/utils/${module_name}.swift")
-      add_custom_command(
-          OUTPUT "${objdir}/${module_name}.o"
-          DEPENDS
-            ${stdlib_dependencies}
-            ${bench_library_objects} ${SWIFT_BENCH_OBJFILES}
-            ${bench_library_sibfiles} ${SWIFT_BENCH_SIBFILES} "${source}"
-          COMMAND "${SWIFT_EXEC}"
-          ${common_options}
-          "-force-single-frontend-invocation"
-          "-emit-module" "-module-name" "${module_name}"
-          "-I" "${objdir}"
-          "-o" "${objdir}/${module_name}.o"
-          "${source}")
-      list(APPEND SWIFT_BENCH_OBJFILES "${objdir}/${module_name}.o")
-
-      if("${SWIFT_BENCHMARK_COMPILE_PLATFORM}" STREQUAL "macosx")
-        set(OUTPUT_EXEC "${bindir}/Benchmark_${optset}")
-      else()
-        set(OUTPUT_EXEC "${bindir}/Benchmark_${optset}-${target}")
-      endif()
-
-      add_custom_command(
-          OUTPUT "${OUTPUT_EXEC}"
-          DEPENDS
-            ${bench_library_objects} ${SWIFT_BENCH_OBJFILES}
-            "adhoc-sign-swift-stdlib-${SWIFT_BENCHMARK_COMPILE_PLATFORM}"
-          COMMAND
-            "${CLANG_EXEC}"
-            "-fno-stack-protector"
-            "-fPIC"
-            "-Werror=date-time"
-            "-fcolor-diagnostics"
-            "-O3"
-            "-Wl,-search_paths_first"
-            "-Wl,-headerpad_max_install_names"
-            "-target" "${target}"
-            "-isysroot" "${sdk}"
-            "-arch" "${arch}"
-            "-F" "${sdk}/../../../Developer/Library/Frameworks"
-            "-m${triple_platform}-version-min=${ver}"
-            "-lobjc"
-            "-L${SWIFT_LIBRARY_PATH}/${SWIFT_BENCHMARK_COMPILE_PLATFORM}"
-            "-Xlinker" "-rpath"
-            "-Xlinker" "@executable_path/../lib/swift/${SWIFT_BENCHMARK_COMPILE_PLATFORM}"
-            ${bench_library_objects}
-            ${SWIFT_BENCH_OBJFILES}
-            "-o" "${OUTPUT_EXEC}"
-          COMMAND
-            "codesign" "-f" "-s" "-" "${OUTPUT_EXEC}")
-
-      list(APPEND platform_executables "${OUTPUT_EXEC}")
+      swift_benchmark_compile_archopts(
+        PLATFORM "${platform}"
+        ARCH "${arch}"
+        OPT "${optset}")
+      list(APPEND platform_executables ${new_output_exec})
     endforeach()

     set(executable_target "swift-benchmark-${SWIFT_BENCHMARK_COMPILE_PLATFORM}-${arch}")


try to link

try to link

--- cmake/custom/test.cmake
+++ cmake/custom/test.cmake
@@ -61,6 +61,7 @@
             fortran_test
             ${BALBOA_LIBS}
             xcint_fortran
+            ${BALBOA_LIBS}
             ${NUMGRID_LIBS}
             )


prep for 2.6.7

prep for 2.6.7

--- VERSION.cmake
+++ VERSION.cmake
@@ -44,10 +44,10 @@
 #    set COMPATMINOR to MINOR. (binary incompatible change)
 #

-# Package version 2.6.6
+# Package version 2.6.7
 SET(OPENWSMAN_MAJOR "2")
 SET(OPENWSMAN_MINOR "6")
-SET(OPENWSMAN_PATCH "6")
+SET(OPENWSMAN_PATCH "7")

 # Plugin API 2.2
 SET(OPENWSMAN_PLUGIN_API_MAJOR "2")


New version: 0.3.1

New version: 0.3.1

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "0")
+SET(HAWKEY_PATCH "1")


abseil lib linkage update

abseil lib linkage update

--- tensorflow/contrib/cmake/external/abseil_cpp.cmake
+++ tensorflow/contrib/cmake/external/abseil_cpp.cmake
@@ -49,6 +49,8 @@
           ${abseil_cpp_BUILD}/absl/base/Release/absl_base.lib
           ${abseil_cpp_BUILD}/absl/base/Release/absl_dynamic_annotations.lib
           ${abseil_cpp_BUILD}/absl/base/Release/absl_internal_malloc_internal.lib
+          ${abseil_cpp_BUILD}/absl/base/Release/absl_internal_throw_delegate.lib
+          ${abseil_cpp_BUILD}/absl/numeric/Release/absl_int128.lib
           ${abseil_cpp_BUILD}/absl/strings/Release/absl_strings.lib
           ${abseil_cpp_BUILD}/absl/strings/Release/str_format_internal.lib
           ${abseil_cpp_BUILD}/absl/types/Release/absl_bad_optional_access.lib)


Remove unnecessary boost packages.

Remove unnecessary boost packages.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -369,12 +369,8 @@

 function(dsn_setup_packages)
     set(DSN_BOOST_PACKAGES
-        thread
-        regex
         system
         filesystem
-        chrono
-        date_time
         )
     set(DSN_BOOST_LIBS "")
     ms_setup_boost(TRUE "${DSN_BOOST_PACKAGES}" DSN_BOOST_LIBS)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


lint: \t to spaces.

lint: \t to spaces.

--- toolchain/iOS.cmake
+++ toolchain/iOS.cmake
@@ -41,8 +41,8 @@
 # Determine the cmake host system version so we know where to find the iOS SDKs
 find_program (CMAKE_UNAME uname /bin /usr/bin /usr/local/bin)
 if (CMAKE_UNAME)
-	exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
-	string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
+    exec_program(uname ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
+    string (REGEX REPLACE "^([0-9]+)\\.([0-9]+).*$" "\\1" DARWIN_MAJOR_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
 endif (CMAKE_UNAME)

 # Force the compilers to gcc for iOS
@@ -54,32 +54,33 @@

 # Setup iOS platform unless specified manually with IOS_PLATFORM
 if (NOT DEFINED IOS_PLATFORM)
-	set (IOS_PLATFORM "OS")
+    set (IOS_PLATFORM "OS")
 endif (NOT DEFINED IOS_PLATFORM)
 set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")

 # Check the platform selection and setup for developer root
 if (${IOS_PLATFORM} STREQUAL "OS")
-	set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
-	set (XCODE_IOS_PLATFORM iphoneos)
-
-	# This causes the installers to properly locate the output libraries
-	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
+    set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")
+    set (XCODE_IOS_PLATFORM iphoneos)
+
+    # This causes the installers to properly locate the output libraries
+    set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
 elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
-	set (SIMULATOR true)
-	set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
-	set (XCODE_IOS_PLATFORM iphonesimulator)
-
-	# This causes the installers to properly locate the output libraries
-	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
+    set (SIMULATOR true)
+    set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
+    set (XCODE_IOS_PLATFORM iphonesimulator)
+
+    # This causes the installers to properly locate the output libraries
+    set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
 elseif (${IOS_PLATFORM} STREQUAL "WATCHOS")
     set (IOS_PLATFORM_LOCATION "WatchOS.platform")
-	set (XCODE_IOS_PLATFORM watchos)
-
-	# This causes the installers to properly locate the output libraries
-	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-watchos")
+    set (XCODE_IOS_PLATFORM watchos)
+
+    # This causes the installers to properly locate the output libraries
+    set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-watchos")
 else (${IOS_PLATFORM} STREQUAL "OS")
-	message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. "
+    message (FATAL_ERROR
+             "Unsupported IOS_PLATFORM value selected. "
              "Please choose OS, SIMULATOR, or WATCHOS.")
 endif ()

@@ -119,7 +120,7 @@
 # and still cmake didn't fail in CMakeFindBinUtils.cmake (because it isn't rerun)
 # hardcode CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did before, Alex
 if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
-	find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
+    find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
 endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)

 # Setup iOS deployment target
@@ -131,25 +132,25 @@
 set (XCODE_POST_43_ROOT "${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
 set (XCODE_PRE_43_ROOT "/Developer/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
 if (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
-	if (EXISTS ${XCODE_POST_43_ROOT})
-		set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
-	elseif(EXISTS ${XCODE_PRE_43_ROOT})
-		set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
-	endif (EXISTS ${XCODE_POST_43_ROOT})
+    if (EXISTS ${XCODE_POST_43_ROOT})
+        set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_POST_43_ROOT})
+    elseif(EXISTS ${XCODE_PRE_43_ROOT})
+        set (CMAKE_IOS_DEVELOPER_ROOT ${XCODE_PRE_43_ROOT})
+    endif (EXISTS ${XCODE_POST_43_ROOT})
 endif (NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
 set (CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform")

 # Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT
 if (NOT DEFINED CMAKE_IOS_SDK_ROOT)
-	file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
-	if (_CMAKE_IOS_SDKS)
-		list (SORT _CMAKE_IOS_SDKS)
-		list (REVERSE _CMAKE_IOS_SDKS)
-		list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
-	else (_CMAKE_IOS_SDKS)
-		message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
-	endif (_CMAKE_IOS_SDKS)
-	message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
+    file (GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
+    if (_CMAKE_IOS_SDKS)
+        list (SORT _CMAKE_IOS_SDKS)
+        list (REVERSE _CMAKE_IOS_SDKS)
+        list (GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
+    else (_CMAKE_IOS_SDKS)
+        message (FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
+    endif (_CMAKE_IOS_SDKS)
+    message (STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
 endif (NOT DEFINED CMAKE_IOS_SDK_ROOT)
 set (CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")

@@ -158,11 +159,11 @@

 # set the architecture for iOS
 if (IOS_PLATFORM STREQUAL "OS")
-	set (IOS_ARCH "armv7;armv7s;arm64")
+    set (IOS_ARCH "armv7;armv7s;arm64")
 elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
-	set (IOS_ARCH "i386;x86_64")
+    set (IOS_ARCH "i386;x86_64")
 elseif (IOS_PLATFORM STREQUAL "WATCHOS")
-	set (IOS_ARCH "armv7k")
+    set (IOS_ARCH "armv7k")
 endif ()

 set (CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE string  "Build architecture for iOS")
@@ -175,9 +176,9 @@

 # set up the default search directories for frameworks
 set (CMAKE_SYSTEM_FRAMEWORK_PATH
-	${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
-	${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
-	${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
+    ${CMAKE_IOS_SDK_ROOT}/System/Library/Frameworks
+    ${CMAKE_IOS_SDK_ROOT}/System/Library/PrivateFrameworks
+    ${CMAKE_IOS_SDK_ROOT}/Developer/Library/Frameworks
 )

 # only search the iOS sdks, not the remainder of the host filesystem
@@ -187,20 +188,20 @@

 # This little macro lets you set any XCode specific property
 macro (set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE)
-	set_property (TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
+    set_property (TARGET ${TARGET} PROPERTY XCODE_ATTRIBUTE_${XCODE_PROPERTY} ${XCODE_VALUE})
 endmacro (set_xcode_property)

 # This macro lets you find executable programs on the host system
 macro (find_host_package)
-	set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-	set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
-	set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
-	set (IOS FALSE)
-
-	find_package(${ARGN})
-
-	set (IOS TRUE)
-	set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
-	set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-	set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+    set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+    set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+    set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+    set (IOS FALSE)
+
+    find_package(${ARGN})
+
+    set (IOS TRUE)
+    set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+    set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+    set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 endmacro (find_host_package)


Add CMake argument for enabling ASAN/TSAN instrumentation

Needs to be explicitly enabled at config time, example:
```
./bootstrap-cmake.sh -u . -DVESPA_USE_SANITIZER=address
```
There is some interesting interaction between libLLVM and ASAN that
makes new/delete interception not work properly in all cases.
Binaries must be launched with `ASAN_OPTIONS=alloc_dealloc_mismatch=0`
to get around this.

System tests cannot readily be run with instrumentation yet due to
library load ordering issues.

--- build_settings.cmake
+++ build_settings.cmake
@@ -2,6 +2,14 @@
 # @author Vegard Sjonfjell

 include(${CMAKE_CURRENT_LIST_DIR}/vtag.cmake)
+
+if (VESPA_USE_SANITIZER)
+    if (VESPA_USE_SANITIZER STREQUAL "address" OR VESPA_USE_SANITIZER STREQUAL "thread")
+        message("-- Instrumenting code using ${VESPA_USE_SANITIZER} sanitizer")
+    else()
+        message(FATAL_ERROR "Unsupported sanitizer option '${VESPA_USE_SANITIZER}'. Supported: 'address' or 'thread'")
+    endif()
+endif()

 # Build options
 # Whether to build unit tests as part of the 'all' target
@@ -17,7 +25,13 @@
 set(AUTORUN_UNIT_TESTS FALSE CACHE BOOL "If TRUE, tests will be run immediately after linking the test executable")

 # Warnings
-set(C_WARN_OPTS "-Winline -Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+set(C_WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")
+if (VESPA_USE_SANITIZER)
+    # Instrumenting code changes binary size, which triggers inlining warnings that
+    # don't happen during normal, non-instrumented compilation.
+else()
+    set(C_WARN_OPTS "-Winline ${C_WARN_OPTS}")
+endif()

 # Warnings that are specific to C++ compilation
 # Note: this is not a union of C_WARN_OPTS, since CMAKE_CXX_FLAGS already includes CMAKE_C_FLAGS, which in turn includes C_WARN_OPTS transitively
@@ -47,6 +61,10 @@

 # C and C++ compiler flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 -fno-omit-frame-pointer ${C_WARN_OPTS} -fPIC ${VESPA_CXX_ABI_FLAGS} -DBOOST_DISABLE_ASSERTS ${VESPA_CPU_ARCH_FLAGS} ${EXTRA_C_FLAGS}")
+# AddressSanitizer/ThreadSanitizer work for both GCC and Clang
+if (VESPA_USE_SANITIZER)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=${VESPA_USE_SANITIZER}")
+endif()
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} ${CXX_SPECIFIC_WARN_OPTS} -std=c++1z -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")
 else()


use specific version of CIL for default build and master in DEVEL_BUILD

--- version_config.cmake
+++ version_config.cmake
@@ -138,11 +138,11 @@
   # CCPi CIL
   set(CIL_VERSION "19.02")
   set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
-  set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301)
+  set(DEFAULT_CCPi-Framework_TAG origin/master)
   set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
-  set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}")
+  set(DEFAULT_CCPi-RGL_TAG origin/master)
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
-  set(DEFAULT_CCPi-FrameworkPlugins_TAG b19a37714dcf8288a55bcd41a2a78dd6f8164e7f)
+  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master)
   # For OSX, Gadgetron v3.17.0 doesn't work. So even in devel build, use same version
   # as for non-devel build
   if (APPLE)
@@ -185,12 +185,13 @@
   set(DEFAULT_ACE_TAG origin/master)

   # CCPi CIL
+  set(CIL_VERSION "19.02")
   set(DEFAULT_CCPi-Framework_URL https://github.com/vais-ral/CCPi-Framework.git)
-  set(DEFAULT_CCPi-Framework_TAG origin/master )
+  set(DEFAULT_CCPi-Framework_TAG d108cd7e9652992001a116347941eda7e75b3301)
   set(DEFAULT_CCPi-RGL_URL https://github.com/vais-ral/CCPi-Regularisation-Toolkit.git)
-  set(DEFAULT_CCPi-RGL_TAG origin/master )
+  set(DEFAULT_CCPi-RGL_TAG "v${CIL_VERSION}")
   set(DEFAULT_CCPi-FrameworkPlugins_URL https://github.com/vais-ral/CCPi-FrameworkPlugins.git)
-  set(DEFAULT_CCPi-FrameworkPlugins_TAG origin/master )
+  set(DEFAULT_CCPi-FrameworkPlugins_TAG b19a37714dcf8288a55bcd41a2a78dd6f8164e7f)

 endif()


set gadgetron version to 3.17.0

set gadgetron version to 3.17.0

--- version_config.cmake
+++ version_config.cmake
@@ -133,7 +133,7 @@
   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )
   #https://github.com/CCPPETMR/gadgetron)
-  set (DEFAULT_Gadgetron_TAB origin/master)
+  set (DEFAULT_Gadgetron_TAB v3.17.0)
   #set(DEFAULT_Gadgetron_TAG e7eb430673eb3272e8a821b51750c0a2a96dafed )
   #set(DEFAULT_Gadgetron_TAG 00b96376568278a595e78879026bb3b0d5fbb98d )


[travis skip] bump SIRF version (#585)

[travis skip] bump SIRF version (#585)

--- version_config.cmake
+++ version_config.cmake
@@ -190,7 +190,7 @@
   set(DEFAULT_CCPi-Regularisation-Toolkit_TAG origin/master)

 else()
-  set(DEFAULT_SIRF_TAG e3d50cdc826663ca3b9efab561effc18b3cc6e43)
+  set(DEFAULT_SIRF_TAG 58961137baddb2054405e9c7de647adc62ade7fe)
 #  set(DEFAULT_SIRF_TAG v3.0.0)

   ## STIR