[Numerics] add natural map tests

[Numerics] add natural map tests

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -327,23 +327,31 @@

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Example1_Fc3D_SBM.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Example1_Fc3D_SBM.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Example1_Fc3D_SBM.dat)
+
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC OneObject-i100000-499.hdf5.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB OneObject-i100000-499.hdf5.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM OneObject-i100000-499.hdf5.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Capsules-i100-1090.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Capsules-i100-1090.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Capsules-i100-1090.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Capsules-i101-404.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Capsules-i101-404.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Capsules-i101-404.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Capsules-i103-990.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Capsules-i103-990.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Capsules-i103-990.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Capsules-i122-1617.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Capsules-i122-1617.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Capsules-i122-1617.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Capsules-i100-889.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Capsules-i100-889.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Capsules-i100-889.dat)

   NEW_TEST(FC3Dtest70 fc3d_test70.c) # DSFP
   NEW_TEST(FC3Dtest71 fc3d_test71.c) # DSFP
@@ -393,48 +401,63 @@
   # Global Alart Curnier + Rover ok.
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Example1_Fc3D.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Example1_Fc3D.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Example1_Fc3D.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover1039.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover1039.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover1039.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover1040.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover1040.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover1040.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover1041.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover1041.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover1041.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover3865.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover3865.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover3865.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4144.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4144.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4144.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4396.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4396.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4396.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4493.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4493.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4493.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4516.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4516.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4516.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4609.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4609.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4609.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4613.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4613.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4613.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover4622.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover4622.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover4622.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover9770.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover9770.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover9770.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover11035.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover11035.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover11035.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC Rover11211.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB Rover11211.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM Rover11211.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_ONECONTACT_QUARTIC FrictionContact3D_1c.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_ONECONTACT_QUARTIC FrictionContact3D_RR_1c.dat)
@@ -442,9 +465,11 @@
   # Newton Euler 3D Spheres : some failures with  Alart Curnier
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC NESpheres_10_1.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB NESpheres_10_1.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM NESpheres_10_1.dat)

   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_AC NESpheres_30_1.dat)
   NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_FB NESpheres_30_1.dat)
+  NEW_FC_TEST(SICONOS_FRICTION_3D_NSN_NM NESpheres_30_1.dat)

   ## test from the Rover Example
   NEW_TEST(FC3Dtest501 fc3d_Rover2.c) ## test ok without LineSearch


make installing the markerfile optional (#105)

* make installing the markerfile optional

* correct check for unused args

--- ament_cmake_core/cmake/index/ament_index_register_resource.cmake
+++ ament_cmake_core/cmake/index/ament_index_register_resource.cmake
@@ -31,6 +31,8 @@
 # :type CONTENT_FILE: string
 # :param PACKAGE_NAME: the package name (default: ${PROJECT_NAME})
 # :type PACKAGE_NAME: string
+# :param SKIP_INSTALL: if set skip installing the marker file
+# :type SKIP_INSTALL: option
 #
 # @public
 #
@@ -40,7 +42,7 @@
       "ament_index_register_resource() called without a 'resource_type'")
   endif()

-  cmake_parse_arguments(ARG "" "PACKAGE_NAME;CONTENT_FILE" "CONTENT" ${ARGN})
+  cmake_parse_arguments(ARG "SKIP_INSTALL" "PACKAGE_NAME;CONTENT_FILE" "CONTENT" ${ARGN})
   if(ARG_UNPARSED_ARGUMENTS)
     message(FATAL_ERROR "ament_index_register_resource() called with unused "
       "arguments: ${ARG_UNPARSED_ARGUMENTS}")
@@ -87,8 +89,10 @@
     file(GENERATE OUTPUT "${marker_file}" INPUT "${marker_file}.genexp")
   endif()

-  install(
-    FILES "${marker_file}"
-    DESTINATION "${destination}"
-  )
+  if (NOT ARG_SKIP_INSTALL)
+    install(
+      FILES "${marker_file}"
+      DESTINATION "${destination}"
+    )
+  endif()
 endfunction()


Enable more recent clang-formats

Enable more recent clang-formats

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -23,7 +23,7 @@
     string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CLANG_FORMAT_VERSION ${CLANG_FORMAT_VERSION})
   endif()

-  set(CLANG_FORMAT_VERSION_PATTERN "[67].[0-9]+.[0-9]+")
+  set(CLANG_FORMAT_VERSION_PATTERN "[6789].[0-9]+.[0-9]+")

   if(CLANG_FORMAT AND CLANG_FORMAT_VERSION MATCHES ${CLANG_FORMAT_VERSION_PATTERN})
     add_custom_target("${TARGET}_clangformat"


updated cfitsio cmake script

updated cfitsio cmake script

--- cmake/FindCFitsio.cmake
+++ cmake/FindCFitsio.cmake
@@ -11,15 +11,19 @@
 find_path(CFITSIO_INCLUDE_DIR fitsio.h
     HINTS ${CFITSIO_INC_DIR}
     PATHS
-    /usr/include/cfitsio/
-    /usr/include/
-	"C:\\cfitsio")
+    /usr/include/cfitsio
+    /apps/libs/cfitsio/gnu/3310/include
+    "C:\\cfitsio"
+)

 set(CFITSIO_NAMES cfitsio)

 foreach (lib ${CFITSIO_NAMES})
     find_library(CFITSIO_LIBRARY_${lib} NAMES ${lib}
-        HINTS ${CFITSIO_LIB_DIR} ${CFITSIO_INCLUDE_DIR})
+        HINTS ${CFITSIO_LIB_DIR}
+        PATHS
+        /apps/libs/cfitsio/gnu/3310/lib
+    )
     list(APPEND CFITSIO_LIBRARIES ${CFITSIO_LIBRARY_${lib}})
 endforeach (lib ${CFITSIO_NAMES})


improve FindCholmod

improve FindCholmod

--- cmake/FindCholmod.cmake
+++ cmake/FindCholmod.cmake
@@ -22,9 +22,9 @@
   find_library(AMD_LIBRARY amd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (AMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${AMD_LIBRARY})
-  else (AMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (AMD_LIBRARY)
+  endif ()

 endif(CHOLMOD_LIBRARIES)

@@ -33,9 +33,9 @@
   find_library(COLAMD_LIBRARY colamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (COLAMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${COLAMD_LIBRARY})
-  else (COLAMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (COLAMD_LIBRARY)
+  endif ()

 endif(CHOLMOD_LIBRARIES)

@@ -44,20 +44,29 @@
   find_library(CAMD_LIBRARY camd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (CAMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CAMD_LIBRARY})
-  else (CAMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (CAMD_LIBRARY)
+  endif ()

 endif(CHOLMOD_LIBRARIES)

 if(CHOLMOD_LIBRARIES)

-  find_library(CCOLAMD_LIBRARY colamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
+  find_library(CCOLAMD_LIBRARY ccolamd PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
   if (CCOLAMD_LIBRARY)
     set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CCOLAMD_LIBRARY})
-  else (CCOLAMD_LIBRARY)
+  else ()
     set(CHOLMOD_LIBRARIES FALSE)
-  endif (CCOLAMD_LIBRARY)
+  endif ()
+
+endif(CHOLMOD_LIBRARIES)
+
+if(CHOLMOD_LIBRARIES)
+
+  find_library(CHOLMOD_METIS_LIBRARY metis PATHS ${CHOLMOD_LIBDIR} $ENV{CHOLMODDIR} ${LIB_INSTALL_DIR})
+  if (CHOLMOD_METIS_LIBRARY)
+    set(CHOLMOD_LIBRARIES ${CHOLMOD_LIBRARIES} ${CHOLMOD_METIS_LIBRARY})
+  endif ()

 endif(CHOLMOD_LIBRARIES)


improve FindCholmod

improve FindCholmod


[cmake] fix build with USE_PCH=On on Linux/gcc

The project builds using c++17 standard, so if compile headers with
-std=c++14 compiler complains about "optional" and so on things,
that part of c++17 standard

--- cmake/OmimHelpers.cmake
+++ cmake/OmimHelpers.cmake
@@ -277,8 +277,8 @@
   export_directory_flags("${pch_flags_file}")
   set(compiler_flags "@${pch_flags_file}")

-  # CMAKE_CXX_STANDARD 14 flags:
-  set(c_standard_flags "-std=c++14" "-std=gnu++14")
+  # CMAKE_CXX_STANDARD 17 flags:
+  set(c_standard_flags "-std=c++17")
   get_filename_component(pch_file_name ${header} NAME)

   add_pic_pch_target(${header} ${pch_target_name} ${pch_file_name} lib "-fPIC")


Append NNG_STATIC_LIB macro to tbag target.

--- cmake/TbagModules.cmake
+++ cmake/TbagModules.cmake
@@ -731,6 +731,7 @@
 macro (tbag_modules__apply_ext_nng)
     list (APPEND TBAG_PROJECT_DEPENDENCIES nng)
     list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${nng_EXT_INCLUDE_DIR})
+    list (APPEND TBAG_PROJECT_DEFINITIONS NNG_STATIC_LIB)
     tbag_modules__add_whole_archive (${nng_EXT_STATIC_LIB})
 endmacro ()


We need multiple component specifications in install command

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -94,10 +94,9 @@
         SOVERSION ${PCL_MAJOR_VERSION}
         DEFINE_SYMBOL "PCLAPI_EXPORTS")
     install(TARGETS ${_name}
-        RUNTIME DESTINATION ${BIN_INSTALL_DIR}
-        LIBRARY DESTINATION ${LIB_INSTALL_DIR}
-        ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
-        COMPONENT ${_component})
+        RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT ${_component}
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component}
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
 endmacro(PCL_ADD_LIBRARY)


this updates findCOIN to match findCOIN in the cyclopts repository. It helps add options for specifying nonstandard build locations.

--- src/CMake/FindCOIN.cmake
+++ src/CMake/FindCOIN.cmake
@@ -1,8 +1,16 @@
 # modeled after FindCOIN.cmake in the lemon project
+
+IF(NOT DEFINED COIN_ROOT_DIR)
+    SET(COIN_ROOT_DIR "$ENV{COIN_ROOT_DIR}")
+ENDIF(NOT DEFINED COIN_ROOT_DIR)
+
+MESSAGE(STATUS "COIN_ROOT_DIR hint is : ${COIN_ROOT_DIR}")

 # if installed in a non-standard location,
 # the include directory must be added to the PATH variable
 FIND_PATH(COIN_INCLUDE_DIR coin/CbcModel.hpp
+  HINTS "${COIN_INCLUDE_DIR}"
+  HINTS "${COIN_ROOT_DIR}/include"
   HINTS /usr/
   HINTS /usr/include/
   HINTS /usr/local/
@@ -19,61 +27,71 @@

 FIND_LIBRARY(COIN_CBC_LIBRARY
   NAMES Cbc libCbc
-  HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_INCLUDE_DIR}/../../lib/"
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN CBC: ${COIN_CBC_LIBRARY}")

 FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
   NAMES CbcSolver libCbcSolver
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN CBC solver: ${COIN_CBC_SOLVER_LIBRARY}")

 FIND_LIBRARY(COIN_CGL_LIBRARY
   NAMES Cgl libCgl
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN CGL: ${COIN_CGL_LIBRARY}")

 FIND_LIBRARY(COIN_CLP_LIBRARY
   NAMES Clp libClp
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN CLP: ${COIN_CLP_LIBRARY}")

 FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
   NAMES CoinUtils libCoinUtils
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN UTILS: ${COIN_COIN_UTILS_LIBRARY}")

 FIND_LIBRARY(COIN_OSI_LIBRARY
   NAMES Osi libOsi
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN OSI: ${COIN_OSI_LIBRARY}")

 FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
   NAMES OsiCbc libOsiCbc
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN OSI CBC: ${COIN_OSI_CBC_LIBRARY}")

 FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
   NAMES OsiClp libOsiClp
   HINTS ${COIN_INCLUDE_DIR}/../../lib/
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN OSI CLP: ${COIN_OSI_CLP_LIBRARY}")

 FIND_LIBRARY(COIN_ZLIB_LIBRARY
   NAMES z libz
   HINTS ${COIN_ROOT_DIR}/lib
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 #MESSAGE("\tCOIN ZLIP: ${COIN_ZLIB_LIBRARY}")

 FIND_LIBRARY(COIN_BZ2_LIBRARY
- NAMES bz2 libz2
- HINTS ${COIN_ROOT_DIR}/lib
+  NAMES bz2 libz2
+  HINTS ${COIN_ROOT_DIR}/lib
+  HINTS "${COIN_ROOT_DIR}/lib"
 )
 # #MESSAGE("\tCOIN BZ2: ${COIN_BZ2_LIBRARY}")

@@ -110,4 +128,4 @@
   MESSAGE("\tFound COIN Include Dirs: ${COIN_INCLUDE_DIRS}")
 ELSE(COIN_INCLUDE_DIRS)
   MESSAGE("\tCOIN Include Dirs NOT FOUND")
-ENDIF(COIN_INCLUDE_DIRS)+ENDIF(COIN_INCLUDE_DIRS)


erge branch 'develop' of https://github.com/yiskylee/NICE into Multiply

--- cpp/cmake/check.cmake
+++ cpp/cmake/check.cmake
@@ -1,6 +1,6 @@
 file(GLOB_RECURSE ALL_SOURCE_FILES
     RELATIVE ${CMAKE_SOURCE_DIR}
-    src/*.cc include/*.h)
+    src/*.cc include/*.h test/*.cc)

 find_package(PythonInterp)
 if(NOT PYTHONINTERP_FOUND)


[Fix] 修正Clang的编译参数 [Del] 去除不必要的CMake flags

--- binding/cmake/flags.cmake
+++ binding/cmake/flags.cmake
@@ -46,6 +46,6 @@
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Ofast")

-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-exceptions -fno-rtti -Wno-missing-braces")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-missing-braces")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast")
 endif()


Use "--trace-children=yes" option for MemCheck(valgrind) to handle leantests shell script

--- src/CTestConfig.cmake
+++ src/CTestConfig.cmake
@@ -9,10 +9,10 @@
 set(CTEST_PROJECT_NAME "Lean")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

-#set(CTEST_DROP_METHOD "http")
-#set(CTEST_DROP_SITE "my.cdash.org")
-#set(CTEST_DROP_LOCATION "/submit.php?project=Lean")
-#set(CTEST_DROP_SITE_CDASH TRUE)
+# Specify MEMCHECK Option.
+# Note: We use "--trace-children=yes" to valgrind-ise child processes (follow execve)
+SET (VALGRIND_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes")
+SET (CTEST_MEMORYCHECK_COMMAND_OPTIONS "-q --tool=memcheck --leak-check=yes --show-reachable=yes --workaround-gcc296-bugs=yes --num-callers=50 --trace-children=yes")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "cmacslab2.modck.cs.cmu.edu")


Fix the error of 'americano_python target does not exist'.

--- cmake/TbagModule/TbagObjectProtobufPython.cmake
+++ cmake/TbagModule/TbagObjectProtobufPython.cmake
@@ -13,6 +13,6 @@
     string (MD5 __proto_srcs_hash "${__proto_srcs}")
     set (__protobuf_python_target_name "${TBAG_PROJECT_CONST_NAME}_protobuf_python_${__proto_srcs_hash}")
     add_custom_target ("${__protobuf_python_target_name}" ALL DEPENDS ${__proto_srcs})
-    list (APPEND TBAG_OBJECT_DEPENDENCIES ${TBAG_PROJECT_CONST_NAME}_python)
+    list (APPEND TBAG_OBJECT_DEPENDENCIES "${__protobuf_python_target_name}")
 endif ()


Generalize the concept of dashboard script option passed from ctest cmd line

All dashboard options set using the macro "setIfNotDefined"
can now be passed from the ctest command line.

The syntax to pass option from the command line while invoking ctest is
the following:
    ctest -S /path/to/script.cmake,OPTNAME1##OPTVALUE1^^OPTNAME2##OPTVALUE2

Example:
    ctest -S /path/to/script.cmake,SCRIPT_MODE##continuous^^GIT_TAG##next

--- CMake/VisomicsDashboardScript.TEMPLATE.cmake
+++ CMake/VisomicsDashboardScript.TEMPLATE.cmake
@@ -18,19 +18,6 @@
 #
 # For additional information, see https://www.kitware.com/Omics/index.php/Main_Page#Dashboard_setup
 #
-
-#-----------------------------------------------------------------------------
-# Attempt to extract configuration passed from command line
-#-----------------------------------------------------------------------------
-# Note: The syntax to pass option from the command line while invoking ctest is
-#       the following: ctest -S /path/to/script.cmake,<SCRIPT_MODE>\;<GIT_TAG>
-#       where <SCRIPT_MODE> is either "experimental", "continuous" or "nightly"
-#       and <GIT_TAG> is either 'master' or 'next'
-if(NOT CTEST_SCRIPT_ARG STREQUAL "")
-  set(CTEST_SCRIPT_ARG_AS_LIST ${CTEST_SCRIPT_ARG})
-  list(GET CTEST_SCRIPT_ARG_AS_LIST 0 SCRIPT_MODE)
-  list(GET CTEST_SCRIPT_ARG_AS_LIST 1 GIT_TAG)
-endif()

 #-----------------------------------------------------------------------------
 # Dashboard properties
@@ -47,17 +34,45 @@
 set(CTEST_CMAKE_GENERATOR "Unix Makefiles")

 #-----------------------------------------------------------------------------
+# Attempt to extract dashboard option passed from command line
+#-----------------------------------------------------------------------------
+# Note: The syntax to pass option from the command line while invoking ctest is
+#       the following: ctest -S /path/to/script.cmake,OPTNAME1##OPTVALUE1^^OPTNAME2##OPTVALUE2
+#
+# Example:
+#       ctest -S /path/to/script.cmake,SCRIPT_MODE##continuous^^GIT_TAG##next
+#
+if(NOT CTEST_SCRIPT_ARG STREQUAL "")
+  string(REPLACE "^^" "\\;" CTEST_SCRIPT_ARG_AS_LIST ${CTEST_SCRIPT_ARG})
+  set(CTEST_SCRIPT_ARG_AS_LIST ${CTEST_SCRIPT_ARG_AS_LIST})
+  foreach(argn_argv ${CTEST_SCRIPT_ARG_AS_LIST})
+    string(REPLACE "##" "\\;" argn_argv_list ${argn_argv})
+    set(argn_argv_list ${argn_argv_list})
+    list(GET argn_argv_list 0 argn)
+    list(GET argn_argv_list 1 argv)
+    set(${argn} ${argv})
+  endforeach()
+endif()
+
+# Macro allowing to set a variable to its default value only if not already defined
+macro(setIfNotDefined var defaultvalue)
+  if(NOT DEFINED ${var})
+    set(${var} "${defaultvalue}")
+  endif()
+endmacro()
+
+#-----------------------------------------------------------------------------
 # Dashboard options
 #-----------------------------------------------------------------------------
-set(WITH_KWSTYLE FALSE)
-set(WITH_MEMCHECK FALSE)
-set(WITH_COVERAGE FALSE)
-set(WITH_DOCUMENTATION FALSE)
-#set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
-set(WITH_PACKAGES FALSE)
-set(CTEST_BUILD_CONFIGURATION "Release") # Release or Debug
-set(CTEST_TEST_TIMEOUT 100)
-set(CTEST_BUILD_FLAGS "") # Use multiple CPU cores to build. For example "-j4" on unix
+setIfNotDefined(WITH_KWSTYLE FALSE)
+setIfNotDefined(WITH_MEMCHECK FALSE)
+setIfNotDefined(WITH_COVERAGE FALSE)
+setIfNotDefined(WITH_DOCUMENTATION FALSE)
+set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
+setIfNotDefined(WITH_PACKAGES FALSE)
+setIfNotDefined(CTEST_BUILD_CONFIGURATION "Release") # Release or Debug
+setIfNotDefined(CTEST_TEST_TIMEOUT 100)
+setIfNotDefined(CTEST_BUILD_FLAGS "") # Use multiple CPU cores to build. For example "-j4" on unix

 # experimental:
 #     - run_ctest() macro will be called *ONE* time
@@ -69,9 +84,7 @@
 # nightly:
 #     - run_ctest() macro will be called *ONE* time
 #     - binary directory *WILL BE* cleaned
-if(NOT DEFINED SCRIPT_MODE)
-  set(SCRIPT_MODE "nightly") # "experimental", "continuous", "nightly"
-endif()
+setIfNotDefined(SCRIPT_MODE "nightly") # "experimental", "continuous", "nightly"

 # You could invoke the script with the following syntax:
 #  ctest -S karakoram_Visomics_nightly.cmake -C <CTEST_BUILD_CONFIGURATION> -V
@@ -112,14 +125,12 @@
 #-----------------------------------------------------------------------------
 # Git tag - Should be pecified without the prefix 'origin/'
 #-----------------------------------------------------------------------------
-if(NOT DEFINED GIT_TAG)
-  set(GIT_TAG "master") # master, next, ...
-endif()
+setIfNotDefined(GIT_TAG "master") # master, next, ...

 #-----------------------------------------------------------------------------
 # Git repository
 #-----------------------------------------------------------------------------
-set(GIT_REPOSITORY git://kwsource.kitwarein.com/bioinformatics/visomics.git)
+setIfNotDefined(GIT_REPOSITORY git://kwsource.kitwarein.com/bioinformatics/visomics.git)
 # OR
 #set(GIT_REPOSITORY git://kwsource.kitwarein.com/~<YOURUSERNAME>/bioinformatics/<YOURUSERNAME>s-visomics.git)

@@ -128,7 +139,7 @@
 #-----------------------------------------------------------------------------
 # Note: If you have multiple dashboard scripts checking out different GIT TAG and/or REPOSITORY
 #       Make sure you append a suffix to the source directory to differentate them.
-set(BUILD_OPTIONS_STRING "Qt4.7-R-2.11.1-${GIT_TAG}")
+setIfNotDefined(BUILD_OPTIONS_STRING "Qt4.7-R-2.11.1-${GIT_TAG}")

 #-----------------------------------------------------------------------------
 # Build directory


Update Mosaic Remote Module GIT_TAG

Update Mosaic Remote Module GIT_TAG

--- Modules/Remote/Mosaic.remote.cmake
+++ Modules/Remote/Mosaic.remote.cmake
@@ -5,5 +5,5 @@
 https://github.com/remicres/otb-mosaic
 "
   GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
-  GIT_TAG 64cb06798fb237e10f929c1adaab37441e09fbc3
+  GIT_TAG 9a8cdd63ed3bba500bb4ea3867abc38bce8be562
 )


Update FindJulia

Update FindJulia

--- test/FindJulia.cmake
+++ test/FindJulia.cmake
@@ -7,17 +7,29 @@
 # Julia Executable #
 ####################

-find_program(Julia_EXECUTABLE julia DOC "Julia executable")
-MESSAGE(STATUS "Julia_EXECUTABLE:     ${Julia_EXECUTABLE}")
+if(Julia_PREFIX)
+    message(STATUS "Adding path ${Julia_PREFIX} to search path")
+    list(APPEND CMAKE_PREFIX_PATH ${Julia_PREFIX})
+    message(STATUS "THIS BRANCH")
+else()
+    find_program(Julia_EXECUTABLE julia DOC "Julia executable")
+    message(STATUS "Found Julia executable: " ${Julia_EXECUTABLE})
+endif()

 #################
 # Julia Version #
 #################

-execute_process(
-    COMMAND "${Julia_EXECUTABLE}" --startup-file=no --version
-    OUTPUT_VARIABLE Julia_VERSION_STRING
-)
+if(Julia_EXECUTABLE)
+    execute_process(
+        COMMAND "${Julia_EXECUTABLE}" --startup-file=no --version
+        OUTPUT_VARIABLE Julia_VERSION_STRING
+    )
+else()
+    find_file(Julia_VERSION_INCLUDE julia_version.h PATH_SUFFIXES include/julia)
+    file(READ ${Julia_VERSION_INCLUDE} Julia_VERSION_STRING)
+    string(REGEX MATCH "JULIA_VERSION_STRING.*" Julia_VERSION_STRING ${Julia_VERSION_STRING})
+endif()

 string(
     REGEX REPLACE ".*([0-9]+\\.[0-9]+\\.[0-9]+).*" "\\1"
@@ -30,14 +42,21 @@
 # Julia Includes #
 ##################

+set(JULIA_HOME_NAME "Sys.BINDIR")
+if(${Julia_VERSION_STRING} VERSION_LESS "0.7.0")
+    set(JULIA_HOME_NAME "JULIA_HOME")
+else()
+    set(USING_LIBDL "using Libdl")
+endif()
+
 if(DEFINED ENV{JULIA_INCLUDE_DIRS})
     set(Julia_INCLUDE_DIRS $ENV{JULIA_INCLUDE_DIRS}
         CACHE STRING "Location of Julia include files")
-else()
+elseif(Julia_EXECUTABLE)
     execute_process(
-        COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "julia_include_dir = joinpath(match(r\"(.*)(bin)\",JULIA_HOME).captures[1],\"include\",\"julia\")\n
+        COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "julia_include_dir = joinpath(match(r\"(.*)(bin)\",${JULIA_HOME_NAME}).captures[1],\"include\",\"julia\")\n
             if !isdir(julia_include_dir)  # then we're running directly from build\n
-            julia_base_dir_aux = splitdir(splitdir(JULIA_HOME)[1])[1]  # useful for running-from-build\n
+            julia_base_dir_aux = splitdir(splitdir(${JULIA_HOME_NAME})[1])[1]  # useful for running-from-build\n
             julia_include_dir = joinpath(julia_base_dir_aux, \"usr\", \"include\" )\n
             julia_include_dir *= \";\" * joinpath(julia_base_dir_aux, \"src\", \"support\" )\n
             julia_include_dir *= \";\" * joinpath(julia_base_dir_aux, \"src\" )\n
@@ -50,6 +69,8 @@
     string(REGEX REPLACE "\n" "" Julia_INCLUDE_DIRS "${Julia_INCLUDE_DIRS}")
     set(Julia_INCLUDE_DIRS ${Julia_INCLUDE_DIRS}
         CACHE PATH "Location of Julia include files")
+elseif(Julia_PREFIX)
+    set(Julia_INCLUDE_DIRS ${Julia_PREFIX}/include/julia)
 endif()
 MESSAGE(STATUS "Julia_INCLUDE_DIRS:   ${Julia_INCLUDE_DIRS}")

@@ -57,31 +78,36 @@
 # Julia Libraries #
 ###################

-execute_process(
-    COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "abspath(dirname(Libdl.dlpath(\"libjulia\")))"
-    OUTPUT_VARIABLE Julia_LIBRARY_DIR
-)
+if(Julia_EXECUTABLE)
+    execute_process(
+        COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "${USING_LIBDL}\nabspath(dirname(Libdl.dlpath(\"libjulia\")))"
+        OUTPUT_VARIABLE Julia_LIBRARY_DIR
+    )

-string(REGEX REPLACE "\"" "" Julia_LIBRARY_DIR "${Julia_LIBRARY_DIR}")
-string(REGEX REPLACE "\n" "" Julia_LIBRARY_DIR "${Julia_LIBRARY_DIR}")
+    string(REGEX REPLACE "\"" "" Julia_LIBRARY_DIR "${Julia_LIBRARY_DIR}")
+    string(REGEX REPLACE "\n" "" Julia_LIBRARY_DIR "${Julia_LIBRARY_DIR}")

-string(STRIP "${Julia_LIBRARY_DIR}" Julia_LIBRARY_DIR)
-set(Julia_LIBRARY_DIR "${Julia_LIBRARY_DIR}"
-    CACHE PATH "Julia library directory")
+    string(STRIP "${Julia_LIBRARY_DIR}" Julia_LIBRARY_DIR)
+    set(Julia_LIBRARY_DIR "${Julia_LIBRARY_DIR}"
+        CACHE PATH "Julia library directory")

-if(WIN32)
-    set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .a)
-    find_library(Julia_LIBRARY
-        NAMES libjulia.dll.a
-        PATHS ${Julia_LIBRARY_DIR}//..//lib
-        NO_DEFAULT_PATH
-    )
+    if(WIN32)
+        set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES} .a)
+        find_library(Julia_LIBRARY
+            NAMES libjulia.dll.a
+            PATHS ${Julia_LIBRARY_DIR}//..//lib
+            NO_DEFAULT_PATH
+        )
+    else()
+        find_library(Julia_LIBRARY
+            NAMES julia libjulia
+            PATHS ${Julia_LIBRARY_DIR}
+            NO_DEFAULT_PATH
+        )
+    endif()
 else()
-    find_library(Julia_LIBRARY
-        NAMES julia libjulia
-        PATHS ${Julia_LIBRARY_DIR}
-        NO_DEFAULT_PATH
-    )
+    find_library(Julia_LIBRARY NAMES libjulia.${Julia_VERSION_STRING}.dylib julia libjulia libjulia.dll.a CMAKE_FIND_ROOT_PATH_BOTH)
+    get_filename_component(Julia_LIBRARY_DIR ${Julia_LIBRARY} DIRECTORY)
 endif()

 MESSAGE(STATUS "Julia_LIBRARY_DIR:    ${Julia_LIBRARY_DIR}")
@@ -91,27 +117,31 @@
 # JULIA_HOME #
 ##############

-execute_process(
-    COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "JULIA_HOME"
-    OUTPUT_VARIABLE JULIA_HOME
-)
+if(Julia_EXECUTABLE)
+    execute_process(
+        COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "${JULIA_HOME_NAME}"
+        OUTPUT_VARIABLE JULIA_HOME
+    )

-string(REGEX REPLACE "\"" "" JULIA_HOME "${JULIA_HOME}")
-string(REGEX REPLACE "\n" "" JULIA_HOME "${JULIA_HOME}")
+    string(REGEX REPLACE "\"" "" JULIA_HOME "${JULIA_HOME}")
+    string(REGEX REPLACE "\n" "" JULIA_HOME "${JULIA_HOME}")

-MESSAGE(STATUS "JULIA_HOME:           ${JULIA_HOME}")
+    MESSAGE(STATUS "JULIA_HOME:           ${JULIA_HOME}")

 ###################
 # libLLVM version #
 ###################

-execute_process(
-    COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "Base.libllvm_version"
-    OUTPUT_VARIABLE Julia_LLVM_VERSION
-)
+    execute_process(
+        COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "Base.libllvm_version"
+        OUTPUT_VARIABLE Julia_LLVM_VERSION
+    )

-string(REGEX REPLACE "\"" "" Julia_LLVM_VERSION "${Julia_LLVM_VERSION}")
-string(REGEX REPLACE "\n" "" Julia_LLVM_VERSION "${Julia_LLVM_VERSION}")
+    string(REGEX REPLACE "\"" "" Julia_LLVM_VERSION "${Julia_LLVM_VERSION}")
+    string(REGEX REPLACE "\n" "" Julia_LLVM_VERSION "${Julia_LLVM_VERSION}")
+
+    MESSAGE(STATUS "Julia_LLVM_VERSION:   ${Julia_LLVM_VERSION}")
+endif()

 ##################################
 # Check for Existence of Headers #
@@ -119,7 +149,18 @@

 find_path(Julia_MAIN_HEADER julia.h HINTS ${Julia_INCLUDE_DIRS})

-MESSAGE(STATUS "Julia_LLVM_VERSION:   ${Julia_LLVM_VERSION}")
+#######################################
+# Determine if we are on 32 or 64 bit #
+#######################################
+
+if(Julia_EXECUTABLE)
+    execute_process(
+        COMMAND ${Julia_EXECUTABLE} --startup-file=no -E "Sys.WORD_SIZE"
+        OUTPUT_VARIABLE Julia_WORD_SIZE
+    )
+    string(REGEX REPLACE "\n" "" Julia_WORD_SIZE "${Julia_WORD_SIZE}")
+    MESSAGE(STATUS "Julia_WORD_SIZE:      ${Julia_WORD_SIZE}")
+endif()

 ###########################
 # FindPackage Boilerplate #


Python package lookup can install specific version of package

--- scripts/PythonPackageLookup.cmake
+++ scripts/PythonPackageLookup.cmake
@@ -35,8 +35,10 @@
         set(lpp_PATH "${EXTERNAL_ROOT}/python")
     endif()
     set(arguments "")
+    set(package_install_name "${package}")
     if(lpp_VERSION)
         set(arguments "${arguments} VERSION ${lpp_VERSION}")
+        set(package_install_name "${package}==${lpp_VERSION}")
     endif()
     if(lpp_QUIET)
         set(arguments "${arguments} QUIET")
@@ -76,7 +78,7 @@
         "from sys import path, exit\n"
         "path.append('${lpp_PATH}')\n"
         "from setuptools.command.easy_install import main as install\n"
-        "result = install(['--install-dir', '${lpp_PATH}', '${package}'])\n"
+        "result = install(['--install-dir', '${lpp_PATH}', '${package_install_name}'])\n"
         "exit(0 if result == True or result is None else 1)\n"
     )
     execute_process(


Updated XLink library

Updated XLink library

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4-master"
-    URL "https://github.com/luxonis/XLink/archive/7bad147f6d45960d79b545d5575cc1a72fc85c5e.tar.gz"
-    SHA1 "76dc0b131cdb821fedc8fa94400ba49a41d8e8d3"
+    URL "https://github.com/luxonis/XLink/archive/38393eaa77c84bbb2d124a9b2bcb26ea3b106ba7.tar.gz"
+    SHA1 "1b6902a099947ff7c32a5519f7e8deec071fe83f"
 )

 hunter_config(


install paths for OSX set up correctly using GNUInstallDirs; updates #153

--- cmake/InstallConfig.cmake
+++ cmake/InstallConfig.cmake
@@ -14,6 +14,17 @@
     message(STATUS "Installation directories for Linux: ")

     set(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}-${PROJECT_VERSION})
+
+elseif(CMAKE_SYSTEM_NAME MATCHES Darwin)
+
+  # --- if we are building on MacOSX ----
+  # on OSX we can also use GNUInstallDirs module to
+  # determine the installation paths
+  include(GNUInstallDirs)
+  message(STATUS "==============================================================")
+  message(STATUS "Installation directories for MacOSX: ")
+
+  set(CMAKE_INSTALL_DOCDIR ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}-${PROJECT_VERSION})

 elseif(CMAKE_SYSTEM_NAME MATCHES Windows)


Add specific linkers for MacOSPlatform

Add specific linkers for MacOSPlatform

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -30,5 +30,8 @@
 set(DEFAULT_COMPILE_DEFS_DEBUG   ${MACOS_COMPILE_DEFS} _DEBUG) # Debug build
 set(DEFAULT_COMPILE_DEFS_RELEASE ${MACOS_COMPILE_DEFS} NDEBUG) # Release build

+set(MACOS_LINKER_FLAGS "-framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo")
+set(DEFAULT_LINKER_FLAGS_RELEASE ${MACOS_LINKER_FLAGS})
+
 set(MACOS_COMPILE_FLAGS)
 set(DEFAULT_COMPILE_FLAGS ${MACOS_COMPILE_FLAGS})


CMake: Force inclusion of exported functions in `add_sapi_library()`

Newer versions of the GNU gold linkers sometimes omit the symbols for
sandboxed functions, leading to errors like `function not found` when
Sandboxed API tries to call them at runtime.

The fix is simple: Do what Bazel does and wrap the static library in
a `-Wl,--whole-archive`/`-Wl,--no-whole-archive` pair.

PiperOrigin-RevId: 426910732
Change-Id: Id4183f2964a2dea4fc1dfd8c409bc0b1af9db170

--- cmake/SapiBuildDefs.cmake
+++ cmake/SapiBuildDefs.cmake
@@ -100,8 +100,7 @@
     list(APPEND _sapi_exported_funcs "LINKER:--export-dynamic-symbol,${func}")
   endforeach()
   if(NOT _sapi_exported_funcs)
-    set(_sapi_exported_funcs LINKER:--whole-archive
-                             LINKER:--allow-multiple-definition)
+    set(_sapi_exported_funcs LINKER:--allow-multiple-definition)
   endif()

   # The sandboxed binary
@@ -112,7 +111,7 @@
   add_executable("${_sapi_bin}" "${_sapi_force_cxx_linkage}")
   target_link_libraries("${_sapi_bin}" PRIVATE
     -fuse-ld=gold
-    "${_sapi_LIBRARY}"
+    -Wl,--whole-archive "${_sapi_LIBRARY}" -Wl,--no-whole-archive
     sapi::client
     ${CMAKE_DL_LIBS}
   )


Don't download repository if we don't need to.

Deals with corner cases involving USE_EXISTING_VER.

--- CPM.cmake
+++ CPM.cmake
@@ -756,6 +756,11 @@
         set(${parentVar} ${CPM_KV_MOD_VERSION_MAP_${__CPM_TMP_VAR}})
       endif()
       set(__CPM_TMP_VAR)
+    #elseif(DEFINED _CPM_SOURCE_DIR)
+      # TODO: Make case for this when ghost repository is set.
+      # I'm not sure there is much more to this case...
+      # The system will generate a unique ID from our ghost data and realize
+      # that our component has already been included and use that instead.
     endif()
   endif()

@@ -1108,9 +1113,6 @@
   # Check to see if the source is stored locally.
   if (DEFINED _CPM_SOURCE_DIR)
     get_filename_component(tmp_src_dir ${_CPM_SOURCE_DIR} ABSOLUTE)
-    if ((DEFINED _CPM_USE_EXISTING_VER) AND (_CPM_USE_EXISTING_VER))
-      message(FATAL_ERROR "CPM does not allow you to use existing versions if you use SOURCE_DIR.")
-    endif()

     if (DEFINED _CPM_SOURCE_GHOST_GIT_REPO)
       set (source_ghost_tag)
@@ -1147,13 +1149,17 @@

   if (__CPM_USING_GIT)
     set(__CPM_MODULE_SOURCE_DIR "${__CPM_BASE_MODULE_DIR}/${__CPM_FULL_UNID}/src")
-    # Download the code if it doesn't already exist. Otherwise make sure
-    # the code is updated (on the latest branch or tag).
-    CPM_EnsureRepoIsCurrent(
-      TARGET_DIR      ${__CPM_MODULE_SOURCE_DIR}
-      GIT_REPOSITORY  ${_CPM_GIT_REPOSITORY}
-      GIT_TAG         ${__CPM_NEW_GIT_TAG}
-      )
+    # Do not attempt to download the source if we have already processed
+    # this unique ID. This is for a corner case involving USE_EXISTING_VER.
+    if (NOT DEFINED CPM_KV_SOURCE_ADDED_MAP_${__CPM_FULL_UNID})
+      # Download the code if it doesn't already exist. Otherwise make sure
+      # the code is updated (on the latest branch or tag).
+      CPM_EnsureRepoIsCurrent(
+        TARGET_DIR      ${__CPM_MODULE_SOURCE_DIR}
+        GIT_REPOSITORY  ${_CPM_GIT_REPOSITORY}
+        GIT_TAG         ${__CPM_NEW_GIT_TAG}
+        )
+    endif()
   endif(__CPM_USING_GIT)

   # Both of the following Key/Value maps use PARENT_SCOPE directly and do


Updated Data Repository

Updated Data Repository

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

 if(BUILD_TESTING)
-  set(revision_tag 403cc83b)
+  set(revision_tag b89a01b5)
 #                 ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


COMP Updated MITK-Data for os x overlay test

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

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

   ExternalProject_Add(${proj}


libssh: Fix the replace order to derive libssh path

In order to derive the library path to include for libssh from the .so
file path, fix the replace order, otherwise you end up with an extra
"/lib" in the path and the build will not be able to find the libssh.

--- CMakeModules/FindLibSSH.cmake
+++ CMakeModules/FindLibSSH.cmake
@@ -70,11 +70,11 @@
   )

   if (SSH_FOUND)
-    string(REPLACE "ssh.so" ""
+    string(REPLACE "libssh.so" ""
       LIBSSH_LIBRARY_DIR
       ${SSH_LIBRARY}
     )
-    string(REPLACE "libssh.so" ""
+    string(REPLACE "ssh.so" ""
       LIBSSH_LIBRARY_DIR
       ${LIBSSH_LIBRARY_DIR}
     )


Minor fix

Minor fix

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

--- Findlibgps.cmake
+++ Findlibgps.cmake
@@ -10,12 +10,10 @@

 FIND_LIBRARY(libgps_LIBRARIES gps)

-IF( NOT libgps_LIBRARIES)
-    MESSAGE(STATUS "Not building with Gpsd Support")
-ENDIF( NOT libgps_LIBRARIES)
-
 IF (libgps_LIBRARIES AND libgps_INCLUDES)
    SET(libgps_FOUND TRUE)
+ELSE(libgps_LIBRARIES AND libgps_INCLUDES)
+    MESSAGE(STATUS "Not building with Gpsd Support")
 ENDIF (libgps_LIBRARIES AND libgps_INCLUDES)

 IF (libgps_FOUND)


Relax git requirement (for launchpad)

Relax git requirement (for launchpad)

--- GitTargets.cmake
+++ GitTargets.cmake
@@ -1,7 +1,10 @@
 # Copyright (c) 2012 Stefan.Eilemann@epfl.ch
 # See doc/GitTargets.md for documentation

-find_package(Git REQUIRED)
+find_package(Git)
+if(NOT GIT_EXECUTABLE)
+  return()
+endif()

 math(EXPR _gittargets_ODD_MINOR "${VERSION_MINOR} % 2")
 if(_gittargets_ODD_MINOR)


CI: disable openMP

CI: disable openMP

--- CI/configure_option.cmake
+++ CI/configure_option.cmake
@@ -45,7 +45,7 @@
 OTB_USE_MUPARSERX:BOOL=ON
 OTB_USE_OPENCV:BOOL=ON
 OTB_USE_OPENGL:BOOL=ON
-OTB_USE_OPENMP:BOOL=ON
+OTB_USE_OPENMP:BOOL=OFF
 OTB_USE_QT:BOOL=ON
 OTB_USE_QWT:BOOL=ON
 OTB_USE_SHARK:BOOL=ON


fix a few COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH issues

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -1054,8 +1054,8 @@
 function (cotire_scan_includes _includesVar)
 	set(_options "")
 	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_VERSION INCLUDE_SYSTEM_FLAG LANGUAGE UNPARSED_LINES)
-	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS,
-		INCLUDE_PRIORITY_PATH)
+	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES
+		IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	set (_sourceFiles ${_option_UNPARSED_ARGUMENTS})
 	if (NOT _option_LANGUAGE)
@@ -1105,7 +1105,6 @@
 		"${_option_IGNORE_EXTENSIONS}"
 		_includes _unparsedLines
 		${_sourceFiles})
-
 	if (_option_INCLUDE_PRIORITY_PATH)
 		set (_sortedIncludes "")
 		foreach (_priorityPath ${_option_INCLUDE_PRIORITY_PATH})
@@ -1116,10 +1115,11 @@
 				endif()
 			endforeach()
 		endforeach()
-		list (INSERT _includes 0 "${_sortedIncludes}")
-		list (REMOVE_DUPLICATES _includes)
-	endif()
-
+		if (_sortedIncludes)
+			list (INSERT _includes 0 ${_sortedIncludes})
+			list (REMOVE_DUPLICATES _includes)
+		endif()
+	endif()
 	set (${_includesVar} ${_includes} PARENT_SCOPE)
 	if (_option_UNPARSED_LINES)
 		set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE)
@@ -1271,8 +1271,8 @@
 	set(_options "")
 	set(_oneValueArgs LANGUAGE COMPILER_EXECUTABLE COMPILER_ID COMPILER_VERSION INCLUDE_SYSTEM_FLAG)
 	set(_multiValueArgs DEPENDS COMPILE_DEFINITIONS COMPILE_FLAGS
-		INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS
-		INCLUDE_PRIORITY_PATH)
+		INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES IGNORE_PATH INCLUDE_PATH
+		IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
 	if (_option_DEPENDS)
 		cotire_check_file_up_to_date(_prefixFileIsUpToDate "${_prefixFile}" ${_option_DEPENDS})
@@ -3169,7 +3169,7 @@
 			IGNORE_PATH "${COTIRE_TARGET_IGNORE_PATH};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_PATH}"
 			INCLUDE_PATH ${COTIRE_TARGET_INCLUDE_PATH}
 			IGNORE_EXTENSIONS "${CMAKE_${COTIRE_TARGET_LANGUAGE}_SOURCE_FILE_EXTENSIONS};${COTIRE_ADDITIONAL_PREFIX_HEADER_IGNORE_EXTENSIONS}"
-			INCLUDE_PRIORITY_PATH "${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}"
+			INCLUDE_PRIORITY_PATH ${COTIRE_TARGET_INCLUDE_PRIORITY_PATH}
 			INCLUDE_SYSTEM_FLAG "${COTIRE_INCLUDE_SYSTEM_FLAG}"
 			INCLUDE_DIRECTORIES ${_includeDirs}
 			SYSTEM_INCLUDE_DIRECTORIES ${_systemIncludeDirs}
@@ -3409,7 +3409,7 @@

 	define_property(
 		DIRECTORY PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
-		BRIEF_DOCS "Header path matching one of these directories is put at the top of prefix header."
+		BRIEF_DOCS "Header paths matching one of these directories are put at the top of the prefix header."
 		FULL_DOCS
 			"See target property COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH."
 	)
@@ -3501,16 +3501,14 @@
 	)

 	define_property(
-		TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH"
-		BRIEF_DOCS "Header path matching one of these directories is put at the top of prefix header."
+		TARGET PROPERTY "COTIRE_PREFIX_HEADER_INCLUDE_PRIORITY_PATH" INHERITED
+		BRIEF_DOCS "Header paths matching one of these directories are put at the top of prefix header."
 		FULL_DOCS
 			"The property can be set to a list of directories."
-			"Headers files paths matching one of these directories will appear at the begin of generated prefix header."
-			"Order is kept from the property path order."
+			"Header file paths matching one of these directories will be inserted at the beginning of the generated prefix header."
+			"Header files are sorted according to the order of the directories in the property."
 			"If not set, this property is initialized to the empty list."
 	)
-
-

 	define_property(
 		TARGET PROPERTY "COTIRE_UNITY_SOURCE_PRE_UNDEFS" INHERITED


fix parallel file access

fix parallel file access

build process was installing in parallel causing issues

--- CMake/vtkiOS.cmake
+++ CMake/vtkiOS.cmake
@@ -163,7 +163,7 @@
   ExternalProject_Add_Step(${target} always-install
     COMMAND ${cmd}
     WORKING_DIRECTORY ${binary_dir}
-    DEPENDEES build
+    DEPENDEES build install
     ALWAYS 1
     )
 endmacro()


Added 1 minute timeout for tests

Added 1 minute timeout for tests

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -1,5 +1,6 @@
 set(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
 set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build/${JENKINS_GENERATOR}/${JENKINS_BUILD_CONFIGURATION}")
+set(CTEST_TEST_TIMEOUT 60)

 site_name(CTEST_SITE)
 set(CTEST_BUILD_NAME "${JENKINS_BUILD_NAME}")


Backend/detail added to build

Backend/detail added to build

--- src/cmake/sources.cmake
+++ src/cmake/sources.cmake
@@ -13,6 +13,7 @@
     But/Format/detail
     But/Log
     But/Log/Backend
+    But/Log/Backend/detail
     But/Log/Destination
     But/Log/Destination/Common
     But/Log/Destination/detail


nxphlite-v3:Updates for latest master

nxphlite-v3:Updates for latest master

--- cmake/configs/nuttx_nxphlite-v3_default.cmake
+++ cmake/configs/nuttx_nxphlite-v3_default.cmake
@@ -82,7 +82,7 @@
 ### NOT Portable YET drivers/test_ppm
 	modules/commander/commander_tests
 	modules/mc_pos_control/mc_pos_control_tests
-	modules/controllib_test
+	lib/controllib/controllib_test
 	modules/mavlink/mavlink_tests
 	modules/unit_test
 	modules/uORB/uORB_tests
@@ -99,6 +99,7 @@
 	modules/gpio_led
 ##NO CAN YET	modules/uavcan
 	modules/land_detector
+	modules/camera_feedback

 	#
 	# Estimation modules (EKF/ SO3 / other filters)
@@ -111,9 +112,10 @@
 	#
 	# Vehicle Control
 	#
-	# modules/segway # XXX Needs GCC 4.7 fix
+	modules/fw_att_control
 	modules/fw_pos_control_l1
-	modules/fw_att_control
+	modules/gnd_att_control
+	modules/gnd_pos_control
 	modules/mc_att_control
 	modules/mc_pos_control
 	modules/vtol_att_control
@@ -127,7 +129,7 @@
 	#
 	# Library modules
 	#
-	modules/param
+	modules/systemlib/param
 	modules/systemlib
 	modules/systemlib/mixer
 	modules/uORB


Refactor the compiler/linker settings macro.

--- cmake/yacma/YACMACompilerLinkerSettings.cmake
+++ cmake/yacma/YACMACompilerLinkerSettings.cmake
@@ -1,54 +1,45 @@
-if(YACMACompilerLinkerSettingsIncluded)
+if(_YACMACompilerLinkerSettingsIncluded)
     return()
+endif()
+
+include(CheckCXXCompilerFlag)
+
+# NOTE: we want to make sure the following variables are defined each time we include
+# this file, even when the file is re-included (e.g., from a parallel unrelated tree).
+
+# Clang detection:
+# http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
+# http://www.cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_ID
+# NOTE: we use MATCHES here because on OSX sometimes the compiler calls itself "AppleClang".
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+    set(YACMA_COMPILER_IS_CLANGXX TRUE)
+endif()
+
+if(${CMAKE_CXX_COMPILER_ID} MATCHES "Intel")
+    set(YACMA_COMPILER_IS_INTELXX TRUE)
+endif()
+
+if(MSVC)
+    set(YACMA_COMPILER_IS_MSVC TRUE)
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+    set(YACMA_COMPILER_IS_GNUCXX TRUE)
 endif()

 # This is an OS X specific setting that is suggested to be enabled. See:
 # https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
 # http://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-    set(CMAKE_MACOSX_RPATH 1)
+    set(CMAKE_MACOSX_RPATH TRUE)
 endif()

 # Helper function to print out the autodetected flags.
-function(YACMA_REPORT_FLAGS)
+function(_YACMA_REPORT_FLAGS)
+    message(STATUS "The C++ compiler ID is: ${CMAKE_CXX_COMPILER_ID}")
     message(STATUS "YACMA autodetected C++ flags: ${YACMA_CXX_FLAGS}")
     message(STATUS "YACMA autodetected C++ debug flags: ${YACMA_CXX_FLAGS_DEBUG}")
 endfunction()
-
-# We don't want to execute all this every time CMake is run, as it is time expensive. We will set cache variables
-# on the first run and skip following CMake runs.
-if(YACMACompilerLinkerSettingsRun)
-    # Report the flags before exiting.
-    YACMA_REPORT_FLAGS()
-    return()
-endif()
-
-include(CheckCXXCompilerFlag)
-
-message(STATUS "The C++ compiler ID is: ${CMAKE_CXX_COMPILER_ID}")
-
-# Clang detection:
-# http://stackoverflow.com/questions/10046114/in-cmake-how-can-i-test-if-the-compiler-is-clang
-# http://www.cmake.org/cmake/help/v2.8.10/cmake.html#variable:CMAKE_LANG_COMPILER_ID
-# NOTE: we use MATCHES here because on OSX sometimes the compiler calls itself "AppleClang".
-if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
-    set(YACMA_COMPILER_IS_CLANGXX 1)
-endif()
-
-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
-    set(YACMA_COMPILER_IS_INTELXX 1 CACHE INTERNAL "")
-endif()
-
-if(MSVC)
-    set(YACMA_COMPILER_IS_MSVC 1 CACHE INTERNAL "")
-endif()
-
-if(CMAKE_COMPILER_IS_GNUCXX)
-    set(YACMA_COMPILER_IS_GNUCXX 1 CACHE INTERNAL "")
-endif()
-
-set(_YACMA_CXX_FLAGS "")
-set(_YACMA_CXX_FLAGS_DEBUG "")

 # Enable conditionally a CXX flags, if supported by the compiler.
 # This is for flags intended to be enabled in all configurations.
@@ -84,68 +75,76 @@
     unset(YACMA_CHECK_DEBUG_CXX_FLAG CACHE)
 endmacro()

-# NOTE: all these flags are with a Unix-like syntax. We will need to change them
-# for MSVC and clang on windows possibly.
+# What we want to avoid is to re-run the expensive flag checks. We will set cache variables
+# on the initial run and skip following CMake runs.
+if(NOT _YACMACompilerLinkerSettingsRun)
+    # Init the flags lists.
+    set(_YACMA_CXX_FLAGS "")
+    set(_YACMA_CXX_FLAGS_DEBUG "")

-# Configuration bits specific for GCC.
-if(YACMA_COMPILER_IS_GNUCXX)
-    _YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
+    # NOTE: all these flags are with a Unix-like syntax. We will need to change them
+    # for MSVC and clang on windows possibly.
+
+    # Configuration bits specific for GCC.
+    if(YACMA_COMPILER_IS_GNUCXX)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fdiagnostics-color=auto)
+    endif()
+
+    # Configuration bits specific for clang.
+    if(YACMA_COMPILER_IS_CLANGXX)
+        # For now it seems like -Wshadow from clang behaves better than GCC's, just enable it here
+        # for the time being.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
+        # Clang is better at this flag than GCC.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
+    endif()
+
+    # Common configuration for GCC, clang and Intel.
+    if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wconversion)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecated)
+        # This limit is supposed to be at least 1024 in C++11, but for some reason
+        # clang sets this to 256, and gcc to 900.
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
+        # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
+        # Keep it in mind for the next time we touch type traits.
+        # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
+        # NOTE: disable this for now, as it results in a lot of clutter from Boost.
+        # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdisabled-optimization)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility-inlines-hidden)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility=hidden)
+        # This is useful when the compiler decides the template backtrace is too verbose.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
+        # These became available in GCC from version 5.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
+    endif()
+
+    # MSVC setup.
+    if(YACMA_COMPILER_IS_MSVC)
+        # Enable higher warning level than usual.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)
+        # Treat warnings as errors.
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)
+    endif()
+
+    # Set the cache variables.
+    set(YACMA_CXX_FLAGS "${_YACMA_CXX_FLAGS}" CACHE INTERNAL "")
+    set(YACMA_CXX_FLAGS_DEBUG "${_YACMA_CXX_FLAGS_DEBUG}" CACHE INTERNAL "")
+    set(_YACMACompilerLinkerSettingsRun YES CACHE INTERNAL "")
 endif()

-# Configuration bits specific for clang.
-if(YACMA_COMPILER_IS_CLANGXX)
-    # For now it seems like -Wshadow from clang behaves better than GCC's, just enable it here
-    # for the time being.
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshadow)
-    # Clang is better at this flag than GCC.
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Werror)
-endif()
-
-# Common configuration for GCC, clang and Intel.
-if (YACMA_COMPILER_IS_CLANGXX OR YACMA_COMPILER_IS_INTELXX OR YACMA_COMPILER_IS_GNUCXX)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wall)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wextra)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnon-virtual-dtor)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnoexcept)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wlogical-op)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wconversion)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdeprecated)
-    # This limit is supposed to be at least 1024 in C++11, but for some reason
-    # clang sets this to 256, and gcc to 900.
-    _YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
-    # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
-    # Keep it in mind for the next time we touch type traits.
-    # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
-    # NOTE: disable this for now, as it results in a lot of clutter from Boost.
-    # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wdisabled-optimization)
-    _YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility-inlines-hidden)
-    _YACMA_CHECK_ENABLE_CXX_FLAG(-fvisibility=hidden)
-    # This is useful when the compiler decides the template backtrace is too verbose.
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-ftemplate-backtrace-limit=0)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-fstack-protector-all)
-    # These became available in GCC from version 5.
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wodr)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-types)
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wsuggest-final-methods)
-endif()
-
-# MSVC setup.
-if(YACMA_COMPILER_IS_MSVC)
-    # Enable higher warning level than usual.
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/W4)
-    # Treat warnings as errors.
-    _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(/WX)
-endif()
-
-# Set the cache variables.
-set(YACMA_CXX_FLAGS "${_YACMA_CXX_FLAGS}" CACHE INTERNAL "")
-set(YACMA_CXX_FLAGS_DEBUG "${_YACMA_CXX_FLAGS_DEBUG}" CACHE INTERNAL "")
-set(YACMACompilerLinkerSettingsRun YES CACHE INTERNAL "")
-
 # Final report.
-YACMA_REPORT_FLAGS()
+_YACMA_REPORT_FLAGS()

 # Mark as included.
-set(YACMACompilerLinkerSettingsIncluded YES)
+set(_YACMACompilerLinkerSettingsIncluded YES)


Fix project_git_clone_3rd_party

Fix project_git_clone_3rd_party

--- project/cmake/modules/ProjectBuildTools.cmake
+++ project/cmake/modules/ProjectBuildTools.cmake
@@ -291,14 +291,27 @@
         message(FATAL_ERROR "git not found")
     endif ()

+    if (PROJECT_RESET_DENPEND_REPOSITORIES AND EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
+        execute_process(
+            COMMAND ${GIT_EXECUTABLE} clean -dfx
+            COMMAND ${GIT_EXECUTABLE} reset --hard
+            WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
+            RESULT_VARIABLE LAST_GIT_RESET_RESULT
+        )
+
+        if (LAST_GIT_RESET_RESULT AND NOT LAST_GIT_RESET_RESULT EQUAL 0)
+            file(REMOVE_RECURSE ${project_git_clone_3rd_party_REPO_DIRECTORY})
+        endif ()
+    endif ()
+
     if(NOT EXISTS "${project_git_clone_3rd_party_REPO_DIRECTORY}/${project_git_clone_3rd_party_CHECK_PATH}")
         if (EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
             file(REMOVE_RECURSE ${project_git_clone_3rd_party_REPO_DIRECTORY})
         endif ()
     endif ()

-    if(PROJECT_RESET_DENPEND_REPOSITORIES OR NOT EXISTS "${project_git_clone_3rd_party_REPO_DIRECTORY}/${project_git_clone_3rd_party_CHECK_PATH}")
-        if (EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
+    if(NOT EXISTS "${project_git_clone_3rd_party_REPO_DIRECTORY}/${project_git_clone_3rd_party_CHECK_PATH}")
+        if (NOT EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
             file(MAKE_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY})
         endif ()

@@ -329,19 +342,19 @@

         if (project_git_clone_3rd_party_GIT_BRANCH)
             execute_process(
-                COMMAND ${GIT_EXECUTABLE} fetch "--depth=${project_git_clone_3rd_party_DEPTH}" "-n" origin ${project_git_clone_3rd_party_COMMIT}
+                COMMAND ${GIT_EXECUTABLE} fetch "--depth=${project_git_clone_3rd_party_DEPTH}" "-n" origin ${project_git_clone_3rd_party_GIT_BRANCH}
                 WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
             )
         else ()
             if (GIT_VERSION_STRING VERSION_GREATER_EQUAL "2.11.0")
                 execute_process(
-                    COMMAND ${GIT_EXECUTABLE} fetch "--deepen=${project_git_clone_3rd_party_DEPTH}" "-n" origin ${project_git_clone_3rd_party_GIT_BRANCH}
+                    COMMAND ${GIT_EXECUTABLE} fetch "--deepen=${project_git_clone_3rd_party_DEPTH}" "-n" origin ${project_git_clone_3rd_party_COMMIT}
                     WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
                 )
             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 "-n" origin ${project_git_clone_3rd_party_GIT_BRANCH}
+                    COMMAND ${GIT_EXECUTABLE} fetch "-n" origin ${project_git_clone_3rd_party_COMMIT}
                     WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
                 )
             endif()
@@ -357,32 +370,6 @@
             )
         endif ()
     endif ()
-
-    if(NOT EXISTS "${project_git_clone_3rd_party_REPO_DIRECTORY}/${project_git_clone_3rd_party_CHECK_PATH}")
-        if (EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
-            file(REMOVE_RECURSE ${project_git_clone_3rd_party_REPO_DIRECTORY})
-        endif ()
-        execute_process(COMMAND ${GIT_EXECUTABLE} clone ${CLONE_OPTIONS} ${project_git_clone_3rd_party_URL} ${project_git_clone_3rd_party_REPO_DIRECTORY}
-            WORKING_DIRECTORY ${project_git_clone_3rd_party_WORKING_DIRECTORY}
-        )
-    elseif(PROJECT_RESET_DENPEND_REPOSITORIES)
-        execute_process(
-            COMMAND ${GIT_EXECUTABLE} fetch -f ${FETCH_OPTIONS} origin
-            COMMAND ${GIT_EXECUTABLE} clean -dfx
-            COMMAND ${GIT_EXECUTABLE} reset --hard ${UPDATE_OPTIONS}
-            WORKING_DIRECTORY ${project_git_clone_3rd_party_REPO_DIRECTORY}
-            RESULT_VARIABLE LAST_GIT_RESET_RESULT
-        )
-
-        if (LAST_GIT_RESET_RESULT AND NOT LAST_GIT_RESET_RESULT EQUAL 0)
-            if (EXISTS ${project_git_clone_3rd_party_REPO_DIRECTORY})
-                file(REMOVE_RECURSE ${project_git_clone_3rd_party_REPO_DIRECTORY})
-            endif ()
-            execute_process(COMMAND ${GIT_EXECUTABLE} clone ${CLONE_OPTIONS} ${project_git_clone_3rd_party_URL} ${project_git_clone_3rd_party_REPO_DIRECTORY}
-                WORKING_DIRECTORY ${project_git_clone_3rd_party_WORKING_DIRECTORY}
-            )
-        endif ()
-    endif()
 endfunction()

 if (NOT PROJECT_BUILD_TOOLS_PATCH_PROTOBUF_SOURCES_OPTIONS_SET)


Add deploy script as well.

Add deploy script as well.

--- install_java.cmake
+++ install_java.cmake
@@ -44,6 +44,7 @@

 vespa_install_script(jdisc_core/src/main/perl/jdisc_logfmt bin)
 vespa_install_script(config-proxy/src/main/sh/config-ctl bin)
+vespa_install_script(config-model/src/main/perl/deploy bin)

 install(FILES jdisc_core/src/main/perl/jdisc_logfmt.1 DESTINATION man/man1)


ENH: installation support

ENH: installation support

--- CMake/WrapperMacros.cmake
+++ CMake/WrapperMacros.cmake
@@ -14,4 +14,7 @@
    add_library(${APPLICATION_TARGET_NAME} MODULE ${APPLICATION_SOURCES})
    target_link_libraries(${APPLICATION_TARGET_NAME} OTBWrapperCore ${APPLICATION_LINK_LIBRARIES})
    set_target_properties(${APPLICATION_TARGET_NAME} PROPERTIES PREFIX "")
+   install(TARGETS ${APPLICATION_TARGET_NAME}
+            RUNTIME DESTINATION lib/otbapp
+            LIBRARY DESTINATION lib/otbapp)
 endmacro(OTB_CREATE_APPLICATION)


CMake: set a cmake varaible if try_run output is suceess (ie return 0)

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -26,7 +26,8 @@

 #------------------- Helper Macro ---------------------
 macro(gdal_try_run msg_type var source_file)
-try_run(${var} COMPILE_${var} ${CMAKE_CURRENT_BINARY_DIR}
+set(${var})
+try_run(RUN_${var} COMPILE_${var} ${CMAKE_CURRENT_BINARY_DIR}
 ${CMAKE_SOURCE_DIR}/Modules/ThirdParty/GDAL/${source_file}
 CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${GDAL_INCLUDE_DIR}" "-w" "-DLINK_LIBRARIES:STRING=${GDAL_LIBRARY}"
 COMPILE_OUTPUT_VARIABLE COMPILE_OUTPUT_${var}
@@ -34,22 +35,23 @@
 ARGS ${ARGN}
 )

-
 if(NOT COMPILE_${var})
   message(FATAL_ERROR "Compiling Test ${var} - Failed \n
 COMPILE_OUTPUT_${var}: '${COMPILE_OUTPUT_${var}}'")
 endif()
-if(${var})
+if(RUN_${var})
+  set(${var} FALSE)
   #if msg_type is STATUS (ie "okay" if test is failing),
   #then we don't need to give an run-output and exit status.
   if("${msg_type}" STREQUAL "STATUS")
     message(${msg_type} "Performing Test ${var} - Failed")
   else()
     message(${msg_type} "Performing Test ${var} - Failed \n
-Exit status: '${${var}}' \n
-RUN_OUTPUT_${var}: '${RUN_OUTPUT_${var}}'")
+            Exit status: '${RUN_${var}}' \n
+            RUN_OUTPUT_${var}: '${RUN_OUTPUT_${var}}'")
   endif()
 else()
+  set(${var} TRUE)
   message(STATUS "Performing Test ${var} - Success")
 endif()
 unset(RUN_OUTPUT_${var})
@@ -118,7 +120,7 @@
 gdal_try_run(STATUS GDAL_HAS_JPEG2000 gdalFormatsTest.c JPEG2000)
 #NOT is neeed because it keep the output of try_run execution which is non-zero if failed
 if (NOT GDAL_HAS_JPEG2000)
-  message(STATUS "Jasper JPEG2000 driver is available will be skipped by OTB. supported drivers OpenJPEG, ECW, Kakadu")
+    set(JPEG2000_DRIVER_USED "JPEG2000")
   gdal_try_run(STATUS GDAL_CAN_CREATE_JPEG2000 gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JPEG2000)
 endif()

@@ -136,7 +138,10 @@
 endif()

 if (NOT JPEG2000_DRIVER_USED)
-  message(STATUS "No Jpeg2000 driver found (compatible drivers are : OpenJpeg, Kakadu, ECW).")
+  message(STATUS "No Jpeg2000 gdal driver found. Supported drivers are : OpenJpeg, Kakadu, ECW.")
+elseif("${JPEG2000_DRIVER_USED}" STREQUAL "JPEG2000")
+  message(STATUS "Jasper JPEG2000 gdal driver is available. This will be skipped by OTB. supported drivers are OpenJPEG, ECW, Kakadu")
+  unset(JPEG2000_DRIVER_USED)
 else()
   message(STATUS "GDAL driver used for JPEG2000 dataset is '${JPEG2000_DRIVER_USED}'")
 endif()


testing: set PROCESSORS property for MPI tests

This helps `ctest -jN` do a bit better.

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -185,6 +185,7 @@
     set_tests_properties(${vtk-module}Cxx-MPI-${vtk_test_prefix}${test_name}
       PROPERTIES
         LABELS "${${vtk-module}_TEST_LABELS}"
+        PROCESSORS ${numprocs}
       )
     list(APPEND ${_tests} "${test_file}")


Update superbuild ITK version to 5.1.0

Update superbuild ITK version to 5.1.0

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

-set(_DEFAULT_ITK_GIT_TAG "v5.1rc03")
+set(_DEFAULT_ITK_GIT_TAG "v5.1.0")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Update ITK Superbuild version

Update ITK Superbuild version

This tag is after v5.3rc04 and include changes to the
LabelOverlapMeasuresImageFilter, and improvements to the LandmarkBased
initialize.

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

-set(_DEFAULT_ITK_GIT_TAG "v5.3rc04")
+# After v5.4rc04, Sept 14
+set(_DEFAULT_ITK_GIT_TAG "2f2b29cbbe3fe91474933e0194db8d581d5b3247")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


doc: fix man page generation

doc: fix man page generation

for build dir not in source dir

--- scripts/cmake/Modules/LibAddMacros.cmake
+++ scripts/cmake/Modules/LibAddMacros.cmake
@@ -658,7 +658,8 @@
 				COMMAND
 					${CMAKE_COMMAND} ARGS -D RONN_COMMAND=${RONN_LOC} -D GIT_COMMAND=${GIT_EXECUTABLE} -D
 					MDFILE=${MDFILE} -D SOURCE_FILE=${SOURCE_FILE} -D MANPAGE=${OUTFILE} -P
-					${CMAKE_SOURCE_DIR}/scripts/cmake/ElektraManPage.cmake)
+					${CMAKE_SOURCE_DIR}/scripts/cmake/ElektraManPage.cmake
+					WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
 			add_custom_target (man-${NAME} ALL DEPENDS ${OUTFILE})
 			add_dependencies (man man-${NAME})
 		endif (RONN_LOC AND GIT_EXECUTABLE)


Force lcov to use the gcov we tell it to use

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -161,6 +161,10 @@
 #   Pass them in list form, e.g.: "-j;2" for -j 2
 FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)

+  IF(NOT GCOV_PATH)
+		MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
+	ENDIF() # NOT GCOV_PATH
+
 	IF(NOT LCOV_PATH)
 		MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
 	ENDIF() # NOT LCOV_PATH
@@ -178,16 +182,16 @@
 	ADD_CUSTOM_TARGET(${_targetname}

 		# Cleanup lcov
-		${LCOV_PATH} --directory . --zerocounters
+		${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory . --zerocounters

 		# Run tests
 		COMMAND ${test_command} ${ARGV3}

 		# Capturing lcov counters and generating report
-		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${coverage_info}
-		COMMAND ${LCOV_PATH} --remove ${coverage_info} 'tests/*' '/usr/*' ${COVERAGE_IGNORE_LIST} --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory . --capture --output-file ${coverage_info}
+		COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${coverage_info} 'tests/*' '/usr/*' ${COVERAGE_IGNORE_LIST} --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
-		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}
+		COMMAND ${CMAKE_COMMAND} --gcov-tool ${GCOV_PATH} -E remove ${coverage_info} ${coverage_cleaned}

 		WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
 		COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."


Improve coverage report

Improve coverage report

Remove directories that are not relevant
  * build
  * test
  * third_party

--- cmake/CodeCoverage.cmake
+++ cmake/CodeCoverage.cmake
@@ -133,7 +133,7 @@

 	SET(coverage_info "${CMAKE_BINARY_DIR}/${_outputname}.info")
 	SET(coverage_cleaned "${coverage_info}.cleaned")
-
+
 	SEPARATE_ARGUMENTS(test_command UNIX_COMMAND "${_testrunner}")

 	# Setup target
@@ -147,7 +147,7 @@

 		# Capturing lcov counters and generating report
 		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${coverage_info}
-		COMMAND ${LCOV_PATH} --remove ${coverage_info} 'tests/*' '/usr/*' --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/usr/*' 'build/*' 'test/*' 'third_party/*' --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
 		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}


Add support for recursive copy of Python modules

--- cmake/DevBaseMacro.cmake
+++ cmake/DevBaseMacro.cmake
@@ -283,7 +283,7 @@
 # test modules will always be up to date before building the other target.
 # TARGET: Name of custom target to add.
 macro(copy_python_unit_test_modules)
-    set(OPTIONS "")
+    set(OPTIONS RECURSE)
     set(ONE_VALUE_ARGUMENTS TARGET)
     set(MULTI_VALUE_ARGUMENTS "")

@@ -297,8 +297,13 @@
         )
     endif()

-    file(GLOB PYTHON_UNIT_TEST_MODULES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
-        "*.py")
+    if(COPY_MODULES_RECURSE)
+        file(GLOB_RECURSE PYTHON_UNIT_TEST_MODULES RELATIVE
+            ${CMAKE_CURRENT_SOURCE_DIR} "*.py")
+    else()
+        file(GLOB PYTHON_UNIT_TEST_MODULES RELATIVE
+            ${CMAKE_CURRENT_SOURCE_DIR} "*.py")
+    endif()

     foreach(MODULE ${PYTHON_UNIT_TEST_MODULES})
         set(PYTHON_UNIT_TEST_MODULE ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE})


add the possibility to specify a list of sub-test suffixes in a compact way

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -120,9 +120,9 @@

   file(READ "${testname}.cpp" test_source)
   set(parts 0)
-  string(REGEX MATCHALL "CALL_SUBTEST_[0-9]+|EIGEN_TEST_PART_[0-9]+"
+  string(REGEX MATCHALL "CALL_SUBTEST_[0-9]+|EIGEN_TEST_PART_[0-9]+|EIGEN_SUFFIXES(;[0-9]+)+"
          occurences "${test_source}")
-  string(REGEX REPLACE "CALL_SUBTEST_|EIGEN_TEST_PART_" "" suffixes "${occurences}")
+  string(REGEX REPLACE "CALL_SUBTEST_|EIGEN_TEST_PART_|EIGEN_SUFFIXES" "" suffixes "${occurences}")
   list(REMOVE_DUPLICATES suffixes)
   if(EIGEN_SPLIT_LARGE_TESTS AND suffixes)
     add_custom_target(${testname})


Use GCC flags in mingw

Use GCC flags in mingw

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -367,7 +367,7 @@
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
     # supporting a "--version" or "/version" flag

-    if(WIN32 AND NOT CYGWIN)
+    if(WIN32 AND NOT CYGWIN AND NOT MINGW)
       set(EIGEN_CXX_FLAG_VERSION "/version")
     else()
       set(EIGEN_CXX_FLAG_VERSION "--version")


support to use bundled gflags/glog

support to use bundled gflags/glog

--- cmake/InstallFolly.cmake
+++ cmake/InstallFolly.cmake
@@ -10,7 +10,14 @@
         URL_MD5             ${FOLLY_URL_MD5}
         CONFIGURE_COMMAND   cd <SOURCE_DIR>/folly &&
                             autoreconf -vi &&
-                            CXXFLAGS=-I<INSTALL_DIR>/include LDFLAGS=-L<INSTALL_DIR>/lib PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig GFLAGS_CFLAGS=-I${GFLAGS_INCLUDE_DIRS} GFLAGS_LIBS=${GFLAGS_LIBRARIES} GLOG_CFLAGS=-I${GLOG_INCLUDE_PATH} GLOG_LIBS=${GLOG_LIBRARY} <SOURCE_DIR>/folly/configure --prefix=<INSTALL_DIR> ${WITH_OPENSSL} --with-boost=${BOOST_ROOT}
+                            LD_LIBRARY_PATH=<INSTALL_DIR>/lib
+                            LDFLAGS=-L<INSTALL_DIR>/lib
+                            PKG_CONFIG_PATH=<INSTALL_DIR>/lib/pkgconfig
+                            CFLAGS=-I<INSTALL_DIR>/include
+                            CXXFLAGS=-I<INSTALL_DIR>/include
+                            <SOURCE_DIR>/folly/configure
+                                --prefix=<INSTALL_DIR> ${WITH_OPENSSL}
+                                --with-boost=${BOOST_ROOT}
         BUILD_COMMAND       cd <SOURCE_DIR>/folly && make
         INSTALL_COMMAND     cd <SOURCE_DIR>/folly && make install
     )


removed embree dir output

removed embree dir output

--- cmake/build_embree.cmake
+++ cmake/build_embree.cmake
@@ -17,8 +17,6 @@
 SET(LIBRARY_OUTPUT_PATH ${OSPRAY_BINARY_DIR})

 CONFIGURE_OSPRAY()
-
-MESSAGE("OSPRAY_EMBREE_SOURCE_DIR ${OSPRAY_EMBREE_SOURCE_DIR}")

 IF (OSPRAY_ALLOW_EXTERNAL_EMBREE)
   OSPRAY_ADD_LIBRARY(ospray_embree${OSPRAY_LIB_SUFFIX} SHARED


update dependency: fifechan. use latest artifact (dev-master)

--- cmake/get-fifechan.cmake
+++ cmake/get-fifechan.cmake
@@ -35,8 +35,8 @@
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VC14.zip
-      URL                 https://ci.appveyor.com/api/buildjobs/wkajhh6nkohb29dh/artifacts/fifechan-shared-VC14.zip
-      URL_MD5             b41cb9c717e5ad499a2ea8dbc85a161c
+      URL                 https://ci.appveyor.com/api/buildjobs/2vap0jpct9vcdklw/artifacts/fifechan-shared-VC14.zip
+      URL_MD5             81faa795627270fbef18ee0f0f8a9280
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND


cmake: Minor output changes

cmake: Minor output changes

--- cmake/post.service.cmake
+++ cmake/post.service.cmake
@@ -286,7 +286,6 @@
 # automatically build memdisk from folder
 function(build_memdisk FOLD)
   get_filename_component(REL_PATH "${FOLD}" REALPATH BASE_DIR "${CMAKE_SOURCE_DIR}")
-  message(STATUS ${REL_PATH})
   add_custom_command(
       OUTPUT  memdisk.fat
       COMMAND ${INSTALL_LOC}/bin/diskbuilder -o memdisk.fat ${REL_PATH}
@@ -299,6 +298,7 @@

 # build memdisk if defined
 if(MEMDISK)
+  message(STATUS "Memdisk folder set: " ${MEMDISK})
   build_memdisk(${MEMDISK})
 endif()


Set property for check-* targets, too

Set property for check-* targets, too

--- cmake/HealthCheck.cmake
+++ cmake/HealthCheck.cmake
@@ -13,10 +13,17 @@
         set_target_properties(check-all
             PROPERTIES
             FOLDER "Maintenance"
+            EXCLUDE_FROM_DEFAULT_BUILD 1
         )
     endif()

     add_custom_target(check-${target})
+
+    set_target_properties(check-${target}
+        PROPERTIES
+        FOLDER "Maintenance"
+        EXCLUDE_FROM_DEFAULT_BUILD 1
+    )

     if (OPTION_CPPCHECK_ENABLED)
         perform_cppcheck(cppcheck-${target} ${target} ${ARGN})
@@ -92,5 +99,6 @@
     set_target_properties(check-template
         PROPERTIES
         FOLDER "Maintenance"
+        EXCLUDE_FROM_DEFAULT_BUILD 1
     )
 endfunction()


testing: build qs extension

testing: build qs extension

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -55,28 +55,12 @@

-option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" ON)
-option(USE_SYSTEM_SlicerExecutionModel "Build using an externally defined version of SlicerExecutionModel"  USE_SYSTEM_LIBS)
-option(BUILD_SHARED_LIBS "Build shared libraries" USE_SYSTEM_LIBS)
+option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" ${USE_SYSTEM_LIBS})
+option(USE_SYSTEM_SlicerExecutionModel "Build using an externally defined version of SlicerExecutionModel"  ${USE_SYSTEM_LIBS})
+option(BUILD_SHARED_LIBS "Build shared libraries" ${USE_SYSTEM_LIBS})

-if(NOT ( DEFINED "USE_SYSTEM_ITK") )
-  message("--------------------------------FAIL--------------------------------")
-else()
-  message("--------------------------------PASS--------------------------------")          #OK
-endif()

-if(NOT (  "${USE_SYSTEM_ITK}" ) )
-  message("--------------------------------FAIL--------------------------------")
-else()
-  message("--------------------------------PASS--------------------------------")
-endif()
-
-if( ( DEFINED "USE_SYSTEM_ITK" AND "${USE_SYSTEM_ITK}" ) )
-  message("--------------------------------FAIL--------------------------------")
-else()
-  message("--------------------------------PASS--------------------------------")
-endif()

 if(NOT ( DEFINED "USE_SYSTEM_ITK" AND "${USE_SYSTEM_ITK}" ) )
   message("--------------------------------FAIL--------------------------------")


Add NAME_PUBLIC_INCLUDE_DIRECTORIES to common_library()

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -8,6 +8,8 @@
 # * NAME_SOURCES for all compilation units
 # * NAME_HEADERS for all internal header files
 # * NAME_PUBLIC_HEADERS for public, installed header files
+# * NAME_PUBLIC_INCLUDE_DIRECTORIES for transient dependencies of name which are
+#   not targets (e.g. Boost_INCLUDE_DIRS).
 # * NAME_LINK_LIBRARIES for dependencies of name. Use targets rather than
 #   NAME_LIBRARIES variable. Also use PUBLIC and PRIVATE for declaring transient
 #   dependencies for export target generation.
@@ -137,13 +139,7 @@
       set_target_properties(${LibName} PROPERTIES
         LINKER_LANGUAGE CXX FOLDER ${PROJECT_NAME})

-      # declare include directories for this target when using it in the build
-      # tree; the install tree include directory is declared via install()
-      target_include_directories(${LibName} INTERFACE
-        "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
-        "$<BUILD_INTERFACE:${OUTPUT_INCLUDE_DIR}>"
-        "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
-      )
+      _target_include_directories(INTERFACE)
     else()
       # append a debug suffix to library name on windows or if user requests it
       common_set_lib_name_postfix()
@@ -154,14 +150,7 @@
         OUTPUT_NAME ${Name} FOLDER ${PROJECT_NAME})
       target_link_libraries(${LibName} ${LINK_LIBRARIES})

-      # declare include directories for this target when using it in the build
-      # tree; the install tree include directory is declared via install()
-      target_include_directories(
-          ${LibName} PUBLIC
-          "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
-          "$<BUILD_INTERFACE:${OUTPUT_INCLUDE_DIR}>"
-          "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
-      )
+      _target_include_directories(PUBLIC)

       if(NOT ${NAME}_OMIT_CHECK_TARGETS)
         common_check_targets(${LibName})
@@ -268,3 +257,22 @@
   set_target_properties(${Target} PROPERTIES
     COMPILE_DEFINITIONS "${_compile_definitions}")
 endfunction()
+
+# declare include directories for this target when using it in the build
+# tree; the install tree include directory is declared via install()
+# @param type: must be PUBLIC or INTERFACE
+macro(_target_include_directories _type)
+  target_include_directories(
+      ${LibName} ${_type}
+      "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>"
+      "$<BUILD_INTERFACE:${OUTPUT_INCLUDE_DIR}>"
+      "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>"
+  )
+  if(${NAME}_PUBLIC_INCLUDE_DIRECTORIES)
+    target_include_directories(
+      ${LibName} SYSTEM ${_type}
+      "$<BUILD_INTERFACE:${${NAME}_PUBLIC_INCLUDE_DIRECTORIES}>"
+      "$<INSTALL_INTERFACE:${${NAME}_PUBLIC_INCLUDE_DIRECTORIES}>"
+    )
+  endif()
+endmacro()


Bugfix: CommonLibrary error with multiple library types

When XXX_LIBRARY_TYPE is a list, e.g. STATIC;SHARED, CMake
fails on line 94.

This patch stops CMake from failing, but does not address the
correct behaviour for MSVC when both shared and static libraries
are requested.

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -91,7 +91,7 @@
       LIBRARY DESTINATION ${LIBRARY_DIR} COMPONENT lib)
   endforeach()

-  if(MSVC AND ${${NAME}_LIBRARY_TYPE} STREQUAL "SHARED")
+  if(MSVC AND "${${NAME}_LIBRARY_TYPE}" STREQUAL "SHARED")
     install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${Name}.pdb
       DESTINATION bin COMPONENT lib CONFIGURATIONS Debug)
     install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/RelWithDebInfo/${Name}.pdb


ENH: Added test pass in CI/super_build.cmake.

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -69,7 +69,7 @@

 set (CMAKE_COMMAND "cmake")
 execute_process(
-  COMMAND ${CMAKE_COMMAND} "-E" "tar" "xf"
+  COMMAND ${CMAKE_COMMAND} "-E" "tar" "xf"
   "${CI_PROJ_DIR}/superbuild-artifact/SuperBuild_Install.tar"
   WORKING_DIRECTORY ${CI_ROOT_DIR}
   )
@@ -92,7 +92,7 @@

 set ( CTEST_BUILD_CONFIGURATION "Release" )
 set ( CTEST_CMAKE_GENERATOR "Unix Makefiles" )
-set ( CTEST_BUILD_FLAGS "-j16" )
+set ( CTEST_BUILD_FLAGS "-j8" )
 set ( CTEST_BUILD_NAME "Superbuild_Build_Otb" )
 set ( CTEST_SITE "${IMAGE_NAME}" )

@@ -105,18 +105,18 @@
 set (CONFIGURE_OPTIONS  "")
 include ( "${CMAKE_CURRENT_LIST_DIR}/configure_option.cmake" )
 # SuperBuild case : one more configure option
-set ( CONFIGURE_OPTIONS
+set ( CONFIGURE_OPTIONS
   "${CONFIGURE_OPTIONS}-DCMAKE_PREFIX_PATH=${XDK_PATH};")

 # Hack because there is no more superbuild available (LIBKML)
-set ( CONFIGURE_OPTIONS
+set ( CONFIGURE_OPTIONS
   "${CONFIGURE_OPTIONS}-DOTB_USE_LIBKML:BOOL=OFF;" )

 # FIX ME this part might platform dependent
 set( GDAL_DATA "${XDK_PATH}/share/gdal" )
 set( GEOTIFF_CSV "${XDK_PATH}/share/epsg_csv" )
 set( PROJ_LIB "${XDK_PATH}/share" )
-set( CTEST_ENVIRONMENT
+set( CTEST_ENVIRONMENT
 "PATH=${XDK_PATH}/lib:${XDK_PATH}/bin:$ENV{PATH}
 GDAL_DATA= GDAL_DATA
 GEOTIFF_CSV= GEOTIFF_CSV
@@ -158,4 +158,9 @@
 #   message( SEND_ERROR "An error occurs during ctest_test.")
 # endif()

+ctest_test(
+  BUILD "${CTEST_BINARY_DIRECTORY}"
+  PARALLEL_LEVEL 4
+  )
+
 ctest_submit()


add important flag for x86 build

add important flag for x86 build

--- CMake/Platform/x86.cmake
+++ CMake/Platform/x86.cmake
@@ -0,0 +1 @@
+add_definitions(-DPK_X86)


COMP: Bump CTK version.

COMP: Bump CTK version.

Fix warnings with CMake 2.8.12.

Sync with Slicer.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -28,9 +28,9 @@
   ${github_protocol}://github.com/danmar/cppcheck.git )
 set( Cppcheck_HASH_OR_TAG 1.61 )

-# Common Toolkit snapshot 2013-09-16 17:59:15
+# Common Toolkit snapshot 2014-01-03
 set( CTK_URL ${github_protocol}://github.com/commontk/CTK.git )
-set( CTK_HASH_OR_TAG 00be8fae583173f338893659b9d8296ce9d5765b )
+set( CTK_HASH_OR_TAG 7cf06ada5e490a06dab7efaa3aaf0cd784671253 )

 # TubeTK Image Viewer snapshot 2013-08-21 06:23:25
 set( ImageViewer_URL


Add correct search directory depending on external or internal OpenCV build

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -85,9 +85,17 @@
     endif()
   endif()

-  if(OpenCV_DIR)
+  # If OpenCV is built within the MITK superbuild set the binary directory
+  # according to the lib path provided by OpenCV.
+  # In the case where an external OpenCV is provided use the binary directory
+  #  of this OpenCV directory
+  if(MITK_USE_OpenCV)
     if(WIN32)
-      list(APPEND _dir_candidates "${OpenCV_DIR}/bin")
+      if (EXISTS ${OpenCV_LIB_PATH})
+        list(APPEND _dir_candidates "${OpenCV_LIB_PATH}/../bin") # OpenCV is built in superbuild
+      else()
+        list(APPEND _dir_candidates "${OpenCV_DIR}/bin") # External OpenCV build is used
+      endif()
     endif()
   endif()


fix for google test build command

fix for google test build command

--- common/build_gtest.cmake
+++ common/build_gtest.cmake
@@ -37,7 +37,7 @@
     SVN_REPOSITORY http://googletest.googlecode.com/svn/trunk/
     SVN_REVISION -r 660
     TIMEOUT 10
-    PATCH_COMMAND patch -d${CMAKE_BINARY_DIR}/third_party/src/googletest -p0 < ${CMAKE_BINARY_DIR}/gtest.patch
+    PATCH_COMMAND svn patch ${CMAKE_BINARY_DIR}/gtest.patch ${CMAKE_BINARY_DIR}/third_party/src/googletest
     # Force separate output paths for debug and release builds to allow easy
     # identification of correct lib in subsequent TARGET_LINK_LIBRARIES commands
     CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}


Fix sfml

Fix sfml

--- SFML-2.3.2/FindSFML.cmake
+++ SFML-2.3.2/FindSFML.cmake
@@ -96,14 +96,15 @@
         set(SFML_VERSION_PATCH 0)
     endif()
     math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10000 + ${SFML_FIND_VERSION_MINOR} * 100 + ${SFML_FIND_VERSION_PATCH}")
-
+
+	message (STATUS ${SFML_VERSION_MAJOR})
+    message (STATUS ${SFML_VERSION_MINOR})
+	message (STATUS ${SFML_VERSION_PATCH})
     # if we could extract them, compare with the requested version number
     if (SFML_VERSION_MAJOR)
         # transform version numbers to an integer
-        math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10000 + ${SFML_VERSION_MINOR} * 100 + ${SFML_VERSION_PATCH}")
-		message (STATUS ${SFML_VERSION_MAJOR})
-        message (STATUS ${SFML_VERSION_MINOR})
-	    message (STATUS ${SFML_VERSION_PATCH})
+        math(EXPR SFML_VERSION "2 * 10000 + 1 * 100 + 0")
+
         # compare them
         if(SFML_VERSION LESS SFML_REQUESTED_VERSION)
             set(SFML_VERSION_OK FALSE)


fix check if compiler supports "-Wall"

fix check if compiler supports "-Wall"

--- lib/orogen/templates/config/Base.cmake
+++ lib/orogen/templates/config/Base.cmake
@@ -20,9 +20,9 @@

 # Enable -Wall for compilers that know it
 include(CheckCXXCompilerFlag)
-CHECK_CXX_COMPILER_FLAG("-Wall", CXX_SUPPORTS_WALL)
+CHECK_CXX_COMPILER_FLAG("-Wall" CXX_SUPPORTS_WALL)
 if (CXX_SUPPORTS_WALL)
-    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+    add_definitions (" -Wall")
 endif (CXX_SUPPORTS_WALL)

 # Define the necessary RPath information for all binaries. That can be stripped


fix linking of gtest libraries (regression of #16)

--- ament_cmake_gtest/cmake/ament_add_gtest.cmake
+++ ament_cmake_gtest/cmake/ament_add_gtest.cmake
@@ -53,9 +53,9 @@
   # should be EXCLUDE_FROM_ALL if it would be possible
   # to add this target as a dependency to the "test" target
   add_executable("${target}" ${ARG_UNPARSED_ARGUMENTS})
-  target_link_libraries("${target}" GTEST_LIBRARIES)
+  target_link_libraries("${target}" ${GTEST_LIBRARIES})
   if(NOT ARG_SKIP_LINKING_MAIN_LIBRARIES)
-    target_link_libraries("${target}" GTEST_MAIN_LIBRARIES)
+    target_link_libraries("${target}" ${GTEST_MAIN_LIBRARIES})
   endif()

   get_target_property(target_path "${target}" RUNTIME_OUTPUT_DIRECTORY)


Force color if ninja generator is used (#528)

--- igvc.cmake
+++ igvc.cmake
@@ -5,3 +5,11 @@
 set(GIT_REPO_DIR ${CMAKE_CURRENT_LIST_DIR})
 include(${CMAKE_CURRENT_LIST_DIR}/cmake/ensure_submodules.cmake)

+# Add color for ninja generator
+if (CMAKE_GENERATOR STREQUAL "Ninja" AND
+((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) OR
+(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)))
+    # Force colored warnings in Ninja's output, if the compiler has -fdiagnostics-color support.
+    # Rationale in https://github.com/ninja-build/ninja/issues/814
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always")
+endif()


Fix dependencies for tf_cc library.

Fix dependencies for tf_cc library.

--- tensorflow/contrib/cmake/tf_cc_ops.cmake
+++ tensorflow/contrib/cmake/tf_cc_ops.cmake
@@ -84,35 +84,36 @@
     "${tensorflow_source_dir}/tensorflow/cc/ops/const_op.cc"
     "${tensorflow_source_dir}/tensorflow/cc/ops/standard_ops.h"
 )
-
-########################################################
-# tf_cc library
-########################################################
-file(GLOB_RECURSE tf_cc_srcs
-    "${tensorflow_source_dir}/tensorflow/cc/client/*.h"
-    "${tensorflow_source_dir}/tensorflow/cc/client/*.cc"
-    "${tensorflow_source_dir}/tensorflow/cc/gradients/*.h"
-    "${tensorflow_source_dir}/tensorflow/cc/gradients/*.cc"
-    "${tensorflow_source_dir}/tensorflow/cc/saved_model/*.h"
-    "${tensorflow_source_dir}/tensorflow/cc/saved_model/*.cc"
-    "${tensorflow_source_dir}/tensorflow/cc/training/*.h"
-    "${tensorflow_source_dir}/tensorflow/cc/training/*.cc"
-)
-
-set(tf_cc_srcs
-    ${tf_cc_srcs}
-    "${tensorflow_source_dir}/tensorflow/cc/framework/grad_op_registry.h"
-    "${tensorflow_source_dir}/tensorflow/cc/framework/grad_op_registry.cc"
-    "${tensorflow_source_dir}/tensorflow/cc/framework/gradient_checker.h"
-    "${tensorflow_source_dir}/tensorflow/cc/framework/gradient_checker.cc"
-    "${tensorflow_source_dir}/tensorflow/cc/framework/gradients.h"
-    "${tensorflow_source_dir}/tensorflow/cc/framework/gradients.cc"
-)
-
-file(GLOB_RECURSE tf_cc_test_srcs
-    "${tensorflow_source_dir}/tensorflow/cc/*test*.cc"
-)
-
-list(REMOVE_ITEM tf_cc_srcs ${tf_cc_test_srcs})
-
-add_library(tf_cc OBJECT ${tf_cc_srcs})
+
+########################################################
+# tf_cc library
+########################################################
+file(GLOB_RECURSE tf_cc_srcs
+    "${tensorflow_source_dir}/tensorflow/cc/client/*.h"
+    "${tensorflow_source_dir}/tensorflow/cc/client/*.cc"
+    "${tensorflow_source_dir}/tensorflow/cc/gradients/*.h"
+    "${tensorflow_source_dir}/tensorflow/cc/gradients/*.cc"
+    "${tensorflow_source_dir}/tensorflow/cc/saved_model/*.h"
+    "${tensorflow_source_dir}/tensorflow/cc/saved_model/*.cc"
+    "${tensorflow_source_dir}/tensorflow/cc/training/*.h"
+    "${tensorflow_source_dir}/tensorflow/cc/training/*.cc"
+)
+
+set(tf_cc_srcs
+    ${tf_cc_srcs}
+    "${tensorflow_source_dir}/tensorflow/cc/framework/grad_op_registry.h"
+    "${tensorflow_source_dir}/tensorflow/cc/framework/grad_op_registry.cc"
+    "${tensorflow_source_dir}/tensorflow/cc/framework/gradient_checker.h"
+    "${tensorflow_source_dir}/tensorflow/cc/framework/gradient_checker.cc"
+    "${tensorflow_source_dir}/tensorflow/cc/framework/gradients.h"
+    "${tensorflow_source_dir}/tensorflow/cc/framework/gradients.cc"
+)
+
+file(GLOB_RECURSE tf_cc_test_srcs
+    "${tensorflow_source_dir}/tensorflow/cc/*test*.cc"
+)
+
+list(REMOVE_ITEM tf_cc_srcs ${tf_cc_test_srcs})
+
+add_library(tf_cc OBJECT ${tf_cc_srcs})
+add_dependencies(tf_cc tf_cc_framework tf_cc_ops)


add esc_battery module to modalai/fc-v1 build

--- boards/modalai/fc-v1/default.cmake
+++ boards/modalai/fc-v1/default.cmake
@@ -57,6 +57,7 @@
 		commander
 		dataman
 		ekf2
+		esc_battery
 		events
 		fw_att_control
 		fw_pos_control_l1


Correct Ubuntu compile flag for basholeveldb

--- basholeveldb.cmake
+++ basholeveldb.cmake
@@ -28,7 +28,7 @@
             # Ubuntu
             if (LINUX_ISSUE MATCHES "Ubuntu")
                 message ("Detected Ubuntu system.  Using -lrt linker flag.")
-	            set (CMAKE_SHARED_LINKER_FLAGS "--no-as-needed;-lrt")
+	            set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-as-needed;-lrt")
             endif ()
         endif ()
     endif ()


Exit build with error message when NGRAPH_USE_PREBUILT_LLVM is requested on non-Linux OSes (#560)

* Exit build with error message when NGRAPH_USE_PREBUILT_LLVM is requested on non-Linux OSes

--- cmake/external_llvm_prebuilt.cmake
+++ cmake/external_llvm_prebuilt.cmake
@@ -16,8 +16,11 @@

 include(ExternalProject)

-if((NGRAPH_CPU_ENABLE OR NGRAPH_GPU_ENABLE) AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND
-                         (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows"))
+if (NGRAPH_CPU_ENABLE AND (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR (${CMAKE_SYSTEM_NAME} MATCHES "Windows"))
+    message(FATAL_ERROR "The NGRAPH_USE_PREBUILT_LLVM option is not supported on this platform.")
+endif()
+
+if (NGRAPH_CPU_ENABLE)
     message(STATUS "Fetching LLVM from llvm.org")

     # Override default LLVM binaries


ZeroMQ tests won't be compiled

ZeroMQ tests won't be compiled

--- cmake/projects/ZeroMQ/hunter.cmake
+++ cmake/projects/ZeroMQ/hunter.cmake
@@ -6,6 +6,7 @@

 include(hunter_add_version)
 include(hunter_cacheable)
+include(hunter_cmake_args)
 include(hunter_download)
 include(hunter_pick_scheme)

@@ -20,6 +21,7 @@
   a3f39b9bbc23cf896cb78b3b33e3b46a45177eb5
   )

+hunter_cmake_args(ZeroMQ CMAKE_ARGS ZMQ_BUILD_TESTS=OFF)
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_cacheable(ZeroMQ)
 hunter_download(PACKAGE_NAME ZeroMQ)


Add /tmp paths to cuttlebone search paths

--- cmake_modules/FindCuttlebone.cmake
+++ cmake_modules/FindCuttlebone.cmake
@@ -17,13 +17,13 @@
 # Include dir
 find_path(CUTTLEBONE_INCLUDE_DIR
   NAMES cuttlebone/Cuttlebone.h
-  PATHS ${CUTTLEBONE_PKGCONF_INCLUDE_DIRS} ./cuttlebone ../cuttlebone ../../cuttlebone /usr/include /usr/local/include /opt/local/include
+  PATHS ${CUTTLEBONE_PKGCONF_INCLUDE_DIRS} ./cuttlebone ../cuttlebone ../../cuttlebone /usr/include /usr/local/include /opt/local/include /tmp/cuttlebone
 )

 # Finally the library itself
 find_library(CUTTLEBONE_LIBRARY
   NAMES CUTTLEBONE
-  PATHS ${CUTTLEBONE_PKGCONF_LIBRARY_DIRS} ./cuttlebone/build/lib ../cuttlebone/build/lib ../../cuttlebone/build/lib /usr/lib /usr/local/lib /opt/local/lib
+  PATHS ${CUTTLEBONE_PKGCONF_LIBRARY_DIRS} ./cuttlebone/build/lib ../cuttlebone/build/lib ../../cuttlebone/build/lib /usr/lib /usr/local/lib /opt/local/lib /tmp/cuttlebone
 )

 #/usr/include/assimp


remove hardcoded "visomics"

remove hardcoded "visomics"

replace with app name.

--- CMake/VisomicsCPack.cmake
+++ CMake/VisomicsCPack.cmake
@@ -94,7 +94,7 @@
 SET(CPACK_PACKAGE_VERSION_PATCH "${Visomics_BUILD_VERSION}")
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "${APP_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
 SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${APP_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
-SET(CPACK_PACKAGE_EXECUTABLES "Visomics;Visomics")
+SET(CPACK_PACKAGE_EXECUTABLES "${APP_NAME};${APP_NAME}")
 SET(CPACK_CREATE_DESKTOP_LINKS "visomics ${Visomics_VERSION}")

 IF(Q_WS_WIN)


Documentation will build even without MATLAB_ROOT set

--- cmake/Modules/MexIFace-configure-matlab.cmake
+++ cmake/Modules/MexIFace-configure-matlab.cmake
@@ -455,14 +455,11 @@
     message(STATUS "After: ${MATLAB_ROOTS}")
 endif()
 if(NOT MATLAB_ROOTS)
-    message(FATAL_ERROR "[MexIFace::Matlab] Found no matlab roots.  Set MATLAB_ROOT or MATLAB_ROOTS in CMake Cache or in environment variables.")
+    message(WARNING "[MexIFace::Matlab] Found no matlab roots.  Set MATLAB_ROOT or MATLAB_ROOTS in CMake Cache or in environment variables.")
 endif()

 #Only look for new compatable matlab versions if we have not already found valid roots or
 # MATLAB_ROOTS has changed since the last time we did the search
-if(MATLAB_ROOT)
-    set(MATLAB_ROOT CACHE PATH "Primary matlab root to search.")
-endif()
 if(OPT_MexIFace_VERBOSE)
     message(STATUS "[MexIFace::Matlab] MATLAB_ROOTS:'${MATLAB_ROOTS}")
     message(STATUS "[MexIFace::Matlab] MexIFace_MATLAB_FOUND:${MexIFace_MATLAB_FOUND}")


nxphlite-v3:add usb_connected command

nxphlite-v3:add usb_connected command

--- cmake/configs/nuttx_nxphlite-v3_default.cmake
+++ cmake/configs/nuttx_nxphlite-v3_default.cmake
@@ -75,6 +75,7 @@
 	systemcmds/ver
 	systemcmds/sd_bench
 	systemcmds/motor_ramp
+	systemcmds/usb_connected

 	#
 	# Testing


fix pack_git_submodule with subdir

fix pack_git_submodule with subdir

- `git archive HEAD:subdir -o archive.tar.gz` creates a different
  archive (different SHA1) each time
- calling `git archive HEAD -o archive.tar.gz` with the right working
  directory produces the same archive (same SHA1) each time

--- cmake/modules/hunter_pack_git_submodule.cmake
+++ cmake/modules/hunter_pack_git_submodule.cmake
@@ -201,13 +201,13 @@
     set(source_flag)
   else()
     hunter_status_debug("SUBMODULE_SOURCE_SUBDIR specified, only archive subfolder: ${x_SUBMODULE_SOURCE_SUBDIR}")
-    set(source_flag ":${x_SUBMODULE_SOURCE_SUBDIR}")
-  endif()
-
-  set(cmd "${GIT_EXECUTABLE}" archive HEAD${source_flag} -o "${archive}")
-  execute_process(
-      COMMAND ${cmd}
-      WORKING_DIRECTORY "${submodule_dir}"
+    set(source_flag "/${x_SUBMODULE_SOURCE_SUBDIR}")
+  endif()
+
+  set(cmd "${GIT_EXECUTABLE}" archive HEAD -o "${archive}")
+  execute_process(
+      COMMAND ${cmd}
+      WORKING_DIRECTORY "${submodule_dir}${source_flag}"
       RESULT_VARIABLE result
       OUTPUT_VARIABLE output
       ERROR_VARIABLE error


fix broken generate_from_xml macro

fix broken generate_from_xml macro

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -146,6 +146,7 @@
     file(TO_NATIVE_PATH "${OUTPUT_PATH}" OUTPUT_NATIVE_PATH)
     if(NOT EXISTS "${SOURCE_CPP_PATH}")
         # assures the source files are generated at least once
+        message(STATUS "${SOURCE_CPP_PATH}")
         execute_process(COMMAND "${PYTHON_EXECUTABLE}" "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" "${SOURCE_NATIVE_PATH}"
                         WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         )
@@ -153,7 +154,7 @@
     add_custom_command(
         OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.h" "${CMAKE_CURRENT_BINARY_DIR}/${BASE_NAME}.cpp"
         COMMAND ${PYTHON_EXECUTABLE} "${TOOL_NATIVE_PATH}" --outputPath "${OUTPUT_NATIVE_PATH}" ${BASE_NAME}.xml
-        MAIN_DEPENDENCY "${SOURCE_PATH}"
+        MAIN_DEPENDENCY "${BASE_NAME}.xml"
         DEPENDS
         "${CMAKE_SOURCE_DIR}/src/Tools/generateTemplates/templateClassPyExport.py"
         "${TOOL_PATH}"


Use libraries built for the newest gcc that tbb ships

--- projects/unix/tbb.cmake
+++ projects/unix/tbb.cmake
@@ -4,6 +4,6 @@
   set(tbb_archdir ia32)
 endif ()

-set(tbb_libdir lib/${tbb_archdir}/gcc4.4)
+set(tbb_libdir lib/${tbb_archdir}/gcc4.7)
 set(tbb_libsuffix "${CMAKE_SHARED_LIBRARY_SUFFIX}*")
 include(tbb.common)


Force to use external mysql lib instead of sources

Currently sources are not compiled on some VS

--- modules/worldengine/nucleus/src/cmake/platform/win/settings.cmake
+++ modules/worldengine/nucleus/src/cmake/platform/win/settings.cmake
@@ -1,5 +1,5 @@
 # Platform-specfic options
-option(USE_MYSQL_SOURCES "Use included MySQL-sources to build libraries" 1)
+option(USE_MYSQL_SOURCES "Use included MySQL-sources to build libraries" 0)

 # Package overloads
 set(ACE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/modules/worldengine/deps/acelite)


enh: Use lowercase package name for library include paths [CMake]

--- CMake/Modules/mirtkAddLibrary.cmake
+++ CMake/Modules/mirtkAddLibrary.cmake
@@ -45,7 +45,7 @@
   set(headers)
   foreach (hdr IN LISTS TARGET_HEADERS)
     if (NOT IS_ABSOLUTE "${hdr}")
-      set(hdr "${PROJECT_INCLUDE_DIR}/${hdr}")
+      set(hdr "${PROJECT_INCLUDE_DIR}/${PROJECT_PACKAGE_NAME_L}/${hdr}")
     endif ()
     list(APPEND headers "${hdr}")
   endforeach ()
@@ -91,7 +91,7 @@
     DEPRECATED_MACRO_NAME    "${PROJECT_NAME}_DEPRECATED"
     NO_DEPRECATED_MACRO_NAME "${PROJECT_NAME}_NO_DEPRECATED"
     STATIC_DEFINE            "${PROJECT_NAME}_STATIC_DEFINE"
-    EXPORT_FILE_NAME         "${BINARY_INCLUDE_DIR}/mirtk${PROJECT_NAME}Export.h"
+    EXPORT_FILE_NAME         "${BINARY_INCLUDE_DIR}/${PROJECT_PACKAGE_NAME_L}/${PROJECT_NAME}Export.h"
   )
   if (BUILD_SHARED_LIBS)
     if (WIN32)