ilastik.cmake: Changed remote url to ilastik/ilastik-meta, not janelia-flyem/ilastik

--- ilastik.cmake
+++ ilastik.cmake
@@ -33,7 +33,7 @@
 include (faulthandler)

 # select the desired ilastik commit
-set(DEFAULT_ILASTIK_VERSION "20131205")
+set(DEFAULT_ILASTIK_VERSION "v1.0.2")
 IF(NOT DEFINED ILASTIK_VERSION)
     SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
 ENDIF()
@@ -43,20 +43,27 @@

 external_git_repo (ilastik
     ${ILASTIK_VERSION}
-    https://github.com/janelia-flyem/flyem-ilastik
+    https://github.com/ilastik/ilastik-meta
     ilastik)
 set(lazyflow_SRC_DIR "${ilastik_SRC_DIR}/lazyflow")

 if("${ILASTIK_VERSION}" STREQUAL "master")

-    set(ILASTIK_UPDATE_COMMAND git checkout master && git pull origin master && git submodule update --init --recursive &&
+    # If the user's build is old, he might be linked to the janelia-flyem remote
+    # Force the remote to update from ilastik/ilastik-meta by removing origin and adding it again
+    set(ILASTIK_UPDATE_COMMAND git remote rm origin && git remote add origin https://github.com/ilastik/ilastik-meta &&
+                               git fetch origin &&
+                               git checkout master && git pull origin master && git submodule update --init --recursive &&
                                cd lazyflow && git checkout master && git pull origin master && git submodule update && cd .. &&
                                cd volumina && git checkout master && git pull origin master && cd .. &&
                                cd ilastik && git checkout master && git pull origin master && cd ..)

 else()

-    set(ILASTIK_UPDATE_COMMAND git fetch && git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive)
+    # If the user's build is old, he might be linked to the janelia-flyem remote
+    # Force the remote to update from ilastik/ilastik-meta by removing origin and adding it again
+    set(ILASTIK_UPDATE_COMMAND git remote rm origin && git remote add origin https://github.com/ilastik/ilastik-meta &&
+                               git fetch origin && git checkout ${ILASTIK_VERSION} && git submodule update --init --recursive)

 endif()


ilastik: Updated git tag.

ilastik: Updated git tag.

--- ilastik.cmake
+++ ilastik.cmake
@@ -36,7 +36,7 @@
 include (futures)

 # select the desired ilastik commit
-set(DEFAULT_ILASTIK_VERSION v1.1.1) # 2014-08-06
+set(DEFAULT_ILASTIK_VERSION 779685cc1e6b78b633fcd1737c5eae78e8b72ddb) # 2014-09-18
 IF(NOT DEFINED ILASTIK_VERSION)
     SET(ILASTIK_VERSION "${DEFAULT_ILASTIK_VERSION}")
 ENDIF()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   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   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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 03)

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


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)


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   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


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 01)

 # 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
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2009)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 07)
+SET(KWSYS_DATE_STAMP_MONTH 08)

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


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   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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 04)

 # 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 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 07)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Update pnm++ to v1.0.1

Update pnm++ to v1.0.1

--- cmake/third_party/pnm.cmake
+++ cmake/third_party/pnm.cmake
@@ -8,7 +8,7 @@
 FetchContent_Declare(
     pnm
     GIT_REPOSITORY https://github.com/ToruNiina/pnm.git
-    GIT_TAG be7ea4f5ad140c4c073e6e8c8575301be257f7aa
+    GIT_TAG v1.0.1
 )
 FetchContent_Populate(pnm)


ENH: better display of GDAL checks

ENH: better display of GDAL checks

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -197,10 +197,17 @@
   endif()
   message(STATUS "  Version : ${GDAL_VERSION}")
   message(STATUS "  Drivers for JPEG 2000 : ")
-  message(STATUS "    Jasper : ${GDAL_HAS_J2K_JG2000}")
-  message(STATUS "    OpenJPEG : ${GDAL_HAS_J2K_OPJG}")
-  message(STATUS "    Kakadu : ${GDAL_HAS_J2K_KAK}")
-  message(STATUS "    ECW : ${GDAL_HAS_J2K_ECW}")
-
+  if(GDAL_HAS_J2K_JG2000)
+    message(STATUS "    Jasper (will not be used)")
+  endif()
+  if(GDAL_HAS_J2K_OPJG)
+    message(STATUS "    OpenJPEG")
+  endif()
+  if(GDAL_HAS_J2K_KAK)
+    message(STATUS "    Kakadu")
+  endif()
+  if(GDAL_HAS_J2K_ECW)
+    message(STATUS "    ECW")
+  endif()

 endif() #GDAL_CONFIG_CHECKING


[Build] Fixed a tricky bug hindering source tar-ball to be generated by CMake/CPack when the Unix username is the same as the out-of-the-source generation directory.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -157,8 +157,6 @@
 #####################################
 #
 macro (packaging_init _project_name)
-  include (InstallRequiredSystemLibraries)
-
   set (CPACK_PACKAGE_NAME "${_project_name}")
   set (CPACK_PACKAGE_DESCRIPTION "${PACKAGE_BRIEF}")
 endmacro (packaging_init)
@@ -216,16 +214,16 @@
     "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}"
     CACHE INTERNAL "tarball basename")
   set (AUTOTOOLS_IGNRD "/tmp/;/tmp2/;/autom4te\\\\.cache/;autogen\\\\.sh$")
-  set (PACK_IGNRD "${CPACK_PACKAGE_NAME}\\\\.spec;/build/;\\\\.gz$;\\\\.bz2$")
+  set (PACK_IGNRD "${CMAKE_CURRENT_BINARY_DIR};${CPACK_PACKAGE_NAME}\\\\.spec;\\\\.gz$;\\\\.bz2$")
   set (EDIT_IGNRD "\\\\.swp$;\\\\.#;/#;~$")
   set (SCM_IGNRD
     "/CVS/;/\\\\.svn/;/\\\\.bzr/;/\\\\.hg/;/\\\\.git/;\\\\.gitignore$")
   set (CPACK_SOURCE_IGNORE_FILES
-    "${AUTOTOOLS_IGNRD};${SCM_IGNRD};${EDIT_IGNRD};${PACK_IGNRD}"
-    CACHE STRING "CPACK will ignore these files")
+    "${AUTOTOOLS_IGNRD};${SCM_IGNRD};${EDIT_IGNRD};${PACK_IGNRD}")
   #set (CPACK_SOURCE_IGNORE_DIRECTORY ${CPACK_SOURCE_IGNORE_FILES} .git)

   # Initialise the source package generator with the variables above
+  include (InstallRequiredSystemLibraries)
   include (CPack)

   # Add a 'dist' target, similar to what is given by GNU Autotools
@@ -233,7 +231,7 @@

   ##
   # Reset the generator types for the binary packages. Indeed, the variable
-  # has been reset by "include (Cpack)".
+  # has been reset by "include (CPack)".
   set (CPACK_GENERATOR "${_package_type_list}")

 endmacro (packaging_set_other_options)
@@ -1572,6 +1570,7 @@
   message (STATUS "CPACK_DEBIAN_PACKAGE_DEPENDS ... : ${CPACK_DEBIAN_PACKAGE_DEPENDS}")
   message (STATUS "CPACK_SOURCE_GENERATOR ......... : ${CPACK_SOURCE_GENERATOR}")
   message (STATUS "CPACK_SOURCE_PACKAGE_FILE_NAME . : ${CPACK_SOURCE_PACKAGE_FILE_NAME}")
+  message (STATUS "CPACK_SOURCE_IGNORE_FILES ...... : ${CPACK_SOURCE_IGNORE_FILES}")
   #
   message (STATUS)
   message (STATUS "---------------------------------")


Fixed issue #12. Reorder library dependency list.

It seems Debian is not as forgiving as Redhat on the external library list order.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -302,7 +302,7 @@
     # Link libraries
     define_dependency_libs (${TARGET_NAME})
     string (REGEX REPLACE \\.\\./|ThirdParty/|Engine/|Extras/|/include|/src "" STRIP_LIBS "${LIBS};${LINK_LIBS_ONLY}")
-    target_link_libraries (${TARGET_NAME} ${STRIP_LIBS} ${ABSOLUTE_PATH_LIBS})
+    target_link_libraries (${TARGET_NAME} ${ABSOLUTE_PATH_LIBS} ${STRIP_LIBS})
 endmacro ()

 # Macro for setting up a library target


Not block PDB file in multithreaded build on Windows.

If used cl compiler, but generator is not Visual Studio e.g. Ninja,
enable FS option to prevent blocking PDB file in multithreaded build.

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -257,6 +257,11 @@
   endif()
 endif()

+if(MSVC12 AND NOT CMAKE_GENERATOR MATCHES "Visual Studio")
+  set(OPENCV_EXTRA_C_FLAGS "${OPENCV_EXTRA_C_FLAGS} /FS")
+  set(OPENCV_EXTRA_CXX_FLAGS "${OPENCV_EXTRA_CXX_FLAGS} /FS")
+endif()
+
 # Extra link libs if the user selects building static libs:
 if(NOT BUILD_SHARED_LIBS AND ((CMAKE_COMPILER_IS_GNUCXX AND NOT ANDROID) OR QNX))
   # Android does not need these settings because they are already set by toolchain file


[CMake] Build Fuchsia toolchain as -O3

[CMake] Build Fuchsia toolchain as -O3

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@316053 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -30,8 +30,8 @@
 endif()

 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
-set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -gline-tables-only -DNDEBUG" CACHE STRING "")
+set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "")
+set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -gline-tables-only -DNDEBUG" CACHE STRING "")

 set(LLVM_BUILTIN_TARGETS "x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
 foreach(target x86_64;aarch64)


[cmake] Add a hint which function ends.

[cmake] Add a hint which function ends.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -473,7 +473,7 @@
   if(cpp_module)
     ROOT_CXXMODULES_APPEND_TO_MODULEMAP("${cpp_module}" "${headerfiles}")
   endif()
-endfunction()
+endfunction(ROOT_GENERATE_DICTIONARY)

 #---------------------------------------------------------------------------------------------------
 #---ROOT_CXXMODULES_APPEND_TO_MODULEMAP( library library_headers )


libuv: Android API 21+ required

libuv: Android API 21+ required

--- cmake/projects/libuv/hunter.cmake
+++ cmake/projects/libuv/hunter.cmake
@@ -4,6 +4,7 @@
 include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)
+include(hunter_report_broken_package)

 hunter_add_version(
   PACKAGE_NAME
@@ -29,5 +30,10 @@

 hunter_pick_scheme(DEFAULT url_sha1_cmake)

+if(ANDROID AND (CMAKE_SYSTEM_VERSION VERSION_LESS 21))
+  # https://stackoverflow.com/a/32638557/2288008
+  hunter_report_broken_package("API 21+ required for 'pthread_atfork'")
+endif()
+
 hunter_cacheable(libuv)
 hunter_download(PACKAGE_NAME libuv)


Update ITK Superbuild version along the 5.1 development branch

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -52,7 +52,8 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(_DEFAULT_ITK_GIT_TAG "v5.1rc01")
+# post v5.1rco1
+set(_DEFAULT_ITK_GIT_TAG "f971477cdacff22a861dfcbaccd89c0cf2755af7")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Update ITK superbuild to ITK 4.6 Release Candidate 2

Change-Id: I183d7bbc84acf32ed89d5d9bc9b6712b29653aa3

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.6rc01 )
+set(ITK_TAG_COMMAND GIT_TAG v4.6rc02)

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -66,7 +66,7 @@
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
 Comment[eu]=Phonon-en VLC bizkarraldekoa
-Comment[fi]=Phonon VLC -taustaohjelma
+Comment[fi]=Phonon VLC -taustajärjestelmä
 Comment[fr]=Module VLC pour Phonon
 Comment[ga]=Inneall VLC Phonon
 Comment[gl]=Infraestrutura de VLC para Phonon


Windows Vista+ needs the installer to have Admin access

--- win/installer.nsi.cmake
+++ win/installer.nsi.cmake
@@ -41,7 +41,7 @@
 SetCompressor /SOLID lzma

 ; Request application privileges for Windows Vista
-RequestExecutionLevel user
+RequestExecutionLevel admin

 ; Variables
 Var StartMenuFolder


automatically link gtest main libraries and add an option to skip it

--- ament_cmake_gtest/cmake/ament_add_gtest.cmake
+++ ament_cmake_gtest/cmake/ament_add_gtest.cmake
@@ -18,7 +18,7 @@
 #
 # Add a gtest.
 #
-# Call add_executable(target ARGN), link it against the gtest library
+# Call add_executable(target ARGN), link it against the gtest libraries
 # and register the executable as a test.
 #
 # :param target: the target name which will also be used as the test name
@@ -30,6 +30,9 @@
 # :param WORKING_DIRECTORY: the working directory for invoking the
 #   executable in, default: CMAKE_SOURCE_DIR
 # :type WORKING_DIRECTORY: string
+# :param SKIP_LINKING_MAIN_LIBRARIES: if set skip linking against the gtest
+#   main libraries
+# :type SKIP_LINKING_MAIN_LIBRARIES: option
 #
 # @public
 #
@@ -41,7 +44,7 @@
 endmacro()

 function(_ament_add_gtest target)
-  cmake_parse_arguments(ARG "" "TIMEOUT" "" ${ARGN})
+  cmake_parse_arguments(ARG "SKIP_LINKING_MAIN_LIBRARIES" "TIMEOUT" "" ${ARGN})
   if(NOT ARG_UNPARSED_ARGUMENTS)
     message(FATAL_ERROR
       "ament_add_gtest() must be invoked with at least one source file")
@@ -50,7 +53,10 @@
   # should be EXCLUDE_FROM_ALL if it would be possible
   # to add this target as a dependency to the "test" target
   add_executable("${target}" ${ARG_UNPARSED_ARGUMENTS})
-  target_link_libraries("${target}" gtest)
+  target_link_libraries("${target}" GTEST_LIBRARIES)
+  if(NOT ARG_SKIP_LINKING_MAIN_LIBRARIES)
+    target_link_libraries("${target}" GTEST_MAIN_LIBRARIES)
+  endif()

   get_target_property(target_path "${target}" RUNTIME_OUTPUT_DIRECTORY)
   if(NOT target_path)


cmake: comply with the new policy CMP0026

Access to LOCATION property at config time was disallowed by this
policy. This patch updates the offending code to comply with the policy
and thereby gets rid of the warning printed by cmake.

The fix is to use generator expressions instead of that property.

NOTE: Had to remove support for multiconfig (only affects MSVC which is
not supported anyway; and mutliconf is an IDE thing in any case),
because could not see how to support it with generator expressions.

--- cmake/MergeStaticLibs.cmake
+++ cmake/MergeStaticLibs.cmake
@@ -16,114 +16,59 @@
 function(merge_static_libs outlib )
 	set(libs ${ARGV})
 	list(REMOVE_AT libs 0)
-# Create a dummy file that the target will depend on
-	set(dummyfile ${CMAKE_CURRENT_BINARY_DIR}/${outlib}_dummy.c)
-	file(WRITE ${dummyfile} "const char * dummy = \"${dummyfile}\";")
-
-	add_library(${outlib} STATIC ${dummyfile})
+	list(REMOVE_DUPLICATES libs) # just in case

-	if("${CMAKE_CFG_INTDIR}" STREQUAL ".")
-		set(multiconfig FALSE)
-	else()
-		set(multiconfig TRUE)
-	endif()
-
-# First get the file names of the libraries to be merged
+	# First get the file names of the libraries to be merged
 	foreach(lib ${libs})
 		get_target_property(libtype ${lib} TYPE)
 		if(NOT libtype STREQUAL "STATIC_LIBRARY")
-			message(FATAL_ERROR "Merge_static_libs can only process static libraries")
+			message(FATAL_ERROR "merge_static_libs can only process static libraries")
 		endif()
-		if(multiconfig)
-			foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
-				get_target_property("libfile_${CONFIG_TYPE}" ${lib} "LOCATION_${CONFIG_TYPE}")
-				list(APPEND libfiles_${CONFIG_TYPE} ${libfile_${CONFIG_TYPE}})
-			endforeach()
-		else()
-			get_target_property(libfile ${lib} LOCATION)
-			list(APPEND libfiles "${libfile}")
-		endif(multiconfig)
+		set(libfiles "${libfiles} $<TARGET_FILE:${lib}>")
 	endforeach()
-	message(STATUS "will be merging ${libfiles}")
-# Just to be sure: cleanup from duplicates
-	if(multiconfig)
-		foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
-			list(REMOVE_DUPLICATES libfiles_${CONFIG_TYPE})
-			set(libfiles ${libfiles} ${libfiles_${CONFIG_TYPE}})
+
+	if(MSVC) # lib.exe does the merging of given a list
+		set_target_properties(${outlib} PROPERTIES STATIC_LIBRARY_FLAGS "${libfiles}")
+
+	elseif(APPLE) # Use OSX's libtool to merge archives
+		add_custom_command(TARGET ${outlib} POST_BUILD
+			COMMAND rm "$<TARGET_FILE:${outlib}>"
+			COMMAND /usr/bin/libtool -static -o "$<TARGET_FILE:${outlib}>" ${libfiles})
+
+	else() # general UNIX: use "ar" to extract objects and re-add to a common lib
+		foreach(lib ${libs})
+			set(objlistfile ${lib}.objlist) # list of objects in the input library
+			set(objdir ${lib}.objdir)
+
+			add_custom_command(OUTPUT ${objdir}
+				COMMAND ${CMAKE_COMMAND} -E make_directory ${objdir})
+
+			add_custom_command(OUTPUT ${objlistfile}
+				COMMAND ${CMAKE_AR} -x "$<TARGET_FILE:${lib}>"
+				COMMAND ${CMAKE_AR} -t "$<TARGET_FILE:${lib}>" > ../${objlistfile}
+				DEPENDS ${lib} ${objdir}
+				WORKING_DIRECTORY ${objdir})
+
+			# Empty dummy source file that goes into merged library
+			set(mergebase ${lib}.mergebase.c)
+			add_custom_command(OUTPUT ${mergebase}
+				COMMAND ${CMAKE_COMMAND} -E touch ${mergebase}
+				DEPENDS ${objlistfile})
+
+			list(APPEND mergebases "${mergebase}")
 		endforeach()
+
+		# We need a target for the output merged library
+		add_library(${outlib} STATIC ${mergebases})
+		set(outlibfile "$<TARGET_FILE:${outlib}>")
+
+		foreach(lib ${libs})
+			add_custom_command(TARGET ${outlib} POST_BUILD
+				COMMAND ${CMAKE_AR} ru ${outlibfile} @"../${objlistfile}"
+				WORKING_DIRECTORY ${objdir})
+		endforeach()
+
+		add_custom_command(TARGET ${outlib} POST_BUILD
+			COMMAND ${CMAKE_RANLIB} ${outlibfile})
 	endif()
-	list(REMOVE_DUPLICATES libfiles)
-
-# Now the easy part for MSVC and for MAC
-  if(MSVC)
-    # lib.exe does the merging of libraries just need to conver the list into string
-	foreach(CONFIG_TYPE ${CMAKE_CONFIGURATION_TYPES})
-		set(flags "")
-		foreach(lib ${libfiles_${CONFIG_TYPE}})
-			set(flags "${flags} ${lib}")
-		endforeach()
-		string(TOUPPER "STATIC_LIBRARY_FLAGS_${CONFIG_TYPE}" PROPNAME)
-		set_target_properties(${outlib} PROPERTIES ${PROPNAME} "${flags}")
-	endforeach()
-
-  elseif(APPLE)
-    # Use OSX's libtool to merge archives
-	if(multiconfig)
-		message(FATAL_ERROR "Multiple configurations are not supported")
-	endif()
-	get_target_property(outfile ${outlib} LOCATION)
-	add_custom_command(TARGET ${outlib} POST_BUILD
-		COMMAND rm ${outfile}
-		COMMAND /usr/bin/libtool -static -o ${outfile}
-		${libfiles}
-	)
-  else()
-  # general UNIX - need to "ar -x" and then "ar -ru"
-	if(multiconfig)
-		message(FATAL_ERROR "Multiple configurations are not supported")
-	endif()
-	get_target_property(outfile ${outlib} LOCATION)
-	message(STATUS "outfile location is ${outfile}")
-	foreach(lib ${libfiles})
-# objlistfile will contain the list of object files for the library
-		set(objlistfile ${lib}.objlist)
-		set(objdir ${lib}.objdir)
-		set(objlistcmake  ${objlistfile}.cmake)
-# we only need to extract files once
-		if(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cmake.check_cache IS_NEWER_THAN ${objlistcmake})
-#---------------------------------
-			FILE(WRITE ${objlistcmake}
-"# Extract object files from the library
-message(STATUS \"Extracting object files from ${lib}\")
-EXECUTE_PROCESS(COMMAND ${CMAKE_AR} -x ${lib}
-                WORKING_DIRECTORY ${objdir})
-# save the list of object files
-EXECUTE_PROCESS(COMMAND ls .
-				OUTPUT_FILE ${objlistfile}
-                WORKING_DIRECTORY ${objdir})")
-#---------------------------------
-			file(MAKE_DIRECTORY ${objdir})
-			add_custom_command(
-				OUTPUT ${objlistfile}
-				COMMAND ${CMAKE_COMMAND} -P ${objlistcmake}
-				DEPENDS ${lib})
-		endif()
-		list(APPEND extrafiles "${objlistfile}")
-		# relative path is needed by ar under MSYS
-		file(RELATIVE_PATH objlistfilerpath ${objdir} ${objlistfile})
-		add_custom_command(TARGET ${outlib} POST_BUILD
-			COMMAND ${CMAKE_COMMAND} -E echo "Running: ${CMAKE_AR} ru ${outfile} @${objlistfilerpath}"
-			COMMAND ${CMAKE_AR} ru "${outfile}" @"${objlistfilerpath}"
-			WORKING_DIRECTORY ${objdir})
-	endforeach()
-	add_custom_command(TARGET ${outlib} POST_BUILD
-			COMMAND ${CMAKE_COMMAND} -E echo "Running: ${CMAKE_RANLIB} ${outfile}"
-			COMMAND ${CMAKE_RANLIB} ${outfile})
-  endif()
-  file(WRITE ${dummyfile}.base "const char* ${outlib}_sublibs=\"${libs}\";")
-  add_custom_command(
-		OUTPUT  ${dummyfile}
-		COMMAND ${CMAKE_COMMAND}  -E copy ${dummyfile}.base ${dummyfile}
-		DEPENDS ${libs} ${extrafiles})
-
- endfunction()+endfunction()


compiler optimizations add -fmerge-all-constants

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -372,6 +372,7 @@
 		-ffunction-sections
 		-fdata-sections
 		-fno-math-errno
+		-fmerge-all-constants
 		${PIC_FLAG}
 		)


fix for compilation of Vc on Mac ( https://savannah.cern.ch/bugs/?95756 )

--- Vc/cmake/VcMacros.cmake
+++ Vc/cmake/VcMacros.cmake
@@ -105,7 +105,9 @@
 macro(vc_check_assembler)
    if(APPLE)
       if(NOT Vc_COMPILER_IS_CLANG)
-         message(WARNING "Apple does not provide an assembler with AVX support. Please use Clang instead of GCC.")
+         message(WARNING "Apple does not provide an assembler with AVX support. AVX will not be available. Please use Clang if you want to use AVX.")
+         set(Vc_DEFINITIONS "${Vc_DEFINITIONS} -DVC_NO_XGETBV")
+         set(Vc_AVX_INTRINSICS_BROKEN true)
       endif()
    else(APPLE)
       if(${ARGC} EQUAL 1)


Fixing the build (correcting a mispelling in CMake variable names).

--- src/system/zorba_version.cpp.cmake
+++ src/system/zorba_version.cpp.cmake
@@ -5,9 +5,9 @@

 namespace xqp {

-  int ZorbaVersion::theMajorVersion = @ZORBA_MAJOR_VERSION@;
-  int ZorbaVersion::theMinorVersion = @ZORBA_MINOR_VERSION@;
-  int ZorbaVersion::thePatchVersion = @ZORBA_PATCH_VERSION@;
+  int ZorbaVersion::theMajorVersion = @ZORBA_MAJOR_NUMBER@;
+  int ZorbaVersion::theMinorVersion = @ZORBA_MINOR_NUMBER@;
+  int ZorbaVersion::thePatchVersion = @ZORBA_PATCH_NUMBER@;

   int
   ZorbaVersion::getZorbaMajorVersion() { return theMajorVersion; }


FIX (#4432): CPack works now for ExtApp

FIX (#4432): CPack works now for ExtApp

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -465,17 +465,17 @@

 GET_TARGET_PROPERTY(_is_bundle ${_target} MACOSX_BUNDLE)
 IF(APPLE AND _is_bundle)
-  SET(_target_location ${CMAKE_INSTALL_PREFIX}/${_target}.app)
+  SET(_target_location \${CMAKE_INSTALL_PREFIX}/${_target}.app)
   SET(plugin_dest_dir ${_target}.app/Contents/MacOS)
   SET(qtconf_dest_dir ${_target}.app/Contents/Resources)
 ELSE()
-  SET(_target_location ${CMAKE_INSTALL_PREFIX}/bin/${_target})
+  SET(_target_location \${CMAKE_INSTALL_PREFIX}/bin/${_target})
   SET(plugin_dest_dir bin)
   SET(qtconf_dest_dir bin)
 ENDIF()

 IF(QT_PLUGINS_DIR)
-  INSTALL(DIRECTORY "${QT_PLUGINS_DIR}" DESTINATION ${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir} COMPONENT Runtime)
+  INSTALL(DIRECTORY "${QT_PLUGINS_DIR}" DESTINATION ${plugin_dest_dir} COMPONENT Runtime)

   #--------------------------------------------------------------------------------
   # install a qt.conf file


soc/intel_adsp: Honor CONFIG_KERNEL_BINARY_NAME

Turns out that the user can configure the "zephyr.elf" name via
kconfig to be "something_else.elf" instead.  And there's a test the
does this.  Use the right variable; don't hardcode.

Signed-off-by: Andy Ross <c70f9a6bf6ee0cd69c8af4ce5e6b131945769315@intel.com>

--- soc/xtensa/intel_adsp/common/bootloader.cmake
+++ soc/xtensa/intel_adsp/common/bootloader.cmake
@@ -14,7 +14,7 @@
   COMMAND ${CMAKE_OBJCOPY} --add-section .module=mod-apl.bin --set-section-flags .module=load,readonly ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME} ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}.mod

   # Adjust final section addresses so they all appear in the cached region.
-  COMMAND ${ELF_FIX} ${CMAKE_OBJCOPY} ${CMAKE_BINARY_DIR}/zephyr/zephyr.elf.mod
+  COMMAND ${ELF_FIX} ${CMAKE_OBJCOPY} ${CMAKE_BINARY_DIR}/zephyr/${KERNEL_ELF_NAME}.mod
   )

 add_custom_target(


setting the correct excludes in the package exclude list

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -31,8 +31,11 @@
   SOFA_PLUGINS_DIR
   SUPERBUILD
   BiophotonicsHardware_SpectroCam
-  PhotoacousticsHardware
   POLHEMUS_TRACKER
+
+  US_DiPhAS_SDK
+  GALIL_HARDWARE
+  OPHIR_PRYO_HARDWARE

   KWSTYLE
   MICROBIRD_TRACKER


CI: adapt main_superbuild for windows

CI: adapt main_superbuild for windows

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -96,8 +96,13 @@
 ###########################################################################

 set ( CTEST_BUILD_CONFIGURATION "Release" )
-set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
-set ( CTEST_BUILD_FLAGS "-j8" )
+set ( CTEST_CMAKE_GENERATOR "Ninja" )
+# Detect site
+if(NOT DEFINED IMAGE_NAME)
+  if(DEFINED ENV{IMAGE_NAME})
+    set(IMAGE_NAME $ENV{IMAGE_NAME})
+  endif()
+endif()
 set ( CTEST_SITE "${IMAGE_NAME}" )

 # Find the build name and CI profile
@@ -119,12 +124,24 @@
 set ( CONFIGURE_OPTIONS
   "${CONFIGURE_OPTIONS}-DOTB_USE_LIBKML:BOOL=OFF;" )

+if(WIN32)
+  file(TO_NATIVE_PATH "${XDK_PATH}" XDK_PATH_NATIVE)
+  file(TO_NATIVE_PATH "${CTEST_BINARY_DIRECTORY}/bin" OTB_BUILD_BIN_DIR_NATIVE)
+  set(ENV{PATH} "$ENV{PATH};${OTB_BUILD_BIN_DIR_NATIVE}" )
+  set(ENV{PATH} "${XDK_PATH_NATIVE}\\bin;$ENV{PATH}" )
+  set(ENV{PATH} "$ENV{PATH};${XDK_PATH_NATIVE}\\lib" )
+  # needed to load Qt plugins for testing, not for binary packages where we use a qt.conf file
+  set(ENV{QT_PLUGIN_PATH} "${XDK_PATH_NATIVE}\\plugins")
+else()
+  set(ENV{PATH} "${XDK_PATH}/lib:${XDK_PATH}/bin:$ENV{PATH}" )
+endif()
+
 # FIX ME this part might platform dependent
 set( GDAL_DATA "${XDK_PATH}/share/gdal" )
 set( GEOTIFF_CSV "${XDK_PATH}/share/epsg_csv" )
 set( PROJ_LIB "${XDK_PATH}/share" )
 set( CTEST_ENVIRONMENT
-"PATH=${XDK_PATH}/lib:${XDK_PATH}/bin:$ENV{PATH}
+"PATH=$ENV{PATH}
 ")
 # It seems that we do not need that
 # GDAL_DATA= GDAL_DATA


BUG: ExternalData: Do not match directory names when resolving DATA{}

Our content link and object download infrastructure supports only
blobs (files), not trees (directories).  Do not allow references
to end in a slash.

Change-Id: Iaa180a71fd2be8d6e4bb0c4a08803d06e7fe86db

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -123,7 +123,7 @@
 # with CMake >= 2.8.5.

 #=============================================================================
-# Copyright 2010-2011 Kitware, Inc.
+# Copyright 2010-2013 Kitware, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -331,6 +331,13 @@
   list(GET options 0 data)
   list(REMOVE_AT options 0)

+  # Reject trailing slashes.
+  if("x${data}" MATCHES "[/\\]$")
+    message(FATAL_ERROR "Data file reference in argument\n"
+      "  ${arg}\n"
+      "may not end in a slash!")
+  endif()
+
   # Convert to full path.
   if(IS_ABSOLUTE "${data}")
     set(absdata "${data}")
@@ -403,7 +410,7 @@
       "  ${arg}\n"
       "corresponds to source tree path\n"
       "  ${reldata}\n"
-      "that does not exist (with or without an extension)!")
+      "that does not exist as a file (with or without an extension)!")
   endif()

   if(external)
@@ -497,7 +504,7 @@
   foreach(entry IN LISTS globbed)
     string(REGEX REPLACE "^(${regex})(\\.md5|)$" "\\1;\\2" tuple "${entry}")
     list(LENGTH tuple len)
-    if("${len}" EQUAL 2)
+    if("${len}" EQUAL 2 AND NOT IS_DIRECTORY "${top_src}/${entry}")
       list(GET tuple 0 relname)
       list(GET tuple 1 alg)
       set(name "${top_src}/${relname}")


ENH: Remove FindNUMARRAY.cmake.

ENH: Remove FindNUMARRAY.cmake.

This was previously used by the PyBuffer configuration, but it has been
replaced by the FindNumPy.cmake module distributed with the BridgeNumPy
module.

Change-Id: I014a06a403348c80186186b37c263369815a76e0

--- CMake/FindNUMARRAY.cmake
+++ CMake/FindNUMARRAY.cmake
@@ -1,18 +0,0 @@
-# Try to find numarray python package
-# Once done this will define
-#
-# PYTHON_NUMARRAY_FOUND        - system has numarray development package and it should be used
-# PYTHON_NUMARRAY_INCLUDE_DIR  - directory where the arrayobject.h header file can be found
-#
-#
-
-  find_path(PYTHON_NUMARRAY_INCLUDE_DIR arrayobject.h
-    /usr/include/python2.3/numarray/
-    /usr/share/pyshared/numpy/core/include/numpy/
-    DOC "Directory where the arrayobject.h header file can be found. This file is part of the numarray package"
-    )
-
-  if(PYTHON_NUMARRAY_INCLUDE_DIR)
-    set(PYTHON_NUMARRAY_FOUND 1 CACHE INTERNAL "Python numarray development package is available")
-  endif()
-


Renamed to vtkModuleHeaders.cmake.in

Renamed to vtkModuleHeaders.cmake.in

Change-Id: Ibc6314c791ca39ad89ee252b2e3f813ecf794088

--- CMake/vtkModuleTop.cmake
+++ CMake/vtkModuleTop.cmake
@@ -333,7 +333,7 @@
                 CMake/vtkForwardingExecutable.cmake
                 CMake/vtkJavaWrapping.cmake
                 CMake/vtkModuleAPI.cmake
-                CMake/vtkModuleClasses.cmake.in
+                CMake/vtkModuleHeaders.cmake.in
                 CMake/vtkModuleInfo.cmake.in
                 CMake/vtkModuleMacros.cmake
                 CMake/vtkObjectFactory.cxx.in


changed ctk added getter for server parameters

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

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag 5ce6a4ed)
+    SET(revision_tag bf3817c0a7876a0b789b6f9a6f658e7f3bc6dfaf)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


remove more debug messages

remove more debug messages

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


pgmlink depending on dlib

pgmlink depending on dlib

--- pgmlink.cmake
+++ pgmlink.cmake
@@ -17,6 +17,7 @@
 include (boost)
 include (opengm)
 include (doxygen)
+inlcude (dlib)

 external_git_repo (pgmlink
     HEAD
@@ -26,6 +27,7 @@
 message ("Installing ${pgmlink_NAME} into FlyEM build aread: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${pgmlink_NAME}
     DEPENDS             ${ann_NAME} ${lemon_NAME} ${vigra_NAME} ${boost_NAME} ${opengm_NAME} ${doxygen_NAME}
+                        ${dlib_NAME}
     PREFIX              ${BUILDEM_DIR}
     GIT_REPOSITORY      ${pgmlink_URL}
     UPDATE_COMMAND      ""


Only pass INTERNAL_INCLUDE_DIRS to header file language check.

We don't care about headers in external include dirs potentially
including our local headers - that is never going to happen, they
are never going to be scanned and it takes an extraordinary amount
of resources to scan all of them (eg, boost)

--- IncludeWhatYouUse.cmake
+++ IncludeWhatYouUse.cmake
@@ -55,10 +55,6 @@

     psq_get_target_command_attach_point (${TARGET} WHEN)

-    set (ALL_INCLUDE_DIRS
-         ${IWYU_SOURCES_EXTERNAL_INCLUDE_DIRS}
-         ${IWYU_SOURCES_INTERNAL_INCLUDE_DIRS})
-
     psq_append_each_to_options_with_prefix (IWYU_TARGET_ARGS
                                             -isystem
                                             LIST ${IWYU_SOURCES_EXTERNAL_INCLUDE_DIRS})
@@ -74,7 +70,8 @@
                          MULTIVAR_ARGS CPP_IDENTIFIERS)

     psq_sort_sources_to_languages (C_SOURCES CXX_SOURCES HEADERS
-                                   INCLUDES ${ALL_INCLUDE_DIRS}
+                                   INCLUDES
+                                   ${IWYU_SOURCES_INTERNAL_INCLUDE_DIRS}
                                    SOURCES ${FILES_TO_CHECK}
                                    ${DETERMINE_LANG_FORWARD_OPTIONS})


FIX: pack commands

FIX: pack commands

--- pack.cmake
+++ pack.cmake
@@ -6,29 +6,27 @@
             ${BIN_DIR}/cfitsio.dll
             ${BIN_DIR}/freexl.dll
             ${BIN_DIR}/fribidi.dll
-            ${BIN_DIR}/ftgl.dll
-            ${BIN_DIR}/gdal110.dll
+            ${BIN_DIR}/gdal111.dll
             ${BIN_DIR}/geos_c.dll
-            ${BIN_DIR}/hdf5dll.dll
+            ${BIN_DIR}/hdf5.dll
             ${BIN_DIR}/iconv.dll
-            ${BIN_DIR}/icudt.dll
+            ${BIN_DIR}/icudtl.dat
             ${BIN_DIR}/libcurl.dll
             ${BIN_DIR}/libeay32.dll
             ${BIN_DIR}/libecwj2.dll
-            ${BIN_DIR}/libexpat.dll
+            ${BIN_DIR}/expat.dll
             ${BIN_DIR}/libfcgi.dll
             ${BIN_DIR}/libmysql.dll
             ${BIN_DIR}/libpq.dll
             ${BIN_DIR}/libtiff.dll
             ${BIN_DIR}/libxml2.dll
-            ${BIN_DIR}/lti_dsdk.dll
-            ${BIN_DIR}/lti_lidar_dsdk.dll
+            ${BIN_DIR}/lti_dsdk_9.1.dll
+            ${BIN_DIR}/lti_lidar_dsdk_1.1.dll
             ${BIN_DIR}/mapserver.dll
-            ${BIN_DIR}/msvcp100.dll
-            ${BIN_DIR}/msvcr100.dll
+            ${BIN_DIR}/msvcp120.dll
+            ${BIN_DIR}/msvcr120.dll
             ${BIN_DIR}/netcdf.dll
             ${BIN_DIR}/openjp2.dll
-            ${BIN_DIR}/openjpeg.dll
             ${BIN_DIR}/osgEarth.dll
             ${BIN_DIR}/osgEarthAnnotation.dll
             ${BIN_DIR}/osgEarthFeatures.dll
@@ -36,7 +34,6 @@
             ${BIN_DIR}/osgEarthUtil.dll
             ${BIN_DIR}/proj.dll
             ${BIN_DIR}/spatialite.dll
-            ${BIN_DIR}/sqlite3.dll
             ${BIN_DIR}/ssleay32.dll
             ${BIN_DIR}/xerces-c_2_8.dll
             ${BIN_DIR}/zlib1.dll


AddGTest should reference Lookup-GTest

AddGTest should reference Lookup-GTest

GTest -> LookupGTest happened in 82b7b247.
Closes #44

--- scripts/AddGTest.cmake
+++ scripts/AddGTest.cmake
@@ -17,7 +17,7 @@
     # get_target_property(THISTEST_INCLUDE test_${name} INCLUDE_DIRECTORIES)
     # set_target_properties(test_${name} PROPERTIES INCLUDE_DIRECTORIES
     #                       "${source_dir}/include;${THISTEST_INCLUDE}")
-
+
     add_executable(test_${name} ${source})
     if(MSVC)
       target_link_libraries(test_${name} ${EXTERNAL_ROOT}/lib/gtest.lib)
@@ -27,12 +27,12 @@
     if(CMAKE_THREAD_LIBS_INIT)
       target_link_libraries(test_${name} ${CMAKE_THREAD_LIBS_INIT})
     endif(CMAKE_THREAD_LIBS_INIT)
-
-    add_dependencies(test_${name} GTest)
+
+    add_dependencies(test_${name} Lookup-GTest)
     if(NOT "${ARGN}" STREQUAL "")
       target_link_libraries(test_${name} ${ARGN})
     endif(NOT "${ARGN}" STREQUAL "")
-
+
     add_test(cxx_${name} ${EXECUTABLE_OUTPUT_PATH}/test_${name}
                 --gtest_output=xml:${CMAKE_BINARY_DIR}/test-results/test_${name}.xml)
     set_tests_properties(cxx_${name} PROPERTIES LABELS "gtest")


Bootstrap version 8

Bootstrap version 8

--- qibuild.cmake
+++ qibuild.cmake
@@ -6,7 +6,7 @@
 # This file is part of the qibuild project    #
 ###############################################

-set(QIBUILD_BOOTSTRAP_VERSION 6)
+set(QIBUILD_BOOTSTRAP_VERSION 8)

 ##
@@ -34,11 +34,10 @@
   endif()

   get_filename_component(_python_root ${PYTHON_EXECUTABLE} PATH)
-  find_program(QI_BUILD_EXECUTABLE qibuild.py
+  find_program(QI_BUILD_EXECUTABLE NAMES qibuild.py qibuild
     PATHS
       "${_python_root}/Scripts"
   )
-

   if(NOT QI_BUILD_EXECUTABLE)
     message(STATUS
@@ -79,15 +78,17 @@
   endif()
 endfunction()

+
+include(qibuild/general OPTIONAL RESULT_VARIABLE _qibuild_found)
+if(_qibuild_found)
+  return()
+endif()
+
 if(NOT EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
   bootstrap()
 endif()

-if(EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
-  include(${CMAKE_BINARY_DIR}/dependencies.cmake)
-else()
-  message(STATUS "can't find dependencies.cmake")
-endif()
+include(${CMAKE_BINARY_DIR}/dependencies.cmake)
+

 include(qibuild/general)
-


silence CMake policy CMP0042

silence CMake policy CMP0042

--- SCOREC_StandAlone.cmake
+++ SCOREC_StandAlone.cmake
@@ -3,6 +3,10 @@
 #Setting Version Number, Project Name
 cmake_minimum_required (VERSION 2.8)
 project (SCOREC)
+
+if (APPLE)
+  set(CMAKE_MACOSX_RPATH ON)
+endif()

 #unless building shared libs, then select static libs
 # if both static and shared libs are available


A couple of adaptations for clang-cl.

A couple of adaptations for clang-cl.

--- cmake/yacma/YACMACompilerLinkerSettings.cmake
+++ cmake/yacma/YACMACompilerLinkerSettings.cmake
@@ -91,7 +91,7 @@
     endif()

     # Configuration bits specific for clang.
-    if(YACMA_COMPILER_IS_CLANGXX)
+    if(YACMA_COMPILER_IS_CLANGXX AND NOT YACMA_COMPILER_IS_MSVC)
         # For now it seems like -Wshadow from clang behaves better than GCC's, just enable it here
         # for the time being.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
@@ -100,7 +100,7 @@
     endif()

     # Common configuration for GCC, clang and Intel.
-    if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
+    if ((YACMA_COMPILER_IS_CLANGXX AND NOT YACMA_COMPILER_IS_MSVC) OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)


Apply CMAKE_CXX_FLAGS for icu target.

Apply CMAKE_CXX_FLAGS for icu target.

--- external/External.cmake
+++ external/External.cmake
@@ -770,7 +770,8 @@
             SOURCE_DIR "${icu_EXT_SOURCE_DIR}"
             CMAKE_ARGS "-DCMAKE_MACOSX_RPATH=${CMAKE_MACOSX_RPATH}"
                        "-DBUILD_SHARED_LIBS=OFF"
-                       "-DCMAKE_C_FLAGS=${EXT_C_FLAGS} -DDllMain=icu_DllMain"
+                       "-DCMAKE_C_FLAGS=${EXT_C_FLAGS}"
+                       "-DCMAKE_CXX_FLAGS=${EXT_CXX_FLAGS}"
                        "-DCMAKE_BUILD_TYPE=${EXT_BUILD_TYPE}"
                        "-DCMAKE_INSTALL_PREFIX=${EXT_INSTALL_DIR}"
             #--Output licuing-------------


- Fix regex in Emscripten script

- Fix regex in Emscripten script

--- toolchain/cmake/Packaging/EmscriptenBuild.cmake
+++ toolchain/cmake/Packaging/EmscriptenBuild.cmake
@@ -32,7 +32,7 @@
         LINK_FLAGS "${${EM_TARGET}_RSC_FLAGS}"
         )

-    if("${CMAKE_BUILD_TYPE}" MATCHES "*Deb*")
+    if("${CMAKE_BUILD_TYPE}" MATCHES ".*Deb.*")
         add_custom_command ( TARGET ${EM_TARGET}
             COMMAND ${COFFEE_DESKTOP_DIRECTORY}/emscripten/fix-source-map.py
             ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${EM_TARGET}.bundle/${EM_TARGET}.wasm.map


Prevent pgmlink from overwriting the CXX_FLAGS

--- pgmlink.cmake
+++ pgmlink.cmake
@@ -56,7 +56,9 @@
         CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${pgmlink_SRC_DIR}
             -DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR}
             -DCMAKE_PREFIX_PATH=${BUILDEM_DIR}
-            -DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}
+            "-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS} -ftemplate-depth=512"
+            -DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}
+            -DCMAKE_SHARED_LINKER_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}
             -DWITH_PYTHON=ON
             -DWITH_TESTS=ON
             -DWITH_CHECKED_STL=OFF


Improve boost 1.50 and 1.51 checks. And mark the GL ES 1 render system as deprecated.

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -90,9 +90,9 @@
 find_package(OpenGL)
 macro_log_feature(OPENGL_FOUND "OpenGL" "Support for the OpenGL render system" "http://www.opengl.org/" FALSE "" "")

-# Find OpenGL ES
+# Find OpenGL ES 1.x
 find_package(OpenGLES)
-macro_log_feature(OPENGLES_FOUND "OpenGL ES 1.x" "Support for the OpenGL ES 1.x render system" "http://www.khronos.org/opengles/" FALSE "" "")
+macro_log_feature(OPENGLES_FOUND "OpenGL ES 1.x" "Support for the OpenGL ES 1.x render system (DEPRECATED)" "http://www.khronos.org/opengles/" FALSE "" "")

 # Find OpenGL ES 2.x
 find_package(OpenGLES2)
@@ -125,24 +125,31 @@
 if (APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS)
 	set(Boost_COMPILER "-xgcc42")
 endif()
-set(Boost_ADDITIONAL_VERSIONS "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
+set(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
 # Components that need linking (NB does not include header-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
-find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
-if (NOT Boost_FOUND)
-	# Try again with the other type of libs
+find_package(Boost QUIET)
+if (Boost_FOUND)
 	if(Boost_USE_STATIC_LIBS)
 		set(Boost_USE_STATIC_LIBS OFF)
 	else()
 		set(Boost_USE_STATIC_LIBS ON)
 	endif()
+
+    if(Boost_VERSION GREATER 104900)
+        set(OGRE_BOOST_COMPONENTS thread date_time system chrono)
+    endif()
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
-find_package(Boost QUIET)
+
 # Optional Boost libs (Boost_${COMPONENT}_FOUND
 macro_log_feature(Boost_FOUND "boost" "Boost (general)" "http://boost.org" FALSE "" "")
 macro_log_feature(Boost_THREAD_FOUND "boost-thread" "Used for threading support" "http://boost.org" FALSE "" "")
 macro_log_feature(Boost_DATE_TIME_FOUND "boost-date_time" "Used for threading support" "http://boost.org" FALSE "" "")
+if(Boost_VERSION GREATER 104900)
+    macro_log_feature(Boost_SYSTEM_FOUND "boost-system" "Used for threading support" "http://boost.org" FALSE "" "")
+    macro_log_feature(Boost_CHRONO_FOUND "boost-chrono" "Used for threading support" "http://boost.org" FALSE "" "")
+endif()

 # POCO
 find_package(POCO)


backout changeset r 158

backout changeset r 158

--- CMake/External_OTB.cmake
+++ CMake/External_OTB.cmake
@@ -185,8 +185,6 @@
       -DBUILD_APPLICATIONS:BOOL=ON
       -DCMAKE_PREFIX_PATH:STRING=${CMAKE_INSTALL_PREFIX}
       -DOTB_DATA_ROOT:STRING=${OTB_DATA_ROOT}
-      -DOTB_DATA_USE_LARGEINPUT:BOOL=${ENABLE_OTB_LARGE_INPUTS}
-      -DOTB_DATA_LARGEINPUT_ROOT:PATH=${OTB_DATA_LARGEINPUT_ROOT}
       -DOTB_USE_EXTERNAL_OSSIM:BOOL=ON
       -DOTB_USE_EXTERNAL_BOOST:BOOL=ON
       -DOTB_USE_EXTERNAL_ITK:BOOL=ON


ENH: Merge changes from main tree into VTK-5-0 branch. (cvs -q up -j1.11 -j1.12 CMake/vtkExportKit.cmake)

--- CMake/vtkExportKit.cmake
+++ CMake/vtkExportKit.cmake
@@ -4,7 +4,7 @@
   SET(KIT_ABSTRACT_LIST)
   SET(KIT_EXCLUDE_LIST)
   FOREACH(src ${sources})
-    STRING(REGEX REPLACE "\\.cxx$" "" CLASS "${src}")
+    GET_FILENAME_COMPONENT(CLASS "${src}" NAME_WE)
     SET(KIT_CLASS_LIST "${KIT_CLASS_LIST}\n  \"${CLASS}\"")
     GET_SOURCE_FILE_PROPERTY(IS_ABSTRACT ${src} ABSTRACT)
     IF(IS_ABSTRACT MATCHES "^1$")


Use CTK with updated CLI support and fixed ctkPathLineEdit size hint.

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

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag f8d63311)
+    set(revision_tag f25f19e5)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -49,7 +49,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 cbd57918a076d6c3830313c01724ceaf
+      URL_MD5 70fadbc62ec5c7d83a6e672fd5be36b1
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


shrink time taken for short test suite by not building tests if there are
no tests to run

git-svn-id: ed337ca7cdb08c0ba29d8fe58632bb7686892c2d@197 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6

--- suite/runsuite.cmake
+++ suite/runsuite.cmake
@@ -182,8 +182,17 @@
   set(CTEST_BUILD_COMMAND "${CTEST_BUILD_COMMAND_BASE} ${build_args}")
   set(CTEST_BINARY_DIRECTORY "${BINARY_BASE}/build_${CTEST_BUILD_NAME}")
   set(last_build_dir "${CTEST_BINARY_DIRECTORY}" PARENT_SCOPE)
+  # for short suite, don't build tests for builds that don't run tests
+  # (since building takes forever on windows)
+  if (NOT "${test_long_cache}" STREQUAL "" OR
+      "${name}" STREQUAL "debug-internal-32" OR
+      "${name}" STREQUAL "debug-internal-64")
+    set(tests_cache "BUILD_TESTS:BOOL=ON")
+  else ()
+    set(tests_cache "")
+  endif()
   set(CTEST_INITIAL_CACHE "${initial_cache}
-    BUILD_TESTS:BOOL=ON
+    ${tests_cache}
     TEST_SUITE:BOOL=ON
     ${test_long_cache}
     ${base_cache}


Bugfix: `-std=c++14` in CMake toolchain file for Windows target.

	modified:   w64.cmake


#1279 - update OpenIGTLink to 68b46acdf6

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8350 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag 9beb7581f6)
+    SET(revision_tag 68b46acdf6)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Bump TubeTK to include default tube display for TRE files

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "4b33913daae97785c33aae3a24afebbbdfc4ff22"
+    GIT_TAG "c00deab0c664ab4f7d17498016e994b5842140ca"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Bump TubeTK for fixing issue #37: Display tubes by default

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "6e55b85d7149d85e0c936f0ef804787686348580"
+    GIT_TAG "4b33913daae97785c33aae3a24afebbbdfc4ff22"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


No functional change. Just a snipped of commented code that I want to keep around.

svn path=/trunk/; revision=9042

--- bindings/ada/plplot.adb.cmake
+++ bindings/ada/plplot.adb.cmake
@@ -208,6 +208,8 @@
             Set_Pen_Color(Colors(1));
             Select_Line_Style(Line_Styles(1));
             Draw_Curve(x1, y1);
+            --Draw_Hershey_Symbol(x1, y1, 850);
+            --Draw_Points(x1, y1, 17);
         end if;

         if x2'length /= 1 and y2'length /= 1 then


remove cmake message when it's success

remove cmake message when it's success

--- scripts/run.cmake
+++ scripts/run.cmake
@@ -28,15 +28,11 @@
     )

 if(EXPECT_FAIL)
-    if(__exit_code)
-        message(STATUS "success! (run.cmake) -- expect fail and exit code nonzero")
-    else()
+    if(NOT __exit_code)
         message(FATAL_ERROR "fail! (run.cmake) -- expect fail but exit code zero")
     endif()
 else()
-    if(NOT __exit_code)
-        message(STATUS "success! (run.cmake) -- exit code zero")
-    else()
+    if(__exit_code)
         message(FATAL_ERROR "fail! (run.cmake) -- exit code == " ${__exit_code})
     endif()
 endif()


Adding support for easybuild modules

Adding support for easybuild modules

Former-commit-id: bf888d61d4b57229f73a2c1a51c07648f45602cc

--- cmake-modules/FindPackageHDF5.cmake
+++ cmake-modules/FindPackageHDF5.cmake
@@ -78,10 +78,11 @@
         if(HDF5_USE_STATIC_LIBRARIES)
         message(WARNING "The HDF5 library is parallel and you are linking with -static. OpenMPI will not like it.")
         endif()
-        find_package(MPI)
-        target_link_libraries(hdf5 INTERFACE MPI::MPI_C )
-        get_target_property(MPI_LIB MPI::MPI_C INTERFACE_LINK_LIBRARIES)
-        message("Found MPI Library: ${MPI_LIB}")
+#        find_package(MPI)
+        target_link_libraries(hdf5 INTERFACE -lmpi )
+        #        target_link_libraries(hdf5 INTERFACE MPI::MPI_C )
+#        get_target_property(MPI_LIB MPI::MPI_C INTERFACE_LINK_LIBRARIES)
+#        message("Found MPI Library: ${MPI_LIB}")
 #        find_package(MPI REQUIRED)
 #        target_link_libraries(hdf5 INTERFACE MPI::MPI_C )
 #        get_target_property(MPI_LIB MPI::MPI_C INTERFACE_LINK_LIBRARIES)


ClangFormat: fix typo

ClangFormat: fix typo

Signed-off-by: Robert Young <42c59959a3f4413d6a1b4d7b4f99db457d199e49@gmail.com>

--- cmake/modules/FindClangFormat.cmake
+++ cmake/modules/FindClangFormat.cmake
@@ -55,9 +55,8 @@
 	get_filename_component(ARG_INPUT ${ARG_INPUT} ABSOLUTE BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
 	get_filename_component(ARG_OUTPUT ${ARG_OUTPUT} ABSOLUTE BASE_DIR ${CMAKE_CURRENT_BINARY_DIR})

-
 	add_custom_command(
-		COMMAND ${CMAKE_} ${ARG_OPTIONS} ${ARG_INPUT} > ${ARG_OUTPUT}
+		COMMAND ${CMAKE_COMMAND} -E copy ${ARG_INPUT} ${ARG_OUTPUT}
 		MAIN_DEPENDENCY ${ARG_INPUT}
 		OUTPUT ${ARG_OUTPUT}
 	)


Add comment

Add comment

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -201,6 +201,8 @@
   set(HUNTER_ARGS_FILE "${HUNTER_PACKAGE_HOME_DIR}/args.cmake")

   # Registering dependency (before return!)
+  # Note: there will be no dependency registration on cache run.
+  # HUNTER_PARENT_PACKAGE set to empty string in 'hunter_cache_run'
   hunter_register_dependency(
       PACKAGE "${HUNTER_PARENT_PACKAGE}"
       DEPENDS_ON_PACKAGE "${HUNTER_PACKAGE_NAME}"


External project build directory

External project build directory

--- cmake/modules/hunter_download.cmake
+++ cmake/modules/hunter_download.cmake
@@ -70,6 +70,7 @@
     )
   endif()
   set(h_work_dir "${PROJECT_BINARY_DIR}/_HUNTER_temp_download_project")
+  set(h_build_dir "${h_work_dir}/_builds")
   file(REMOVE_RECURSE "${h_work_dir}")

   # create temp toolchain file to set environment variables
@@ -253,6 +254,8 @@
   execute_process(
       COMMAND
       "${CMAKE_COMMAND}"
+      "-H${h_work_dir}"
+      "-B${h_build_dir}"
       "-DCMAKE_TOOLCHAIN_FILE=${toolchain_wrapper}"
       "-DHUNTER_STATUS_DEBUG=${HUNTER_STATUS_DEBUG}"
       ${h_generator}
@@ -272,7 +275,7 @@

   execute_process(
       COMMAND
-      "${CMAKE_COMMAND}" --build "./"
+      "${CMAKE_COMMAND}" --build "${h_build_dir}"
       WORKING_DIRECTORY
       "${h_work_dir}"
       RESULT_VARIABLE


OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID

OpenSSL: ++PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/OpenSSL/hunter.cmake
+++ cmake/projects/OpenSSL/hunter.cmake
@@ -263,4 +263,4 @@
 endif()

 hunter_cacheable(OpenSSL)
-hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 7)
+hunter_download(PACKAGE_NAME OpenSSL PACKAGE_INTERNAL_DEPS_ID 8)


SH-396 WIP fix mac teamcity build for mesh-development

making sure we're copying over the necessary 3rd party library in the packaging stage

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -174,6 +174,7 @@
 	libllqtwebkit.dylib
         libndofdev.dylib
         libexception_handler.dylib
+	libcollada14dom.dylib
        )

     # fmod is statically linked on darwin


From Gordon Watts: It includes a file that doesn't exist until after freetype is untar'd!

--- graf2d/asimage/BuildAfterImage.cmake
+++ graf2d/asimage/BuildAfterImage.cmake
@@ -115,4 +115,8 @@
 add_custom_target(AFTERIMAGE DEPENDS ${afterimagelib} )
 set_target_properties(AFTERIMAGE PROPERTIES FOLDER Builtins)

+if(builtin_freetype)
+  add_dependencies(AFTERIMAGE FREETYPE)
+endif()
+
 install(FILES ${afterimagelib} DESTINATION lib)


Patch to use make DESTDIR install with cpack
fix for ticket #854

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

--- cmake/OpenSyncPackaging.cmake
+++ cmake/OpenSyncPackaging.cmake
@@ -3,6 +3,7 @@
   SET( CPACK_GENERATOR "TGZ;TBZ2" ) # This line is need for a CMake (Version 2.4.7) Bug - Fixed in CVS
   SET( CPACK_SOURCE_GENERATOR "TGZ;TBZ2")
   SET( CPACK_SOURCE_PACKAGE_FILE_NAME "${_name}-${_version}" )
+  SET( CPACK_SET_DESTDIR ON )
   INCLUDE( CPack )

 ENDMACRO( OPENSYNC_PACKAGE )


[CMAKE] Make the list of tests a property of the test suite

Summary:
Unused at the moment, this will allow to read back the list of tests
from a test suite.

There is no change in behavior.

Depends on D5311.

Test Plan:
  ninja check

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5312

--- cmake/modules/TestSuite.cmake
+++ cmake/modules/TestSuite.cmake
@@ -1,4 +1,13 @@
 # Allow to easily build test suites
+
+# Define a new target property to hold the list of tests associated with a test
+# suite. This property is named UNIT_TESTS to avoid confusion with the directory
+# level property TESTS.
+define_property(TARGET
+	PROPERTY UNIT_TESTS
+	BRIEF_DOCS "List of tests"
+	FULL_DOCS "A list of the tests associated with a test suite"
+)

 macro(get_target_from_suite SUITE TARGET)
 	set(${TARGET} "check-${SUITE}")
@@ -50,6 +59,12 @@
 function(add_test_to_suite SUITE NAME)
 	add_executable(${NAME} EXCLUDE_FROM_ALL ${ARGN})
 	_add_test_runner(${SUITE} ${NAME} ${NAME})
+
+	get_target_from_suite(${SUITE} TARGET)
+	set_property(
+		TARGET ${TARGET}
+		APPEND PROPERTY UNIT_TESTS ${NAME}
+	)
 endfunction(add_test_to_suite)

 function(add_boost_unit_tests_to_suite SUITE NAME)
@@ -71,6 +86,10 @@
 			${SUITE}
 			${_test_name}
 			${NAME} -t "${_test_name}"
+		)
+		set_property(
+			TARGET ${SUITE_TARGET}
+			APPEND PROPERTY UNIT_TESTS ${_test_name}
 		)

 		set(SUITE_UPGRADE_ACTIVATED "${SUITE}-upgrade-activated")


make sure we know the package name when we build the tarball and when we load it.

--- cmake/packages/packages.cmake
+++ cmake/packages/packages.cmake
@@ -25,7 +25,8 @@
 endif ()
 set(ARANGODB_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
 # eventually the package string will be modified later on:
-set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}.${ARANGODB_PACKAGE_ARCHITECTURE}")
+set(ARANGODB_BASIC_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}.${ARANGODB_PACKAGE_ARCHITECTURE}")
+set(CPACK_PACKAGE_FILE_NAME "${ARANGODB_BASIC_PACKAGE_FILE_NAME}")

 if ("${PACKAGING}" STREQUAL "DEB")
   include(packages/deb)
@@ -40,7 +41,8 @@
 ################################################################################
 ## generic tarball
 ################################################################################
-set(CPACK_PACKAGE_TGZ "${CMAKE_BINARY_DIR}/${CPACK_PACKAGE_FILE_NAME}.tar.gz")
+set(CPACK_PACKAGE_FILE_NAME "${ARANGODB_BASIC_PACKAGE_FILE_NAME}")
+set(CPACK_PACKAGE_TGZ "${CMAKE_BINARY_DIR}/${ARANGODB_BASIC_PACKAGE_FILE_NAME}.tar.gz")
 add_custom_target(TGZ_package
   COMMENT "create TGZ-package"
   COMMAND ${CMAKE_CPACK_COMMAND} -G TGZ  -C ${CMAKE_BUILD_TYPE}


cmake:Use standard cmake message modes

cmake:Use standard cmake message modes

--- cmakemodules/script_pcl.cmake
+++ cmakemodules/script_pcl.cmake
@@ -18,7 +18,7 @@

 		# 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_MRPT_CLANG_VERSION GREATER 34)
-			MESSAGE(STATUS "*Warning* Disabling PCL because of incompatibility between clang ${CMAKE_MRPT_CLANG_VERSION} and PCL with c++11 enabled")
+			MESSAGE(WARNING "Disabling PCL because of incompatibility between clang ${CMAKE_MRPT_CLANG_VERSION} and PCL with c++11 enabled")
 			SET(DISABLE_PCL ON)
 			RETURN()
 		endif ()
@@ -29,9 +29,9 @@
 		INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS})
 		link_directories(${PCL_LIBRARY_DIRS})
 		add_definitions(${PCL_DEFINITIONS})
-
+
 		IF (NOT Boost_FOUND)
-			MESSAGE("*MRPT ERROR MESSAGE*: PCL requires Boost. Either disable PCL (with DISABLE_PCL=ON) or, to fix the error, create the entries BOOST_ROOT and BOOST_LIBRARYDIR and set them to the correct values")
+			MESSAGE(FATAL_ERROR "PCL requires Boost. Either disable PCL (with DISABLE_PCL=ON) or, to fix the error, create the entries BOOST_ROOT and BOOST_LIBRARYDIR and set them to the correct values")
 		ENDIF (NOT Boost_FOUND)

 		IF($ENV{VERBOSE})
@@ -41,14 +41,14 @@
 			MESSAGE(STATUS " Definitions : ${PCL_DEFINITIONS}")
 			MESSAGE(STATUS " Libraries   : ${PCL_LIBRARIES}")
 		ENDIF($ENV{VERBOSE})
-
+
 		# Add PCL directories as "-isystem" to avoid warnings:
 		ADD_DIRECTORIES_AS_ISYSTEM(PCL_INCLUDE_DIRS)

-	endif(PCL_FOUND)
+	endif()

 	# Undo backups: (read above)
 	#set(wxWidgets_LIB_DIR ${BCK_wxWidgets_LIB_DIR})
 	#set(wxWidgets_LIBRARIES ${BCK_wxWidgets_LIBRARIES})
-
-ENDIF(NOT DISABLE_PCL)
+
+ENDIF()


COMP: Link vtkFiltersStatisticsGnuR module to KWSys

Source files in this module include <vtksys/...> headers so we need to
link to the KWSys libraries.  Link using PRIVATE_DEPENDS in module.cmake
to get the module dependency but not expose it to dependents because no
header files propagate the dependency.

Change-Id: I7159763bf2625e88dbaa7aa8c3cee3f02cc20c90

--- Filters/StatisticsGnuR/module.cmake
+++ Filters/StatisticsGnuR/module.cmake
@@ -5,6 +5,8 @@
     vtkCommonCore
     vtkCommonExecutionModel
     vtkFiltersStatistics
+  PRIVATE_DEPENDS
+    vtksys
   TEST_DEPENDS
     vtkTestingCore
     vtkFiltersSources


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -95,13 +95,17 @@
 		list(GET RESULT_VERSION 0 PACKAGE_MODE)
 		list(GET RESULT_VERSION 1 PACKAGE_NAME)
 		list(GET RESULT_VERSION 2 VERSION)
+		if(NOT DEFINED NOCACHE_LOCAL)
+			set(NO_USE_CACHE_LOCAL FALSE)
+		endif()
 		if(NOT DEFINED NOCACHE)
-			set(FORCE_GENERATE_ARTIFACT FALSE)
+			set(NO_USE_CACHE_REMOTE FALSE)
 		endif()
 	else()
 		set(PACKAGE_MODE "EXACT")
 		set(VERSION ${VERSION_REQUEST})
-		set(FORCE_GENERATE_ARTIFACT TRUE)
+		set(NO_USE_CACHE_LOCAL FALSE)
+		set(NO_USE_CACHE_REMOTE TRUE)
 		message("-- need build package ${PACKAGE_NAME} can't get version: ${VERSION_REQUEST}, will be generated.")
 	endif()
 	#######################################################
@@ -111,7 +115,7 @@
 	set(depends_bin_package "${depends_dir}/${PACKAGE}-${VERSION}")
 	set(depends_package ${CMAKE_PREFIX_PATH}/${PACKAGE}-${VERSION})
 	# if((NOT EXISTS "${depends_package}" OR NOT EXISTS "${depends_bin_package}"))
-	if(NOT EXISTS "${depends_package}")
+	if(NOT EXISTS "${depends_package}" OR ${NO_USE_CACHE_LOCAL})
 		# pido un paquete, en funcion de:
 		#		- paquete
 		#		- version
@@ -125,7 +129,7 @@
 		# 4. descargo el fichero que se supone tienes los ficheros cmake
 		cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
 		# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
-		if(NOT "${COPY_SUCCESFUL}" OR ${FORCE_GENERATE_ARTIFACT})
+		if(NOT "${COPY_SUCCESFUL}" OR ${NO_USE_CACHE_REMOTE})

 			file(REMOVE_RECURSE "${depends_bin_package}")
 			file(REMOVE_RECURSE "${depends_package}")
@@ -155,7 +159,6 @@
 				list(GET RESULT_VERSION 0 PACKAGE_MODE)
 				list(GET RESULT_VERSION 1 PACKAGE_NAME)
 				list(GET RESULT_VERSION 2 VERSION)
-				set(FORCE_GENERATE_ARTIFACT FALSE)
 			else()
 				message(FATAL_ERROR "-- not found ${PACKAGE}.")
 			endif()


changing common utils rev

changing common utils rev

- argument for octomap server
- explicit cast of sqrt as double

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -28,7 +28,7 @@
 set(occ-map_depends libbot-drc opencv-drc)

 set(common_utils_url https://svn.csail.mit.edu/common_utils)
-set(common_utils_revision 284)
+set(common_utils_revision 286)
 set(common_utils_depends Eigen_pod libbot-drc occ-map octomap-drc)

 set(scanmatch_url https://svn.csail.mit.edu/scanmatch/trunk)


modifies vtk cmake to disable tk and provide information on the location of vtk libraries

--- vtk.cmake
+++ vtk.cmake
@@ -24,6 +24,10 @@

 message ("Installing ${vtk_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")

+# update paths if a new version of vtk is used!
+set (vtk_LIBPATH ${BUILDEM_DIR}/lib/vtk-5.10)
+include_directories (${BUILDEM_DIR}/include/vtk-5.10)
+
 ExternalProject_Add(${vtk_NAME}
     DEPENDS             ${python_NAME} ${qt4_NAME} ${sip_NAME} ${pyqt4_NAME}
     PREFIX              ${BUILDEM_DIR}
@@ -46,6 +50,7 @@
         -DVTK_WRAP_TCL:BOOL=OFF
         # ilastik uses QT VTK widgets
         -DVTK_USE_QT:BOOL=ON
+        -DVTK_USE_TK:BOOL=OFF
         -DVTK_USE_QVTK_QTOPENGL:BOOL=ON
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     #TEST_COMMAND        ${BUILDEM_ENV_STRING} make check


install: don't install pinmap for ROI devices

Signed-off-by: Karol Gugala <38af71640571ee4b5093d4f69ffca1ac454f2948@antmicro.com>

--- xc7/make/install.cmake
+++ xc7/make/install.cmake
@@ -111,6 +111,11 @@
   set(DEVICE ${DEFINE_XC7_PINMAP_CSV_INSTALL_TARGET_DEVICE})
   set(PACKAGE ${DEFINE_XC7_PINMAP_CSV_INSTALL_TARGET_PACKAGE})

+  get_target_property(USE_ROI ${DEVICE} USE_ROI)
+  if(USE_ROI OR USE_ROI STREQUAL "USE_ROI-NOTFOUND")
+    return()
+  endif()
+
   get_target_property_required(PINMAP ${BOARD} PINMAP)
   get_file_location(PINMAP_FILE ${PINMAP})
   get_filename_component(PINMAP_FILE_NAME ${PINMAP_FILE} NAME)


documentation

documentation

--- lib/OpenCogMacros.cmake
+++ lib/OpenCogMacros.cmake
@@ -1,3 +1,8 @@
+# The definitions PROJECT_SRC_DIR, PROJECT_BUILD_DIR, PROJECT_CURRENT_BUILD_DIR,
+# and SCM_FILE_NAME are needed because in script mode cmake variables are set
+# as the though the directory from which this macro is called at is the root of
+# the source code.
+
 MACRO(OPENCOG_ADD_ATOM_TYPES SCRIPT_FILE HEADER_FILE DEFINITIONS_FILE INHERITANCE_FILE SCM_FILE PYTHON_FILE)
     ADD_CUSTOM_COMMAND (
         COMMAND "${CMAKE_COMMAND}" -DSCRIPT_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/${SCRIPT_FILE}\" -DHEADER_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILE}\" -DDEFINITIONS_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${DEFINITIONS_FILE}\" -DINHERITANCE_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${INHERITANCE_FILE}\" -DSCM_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${SCM_FILE}\" -DPYTHON_FILE=\"${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}\" -DPROJECT_SRC_DIR=\"${CMAKE_SOURCE_DIR}\" -DPROJECT_BUILD_DIR=\"${CMAKE_BINARY_DIR}\" -DPROJECT_CURRENT_BUILD_DIR=\"${CMAKE_CURRENT_BINARY_DIR}\" -DSCM_FILE_NAME=\"${SCM_FILE}\" -P "${CMAKE_SOURCE_DIR}/lib/OpenCogAtomTypes.cmake"


fix connext include dirs

fix connext include dirs

--- connext_cmake_module/cmake/Modules/FindConnext.cmake
+++ connext_cmake_module/cmake/Modules/FindConnext.cmake
@@ -5,8 +5,8 @@
 # Input variables:
 #
 # - NDDSHOME (optional): When specified, header files and libraries
-#   will be searched for in `${NDDSHOME}/include/ndds` and
-#   `${NDDSHOME}/lib` respectively.
+#   will be searched for in `${NDDSHOME}/include`, `${NDDSHOME}/include/ndds`
+#   and `${NDDSHOME}/lib` respectively.
 #
 # Output variables:
 #
@@ -53,7 +53,9 @@
 if(NOT "$ENV{NDDSHOME} " STREQUAL " ")
   # look inside of NDDSHOME if defined
   message(STATUS "Found RTI Connext: $ENV{NDDSHOME}")
-  set(Connext_INCLUDE_DIRS "$ENV{NDDSHOME}/include/ndds")
+  set(Connext_INCLUDE_DIRS
+    "$ENV{NDDSHOME}/include"
+    "$ENV{NDDSHOME}/include/ndds")

   set(_lib_path "$ENV{NDDSHOME}/lib")


Correct typo for removing file

Correct typo for removing file

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -363,8 +363,11 @@
 # MacOS cleanup
 if(APPLE)
   message("MacOS cleanup")
-  file(REMOVE_RECURSE CTEST_INSTALL_DIRECTORY)
-  file(REMOVE_RECURSE CI_PROJ_DIR)
+  file( REMOVE_RECURSE ${CTEST_INSTALL_DIRECTORY} )
+  file( REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY} )
+  file( REMOVE_RECURSE ${SUPERBUILD_SOURCE_DIR} )
+  file( REMOVE_RECURSE ${CTEST_INSTALL_DIRECTORY} )
+  file( REMOVE_RECURSE ${SB_ARTIFACT_GIT} )
 else()
   message("not apple")
 endif()


Stop job if build fail

Stop job if build fail

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -77,7 +77,7 @@

 if ( NOT _configure_rv EQUAL 0 )
   ctest_submit()
-  message( SEND_ERROR "An error occurs during ctest_configure.")
+  message( SEND_ERROR "An error occurs during ctest_configure. Dependencies might be buggy.")
   return()
 endif()

@@ -137,11 +137,15 @@
             NUMBER_ERRORS _build_nb_err
             CAPTURE_CMAKE_ERROR _build_error
             )
-message( "Status for build:" )
-message("_build_rv=${_build_rv}")
-message("_build_nb_err=${_build_nb_err}")
-message("_build_error=${_build_error}")
-if ( CAPTURE_CMAKE_ERROR EQUAL -1 )
+
+if ( DEBUG )
+  message( "Status for build:" )
+  message("_build_rv=${_build_rv}")
+  message("_build_nb_err=${_build_nb_err}")
+  message("_build_error=${_build_error}")
+endif()
+
+if ( ( NOT ${_build_nb_err} EQUAL 0 ) OR ( ${_build_error} EQUAL -1 ))
   ctest_submit()
   message( FATAL_ERROR "An error occurs during ctest_build.")
 endif()


BUG: add installation of Export headers

BUG: add installation of Export headers

Install the generated itkModuleExport.h headers for itk modules.

Change-Id: I9443aacd57d06a00ed80a8be67a50698e35ca880

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -142,6 +142,12 @@
       EXPORT_MACRO_NAME ${itk-module}_EXPORT
       NO_EXPORT_MACRO_NAME ${itk-module}_HIDDEN
       STATIC_DEFINE ITK_STATIC )
+    install(FILES
+      ${ITKCommon_BINARY_DIR}/${itk-module}Export.h
+      DESTINATION ${${itk-module}_INSTALL_INCLUDE_DIR}
+      COMPONENT Development
+      )
+
     if (BUILD_SHARED_LIBS)
       # export flags are only added when building shared libs, they cause
       # mismatched visibility warnings when building statically.


From Mattias Helsing, "Seems I was only half right given what you asked for. CMP0017 only
says that modules that are found and ran from cmake modules dir should
prefer cmake-provided modules. find_package() and include() still look
in CMAKE_MODULE_PATH first.

After some investigating I've come up with a proposal examplified in
the attached FindGDAL.cmake script. It simply calls the cmake provided
FindGDAL.cmake if it exists and returns if it succeeds in finding GDAL
using that, otherwise continue with our local cmake code.
Pro: Wont clutter our root CMakeLists.txt
Con: If we begin to write more advanced Findxxx modules (using
COMPONENTS, REQUIRED etc.) we may have to revise this scheme.
"

--- CMakeModules/FindGDAL.cmake
+++ CMakeModules/FindGDAL.cmake
@@ -18,6 +18,14 @@

 # This makes the presumption that you are include gdal.h like
 # #include "gdal.h"
+
+if(EXISTS ${CMAKE_ROOT}/Modules/FindGDAL.cmake)
+  include(${CMAKE_ROOT}/Modules/FindGDAL.cmake)
+
+  if(GDAL_FOUND)
+    return()
+  endif()
+endif()

 FIND_PATH(GDAL_INCLUDE_DIR gdal.h
   PATHS


Don't define ND_NO_TCMALLOC. It just does the same as the stock LL version does anyway since a while.

--- indra/cmake/GooglePerfTools.cmake
+++ indra/cmake/GooglePerfTools.cmake
@@ -61,8 +61,3 @@
 else (USE_GOOGLE_PERFTOOLS)
 endif (USE_GOOGLE_PERFTOOLS)

-# <FS:ND> tcmalloc removal
-if( NOT USE_TCMALLOC )
- add_definitions( -DND_NO_TCMALLOC )
-endif( NOT USE_TCMALLOC )
-# </FS:ND> tcmalloc removal


COMP: Bump the JsonCpp version.

COMP: Bump the JsonCpp version.

Includes a fix to prevent an attempt to build shared json
library on Windows.

Change-Id: I2ed3bcd0f193e4fbf216e1b6ab3e20da8bbdacef

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -59,7 +59,7 @@
   set( proj JsonCpp )
   ExternalProject_Add( JsonCpp
     GIT_REPOSITORY "${GIT_PROTOCOL}://github.com/TubeTK/jsoncpp-cmake.git"
-    GIT_TAG "691d15e2b0f9a87a5c0861da48976fca2bd2c70d"
+    GIT_TAG "b1d742628d5dbf22ad250fa71af5b8f2c482b15c"
     SOURCE_DIR "${CMAKE_BINARY_DIR}/JsonCpp"
     BINARY_DIR JsonCpp-Build
     CMAKE_GENERATOR ${gen}


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- scripts/test.cmake
+++ scripts/test.cmake
@@ -68,6 +68,7 @@
 #  WORKING_DIRECTORY ${TEST_MODELS_DIRECTORY}
 #  RESULT_VARIABLE retcode)
 #check_result()
+

 # increase default output sizes for test outputs
 IF (NOT DEFINED CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE)


Clean SOURCE_ARCHIVE_CONTENTS, otherwise it will add up

--- Modules/ManageArchive.cmake
+++ Modules/ManageArchive.cmake
@@ -114,6 +114,9 @@
     FILE(GLOB_RECURSE _ls FOLLOW_SYMLINKS "*" )
     STRING(REPLACE "\\\\" "\\" _ignore_files
         "${SOURCE_ARCHIVE_IGNORE_FILES}")
+
+    ## Clean the contents: otnerwise the duplication will add up
+    SET(SOURCE_ARCHIVE_CONTENTS "" CACHE INTERNAL "Source archive file list")
     FOREACH(_file ${_ls})
 	SET(_matched 0)
 	FOREACH(filePattern ${_ignore_files})


ENH: adding support of apples OSX Architectures

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -183,8 +183,10 @@
   SITE
   BUILDNAME )

+VariableListToArgs( ep_common_list ep_common_args )
+
+list( APPEND ep_common_list CMAKE_OSX_ARCHITECTURES )
 VariableListToCache( ep_common_list ep_common_cache )
-VariableListToArgs( ep_common_list ep_common_args )

 list( APPEND ep_common_args
   -DCMAKE_SKIP_RPATH:BOOL=ON


using sim model for vtx and edge tests

using sim model for vtx and edge tests

--- test/testing.cmake
+++ test/testing.cmake
@@ -88,13 +88,13 @@
 add_test(vtxBalance
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
   ./vtxBalance
-  "${MDIR}/afosr.dmg"
+  "${MDIR}/afosr.smd"
   "${MDIR}/4imb/"
   "afosrBal4p/")
 add_test(edgeBalance
   ${MPIRUN} ${MPIRUN_PROCFLAG} 4
   ./edgeBalance
-  "${MDIR}/afosr.dmg"
+  "${MDIR}/afosr.smd"
   "${MDIR}/4imb/"
   "afosrBal4p/")
 add_test(vtxElmBalance


updated SIRF and gadgetron versions

updated SIRF and gadgetron versions

Moved SIRF to v0.9.1-rc1. Gadgetron to our chroot_fixes branch (which is
just branched from gadgetron/master)

--- version_config.cmake
+++ version_config.cmake
@@ -86,15 +86,15 @@
   set(DEFAULT_ISMRMRD_TAG master)

 else()
-  set(DEFAULT_SIRF_TAG 359fca23b26a37821ba1961b87480f41efd6eda8)
+  set(DEFAULT_SIRF_TAG v0.9.1-rc1)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG 41651b3a2007c58cbf1f7706bb2e269a21e870b1)

   ## Gadgetron
-  set(DEFAULT_Gadgetron_URL https://github.com/CCPPETMR/gadgetron )
-  set(DEFAULT_Gadgetron_TAG f03829ef45e57466829e6ec46da7a7cf61db1c8a)
+  set(DEFAULT_Gadgetron_URL https://github.com/CCPPETMR/gadgetron) # https://github.com/CCPPETMR/gadgetron )
+  set(DEFAULT_Gadgetron_TAG chroot_fixes)

   ## ISMRMRD
   set(DEFAULT_ISMRMRD_URL https://github.com/CCPPETMR/ismrmrd )


upgrade pet-rd-tools to v2.0.1

upgrade pet-rd-tools to v2.0.1

Closes #416

--- version_config.cmake
+++ version_config.cmake
@@ -203,7 +203,7 @@

   ## pet-rd-tools
   set(DEFAULT_pet_rd_tools_URL https://github.com/UCL/pet-rd-tools )
-  set(DEFAULT_pet_rd_tools_TAG v1.1.0)
+  set(DEFAULT_pet_rd_tools_TAG v2.0.1)

   set(DEFAULT_ACE_URL https://github.com/paskino/libace-conda)
   set(DEFAULT_ACE_TAG origin/master)


ENH: CompiledLibraryComponents is generated by Cmake based on
USE_${Module} flags

TODO: separate componentgroups from modules

--- Modules/Filter/CompiledLibraryComponents.cmake
+++ Modules/Filter/CompiledLibraryComponents.cmake
@@ -3,8 +3,21 @@
 # in the bin directory. This file defines the components to be compiled.
 #

-set( MODULE_COMPONENT_GROUP_INCLUDE_FILES "#include \"selxModuleSinksAndSources.h\"" )
-set( MODULE_COMPONENT_TYPELISTS "ModuleSinksAndSourcesComponents" )
+set( MODULE_COMPONENT_GROUP_INCLUDE_FILES )
+set( MODULE_COMPONENT_TYPELISTS_ )
+
+foreach( MODULE ${SUPERELASTIX_MODULES} )
+  if( ${USE_${MODULE}} )
+    set( MODULE_COMPONENT_GROUP_INCLUDE_FILES "${MODULE_COMPONENT_GROUP_INCLUDE_FILES}#include \"selx${MODULE}.h\"\n" )
+    set( MODULE_COMPONENT_TYPELISTS_ "${MODULE_COMPONENT_TYPELISTS_}  ${MODULE}Components,\n")
+  endif()
+endforeach()
+
+string(LENGTH ${MODULE_COMPONENT_TYPELISTS_} LEN_WITH_COMMA)
+math(EXPR LEN_WITHOUT_COMMA "${LEN_WITH_COMMA}-2" )
+message( STATUS  ${LEN_WITHOUT_COMMA} )
+string(SUBSTRING ${MODULE_COMPONENT_TYPELISTS_} 0 ${LEN_WITHOUT_COMMA} MODULE_COMPONENT_TYPELISTS)
+unset(LEN)

 configure_file(
   ${${MODULE}_SOURCE_DIR}/include/selxCompiledLibraryComponents.h.in


added the utils.xq module as a dependency to all generated runtime and codegen files

--- cmake_modules/ZorbaRuntimeGenerator.cmake
+++ cmake_modules/ZorbaRuntimeGenerator.cmake
@@ -54,7 +54,8 @@
                         "${CPP_OUTPUT_BINARY_DIR}"
                         "${CPP_OUTPUT_SOURCE_DIR}"
                          DEPENDS ${CPP_QUERY} ${SPEC_FILE}
-                                 "${H_OUTPUT_BINARY_DIR}") # cpp always depends on .h
+                                 "${H_OUTPUT_BINARY_DIR}"
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq") # cpp always depends on .h

      MESSAGE(STATUS "Generating ${H_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${H_OUTPUT_BINARY_DIR}"
@@ -66,7 +67,8 @@
                         COMMAND "${CMAKE_COMMAND}" "-E" "copy_if_different"
                         "${H_OUTPUT_BINARY_DIR}"
                         "${H_OUTPUT_SOURCE_DIR}"
-                         DEPENDS ${HEADER_QUERY} ${SPEC_FILE})
+                         DEPENDS ${HEADER_QUERY} ${SPEC_FILE}
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq")
   ELSE (ZORBA_WORKS)
     CHECK_OUTPUT_EXISTS("${CPP_OUTPUT_SOURCE_DIR}")
     CHECK_OUTPUT_EXISTS("${H_OUTPUT_SOURCE_DIR}")
@@ -91,7 +93,8 @@
                         "${CPP_OUTPUT_SOURCE_DIR}"
                          DEPENDS ${CPP_QUERY} ${SPEC_FILES}
                                  "${H_OUTPUT_BINARY_DIR}" # cpp always depends on .h
-                                 "${CMAKE_BINARY_DIR}/src/runtime/visitors/planiter_visitor.h")
+                                 "${CMAKE_BINARY_DIR}/src/runtime/visitors/planiter_visitor.h"
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq")

      MESSAGE(STATUS "Generating ${H_OUTPUT_BINARY_DIR}")
      ADD_CUSTOM_COMMAND(OUTPUT "${H_OUTPUT_BINARY_DIR}"
@@ -104,6 +107,7 @@
                         "${H_OUTPUT_BINARY_DIR}"
                         "${H_OUTPUT_SOURCE_DIR}"
                          DEPENDS ${HEADER_QUERY} ${SPEC_FILES}
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq"
                          )
   ELSE (ZORBA_WORKS)
     CHECK_OUTPUT_EXISTS("${CPP_OUTPUT_SOURCE_DIR}")
@@ -125,7 +129,8 @@
                         COMMAND "${CMAKE_COMMAND}" "-E" "copy_if_different"
                         "${H_OUTPUT_BINARY_DIR}"
                         "${H_OUTPUT_SOURCE_DIR}"
-                         DEPENDS ${HEADER_QUERY} ${SPEC_FILES})
+                         DEPENDS ${HEADER_QUERY} ${SPEC_FILES}
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq")
   ELSE (ZORBA_WORKS)
     CHECK_OUTPUT_EXISTS("${H_OUTPUT_SOURCE_DIR}")
   ENDIF (ZORBA_WORKS)
@@ -150,6 +155,7 @@
                         "${CPP_OUTPUT_SOURCE_DIR}"
                          DEPENDS ${CPP_QUERY} ${SPEC_FILE}
                                  "${H_OUTPUT_BINARY_DIR}" # cpp always depends on .h
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq"
                        )

      MESSAGE(STATUS "Generating ${H_OUTPUT_BINARY_DIR}")
@@ -162,7 +168,8 @@
                         COMMAND "${CMAKE_COMMAND}" "-E" "copy_if_different"
                         "${H_OUTPUT_BINARY_DIR}"
                         "${H_OUTPUT_SOURCE_DIR}"
-                         DEPENDS ${HEADER_QUERY} ${SPEC_FILE})
+                         DEPENDS ${HEADER_QUERY} ${SPEC_FILE}
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq")
   ELSE (ZORBA_WORKS)
     CHECK_OUTPUT_EXISTS("${CPP_OUTPUT_SOURCE_DIR}")
     CHECK_OUTPUT_EXISTS("${H_OUTPUT_SOURCE_DIR}")
@@ -183,7 +190,8 @@
                         COMMAND "${CMAKE_COMMAND}" "-E" "copy_if_different"
                         "${OUTPUT_BINARY_DIR}"
                         "${OUTPUT_SOURCE_DIR}"
-                         DEPENDS ${HEADER_QUERY} ${SPEC_FILES})
+                         DEPENDS ${HEADER_QUERY} ${SPEC_FILES}
+                                 "${CMAKE_SOURCE_DIR}/src/runtime/spec/utils.xq")
   ELSE (ZORBA_WORKS)
     CHECK_OUTPUT_EXISTS("${OUTPUT_SOURCE_DIR}")
   ENDIF (ZORBA_WORKS)


Fix spacing and more consistency in comment style

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -4,7 +4,7 @@
 does the following:

 * Changes CMake around so that the output variables follow the /bin and /lib output
-  directory convention popular on Gnu.
+  directory convention popular on GNU.
 * Ensures that ARM and 64-bit code are built as position-independent code
 * Verifies that the compiler actually supports C++11
 * Sets the correct flags to enable C++11 on all platforms
@@ -14,10 +14,10 @@
 * Enforces the project has a VERSION set.
 ]]

-include(CMakeParseArguments) #Backwards compatibility
+include(CMakeParseArguments) # Backwards compatibility

-#This must be a macro since project defines scope-local variables
-#that we generally rely on being in the root context.
+# This must be a macro since project defines scope-local variables
+# that we generally rely on being in the root context.
 macro(standard_project project_name)
   cmake_parse_arguments(standard "" "VERSION" "LANGUAGES" ${ARGN})
   if(NOT standard_VERSION)
@@ -46,10 +46,10 @@
     endif()
   endif()

-  #These do not strictly *have* to be set prior to project, but they can be so we will
-
-  # Need to classify the architecture before we run anything else, this lets us easily configure the
-  # find version file based on what the architecture was actually built to be
+  # These do not strictly *have* to be set prior to project, but they can be so we will
+  # Need to classify the architecture before we run anything else, this lets us easily
+  # configure the find version file based on what the architecture was actually built to
+  # be.
   if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
     set(standard_BUILD_ARM ON PARENT_SCOPE)
     set(standard_BUILD_ARCHITECTURES "arm" PARENT_SCOPE)
@@ -66,7 +66,7 @@
   endif()
   message(STATUS "Using architecture: ${standard_BUILD_ARCHITECTURES}")

-   # All of our binaries go to one place:  The binaries output directory.  We only want to tinker
+  # All of our binaries go to one place:  The binaries output directory.  We only want to tinker
   # with this if we're building by ourselves, otherwise we just do whatever the enclosing project
   # wants us to do.
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin PARENT_SCOPE)
@@ -119,8 +119,8 @@
     endif()
   endif()

-  #CMAKE_OSX_DEPLOYMENT_TARGET < 10.9 implies -stdlib=libstdc++, which doesn't have
-  #complete c++11 support. override with libc++
+  # CMAKE_OSX_DEPLOYMENT_TARGET < 10.9 implies -stdlib=libstdc++, which doesn't have
+  # complete c++11 support. override with libc++
   if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS 10.9)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++" PARENT_SCOPE)
   endif()
@@ -128,7 +128,7 @@
 endfunction()

 function(standard_project_postinit)
-  #Post-initialization steps. All of these depend on project() having been called.
+  # Post-initialization steps. All of these depend on project() having been called.
   include(CTest)

   if(CMAKE_COMPILER_IS_GNUCC)


Set CMake 3.20 CMP0116 policy

Set CMake 3.20 CMP0116 policy

--- atdna/atdnaHelpers.cmake
+++ atdna/atdnaHelpers.cmake
@@ -2,6 +2,9 @@
 # gather_include_directories recursively builds a list of include directories
 # across all dependencies.
 #
+
+# CMake 3.20: Transform add_custom_command DEPFILE for Ninja
+cmake_policy(SET CMP0116 NEW)

 function(_atdna_gather_include_directories_impl target_name)
   get_target_property(target_dependencies ${target_name} INTERFACE_LINK_LIBRARIES)


Remove trailing whitespaces

Remove trailing whitespaces

--- modules/CMakeGeneratePkgConfig.cmake
+++ modules/CMakeGeneratePkgConfig.cmake
@@ -8,12 +8,12 @@

 SET(CMAKE_PKGCONFIG_TEMPLATE "prefix=@PREFIX@
-exec_prefix=@PREFIX@
+exec_prefix=@PREFIX@
 libdir=@LIBDIR_VAR
 includedir=@INCLUDE_VAR@

-Name: @NAME_PROJECT@
-Description: @DESCRIPTION_PROJECT@
+Name: @NAME_PROJECT@
+Description: @DESCRIPTION_PROJECT@
 Version: @VERSION_PROJECT@
 URL: @URL_PROJECT@
 Requires: @REQUIRES_PROJECT@
@@ -25,13 +25,13 @@

 SET(CMAKE_PKGCONFIG_TEMPLATE_BASE "
-prefix=@PREFIX@
+prefix=@PREFIX@
 exec_prefix= \\\${prefix}
 libdir= @LIBDIR_VAR@
 includedir=@INCLUDE_VAR@

-Name: @NAME_PROJECT@
-Description: @DESCRIPTION_PROJECT@
+Name: @NAME_PROJECT@
+Description: @DESCRIPTION_PROJECT@
 Version: @VERSION_PROJECT@
 Requires: @REQUIRES_PROJECT@
 Libs: @LIBS_PROJECT@


ENH: ExternalData: Use ITK series parse expression by default

ITK baseline images are named with the form

  $test.png
  $test.1.png
  $test.2.png

where "$test" may end in a digit.  Fix the default series parse
expression to handle this form.

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -403,7 +403,7 @@
     endif()
     set(series_parse "${ExternalData_SERIES_PARSE}")
   else()
-    set(series_parse "^(.*[A-Za-z_.-])([0-9]*)(\\.[^.]*)$")
+    set(series_parse "^(.*)()(\\.[^./]*)$")
   endif()
   if(ExternalData_SERIES_MATCH)
     set(series_match "${ExternalData_SERIES_MATCH}")


Allow setting the root path of JsonCpp.

Allow setting the root path of JsonCpp.

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -7,6 +7,10 @@

 ########################################################################
 # Cmake module for finding JsonCpp
+#
+# The following variables are used as inputs:
+#
+#  JsonCpp_ROOT
 #
 # The following variables will be defined:
 #
@@ -21,9 +25,8 @@
 FIND_PATH(JsonCpp_INCLUDE_DIR
   NAMES
     json/json.h
-  PATHS
-    ${JsonCpp_SOURCE_DIR}/jsoncpp
-    ${JsonCpp_SOURCE_DIR}/jsoncpp/include
+  HINTS
+    ${JsonCpp_ROOT_DIR}/include
 )

 # ----------------------------------------------------------------------
@@ -34,17 +37,15 @@
   find_library(JsonCpp_DEBUG_LIBRARY
     NAMES
       jsoncppd
-    PATHS
-      ${JsonCpp_BUILD_DIR}/jsoncpp
-      ${JsonCpp_INSTALL_DIR}/lib
+    HINTS
+      ${JsonCpp_ROOT_DIR}/lib
     )

   find_library(JsonCpp_RELEASE_LIBRARY
     NAMES
       jsoncpp
-    PATHS
-      ${JsonCpp_BUILD_DIR}/jsoncpp
-      ${JsonCpp_INSTALL_DIR}/lib
+    HINTS
+      ${JsonCpp_ROOT_DIR}/lib
     )

   if(JsonCpp_DEBUG_LIBRARY OR JsonCpp_RELEASE_LIBRARY)
@@ -71,9 +72,8 @@
     NAMES
       jsoncpp
       libjsoncpp
-    PATHS
-       ${JsonCpp_BUILD_DIR}/jsoncpp
-       ${JsonCpp_INSTALL_DIR}/lib
+    HINTS
+       ${JsonCpp_ROOT_DIR}/lib
     )

 endif()


added fmc as LL component.

added fmc as LL component.

--- cmake/FindSTM32LL.cmake
+++ cmake/FindSTM32LL.cmake
@@ -33,7 +33,7 @@
     SET(LL_PREFIX stm32f3xx_)

 ELSEIF(STM32_FAMILY STREQUAL "F4")
-    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti gpio i2c i2s iwdg
+    SET(LL_COMPONENTS	adc bus cortex crc dac dma2d dma exti fmc gpio i2c i2s iwdg
 						lptim pwr rcc rng rtc spi system tim usart usb utils wwdg)

     SET(LL_REQUIRED_COMPONENTS bus cortex pwr rcc system utils)


Bug 1120: Make sure that SuperLU version is checked

--- cmake/FindSuperLU.cmake
+++ cmake/FindSuperLU.cmake
@@ -60,11 +60,21 @@

 cmake_pop_check_state()

+if(SuperLU_FIND_VERSION)
+  if(${SUPERLU_VERSION_VAR} VERSION_LESS ${SuperLU_FIND_VERSION})
+    set(SUPERLU_VERSION_OK FALSE)
+  else()
+    set(SUPERLU_VERSION_OK TRUE)
+  endif()
+else()
+  set(SUPERLU_VERSION_OK TRUE)
+endif()
+
 endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(SUPERLU
-                                  REQUIRED_VARS SUPERLU_INCLUDES SUPERLU_LIBRARIES
+                                  REQUIRED_VARS SUPERLU_INCLUDES SUPERLU_LIBRARIES SUPERLU_VERSION_OK
                                   VERSION_VAR SUPERLU_VERSION_VAR)

 mark_as_advanced(SUPERLU_INCLUDES SUPERLU_LIBRARIES)


Added external dependency finding for boost unit test framework.

--- cmake/ROCSExtDeps.cmake
+++ cmake/ROCSExtDeps.cmake
@@ -65,6 +65,20 @@
 endif(ROCS_FIND_BOOST_PROGRAM_OPTIONS)

+if(ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK)
+	find_package(Boost 1.40.0 COMPONENTS unit_test_framework)
+	if(NOT Boost_FOUND)
+		message(FATAL_ERROR "The system Boost unit_test_framework library version 1.40.0 not found.")
+	endif(NOT Boost_FOUND)
+	message(STATUS "Found the system Boost unit_test_framework library version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}.")
+	set(ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK_STATUS "found version ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
+	# Set includes/libraries
+	include_directories(${Boost_INCLUDE_DIRS})
+	link_directories(${Boost_LIBRARY_DIRS})
+	set(BOOST_UNIT_TEST_FRAMEWORK_LIBRARIES ${Boost_LIBRARIES})
+endif(ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK)
+
+
 if(ROCS_FIND_OPENCV)
 	# Try with pkgconfig first (usually works for Ubuntu repository library)
 	find_package(OpenCVPkgConfig)
@@ -112,6 +126,9 @@
 if(ROCS_FIND_BOOST_PROGRAM_OPTIONS)
 	message(STATUS "-> Boost program_options: ${ROCS_FIND_BOOST_PROGRAM_OPTIONS_STATUS}")
 endif(ROCS_FIND_BOOST_PROGRAM_OPTIONS)
+if(ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK)
+	message(STATUS "-> Boost unit_test_framework: ${ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK_STATUS}")
+endif(ROCS_FIND_BOOST_UNIT_TEST_FRAMEWORK)
 if(ROCS_FIND_OPENCV)
 	message(STATUS "-> OpenCV: ${ROCS_FIND_OPENCV_STATUS}")
 endif(ROCS_FIND_OPENCV)


Fix path when copying Qt runtime libraries during installation.

--- cmake/Windeployqt.cmake
+++ cmake/Windeployqt.cmake
@@ -76,10 +76,9 @@
         while(_files)
             list(GET _files 0 _src)
             list(GET _files 1 _dest)
-            get_filename_component(_path \${_dest} DIRECTORY)
             execute_process(
                 COMMAND \"${CMAKE_COMMAND}\" -E
-                    copy \${_src} \"\${CMAKE_INSTALL_PREFIX}/${directory}/\${_path}\"
+                    copy \${_src} \"\${CMAKE_INSTALL_PREFIX}/${directory}/\${_dest}\"
             )
             list(REMOVE_AT _files 0 1)
         endwhile()


Adding .${PCL_MINOR_VERSION} to SOVERSION

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -87,7 +87,7 @@
     #
     set_target_properties(${_name} PROPERTIES
         VERSION ${PCL_VERSION}
-        SOVERSION ${PCL_MAJOR_VERSION}
+        SOVERSION ${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}
         DEFINE_SYMBOL "PCLAPI_EXPORTS")
     if(USE_PROJECT_FOLDERS)
       set_target_properties(${_name} PROPERTIES FOLDER "Libraries")


cmake: Detect MSVC-compatible compile flags on win32-gcc platform

--- platforms/win32-gcc/platform.cmake
+++ platforms/win32-gcc/platform.cmake
@@ -1,8 +1,22 @@
 set (PLIB_THREAD_MODEL win)
 set (PLIB_IPC_MODEL win)
+
+# Ensure MSVC-compatible struct packing convention is used
+# What flag to depends on gcc version: gcc3 uses '-mms-bitfields', while
+# gcc2 uses '-fnative-struct'.
+message (STATUS "Checking for MSVC-compatible code compilation flags")
+exec_program (gcc ARGS --version OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION)
+
+if (CMAKE_C_COMPILER_VERSION MATCHES ".*2\\.[0-9].*")
+	set (PLIB_PLATFORM_CFLAGS "-fnative-struct")
+	message (STATUS "Checking for MSVC-compatible code compile flags -fnative-struct")
+else()
+	set (PLIB_PLATFORM_CFLAGS "-mms-bitfields")
+	message (STATUS "Checking for MSVC-compatible code compile flags -mms-bitfields")
+endif()

 set (PLIB_PLATFORM_DEFINES
 	 -DHAVE_CONFIG_H
 )

-set (PLIB_PLATFORM_LINK_LIBRARIES ws2_32)+set (PLIB_PLATFORM_LINK_LIBRARIES ws2_32)


updates to ispc.cmake

updates to ispc.cmake

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -143,7 +143,7 @@
       -o ${outdir}/${fname}.dev${ISPC_TARGET_EXT}
       ${CMAKE_CURRENT_SOURCE_DIR}/${src}
       DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${deps}
-      COMMENT "Building with Intel SPMD Compiler (ISPC): ${CMAKE_CURRENT_SOURCE_DIR}/${src}"
+      COMMENT "Building ISPC object ${outdir}/${fname}.dev${ISPC_TARGET_EXT}"
     )

     SET(ISPC_OBJECTS ${ISPC_OBJECTS} ${results})


ERR: Removed use of FILE command and using WRITE_FILE instead.  We would still like CMake 1.6 to be able to build CMake CVS, and kwsys is used.

--- kwsysPlatformCxxTests.cmake
+++ kwsysPlatformCxxTests.cmake
@@ -7,11 +7,11 @@
       COMPILE_DEFINITIONS -DTEST_${var}
       OUTPUT_VARIABLE OUTPUT)
     IF(${var}_COMPILED)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeOutput.log
-        "${description} compiled with the following output:\n${OUTPUT}\n\n")
+      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeOutput.log
+        "${description} compiled with the following output:\n${OUTPUT}\n\n" APPEND)
     ELSE(${var}_COMPILED)
-      FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CMakeError.log
-        "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeError.log
+        "${description} failed to compile with the following output:\n${OUTPUT}\n\n" APPEND)
     ENDIF(${var}_COMPILED)
     IF(${invert} MATCHES INVERT)
       IF(${var}_COMPILED)


Fix OSS build

Fix OSS build

Summary: This fixes a couple of changes in library names / deps, but the really tricky issue is fixed by D17811654 and D17819858.

Reviewed By: agoder

Differential Revision: D17811655

fbshipit-source-id: f76f6b8f0d3e8537fa9f9cf0239ffe55716eb257

--- bistro/cmake/setup.cmake
+++ bistro/cmake/setup.cmake
@@ -38,6 +38,8 @@
   libpthread.so
   libsqlite3.so
   libwangle.so
+  libssl.so
+  libsodium.so
   libz.so
   libzstd.so

@@ -45,7 +47,7 @@
   libasync.so
   libconcurrency.so
   libprotocol.so
-  libthrift.so
+  libthrift-core.so
   libthriftcpp2.so
   libthriftprotocol.so
   libtransport.so


Remove gcc visibility options under MSVC for plugins too

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -66,11 +66,13 @@
   if (OGRE_STATIC)
     # add static prefix, if compiling static version
     set_target_properties(${PLUGINNAME} PROPERTIES OUTPUT_NAME ${PLUGINNAME}Static)
-  else ()
-    # add GCC visibility flags to shared library build
-    set_target_properties(${PLUGINNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
-    # disable "lib" prefix on Unix
-    set_target_properties(${PLUGINNAME} PROPERTIES PREFIX "")
+  else (OGRE_STATIC)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      # add GCC visibility flags to shared library build
+      set_target_properties(${PLUGINNAME} PROPERTIES COMPILE_FLAGS "${OGRE_GCC_VISIBILITY_FLAGS}")
+      # disable "lib" prefix on Unix
+      set_target_properties(${PLUGINNAME} PROPERTIES PREFIX "")
+	endif (CMAKE_COMPILER_IS_GNUCXX)
   endif ()
   install(TARGETS ${PLUGINNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}"


Propagate compiler setting to plugin test build

--- CMake/mitkTestPluginGenerator.cmake
+++ CMake/mitkTestPluginGenerator.cmake
@@ -38,6 +38,8 @@
       add_test(NAME mitkPluginGeneratorConfigureTest-${config} CONFIGURATIONS ${config}
                WORKING_DIRECTORY "${test_project_binary_dir}"
                COMMAND ${CMAKE_COMMAND} -D MITK_DIR:PATH=${MITK_BINARY_DIR}
+                                        -D CMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
+                                        -D CMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
                                         -G ${CMAKE_GENERATOR}
                                         "${test_project_source_dir}")
       set_tests_properties(mitkPluginGeneratorConfigureTest-${config} PROPERTIES
@@ -55,6 +57,8 @@
              WORKING_DIRECTORY "${test_project_binary_dir}"
              COMMAND ${CMAKE_COMMAND} -D MITK_DIR:PATH=${MITK_BINARY_DIR}
                                       -D CMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+                                      -D CMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
+                                      -D CMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
                                       -G ${CMAKE_GENERATOR}
                                       "${test_project_source_dir}")
     set_tests_properties(mitkPluginGeneratorConfigureTest-${CMAKE_BUILD_TYPE} PROPERTIES


COMP: Temporarily disable long running test.

--- CMake/mitkTestProjectTemplate.cmake
+++ CMake/mitkTestProjectTemplate.cmake
@@ -31,7 +31,7 @@
     set(package_test_configurations CONFIGURATIONS Release)
   endif()

-  if(NOT MITK_DISABLE_LONG_RUNNING_TESTS)
+  if(NOT MITK_DISABLE_LONG_RUNNING_TESTS AND 0) # temporarily disabled
     add_test(NAME mitkProjectTemplatePackageTest ${package_test_configurations}
              COMMAND ${CMAKE_COMMAND} --build ${MITK-ProjectTemplate_BINARY_DIR}/AwesomeProject-build --config $<CONFIGURATION> --target package)


modules: updated FindImGui.cmake.

modules: updated FindImGui.cmake.

--- modules/FindImGui.cmake
+++ modules/FindImGui.cmake
@@ -58,6 +58,14 @@
 #   DEALINGS IN THE SOFTWARE.
 #

+# Since 1.71, ImGui depends on the ApplicationServices framework for macOS
+# clipboard support
+if(CORRADE_TARGET_APPLE)
+    find_library(_IMGUI_ApplicationServices_LIBRARY ApplicationServices)
+    mark_as_advanced(_IMGUI_ApplicationServices_LIBRARY)
+    set(_IMGUI_EXTRA_LIBRARIES ${_IMGUI_ApplicationServices_LIBRARY})
+endif()
+
 # Vcpkg distributes imgui as a library with a config file, so try that first --
 # but only if IMGUI_DIR wasn't explicitly passed, in which case we'll look
 # there instead
@@ -65,8 +73,11 @@
 if(imgui_FOUND AND NOT IMGUI_DIR)
     if(NOT TARGET ImGui::ImGui)
         add_library(ImGui::ImGui INTERFACE IMPORTED)
+        # TODO: remove ${_IMGUI_EXTRA_LIBRARIES} once the ApplicationServices
+        # framework is added directly to vcpkg's target:
+        # https://github.com/microsoft/vcpkg/blob/master/ports/imgui/CMakeLists.txt
         set_property(TARGET ImGui::ImGui APPEND PROPERTY
-            INTERFACE_LINK_LIBRARIES imgui::imgui)
+            INTERFACE_LINK_LIBRARIES imgui::imgui ${_IMGUI_EXTRA_LIBRARIES})

         # Retrieve include directory for FindPackageHandleStandardArgs later
         get_target_property(ImGui_INCLUDE_DIR imgui::imgui
@@ -91,6 +102,10 @@
         add_library(ImGui::ImGui INTERFACE IMPORTED)
         set_property(TARGET ImGui::ImGui APPEND PROPERTY
             INTERFACE_INCLUDE_DIRECTORIES ${ImGui_INCLUDE_DIR})
+        if(_IMGUI_EXTRA_LIBRARIES)
+            set_property(TARGET ImGui::ImGui APPEND PROPERTY
+                INTERFACE_LINK_LIBRARIES ${_IMGUI_EXTRA_LIBRARIES})
+        endif()

         # Handle export and import of imgui symbols via IMGUI_API definition
         # in visibility.h of Magnum ImGuiIntegration.


safe stack sanitizer does not work in combination with asan

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -29,9 +29,10 @@
 # clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=memory'
 # set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )

-if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 9.2
-    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=safe-stack )
-endif()
+# safe-stack sanitizer causes multiple symbols linker error when combined with address sanitizer
+#if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" )
+    # list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=safe-stack )
+#endif()

 if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 8.3
     set( TNUN_compiler_runtime_integer_checks -fsanitize=integer )