Removed unused FindOpenMP.cmake file

Removed unused FindOpenMP.cmake file

--- cmake/FindOpenMP.cmake
+++ cmake/FindOpenMP.cmake
@@ -1,70 +0,0 @@
-######################################################
-##  OpenMP
-######################################################
-INCLUDE(CheckFunctionExists)
-MESSAGE(STATUS "Check for compiler OpenMP support...")
-SET(OPENMP_FLAGS)
-SET(OPENMP_LIBRARIES)
-SET(OPENMP_FOUND FALSE)
-
-# Key: CFLAGS##LDFLAGS#LIBRARIES
-# Neither CFLAGS nor LDFLAGS can be empty.  Use NONE instead.
-SET(
-  OPENMP_FLAGS_AND_LIBRARIES
-  # gcc
-  "-fopenmp##-fopenmp#"
-  "-fopenmp##-fopenmp#gomp"
-  "-fopenmp##-fopenmp#gomp pthread"
-  # icc
-  "-openmp##-openmp#"
-  "-openmp -parallel##-openmp -parallel#"
-  # SGI & PGI
-  "-mp##-mp#"
-  # Sun
-  "-xopenmp##-xopenmp#"
-  # Tru64
-  "-omp##-omp#"
-  # AIX
-  "-qsmp=omp##-qsmp=omp#"
-  # MSVC
-  "/openmp##NONE#"
-)
-
-# Massive hack to workaround CMake limitations
-LIST(LENGTH OPENMP_FLAGS_AND_LIBRARIES NUM_FLAGS)
-MATH(EXPR NUM_FLAGS "${NUM_FLAGS} - 1")
-FOREACH(I RANGE 0 ${NUM_FLAGS})
-  IF(NOT OPENMP_FOUND)
-    LIST(GET OPENMP_FLAGS_AND_LIBRARIES ${I} TMP)
-    STRING(REGEX MATCH "([^#]*)" OPENMP_FLAGS ${TMP})
-    STRING(REGEX REPLACE "[^#]*##" "" TMP ${TMP})
-    STRING(REGEX MATCH "([^#]*)" OPENMP_LDFLAGS ${TMP})
-    STRING(REGEX REPLACE "[^#]*#" "" OPENMP_LIBRARIES ${TMP})
-    #MESSAGE(STATUS "OPENMP_FLAGS=${OPENMP_FLAGS}")
-    #MESSAGE(STATUS "OPENMP_LDFLAGS = ${OPENMP_LDFLAGS}")
-    #MESSAGE(STATUS "OPENMP_LIBRARIES = ${OPENMP_LIBRARIES}")
-    #MESSAGE(STATUS "-------")
-
-    IF(OPENMP_LDFLAGS MATCHES "NONE")
-      SET(OPENMP_LDFLAGS "")
-    ENDIF(OPENMP_LDFLAGS MATCHES "NONE")
-    IF(OPENMP_LIBRARIES MATCHES " ")
-      STRING(REPLACE " " ";" OPENMP_LIBRARIES ${OPENMP_LIBRARIES})
-    ENDIF(OPENMP_LIBRARIES MATCHES " ")
-
-    ## I think I need to do a try-compile
-    SET(CMAKE_REQUIRED_FLAGS ${OPENMP_FLAGS})
-    SET(CMAKE_REQUIRED_LIBRARIES ${OPENMP_LIBRARIES})
-    CHECK_FUNCTION_EXISTS(omp_get_thread_num OPENMP_FOUND${I})
-
-    IF(OPENMP_FOUND${I})
-      SET(OPENMP_FOUND TRUE)
-    ENDIF(OPENMP_FOUND${I})
-  ENDIF(NOT OPENMP_FOUND)
-ENDFOREACH(I RANGE 0 ${NUM_FLAGS})
-
-IF(OPENMP_FOUND)
-  MESSAGE(STATUS "OpenMP flags \"${OPENMP_FLAGS}\", OpenMP libraries \"${OPENMP_LIBRARIES}\"")
-ELSE(OPENMP_FOUND)
-  MESSAGE(STATUS "Given compiler does not support OpenMP.")
-ENDIF(OPENMP_FOUND)


fix lccgen name

fix lccgen name

--- cmake/Findlccgen.cmake
+++ cmake/Findlccgen.cmake
@@ -47,7 +47,7 @@

 if(LCC_LOCATION)
 	find_package(lccgen HINTS ${LCC_LOCATION} CONFIG) #try to find it without looping on this module
-	if(NOT lcc_FOUND)
+	if(NOT lccgen_FOUND)
 		find_program(LCC_EXECUTABLE
 		NAMES ${lcc_names} HINTS ${LCC_LOCATION} DOC "lccgen command line client")
 		FIND_PACKAGE_HANDLE_STANDARD_ARGS(lccgen FOUND_VAR LCC_FOUND
@@ -55,7 +55,7 @@
             	                           FAIL_MESSAGE "Error finding lcc executable. variable LCC_LOCATION non set correctly.")
     	add_executable(license_generator::lccgen IMPORTED GLOBAL)
 		set_property(TARGET license_generator::lccgen PROPERTY IMPORTED_LOCATION ${LCC_EXECUTABLE})
-	ENDIF(NOT lcc_FOUND)
+	ENDIF(NOT lccgen_FOUND)
 ELSE(LCC_LOCATION)
 	find_package(lccgen HINTS ${CMAKE_BINARY_DIR} CONFIG) #try to find it without looping on this module


CMake: avoid incorrect extra "" around the GOOGLETEST_PATH.

It was looking in `"<...>/googlebenchmark/build/third_party/googletest"`,
with these extra `"` quotes, and wasn't finding anything..

--- cmake/GoogleTest.cmake
+++ cmake/GoogleTest.cmake
@@ -2,8 +2,9 @@
 set(GOOGLETEST_PREFIX "${benchmark_BINARY_DIR}/third_party/googletest")
 configure_file(${benchmark_SOURCE_DIR}/cmake/GoogleTest.cmake.in ${GOOGLETEST_PREFIX}/CMakeLists.txt @ONLY)

+set(GOOGLETEST_PATH "${CMAKE_CURRENT_SOURCE_DIR}/googletest") # Mind the quotes
 execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-  -DALLOW_DOWNLOADING_GOOGLETEST=${BENCHMARK_DOWNLOAD_DEPENDENCIES} -DGOOGLETEST_PATH:PATH="${CMAKE_CURRENT_SOURCE_DIR}/googletest" .
+  -DALLOW_DOWNLOADING_GOOGLETEST=${BENCHMARK_DOWNLOAD_DEPENDENCIES} -DGOOGLETEST_PATH:PATH=${GOOGLETEST_PATH} .
   RESULT_VARIABLE result
   WORKING_DIRECTORY ${GOOGLETEST_PREFIX}
 )


[build] Handle empty TAICHI_EMBIND_SOURCE (#4127)

--- cmake/TaichiCore.cmake
+++ cmake/TaichiCore.cmake
@@ -207,7 +207,9 @@
       "taichi/javascript/*.cpp"
       "taichi/javascript/*.h"
 )
-list(REMOVE_ITEM TAICHI_CORE_SOURCE ${TAICHI_EMBIND_SOURCE})
+if (TAICHI_EMBIND_SOURCE)
+  list(REMOVE_ITEM TAICHI_CORE_SOURCE ${TAICHI_EMBIND_SOURCE})
+endif()

 # TODO(#2196): Rename these CMAKE variables:
 # CORE_LIBRARY_NAME --> TAICHI_ISOLATED_CORE_LIB_NAME


next try for libpng

next try for libpng

--- cmake/get-libpng.cmake
+++ cmake/get-libpng.cmake
@@ -11,23 +11,19 @@

 set(LIBPNG_CMAKE_ARGS
       ${COMMON_CMAKE_ARGS}
-      -DZLIB_LIBRARY=${DEPENDENCY_INSTALL_DIR}/lib
-      -DZLIB_INCLUDE_DIR=${DEPENDENCY_INSTALL_DIR}/include
+      -DZLIB_LIBRARY:PATH=${DEPENDENCY_INSTALL_DIR}/lib
+      -DZLIB_INCLUDE_DIR:PATH=${DEPENDENCY_INSTALL_DIR}/include
       -DPNG_SHARED=off
       -DPNG_STATIC=on
       -DPNG_TESTS=off
       -DPNG_DEBUG=off
       -DPNGARG=off
       -DBUILD_SHARED_LIBS=FALSE
-      -DCMAKE_INSTALL_PREFIX=${DEPENDENCY_INSTALL_DIR}
+      -DCMAKE_INSTALL_PREFIX:PATH=${DEPENDENCY_INSTALL_DIR}
       -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-      -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-      -DCMAKE_COMPILER_IS_GNUCXX=${CMAKE_COMPILER_IS_GNUCXX}
-      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-      -DCMAKE_C_FLAGS=${GL_BINDING_C_FLAGS}
-      -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
+      -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
 )
-
+
 # For Windows it's faster to download the pre-compiled development binaries.
 if (WIN32)

@@ -50,7 +46,7 @@
   endif(MSVC)

 else() # build from source
-
+
   ExternalProject_Add(
     libpng
     DEPENDS      zlib


message tweak + LIB_TAG cleanout.

message tweak + LIB_TAG cleanout.

The LIB_TAG cleanout is part of a larger project to remove all mention
of the unused LIB_TAG variable from our build_system.

--- cmake/modules/tk.cmake
+++ cmake/modules/tk.cmake
@@ -63,13 +63,13 @@

 # Transform TK_INCLUDE_PATH (which is a list) to blank-delimited flag form.
 string(REGEX REPLACE ";" "\" -I\"" TKLIB_COMPILE_FLAGS "-I\"${TK_INCLUDE_PATH}\"")
-message(STATUS "TKLIB_COMPILE_FLAGS ${TKLIB_COMPILE_FLAGS}")
+message(STATUS "TKLIB_COMPILE_FLAGS = ${TKLIB_COMPILE_FLAGS}")

 if(PLD_tk)
   set(tk_COMPILE_FLAGS
   "-I\"${TCL_INCLUDE_PATH}\" ${TKLIB_COMPILE_FLAGS} -I\"${CMAKE_SOURCE_DIR}\"/bindings/tcl -I\"${CMAKE_BINARY_DIR}\"/bindings/tcl -I\"${CMAKE_SOURCE_DIR}\"/bindings/tk"
   )
-  set(tk_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_LIBRARY} ${TK_LIBRARY})
+  set(tk_LINK_FLAGS plplottcltk ${TCL_LIBRARY} ${TK_LIBRARY})
   set(tk_RPATH ${TCL_TK_RPATH})
   set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${TCL_LIBRARY} ${TK_LIBRARY})
   if(NOT ENABLE_DYNDRIVERS)
@@ -103,9 +103,9 @@
       set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${ITK_LIBRARY})
     endif(ENABLE_itk)
   endif(NOT ENABLE_DYNDRIVERS)
-  message(STATUS "tk_COMPILE_FLAGS ${tk_COMPILE_FLAGS}")
-  message(STATUS "tk_LINK_FLAGS ${tk_LINK_FLAGS}")
-  message(STATUS "tk_RPATH ${tk_RPATH}")
+  message(STATUS "tk_COMPILE_FLAGS = ${tk_COMPILE_FLAGS}")
+  message(STATUS "tk_LINK_FLAGS = ${tk_LINK_FLAGS}")
+  message(STATUS "tk_RPATH = ${tk_RPATH}")
 endif(PLD_tk)

 if(PLD_ntk)
@@ -114,9 +114,9 @@
   set(ntk_LINK_FLAGS ${TCL_LIBRARY} ${TK_LIBRARY})
   set(ntk_RPATH ${TCL_TK_RPATH})
   set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${ntk_LINK_FLAGS})
-  message(STATUS "ntk_COMPILE_FLAGS ${ntk_COMPILE_FLAGS}")
-  message(STATUS "ntk_LINK_FLAGS ${ntk_LINK_FLAGS}")
-  message(STATUS "ntk_RPATH ${ntk_RPATH}")
+  message(STATUS "ntk_COMPILE_FLAGS = ${ntk_COMPILE_FLAGS}")
+  message(STATUS "ntk_LINK_FLAGS = ${ntk_LINK_FLAGS}")
+  message(STATUS "ntk_RPATH = ${ntk_RPATH}")
 endif(PLD_ntk)

 if(PLD_tkwin)
@@ -125,18 +125,18 @@
     )

   if(USE_TCL_TK_STUBS)
-    set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_STUB_LIBRARY} ${TK_STUB_LIBRARY} ${X11_LIBRARIES})
+    set(tkwin_LINK_FLAGS plplottcltk ${TCL_STUB_LIBRARY} ${TK_STUB_LIBRARY} ${X11_LIBRARIES})
     # tkwin_RPATH should be undefined for this case since stubs versions
     # of the libraries are static (in my experience so far).
   else(USE_TCL_TK_STUBS)
-    set(tkwin_LINK_FLAGS plplottcltk${LIB_TAG} ${TCL_LIBRARY} ${TK_LIBRARY} ${X11_LIBRARIES})
+    set(tkwin_LINK_FLAGS plplottcltk ${TCL_LIBRARY} ${TK_LIBRARY} ${X11_LIBRARIES})
     set(tkwin_RPATH ${TCL_TK_RPATH})
   endif(USE_TCL_TK_STUBS)

   set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${TCL_LIBRARY} ${TK_LIBRARY})
-  message(STATUS tkwin_COMPILE_FLAGS ${tkwin_COMPILE_FLAGS})
-  message(STATUS tkwin_LINK_FLAGS ${tkwin_LINK_FLAGS})
-  message(STATUS tkwin_RPATH ${tkwin_RPATH})
+  message(STATUS "tkwin_COMPILE_FLAGS = ${tkwin_COMPILE_FLAGS}")
+  message(STATUS "tkwin_LINK_FLAGS = ${tkwin_LINK_FLAGS}")
+  message(STATUS "tkwin_RPATH = ${tkwin_RPATH}")
   set(
   tkwin_SOURCE
   ${CMAKE_SOURCE_DIR}/bindings/tk-x-plat/Plplotter_Init.c


clone hiredis depth=1

clone hiredis depth=1

--- 3rd_party/3rd_party.libhiredis.cmake
+++ 3rd_party/3rd_party.libhiredis.cmake
@@ -19,7 +19,7 @@
         find_package(Git)
         if(GIT_FOUND)
             message(STATUS "git found: ${GIT_EXECUTABLE}")
-            execute_process(COMMAND ${GIT_EXECUTABLE} clone "https://github.com/owent-contrib/hiredis" hiredis
+            execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth=1 "https://github.com/owent-contrib/hiredis" hiredis
                 WORKING_DIRECTORY ${3RD_PARTY_REDIS_BASE_DIR}
             )
         endif()


Adding specific case for Apple compilation flags (actually g++ should be enforced as a compiler too), removed previous ones that were making the app weird

--- cmake/ExternalProjectConfig.cmake
+++ cmake/ExternalProjectConfig.cmake
@@ -1,5 +1,10 @@
 set(ep_common_c_flags "${CMAKE_C_FLAGS_INIT} ${ADDITIONAL_C_FLAGS}")
-set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS} -fpermissive")
+
+if (NOT APPLE)
+    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS} -fpermissive")
+else()
+    set(ep_common_cxx_flags "${CMAKE_CXX_FLAGS_INIT} ${ADDITIONAL_CXX_FLAGS}")
+endif()

 set(ep_common_cache_args
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
@@ -10,18 +15,6 @@
     -DBUILD_TESTING:BOOL=OFF
 )

-# Set CMake OSX variable to pass down the external projects
-
-set(CMAKE_OSX_EXTERNAL_PROJECT_ARGS)
-if (APPLE)
-    list(APPEND CMAKE_OSX_EXTERNAL_PROJECT_ARGS
-         -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
-         -DCMAKE_OSX_SYSROOT:STRING=${CMAKE_OSX_SYSROOT}
-         -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
-    )
-    list(APPEND ep_common_cache_args ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS})
-endif()
-
 # Compute -G arg for configuring external projects with the same CMake generator:

 if (CMAKE_EXTRA_GENERATOR)


Limit CMake search for RootTestDriver.cmake

We currently search for the RootTestDriver.cmake on the whole
system, which could lead to some very funny behaviour if we
pick up the wrong file. Especially since the given paths to
this search function are not the first paths that CMake will
search.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1140,7 +1140,7 @@
   endif()

   #- Locate the test driver
-  find_file(ROOT_TEST_DRIVER RootTestDriver.cmake PATHS ${THISDIR} ${CMAKE_MODULE_PATH})
+  find_file(ROOT_TEST_DRIVER RootTestDriver.cmake PATHS ${THISDIR} ${CMAKE_MODULE_PATH} NO_DEFAULT_PATH)
   if(NOT ROOT_TEST_DRIVER)
     message(FATAL_ERROR "ROOT_ADD_TEST: RootTestDriver.cmake not found!")
   endif()


Update librepo.pc.cmake

Update librepo.pc.cmake

--- librepo/librepo.pc.cmake
+++ librepo/librepo.pc.cmake
@@ -5,7 +5,7 @@
 Name: librepo
 Description: Repodata downloading library.
 Version: @VERSION@
-Requires.private: libcurl
+Requires.private: libcurl openssl
 Libs: -L${libdir} -lrepo
-Libs.private: -lcurl -lexpat
+Libs.private: -lexpat -gpgme -gpg-error
 Cflags: -I${includedir} -D_FILE_OFFSET_BITS=64


correctly process empty string

correctly process empty string

--- reason.util.cmake
+++ reason.util.cmake
@@ -88,7 +88,7 @@
 function(reason_extract_dependency_properties_to_target TARGET_NAME DEP)
   function(reason_extract_include_dirs TARGET_NAME DEP PROP_NAME)
     get_target_property(props "${DEP}" "${PROP_NAME}")
-    if((NOT "${props}" STREQUAL "props-NOTFOUND") AND ("${props}"))
+    if((NOT "${props}" STREQUAL "props-NOTFOUND") AND (NOT "${props}" STREQUAL ""))
       foreach(prop IN LISTS props)
         target_include_directories("${TARGET_NAME}" PRIVATE "${prop}")
         reason_verbose("    [private-include=${v}]")


Fix SOFA's external build second pass step ordering.

--- CMake/Superbuild/External_Sofa.cmake
+++ CMake/Superbuild/External_Sofa.cmake
@@ -71,10 +71,13 @@
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
     DEPENDS
       ${${proj}_DEPENDENCIES}
+    STEP_TARGETS ${proj}_Pass2
     )

    ExternalProject_Add_Step(${proj} ${proj}_Pass2
     COMMAND ${CMAKE_COMMAND} ${CMAKE_BINARY_DIR}/${proj}
+    DEPENDEES configure
+    DEPENDERS build
     COMMENT "Configuring SOFA, second pass."
     WORKING_DIRECTORY ${${proj}_DIR}
    )


Temporarily use ${ENV_NAALI_DEP_PATH}/bullet-2.77 on linux instead of ${ENV_NAALI_DEP_PATH}/Bullet.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -455,7 +455,11 @@

 macro(use_package_bullet)
     if ("$ENV{BULLET_DIR}" STREQUAL "")
-       set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
+       if (WIN32)
+          set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/Bullet)
+       else # todo: This should be temporary? Always just use the above directory.
+          set(BULLET_DIR ${ENV_NAALI_DEP_PATH}/bullet-2.77)
+       endif()
     else()
        set(BULLET_DIR $ENV{BULLET_DIR})
     endif()


exclude declared test programs from the all target

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -591,6 +591,8 @@
     add_custom_target(tests)
   endif(CMAKE_MINOR_VERSION LESS 6)
   add_dependencies(tests ${exe})
+  # Don't build this target with the all target, #3110
+  set_target_properties(${exe} PROPERTIES EXCLUDE_FROM_ALL TRUE)
 endmacro(rosbuild_declare_test)

 # A helper to create test programs.  It calls rosbuild_add_executable() to


Allow OIS to be found in the OGRE_SDK location when building from outside

--- CMake/Packages/FindOIS.cmake
+++ CMake/Packages/FindOIS.cmake
@@ -19,6 +19,7 @@

 # Get path, convert backslashes as ${ENV_${var}}
 getenv_path(OIS_HOME)
+getenv_path(OGRE_SDK)
 getenv_path(OGRE_HOME)
 getenv_path(OGRE_SOURCE)

@@ -26,6 +27,7 @@
 set(OIS_PREFIX_PATH ${OIS_HOME} ${ENV_OIS_HOME}
   ${OGRE_SOURCE}/iPhoneDependencies ${ENV_OGRE_SOURCE}/iPhoneDependencies
   ${OGRE_SOURCE}/Dependencies ${ENV_OGRE_SOURCE}/Dependencies
+  ${OGRE_SDK} ${ENV_OGRE_SDK}
   ${OGRE_HOME} ${ENV_OGRE_HOME})
 create_search_paths(OIS)
 # redo search if prefix path changed


Only add the path from the source external data if it exists

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -17,10 +17,12 @@
   set(ExternalData_OBJECT_STORES "${CMAKE_BINARY_DIR}/ExternalData/Objects")
   file(MAKE_DIRECTORY "${ExternalData_OBJECT_STORES}")
 endif()
-list(APPEND ExternalData_OBJECT_STORES
-  # Local data store populated by the ITK pre-commit hook
-  "${SimpleITK_SOURCE_DIR}/.ExternalData"
-  )
+if (DEFINED SimpleITK_SOURCE_DIR AND EXISTS "${SimpleITK_SOURCE_DIR}/.ExternalData")
+  # Add source directory path
+  list(APPEND ExternalData_OBJECT_STORES
+          "${SimpleITK_SOURCE_DIR}/.ExternalData"
+    )
+endif()

 set(ExternalData_BINARY_ROOT ${CMAKE_BINARY_DIR}/ExternalData)


testing: skip test executables with no tests

Change-Id: Id17207ab380f33011f9d8709d502be11f92f93ed

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -162,7 +162,9 @@
 #   the variable 'tests'. See also 'vtk_test_cxx_executable'.
 function(vtk_test_mpi_executable exename _tests)
   vtk_test_cxx_executable("${exename}" "${_tests}" ${ARGN})
-  vtk_mpi_link("${exename}")
+  if(TARGET "${exename}")
+    vtk_mpi_link("${exename}")
+  endif()
 endfunction()

 # -----------------------------------------------------------------------------
@@ -271,6 +273,11 @@
     )
   _vtk_test_parse_args("${exe_options}" "" ${ARGN})
   _vtk_test_set_options("${exe_options}" "" ${options})
+
+  if(NOT ${_tests})
+    # No tests -> no need for an executable.
+    return()
+  endif()

   set(test_driver vtkTestDriver.h)
   if(RENDERING_FACTORY)


build BUGFIX set PIC for compat

build BUGFIX set PIC for compat

--- CMakeModules/UseCompat.cmake
+++ CMakeModules/UseCompat.cmake
@@ -24,4 +24,5 @@
     configure_file(${PROJECT_SOURCE_DIR}/compat/compat.h.in ${PROJECT_BINARY_DIR}/compat.h @ONLY)
     include_directories(${PROJECT_BINARY_DIR})
     add_library(compat OBJECT ${PROJECT_SOURCE_DIR}/compat/compat.c)
+    set_property(TARGET compat PROPERTY POSITION_INDEPENDENT_CODE ON)
 endmacro()


Change directory in main_packages

Change directory in main_packages

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -25,8 +25,6 @@
 set (ENV{LANG} "C") # Only ascii output

 get_filename_component( OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY )
-get_filename_component( CI_PROJ_DIR ${OTB_SOURCE_DIR} DIRECTORY )
-get_filename_component( CI_ROOT_DIR ${CI_PROJ_DIR} DIRECTORY )

 set ( DEBUG "1" )

@@ -57,7 +55,7 @@
 set ( CONFIGURE_OPTIONS
 "-DCMAKE_INSTALL_PREFIX=${CTEST_INSTALL_DIRECTORY};\
 -DOTB_BINARY_DIR=${OTB_SOURCE_DIR}/build;\
--DSUPERBUILD_INSTALL_DIR=${CI_ROOT_DIR}/xdk;\
+-DSUPERBUILD_INSTALL_DIR=${OTB_SOURCE_DIR}/xdk;\
 -DSUPERBUILD_BINARY_DIR=${OTB_SOURCE_DIR}/build;" )

 # Look for a GIT command-line client.


Support static gflags library

Support static gflags library

Summary: Closes https://github.com/facebook/folly/pull/587

Reviewed By: yfeldblum

Differential Revision: D5022071

Pulled By: Orvid

fbshipit-source-id: 2506087de76ba4544bf68a330bc2a18977c65f28

--- CMake/FindGFlags.cmake
+++ CMake/FindGFlags.cmake
@@ -13,7 +13,7 @@

 FIND_PATH(LIBGFLAGS_INCLUDE_DIR gflags/gflags.h)

-FIND_LIBRARY(LIBGFLAGS_LIBRARY gflags)
+FIND_LIBRARY(LIBGFLAGS_LIBRARY NAMES gflags gflags_static)

 # handle the QUIETLY and REQUIRED arguments and set LIBGFLAGS_FOUND to TRUE if
 # all listed variables are TRUE


STYLE: linux line endings

STYLE: linux line endings

--- CMake/FindOpenCV.cmake
+++ CMake/FindOpenCV.cmake
@@ -1,105 +1,105 @@
-set(OPENCV_SEARCH_PATH)
-
-if(OpenCV_DIR)
-  get_filename_component(OPENCV_SEARCH_PATH "${OpenCV_DIR}" PATH)
-  if(OPENCV_SEARCH_PATH)
-    get_filename_component(OPENCV_SEARCH_PATH "${OPENCV_SEARCH_PATH}" PATH)
-  endif()
-  if(OPENCV_SEARCH_PATH)
-    find_path(
-      opencv_INCLUDE_DIR
-      opencv/cv.h
-      PATHS "${OPENCV_SEARCH_PATH}"
-      PATH_SUFFIXES "include"
-      DOC "The directory where opencv/cv.h is installed")
-  endif()
-endif()
-
-if(NOT opencv_INCLUDE_DIR)
-  find_path(
-    opencv_INCLUDE_DIR
-    opencv/cv.h
-    PATHS "${OpenCV_DIR}"
-    PATH_SUFFIXES "include"
-    DOC "The directory where opencv/cv.h is installed")
-endif()
-
-if(NOT EXISTS ${opencv_INCLUDE_DIR}/opencv2/opencv.hpp)
-  message(FATAL_ERROR "${opencv_INCLUDE_DIR}/opencv2/opencv.hpp does not exists. "
-    "Make sure you have opencv 2.3 or higher. We had searched in ${OPENCV_SEARCH_PATHS}")
-endif()
-
-set(opencv_core_NAMES opencv_core)
-set(opencv_ml_NAMES opencv_ml)
-
-if ( opencv_INCLUDE_DIR )
-
-  set(OPENCV_INCLUDE_DIRS "${opencv_INCLUDE_DIR}")
-
-  if(NOT OpenCV_VERSION)
-    file(READ "${opencv_INCLUDE_DIR}/opencv2/core/version.hpp" _header_content)
-
-    string(REGEX MATCH  ".*# *define +CV_VERSION_EPOCH +([0-9]+).*" matched ${_header_content})
-    if( matched)
-      string(REGEX REPLACE ".*# *define +CV_VERSION_EPOCH +([0-9]+).*" "\\1"
-        OpenCV_VERSION_MAJOR ${_header_content})
-      string(REGEX REPLACE ".*# *define +CV_VERSION_MAJOR +([0-9]+).*" "\\1"
-        OpenCV_VERSION_MINOR ${_header_content})
-      string(REGEX REPLACE ".*# *define +CV_VERSION_MINOR +([0-9]+).*" "\\1"
-        OpenCV_VERSION_PATCH ${_header_content})
-      string(REGEX REPLACE ".*# *define +CV_VERSION_REVISION +([0-9]+).*" "\\1"
-        OpenCV_VERSION_TWEAK ${_header_content})
-    else()
-      #for opencv 2.3.x
-      string(REGEX REPLACE ".*# *define +CV_MAJOR_VERSION +([0-9]+).*" "\\1"
-        OpenCV_VERSION_MAJOR ${_header_content})
-      string(REGEX REPLACE ".*# *define +CV_MINOR_VERSION +([0-9]+).*" "\\1"
-        OpenCV_VERSION_MINOR ${_header_content})
-      string(REGEX REPLACE ".*# *define +CV_SUBMINOR_VERSION +([0-9]+).*" "\\1"
-        OpenCV_VERSION_PATCH ${_header_content})
-      set(OpenCV_VERSION_TWEAK)
-    endif()
-    set(OpenCV_VERSION
-      "${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}")
-  endif()
-
-  if(WIN32)
-    list(APPEND opencv_core_NAMES
-      "opencv_core${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}")
-    list(APPEND opencv_ml_NAMES
-      "opencv_ml${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}")
-  endif()
-endif()
-
-
-# Prefer the static library.
-find_library(
-OPENCV_core_LIBRARY
-NAMES ${opencv_core_NAMES}
-PATHS ${OPENCV_SEARCH_PATH}
-PATH_SUFFIXES "lib" "lib64" "lib/x86_64-linux-gnu"
-NO_DEFAULT_PATH
-DOC "Path to opencv_core library")
-
-find_library(
-OPENCV_ml_LIBRARY
-NAMES ${opencv_ml_NAMES}
-PATHS ${OPENCV_SEARCH_PATH}
-PATH_SUFFIXES "lib" "lib64" "lib/x86_64-linux-gnu"
-NO_DEFAULT_PATH
-DOC "Path to opencv_ml library")
-
-set(OpenCV_FOUND FALSE)
-if ( OPENCV_core_LIBRARY AND OPENCV_ml_LIBRARY )
-  set(OPENCV_LIBRARIES "${OPENCV_core_LIBRARY};${OPENCV_ml_LIBRARY}")
-endif ()
-
-if( OPENCV_INCLUDE_DIRS AND OPENCV_LIBRARIES )
-  set(OpenCV_FOUND TRUE)
-  set(OPENCV_VERSION ${OpenCV_VERSION}) #for compatility
-endif()
-
-include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCV
-  REQUIRED_VARS OPENCV_core_LIBRARY OPENCV_INCLUDE_DIRS
-  VERSION_VAR OpenCV_VERSION)
+set(OPENCV_SEARCH_PATH)
+
+if(OpenCV_DIR)
+  get_filename_component(OPENCV_SEARCH_PATH "${OpenCV_DIR}" PATH)
+  if(OPENCV_SEARCH_PATH)
+    get_filename_component(OPENCV_SEARCH_PATH "${OPENCV_SEARCH_PATH}" PATH)
+  endif()
+  if(OPENCV_SEARCH_PATH)
+    find_path(
+      opencv_INCLUDE_DIR
+      opencv/cv.h
+      PATHS "${OPENCV_SEARCH_PATH}"
+      PATH_SUFFIXES "include"
+      DOC "The directory where opencv/cv.h is installed")
+  endif()
+endif()
+
+if(NOT opencv_INCLUDE_DIR)
+  find_path(
+    opencv_INCLUDE_DIR
+    opencv/cv.h
+    PATHS "${OpenCV_DIR}"
+    PATH_SUFFIXES "include"
+    DOC "The directory where opencv/cv.h is installed")
+endif()
+
+if(NOT EXISTS ${opencv_INCLUDE_DIR}/opencv2/opencv.hpp)
+  message(FATAL_ERROR "${opencv_INCLUDE_DIR}/opencv2/opencv.hpp does not exists. "
+    "Make sure you have opencv 2.3 or higher. We had searched in ${OPENCV_SEARCH_PATHS}")
+endif()
+
+set(opencv_core_NAMES opencv_core)
+set(opencv_ml_NAMES opencv_ml)
+
+if ( opencv_INCLUDE_DIR )
+
+  set(OPENCV_INCLUDE_DIRS "${opencv_INCLUDE_DIR}")
+
+  if(NOT OpenCV_VERSION)
+    file(READ "${opencv_INCLUDE_DIR}/opencv2/core/version.hpp" _header_content)
+
+    string(REGEX MATCH  ".*# *define +CV_VERSION_EPOCH +([0-9]+).*" matched ${_header_content})
+    if( matched)
+      string(REGEX REPLACE ".*# *define +CV_VERSION_EPOCH +([0-9]+).*" "\\1"
+        OpenCV_VERSION_MAJOR ${_header_content})
+      string(REGEX REPLACE ".*# *define +CV_VERSION_MAJOR +([0-9]+).*" "\\1"
+        OpenCV_VERSION_MINOR ${_header_content})
+      string(REGEX REPLACE ".*# *define +CV_VERSION_MINOR +([0-9]+).*" "\\1"
+        OpenCV_VERSION_PATCH ${_header_content})
+      string(REGEX REPLACE ".*# *define +CV_VERSION_REVISION +([0-9]+).*" "\\1"
+        OpenCV_VERSION_TWEAK ${_header_content})
+    else()
+      #for opencv 2.3.x
+      string(REGEX REPLACE ".*# *define +CV_MAJOR_VERSION +([0-9]+).*" "\\1"
+        OpenCV_VERSION_MAJOR ${_header_content})
+      string(REGEX REPLACE ".*# *define +CV_MINOR_VERSION +([0-9]+).*" "\\1"
+        OpenCV_VERSION_MINOR ${_header_content})
+      string(REGEX REPLACE ".*# *define +CV_SUBMINOR_VERSION +([0-9]+).*" "\\1"
+        OpenCV_VERSION_PATCH ${_header_content})
+      set(OpenCV_VERSION_TWEAK)
+    endif()
+    set(OpenCV_VERSION
+      "${OpenCV_VERSION_MAJOR}.${OpenCV_VERSION_MINOR}.${OpenCV_VERSION_PATCH}")
+  endif()
+
+  if(WIN32)
+    list(APPEND opencv_core_NAMES
+      "opencv_core${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}")
+    list(APPEND opencv_ml_NAMES
+      "opencv_ml${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH}")
+  endif()
+endif()
+
+
+# Prefer the static library.
+find_library(
+OPENCV_core_LIBRARY
+NAMES ${opencv_core_NAMES}
+PATHS ${OPENCV_SEARCH_PATH}
+PATH_SUFFIXES "lib" "lib64" "lib/x86_64-linux-gnu"
+NO_DEFAULT_PATH
+DOC "Path to opencv_core library")
+
+find_library(
+OPENCV_ml_LIBRARY
+NAMES ${opencv_ml_NAMES}
+PATHS ${OPENCV_SEARCH_PATH}
+PATH_SUFFIXES "lib" "lib64" "lib/x86_64-linux-gnu"
+NO_DEFAULT_PATH
+DOC "Path to opencv_ml library")
+
+set(OpenCV_FOUND FALSE)
+if ( OPENCV_core_LIBRARY AND OPENCV_ml_LIBRARY )
+  set(OPENCV_LIBRARIES "${OPENCV_core_LIBRARY};${OPENCV_ml_LIBRARY}")
+endif ()
+
+if( OPENCV_INCLUDE_DIRS AND OPENCV_LIBRARIES )
+  set(OpenCV_FOUND TRUE)
+  set(OPENCV_VERSION ${OpenCV_VERSION}) #for compatility
+endif()
+
+include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCV
+  REQUIRED_VARS OPENCV_core_LIBRARY OPENCV_INCLUDE_DIRS
+  VERSION_VAR OpenCV_VERSION)


COMP: add libpng13 as a possible libpng name (OSGeo4W)

--- CMake/ImportFLTK.cmake
+++ CMake/ImportFLTK.cmake
@@ -76,6 +76,9 @@
           SET(FLUID_COMMAND fluid)
           # FLTK CMake needs a variable called JPEG_INCLUDE_DIR
           SET(JPEG_INCLUDE_DIR ${JPEG_INCLUDE_DIRS})
+
+          # FindPNG does not define libpng13 as a possible libpng name
+          SET(PNG_NAMES libpng13)

           # Needed for version 1.1.>=9
           SET(FLTK_FLUID_EXECUTABLE ${FLUID_COMMAND})


folly: import PushCheckState cmake module

Summary:
D23695665 (https://github.com/facebook/folly/commit/5c3b9d59a815b94df1afed0b7e0050bb75e09178) calls functions defined by this module,
but doesn't ensure that it has been imported.

I believe this to be the reason behind this build failure:

https://github.com/facebook/watchman/pull/856/checks?check_run_id=1135919864#step:52:217

Reviewed By: chadaustin

Differential Revision: D23794292

fbshipit-source-id: 897cfac862fda7420d1c53b0976492231b53dcf8

--- CMake/folly-deps.cmake
+++ CMake/folly-deps.cmake
@@ -16,6 +16,7 @@
 include(CheckCXXSymbolExists)
 include(CheckIncludeFileCXX)
 include(CheckFunctionExists)
+include(CMakePushCheckState)

 set(
   BOOST_LINK_STATIC "auto"


camiPhotoacousticsWorkstation buildconfig does not build the relevant command line tool

Summary:
this adds that command line tool to the build config
see also T26785

Test Plan: none i guess? i tested it?

Reviewers: kislinsk, O1 MITK Core, floca

Reviewed By: O1 MITK Core, floca

Subscribers: kirchnth

Tags: #photoacoustics

Maniphest Tasks: T26785

Differential Revision: https://phabricator.mitk.org/D219

--- CMake/BuildConfigurations/camiPhotoacousticsWorkstation.cmake
+++ CMake/BuildConfigurations/camiPhotoacousticsWorkstation.cmake
@@ -6,7 +6,7 @@

 set(MITK_USE_OpenCL ON CACHE BOOL "MITK Use OpenCL Library" FORCE)

-# Enable default plugins and the navigation modules
+# Also enable plugins often used in photoacoustics
 set(MITK_CONFIG_PLUGINS
   org.mitk.gui.qt.datamanager
   org.mitk.gui.qt.stdmultiwidgeteditor
@@ -19,3 +19,4 @@
   org.mitk.gui.qt.pointsetinteraction
 )

+set(BUILD_PhotoacousticBeamformingTool ON CACHE BOOL "Build commandline tools for Beamforming" FORCE)


Add new FreeType version to FindFreetype.cmake

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype2412 freetype2411 freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype2501 freetype250 freetype2412 freetype2411 freetype2410 freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Fix compilation error introduced by a previous windows-related bugfix.

--- CMakeModules/ExternalAssimp.cmake
+++ CMakeModules/ExternalAssimp.cmake
@@ -16,7 +16,7 @@
         UPDATE_COMMAND ""

         # set the installatin to root
-		INSTALL_COMMAND ""
+	# INSTALL_COMMAND ""
         INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}
         CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DASSIMP_BUILD_ASSIMP_TOOLS=False -DASSIMP_BUILD_SAMPLES=False -DASSIMP_BUILD_TESTS=False
 )


BUG: enable openMP flag if shark is built with openmp

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -125,6 +125,13 @@
   set(REQUIRED_CBLAS_LIB)
 endif()

+
+if ( SHARK_USE_OPENMP AND NOT OTB_USE_OPENMP )
+  message(WARNING "Shark library is built with OpenMP and you have OTB_USE_OPENMP set to OFF.\
+   It will be turned to ON to allow compilation")
+  set( OTB_USE_OPENMP "ON" CACHE BOOL "Add openmp compiler and linker flags" FORCE )
+endif()
+
 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
   REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR ${REQUIRED_CBLAS_LIB}


Install gsl, Eigen and libsimdpp + cmake support files

--- CMake/Utilities.cmake
+++ CMake/Utilities.cmake
@@ -186,15 +186,13 @@

 endfunction()

-FILE(GLOB CMAKE_FILES ${PROJECT_SOURCE_DIR}/*/*.cmake)
-
-INSTALL(FILES ${CMAKE_FILES}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/share/cmake
-)
-
-FILE(GLOB GSL_HEADERS ${PROJECT_SOURCE_DIR}/3rdParty/gsl/include/gsl/*)
-INSTALL(FILES ${GSL_HEADERS}
-  DESTINATION ${CMAKE_INSTALL_PREFIX}/include/gsl
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/CMake
+  DESTINATION ${CMAKE_INSTALL_PREFIX}/share
+  FILES_MATCHING PATTERN "*.cmake"
+)
+
+INSTALL(DIRECTORY ${PROJECT_SOURCE_DIR}/3rdParty/gsl/include/gsl ${PROJECT_SOURCE_DIR}/3rdParty/eigen/Eigen ${PROJECT_SOURCE_DIR}/3rdParty/libsimdpp/simdpp
+  DESTINATION ${CMAKE_INSTALL_PREFIX}/include
 )

 include(CheckCXXCompilerFlag)


SuperBuild: set configure_command in single line

--- SuperBuild/CMake/External_glew.cmake
+++ SuperBuild/CMake/External_glew.cmake
@@ -10,8 +10,7 @@
   BINARY_DIR ${GLEW_SB_BUILD_DIR}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
-  CONFIGURE_COMMAND
-  ${SB_CMAKE_COMMAND} ${GLEW_SB_SRC}/build/cmake/ ${SB_CMAKE_CACHE_ARGS} -DBUILD_UTILS:BOOL=OFF
+  CONFIGURE_COMMAND ${SB_CMAKE_COMMAND} ${GLEW_SB_SRC}/build/cmake/ ${SB_CMAKE_CACHE_ARGS} -DBUILD_UTILS:BOOL=OFF
   )

 set(_SB_GLEW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)


SuperBuild: use SB_CMAKE_COMMAND to have all rpath options

--- SuperBuild/CMake/External_glfw.cmake
+++ SuperBuild/CMake/External_glfw.cmake
@@ -21,6 +21,7 @@
       -DGLFW_BUILD_DOCS:BOOL=OFF
       -DGLFW_BUILD_TESTS:BOOL=OFF
       -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
+      CMAKE_COMMAND ${SB_CMAKE_COMMAND}
       )

     set(_SB_GLFW_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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   16)
+SET(KWSYS_DATE_STAMP_DAY   17)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


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

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


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

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


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


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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


COMP: Merge branch 'bug-18735-DeleteDisplayGeometry-Clean'

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag e8240c06) # first 8 characters of hash-tag
+  set(revision_tag c9ac0917) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Fix GLFW3 library lookup under Linux

Fix GLFW3 library lookup under Linux

The original problem report can be seen at:
https://eu07.pl/forum/index.php/topic,30260.html#msg487096

--- CMake_modules/FindGLFW3.cmake
+++ CMake_modules/FindGLFW3.cmake
@@ -48,7 +48,7 @@
 ENDIF()

 FIND_LIBRARY(GLFW3_LIBRARIES
-  NAMES glfw3dll glfw3
+  NAMES glfw3dll glfw3 glfw
   PATHS
     "${DEPENDS_DIR}/glfw"
     "$ENV{ProgramW6432}/glfw"


compile fix for windows/msvc (change int return types to void if there are not return values)

svn path=/trunk/KDE/kdepimlibs/; revision=762784

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -30,7 +30,7 @@
 # check if gpgme has GPGME_INCLUDE_CERTS_DEFAULT
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     int i = GPGME_INCLUDE_CERTS_DEFAULT;
   }
 " HAVE_GPGME_INCLUDE_CERTS_DEFAULT
@@ -39,7 +39,7 @@
 # check if gpgme has GPGME_KEYLIST_MODE_SIG_NOTATIONS
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_keylist_mode_t mode = GPGME_KEYLIST_MODE_SIG_NOTATIONS;
   }
 " HAVE_GPGME_KEYLIST_MODE_SIG_NOTATIONS
@@ -48,7 +48,7 @@
 # check if gpgme_key_sig_t has notations
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_key_sig_t key_sig = 0;
     gpgme_sig_notation_t notation = key_sig->notations;
   }
@@ -58,7 +58,7 @@
 # check if gpgme has gpgme_key_t->is_qualified
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int test(gpgme_key_t& key) {
+  void test(gpgme_key_t& key) {
     unsigned int iq;
     iq = key->is_qualified;
   }
@@ -69,7 +69,7 @@
 # check if gpgme has gpgme_sig_notation_t->critical
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_sig_notation_t sig_notation = 0;
     unsigned int cr1 = sig_notation->critical;
     unsigned int cr2 = GPGME_SIG_NOTATION_CRITICAL;
@@ -80,7 +80,7 @@
 # check if gpgme has gpgme_sig_notation_t->flags
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_sig_notation_t sig_notation = 0;
     gpgme_sig_notation_flags_t f = sig_notation->flags;
   }
@@ -90,7 +90,7 @@
 # check if gpgme has gpgme_sig_notation_t->human_readable
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_sig_notation_t sig_notation = 0;
     unsigned int cr1 = sig_notation->human_readable;
     unsigned int cr2 = GPGME_SIG_NOTATION_HUMAN_READABLE;
@@ -101,7 +101,7 @@
 # check if gpgme has gpgme_subkey_t->is_qualified
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int test(gpgme_subkey_t& subkey) {
+  void test(gpgme_subkey_t& subkey) {
     unsigned int iq;
     iq = subkey->is_qualified;
   }
@@ -112,7 +112,7 @@
 # check if gpgme has gpgme_engine_info_t->home_dir
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_engine_info_t ei = 0;
     const char * hd = ei->home_dir;
   }
@@ -122,7 +122,7 @@
 #check if gpgme has gpgme_ctx_{get,set}_engine_info()
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_ctx_t ctx = 0;
     const gpgme_engine_info_t ei = gpgme_ctx_get_engine_info( ctx );
     const char * filename = 0;
@@ -148,7 +148,7 @@
 # check if gpgme has gpgme_sig_notation_{clear,add,get}
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_ctx_t ctx = 0;
     const gpgme_sig_notation_t nota = gpgme_sig_notation_get( ctx );
     const char * const name = 0;
@@ -163,7 +163,7 @@
 # check if gpgme has gpgme_decrypt_result_t->file_name
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_decrypt_result_t res = 0;
     const char * const fn = res->file_name;
     (void)fn;
@@ -174,7 +174,7 @@
 # check if gpgme has gpgme_recipient_t and gpgme_decrypt_result_t->recipients
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_decrypt_result_t res = 0;
     gpgme_recipient_t r = res->recipients;
     const char * kid = r->keyid;
@@ -188,7 +188,7 @@
 # check if gpgme has gpgme_verify_result_t->file_name
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_verify_result_t res = 0;
     const char * fn = res->file_name;
     (void)fn;
@@ -199,7 +199,7 @@
 # check if gpgme has gpgme_signature_t->pka_{trust,address}
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_signature_t sig = 0;
     unsigned int pkat = sig->pka_trust;
     const char * pkaa = sig->pka_address;
@@ -210,7 +210,7 @@
 # check if gpgme has gpgme_signature_t->{hash,pubkey}_algo
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_signature_t sig = 0;
     gpgme_pubkey_algo_t pk = sig->pubkey_algo;
     gpgme_hash_algo_t h = sig->hash_algo;
@@ -221,7 +221,7 @@
 # check if gpgme has gpgme_signature_t->chain_model
 check_cxx_source_compiles ("
   #include <gpgme.h>
-  int main() {
+  void main() {
     gpgme_signature_t sig = 0;
     unsigned int cm = sig->chain_model;
   }


register interfaces with ament index

register interfaces with ament index

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -110,6 +110,18 @@
     ${_idl_files}
   )

+  if(NOT _ARG_SKIP_INSTALL)
+    # register interfaces with the ament index
+    set(_idl_files_lines)
+    foreach(_idl_file ${_ARG_UNPARSED_ARGUMENTS})
+      get_filename_component(_interface_name "${_idl_file}" NAME)
+      list(APPEND _idl_files_lines "${_interface_name}")
+    endforeach()
+    list(SORT _idl_files_lines)
+    string(REPLACE ";" "\n" _idl_files_lines "${_idl_files_lines}")
+    ament_index_register_resource("rosidl_interfaces" CONTENT "${_idl_files_lines}")
+  endif()
+
   # generators must be executed in topological order
   # which is ensured by every generator finding its dependencies first
   # and then registering itself as an extension


COMP: further fixes for FFMPEGWriter after consulting Berk.

--- CMake/FindFFMPEG.cmake
+++ CMake/FindFFMPEG.cmake
@@ -29,6 +29,8 @@
        DOC "Location of FFMPEG Headers"
 )

+message("FFMPEG_INCLUDE_DIR: ${FFMPEG_INCLUDE_DIR}")
+
 # if ffmpeg headers are seperated to each of libavformat, libavcodec etc..
 IF( NOT FFMPEG_INCLUDE_DIR )
   FIND_PATH(FFMPEG_INCLUDE_DIR libavformat/avformat.h
@@ -48,6 +50,9 @@
        PATH_SUFFIXES ffmpeg
        DOC "Location of FFMPEG Headers"
 )
+
+message("FFMPEG_INCLUDE_DIR: ${FFMPEG_INCLUDE_DIR}")
+
 ENDIF( NOT FFMPEG_INCLUDE_DIR )


Fixed CMake script to find libUSB

Fixed CMake script to find libUSB

--- CMake/FindLibUSB.cmake
+++ CMake/FindLibUSB.cmake
@@ -24,7 +24,7 @@
 endif ( PKG_CONFIG_FOUND )

 if ( PKGCONFIG_LIBUSB_FOUND )
-  set ( LibUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDE_DIRS} )
+  set ( LibUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDEDIR} )
   foreach ( i ${PKGCONFIG_LIBUSB_LIBRARIES} )
     string ( REGEX MATCH "[^-]*" ibase "${i}" )
     find_library ( ${ibase}_LIBRARY
@@ -88,7 +88,7 @@

 if ( LibUSB_FOUND )
   set ( CMAKE_REQUIRED_INCLUDES "${LibUSB_INCLUDE_DIRS}" )
-  check_include_file ( "{LibUSB_HEADER_FILE}" LibUSB_FOUND )
+  check_include_file ( "${LibUSB_HEADER_FILE}" LibUSB_FOUND )
 endif ( LibUSB_FOUND )

 if ( LibUSB_FOUND )


Increment version to VTK 7.0.0

Increment version to VTK 7.0.0

--- CMake/vtkVersion.cmake
+++ CMake/vtkVersion.cmake
@@ -1,4 +1,4 @@
 # VTK version number components.
-set(VTK_MAJOR_VERSION 6)
-set(VTK_MINOR_VERSION 3)
+set(VTK_MAJOR_VERSION 7)
+set(VTK_MINOR_VERSION 0)
 set(VTK_BUILD_VERSION 0)


Some CPack refinements

Some CPack refinements

--- CMakeCPackConfig.cmake
+++ CMakeCPackConfig.cmake
@@ -1,12 +1,18 @@
 if (CPACK_GENERATOR MATCHES "DEB")
     set(CPACK_SET_DESTDIR true)
     set(CPACK_PACKAGING_INSTALL_PREFIX "/tmp")
-    set(CMAKE_INSTALL_PREFIX "/opt/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+
+    execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE DEB_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
+    message("Architecture:  " ${DEB_ARCHITECTURE})
+    set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}_${DEB_ARCHITECTURE}")
+
+    set(CPACK_INSTALL_PREFIX "/opt/${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
     set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
     set(CPACK_DEBIAN_PACKAGE_SECTION "misc")
     set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
     # autogenerate dependency information
     set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
+    set (CPACK_DEBIAN_COMPRESSION_TYPE xz)
 elseif(CPACK_GENERATOR MATCHES "TGZ")
     set(CPACK_PACKAGING_INSTALL_PREFIX "")
 endif()


Add DCCyclic.h and DCCyclic.cpp file to cmake

--- CMake/FileLists.cmake
+++ CMake/FileLists.cmake
@@ -39,6 +39,7 @@
    src/System.cpp
    src/cbmc/DCCrankShaftAng.cpp
    src/cbmc/DCCrankShaftDih.cpp
+   src/cbmc/DCCyclic.cpp
    src/cbmc/DCGraph.cpp
    src/cbmc/DCFreeCycle.cpp
    src/cbmc/DCFreeHedron.cpp
@@ -136,6 +137,7 @@
    src/cbmc/DCComponent.h
    src/cbmc/DCCrankShaftAng.h
    src/cbmc/DCCrankShaftDih.h
+   src/cbmc/DCCyclic.h
    src/cbmc/DCData.h
    src/cbmc/DCFreeCycle.h
    src/cbmc/DCFreeHedron.h


ENH: improve FindOssim script

ENH: improve FindOssim script

--- CMake/FindOssim.cmake
+++ CMake/FindOssim.cmake
@@ -14,14 +14,19 @@
 find_path( OSSIM_INCLUDE_DIR
            NAMES ossim/init/ossimInit.h )

-file(READ "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h" _ossim_version_h_CONTENTS)
-string(REGEX REPLACE ".*# *define OSSIM_VERSION *\"([0-9.]+)\".*" "\\1" OSSIM_VERSION "${_ossim_version_h_CONTENTS}")
-string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" OSSIM_MAJOR_VERSION_NUMBER "${OSSIM_VERSION}")
-string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" OSSIM_MINOR_VERSION_NUMBER "${OSSIM_VERSION}")
-string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" OSSIM_PATCH_VERSION_NUMBER "${OSSIM_VERSION}")
-
-math(EXPR OSSIM_VERSION_NUMBER
-  "((${OSSIM_MAJOR_VERSION_NUMBER})*100+${OSSIM_MINOR_VERSION_NUMBER})*100+${OSSIM_PATCH_VERSION_NUMBER}")
+if(EXISTS "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h")
+  file(READ "${OSSIM_INCLUDE_DIR}/ossim/ossimVersion.h" _ossim_version_h_CONTENTS)
+  string(REGEX REPLACE ".*# *define OSSIM_VERSION *\"([0-9.]+)\".*" "\\1" OSSIM_VERSION "${_ossim_version_h_CONTENTS}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" OSSIM_MAJOR_VERSION_NUMBER "${OSSIM_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" OSSIM_MINOR_VERSION_NUMBER "${OSSIM_VERSION}")
+  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" OSSIM_PATCH_VERSION_NUMBER "${OSSIM_VERSION}")
+  math(EXPR OSSIM_VERSION_NUMBER
+    "((${OSSIM_MAJOR_VERSION_NUMBER})*100+${OSSIM_MINOR_VERSION_NUMBER})*100+${OSSIM_PATCH_VERSION_NUMBER}")
+else()
+  if(NOT Ossim_FIND_QUIETLY)
+  message(WARNING "ossimVersion.h not found !")
+  endif()
+endif()

 find_library(OSSIM_LIBRARY
              NAMES ossim)


ENH: cmake: Update "dcmqi_add_test" to support RESOURCE_LOCK

See https://cmake.org/cmake/help/v3.5/prop_test/RESOURCE_LOCK.html

--- CMake/dcmqiTest.cmake
+++ CMake/dcmqiTest.cmake
@@ -64,6 +64,9 @@
 #                    When build as a Slicer extension the command will be
 #                    executed using ${SEM_LAUNCH_COMMAND
 # TEST_DEPENDS     - list of test dependencies (optional)
+# RESOURCE_LOCK    - Specify a list of resources that are locked by this test.
+#                    If multiple tests specify the same resource lock, they are
+#                    guaranteed not to run concurrently.
 #
 #
 macro(dcmqi_add_test)
@@ -76,6 +79,7 @@
   set(multiValueArgs
     COMMAND
     TEST_DEPENDS
+    RESOURCE_LOCK
   )
   cmake_parse_arguments(_SELF
     "${options}"
@@ -101,5 +105,10 @@
       PROPERTIES DEPENDS ${_SELF_TEST_DEPENDS}
       )
   endif()
+  if(_SELF_RESOURCE_LOCK)
+    set_tests_properties(${_SELF_NAME}
+      PROPERTIES RESOURCE_LOCK ${_SELF_RESOURCE_LOCK}
+      )
+  endif()

 endmacro()


ENH: Update elastix

ENH: Update elastix

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -1,8 +1,8 @@
 set( proj elastix )

 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )
-set( ELASTIX_REPOSITORY https://github.com/kaspermarstal/elastix )
-set( ELASTIX_TAG 356d518e6ac18c259cd0f091692265a551dbeedb )
+set( ELASTIX_REPOSITORY http://github.com/kaspermarstal/elastix )
+set( ELASTIX_TAG c49f4e51cd2eeaa86459abc80ac457d0d9a53f00 )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_REPOSITORY}


remove rmat_22 test - graph is 200MB compressed

--- test/testing.cmake
+++ test/testing.cmake
@@ -193,10 +193,6 @@
     ./kokkosColoring
     "${GRAPHS}/gnutella.ebin")

-  mpi_test(colorRmat_22 1
-    ./kokkosColoring
-    "${GRAPHS}/rmat_22.ebin")
-
   mpi_test(colorAsic 1
     ./kokkosColoring
     "${GRAPHS}/asic.ebin")


RPM: Add back summary and description translations

--- Modules/ManageRPMScript.cmake
+++ Modules/ManageRPMScript.cmake
@@ -191,7 +191,7 @@
 	    SET(_lang "${_sT}")
 	ELSE(_lang STREQUAL "")
 	    RPM_SPEC_STRING_ADD_TAG(RPM_SPEC_SUMMARY_OUTPUT
-		"Summary" "${lang}" "${PRJ_SUMMARY}"
+		"Summary" "${_lang}" "${_sT}"
 		)
 	    SET(_lang "")
 	ENDIF(_lang STREQUAL "")


minor portfile.cmake update to make sure we are using the right SHA512

--- distribution/vcpkg/portfile.cmake
+++ distribution/vcpkg/portfile.cmake
@@ -17,36 +17,39 @@
     OUT_SOURCE_PATH SOURCE_PATH
     REPO ThePhD/infoware
     REF v0.5.3
-    SHA512 ed3b4384c135ebdcead21afc3b5ccb790d7058f5dadfb31a5be52e10078d9140851e2971f3e974a9915dd8a5d2615be3bcee2270baf145b921f46b27c8182cd7
+    SHA512 64a4f0b1027a20bf9c90bf99d638947cb1c0d6bad1b22c8b0403713c5e2c69756435906996b154989f9eaa41e5d55743d7bf5ef51f7bbf8d99eae94d29af1b2c
     HEAD_REF master
 )

 vcpkg_check_features(
-  OUT_FEATURE_OPTIONS FEATURE_OPTIONS
-  x11 INFOWARE_USE_X11
-  d3d INFOWARE_USE_D3D
-  opencl INFOWARE_USE_OPENCL
-  opengl INFOWARE_USE_OPENGL
+    OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+    x11 INFOWARE_USE_X11
+    d3d INFOWARE_USE_D3D
+    opencl INFOWARE_USE_OPENCL
+    opengl INFOWARE_USE_OPENGL
 )

+# git must be injected, because vcpkg isolates the build
+# from the environment entirely to have reproducible builds
 vcpkg_find_acquire_program(GIT)

 vcpkg_configure_cmake(
     SOURCE_PATH ${SOURCE_PATH}
     PREFER_NINJA
     OPTIONS
-      ${FEATURE_OPTIONS}
-      -DINFOWARE_EXAMPLES=OFF
-      -DINFOWARE_TESTS=OFF
-      -DGIT_EXECUTABLE=${GIT}
-      -DGIT_FOUND=true
+        ${FEATURE_OPTIONS}
+        -DINFOWARE_EXAMPLES=OFF
+        -DINFOWARE_TESTS=OFF
+        -DGIT_EXECUTABLE=${GIT}
+        -DGIT_FOUND=true
 )

 vcpkg_install_cmake()

 # make sure the LICENSE file is present as the copyright file
 file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/infoware RENAME copyright)
-# remove things for debug version of how vcpkg does stuff...?
-# they also handle share stuff and configuration for debug vs. release, so not our responsibility
+# remove things for debug version
+# vcpkg also handle share stuff and configuration for debug vs. release,
+# so not our responsibility!
 file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
-file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")


PolysquareCommon: Read the compiler standard as a string

--- PolysquareCommon.cmake
+++ PolysquareCommon.cmake
@@ -39,7 +39,7 @@
                            ""
                            ${ARGN})

-    if (PSQ_COMPILER_STANDARD STREQUAL "")
+    if ("${PSQ_COMPILER_STANDARD}" STREQUAL "")

         set (PSQ_COMPILER_STANDARD "c++1y")


Disable MS-proprietary warning for Cmake.

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -1,5 +1,6 @@
 if (MSVC)
     set(CPP_PLATFORM VisualCpp)
+    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
     include_directories(${CppUTestRootDirectory}/include/Platforms/${CPP_PLATFORM})
 elseif (STD_C)
     set(CPP_PLATFORM Gcc)


From Olaf Flebbe, "support current zlib and libpng library names for win32 3rdParty builds."

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -68,9 +68,9 @@
             MARK_AS_ADVANCED(GLUT_glut_LIBRARY)
         ENDIF(GLUT_FOUND)
         FIND_DEPENDENCY(GIFLIB gif_lib.h "ungif;libungif" ${OSG_3RDPARTY_BIN} "D")
-        FIND_DEPENDENCY(ZLIB zlib.h "z;zlib" ${OSG_3RDPARTY_BIN} "D")
+        FIND_DEPENDENCY(ZLIB zlib.h "z;zlib;zlib1" ${OSG_3RDPARTY_BIN} "D")
         IF(ZLIB_FOUND)
-            FIND_DEPENDENCY(PNG png.h libpng ${OSG_3RDPARTY_BIN} "D")
+            FIND_DEPENDENCY(PNG png.h "libpng;libpng13" ${OSG_3RDPARTY_BIN} "D")
             IF(PNG_FOUND)
                 #forcing subsequent FindPNG stuff to not search for other variables.... kind of a hack
                 SET(PNG_PNG_INCLUDE_DIR ${PNG_INCLUDE_DIR} CACHE FILEPATH "")


Update common.cmake paths [skip ci]

Update common.cmake paths [skip ci]

--- utilities/common.cmake
+++ utilities/common.cmake
@@ -1,18 +1,18 @@
 # Copyright (c) 2013, Ruslan Baratov
 # All rights reserved.

-if(DEFINED POLLY_COMMON_CMAKE)
+if(DEFINED POLLY_UTILITIES_COMMON_CMAKE)
   return()
 else()
-  set(POLLY_COMMON_CMAKE 1)
+  set(POLLY_UTILITIES_COMMON_CMAKE 1)
 endif()

 option(POLLY_STATUS_PRINT "Print process messages" ON)
 option(POLLY_STATUS_DEBUG "Print all process messages" OFF)

 # Add extra cmake modules
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/find")
-list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/utilities")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../find")
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")

 include(polly_fatal_error)
 include(polly_status_print)


cmake-modules :
 + added a post build function to copy the gUSBamp dll in the bin folder

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@2250 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyGUSBampCAPI.cmake
+++ trunk/cmake-modules/FindThirdPartyGUSBampCAPI.cmake
@@ -16,6 +16,15 @@
 			MESSAGE(STATUS "    [FAILED] lib gUSBamp")
 		ENDIF(LIB_GUSBampCAPI)

+		# Copying the DLL file at postbuild
+		ADD_CUSTOM_COMMAND(
+				TARGET ${PROJECT_NAME}-dynamic
+				POST_BUILD
+				COMMAND ${CMAKE_COMMAND}
+				ARGS -E copy "${PATH_GUSBampCAPI}/API/gUSBamp.dll" "${PROJECT_SOURCE_DIR}/bin"
+				COMMENT "      --->   Copying dll file ${PATH_GUSBampCAPI}/API/gUSBamp.dll for the g.Tec g.USBamp driver."
+			VERBATIM)
+
 		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyGUSBampCAPI)
 	ELSE(PATH_GUSBampCAPI)
 		MESSAGE(STATUS "  FAILED to find gUSBampCAPI")


removed unnessesary include of

removed unnessesary include of

--- statismo-config.cmake
+++ statismo-config.cmake
@@ -13,6 +13,6 @@

-SET(STATISMO_LIBRARIES ${VTK_LIBRARIES}  ${HDF5_LIBRARIES})
+SET(STATISMO_LIBRARIES   ${HDF5_LIBRARIES})
 SET(STATISMO_INCLUDE_DIR ${STATISMO_DIR} ${STATISMO_DIR}/3rdParty ${HDF5_INCLUDE_DIR} ${HDF5_INCLUDE_DIR_CPP})
 SET(STATISMO_LIBRARY_DIR  ${HDF5_LIBRARY_DIR})


do not append -gnu++XX for where XX is value of CMAKE_CXX_STANDARD

- this does not work with CMAKE_CXX_STANDARD set to 17, while compilers
  still expect -gnu++1z flag

--- pch.cmake
+++ pch.cmake
@@ -230,10 +230,6 @@
                 list(APPEND _compiler_FLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
             endif()

-            if( CMAKE_CXX_STANDARD )
-                list( APPEND _compiler_FLAGS "-std=gnu++${CMAKE_CXX_STANDARD}" )
-            endif()
-
             set(COMPILER ${CMAKE_CXX_COMPILER})
             if(${COMPILER} MATCHES "ccache")
     #            message("CCache will not give any boost when precompiled headers are used")


Version: Update development date

Version: Update development date

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,7 +1,7 @@
 # CastXML version number components.
 set(CastXML_VERSION_MAJOR 0)
 set(CastXML_VERSION_MINOR 4)
-set(CastXML_VERSION_PATCH 20210504)
+set(CastXML_VERSION_PATCH 20210902)
 set(CastXML_VERSION_RC 0)
 set(CastXML_VERSION_IS_DIRTY 0)


BUG: Fixed SuperBuild build directory -- was broken by merge. Also removed obsolete WITH_TESTING flag. w/ Floris.

--- SuperBuild/CTest.cmake
+++ SuperBuild/CTest.cmake
@@ -44,9 +44,8 @@
     " --build ${CTEST_BINARY_DIRECTORY}"
     " ${CTEST_BUILD_OPTIONS}"
     " \"-G${CTEST_CMAKE_GENERATOR}\""
-    " \"${CTEST_SOURCE_DIRECTORY}\""
-    " -DWITH_TESTING:BOOL=ON"
-    " -DBUILD_INTEGRATION_TESTS:BOOL=ON")
+    " -DBUILD_INTEGRATION_TESTS:BOOL=ON"
+    " \"${CTEST_SOURCE_DIRECTORY}/SuperBuild\"")

 # Tells CTest to not do a git pull, but to still record what version of the software it's building and testing
 # As explained by mail, by Zack Galbreath


add_compile_options added for compile option

--- PI.cmake
+++ PI.cmake
@@ -1,9 +1,9 @@
-cmake_minimum_required( VERSION 2.6.3 )
 ##
 ## Raspberry PI cmake toolchain
 ##
 ## Usage : cmake -DCMAKE_TOOLCHAIN_FILE=~/Workspace/rpi_rootfs/PI.cmake  -DCMAKE_BUILD_TYPE=Debug ..

+cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)

 SET(CMAKE_SYSTEM_NAME Linux)
 SET(CMAKE_SYSTEM_VERSION 1)
@@ -29,10 +29,13 @@
 SET(WARNINGS "-Wall -Wextra -Wcast-qual -Wconversion -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-form    at-attribute -Wmissing-include-dirs -Wpacked -Wredundant-decls" )

 ## Additional Flags
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --sysroot=${CMAKE_SYSROOT}" CACHE INTERNAL "" FORCE)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing"  CACHE INTERNAL "" FORCE)
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE INTERNAL "" FORCE)
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}"  CACHE INTERNAL "" FORCE)
 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl"  CACHE INTERNAL "" FORCE)

+
+##
+## Compiler Binary
 # rpi_tools gcc 4.7.1
 #SET(RPI_TOOLS_BASE /opt/rpi_tools/arm-bcm2708/arm-bcm2708-linux-gnueabi)
 #SET(BIN_PREFIX arm-bcm2708-linux-gnueabi)
@@ -62,7 +65,9 @@
 ##
 SET (BOOST_ROOT  ${CMAKE_SYSROOT}/usr/local/boost)
 SET (BOOST_LIBRARYDIR  ${CMAKE_SYSROOT}/usr/local/boost/lib)
+
 add_definitions("-DBOOST_COROUTINES_NO_DEPRECATION_WARNING")
+add_compile_options(-mfpu=neon-vfpv4 -mfloat-abi=hard -funsafe-math-optimizations)

 SET(OPENSSL_FOUND TRUE)
 SET(OPENSSL_ROOT_DIR ${CMAKE_SYSROOT}/usr/include/openssl)
@@ -72,14 +77,13 @@
     "${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf/libcrypto.a"
     )

-##SET (PROJECT_INCLUDE ${CMAKE_SYSROOT}/usr/include/arm-linux-gnueabihf)
+## dump some variables
+#MESSAGE( STATUS "CMAKE_C_FLAGS : " ${CMAKE_C_FLAGS} )
+#MESSAGE( STATUS "CMAKE_CXX_FLAGS : " ${CMAKE_CXX_FLAGS} )
+#MESSAGE( STATUS "CMAKE_EXE_LINKER_FLAGS : " ${CMAKE_EXE_LINKER_FLAGS} )

-#include_directories(${PROJECT_INCLUDE})
-#set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -L${CMAKE_SYSROOT}/usr/lib/usr/lib/arm-linux-gnueabihf/ ${CMAKE_SHARED_LINKER_FLAGS}")
-#set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -L${CMAKE_SYSROOT}/usr/lib/usr/lib/arm-linux-gnueabihf/ ${CMAKE_MODULE_LINKER_FLAGS}")
-#set(CMAKE_EXE_LINKER_FLAGS    "-Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -L${CMAKE_SYSROOT}/usr/lib/usr/lib/arm-linux-gnueabihf/ ${CMAKE_EXE_LINKER_FLAGS}")
-
-
+##
+##
 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


Updated link to current HDF5 version.

Updated link to current HDF5 version.

--- external/UseGDAL.cmake
+++ external/UseGDAL.cmake
@@ -38,7 +38,7 @@
   else()
     ExternalProject_Add(
       hdf5
-      URL "http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.12.tar.gz"
+      URL "http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.13.tar.gz"
       CMAKE_ARGS
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
         -DBUILD_SHARED_LIBS=ON


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -35,6 +35,7 @@
 Name[ug]=VLC
 Name[uk]=VLC
 Name[x-test]=xxVLCxx
+Name[zh_CN]=VLC
 Name[zh_TW]=VLC

 Comment=Phonon VLC backend
@@ -62,4 +63,5 @@
 Comment[sv]=Phonon VLC-gränssnitt
 Comment[uk]=Модуль VLC Phonon
 Comment[x-test]=xxPhonon VLC backendxx
+Comment[zh_CN]= Phonon VLC 后端
 Comment[zh_TW]=Phonon VLC 後端介面


Update ITK along release branch

Update ITK along release branch

Adds various fixes to ITK include a fix for using masking with the
MattesMutualInformation metric. Add correct LBFGSB convergence.

6693d19 COMP: Address conversion compilation warning
c6ee4d4 BUG:  Added sampling only within the specified mask.
8d58556 ENH: Bump release branch version to 4.7.2.
9b68a4a BUG: Link vtkRenderingFreeType in the VTK modules.
9bf5d7d BUG: Add VTK modules for annotation rendering.
137442a BUG: GDCM set default ultrasound spacing when not found.
b8f1c2f BUG: fix runtime information for cross correlation filters
5c2ded3 COMP: VTK and ITK H5 build program collision
d76af42 COMP: Only require the minimal VTK modules
08d0be2 BUG: Link to VTK 6 rendering backend modules.
feedd5b BUG: Correct convergence string check
6e857fa BUG: fix BinaryImageToLabelMapFilter with negative OutputBackgroundValue

Change-Id: I0c5462e29f08c0b9a394e1d88795a33aec787811

--- 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 b8f1c2f2ed7db7b214ea52d52273e61d0a25da5e) # after v4.7.1 release
+set(ITK_TAG_COMMAND GIT_TAG 680107c325bee5c51928ec3c7e9e31bc61ae9f7b) # after v4.7.1 release

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


ENH: Bump ITK_TAG to v4.2.1.

ENH: Bump ITK_TAG to v4.2.1.

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -1,7 +1,7 @@
 #---------------------------------------------------------------------------
 # Get and build itk

-set( ITK_TAG "v4.2.0" )
+set( ITK_TAG "v4.2.1" )

 ExternalProject_Add( ITK
   GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"


bundle: use single threaded libc++

bundle: use single threaded libc++

--- cmake/cross_compiled_libraries.cmake
+++ cmake/cross_compiled_libraries.cmake
@@ -18,8 +18,8 @@
 	include(ExternalProject)
 	ExternalProject_Add(PrecompiledLibraries
 			    PREFIX precompiled
-			    URL https://github.com/hioa-cs/IncludeOS/releases/download/v0.12.0-rc.2/IncludeOS_dependencies_v0-12-0_libcpp5_threaded.tar.gz
-			    URL_HASH SHA1=792613743b6fc7b4ba2d6a180d32e04d2a973846
+			    URL https://github.com/hioa-cs/IncludeOS/releases/download/v0.12.0-rc.2/IncludeOS_dependencies_v0-12-0_libcpp5_singlethread.tar.gz
+			    URL_HASH SHA1=eb343de326ae6b0acc3c87d6b22136d0aa2b3fdf
 			    CONFIGURE_COMMAND ""
 			    BUILD_COMMAND ""
 			    UPDATE_COMMAND ""


[cmake] Build only library for builtin lzma

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -242,6 +242,7 @@
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix <INSTALL_DIR> --libdir <INSTALL_DIR>/lib
                         --with-pic --disable-shared --quiet
+                        --disable-scripts --disable-xz --disable-xzdec --disable-lzmadec --disable-lzmainfo --disable-lzma-links
                         CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=${LIBLZMA_CFLAGS} LDFLAGS=${LIBLZMA_LDFLAGS}
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1
       BUILD_BYPRODUCTS ${LIBLZMA_LIBRARIES}


cmake: only enable asan, when ENABLE_ASAN

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -58,11 +58,6 @@
 	set (CXX_EXTRA_FLAGS "${CXX_EXTRA_FLAGS} -Wold-style-cast")

 	message (STATUS "Clang detected")
-
-	if (ENABLE_DEBUG)
-		set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=integer")
-		set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lubsan")
-	endif()
 endif()

 if (CMAKE_COMPILER_IS_GNUCXX)
@@ -101,7 +96,9 @@
 endif ()

 if (ENABLE_ASAN)
-	set (EXTRA_FLAGS "-fsanitize=address -fno-omit-frame-pointer ${EXTRA_FLAGS}")
+	set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=undefined -fsanitize=integer")
+	set (EXTRA_FLAGS "${EXTRA_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
+	set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -lubsan")
 	set (ASAN_LIBRARY "-lasan") #this is needed for GIR to put asan in front
 	if (CMAKE_COMPILER_IS_GNUCXX)
 		set (CMAKE_SHARED_LINKER_FLAGS "-fsanitize=address ${CMAKE_SHARED_LINKER_FLAGS}")


leveldb.cmake: add URL_HASH to improve security (#976)

--- cmake/external/leveldb.cmake
+++ cmake/external/leveldb.cmake
@@ -26,6 +26,7 @@
   DOWNLOAD_DIR ${FIREBASE_DOWNLOAD_DIR}
   DOWNLOAD_NAME leveldb-${version}.tar.gz
   URL https://github.com/google/leveldb/archive/${version}.tar.gz
+  URL_HASH SHA256=9a37f8a6174f09bd622bc723b55881dc541cd50747cbd08831c2a82d620f6d76

   PREFIX ${PROJECT_BINARY_DIR}


Update compiler.cmake

Update compiler.cmake

-Wno-unused-result added for windows clang build

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -76,7 +76,7 @@
      elseif (NOT WIN32)
          set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11 -stdlib=libstdc++")
      else()
-         set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11")
+         set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11 -Wno-unused-result")
      endif ()
      set(CMAKE_CXX_FLAGS_DEBUG "-g")
      set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")


fix execEnv. compile-rules neads VerbNet-modex.xml

--- lima_linguisticdata/cmake/LinguisticData.cmake
+++ lima_linguisticdata/cmake/LinguisticData.cmake
@@ -458,6 +458,17 @@
      ${CMAKE_BINARY_DIR}/execEnv/config/${_group}-modex.xml
     DEPENDS
       ${CMAKE_SOURCE_DIR}/SpecificEntities/conf/${_group}-modex.xml
+    COMMENT "create config env for specific entities rules (VerbNet-modex.xml)"
+    VERBATIM
+  )
+  add_custom_command(
+    OUTPUT ${CMAKE_BINARY_DIR}/execEnv/config/VerbNet-modex.xml
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/execEnv/config
+    COMMAND ${CMAKE_COMMAND} -E copy
+     ${CMAKE_SOURCE_DIR}/SRLIntegration/VerbNet-modex.xml
+     ${CMAKE_BINARY_DIR}/execEnv/config/VerbNet-modex.xml
+    DEPENDS
+      ${CMAKE_SOURCE_DIR}/SRLIntegration/VerbNet-modex.xml
     COMMENT "create config env for specific entities rules (${_group}-modex.xml)"
     VERBATIM
   )
@@ -523,6 +534,7 @@
     rules-${_lang}-${_group}-configEnv-${_subtarget}
     ALL
     DEPENDS ${CMAKE_BINARY_DIR}/execEnv/config/${_group}-modex.xml
+    DEPENDS ${CMAKE_BINARY_DIR}/execEnv/config/VerbNet-modex.xml
     DEPENDS ${CMAKE_BINARY_DIR}/execEnv/config/SpecificEntities-modex.xml
     DEPENDS ${CMAKE_BINARY_DIR}/execEnv/config/lima-common-${_lang}.xml
     DEPENDS ${CMAKE_BINARY_DIR}/execEnv/config/lima-lp-${_lang}.xml


should fix compilation

should fix compilation

--- backward-cpp/BackwardConfig.cmake
+++ backward-cpp/BackwardConfig.cmake
@@ -33,8 +33,7 @@
       set( BACKWARD_LIBS dl bfd PARENT_SCOPE )

 else (LIBBFD_FOUND)
-      message(STATUS "Looked for Bfd libraries named ${LIBBFD_NAMES}.")
-      message(FATAL_ERROR "Could NOT find Bfd library")
+      message(STATUS "Could NOT find Bfd library named ${LIBBFD_NAMES}.")
 endif (LIBBFD_FOUND)

 mark_as_advanced(


Reattempting with ERROR_QUIET.

Reattempting with ERROR_QUIET.

--- CPM.cmake
+++ CPM.cmake
@@ -418,6 +418,7 @@
         WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
         RESULT_VARIABLE error_code
         OUTPUT_QUIET
+        ERROR_QUIET
         )
       if(error_code)
         message(FATAL_ERROR "Failed to checkout tag: '${_CPM_GIT_TAG}'")
@@ -494,6 +495,7 @@
         WORKING_DIRECTORY "${__CPM_MODULE_SOURCE_DIR}"
         RESULT_VARIABLE error_code
         OUTPUT_QUIET
+        ERROR_QUIET
         )
       if(error_code)
         message(FATAL_ERROR "Failed to checkout tag: '${_CPM_GIT_TAG}'")


Remove debug code and add definitions and include directories.

--- CPM.cmake
+++ CPM.cmake
@@ -404,10 +404,7 @@
 macro(CPM_InitModule name)
   # Ensure the parent function knows what we decided to name ourselves.
   # This name will correspond to our module's namespace directives.
-  set(CPM_LAST_MODULE_NAME ${name})
   set(CPM_LAST_MODULE_NAME ${CPM_LAST_MODULE_NAME} PARENT_SCOPE)
-  message("Initializing macro: ${name}")
-  message("Initializing macro 2: ${CPM_LAST_MODULE_NAME}")

   # Build the appropriate definition for the module. We stored the unique ID
   _cpm_build_preproc_name(name __CPM_TMP_VAR)
@@ -419,6 +416,13 @@
   set(__CPM_TMP_VAR) # Clean up

   _cpm_propogate_version_map_up()
+
+  # Setup the module with appropriate definitions and includes.
+  # We can do this because we are not in a new scope; instead, we are in a macro
+  # which executes in the parent scope (since it is literally inserted into
+  # the parent scope).
+  add_definitions(${CPM_DEFINITIONS})
+  include_directories(${CPM_INCLUDE_DIRS})
 endmacro()

 # This macro forces one, and only one, version of a module to be linked into


ARROW-2109: [C++] Completely disable boost autolink on MSVC build

Boost's autolink disabling solves linkage issues appeared with boost v.1.66.0 (in case of linkage with static boost libs)

Author: Max Risuhin <risuhin.max@gmail.com>

Closes #1567 from MaxRis/ARROW-2109 and squashes the following commits:

bf5dcef [Max Risuhin] ARROW-2109: [C++] Completely disable boost autolink on MSVC build

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -136,6 +136,7 @@
   set(Boost_USE_STATIC_RUNTIME ON)
 endif()
 set(Boost_ADDITIONAL_VERSIONS
+  "1.66.0" "1.66"
   "1.65.0" "1.65"
   "1.64.0" "1.64"
   "1.63.0" "1.63"
@@ -192,14 +193,15 @@
   set(Boost_INCLUDE_DIRS "${BOOST_INCLUDE_DIR}")
   add_dependencies(arrow_dependencies boost_ep)
 else()
+  if (MSVC)
+    # disable autolinking in boost
+    add_definitions(-DBOOST_ALL_NO_LIB)
+  endif()
   if (ARROW_BOOST_USE_SHARED)
     # Find shared Boost libraries.
     set(Boost_USE_STATIC_LIBS OFF)

-    if(MSVC)
-      # disable autolinking in boost
-      add_definitions(-DBOOST_ALL_NO_LIB)
-
+    if (MSVC)
       # force all boost libraries to dynamic link
       add_definitions(-DBOOST_ALL_DYN_LINK)
     endif()


removing obsolete langs.cmake, genmsg is dealing with that

--- cmake/all.cmake
+++ cmake/all.cmake
@@ -39,7 +39,6 @@
     catkin_workspace
     catkin_python_setup
     catkin_add_env_hooks
-    langs
     libraries
     rosbuild_compat
     platform/lsb


cmake: get: using NOT DEFINE BUILD_VERSION instead of NOT BUILD_VERSION

If user is specifying `-DBUILD_VERSION=<value>` then the proper way to
test is using `NOT DEFINED BUILD_VERSION`.

The difference between `NOT DEFINED BUILD_VERSION` and
`NOT BUILD_VERSION` is that a user specifying `-DBUILD_VERSION=0` will
result in `NOT BUILD_VERSION` becoming true, whereas
`NOT DEFINED BUILD_VERSION` would be false, which is the correct
behavior here, as the user actually provided a specific BUILD_VERSION.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/git.cmake
+++ cmake/git.cmake
@@ -13,7 +13,7 @@

 # https://cmake.org/cmake/help/latest/module/FindGit.html
 find_package(Git QUIET)
-if(NOT BUILD_VERSION AND GIT_FOUND)
+if(NOT DEFINED BUILD_VERSION AND GIT_FOUND)
   execute_process(
     COMMAND ${GIT_EXECUTABLE} describe --abbrev=12 --always
     WORKING_DIRECTORY                ${ZEPHYR_BASE}


Updated lua macros

Updated lua macros

--- cmake/lua.cmake
+++ cmake/lua.cmake
@@ -54,11 +54,13 @@
         DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_name}
     )
     # Install with run permissions
-    install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${_name} DESTINATION ${INSTALL_BIN} )
+    install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${_name} DESTINATION ${INSTALL_BIN} COMPONENT Runtime)
   else()
     # Add .lua suffix and install as is
     install ( PROGRAMS ${_source} DESTINATION ${INSTALL_BIN}
-            RENAME ${_source_name}.lua )
+            RENAME ${_source_name}.lua
+            COMPONENT Runtime
+    )
   endif()
 endmacro ()

@@ -102,7 +104,9 @@

     if ( ${is_install} )
       install ( FILES ${_first_source} DESTINATION ${INSTALL_LMOD}/${_module_dir}
-                RENAME ${_module_filename} )
+                RENAME ${_module_filename}
+                COMPONENT Runtime
+      )
     endif ()
   else ()  # Lua C binary module
     enable_language ( C )
@@ -123,7 +127,7 @@
     set_target_properties ( ${_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY
                 "${_module_dir}" PREFIX "" OUTPUT_NAME "${_module_filenamebase}" )
     if ( ${is_install} )
-      install ( TARGETS ${_target} DESTINATION ${INSTALL_CMOD}/${_module_dir})
+      install ( TARGETS ${_target} DESTINATION ${INSTALL_CMOD}/${_module_dir} COMPONENT Runtime)
     endif ()
   endif ()
 endmacro ()


STYLE: Update of icon and screenshots for DTIAtlasFiberAnaylizer Slicer extension

--- Common.cmake
+++ Common.cmake
@@ -47,8 +47,8 @@
 set(EXTENSION_CATEGORY "Diffusion")
 set(EXTENSION_CONTRIBUTORS "Francois Budin (UNC)")
 set(EXTENSION_DESCRIPTION "This extension provides the tool DTIAtlasFiberAnalyzer integrated in Slicer")
-set(EXTENSION_ICONURL "http://www.nitrc.org/project/screenshot.php?group_id=312&screenshot_id=575")
-set(EXTENSION_SCREENSHOTURLS "http://www.nitrc.org/project/screenshot.php?group_id=403&screenshot_id=601 http://www.slicer.org/slicerWiki/images/thumb/9/90/FiberTrack-fibers.png/138px-FiberTrack-fibers.png")
+set(EXTENSION_ICONURL "http://www.nitrc.org/project/screenshot.php?group_id=403&screenshot_id=768")
+set(EXTENSION_SCREENSHOTURLS "http://wiki.slicer.org/slicerWiki/images/thumb/2/20/Screenshot-DTI_Atlas_Fiber_Analyser.png/745px-Screenshot-DTI_Atlas_Fiber_Analyser.png http://wiki.slicer.org/slicerWiki/images/thumb/6/6e/DTIAtlasFiberAnalyzerGenu_profile_FA.png/800px-DTIAtlasFiberAnalyzerGenu_profile_FA.png")
 set(EXTENSION_STATUS "Beta")
 set(EXTENSION_DEPENDS "DTIProcess") # Specified as a space separated list or 'NA' if any
 set(EXTENSION_BUILD_SUBDIRECTORY dti_tract_stat-build )


BUG: Pass compiler to superbuild sub-projects.

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -71,6 +71,8 @@
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS
+        -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+        -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
         -Dgit_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
         -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
@@ -96,6 +98,8 @@
       BINARY_DIR "SimpleITK-Build"
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS
+        -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+        -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
         -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
         -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
@@ -141,6 +145,8 @@
       BINARY_DIR Insight-Build
       CMAKE_GENERATOR ${gen}
       CMAKE_ARGS
+        -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+        -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
         -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
         -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
         -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
@@ -206,6 +212,8 @@
         BINARY_DIR VTK-Build
         CMAKE_GENERATOR ${gen}
         CMAKE_ARGS
+          -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+          -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
           -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
           -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
           -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
@@ -235,6 +243,8 @@
         BINARY_DIR VTK-Build
         CMAKE_GENERATOR ${gen}
         CMAKE_ARGS
+          -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+          -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
           -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
           -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
           -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}
@@ -345,6 +355,8 @@
         BINARY_DIR CTK-Build
         CMAKE_GENERATOR ${gen}
         CMAKE_ARGS
+          -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+          -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
           -DCMAKE_BUILD_TYPE:STRING=${build_type}
           -DBUILD_SHARED_LIBS:BOOL=${shared}
           -DBUILD_TESTING:BOOL=OFF
@@ -379,6 +391,8 @@
   BINARY_DIR TubeTK-Build
   CMAKE_GENERATOR ${gen}
   CMAKE_ARGS
+    -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+    -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     -DBUILDNAME:STRING=${BUILDNAME}
     -DSITE:STRING=${SITE}
     -DMAKECOMMAND:STRING=${MAKECOMMAND}


Added CoreFoundation to the required libraries.

--- copasi/CMakeConsoleApp.cmake
+++ copasi/CMakeConsoleApp.cmake
@@ -19,3 +19,8 @@
 set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${RAPTOR_LIBRARY})
 set(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${EXPAT_LIBRARY})

+if (APPLE)
+  FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
+  MARK_AS_ADVANCED (COREFOUNDATION_LIBRARY)
+  SET(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${COREFOUNDATION_LIBRARY})
+endif (APPLE)


Untabify FindCuDNN.cmake

Untabify FindCuDNN.cmake

--- chainerx_cc/cmake/FindCuDNN.cmake
+++ chainerx_cc/cmake/FindCuDNN.cmake
@@ -53,20 +53,20 @@
 endif()

 if(CUDNN_INCLUDE_DIR AND CUDNN_LIBRARY)
-	# get cuDNN version
+    # get cuDNN version
   file(READ ${CUDNN_INCLUDE_DIR}/cudnn.h CUDNN_HEADER_CONTENTS)
-	string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)"
-				 CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}")
-	string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1"
-				 CUDNN_VERSION_MAJOR "${CUDNN_VERSION_MAJOR}")
-	string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)"
-				 CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}")
-	string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1"
-				 CUDNN_VERSION_MINOR "${CUDNN_VERSION_MINOR}")
-	string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)"
-				 CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}")
-	string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1"
-				 CUDNN_VERSION_PATCH "${CUDNN_VERSION_PATCH}")
+    string(REGEX MATCH "define CUDNN_MAJOR * +([0-9]+)"
+                 CUDNN_VERSION_MAJOR "${CUDNN_HEADER_CONTENTS}")
+    string(REGEX REPLACE "define CUDNN_MAJOR * +([0-9]+)" "\\1"
+                 CUDNN_VERSION_MAJOR "${CUDNN_VERSION_MAJOR}")
+    string(REGEX MATCH "define CUDNN_MINOR * +([0-9]+)"
+                 CUDNN_VERSION_MINOR "${CUDNN_HEADER_CONTENTS}")
+    string(REGEX REPLACE "define CUDNN_MINOR * +([0-9]+)" "\\1"
+                 CUDNN_VERSION_MINOR "${CUDNN_VERSION_MINOR}")
+    string(REGEX MATCH "define CUDNN_PATCHLEVEL * +([0-9]+)"
+                 CUDNN_VERSION_PATCH "${CUDNN_HEADER_CONTENTS}")
+    string(REGEX REPLACE "define CUDNN_PATCHLEVEL * +([0-9]+)" "\\1"
+                 CUDNN_VERSION_PATCH "${CUDNN_VERSION_PATCH}")
   # Assemble cuDNN version
   if(NOT CUDNN_VERSION_MAJOR)
     set(CUDNN_VERSION "?")


#28 add test to the CTestCustom.cmake file

--- backup/CTestCustom.cmake
+++ backup/CTestCustom.cmake
@@ -22,6 +22,7 @@
  closedirfails_dest_dir
  copy_files
  create_rename_race
+ create_unlink_race
  debug_coverage
  dest_no_permissions_10
  dest_no_permissions_with_open_10


FIX: Builds now on Linux

FIX: Builds now on Linux

--- external/UseGDAL.cmake
+++ external/UseGDAL.cmake
@@ -2,18 +2,6 @@
 set(NETCDF netcdf-4.3.0)
 set(NETCDF_TGZ ${NETCDF}.tar.gz)

-
-ExternalProject_Add(
-  netcdf
-  URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/${NETCDF_TGZ}"
-  CONFIGURE_COMMAND ""
-  BUILD_COMMAND ""
-  INSTALL_COMMAND ""
-)
-
-set_target_properties(netcdf PROPERTIES FOLDER "modules/omegaOsgEarth")
-
-ExternalProject_Get_Property(netcdf SOURCE_DIR)

 if(WIN32)
 	# On windows we are lazy. Just download precompiled libs.
@@ -39,13 +27,70 @@
 	file(COPY ${EXTLIB_DIR}/bin/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG} PATTERN "*.dll")
 	file(COPY ${EXTLIB_DIR}/bin/ DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE} PATTERN "*.dll")
 else()
-	ExternalProject_Add(
+  if(APPLE)
+    ExternalProject_Add(
+      netcdf
+      URL "https://omegalib.googlecode.com/files/${NETCDF_TGZ}"
+      CONFIGURE_COMMAND ""
+      BUILD_COMMAND ""
+      INSTALL_COMMAND ""
+    )
+  else()
+    ExternalProject_Add(
+      hdf5
+      URL "http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.12.tar.gz"
+      CMAKE_ARGS
+        -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+        -DBUILD_SHARED_LIBS=ON
+        -DHDF5_BUILD_HL_LIB=ON
+        -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install
+    )
+
+    ExternalProject_Get_Property(hdf5 SOURCE_DIR)
+
+    set(ENV{CPPFLAGS} -I${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/include)
+    set(ENV{LDFLAGS} -L${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/lib)
+    set(ENV{LD_LIBRARY_PATH} ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/lib)
+
+    #file(COPY ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5/hl/src/ DESTINATION ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/include PATTERN "*.h")
+
+    ExternalProject_Add(
+      proj4
+      URL "http://download.osgeo.org/proj/proj-4.8.0.tar.gz"
+      CONFIGURE_COMMAND <SOURCE_DIR>/configure
+      BUILD_IN_SOURCE 1
+      INSTALL_COMMAND cp ${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/proj4-prefix/src/proj4/src/.libs/libproj.so ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+    )
+
+    ExternalProject_Add(
+        netcdf
+        DEPENDS hdf5 proj4
+        URL "ftp://ftp.unidata.ucar.edu/pub/netcdf/${NETCDF_TGZ}"
+        CMAKE_ARGS
+          -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+          -DBUILD_SHARED_LIBS=ON
+          -DHDF5_DIR:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-build
+          -DHDF5_LIBRARIES:PATH=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/lib/libhdf5.a
+          -DHDF5_INCLUDE_DIR=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/include
+          -DHDF5_INCLUDE_DIRS=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/include
+          -DHDF5_LIB=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/lib/libhdf5.so
+          -DHDF5_HL_LIB=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/hdf5-prefix/src/hdf5-install/lib/libhdf5_hl.so
+          -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+          -DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+        INSTALL_COMMAND ""
+      )
+  endif()
+
+  set_target_properties(netcdf PROPERTIES FOLDER "modules/omegaOsgEarth")
+
+  ExternalProject_Get_Property(netcdf SOURCE_DIR)
+
+  ExternalProject_Add(
 		gdal
 		DEPENDS netcdf
 		URL "http://download.osgeo.org/gdal/1.10.0/gdal-1.10.0.tar.gz"
-		CONFIGURE_COMMAND <SOURCE_DIR>/configure --with-netcdf=${SOURCE_DIR} --prefix=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install
+		CONFIGURE_COMMAND <SOURCE_DIR>/configure --with-netcdf=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/netcdf-prefix/src/netcdf-build/liblib --prefix=${CMAKE_BINARY_DIR}/modules/omegaOsgEarth/gdal-prefix/src/gdal-install
 		BUILD_IN_SOURCE 1
-		#    BUILD_COMMAND make
 		INSTALL_COMMAND ${PLATFORM_INSTALL_COMMAND}
 	)
 	ExternalProject_Get_Property(gdal DOWNLOAD_DIR)


Add CEGUI_INCLUDE_DIRS parent dir only for CEGUI 0.8+

--HG--
branch : v0-8

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -223,7 +223,7 @@
 ################################################################################
 macro(add_parent_dir VAR DIR)
     get_filename_component(${DIR}_TEMP "${${DIR}}/.." ABSOLUTE)
-    set(${VAR} ${${DIR}_TEMP})
+    set(${VAR} ${${VAR}} ${${DIR}_TEMP})
 endmacro(add_parent_dir)

 ################################################################################
@@ -488,7 +488,14 @@
 set(CEGUI_INCLUDE_DIR ${CEGUI_CONFIG_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR})
 list(REMOVE_DUPLICATES CEGUI_INCLUDE_DIR)
 findpkg_finish(CEGUI)
-add_parent_dir(CEGUI_INCLUDE_DIRS CEGUI_INCLUDE_DIR)
+
+# Starting CEGUI 0.8, the headers are in the CEGUI subdirectory, and we must include
+# its parent rather than directly the subdirectory. Otherwise we'll get compiler errors.
+if ("${CEGUI_VERSION}" VERSION_GREATER "0.8.0")
+    add_parent_dir(CEGUI_INCLUDE_DIRS_TEMP CEGUI_INCLUDE_DIR)
+    message(${CEGUI_INCLUDE_DIRS_TEMP})
+    set(${CEGUI_INCLUDE_DIRS} ${CEGUI_INCLUDE_DIRS_TEMP})
+endif()
 set(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})

 mark_as_advanced(CEGUI_CONFIG_INCLUDE_DIR)


Allow llvm_find_program to find alternate names

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -253,7 +253,8 @@
 function(llvm_find_program name)
   string(TOUPPER ${name} NAME)
   string(REGEX REPLACE "\\." "_" NAME ${NAME})
-  find_program(LLVM_PATH_${NAME} ${name})
+
+  find_program(LLVM_PATH_${NAME} NAMES ${ARGV})
   mark_as_advanced(LLVM_PATH_${NAME})
   if(LLVM_PATH_${NAME})
     set(HAVE_${NAME} 1 CACHE INTERNAL "Is ${name} available ?")


TosLang: Fixing cmake function

TosLang: Fixing cmake function

--- cmake/BoostTestHelpers.cmake
+++ cmake/BoostTestHelpers.cmake
@@ -19,10 +19,11 @@
        string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), [A-Za-z_0-9]+ *\\)" "\\1" SUITE_NAME ${SUITE_MATCH})
    else()
        string(REGEX MATCH "BOOST_AUTO_TEST_SUITE\\( *([A-Za-z_0-9]+) *\\)"
-       SUITE_MATCHES ${SOURCE_FILE_CONTENTS})
+              SUITE_MATCHES ${SOURCE_FILE_CONTENTS})
+       list(LENGTH SUITE_MATCHES N)
        if(${N} EQUAL 1)
            list(GET SUITE_MATCHES 0 SUITE_MATCH)
-           string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), [A-Za-z_0-9]+ *\\)" "\\1" SUITE_NAME ${SUITE_MATCH})
+           string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+) *\\)" "\\1" SUITE_NAME ${SUITE_MATCH})
        endif()
    endif()


fixed find package CUDA for cross-compilation

replaced find_host_package with find_package and
set CMAKE_FIND_ROOT_PATH_MODE_LIBRARY to BOTH, because NEVER
doesn't work for CUDA_CUDA_LIBRARY, which is located in
/usr/arm-linux-gnueabihf/lib/libcuda.so for ARM

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -15,7 +15,11 @@

 set(CMAKE_MODULE_PATH "${OpenCV_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})

-find_host_package(CUDA 4.2 QUIET)
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+
+find_package(CUDA 4.2 QUIET)

 if(CUDA_FOUND)
   set(HAVE_CUDA 1)


Removed [.][.][.] from prototpyes regex, was this useful to someone?


[cmake] sanitiser flags should also be added to CMAKE_SHARED_LINKER_FLAGS_DEBUG (for Xcode)

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -269,6 +269,7 @@
 		if (CMAKE_GENERATOR MATCHES "Xcode")
 			# Xcode fires unresolved externals otherwise
 			set (CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${GCC_SANITIZER}")
+			set (CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${GCC_SANITIZER}")
 		endif ()

 		set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${GCC_SANITIZER}")


Revert rL309320 - "[OCaml] Respect CMAKE_C_FLAGS for OCaml C files"

This causes buildbot breakage for systems where OCaml files are built
with a different compiler.

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

--- cmake/modules/AddOCaml.cmake
+++ cmake/modules/AddOCaml.cmake
@@ -83,7 +83,7 @@
   endforeach()

   string(REPLACE ";" " " ARG_CFLAGS "${ARG_CFLAGS}")
-  set(c_flags "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${ARG_CFLAGS} ${LLVM_DEFINITIONS}")
+  set(c_flags "${ARG_CFLAGS} ${LLVM_DEFINITIONS}")
   foreach( include_dir ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR} )
     set(c_flags "${c_flags} -I${include_dir}")
   endforeach()


build: remove some un-valuved variables in `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -856,8 +856,6 @@
       TARGETS "${target}"
       DEPENDS
         ${gyb_dependency_targets}
-        "${swift_object_dependency_target}"
-        "${swift_module_dependency_target}"
         ${LLVM_COMMON_DEPENDS})

   # Call llvm_config() only for libraries that are part of the compiler.


build: merge `_add_swift_host_executable_single` into `add_swift_host_executable`

Merge the single use `_add_swift_host_executable_single` into the
singular site.  The host tools are built in a single variant.  This
avoids the custom logic for adding multiple variants.  Folding this
away will allow further simplifications in order to move towards a
standard CMake build.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -808,116 +808,6 @@
   endif()
 endfunction()

-# Add an executable compiled for a given variant.
-#
-# Don't use directly, use add_swift_executable and add_swift_target_executable
-# instead.
-#
-# See add_swift_executable for detailed documentation.
-#
-# Additional parameters:
-#   [SDK sdk]
-#     SDK to build for.
-#
-#   [ARCHITECTURE architecture]
-#     Architecture to build for.
-function(_add_swift_host_executable_single name)
-  set(options)
-  set(single_parameter_options
-    ARCHITECTURE
-    SDK)
-  set(multiple_parameter_options
-    LLVM_LINK_COMPONENTS)
-  cmake_parse_arguments(SWIFTEXE_SINGLE
-    "${options}"
-    "${single_parameter_options}"
-    "${multiple_parameter_options}"
-    ${ARGN})
-
-  set(SWIFTEXE_SINGLE_SOURCES ${SWIFTEXE_SINGLE_UNPARSED_ARGUMENTS})
-
-  # Check arguments.
-  precondition(SWIFTEXE_SINGLE_SDK MESSAGE "Should specify an SDK")
-  precondition(SWIFTEXE_SINGLE_ARCHITECTURE MESSAGE "Should specify an architecture")
-
-  # Determine compiler flags.
-  set(c_compile_flags)
-  set(link_flags)
-
-  # Prepare linker search directories.
-  set(library_search_directories
-        "${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
-
-  # Add variant-specific flags.
-  _add_host_variant_c_compile_flags(
-    SDK "${SWIFTEXE_SINGLE_SDK}"
-    ARCH "${SWIFTEXE_SINGLE_ARCHITECTURE}"
-    BUILD_TYPE "${CMAKE_BUILD_TYPE}"
-    ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS}"
-    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
-    ANALYZE_CODE_COVERAGE "${SWIFT_ANALYZE_CODE_COVERAGE}"
-    RESULT_VAR_NAME c_compile_flags)
-  _add_host_variant_link_flags(
-    SDK "${SWIFTEXE_SINGLE_SDK}"
-    ARCH "${SWIFTEXE_SINGLE_ARCHITECTURE}"
-    BUILD_TYPE "${CMAKE_BUILD_TYPE}"
-    ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS}"
-    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
-    LTO_OBJECT_NAME "${name}-${SWIFTEXE_SINGLE_SDK}-${SWIFTEXE_SINGLE_ARCHITECTURE}"
-    ANALYZE_CODE_COVERAGE "${SWIFT_ANALYZE_CODE_COVERAGE}"
-    RESULT_VAR_NAME link_flags
-    LINK_LIBRARIES_VAR_NAME link_libraries
-    LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories)
-
-  add_executable(${name}
-      ${SWIFTEXE_SINGLE_SOURCES}
-      ${SWIFTEXE_SINGLE_EXTERNAL_SOURCES})
-
-  add_dependencies_multiple_targets(
-      TARGETS ${name}
-      DEPENDS ${LLVM_COMMON_DEPENDS})
-  llvm_update_compile_flags("${name}")
-
-  if(SWIFTEXE_SINGLE_SDK STREQUAL WINDOWS)
-    swift_windows_include_for_arch(${SWIFTEXE_SINGLE_ARCHITECTURE}
-      ${SWIFTEXE_SINGLE_ARCHITECTURE}_INCLUDE)
-    target_include_directories(${name} SYSTEM PRIVATE
-      ${${SWIFTEXE_SINGLE_ARCHITECTURE}_INCLUDE})
-
-    if(NOT ${CMAKE_C_COMPILER_ID} STREQUAL MSVC)
-      # MSVC doesn't support -Xclang. We don't need to manually specify
-      # the dependent libraries as `cl` does so.
-      target_compile_options(${name} PRIVATE
-        "SHELL:-Xclang --dependent-lib=oldnames"
-        # TODO(compnerd) handle /MT, /MTd
-        "SHELL:-Xclang --dependent-lib=msvcrt$<$<CONFIG:Debug>:d>")
-    endif()
-  endif()
-  target_compile_options(${name} PRIVATE
-    ${c_compile_flags})
-  target_link_directories(${name} PRIVATE
-    ${library_search_directories})
-  target_link_options(${name} PRIVATE
-    ${link_flags})
-  target_link_libraries(${name} PRIVATE
-    ${link_libraries})
-  if (SWIFT_PARALLEL_LINK_JOBS)
-    set_property(TARGET ${name} PROPERTY JOB_POOL_LINK swift_link_job_pool)
-  endif()
-  if(${SWIFTEXE_SINGLE_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
-    set_target_properties(${name} PROPERTIES
-      BUILD_WITH_INSTALL_RPATH YES
-      INSTALL_RPATH "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
-  endif()
-  set_output_directory(${name}
-      BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR}
-      LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})
-
-  swift_common_llvm_config("${name}" ${SWIFTEXE_SINGLE_LLVM_LINK_COMPONENTS})
-
-  set_target_properties(${name} PROPERTIES FOLDER "Swift executables")
-endfunction()
-
 macro(add_swift_tool_subdirectory name)
   add_llvm_subdirectory(SWIFT TOOL ${name})
 endmacro()
@@ -929,7 +819,7 @@
 function(add_swift_host_tool executable)
   set(options)
   set(single_parameter_options SWIFT_COMPONENT)
-  set(multiple_parameter_options)
+  set(multiple_parameter_options LLVM_LINK_COMPONENTS)

   cmake_parse_arguments(ASHT
     "${options}"
@@ -940,11 +830,79 @@
   precondition(ASHT_SWIFT_COMPONENT
                MESSAGE "Swift Component is required to add a host tool")

-  # Create the executable rule.
-  _add_swift_host_executable_single(${executable}
+  # Determine compiler flags.
+  set(c_compile_flags)
+  set(link_flags)
+  set(link_libraries)
+  set(library_search_directories
+    ${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR})
+
+  _add_host_variant_c_compile_flags(
     SDK ${SWIFT_HOST_VARIANT_SDK}
-    ARCHITECTURE ${SWIFT_HOST_VARIANT_ARCH}
-    ${ASHT_UNPARSED_ARGUMENTS})
+    ARCH ${SWIFT_HOST_VARIANT_ARCH}
+    BUILD_TYPE ${CMAKE_BUILD_TYPE}
+    ENABLE_ASSERTIONS ${LLVM_ENABLE_ASSERTIONS}
+    ENABLE_LTO ${SWIFT_TOOLS_ENABLE_LTO}
+    ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
+    RESULT_VAR_NAME c_compile_flags)
+  _add_host_variant_link_flags(
+    SDK ${SWIFT_HOST_VARIANT_SDK}
+    ARCH ${SWIFT_HOST_VARIANT_ARCH}
+    BUILD_TYPE ${CMAKE_BUILD_TYPE}
+    ENABLE_ASSERTIONS ${LLVM_ENABLE_ASSERTIONS}
+    ENABLE_LTO ${SWIFT_TOOLS_ENABLE_LTO}
+    LTO_OBJECT_NAME "${executable}-${SWIFT_HOST_VARIANT_SDK}-${SWIFT_HOST_VARIANT_ARCH}"
+    ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
+    RESULT_VAR_NAME link_flags
+    LINK_LIBRARIES_VAR_NAME link_libraries
+    LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories)
+
+  add_executable(${executable} ${ASHT_UNPARSED_ARGUMENTS})
+  target_compile_options(${executable} PRIVATE
+    ${c_compile_flags})
+  target_link_directories(${executable} PRIVATE
+    ${library_search_directories})
+  target_link_options(${executable} PRIVATE
+    ${link_flags})
+  target_link_libraries(${executable} PRIVATE
+    ${link_libraries})
+
+  set_target_properties(${executable} PROPERTIES
+    FOLDER "Swift executables")
+  if(SWIFT_PARALLEL_LINK_JOBS)
+    set_target_properties(${executable} PROPERTIES
+      JOB_POOL_LINK swift_link_job_pool)
+  endif()
+  if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_APPLE_PLATFORMS)
+    set_target_properties(${executable} PROPERTIES
+      BUILD_WITH_INSTALL_RPATH YES
+      INSTALL_RPATH "@executable_path/../lib/swift/${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_LIB_SUBDIR}")
+  endif()
+
+  add_dependencies_multiple_targets(
+    TARGETS ${executable}
+    DEPENDS ${LLVM_COMMON_DEPENDS})
+  llvm_update_compile_flags(${executable})
+  swift_common_llvm_config(${executable} ${ASHT_LLVM_LINK_COMPONENTS})
+  set_output_directory(${executable}
+    BINARY_DIR ${SWIFT_RUNTIME_OUTPUT_INTDIR}
+    LIBRARY_DIR ${SWIFT_LIBRARY_OUTPUT_INTDIR})
+
+  if(SWIFT_HOST_VARIANT_SDK STREQUAL WINDOWS)
+    swift_windows_include_for_arch(${SWIFT_HOST_VARIANT_ARCH}
+      ${SWIFT_HOST_VARIANT_ARCH}_INCLUDE)
+    target_include_directories(${executable} SYSTEM PRIVATE
+      ${${SWIFT_HOST_VARIANT_ARCH}_INCLUDE})
+
+    if(NOT ${CMAKE_C_COMPILER_ID} STREQUAL MSVC)
+      # MSVC doesn't support -Xclang. We don't need to manually specify
+      # the dependent libraries as `cl` does so.
+      target_compile_options(${executable} PRIVATE
+        "SHELL:-Xclang --dependent-lib=oldnames"
+        # TODO(compnerd) handle /MT, /MTd
+        "SHELL:-Xclang --dependent-lib=msvcrt$<$<CONFIG:Debug>:d>")
+    endif()
+  endif()

   add_dependencies(${ASHT_SWIFT_COMPONENT} ${executable})
   swift_install_in_component(TARGETS ${executable}


Fix custom platform builds

Fix custom platform builds

--- cmake/resolve_platform.cmake
+++ cmake/resolve_platform.cmake
@@ -33,5 +33,9 @@
     include(platform/unix)
 endif()

-include(platform/${__LOWER_ARCH})
+if(NOT PLATFORM_CUSTOM)
+    include(platform/${__LOWER_ARCH})
+else()
+    include(platform/custom)
+endif()