Using absolute paths in generation script now.

--- scripts/regenerate_jni_headers.sh.cmake
+++ scripts/regenerate_jni_headers.sh.cmake
@@ -1,6 +1,6 @@
 #!/bin/bash

-cd client/Android/FreeRDPCore/jni/generated/
+cd @CMAKE_SOURCE_DIR@/client/Android/FreeRDPCore/jni/generated/
 javah -classpath ../../bin/classes:@ANDROID_SDK@/platforms/android-8/android.jar -jni com.freerdp.freerdpcore.services.LibFreeRDP
 rm com_freerdp_freerdpcore_services_LibFreeRDP_EventListener.h \
    com_freerdp_freerdpcore_services_LibFreeRDP_UIEventListener.h


Issue #57: Turn FLANN C-bindings OFF.

Issue #57: Turn FLANN C-bindings OFF.

--- CMake/ExternalProjects/FLANN.cmake
+++ CMake/ExternalProjects/FLANN.cmake
@@ -50,6 +50,7 @@
       #-DUSE_MPI:BOOL=${MYPROJECT_USE_MPI} Turning off for now, as you need a parallel version of HDF5.
       -DBUILD_MATLAB_BINDINGS:BOOL=OFF
       -DBUILD_PYTHON_BINDINGS:BOOL=OFF
+      -DBUILD_C_BINDINGS:BOOL=OFF
       -DBUILD_TESTS:BOOL=OFF
       -DCMAKE_DEBUG_POSTFIX:STRING=
     CMAKE_CACHE_ARGS


set lib path of the python lib

set lib path of the python lib

--- CMake/mitkMacroInstallPython.cmake
+++ CMake/mitkMacroInstallPython.cmake
@@ -16,12 +16,13 @@

 function(MITK_FUNCTION_INSTALL_PYTHON_MODULE _lib _conf)
   #MESSAGE("INSTALL : " ${_lib})
-  get_filename_component(_target_filename ${_lib} NAME)
+  get_filename_component(_target_filename "${_lib}" NAME)
+  get_filename_component(_lib_path "${_lib}" PATH)

   MITK_FUNCTION_INSTALL_PYTHON_LIB("${_target_filename}" "${_lib}" "${_conf}")

   # install all dependencies to this python library
-  get_prerequisites(${_lib} prereqs 1 1 bin "${VTK_DIR}/lib")
+  get_prerequisites(${_lib} prereqs 1 1 bin "${_lib_path}")

   foreach(_dep ${prereqs})
     #MESSAGE("DEPENDENCIE: " ${_dep})


FindVOTCA_TOOLS.cmake: fixed a typo

FindVOTCA_TOOLS.cmake: fixed a typo

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -54,7 +54,7 @@
   include(CheckLibraryExists)
   check_library_exists("${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}" VotcaToolsFromC "" FOUND_VOTCA_TOOLS_VERSION)
   if(NOT FOUND_VOTCA_TOOLS_VERSION)
-    message(FATAL_ERROR "Could not find VotcaToolsFromC in ${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set VOTCA_TOOLS_LIBRARY and VOTCA_TOOLS_DEP_LIBRARIES by hand, which set votca_tools lib  it's depencies (i.e. -DVOTCA_TOOLS_LIBRARY='/path/to/libvotca_tools.so" -VOTCA_TOOLS_DEP_LIBRARIES="/path/to/libgsl.so;/path/to/libm.so') !")
+    message(FATAL_ERROR "Could not find VotcaToolsFromC in ${VOTCA_TOOLS_LIBRARY};${VOTCA_TOOLS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set VOTCA_TOOLS_LIBRARY and VOTCA_TOOLS_DEP_LIBRARIES by hand, which set votca_tools lib  it's depencies (i.e. -DVOTCA_TOOLS_LIBRARY='/path/to/libvotca_tools.so' -DVOTCA_TOOLS_DEP_LIBRARIES='/path/to/libgsl.so;/path/to/libm.so') !")
   endif(NOT FOUND_VOTCA_TOOLS_VERSION)
 endif (VOTCA_TOOLS_FOUND)


Minor GPU-SD cmake tweak

Minor GPU-SD cmake tweak

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

--- GPUSD.cmake
+++ GPUSD.cmake
@@ -2,6 +2,10 @@
 if(GPUSD_ROOT)
   list(APPEND CMAKE_MODULE_PATH "${GPUSD_ROOT}/share/gpu-sd/CMake")
 endif()
+if(NOT "$ENV{GPUSD_ROOT}" STREQUAL "")
+  list(APPEND CMAKE_MODULE_PATH "$ENV{GPUSD_ROOT}/share/gpu-sd/CMake")
+endif()
+
 if(NOT EQUALIZER_RELEASE)
   list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake")
 endif()


CI: second attempt to capture CTest return code

--- CTest.cmake
+++ CTest.cmake
@@ -60,6 +60,8 @@
 ctest_test(RETURN_VALUE RES)
 ctest_submit( PARTS Test Update )

-if (RES GREATER 0)
-  message(FATAL_ERROR "Unit tests have return code > 0")
-endif()
+if (RES)
+  message(FATAL_ERROR "Unit tests have return code != 0")
+else (RES)
+  message(STATUS "Unit tests have return code ${RES}")
+endif(RES)


Minor cleanup.

Minor cleanup.

--- toolchains/android.toolchain.cmake
+++ toolchains/android.toolchain.cmake
@@ -208,7 +208,6 @@
 link_libraries( "-Wl,--no-undefined" "-Wl,-z,relro" "-Wl,-z,now" "-Wl,-z,nocopyreloc" )
 link_libraries( $<$<CONFIG:RELEASE>:-Wl,--gc-sections> )
 link_libraries( $<$<CONFIG:RELEASE>:-Wl,--icf=all>     ) # http://research.google.com/pubs/pub36912.html Safe ICF: Pointer Safe and Unwinding Aware Identical Code Folding in Gold
-#-fuse-ld=gold ...mrmlj...does not work with Android NDK r11 (but should be the default)

 include_directories( SYSTEM ${ANDROID_NDK}/sources/android/support/include               )


WIP: Removed retrieval/maintenance of source directory, as Jenkins should take care of that. Thereby fixed "CMake Error at src/CTest.cmake:45 (ctest_empty_binary_directory)" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-126-Make-compilation-logs-public/28/console W/ Floris.

--- CTest.cmake
+++ CTest.cmake
@@ -42,22 +42,12 @@
 set(CTEST_BUILD_CONFIGURATION Release)
 set(CTEST_BUILD_OPTIONS "-j4")

-ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
-
-
-if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-  set(CTEST_CHECKOUT_COMMAND "${GIT_EXECUTABLE} clone https://github.com/SuperElastix/SuperElastix.git ${CTEST_SOURCE_DIRECTORY}")
-endif()
-
-set(CTEST_UPDATE_COMMAND "${GIT_EXECUTABLE}")
-
-set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
+set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION} --build ${CTEST_BINARY_DIRECTORY}")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DWITH_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")

 ctest_start("Nightly")
-ctest_update()
 ctest_configure()
 ctest_build()
 ctest_test()


ENH: Modify Hippo settings

ENH: Modify Hippo settings

--- Hippo_Kitware_TubeTK_Nightly.cmake
+++ Hippo_Kitware_TubeTK_Nightly.cmake
@@ -22,12 +22,12 @@
 ##############################################################################

 ##############################################################################
-#
 # Configure the following variables and move this file to the directory above
-#   the TubeTK source directory.
-#
+# the TubeTK source directory.
+##############################################################################
+
 set( SITE_NAME "Hippo.Kitware" )
-set( SITE_PLATFORM "apple-darwin12.4.0-clang-x86_64" )
+set( SITE_PLATFORM "apple-darwin12.4.0-clang-x86_64-boost-cppcheck-libsvm-vtk" )
 set( SITE_BUILD_TYPE "RelWithDebInfo" )
 set( SITE_CTEST_MODE "Nightly" )
 set( SITE_CMAKE_GENERATOR "Unix Makefiles" )
@@ -36,7 +36,8 @@
 set( TUBETK_ROOT_DIR "/Users/snape/Development/TubeTK" )
 set( TUBETK_DASHBOARDS_DIR "${TUBETK_ROOT_DIR}/TubeTK-Dashboards" )
 set( TUBETK_SOURCE_DIR "${TUBETK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}" )
-set( TUBETK_BINARY_DIR "${TUBETK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}-${SITE_BUILD_TYPE}" )
+set( TUBETK_BINARY_DIR
+  "${TUBETK_ROOT_DIR}/TubeTK-${SITE_CTEST_MODE}-${SITE_BUILD_TYPE}" )

 set( ENV{DISPLAY} ":0" )

@@ -92,20 +93,18 @@
 set( SITE_NIGHTLY_UPLOAD ON )
 set( SITE_NIGHTLY_DOCUMENTATION OFF )
 set( SITE_NIGHTLY_STYLE OFF )
-set( SITE_NIGHTLY_BOOST OFF )
+set( SITE_NIGHTLY_BOOST ON )
 set( SITE_NIGHTLY_CPPCHECK ON )
 set( SITE_NIGHTLY_CTK OFF)
-set( SITE_NIGHTLY_LIBSVM OFF )
+set( SITE_NIGHTLY_LIBSVM ON )
 set( SITE_NIGHTLY_QT OFF )
 set( SITE_NIGHTLY_SIMPLEITK OFF )
 set( SITE_NIGHTLY_VTK ON )

 ##############################################################################
+# The following advanced variables should only be changed by experts.
+##############################################################################

-##############################################################################
-#
-# The following advanced variables should only be changed by experts
-#
 set( TUBETK_SCRIPT_DIR "${TUBETK_SOURCE_DIR}/CMake" )

 set( SITE_BUILD_NAME "${SITE_PLATFORM}-${SITE_BUILD_TYPE}" )
@@ -127,16 +126,25 @@
 set( CTEST_CTEST_COMMAND "${SITE_CTEST_COMMAND}" )
 set( CTEST_UPDATE_COMMAND "${SITE_UPDATE_COMMAND}" )
 set( CTEST_COVERAGE_COMMAND "${SITE_COVERAGE_COMMAND}" )
+
+set( SITE_MEMORYCHECK_COMMAND_OPTIONS
+  "--gen-suppressions=all --trace-children=yes -q --leak-check=yes --show-reachable=yes --num-callers=50" )
+set( SITE_MEMORYCHECK_SUPPRESSIONS_FILE
+  "${TUBETK_SCRIPT_DIR}/valgrind_suppressions.txt" )
+
 set( CTEST_MEMORYCHECK_COMMAND "${SITE_MEMORYCHECK_COMMAND}" )
 set( CTEST_MEMORYCHECK_COMMAND_OPTIONS "${SITE_MEMORYCHECK_COMMAND_OPTIONS}" )
 set( CTEST_MEMORYCHECK_SUPPRESSIONS_FILE "${SITE_MEMORYCHECK_SUPPRESSIONS_FILE}" )
+
 set( CTEST_COMMAND "${SITE_CTEST_COMMAND}" )

 set( SITE_EXECUTABLE_DIRS "${SITE_KWSTYLE_DIR}" )
 set( ENV{PATH} "${SITE_EXECUTABLE_DIRS}:$ENV{PATH}" )

-set( SITE_C_FLAGS "-fPIC -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -fno-diagnostics-fixit-info -fno-diagnostics-show-option -fno-show-column -fno-caret-diagnostics -fno-color-diagnostics" )
-set( SITE_CXX_FLAGS "-fPIC -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field -fno-diagnostics-fixit-info -fno-diagnostics-show-option -fno-show-column -fno-caret-diagnostics -fno-color-diagnostics" )
+set( SITE_C_FLAGS
+  "-fPIC -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -fno-diagnostics-fixit-info -fno-diagnostics-show-option -fno-show-column -fno-caret-diagnostics -fno-color-diagnostics" )
+set( SITE_CXX_FLAGS
+  "-fPIC -W -Wall -Wextra -Wshadow -Wno-system-headers -Wwrite-strings -Wno-deprecated -Wno-deprecated-declarations -Wno-incompatible-pointer-types -Wno-invalid-source-encoding -Wno-sometimes-uninitialized -Woverloaded-virtual -Wno-unused-private-field -fno-diagnostics-fixit-info -fno-diagnostics-show-option -fno-show-column -fno-caret-diagnostics -fno-color-diagnostics" )
 set( SITE_EXE_LINKER_FLAGS "" )
 set( SITE_SHARED_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS}" )

@@ -148,12 +156,11 @@
 if( SITE_NIGHTLY_COVERAGE OR SITE_CONTINUOUS_COVERAGE OR SITE_EXPERIMENTAL_COVERAGE )
   set( SITE_C_FLAGS "${SITE_C_FLAGS} ${COVERAGE_C_FLAGS}" )
   set( SITE_CXX_FLAGS "${SITE_CXX_FLAGS} ${COVERAGE_CXX_FLAGS}" )
-  set( SITE_EXE_LINKER_FLAGS "${SITE_EXE_LINKER_FLAGS} ${COVERAGE_EXE_LINKER_FLAGS}" )
-  set( SITE_SHARED_LINKER_FLAGS "${SITE_SHARED_LINKER_FLAGS} ${COVERAGE_SHARED_LINKER_FLAGS}" )
+  set( SITE_EXE_LINKER_FLAGS
+    "${SITE_EXE_LINKER_FLAGS} ${COVERAGE_EXE_LINKER_FLAGS}" )
+  set( SITE_SHARED_LINKER_FLAGS
+    "${SITE_SHARED_LINKER_FLAGS} ${COVERAGE_SHARED_LINKER_FLAGS}" )
 endif( SITE_NIGHTLY_COVERAGE OR SITE_CONTINUOUS_COVERAGE OR SITE_EXPERIMENTAL_COVERAGE )
-
-set( SITE_MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --trace-children=yes -q --leak-check=yes --show-reachable=yes --num-callers=50" )
-set( SITE_MEMORYCHECK_SUPPRESSIONS_FILE "${TUBETK_SCRIPT_DIR}/valgrind_suppressions.txt" )

 set( MEMORYCHECK_C_FLAGS "-g -O0 -ggdb" )
 set( MEMORYCHECK_CXX_FLAGS "${MEMORYCHECK_C_FLAGS}" )
@@ -165,8 +172,10 @@

 set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SITE_C_FLAGS}" )
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SITE_CXX_FLAGS}" )
-set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SITE_EXE_LINKER_FLAGS}" )
-set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SITE_SHARED_LINKER_FLAGS}" )
+set( CMAKE_EXE_LINKER_FLAGS
+  "${CMAKE_EXE_LINKER_FLAGS} ${SITE_EXE_LINKER_FLAGS}" )
+set( CMAKE_SHARED_LINKER_FLAGS
+  "${CMAKE_SHARED_LINKER_FLAGS} ${SITE_SHARED_LINKER_FLAGS}" )

 set( GITCOMMAND "${SITE_GIT_COMMAND}" )
 set( GIT_EXECUTABLE "${SITE_GIT_COMMAND}" )


cosmetics in .cmake

cosmetics in .cmake

--- refcnt.cmake
+++ refcnt.cmake
@@ -9,11 +9,11 @@

 # initialize this module
 macro    (refcntInit
-          ref_cnt_use_mode)
+          refcnt_use_mode)

     # default name
-    if (NOT REF_CNT_INIT_NAME)
-        set(REF_CNT_INIT_NAME "RefCnt")
+    if (NOT REFCNT_INIT_NAME)
+        set(REFCNT_INIT_NAME "RefCnt")
     endif ()

     # compose the list of headers and sources
@@ -23,15 +23,15 @@
         "refcnt.cc")

     pileSetSources(
-        "${REF_CNT_INIT_NAME}"
+        "${REFCNT_INIT_NAME}"
         "${REFCNT_HEADERS}"
         "${REFCNT_SOURCES}")

     pileSetCommon(
-        "${REF_CNT_INIT_NAME}"
+        "${REFCNT_INIT_NAME}"
         "0;0;1;d"
         "ON"
-        "${ref_cnt_use_mode}"
+        "${refcnt_use_mode}"
         ""
         "basics"
         "referece-count;management")


Fixed compilation warnings on OSX.

Fixed compilation warnings on OSX.

--- cmake/common/check_configuration.cmake
+++ cmake/common/check_configuration.cmake
@@ -128,8 +128,8 @@
             $<$<COMPILE_LANGUAGE:CXX>:-Woverloaded-virtual>
             -Wconversion
             -Wsign-conversion
-            -Wlogical-op
-            $<$<COMPILE_LANGUAGE:CXX>:-Wuseless-cast>
+            $<$<CXX_COMPILER_ID:GNU>:-Wlogical-op>
+            $<$<AND:$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:-Wuseless-cast>
             -Wdouble-promotion
             $<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast>
             $<$<OR:$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6.0.0>>>,$<AND:$<C_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<C_COMPILER_VERSION>,6.0.0>>>>:-Wnull-dereference>


Remove obsolete CMake module

Remove obsolete CMake module

--- cmake/modules/DeskvoxFindPackage.cmake
+++ cmake/modules/DeskvoxFindPackage.cmake
@@ -1,189 +0,0 @@
-# FindDeskvoxPackages.cmake
-
-
-#---------------------------------------------------------------------------------------------------
-# __deskvox_add_package(name)
-#
-
-
-macro(__deskvox_add_package name)
-  # Add include directory for the given package
-  # Treat 3rd-party headers as system headers and ignore warnings...
-  include_directories(SYSTEM ${DESKVOX_${name}_INCLUDE_DIR})
-
-  # Link with libraries provided by the given package
-  deskvox_link_libraries(${DESKVOX_${name}_LIBRARIES})
-endmacro()
-
-
-#---------------------------------------------------------------------------------------------------
-# deskvox_use_package(name)
-#
-
-
-macro(deskvox_use_package name)
-  if(NOT DESKVOX_${name}_FOUND)
-    message(FATAL_ERROR ${name} " not found")
-    return() # Return from function, file, ...
-  endif()
-  __deskvox_add_package(${name})
-endmacro()
-
-
-#---------------------------------------------------------------------------------------------------
-# deskvox_use_optional_package(name)
-#
-
-
-macro(deskvox_use_optional_package name)
-  if(NOT DESKVOX_${name}_FOUND)
-    #message(STATUS "Note: " ${CMAKE_CURRENT_SOURCE_DIR} ": optional package " ${name} " not found")
-  else()
-    __deskvox_add_package(${name})
-  endif()
-endmacro()
-
-
-#---------------------------------------------------------------------------------------------------
-# find packages
-#
-
-
-find_package(Bonjour)
-find_package(Boost)
-find_package(Cg)
-find_package(CUDA)
-find_package(FFMPEG)
-find_package(FOX)
-find_package(GLEW)
-find_package(GLUT)
-find_package(NORM)
-find_package(OpenGL)
-find_package(Protokit)
-find_package(Pthreads)
-find_package(SNAPPY)
-find_package(VolPack)
-if(NOT WIN32)
-    find_package(X11)
-endif()
-
-
-if(BONJOUR_FOUND)
-  set(DESKVOX_Bonjour_FOUND 1)
-  set(DESKVOX_Bonjour_INCLUDE_DIR ${BONJOUR_INCLUDE_DIR})
-  set(DESKVOX_Bonjour_LIBRARIES ${BONJOUR_LIBRARIES})
-else()
-  set(DESKVOX_Bonjour_FOUND 0)
-endif()
-
-if(Boost_FOUND)
-  set(DESKVOX_Boost_FOUND 1)
-  set(DESKVOX_Boost_INCLUDE_DIR ${Boost_INCLUDE_DIR})
-  set(DESKVOX_Boost_LIBRARIES ${Boost_LIBRARIES})
-else()
-  set(DESKVOX_Boost_FOUND 0)
-endif()
-
-if(CG_FOUND)
-  set(DESKVOX_Cg_FOUND 1)
-  set(DESKVOX_Cg_INCLUDE_DIR ${CG_INCLUDE_PATH})
-  set(DESKVOX_Cg_LIBRARIES ${CG_LIBRARY} ${CG_GL_LIBRARY})
-else()
-  set(DESKVOX_Cg_FOUND 0)
-endif()
-
-if(CUDA_FOUND)
-  set(DESKVOX_CUDA_FOUND 1)
-  set(DESKVOX_CUDA_INCLUDE_DIR ${CUDA_TOOLKIT_INCLUDE})
-  set(DESKVOX_CUDA_LIBRARIES ${CUDA_LIBRARIES})
-else()
-  set(DESKVOX_CUDA_FOUND 0)
-endif()
-
-if(FFMPEG_FOUND)
-  set(DESKVOX_FFMPEG_FOUND 1)
-  set(DESKVOX_FFMPEG_INCLUDE_DIR ${FFMPEG_INCLUDE_DIR})
-  set(DESKVOX_FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES})
-else()
-  set(DESKVOX_FFMPEG_FOUND 0)
-endif()
-
-if(FOX_FOUND)
-  set(DESKVOX_FOX_FOUND 1)
-  set(DESKVOX_FOX_INCLUDE_DIR ${FOX_INCLUDE_DIR})
-  set(DESKVOX_FOX_LIBRARIES ${FOX_LIBRARY})
-else()
-  set(DESKVOX_FOX_FOUND 0)
-endif()
-
-if(GLEW_FOUND)
-  set(DESKVOX_GLEW_FOUND 1)
-  set(DESKVOX_GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIR})
-  set(DESKVOX_GLEW_LIBRARIES ${GLEW_LIBRARY})
-else()
-  set(DESKVOX_GLEW_FOUND 0)
-endif()
-
-if(GLUT_FOUND)
-  set(DESKVOX_GLUT_FOUND 1)
-  set(DESKVOX_GLUT_INCLUDE_DIR ${GLUT_INCLUDE_DIR})
-  set(DESKVOX_GLUT_LIBRARIES ${GLUT_LIBRARY})
-else()
-  set(DESKVOX_GLUT_FOUND 0)
-endif()
-
-if(NORM_FOUND)
-  set(DESKVOX_NORM_FOUND 1)
-  set(DESKVOX_NORM_INCLUDE_DIR ${NORM_INCLUDE_DIRS})
-  set(DESKVOX_NORM_LIBRARIES ${NORM_LIBRARIES})
-else()
-  set(DESKVOX_NORM_FOUND 0)
-endif()
-
-if(OPENGL_FOUND)
-  set(DESKVOX_OpenGL_FOUND 1)
-  set(DESKVOX_OpenGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR})
-  set(DESKVOX_OpenGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
-else()
-  set(DESKVOX_OpenGL_FOUND 0)
-endif()
-
-if(PROTOKIT_FOUND)
-  set(DESKVOX_Protokit_FOUND 1)
-  set(DESKVOX_Protokit_INCLUDE_DIR ${PROTOKIT_INCLUDE_DIR})
-  set(DESKVOX_Protokit_LIBRARIES ${PROTOKIT_LIBRARIES})
-else()
-  set(DESKVOX_Protokit_FOUND 0)
-endif()
-
-if(PTHREADS_FOUND)
-  set(DESKVOX_Pthreads_FOUND 1)
-  set(DESKVOX_Pthreads_INCLUDE_DIR ${Pthreads_INCLUDE_DIR})
-  set(DESKVOX_Pthreads_LIBRARIES ${Pthreads_LIBRARY})
-else()
-  set(DESKVOX_Pthreads_FOUND 0)
-endif()
-
-if(SNAPPY_FOUND)
-  set(DESKVOX_SNAPPY_FOUND 1)
-  set(DESKVOX_SNAPPY_INCLUDE_DIR ${SNAPPY_INCLUDE_DIR})
-  set(DESKVOX_SNAPPY_LIBRARIES ${SNAPPY_LIBRARIES})
-else()
-  set(DESKVOX_SNAPPY_FOUND 0)
-endif()
-
-if(VOLPACK_FOUND)
-  set(DESKVOX_VolPack_FOUND 1)
-  set(DESKVOX_VolPack_INCLUDE_DIR ${VOLPACK_INCLUDE_DIR})
-  set(DESKVOX_VolPack_LIBRARIES ${VOLPACK_LIBRARIES})
-else()
-  set(DESKVOX_VolPack_FOUND 0)
-endif()
-
-if(X11_FOUND)
-  set(DESKVOX_X11_FOUND 1)
-  set(DESKVOX_X11_INCLUDE_DIR ${X11_INCLUDE_DIR})
-  set(DESKVOX_X11_LIBRARIES ${X11_LIBRARIES})
-else()
-  set(DESKVOX_X11_FOUND 0)
-endif()


Update PACKAGE_INTERNAL_DEPS_ID

Update PACKAGE_INTERNAL_DEPS_ID

--- cmake/projects/odb-sqlite/hunter.cmake
+++ cmake/projects/odb-sqlite/hunter.cmake
@@ -28,4 +28,5 @@
     PACKAGE_UNRELOCATABLE_TEXT_FILES
     "lib/libodb-sqlite.la"
     "lib/pkgconfig/libodb-sqlite.pc"
+    PACKAGE_INTERNAL_DEPS_ID "1"
 )


[Config] Fixed a typo in a CMake list

[Config] Fixed a typo in a CMake list

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -696,7 +696,7 @@
 	# distribution, it can be libboost_python3 or libboost_python3x
 	if (${Boost_PYTHON3_FOUND})
 	  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1})
-	  list (BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
 	endif (${Boost_PYTHON3_FOUND})

 	if (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})


[Build] First attempt to add support for test-only modules.


cmake: add gen-gpg-testkey to default tools

Quick-fix for #2668 .

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -66,7 +66,7 @@

 remember_for_removal (TOOLS TO_REMOVE_TOOLS)

-set (TOOLS_LIST_DEFAULT kdb)
+set (TOOLS_LIST_DEFAULT kdb gen-gpg-testkey)

 if (TOOLS MATCHES "DEFAULT")
 	set (TOOLS_FORCE FORCE)


Oops!  It's GLES not GL :)

Oops!  It's GLES not GL :)

--- cmake/FindOpenGLES.cmake
+++ cmake/FindOpenGLES.cmake
@@ -17,7 +17,7 @@
     set (OPENGLES_INCLUDE_DIR ${OPENGLES_H_PATH})
     set (OPENGLES_LIBRARIES ${OPENGLES_LIB})
     if (OPENGLES_LIB_DBG)
-        set (OPENGL_LIBRARIES_DBG ${OPENGLES_LIB_DBG})
+        set (OPENGLES_LIBRARIES_DBG ${OPENGLES_LIB_DBG})
     endif()
 else()
     set (OPENGLES_INCLUDE_DIR)


Debug travis

Debug travis

--- cmake/GetLibStdCXX.cmake
+++ cmake/GetLibStdCXX.cmake
@@ -1,6 +1,8 @@

 include(ProcessorCount)
 ProcessorCount(N)
+
+message(STATUS "LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH}")

 if(UNIX AND NOT APPLE AND NOT WIN32)


[jancy] release 1.8.5

[jancy] release 1.8.5

--- version.cmake
+++ version.cmake
@@ -11,7 +11,7 @@

 set (JANCY_VERSION_MAJOR     1)
 set (JANCY_VERSION_MINOR     8)
-set (JANCY_VERSION_REVISION  4)
+set (JANCY_VERSION_REVISION  5)
 set (JANCY_VERSION_TAG)

 set (JANCY_VERSION_FULL "${JANCY_VERSION_MAJOR}.${JANCY_VERSION_MINOR}.${JANCY_VERSION_REVISION}")


fix xpu cmake lib name. test=kunlun (#41786)

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -52,7 +52,7 @@
   SET(XPU_XDNN_URL "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)
 ELSE()
   SET(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
-  SET(XPU_XDNN_DIR_NAME "XDNN-bdcentos_x86_64")
+  SET(XPU_XDNN_DIR_NAME "XDNN-ubuntu_x86_64")
   SET(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
   # default: use output by XDNN API team
   SET(XPU_XDNN_URL "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz" CACHE STRING "" FORCE)


Split off 5.0.2

Split off 5.0.2

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 5 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 1 )
+set ( HPCC_POINT 3 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Correct .x branch version info

Correct .x branch version info

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 8 )
-set ( HPCC_POINT 0 )
+set ( HPCC_POINT 1 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Export -march=native for Clang and prevent it from being included during cross compilation.

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -4,18 +4,9 @@
     set(SSE_FLAGS)
     set(SSE_DEFINITIONS)

-    # Test CLANG
-    #if(CMAKE_COMPILER_IS_CLANG)
-    #  if(APPLE)
-    #    SET(SSE_FLAGS "${SSE_FLAGS} -march=native")
-    #  endif(APPLE)
-    #endif(CMAKE_COMPILER_IS_CLANG)
-
-    # Test GCC/G++
-    if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        execute_process(COMMAND ${CMAKE_CXX_COMPILER} "-dumpversion"
-                        OUTPUT_VARIABLE GCC_VERSION_STRING)
-        if(GCC_VERSION_STRING VERSION_GREATER 4.2 AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING)
+    if(NOT CMAKE_CROSSCOMPILING)
+        # Test GCC/G++ and CLANG
+        if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANG)
             list(APPEND SSE_FLAGS "-march=native")
             message(STATUS "Using CPU native flags for SSE optimization: ${SSE_FLAGS}")
         endif()


Tried to fix version.cmake which was not really broken - fixed the problem elsewhere.

--- version.cmake
+++ version.cmake
@@ -28,32 +28,18 @@
 		OUTPUT_STRIP_TRAILING_WHITESPACE
 	)
 	message(" Git describe: ${GIT_DESCRIBE}")
-
-	if ("${GIT_DESCRIBE}" STREQUAL "")
-		set(ODC_MAJOR_VERSION "0")
-		set(ODC_MINOR_VERSION "0")
-		set(ODC_MICRO_VERSION "0")
-		set(ODC_RC_VERSION "")
-		set(ODC_AHEAD_VERSION "0")
-		set(ODC_VERSION "${ODC_MAJOR_VERSION}.${ODC_MINOR_VERSION}.${ODC_MICRO_VERSION}${ODC_RC_VERSION}")
+	string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-RC[0-9]+)?-([0-9]+)-([^-]+)-?([^-]*)$" GIT_REPO_MATCH ${GIT_DESCRIBE})
+	#message("Matched version: ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${CMAKE_MATCH_3} ${CMAKE_MATCH_4}")

-		set(GIT_REPO_COMMIT "TESTBUILD")
-		set(GIT_REPO_DIRTY "")
-	else()
-		string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-RC[0-9]+)?-([0-9]+)-([^-]+)-?([^-]*)$" GIT_REPO_MATCH ${GIT_DESCRIBE})
-		#message("Matched version: ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${CMAKE_MATCH_3} ${CMAKE_MATCH_4}")
+	set(ODC_MAJOR_VERSION ${CMAKE_MATCH_1})
+	set(ODC_MINOR_VERSION ${CMAKE_MATCH_2})
+	set(ODC_MICRO_VERSION ${CMAKE_MATCH_3})
+	set(ODC_RC_VERSION ${CMAKE_MATCH_4})
+	set(ODC_AHEAD_VERSION ${CMAKE_MATCH_5})
+	set(ODC_VERSION "${ODC_MAJOR_VERSION}.${ODC_MINOR_VERSION}.${ODC_MICRO_VERSION}${ODC_RC_VERSION}")

-		set(ODC_MAJOR_VERSION ${CMAKE_MATCH_1})
-		set(ODC_MINOR_VERSION ${CMAKE_MATCH_2})
-		set(ODC_MICRO_VERSION ${CMAKE_MATCH_3})
-		set(ODC_RC_VERSION ${CMAKE_MATCH_4})
-		set(ODC_AHEAD_VERSION ${CMAKE_MATCH_5})
-		set(ODC_VERSION "${ODC_MAJOR_VERSION}.${ODC_MINOR_VERSION}.${ODC_MICRO_VERSION}${ODC_RC_VERSION}")
-
-		set(GIT_REPO_COMMIT ${CMAKE_MATCH_6})
-		set(GIT_REPO_DIRTY ${CMAKE_MATCH_7})
-	endif()
-
+	set(GIT_REPO_COMMIT ${CMAKE_MATCH_6})
+	set(GIT_REPO_DIRTY ${CMAKE_MATCH_7})
 	message("-- opendatacon version: ${ODC_VERSION} ${GIT_REPO_COMMIT}(${ODC_AHEAD_VERSION} ahead) ${GIT_REPO_DIRTY}")

 	execute_process(


Add _d to perf executable if we compile with VS

Change-Id: I9ef488314ddf8007fd1f5a58c44b3660b3af3660
Reviewed-on: http://gerrit.aldebaran.lan:8080/13553
Tested-by: gerrit
Reviewed-by: proullon <ffff9135679d397f48dd743107119b1f6fc32d3d@aldebaran-robotics.com>
Tested-by: proullon <ffff9135679d397f48dd743107119b1f6fc32d3d@aldebaran-robotics.com>

--- cmake/qibuild/perf.cmake
+++ cmake/qibuild/perf.cmake
@@ -40,7 +40,11 @@

   set(_out_file ${_perf_dir}/${name}.xml)
   # add it to the list, to be run with qibuild test --perf
-  set(_to_write "${name}")
+  if (MSVC AND DEBUG)
+    set(_to_write "${name}_d")
+  else()
+    set(_to_write "${name}")
+  endif()
   if (NOT "${_args}" STREQUAL "")
     set(_to_write "${_to_write};${_args}")
   endif()


fix in SM.cmkae to correctly find the non free module in opencv 3;

--- SM/SM.cmake
+++ SM/SM.cmake
@@ -24,10 +24,15 @@
 	set(SEARCH_PARAMS ${SEARCH_PARAMS} GridTrackerFlow RKLT)
 endif(WITH_GRID_TRACKERS)
 if(WITH_FEAT)
+	if(NOT "${OPENCV_VERSION}" STREQUAL "3")̀
 	# message(STATUS "OpenCV_LIBRARIES: ${OpenCV_LIBRARIES}")
-	findSubPart("${OpenCV_LIBRARIES}" "opencv_nonfree" CV_NONFREE_FOUND)
+		findSubPart("${OpenCV_LIBRARIES}" "opencv_nonfree" CV_NONFREE_FOUND)
+	else()
+		findSubPart("${OpenCV_LIBRARIES}" "opencv_xfeatures2d" CV_NONFREE_FOUND)
+	endif()
 	# message(STATUS "CV_NONFREE_FOUND: ${CV_NONFREE_FOUND}")
-	if(CV_NONFREE_FOUND)
+	if(CV_NONFREE_FOUND)
+		message(STATUS "Feature based grid tracker is enabled")
 		set(COMPOSITE_SEARCH_METHODS ${COMPOSITE_SEARCH_METHODS} FeatureTracker)
 		set(FEAT_ENABLED ON)
 	else(CV_NONFREE_FOUND)


Ignore stderr from the linker when checking from gold

This was manifesting as a cmake warning when building external clients.
When gcc is using ld.bfd, it calls collect2 which always prints to
stderr, so there's no reason to check it.

Fixes issue 1109.

Review URL: https://codereview.appspot.com/7512043

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

--- make/utils.cmake
+++ make/utils.cmake
@@ -93,11 +93,11 @@
   else ()
     execute_process(COMMAND ${CMAKE_C_COMPILER} -Wl,--version
       RESULT_VARIABLE ld_result
-      ERROR_VARIABLE ld_error
+      ERROR_QUIET  # gcc's collect2 always writes to stderr, so ignore it.
       OUTPUT_VARIABLE ld_out)
     set(is_gold OFF)
-    if (${ld_result} OR ${ld_error})
-      message(WARNING "failed to get linker version: assuming ld.bfd")
+    if (ld_result)
+      message("failed to get linker version, assuming ld.bfd (${ld_result})")
     elseif ("${ld_out}" MATCHES "GNU gold")
       set(is_gold ON)
     endif ()


modules: added MAGNUM_BINARY_INSTALL_DIR variable to FindMagnum.cmake.

Will be used in depending projects for e.g. installing DLLs on Windows.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -96,6 +96,7 @@
 #  MAGNUM_*_LIBRARY             - Component libraries (w/o dependencies)
 #  MAGNUM_*_LIBRARY_DEBUG       - Debug version of given library, if found
 #  MAGNUM_*_LIBRARY_RELEASE     - Release version of given library, if found
+#  MAGNUM_BINARY_INSTALL_DIR    - Binary installation directory
 #  MAGNUM_LIBRARY_INSTALL_DIR   - Library installation directory
 #  MAGNUM_PLUGINS_[DEBUG|RELEASE]_INSTALL_DIR - Plugin installation directory
 #  MAGNUM_PLUGINS_FONT_[DEBUG|RELEASE]_INSTALL_DIR - Font plugin installation
@@ -460,6 +461,7 @@

 # Installation dirs
 include(CorradeLibSuffix)
+set(MAGNUM_BINARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
 set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
 set(MAGNUM_PLUGINS_DEBUG_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
 set(MAGNUM_PLUGINS_RELEASE_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
@@ -481,6 +483,7 @@
     MAGNUM_LIBRARY_RELEASE
     MAGNUM_LIBRARY
     MAGNUM_INCLUDE_DIR
+    MAGNUM_BINARY_INSTALL_DIR
     MAGNUM_LIBRARY_INSTALL_DIR
     MAGNUM_PLUGINS_DEBUG_INSTALL_DIR
     MAGNUM_PLUGINS_RELEASE_INSTALL_DIR


modules: fix Application and Context aliases for superprojects.

Oh well :(

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -616,7 +616,7 @@
 if(_MAGNUM_WINDOWLESSAPPLICATION_ALIAS AND NOT TARGET Magnum::WindowlessApplication)
     get_target_property(_MAGNUM_WINDOWLESSAPPLICATION_ALIASED_TARGET ${_MAGNUM_WINDOWLESSAPPLICATION_ALIAS} ALIASED_TARGET)
     if(_MAGNUM_WINDOWLESSAPPLICATION_ALIASED_TARGET)
-        add_library(${_MAGNUM_WINDOWLESSAPPLICATION_ALIAS} ALIAS ${_MAGNUM_WINDOWLESSAPPLICATION_ALIASED_TARGET})
+        add_library(Magnum::WindowlessApplication ALIAS ${_MAGNUM_WINDOWLESSAPPLICATION_ALIASED_TARGET})
     else()
         add_library(Magnum::WindowlessApplication UNKNOWN IMPORTED)
         get_target_property(_MAGNUM_WINDOWLESSAPPLICATION_IMPORTED_CONFIGURATIONS ${_MAGNUM_WINDOWLESSAPPLICATION_ALIAS} IMPORTED_CONFIGURATIONS)
@@ -646,7 +646,7 @@
 if(_MAGNUM_APPLICATION_ALIAS AND NOT TARGET Magnum::Application)
     get_target_property(_MAGNUM_APPLICATION_ALIASED_TARGET ${_MAGNUM_APPLICATION_ALIAS} ALIASED_TARGET)
     if(_MAGNUM_APPLICATION_ALIASED_TARGET)
-        add_library(${_MAGNUM_APPLICATION_ALIAS} ALIAS ${_MAGNUM_APPLICATION_ALIASED_TARGET})
+        add_library(Magnum::Application ALIAS ${_MAGNUM_APPLICATION_ALIASED_TARGET})
     else()
         add_library(Magnum::Application UNKNOWN IMPORTED)
         get_target_property(_MAGNUM_APPLICATION_IMPORTED_CONFIGURATIONS ${_MAGNUM_APPLICATION_ALIAS} IMPORTED_CONFIGURATIONS)
@@ -676,7 +676,7 @@
 if(_MAGNUM_CONTEXT_ALIAS AND NOT TARGET Magnum::Context)
     get_target_property(_MAGNUM_CONTEXT_ALIASED_TARGET ${_MAGNUM_CONTEXT_ALIAS} ALIASED_TARGET)
     if(_MAGNUM_CONTEXT_ALIASED_TARGET)
-        add_library(${_MAGNUM_CONTEXT_ALIAS} ALIAS ${_MAGNUM_CONTEXT_ALIASED_TARGET})
+        add_library(Magnum::Context ALIAS ${_MAGNUM_CONTEXT_ALIASED_TARGET})
     else()
         add_library(Magnum::Context UNKNOWN IMPORTED)
         get_target_property(_MAGNUM_CONTEXT_IMPORTED_CONFIGURATIONS ${_MAGNUM_CONTEXT_ALIAS} IMPORTED_CONFIGURATIONS)


PROTON-1033: Bump the master so version to 5 in preparation for the next release

--- proton-c/soversion.cmake
+++ proton-c/soversion.cmake
@@ -1,2 +1,2 @@
-set (PN_LIB_SOMAJOR 3)
+set (PN_LIB_SOMAJOR 5)
 set (PN_LIB_SOMINOR "0.0")


WRG: update tag for diapotb

WRG: update tag for diapotb

--- Modules/Remote/diapotb.remote.cmake
+++ Modules/Remote/diapotb.remote.cmake
@@ -22,5 +22,5 @@
 otb_fetch_module(DiapOTBModule
   "OTB module for SAR processing in Diapason."
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/remote_modules/diapotb.git
-  GIT_TAG ac9fb0371a262d5cc405bc72d39033963e6380f0
+  GIT_TAG fd23cdce7e9b0262320ae4a4dc1a34d88604d049
 )


3.7.dev

--- Numerics/cmake/SiconosVersion.cmake
+++ Numerics/cmake/SiconosVersion.cmake
@@ -1,3 +1,3 @@
 SET(MAJOR_VERSION 3)
-SET(MINOR_VERSION 6)
-SET(PATCH_VERSION 0)
+SET(MINOR_VERSION 7)
+SET(PATCH_VERSION dev)


Update Build.cmake (support for FreeBSD 10+)

Proposed fix for building on FreeBSD 10+ systems:
- c++abi and rt libs are not required
- pthread flag and execinfo lib is required

--- Build.cmake
+++ Build.cmake
@@ -23,12 +23,17 @@
 IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang")
    MESSAGE("")
    MESSAGE("cmake for Clang ")
-   IF (APPLE)
+   SET(CMAKE_CXX_FLAGS "-Wall -std=c++11 -stdlib=libc++ -Wunused -D_GLIBCXX_USE_NANOSLEEP")
+   IF (${CMAKE_SYSTEM} MATCHES "FreeBSD-([0-9]*)\\.(.*)")
+       IF (${CMAKE_MATCH_1} GREATER 9)
+           set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
+           set(PLATFORM_LINK_LIBRIES execinfo)
+       ENDIF()
+   ELSEIF (APPLE)
        set(PLATFORM_LINK_LIBRIES c++abi)
    ELSE()
-       set(PLATFORM_LINK_LIBRIES rt  c++abi)
+       set(PLATFORM_LINK_LIBRIES rt c++abi)
    ENDIF()
-  SET(CMAKE_CXX_FLAGS  "-Wall -std=c++11 -stdlib=libc++ -Wunused -D_GLIBCXX_USE_NANOSLEEP")


Missed the full version string in taglib-config.cmd.cmake

--- taglib-config.cmd.cmake
+++ taglib-config.cmd.cmake
@@ -29,7 +29,7 @@
 :doit
 if /i "%1#" == "--libs#"    echo -L${LIB_INSTALL_DIR} -llibtag
 if /i "%1#" == "--cflags#"  echo -I${INCLUDE_INSTALL_DIR}/taglib
-if /i "%1#" == "--version#" echo ${TAGLIB_LIB_MAJOR_VERSION}.${TAGLIB_LIB_MINOR_VERSION}.${TAGLIB_LIB_PATCH_VERSION}
+if /i "%1#" == "--version#" echo ${TAGLIB_LIB_VERSION_STRING}
 if /i "%1#" == "--prefix#"  echo ${CMAKE_INSTALL_PREFIX}

 :theend


Reenable tests that use matrix_set_diag op. (#13708)

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -199,7 +199,7 @@
     "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/preprocessing/*_test.py"
     "${tensorflow_source_dir}/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py"
     # flaky tests
-    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cwise_ops_test.py"
+    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cwise_ops_test.py"  # takes very long to run
     "${tensorflow_source_dir}/tensorflow/contrib/tfprof/python/tools/tfprof/internal/run_metadata_test.py"
     # Loading resources in contrib doesn't seem to work on Windows
     "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/client/random_forest_test.py"
@@ -225,11 +225,6 @@
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/string_to_number_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/clip_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/tensor_array_ops_test.py"  # Needs portpicker.
-      # Matrix_set_diag failing on GPU on windows.
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cholesky_op_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/diag_op_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/linalg_ops_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/init_ops_test.py"
       # Type error in testRemoteIteratorUsingRemoteCallOpDirectSessionGPUCPU.
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/iterator_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/self_adjoint_eig_op_test.py"
@@ -251,7 +246,6 @@
       "${tensorflow_source_dir}/tensorflow/python/training/server_lib_test.py"  # Test occasionally deadlocks.
       "${tensorflow_source_dir}/tensorflow/python/debug/lib/session_debug_multi_gpu_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/concat_op_test.py"  # numerical issues
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/linalg_grad_test.py"  # cudaSolver handle creation fails.

       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/array_ops_test.py"  # depends on python/framework/test_ops
       # Dataset tests


Removing override for RelWithDebInfo and MinSizeRel

--- conan.cmake
+++ conan.cmake
@@ -48,9 +48,6 @@
         set(_SETTINGS -g cmake)
     endif()
     if(CMAKE_BUILD_TYPE)
-        if(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-            set(CMAKE_BUILD_TYPE "Release")
-        endif()
         set(_SETTINGS ${_SETTINGS} -s build_type=${CMAKE_BUILD_TYPE})
     else()
         message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")
@@ -90,7 +87,7 @@
     elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
         string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION})
         list(GET VERSION_LIST 0 MAJOR)
-        list(GET VERSION_LIST 1 MINOR)
+        list(GET VERSION_LIST 1 MINOR)
         if(APPLE)
             cmake_policy(GET CMP0025 APPLE_CLANG_POLICY_ENABLED)
             if(NOT APPLE_CLANG_POLICY_ENABLED)


Manually re-add evaluation exclusion because git keeps deleting it

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -162,6 +162,7 @@
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/py_func_test.py"
       # training tests
       "${tensorflow_source_dir}/tensorflow/python/training/basic_session_run_hooks_test.py"  # Needs tf.contrib fix.
+      "${tensorflow_source_dir}/tensorflow/python/training/evaluation_test.py"  # Needs tf.contrib fix.
       "${tensorflow_source_dir}/tensorflow/python/training/localhost_cluster_performance_test.py"  # Needs portpicker.
       "${tensorflow_source_dir}/tensorflow/python/training/monitored_session_test.py"  # Needs tf.contrib fix.
       "${tensorflow_source_dir}/tensorflow/python/training/saver_large_variable_test.py"  # Overflow error.


Add help command

Add help command

--- install_deps.cmake
+++ install_deps.cmake
@@ -7,11 +7,23 @@

 include(CMakeParseArguments)

-set(options)
+set(options help)
 set(oneValueArgs --prefix)
 set(multiValueArgs)

 cmake_parse_arguments(PARSE "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGS})
+
+if(PARSE_help)
+message("Usage: install_deps.cmake [options] [cmake-args]")
+message("")
+message("Options:")
+message("  --prefix               Set the prefix to install the dependencies.")
+message("")
+message("Commands:")
+message("  help                   Show this message and exit.")
+message("")
+return()
+endif()

 set(_PREFIX /usr/local)
 if(PARSE_--prefix)


Exclude evaluation_test.py on win till contrib to core move fixed.


Changes from review

Changes from review

--- conan.cmake
+++ conan.cmake
@@ -540,8 +540,6 @@
     # Example usage:
     #    conan_add_remote(NAME bincrafters INDEX 1
     #       URL https://api.bintray.com/conan/bincrafters/public-conan)
-    conan_check()
-
     set(oneValueArgs URL NAME INDEX)
     cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN})

@@ -549,6 +547,7 @@
         set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}")
     endif()

+    conan_check()
     message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL})")
     execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
       ${CONAN_INDEX_ARG} -f)


Add support for the cmake-multi generator

--- conan.cmake
+++ conan.cmake
@@ -13,9 +13,14 @@

   message(STATUS "Conan ** WARNING** : This detection of settings from cmake is experimental and incomplete. "
                   "Please check 'conan.cmake' and contribute")
-
+
+  if(CONAN_CMAKE_MULTI)
+    set(_SETTINGS -g cmake_multi)
+  else()
+    set(_SETTINGS -g cmake)
+  endif()
   if(CMAKE_BUILD_TYPE)
-    set(_SETTINGS -s build_type=${CMAKE_BUILD_TYPE})
+    set(_SETTINGS ${_SETTINGS} -s build_type=${CMAKE_BUILD_TYPE})
   else()
     message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")
   endif()
@@ -174,22 +179,39 @@

 macro(conan_load_buildinfo)
+    if(CONAN_CMAKE_MULTI)
+	  set(_CONANBUILDINFO conanbuildinfo_multi.cmake)
+	else()
+	  set(_CONANBUILDINFO conanbuildinfo.cmake)
+	endif()
     # Checks for the existence of conanbuildinfo.cmake, and loads it
     # important that it is macro, so variables defined at parent scope
-    if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
-      message(STATUS "Conan: Loading conanbuildinfo.cmake")
-      include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
-    else()
-      message(FATAL_ERROR "conanbuildinfo doesn't exist in ${CMAKE_BINARY_DIR}")
+    if(EXISTS "${CMAKE_BINARY_DIR}/${_CONANBUILDINFO}")
+      message(STATUS "Conan: Loading ${_CONANBUILDINFO}")
+      include(${CMAKE_BINARY_DIR}/${_CONANBUILDINFO})
+    else()
+      message(FATAL_ERROR "${_CONANBUILDINFO} doesn't exist in ${CMAKE_BINARY_DIR}")
     endif()
 endmacro()

 macro(conan_cmake_run)
     parse_arguments(${ARGV})
-    conan_cmake_settings(settings)
     conan_cmake_generate_conanfile(${ARGV})
-    conan_cmake_install(SETTINGS ${settings} ${ARGV})
+    if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
+        set(CONAN_CMAKE_MULTI ON)
+        message(STATUS "Conan: Using cmake-multi generator")
+        foreach(CMAKE_BUILD_TYPE "Release" "Debug")
+            conan_cmake_settings(settings)
+            conan_cmake_install(SETTINGS ${settings} ${ARGV})
+        endforeach()
+        set(CMAKE_BUILD_TYPE)
+    else()
+        set(CONAN_CMAKE_MULTI OFF)
+        conan_cmake_settings(settings)
+        conan_cmake_install(SETTINGS ${settings} ${ARGV})
+    endif()
+
     conan_load_buildinfo()

     if(ARGUMENTS_BASIC_SETUP)


BUG: Fix previous change.  Exporting from the build tree needs the full path for classes not in the source tree.  Exporting from the install tree should have only the class name because all classes are in one place in the install tree.

--- CMake/vtkExportKit.cmake
+++ CMake/vtkExportKit.cmake
@@ -1,9 +1,18 @@
 #-----------------------------------------------------------------------------
 MACRO(VTK_EXPORT_KIT kit ukit sources)
+  SET(VTK_EXPORT_KIT ${kit})
+  SET(VTK_EXPORT_UKIT ${ukit})
+  SET(VTK_EXPORT_KIT_DOLLAR "$")
+
+  # Export the list of classes from the install tree.
+  SET(VTK_EXPORT_HEADER_DIR ${VTK_EXPORT_KIT_DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_INCLUDE_DIR})
   SET(KIT_CLASS_LIST)
   SET(KIT_ABSTRACT_LIST)
   SET(KIT_EXCLUDE_LIST)
   FOREACH(src ${sources})
+    # Get the class name from the full file name.  All class headers
+    # will be installed to the same directory for this kit in the
+    # install tree.
     GET_FILENAME_COMPONENT(CLASS "${src}" NAME_WE)
     SET(KIT_CLASS_LIST "${KIT_CLASS_LIST}\n  \"${CLASS}\"")
     GET_SOURCE_FILE_PROPERTY(IS_ABSTRACT ${src} ABSTRACT)
@@ -15,18 +24,8 @@
       SET(KIT_EXCLUDE_LIST "${KIT_EXCLUDE_LIST}\n  \"${CLASS}\"")
     ENDIF(IS_EXCLUDE MATCHES "^1$")
   ENDFOREACH(src)
-  SET(VTK_EXPORT_KIT ${kit})
-  SET(VTK_EXPORT_UKIT ${ukit})
-  SET(VTK_EXPORT_KIT_DOLLAR "$")
-  SET(VTK_EXPORT_HEADER_DIR ${VTK_EXPORT_KIT_DOLLAR}{VTK_INSTALL_PREFIX}${VTK_INSTALL_INCLUDE_DIR})
   CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkKit.cmake.in
                  ${VTK_BINARY_DIR}/Utilities/InstallOnly/vtk${kit}Kit.cmake
-                 @ONLY IMMEDIATE)
-  SET(VTK_EXPORT_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-
-  # This file is also used when converting Tcl tests to python tests.
-  CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkKit.cmake.in
-                 ${VTK_BINARY_DIR}/Utilities/vtk${kit}Kit.cmake
                  @ONLY IMMEDIATE)
   IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
     INSTALL(FILES
@@ -34,4 +33,29 @@
       DESTINATION "${VTK_INSTALL_PACKAGE_DIR_CM24}"
       COMPONENT Development)
   ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
+
+  # Export the list of classes from the build tree.
+  # This file is also used when converting Tcl tests to python tests.
+  SET(VTK_EXPORT_HEADER_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+  SET(KIT_CLASS_LIST)
+  SET(KIT_ABSTRACT_LIST)
+  SET(KIT_EXCLUDE_LIST)
+  FOREACH(src ${sources})
+    # Get the class name with the directory if any.  Some class
+    # headers may be in the build tree while others are in the source
+    # tree.
+    STRING(REGEX REPLACE "\\.cxx$" "" CLASS "${src}")
+    SET(KIT_CLASS_LIST "${KIT_CLASS_LIST}\n  \"${CLASS}\"")
+    GET_SOURCE_FILE_PROPERTY(IS_ABSTRACT ${src} ABSTRACT)
+    IF(IS_ABSTRACT MATCHES "^1$")
+      SET(KIT_ABSTRACT_LIST "${KIT_ABSTRACT_LIST}\n  \"${CLASS}\"")
+    ENDIF(IS_ABSTRACT MATCHES "^1$")
+    GET_SOURCE_FILE_PROPERTY(IS_EXCLUDE ${src} WRAP_EXCLUDE)
+    IF(IS_EXCLUDE MATCHES "^1$")
+      SET(KIT_EXCLUDE_LIST "${KIT_EXCLUDE_LIST}\n  \"${CLASS}\"")
+    ENDIF(IS_EXCLUDE MATCHES "^1$")
+  ENDFOREACH(src)
+  CONFIGURE_FILE(${VTK_CMAKE_DIR}/vtkKit.cmake.in
+                 ${VTK_BINARY_DIR}/Utilities/vtk${kit}Kit.cmake
+                 @ONLY IMMEDIATE)
 ENDMACRO(VTK_EXPORT_KIT)


Generalizing module config files importing logic.

For applications based on VTK, they themselves might add additional modules. In
that case the module config files locating code needs to look in multiple
locations, those for VTK's modules and those for the extra modules added by the
project. To enable that, we extend vtkModuleAPI to look for the config files in
the VTK_MODULES_DIR as well as any location in the CMAKE_MODULE_PATH. Now, such
applications can simply extend the CMAKE_MODULE_PATH and the module-config files
can be easily imported.

Change-Id: I1b94c96512eae6822e366df06b1e3cdbd363c790

--- CMake/vtkModuleAPI.cmake
+++ CMake/vtkModuleAPI.cmake
@@ -33,7 +33,13 @@
 #  <module>_LIBRARY_DIRS   = Library search path (for outside dependencies)
 macro(vtk_module_load mod)
   if(NOT ${mod}_LOADED)
-    include("${VTK_MODULES_DIR}/${mod}.cmake" OPTIONAL)
+    include("${VTK_MODULES_DIR}/${mod}.cmake" OPTIONAL RESULT_VARIABLE _found)
+    if (NOT _found)
+      # When building applications outside VTK, they can provide extra module
+      # config files by simply adding the corresponding locations to the
+      # CMAKE_MODULE_PATH
+      include(${mod} OPTIONAL)
+    endif()
     if(NOT ${mod}_LOADED)
       message(FATAL_ERROR "No such module: \"${mod}\"")
     endif()
@@ -62,7 +68,13 @@
 #  <module>_CLASS_<class>_WRAP_SPECIAL
 macro(vtk_module_classes_load mod)
   if(NOT ${mod}_CLASSES_LOADED)
-    include("${VTK_MODULES_DIR}/${mod}-Classes.cmake" OPTIONAL)
+    include("${VTK_MODULES_DIR}/${mod}-Classes.cmake" OPTIONAL RESULT_VARIABLE _found)
+    if (NOT _found)
+      # When building applications outside VTK, they can provide extra module
+      # config files by simply adding the corresponding locations to the
+      # CMAKE_MODULE_PATH
+      include(${mod}-Classes OPTIONAL)
+    endif()
     if(NOT ${mod}_CLASSES_LOADED)
       message(FATAL_ERROR "No such module: \"${mod}\"")
     endif()


Update ITK 4.13 to latest snapshot

Update ITK 4.13 to latest snapshot

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -52,9 +52,9 @@
   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
      UPDATE_COMMAND ""
-     # ITK 4.13.2 + GCC9 patch
-     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/ITK_a092294.tar.gz
-     URL_MD5 5e3f39105917d992d5079be473994bc6
+     # ITK 4.13 release branch snapshot
+     URL https://github.com/InsightSoftwareConsortium/ITK/archive/e53d1d94.tar.gz
+     URL_MD5 977f77cb299cf3d722d13dd5408bcde5
      CMAKE_GENERATOR ${gen}
      CMAKE_GENERATOR_PLATFORM ${gen_platform}
      CMAKE_ARGS


Use ITK v5.2.1 instead of v5.2.0

Use ITK v5.2.1 instead of v5.2.0

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -55,8 +55,8 @@
   ExternalProject_Add(${proj}
      LIST_SEPARATOR ${sep}
      UPDATE_COMMAND ""
-     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-5.2.0.tar.gz
-     URL_MD5 1875faa569df68d2878564b7072854ee
+     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-5.2.1.tar.gz
+     URL_MD5 48c1fe49f75fdaa91b31bbf9dda01a42
      CMAKE_GENERATOR ${gen}
      CMAKE_GENERATOR_PLATFORM ${gen_platform}
      CMAKE_ARGS


Cleanup coverage

Cleanup coverage

--- CMake/CodeCoverage.cmake
+++ CMake/CodeCoverage.cmake
@@ -147,6 +147,9 @@
 		# Capturing lcov counters and generating report
     COMMAND ${LCOV_PATH} --directory . --capture ${LCOV_SCRIPT} --output-file ${coverage_info}
 		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/usr/*' --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --remove ${coverage_info} '3rdParty/*' --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --remove ${coverage_info} 'tests/*' --output-file ${coverage_cleaned}
+		COMMAND ${LCOV_PATH} --remove ${coverage_info} '/hone/travis/*' --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
 		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}


We're up to Boost 1.42 now.  Just updating the list.

--HG--
branch : v1-7
extra : convert_revision : svn%3A8631bf8a-c64b-0410-883c-f3eb003322f7/branches/v1-7%401766

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -125,7 +125,7 @@
 		# Statically linking boost to a dynamic Ogre build doesn't work on Linux 64bit
 		set(Boost_USE_STATIC_LIBS ${OGRE_STATIC})
 	endif ()
-	set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" "1.40.0" "1.40")
+	set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39" "1.40.0" "1.40" "1.41" "1.42")
 	# Components that need linking (NB does not include header-only components like bind)
 	set(OGRE_BOOST_COMPONENTS thread date_time)
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)


COMP: fix detection of mapnik2

COMP: fix detection of mapnik2

--- CMake/ImportMapnik.cmake
+++ CMake/ImportMapnik.cmake
@@ -69,7 +69,7 @@
         TRY_COMPILE(MAPNIK_SUPPORTS_NEW_INTERFACE
           ${CMAKE_CURRENT_BINARY_DIR}/CMake
           ${CMAKE_CURRENT_SOURCE_DIR}/CMake/otbTestCompileMapnik2.cxx
-          CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${MAPNIK_INCLUDE_DIR};${ICUUC_INCLUDE_DIR};${LTDL_INCLUDE_DIR};${FREETYPE2_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${MAPNIK_LIBRARY}"
+          CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:PATH=${MAPNIK_INCLUDE_DIR};${ICUUC_INCLUDE_DIR};${LTDL_INCLUDE_DIR};${FREETYPE2_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${MAPNIK_LIBRARY};${ICUUC_LIBRARY}"
           OUTPUT_VARIABLE OUTPUT)
         IF(MAPNIK_SUPPORTS_NEW_INTERFACE)
           MESSAGE(STATUS "  Testing if Mapnik2     -- yes")


Fix Ilmbase linker warning with LINKSTATIC on Windows. (#1701)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -150,7 +150,6 @@
     add_definitions (-D_CRT_NONSTDC_NO_WARNINGS)
     add_definitions (-D_SCL_SECURE_NO_WARNINGS)
     add_definitions (-DJAS_WIN_MSVC_BUILD)
-    add_definitions (-DOPENEXR_DLL)
 endif (MSVC)

 # Use ccache if found
@@ -330,6 +329,7 @@
 else ()
     if (MSVC)
         add_definitions (-DBOOST_ALL_DYN_LINK)
+        add_definitions (-DOPENEXR_DLL)
     endif ()
 endif ()


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -78,7 +78,6 @@
 #  WindowlessGlxApplication     - Windowless GLX application
 #  WindowlessIosApplication     - Windowless iOS application
 #  WindowlessWglApplication     - Windowless WGL application
-#  WindowlessWindowsEglApplication - Windowless Windows/EGL application
 #  CglContext                   - CGL context
 #  EglContext                   - EGL context
 #  GlxContext                   - GLX context
@@ -137,10 +136,9 @@
 #  MAGNUM_TARGET_GLES           - Defined if compiled for OpenGL ES
 #  MAGNUM_TARGET_GLES2          - Defined if compiled for OpenGL ES 2.0
 #  MAGNUM_TARGET_GLES3          - Defined if compiled for OpenGL ES 3.0
-#  MAGNUM_TARGET_DESKTOP_GLES   - Defined if compiled with OpenGL ES
-#   emulation on desktop OpenGL
 #  MAGNUM_TARGET_WEBGL          - Defined if compiled for WebGL
-#  MAGNUM_TARGET_HEADLESS       - Defined if compiled for headless machines
+#  MAGNUM_TARGET_EGL            - Defined if compiled for EGL instead of a
+#   platform-specific OpenGL support library like CGL, EAGL, GLX or WGL
 #  MAGNUM_TARGET_VK             - Defined if compiled with Vulkan interop
 #
 # The following variables are provided for backwards compatibility purposes
@@ -149,6 +147,10 @@
 #
 #  MAGNUM_BUILD_MULTITHREADED   - Alias to CORRADE_BUILD_MULTITHREADED. Use
 #   CORRADE_BUILD_MULTITHREADED instead.
+#  MAGNUM_TARGET_HEADLESS       - Alias to MAGNUM_TARGET_EGL, unless on iOS,
+#   Android, Emscripten or Windows RT. Use MAGNUM_TARGET_EGL instead.
+#  MAGNUM_TARGET_DESKTOP_GLES`  - Defined if compiled for OpenGL ES but
+#   GLX / WGL is used instead of EGL. Use MAGNUM_TARGET_EGL instead.
 #
 # Additionally these variables are defined for internal usage:
 #
@@ -269,9 +271,8 @@
     TARGET_GLES
     TARGET_GLES2
     TARGET_GLES3
-    TARGET_DESKTOP_GLES
     TARGET_WEBGL
-    TARGET_HEADLESS
+    TARGET_EGL
     TARGET_VK)
 foreach(_magnumFlag ${_magnumFlags})
     list(FIND _magnumConfigure "#define MAGNUM_${_magnumFlag}" _magnum_${_magnumFlag})
@@ -280,9 +281,20 @@
     endif()
 endforeach()

-# For compatibility only, to be removed at some point
-if(MAGNUM_BUILD_DEPRECATED AND CORRADE_BUILD_MULTITHREADED)
-    set(MAGNUM_BUILD_MULTITHREADED 1)
+# For compatibility only, to be removed at some point. Refer to
+# src/Magnum/configure.h.cmake for the decision logic here.
+if(MAGNUM_BUILD_DEPRECATED)
+    if(CORRADE_BUILD_MULTITHREADED)
+        set(MAGNUM_BUILD_MULTITHREADED 1)
+    endif()
+    if(NOT CORRADE_TARGET_IOS AND NOT CORRADE_TARGET_ANDROID AND NOT CORRADE_TARGET_EMSCRIPTEN AND NOT CORRADE_TARGET_WINDOWS_RT)
+        if(NOT MAGNUM_TARGET_GLES AND MAGNUM_TARGET_EGL)
+            set(MAGNUM_TARGET_HEADLESS 1)
+        endif()
+        if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_EGL)
+            set(MAGNUM_TARGET_DESKTOP_GLES 1)
+        endif()
+    endif()
 endif()

 # OpenGL library preference. Prefer to use GLVND, since that's the better
@@ -395,7 +407,7 @@
     list(APPEND _MAGNUM_LIBRARY_COMPONENTS GlxApplication XEglApplication WindowlessGlxApplication GlxContext)
 endif()
 if(CORRADE_TARGET_WINDOWS)
-    list(APPEND _MAGNUM_LIBRARY_COMPONENTS WindowlessWglApplication WglContext WindowlessWindowsEglApplication)
+    list(APPEND _MAGNUM_LIBRARY_COMPONENTS WindowlessWglApplication WglContext)
 endif()
 if(CORRADE_TARGET_UNIX OR CORRADE_TARGET_WINDOWS)
     list(APPEND _MAGNUM_EXECUTABLE_COMPONENTS fontconverter distancefieldconverter)
@@ -426,24 +438,16 @@
 endif()

 set(_MAGNUM_OpenGLTester_DEPENDENCIES GL)
-if(MAGNUM_TARGET_HEADLESS OR CORRADE_TARGET_EMSCRIPTEN OR CORRADE_TARGET_ANDROID)
+if(MAGNUM_TARGET_EGL)
     list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessEglApplication)
 elseif(CORRADE_TARGET_IOS)
     list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessIosApplication)
-elseif(CORRADE_TARGET_APPLE AND NOT MAGNUM_TARGET_GLES)
+elseif(CORRADE_TARGET_APPLE)
     list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessCglApplication)
 elseif(CORRADE_TARGET_UNIX)
-    if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES)
-        list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessEglApplication)
-    else()
-        list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessGlxApplication)
-    endif()
+    list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessGlxApplication)
 elseif(CORRADE_TARGET_WINDOWS)
-    if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
-        list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessWglApplication)
-    else()
-        list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessWindowsEglApplication)
-    endif()
+    list(APPEND _MAGNUM_OpenGLTester_DEPENDENCIES WindowlessWglApplication)
 endif()

 set(_MAGNUM_Primitives_DEPENDENCIES MeshTools Trade)
@@ -492,7 +496,6 @@
 set(_MAGNUM_WindowlessGlxApplication_DEPENDENCIES GL)
 set(_MAGNUM_WindowlessIosApplication_DEPENDENCIES GL)
 set(_MAGNUM_WindowlessWglApplication_DEPENDENCIES GL)
-set(_MAGNUM_WindowlessWindowsEglApplication_DEPENDENCIES GL)
 set(_MAGNUM_XEglApplication_DEPENDENCIES GL)
 set(_MAGNUM_CglContext_DEPENDENCIES GL)
 set(_MAGNUM_EglContext_DEPENDENCIES GL)
@@ -708,16 +711,16 @@
                 # OPENGL_opengl_LIBRARY because that's set even if
                 # OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 if(MAGNUM_TARGET_GL)
-                    if(CORRADE_TARGET_UNIX AND NOT CORRADE_TARGET_APPLE AND (NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES))
+                    if(MAGNUM_TARGET_EGL)
+                        find_package(EGL)
+                        set_property(TARGET Magnum::${_component} APPEND
+                            PROPERTY INTERFACE_LINK_LIBRARIES EGL::EGL)
+                    elseif(CORRADE_TARGET_UNIX AND NOT CORRADE_TARGET_APPLE)
                         find_package(OpenGL)
                         if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                             set_property(TARGET Magnum::${_component} APPEND
                             PROPERTY INTERFACE_LINK_LIBRARIES OpenGL::GLX)
                         endif()
-                    elseif(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES AND NOT CORRADE_TARGET_EMSCRIPTEN)
-                        find_package(EGL)
-                        set_property(TARGET Magnum::${_component} APPEND
-                            PROPERTY INTERFACE_LINK_LIBRARIES EGL::EGL)
                     endif()
                 endif()

@@ -747,16 +750,16 @@
                 # OPENGL_opengl_LIBRARY because that's set even if
                 # OpenGL_GL_PREFERENCE is explicitly set to LEGACY.
                 if(MAGNUM_TARGET_GL)
-                    if(CORRADE_TARGET_UNIX AND NOT CORRADE_TARGET_APPLE AND (NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES))
+                    if(MAGNUM_TARGET_EGL)
+                        find_package(EGL)
+                        set_property(TARGET Magnum::${_component} APPEND
+                            PROPERTY INTERFACE_LINK_LIBRARIES EGL::EGL)
+                    elseif(CORRADE_TARGET_UNIX AND NOT CORRADE_TARGET_APPLE)
                         find_package(OpenGL)
                         if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND)
                             set_property(TARGET Magnum::${_component} APPEND
                             PROPERTY INTERFACE_LINK_LIBRARIES OpenGL::GLX)
                         endif()
-                    elseif(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES AND NOT CORRADE_TARGET_EMSCRIPTEN)
-                        find_package(EGL)
-                        set_property(TARGET Magnum::${_component} APPEND
-                            PROPERTY INTERFACE_LINK_LIBRARIES EGL::EGL)
                     endif()
                 endif()

@@ -798,12 +801,6 @@
                     INTERFACE_LINK_LIBRARIES EGL::EGL ${_MAGNUM_IOS_FOUNDATION_FRAMEWORK_LIBRARY})

             # Windowless WGL application has no additional dependencies
-
-            # Windowless Windows/EGL application dependencies
-            elseif(_component STREQUAL WindowlessWindowsEglApplication)
-                find_package(EGL)
-                set_property(TARGET Magnum::${_component} APPEND PROPERTY
-                    INTERFACE_LINK_LIBRARIES EGL::EGL)

             # X/EGL application dependencies
             elseif(_component STREQUAL XEglApplication)
@@ -860,7 +857,7 @@

         # GL library
         elseif(_component STREQUAL GL)
-            if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
+            if(NOT MAGNUM_TARGET_GLES OR (MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_EGL AND NOT CORRADE_TARGET_IOS))
                 # If the GLVND library (CMake 3.11+) was found, link to the
                 # imported target. Otherwise (and also on all systems except
                 # Linux) link to the classic libGL. Can't use


ManageFile: MANAGE_FILE_CACHE: add option: RESULT_VAR

--- Modules/ManageFile.cmake
+++ Modules/ManageFile.cmake
@@ -71,7 +71,7 @@
 #           when cmake-fedora.conf is not found.
 #
 #   MANAGE_FILE_CACHE(<var> <file> [EXPIRY_SECONDS <expirySecond>]
-#     [CACHE_DIR <dir>] [ERROR_VAR <errorVar>]
+#     [CACHE_DIR <dir>] [ERROR_VAR <errorVar>] [RESULT_VAR resultVar]
 #     COMMAND <cmd ...>
 #     )
 #     - Manage cached program output.
@@ -326,11 +326,16 @@

 FUNCTION(MANAGE_FILE_CACHE var file)
     SET(_validOptions "CACHE_DIR"
-	"EXPIRY_SECONDS" "ERROR_VAR" "COMMAND")
+	"EXPIRY_SECONDS" "ERROR_VAR" "RESULT_VAR" "COMMAND")
     VARIABLE_PARSE_ARGN(_o _validOptions ${ARGN})
     IF(NOT DEFINED _o_ERROR_VAR)
 	SET(_o_ERROR_VAR "${var}_ERROR")
     ENDIF(NOT DEFINED _o_ERROR_VAR)
+    SET(_commandOptList "")
+    IF(DEFINED _o_RESULT_VAR)
+	SET(_commandOptList RESULT_VARIABLE ${_o_RESULT_VAR})
+    ENDIF(DEFINED _o_RESULT_VAR)
+
     CMAKE_FEDORA_CONF_GET_ALL_VARIABLES()
     SET(_toRun TRUE)
     IF(NOT DEFINED LOCAL_CACHE)
@@ -351,9 +356,18 @@
 		SET(_o_EXPIRY_SECONDS 259200) # 3 days
 	    ENDIF(LOCAL_CACHE_EXPIRY)
 	ENDIF(NOT  _o_EXPIRY_SECONDS)
+
 	IF(NOT EXISTS ${_o_CACHE_DIR})
-	    FILE(MAKE_DIRECTORY ${_o_CACHE_DIR})
+	    EXECUTE_PROCESS(COMMAND
+		${CMAKE_COMMAND} -E make_directory "${_o_CACHE_DIR}"
+		RESULT_VARIABLE ${_o_ERROR_VAR}
+		OUTPUT_QUIET
+		ERROR_QUIET
+		)
 	ENDIF(NOT EXISTS ${_o_CACHE_DIR})
+	IF(_o_ERROR_VAR)
+	    RETURN()
+	ENDIF(_o_ERROR_VAR)

 	SET(_cacheFile "${_o_CACHE_DIR}/${file}")
 	MANAGE_FILE_EXPIRY(_isExpired ${_cacheFile} ${_o_EXPIRY_SECONDS})
@@ -369,8 +383,10 @@
     ELSE(LOCAL_CACHE)
 	SET(_cacheFile "/tmp/cmake_fedora_cache_${cache_file}")
     ENDIF(LOCAL_CACHE)
+
     IF(_toRun)
 	EXECUTE_PROCESS(COMMAND ${_o_COMMAND}
+	    ${_commandOptList}
 	    OUTPUT_FILE ${_cacheFile}
 	    OUTPUT_STRIP_TRAILING_WHITESPACE
 	    )


Advanced errors now enabled warnings as errors

--- build/macros.cmake
+++ build/macros.cmake
@@ -338,6 +338,7 @@
 	get_compiler_name(COMPILER)
 	if(COMPILER MATCHES "vc")
 		replace_or_append_all_flag("/W[[0-4]|all]" "/Wall")
+		replace_or_append_all_flag("/WX\-?" "/WX")
 		append_all_compiler_flag("/sdl") #Security Development Lifecycle checks
 		append_debug_flag("/RTCc") #Smaller type checks
 		add_definitions(-D_ALLOW_RTCc_IN_STL) #Acknowledge STL does not support this check
@@ -351,7 +352,7 @@

 		append_release_flag("/wd4711") #Function selected for automatic inline expansion
 	elseif(COMPILER MATCHES "gcc")
-		append_all_compiler_flag("-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -pedantic")
+		append_all_compiler_flag("-Wall -Wextra -Werror -Wshadow -Wconversion -Wsign-conversion -pedantic")
 	else()
 		message(FATAL_ERROR "Compiler not recognized: ${COMPILER}")
 	endif()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2008)

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Remove obsolete convert_includes implementation

--- cmake/Custom.cmake
+++ cmake/Custom.cmake
@@ -7,21 +7,6 @@
     endif()

 endfunction(set_policy)
-
-
-# Converts a list of include paths to their -I ... command line list
-#
-# Example:
-# convert_includes(RESULT "include1;include2;include3")
-# Result:
-# -I include1 -I include2 -I include3
-function(convert_includes var)
-   set(listVar "")
-   foreach(include ${ARGN})
-      list(APPEND listVar "-I${include}")
-   endforeach()
-   set(${var} "${listVar}" PARENT_SCOPE)
-endfunction()

 # Define function "source_group_by_path with three mandatory arguments (PARENT_PATH, REGEX, GROUP, ...)


Remove generator expression text for the  command.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -64,6 +64,10 @@
 function(GROUP_SOURCE_TO_DIR_STRUCTURE)
   if(MSVC)
     foreach(_FILE ${ARGN})
+      # Remove generator expression text because the `source_group` command cannot understand it.
+      if(${_FILE} MATCHES "^\\$<\\$<CONFIG:Debug>:(.+)>$")
+        set(_FILE ${CMAKE_MATCH_1})
+      endif()
       # Basic test for determining if current file is a source file or header file.
       if(${_FILE} MATCHES ".+\.cpp$")
         set(_FILE_PREFIX "Source Files\\")


a tiny typo (#4452)

a tiny typo (#4452)


Add -mavx2 for TARGET=HASWELL if compiler supports and requires it

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -44,6 +44,12 @@
 if (DEFINED TARGET)
 if (${TARGET} STREQUAL "SKYLAKEX" AND NOT NO_AVX512)
   set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=skylake-avx512")
+endif()
+if (${TARGET} STREQUAL "HASWELL" AND NOT NO_AVX2)
+   execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+   if (${GCC_VERSION} VERSION_GREATER 4.7 OR ${GCC_VERSION} VERSION_EQUAL 4.7)
+     set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mavx2")
+   endif()
 endif()
 endif()


Setting the C++ Standard using CMAKE_CXX_STANDARD and let CMake figure out which flag is necessary for the used compiler.

--- cmake/CompilerCheck.cmake
+++ cmake/CompilerCheck.cmake
@@ -1,18 +1,3 @@
-include(CheckIncludeFileCXX)
-include(CheckCXXCompilerFlag)
-set(TEMP_DIR "${CMAKE_BINARY_DIR}/temp")
-
-# C++0x / C++11
-CHECK_CXX_COMPILER_FLAG("-std=c++1y" COMPILER_SUPPORTS_CXX1Y)
-CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
-if (COMPILER_SUPPORTS_CXX1Y)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
-elseif (COMPILER_SUPPORTS_CXX11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-elseif(COMPILER_SUPPORTS_CXX0X)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-else()
-    message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
-endif ()
-
+set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)


Fixed WITH_FUZZERS compile

Fixed WITH_FUZZERS compile

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -174,7 +174,7 @@

 if (BUILD_FUZZERS)
     if (NOT OSS_FUZZ)
-        add_compile_flags("C;CXX" -fsanitize=fuzzer-no-link)
+        add_compile_options(-fsanitize=fuzzer-no-link)
     endif ()

     if (OSS_FUZZ AND NOT DEFINED ENV{LIB_FUZZING_ENGINE})


Updated XLink with Windows improvements when scanning for already booted USB devices

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4.2-develop"
-    URL "https://github.com/luxonis/XLink/archive/4f8cd1f9b2ab1b44e36c448a4b7d5d80255f5872.tar.gz"
-    SHA1 "fe7aaa8a61ddd7e9030c6c2720978e35a1449fba"
+    URL "https://github.com/luxonis/XLink/archive/5c61615066af6539e50a4a17b5df3466e4350b21.tar.gz"
+    SHA1 "25fba41da891743bf0bdff5bc9a5cda07535be49"
 )

 hunter_config(


Remove deprecated MAC_OS definition

Remove deprecated MAC_OS definition

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -26,7 +26,7 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -g -Wall -Wno-missing-braces")

-set(MACOS_COMPILE_DEFS MAC_OS)
+set(MACOS_COMPILE_DEFS)
 set(DEFAULT_COMPILE_DEFS_DEBUG   ${MACOS_COMPILE_DEFS} _DEBUG) # Debug build
 set(DEFAULT_COMPILE_DEFS_RELEASE ${MACOS_COMPILE_DEFS} NDEBUG) # Release build


Tweak commentary.

Tweak commentary.

svn path=/trunk/; revision=7437

--- cmake/modules/pstex.cmake
+++ cmake/modules/pstex.cmake
@@ -34,7 +34,7 @@
 endif(PLD_pstex AND NOT PLD_ps)

 if(PLD_pstex AND ENABLE_DYNDRIVERS)
-  # N.B. the pstex.c code is parasitic on the ps.c code so must include
-  # the latter for the ENABLE_DYNDRIVERS case.
+  # N.B. the pstex.c code is parasitic on the ps.c code so must be combined
+  # with the latter in the plug-in for the ENABLE_DYNDRIVERS case.
   set(pstex_SOURCE ${CMAKE_SOURCE_DIR}/drivers/ps.c)
 endif(PLD_pstex AND ENABLE_DYNDRIVERS)


build system: only create Android wrapper project if not exists

--- cmake/oryol_android.cmake
+++ cmake/oryol_android.cmake
@@ -9,14 +9,17 @@
 #
 macro(oryol_android_create_project target)

-    # call the android SDK tool to create a new project
-    execute_process(COMMAND ${ANDROID_SDK_TOOL} --silent create project
-                    --path ${CMAKE_CURRENT_BINARY_DIR}/android
-                    --target ${ANDROID_PLATFORM}
-                    --name ${target}
-                    --package com.oryol.${target}
-                    --activity DummyActivity
-                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    # call the android SDK tool to create a new project (skip if already exists)
+    if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/android)
+        message("=> create Android SDK project: ${target}")
+        execute_process(COMMAND ${ANDROID_SDK_TOOL} --silent create project
+                        --path ${CMAKE_CURRENT_BINARY_DIR}/android
+                        --target ${ANDROID_PLATFORM}
+                        --name ${target}
+                        --package com.oryol.${target}
+                        --activity DummyActivity
+                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+    endif()

     # set the output directory for the .so files to point to the android project's 'lib/[cpuarch] directory
     set(ANDROID_SO_OUTDIR ${CMAKE_CURRENT_BINARY_DIR}/android/libs/${ANDROID_NDK_CPU})


Fixed a small issue with building OpenCOR from the command line (closes #218).

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -772,7 +772,7 @@
     SET(QT_LIBRARY_DIR_FOR_GREP "\t${QT_LIBRARY_DIR}/")

     EXECUTE_PROCESS(COMMAND otool -L ${FILENAME}
-                    COMMAND grep ${QT_LIBRARY_DIR_FOR_GREP}
+                    COMMAND grep --colour=never ${QT_LIBRARY_DIR_FOR_GREP}
                     OUTPUT_VARIABLE RAW_QT_DEPENDENCIES)

     STRING(REPLACE "\n" ";" RAW_QT_DEPENDENCIES "${RAW_QT_DEPENDENCIES}")


Allow overriding NUM_THREADS

Allow overriding NUM_THREADS

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -94,14 +94,15 @@
     ProcessorCount(NUM_CORES)
   endif()

+endif()
+
+if (NOT DEFINED NUM_THREADS)
   if (NOT NUM_CORES EQUAL 0)
     # HT?
     set(NUM_THREADS ${NUM_CORES})
-  endif ()
-endif()
-
-if (NOT DEFINED NUM_THREADS)
-  set(NUM_THREADS 0)
+  else ()
+    set(NUM_THREADS 0)
+  endif ()
 endif()

 if (${NUM_THREADS} LESS 2)


fix warning flags

fix warning flags

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -82,6 +82,7 @@
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
     set(_connext_compile_flags
       "-Wno-unused-but-set-variable"
+      "-Wno-unused-parameter"
       "-Wno-unused-variable"
     )
   endif()
@@ -167,9 +168,7 @@
     PRIVATE "NDDS_USER_DLL_EXPORT")
 endif()
 set_target_properties(${rosidl_generate_interfaces_TARGET}${_target_suffix} PROPERTIES COMPILE_FLAGS
-  "-Wall"
-  "-Wextra"
-  "-Wno-unused-parameter")
+  "-Wall -Wextra")
 target_include_directories(${rosidl_generate_interfaces_TARGET}${_target_suffix}
   PUBLIC
   ${CMAKE_CURRENT_BINARY_DIR}/rosidl_generator_cpp


Fix Windows build to not force enable /MT, it is not need for BUILDSTATIC. (#769)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -316,10 +316,6 @@
         set (USE_PYTHON OFF)
         set (USE_PYTHON3 OFF)
     endif ()
-    if (WIN32)
-        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
-        set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
-    endif ()
 else ()
     set (LIBRARY_BUILD_TYPE SHARED)
 endif()
@@ -344,4 +340,8 @@

 if (DEFINED ENV{TRAVIS} OR DEFINED ENV{APPVEYOR} OR DEFINED ENV{CI})
     add_definitions ("-D${PROJECT_NAME}_CI=1" "-DBUILD_CI=1")
-endif ()
+    if (WIN32)
+        set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
+        set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
+    endif ()
+endif ()


Fixed OpenSSL programs and tests being generated when testing disabled.

--- lib/polarssl.cmake
+++ lib/polarssl.cmake
@@ -1,9 +1,9 @@

 if(NOT TARGET polarssl)
 	message("including polarssl")
+	set(ENABLE_TESTING OFF CACHE BOOL "Disable tests")
+	set(ENABLE_PROGRAMS OFF CACHE BOOL "Disable programs")
 	if (SELF_TEST)
-		set(ENABLE_TESTING OFF CACHE BOOL "Disable tests")
-		set(ENABLE_PROGRAMS OFF CACHE BOOL "Disable programs")
 		add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl)
 	else()
 		add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/polarssl/ ${CMAKE_CURRENT_BINARY_DIR}/lib/polarssl EXCLUDE_FROM_ALL)


Remove a GL ES 2 reference in the 1.7 branch

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -92,10 +92,6 @@
 find_package(OpenGLES)
 macro_log_feature(OPENGLES_FOUND "OpenGL ES" "Support for the OpenGL ES 1.x render system" "http://www.khronos.org/opengles/" FALSE "" "")

-# Find OpenGL ES 2.x
-#find_package(OpenGLES2)
-#macro_log_feature(OPENGLES2_FOUND "OpenGL ES 2" "Support for the OpenGL ES 2.x render system" "http://www.khronos.org/opengles/" FALSE "" "")
-
 # Find DirectX
 if(WIN32)
 	find_package(DirectX)


Added COMPILE_FLAGS option to macro add_unit_test

--- cmake/Modules/MacroAddUnitTest.cmake
+++ cmake/Modules/MacroAddUnitTest.cmake
@@ -9,7 +9,7 @@
 macro(add_unit_test)
     set(options DISABLED)
     set(oneValueArgs NAME WORKING_DIRECTORY TAG)
-    set(multiValueArgs SOURCES LINK_LIBRARIES ARGS)
+    set(multiValueArgs SOURCES COMPILE_FLAGS LINK_LIBRARIES ARGS)
     cmake_parse_arguments(UNIT_TEST "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

     if(NOT UNIT_TEST_NAME)
@@ -19,6 +19,10 @@
     add_executable(${UNIT_TEST_NAME} ${UNIT_TEST_SOURCES})
     if(UNIT_TEST_LINK_LIBRARIES)
         target_link_libraries(${UNIT_TEST_NAME} ${UNIT_TEST_LINK_LIBRARIES})
+    endif()
+
+    if(UNIT_TEST_COMPILE_FLAGS)
+        set_target_properties(${UNIT_TEST_NAME} PROPERTIES COMPILE_FLAGS ${UNIT_TEST_COMPILE_FLAGS})
     endif()

     if(UNIT_TEST_TAG)


cmake: toolchain: Fix 'host' toolchain variant

Fix an issue with 'ZEPHYR_TOOLCHAIN_VARIANT=host' where CMAKE_C_FLAGS
was incorrectly assumed to be set.

This fixes #21614

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/compiler/host-gcc/target.cmake
+++ cmake/compiler/host-gcc/target.cmake
@@ -23,10 +23,10 @@
 # that is currently not needed. See comments in compiler/gcc/target.cmake
 if (CONFIG_X86)
   # Convert to list as cmake Modules/*.cmake do it
-  STRING(REGEX REPLACE " +" ";" PRINT_LIBGCC_ARGS ${CMAKE_C_FLAGS})
+  STRING(REGEX REPLACE " +" ";" PRINT_LIBGCC_ARGS "${CMAKE_C_FLAGS}")
   # This libgcc code is partially duplicated in compiler/*/target.cmake
   execute_process(
-    COMMAND ${CMAKE_C_COMPILER} ${PRINT_LIBGCC_ARGS} --print-libgcc-file-name
+    COMMAND ${CMAKE_C_COMPILER} "${PRINT_LIBGCC_ARGS}" --print-libgcc-file-name
     OUTPUT_VARIABLE LIBGCC_FILE_NAME
     OUTPUT_STRIP_TRAILING_WHITESPACE
     )


[qtgui porting] Fixed more typos in RootBuildOptions.cmake

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -91,7 +91,7 @@
  set(qt4_defvalue OFF)
  set(qt5_defvalue OFF)
  set(qtgsi_defvalue OFF)
- set(qtgui defvalue OFF)
+ set(qtgui_defvalue OFF)
  set(roofit_defvalue OFF)
  set(minuit2_defvalue OFF)
  set(table_defvalue OFF)
@@ -147,7 +147,7 @@
 set(python_defvalue OFF)
 set(qt4_defvalue OFF)
 set(qt5_defvalue ON)
-set(qtgui defvalue ON)
+set(qtgui_defvalue ON)
 set(reflex_defvalue OFF)
 set(rfio_defvalue OFF)
 set(rgl_defvalue OFF)


ENH: Enable ITKUltrasound_USE_VTK

ENH: Enable ITKUltrasound_USE_VTK

--- SuperBuild/External_ITKUltrasound.cmake
+++ SuperBuild/External_ITKUltrasound.cmake
@@ -21,8 +21,9 @@
     -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
     -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
     -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
-    # to find ITKConfig.cmake
     -DITK_DIR:PATH=${ITK_DIR}
+    -DITKUltrasound_USE_VTK:BOOL=ON
+    -DVTK_DIR:PATH=${VTK_DIR}
     -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE}
     -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
     -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}


gcc 4.7 fix

gcc 4.7 fix

--- Compiler.cmake
+++ Compiler.cmake
@@ -104,6 +104,9 @@
       if(GCC_COMPILER_VERSION VERSION_LESS 4.7)
         set(COMMON_CXXSTD_FLAGS "-std=c++0x")
       else()
+        if(GCC_COMPILER_VERSION VERSION_LESS 4.8)
+          add_definitions(-D_GLIBCXX_USE_NANOSLEEP) # http://stackoverflow.com/questions/4438084
+        endif()
         set(COMMON_CXXSTD_FLAGS "-std=c++11")
       endif()
     endif()


Replaced tabs with spaces.

Replaced tabs with spaces.

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -106,7 +106,7 @@

 execute_process(COMMAND ${QT_QMAKE_EXECUTABLE} --version
                 OUTPUT_VARIABLE MY_QT_VERSION
-				RESULT_VARIABLE qmake_error)
+                RESULT_VARIABLE qmake_error)
 if(qmake_error)
   message(FATAL_ERROR "Error when executing ${QT_QMAKE_EXECUTABLE} --version\n${qmake_error}")
 endif()


ENH: CI: Set CTK_ENABLE_Widgets

ENH: CI: Set CTK_ENABLE_Widgets

Set CTK_ENABLE_Widgets to test widgets on CI.

--- CMake/CircleCI/CircleCI_CTK_Docker.cmake
+++ CMake/CircleCI/CircleCI_CTK_Docker.cmake
@@ -70,13 +70,17 @@

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

+set(ctk_configure_options
+  -DCTK_QT_VERSION:STRING=${CTK_QT_VERSION}
+  -DCTK_ENABLE_Widgets:BOOL=ON
+  )

 ctest_start( "${SITE_CTEST_MODE}" )

 ctest_configure(
   BUILD "${CTK_BINARY_DIR}"
   SOURCE "${CTK_SOURCE_DIR}"
-  OPTIONS -DCTK_QT_VERSION:STRING=${CTK_QT_VERSION}
+  OPTIONS "${ctk_configure_options}"
   )

 ctest_build( BUILD ${CTK_BINARY_DIR} )


cmake failed because of typo set_test_properties instead of set_tests_properties : now it works

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

--- Numerics/cmake/CMakeListsForTests.cmake
+++ Numerics/cmake/CMakeListsForTests.cmake
@@ -73,9 +73,9 @@

       SET_TESTS_PROPERTIES(${_EXE} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILURE;Exception;failed;ERROR;test unsucceeded")
 	  # Note Franck : I try to set DYLD ... useless for the moment
-      set_test_properties(${_EXE} PROPERTIES ENVIRONMENT LD_LIBRARY_PATH=@LD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
+      set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT LD_LIBRARY_PATH=@LD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
       if(APPLE)
-		set_test_properties(${_EXE} PROPERTIES ENVIRONMENT DYLD_LIBRARY_PATH=@DYLD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
+		set_tests_properties(${_EXE} PROPERTIES ENVIRONMENT DYLD_LIBRARY_PATH=@DYLD_LIBRARY_PATH@:@SiconosNumerics_FOUND@)
 	  endif()

       IF(${_EXE}_PROPERTIES)


Improve FindCEF3.cmake to respect CEF3DIR, whether specified via cmake command line or as environment variable

--- depends/cmake/Modules/FindCEF3.cmake
+++ depends/cmake/Modules/FindCEF3.cmake
@@ -1,15 +1,36 @@
 # CEF3 library import helper
-function(FindCEF3 package)
-    set(${package}_FOUND ON PARENT_SCOPE)
-    get_filename_component(${package}_HOME
-        ${CMAKE_CURRENT_LIST_DIR}/../../CEF3 ABSOLUTE)
-    set(${package}_INCLUDE_DIRS ${${package}_HOME}/include PARENT_SCOPE)
-    set(${package}_LIBRARIES
-        libcef.lib
-        debug ${${package}_HOME}/lib/libcef_dll_wrapperd.lib
-        optimized ${${package}_HOME}/lib/libcef_dll_wrapper.lib
-        PARENT_SCOPE)
-    set(${package}_LIBRARY_DIRS ${${package}_HOME}/lib PARENT_SCOPE)
-endfunction(FindCEF3)

-FindCEF3(CEF3)
+if(MSVC)
+    # static runtime linking('/MT') required to link with CEF3
+    include(${CMAKE_CURRENT_LIST_DIR}/../configure_msvc_runtime.cmake)
+    set(MSVC_RUNTIME "static")
+    configure_msvc_runtime()
+endif()
+
+if(NOT CEF3DIR AND NOT "$ENV{CEF3DIR}")
+    get_filename_component(CEF3DIR ${CMAKE_CURRENT_LIST_DIR}/../../CEF3 ABSOLUTE)
+    set(CEF3_INCLUDE_DIRS ${CEF3DIR}/include)
+    if(WIN32)
+        set(CEF3_LIBRARIES
+            libcef.lib
+            debug ${CEF3DIR}/lib/libcef_dll_wrapperd.lib
+            optimized ${CEF3DIR}/lib/libcef_dll_wrapper.lib)
+        set(CEF3_LIBRARY_DIRS ${CEF3DIR}/lib)
+    endif()
+else()
+    find_path(CEF3_INCLUDE_DIR include/cef_app.h
+        HINTS CEF3DIR ENV CEF3DIR)
+    find_library(LIBCEF_LIBRARY libcef
+        HINTS CEF3DIR ENV CEF3DIR)
+    find_library(LIBCEF_DLL_WRAPPER_LIBRARY libcef_dll_wrapper
+        HINTS CEF3DIR ENV CEF3DIR)
+    if(CEF3_INCLUDE_DIR AND LIBCEF_LIBRARY AND LIBCEF_DLL_WRAPPER_LIBRARY)
+        set(CEF3_INCLUDE_DIRS "${CEF3_INCLUDE_DIR}")
+        set(CEF3_LIBRARIES "${LIBCEF_LIBRARY}" "${LIBCEF_DLL_WRAPPER_LIBRARY}")
+    endif()
+endif()
+
+include(FindPackageHandleStandardArgs)
+
+find_package_handle_standard_args(CEF3 DEFAULT_MSG
+    CEF3_INCLUDE_DIRS CEF3_LIBRARIES)


PKG: JIRA 975. use Darwin prefix for OSX

--- SuperBuild/CMake/External_package.cmake
+++ SuperBuild/CMake/External_package.cmake
@@ -22,12 +22,19 @@
 set(PACKAGE_NAME OTB)
 set(PACKAGE_LONG_NAME OrfeoToolBox)

-set(PACKAGE_ARCH Linux32)
+if(UNIX)
+  if(APPLE)
+    set(PACKAGE_PLATFORM_NAME "Darwin")
+  else()
+    set(PACKAGE_PLATFORM_NAME "Linux")
+  endif()
+endif()
+set(PACKAGE_ARCH 32)
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-  set(PACKAGE_ARCH Linux64)
+  set(PACKAGE_ARCH 64)
 endif()

-set(ARCHIVE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}-${PACKAGE_ARCH})
+set(ARCHIVE_NAME ${PACKAGE_NAME}-${PACKAGE_VERSION}-${PACKAGE_PLATFORM_NAME}${PACKAGE_ARCH})

 set(MAKESELF_SCRIPT ${CMAKE_BINARY_DIR}/PACKAGE-OTB/build/makeself.sh)


remove android definitions from toolchain #2

--- build/toolchains/android.toolchain.cmake
+++ build/toolchains/android.toolchain.cmake
@@ -307,10 +307,6 @@

 cmake_minimum_required( VERSION 2.6.3 )

-# these should be command line arguments
-set( ANDROID_STL "c++_shared" )
-set( ANDROID_NATIVE_API_LEVEL "android-19" )
-
 if( DEFINED CMAKE_CROSSCOMPILING )
  # subsequent toolchain loading is not really needed
  return()


don't redefine HAVE_BOOSTvia cli

don't redefine HAVE_BOOSTvia cli

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -158,7 +158,7 @@

 FIND_PACKAGE( PkgConfig )
 FIND_PACKAGE(Boost 1.42.0 REQUIRED)
-ADD_CXX_FLAGS( -DHAVE_CMAKE_CONFIG -DHAVE_BOOST=1 ${CXX_STD0X_FLAGS})
+ADD_CXX_FLAGS( -DHAVE_CMAKE_CONFIG ${CXX_STD0X_FLAGS})
 INCLUDE_SYS_DIR(${Boost_INCLUDE_DIRS})

 #try to enable link-time-optimisation


refs #71, trying to silence deprectated errors

--- cmake/GhcHelper.cmake
+++ cmake/GhcHelper.cmake
@@ -50,7 +50,7 @@
             $<$<BOOL:${EMSCRIPTEN}>:-s DISABLE_EXCEPTION_CATCHING=0>
             $<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Werror -Wno-error=deprecated-declarations>
             $<$<CXX_COMPILER_ID:GNU>:-Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wpedantic -Wno-psabi -Werror -Wno-error=deprecated-declarations>
-            $<$<CXX_COMPILER_ID:MSVC>:/WX>)
+            $<$<CXX_COMPILER_ID:MSVC>:/WX /WD4996>)
     if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
         target_compile_definitions(filesystem_test_cpp${cppStd} PRIVATE _CRT_SECURE_NO_WARNINGS)
     endif()


Automatically pick up new sanitizers in cmake.

Change the default of COMPILER_RT_SANITIZERS_TO_BUILD to "all" in
order to automatically pick up new sanitizers in existing build
trees.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@311824 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -471,7 +471,7 @@
 endif()

 set(ALL_SANITIZERS asan;dfsan;msan;tsan;safestack;cfi;esan;scudo)
-set(COMPILER_RT_SANITIZERS_TO_BUILD ${ALL_SANITIZERS} CACHE STRING
+set(COMPILER_RT_SANITIZERS_TO_BUILD all CACHE STRING
     "sanitizers to build if supported on the target (all;${ALL_SANITIZERS})")
 list_replace(COMPILER_RT_SANITIZERS_TO_BUILD all "${ALL_SANITIZERS}")


Avoid rebuilding nd

Avoid rebuilding nd

--- cmake/nd-config.cmake
+++ cmake/nd-config.cmake
@@ -8,77 +8,46 @@

 include(ExternalProject)
 include(FindPackageHandleStandardArgs)
-find_package(Git)

-set(ND_GIT_REPOSITORY ssh://git@bitbucket.org/nclack/nd.git CACHE STRING "Location of the git repository for libnd.")
-ExternalProject_Add(libnd
-  GIT_REPOSITORY ${ND_GIT_REPOSITORY}
-  GIT_TAG spin-off-plugins
-  # UPDATE_COMMAND ""
-  # UPDATE_COMMAND ${GIT_EXECUTABLE} pull origin master
-  CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-             -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>#${CMAKE_INSTALL_PREFIX}
-  )
-get_target_property(ND_SOURCE_DIR libnd _EP_SOURCE_DIR)
-get_target_property(ND_ROOT_DIR   libnd _EP_INSTALL_DIR)
-#set(ND_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
+if(NOT ND_LIBRARY)
+  set(ND_GIT_REPOSITORY ssh://git@bitbucket.org/nclack/nd.git CACHE STRING "Location of the git repository for libnd.")
+  ExternalProject_Add(libnd
+    GIT_REPOSITORY ${ND_GIT_REPOSITORY}
+    GIT_TAG spin-off-plugins
+    # UPDATE_COMMAND ""
+    # UPDATE_COMMAND ${GIT_EXECUTABLE} pull origin master
+    CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+               -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>#${CMAKE_INSTALL_PREFIX}
+    )
+  ExternalProject_Get_Property(libnd SOURCE_DIR)
+  ExternalProject_Get_Property(libnd INSTALL_DIR)
+  set(ND_INCLUDE_DIR ${SOURCE_DIR} CACHE PATH "Path to nd.h")

-set(ND_INCLUDE_DIR ${ND_SOURCE_DIR} CACHE PATH "Path to nd.h")
+  add_library(nd STATIC IMPORTED)
+  set_target_properties(nd PROPERTIES
+    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+    IMPORTED_LOCATION "${INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}nd${CMAKE_STATIC_LIBRARY_SUFFIX}"
+    )
+  add_dependencies(nd libnd)

-add_library(nd STATIC IMPORTED)
-set_target_properties(nd PROPERTIES
-  IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-  IMPORTED_LOCATION "${ND_ROOT_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}nd${CMAKE_STATIC_LIBRARY_SUFFIX}"
-  )
-add_dependencies(nd libnd)
+  add_executable(libnd-tests IMPORTED)
+  set_target_properties(libnd-tests PROPERTIES
+    IMPORTED_LOCATION "${INSTALL_DIR}/bin/libnd-tests${CMAKE_EXECUTABLE_SUFFIX}"
+    )
+  add_dependencies(libnd-tests libnd)

+  find_package(CUDA 4.0)

-file(GLOB _plugins ${ND_SOURCE_DIR}/plugins/ndio*)
-foreach(_p ${_plugins})
-  get_filename_component(_c ${_p} NAME)
-  set(ND_PLUGINS ${ND_PLUGINS} ${_c})
-endforeach()
-foreach(plugin ${ND_PLUGINS})
-  add_library(${plugin} MODULE IMPORTED)
-  set_target_properties(${plugin} PROPERTIES
-    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-    IMPORTED_LOCATION "${ND_ROOT_DIR}/bin/plugins/${CMAKE_SHARED_MODULE_PREFIX}${plugin}${CMAKE_SHARED_MODULE_SUFFIX}"
-    )
-  add_dependencies(${plugin} libnd)
-endforeach()
-
-add_executable(libnd-tests IMPORTED)
-set_target_properties(libnd-tests PROPERTIES
-  IMPORTED_LOCATION "${ND_ROOT_DIR}/bin/libnd-tests${CMAKE_EXECUTABLE_SUFFIX}"
-  )
-add_dependencies(libnd-tests libnd)
-
-find_package(CUDA 4.0)
-
-set(ND_LIBRARY nd)
-set(ND_INCLUDE_DIRS  ${ND_INCLUDE_DIR} ${CUDA_INCLUDE_DIRS})
-set(ND_LIBRARIES     ${ND_LIBRARY} ${CUDA_LIBRARIES})
+  set(ND_LIBRARY nd)
+  set(ND_INCLUDE_DIRS  ${ND_INCLUDE_DIR} ${CUDA_INCLUDE_DIRS})
+  set(ND_LIBRARIES     ${ND_LIBRARY} ${CUDA_LIBRARIES})
+endif()

 find_package_handle_standard_args(ND DEFAULT_MSG
   ND_LIBRARY
   ND_INCLUDE_DIR
 )

-### install plugins to parent project plugins
-foreach(p ${ND_PLUGINS})
-  get_target_property(_path ${p} IMPORTED_LOCATION)
-  install(FILES ${_path} DESTINATION bin/plugins)
-endforeach()
-
-### install extra shared libs
-# TODO: How to get the list without building once?
-#       Probably have to do a cmake -P special.cmake and install(CODE)
-file(GLOB EXTRAS ${ND_ROOT_DIR}/bin/*${CMAKE_SHARED_MODULE_SUFFIX})
-file(GLOB PLUGIN_EXTRAS ${ND_ROOT_DIR}/bin/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}*)
-install(FILES ${EXTRAS} DESTINATION bin)
-install(FILES ${PLUGIN_EXTRAS} DESTINATION bin/plugins)
-
-#show(ND_PLUGINS)
 ### macro for copying plugins to a target's build Location
 macro(nd_copy_plugins_to_target _target)
     #show(_target)


Fix bug of handling blank characters in operators.cmake (#27310)

--- cmake/operators.cmake
+++ cmake/operators.cmake
@@ -138,12 +138,17 @@
     # And for detail pybind information, please see generated paddle/pybind/pybind.h.
     file(READ ${TARGET}.cc TARGET_CONTENT)
     string(REGEX MATCH "REGISTER_OPERATOR\\(.*REGISTER_OPERATOR\\(" multi_register "${TARGET_CONTENT}")
-    string(REGEX MATCH "REGISTER_OPERATOR\\([a-z0-9_]*," one_register "${multi_register}")
+    # [ \t\r\n]* is used for blank characters
+    string(REGEX MATCH "REGISTER_OPERATOR\\([ \t\r\n]*[a-z0-9_]*," one_register "${multi_register}")
+
     if (one_register STREQUAL "")
         string(REPLACE "_op" "" TARGET "${TARGET}")
     else ()
         string(REPLACE "REGISTER_OPERATOR(" "" TARGET "${one_register}")
         string(REPLACE "," "" TARGET "${TARGET}")
+        # [ \t\r\n]+ is used for blank characters.
+        # Here we use '+' instead of '*' since it is a REPLACE operation.
+        string(REGEX REPLACE "[ \t\r\n]+" "" TARGET "${TARGET}")
     endif()

     # pybind USE_NO_KERNEL_OP


added option to skip installing environment files which is used by buildfarm when building debian packages

--- cmake/catkin_generate_environment.cmake
+++ cmake/catkin_generate_environment.cmake
@@ -41,10 +41,12 @@
   # installspace
   set(SETUP_DIR ${CMAKE_INSTALL_PREFIX})
   set(CURRENT_WORKSPACE ${CMAKE_INSTALL_PREFIX})
-  # install setup.py
-  install(PROGRAMS
-    ${catkin_EXTRAS_DIR}/templates/setup.py
-    DESTINATION ${CMAKE_INSTALL_PREFIX})
+  if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+    # install setup.py
+    install(PROGRAMS
+      ${catkin_EXTRAS_DIR}/templates/setup.py
+      DESTINATION ${CMAKE_INSTALL_PREFIX})
+  endif()

   if(NOT MSVC)
     # non-windows
@@ -52,24 +54,30 @@
     configure_file(${catkin_EXTRAS_DIR}/templates/env.sh.in
       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/env.sh
       @ONLY)
-    install(PROGRAMS
-      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/env.sh
-      DESTINATION ${CMAKE_INSTALL_PREFIX})
+    if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+      install(PROGRAMS
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/env.sh
+        DESTINATION ${CMAKE_INSTALL_PREFIX})
+    endif()
     # generate and install setup for various shells
     em_expand(${catkin_EXTRAS_DIR}/templates/setup.context.py.in
       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/setup.installspace.context.py
       ${catkin_EXTRAS_DIR}/em/setup.sh.em
       ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/setup.sh)
-    install(FILES
-      ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/setup.sh
-      DESTINATION ${CMAKE_INSTALL_PREFIX})
+    if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+      install(FILES
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/setup.sh
+        DESTINATION ${CMAKE_INSTALL_PREFIX})
+    endif()
     foreach(shell bash zsh)
       configure_file(${catkin_EXTRAS_DIR}/templates/setup.${shell}.in
         ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/setup.${shell}
         @ONLY)
-      install(FILES
-        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/setup.${shell}
-        DESTINATION ${CMAKE_INSTALL_PREFIX})
+      if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+        install(FILES
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/installspace/setup.${shell}
+          DESTINATION ${CMAKE_INSTALL_PREFIX})
+      endif()
     endforeach()

   else()


CELIX-401: Small refactoring for generating the Dockerfile for deployments

--- cmake/cmake_celix/DockerPackaging.cmake
+++ cmake/cmake_celix/DockerPackaging.cmake
@@ -64,11 +64,10 @@
     set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_DOCKERFILE_WORK_DIR" "${DOCKER_WORK_DIR}") #workdir in docker image, should also contain the config.properties
     set_target_properties(${DEPLOY_TARGET} PROPERTIES "DEPLOY_DOCKERFILE_INSTRUCTIONS" "") #list of additional instructions

-    set(STAGE1 "${CMAKE_CURRENT_BINARY_DIR}/${DEPLOY_TARGET}-Dockerfile-stage1")
     set(DOCKERFILE "$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_LOCATION>/Dockerfile")

     file(GENERATE
-            OUTPUT "${STAGE1}"
+            OUTPUT "${DOCKERFILE}"
             CONTENT "# Dockerfile for inaetics/celix-node-agent-service
 FROM $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_FROM>

@@ -76,17 +75,12 @@
 ENV IMAGE_NAME $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_IMAGE_NAME>

 #add bundles, properties and set workdir
-COPY $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_BUNDLES>, > $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_BUNDLES_DIR>
+COPY bundles/*.zip $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_BUNDLES_DIR>
 COPY config.properties $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_WORK_DIR>
 WORKDIR $<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_WORK_DIR>
 $<JOIN:$<TARGET_PROPERTY:${DEPLOY_TARGET},DEPLOY_DOCKERFILE_INSTRUCTIONS>,
 >
 ")
-
-    file(GENERATE
-        OUTPUT "${DOCKERFILE}"
-        INPUT "${STAGE1}"
-    )

     get_target_property(DEPS dockerfiles "DOCKER_FILES_DEPS")
     list(APPEND DEPS "${DOCKERFILE}")
@@ -114,4 +108,4 @@
             Add the COPY to the add_deploy command for '${DEPLOY_TARGET}'
         ")
     endif()
-endfunction()+endfunction()


Android toolchain: Fix Python lookup

Android toolchain: Fix Python lookup

--- cmake/modules/hunter_upload_cache.cmake
+++ cmake/modules/hunter_upload_cache.cmake
@@ -53,6 +53,13 @@
     hunter_user_error("Upload: PASSWORD is missing")
   endif()

+  if(ANDROID)
+    # Emulate find_host_program
+    set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+    set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+    set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+  endif()
+
   find_package(PythonInterp 3 QUIET)

   if(NOT PYTHONINTERP_FOUND)


fix when policy not set or not NEW

fix when policy not set or not NEW

--- conan.cmake
+++ conan.cmake
@@ -158,7 +158,7 @@
         set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
         if(APPLE)
             cmake_policy(GET CMP0025 APPLE_CLANG_POLICY)
-            if(APPLE_CLANG_POLICY STREQUAL "OLD")
+            if(NOT APPLE_CLANG_POLICY STREQUAL NEW)
                 message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it")
                 set(_CONAN_SETTING_COMPILER apple-clang)
             endif()