cmake: don't run linux command on macos

cmake: don't run linux command on macos

--- scripts/cmake/ElektraPackaging.cmake
+++ scripts/cmake/ElektraPackaging.cmake
@@ -113,16 +113,18 @@
 	execute_process (COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE)
 	string (STRIP "${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_ARCHITECTURE)

-	# Try to find distro name and distro-specific arch
-	execute_process (COMMAND bash "-c" "grep \"^NAME=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
-			 OUTPUT_VARIABLE OS_NAME)
-	execute_process (COMMAND bash "-c" "grep \"^VERSION_ID=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
-			 OUTPUT_VARIABLE OS_VERSION_ID)
-	execute_process (COMMAND bash "-c" "grep \"^PRETTY_NAME=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
-			 OUTPUT_VARIABLE OS_PRETTY_NAME)
-	string (STRIP "${OS_NAME}" OS_NAME)
-	string (STRIP "${OS_VERSION_ID}" OS_VERSION_ID)
-	string (STRIP "${OS_PRETTY_NAME}" OS_PRETTY_NAME)
+	if (NOT APPLE)
+		# Try to find distro name and distro-specific arch
+		execute_process (COMMAND bash "-c" "grep \"^NAME=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
+				 OUTPUT_VARIABLE OS_NAME)
+		execute_process (COMMAND bash "-c" "grep \"^VERSION_ID=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
+				 OUTPUT_VARIABLE OS_VERSION_ID)
+		execute_process (COMMAND bash "-c" "grep \"^PRETTY_NAME=\" /etc/os-release | awk -F= {' print $2'} | sed 's/\"//g'"
+				 OUTPUT_VARIABLE OS_PRETTY_NAME)
+		string (STRIP "${OS_NAME}" OS_NAME)
+		string (STRIP "${OS_VERSION_ID}" OS_VERSION_ID)
+		string (STRIP "${OS_PRETTY_NAME}" OS_PRETTY_NAME)
+	endif (NOT APPLE)
 	set (OS_DISTRIB "${OS_NAME}${OS_VERSION_ID}")
 	if (NOT OS_DISTRIB)
 		set (OS_DISTRIB "unix")


[BUGFIX] Fix building when USE_BLAS option is not provided (#19832)

* Fix building when USE_BLAS option is not provided

* Fix the check for BLAS libraries in specified order priority

--- cmake/ChooseBlas.cmake
+++ cmake/ChooseBlas.cmake
@@ -17,15 +17,17 @@

 set(BLAS "Open" CACHE STRING "Selected BLAS library")
 set_property(CACHE BLAS PROPERTY STRINGS "Atlas;Open;MKL")
+# ---[ Root folders
+set(INTEL_HOME_ROOT "$ENV{HOME}/intel" CACHE PATH "Folder contains user-installed intel libs")
+set(INTEL_OPT_ROOT "/opt/intel" CACHE PATH "Folder contains root-installed intel libs")

 if(DEFINED USE_BLAS)
   set(BLAS "${USE_BLAS}")
 else()
-  if(USE_MKL_IF_AVAILABLE)
-    if(NOT MKL_FOUND)
-      find_package(MKL)
-    endif()
-    if(MKL_FOUND)
+  if (USE_MKL_IF_AVAILABLE)
+    # Setting up BLAS_mkl_MKLROOT for non-Ubuntu 20.04 OSes
+    find_path(BLAS_mkl_MKLROOT mkl PATHS $ENV{MKLROOT} ${INTEL_HOME_ROOT} ${INTEL_OPT_ROOT})
+    if(NOT BLAS_mkl_MKLROOT STREQUAL "BLAS_mkl_MKLROOT-NOTFOUND")
       set(BLAS "MKL")
     endif()
   endif()
@@ -121,10 +123,6 @@
     endif()
   endif()
 elseif(BLAS STREQUAL "MKL" OR BLAS STREQUAL "mkl")
-  # ---[ Root folders
-  set(INTEL_HOME_ROOT "$ENV{HOME}/intel" CACHE PATH "Folder contains user-installed intel libs")
-  set(INTEL_OPT_ROOT "/opt/intel" CACHE PATH "Folder contains root-installed intel libs")
-
   # ---[ MKL Options
   if(UNIX)
     # Single dynamic library interface leads to conflicts between intel omp and llvm omp


Update FindMatlab.cmake

Update FindMatlab.cmake

--- cmake/FindMatlab.cmake
+++ cmake/FindMatlab.cmake
@@ -229,7 +229,7 @@

 set(_FindMatlab_SELF_DIR "${CMAKE_CURRENT_LIST_DIR}")

-include(FindPackageHandleStandardArgs.cmake)
+include(FindPackageHandleStandardArgs)
 include(CheckCXXCompilerFlag)
 include(CheckCCompilerFlag)


remove strange brackets in zeromq cmake file

--- cmake/FindZeroMQ.cmake
+++ cmake/FindZeroMQ.cmake
@@ -30,7 +30,7 @@
                 NO_DEFAULT_PATH
                 DOC "Path to libzmq)"
             )
-    find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp}
+    find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp
                 PATHS ${ZEROMQ}/include
                 NO_DEFAULT_PATH
                 DOC "Path to ZeroMQ include header files."
@@ -41,7 +41,7 @@
                 DOC "Path to libzmq)"
             )

-    find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hpp zmq_utils.h}
+    find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.hpp zmq_utils.h
                 DOC "Path to ZeroMQ include header files."
             )
 endif(ZEROMQ)


PAR: cleanup of debug messages

PAR: cleanup of debug messages

--- cmake/GenParFile.cmake
+++ cmake/GenParFile.cmake
@@ -1,4 +1,5 @@
-# This CMake macro generates a target that, in turn, will generate a PARfile for the given library.
+# This CMake function generates a target that, in turn, will generate a PARfile for the given
+# library.
 #
 # Usage: in the CMakeLists.txt, for a given library, add the following:
 #   add_target_parfile(${MODULE} "${SRCS}" "${HDRS}" "${MODULE}LinkDef.h" "${LIBDEPS}")
@@ -14,26 +15,22 @@
 # To generate a parfile, if enabled in its CMakeLists.txt, go to the build directory and run:
 #   make BLAHBLAH.par

-macro(add_target_parfile PARMODULE PARSOURCES PARHEADERS PARLINKDEF PARLIBDEPS)
+function(add_target_parfile PARMODULE PARSOURCES PARHEADERS PARLINKDEF PARLIBDEPS)

-  message(STATUS "PARfile generation: ${PARMODULE}")
-
-  # Libraries
-  foreach(THISLIB ${PARLIBDEPS})
-    set(_PARLIBDEPS "${_PARLIBDEPS} lib${THISLIB}")
+  # Libraries: result is a space-separated string
+  foreach(_THISLIB ${PARLIBDEPS})
+    set(_PARLIBDEPS "${_PARLIBDEPS} lib${_THISLIB}")
   endforeach()
   string(STRIP "${_PARLIBDEPS}" PARLIBDEPS)

-  # Export variable
+  # Export variables: used in configure_file()
   set(PARMODULE "${PARMODULE}")
+  string(REPLACE ";" " " PARSOURCES_FLAT "${PARSOURCES}")

-  message(STATUS "--> Module: ${PARMODULE}")
-  message(STATUS "--> Sources: ${PARSOURCES}")
-  message(STATUS "--> Deps: ${PARLIBDEPS}")
+  #message(STATUS "[add_target_parfile] Library (space-separated): ${PARMODULE}")
+  #message(STATUS "[add_target_parfile] Sources (list): ${PARSOURCES}")
+  #message(STATUS "[add_target_parfile] Dependencies (space-separated): ${PARLIBDEPS}")

-  foreach(LOOPVAR ${PARSOURCES})
-    message(STATUS "----> ${LOOPVAR}")
-  endforeach()

   # PARfile output directory (the one we will tar)
   set(PARDIR ${CMAKE_CURRENT_BINARY_DIR}/PARfiles/${PARMODULE})
@@ -71,4 +68,4 @@
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )

-endmacro()
+endfunction()


add missing changes to alpaka_add_library

--- cmake/addLibrary.cmake
+++ cmake/addLibrary.cmake
@@ -119,7 +119,11 @@
                     SET_SOURCE_FILES_PROPERTIES( ${_file} PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ )
                 ENDIF()
             ENDFOREACH()
-            CMAKE_POLICY(SET CMP0023 OLD)   # CUDA_ADD_LIBRARY calls TARGET_LINK_LIBRARIES without keywords.
+            IF (CMAKE_VERSION VERSION_LESS 3.9.0)
+                CMAKE_POLICY(SET CMP0023 OLD)   # CUDA_ADD_EXECUTABLE calls TARGET_LINK_LIBRARIES without keywords.
+            ELSE()
+                SET(CUDA_LINK_LIBRARIES_KEYWORD "PUBLIC")
+            ENDIF()
             CUDA_ADD_LIBRARY(
                 ${libraryName}
                 ${sourceFileNames}


Fix gd device compile / link flags to remove extraneous -I and -L options
and to ensure libgd is correctly linked with plplotd library.

svn path=/trunk/; revision=6821

--- cmake/modules/gd.cmake
+++ cmake/modules/gd.cmake
@@ -62,14 +62,45 @@
 endif(PLD_jpeg)

 if(PLD_png OR PLD_jpeg OR PLD_gif)
-  string(REGEX REPLACE ";" " -I"
-    gd_COMPILE_FLAGS
-    "-I${GDINCCMD}"
-    )
-  string(REGEX REPLACE ";" " "
-    gd_LINK_FLAGS
-    "${GDLIBCMD}"
-    )
+  # Strip duplicate include directory entries out
+  set(GDINCTRIM)
+  foreach(DIR ${GDINCCMD})
+    set(FOUND OFF)
+    foreach(TRIMMED ${GDINCTRIM})
+      if ("${DIR}" STREQUAL "${TRIMMED}")
+	SET(FOUND ON)
+      endif ("${DIR}" STREQUAL "${TRIMMED}")
+    endforeach(TRIMMED ${GDINCTRIM})
+    if (NOT FOUND)
+      set(GDINCTRIM "${GDINCTRIM}" "${DIR}")
+    endif (NOT FOUND)
+  endforeach(DIR ${GDINCCMD})
+  # Convert directory list to compile flags
+  set(gd_COMPILE_FLAGS)
+  foreach(DIR ${GDINCTRIM})
+    set(gd_COMPILE_FLAGS ${gd_COMPILE_FLAGS} "-I${DIR}")
+  endforeach(DIR ${GDINCTRIM})
+
+  set(GDLIBCMDTRIM)
+  set(GDLIBSTRIM)
+  set(GDLIBDIRS)
+  # Generate trimmed list of library directories and list of libraries
+  foreach(LIB ${GDLIBCMD})
+    get_filename_component(LIBDIR ${LIB} PATH)
+    get_filename_component(LIBNAME ${LIB} NAME_WE)
+    set(FOUND OFF)
+    foreach(TRIMMED ${GDLIBSTRIM})
+      if ("${LIBDIR}" STREQUAL "${TRIMMED}")
+	set(FOUND ON)
+      endif ("${LIBDIR}" STREQUAL "${TRIMMED}")
+    endforeach(TRIMMED ${GDLIBSTRIM})
+    if (NOT FOUND)
+      set(GDLIBSTRIM ${GDLIBSTRIM} ${LIBDIR})
+      set(gd_LINK_FLAGS "${gd_LINK_FLAGS} -L${LIBDIR}")
+    endif (NOT FOUND)
+    string(REGEX REPLACE "^lib" "-l" LIBSHORT ${LIBNAME})
+    set(gd_LINK_FLAGS "${gd_LINK_FLAGS} ${LIBSHORT}")
+  endforeach(LIB ${GDLIBCMD})
   set(DRIVERS_LINK_FLAGS ${DRIVERS_LINK_FLAGS} ${gd_LINK_FLAGS})
 endif(PLD_png OR PLD_jpeg OR PLD_gif)


px4_fmuv2_multicopter:Remove bl_update to fit

--- boards/px4/fmu-v2/multicopter.cmake
+++ boards/px4/fmu-v2/multicopter.cmake
@@ -59,7 +59,7 @@
 		vmount

 	SYSTEMCMDS
-		bl_update
+		#bl_update
 		#config
 		#dumpfile
 		#esc_calib


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -76,7 +76,7 @@
 Comment[et]=Phononi GStreameri taustaprogramm
 Comment[eu]=Phonon GStreamer backend
 Comment[fi]=Phonon GStreamer-taustaohjelma
-Comment[fr]=Système de gestion GStreamer pour Phonon
+Comment[fr]=Moteur GStreamer pour Phonon
 Comment[ga]=Inneall GStreamer le haghaidh Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon
 Comment[hsb]=Phonon GStreamer backend


Turn off warnings in SOAP generated code.

--- build/cmake/gSOAPGen.cmake
+++ build/cmake/gSOAPGen.cmake
@@ -64,6 +64,12 @@
 		list(APPEND ${_HDRS} ${${_DAEMON}_SOAP_HDRS} )
 	endif()

+	#  The generated files spew no end of warnings which we can't fix.
+	#  So, turn off the warnings for these files. (-w means no warnings)
+	if (UNIX)
+		set_source_files_properties( ${${_DAEMON}_SOAP_SRCS} PROPERTIES COMPILE_FLAGS "-w")
+	endif(UNIX)
+
 	 list(REMOVE_DUPLICATES ${_SRCS})

 endif()


Revert removing saving test log to file

Revert removing saving test log to file

--- cmake/JPetFramework-Utilities.cmake
+++ cmake/JPetFramework-Utilities.cmake
@@ -2,7 +2,7 @@
     add_executable(${TESTNAME}.x ${ARGN})
     target_compile_options(${TESTNAME}.x PRIVATE -Wunused-parameter -Wall)
     target_link_libraries(${TESTNAME}.x JPetFramework Boost::unit_test_framework)
-    add_test(NAME ${TESTNAME}.x COMMAND ${TESTNAME}.x "--log_level=ERROR --log_format=XML --raport_level=no")
+    add_test(NAME ${TESTNAME}.x COMMAND ${TESTNAME}.x "--log_level=ERROR --log_format=XML --log_sink=${TESTNAME}.xml --raport_level=no")
     set_target_properties(${TESTNAME}.x PROPERTIES FOLDER tests)
     add_dependencies(${TESTNAME}.x link_target)
 endmacro()


don't use visibility on windows with gcc 4.4

svn path=/trunk/kdesupport/strigi/; revision=1009416

--- cmake/MacroCheckGccVisibility.cmake
+++ cmake/MacroCheckGccVisibility.cmake
@@ -30,16 +30,16 @@
       string(REGEX MATCH "(--enable-libstdcxx-allocator=mt)" _GCC_COMPILED_WITH_BAD_ALLOCATOR "${_gcc_alloc_info}")
    endif (GCC_IS_NEWER_THAN_4_1)

-   if (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR)
+   if (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)
       set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
       set (KDE4_C_FLAGS "${KDE4_C_FLAGS}" "-fvisibility=hidden")

       if (GCC_IS_NEWER_THAN_4_2)
           set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
       endif (GCC_IS_NEWER_THAN_4_2)
-   else (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR)
+   else (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)
       set (${GccVisibility} 0)
-   endif (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR)
+   endif (${GccVisibility} AND GCC_IS_NEWER_THAN_4_1 AND NOT _GCC_COMPILED_WITH_BAD_ALLOCATOR AND NOT WIN32)

   else (CMAKE_COMPILER_IS_GNUCXX)
     set(${GccVisibility} FALSE)


[cmake] Support overriding llvm-config query results

Support overriding LLVM_* variables obtained from llvm-config when doing
stand-alone builds. The override of LLVM_MAIN_SRC_DIR is necessary to
provide LLVM sources when the initial directory used to build LLVM does
no longer exist when compiler-rt is built stand-alone. This is
especially the case when building the projects separately in temporary
directories with unpredictable names.

The code is based on existing CMakeLists.txt from clang. Alike clang, it
extends the override to all queried variables.

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

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

--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -197,10 +197,15 @@
     message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
   endif()
   string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT})
-  list(GET CONFIG_OUTPUT 0 LLVM_BINARY_DIR)
-  list(GET CONFIG_OUTPUT 1 LLVM_TOOLS_BINARY_DIR)
-  list(GET CONFIG_OUTPUT 2 LLVM_LIBRARY_DIR)
-  list(GET CONFIG_OUTPUT 3 LLVM_MAIN_SRC_DIR)
+  list(GET CONFIG_OUTPUT 0 BINARY_DIR)
+  list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
+  list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
+  list(GET CONFIG_OUTPUT 3 MAIN_SRC_DIR)
+
+  set(LLVM_BINARY_DIR ${BINARY_DIR} CACHE PATH "Path to LLVM build tree")
+  set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
+  set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
+  set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")

   # Make use of LLVM CMake modules.
   file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)


eh, of course the variable itself must also be checked

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -190,7 +190,7 @@
    _my_find(_available_vector_units_list "sse4.1" SSE4_1_FOUND)
    _my_find(_available_vector_units_list "sse4.2" SSE4_2_FOUND)
    _my_find(_available_vector_units_list "sse4a" SSE4a_FOUND)
-   if(DEFINED VC_AVX_INTRINSICS_BROKEN)
+   if(DEFINED VC_AVX_INTRINSICS_BROKEN AND VC_AVX_INTRINSICS_BROKEN)
       message(WARNING "AVX disabled per default because of broken compiler")
       set(AVX_FOUND false)
       set(XOP_FOUND false)


Check CMAKE_*_ABI_COMPILED only for enabled languages

Fix issue #189

--- cmake/modules/hunter_finalize.cmake
+++ cmake/modules/hunter_finalize.cmake
@@ -12,13 +12,29 @@
 #   * calculate toolchain-id
 #   * calculate config-id
 macro(hunter_finalize)
-  if(NOT CMAKE_C_ABI_COMPILED)
+  get_property(_enabled_languages GLOBAL PROPERTY ENABLED_LANGUAGES)
+
+  list(FIND _enabled_languages "C" _c_enabled_result)
+  if(_c_enabled_result EQUAL -1)
+    set(_c_enabled FALSE)
+  else()
+    set(_c_enabled TRUE)
+  endif()
+
+  list(FIND _enabled_languages "CXX" _cxx_enabled_result)
+  if(_cxx_enabled_result EQUAL -1)
+    set(_cxx_enabled FALSE)
+  else()
+    set(_cxx_enabled TRUE)
+  endif()
+
+  if(_c_enabled AND NOT CMAKE_C_ABI_COMPILED)
     hunter_fatal_error(
         "ABI not detected for C compiler" WIKI "error.abi.detection.failure"
     )
   endif()

-  if(NOT CMAKE_CXX_ABI_COMPILED)
+  if(_cxx_enabled AND NOT CMAKE_CXX_ABI_COMPILED)
     hunter_fatal_error(
         "ABI not detected for CXX compiler" WIKI "error.abi.detection.failure"
     )


set version to 0.7.1

set version to 0.7.1


CMake: Don't hardcode build tools (#779)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -38,7 +38,7 @@
                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
-            BUILD_COMMAND make mkldnn
+            BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} mkldnn
             TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/tmp"
             STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/stamp"
             DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/download"
@@ -58,7 +58,7 @@
                 -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
                 -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
                 -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_ROOT}/mkldnn
-            BUILD_COMMAND make mkldnn
+            BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} mkldnn
             TMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/tmp"
             STAMP_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/stamp"
             DOWNLOAD_DIR "${EXTERNAL_PROJECTS_ROOT}/mkldnn/download"


Fix the problem that "ADE" downloaded from GitCode doesn't work.

--- cmake/mirrors/gitcode.cmake
+++ cmake/mirrors/gitcode.cmake
@@ -64,7 +64,7 @@
     list(GET DL_URL_split 4 __REPO_NAME)
     set(DL_URL "https://gitcode.net/${__OWNER}/${__REPO_NAME}/-/archive/${${DL_ID}_RELEASE_GITCODE}/${__REPO_NAME}-")
     set(DL_HASH "${${DL_ID}_PKG_MD5_GITCODE}")
-    set(SUBDIR "${${DL_ID}_PKG_NAME_GITCODE}" PARENT_SCOPE)
+    set(${SUBDIR} "${${DL_ID}_PKG_NAME_GITCODE}" PARENT_SCOPE)
   else()
     message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.")
   endif()


removed occurrence of USE_RELATIVE

removed occurrence of USE_RELATIVE


From Carlo Comporesi, adding support of finding libcurl in 3rd party dependencies

--- CMakeModules/Find3rdPartyDependencies.cmake
+++ CMakeModules/Find3rdPartyDependencies.cmake
@@ -59,6 +59,7 @@
             SET(FREETYPE_INCLUDE_DIR_freetype2 ${FREETYPE_INCLUDE_DIR} CACHE PATH "")
             MARK_AS_ADVANCED(FREETYPE_INCLUDE_DIR_ft2build FREETYPE_INCLUDE_DIR_freetype2)
         ENDIF(FREETYPE_FOUND)
+        FIND_DEPENDENCY(CURL curl/curl.h libcurl ${OSG_3RDPARTY_BIN} "D")
         FIND_DEPENDENCY(JPEG jpeglib.h libjpeg ${OSG_3RDPARTY_BIN} "D")
         #FIND_DEPENDENCY(GDAL gdal.h "gdal;gdal_i" ${OSG_3RDPARTY_BIN})
         FIND_DEPENDENCY(GLUT GL/glut.h glut32 ${OSG_3RDPARTY_BIN} "D")


Update appveyor

Update appveyor

--- cmake/FindLuaJIT.cmake
+++ cmake/FindLuaJIT.cmake
@@ -9,6 +9,7 @@
     /usr
     c:/usr/local/lib
     c:/usr/local
+    c:/usr/lib
     c:/usr
     $ENV{LUAJIT_DIR}
     )


update sphinx cmake

update sphinx cmake

--- cmake/FindSphinx.cmake
+++ cmake/FindSphinx.cmake
@@ -72,7 +72,7 @@
     ${source}
     ${destination}
     COMMENT "Generating sphinx documentation: ${builder}"
-    COMMAND cd ${destination} && ln -s ./index_*.html index.html
+    COMMAND cd ${destination} && ln -sf ./index_*.html index.html
     )

   set_property(


cmake: extensions: add assert_not()

cmake: extensions: add assert_not()

To be used in a later patch.

Signed-off-by: Marti Bolivar <fd5da480b758a78208111e6ae5c6806e1f887137@opensourcefoundries.com>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -802,6 +802,17 @@
 endmacro()

 # Usage:
+#   assert_not(FLASH_SCRIPT "FLASH_SCRIPT has been removed; use BOARD_FLASH_RUNNER")
+#
+# will cause a FATAL_ERROR and print an errorm essage if the first
+# espression is true
+macro(assert_not test comment)
+  if(${test})
+    message(FATAL_ERROR "Assertion failed: ${comment}")
+  endif()
+endmacro()
+
+# Usage:
 #   assert_exists(CMAKE_READELF)
 #
 # will cause a FATAL_ERROR if there is no file or directory behind the


Corrected condition

Corrected condition

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -16,13 +16,11 @@
 # Return the result in argument 1, empty if not found
 FUNCTION(FIND_GCC GCC_PATH GCC_MAJOR GCC_MINOR)
   # Search for gcc-x.y
-  UNSET(EXACT_GCC)
   FIND_PROGRAM(EXACT_GCC "gcc-${GCC_MAJOR}.${GCC_MINOR}")
   IF(EXACT_GCC)
     SET(GCC_PATH "${EXACT_GCC}" PARENT_SCOPE)
   ELSE(EXACT_GCC)
     # gcc-x.y not found, check default gcc
-    UNSET(DEFAULT_GCC)
     FIND_PROGRAM(DEFAULT_GCC gcc)
     EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)

@@ -32,9 +30,9 @@
     STRING(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" GCCVER_PATCH "${GCCVER}")

     # Check that adequate
-    IF(GCCVER_MAJOR MATCHES "${GCC_MAJOR}" AND GCCVER_MINOR MATCHES "${GCC_MINOR}")
+    IF(GCCVER_MAJOR MATCHES GCC_MAJOR AND GCCVER_MINOR MATCHES GCC_MINOR)
         SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
-    ENDIF(GCCVER_MAJOR MATCHES "${GCC_MAJOR}" AND GCCVER_MINOR MATCHES "${GCC_MINOR}")
+    ENDIF(GCCVER_MAJOR MATCHES GCC_MAJOR AND GCCVER_MINOR MATCHES GCC_MINOR)
   ENDIF(EXACT_GCC)
 ENDFUNCTION(FIND_GCC)


Thirdparty components also import the import library (.lib) on dll platforms

--- cmake/thirdparty.cmake
+++ cmake/thirdparty.cmake
@@ -171,11 +171,31 @@
     endif()
 endfunction()

+function(compute_binary_file NAME TYPE LIBRARY_SUFFIX BINARY_DIR RESULT)
+    libraryfile(${NAME} ${TYPE} file)
+
+    get_filename_component(filename "${file}" NAME_WE)
+    get_filename_component(fileext  "${file}" EXT)
+    set(file "${filename}${LIBRARY_SUFFIX}${fileext}")
+
+    if(MSVC)
+        set(file "${CMAKE_BUILD_TYPE}/${file}")
+    endif()
+
+    message(STATUS "Component ${NAME} binary file: ${file}")
+
+    if(BINARY_DIR)
+        set(${RESULT} "${BINARY_DIR}/${file}" PARENT_SCOPE)
+    else()
+        set(${RESULT} "${file}" PARENT_SCOPE)
+    endif()
+endfunction()
+
 function(add_siplasplas_thirdparty_component NAME)

     cmake_parse_arguments(COMPONENT
         "DEFAULT;SHARED"
-        "THIRD_PARTY;BINARY;BINARY_DIR;LIBRARY_SUFFIX"
+        "THIRD_PARTY;BINARY;BINARY_DIR;BINARY_NAME;LIBRARY_SUFFIX;SHARED_LIBRARY_SUFFIX"
         "INCLUDE_DIRS;DEPENDS;LINK_LIBS"
         ${ARGN}
     )
@@ -192,30 +212,25 @@
             set(repodir "${CMAKE_BINARY_DIR}/THIRDPARTY/${COMPONENT_THIRD_PARTY}/src/${COMPONENT_THIRD_PARTY}")
         endif()
     endif()
+
     if(NOT COMPONENT_BINARY)
+        if(NOT COMPONENT_BINARY_NAME)
+            set(COMPONENT_BINARY_NAME ${NAME})
+        endif()
+
         if(COMPONENT_SHARED)
-            libraryfile(${NAME} SHARED libfile)
-        else()
-            libraryfile(${NAME} STATIC libfile)
-        endif()
-
-        get_filename_component(filename "${libfile}" NAME_WE)
-        get_filename_component(fileext  "${libfile}" EXT)
-        set(libfile "${filename}${COMPONENT_LIBRARY_SUFFIX}${fileext}")
-
-        if(MSVC)
-            set(libfile "${CMAKE_BUILD_TYPE}/${libfile}")
-        endif()
-
-        if(COMPONENT_BINARY_DIR)
-            set(COMPONENT_BINARY "${COMPONENT_BINARY_DIR}/${libfile}")
-        else()
-            set(COMPONENT_BINARY "${libfile}")
-        endif()
-
-        if(SIPLASPLAS_VERBOSE_CONFIG)
-            message(STATUS "${COMPONENT_THIRD_PARTY}-${NAME} binary: ${COMPONENT_BINARY}")
-        endif()
+            compute_binary_file(${COMPONENT_BINARY_NAME} SHARED "${COMPONENT_LIBRARY_SUFFIX}${COMPONENT_SHARED_LIBRARY_SUFFIX}" "${COMPONENT_BINARY_DIR}" libfile)
+
+            # We should import the location of the import lib (.lib) too to link with the dll
+            # (In dll platforms you link against the import lib, not the dynamic library)
+            if(WIN32)
+                compute_binary_file(${COMPONENT_BINARY_NAME} IMPORT "${COMPONENT_LIBRARY_SUFFIX}" "${COMPONENT_BINARY_DIR}" importedlibfile)
+            endif()
+        else()
+            compute_binary_file(${COMPONENT_BINARY_NAME} STATIC "${COMPONENT_LIBRARY_SUFFIX}" "${COMPONENT_BINARY_DIR}" libfile)
+        endif()
+
+        set(COMPONENT_BINARY "${libfile}")
     endif()

     message(STATUS "SIPLASPLAS THIRD PARTY COMPONENT '${NAME}' FROM '${COMPONENT_THIRD_PARTY}'")
@@ -242,6 +257,13 @@
         IMPORTED_LOCATION "${binary_dir}/${COMPONENT_BINARY}"
     )

+    if(importedlibfile)
+        message(STATUS "Adding implementation lib (${importedlibfile}) for component ${NAME} of thirdparty ${COMPONENT_THIRD_PARTY}")
+        set_target_properties(${importedlib} PROPERTIES
+            IMPORTED_IMPLIB "${binary_dir}/${importedlibfile}"
+        )
+    endif()
+
     add_library(${interfacelib} INTERFACE)
     target_include_directories(${interfacelib} INTERFACE ${includedirs})
     target_link_libraries(${interfacelib} INTERFACE ${importedlib})


updates to package.cmake

updates to package.cmake

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -65,6 +65,7 @@
   INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} DESTINATION bin COMPONENT tutorials)
   INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} DESTINATION lib COMPONENT library)
 ELSEIF (APPLE)
+  # install TBB with libc++ linkage for MacOSX
   INSTALL(PROGRAMS ${TBB_ROOT}/lib/libc++/libtbb.dylib ${TBB_ROOT}/lib/libc++/libtbbmalloc.dylib DESTINATION bin COMPONENT tutorials)
   INSTALL(PROGRAMS ${TBB_ROOT}/lib/libc++/libtbb.dylib ${TBB_ROOT}/lib/libc++/libtbbmalloc.dylib DESTINATION lib COMPONENT library)
 ENDIF()
@@ -98,9 +99,6 @@

 SET(CPACK_COMPONENT_UTILITIES_DISPLAY_NAME "Utilities")
 SET(CPACK_COMPONENT_UTILITIES_DESCRIPTION "Tools to benchmark, test and debug Embree.")
-
-#SET(CPACK_COMPONENT_REDIST_DISPLAY_NAME "Redistributables")
-#SET(CPACK_COMPONENT_REDIST_DESCRIPTION "Installs 3rd-party redistributables needed by Embree.")

 # devel install group
 SET(CPACK_COMPONENT_LIBRARIES_GROUP devel)
@@ -113,7 +111,6 @@
 # example install group
 SET(CPACK_COMPONENT_TUTORIALS_GROUP examples)
 SET(CPACK_COMPONENT_UTILITIES_GROUP examples)
-#SET(CPACK_COMPONENT_REDIST_GROUP examples)
 SET(CPACK_COMPONENT_GROUP_EXAMPLES_DISPLAY_NAME "Examples")
 SET(CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION "Example tutorials and tools for Embree.")
 SET(CPACK_COMPONENT_EXAMPLES_DESCRIPTION ${CPACK_COMPONENT_GROUP_EXAMPLES_DESCRIPTION})
@@ -139,10 +136,6 @@

 # Windows specific settings
 IF(WIN32)
-  SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities)
-#  SET(CPACK_COMPONENT_REDIST_DISABLED OFF)
-#  SET(CPACK_COMPONENT_TUTORIALS_DEPENDS redist)
-#  SET(CPACK_COMPONENT_UTILITIES_DEPENDS redist)

   IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(ARCH x64)
@@ -151,11 +144,12 @@
     SET(ARCH win32)
     SET(PROGRAMFILES "\$PROGRAMFILES")
   ENDIF()
-  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}")
+  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.${ARCH}.windows")

   # NSIS specific settings
   IF (ENABLE_INSTALLER)
     SET(CPACK_GENERATOR NSIS)
+    SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities)
     SET(CPACK_NSIS_INSTALL_ROOT "${PROGRAMFILES}\\\\Intel")
     SET(CPACK_NSIS_DISPLAY_NAME "Embree: High Performance Ray Tracing Kernels")
     SET(CPACK_NSIS_PACKAGE_NAME "Embree ${EMBREE_VERSION}")
@@ -164,10 +158,8 @@
     SET(CPACK_NSIS_MUI_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon32.ico)
     SET(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT})
   ELSE()
-    SET(CPACK_COMPONENTS_ALL)
-    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_GENERATOR ZIP)
-    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.windows")
+    SET(CPACK_MONOLITHIC_INSTALL 1)
   ENDIF()

 # MacOSX specific settings
@@ -175,25 +167,27 @@

   CONFIGURE_FILE(README.md README.txt)
   SET(CPACK_RESOURCE_FILE_README ${PROJECT_BINARY_DIR}/README.txt)
+  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")

   IF (ENABLE_INSTALLER)
+    SET(CPACK_GENERATOR PackageMaker)
+    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_PACKAGE_VENDOR "intel") # creates short name com.intel.embree2.xxx in pkgutil
-    SET(CPACK_MONOLITHIC_INSTALL 1)
-    SET(CPACK_GENERATOR PackageMaker)
     SET(CPACK_OSX_PACKAGE_VERSION 10.7)
   ELSE()
-    SET(CPACK_MONOLITHIC_INSTALL 1)
     SET(CPACK_GENERATOR TGZ)
-    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.macosx")
+    SET(CPACK_MONOLITHIC_INSTALL 1)
   ENDIF()

 # Linux specific settings
 ELSE()

+  SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
+
   IF (ENABLE_INSTALLER)
+
+    SET(CPACK_GENERATOR RPM)
     SET(CPACK_COMPONENTS_ALL libraries headers documentation tutorials utilities libraries_xeonphi tutorials_xeonphi utilities_xeonphi)
-    SET(CPACK_GENERATOR RPM)
-    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64")
     SET(CPACK_RPM_COMPONENT_INSTALL ON)
     SET(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") # Apache Software License, Version 2.0
     SET(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
@@ -207,10 +201,9 @@
     SET(CPACK_RPM_devel_xeonphi_POST_INSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
     SET(CPACK_RPM_devel_xeonphi_POST_UNINSTALL_SCRIPT_FILE ${PROJECT_SOURCE_DIR}/common/cmake/rpm_ldconfig.sh)
   ELSE()
-    SET(CPACK_MONOLITHIC_INSTALL 1)
+
     SET(CPACK_GENERATOR TGZ)
-    SET(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
-    SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}.x86_64.linux")
+    SET(CPACK_MONOLITHIC_INSTALL 1)
   ENDIF()

 ENDIF()


Complete migration of the include directories as started by mbanck
 in http://opensync.org/changeset/3625/trunk/opensync/CMakeLists.txt.

Regards that this cmake variable is cached so one need to rmove the CMakeCache.txt
before the change is seen by cmake (ie for opensync itself to update its pkg-config file, all plugins, vformat).

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

--- cmake/OpenSyncDefaults.cmake
+++ cmake/OpenSyncDefaults.cmake
@@ -40,7 +40,7 @@

 SET( OPENSYNC_LIBRARIES_DIR "${LIB_INSTALL_DIR}" CACHE PATH "OpenSync library location" )
 SET( OPENSYNC_LIBEXEC_DIR "${LIBEXEC_INSTALL_DIR}/${OPENSYNC_API_DIR}" CACHE PATH "OpenSync libexec location" )
-SET( OPENSYNC_INCLUDE_DIR "${INCLUDE_INSTALL_DIR}/${OPENSYNC_API_DIR}/opensync" CACHE PATH "OpenSync headers location" )
+SET( OPENSYNC_INCLUDE_DIR "${INCLUDE_INSTALL_DIR}/${OPENSYNC_API_DIR}" CACHE PATH "OpenSync headers location" )
 SET( OPENSYNC_DATA_DIR "${SHARE_INSTALL_DIR}/${OPENSYNC_API_DIR}" CACHE PATH "OpenSync data directory" )

 # OpenSync build options:


Build with both hashes on RHEL5 #4278

Build with both hashes on RHEL5 #4278

Tell linker to generate both hashes (GNU and SYSV) so that older
distributions such as SUSE Linux Enterprise Server 10 can use
the executables.

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -861,6 +861,11 @@
 		if ( "${CONDOR_PLATFORM}" STREQUAL "x86_64_Ubuntu12")
 			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-as-needed")
 		endif()
+		# Link RedHat 5 binaries with both hash styles (GNU and SYSV)
+		# so that binaries are usable on old distros such as SUSE Linux Enterprise Server 10
+		if ( ${SYSTEM_NAME} MATCHES "rhel5" )
+			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--hash-style=both")
+		endif()
 	endif(LINUX)

 	if( HAVE_LIBDL AND NOT BSD_UNIX )


dbus: handle arch includes

dbus: handle arch includes

--- cmake/qibuild/modules/dbus-config.cmake
+++ cmake/qibuild/modules/dbus-config.cmake
@@ -1,6 +1,17 @@
 ## Copyright (C) 2011 Aldebaran Robotics

 clean(DBUS)
+
+# Note:
+# when cross-compiling, you should add
+# <sysroot>/usr/lib/glib-2.0/include in CMAKE_INCLUDE_PATH
+# before getting here.
+# (for instance, you can do this in the cmake toolchain file)
+if(UNIX AND NOT APPLE)
+  list(APPEND CMAKE_INCLUDE_PATH "/usr/lib/dbus-1.0/include")
+  fpath(DBUS dbus/dbus-arch-deps.h)
+endif()
+
 fpath(DBUS dbus/dbus.h PATH_SUFFIXES dbus-1.0)
 flib (DBUS dbus-1)
 export_lib(DBUS)


Clean up output a little bit.

Clean up output a little bit.

--- CMake/FindArmadillo.cmake
+++ CMake/FindArmadillo.cmake
@@ -81,10 +81,10 @@
   file(READ "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/config.hpp" _armadillo_CONFIG_CONTENTS)
   string(REGEX MATCH "[\r\n][\t ]*#define[ \t]+ARMA_USE_HDF5[ \t\r\n]" ARMA_USE_HDF5 "${_armadillo_CONFIG_CONTENTS}")

-  message("arma_use_hdf5: ${ARMA_USE_HDF5}")
   if(NOT "${ARMA_USE_HDF5}" STREQUAL "")
+    message(STATUS "Armadillo HDF5 support is enabled.")
     # We have HDF5 support and need to link against HDF5.
-    find_package(HDF5)
+    find_package(HDF5 REQUIRED)
   endif(NOT "${ARMA_USE_HDF5}" STREQUAL "")
 endif(EXISTS "${ARMADILLO_INCLUDE_DIR}/armadillo_bits/config.hpp")

@@ -104,8 +104,6 @@
   set(ARMADILLO_LIBRARIES ${ARMADILLO_LIBRARY} ${HDF5_LIBRARIES})
 endif (ARMADILLO_FOUND)

-message("Armadillo libraries: ${ARMADILLO_LIBRARIES}")
-

 # Hide internal variables
 mark_as_advanced(


- add dir to path on import

- add dir to path on import

--- src/bindings/python/add_version.cmake
+++ src/bindings/python/add_version.cmake
@@ -1,9 +1,37 @@
+
+set(WRAPPER_FILE "${CUR_BIN_DIRECTORY}/libsedml.py")
+
+if(NOT EXISTS ${WRAPPER_FILE})
+  message(FATAL_ERROR "  The SWIG wrapper has not yet been created")
+else()
+
+
+file(READ "${WRAPPER_FILE}" SOURCECODE)
+
+message("Python: patch loader")
+
+file(WRITE "${WRAPPER_FILE}" "
+# import statement needed on some systems
+import sys
+import os.path
+import inspect
+try:
+  _filename = inspect.getframeinfo(inspect.currentframe()).filename
+except:
+  _filename = __file__
+_path = os.path.dirname(os.path.abspath(_filename))
+if not _path in sys.path:
+  sys.path.append(_path)
+
+")
+
+
+file(APPEND  "${WRAPPER_FILE}" "${SOURCECODE}")
+
+
 message("Python: Add Version to generated file")

-if(NOT EXISTS ${CUR_BIN_DIRECTORY}/libsedml.py)
-  message(FATAL_ERROR "  The SWIG wrapper has not yet been created")
-else()
-  file(APPEND ${CUR_BIN_DIRECTORY}/libsedml.py "
+file(APPEND "${WRAPPER_FILE}" "
 global __version__
 __version__ = '${VERSION}'
 ")


Added check for geos_c

Added check for geos_c

--- cmake/CMakeModules/FindGEOS.cmake
+++ cmake/CMakeModules/FindGEOS.cmake
@@ -34,7 +34,7 @@
            /usr/local/include)

 # Find GEOS library:
-find_library( GEOS_LIB NAMES geos
+find_library( GEOS_LIB NAMES geos_c
               PATHS
               $ENV{GEOS_DIR}/lib
               ${GEOS_DIR}/lib


fix run time error

fix run time error

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -201,9 +201,9 @@
         add_extra_compiler_option(-mpopcnt)
       endif()
     endif()
-    if((X86 OR X86_64) AND NOT MSVC)
+    if((X86 OR X86_64) AND NOT MSVC AND NOT APPLE)
         add_extra_compiler_option(-mf16c)
-    endif((X86 OR X86_64) AND NOT MSVC)
+    endif((X86 OR X86_64) AND NOT MSVC AND NOT APPLE)
   endif(NOT MINGW)

   if(X86 OR X86_64)


Fix up capnp-c++.exe

Fix up capnp-c++.exe

--- external/CapnProto.cmake
+++ external/CapnProto.cmake
@@ -62,7 +62,7 @@
   set(CAPNP_LIBRARIES_LITE ${LIB_KJ} ${LIB_CAPNP})
   set(CAPNP_INCLUDE_DIRS ${INCLUDE_PRE})
   set(CAPNP_EXECUTABLE ${BIN_PRE}/capnp${CMAKE_EXECUTABLE_SUFFIX})
-  set(CAPNPC_CXX_EXECUTABLE ${BIN_PRE}/capnpc-c++)
+  set(CAPNPC_CXX_EXECUTABLE ${BIN_PRE}/capnpc-c++${CMAKE_EXECUTABLE_SUFFIX})
 else()
   # Create a dummy target to depend on.
   add_custom_target(CapnProto)


set_or, set_if revert back to macro

set_or, set_if revert back to macro

--- reason.util.cmake
+++ reason.util.cmake
@@ -1,16 +1,16 @@
-function(reason_set_or KEY VALUE DEFAULT)
+macro(reason_set_or KEY VALUE DEFAULT)
   if(VALUE)
     set("${KEY}" "${VALUE}")
   else()
     set("${KEY}" "${DEFAULT}")
   endif()
-endfunction()
-
-function(reason_set_if KEY VALUE)
+endmacro()
+
+macro(reason_set_if KEY VALUE)
   if(NOT "${VALUE}" STREQUAL "")
     set("${KEY}" "${VALUE}")
   endif()
-endfunction()
+endmacro()

 macro(reason_set_check KEY ERRMSG)
   if(NOT ${KEY})


Bump to 1.7.14

Bump to 1.7.14

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "13")
+SET(LIBREPO_PATCH "14")


Changed cc/ld flag handling.

Changed cc/ld flag handling.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -180,7 +180,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=${CC_COVERAGE_FLAGS}")
+    ctest_configure(OPTIONS "-DCI_CC_FLAGS=${CC_COVERAGE_FLAGS} -DCI_LD_FLAGS=${CC_COVERAGE_FLAGS}")
     ctest_build()
     ctest_test()
     if(CC_NAME STREQUAL "msvc")
@@ -215,9 +215,9 @@
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
     if(CC_NAME STREQUAL "msvc")
-        ctest_configure(OPTIONS "-DCI_NO_TESTS=On -DCI_CC_FLAGS=/analyze")
+        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_CC_FLAGS=/analyze")
     elseif(CC_NAME STREQUAL "clang")
-        ctest_configure(OPTIONS "-DCI_NO_TESTS=On -DCI_CC_FLAGS=--analyze")
+        ctest_configure(OPTIONS "-DBUILD_TESTING=Off -DCI_CC_FLAGS=--analyze")
     endif()
     ctest_build()
     ctest_submit(PARTS Start Update Configure Build Upload Submit)


Add codecov.io support.

Add codecov.io support.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -294,6 +294,9 @@
         exec_program(python ${CTEST_SOURCE_DIRECTORY} ARGS ci-tools/merge_cobertura.py -p "${CTEST_BINARY_DIRECTORY}" -o "${CTEST_BINARY_DIRECTORY}\\coverage.xml")
         set(ENV{COBERTURADIR} "${CTEST_BINARY_DIRECTORY}")
     endif()
+    if(UNIX)
+        execute_process(COMMAND bash <(curl -s https://codecov.io/bash))
+    endif()
     ctest_coverage()
     ctest_submit(PARTS Start Update Configure Build Test Coverage Upload Submit)
 endif()


Added mingw support. (4)

Added mingw support. (4)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -70,9 +70,13 @@
             endif()
             if($ENV{CC} STREQUAL "x86_64-w64-mingw32-gcc" )
                 set(CC_ARCH "x86_64")
+                list(APPEND CONFIGURE_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-x86_64-w64-mingw32.cmake")
             elseif($ENV{CC} STREQUAL "i686-w64-mingw32-gcc")
                 set(CC_ARCH "x86")
-            endif()
+                list(APPEND CONFIGURE_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-i686-w64-mingw32.cmake")
+            endif()
+            #Warmup wine or test timings are going to be wrong
+            exec_program(wine ARGS version OUTPUT_VARIABLE WINE_VERSION)
         endif()
     else()
         set(CC_NAME "gcc")
@@ -154,6 +158,7 @@
 set(CTEST_GIT_COMMAND "git")

 set(CTEST_CONFIGURATION_TYPE "Debug")
+list(APPEND CONFIGURE_OPTIONS "-DCI_FLAGS=-fno-omit-frame-pointer")

 # Default
 set(CTEST_BUILD_NAME "${CI_BUILD_NAME}-default")
@@ -161,13 +166,7 @@
 ctest_start(Continuous)
 ctest_update()
 ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-if(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86_64")
-    ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-x86_64-w64-mingw32.cmake")
-elseif(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86")
-    ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-i686-w64-mingw32.cmake")
-else()
-    ctest_configure()
-endif()
+ctest_configure(OPTIONS ${CONFIGURE_OPTIONS})
 ctest_build()
 ctest_test()
 ctest_submit(PARTS Start Update Configure Build Test Upload Submit)
@@ -268,13 +267,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    if(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86_64")
-        ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-x86_64-w64-mingw32.cmake" "-DCI_FLAGS=-fno-omit-frame-pointer")
-    elseif(CC_NAME STREQUAL "mingw" AND CC_ARCH STREQUAL "x86")
-        ctest_configure(OPTIONS "-DCMAKE_TOOLCHAIN_FILE=ci-tools/toolchain/toolchain-i686-w64-mingw32.cmake" "-DCI_FLAGS=-fno-omit-frame-pointer")
-    else()
-        ctest_configure(OPTIONS "-DCI_FLAGS=-fno-omit-frame-pointer")
-    endif()
+    ctest_configure(OPTIONS ${CONFIGURE_OPTIONS})
     ctest_build()
     ctest_test()
     ctest_memcheck()


dcmtk includes oflog only if found, doesn't fail.

--- itkDataImageReader/FindDCMTK2.cmake
+++ itkDataImageReader/FindDCMTK2.cmake
@@ -146,9 +146,7 @@
 IF( DCMTK_root_INCLUDE_DIR
     AND DCMTK_config_INCLUDE_DIR
     AND DCMTK_ofstd_INCLUDE_DIR
-    AND DCMTK_oflog_INCLUDE_DIR
     AND DCMTK_ofstd_LIBRARY
-    AND DCMTK_oflog_LIBRARY
     AND DCMTK_dcmdata_INCLUDE_DIR
     AND DCMTK_dcmdata_LIBRARY
     AND DCMTK_dcmimgle_INCLUDE_DIR
@@ -161,20 +159,28 @@
     ${DCMTK_root_INCLUDE_DIR}
     ${DCMTK_config_INCLUDE_DIR}
     ${DCMTK_ofstd_INCLUDE_DIR}
-    ${DCMTK_oflog_INCLUDE_DIR}
     ${DCMTK_dcmdata_INCLUDE_DIR}
     ${DCMTK_dcmimgle_INCLUDE_DIR}
     ${DCMTK_dcmjpeg_INCLUDE_DIR}
   )
+  IF (DCMTK_oflog_LIBRARY)#oflog only in dcmtk>=3.5.5
+    SET( DCMTK_INCLUDE_DIR
+      ${DCMTK_INCLUDE_DIR}
+      ${DCMTK_oflog_INCLUDE_DIR}
+    )
+    SET( DCMTK_LIBRARIES
+      ${DCMTK_oflog_LIBRARY} #must be defined before ofstd
+    )
+  ENDIF (DCMTK_oflog_LIBRARY)

   SET( DCMTK_LIBRARIES
+    ${DCMTK_LIBRARIES}
     ${DCMTK_dcmjpeg_LIBRARY}
     ${DCMTK_ijg8_LIBRARY}
     ${DCMTK_ijg12_LIBRARY}
     ${DCMTK_ijg16_LIBRARY}
     ${DCMTK_dcmimgle_LIBRARY}
     ${DCMTK_dcmdata_LIBRARY}
-    ${DCMTK_oflog_LIBRARY}
     ${DCMTK_ofstd_LIBRARY}
     ${DCMTK_config_LIBRARY}
   )
@@ -206,9 +212,7 @@
 ENDIF( DCMTK_root_INCLUDE_DIR
     AND DCMTK_config_INCLUDE_DIR
     AND DCMTK_ofstd_INCLUDE_DIR
-    AND DCMTK_oflog_INCLUDE_DIR
     AND DCMTK_ofstd_LIBRARY
-    AND DCMTK_oflog_LIBRARY
     AND DCMTK_dcmdata_INCLUDE_DIR
     AND DCMTK_dcmdata_LIBRARY
     AND DCMTK_dcmimgle_INCLUDE_DIR


Use linking directories from _add_variant_link_flags in _add_swift_executable_single.

Linking directories from `_add_variant_link_flags` of were overwritten
in `_add_swift_executable_single` by not using the
`LIBRARY_SEARCH_DIRECTORIES` parameter.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1786,6 +1786,10 @@
   set(c_compile_flags)
   set(link_flags)

+  # Prepare linker search directories.
+  set(library_search_directories
+        "${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
+
   # Add variant-specific flags.
   _add_variant_c_compile_flags(
     SDK "${SWIFTEXE_SINGLE_SDK}"
@@ -1803,7 +1807,8 @@
     ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
     LTO_OBJECT_NAME "${name}-${SWIFTEXE_SINGLE_SDK}-${SWIFTEXE_SINGLE_ARCHITECTURE}"
     ANALYZE_CODE_COVERAGE "${SWIFT_ANALYZE_CODE_COVERAGE}"
-    RESULT_VAR_NAME link_flags)
+    RESULT_VAR_NAME link_flags
+    LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories)

   if(SWIFTEXE_SINGLE_DISABLE_ASLR)
     list(APPEND link_flags "-Wl,-no_pie")
@@ -1870,8 +1875,7 @@

   set_property(TARGET ${name} APPEND_STRING PROPERTY
       COMPILE_FLAGS " ${c_compile_flags}")
-  swift_target_link_search_directories(${name}
-      "${SWIFTLIB_DIR}/${SWIFT_SDK_${SWIFTEXE_SINGLE_SDK}_LIB_SUBDIR}")
+  swift_target_link_search_directories("${name}" "${library_search_directories}")
   set_property(TARGET ${name} APPEND_STRING PROPERTY
       LINK_FLAGS " ${link_flags}")
   if (SWIFT_PARALLEL_LINK_JOBS)


RDMA - Allow ibverbs and rdmacm to have different hints

Signed-off-by: Daniel Gryniewicz <7c160e8c60410b4d08316c6a35517f4728ce4edb@redhat.com>

--- cmake/modules/FindRDMA.cmake
+++ cmake/modules/FindRDMA.cmake
@@ -9,8 +9,10 @@
 #    RDMA_LIBRARY   = The list of libraries to link to when using RDMA
 #    RDMA_INCLUDE_DIR = The path to RDMA include directory(s)
 #
-# On can set RDMA_PATH_HINT before using find_package(RDMA) and the
+# One can set RDMA_PATH_HINT before using find_package(RDMA) and the
 # module with use the PATH as a hint to find RDMA.
+# Alternatively, one can set LIBIBVERBS_PREFIX and LIBRDMACM_PREFIX to the individual
+# hints for those libraries.
 #
 # The hint can be given on the command line too:
 #   cmake -DRDMA_PATH_HINT=/DATA/ERIC/RDMA /path/to/source
@@ -18,14 +20,24 @@
 include(LibFindMacros)

 # ibverbs
-set(IBVERBS_PKGCONF_INCLUDE_DIRS ${RDMA_PATH_HINT}/include)
-set(IBVERBS_PKGCONF_LIBRARY_DIRS ${RDMA_PATH_HINT}/lib64 ${RDMA_PATH_HINT}/lib)
+if (LIBIBVERBS_PREFIX)
+	set(IBVERBS_PKGCONF_INCLUDE_DIRS ${LIBIBVERBS_PREFIX}/include)
+	set(IBVERBS_PKGCONF_LIBRARY_DIRS ${LIBIBVERBS_PREFIX}/lib64 ${LIBIBVERBS_PREFIX}/lib)
+else (LIBIBVERBS_PREFIX)
+	set(IBVERBS_PKGCONF_INCLUDE_DIRS ${RDMA_PATH_HINT}/include)
+	set(IBVERBS_PKGCONF_LIBRARY_DIRS ${RDMA_PATH_HINT}/lib64 ${RDMA_PATH_HINT}/lib)
+endif (LIBIBVERBS_PREFIX)
 libfind_pkg_detect(IBVERBS libibverbs FIND_PATH verbs.h PATH_SUFFIXES infiniband FIND_LIBRARY ibverbs)
 libfind_process(IBVERBS)

 # rdmacm
-set(RDMACM_PKGCONF_INCLUDE_DIRS ${RDMA_PATH_HINT}/include)
-set(RDMACM_PKGCONF_LIBRARY_DIRS $${RDMA_PATH_HINT}/lib64 ${RDMA_PATH_HINT}/lib)
+if (LIBRDMACM_PREFIX)
+	set(RDMACM_PKGCONF_INCLUDE_DIRS ${LIBRDMACM_PREFIX}/include)
+	set(RDMACM_PKGCONF_LIBRARY_DIRS ${LIBRDMACM_PREFIX}/lib64 ${LIBRDMACM_PREFIX}/lib)
+else (LIBRDMACM_PREFIX)
+	set(RDMACM_PKGCONF_INCLUDE_DIRS ${RDMA_PATH_HINT}/include)
+	set(RDMACM_PKGCONF_LIBRARY_DIRS ${RDMA_PATH_HINT}/lib64 ${RDMA_PATH_HINT}/lib)
+endif (LIBRDMACM_PREFIX)
 libfind_pkg_detect(RDMACM librdmacm FIND_PATH rdma_cma.h PATH_SUFFIXES rdma FIND_LIBRARY rdmacm)
 libfind_process(RDMACM)


emscripten: add a FIPS_EMSCRIPTEN_USE_EMMALLOC option, for new, smaller allocator

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -57,6 +57,7 @@
 option(FIPS_EMSCRIPTEN_USE_MEMORY_PROFILER "emscripten: enable the built-in memory profiler" OFF)
 option(FIPS_EMSCRIPTEN_USE_WEBGL2 "emscripten: use WebGL2" OFF)
 option(FIPS_EMSCRIPTEN_USE_CLOSURE "emscripten: run closure compiler on JS code" OFF)
+option(FIPS_EMSCRIPTEN_USE_EMMALLOC "emscripten: use emmalloc allocator" OFF)
 option(FIPS_EMSCRIPTEN_ALLOW_MEMORY_GROWTH "emscripten: allow memory growth" OFF)
 set(FIPS_EMSCRIPTEN_TOTAL_MEMORY 134217728 CACHE STRING "emscripten: total heap size in bytes")
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
@@ -101,6 +102,9 @@
 endif()
 if (FIPS_EMSCRIPTEN_USE_WEBGL2)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s USE_WEBGL2=1 -s FULL_ES3=1")
+endif()
+if (FIPS_EMSCRIPTEN_USE_EMMALLOC)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"MALLOC='emmalloc'\"")
 endif()
 if (FIPS_EMSCRIPTEN_USE_FS)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_FILESYSTEM=0")


FW: fixes for 48MP camera, FW build for previous commits

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "f43ae847f00773b962ba0b90c13ba2198b5619c5")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a955dca37ea55d323e4d520f82bb72ea9513cb3d")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


Added workaround for asset embedding on MSVC.

Because MASM doesn't support an equivalent of .incbin,
the workaround uses a mingw assembler to create the asset OBJ,
even when the rest of the program is built using MSVC.

--- embed_assets.cmake
+++ embed_assets.cmake
@@ -1,4 +1,9 @@
 cmake_minimum_required(VERSION 3.2 FATAL_ERROR)
+
+if(MSVC)
+	find_program(AUX_ASSEMBLER as)
+	message(STATUS "Found AUX_ASSEMBLER: ${AUX_ASSEMBLER}")
+endif()

 #optional: generated files to depend on
 macro(mirrage_embed_asset target src_files)
@@ -40,8 +45,19 @@
 #endif
 }
 ")
-
-	target_sources(${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s")
+
+	if(MSVC)
+		add_custom_command(	OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s.obj"
+							COMMAND ${AUX_ASSEMBLER} "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s" -o "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s.obj"
+							MAIN_DEPENDENCY "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s"
+							COMMENT "Running AUX_ASSEMBLER ${AUX_ASSEMBLER} for embedded assets of target ${target}."
+							VERBATIM)
+		target_link_libraries(${target} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s.obj")
+		target_sources(${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s")
+		#add_dependencies(${target} "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s.obj")
+	else()
+		target_sources(${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s")
+	endif()
 	target_sources(${target} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.cpp")
 	add_custom_target(mirrage_embedded_assets_${target} DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.zip" "${CMAKE_CURRENT_BINARY_DIR}/embedded_assets.s")
 	add_dependencies(${target} mirrage_embedded_assets_${target})


- Fix installation of frameworks on OSX

- Fix installation of frameworks on OSX


- fix for Python linux build

- fix for Python linux build

--- CMake/Common.cmake
+++ CMake/Common.cmake
@@ -9,12 +9,17 @@
 set(CMAKE_MINSIZEREL_POSTFIX "_ms")

 include(CMakeDependentOption)
-include(avx)
+

 OPTION(USE_DOUBLE_PRECISION "Use double precision"	OFF)
 if (USE_DOUBLE_PRECISION)
 	add_definitions( -DUSE_DOUBLE)
-else()
+	message("AVX is only supported for single precision.")
+endif (USE_DOUBLE_PRECISION)
+
+cmake_dependent_option(USE_AVX "Use AVX" ON "NOT USE_DOUBLE_PRECISION" OFF)
+if (USE_AVX)
+	include(avx)
 	set_avx_flags()
 	if (FOUND_AVX2)
 		message(STATUS "Using AVX2")


fix handling of CMAKE_INCLUDE_FLAG_SEP_* variables

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -902,16 +902,16 @@
 		foreach (_include ${_includeDirs})
 			if (WIN32 AND CMAKE_${_language}_COMPILER_ID MATCHES "MSVC|Intel")
 				file (TO_NATIVE_PATH "${_include}" _include)
-				list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}")
+				list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
 			else()
 				set (_index -1)
 				if ("${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}" MATCHES ".+")
 					list (FIND ${_systemIncludesVar} "${_include}" _index)
 				endif()
 				if (_index GREATER -1)
-					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${_include}")
+					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_SYSTEM_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
 				else()
-					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_${_language}_SEP}${_include}")
+					list (APPEND ${_cmdVar} "${CMAKE_INCLUDE_FLAG_${_language}}${CMAKE_INCLUDE_FLAG_SEP_${_language}}${_include}")
 				endif()
 			endif()
 		endforeach()
@@ -2191,7 +2191,7 @@
 		XCODE MSVC CMAKE_GENERATOR CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES
 		CMAKE_${_language}_COMPILER_ID CMAKE_${_language}_COMPILER_VERSION
 		CMAKE_${_language}_COMPILER_LAUNCHER CMAKE_${_language}_COMPILER CMAKE_${_language}_COMPILER_ARG1
-		CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_${_language}_SEP
+		CMAKE_INCLUDE_FLAG_${_language} CMAKE_INCLUDE_FLAG_SEP_${_language}
 		CMAKE_INCLUDE_SYSTEM_FLAG_${_language}
 		CMAKE_${_language}_FRAMEWORK_SEARCH_FLAG
 		CMAKE_${_language}_SYSTEM_FRAMEWORK_SEARCH_FLAG


Remove -Wno-unused-parameter

Remove -Wno-unused-parameter

--- cmake/DevBaseCompiler.cmake
+++ cmake/DevBaseCompiler.cmake
@@ -112,7 +112,9 @@
     # Handle case where C compiler is gcc and not clang.

     set(CMAKE_C_FLAGS
-        "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -Wno-unused-parameter"
+        "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow"
+        # If you need this, add it to your project's CMakeLists.txt.
+        # -Wno-unused-parameter"
     )

     set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -U_FORTIFY_SOURCE")


should not use stat for git patch

should not use stat for git patch

--- superbuild/Projects/win32/remus.cmake
+++ superbuild/Projects/win32/remus.cmake
@@ -8,6 +8,6 @@
     -DZeroMQ_ROOT_DIR=<INSTALL_DIR>
     -DBOOST_INCLUDEDIR=<INSTALL_DIR>/include/boost
     -DBOOST_LIBRARYDIR=<INSTALL_DIR>/lib
-  PATCH_COMMAND ${GIT_EXECUTABLE} apply --stat
+  PATCH_COMMAND ${GIT_EXECUTABLE} apply
                 ${SuperBuild_PROJECTS_DIR}/patches/remus.fix_windows_building.patch
   )


CMake: fix for llvmtce-config

CMake: fix for llvmtce-config

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -58,7 +58,9 @@
 else()
   file(TO_CMAKE_PATH "${LLVM_CONFIG}" LLVM_CONFIG)
   message(STATUS "Using llvm-config: ${LLVM_CONFIG}")
-  if(LLVM_CONFIG MATCHES "llvm-config${CMAKE_EXECUTABLE_SUFFIX}$")
+  if(LLVM_CONFIG MATCHES "llvmtce-config${CMAKE_EXECUTABLE_SUFFIX}$")
+    set(LLVM_BINARY_SUFFIX "")
+  elseif(LLVM_CONFIG MATCHES "llvm-config${CMAKE_EXECUTABLE_SUFFIX}$")
     set(LLVM_BINARY_SUFFIX "")
   elseif(LLVM_CONFIG MATCHES "llvm-config(.*)${CMAKE_EXECUTABLE_SUFFIX}$")
     set(LLVM_BINARY_SUFFIX "${CMAKE_MATCH_1}")


Update CMake-generated dummy sources only when their content changes

- this prevents unnecessary rebuilds after each CMake run

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -8,11 +8,17 @@
 # parameter.
 function(create_dummy_source_file basename extension out_file_path)
   set(dummy_source_file "${draco_build_dir}/${basename}.${extension}")
-  file(WRITE "${dummy_source_file}"
+  file(WRITE "${dummy_source_file}.new"
        "// Generated file. DO NOT EDIT!\n"
        "// ${target_name} needs a ${extension} file to force link language, \n"
        "// or to silence a harmless CMake warning: Ignore me.\n"
        "void ${target_name}_dummy_function(void) {}\n")
+
+  # Will replace ${dummy_source_file} only if the file content has changed.
+  # This prevents forced Draco rebuilds after CMake runs.
+  configure_file("${dummy_source_file}.new" "${dummy_source_file}")
+  file(REMOVE "${dummy_source_file}.new")
+
   set(${out_file_path} ${dummy_source_file} PARENT_SCOPE)
 endfunction()


Honor CMAKE_INSTALL_RPATH in SET_BIN_DIR

set_target_properties used up until now in the SET_BIN_DIR macro sets
the INSTALL_RPATH property and discards whatever it contained before.
The INSTALL_RPATH target property is initialized with the cache variable
CMAKE_INSTALL_RPATH (possilbly given via the -D option of cmake). To
preserve this "default" value this commit replaced set_target_properties
with set_property(... APPEND ...).

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -239,9 +239,9 @@
         # FreeCADBase, SMDS, Driver, MEFISTO2 and area-native libs don't depend on parts from CMAKE_INSTALL_LIBDIR
         if(NOT ${ProjectName} MATCHES "^(FreeCADBase|SMDS|Driver|MEFISTO2|area-native)$")
             if(${ARGC} STREQUAL 4)
-                set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
+                set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})
             else(${ARGC} STREQUAL 4)
-                set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
+                set_property(TARGET ${ProjectName} APPEND PROPERTY INSTALL_RPATH ${CMAKE_INSTALL_LIBDIR})
             endif()
         endif()
     endif(WIN32)


added preference page

added preference page

--- Modules/Bundles/org.mitk.gui.qt.dicom/files.cmake
+++ Modules/Bundles/org.mitk.gui.qt.dicom/files.cmake
@@ -10,6 +10,7 @@
   QmitkStoreSCPLauncherBuilder.cpp
   QmitkDicomDataEventPublisher.cpp
   DicomEventHandler.cpp
+  QmitkDicomPreferencePage.cpp
 )

 set(UI_FILES
@@ -24,6 +25,7 @@
   src/internal/QmitkStoreSCPLauncherBuilder.h
   src/internal/QmitkDicomDataEventPublisher.h
   src/internal/DicomEventHandler.h
+  src/internal/QmitkDicomPreferencePage.h
 )

 # list of resource files which can be used by the plug-in


Force python to use its own libpython under FlyEM Build Dir via -rpath linker option

--- python.cmake
+++ python.cmake
@@ -32,7 +32,7 @@
     CONFIGURE_COMMAND   ${FLYEM_ENV_STRING} ${python_SRC_DIR}/configure
         --prefix=${FLYEM_BUILD_DIR}
         --enable-shared
-        LDFLAGS=-L${FLYEM_BUILD_DIR}/lib
+        LDFLAGS=-L${FLYEM_BUILD_DIR}/lib,-rpath=${FLYEM_BUILD_DIR}/lib
         CPPFLAGS=-I${FLYEM_BUILD_DIR}/include
     BUILD_COMMAND       ${FLYEM_ENV_STRING} make
     INSTALL_COMMAND     ${FLYEM_ENV_STRING} make install


Make sure to install data (e.g., fragments, crystals) (#160)

Signed-off-by: Geoff Hutchison <9cf35bacc9f8512ca007341c9e919cf5dc03e0c7@gmail.com>

--- cmake/AvogadroCPack.cmake
+++ cmake/AvogadroCPack.cmake
@@ -40,6 +40,9 @@
   install(DIRECTORY "${AvogadroLibs_LIBRARY_DIR}/avogadro2"
     DESTINATION ${INSTALL_LIBRARY_DIR})

+  install(DIRECTORY "${AvogadroLibs_DATA_DIR}/avogadro2"
+    DESTINATION ${INSTALL_DATA_DIR})
+
   find_program(OBABEL_EXE obabel)
   if(OBABEL_EXE)
     install(FILES ${OBABEL_EXE} DESTINATION ${INSTALL_RUNTIME_DIR}


Removing flags unrecognised by clang

Removing flags unrecognised by clang

--- cmake/CMakemacosx64.cmake
+++ cmake/CMakemacosx64.cmake
@@ -69,7 +69,16 @@

 set ( CXXWARN  "-Wall -Wno-long-long -W -Weffc++ -Wshadow -Woverloaded-virtual -ansi")

-set ( CXXSTF  "-pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
+if ( CMAKE_CXX_COMPILER MATCHES "clang")
+
+     set ( CXXSTF  "-pipe -fsigned-char -fno-common -fmessage-length=0 -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
+
+else( CMAKE_CXX_COMPILER MATCHES "clang")
+
+     set ( CXXSTF  "-pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
+
+endif( CMAKE_CXX_COMPILER MATCHES "clang")
+

 set ( CXXFLAGS  "${CXXOPT} ${CXXSTF}")


fix: Linking dracodec_unity macOS bundle works again (got broken via #676)

--- cmake/draco_targets.cmake
+++ cmake/draco_targets.cmake
@@ -321,7 +321,7 @@
   endif()

   # VERSION and SOVERSION as necessary
-  if(NOT lib_TYPE STREQUAL STATIC)
+  if(NOT lib_TYPE STREQUAL STATIC AND NOT lib_TYPE STREQUAL MODULE)
     set_target_properties(${lib_NAME} PROPERTIES VERSION ${DRACO_VERSION})
     if(NOT MSVC)
       set_target_properties(${lib_NAME} PROPERTIES SOVERSION ${DRACO_SOVERSION})


grpc version to 1.10.x

grpc version to 1.10.x

--- cmake/external/grpc.cmake
+++ cmake/external/grpc.cmake
@@ -33,7 +33,7 @@
     extern_grpc
     DEPENDS protobuf zlib
     GIT_REPOSITORY "https://github.com/grpc/grpc.git"
-    GIT_TAG "v1.11.x"
+    GIT_TAG "v1.10.x"
     PREFIX          ${GRPC_SOURCES_DIR}
     UPDATE_COMMAND  ""
     CONFIGURE_COMMAND ""


Cycles: cmake changes to make win32 use lib/windows for boost and openimageio.

--- cmake/external_libs.cmake
+++ cmake/external_libs.cmake
@@ -1,3 +1,18 @@
+###########################################################################
+# Windows lib directory libraries
+
+IF(WIN32)
+	if(CMAKE_CL_64)
+		set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+	else()
+		set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+	endif()
+
+	SET(CYCLES_OIIO ${LIBDIR}/openimageio)
+	SET(CYCLES_BOOST ${LIBDIR}/boost)
+    	SET(Boost_USE_STATIC_LIBS ON)
+ENDIF()
+
 ###########################################################################
 # Boost setup

@@ -11,7 +26,7 @@

 SET(Boost_USE_MULTITHREADED ON)

-FIND_PACKAGE(Boost 1.34 REQUIRED COMPONENTS filesystem regex system serialization thread)
+FIND_PACKAGE(Boost 1.34 REQUIRED COMPONENTS filesystem regex system thread)

 MESSAGE(STATUS "Boost found ${Boost_FOUND}")
 MESSAGE(STATUS "Boost version ${Boost_VERSION}")


copy boost

copy boost

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -68,6 +68,12 @@
 copy(glog_lib
   SRCS ${GLOG_INCLUDE_DIR} ${GLOG_LIBRARIES}
   DSTS ${dst_dir} ${dst_dir}/lib
+)
+
+set(dst_dir "${CMAKE_INSTALL_PREFIX}/third_party/install/boost")
+copy(boost_lib
+  SRCS ${BOOST_INCLUDE_DIR}
+  DSTS ${dst_dir}
 )

 if(NOT PROTOBUF_FOUND)


Add WARNING message when pkg-config (which is required for the
pango search) is not available.

svn path=/trunk/; revision=7315

--- cmake/modules/pango.cmake
+++ cmake/modules/pango.cmake
@@ -20,11 +20,10 @@
 # Module for determining all configuration variables for libpango.

 if(PKGCONFIG_EXECUTABLE)
-
   # This is the deprecated cmake pkgconfig command.  Convert to the more
   # modern command if more pkg-config information is required.
   pkgconfig(
-  pango
+  pango
   PANGO_INCLUDE_DIR PANGO_LINK_DIR PANGO_LINK_FLAGS PANGO_CFLAGS
   )

@@ -32,6 +31,10 @@
   pangoft2
   PANGOFT2_INCLUDE_DIR PANGOFT2_LINK_DIR PANGOFT2_LINK_FLAGS PANGOFT2_CFLAGS
   )
+else(PKGCONFIG_EXECUTABLE)
+  message(STATUS
+  "WARNING: pango not found because pkg-config not available."
+  )
 endif(PKGCONFIG_EXECUTABLE)

 if(PANGO_INCLUDE_DIR AND PANGOFT2_INCLUDE_DIR)


No generator for default toolchain

No generator for default toolchain

--- default.cmake
+++ default.cmake
@@ -7,6 +7,8 @@
   set(POLLY_DEFAULT_CMAKE 1)
 endif()

+# Don't use polly_init (no generator expected)
 set(POLLY_TOOLCHAIN_NAME "Default")
+set(POLLY_TOOLCHAIN_TAG "Default")

 include("${CMAKE_CURRENT_LIST_DIR}/utilities/polly_common.cmake")


ice40: cmake: fix build with pregenerated bba path

When building using non-pregenerated bba files, the rule to create bbasm
files gets called twice: once unconditionally, and once as part of the
conditional that determines we're not using a pregenerated bba path.

If we _are_ using a pregenerated bba path, then this rule gets called
anyway, resulting in a build error.

Remove the duplicate, unconditional creation of the bba file generation,
to fix the build when using pregenerated files, and to speed up the
build when not using pregenerated files.

Signed-off-by: Sean Cross <d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@xobs.io>

--- ice40/family.cmake
+++ ice40/family.cmake
@@ -40,14 +40,6 @@
             set(DEV_CC_DB ${CMAKE_CURRENT_BINARY_DIR}/ice40/chipdbs/chipdb-${dev}.bin)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ice40/constids.inc)
             set(DEV_GFXH ${CMAKE_CURRENT_SOURCE_DIR}/ice40/gfx.h)
-            add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} -g ${DEV_GFXH} ${OPT_FAST} ${OPT_SLOW} ${DEV_TXT_DB} > ${DEV_CC_BBA_DB}
-                DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB}
-                )
-            add_custom_command(OUTPUT ${DEV_CC_DB}
-                COMMAND bbasm ${BBASM_ENDIAN_FLAG} ${DEV_CC_BBA_DB} ${DEV_CC_DB}
-                DEPENDS bbasm ${DEV_CC_BBA_DB}
-                )

             if(PREGENERATED_BBA_PATH)
                 add_custom_command(OUTPUT ${DEV_CC_DB}


Simplify HalideGenerator.cmake

Simplify HalideGenerator.cmake

— Windows case shouldn’t be necessary any more since generators output
static libraries which we can handle genetically
— Simplify Xcode special-casing to be more targeted

Former-commit-id: af2ae8ac95c423560aad3f3ec14015f704852224

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -68,37 +68,28 @@
   set(FILTER_LIB "${args_GENERATED_FUNCTION}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(FILTER_HDR "${args_GENERATED_FUNCTION}.h")

-  set(invoke_args "-g" "${args_GENERATOR_NAME}" "-f" "${args_GENERATED_FUNCTION_NAMESPACE}${args_GENERATED_FUNCTION}" "-o" "${SCRATCH_DIR}" ${args_GENERATOR_ARGS})
-  set(generator_exec ${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX})
+  set(generator_exec_args
+      "-g" "${args_GENERATOR_NAME}"
+      "-f" "${args_GENERATED_FUNCTION_NAMESPACE}${args_GENERATED_FUNCTION}"
+      "-o" "${SCRATCH_DIR}" ${args_GENERATOR_ARGS}
+  )
+
+  if(XCODE)
+    # In Xcode, the generator executable will be placed in a configuration specific
+    # directory, so the Xcode variable $(CONFIGURATION) is passed in the custom build script.
+    set(generator_exec "${CMAKE_BINARY_DIR}/bin/$(CONFIGURATION)/${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX}")
+  else()
+    set(generator_exec "${CMAKE_BINARY_DIR}/bin/${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX}")
+  endif()

   # Add a custom target to invoke the GENERATOR_TARGET and output the Halide
-  # generated library
-  if (MSVC)
-    add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
-                              "${SCRATCH_DIR}/${args_GENERATED_FUNCTION}.lib"
-      DEPENDS "${args_GENERATOR_TARGET}"
-      COMMAND "${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${generator_exec}" ${invoke_args}
-      COMMAND "lib.exe" "/OUT:${FILTER_LIB}" "${SCRATCH_DIR}\\${args_GENERATED_FUNCTION}.lib"
-      WORKING_DIRECTORY "${SCRATCH_DIR}"
-      )
-  elseif(XCODE)
-    add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
-      DEPENDS "${args_GENERATOR_TARGET}"
-
-      # The generator executable will be placed in a configuration specific
-      # directory, so the Xcode variable $(CONFIGURATION) is passed in the custom
-      # build script.
-      COMMAND "${CMAKE_BINARY_DIR}/bin/$(CONFIGURATION)/${generator_exec}" ${invoke_args}
-
-      WORKING_DIRECTORY "${SCRATCH_DIR}"
-      )
-  else()
-    add_custom_command(OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
-      DEPENDS "${args_GENERATOR_TARGET}"
-      COMMAND "${CMAKE_BINARY_DIR}/bin/${generator_exec}" ${invoke_args}
-      WORKING_DIRECTORY "${SCRATCH_DIR}"
-      )
-  endif()
+  # generated library.
+  add_custom_command(
+    OUTPUT "${SCRATCH_DIR}/${FILTER_LIB}" "${SCRATCH_DIR}/${FILTER_HDR}"
+    DEPENDS "${args_GENERATOR_TARGET}"
+    COMMAND "${generator_exec}" ${generator_exec_args}
+    WORKING_DIRECTORY "${SCRATCH_DIR}"
+  )

   # Use a custom target to force it to run the generator before the
   # object file for the runner. The target name will start with the prefix


Simplify HalideGenerator.cmake

Simplify HalideGenerator.cmake

— Windows case shouldn’t be necessary any more since generators output
static libraries which we can handle genetically
— Simplify Xcode special-casing to be more targeted


A little more refactoring

A little more refactoring

Former-commit-id: 118ef3d91234ed1427a3aa0391c205d0fe1b8f3c

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -5,6 +5,21 @@
   file(MAKE_DIRECTORY "${GENFILES_DIR}")
   set(${OUTVAR} "${GENFILES_DIR}" PARENT_SCOPE)
 endfunction()
+
+function(halide_generator_get_exec_path TARGET OUTVAR)
+  if(MSVC)
+    # In MSVC, the generator executable will be placed in a configuration specific
+    # directory specified by ${CMAKE_CFG_INTDIR}.
+    set(${OUTVAR} "${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${TARGET}${CMAKE_EXECUTABLE_SUFFIX}" PARENT_SCOPE)
+  elseif(XCODE)
+    # In Xcode, the generator executable will be placed in a configuration specific
+    # directory, so the Xcode variable $(CONFIGURATION) is passed in the custom build script.
+    set(${OUTVAR} "${CMAKE_BINARY_DIR}/bin/$(CONFIGURATION)/${TARGET}${CMAKE_EXECUTABLE_SUFFIX}" PARENT_SCOPE)
+  else()
+    set(${OUTVAR} "${CMAKE_BINARY_DIR}/bin/${TARGET}${CMAKE_EXECUTABLE_SUFFIX}" PARENT_SCOPE)
+  endif()
+endfunction()
+

 # This function adds custom build steps to invoke a Halide generator exectuable
 # and produce a static library containing the generated code.
@@ -51,37 +66,27 @@
   set(FILTER_LIB "${AOT_LIBRARY_TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(FILTER_HDR "${AOT_LIBRARY_TARGET}.h")

-  set(generator_exec_args "-o" "${GENFILES_DIR}")
+  set(GENERATOR_EXEC_ARGS "-o" "${GENFILES_DIR}")
   if (NOT ${args_GENERATED_FUNCTION} STREQUAL "")
-    list(APPEND generator_exec_args "-f" "${args_GENERATED_FUNCTION}" )
+    list(APPEND GENERATOR_EXEC_ARGS "-f" "${args_GENERATED_FUNCTION}" )
   endif()
   if (NOT ${args_GENERATOR_NAME} STREQUAL "")
-    list(APPEND generator_exec_args "-g" "${args_GENERATOR_NAME}")
+    list(APPEND GENERATOR_EXEC_ARGS "-g" "${args_GENERATOR_NAME}")
   endif()
   if (NOT ${args_GENERATOR_OUTPUTS} STREQUAL "")
-    list(APPEND generator_exec_args "-e" ${args_GENERATOR_OUTPUTS})
+    list(APPEND GENERATOR_EXEC_ARGS "-e" ${args_GENERATOR_OUTPUTS})
   endif()
   # GENERATOR_ARGS always come last
-  list(APPEND generator_exec_args ${args_GENERATOR_ARGS})
+  list(APPEND GENERATOR_EXEC_ARGS ${args_GENERATOR_ARGS})

-  if(MSVC)
-    # In MSVC, the generator executable will be placed in a configuration specific
-    # directory specified by ${CMAKE_CFG_INTDIR}.
-    set(generator_exec "${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX}")
-  elseif(XCODE)
-    # In Xcode, the generator executable will be placed in a configuration specific
-    # directory, so the Xcode variable $(CONFIGURATION) is passed in the custom build script.
-    set(generator_exec "${CMAKE_BINARY_DIR}/bin/$(CONFIGURATION)/${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX}")
-  else()
-    set(generator_exec "${CMAKE_BINARY_DIR}/bin/${args_GENERATOR_TARGET}${CMAKE_EXECUTABLE_SUFFIX}")
-  endif()
+  halide_generator_get_exec_path(${args_GENERATOR_TARGET} GENERATOR_EXEC_PATH)

   # Add a custom target to invoke the GENERATOR_TARGET and output the Halide
   # generated library.
   add_custom_command(
     OUTPUT "${GENFILES_DIR}/${FILTER_LIB}" "${GENFILES_DIR}/${FILTER_HDR}"
     DEPENDS "${args_GENERATOR_TARGET}"
-    COMMAND "${generator_exec}" ${generator_exec_args}
+    COMMAND "${GENERATOR_EXEC_PATH}" ${GENERATOR_EXEC_ARGS}
     WORKING_DIRECTORY "${GENFILES_DIR}"
   )


ENH: Bump KWStyle to reduced false flagging too many variables per line.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -47,7 +47,7 @@

 # KWStyle
 set( KWStyle_URL ${git_protocol}://github.com/Kitware/KWStyle.git )
-set( KWStyle_HASH_OR_TAG 0620fdd3ef07d124514331ae35c22b7a4c1d0d71 )
+set( KWStyle_HASH_OR_TAG a57cf3a130246080c2ac94787483305de6b69bf4 )

 # LIBSVM
 set( LIBSVM_URL ${git_protocol}://github.com/KitwareMedical/libsvm.git )


Output only if mbilog debug messages are activated

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -76,8 +76,10 @@
     if(NOT "${CTK_RUNTIME_LIBRARY_DIRS}" STREQUAL "")
       list(APPEND _dir_candidates ${CTK_RUNTIME_LIBRARY_DIRS})
     else()
-      message(STATUS "CTK Runtime library not set, composing hard-coded path")
-      message(STATUS "Using candidate: ${CTK_DIR}/CTK-build/bin" )
+      if(MBILOG_ENABLE_DEBUG_MESSAGES)
+        message(STATUS "CTK Runtime library not set, composing hard-coded path")
+        message(STATUS "Using candidate: ${CTK_DIR}/CTK-build/bin" )
+      endif()
       list(APPEND _dir_candidates ${CTK_DIR}/CTK-build/bin )
     endif()
     if(DEFINED CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY)


cmake: Adjust program names in BB10 toolchain file

--- platforms/bb10-qcc/blackberry.cmake
+++ platforms/bb10-qcc/blackberry.cmake
@@ -38,47 +38,47 @@

 set (CMAKE_MAKE_PROGRAM
         "${QNX_HOST}/usr/bin/make${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX Make Program"
+        CACHE PATH "QNX make program"
 )

 set (CMAKE_SH
         "${QNX_HOST}/usr/bin/sh${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX shell Program"
+        CACHE PATH "QNX shell program"
 )

 set (CMAKE_AR
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-ar${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX ar Program"
+        CACHE PATH "QNX ar program"
 )

 set (CMAKE_RANLIB
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-ranlib${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX ranlib Program"
+        CACHE PATH "QNX ranlib program"
 )

 set (CMAKE_NM
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-nm${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX nm Program"
+        CACHE PATH "QNX nm program"
 )

 set (CMAKE_OBJCOPY
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-objcopy${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX objcopy Program"
+        CACHE PATH "QNX objcopy program"
 )

 set (CMAKE_OBJDUMP
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-objdump${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX objdump Program"
+        CACHE PATH "QNX objdump program"
 )

 set (CMAKE_LINKER
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-ld${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX Linker Program"
+        CACHE PATH "QNX linker program"
 )

 set (CMAKE_STRIP
         "${QNX_HOST}/usr/bin/nto${CMAKE_SYSTEM_PROCESSOR}-strip${HOST_EXECUTABLE_SUFFIX}"
-        CACHE PATH "QNX Strip Program"
+        CACHE PATH "QNX strip program"
 )

 set (CMAKE_C_COMPILER "${QNX_HOST}/usr/bin/qcc${HOST_EXECUTABLE_SUFFIX}")


BUG: allow to build header test from external remote modules

--- CMake/OTBModuleHeaderTest.cmake
+++ CMake/OTBModuleHeaderTest.cmake
@@ -99,7 +99,7 @@
       get_filename_component( _test_name ${_header_test_src} NAME_WE )
       add_custom_command(
         OUTPUT ${_header_test_src}
-        COMMAND ${PYTHON_EXECUTABLE} ${OTB_SOURCE_DIR}/Utilities/Maintenance/BuildHeaderTest.py
+        COMMAND ${PYTHON_EXECUTABLE} ${OTB_CMAKE_DIR}/../Utilities/Maintenance/BuildHeaderTest.py
         ${_name}
         ${${_name}_SOURCE_DIR}
         ${${_name}_BINARY_DIR}


CastXML 0.4.8

CastXML 0.4.8

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


cmake/boost: cleanup unneeded stuff

cmake/boost: cleanup unneeded stuff

--- cmake/Modules/BuildBoost.cmake
+++ cmake/Modules/BuildBoost.cmake
@@ -40,13 +40,5 @@
   set(Boost_SUFFIX lib)
 endif()

-set(Boost_CHRONO_LIBRARY "${Boost_LIBRARY_DIR}/libboost_chrono-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
-set(Boost_DATE_TIME_LIBRARY "${Boost_LIBRARY_DIR}/libboost_date_time-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
 set(Boost_FILESYSTEM_LIBRARY "${Boost_LIBRARY_DIR}/libboost_filesystem-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
-set(Boost_PRG_EXEC_MONITOR_LIBRARY "${Boost_LIBRARY_DIR}/libboost_prg_exec_monitor-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
 set(Boost_SYSTEM_LIBRARY "${Boost_LIBRARY_DIR}/libboost_system-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
-set(Boost_TEST_EXEC_MONITOR_LIBRARY "${Boost_LIBRARY_DIR}/libboost_test_exec_monitor-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
-set(Boost_THREAD_LIBRARY "${Boost_LIBRARY_DIR}/libboost_thread-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
-set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "${Boost_LIBRARY_DIR}/libboost_unit_test_framework-${Boost_LIB_ADD_STRING}.${Boost_SUFFIX}")
-
-set_property(TARGET boost PROPERTY FOLDER "ThirdParty")


update FindOpenNI.cmake : pick the right OpenNI lib when both 32- and 64bit OpenNI are installed

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -40,16 +40,21 @@

 set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

+set(OPENNI_SUFFIX)
+if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(OPENNI_SUFFIX 64)
+endif(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+
 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
           HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni /usr/include/ni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
-          PATHS "$ENV{PROGRAMFILES}/OpenNI/Include" "$ENV{PROGRAMW6432}/OpenNI/Include"
+          PATHS "$ENV{OPEN_NI_INSTALL_PATH${OPENNI_SUFFIX}}/Include"
           PATH_SUFFIXES openni include Include)
 #add a hint so that it can find it without the pkg-config
 find_library(OPENNI_LIBRARY
-             NAMES OpenNI64 OpenNI
+             NAMES OpenNI${OPENNI_SUFFIX}
              HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
-             PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib" "$ENV{PROGRAMW6432}/OpenNI/Lib64"
+             PATHS "$ENV{OPEN_NI_LIB${OPENNI_SUFFIX}}"
              PATH_SUFFIXES lib Lib Lib64)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})


Moved Sphinx detection outside of the PYTHONINTERP_FOUND block.

Who knows, maybe the user's Sphinx installation uses a Python we couldn't find.

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -74,19 +74,19 @@
                       OUTPUT_STRIP_TRAILING_WHITESPACE)
     endif()
   endif(NOT ANDROID AND NOT IOS)
+endif()

-  if(BUILD_DOCS)
-    find_host_program(SPHINX_BUILD sphinx-build)
-    if(SPHINX_BUILD)
-        execute_process(COMMAND "${SPHINX_BUILD}"
-                        OUTPUT_QUIET
-                        ERROR_VARIABLE SPHINX_OUTPUT
-                        OUTPUT_STRIP_TRAILING_WHITESPACE)
-        if(SPHINX_OUTPUT MATCHES "Sphinx v([0-9][^ \n]*)")
-          set(SPHINX_VERSION "${CMAKE_MATCH_1}")
-          set(HAVE_SPHINX 1)
-          message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}")
-        endif()
-    endif()
-  endif(BUILD_DOCS)
-endif()
+if(BUILD_DOCS)
+  find_host_program(SPHINX_BUILD sphinx-build)
+  if(SPHINX_BUILD)
+      execute_process(COMMAND "${SPHINX_BUILD}"
+                      OUTPUT_QUIET
+                      ERROR_VARIABLE SPHINX_OUTPUT
+                      OUTPUT_STRIP_TRAILING_WHITESPACE)
+      if(SPHINX_OUTPUT MATCHES "Sphinx v([0-9][^ \n]*)")
+        set(SPHINX_VERSION "${CMAKE_MATCH_1}")
+        set(HAVE_SPHINX 1)
+        message(STATUS "Found Sphinx ${SPHINX_VERSION}: ${SPHINX_BUILD}")
+      endif()
+  endif()
+endif(BUILD_DOCS)


fix binary package build

fix binary package build

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -26,6 +26,12 @@
          libs_found libs_version_string libraries library debug_libraries
          debug_library include_path include_dir include_dir2 packages_path
          numpy_include_dirs numpy_version)
+
+  ocv_check_environment_variables(${executable})
+  if(${executable})
+    set(PYTHON_EXECUTABLE "${${executable}}")
+  endif()
+
   if(WIN32 AND NOT ${executable})
     # search for executable with the same bitness as resulting binaries
     # standard FindPythonInterp always prefers executable from system path


[cmake] fix bug in user install for python

--- cmake/PythonInstallSetup.cmake
+++ cmake/PythonInstallSetup.cmake
@@ -65,7 +65,7 @@
     # -- PY_INSTALL_DIR
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
       "import site; print(site.ENABLE_USER_SITE)" OUTPUT_VARIABLE ENABLE_USER_SITE)
-    string(STRIP ${ENABLE_USER} ENABLE_USER)
+    string(STRIP ${ENABLE_USER_SITE} ENABLE_USER_SITE)

     if(ENABLE_USER_SITE)
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c


Ignore stdint.h when looking for FFmpeg

Ignore stdint.h when looking for FFmpeg

Fixes https://github.com/acoustid/chromaprint/issues/42

--- cmake/modules/FindFFmpeg.cmake
+++ cmake/modules/FindFFmpeg.cmake
@@ -108,7 +108,7 @@

 SET(FFMPEG_FOUND "NO")
 # Note we don't check FFMPEG_LIBSWSCALE_FOUND here, it's optional.
-IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND AND FFMPEG_STDINT_INCLUDE_DIR)
+IF   (FFMPEG_LIBAVFORMAT_FOUND AND FFMPEG_LIBAVCODEC_FOUND AND FFMPEG_LIBAVUTIL_FOUND)

     SET(FFMPEG_FOUND "YES")


Don't add version number to handle_standard_args

We handle that ourselves, and it only seems to give trouble.

--- cmake/modules/FindSphinx.cmake
+++ cmake/modules/FindSphinx.cmake
@@ -39,10 +39,7 @@
 		set(SPHINX_FOUND FALSE)
 	endif()

-	find_package_handle_standard_args(Sphinx
-		DEFAULT_MSG SPHINX_EXECUTABLE
-		VERSION_VAR SPHINX_VERSION_STRING
-	)
+	find_package_handle_standard_args(Sphinx DEFAULT_MSG SPHINX_EXECUTABLE)
 	find_program(SPHINX_APIDOC_EXECUTABLE NAMES sphinx-apidoc HINTS $ENV{SPHINX_DIR} PATH_SUFFIXES bin DOC "Sphinx generator for reStructuredText API files of Python source code.")
 	find_package_handle_standard_args(Sphinx-apidoc DEFAULT_MSG SPHINX_APIDOC_EXECUTABLE)
 endif()


Unbreak upstream-with-swift build

Unbreak upstream-with-swift build

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -256,6 +256,8 @@
     include_directories(${CMAKE_SOURCE_DIR}/tools/swift/include)
   endif ()
   include_directories("${CMAKE_CURRENT_BINARY_DIR}/../swift/include")
+else ()
+  include_directories("${LLDB_PATH_TO_SWIFT_BUILD}/include")
 endif()

 # Disable GCC warnings


Make dependency check for MULTIDICT more generic

The addition of the NOTARGET option forced the runtime_cxxmodules
build to ignore some dependencies, creating a race condition that
broke the incrementals build, since the order of rootcling calls
was no longer enforced. This was fixed by adding the dependency
information back using the EXTRA_DEPENDENCIES option when generating
the dictionaries in commit 189851d5da76f9d7db3f38a3fffd907aa702df6e,
but the same race exists in normal builds, so this commit adds the
dependency check back into ROOT_GENERATE_DICTIONARY() and makes it
more generic, so that it can work for non-module builds as well.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -539,12 +539,13 @@
     endif()
   endif()

-  if (runtime_cxxmodules AND ARG_MULTIDICT AND NOT ARG_NOTARGET)
-    set (main_pcm_target "G__${ARG_MODULE}")
-    if (NOT TARGET ${main_pcm_target})
-      message(FATAL_ERROR "Target ${main_pcm_target} not found! Please move ${main_pcm_target} before specifying MULTIDICT.")
-    endif()
-    add_dependencies(${main_pcm_target} ${dictionary})
+  if(ARG_MULTIDICT)
+    if(NOT TARGET "G__${ARG_MODULE}")
+      message(FATAL_ERROR
+        " Target G__${ARG_MODULE} not found!\n"
+        " Please create target G__${ARG_MODULE} before using MULTIDICT.")
+    endif()
+    add_dependencies(G__${ARG_MODULE} ${dictionary})
   endif()

   if(NOT ARG_NOINSTALL AND NOT CMAKE_ROOTTEST_DICT AND DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)


[CMake] Update Platform Specific Windows script.

--- EMULATOR/PLATFORM/Windows.cmake
+++ EMULATOR/PLATFORM/Windows.cmake
@@ -0,0 +1,17 @@
+if(MSVC)
+
+Message("Compiling for Windows!")
+
+#Find libs
+find_package(SDL2 REQUIRED)
+find_package(OpenGL REQUIRED)
+find_package(GLEW REQUIRED)
+
+#We want to link GLEW statically
+set(GLEW_USE_STATIC_LIBS ON)
+
+#Setup project include directories
+include_directories(${GLEW_INCLUDE_DIR})
+include_directories(${SDL2_INCLUDE_DIR})
+
+endif()


Add NSIS generator for CPack.

Add NSIS generator for CPack.

git-svn-id: b1dee0d48e635e16c3b356ce77271b225d4db9f7@252 7dcaeef0-15fb-0310-b436-a5af3365683c

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -7,11 +7,11 @@
 set(CPACK_PACKAGE_NAME ${APPLICATION_NAME})
 set(CPACK_PACKAGE_VENDOR "${APPLICATION_NAME} developers")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The SSH library")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "libssh")
 set(CPACK_PACKAGING_INSTALL_PREFIX "libssh")
 set(CPACK_PACKAGE_VENDOR "The SSH Libaray Development Team")

 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
+set(CPACK_TOPLEVEL_DIRECTORY ${CMAKE_BINARY_DIR}/nsis)

 ### versions
 set(CPACK_PACKAGE_VERSION_MAJOR "0")
@@ -19,20 +19,21 @@
 set(CPACK_PACKAGE_VERSION_PATCH "90")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

-set(CPACK_GENERATOR "NSIS")
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
-
 ### source package settings
 set(CPACK_SOURCE_GENERATOR "TGZ")
 set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;tags;cscope.*")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")

-### nsis specific
+### install dirs
+# C:\Program Files\name
+set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
+
+### nsis
+set(CPACK_GENERATOR "NSIS")
+
 set(CPACK_NSIS_DISPLAY_NAME "The SSH Library")
 #set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
-
-# see http://www.cmake.org/Wiki/CMake:Component_Install_With_CPack
-set(CPACK_PACKAGE_INSTALL_DIRECTORY "libssh")
+set(CPACK_NSIS_COMPRESSOR "/SOLID zlib")

 set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries")
 set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers")
@@ -48,6 +49,8 @@
 #set(CPACK_COMPONENT_LIBRARIES_GROUP "Development")
 #set(CPACK_COMPONENT_HEADERS_GROUP "Development")

+set(CPACK_COMPONENTS_ALL "libraries;headers")
+
 set(CPACK_NSIS_MENU_LINKS "http://0xbadc0de.be/wiki/libssh:libssh" "libssh homepage")

 include(CPack)


cmake: Update ctest config.

cmake: Update ctest config.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -3,10 +3,10 @@
 set(MEMORYCHECK_SUPPRESSIONS_FILE ${CMAKE_SOURCE_DIR}/tests/valgrind-csync.supp)

 set(CTEST_PROJECT_NAME "csync")
-set(CTEST_NIGHTLY_START_TIME "23:00:00 CET")
+set(CTEST_NIGHTLY_START_TIME "01:00:00 CET")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "testing.csync.org")
+set(CTEST_DROP_SITE "mock.cryptomilk.org")
 set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}")
 set(CTEST_DROP_SITE_CDASH TRUE)


STYLE: Addition of origin of CMake function copied from the Kitware blog.

--- CMake/CMakeEchoAllTargetProperties.cmake
+++ CMake/CMakeEchoAllTargetProperties.cmake
@@ -1,3 +1,5 @@
+# Code copied from: http://www.kitware.com/blog/home/post/390
+
 function(echo_target_property tgt prop)
   # v for value, d for defined, s for set
   get_property(v TARGET ${tgt} PROPERTY ${prop})


OptimizeForArchitecture.cmake uses gcc's -march=native option if available

--- src/cmakeFindModules/OptimizeForArchitecture.cmake
+++ src/cmakeFindModules/OptimizeForArchitecture.cmake
@@ -114,8 +114,22 @@
    set(_available_vector_units_list)

    if(TARGET_ARCHITECTURE STREQUAL "auto")
-      AutodetectHostArchitecture()
-      message(STATUS "Detected CPU: ${TARGET_ARCHITECTURE}")
+      if(${CMAKE_COMPILER_IS_GNUCXX})
+         execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
+                         OUTPUT_VARIABLE GCC_VERSION)
+         if(GCC_VERSION VERSION_GREATER 4.2 OR GCC_VERSION VERSION_EQUAL 4.2)
+            set(_is_arch_native_supported YES)
+         endif()
+      endif()
+
+      if(_is_arch_native_supported)
+         AddCompilerFlag("-march=native")
+         set(TARGET_ARCHITECTURE "native")
+         message(STATUS "Optimizing for the host architecture using -march=native")
+      else()
+         AutodetectHostArchitecture()
+         message(STATUS "Detected CPU: ${TARGET_ARCHITECTURE}")
+      endif()
    endif(TARGET_ARCHITECTURE STREQUAL "auto")

    if(TARGET_ARCHITECTURE STREQUAL "core")
@@ -193,13 +207,13 @@
       list(APPEND _available_vector_units_list "sse" "sse2" "sse3" "sse4a")
    elseif(TARGET_ARCHITECTURE STREQUAL "generic")
       list(APPEND _march_flag_list "generic")
-   elseif(TARGET_ARCHITECTURE STREQUAL "none")
+   elseif(TARGET_ARCHITECTURE STREQUAL "none" OR TARGET_ARCHITECTURE STREQUAL "native")
       # add this clause to remove it from the else clause
    else(TARGET_ARCHITECTURE STREQUAL "core")
       message(FATAL_ERROR "Unknown target architecture: \"${TARGET_ARCHITECTURE}\". Please set TARGET_ARCHITECTURE to a supported value.")
    endif(TARGET_ARCHITECTURE STREQUAL "core")

-   if(NOT TARGET_ARCHITECTURE STREQUAL "none")
+   if(NOT (TARGET_ARCHITECTURE STREQUAL "none" OR TARGET_ARCHITECTURE STREQUAL "native"))
       set(_disable_vector_unit_list)
       set(_enable_vector_unit_list)
       _my_find(_available_vector_units_list "sse2" SSE2_FOUND)


Set UseLaunchers for Unix Makefiles and Ninja generators

There's an error in CMake that parses Clang warnings as errors otherwise.

Also, disable warnings in documentation.


ENH: Bump TubeTK version for fix to ResampleTubes

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


Bump TubeTK

Bump TubeTK

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


enable CTEST_USE_LAUNCHERS in the hope that it will help against spurious false positives

--- test.cmake
+++ test.cmake
@@ -7,6 +7,7 @@

 include(CTestCustom.cmake)
 include(CTestConfig.cmake)
+set(CTEST_USE_LAUNCHERS 1) # much improved error/warning message logging

 Set(CTEST_CONFIGURE_COMMAND "${CMAKE_EXECUTABLE_NAME} ${CTEST_SOURCE_DIRECTORY} -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARKS=TRUE -DBUILD_EXAMPLES=TRUE")
 if(NOT CMAKE_MAKE_PROGRAM)


put experimental compilers into the experimental Subproject on the dashboard

--- test.cmake
+++ test.cmake
@@ -89,6 +89,9 @@
 elseif(COMPILER_VERSION MATCHES "Open64")
    set(compiler "Open64")
 endif()
+if(COMPILER_VERSION MATCHES "\\(experimental\\)" OR COMPILER_VERSION MATCHES "clang version 3.3")
+   set(compiler "experimental")
+endif()

 include(${CTEST_SOURCE_DIRECTORY}/CTestCustom.cmake)
 include(${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)


fixes gh-1143 Added missing () to endif.

Signed-off-by: Philip Schwartz <90179e62a462019a8b170b5c04a4f0541ad92702@lexisnexis.com>

--- cmake_modules/commonSetup.cmake
+++ cmake_modules/commonSetup.cmake
@@ -62,7 +62,7 @@
   endif()
   if ( USE_XALAN )
       set(USE_XERCES ON)
-  endif
+  endif()

   option(PORTALURL "Set url to hpccsystems portal download page")


Exclude test sources from stream executor builds. (#20423)

PiperOrigin-RevId: 202423156

--- tensorflow/contrib/cmake/tf_stream_executor.cmake
+++ tensorflow/contrib/cmake/tf_stream_executor.cmake
@@ -76,11 +76,11 @@
     list(APPEND tf_stream_executor_srcs ${tf_stream_executor_gpu_srcs})
 endif()

-#file(GLOB_RECURSE tf_stream_executor_test_srcs
-#    "${tensorflow_source_dir}/tensorflow/stream_executor/*_test.cc"
-#    "${tensorflow_source_dir}/tensorflow/stream_executor/*_test.h"
-#)
-#list(REMOVE_ITEM tf_stream_executor_srcs ${tf_stream_executor_test_srcs})
+file(GLOB_RECURSE tf_stream_executor_test_srcs
+    "${tensorflow_source_dir}/tensorflow/stream_executor/*test.cc"
+    "${tensorflow_source_dir}/tensorflow/stream_executor/lib/*test.h"
+)
+list(REMOVE_ITEM tf_stream_executor_srcs ${tf_stream_executor_test_srcs})

 if (NOT WIN32)
   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lgomp")


fix include path for KDU headers

fix include path for KDU headers

--- indra/cmake/LLKDU.cmake
+++ indra/cmake/LLKDU.cmake
@@ -14,7 +14,7 @@
   else (WINDOWS)
     set(KDU_LIBRARY libkdu.a)
   endif (WINDOWS)
-  set(KDU_INCLUDE_DIR ${ARCH_PREBUILT_DIRS_RELEASE}/include/kdu)
+  set(KDU_INCLUDE_DIR ${AUTOBUILD_INSTALL_DIR}/include/kdu)
   set(LLKDU_INCLUDE_DIRS ${LIBS_OPEN_DIR}/llkdu)
   set(LLKDU_LIBRARIES llkdu)
 endif (USE_KDU)


[FIX] Replace spaces with underscores

[FIX] Replace spaces with underscores

This accounts for the changes made by #1296.
Teh new ${SEQAN_DATE} is delimited by underscore instead of space. The change is made to accommodate this.

--- util/cmake/ctd/configure_profile_properties.cmake
+++ util/cmake/ctd/configure_profile_properties.cmake
@@ -2,7 +2,7 @@
 message(STATUS "SEQAN_SOURCE_DIR ${SEQAN_SOURCE_DIR}")
 message(STATUS "SEQAN_DATE ${SEQAN_DATE}")
 if (SEQAN_DATE)
-	string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+).*"
+	string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+)_([0-9]+):([0-9]+).*"
     "\\1\\2\\3\\4\\5" SEQAN_LAST_CHANGED_DATE "${SEQAN_DATE}")
   set (CF_SEQAN_VERSION ${SEQAN_VERSION_STRING}.${SEQAN_LAST_CHANGED_DATE})
 else ()
@@ -10,4 +10,4 @@
 endif ()

 # Actually configure the file.
-configure_file (${SEQAN_SOURCE_DIR}/util/cmake/ctd/plugin.properties.in ${WORKFLOW_PLUGIN_DIR}/plugin.properties)+configure_file (${SEQAN_SOURCE_DIR}/util/cmake/ctd/plugin.properties.in ${WORKFLOW_PLUGIN_DIR}/plugin.properties)


Improved AddTests CMake scripts

Improved AddTests CMake scripts

--- cmake/AddTestRunner.cmake
+++ cmake/AddTestRunner.cmake
@@ -31,21 +31,20 @@
     return()
 endif()

-set(TEST_RUNNER)
+set(TEST_RUNNER "")

-if (CMAKE_SYSTEM_NAME MATCHES "Generic")
+if (CMAKE_TOOLCHAIN_FILE AND CMAKE_SYSTEM_NAME MATCHES "Generic")
+    unset(TEST_RUNNER)
+
     if (CMAKE_SYSTEM_PROCESSOR MATCHES "cortex*")
         find_program(QEMU_ARM_COMMAND qemu-arm)

         if (QEMU_ARM_COMMAND)
             message(STATUS "Tests will be run through ${QEMU_ARM_COMMAND}")
             set(TEST_RUNNER ${QEMU_ARM_COMMAND})
-        else()
-            message(WARNING "Tests cannot be run, qemu-arm not found")
-            unset(TEST_RUNNER)
         endif()
     endif()
-elseif (MEMORY_CHECK AND CMAKE_SYSTEM_NAME MATCHES "Linux")
+elseif (MEMORY_CHECK)
     find_program(VALGRIND_COMMAND valgrind)

     if (VALGRIND_COMMAND)
@@ -60,3 +59,9 @@
         )
     endif()
 endif()
+
+if (DEFINED TEST_RUNNER AND NOT TEST_RUNNER)
+    message(STATUS "Tests will be run normally")
+elseif (NOT DEFINED TEST_RUNNER)
+    message(WARNING "Tests cannot be run")
+endif()


Add warnings when shadowing occurs. Add debug symbols even in release builds.

--- cmake/CMakeCompiler.cmake
+++ cmake/CMakeCompiler.cmake
@@ -27,6 +27,9 @@
 		endif()

 		target_compile_options(${_project_name} PRIVATE -Wall -Wextra)		# Enable all warnings
+		target_compile_options(${_project_name} PRIVATE -Wshadow)			# Enable shadowing warnings
 		target_compile_options(${_project_name} PRIVATE -Werror)			# Treat warnings as errors
+
+		target_compile_options(${_project_name} PRIVATE -g)					# Enable debug symbols
 	endif()
 endmacro()


Bump to C++17

Bump to C++17

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -32,14 +32,14 @@
 endif()

-# C++14 support
-set(CMAKE_CXX_STANDARD 14)
+# C++17 support
+set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++") # Apparently Clang on Mac needs this...
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++") # Apparently Clang on Mac needs this...
 endif()
 if (EMSCRIPTEN)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -stdlib=libc++")
 	add_definitions(-s USE_SDL=2)
 endif()

@@ -48,7 +48,7 @@
 if (MSVC)
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /fp:fast /WX -D_ENABLE_EXTENDED_ALIGNED_STORAGE")
 	if (MSVC_VERSION GREATER_EQUAL 1910)
-		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14 /permissive-")
+		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17 /permissive-")
 	endif ()
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /sdl /Oi /Ot /Oy /Ob2 /Zi")
 	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /sdl /Oi /Ot /Oy /Ob2 /Zi")


Updated XLink with only required changes

--- 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/51c2a44573bf52ccdd8cc5121d67a62b1dbd331d.tar.gz"
-    SHA1 "896b5ee6f50a97455c7b73c8974c4911a976562f"
+    URL "https://github.com/luxonis/XLink/archive/abaaff7af56c8acb58fe353b86741f06d156c7ed.tar.gz"
+    SHA1 "0aef31a583c11220aaf821ca86df806efcd51b92"
 )

 hunter_config(


Fix for #1773

Fix for #1773

--- cmake/OpenCVFindIPP.cmake
+++ cmake/OpenCVFindIPP.cmake
@@ -113,17 +113,17 @@
     endif()

     set(IPP_LIBRARIES
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPIP}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPIP}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPSP}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPSP}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_ARCH}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPIP}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPIP}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPSP}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPSP}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_ARCH}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
         PARENT_SCOPE)

     return()
@@ -147,12 +147,12 @@
     set(IPPVM      "vm")       # vector math

     set(IPP_LIBRARIES
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPI}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPS}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
-        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_SUFFIX}${IPP_LIB_SUFFIX }
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPI}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPS}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
+        ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
         PARENT_SCOPE)

     return()


Properly set variables in FindOpenCV

Properly set variables in FindOpenCV

--- cmake/V4RFindOpenCV.cmake
+++ cmake/V4RFindOpenCV.cmake
@@ -1,6 +1,8 @@
 if(WITH_OpenCV)
   find_package(OpenCV "${MIN_VER_OpenCV}")
   if(OpenCV_FOUND)
-    set(HAVE_OpenCV TRUE)
+    set(OPENCV_LIBRARIES "${OpenCV_LIBS}")
+    set(OPENCV_INCLUDE_DIRS "${OpenCV_INCLUDE_DIRS}")
+    set(HAVE_OPENCV TRUE)
   endif()
 endif()