Use Zlib 1.2.7 (patch from Niall Moody)

Use Zlib 1.2.7 (patch from Niall Moody)

--- CMake/ExternalPNG.cmake
+++ CMake/ExternalPNG.cmake
@@ -16,8 +16,8 @@
     PREFIX ${libpng_PREFIX}

     DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}
-    URL http://zlib.net/zlib-1.2.6.tar.gz
-    URL_MD5 618e944d7c7cd6521551e30b32322f4a
+    URL http://zlib.net/zlib-1.2.7.tar.gz
+    URL_MD5 60df6a37c56e7c1366cca812414f7b85

     PATCH_COMMAND ${CMAKE_COMMAND} -E remove <SOURCE_DIR>/zconf.h


COMP: SmoothingRecursiveYvvGaussianFilter compiles with new ITKv5 threading

Change-Id: I4e6eb9291a252ea7a8bcdb239fac83a2d6e87368

--- Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
+++ Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
@@ -3,5 +3,5 @@
   "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: https://hdl.handle.net/10380/3425"
   #UPSTREAM_REPO GIT_REPOSITORY ${git_protocol}://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/SmoothingRecursiveYvvGaussianFilter.git
-  GIT_TAG 62fbb0db2cc1dc23bf2c8331bc5104669d8026f7
+  GIT_TAG 7e5946aa49017541076d4a707527ccaf99b1a6ec
   )


Add clang warning

Add clang warning

--- Compiler.cmake
+++ Compiler.cmake
@@ -39,7 +39,7 @@
   endif()
   if(CMAKE_COMPILER_IS_CLANG)
     set(COMMON_GCC_FLAGS
-      "${COMMON_GCC_FLAGS} -Qunused-arguments -ferror-limit=5 -ftemplate-depth-1024")
+      "${COMMON_GCC_FLAGS} -Qunused-arguments -ferror-limit=5 -ftemplate-depth-1024 -Wheader-hygiene")
   endif()

   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_GCC_FLAGS}")


Updating FindHWLOC.cmake [ ] May break build [ ] May break existing applications (see CHANGES.txt) [ ] Bugfix [ ] New Feature [x] Cleanup [ ] Optimization [ ] Documentation

--- FindHWLOC.cmake
+++ FindHWLOC.cmake
@@ -1,22 +1,23 @@
-# Copyright (c) 2012
+# Copyright (c) 2012 Marwan Abdellah <marwan.abdellah@epfl.ch>

-find_path(HWLOC_INCLUDE_DIR "hwloc.h"
+find_path(HWLOC_INCLUDE_DIR "hwloc.h"
+  HINTS ${HWLOC_ROOT}/include
   /usr/include
   /usr/local/include
   /opt/local/include
 )

-# ---------------------------------
-# http://www.vtk.org/Wiki/CMake_FAQ
-# ---------------------------------
-file(TO_CMAKE_PATH "$ENV{HWLOC_LIB_DIR}" HWLOC_LIB_DIR)
-find_library(HWLOC_LIB NAMES hwloc HINTS ${HWLOC_LIB_DIR})
+find_library(HWLOC_LIB NAMES hwloc
+	HINTS ${HWLOC_ROOT}
+	PATHS
+	/usr/lib
+	/usr/local/lib
+	/opt/local/lib
+)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIB HWLOC_INCLUDE_DIR)

 if(HWLOC_FOUND)
   message("-- Found HWLOC in ${HWLOC_INCLUDE_DIR}, ${HWLOC_LIB}")
-else()
-   message("HWLOC NOT FOUND")
 endif(HWLOC_FOUND)


Fix VERSION variable name, cleanup 'not found' handling

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -37,11 +37,9 @@
   "\n"
 # add transient library finding
   "@TRANSIENTS@"
-  "if(_fail)\n"
-  "  set(${CMAKE_PROJECT_NAME}_FOUND)\n"
-  "else()\n"
+  "if(NOT _fail)\n"
 # setup VERSION, INCLUDE_DIRS and DEB_DEPENDENCIES
-  "  set(${CMAKE_PROJECT_NAME}_VERSION ${VERSION})\n"
+  "  set(${UPPER_PROJECT_NAME}_VERSION ${VERSION})\n"
   "  set_and_check(${UPPER_PROJECT_NAME}_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@")\n"
   "  set(${UPPER_PROJECT_NAME}_DEB_DEPENDENCIES \"${LOWER_PROJECT_NAME}${VERSION_ABI} (>= ${VERSION_MAJOR}.${VERSION_MINOR})\")\n"
   "\n"
@@ -49,7 +47,7 @@
   "  find_library(${UPPER_PROJECT_NAME}_LIBRARY ${CMAKE_PROJECT_NAME} NO_DEFAULT_PATH\n"
   "        PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
   "  if(${UPPER_PROJECT_NAME}_LIBRARY MATCHES "${UPPER_PROJECT_NAME}_LIBRARY-NOTFOUND")\n"
-  "    set(${CMAKE_PROJECT_NAME}_FOUND)\n"
+  "    set(_fail TRUE)\n"
   "    if(_out)\n"
   "      message(\${_output_type} \"   Missing the ${CMAKE_PROJECT_NAME} \"\n"
   "        \"library in \${PACKAGE_PREFIX_DIR}/lib.\")\n"
@@ -63,13 +61,15 @@
   "        PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
   "\n"
   "      if(\${_component}_libraryname MATCHES "\${_component}_libraryname-NOTFOUND")\n"
-  "        set(${CMAKE_PROJECT_NAME}_\${_component}_FOUND)\n"
+  "        if(${CMAKE_PROJECT_NAME}_FIND_REQUIRED_\${_component})\n"
+  "          set(_fail TRUE)\n"
+  "        endif()\n"
   "        if(_out)\n"
   "          message(\${_output_type} \"   ${CMAKE_PROJECT_NAME}_\${_component} \"\n"
   "            \"not found in \${PACKAGE_PREFIX_DIR}/lib\")\n"
   "        endif()\n"
   "      else()\n"
-  "        set(${CMAKE_PROJECT_NAME}_\${_component}_FOUND TRUE)\n"
+  "        set(${UPPER_PROJECT_NAME}_\${_component}_FOUND TRUE)\n"
   "        set(${UPPER_PROJECT_NAME}_\${_component}_LIBRARY \${\${_component}_libraryname})\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${\${_component}_libraryname})\n"
   "        list(APPEND ${UPPER_PROJECT_NAME}_COMPONENTS \${_component})\n"
@@ -89,22 +89,20 @@
   "  if(EXISTS \${PACKAGE_PREFIX_DIR}/${CMAKE_MODULE_INSTALL_PATH}/options.cmake)\n"
   "    include(\${PACKAGE_PREFIX_DIR}/${CMAKE_MODULE_INSTALL_PATH}/options.cmake)\n"
   "  endif()\n"
-  "\n"
-  "  set(${CMAKE_PROJECT_NAME}_FOUND TRUE)\n"
-  "  check_required_components(${CMAKE_PROJECT_NAME})\n"
   "endif()\n"
   "\n"
 # finally report about found or not found
-  "if(NOT ${CMAKE_PROJECT_NAME}_FOUND)\n"
-  "  set(${CMAKE_PROJECT_NAME}_VERSION)\n"
+  "if(_fail)\n"
+  "  set(${UPPER_PROJECT_NAME}_FOUND)\n"
+  "  set(${UPPER_PROJECT_NAME}_VERSION)\n"
   "  set(${UPPER_PROJECT_NAME}_INCLUDE_DIRS)\n"
   "  set(${UPPER_PROJECT_NAME}_LIBRARIES)\n"
   "  set(${UPPER_PROJECT_NAME}_DEB_DEPENDENCIES)\n"
   "  set(${UPPER_PROJECT_NAME}_LIBRARY)\n"
   "  set(${UPPER_PROJECT_NAME}_COMPONENTS)\n"
   "else()\n"
+  "  set(${UPPER_PROJECT_NAME}_FOUND TRUE)\n"
   "  if(_out)\n"
-  "    set(${UPPER_PROJECT_NAME}_FOUND TRUE)\n"
   "    message(STATUS \"Found ${CMAKE_PROJECT_NAME} ${VERSION} in \"\n"
   "      \"\${${UPPER_PROJECT_NAME}_INCLUDE_DIRS}:\${${UPPER_PROJECT_NAME}_LIBRARY}\")\n"
   "  endif()\n"
@@ -161,7 +159,8 @@
   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake.in
   ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
   INSTALL_DESTINATION ${CMAKE_MODULE_INSTALL_PATH}
-  PATH_VARS INCLUDE_INSTALL_DIR LIBRARY_NAMES TRANSIENTS)
+  PATH_VARS INCLUDE_INSTALL_DIR LIBRARY_NAMES TRANSIENTS
+  NO_CHECK_REQUIRED_COMPONENTS_MACRO)

 # create ProjectConfigVersion.cmake
 write_basic_package_version_file(


CmakeLists update

CmakeLists update

--- Modules/IGT/files.cmake
+++ Modules/IGT/files.cmake
@@ -15,6 +15,7 @@
   IGTFilters/mitkNavigationDataToOpenGLFilter.cpp
   IGTFilters/mitkNavigationDataToPointSetFilter.cpp
   IGTFilters/mitkTrackingDeviceSource.cpp
+  IGTFilters/mitkTrackingVolumeGenerator.cpp
   IGTFilters/mitkTimeStamp.cpp
   IGTFilters/mitkRealTimeClock.cpp
   IGTFilters/mitkTrackingDeviceSourceConfigurator.cpp
@@ -54,4 +55,4 @@
   SET(CPP_FILES ${CPP_FILES} IGTFilters/mitkWindowsRealTimeClock.cpp)
 ELSE()
   SET(CPP_FILES ${CPP_FILES} IGTFilters/mitkLinuxRealTimeClock.cpp)
-ENDIF(WIN32)+ENDIF(WIN32)


Updated py_library target to handle protocol buffer generated files

--- Googlify.cmake
+++ Googlify.cmake
@@ -422,7 +422,7 @@
         $<TARGET_PROPERTY:${TARGET},CLASSPATH_FILE> > /dev/null
     VERBATIM)
   set(LIB_TARGET ${LIB}_target)
-  add_dependencies(${TARGET} ${LIB_TARGET})
+  add_dependencies(${CLASSPATH_TARGET} ${LIB_TARGET})
 endfunction(link_third_party_with_full_targets_java)

 function(link_third_party_with_full_targets_python TARGET LIB)
@@ -554,13 +554,15 @@
   add_custom_target("${FULL_TARGET}" ALL SOURCES ${ARGN};${INIT_PY})
   set_target_properties("${FULL_TARGET}" PROPERTIES IS_PYTHON TRUE)
   foreach (SRC ${ARGN})
-    set(src ${CMAKE_CURRENT_SOURCE_DIR}/${SRC})
-    set(link ${CMAKE_CURRENT_BINARY_DIR}/${SRC})
-    add_custom_command(
-      TARGET ${FULL_TARGET} POST_BUILD
-      COMMAND ln -sf ${src} ${link}
-      DEPENDS ${link}
-      VERBATIM)
+    if (SRC MATCHES "$${PROJECT_BINARY_DIR}")
+      set(src ${CMAKE_CURRENT_SOURCE_DIR}/${SRC})
+      set(link ${CMAKE_CURRENT_BINARY_DIR}/${SRC})
+      add_custom_command(
+        TARGET ${FULL_TARGET} POST_BUILD
+        COMMAND ln -sf ${src} ${link}
+        DEPENDS ${link}
+        VERBATIM)
+    endif ()
   endforeach ()
   link(${TARGET} third_party.virtualenv)
 endfunction(py_library)


gostai_add_test uses gostai_add_executable.

	* build-aux/cmake/modules/Gostai.cmake: Here.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -585,78 +585,13 @@
 #  INCLUDE_DIRS - the list of include directories to search in.
 #  LIBRARIES	- the list of libraries to link with.
 #  RESOURCES	- the list of resources files.
-function(gostai_add_test name)
-
-  set(prefix "test-${name}")
-  parse_arguments(
-    "${prefix}"
-    "SOURCES;MOCS;UIS;CPPFLAGS;INCLUDE_DIRS;LIBRARIES;RESOURCES"
-    "NO_CONSOLE;INSTALL_NO_DEPS"
-    ${ARGN})
-
-  # Ensure test is enabled
-  enable_testing()
-
-  # =================== #
-  # Include directories #
-  # =================== #
-  if(${prefix}_INCLUDE_DIRS)
-    include_directories(${${prefix}_INCLUDE_DIRS})
-  endif(${prefix}_INCLUDE_DIRS)
-
-  # =================== #
-  # Prepare the sources #
-  # =================== #
-  qt4_wrap_ui(${prefix}_UI_SOURCES ${${prefix}_UIS})
-  qt4_add_resources(${prefix}_RES_SOURCES ${${prefix}_RESOURCES})
-
-  set(${prefix}_MOC_OPTIONS "")
-  if(CMAKE_BUILD_TYPE STREQUAL "Release")
-    list(APPEND ${prefix}_MOC_OPTIONS "-DQT_NO_DEBUG")
-    list(APPEND ${prefix}_MOC_OPTIONS "-DNDEBUG")
-  endif(CMAKE_BUILD_TYPE STREQUAL "Release")
-  qt4_wrap_cpp(${prefix}_MOC_SOURCES ${${prefix}_MOCS}
-    OPTIONS ${${prefix}_MOC_OPTIONS})
-
-  set(${prefix}_ALL_SOURCES
-    ${${prefix}_SOURCES}
-    ${${prefix}_MOC_SOURCES}
-    ${${prefix}_RES_SOURCES}
-    ${${prefix}_UI_SOURCES}
-    )
-
-  if(NOT ${prefix}_ALL_SOURCES)
-    message(FATAL_ERROR "No sources provided for test '${name}'")
-  endif(NOT ${prefix}_ALL_SOURCES)
-
-  add_executable(${prefix} ${${prefix}_ALL_SOURCES})
-
-  if(${prefix}_CPPFLAGS)
-    set_target_properties(${prefix} PROPERTIES
-      COMPILE_DEFINITIONS "${${prefix}_CPPFLAGS}")
-  endif(${prefix}_CPPFLAGS)
-
-  # ===================== #
-  # Prepare the libraries #
-  # ===================== #
-
-  if(${prefix}_LIBRARIES)
-    target_link_libraries(${prefix} ${${prefix}_LIBRARIES})
-  endif(${prefix}_LIBRARIES)
-
-  # ================= #
-  # Register the test #
-  # ================= #
-
-  add_test(${prefix} ${prefix})
-
-  # ================== #
-  # Add custom targets #
-  # ================== #
-
-  add_exec_target(${prefix})
-
-endfunction(gostai_add_test)
+macro(gostai_add_test name)
+
+  gostai_add_executable(test-${name} ${ARGN}
+    NO_INSTALL)
+  add_test(${name} test-${name})
+
+endmacro(gostai_add_test)

 # Add translation to the target named _name_. It is intended to be called by
 # gostai_add_executable and gostai_add_library.


Add link to knowledge base.

Add link to knowledge base.

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -108,6 +108,8 @@
 		endif()

 		if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
+			# mbed TLS uses the frame pointer's register in inline assembly:
+			# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
 			set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fomit-frame-pointer")
 			set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fomit-frame-pointer")
 		endif()


make it possible to add more sources to a marble test application if needed (sync with geodata-nt r923990)

svn path=/trunk/KDE/kdeedu/marble/; revision=923992

--- MarbleMacros.cmake
+++ MarbleMacros.cmake
@@ -95,7 +95,7 @@

 macro( marble_add_test TEST_NAME )
     if( BUILD_MARBLE_TESTS )
-        set( ${TEST_NAME}_SRCS ${TEST_NAME}.cpp )
+        set( ${TEST_NAME}_SRCS ${TEST_NAME}.cpp ${ARGN} )
         if( QTONLY )
             qt4_generate_moc( ${TEST_NAME}.cpp ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.moc )
             include_directories( ${CMAKE_CURRENT_BINARY_DIR} )


[cmake] "root7" is defined only later; use root7_defvalue instead.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -269,9 +269,6 @@
   set(builtin_zlib_defvalue ON)
 endif()

-#---webgui by default always build together with root7-----------------------------------------
-set(webgui_defvalue ${root7})
-
 #---Changes in defaults due to platform-------------------------------------------------------
 if(WIN32)
   set(builtin_tbb_defvalue OFF)
@@ -310,6 +307,9 @@
   set(root7_defvalue OFF)
 endif()

+#---webgui by default always build together with root7-----------------------------------------
+set(webgui_defvalue ${root7_defvalue})
+
 #---roottest option implies testing
 if(roottest OR rootbench)
   set(testing ON CACHE BOOL "" FORCE)


Unittests fixed

Unittests fixed

--- UNITTESTS/features/cellular/framework/device/cellularstatemachine/unittest.cmake
+++ UNITTESTS/features/cellular/framework/device/cellularstatemachine/unittest.cmake
@@ -43,5 +43,5 @@
 )

 # defines
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMDMRTS=PTC0 -DMDMCTS=PTC1 -DMDMTXD=NC -DMDMRXD=NC -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DCELLULAR_DEVICE=myCellularDevice -DDEVICE_SERIAL_FC=1")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMDMRTS=PTC0 -DMDMCTS=PTC1 -DMDMTXD=NC -DMDMRXD=NC -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DCELLULAR_DEVICE=myCellularDevice -DDEVICE_SERIAL_FC=1")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMDMRTS=PTC0 -DMDMCTS=PTC1 -DMDMTXD=NC -DMDMRXD=NC -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DCELLULAR_DEVICE=myCellularDevice -DDEVICE_SERIAL_FC=1 -DMBED_CONF_RTOS_PRESENT=1")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMDMRTS=PTC0 -DMDMCTS=PTC1 -DMDMTXD=NC -DMDMRXD=NC -DMBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE=115200 -DCELLULAR_DEVICE=myCellularDevice -DDEVICE_SERIAL_FC=1 -DMBED_CONF_RTOS_PRESENT=1")


Add null terminator to stringified opencl-c.h

--- src/core/gen_opencl-c.h.cmake
+++ src/core/gen_opencl-c.h.cmake
@@ -11,4 +11,4 @@
 # Write character array
 file(WRITE ${OUTPUT} "extern const char OPENCL_C_H_DATA[] = {\n")
 file(APPEND ${OUTPUT} "${CONTENT}")
-file(APPEND ${OUTPUT} "};\n")
+file(APPEND ${OUTPUT} "'\\0'};\n")


use normalize_path()

use normalize_path()

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -79,11 +79,8 @@
   ${CMAKE_CURRENT_BINARY_DIR}/rosidl_typesupport_connext_cpp
 )
 foreach(_pkg_name ${rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES})
-  set(_include_dir "${${_pkg_name}_DIR}")
-  get_filename_component(_include_dir "${_include_dir}" DIRECTORY)
-  get_filename_component(_include_dir "${_include_dir}" DIRECTORY)
-  get_filename_component(_include_dir "${_include_dir}" DIRECTORY)
-  set(_include_dir "${_include_dir}/include/${_pkg_name}/dds_connext")
+  set(_include_dir "${${_pkg_name}_DIR}/../../../include/${_pkg_name}/dds_connext")
+  normalize_path(_include_dir "${_include_dir}")
   target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
     PUBLIC
     "${_include_dir}"


Indirect expansion

Indirect expansion

--- cmake/custom/compilers/FortranFlags.cmake
+++ cmake/custom/compilers/FortranFlags.cmake
@@ -1,79 +0,0 @@
-set(XCFun_Fortran_FLAGS)
-set(XCFun_Fortran_FLAGS_DEBUG)
-set(XCFun_Fortran_FLAGS_RELEASE)
-set(XCFun_Fortran_FLAGS_COVERAGE)
-
-if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
-  list(APPEND XCFun_Fortran_FLAGS
-    "-ffloat-store"
-    "-fcray-pointer"
-    "-fimplicit-none"
-    "-fautomatic"
-    "-fmax-errors=5"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_DEBUG
-    "-Wall"
-    "-Wuninitialized"
-    "-O0"
-    "-g3"
-    "-fbacktrace"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_RELEASE
-    "-O3"
-    "-ffast-math"
-    "-funroll-loops"
-    "-ftree-vectorize"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_COVERAGE
-    "${CODE_COVERAGE_FLAGS}"
-    )
-endif()
-
-if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
-  list(APPEND XCFun_Fortran_FLAGS
-    "-fpp"
-    "-assume byterecl"
-    "-nosave"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_DEBUG
-    "-Wall"
-    "-O0"
-    "-g"
-    "-traceback"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_RELEASE
-    "-O3"
-    "-ip"
-    )
-endif ()
-
-if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
-  list(APPEND XCFun_Fortran_FLAGS
-    "-mcmodel=medium"
-    "-pgcpplibs"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_DEBUG
-    "-g"
-    "-O0"
-    "-Mframe"
-    )
-  list(APPEND XCFun_Fortran_FLAGS_RELEASE
-    "-O3"
-    "-Mipa=fast"
-    "-Munroll"
-    "-Mvect=idiom"
-    )
-endif()
-
-if(ENABLE_CODE_COVERAGE)
-  if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
-    list(APPEND XCFun_Fortran_FLAGS_DEBUG
-      "-fprofile-arcs"
-      "-ftest-coverage"
-      )
-  else()
-    message(FATAL_ERROR "Code coverage analysis requires the GNU Fortran compiler!")
-  endif()
-endif()
-
-message(STATUS "Fortran compiler flags : ${CMAKE_Fortran_FLAGS} ${XCFun_Fortran_FLAGS} ${CMAKE_Fortran_FLAGS_${CMAKE_BUILD_TYPE}} ${XCFun_Fortran_FLAGS_${CMAKE_BUILD_TYPE}}")


Testsuite: Use DEAL_II_PATH instead of DEAL_II_DIR

--- cmake/macros/macro_deal_ii_add_test.cmake
+++ cmake/macros/macro_deal_ii_add_test.cmake
@@ -196,7 +196,7 @@
       #

       ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/output
-        COMMAND sh ${DEAL_II_DIR}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
+        COMMAND sh ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
           run "${_test_full}" "${_run_command}" "${_test_diff}"
           "${DIFF_EXECUTABLE}" "${_comparison_file}"
         COMMAND ${PERL_EXECUTABLE}
@@ -211,7 +211,7 @@
         )

       ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/diff
-        COMMAND sh ${DEAL_II_DIR}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
+        COMMAND sh ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
           diff "${_test_full}" "${_run_command}" "${_test_diff}"
           "${DIFF_EXECUTABLE}" "${_comparison_file}"
         WORKING_DIRECTORY


Switch from ITK 3.20 to ITK 4.4.2

Switch from ITK 3.20 to ITK 4.4.2

--- cmake/externals/projects_modules/ITK.cmake
+++ cmake/externals/projects_modules/ITK.cmake
@@ -51,8 +51,8 @@

 if (NOT DEFINED ${ep}_SOURCE_DIR)
   set(location
-    URL "http://sourceforge.net/projects/itk/files/itk/3.20/InsightToolkit-3.20.1.tar.gz"
-    URL_MD5 "90342ffa78bd88ae48b3f62866fbf050"
+    URL "http://sourceforge.net/projects/itk/files/itk/4.4/InsightToolkit-4.4.2.tar.gz"
+    URL_MD5 "5fd91d6f72e07f51e1e9b27ff02f020a"
     )
 endif()

@@ -78,13 +78,13 @@
   ${ep_optional_args}
   -DCMAKE_C_FLAGS:STRING=${${ep}_c_flags}
   -DCMAKE_CXX_FLAGS:STRING=${${ep}_cxx_flags}
+  -DCMAKE_SHARED_LINKER_FLAGS:STRING=${${ep}_shared_linker_flags}
   -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
   -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS_${ep}}
   -DBUILD_EXAMPLES:BOOL=OFF
   -DBUILD_TESTING:BOOL=OFF
-  -DITK_USE_REVIEW:BOOL=ON
-  -DITK_USE_REVIEW_STATISTICS:BOOL=ON
-  -DITK_USE_CONCEPT_CHECKING:BOOL=OFF
+  -DModule_ITKIOPhilipsREC:BOOL=ON
+  -DModule_ITKReview:BOOL=ON
   )


add patch files to list cmake knows about

* XP_CMAKE_REPO_INSYNC option related - should no longer create notincmake.txt file
* issue https://github.com/smanders/externpro/issues/244

--- modules/macpro.cmake
+++ modules/macpro.cmake
@@ -160,6 +160,7 @@
     ${CMAKE_BINARY_DIR}/xpbase/pro/*.cmake
     ${MODULES_DIR}/*.cmake ${MODULES_DIR}/*.in
     ${PRO_DIR}/use/usexp-*-config.cmake
+    ${PATCH_DIR}/*.patch
     )
   list(APPEND xpfiles ${projects})
   xpSourceListAppend("${xpfiles}")


fix: Deprecated CMake policy regarding PROJECT_VERSION setting [Basis]

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -1830,11 +1830,6 @@
     cmake_policy (SET CMP0017 NEW)
   endif ()

-  if (POLICY CMP0048)
-    # PROJECT_VERSION et al. variables are set by basis_project instead
-    cmake_policy (SET CMP0048 OLD)
-  endif ()
-
   # --------------------------------------------------------------------------
   # reset

@@ -1873,7 +1868,18 @@
     endif ()
   endforeach ()

-  project ("${PROJECT_NAME}" ${LANGUAGES})
+  if (POLICY CMP0048)
+    cmake_policy (SET CMP0048 NEW)
+    project ("${PROJECT_NAME}" VERSION "${PROJECT_VERSION}" LANGUAGES ${LANGUAGES})
+  else ()
+    project ("${PROJECT_NAME}" ${LANGUAGES})
+    basis_version_numbers (
+      "${PROJECT_VERSION}"
+        PROJECT_VERSION_MAJOR
+        PROJECT_VERSION_MINOR
+        PROJECT_VERSION_PATCH
+    )
+  endif ()

   # work-around for issue with CMAKE_PROJECT_NAME always being set to 'Project'
   if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
@@ -1923,14 +1929,6 @@
   else ()
     set (PROJECT_REVISION 0)
   endif ()
-
-  # extract version numbers from version string
-  basis_version_numbers (
-    "${PROJECT_VERSION}"
-      PROJECT_VERSION_MAJOR
-      PROJECT_VERSION_MINOR
-      PROJECT_VERSION_PATCH
-  )

   if (NOT DEFINED PROJECT_SOVERSION OR PROJECT_SOVERSION STREQUAL "")
     set (PROJECT_SOVERSION "${PROJECT_VERSION_MAJOR}")


CMake: Fix incorrectly passed flag when generating packages. Flag was treated as package base path instead.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -533,7 +533,7 @@
     endif ()

     if (NOT PAK_NO_COMPRESS)
-        set (PAK_FLAGS "${PAK_FLAGS} -c")
+        list (APPEND PAK_FLAGS -c)
     endif ()

     add_custom_command(


Update raspberrypi.cmake

Update raspberrypi.cmake

Update rpi cmake with 4.8 gcc instead of 4.7.

--- toolchains/raspberrypi.cmake
+++ toolchains/raspberrypi.cmake
@@ -10,8 +10,8 @@
 execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)

 if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-	if(NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
-		message(FATAL_ERROR "Please install g++ version 4.7 or greater")
+	if(NOT (GCC_VERSION VERSION_GREATER 4.8 OR GCC_VERSION VERSION_EQUAL 4.8))
+		message(FATAL_ERROR "Please install g++ version 4.8 or greater")
 	else()
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 	endif()


iox-#423 cleanup leak sanitizer blacklist

Signed-off-by: Mathias Kraus <ebc65708cf0163c1abebe72ba676749f82c5fe3e@apex.ai>

--- iceoryx_utils/cmake/IceoryxPlatform.cmake
+++ iceoryx_utils/cmake/IceoryxPlatform.cmake
@@ -89,10 +89,8 @@
     #     1         24 iox::posix::MessageQueue::receive
     if(NOT EXISTS ${BLACKLIST_FILE_PATH})
         file(WRITE  ${BLACKLIST_FILE_PATH} "# This file is auto-generated from iceoryx_utils/cmake/IceoryxPlatform.cmake\n")
-        file(APPEND ${BLACKLIST_FILE_PATH} "leak:libacl.so.1\n")
-        file(APPEND ${BLACKLIST_FILE_PATH} "leak:iox::posix::MessageQueue::timedReceive\n")
-        file(APPEND ${BLACKLIST_FILE_PATH} "leak:iox::posix::UnixDomainSocket::timedReceive\n")
-        file(APPEND ${BLACKLIST_FILE_PATH} "leak:iox::posix::MessageQueue::receive\n")
+        file(APPEND ${BLACKLIST_FILE_PATH} "#leak:libacl.so.1\n")
+        file(APPEND ${BLACKLIST_FILE_PATH} "#leak:iox::posix::UnixDomainSocket::timedReceive\n")
         file(APPEND ${BLACKLIST_FILE_PATH} "# End of file\n")
     endif()
 endfunction()


CMake: Added Static postfix to libs in static build

--HG--
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/trunk%40568

--- CMake/Utils/OgreInstall.cmake
+++ CMake/Utils/OgreInstall.cmake
@@ -11,10 +11,16 @@
 endif ()

 function(ogre_install_lib LIBNAME)
+  # add static prefix, if compiling static version
+  if (OGRE_STATIC)
+    set_target_properties(${LIBNAME} PROPERTIES
+      OUTPUT_NAME ${LIBNAME}Static
+    )
+  endif ()
   install(TARGETS ${LIBNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	LIBRARY DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	ARCHIVE DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
+	LIBRARY DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
+	ARCHIVE DESTINATION "lib" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
   )
   install(TARGETS ${LIBNAME}
     RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS DEBUG
@@ -24,10 +30,16 @@
 endfunction(ogre_install_lib)

 function(ogre_install_plugin PLUGINNAME)
+  # add static prefix, if compiling static version
+  if (OGRE_STATIC)
+    set_target_properties(${PLUGINNAME} PROPERTIES
+      OUTPUT_NAME ${PLUGINNAME}Static
+    )
+  endif ()
   install(TARGETS ${PLUGINNAME}
     RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	LIBRARY DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
-	ARCHIVE DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo
+	LIBRARY DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
+	ARCHIVE DESTINATION "lib${OGRE_PLUGIN_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None
   )
   install(TARGETS ${PLUGINNAME}
     RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS DEBUG
@@ -39,7 +51,7 @@
 function(ogre_install_sample SAMPLENAME)
   if (OGRE_INSTALL_SAMPLES)
     install(TARGETS ${SAMPLENAME}
-      RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo OPTIONAL
+      RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release MinSizeRel RelWithDebInfo None OPTIONAL
     )
     install(TARGETS ${SAMPLENAME}
       RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS DEBUG OPTIONAL


add reference screenshot

add reference screenshot

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

 if(BUILD_TESTING)
-  set(revision_tag 0ae54d86)
+  set(revision_tag aa68beed)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Update PythonQt to patched-5, which now includes selected updates from patched-6

This commit integrates recent fixes from the PythonQt master, like in the
patched-6 branch, but skips a commit that changes the generated Python Qt API.

The patched-6 branch includes the contents of patched-5 plus PythonQt commits up
to and including commit http://sourceforge.net/p/pythonqt/code/403/.  Commit
http://sourceforge.net/p/pythonqt/code/397/ effectively changes the generated
Python Qt API by removing the singleShot attribute on QTimer to avoid a name
conflict with the static method of the same name. For example, code like this
would need to be rewritten to use the setSingleShot() method instead of setting
the singleShot attribute:

myTimer = qt.QTimer()
myTimer.singleShot = True

The process for updating to patched-6 while maintaining backwards compatibility
is planned to be addressed separately.

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -66,7 +66,7 @@
     message(FATAL_ERROR "error: Python is required to build ${PROJECT_NAME}")
   endif()

-  set(revision_tag f9c7e6a8e7c9ca7953b7128e820a81c93ed2cc56)
+  set(revision_tag b0194d0ce4a98a21c76344685c6bf7d77f870c7e)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()


COMP: Exclude SOFA on APPLE.

COMP: Exclude SOFA on APPLE.

--- CMake/mitkBuildConfigurationAll.cmake
+++ CMake/mitkBuildConfigurationAll.cmake
@@ -1,6 +1,15 @@
 set(MITK_CONFIG_PACKAGES )

+set(_apple_package_excludes)
+
+if(APPLE)
+  set(_apple_package_excludes
+    SOFA
+  )
+endif()
+
 set(_package_excludes
+  ${_apple_package_excludes}
   Python
   OpenCL
   SYSTEM_Boost


Make RPATH removal only happen on Linux

Make RPATH removal only happen on Linux

--- CMake/mitkMacroInstallHelperApp.cmake
+++ CMake/mitkMacroInstallHelperApp.cmake
@@ -63,7 +63,9 @@

     FOREACH(_target_location ${_target_locations})
       IF(NOT _qt_is_system_qt)
-        INSTALL(CODE "FILE(RPATH_REMOVE FILE \"\${CMAKE_INSTALL_PREFIX}/${_target_location}\")")
+        IF(NOT WIN32 AND NOT APPLE)
+          INSTALL(CODE "FILE(RPATH_REMOVE FILE \"\${CMAKE_INSTALL_PREFIX}/${_target_location}\")")
+        ENDIF()
         IF(QT_PLUGINS_DIR)
           IF(WIN32)
             INSTALL(DIRECTORY "${QT_PLUGINS_DIR}"


Removed trailing white-space.

Removed trailing white-space.

--- CMake/usFunctionCompileSnippets.cmake
+++ CMake/usFunctionCompileSnippets.cmake
@@ -6,9 +6,9 @@
   foreach(main_cpp_file ${main_cpp_list})
     # get the directory containing the main.cpp file
     get_filename_component(main_cpp_dir "${main_cpp_file}" PATH)
-
+
     set(snippet_src_files )
-
+
     # If there exists a "files.cmake" file in the snippet directory,
     # include it and assume it sets the variable "snippet_src_files"
     # to a list of source files for the snippet.
@@ -27,11 +27,12 @@
       # glob all files in the directory and add them to the snippet src list
       file(GLOB_RECURSE snippet_src_files "${main_cpp_dir}/*")
     endif()
-
+
     # Uset the top-level directory name as the executable name
     string(REPLACE "/" ";" main_cpp_dir_tokens "${main_cpp_dir}")
     list(GET main_cpp_dir_tokens -1 snippet_exec_name)
     set(snippet_target_name "Snippet-${snippet_exec_name}")
+
     add_executable(${snippet_target_name} ${snippet_src_files})
     if(ARGN)
       target_link_libraries(${snippet_target_name} ${ARGN} ${snippet_link_libraries})
@@ -43,7 +44,7 @@
       LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/snippets"
       OUTPUT_NAME ${snippet_exec_name}
     )
-
+
   endforeach()

 endfunction()


prepare for FBVLC emulation

prepare for FBVLC emulation

--- src/PluginConfig.cmake
+++ src/PluginConfig.cmake
@@ -11,12 +11,14 @@

 set(PLUGIN_NAME "WebChimera")
 set(PLUGIN_PREFIX "WebChimera")
-set(PLUGIN_DESCRIPTION "Web Plugin powered by Firebreath/Qt Qml/Vlc")
+set( PLUGIN_DESCRIPTION "Web Plugin powered by Firebreath/Qt Qml/Vlc" )
+set( FBVLC_PLUGIN_DESCRIPTION "FireBreathed VLC (aka FBVLC) emulator" )
 set(PRODUCT_NAME "Chimera Web Plugin")
 set(PROJECT_OWNER "Sergey Radionov")
 set(PROJECT_DOMAIN "WebChimera.org")

-set(PLUGIN_MIMETYPE "application/x-chimera-plugin")
+set( PLUGIN_MIMETYPE "application/x-chimera-plugin" )
+set( FBVLC_PLUGIN_MIMETYPE "application/x-fb-vlc" )

 # ActiveX constants:
 set(FBTYPELIB_NAME ${PLUGIN_NAME}Lib)
@@ -31,7 +33,10 @@
 # NOTE: THESE GUIDS *MUST* BE UNIQUE TO YOUR PLUGIN/ACTIVEX CONTROL!  YES, ALL OF THEM!
 set(FBTYPELIB_GUID 2b642482-539b-5158-b60c-725219b3a4b6)
 set(IFBControl_GUID 0d25ef13-5e83-527e-822e-e97f89d9055f)
-set(FBControl_GUID df4501d0-6a9f-5d59-a08d-7be21a13c847)
+set( FBControl_GUID
+     df4501d0-6a9f-5d59-a08d-7be21a13c847
+     dc5b1d57-cf58-4500-b57e-fe62bc00fd64 ) #for FBVLC emulator
+
 set(IFBComJavascriptObject_GUID 3321ffa1-0fcd-5c02-bf77-a966735a2296)
 set(FBComJavascriptObject_GUID d873591c-3064-53b2-afe9-e67d54974423)
 set(IFBComEventSource_GUID 90a5b047-5212-5080-b565-1a0d7bdc5946)
@@ -42,7 +47,9 @@
 endif( FB_PLATFORM_ARCH_32 )

 # these are the pieces that are relevant to using it from Javascript
-set(ACTIVEX_PROGID "${PLUGIN_NAME}.${PLUGIN_NAME}")
+set( ACTIVEX_PROGID
+     "${PLUGIN_NAME}.${PLUGIN_NAME}"
+     "${PLUGIN_NAME}.FBVLC" )
 if( FB_PLATFORM_ARCH_32 )
     set(MOZILLA_PLUGINID "${PROJECT_DOMAIN}/${PLUGIN_NAME}")  # No 32bit postfix to maintain backward compatability.
 else( FB_PLATFORM_ARCH_32 )
@@ -51,7 +58,10 @@

 # strings
 set(FBSTRING_CompanyName "${PROJECT_OWNER}")
-set(FBSTRING_PluginDescription "${PLUGIN_DESCRIPTION}")
+set( FBSTRING_PluginDescription
+     "${PLUGIN_DESCRIPTION}"
+     "${FBVLC_PLUGIN_DESCRIPTION}"
+     )
 set(FBSTRING_PLUGIN_VERSION "${PLUGIN_VERSION}")
 set(FBSTRING_LegalCopyright "Copyright ${COPYRIGHT_YEARS} ${PROJECT_OWNER}")
 if( WIN32 )
@@ -68,7 +78,9 @@
 else( FB_PLATFORM_ARCH_32 )
     set(FBSTRING_PluginName "${PLUGIN_NAME} ${FB_PLATFORM_ARCH_NAME}")
 endif( FB_PLATFORM_ARCH_32 )
-set(FBSTRING_MIMEType "${PLUGIN_MIMETYPE}")
+set( FBSTRING_MIMEType
+     "${PLUGIN_MIMETYPE}"
+     "${FBVLC_PLUGIN_MIMETYPE}" )

 # Uncomment this next line if you're not planning on your plugin doing
 # any drawing:


remove debug message

remove debug message

--- rez_deps.cmake
+++ rez_deps.cmake
@@ -69,7 +69,6 @@
     message("WITH REZ NANOVDB")
     set(WITH_NANOVDB ON CACHE BOOL "Build Cycles with NanoVDB support" FORCE)
 	file(TO_CMAKE_PATH $ENV{NANOVDB_INCLUDE_DIR} NANOVDB_INCLUDE_DIR)
-	message("Nanovdb Include Dir: ${NANOVDB_INCLUDE_DIR}")
 else()
     set(WITH_NANOVDB OFF CACHE BOOL "Build Cycles with NanoVDB support" FORCE)
 endif()


hunter_add_version: remove unused

hunter_add_version: remove unused

--- cmake/modules/hunter_add_version.cmake
+++ cmake/modules/hunter_add_version.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Ruslan Baratov
+# Copyright (c) 2013, 2015 Ruslan Baratov
 # All rights reserved.

 include(CMakeParseArguments) # cmake_parse_arguments
@@ -32,20 +32,11 @@
   list(APPEND ${h_versions} ${h_VERSION})
   set(${h_versions} ${${h_versions}} PARENT_SCOPE)

-  # check <NAME>_ROOT (if already set, then skip)
-  string(TOUPPER ${h_PACKAGE_NAME} h_root)
-  set(h_root "${h_root}_ROOT")
-  string(COMPARE NOTEQUAL "${${h_root}}" "" root_not_empty)
-  if(root_not_empty)
-    hunter_status_debug("Skip '${h_VERSION}' (root is set)")
-    return()
-  endif()
-
   set(expected_version "HUNTER_${h_PACKAGE_NAME}_VERSION")
   string(COMPARE EQUAL "${${expected_version}}" "" version_is_empty)
   if(version_is_empty)
     hunter_internal_error(
-        "Both <NAME>_ROOT and HUNTER_<name>_VERSION can't be empty "
+        "HUNTER_<name>_VERSION can't be empty "
         "(${h_PACKAGE_NAME})"
         "(probably `hunter_config(...)` missing in config file)"
     )
@@ -56,7 +47,7 @@
     return()
   endif()

-  # <NAME>_ROOT not set and HUNTER_<name>_VERSION found
+  # HUNTER_<name>_VERSION found
   set(h_url_name "HUNTER_${h_PACKAGE_NAME}_URL")
   set(h_sha1_name "HUNTER_${h_PACKAGE_NAME}_SHA1")


Added the ability to inject a third-party dependencies path into the Android building.

--- generators/android/android-generator.cmake
+++ generators/android/android-generator.cmake
@@ -1,6 +1,10 @@

 #  message("a ${quartz_sources}")
-set(android_includes "")
+if (ANDROID_DEPENENCIES)
+  set(android_includes "")
+else ()
+  set(android_includes "include jni/${ANDROID_DEPENENCIES}/Android.mk")
+endif ()
 set(all_resources "")

 macro(list_to_string variable list)
@@ -55,7 +59,7 @@

   set(android_includes "${android_includes}\ninclude jni/${target_relative_path}/Android.mk")

-#    message("${target} ${${target}_resources_dir}")
+  #    message("${target} ${${target}_resources_dir}")
   if (NOT "${${target}_resources_dir}" STREQUAL "")
     list(APPEND all_resources ${${target}_resources_dir})
   endif ()
@@ -97,7 +101,7 @@
 set(build_additional "")

 foreach (resource_dir ${all_resources})
-set(build_additional "${build_additional}\n\
+  set(build_additional "${build_additional}\n\
 <copy todir=\"${CMAKE_BINARY_DIR}/assets\" >\n\
         <fileset dir=\"${resource_dir}\" includes=\"**\"/>\n\
  </copy>\


COMP: Revert to CMake 2 compatible line comment

The upstream CMake GoogleTest.cmake has bracket comment style not
supported by older CMake version. Change to traditional CMake line
comments.

Change-Id: Ib8e6fd01da631e629c85c2fe31cea3fa9f9b97b7

--- CMake/GoogleTest.cmake
+++ CMake/GoogleTest.cmake
@@ -1,43 +1,43 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.

-#[=======================================================================[.rst:
-GoogleTest
-----------
+#.rst:
+# GoogleTest
+# ----------
+#
+# This module defines functions to help use the Google Test infrastructure.
+#
+# .. command:: gtest_add_tests
+#
+#   Automatically add tests with CTest by scanning source code for Google test
+#   macros.
+#
+#   ::
+#
+#     gtest_add_tests(<exe> <args> <files>...)
+#
+#   ``<exe>``
+#     The path to the test executable.
+#   ``<args>``
+#     A ;-list of extra arguments to be passed to executable.  The entire
+#     list must be passed as a single argument.  Enclose it in quotes,
+#     or pass ``""`` for no arguments.
+#   ``<files>...``
+#     A list of source files to search for tests and test fixtures.
+#     Alternatively, use ``AUTO`` to specify that ``<exe>`` is the name
+#     of a CMake executable target whose sources should be scanned.
+#
+# Example
+# ^^^^^^^
+#
+# .. code-block:: cmake
+#
+#   include(GoogleTest)
+#   set(FooTestArgs --foo 1 --bar 2)
+#   add_executable(FooTest FooUnitTest.cc)
+#   gtest_add_tests(FooTest "${FooTestArgs}" AUTO)
+#

-This module defines functions to help use the Google Test infrastructure.
-
-.. command:: gtest_add_tests
-
-  Automatically add tests with CTest by scanning source code for Google test
-  macros.
-
-  ::
-
-    gtest_add_tests(<exe> <args> <files>...)
-
-  ``<exe>``
-    The path to the test executable.
-  ``<args>``
-    A ;-list of extra arguments to be passed to executable.  The entire
-    list must be passed as a single argument.  Enclose it in quotes,
-    or pass ``""`` for no arguments.
-  ``<files>...``
-    A list of source files to search for tests and test fixtures.
-    Alternatively, use ``AUTO`` to specify that ``<exe>`` is the name
-    of a CMake executable target whose sources should be scanned.
-
-Example
-^^^^^^^
-
-.. code-block:: cmake
-
-  include(GoogleTest)
-  set(FooTestArgs --foo 1 --bar 2)
-  add_executable(FooTest FooUnitTest.cc)
-  gtest_add_tests(FooTest "${FooTestArgs}" AUTO)
-
-#]=======================================================================]

 function(gtest_add_tests executable extra_args)
   if(NOT ARGN)


Ensure TubeTK ITK remote modules is not systematically built.

This commit will ensures configuring ITK with TubeTKITK remote will
allow to disable/enable the module by only using Module_TubeTKITK option.

--- ITKModules/TubeTKITK/itk-module.cmake
+++ ITKModules/TubeTKITK/itk-module.cmake
@@ -4,6 +4,7 @@
 itk_module( TubeTKITK
   DEPENDS
     ITKCommon
+  EXCLUDE_FROM_DEFAULT
   DESCRIPTION
     "${DOCUMENTATION}"
 )


Add COG C++ objcopy verbose output

Add COG C++ objcopy verbose output

--- cmake/Modules/CMakeCOGCXXObjcopy.cmake
+++ cmake/Modules/CMakeCOGCXXObjcopy.cmake
@@ -29,6 +29,12 @@
 get_filename_component( OBJECT_DIR  ${OBJECT} DIRECTORY )

 # run objcopy
+if( $ENV{VERBOSE} )
+    message(
+        "${CMAKE_OBJCOPY} --localize-text --rename-section .text=${OBJECT_NAME_WE}.cog ${OBJECT_NAME}"
+    )
+
+endif( $ENV{VERBOSE} )
 execute_process(
     COMMAND ${CMAKE_OBJCOPY} --localize-text --rename-section .text=${OBJECT_NAME_WE}.cog ${OBJECT_NAME}
     WORKING_DIRECTORY ${OBJECT_DIR}


[CMake][Exp PyROOT] Force Python related CMake variables into CMakeCache

After investigating the bug reported here

https://sft.its.cern.ch/jira/browse/ROOT-10626

we noticed that the deprecated variables
PYTHON_EXECUTABLE
PYTHON_INCLUDE_DIRS
PYTHON_LIBRARIES
PYTHON_VERSION_MAJOR
PYTHON_VERSION_MINOR
PYTHON_VERSION_STRING
NUMPY_FOUND
NUMPY_INCLUDE_DIRS
are not set correctly in the CMakeCache. This should fix the problem.

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -49,14 +49,14 @@
     # Search for NumPy, but not required:
     find_package(Python2 COMPONENTS NumPy QUIET)
     # Compat with find_package(PythonInterp), find_package(PythonLibs)
-    set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}")
-    set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}")
-    set(PYTHON_LIBRARIES "${Python2_LIBRARIES}")
-    set(PYTHON_VERSION_STRING "${Python2_VERSION}")
-    set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
-    set(PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}")
-    set(NUMPY_FOUND ${Python2_NumPy_FOUND})
-    set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}")
+    set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_LIBRARIES "${Python2_LIBRARIES}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_VERSION_STRING "${Python2_VERSION}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+    set(NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
+    set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
   else()
     if(PYTHON_EXECUTABLE AND NOT Python_EXECUTABLE)
       set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
@@ -71,14 +71,14 @@
     # Search for NumPy, but not required:
     find_package(Python COMPONENTS NumPy QUIET)
     # Compat with find_package(PythonInterp), find_package(PythonLibs), find_package(NumPy)
-    set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
-    set(PYTHON_INCLUDE_DIRS "${Python_INCLUDE_DIRS}")
-    set(PYTHON_LIBRARIES "${Python_LIBRARIES}")
-    set(PYTHON_VERSION_STRING "${Python_VERSION}")
-    set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}")
-    set(PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}")
-    set(NUMPY_FOUND ${Python_NumPy_FOUND})
-    set(NUMPY_INCLUDE_DIRS "${Python_NumPy_INCLUDE_DIRS}")
+    set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_INCLUDE_DIRS "${Python_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_LIBRARIES "${Python_LIBRARIES}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_VERSION_STRING "${Python_VERSION}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_VERSION_MAJOR "${Python_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
+    set(PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+    set(NUMPY_FOUND ${Python_NumPy_FOUND} CACHE INTERNAL "" FORCE)
+    set(NUMPY_INCLUDE_DIRS "${Python_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
   endif()

 else()


chore(build): update falco libs to b7eb0dd

Signed-off-by: Luca Guerra <a05bd890c4868ea1807f8564055d1fba77c6ba81@guerra.sh>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -24,8 +24,8 @@
   # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
   # -DFALCOSECURITY_LIBS_VERSION=dev ..`
   if(NOT FALCOSECURITY_LIBS_VERSION)
-    set(FALCOSECURITY_LIBS_VERSION "e71045b29dc4948f4b45ab2dd254499f9eeb0c09")
-    set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=964418a42f377d8d6881f086827779de4f9123a8cc952cc4a2d7112c8483a025")
+    set(FALCOSECURITY_LIBS_VERSION "b7eb0dd65226a8dc254d228c8d950d07bf3521d2")
+    set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=0f6dcdc3b94243c91294698ee343806539af81c5b33c60c6acf83fc1aa455e85")
   endif()

   # cd /path/to/build && cmake /path/to/source


cmake: FortranLibraries with a brutal glob and a find_library

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@985 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/FortranLibraries.cmake
+++ Numerics/cmake/FortranLibraries.cmake
@@ -66,22 +66,54 @@
         OUTPUT_VARIABLE MY_OUTPUT)
     #message("${MY_OUTPUT}")
     if(NOT FTEST_OK)
-        MESSAGE(FATAL_ERROR "Failed to compile simple fortran library")
+      MESSAGE(FATAL_ERROR "Failed to compile simple fortran library")
     endif(NOT FTEST_OK)
+
+    SET(trial_libraries "${fc_libraries}\;flib")
+
+    LIST(APPEND trial_lib_paths "${FORTRAN_COMPILER_LIB_DIRECTORY}")
+    LIST(APPEND trial_lib_paths "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp")
+
+    MESSAGE(STATUS "trying libraries ${fc_libraries_t}")
+
+    TRY_COMPILE(FORT_LIBS_WORK ${CMAKE_BINARY_DIR}
+      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testF77libs.c
+      CMAKE_FLAGS
+      -DLINK_LIBRARIES:STRING=${trial_libraries}
+      -DLINK_DIRECTORIES="${trial_lib_paths}"
+      OUTPUT_VARIABLE FORT_LIBS_BUILD_OUT)
+    #MESSAGE(STATUS ${FORT_LIBS_BUILD_OUT})
+
+    IF(NOT FORT_LIBS_WORK)
+      # let's find it in some potentiallink directories
+      FILE(GLOB _LIBDIRS_MAYBE /lib /usr/lib /lib/* /usr/*/lib /usr/lib/* /opt/lib /opt/*/lib)
+      FOREACH(_F ${_LIBDIRS_MAYBE})
+        IF(IS_DIRECTORY ${_F})
+          LIST(APPEND _LIBDIRS ${_F})
+        ENDIF(IS_DIRECTORY ${_F})
+      ENDFOREACH(_F ${_LIBDIRS_MAYBE})
+      LIST(APPEND _LIBDIRS "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp")

-    SET(trial_libraries "${fc_libraries}\;flib")
-    SET(trial_lib_paths "${FORTRAN_COMPILER_LIB_DIRECTORY}\;${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp")
+      #string -> list
+      SET(_libs ${trial_libraries})
+      FIND_LIBRARY(_LFIND NAMES ${_libs} PATHS "${_LIBDIRS}")

-    MESSAGE(STATUS "trying libraries ${fc_libraries_t}")
+      MESSAGE("LFIND = ${_LFIND}")

-    TRY_COMPILE(FORT_LIBS_WORK ${CMAKE_BINARY_DIR}
-         ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testF77libs.c
-         CMAKE_FLAGS
-         -DLINK_LIBRARIES:STRING=${trial_libraries}
-         -DLINK_DIRECTORIES:STRING=${trial_lib_paths}
-         OUTPUT_VARIABLE FORT_LIBS_BUILD_OUT
-         )
-    #MESSAGE(STATUS ${FORT_LIBS_BUILD_OUT})
+      IF(_LFIND)
+        GET_FILENAME_COMPONENT(_LFINDDIR ${_LFIND} PATH)
+        LIST(APPEND _LFINDDIRLIST ${_LFINDDIR})
+        LIST(APPEND _LFINDDIRLIST "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp")
+        TRY_COMPILE(FORT_LIBS_WORK ${CMAKE_BINARY_DIR}
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testF77libs.c
+          CMAKE_FLAGS
+          -DLINK_LIBRARIES:STRING=${trial_libraries}
+          -DLINK_DIRECTORIES="${_LFINDDIRLIST}"
+          OUTPUT_VARIABLE FORT_LIBS_BUILD_OUT
+          )
+        #MESSAGE(STATUS ${FORT_LIBS_BUILD_OUT})
+      ENDIF(_LFIND)
+    ENDIF(NOT FORT_LIBS_WORK)

     IF(FORT_LIBS_WORK)
         # the goal is to set this to something useful


[Conf] Added a dependency on the Boost.System library.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -570,7 +570,7 @@
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
-    date_time iostreams serialization filesystem locale python)
+    date_time iostreams serialization filesystem system locale python)
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN regex program_options)
   set (BOOST_REQUIRED_COMPONENTS_FOR_TST unit_test_framework)
   set (BOOST_REQUIRED_COMPONENTS ${BOOST_REQUIRED_COMPONENTS_FOR_LIB}


[Config] Fixed the call to Protobuf Python helper (at least) for Fedora 23+.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -644,20 +644,45 @@
 endmacro (get_boost)

 ##
+# The following implementation derives from the eponym function, from
+# /usr/share/cmake/Modules/FindProtobuf.cmake, when such a function exists.
+# It exists in a Fedora 23+. Note that when the function exists in
+# FindProtobuf.cmake, it is not overriden by the implementation below.
+#
 # PROTOBUF_GENERATE_PYTHON (public function)
 #   _proto_srcs = Variable to define with autogenerated Python source files
 #   ARGN = proto files
-function (PROTOBUF_GENERATE_PYTHON _proto_srcs _proto_output_dir)
+function (PROTOBUF_GENERATE_PYTHON _proto_srcs)
   if (NOT ARGN)
     message (SEND_ERROR
 	  "Error: PROTOBUF_GENERATE_PYTHON() called without any proto files")
     return()
-  endif()
-
-  # Output directory
-  set (_python_output_dir ${CMAKE_CURRENT_BINARY_DIR}/${_proto_output_dir})
-
-  #
+  endif (NOT ARGN)
+
+  if (PROTOBUF_GENERATE_CPP_APPEND_PATH)
+    # Create an include path for each file specified
+    foreach (FIL ${ARGN})
+      get_filename_component (ABS_FIL ${FIL} ABSOLUTE)
+      get_filename_component (ABS_PATH ${ABS_FIL} PATH)
+      list (FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+      if (${_contains_already} EQUAL -1)
+        list (APPEND _protobuf_include_path -I ${ABS_PATH})
+      endif (${_contains_already} EQUAL -1)
+    endforeach (FIL ${ARGN})
+  else (PROTOBUF_GENERATE_CPP_APPEND_PATH)
+    set (_protobuf_include_path -I ${CMAKE_CURRENT_SOURCE_DIR})
+  endif (PROTOBUF_GENERATE_CPP_APPEND_PATH)
+
+  if (DEFINED PROTOBUF_IMPORT_DIRS)
+    foreach (DIR ${PROTOBUF_IMPORT_DIRS})
+      get_filename_component (ABS_PATH ${DIR} ABSOLUTE)
+      list (FIND _protobuf_include_path ${ABS_PATH} _contains_already)
+      if (${_contains_already} EQUAL -1)
+          list (APPEND _protobuf_include_path -I ${ABS_PATH})
+      endif (${_contains_already} EQUAL -1)
+    endforeach (DIR ${PROTOBUF_IMPORT_DIRS})
+  endif (DEFINED PROTOBUF_IMPORT_DIRS)
+
   set (${_proto_srcs})
   foreach (FIL ${ARGN})
 	# Extract the file-path and the extension of the Protobuf specification file
@@ -667,20 +692,17 @@
 	# With Python, Protobuf adds "_pb2"
 	set (_proto_gen_src ${FIL_WE}_pb2.py)

-    list (APPEND ${_proto_srcs} "${_python_output_dir}/${_proto_gen_src}")
-
-	# Calculate the Protobuf include path (Protobuf is a little dumb about
-	# file-path: it must be told twice, consistently, where the source is
-	# located)
-	set (_protobuf_include_path
-	  -I ${CMAKE_CURRENT_SOURCE_DIR}/${_layer_dir_name})
+	message (STATUS
+	  "Adding ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src} to Python sources")
+
+    list (APPEND ${_proto_srcs} "${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}")

 	# Add a specific command for the Protobuf stub/skeleton generation
-    add_custom_command (OUTPUT "${_python_output_dir}/${_proto_gen_src}"
+    add_custom_command (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}"
       COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
-      ARGS --python_out ${_python_output_dir} ${_protobuf_include_path} ${ABS_FIL}
-      DEPENDS ${ABS_FIL}
-      COMMENT "Running Python protocol buffer compiler on ${FIL}, generating ${_python_output_dir}/${_proto_gen_src}"
+	  --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
+      DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
+      COMMENT "Running Python protocol buffer compiler on ${FIL}, generating ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}"
       VERBATIM)
   endforeach (FIL ${ARGN})

@@ -1521,7 +1543,8 @@
 	# Build the C++ stubs/skeletons
 	PROTOBUF_GENERATE_CPP (PROTO_CPP_SRCS PROTO_CPP_HDRS ${_proto_file})
 	# Build the Python helper
-	PROTOBUF_GENERATE_PYTHON (PROTO_PY_SRCS python ${_proto_file})
+	# Deprecated? PROTOBUF_GENERATE_PYTHON (PROTO_PY_SRCS python ${_proto_file})
+	PROTOBUF_GENERATE_PYTHON (PROTO_PY_SRCS ${_proto_file})

 	# Specify the source file, which is by convention (here) made of the name
 	# of the Protobuf interface file suffixed by .hpp/.cpp


x11_egl: use correct cmake variable name for GLES1 include path

This commit reverts most of 7b4a66f99 that included a hack to search
for include directory next to the library path. This was invalid since
used variable name PKG_GLES1_INCLUDE_DIRS is false, correct name is
GLES1_INCLUDE_DIRS which is properly set by the PKG_CHECK_MODULES call.

This change has been succesfully tested on Fedora and Ubuntu distros by
setting up a custom PKG_CONFIG_PATH.

VK-GL-CTS issue: 1573

Change-Id: I158d816d28f5bbf30288f6226bd5c9e30cf85285
Signed-off-by: Tapani Pälli <cdcb67a5e49297de94340ca09f25994bd5e7f762@intel.com>

--- targets/x11_egl/x11_egl.cmake
+++ targets/x11_egl/x11_egl.cmake
@@ -39,16 +39,7 @@
 	set(DEQP_SUPPORT_GLES1	ON)
 	set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARIES})
 	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS}")
-	if ("${PKG_GLES1_INCLUDE_DIRS}" STREQUAL "")
-		# PKG_GLES1_INCLUDE_DIRS empty, see if matching include
-		# path (GLES/gl.h) exists beside library directory
-		set(GLES1_INCLUDE "${GLES1_LIBDIR}/../include")
-		if (EXISTS ${GLES1_INCLUDE}/GLES/gl.h)
-			include_directories(${GLES1_INCLUDE})
-		else()
-			message(FATAL_ERROR "Could not find include path for GLES1 headers")
-		endif (EXISTS ${GLES1_INCLUDE}/GLES/gl.h)
-	endif ("${PKG_GLES1_INCLUDE_DIRS}" STREQUAL "")
+	include_directories(${GLES1_INCLUDE_DIRS})
 endif (GLES1_LIBRARIES)

 set(DEQP_PLATFORM_LIBRARIES ${X11_LIBRARIES})


Disabled incremental link on UWP to fix linker warning

--- BuildUtils.cmake
+++ BuildUtils.cmake
@@ -61,6 +61,13 @@
 				LINK_FLAGS_MINSIZEREL /LTCG
 				LINK_FLAGS_RELWITHDEBINFO /LTCG
 			)
+
+			if(PLATFORM_UNIVERSAL_WINDOWS)
+				# On UWP, disable incremental link to avoid linker warnings
+				set_target_properties(${TARGET} PROPERTIES
+					LINK_FLAGS_DEBUG /INCREMENTAL:NO
+				)
+			endif()
 		endif()
 	endif()


Qt 5 migration

Qt 5 migration

SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS() macro: added PARSE_ARGUMENTS to support environment for Qt5

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -473,6 +473,7 @@
   ##
   ## 0. Initialization
   ##
+  PARSE_ARGUMENTS(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS "ENVVAR" "" ${ARGN})

   # Package name, upper case
   STRING(TOUPPER ${pkg} pkg_UC)
@@ -480,22 +481,25 @@
   ##
   ## 1. Load environment or any previously detected root dir for the package
   ##
-  IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
-    FILE(TO_CMAKE_PATH "$ENV{${pkg_UC}_ROOT_DIR}" _${pkg_UC}_ROOT_DIR_ENV)
+  SET(_envvar ${pkg_UC}_ROOT_DIR)
+  IF(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR)
+    SET(_envvar "${SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS_ENVVAR}")
+  ENDIF()
+  IF(DEFINED ENV{${_envvar}})
+    FILE(TO_CMAKE_PATH "$ENV{${_envvar}}" _${pkg_UC}_ROOT_DIR_ENV)
     SET(_dflt_value "${_${pkg_UC}_ROOT_DIR_ENV}")
   ELSE()
     # will be blank if no package was previously loaded:
     SET(_dflt_value "${${pkg_UC}_ROOT_DIR_EXP}")
   ENDIF()
-
   # Detect if the variable has been set on the command line or elsewhere:
-  IF(DEFINED ${pkg_UC}_ROOT_DIR)
+  IF(DEFINED ${_envvar})
      SET(_var_already_there TRUE)
   ELSE()
      SET(_var_already_there FALSE)
   ENDIF()
   #   Make cache entry
-  SET(${pkg_UC}_ROOT_DIR "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")
+  SET(${_envvar} "${_dflt_value}" CACHE PATH "Path to ${pkg_UC} directory")

   ##
   ## 2. Find package - try CONFIG mode first (i.e. looking for XYZ-config.cmake)
@@ -503,7 +507,7 @@

   # Override the variable - don't append to it, as it would give precedence
   # to what was stored there before!
-  SET(CMAKE_PREFIX_PATH "${${pkg_UC}_ROOT_DIR}")
+  SET(CMAKE_PREFIX_PATH "${${_envvar}}")

   # Try find_package in config mode. This has the priority, but is
   # performed QUIET and not REQUIRED:
@@ -529,11 +533,11 @@
     IF(NOT Salome${pkg}_FIND_QUIETLY)
       IF(Salome${pkg}_FIND_REQUIRED)
          MESSAGE(FATAL_ERROR "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
-         "It currently contains ${pkg_UC}_ROOT_DIR=${${pkg_UC}_ROOT_DIR}  "
+         "It currently contains ${_envvar}=${${_envvar}}  "
          "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")
       ELSE()
          MESSAGE(WARNING "Package ${pkg} couldn't be found - did you set the corresponing root dir correctly? "
-         "It currently contains ${pkg_UC}_ROOT_DIR=${${pkg_UC}_ROOT_DIR}  "
+         "It currently contains ${_envvar}=${${_envvar}}  "
          "Append -DSALOME_CMAKE_DEBUG=ON on the command line if you want to see the original CMake error.")
       ENDIF()
     ENDIF()
@@ -566,19 +570,19 @@
     ##
     ## 4. Warn if CMake found something not located under ENV(XYZ_ROOT_DIR)
     ##
-    IF(DEFINED ENV{${pkg_UC}_ROOT_DIR})
+    IF(DEFINED ENV{${_envvar}})
       SALOME_CHECK_EQUAL_PATHS(_res "${_tmp_ROOT_DIR}" "${_${pkg_UC}_ROOT_DIR_ENV}")
       IF(NOT _res)
         MESSAGE(WARNING "${pkg} was found, but not at the path given by the "
-            "environment ${pkg_UC}_ROOT_DIR! Is the variable correctly set? "
+            "environment ${_envvar}! Is the variable correctly set? "
             "The two paths are: ${_tmp_ROOT_DIR} and: ${_${pkg_UC}_ROOT_DIR_ENV}")

       ELSE()
-        MESSAGE(STATUS "${pkg} found directory matches what was specified in the ${pkg_UC}_ROOT_DIR variable, all good!")
+        MESSAGE(STATUS "${pkg} found directory matches what was specified in the ${_envvar} variable, all good!")
       ENDIF()
     ELSE()
         IF(NOT _var_already_there)
-          MESSAGE(STATUS "Variable ${pkg_UC}_ROOT_DIR was not explicitly defined. "
+          MESSAGE(STATUS "Variable ${_envvar} was not explicitly defined. "
           "An installation was found anyway: ${_tmp_ROOT_DIR}")
         ENDIF()
     ENDIF()
@@ -600,7 +604,7 @@
     ##
     ## 6. Save the detected installation
     ##
-    SET(${pkg_UC}_ROOT_DIR "${_tmp_ROOT_DIR}")
+    SET(${_envvar} "${_tmp_ROOT_DIR}")

   ELSE()
     MESSAGE(STATUS "${pkg} was not found.")


BUG: GUI/CMake files: Adrien Bruneton : Fixed missing path for searching of QtCore.sip

--- adm_local/cmake_files/FindPyQt4.cmake
+++ adm_local/cmake_files/FindPyQt4.cmake
@@ -51,7 +51,8 @@
 # Typical location of qobject.sip are:
 #   - /usr/share/sip/PyQt4/QtCore, for a system install
 #   - or <xyz>/sip/QtCore, for a custom install
-FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip PATH_SUFFIXES sip/QtCore share/sip/PyQt4/QtCore)
+#   - or <xyz>/share/sip/QtCore, for a custom install
+FIND_FILE(PYQT_SIP_MAIN_FILE qobject.sip PATH_SUFFIXES share/sip/QtCore sip/QtCore share/sip/PyQt4/QtCore)

 IF(PYQT_SIP_MAIN_FILE)
   GET_FILENAME_COMPONENT(PYQT_SIPS_DIR "${PYQT_SIP_MAIN_FILE}" PATH)


Change FindNumPy.cmake to work in the presence of nonnumerical markers like '1.7.0b2'

Suggested by Daniel Müllner

--- FindNumPy.cmake
+++ FindNumPy.cmake
@@ -45,44 +45,46 @@
     find_package(PythonInterp)
 endif()

-if(PYTHONINTERP_FOUND)
-    execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
-        "import numpy as n; print(n.__version__); print(n.get_include());"
-        RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS
-        OUTPUT_VARIABLE _NUMPY_VALUES
-        ERROR_VARIABLE _NUMPY_ERROR_VALUE
-        OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-    if(_NUMPY_SEARCH_SUCCESS MATCHES 0)
-        set(NUMPY_FOUND TRUE)
-
-        # Convert the process output into a list
-        string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES})
-        string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES})
-        list(GET _NUMPY_VALUES 0 NUMPY_VERSION)
-        list(GET _NUMPY_VALUES 1 NUMPY_INCLUDE_DIRS)
-
-        # Make sure all directory separators are '/'
-        string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS})
-
-        # Get the major and minor version numbers
-        string(REGEX REPLACE "\\.|rc|dev" ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION})
-        list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR)
-        list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR)
-        list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH)
-        math(EXPR NUMPY_VERSION_DECIMAL
-            "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}")
-
-        find_package_message(NUMPY
-            "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}"
-            "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}")
-    else()
-        if(NumPy_FIND_REQUIRED)
-            message(FATAL_ERROR
-                "NumPy import failure:\n${_NUMPY_ERROR_VALUE}")
-        endif()
-        set(NUMPY_FOUND FALSE)
-    endif()
-else()
+if(NOT PYTHONINTERP_FOUND)
     set(NUMPY_FOUND FALSE)
 endif()
+
+execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
+    "import numpy as n; print(n.__version__); print(n.get_include());"
+    RESULT_VARIABLE _NUMPY_SEARCH_SUCCESS
+    OUTPUT_VARIABLE _NUMPY_VALUES
+    ERROR_VARIABLE _NUMPY_ERROR_VALUE
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if(NOT _NUMPY_SEARCH_SUCCESS MATCHES 0)
+    if(NumPy_FIND_REQUIRED)
+        message(FATAL_ERROR
+            "NumPy import failure:\n${_NUMPY_ERROR_VALUE}")
+    endif()
+    set(NUMPY_FOUND FALSE)
+endif()
+
+# Convert the process output into a list
+string(REGEX REPLACE ";" "\\\\;" _NUMPY_VALUES ${_NUMPY_VALUES})
+string(REGEX REPLACE "\n" ";" _NUMPY_VALUES ${_NUMPY_VALUES})
+list(GET _NUMPY_VALUES 0 NUMPY_VERSION)
+list(GET _NUMPY_VALUES 1 NUMPY_INCLUDE_DIRS)
+
+# Make sure all directory separators are '/'
+string(REGEX REPLACE "\\\\" "/" NUMPY_INCLUDE_DIRS ${NUMPY_INCLUDE_DIRS})
+
+# Get the major and minor version numbers
+string(REGEX REPLACE "\\." ";" _NUMPY_VERSION_LIST ${NUMPY_VERSION})
+list(GET _NUMPY_VERSION_LIST 0 NUMPY_VERSION_MAJOR)
+list(GET _NUMPY_VERSION_LIST 1 NUMPY_VERSION_MINOR)
+list(GET _NUMPY_VERSION_LIST 2 NUMPY_VERSION_PATCH)
+string(REGEX MATCH "[0-9]*" NUMPY_VERSION_PATCH ${NUMPY_VERSION_PATCH})
+math(EXPR NUMPY_VERSION_DECIMAL
+    "(${NUMPY_VERSION_MAJOR} * 10000) + (${NUMPY_VERSION_MINOR} * 100) + ${NUMPY_VERSION_PATCH}")
+
+find_package_message(NUMPY
+    "Found NumPy: version \"${NUMPY_VERSION}\" ${NUMPY_INCLUDE_DIRS}"
+    "${NUMPY_INCLUDE_DIRS}${NUMPY_VERSION}")
+
+set(NUMPY_FOUND TRUE)
+


Use /MP (parallel compile) in VStudio

Use /MP (parallel compile) in VStudio

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -39,6 +39,7 @@
 # 	/Gm: enable minimal rebuild
 #	/EHsc: slim exception model
 #	/EHa: fat exception model
+#   /MP: use multiple cores
 #
 # DEBUG compiler flags:
 #	/Zi create debugging information PDB file
@@ -58,11 +59,11 @@
     message("C++ exceptions are disabled")
     set(FIPS_VS_EXCEPTION_FLAGS "/EHsc")
 endif()
-set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /WX /TP /DWIN32")
+set(CMAKE_CXX_FLAGS "${FIPS_VS_EXCEPTION_FLAGS} /MP /WX /TP /DWIN32")
 set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od /Oy- /MTd /D_DEBUG /DFIPS_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MT /DNDEBUG")

-set(CMAKE_C_FLAGS "/WX /TC /errorReport:queue /DWIN32")
+set(CMAKE_C_FLAGS "/MP /WX /TC /errorReport:queue /DWIN32")
 set(CMAKE_C_FLAGS_DEBUG "/Zi /Od /Oy- /MTd /D_DEBUG /DFIPS_DEBUG=1")
 set(CMAKE_C_FLAGS_RELEASE "/Ox /MT /DNDEBUG ")


Comment MKL tensorflow

Comment MKL tensorflow

--- cmake/ExternalTensorflow.cmake
+++ cmake/ExternalTensorflow.cmake
@@ -54,6 +54,9 @@
         INSTALL_COMMAND
             echo "Installing tensorflow binary" &&
             cp -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/bazel-bin/tensorflow/libtensorflow_framework.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ &&
+            #echo "Installing mkl binaries" &&
+            #bash -c "cp $(readlink -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/bazel-out/)/../../../external/mkl/lib/libmklml_intel.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ -Rf" &&
+            #bash -c "cp $(readlink -f ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/bazel-out/)/../../../external/mkl/lib/libiomp5.so ${FAST_EXTERNAL_INSTALL_DIR}/lib/ -Rf" &&
             echo "Installing tensorflow headers" &&
             cp -rf ${FAST_EXTERNAL_BUILD_DIR}/tensorflow/src/tensorflow/tensorflow/ ${FAST_EXTERNAL_INSTALL_DIR}/include/ &&
             echo "Installing tensorflow generated headers" &&


remove gcc warning -Wswitch-enum

remove gcc warning -Wswitch-enum

--- cmake/HextEnableWarnings.cmake
+++ cmake/HextEnableWarnings.cmake
@@ -19,14 +19,15 @@
     "-Woverloaded-virtual" "-Wpacked" "-Wparentheses" "-Wpointer-arith"
     "-Wredundant-decls" "-Wreturn-type" "-Wsequence-point" "-Wshadow"
     "-Wsign-compare" "-Wsign-promo" "-Wstack-protector" "-Wstrict-aliasing=2"
-    "-Wstrict-null-sentinel" "-Wstrict-overflow=5" "-Wswitch" "-Wswitch-enum"
+    "-Wstrict-null-sentinel" "-Wstrict-overflow=5" "-Wswitch"
     "-Wtrigraphs" "-Wundef" "-Wuninitialized" "-Wunknown-pragmas"
     "-Wunreachable-code" "-Wunused"
     "-Wunused-function" "-Wunused-label" "-Wunused-parameter" "-Wunused-value"
     "-Wunused-variable" "-Wvariadic-macros" "-Wvolatile-register-var"
     "-Wwrite-strings"
     # Unused switches:
-    # "-Wswitch-default": generated ragel code uses switch without default,
+    # "-Wswitch-enum": Listing every enum brings chaos, especially for GumboTag.
+    # "-Wswitch-default": generated ragel code uses switch without default,
     #                     we cannot do anything about that
     # "-Wmissing-noreturn": we dont care for gcc specific attributes
     # "-Wpadded": also warns when it's impossible to shrink padding


Squashed '3rdparty/github/cmake-utils-remote/' changes from 3c115a5..ab35df0

ab35df0 CTEST_OUTPUT_ON_FAILURE=1

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: ab35df086a2f9f2190ffb45fffdcdae8cc0b6a8b

--- cmake/MyPackageBootstrap.cmake
+++ cmake/MyPackageBootstrap.cmake
@@ -43,7 +43,13 @@
   IF (MYPACKAGE_DEBUG)
     MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Creating target check")
   ENDIF ()
-  ADD_CUSTOM_TARGET (check COMMAND ${CMAKE_CTEST_COMMAND})
+  ADD_CUSTOM_TARGET(check
+            ${CMAKE_COMMAND} -E echo ----------------------------------
+    COMMAND ${CMAKE_COMMAND} -E echo Test command:
+    COMMAND ${CMAKE_COMMAND} -E echo ${CMAKE_CTEST_COMMAND} -C $<CONFIG>
+    COMMAND ${CMAKE_COMMAND} -E echo ----------------------------------
+    COMMAND ${CMAKE_COMMAND} -E env CTEST_OUTPUT_ON_FAILURE=1 ${CMAKE_CTEST_COMMAND} -C $<CONFIG>
+    )
   IF (MYPACKAGE_DEBUG)
     MESSAGE (STATUS "[${PROJECT_NAME}-BOOTSTRAP-DEBUG] Creating target man")
   ENDIF ()


And actually make the build fail if the version is not sufficient

--- cmake/modules/FindPolkit.cmake
+++ cmake/modules/FindPolkit.cmake
@@ -21,8 +21,8 @@
    # use pkg-config to get the directories and then use these values
    # in the FIND_PATH() and FIND_LIBRARY() calls
    find_package(PkgConfig)
-   pkg_check_modules(PC_POLKIT polkit-gobject-1>=0.98)
-   pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1>=0.98)
+   pkg_check_modules(PC_POLKIT REQUIRED polkit-gobject-1>=0.98)
+   pkg_check_modules(PC_POLKIT_AGENT REQUIRED polkit-agent-1>=0.98)
    set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
 endif (NOT WIN32)


[CMake] Allow WILLFAIL flag for gtests.

[CMake] Allow WILLFAIL flag for gtests.

Normal roottests accept the WILLFAIL flag. google tests didn't. Now,
this flag is passed down to ROOT_ADD_TEST, and acts like expected.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -1519,7 +1519,7 @@
 # function ROOT_ADD_GTEST(<testsuite> source1 source2... COPY_TO_BUILDDIR file1 file2 LIBRARIES)
 #
 function(ROOT_ADD_GTEST test_suite)
-  CMAKE_PARSE_ARGUMENTS(ARG "" "" "COPY_TO_BUILDDIR;LIBRARIES" ${ARGN})
+  CMAKE_PARSE_ARGUMENTS(ARG "WILLFAIL" "" "COPY_TO_BUILDDIR;LIBRARIES" ${ARGN})
   include_directories(${CMAKE_CURRENT_BINARY_DIR} ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})

   ROOT_GET_SOURCES(source_files . ${ARG_UNPARSED_ARGUMENTS})
@@ -1535,13 +1535,18 @@
         /EXPORT:_Init_thread_footer /EXPORT:_Init_thread_header /EXPORT:_tls_index")
     set_property(TARGET ${test_suite} APPEND_STRING PROPERTY LINK_FLAGS ${test_exports})
   endif()
-
+
+  if(ARG_WILLFAIL)
+    set(willfail WILLFAIL)
+  endif()
+
   ROOT_PATH_TO_STRING(mangled_name ${test_suite} PATH_SEPARATOR_REPLACEMENT "-")
   ROOT_ADD_TEST(
     gtest${mangled_name}
     COMMAND ${test_suite}
     WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}
-    COPY_TO_BUILDDIR ${ARG_COPY_TO_BUILDDIR}
+    COPY_TO_BUILDDIR ${ARG_COPY_TO_BUiILDDIR}
+    ${willfail}
   )
 endfunction()


Not necessary to add path

Not necessary to add path

svn path=/trunk/KDE/kdeedu/marble/; revision=698707

--- Findlibgps.cmake
+++ Findlibgps.cmake
@@ -5,10 +5,10 @@
 # Copyright (c) 2006, Andrew Manson, <g.real.ate@gmail.com>
 #

-FIND_PATH(libgps_INCLUDES libgpsmm.h /usr/include)
+FIND_PATH(libgps_INCLUDES libgpsmm.h )

-FIND_LIBRARY(libgps_LIBRARIES gps /usr/lib)
+FIND_LIBRARY(libgps_LIBRARIES gps)

 IF( NOT libgps_LIBRARIES)
     MESSAGE(STATUS "Not building with Gpsd Support")


Re-apply fix for mkl issue for eager mode (#12881)

* reapply fix for mkl issue for eager mode
* add comment, update link libs

--- cmake/onnxruntime_python.cmake
+++ cmake/onnxruntime_python.cmake
@@ -154,9 +154,19 @@
     "${REPO_ROOT}/cmake/external/protobuf/src"
     ${TORCH_INCLUDE_DIRS})

+  if (onnxruntime_ENABLE_EAGER_MODE)
+    # For eager mode, torch build has a mkl dependency from torch's cmake config,
+    # Linking to torch libraries to avoid this unnecessary mkl dependency.
+    target_include_directories(onnxruntime_pybind11_state PRIVATE "${TORCH_INSTALL_PREFIX}/include" "${TORCH_INSTALL_PREFIX}/include/torch/csrc/api/include")
+    find_library(LIBTORCH_LIBRARY torch PATHS "${TORCH_INSTALL_PREFIX}/lib")
+    find_library(LIBTORCH_CPU_LIBRARY torch_cpu PATHS "${TORCH_INSTALL_PREFIX}/lib")
+    find_library(LIBC10_LIBRARY c10 PATHS "${TORCH_INSTALL_PREFIX}/lib")
+    target_link_libraries(onnxruntime_pybind11_state PRIVATE ${LIBTORCH_LIBRARY} ${LIBTORCH_CPU_LIBRARY} ${LIBC10_LIBRARY})
+  endif()
+
   # Explicitly link torch_python to workaround https://github.com/pytorch/pytorch/issues/38122#issuecomment-694203281
   find_library(TORCH_PYTHON_LIBRARY torch_python PATHS "${TORCH_INSTALL_PREFIX}/lib")
-  target_link_libraries(onnxruntime_pybind11_state PRIVATE ${TORCH_PYTHON_LIBRARY} ${TORCH_LIBRARIES})
+  target_link_libraries(onnxruntime_pybind11_state PRIVATE ${TORCH_PYTHON_LIBRARY})
   if (onnxruntime_ENABLE_EAGER_MODE)
     target_link_libraries(onnxruntime_pybind11_state PRIVATE onnxruntime_eager)
   endif()


STYLE: Fix line lengths

STYLE: Fix line lengths

--- ITKModules/TubeTKITK/tubetk-depends.cmake
+++ ITKModules/TubeTKITK/tubetk-depends.cmake
@@ -2,14 +2,15 @@
 #
 # TubeTK Maintainers:
 #
-# TubeTK base components required to build TubeTKITK should be added to TubeTKITK_DEPENDS list.
+# TubeTK base components required to build TubeTKITK should be added to
+#   TubeTKITK_DEPENDS list.
 #
 # * Components should be listed in topological order.
 #
 # * Name should be specified without the 'TubeTK' prefix.
 #
-# * All components should be listed: This will ensure all required folder will be added
-# when building TubeTK as an ITK remote module.
+# * All components should be listed: This will ensure all required folder
+#     will be added when building TubeTK as an ITK remote module.
 #

 set( TubeTKITK_DEPENDS


build: remove python fallback in overlay builds

Remove the Python 2 fallback from the standalone overlay build.  This
is part of the migration to Python 3.

--- cmake/modules/StandaloneOverlay.cmake
+++ cmake/modules/StandaloneOverlay.cmake
@@ -116,13 +116,7 @@
 include(DarwinSDKs)

 find_package(Python2 COMPONENTS Interpreter REQUIRED)
-find_package(Python3 COMPONENTS Interpreter)
-if(NOT Python3_Interpreter_FOUND)
-  message(WARNING "Python3 not found, using python2 as a fallback")
-  add_executable(Python3::Interpreter IMPORTED)
-  set_target_properties(Python3::Interpreter PROPERTIES
-    IMPORTED_LOCATION ${Python2_EXECUTABLE})
-endif()
+find_package(Python3 COMPONENTS Interpreter REQUIRED)

 # Without this line, installing components is broken. This needs refactoring.
 swift_configure_components()


cmake: new qibuild template

cmake: new qibuild template

--- cmake/qibuild/templates/qibuild.cmake
+++ cmake/qibuild/templates/qibuild.cmake
@@ -30,7 +30,7 @@
 # This allow us to find all qibuild/qibuild.cmake
 function(bootstrap)
   execute_process(
-      COMMAND ${QI_BUILD} bootstrap ${CMAKE_BINARY_DIR}
+      COMMAND ${QI_BUILD} configure --bootstrap ${CMAKE_BINARY_DIR}
       RESULT_VARIABLE  _retcode
       OUTPUT_VARIABLE  _stdout
       ERROR_VARIABLE   _stderr
@@ -54,15 +54,14 @@
   endif()
 endfunction()

-if(NOT EXISTS ${CMAKE_BINARY_DIR}/use_qibuild.cmake)
-  bootstrap()
+if(NOT EXISTS ${CMAKE_BINARY_DIR}/dependencies.cmake)
+  #bootstrap()
 endif()

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

-# If we used `qibuild configure`, a find_deps.cmake file
-# has been generated in CMAKE_BINARY_DIR to find the
-# dependencies.
-if(EXISTS ${CMAKE_BINARY_DIR}/find_deps.cmake)
-  include(${CMAKE_BINARY_DIR}/find_deps.cmake)
-endif()
+include(qibuild/general)


cake: accept more cmake options (long ones with --)

--- cake-src/cake.cmake
+++ cake-src/cake.cmake
@@ -35,6 +35,13 @@
 #     -A <platform-name>
 #     -W[no-]dev
 #     -N
+#     --debug-trycompile
+#     --debug-output
+#     --trace
+#     --warn-uninitialized
+#     --warn-unused-vars
+#     --no-warn-unused-cli
+#     --check-system-vars
 #
 # Note: all parametrized options can also be written in one word,
 # without space-separator: '-D key=val' and '-Dkey=val'
@@ -250,7 +257,7 @@
 		elseif(a MATCHES "^(-C|-D|-U|-G|-T|-c|--config=|-t|--target=)(.*)$")
 			string(REPLACE ";" "\;" a "${a}")
 			list(APPEND cake_options "${a}")
-		elseif(a MATCHES "^(-W(no-)?dev|-N|--rm-bin|-R|--debug-release|-n|--install|--clean-first|--use-stderr)$")
+		elseif(a MATCHES "^(-W(no-)?dev|-N|--rm-bin|-R|--debug-release|-n|--install|--clean-first|--use-stderr|--debug-trycompile|--debug-output|--trace|--warn-uninitialized|--warn-unused-vars|--no-warn-unused-cli|--check-system-vars)$")
 			list(APPEND cake_options "${a}")
 		elseif(a STREQUAL "--ide")
 			set(opt_ide 1)
@@ -405,7 +412,7 @@
 			elseif(a MATCHES "^-DCMAKE_BUILD_TYPE(:.*)=(.*)$")
 				set(cmake_build_type "${CMAKE_MATCH_2}")
 			endif()
-		elseif(a MATCHES "^(-W(no-)?dev|-N)$")
+		elseif(a MATCHES "^(-W(no-)?dev|-N|--debug-trycompile|--debug-output|--trace|--warn-uninitialized|--warn-unused-vars|--no-warn-unused-cli|--check-system-vars)$")
 			list(APPEND opt_generate "${a}")
 		elseif(a MATCHES "^--rm-bin$")
 			set(opt_rm_bin 1)


Enable build and try to install

Enable build and try to install

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -133,33 +133,49 @@
     CAPTURE_CMAKE_ERROR _configure_error
     )

-# if ( NOT _configure_rv EQUAL 0 )
+if ( NOT _configure_rv EQUAL 0 )
+  ctest_submit()
+  message( SEND_ERROR "An error occurs during ctest_configure.")
+endif()
+
+ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
+            RETURN_VALUE _build_rv
+            CAPTURE_CMAKE_ERROR _build_error
+            )
+
+if ( NOT _build_rv EQUAL 0 )
+  ctest_submit()
+  message( SEND_ERROR "An error occurs during ctest_build.")
+endif()
+
+# Uncomment when ready for test
+# ctest_test(PARALLEL_LEVEL 8
+#            RETURN_VALUE _test_rv
+#            CAPTURE_CMAKE_ERROR _test_error
+#            )
+
+# if ( NOT _test_rv EQUAL 0 )
 #   ctest_submit()
-#   message( SEND_ERROR "An error occurs during ctest_configure.")
+#   message( SEND_ERROR "An error occurs during ctest_test.")
 # endif()

-# ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
-#             RETURN_VALUE _build_rv
-#             CAPTURE_CMAKE_ERROR _build_error
-#             )
+ctest_submit()

-# if ( NOT _build_rv EQUAL 0 )
-#   ctest_submit()
-#   message( SEND_ERROR "An error occurs during ctest_build.")
-# endif()
+# We need to install OTB for package purposes
+execute_process(
+  COMMAND ${CMAKE_COMMAND} "install"
+  WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+  RESULT_VARIABLE install_res
+  OUTPUT_VARIABLE install_out
+  ERROR_VARIABLE install_err
+  )

-# # Uncomment when ready for test
-# # ctest_test(PARALLEL_LEVEL 8
-# #            RETURN_VALUE _test_rv
-# #            CAPTURE_CMAKE_ERROR _test_error
-# #            )
-
-# # if ( NOT _test_rv EQUAL 0 )
-# #   ctest_submit()
-# #   message( SEND_ERROR "An error occurs during ctest_test.")
-# # endif()
-
-# ctest_submit()
+if ( DEBUG )
+  message( "Install output")
+  message( "install_res = ${install_res}" )
+  message( "install_out = ${install_out}" )
+  message( "install_err = ${install_err}" )
+endif()

 # Artifacts can only be in project dir...
 file ( COPY "${XDK_PATH}" DESTINATION "${OTB_SOURCE_DIR}/install")


COMP: Explicitly enabled needed CTK libraries.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -39,7 +39,9 @@
         ${ctk_optional_cache_args}
         -DDESIRED_QT_VERSION:STRING=4
         -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
+        -DCTK_LIB_PluginFramework:BOOL=ON
         -DCTK_LIB_DICOM/Widgets:BOOL=ON
+        -DCTK_PLUGIN_org.commontk.eventadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
       DEPENDS ${proj_DEPENDENCIES}
      )


FIX: Sample plugin dlls install paths

FIX: Sample plugin dlls install paths

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -379,10 +379,7 @@

     # Installation
     install(TARGETS ${CEGUI_TARGET_NAME}
-        RUNTIME DESTINATION bin
-        LIBRARY DESTINATION ${CEGUI_LIB_INSTALL_DIR}
-        ARCHIVE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
-        BUNDLE DESTINATION ${CEGUI_LIB_INSTALL_DIR}
+    LIBRARY DESTINATION bin
     )

     # Add the MetaData chunk of the sample to the final xml


Fix and cleanup ceghi_add_sample macro.

Fix and cleanup ceghi_add_sample macro.

Now does the right thing on OS X, should still work everywhere else too.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -333,53 +333,28 @@
 endmacro()

 #
-# Define a CEGUI sample app
+# Define a CEGUI sample module
 #
 macro (cegui_add_sample _NAME)
-    add_dependencies(${CEGUI_TARGET_NAME} ${CEGUI_SAMPLEFRAMEWORK_EXENAME}
-                            ${CEGUI_TARGET_NAME} ${_NAME}${CEGUI_SLOT_VERSION}
-    )
-
-    set (CEGUI_TARGET_NAME ${_NAME}${CEGUI_SLOT_VERSION})
-
-    include_directories(${CMAKE_SOURCE_DIR}/samples/common/include)
-
+    set (CEGUI_TARGET_NAME ${_NAME})
+
     cegui_gather_files()
-
+
 	set(CORE_HEADER_FILES ${CORE_HEADER_FILES}
 		${CMAKE_SOURCE_DIR}/samples/common/include/Sample.h
 		${CMAKE_SOURCE_DIR}/samples/common/include/SampleBase.h
 	)

     # Each demo will become a dynamically linked library as plugin (module)
-	add_library(${CEGUI_TARGET_NAME} MODULE ${CORE_SOURCE_FILES} ${CORE_HEADER_FILES})
-
-    if (NOT APPLE)
-        set_target_properties(${CEGUI_TARGET_NAME} PROPERTIES
-            INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CEGUI_LIB_INSTALL_DIR}"
-        )
-    endif()
-
-    if (APPLE)
-        # we add these to ensure the dynamically loaded modules we will be
-        # using are built before the .app's post build step that copies
-        # libs into the app bundle.
-        add_dependencies(${CEGUI_TARGET_NAME} ${CEGUI_CORE_WR_LIBNAME}
-                                              CEGUI${CEGUI_OPTION_DEFAULT_XMLPARSER}
-                                              CEGUI${CEGUI_OPTION_DEFAULT_IMAGECODEC}
-        )
-
-        cegui_apple_app_setup(${CEGUI_TARGET_NAME} FALSE)
-    endif()
+    cegui_add_library_impl(${CEGUI_TARGET_NAME} TRUE CORE_SOURCE_FILES CORE_HEADER_FILES TRUE FALSE)
+
+    add_dependencies(${CEGUI_SAMPLEFRAMEWORK_EXENAME} ${CEGUI_TARGET_NAME})
+
+    include_directories(${CMAKE_SOURCE_DIR}/samples/common/include)

     #Library link setup
     cegui_target_link_libraries(${CEGUI_TARGET_NAME}
         ${CEGUI_BASE_LIBNAME}
-    )
-
-    # Installation
-    install(TARGETS ${CEGUI_TARGET_NAME}
-    LIBRARY DESTINATION bin
     )

     # Add the MetaData chunk of the sample to the final xml


New Test Data for SpGeMM can be downloaded

--- cmake/ExternalMTX.cmake
+++ cmake/ExternalMTX.cmake
@@ -19,6 +19,7 @@
 option( DOWNLOAD_MTX_BELL_GARLAND "Sparse matrix files used in Bell-Garlands paper" OFF )
 option( DOWNLOAD_MTX_LARGE "MTX files where majority of time is in kernel" OFF )
 option( DOWNLOAD_MTX_SMALL "MTX files less than 4GB in dense format" OFF )
+option( DOWNLOAD_MTX_SPGEMM "MTX files used in Weifeng Paper for benchmarking SpGEMM" OFF )

 # Emulate a mapping data structure in CMake
 macro( MAP_ENTRY K V )
@@ -180,3 +181,52 @@
 if( DOWNLOAD_MTX_SMALL )
   MTX_process_files( MTX_Small_files MTX_Small_path )
 endif( )
+
+##### SPGEMM Square MTX sparse data #####
+set( MTX_SPGEMM_BENCH_files
+  Williams/cant.tar.gz
+  Williams/mac_econ_fwd500.tar.gz
+  Williams/mc2depi.tar.gz
+  Williams/cop20k_A.tar.gz
+  Williams/webbase-1M.tar.gz
+  Boeing/pwtk.tar.gz
+  DNVS/shipsec1.tar.gz
+  Hamm/scircuit.tar.gz
+  Oberwolfach/filter3D.tar.gz
+  Um/2cubes_sphere.tar.gz
+  vanHeukelum/cage12.tar.gz
+  GHS_psdef/hood.tar.gz
+  JGD_Homology/m133-b3.tar.gz
+  QLi/majorbasis.tar.gz
+  GHS_indef/mario002.tar.gz
+  FreeFieldTechnologies/mono_500Hz.tar.gz
+  Um/offshore.tar.gz
+  Pajek/patents_main.tar.gz
+  FEMLAB/poisson3Da.tar.gz
+)
+
+MAP_ENTRY( "Oberwolfach/filter3D.tar.gz" "fdbfaa0edb11e799f67870ebf16adfb0" )
+MAP_ENTRY( "Um/2cubes_sphere.tar.gz" "797e984d97d0057c9b88a3e4dd9af139" )
+MAP_ENTRY( "Williams/cant.tar.gz" "a5360391e462640583e59a7b36fa216c" )
+MAP_ENTRY( "Boeing/pwtk.tar.gz" "51617ea77ac8212ca3bf5c1eb041061b" )
+MAP_ENTRY( "vanHeukelum/cage12.tar.gz" "a899a0c48b9a58d081c52ffd88a84955" )
+MAP_ENTRY( "DNVS/shipsec1.tar.gz" "73372e7d6a0848f8b19d64a924fab73e" )
+MAP_ENTRY( "Williams/mac_econ_fwd500.tar.gz" "f1b0e56fbb75d1d6862874e3d7d33060" )
+MAP_ENTRY( "Williams/mc2depi.tar.gz" "8c8633eada6455c1784269b213c85ea6" )
+MAP_ENTRY( "Williams/cop20k_A.tar.gz" "beb2302025bbfae6fd1f5604957ffe52" )
+MAP_ENTRY( "Hamm/scircuit.tar.gz" "3e62f7ea83914f7e20019aefb2a5176f" )
+MAP_ENTRY( "Williams/webbase-1M.tar.gz" "2d4c239daad6f12d66a1e6a2af44cbdb" )
+MAP_ENTRY( "GHS_psdef/hood.tar.gz" "6279700b7d44b44fd630c079b31eee46" )
+MAP_ENTRY( "JGD_Homology/m133-b3.tar.gz" "29c5595e95c1f2476ada6fb397f0e2c9" )
+MAP_ENTRY( "QLi/majorbasis.tar.gz" "81a89740c4cd77052af9df5edaae2d1c" )
+MAP_ENTRY( "GHS_indef/mario002.tar.gz" "6cc995b3c4ec92cddaf9706ef2ac7457" )
+MAP_ENTRY( "FreeFieldTechnologies/mono_500Hz.tar.gz" "082f48c8d5af68c67ba229685691d09e" )
+MAP_ENTRY( "Um/offshore.tar.gz" "bac8efa0265bf9bd19d287677c2f455e" )
+MAP_ENTRY( "Pajek/patents_main.tar.gz" "bacaaa14de4398c981ba749665459324" )
+MAP_ENTRY( "FEMLAB/poisson3Da.tar.gz" "1eaf7aaf38385287505fe1d504f8a716" )
+
+set( SPGEMM_BENCH_MTX_path ${PROJECT_BINARY_DIR}/Externals/MTX/SpGemmData )
+
+if( DOWNLOAD_MTX_SPGEMM )
+  MTX_process_files( MTX_SPGEMM_BENCH_files SPGEMM_BENCH_MTX_path )
+endif( )


fixed issue with png and freetype libraries being pulled in by Qt, causing linking errors on ubuntu 18.04

--- cmake/ExternalQt5.cmake
+++ cmake/ExternalQt5.cmake
@@ -113,6 +113,8 @@
             -qt-libpng;
             -qt-libjpeg;
             -qt-freetype;
+            -qt-harfbuzz;
+            -qt-pcre;
             -qt-xcb;
             -qt-xkbcommon;
             -no-directfb;


More descriptive failure message

More descriptive failure message

--- cmake/FindLevelDB.cmake
+++ cmake/FindLevelDB.cmake
@@ -20,7 +20,7 @@
 if (LEVELDB_FOUND)
    message(STATUS "Found LevelDB: ${LEVELDB_LIBRARY} ${LEVELDB_INCLUDE_DIR}")
 else ()
-   message(STATUS "Could not find LevelDB library")
+   message(STATUS "Could not find LevelDB library LIB=${LEVELDB_LIBRARY} INC=${LEVELDB_INCLUDE_DIR}")
 endif ()


Fix search header in FindMsgpack.cmake

Fix search header in FindMsgpack.cmake

- We don't actually need the C++ header, we only
  use the C API

--- cmake/FindMsgpack.cmake
+++ cmake/FindMsgpack.cmake
@@ -1,7 +1,7 @@
 include(CheckLibraryExists)

 find_path(MSGPACK_INCLUDE_DIR
-    NAMES msgpack.hpp
+    NAMES msgpack.h
 )

 find_library(MSGPACK_LIBRARY


Add macro to generate subsystem centric documentation

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -539,26 +539,65 @@
     endforeach(subdir)
 endmacro()

-macro(PCL_DISABLE_DEPENDIES subsys)
-    string(TOUPPER "pcl_${subsys}_dependies" PCL_SUBSYS_DEPENDIES)
+########################################################################################
+# Macro to disable subsystem dependies
+# _subsys IN subsystem name
+macro(PCL_DISABLE_DEPENDIES _subsys)
+    string(TOUPPER "pcl_${_subsys}_dependies" PCL_SUBSYS_DEPENDIES)
     if(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
         foreach(dep ${${PCL_SUBSYS_DEPENDIES}})
-            PCL_SET_SUBSYS_HYPERSTATUS(${subsys} ${dep} AUTO_OFF "Automatically disabled.")
+            PCL_SET_SUBSYS_HYPERSTATUS(${_subsys} ${dep} AUTO_OFF "Automatically disabled.")
             set(BUILD_${dep} OFF CACHE BOOL "Automatically disabled ${dep}" FORCE)
         endforeach(dep)
     endif(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
 endmacro(PCL_DISABLE_DEPENDIES subsys)

-macro(PCL_ENABLE_DEPENDIES subsys)
-    string(TOUPPER "pcl_${subsys}_dependies" PCL_SUBSYS_DEPENDIES)
+########################################################################################
+# Macro to enable subsystem dependies
+# _subsys IN subsystem name
+macro(PCL_ENABLE_DEPENDIES _subsys)
+    string(TOUPPER "pcl_${_subsys}_dependies" PCL_SUBSYS_DEPENDIES)
     if(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
         foreach(dep ${${PCL_SUBSYS_DEPENDIES}})
-            PCL_GET_SUBSYS_HYPERSTATUS(dependee_status ${subsys} ${dep})
+            PCL_GET_SUBSYS_HYPERSTATUS(dependee_status ${_subsys} ${dep})
             if("${dependee_status}" STREQUAL "AUTO_OFF")
-                PCL_SET_SUBSYS_HYPERSTATUS(${subsys} ${dep} AUTO_ON)
+                PCL_SET_SUBSYS_HYPERSTATUS(${_subsys} ${dep} AUTO_ON)
                 GET_IN_MAP(desc PCL_SUBSYS_DESC ${dep})
                 set(BUILD_${dep} ON CACHE BOOL "${desc}" FORCE)
             endif("${dependee_status}" STREQUAL "AUTO_OFF")
         endforeach(dep)
     endif(NOT ("${${PCL_SUBSYS_DEPENDIES}}" STREQUAL ""))
 endmacro(PCL_ENABLE_DEPENDIES subsys)
+
+########################################################################################
+# Macro to build subsystem centric documentation
+# _subsys IN the name of the subsystem to generate documentation for
+macro (PCL_ADD_DOC _subsys)
+  string(TOUPPER "${_subsys}" SUBSYS)
+  set(doc_subsys "doc_${_subsys}")
+  GET_IN_MAP(dependencies PCL_SUBSYS_DEPS ${_subsys})
+  if(DOXYGEN_FOUND)
+    if(HTML_HELP_COMPILER)
+      set(DOCUMENTATION_HTML_HELP YES)
+    else(HTML_HELP_COMPILER)
+      set(DOCUMENTATION_HTML_HELP NO)
+    endif(HTML_HELP_COMPILER)
+    if(NOT "${dependencies}" STREQUAL "")
+      set(STRIPPED_HEADERS "${PCL_SOURCE_DIR}/${dependencies}/include")
+      string(REPLACE ";" "/include \\\n\t\t\t\t\t\t\t\t\t\t\t\t ${PCL_SOURCE_DIR}/"
+             STRIPPED_HEADERS "${STRIPPED_HEADERS}")
+    endif(NOT "${dependencies}" STREQUAL "")
+    set(DOC_SOURCE_DIR "\"${CMAKE_CURRENT_SOURCE_DIR}\"\\")
+    foreach(dep ${dependencies})
+      set(DOC_SOURCE_DIR
+          "${DOC_SOURCE_DIR}\n\t\t\t\t\t\t\t\t\t\t\t\t \"${PCL_SOURCE_DIR}/${dep}\"\\")
+    endforeach(dep)
+    file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html")
+    set(doxyfile "${CMAKE_CURRENT_BINARY_DIR}/doxyfile")
+    configure_file("${PCL_SOURCE_DIR}/doc/doxygen/doxyfile.in" ${doxyfile})
+    add_custom_target(${doc_subsys} ${DOXYGEN_EXECUTABLE} ${doxyfile})
+    # if(USE_PROJECT_FOLDERS)
+    #   set_target_properties(${doc_subsys} PROPERTIES FOLDER "Documentation")
+    # endif(USE_PROJECT_FOLDERS)
+  endif(DOXYGEN_FOUND)
+endmacro(PCL_ADD_DOC)


finally fix windows build by disabling auto-link feature for boost...

--- VAD_Boost.cmake
+++ VAD_Boost.cmake
@@ -7,6 +7,13 @@

 function(vad_live)
   message("run VAD_LIVE for Boost")
+
+  # WARNING very important! disables auto-linking for boost!
+  set(_CFG_PATH "${VAD_EXTERNAL_ROOT}/boost_config/include/boost/config/user.hpp")
+  file(READ ${_CFG_PATH} FILECONTENT)
+  string(REPLACE "// #define BOOST_ALL_NO_LIB" "#define BOOST_ALL_NO_LIB" FILECONTENT ${FILECONTENT})
+  file(WRITE ${_CFG_PATH} ${FILECONTENT})
+

   # required for (all?) others
   vigra_add_dep(boost_config REQUIRED LIVE)


BUG: cmake/SuperBuild: Only propagate svn and git paths if valid values

This commit fixes windows build addressing a regression introduced
in 9dd0c6c (BUG: cmake: Ensure git and svn executable are propagated)

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -56,6 +56,15 @@
     )
 endif()

+set(DCMQI_EP_CMAKE_CACHE_ARGS)
+# XXX Workaround https://gitlab.kitware.com/cmake/cmake/issues/15448
+#     and explicitly pass GIT_EXECUTABLE and Subversion_SVN_EXECUTABLE
+foreach(varname IN ITEMS GIT_EXECUTABLE Subversion_SVN_EXECUTABLE)
+  if(EXISTS "${${varname}}")
+    list(APPEND DCMQI_EP_CMAKE_CACHE_ARGS -D${varname}:FILEPATH=${${varname}})
+  endif()
+endforeach()
+
 ExternalProject_Add(${proj}
   ${${proj}_EP_ARGS}
   DOWNLOAD_COMMAND ""
@@ -68,10 +77,6 @@
     -DCMAKE_CXX_FLAGS_INIT:STRING=${CMAKE_CXX_FLAGS_INIT}
     -DCMAKE_C_FLAGS_INIT:STRING=${CMAKE_C_FLAGS_INIT}
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
-    # XXX Workaround https://gitlab.kitware.com/cmake/cmake/issues/15448
-    #     and explicitly pass GIT_EXECUTABLE and Subversion_SVN_EXECUTABLE
-    -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
-    -DSubversion_SVN_EXECUTABLE:FILEPATH=${Subversion_SVN_EXECUTABLE}
   SOURCE_DIR ${DCMQI_SOURCE_DIR}
   BINARY_DIR ${DCMQI_BINARY_DIR}/${PROJECT_NAME_LC}-build
   PREFIX ${PROJECT_NAME_LC}-prefix


ENH: Reviewed how external project were added.

Optional external project should be added to the CTK-Utilities target
using a variable of the form: <PROJNAME>_DEPENDS

If the project should be build, the variable should contain the name of the project.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -80,6 +80,7 @@
 #       SVN_REPOSITORY "https://pythonqt.svn.sourceforge.net/svnroot/pythonqt/trunk"
 #       CMAKE_GENERATOR ${gen}
 #       PATCH_COMMAND ${CMAKE_COMMAND} -P ${pythonqt_patch_script}
+#       BUILD_COMMAND ""
 #       CMAKE_ARGS
 #         ${ep_common_args}
 #         -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
@@ -108,15 +109,19 @@
 #-----------------------------------------------------------------------------
 # Utilities/ZMQ
 #
-SET(proj ZMQ)
-ExternalProject_Add(${proj}
-    DOWNLOAD_COMMAND ""
-    INSTALL_COMMAND ""
-    CMAKE_GENERATOR ${gen}
-    SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ZMQ
-    CMAKE_ARGS
-      ${ep_common_args}
-    )
+SET (ZMQ_DEPENDS)
+#IF ()
+  SET(proj ZMQ)
+  SET(ZMQ_DEPENDS ${proj})
+  ExternalProject_Add(${proj}
+      DOWNLOAD_COMMAND ""
+      INSTALL_COMMAND ""
+      CMAKE_GENERATOR ${gen}
+      SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ZMQ
+      CMAKE_ARGS
+        ${ep_common_args}
+      )
+#ENDIF()

 #-----------------------------------------------------------------------------
 # QtMobility
@@ -154,29 +159,36 @@
 #-----------------------------------------------------------------------------
 # Utilities/OpenIGTLink
 #
-SET(proj OpenIGTLink)
-ExternalProject_Add(${proj}
-    SVN_REPOSITORY "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink"
-    INSTALL_COMMAND ""
-    CMAKE_GENERATOR ${gen}
-    CMAKE_ARGS
-      ${ep_common_args}
-    )
+SET (OpenIGTLink_DEPENDS)
+#IF ()
+  SET(proj OpenIGTLink)
+  SET(OpenIGTLink_DEPENDS ${proj})
+  ExternalProject_Add(${proj}
+      SVN_REPOSITORY "http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink"
+      INSTALL_COMMAND ""
+      CMAKE_GENERATOR ${gen}
+      CMAKE_ARGS
+        ${ep_common_args}
+      )
+#ENDIF()

 #-----------------------------------------------------------------------------
 # XIP
 #
-# SET(proj XIP)
-# SET(url https://collab01a.scr.siemens.com/svn/xip/releases/latest)
-# ExternalProject_Add(${proj}
-#    DOWNLOAD_COMMAND "${CMAKE_COMMAND} -E ${SVNCOMMAND} checkout ${url} ${ep_source_dir}/${proj} --username=anonymous "
-#    UPDATE_COMMAND ""
-#    #SVN_REPOSITORY "https://anonymous@collab01a.scr.siemens.com/svn/xip/releases/latest"
-#    INSTALL_COMMAND ""
-#    CMAKE_GENERATOR ${gen}
-#    CMAKE_ARGS
-#      ${ep_common_args}
-#    )
+SET (XIP_DEPENDS)
+#IF ()
+#   SET(proj XIP)
+#   SET(XIP_DEPENDS ${proj})
+#   SET(url https://collab01a.scr.siemens.com/svn/xip/releases/latest)
+#   ExternalProject_Add(${proj}
+#     SVN_REPOSITORY "https://collab01a.scr.siemens.com/svn/xip/releases/latest"
+#     SVN_USERNAME "anonymous"
+#     INSTALL_COMMAND ""
+#     CMAKE_GENERATOR ${gen}
+#     CMAKE_ARGS
+#       ${ep_common_args}
+#     )
+#ENDIF()

 #-----------------------------------------------------------------------------
 # CTK Utilities
@@ -188,13 +200,15 @@
   BUILD_COMMAND ""
   INSTALL_COMMAND ""
   DEPENDS
+    # Mandatory dependencies
+    QtMobility
+    # Optionnal dependencies
     ${kwstyle_DEPENDS}
     ${DCMTK_DEPENDS}
     ${PythonQt_DEPENDS}
-    ZMQ
-    OpenIGTLink
-#     XIP
-    QtMobility
+    ${ZMQ_DEPENDS}
+    ${OpenIGTLink_DEPENDS}
+    ${XIP_DEPENDS}
 )

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


FIX: Ensure samples/samples.xml is available in the app bundle.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -290,7 +290,7 @@
         set (_ACTIONCMD ln -sf)
         set (_ACTIONMSG "symlinks to")
     else()
-        set (_ACTIONCMD cp -Rf)
+        set (_ACTIONCMD rsync -r)
         set (_ACTIONMSG "copies of")
     endif()

@@ -330,6 +330,16 @@
     add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
         COMMAND if [ x${_CEGUI_BUILD_CONFIG} == xDebug ]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_SOURCE_DIR}/datafiles \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/\"
         COMMENT "Creating ${_ACTIONMSG} sample datafiles ${_TARGET_NAME}.app")
+
+    # When CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS is TRUE, this
+    # command symlinks from the build dir back into the source dir, which is
+    # not ideal, however under that scenario there is no other option. Do
+    # not whine about it, if you don't want that, then set
+    # CEGUI_APPLE_SYMLINK_DEPENDENCIES_TO_SAMPLE_APPS to false and the thing
+    # will be copied to the output app bundle instead.
+    add_custom_command(TARGET ${_TARGET_NAME} POST_BUILD
+        COMMAND if [ x${_CEGUI_BUILD_CONFIG} == xDebug ]\; then ce_ext=\"${CEGUI_BUILD_SUFFIX}\"\; else ce_ext=\"\"\; fi\; ${_ACTIONCMD} ${CMAKE_BINARY_DIR}/datafiles/samples \"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_TARGET_NAME}$$ce_ext.app/Contents/Resources/datafiles\"
+        COMMENT "Creating ${_ACTIONMSG} samples.xml ${_TARGET_NAME}.app")
 endmacro()

 #


cmake: look up for libfreerdp-core

cmake: look up for libfreerdp-core

--- cmake/FindFreeRDP.cmake
+++ cmake/FindFreeRDP.cmake
@@ -22,7 +22,7 @@
 endmacro()

 set(FREERDP_REQUIRED_LIBRARIES
-  freerdp)
+  freerdp-core)

 find_path(FREERDP_INCLUDE_DIR
           NAMES freerdp.h


Add GIT_FETCH_DEPTH for FindConfigurePackage

--- project/cmake/modules/FindConfigurePackage.cmake
+++ project/cmake/modules/FindConfigurePackage.cmake
@@ -33,6 +33,8 @@
 #     TAR_URL <tar url>
 #     SVN_URL <svn url>
 #     GIT_URL <git url>
+#     GIT_BRANCH <git branch:HEAD>
+#     GIT_FETCH_DEPTH <fetch depth/deepen:100>
 # )
 #
 # ::
@@ -151,7 +153,7 @@
     endif ()
     set(optionArgs BUILD_WITH_CONFIGURE BUILD_WITH_CMAKE BUILD_WITH_SCONS BUILD_WITH_CUSTOM_COMMAND
         CMAKE_INHIRT_BUILD_ENV CMAKE_INHIRT_BUILD_ENV_DISABLE_C_FLAGS CMAKE_INHIRT_BUILD_ENV_DISABLE_CXX_FLAGS CMAKE_INHIRT_BUILD_ENV_DISABLE_ASM_FLAGS)
-    set(oneValueArgs PACKAGE WORKING_DIRECTORY BUILD_DIRECTORY PREFIX_DIRECTORY SRC_DIRECTORY_NAME PROJECT_DIRECTORY MSVC_CONFIGURE ZIP_URL TAR_URL SVN_URL GIT_URL GIT_BRANCH INSTALL_TARGET)
+    set(oneValueArgs PACKAGE WORKING_DIRECTORY BUILD_DIRECTORY PREFIX_DIRECTORY SRC_DIRECTORY_NAME PROJECT_DIRECTORY MSVC_CONFIGURE ZIP_URL TAR_URL SVN_URL GIT_URL GIT_BRANCH GIT_FETCH_DEPTH INSTALL_TARGET)
     set(multiValueArgs CONFIGURE_CMD CONFIGURE_FLAGS CMAKE_FLAGS FIND_PACKAGE_FLAGS RESET_FIND_VARS SCONS_FLAGS MAKE_FLAGS CUSTOM_BUILD_COMMAND PREBUILD_COMMAND AFTERBUILD_COMMAND)
     foreach(RESTORE_VAR IN LISTS optionArgs oneValueArgs multiValueArgs)
         unset(FindConfigurePackage_${RESTORE_VAR})
@@ -236,14 +238,54 @@
                 set(FindConfigurePackage_DOWNLOAD_SOURCE_DIR "${FindConfigurePackage_WORKING_DIRECTORY}/${FindConfigurePackage_SRC_DIRECTORY_NAME}")
                 FindConfigurePackageRemoveEmptyDir(${FindConfigurePackage_DOWNLOAD_SOURCE_DIR})

-                if(NOT EXISTS ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR})
+                if (EXISTS "${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}/.git")
+                    execute_process(
+                        COMMAND ${GIT_EXECUTABLE} ls-files
+                        WORKING_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}
+                        OUTPUT_VARIABLE FindConfigurePackage_GIT_CHECK_REPO
+                    )
+                    string(STRIP "${FindConfigurePackage_GIT_CHECK_REPO}" FindConfigurePackage_GIT_CHECK_REPO)
+                    if (FindConfigurePackage_GIT_CHECK_REPO STREQUAL "")
+                        message(STATUS "${FindConfigurePackage_DOWNLOAD_SOURCE_DIR} is not a valid git reposutory, remove it...")
+                        file(REMOVE_RECURSE ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR})
+                    endif ()
+                    unset(FindConfigurePackage_GIT_CHECK_REPO)
+                endif()
+                if(NOT EXISTS "${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}/.git")
                     find_package(Git)
                     if(GIT_FOUND)
                         if (NOT FindConfigurePackage_GIT_BRANCH)
-                            set(FindConfigurePackage_GIT_BRANCH master)
+                            set(FindConfigurePackage_GIT_BRANCH HEAD)
                         endif()
-                        execute_process(COMMAND ${GIT_EXECUTABLE} clone "--depth=${FindConfigurePackageGitFetchDepth}" -b ${FindConfigurePackage_GIT_BRANCH} ${FindConfigurePackage_GIT_URL} ${FindConfigurePackage_SRC_DIRECTORY_NAME}
-                            WORKING_DIRECTORY ${FindConfigurePackage_WORKING_DIRECTORY}
+                        if(NOT EXISTS ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR})
+                            file(MAKE_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR})
+                        endif()
+                        execute_process(
+                            COMMAND ${GIT_EXECUTABLE} init
+                            WORKING_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}
+                        )
+                        execute_process(
+                            COMMAND ${GIT_EXECUTABLE} remote add origin "${FindConfigurePackage_GIT_URL}"
+                            WORKING_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}
+                        )
+                        if (NOT FindConfigurePackage_GIT_FETCH_DEPTH)
+                            set(FindConfigurePackage_GIT_FETCH_DEPTH ${FindConfigurePackageGitFetchDepth})
+                        endif ()
+                        if (GIT_VERSION_STRING VERSION_GREATER_EQUAL "2.11.0")
+                            execute_process(
+                                COMMAND ${GIT_EXECUTABLE} fetch "--deepen=${FindConfigurePackage_GIT_FETCH_DEPTH}" origin "${FindConfigurePackage_GIT_BRANCH}"
+                                WORKING_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}
+                            )
+                        else()
+                            message(WARNING "It's recommended to use git 2.11.0 or upper to only fetch partly of repository.")
+                            execute_process(
+                                COMMAND ${GIT_EXECUTABLE} fetch origin "${FindConfigurePackage_GIT_BRANCH}"
+                                WORKING_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}
+                            )
+                        endif()
+                        execute_process(
+                            COMMAND ${GIT_EXECUTABLE} reset --hard "${FindConfigurePackage_GIT_BRANCH}"
+                            WORKING_DIRECTORY ${FindConfigurePackage_DOWNLOAD_SOURCE_DIR}
                         )
                     else()
                        message(STATUS "git not found, skip ${FindConfigurePackage_GIT_URL}")