Updated FindOGRE.cmake to properly set OGRE_${COMPONENT}_BINARY variables with paths to the corresponding DLLs

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -333,47 +333,51 @@
 endif()

+#########################################################
+# Find Ogre components
+#########################################################
+
+set(OGRE_COMPONENT_SEARCH_PATH_REL
+  ${OGRE_LIBRARY_DIR_REL}/..
+  ${OGRE_LIBRARY_DIR_REL}/../..
+  ${OGRE_BIN_SEARCH_PATH}
+)
+set(OGRE_COMPONENT_SEARCH_PATH_DBG
+  ${OGRE_LIBRARY_DIR_DBG}/..
+  ${OGRE_LIBRARY_DIR_DBG}/../..
+  ${OGRE_BIN_SEARCH_PATH}
+)
+
+macro(ogre_find_component COMPONENT HEADER)
+  findpkg_begin(OGRE_${COMPONENT})
+  find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${COMPONENT} OGRE/${COMPONENT} Components/${COMPONENT}/include)
+  set(OGRE_${COMPONENT}_LIBRARY_NAMES "Ogre${COMPONENT}${OGRE_LIB_SUFFIX}")
+  get_debug_names(OGRE_${COMPONENT}_LIBRARY_NAMES)
+  find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
+  find_library(OGRE_${COMPONENT}_LIBRARY_DBG NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
+  make_library_set(OGRE_${COMPONENT}_LIBRARY)
+  findpkg_finish(OGRE_${COMPONENT})
+  if (OGRE_${COMPONENT}_FOUND)
+    # find binaries
+    if (NOT OGRE_STATIC)
+	  if (WIN32)
+	    find_file(OGRE_${COMPONENT}_BINARY_REL NAMES "Ogre${COMPONENT}.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_REL} PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
+	    find_file(OGRE_${COMPONENT}_BINARY_DBG NAMES "Ogre${COMPONENT}_d.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_DBG} PATH_SUFFIXES "" bin bin/debug debug)
+	  endif()
+	  mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
+    endif()
+  endif()
+endmacro()

 # look for Paging component
-findpkg_begin(OGRE_Paging)
-find_path(OGRE_Paging_INCLUDE_DIR NAMES OgrePaging.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Paging OGRE/Paging Components/Paging/include)
-set(OGRE_Paging_LIBRARY_NAMES "OgrePaging${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Paging_LIBRARY_NAMES)
-find_library(OGRE_Paging_LIBRARY_REL NAMES ${OGRE_Paging_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Paging_LIBRARY_DBG NAMES ${OGRE_Paging_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-set(OGRE_Paging_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
-make_library_set(OGRE_Paging_LIBRARY)
-findpkg_finish(OGRE_Paging)
-
+ogre_find_component(Paging OgrePaging.h)
 # look for Terrain component
-findpkg_begin(OGRE_Terrain)
-find_path(OGRE_Terrain_INCLUDE_DIR NAMES OgreTerrain.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Terrain OGRE/Terrain Components/Terrain/include)
-set(OGRE_Terrain_LIBRARY_NAMES "OgreTerrain${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Terrain_LIBRARY_NAMES)
-find_library(OGRE_Terrain_LIBRARY_REL NAMES ${OGRE_Terrain_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Terrain_LIBRARY_DBG NAMES ${OGRE_Terrain_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_Terrain_LIBRARY)
-findpkg_finish(OGRE_Terrain)
-
+ogre_find_component(Terrain OgreTerrain.h)
 # look for Property component
-findpkg_begin(OGRE_Property)
-find_path(OGRE_Property_INCLUDE_DIR NAMES OgreProperty.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Property OGRE/Property Components/Property/include)
-set(OGRE_Property_LIBRARY_NAMES "OgreProperty${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Property_LIBRARY_NAMES)
-find_library(OGRE_Property_LIBRARY_REL NAMES ${OGRE_Property_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Property_LIBRARY_DBG NAMES ${OGRE_Property_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_Property_LIBRARY)
-findpkg_finish(OGRE_Property)
-
+ogre_find_component(Property OgreProperty.h)
 # look for RTShaderSystem component
-findpkg_begin(OGRE_RTShaderSystem)
-find_path(OGRE_RTShaderSystem_INCLUDE_DIR NAMES OgreRTShaderSystem.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES RTShaderSystem OGRE/RTShaderSystem Components/RTShaderSystem/include)
-set(OGRE_RTShaderSystem_LIBRARY_NAMES "OgreRTShaderSystem${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_RTShaderSystem_LIBRARY_NAMES)
-find_library(OGRE_RTShaderSystem_LIBRARY_REL NAMES ${OGRE_RTShaderSystem_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_RTShaderSystem_LIBRARY_DBG NAMES ${OGRE_RTShaderSystem_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_RTShaderSystem_LIBRARY)
-findpkg_finish(OGRE_RTShaderSystem)
+ogre_find_component(RTShaderSystem OgreRTShaderSystem.h)
+

 #########################################################
 # Find Ogre plugins


[OGRE-275] Fix bin path searching on OS X.

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -127,6 +127,10 @@

     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
     set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
+
+    if(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+      set(OGRE_BIN_SEARCH_PATH ${dir}/bin/macosx ${OGRE_BIN_SEARCH_PATH})
+    endif()
   endforeach(dir)

   if (OGRE_PREFIX_DEPENDENCIES_DIR)


Allow overriding KristalliNet source directory with a custom KNET_DIR environment variable. If not present, the NAALI_DEPS_DIR folder is used.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -389,7 +389,11 @@
 endmacro (configure_celt)

 macro(use_package_knet)
-    set(KNET_DIR ${ENV_NAALI_DEP_PATH}/kNet)
+    if ("$ENV{KNET_DIR}" STREQUAL "")
+       set(KNET_DIR ${ENV_NAALI_DEP_PATH}/kNet)
+    else()
+       set(KNET_DIR $ENV{KNET_DIR})
+    endif()
     include_directories(${KNET_DIR}/include)
     link_directories(${KNET_DIR}/lib)
 endmacro()


cmake-modules
 * FindThirdPartyEmotivAPI.cmake : path selection clearer

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

--- trunk/cmake-modules/FindThirdPartyEmotivAPI.cmake
+++ trunk/cmake-modules/FindThirdPartyEmotivAPI.cmake
@@ -6,7 +6,11 @@
 IF(WIN32)
 # edkErrorCode.h EmoStateDLL.h
 	#FIND_PATH(PATH_EmotivAPI edk.h  PATHS "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"  "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" "C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM" "C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
-	FIND_PATH(PATH_EmotivAPI edk.h  PATHS "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"  "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" "C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM" "C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
+	FIND_PATH(PATH_EmotivAPI edk.h  PATHS
+		"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"
+		"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include"
+		"C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM"
+		"C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
 	IF(PATH_EmotivAPI)
 		MESSAGE(STATUS "  Found Emotiv API...")
 		INCLUDE_DIRECTORIES(${PATH_EmotivAPI})


fix: Do not set Sphinx_DIR in FindSphinx, instead set Sphinx_EXECUTABLE [BASIS]

--- CMake/Basis/FindSphinx.cmake
+++ CMake/Basis/FindSphinx.cmake
@@ -125,6 +125,13 @@
   mark_as_advanced (Sphinx-${_Sphinx_TOOL}_EXECUTABLE)
   list (APPEND _Sphinx_REQUIRED_VARS Sphinx-${_Sphinx_TOOL}_EXECUTABLE)
 endforeach ()
+
+# set main Sphinx_EXECUTABLE so basis_find_package can derive DEPENDS_Sphinx_DIR
+if (Sphinx-build_EXECUTABLE)
+  set (Sphinx_EXECUTABLE ${Sphinx-build_EXECUTABLE})
+else ()
+  set (Sphinx_EXECUTABLE ${Sphinx-apidoc_EXECUTABLE})
+endif ()

 # ----------------------------------------------------------------------------
 # determine Python executable used by Sphinx
@@ -197,15 +204,5 @@
     Sphinx_VERSION_STRING
 )

-# ----------------------------------------------------------------------------
-# set Sphinx_DIR
-if (Sphinx-build_EXECUTABLE)
-  get_filename_component (Sphinx_DIR "${Sphinx-build_EXECUTABLE}" PATH)
-  string (REGEX REPLACE "/bin/?" "" Sphinx_DIR "${Sphinx_DIR}")
-elseif (Sphinx-apidoc_EXECUTABLE)
-  get_filename_component (Sphinx_DIR "${Sphinx-apidoc_EXECUTABLE}" PATH)
-  string (REGEX REPLACE "/bin/?" "" Sphinx_DIR "${Sphinx_DIR}")
-endif ()
-
 unset (_Sphinx_VERSION)
 unset (_Sphinx_REQUIRED_VARS)


the yaml-cpp download now points to a tar.gz

For users that don't have git installed, pointing ExternalProject_Add to
a git repository will fail. It looks like cmake can extract tar.gz files
on its own, so we switch the link from a git repository to a download of
a tar.gz. The file is hosted on the OpenSurgSim Assembla page.

--- CMake/External_yamlcpp.cmake
+++ CMake/External_yamlcpp.cmake
@@ -13,9 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

+set(file_id "bAvdlSnfqr5ikadmr6bg7m")
 ExternalProject_Add(yaml-cpp
-	GIT_REPOSITORY https://git.assembla.com/OpenSurgSim.yaml-cpp.git
-	GIT_TAG "94911bfbac1225082fbac253c4620abbdf051aad"
+	URL "https://www.assembla.com/spaces/OpenSurgSim/documents/${file_id}/download/yaml-cpp.tar.gz"
+	URL_MD5 "6bd2a7b4cc31ad0b65209a8030dda7ed"
 	PREFIX yaml-cpp
 	CMAKE_ARGS
 		-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>


ENH: fixed typo in otbWrapperMacros.cmake and fixed 4 failling tests

--- CMake/OTBWrapperMacros.cmake
+++ CMake/OTBWrapperMacros.cmake
@@ -110,18 +110,7 @@

 macro(OTB_TEST_APPLICATION)
-   cmake_parse_arguments(TESTAPPLICATION  "TESTENVOPTIONS" "NAME;APP" "OPTIONS;TESTENVOPTIONS;VALID" ${ARGN} )
-
-   if (NOT TESTAPPLICATION_TESTENVOPTIONS)
-     add_test(NAME ${TESTAPPLICATION_NAME}
-              COMMAND otbTestDriver
-              ${TESTAPPLICATION_VALID}
-              Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
-              ${TESTAPPLICATION_APP}
-              $<TARGET_FILE_DIR:otbapp_${TESTAPPLICATION_APP}>
-              ${TESTAPPLICATION_OPTIONS}
-              -testenv)
-   else (NOT TESTAPPLICATION_TESTENVOPTIONS)
+   cmake_parse_arguments(TESTAPPLICATION  "" "NAME;APP" "OPTIONS;TESTENVOPTIONS;VALID" ${ARGN} )
      add_test(NAME ${TESTAPPLICATION_NAME}
               COMMAND otbTestDriver
               ${TESTAPPLICATION_VALID}
@@ -130,6 +119,5 @@
               $<TARGET_FILE_DIR:otbapp_${TESTAPPLICATION_APP}>
               ${TESTAPPLICATION_OPTIONS}
               -testenv ${TESTAPPLICATION_TESTENVOPTIONS})
-   endif (NOT TESTAPPLICATION_TESTENVOPTIONS)
-
+
 endmacro(OTB_TEST_APPLICATION)


Don't create an object library for Python wrapping

It requires CMake >= 2.8.8 and avoids duplication of ~5 lines of code
anyways, so it isn't needed.

Change-Id: Idbc6bf192a31692788cf7c259cd749b32f85a778

--- CMake/vtkPythonWrapping.cmake
+++ CMake/vtkPythonWrapping.cmake
@@ -58,18 +58,10 @@
   target_link_libraries(${module_name}PythonD LINK_PUBLIC ${module_name}
     vtkWrappingPythonCore ${extra_links} ${VTK_PYTHON_LIBRARIES})

-  add_library(${module_name}PythonInit OBJECT ${module_name}PythonInit.cxx)
-  set_property(TARGET ${module_name}PythonInit APPEND
-    PROPERTY INCLUDE_DIRECTORIES ${vtkCommonCore_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIR})
-  if (NOT WIN32)
-    set_property(TARGET ${module_name}PythonInit APPEND
-      PROPERTY COMPILE_FLAGS "-fPIC")
-  endif()
-
   _vtk_add_python_module(${module_name}Python ${module_name}PythonInit.cxx)
   target_link_libraries(${module_name}Python ${module_name}PythonD)
   if(CMAKE_HAS_TARGET_INCLUDES)
-    set_property(TARGET ${module_name}Python ${module_name}PythonInit APPEND
+    set_property(TARGET ${module_name}Python APPEND
       PROPERTY INCLUDE_DIRECTORIES ${_python_include_dirs})
   endif()
 endfunction()


added new test data

added new test data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag c2405025) # first 8 characters of hash-tag
+  set(revision_tag e26a2799) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Add support for GDAL version

Add support for GDAL version

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -183,7 +183,8 @@

 if(DEVBASE_GDAL_USEFUL OR DEVBASE_GDAL_REQUIRED)
-    find_package(GDAL)
+    find_package(GDAL
+        ${DEVBASE_REQUIRED_GDAL_VERSION})

     if(DEVBASE_GDAL_REQUIRED AND NOT GDAL_FOUND)
         message(FATAL_ERROR "GDAL not found")


[CMake] Use add_llvm_tool_symlink's OUTPUT_DIR option

This is updating to take r288632 into account.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@288633 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -115,7 +115,8 @@
             BUILD_WITH_INSTALL_RPATH On
             INSTALL_RPATH "@loader_path/../../../../${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}")

-      add_llvm_tool_symlink(${name} $<TARGET_FILE:${name}> ARG_ALWAYS_GENERATE)
+      add_llvm_tool_symlink(${name} ${name} ARG_ALWAYS_GENERATE
+                            OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
     else()
       set_target_properties(${name} PROPERTIES
             BUILD_WITH_INSTALL_RPATH On


CMake: generate check targets for lit suites without their own lit.cfgs

Currently our cmake generates targets like check-llvm-unit and
check-llvm-transforms-loopunroll-x86, but not check-llvm-transforms or
check-llvm-transforms-adce. This is because the search for test suites
only lists the ones with a custom lit.cfg or lit.local.cfg.

Instead, we can do something a little smarter - any directory under
test that isn't called Inputs or inside a directory called Inputs is a
test suite.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1050,13 +1050,28 @@
 function(add_lit_testsuites project directory)
   if (NOT CMAKE_CONFIGURATION_TYPES)
     cmake_parse_arguments(ARG "" "" "PARAMS;DEPENDS;ARGS" ${ARGN})
-    file(GLOB_RECURSE litCfg ${directory}/lit*.cfg)
+
+    # Search recursively for test directories by assuming anything not
+    # in a directory called Inputs contains tests.
     set(lit_suites)
-    foreach(f ${litCfg})
-      get_filename_component(dir ${f} DIRECTORY)
-      set(lit_suites ${lit_suites} ${dir})
-    endforeach()
-    list(REMOVE_DUPLICATES lit_suites)
+    file(GLOB to_process ${directory}/*)
+    while(to_process)
+      set(cur_to_process ${to_process})
+      set(to_process)
+      foreach(lit_suite ${cur_to_process})
+        if(NOT IS_DIRECTORY ${lit_suite})
+          continue()
+        endif()
+        string(FIND ${lit_suite} Inputs is_inputs)
+        if (is_inputs EQUAL -1)
+          list(APPEND lit_suites "${lit_suite}")
+          file(GLOB subdirs ${lit_suite}/*)
+          list(APPEND to_process ${subdirs})
+        endif()
+      endforeach()
+    endwhile()
+
+    # Now create a check- target for each test directory.
     foreach(dir ${lit_suites})
       string(REPLACE ${directory} "" name_slash ${dir})
       if (name_slash)


[CMake] Let llvm_add_library(MODULE) check capability of loadable module.

On unsupported platforms, llvm_add_library(MODULE) doesn't create any targets.
Caller may be responsible to check and add extra target properties.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -163,9 +163,12 @@
 endfunction()

 # llvm_add_library(name sources...
-#   MODULE;SHARED;STATIC
+#   SHARED;STATIC
 #     STATIC by default w/o BUILD_SHARED_LIBS.
 #     SHARED by default w/  BUILD_SHARED_LIBS.
+#   MODULE
+#     Target ${name} might not be created on unsupported platforms.
+#     Check with "if(TARGET ${name})".
 #   OUTPUT_NAME name
 #     Corresponds to OUTPUT_NAME in target properties.
 #   DEPENDS targets...
@@ -194,6 +197,10 @@
     if(ARG_SHARED OR ARG_STATIC)
       message(WARNING "MODULE with SHARED|STATIC doesn't make sense.")
     endif()
+    if(NOT LLVM_ON_UNIX OR CYGWIN)
+      message(STATUS "${name} ignored -- Loadable modules not supported on this platform.")
+      return()
+    endif()
   else()
     if(BUILD_SHARED_LIBS AND NOT ARG_STATIC)
       set(ARG_SHARED TRUE)
@@ -281,14 +288,11 @@
 endmacro(add_llvm_library name)

 macro(add_llvm_loadable_module name)
-  if( NOT LLVM_ON_UNIX OR CYGWIN )
-    message(STATUS "Loadable modules not supported on this platform.
-${name} ignored.")
+  llvm_add_library(${name} MODULE ${ARGN})
+  if(NOT TARGET ${name})
     # Add empty "phony" target
     add_custom_target(${name})
   else()
-    llvm_add_library(${name} MODULE ${ARGN})
-
     if( EXCLUDE_FROM_ALL )
       set_target_properties( ${name} PROPERTIES EXCLUDE_FROM_ALL ON)
     else()


update re2c version

update re2c version

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -20,7 +20,7 @@
     download_project(
             PROJ                re2c
             GIT_REPOSITORY      https://github.com/skvadrik/re2c.git
-            GIT_TAG             f811f03006fbc458d96bfa02c049fa04dc926166
+            GIT_TAG             eb48666e20f621a2b42940e0702e205147909e52
             GIT_PROGRESS        1
     )


Clarified cmake printouts during tzslc invocations

--- cmake/shader_compiler.cmake
+++ cmake/shader_compiler.cmake
@@ -6,46 +6,47 @@
     set(VK_GLSLC_EXECUTABLE_PATH ${VK_BIN_DIR}/glslc.exe)

     set(shader_path ${PROJECT_SOURCE_DIR}/${SHADER})
-    set(processed_shader_path ${PROJECT_BINARY_DIR}/${SHADER}.glsl)
+    set(processed_shader_name ${SHADER}.glsl)
+    set(processed_shader_path ${PROJECT_BINARY_DIR}/${processed_shader_name})

     add_custom_command(
         OUTPUT ${processed_shader_path}
-        COMMENT "TZSLC_VK: Building ${processed_shader_path}"
+        COMMENT "TZSLC_VK: Preprocessing ${SHADER} -> ${processed_shader_name}"
         COMMAND "${TZSLC_EXECUTABLE_PATH}" ${shader_path} -mall -o ${processed_shader_path}
-        DEPENDS ${tzslc} ${shader_path}
+        DEPENDS tzslc ${shader_path}
         IMPLICIT_DEPENDS CXX ${shader_path}
         VERBATIM
     )
-    set(spv_path ${PROJECT_BINARY_DIR}/${SHADER}.spv)
+    set(spv_name ${SHADER}.spv)
+    set(spv_path ${PROJECT_BINARY_DIR}/${spv_name})

     add_custom_command(
         OUTPUT ${spv_path}
-        COMMENT "VK: Building ${spv_path}"
+        COMMENT "TZSLC_VK: Building ${processed_shader_name} -> ${spv_name}"
         COMMAND ${VK_GLSLC_EXECUTABLE_PATH} -o ${spv_path} ${processed_shader_path}
-        DEPENDS ${processed_shader_path}
+        DEPENDS tzslc ${processed_shader_path}
         IMPLICIT_DEPENDS CXX ${processed_shader_path}
         VERBATIM)

     set_source_files_properties(${processed_shader_path} ${spv_path} PROPERTIES GENERATED TRUE)
-    add_dependencies(${ADD_SHADER_TARGET} tzslc)
     target_sources(${ADD_SHADER_TARGET} PRIVATE ${processed_shader_path} ${spv_path})
 endmacro()

 macro(add_shader_opengl)
     set(shader_path ${PROJECT_SOURCE_DIR}/${SHADER})
-    set(output_path ${PROJECT_BINARY_DIR}/${SHADER}.glsl)
+    set(output_name ${SHADER}.glsl)
+    set(output_path ${PROJECT_BINARY_DIR}/${output_name}})

     add_custom_command(
         OUTPUT ${output_path}
-        COMMENT "TZSLC_OGL: Building ${output_path}"
+        COMMENT "TZSLC_OGL: Building ${SHADER} -> ${output_name}"
         COMMAND "${TZSLC_EXECUTABLE_PATH}" ${shader_path} -mall -o ${output_path}
-        DEPENDS ${shader_path}
+        DEPENDS tzslc ${shader_path}
         IMPLICIT_DEPENDS CXX ${processed_shader_path}
         VERBATIM
     )

     set_source_files_properties(${output_path} PROPERTIES GENERATED TRUE)
-    add_dependencies(${ADD_SHADER_TARGET} tzslc)
     target_sources(${ADD_SHADER_TARGET} PRIVATE ${output_path})
 endmacro()


Trying different cmake variables

Trying different cmake variables

--- appveyor.cmake
+++ appveyor.cmake
@@ -1,5 +1,5 @@
 set(BUILD_DIR C:/projects/morebin CACHE PATH "")
 set(Boost_DIR C:/Libraries/boost_1_60_0 CACHE_PATH "")
 set(Boost_ROOT "${BOOST_DIR}" CACHE_PATH "")
-#set(Boost_INCLUDE_DIR "${Boost_DIR}/include" CACHE PATH "")
-#set(Boost_LIBRARY_DIR "${Boost_DIR}/lib" CACHE PATH "")
+set(Boost_INCLUDE_DIR "${Boost_DIR}/include" CACHE PATH "")
+set(Boost_LIBRARY_DIR "${Boost_DIR}/lib" CACHE PATH "")


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


solaris fix

solaris fix

--- configure/cmake/FindR.cmake
+++ configure/cmake/FindR.cmake
@@ -11,20 +11,13 @@
 find_program(R_EXEC NAMES R R.exe)
 set(CMAKE_FIND_APPBUNDLE ${TEMP_CMAKE_FIND_APPBUNDLE})

-set(ENV{R_HOME} "blah")
-
 #---Find includes and libraries if R exists
 if(R_EXEC)

   set(R_FOUND TRUE)

-  # On CRAN/Solaris an R_HOME env variable is set and causes
-  # assignment of R_ROOT_DIR to fail since 'R RHOME'
-  # issues a warning as its first output.   Unset if needed.
-
-  # if((CMAKE_HOST_SOLARIS) AND (DEFINED ENV{R_HOME}))
-  if((TRUE) AND (DEFINED ENV{R_HOME}))
-      message(STATUS "Rogue R_HOME defined on Solaris.  Will ignore.")
+  if((CMAKE_HOST_SOLARIS) AND (DEFINED ENV{R_HOME}))
+      message(STATUS "Unsetting R_HOME on Solaris.")
       unset(ENV{R_HOME})
   endif()


Use GCC flags in mingw

Use GCC flags in mingw

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

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


use runtest.sh script iif /bin/bash does exist

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -2,6 +2,9 @@
 option(EIGEN_DEBUG_ASSERTS "Enable advanced debuging of assertions" OFF)

 include(CheckCXXSourceCompiles)
+
+# check whether /bin/bash exists
+find_file(EIGEN_BIN_BASH_EXISTS "/bin/bash" PATHS "/" NO_DEFAULT_PATH)

 macro(ei_add_property prop value)
   get_property(previous GLOBAL PROPERTY ${prop})
@@ -61,15 +64,11 @@
     endif()
   endif()

-  if(WIN32)
-    if(CYGWIN)
-      add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}")
-    else(CYGWIN)
-      add_test(${testname_with_suffix} "${targetname}")
-    endif(CYGWIN)
-  else(WIN32)
+  if(EIGEN_BIN_BASH_EXISTS)
     add_test(${testname_with_suffix} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname_with_suffix}")
-  endif(WIN32)
+  else()
+    add_test(${testname_with_suffix} "${targetname}")
+  endif()

 endmacro(ei_add_test_internal)


CMake: add support for curses/ncurses for libreadline

libreadline needs termcap OR curses/ncurses.

--- cmake/FindReadline.cmake
+++ cmake/FindReadline.cmake
@@ -6,21 +6,23 @@
 # READLINE_LIBRARIES
 #

-find_package(Termcap)
+find_package(Curses)
+if(NOT CURSES_FOUND)
+    find_package(Termcap)
+endif()

 if (DEFINED READLINE_ROOT)
   set(_FIND_OPTS NO_CMAKE NO_CMAKE_SYSTEM_PATH)
-  FIND_LIBRARY(READLINE_LIBRARY
+  find_library(READLINE_LIBRARY
     NAMES readline
     HINTS ${READLINE_ROOT}/lib
     ${_FIND_OPTS})
-  FIND_PATH(READLINE_INCLUDE_DIR
+  find_path(READLINE_INCLUDE_DIR
     NAMES readline/readline.h
-    HINTS ${READLINE_ROOT}/include
-    ${_FIND_OPTS})
+    HINTS ${READLINE_ROOT}/include ${_FIND_OPTS})
 else()
-  FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
-  FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
+  find_library(READLINE_LIBRARY NAMES readline)
+  find_path(READLINE_INCLUDE_DIR readline/readline.h)
 endif()

 include(FindPackageHandleStandardArgs)
@@ -29,7 +31,7 @@
 set(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR})
 set(READLINE_LIBRARIES ${READLINE_LIBRARY})

-IF (READLINE_FOUND)
+if(READLINE_FOUND)
   if(EXISTS ${READLINE_INCLUDE_DIR}/readline/rlconf.h)
       check_library_exists(${READLINE_LIBRARY} rl_catch_sigwinch ""
           HAVE_GNU_READLINE)
@@ -38,10 +40,13 @@
               "${HAVE_GNU_READLINE}")
       endif()
   endif()
-  IF (TERMCAP_FOUND)
-    SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARIES})
-    SET (READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIRS} ${TERMCAP_INCLUDE_DIRS})
-  ENDIF()
-ENDIF (READLINE_FOUND)
+  if(CURSES_FOUND)
+    set(READLINE_LIBRARIES ${READLINE_LIBRARIES} ${CURSES_LIBRARIES})
+    set(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIRS} ${CURSES_INCLUDE_DIRS})
+  elseif(TERMCAP_FOUND)
+    set(READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARIES})
+    set(READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIRS} ${TERMCAP_INCLUDE_DIRS})
+  endif()
+endif(READLINE_FOUND)

-MARK_AS_ADVANCED(READLINE_INCLUDE_DIRS READLINE_LIBRARIES)
+mark_as_advanced(READLINE_INCLUDE_DIRS READLINE_LIBRARIES)


Prefer TBBConfig.cmake over FindTBB.cmake

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -269,12 +269,15 @@
 #-------------------------------------------------------------------------------
 # Find TBB.
 if(ALPAKA_ACC_CPU_B_TBB_T_SEQ_ENABLE)
-    find_package(TBB)
-    if(TBB_FOUND)
-        target_link_libraries(alpaka INTERFACE TBB::tbb)
-    else()
-        message(FATAL_ERROR "Optional alpaka dependency TBB could not be found!")
-    endif()
+    # Prefer TBB's own TBBConfig.cmake (available in more recent TBB versions)
+    find_package(TBB QUIET CONFIG)
+
+    if(NOT TBB_FOUND)
+        message(STATUS "TBB not found in config mode. Retrying in module mode.")
+        find_package(TBB REQUIRED MODULE)
+    endif()
+
+    target_link_libraries(alpaka INTERFACE TBB::tbb)
 endif()

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


[cmake] lcov targets remove depends, add report.

To ease manual testing and reporting,
remove dependencies so that each steps run on its own.

--- cmake/coverageFunc.cmake
+++ cmake/coverageFunc.cmake
@@ -130,13 +130,20 @@
             COMMAND ${LCOV_BIN} --gcov-tool ${GCOV_BIN_FOR_LCOV} -a ${CMAKE_BINARY_DIR}/init.info -a ${CMAKE_BINARY_DIR}/coverage.info -o ${CMAKE_BINARY_DIR}/total.info
             BYPRODUCTS ${CMAKE_BINARY_DIR}/total.info)
         add_custom_target(lcov-list
-            COMMAND ${LCOV_BIN} --gcov-tool ${GCOV_BIN_FOR_LCOV} --list ${CMAKE_BINARY_DIR}/total.info
-            SOURCES  ${CMAKE_BINARY_DIR}/total.info)
+            COMMAND ${LCOV_BIN} --gcov-tool ${GCOV_BIN_FOR_LCOV} --list ${CMAKE_BINARY_DIR}/total.info)
         add_custom_target(lcov
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target all --parallel
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov-init --parallel
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov-zerocounter --parallel
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target check --parallel
             COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target lcov-capture --parallel)
+        add_custom_target(lcov-remove
+            COMMAND ${LCOV_BIN} --gcov-tool ${GCOV_BIN_FOR_LCOV} --remove coverage.info  ${LCOV_REMOVES} --output-file  ${CMAKE_BINARY_DIR}/coverage.info)
+
+        find_program(GENHTML_BIN genhtml)
+        if(GENHTML_BIN)
+            add_custom_target(lcov-report
+                COMMAND ${GENHTML_BIN} -o ${CMAKE_BINARY_DIR}/lcov total.info)
+        endif()
     endif()
 endmacro()


ENH: Updating CIP git tag

ENH: Updating CIP git tag

--- SuperBuild/External_CIP.cmake
+++ SuperBuild/External_CIP.cmake
@@ -25,7 +25,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/acil-bwh/ChestImagingPlatform.git"
-    GIT_TAG "431ced5ba9a0553ddaece7c11b41ca8d73d41787" # use develop branch to include CLI modules
+    GIT_TAG "8a9ef5d09cf7d58ac6ca54c0cfbd78289d9a9de3" # use develop branch to include CLI modules
     #DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E echo "Remove this line and uncomment GIT_REPOSITORY and GIT_TAG"
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build


Update ITK superbuild version to 5.1rc01

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

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


Update to development version of ITK 4.11

Change-Id: I4958424b45e96a96b6748501c80a0ad8b3816c6c

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -42,7 +42,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 80178ae516db87aa50d2883c4e090da92c4a502d ) # just before 4.10.1 release
+set(ITK_TAG_COMMAND GIT_TAG 543b6eb69296d4b0f3bcf1140be3b755bac69268 )# ITK 4.11 under development

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )
@@ -100,5 +100,5 @@

 ExternalProject_Get_Property(ITK install_dir)
-set(ITK_DIR "${install_dir}/lib/cmake/ITK-4.10" )
+set(ITK_DIR "${install_dir}/lib/cmake/ITK-4.11" )
 set(WrapITK_DIR "${ITK_DIR}/WrapITK")


Fix the hardcoded Debian package dependencies

--- src/ibp/cmake/cpack_settings.cmake
+++ src/ibp/cmake/cpack_settings.cmake
@@ -2,7 +2,7 @@

 if (${CPACK_GENERATOR} STREQUAL "DEB")
    #set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
-   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
+   set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib1g (>= 1:1.1.4), czmq (>=1.4.1), libapr-accre1 (>= 1.5.0), libapr-accre-util1 (>=1.5.3), libzmq3 (>=4.0.1)")
 elseif (${CPACK_GENERATOR} STREQUAL "RPM")
    set(CPACK_RPM_PACKAGE_DEPENDS "libc6 (>=2.7-18), openssl (>=1.0.1f), zlib (>=1.2.8), czmq (>=1.4.1), apr-accre (>= 1.5.0), apr-util-ACCRE (>=1.5.3), zeromq (=>4.0.1)")
    #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")


Fix ITK Superbuild install path to include "lib" directory

This could result in a random ITK install being found on the system.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -101,4 +101,4 @@

 ExternalProject_Get_Property(${proj} install_dir)
-set(ITK_DIR "${install_dir}/cmake/ITK")
+set(ITK_DIR "${install_dir}/lib/cmake/ITK")


CI: update android NDK to 15b

CI: update android NDK to 15b

--- ci-build.cmake
+++ ci-build.cmake
@@ -55,7 +55,7 @@
 if(DEFINED ENV{ANDROID})
     set(CROSS
         -DANDROID_NATIVE_API_LEVEL=21
-        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r13b
+        -DANDROID_NDK=${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15b
         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_CURRENT_SOURCE_DIR}/CMake/toolchain/android.toolchain.cmake
         "-DANDROID_ABI=armeabi-v7a with NEON")

@@ -71,13 +71,13 @@
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps)
     set(BUILD_DEPS TRUE)

-    if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r13b)
+    if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/android-ndk-r15b)
         message(STATUS "Downloading Android NDK")
         file(DOWNLOAD
-            http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip
-            ./android-ndk-r13b-linux-x86_64.zip)
+            http://dl.google.com/android/repository/android-ndk-r15b-linux-x86_64.zip
+            ./android-ndk-r15b-linux-x86_64.zip)
         message(STATUS "Extracting Android NDK")
-        execute_process(COMMAND unzip android-ndk-r13b-linux-x86_64.zip OUTPUT_QUIET)
+        execute_process(COMMAND unzip android-ndk-r15b-linux-x86_64.zip OUTPUT_QUIET)
     endif()
 endif()


Fix syntax/typo

Fix syntax/typo

--- CMake/mitkFunctionAddCustomModuleTest.cmake
+++ CMake/mitkFunctionAddCustomModuleTest.cmake
@@ -8,9 +8,9 @@
 #!
 function(mitkAddCustomModuleTest test_name test_function)

-  if (BUILD_TESTING AND NOT ${MODULE_NAME}_IS_ENABLED)
-    add_test(${test_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${test_function} ${ARGN})
-    set_property(TEST ${test_name} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
+  if (BUILD_TESTING AND ${MODULE_NAME}_IS_ENABLED OR MODULE_NAME STREQUAL "Mitk")
+      add_test(${test_name} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} ${test_function} ${ARGN})
+      set_property(TEST ${test_name} PROPERTY LABELS ${MODULE_SUBPROJECTS} MITK)
   endif()

 endfunction()


This improves the behavior of the configure step when the user provides -DCYCLUS_ROOT_DIR=/*/install/cyclus rather than -DCYCLUS_ROOT_DIR=/*/install.

--- src/CMake/Findcycluscore.cmake
+++ src/CMake/Findcycluscore.cmake
@@ -10,9 +10,9 @@

 # Look for the header files
 FIND_PATH(CYCLUS_CORE_INCLUDE_DIR suffix.h
-  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   /usr/local/cyclus /opt/local/cyclus
-  PATH_SUFFIXES cyclus/include)
+  PATH_SUFFIXES cyclus/include include)

 # Add the root dir to the hints
 IF(NOT DEFINED CYCLUS_ROOT_DIR)
@@ -21,23 +21,23 @@

 # Look for the header files
 FIND_PATH(CYCLUS_CORE_SHARE_DIR cyclus.rng.in
-  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   /usr/local/cyclus /opt/local/cyclus
-  PATH_SUFFIXES cyclus/share)
+  PATH_SUFFIXES cyclus/share share)

 # Look for the library
 FIND_LIBRARY(CYCLUS_CORE_LIBRARY NAMES cycluscore
-  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   /usr/local/cyclus/lib /usr/local/cyclus
   /opt/local /opt/local/cyclus
-  PATH_SUFFIXES cyclus/lib)
+  PATH_SUFFIXES cyclus/lib lib)

 # Look for the library
 FIND_LIBRARY(CYCLUS_GTEST_LIBRARY NAMES gtest
-  HINTS ${CYCLUS_ROOT_DIR} "${CYCLUS_ROOT_DIR}/cyclus"
+  HINTS "${CYCLUS_ROOT_DIR}" "${CYCLUS_ROOT_DIR}/cyclus"
   /usr/local/cyclus/lib /usr/local/cyclus
   /opt/local/lib /opt/local/cyclus/lib
-  PATH_SUFFIXES cyclus/lib)
+  PATH_SUFFIXES cyclus/lib lib)

 # Copy the results to the output variables.
 IF (CYCLUS_CORE_INCLUDE_DIR AND CYCLUS_CORE_LIBRARY AND CYCLUS_GTEST_LIBRARY AND CYCLUS_CORE_SHARE_DIR)


Put values to defines in config.h.

Put values to defines in config.h.

--- config.h.cmake
+++ config.h.cmake
@@ -20,56 +20,56 @@
 *
 ****************************************************************************/

-#cmakedefine ENABLE_DEBUGGING
-#cmakedefine SRTP_KERNEL
-#cmakedefine SRTP_KERNEL_LINUX
+#cmakedefine ENABLE_DEBUGGING 1
+#cmakedefine SRTP_KERNEL 1
+#cmakedefine SRTP_KERNEL_LINUX 1
 #cmakedefine DEV_URANDOM "@DEV_URANDOM@"
-#cmakedefine GENERIC_AESICM
-#cmakedefine USE_SYSLOG
-#cmakedefine ERR_REPORTING_STDOUT
-#cmakedefine USE_ERR_REPORTING_FILE
+#cmakedefine GENERIC_AESICM 1
+#cmakedefine USE_SYSLOG 1
+#cmakedefine ERR_REPORTING_STDOUT 1
+#cmakedefine USE_ERR_REPORTING_FILE 1
 #cmakedefine ERR_REPORTING_FILE "@ERR_REPORTING_FILE@"
-#cmakedefine SRTP_GDOI
+#cmakedefine SRTP_GDOI 1

-#cmakedefine CPU_CISC
-#cmakedefine CPU_RISC
-#cmakedefine HAVE_X86
-#cmakedefine WORDS_BIGENDIAN
+#cmakedefine CPU_CISC 1
+#cmakedefine CPU_RISC 1
+#cmakedefine HAVE_X86 1
+#cmakedefine WORDS_BIGENDIAN 1

-#cmakedefine HAVE_STDLIB_H
-#cmakedefine HAVE_UNISTD_H
-#cmakedefine HAVE_BYTESWAP_H
-#cmakedefine HAVE_STDINT_H
-#cmakedefine HAVE_SYS_UIO_H
-#cmakedefine HAVE_INTTYPES_H
-#cmakedefine HAVE_SYS_TYPES_H
-#cmakedefine HAVE_MACHINE_TYPES_H
-#cmakedefine HAVE_SYS_INT_TYPES_H
-#cmakedefine HAVE_SYS_SOCKET_H
-#cmakedefine HAVE_NETINET_IN_H
-#cmakedefine HAVE_ARPA_INET_H
-#cmakedefine HAVE_WINDOWS_H
-#cmakedefine HAVE_WINSOCK2_H
-#cmakedefine HAVE_SYSLOG_H
-#cmakedefine HAVE_MEMORY_H
-#cmakedefine HAVE_STRINGS_H
-#cmakedefine HAVE_STRING_H
-#cmakedefine HAVE_SYS_STAT_H
+#cmakedefine HAVE_STDLIB_H 1
+#cmakedefine HAVE_UNISTD_H 1
+#cmakedefine HAVE_BYTESWAP_H 1
+#cmakedefine HAVE_STDINT_H 1
+#cmakedefine HAVE_SYS_UIO_H 1
+#cmakedefine HAVE_INTTYPES_H 1
+#cmakedefine HAVE_SYS_TYPES_H 1
+#cmakedefine HAVE_MACHINE_TYPES_H 1
+#cmakedefine HAVE_SYS_INT_TYPES_H 1
+#cmakedefine HAVE_SYS_SOCKET_H 1
+#cmakedefine HAVE_NETINET_IN_H 1
+#cmakedefine HAVE_ARPA_INET_H 1
+#cmakedefine HAVE_WINDOWS_H 1
+#cmakedefine HAVE_WINSOCK2_H 1
+#cmakedefine HAVE_SYSLOG_H 1
+#cmakedefine HAVE_MEMORY_H 1
+#cmakedefine HAVE_STRINGS_H 1
+#cmakedefine HAVE_STRING_H 1
+#cmakedefine HAVE_SYS_STAT_H 1

-#cmakedefine HAVE_SOCKET
-#cmakedefine HAVE_INET_ATON
-#cmakedefine HAVE_USLEEP
-#cmakedefine HAVE_SIGACTION
+#cmakedefine HAVE_SOCKET 1
+#cmakedefine HAVE_INET_ATON 1
+#cmakedefine HAVE_USLEEP 1
+#cmakedefine HAVE_SIGACTION 1

-#cmakedefine HAVE_LIBSOCKET
+#cmakedefine HAVE_LIBSOCKET 1

-#cmakedefine HAVE_INT8_T
-#cmakedefine HAVE_INT16_T
-#cmakedefine HAVE_INT32_T
-#cmakedefine HAVE_UINT8_T
-#cmakedefine HAVE_UINT16_T
-#cmakedefine HAVE_UINT32_T
-#cmakedefine HAVE_UINT64_T
+#cmakedefine HAVE_INT8_T 1
+#cmakedefine HAVE_INT16_T 1
+#cmakedefine HAVE_INT32_T 1
+#cmakedefine HAVE_UINT8_T 1
+#cmakedefine HAVE_UINT16_T 1
+#cmakedefine HAVE_UINT32_T 1
+#cmakedefine HAVE_UINT64_T 1
 #cmakedefine SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@
 #cmakedefine SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@


added new files to files.cmake

added new files to files.cmake

--- Modules/Bundles/org.mitk.gui.qt.dicom/files.cmake
+++ Modules/Bundles/org.mitk.gui.qt.dicom/files.cmake
@@ -8,6 +8,7 @@
   QmitkDicomDirectoryListener.cpp
   QmitkStoreSCPLauncher.cpp
   QmitkStoreSCPLauncherBuilder.cpp
+  QmitkDicomDataEventPublisher.cpp
 )

 set(UI_FILES
@@ -20,6 +21,7 @@
   src/internal/QmitkDicomDirectoryListener.h
   src/internal/QmitkStoreSCPLauncher.h
   src/internal/QmitkStoreSCPLauncherBuilder.h
+  src/internal/QmitkDicomDataEventPublisher.h
 )

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


Indent implementations within ThriftLibrary CMake Macros

Summary: No functional change, indent macro implementations; wrap code to 80 chars.

Reviewed By: vitaut

Differential Revision: D14438084

fbshipit-source-id: 073e670c7869bbc04bddbdafeb433b2acc86fa59

--- ThriftLibrary.cmake
+++ ThriftLibrary.cmake
@@ -40,28 +40,36 @@
 #   add_library(somelib $<TARGET_OBJECTS:${file_name}-${language}-obj> ...)
 #

-macro(thrift_object file_name services language options file_path output_path include_prefix)
-thrift_generate(
-  "${file_name}"
-  "${services}"
-  "${language}"
-  "${options}"
-  "${file_path}"
-  "${output_path}"
-  "${include_prefix}"
-  "${ARGN}"
+macro(thrift_object
+  file_name
+  services
+  language
+  options
+  file_path
+  output_path
+  include_prefix
 )
-bypass_source_check(${${file_name}-${language}-SOURCES})
-add_library(
-  "${file_name}-${language}-obj"
-  OBJECT
-  ${${file_name}-${language}-SOURCES}
-)
-add_dependencies(
-  "${file_name}-${language}-obj"
-  "${file_name}-${language}-target"
-)
-message("Thrift will create the Object file : ${file_name}-${language}-obj")
+  thrift_generate(
+    "${file_name}"
+    "${services}"
+    "${language}"
+    "${options}"
+    "${file_path}"
+    "${output_path}"
+    "${include_prefix}"
+    "${ARGN}"
+  )
+  bypass_source_check(${${file_name}-${language}-SOURCES})
+  add_library(
+    "${file_name}-${language}-obj"
+    OBJECT
+    ${${file_name}-${language}-SOURCES}
+  )
+  add_dependencies(
+    "${file_name}-${language}-obj"
+    "${file_name}-${language}-target"
+  )
+  message("Thrift will create the Object file : ${file_name}-${language}-obj")
 endmacro()

 # thrift_library
@@ -99,23 +107,31 @@
 #   target_link_libraries(somelibe ${file_name}-${language} ...)
 #

-macro(thrift_library file_name services language options file_path output_path include_prefix)
-thrift_object(
-  "${file_name}"
-  "${services}"
-  "${language}"
-  "${options}"
-  "${file_path}"
-  "${output_path}"
-  "${include_prefix}"
-  "${ARGN}"
+macro(thrift_library
+  file_name
+  services
+  language
+  options
+  file_path
+  output_path
+  include_prefix
 )
-add_library(
-  "${file_name}-${language}"
-  $<TARGET_OBJECTS:${file_name}-${language}-obj>
-)
-target_link_libraries("${file_name}-${language}" ${THRIFTCPP2})
-message("Thrift will create the Library file : ${file_name}-${language}")
+  thrift_object(
+    "${file_name}"
+    "${services}"
+    "${language}"
+    "${options}"
+    "${file_path}"
+    "${output_path}"
+    "${include_prefix}"
+    "${ARGN}"
+  )
+  add_library(
+    "${file_name}-${language}"
+    $<TARGET_OBJECTS:${file_name}-${language}-obj>
+  )
+  target_link_libraries("${file_name}-${language}" ${THRIFTCPP2})
+  message("Thrift will create the Library file : ${file_name}-${language}")
 endmacro()

 #
@@ -129,10 +145,10 @@
 #

 macro(bypass_source_check sources)
-set_source_files_properties(
-  ${sources}
-  PROPERTIES GENERATED TRUE
-)
+  set_source_files_properties(
+    ${sources}
+    PROPERTIES GENERATED TRUE
+  )
 endmacro()

 #
@@ -158,80 +174,89 @@
 # This will prevent cmake from complaining about missing source files
 #

-macro(thrift_generate file_name services language options file_path output_path include_prefix)
-
-cmake_parse_arguments(THRIFT_GENERATE   # Prefix
-  "" # Options
-  "" # One Value args
-  "THRIFT_INCLUDE_DIRECTORIES" # Multi-value args
-  "${ARGN}")
-
-set(thrift_include_directories)
-foreach(dir ${THRIFT_GENERATE_THRIFT_INCLUDE_DIRECTORIES})
-  list(APPEND thrift_include_directories "-I" "${dir}")
-endforeach()
-
-set("${file_name}-${language}-HEADERS"
-  ${output_path}/gen-${language}/${file_name}_constants.h
-  ${output_path}/gen-${language}/${file_name}_data.h
-  ${output_path}/gen-${language}/${file_name}_types.h
-  ${output_path}/gen-${language}/${file_name}_types.tcc
+macro(thrift_generate
+  file_name
+  services
+  language
+  options
+  file_path
+  output_path
+  include_prefix
 )
-set("${file_name}-${language}-SOURCES"
-  ${output_path}/gen-${language}/${file_name}_constants.cpp
-  ${output_path}/gen-${language}/${file_name}_data.cpp
-  ${output_path}/gen-${language}/${file_name}_types.cpp
-)
-foreach(service ${services})
+  cmake_parse_arguments(THRIFT_GENERATE   # Prefix
+    "" # Options
+    "" # One Value args
+    "THRIFT_INCLUDE_DIRECTORIES" # Multi-value args
+    "${ARGN}")
+
+  set(thrift_include_directories)
+  foreach(dir ${THRIFT_GENERATE_THRIFT_INCLUDE_DIRECTORIES})
+    list(APPEND thrift_include_directories "-I" "${dir}")
+  endforeach()
+
   set("${file_name}-${language}-HEADERS"
-    ${${file_name}-${language}-HEADERS}
-    ${output_path}/gen-${language}/${service}.h
-    ${output_path}/gen-${language}/${service}.tcc
-    ${output_path}/gen-${language}/${service}AsyncClient.h
-    ${output_path}/gen-${language}/${service}_custom_protocol.h
+    ${output_path}/gen-${language}/${file_name}_constants.h
+    ${output_path}/gen-${language}/${file_name}_data.h
+    ${output_path}/gen-${language}/${file_name}_types.h
+    ${output_path}/gen-${language}/${file_name}_types.tcc
   )
   set("${file_name}-${language}-SOURCES"
-    ${${file_name}-${language}-SOURCES}
-    ${output_path}/gen-${language}/${service}.cpp
-    ${output_path}/gen-${language}/${service}AsyncClient.cpp
-  )
-endforeach()
-if("${include_prefix}" STREQUAL "")
-  set(include_prefix_text "")
-else()
-  set(include_prefix_text "include_prefix=${include_prefix}")
-  if(NOT "${options}" STREQUAL "")
-    set(include_prefix_text ",${include_prefix_text}")
+    ${output_path}/gen-${language}/${file_name}_constants.cpp
+    ${output_path}/gen-${language}/${file_name}_data.cpp
+    ${output_path}/gen-${language}/${file_name}_types.cpp
+  )
+  foreach(service ${services})
+    set("${file_name}-${language}-HEADERS"
+      ${${file_name}-${language}-HEADERS}
+      ${output_path}/gen-${language}/${service}.h
+      ${output_path}/gen-${language}/${service}.tcc
+      ${output_path}/gen-${language}/${service}AsyncClient.h
+      ${output_path}/gen-${language}/${service}_custom_protocol.h
+    )
+    set("${file_name}-${language}-SOURCES"
+      ${${file_name}-${language}-SOURCES}
+      ${output_path}/gen-${language}/${service}.cpp
+      ${output_path}/gen-${language}/${service}AsyncClient.cpp
+    )
+  endforeach()
+  if("${include_prefix}" STREQUAL "")
+    set(include_prefix_text "")
+  else()
+    set(include_prefix_text "include_prefix=${include_prefix}")
+    if(NOT "${options}" STREQUAL "")
+      set(include_prefix_text ",${include_prefix_text}")
+    endif()
   endif()
-endif()
-set(gen_language ${language})
-if("${language}" STREQUAL "cpp2")
-  set(gen_language "mstch_cpp2")
-elseif("${language}" STREQUAL "py3")
-  set(gen_language "mstch_py3")
-  file(WRITE "${output_path}/gen-${language}/${file_name}/__init__.py")
-endif()
-add_custom_command(
-  OUTPUT ${${file_name}-${language}-HEADERS} ${${file_name}-${language}-SOURCES}
-  COMMAND ${THRIFT1}
-    --gen "${gen_language}:${options}${include_prefix_text}"
-    -o ${output_path}
-    ${thrift_include_directories}
-    --templates ${THRIFT_TEMPLATES}
-    "${file_path}/${file_name}.thrift"
-  DEPENDS ${THRIFT1}
-  COMMENT "Generating ${file_name} files. Output: ${output_path}"
-)
-add_custom_target(
-  ${file_name}-${language}-target ALL
-  DEPENDS ${${language}-${language}-HEADERS} ${${file_name}-${language}-SOURCES}
-)
-install(
-  DIRECTORY gen-${language}
-  DESTINATION include/${include_prefix}
-  FILES_MATCHING PATTERN "*.h")
-install(
-  DIRECTORY gen-${language}
-  DESTINATION include/${include_prefix}
-  FILES_MATCHING PATTERN "*.tcc")
-endmacro()
+  set(gen_language ${language})
+  if("${language}" STREQUAL "cpp2")
+    set(gen_language "mstch_cpp2")
+  elseif("${language}" STREQUAL "py3")
+    set(gen_language "mstch_py3")
+    file(WRITE "${output_path}/gen-${language}/${file_name}/__init__.py")
+  endif()
+  add_custom_command(
+    OUTPUT ${${file_name}-${language}-HEADERS}
+      ${${file_name}-${language}-SOURCES}
+    COMMAND ${THRIFT1}
+      --gen "${gen_language}:${options}${include_prefix_text}"
+      -o ${output_path}
+      ${thrift_include_directories}
+      --templates ${THRIFT_TEMPLATES}
+      "${file_path}/${file_name}.thrift"
+    DEPENDS ${THRIFT1}
+    COMMENT "Generating ${file_name} files. Output: ${output_path}"
+  )
+  add_custom_target(
+    ${file_name}-${language}-target ALL
+    DEPENDS ${${language}-${language}-HEADERS}
+      ${${file_name}-${language}-SOURCES}
+  )
+  install(
+    DIRECTORY gen-${language}
+    DESTINATION include/${include_prefix}
+    FILES_MATCHING PATTERN "*.h")
+  install(
+    DIRECTORY gen-${language}
+    DESTINATION include/${include_prefix}
+    FILES_MATCHING PATTERN "*.tcc")
+endmacro()


fix(cli): Trim -vv output

fix(cli): Trim -vv output

--- include/settings.hpp.cmake
+++ include/settings.hpp.cmake
@@ -116,19 +116,6 @@
     printf("Compiler: @CMAKE_CXX_COMPILER@\n");
     printf("Compiler flags: @CMAKE_CXX_FLAGS@\n");
     printf("Linker flags: @CMAKE_EXE_LINKER_FLAGS@\n");
-    printf("\n");
-    printf("ALSA_SOUNDCARD              %s\n", ALSA_SOUNDCARD);
-    printf("BSPWM_SOCKET_PATH           %s\n", BSPWM_SOCKET_PATH);
-    printf("BSPWM_STATUS_PREFIX         %s\n", BSPWM_STATUS_PREFIX);
-    printf("BUILDER_SPACE_TOKEN         %s\n", BUILDER_SPACE_TOKEN);
-    printf("CONNECTION_TEST_IP          %s\n", CONNECTION_TEST_IP);
-    printf("PATH_ADAPTER                %s\n", PATH_ADAPTER);
-    printf("PATH_BACKLIGHT_MAX          %s\n", PATH_BACKLIGHT_MAX);
-    printf("PATH_BACKLIGHT_VAL          %s\n", PATH_BACKLIGHT_VAL);
-    printf("PATH_BATTERY                %s\n", PATH_BATTERY);
-    printf("PATH_CPU_INFO               %s\n", PATH_CPU_INFO);
-    printf("PATH_MEMORY_INFO            %s\n", PATH_MEMORY_INFO);
-    printf("PATH_TEMPERATURE_INFO       %s\n", PATH_TEMPERATURE_INFO);
   }
 };
 // clang-format on


Update cuda architecture to sm_52

Update cuda architecture to sm_52

--- cmake/PVConfigProject.cmake
+++ cmake/PVConfigProject.cmake
@@ -41,7 +41,8 @@
   set(GCC_LINK_LIBRARIES m)

   # CUDA flags
-  set(CUDA_BASE_FLAGS "-arch=sm_30 -std=c++11")
+  # set(CUDA_BASE_FLAGS "-arch=sm_30 -std=c++11") # sm_30 is obsolete as of CUDA version 11.0.
+  set(CUDA_BASE_FLAGS "-arch=sm_52 -std=c++11")
   set(CUDA_RELEASE_FLAGS "${CUDA_BASE_FLAGS};-O3")
   set(CUDA_DEBUG_FLAGS "${CUDA_BASE_FLAGS};-Xptxas;-v;-keep;-lineinfo;-g;-G")


use correct numpy include dir

use correct numpy include dir

--- cmake/Packages/Python.cmake
+++ cmake/Packages/Python.cmake
@@ -14,7 +14,7 @@
     ELSE()
       FIND_PACKAGE(Python COMPONENTS Interpreter Development NumPy)
       SET(NUMPY_FOUND "${Python_NumPy_FOUND}")
-      SET(NUMPY_INCLUDE_DIR ${Python_NumPy_INCLUDE_DIR} CACHE STRING "Numpy directory")
+      SET(NUMPY_INCLUDE_DIR ${Python_NumPy_INCLUDE_DIRS} CACHE STRING "Numpy directory")
       MESSAGE(STATUS "  * numpy:    version ${Python_NumPy_VERSION}; headers ${NUMPY_INCLUDE_DIR}")
     ENDIF()
     SET(PYTHON_FOUND "${Python_FOUND}")


cmake: allowing list of ARCH_ROOTs

cmake: allowing list of ARCH_ROOTs

This commit aligns ARCH_ROOT to conform to BOARD_ROOT, DTS_ROOT,
SOC_ROOT that all allows list of directories.

Also it avoid code, such as:
if(BOARD STREQUAL my_board_using_out_of_tree_arch)
  set(ARCH_ROOT some/out/of/tree/arch/path)
endif()
in application CMakeLists.txt.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -280,11 +280,9 @@
 # found. It always includes ${ZEPHYR_BASE}/soc at the lowest priority.
 list(APPEND SOC_ROOT ${ZEPHYR_BASE})

-if(NOT ARCH_ROOT)
-  set(ARCH_DIR ${ZEPHYR_BASE}/arch)
-else()
-  set(ARCH_DIR ${ARCH_ROOT}/arch)
-endif()
+# 'ARCH_ROOT' is a prioritized list of directories where archs may be
+# found. It always includes ${ZEPHYR_BASE} at the lowest priority.
+list(APPEND ARCH_ROOT ${ZEPHYR_BASE})

 if(DEFINED SHIELD)
   string(REPLACE " " ";" SHIELD_AS_LIST "${SHIELD}")
@@ -426,6 +424,19 @@
 get_filename_component(BOARD_ARCH_DIR ${BOARD_DIR}      DIRECTORY)
 get_filename_component(BOARD_FAMILY   ${BOARD_DIR}      NAME)
 get_filename_component(ARCH           ${BOARD_ARCH_DIR} NAME)
+
+foreach(root ${ARCH_ROOT})
+  if(EXISTS ${root}/arch/${ARCH}/CMakeLists.txt)
+    set(ARCH_DIR ${root}/arch)
+    break()
+  endif()
+endforeach()
+
+if(NOT ARCH_DIR)
+  message(FATAL_ERROR "Could not find ARCH=${ARCH} for BOARD=${BOARD}, \
+please check your installation. ARCH roots searched: \n\
+${ARCH_ROOT}")
+endif()

 if(CONF_FILE)
   # CONF_FILE has either been specified on the cmake CLI or is already


Fixed package versioning.

Fixed package versioning.

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -144,7 +144,7 @@
 hunter_config(xrender VERSION 0.9.7)
 hunter_config(xshmfence VERSION 1.2)
 hunter_config(xtrans VERSION 1.2.7)
-hunter_config(SDL2 VERSION 2.0.4-h1)
+hunter_config(SDL2 VERSION 2.0.4-p0)

 if(MINGW OR MSVC80)
   hunter_config(GTest VERSION 1.7.0-hunter-6)


Add llvm-symbolizer to LLVM_TOOLCHAIN_TOOLS (PR40152)

So that it gets installed in LLVM_INSTALL_TOOLCHAIN_ONLY builds.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -885,6 +885,7 @@
     llvm-objdump
     llvm-rc
     llvm-profdata
+    llvm-symbolizer
     )
 endif()


cmake: kconfig: preserved quotes for Kconfig string values

Fixes: #48950

Kconfig requires quoted strings in its configuration files, like this:
> CONFIG_A_STRING="foo bar"

But CMake requires expects that strings are without additional qoutes,
and therefore qoutes are stripped when loading Kconfig config filers
into CMake.

This is particular important when the string in Kconfig is a path to a
file. In this case, not stripping the quotes leads to an error as the
file cannot be found.

When users pass a string to Kconfig through CMake, they are expected to
pass it so that qoutes are correct seen from Kconfig, that is:
> cmake -DCONFIG_A_STRING=\"foo bar\"

In CMake, those qoutes are written as-is to Kconfig extra config file,
and then removed in the CMake cache.
After Kconfig processing, the Kconfig settings are read back to CMake
but without quotes. Settings that was passed through the CMake cache,
for example using `-D` are written back to the cache, but this time
without the qoutes. This results in Kconfig errors on sub-sequent CMake
runs.

Instead of writing the Kconfig value setting back to the CMake cache,
introduce an internal shadow symbol in the cache prefixed with `CLI_`.
This allows the CMake cache to keep the value correctly formatted for
Kconfig extra config creation, while at the same time keep existing
behavior for CONFIG_ symbols read from Kconfig.

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

--- cmake/modules/kconfig.cmake
+++ cmake/modules/kconfig.cmake
@@ -182,12 +182,23 @@
 unset(EXTRA_KCONFIG_OPTIONS)
 get_cmake_property(cache_variable_names CACHE_VARIABLES)
 foreach (name ${cache_variable_names})
-  if("${name}" MATCHES "^${KCONFIG_NAMESPACE}_")
+  if("${name}" MATCHES "^CLI_${KCONFIG_NAMESPACE}_")
+    # Variable was set by user in earlier invocation, let's append to extra
+    # config unless a new value has been given.
+    string(REGEX REPLACE "^CLI_" "" org_name ${name})
+    if(NOT DEFINED ${org_name})
+      set(EXTRA_KCONFIG_OPTIONS
+        "${EXTRA_KCONFIG_OPTIONS}\n${org_name}=${${name}}"
+      )
+    endif()
+  elseif("${name}" MATCHES "^${KCONFIG_NAMESPACE}_")
     # When a cache variable starts with the 'KCONFIG_NAMESPACE' value, it is
     # assumed to be a Kconfig symbol assignment from the CMake command line.
     set(EXTRA_KCONFIG_OPTIONS
       "${EXTRA_KCONFIG_OPTIONS}\n${name}=${${name}}"
       )
+    set(CLI_${name} "${${name}}")
+    list(APPEND cli_config_list ${name})
   endif()
 endforeach()

@@ -321,21 +332,20 @@
 # Remove the CLI Kconfig symbols from the namespace and
 # CMakeCache.txt. If the symbols end up in DOTCONFIG they will be
 # re-introduced to the namespace through 'import_kconfig'.
-foreach (name ${cache_variable_names})
-  if("${name}" MATCHES "^${KCONFIG_NAMESPACE}_")
-    unset(${name})
-    unset(${name} CACHE)
-  endif()
+foreach (name ${cli_config_list})
+  unset(${name})
+  unset(${name} CACHE)
 endforeach()

 # Import the .config file and make all settings available in CMake processing.
 import_kconfig(${KCONFIG_NAMESPACE} ${DOTCONFIG})

-# Re-introduce the CLI Kconfig symbols that survived
-foreach (name ${cache_variable_names})
-  if("${name}" MATCHES "^${KCONFIG_NAMESPACE}_")
-    if(DEFINED ${name})
-      set(${name} ${${name}} CACHE STRING "")
-    endif()
-  endif()
-endforeach()
+# Cache the CLI Kconfig symbols that survived through Kconfig, prefixed with CLI_.
+# Remove those who might have changed compared to earlier runs, if they no longer appears.
+foreach (name ${cli_config_list})
+  if(DEFINED ${name})
+    set(CLI_${name} ${CLI_${name}} CACHE INTERNAL "")
+  else()
+    unset(CLI_${name} CACHE)
+  endif()
+endforeach()


Delay load dxcore in winml model tests

Delay load dxcore in winml model tests

--- cmake/winml_unittests.cmake
+++ cmake/winml_unittests.cmake
@@ -279,6 +279,9 @@
     SOURCES ${winml_test_model_src}
     LIBS winml_test_common ${winml_test_model_libs}
   )
+  if (EXISTS ${dxcore_header})
+    target_delayload(winml_test_model ext-ms-win-dxcore-l1-*.dll)
+  endif()
   target_precompiled_header(winml_test_model testPch.h)
 endif()


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -108,7 +108,7 @@
 Comment[ro]=Suportul GStreamer pentru Phonon
 Comment[ru]=Механизм GStreamer для Phonon
 Comment[se]=Phonon GStreamer duogášmohtor
-Comment[sk]=Podsystém Phonon GStreamer
+Comment[sk]=Phonon GStreamer backend
 Comment[sl]=Zaledje GStreamer za Phonon
 Comment[sr]=Гстример као позадина Фонона
 Comment[sr@ijekavian]=Гстример као позадина Фонона


[Build] Suppressed unused and deprecated CMake helper.

--- config/add_test_suite.cmake
+++ config/add_test_suite.cmake
@@ -1,50 +0,0 @@
-###############################################################
-function(
-            ## Function name
-            add_test_suite
-            ## Argument list
-            name           # Test name
-            source_list    # List of sources
-                           # ... libraries to link with (up to 5)
-        )
-
-  add_executable(${name} ${source_list})
-
-  target_link_libraries(${name} ${ARGV2} ${ARGV3} ${ARGV4} ${ARGV5} ${ARGV6})
-
-	if ( WIN32 )
-	    add_test(${name} ${name}.exe)
-	else ()
-	    add_test(${name} ${name})
-	endif ()
-
-endfunction(add_test_suite)
-###############################################################
-
-
-###############################################################
-# This is similar to the previous ones but we check if the test
-# is in the given list.
-###############################################################
-function(
-            ## Function name
-            add_test_suite_if
-            ## Argument list
-            list           # List to check against
-            name           # Test name
-            source_list    # List of sources
-                           # ... libraries to link with (up to 5)
-        )
-
-  list ( FIND list ${name}  TO_BE_COMPILED )
-
-  if ( TO_BE_COMPILED GREATER -1 )
-
-    add_test_suite(${name} ${source_list} ${ARGN})
-
-  endif ()
-
-endfunction(add_test_suite_if)
-###############################################################
-
-


Fix CI install-test build on Windows shared library config: platform prefix maybe missing

--- cmake/AWSSDKConfig.cmake
+++ cmake/AWSSDKConfig.cmake
@@ -129,11 +129,13 @@
 get_filename_component(TEMP_PATH "${AWSSDK_CORE_LIB_FILE}" PATH)
 get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)

-while (NOT TEMP_NAME STREQUAL "${LIB_SEARCH_PREFIX}")
-    set(TEMP_PLATFORM_PREFIX "${TEMP_NAME}/${TEMP_PLATFORM_PREFIX}")
-    get_filename_component(TEMP_PATH "${TEMP_PATH}" PATH)
-    get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)
-endwhile()
+if (LIB_SEARCH_PREFIX)
+    while (NOT TEMP_NAME STREQUAL "${LIB_SEARCH_PREFIX}")
+        set(TEMP_PLATFORM_PREFIX "${TEMP_NAME}/${TEMP_PLATFORM_PREFIX}")
+        get_filename_component(TEMP_PATH "${TEMP_PATH}" PATH)
+        get_filename_component(TEMP_NAME "${TEMP_PATH}" NAME)
+    endwhile()
+endif()

 set(AWSSDK_PLATFORM_PREFIX "${TEMP_PLATFORM_PREFIX}")


forcing CXX=hcc / hipcc for rocPRIM dependency download

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -49,6 +49,7 @@
          GIT_REPOSITORY      https://github.com/ROCmSoftwarePlatform/rocPRIM.git
          GIT_TAG             master
          INSTALL_DIR         ${ROCPRIM_ROOT}
+         CXX                 HCC
          CMAKE_ARGS          -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
          LOG_DOWNLOAD        TRUE
          LOG_CONFIGURE       TRUE
@@ -68,6 +69,7 @@
          GIT_REPOSITORY      https://github.com/ROCmSoftwarePlatform/rocPRIM.git
          GIT_TAG             master
          INSTALL_DIR         ${ROCPRIM_ROOT}
+         CXX                 HIPCC
          CMAKE_ARGS          -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_TEST=OFF -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
          LOG_DOWNLOAD        TRUE
          LOG_CONFIGURE       TRUE


OpenCV_DIR no longer required

OpenCV_DIR no longer required

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -4,17 +4,24 @@
 # find_package OpenCV
 # Defines: OpenCV_FOUND, OpenCV_INCLUDE_DIRS, OpenCV_LIBS, OpenCV_LINK_LIBRARIES
 # ----------------------------------------------------------------------------
-# Force the user to tell us which OpenCV they want (otherwise find_package can find the wrong one, cache it and changes to OpenCV_DIR are ignored)
+if(DEFINED OpenCV_DIR)

-if(DEFINED OpenCV_DIR)
     find_package(OpenCV REQUIRED core highgui imgproc ml PATHS ${OpenCV_DIR})
-    if(OpenCV_FOUND)
-        list(APPEND ${ROOT_PROJECT}_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
-        list(APPEND ${ROOT_PROJECT}_LIBS ${OpenCV_LIBS})
-    else(OpenCV_FOUND)
-        message(SEND_ERROR "Failed to find OpenCV. Double check that \"OpenCV_DIR\" to the root build directory of OpenCV.")
-    endif(OpenCV_FOUND)
+
 else(DEFINED OpenCV_DIR)
+
     set(OpenCV_DIR "" CACHE PATH "Root directory for OpenCV build directory." )
-    message(FATAL_ERROR "\"OpenCV_DIR\" not set. Please explicitly provide the path to the root build directory of OpenCV.")
+    find_package(OpenCV REQUIRED core highgui imgproc ml)
+
 endif(DEFINED OpenCV_DIR)
+
+if(OpenCV_FOUND)
+
+    list(APPEND ${ROOT_PROJECT}_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS})
+    list(APPEND ${ROOT_PROJECT}_LIBS ${OpenCV_LIBS})
+
+else(OpenCV_FOUND)
+
+    message(SEND_ERROR "Failed to find OpenCV. Double check that \"OpenCV_DIR\" points to the root of an OpenCV build directory.")
+
+endif(OpenCV_FOUND)


cmake: remove ALL from list

cmake: remove ALL from list

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -107,6 +107,7 @@
 		jna
 		)
 	set (BINDINGS_FORCE FORCE)
+	list (REMOVE_ITEM BINDINGS ALL)
 endif()

 set (BINDINGS_DOC "Which bindings should be added? ALL for all available, SWIG, GI for plugins based on respective technology, DEFAULT for minimal set.")
@@ -160,6 +161,7 @@
 		qt-gui
 		)
 	set (TOOLS_FORCE FORCE)
+	list (REMOVE_ITEM TOOLS ALL)
 endif ()

 set (TOOLS_DOC "Which TOOLS should be added? ALL for all available, NODEP for TOOLS without additional dependencies, DEFAULT for minimal set.")


cmake: mark more variables as internal

cmake: mark more variables as internal

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -453,10 +453,11 @@

 MARK_AS_ADVANCED(FORCE
-	# might be relevant to users:
+	# might be relevant to a few users:
 	GTEST_ROOT
 	COVERAGE_PREFIX
-	Boost_DIR
+	CMAKE_PIC_FLAGS
+	CMAKE_STATIC_FLAGS

 	# are kind of internal:
 	SWIG_DIR SWIG_EXECUTABLE SWIG_VERSION
@@ -480,4 +481,11 @@
 	Qt5Test_DIR
 	Qt5Widgets_DIR
 	Qt5_DIR
+
+	Boost_DIR
+	BOTAN_INCLUDE_DIRS
+	LIBGCRYPT_INCLUDE_DIR
+	XercesC_DIR
+	OPENSSL_INCLUDE_DIR
+	LUA_EXECUTABLE
 	)


cmake: Update documentation comments

cmake: Update documentation comments

* If I don't do it now it'll likely never happen.

--- cmake/FindNanoTest.cmake
+++ cmake/FindNanoTest.cmake
@@ -9,7 +9,7 @@
 # ::
 #
 #    NANOTEST_FOUND - Found the Nano Testing framework
-#    NANOTEST_INCLUDE_DIRS - Include directories
+#    NANOTEST_INCLUDE_DIR - Include directories
 #    NANOTEST_MAIN_SRC - Implementation of main()
 #
 #
@@ -19,7 +19,7 @@
 #
 #     enable_testing()
 #     find_package(NanoTest REQUIRED)
-#     include_directories(${NANOTEST_INCLUDE_DIRS} ${NANOTEST_INCLUDE_DIR})
+#     include_directories(${CMAKE_CURRENT_BINARY_DIR} ${NANOTEST_INCLUDE_DIR})
 #
 #
 # ::


Added some comments

Added some comments


build: add compiler flags to plugins after adding all the sources

--- cmake/SquashPlugin.cmake
+++ cmake/SquashPlugin.cmake
@@ -60,8 +60,6 @@
     source_file_add_extra_warning_flags (${source})
   endforeach ()

-  target_add_compiler_flags (${PLUGIN_TARGET} ${SQUASH_PLUGIN_COMPILER_FLAGS})
-
   if (NOT "${SQUASH_PLUGIN_C_STANDARD}" STREQUAL "")
     target_require_c_standard (${PLUGIN_TARGET} ${SQUASH_PLUGIN_C_STANDARD})
   endif ()
@@ -90,6 +88,8 @@
       set_property (TARGET ${PLUGIN_TARGET} APPEND PROPERTY INCLUDE_DIRECTORIES ${${SQUASH_PLUGIN_EXTERNAL_PKG_PREFIX}_INCLUDE_DIR})
     endif ()
   endif ()
+
+  target_add_compiler_flags (${PLUGIN_TARGET} ${SQUASH_PLUGIN_COMPILER_FLAGS})

   # Mostly so we can use the plugins uninstalled
   configure_file (squash.ini squash.ini)


Change git tag of any

Change git tag of any

--- cmake/external/any.cmake
+++ cmake/external/any.cmake
@@ -8,7 +8,7 @@
     extern_lib_any
     ${EXTERNAL_PROJECT_LOG_ARGS}
     GIT_REPOSITORY  "https://github.com/PaddlePaddle/any.git"
-    GIT_TAG         "8fef1e93710a0edf8d7658999e284a1142c4c020"
+    GIT_TAG         "15595d8324be9e8a9a80d9ae442fdd12bd66df5d"
     PREFIX          ${ANY_SOURCE_DIR}
     UPDATE_COMMAND  ""
     CONFIGURE_COMMAND ""


Add missing DirectML.Debug.dll

Add missing DirectML.Debug.dll

--- cmake/external/dml.cmake
+++ cmake/external/dml.cmake
@@ -77,18 +77,31 @@
         ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
         ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
         ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.dll
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.dll
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.dll
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.pdb
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.dll
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
-      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.pdb
+
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib          ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll          ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb          ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x64-win/DirectML.Debug.pdb
+
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib          ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll          ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb          ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/x86-win/DirectML.Debug.pdb
+
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib          ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll          ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb          ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb    ${DML_PACKAGE_DIR}/bin/arm-win/DirectML.Debug.pdb
+
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.lib        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.dll        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.dll
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML${DML_PREVIEW_FILENAME_SUFFIX}.pdb        ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.dll  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug.pdb
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug${DML_PREVIEW_FILENAME_SUFFIX}.pdb  ${DML_PACKAGE_DIR}/bin/arm64-win/DirectML.Debug.pdb
+
       VERBATIM
     )
   endif()


Ensure commit has is clean

Ensure commit has is clean

Previously the commit hash was added regardless if there are uncommitted changes or not. This meant that a commit hash in a build is not strictly bound to the file-state. Now the script also checks if there are uncommitted changes and marks the revision as such. This is still not perfect as the developer can use a poorly configured .gitignore to get changes into the same hash. However, it proves as a guard against carelessness.

--- cmake/git_revision.cmake
+++ cmake/git_revision.cmake
@@ -9,6 +9,15 @@
     if(NOT ${GIT_REVISION} STREQUAL "")
         string(STRIP ${GIT_REVISION} GIT_REVISION)
     endif()
+    execute_process(
+        COMMAND ${GIT_EXECUTABLE} status -s
+        OUTPUT_VARIABLE GIT_CHANGES
+        ERROR_QUIET
+        )
+    if(NOT ${GIT_CHANGES} STREQUAL "")
+        string(APPEND GIT_REVISION "-:UNCOMMITTED CHANGES")
+        message("There are uncommited changes adjust .gitignore or commit: ${GIT_CHANGES}")
+    endif()
     message(STATUS "Current git revision is ${GIT_REVISION}")
 else()
     set(GIT_REVISION "unknown")


Fix: no need for pcl_examples it is all handled in examples/CMakeLists.txt

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@4287 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_examples.cmake
+++ cmake/pcl_examples.cmake
@@ -1,17 +0,0 @@
-# Example management
-
-# Add an option so the user can turn tests off
-option(BUILD_EXAMPLES "Build the library examples" ${DEFAULT})
-
-# Print a suitable status message
-if(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})
-    if(REASON)
-        message(STATUS "Examples will not be built: ${REASON}")
-    else(REASON)
-        message(STATUS "Examples will not be built: Disabled manually")
-    endif(REASON)
-elseif(NOT ${BUILD_EXAMPLES})
-    message(STATUS "Examples will not be built: Disabled manually")
-else(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})
-    message(STATUS "Examples will be built")
-endif(NOT ${DEFAULT} AND NOT ${BUILD_EXAMPLES})


Fix to force CMAKE to reset QT_USE_FILE variable or it will obtain a wrong value from cache when rebuilding

--- cmake/pcl_find_qt5.cmake
+++ cmake/pcl_find_qt5.cmake
@@ -70,9 +70,9 @@
         endmacro()
     endif()

-    set(QT_USE_FILE ${CMAKE_CURRENT_BINARY_DIR}/use-qt5.cmake CACHE PATH "")
+    set(QT_USE_FILE ${CMAKE_CURRENT_BINARY_DIR}/use-qt5.cmake CACHE PATH "" FORCE)
     file(WRITE ${QT_USE_FILE} "#")

     # Trick the remainder of the build system.
     set(QT4_FOUND TRUE)
-endif()+endif()


updated pcl_find_ros.cmake to be compatible with the new stand-alone ROS messages; added missing rostime dependency

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

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -1,13 +1,17 @@
 # Look for ROS.
-# This is a temporary and ugly hack.

+# A macro for linking the ROS libraries.  (Might not be necessary... todo: add this logic at the find_package(ROS))
 macro(link_ros_libs _target)
-    if(USE_ROS)
-        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole rostime)
-    endif(USE_ROS)
+  if(ROS_FOUND)
+    # if find_package(ROS ...) found the required libraries, link against those
+    target_link_libraries(${_target} ${ROS_LIBRARIES})
+  elseif(USE_ROS)
+    # otherwise, we have to specify them here
+    target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole rostime)
+  endif()
 endmacro(link_ros_libs)

-
+# A macro for using rospack to find the ROS include path (required for pre-Fuerte ROS distributions)
 macro(get_ros_inc_path _dest _pkg)
     execute_process(COMMAND rospack find ${_pkg}
         RESULT_VARIABLE _res
@@ -18,25 +22,34 @@
     endif()
 endmacro(get_ros_inc_path)

-message(STATUS "ROS_ROOT $ENV{ROS_ROOT}")
+#todo: do we really need the next two lines?
 set(ROS_ROOT $ENV{ROS_ROOT})
 if(ROS_ROOT)
     option(USE_ROS "Integrate with ROS rather than using native files" OFF)
     message(STATUS "Found ROS; USE_ROS is ${USE_ROS}")
     if(USE_ROS)
-        set(_ros_pkgs std_msgs sensor_msgs roscpp_serialization cpp_common rostime
+        # Search for ROS
+        find_package(ROS COMPONENTS catkin roscpp_serialization std_msgs sensor_msgs rostime)
+	if (ROS_FOUND)
+	  # if find_package(ROS ...) found the required components, add their include directories
+          include_directories(${ROS_INCLUDE_DIRS})
+	else()
+          # otherwise, search for these particular packages the old hacky way
+          set(_ros_pkgs std_msgs sensor_msgs roscpp_serialization cpp_common rostime
             roscpp_traits roscpp rosconsole std_msgs rosbag topic_tools pcl)
-        set(_ros_paths)
-        foreach(_pkg ${_ros_pkgs})
+          set(_ros_paths)
+          foreach(_pkg ${_ros_pkgs})
             get_ros_inc_path(_path ${_pkg})
             list(APPEND _ros_paths ${_path})
-        endforeach(_pkg)
-        foreach(_path ${_ros_paths})
+          endforeach(_pkg)
+          foreach(_path ${_ros_paths})
             include_directories(${_path}/include
-                                ${_path}/msg_gen/cpp/include
-                                )
+              ${_path}/msg_gen/cpp/include
+              )
             link_directories(${_path}/lib)
-        endforeach(_path)
+          endforeach(_path)
+	endif()
+
         # use, i.e. don't skip the full RPATH for the build tree
         SET(CMAKE_SKIP_BUILD_RPATH  FALSE)


Add a global var to disable perfs tests.

Change-Id: I212c739248912893f7153227c73c6f343c18dcb3
Reviewed-on: http://gerrit.aldebaran.lan:8080/9099
Reviewed-by: ncornu <13ba26b8f12d26c819f48749c65f2f7f5c1d13db@aldebaran-robotics.com>
Tested-by: ncornu <13ba26b8f12d26c819f48749c65f2f7f5c1d13db@aldebaran-robotics.com>

--- cmake/qibuild/perf.cmake
+++ cmake/qibuild/perf.cmake
@@ -13,12 +13,20 @@
 # named "--output <out.xml>" and generate such a file.
 # You can for instance use the qiperf library for that.
 #
+# Notes:
+#  * The test won't be built if BUILD_PERFS_TESTS is OFF
+#
 # \arg:name Name of the test. A target of this name will be created
 # \group:SRC Sources of the perf executable
 # \group:DEPENDS Dependencies to pass to qi_use_lib
 # \group:ARGUMENTS arguments to be passed to the executable
 #
 function(qi_create_perf_test name)
+  if (DEFINED BUILD_PERFS_TESTS AND NOT BUILD_PERFS_TESTS)
+    qi_debug("Perf test(${name}) disabled by BUILD_PERFS_TESTS=OFF")
+    qi_set_global(QI_${name}_TARGET_DISABLED TRUE)
+    return()
+  endif()
   cmake_parse_arguments(ARG "" "" "SRC;DEPENDS;ARGUMENTS" ${ARGN})
   set(_src ${ARG_UNPARSED_ARGUMENTS} ${ARG_SRC})
   set(_deps ${ARG_DEPENDS})


CMake/build.cmake : Fix for CMake 3.0.2.

Previous versions of CMake allowed targets names like "tests/win32_test"
but CMake 3.0.2 doesn't. The corresponding target name for the new CMake
is "win32_test", but putting the resulting executable in the tests/
directory requires something like:

    add_executable (win32_test tests/win32_test.c)
    set_target_properties (win32_test
                           PROPERTIES RUNTIME_OUTPUT_DIRECTORY tests)

--- CMake/build.cmake
+++ CMake/build.cmake
@@ -1,55 +1,62 @@
 # Build recipe for building programs in the programs/ directory.
 function (lsf_build_program prog_name extra_libs)
-	add_executable (programs/${prog_name}
+	add_executable (${prog_name}
 		programs/common.c
 		programs/${prog_name}.c
 		)
-	target_link_libraries (programs/${prog_name} sndfile ${extra_libs})
+	target_link_libraries (${prog_name} sndfile ${extra_libs})
+	set_target_properties (${prog_name}
+		PROPERTIES
+		RUNTIME_OUTPUT_DIRECTORY programs
+		)
 	endfunction ()

 # Build recipe for building C tests in the src/ directory.
 function (lsf_build_src_test_c test_name extra_files)
-	add_executable (src/${test_name}
+	add_executable (${test_name}
 		src/${test_name}.c
 		${extra_files}
 		)
-	target_link_libraries (src/${test_name} m)
-	set_target_properties (src/${test_name}
+	target_link_libraries (${test_name} m)
+	set_target_properties (${test_name}
 		PROPERTIES
 		EXCLUDE_FROM_DEFAULT_BUILD TRUE
 		EXCLUDE_FROM_ALL TRUE
+		RUNTIME_OUTPUT_DIRECTORY src
 		)
-	add_dependencies (check src/${test_name})
+	add_dependencies (check ${test_name})
 	endfunction ()

 # Build recipe for building C tests in the tests/ directory.
 function (lsf_build_test_c test_name extra_files)
-	add_executable (tests/${test_name}
+	add_executable (${test_name}
+		tests/${test_name}.c
 		tests/utils.c
-		tests/${test_name}.c
 		${extra_files}
 		)
-	target_link_libraries (tests/${test_name} sndfile)
-	set_target_properties (tests/${test_name}
+	target_link_libraries (${test_name} sndfile)
+	set_target_properties (${test_name}
 		PROPERTIES
 		EXCLUDE_FROM_DEFAULT_BUILD TRUE
 		EXCLUDE_FROM_ALL TRUE
+		RUNTIME_OUTPUT_DIRECTORY tests
 		)
-	add_dependencies (check tests/${test_name})
+	add_dependencies (check ${test_name})
 	endfunction ()

 # Build recipe for building C++ tests in the tests/ directory.
 function (lsf_build_test_cc test_name)
-	add_executable (tests/${test_name}
+	add_executable (${test_name}
 		tests/utils.c
 		tests/${test_name}.cc
 		)
-	target_link_libraries (tests/${test_name} sndfile)
-	set_target_properties (tests/${test_name}
+	target_link_libraries (${test_name} sndfile)
+	set_target_properties (${test_name}
 		PROPERTIES
 		EXCLUDE_FROM_DEFAULT_BUILD TRUE
 		EXCLUDE_FROM_ALL TRUE
+		RUNTIME_OUTPUT_DIRECTORY tests
 		)
-	add_dependencies (check tests/${test_name})
+	add_dependencies (check ${test_name})
 	endfunction ()


Fix FindNVTT to find dynamic rather than static libraries.

--- build/modules/FindNVTT.cmake
+++ build/modules/FindNVTT.cmake
@@ -44,8 +44,8 @@
 SET(NVTT_LIBRARY_DIRS)
 IF(NVTT_ROOT)
   SET(NVTT_LIBRARY_DIRS ${NVTT_ROOT})
-  IF(EXISTS "${NVTT_ROOT}/lib/static")
-    SET(NVTT_LIBRARY_DIRS ${NVTT_LIBRARY_DIRS} ${NVTT_ROOT}/lib/static)
+  IF(EXISTS "${NVTT_ROOT}/lib")
+    SET(NVTT_LIBRARY_DIRS ${NVTT_LIBRARY_DIRS} ${NVTT_ROOT}/lib)
   ENDIF()
 ENDIF()

@@ -98,7 +98,7 @@
 IF(NVTT_INCLUDE_DIRS AND NVTT_LIBRARIES)
   SET(NVTT_FOUND TRUE)
   IF(WIN32)
-   SET(NVTT_LIBRARIES debug ${NVTT_ROOT}/lib/static/nvtt.lib optimized ${NVTT_ROOT}/lib/static/nvtt.lib)
+   SET(NVTT_LIBRARIES debug ${NVTT_ROOT}/lib/nvtt.lib optimized ${NVTT_ROOT}/lib/nvtt.lib)
   ENDIF()
   IF(NOT NVTT_FIND_QUIETLY)
     MESSAGE(STATUS "Found NVTT: headers at ${NVTT_INCLUDE_DIRS}, libraries at ${NVTT_LIBRARY_DIRS} :: ${NVTT_LIBRARIES}")


Update DeployQt4 module.

Update DeployQt4 module.

--- cmake/DeployQt4.cmake
+++ cmake/DeployQt4.cmake
@@ -56,11 +56,12 @@
 # (or <plugins_dir>) relative to <executable> and store the result in
 # <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH.
 #
-#  INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>])
+#  INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>])
 # Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up
 # a Qt4 executable using BundleUtilities so it is standalone and can be
 # drag-and-drop copied to another machine as long as all of the system
 # libraries are compatible. The executable will be fixed-up at install time.
+# <component> is the COMPONENT used for bundle fixup and plugin installation.
 # See documentation of FIXUP_QT4_BUNDLE.

 #=============================================================================
@@ -204,9 +205,8 @@
                 else()
                         if(configurations AND (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE))
                                 set(configurations CONFIGURATIONS ${configurations})
-                        endif()
-                        if(component)
-                                set(component COMPONENT ${component})
+                        else()
+                                unset(configurations)
                         endif()
                         install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
                 endif()
@@ -244,9 +244,14 @@
         set(dirs ${ARGV3})
         set(plugins_dir ${ARGV4})
         set(request_qt_conf ${ARGV5})
-        set(plugin_component ${ARGV6})
+        set(component ${ARGV6})
         if(QT_LIBRARY_DIR)
                 list(APPEND dirs "${QT_LIBRARY_DIR}")
+        endif()
+        if(component)
+                set(component COMPONENT ${component})
+        else()
+                unset(component)
         endif()

         get_filename_component(executable_absolute "${executable}" ABSOLUTE)
@@ -265,15 +270,16 @@

         foreach(plugin ${qtplugins})
                 set(installed_plugin_paths "")
-                install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${plugin_component}")
+                install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}")
                 list(APPEND libs ${installed_plugin_paths})
         endforeach()

         resolve_qt4_paths(libs)

         install(CODE
-                " INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" )
-                SET( BU_CHMOD_BUNDLE_ITEMS TRUE )
-                FIXUP_QT4_EXECUTABLE( \"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\" ) "
+  "INCLUDE(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\")
+  SET(BU_CHMOD_BUNDLE_ITEMS TRUE)
+  FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")"
+                ${component}
         )
 endfunction()


rephrasing

rephrasing

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -89,10 +89,10 @@

     # set cpp path
-    # Now use by default the $CPP enviromnement variable first, if not fallback
-    # on the previous behavior, so in order:
-    #   1- if defined use ${CPP}
-    #   2- if clang++ present use it
+    # Now check first if the $CPP enrironment variable is defined, if not
+    # fallback on the previous behavior, so in order:
+    #   1- if defined uses ${CPP}
+    #   2- if clang++ is present, use it
     #   3- otherwise use cpp
     IF(DEFINED ENV{CPP})
         SET(SYS_CPP "$ENV{CPP}")


check for .pxi dependencies

check for .pxi dependencies

--- cmake/UseCython.cmake
+++ cmake/UseCython.cmake
@@ -18,7 +18,7 @@
 #   cython_add_standalone_executable( <executable_name> [MAIN_MODULE src1] <src1> <src2> ... <srcN> )
 #
 # To avoid dependence on Python, set the PYTHON_LIBRARY cache variable to point
-# to a static library.  If a MAIN_MODULE source is specified,
+# to a static library.  If a MAIN_MODULE source is specified,
 # the "if __name__ == '__main__':" from that module is used as the C main() method
 # for the executable.  If MAIN_MODULE, the source with the same basename as
 # <executable_name> is assumed to be the MAIN_MODULE.
@@ -116,11 +116,31 @@
     # Add the pxd file will the same name as the given pyx file.
     unset( corresponding_pxd_file CACHE )
     find_file( corresponding_pxd_file ${pyx_file_basename}.pxd
-      PATHS "${pyx_path}" ${cmake_include_directories}
+      PATHS "${pyx_path}" ${cmake_include_directories}
       NO_DEFAULT_PATH )
     if( corresponding_pxd_file )
       list( APPEND pxd_dependencies "${corresponding_pxd_file}" )
     endif()
+
+    # Look for included pxi files
+    file(STRINGS "${pyx_file}" include_statements REGEX "include +['\"]([^'\"]+).*")
+    foreach(statement ${include_statements})
+      string(REGEX REPLACE "include +['\"]([^'\"]+).*" "\\1" pxi_file "${statement}")
+      unset(pxi_location CACHE)
+      find_file(pxi_location ${pxi_file}
+        PATHS "${pyx_path}" ${cmake_include_directories} NO_DEFAULT_PATH)
+      if (pxi_location)
+        list(APPEND pxi_dependencies ${pxi_location})
+        get_filename_component( found_pyi_file_basename "${pxi_file}" NAME_WE )
+        get_filename_component( found_pyi_path ${pxi_location} PATH )
+        unset( found_pyi_pxd_file CACHE )
+        find_file( found_pyi_pxd_file ${found_pyi_file_basename}.pxd
+          PATHS "${found_pyi_path}" ${cmake_include_directories} NO_DEFAULT_PATH )
+        if (found_pyi_pxd_file)
+            list( APPEND pxd_dependencies "${found_pyi_pxd_file}" )
+        endif()
+      endif()
+    endforeach() # for each include statement found

     # pxd files to check for additional dependencies.
     set( pxds_to_check "${pyx_file}" "${pxd_dependencies}" )
@@ -181,17 +201,7 @@
       list( LENGTH pxds_to_check number_pxds_to_check )
     endwhile()

-    # Look for included pxi files
-    file(STRINGS "${pyx_file}" include_statements REGEX "include +['\"]([^'\"]+).*")
-    foreach(statement ${include_statements})
-      string(REGEX REPLACE "include +['\"]([^'\"]+).*" "\\1" pxi_file "${statement}")
-      unset(pxi_location CACHE)
-      find_file(pxi_location ${pxi_file}
-        PATHS "${pyx_path}" ${cmake_include_directories} NO_DEFAULT_PATH)
-      if (pxi_location)
-        list(APPEND pxi_dependencies ${pxi_location})
-      endif()
-    endforeach() # for each include statement found
+

   endforeach() # pyx_file

@@ -217,7 +227,7 @@
     set( version_arg )
   endif()

-  # Include directory arguments.
+  # Include directory arguments.
   list( REMOVE_DUPLICATES cython_include_directories )
   set( include_directory_arg "" )
   foreach( _include_dir ${cython_include_directories} )


Added check for test metatargets.

Added check for test metatargets.

--- cmake/bde_utils.cmake
+++ cmake/bde_utils.cmake
@@ -196,7 +196,9 @@
     bde_assert_no_extra_args()

     if(allTestTargets)
-        add_custom_target(${testGroupName}.t)
+        if (NOT TARGET ${testGroupName}.t)
+            add_custom_target(${testGroupName}.t)
+        endif()
         add_dependencies(${testGroupName}.t ${allTestTargets})
         foreach(test IN LISTS allTestTargets)
             bde_append_test_labels(${test} ${testGroupName})


test=develop

test=develop

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -16,11 +16,6 @@
     add_definitions(-DPADDLE_NO_PYTHON)
 endif(NOT WITH_PYTHON)

-if(APPLE)
-    set(ENV{CMAKE_FIND_FRAMEWORK} LAST)
-    set(ENV{CMAKE_FIND_APPBUNDLE} LAST)
-endif(APPLE)
-
 if(WITH_DSO)
     add_definitions(-DPADDLE_USE_DSO)
 endif(WITH_DSO)


MDEV-6004 MariaDB init script fails to start (missing dependency on MariaDB-client in server RPM)

--- cmake/cpack_rpm.cmake
+++ cmake/cpack_rpm.cmake
@@ -147,6 +147,10 @@
 SETA(CPACK_RPM_test_PACKAGE_PROVIDES
   "MySQL-test")

+SETA(CPACK_RPM_server_PACKAGE_REQUIRES
+   ${CPACK_RPM_PACKAGE_REQUIRES}
+   "MariaDB-client")
+
 SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
 SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
 SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh)
@@ -166,12 +170,12 @@
   SET(${o} "${${o}} ${alt} ${alt}%{_isa}")
 ENDMACRO(ALTERNATIVE_NAME)

-# Argh! Different distributions call packages differently, to be a drop-in
-# replacement we have to fake distribution-speficic dependencies
-
 ALTERNATIVE_NAME("devel"  "mysql-devel")
 ALTERNATIVE_NAME("server" "mysql-server")
 ALTERNATIVE_NAME("test"   "mysql-test")
+
+# Argh! Different distributions call packages differently, to be a drop-in
+# replacement we have to fake distribution-speficic dependencies

 IF(RPM MATCHES "(rhel|centos)5")
   ALTERNATIVE_NAME("shared" "mysql")


Fix #193: GLEWmx find on MinGW

Fix #193: GLEWmx find on MinGW

--- FindGLEW_MX.cmake
+++ FindGLEW_MX.cmake
@@ -11,7 +11,7 @@
   /usr/include /usr/local/include /opt/local/include)

 find_library(_glew_mx_LIBRARY
-  NAMES GLEWmx GLEW glew glew32
+  NAMES GLEWmx glew32mx GLEW glew glew32
   PATHS /usr/lib /usr/local/lib)

 if(_glew_mx_INCLUDE_DIR AND _glew_mx_LIBRARY)


Trim spaces

Trim spaces

--- contrib/FindSodium.cmake
+++ contrib/FindSodium.cmake
@@ -67,14 +67,14 @@
     find_library(sodium_LIBRARY_RELEASE NAMES ${${XPREFIX}_LIBRARIES} sodium
         HINTS ${${XPREFIX}_LIBRARY_DIRS}
     )
-
+

 ########################################################################
 # Windows
 elseif (WIN32)
     set(sodium_DIR "$ENV{sodium_DIR}" CACHE FILEPATH "sodium install directory")
     mark_as_advanced(sodium_DIR)
-
+
     find_path(sodium_INCLUDE_DIR sodium.h
         HINTS ${sodium_DIR}
         PATH_SUFFIXES include


Fix flexisip RPM dependency with soci

Fix flexisip RPM dependency with soci

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -81,8 +81,8 @@
 %endif

 %if %{soci}
-Requires: soci
-Requires: soci-mysql-devel
+Requires: %{pkg_prefix}soci
+Requires: %{pkg_prefix}soci-mysql-devel
 %endif

 %if %{transcoder}


cmake: support CPU_DISPATCH=ALL, fix misused CPU_DISPATCH

- CPU_DISPATCH_FINAL should be used for filtering

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -380,6 +380,10 @@
   set(CPU_DISPATCH_REQUIRE "")
 endif()

+if("x${CPU_DISPATCH}" STREQUAL "xALL")
+  set(CPU_DISPATCH "${CPU_KNOWN_OPTIMIZATIONS}")
+endif()
+
 macro(ocv_check_compiler_optimization OPT)
   if(NOT DEFINED CPU_${OPT}_SUPPORTED)
     if((DEFINED CPU_${OPT}_FLAGS_ON AND NOT "x${CPU_${OPT}_FLAGS_ON}" STREQUAL "x") OR CPU_${OPT}_TEST_FILE)
@@ -854,19 +858,19 @@
         file(WRITE "${__file}" "${__codestr}")
       endif()

-      if(";${CPU_DISPATCH};" MATCHES "${OPT}" OR __CPU_DISPATCH_INCLUDE_ALL)
+      if(";${CPU_DISPATCH_FINAL};" MATCHES "${OPT}" OR __CPU_DISPATCH_INCLUDE_ALL)
         if(EXISTS "${src_directory}/${filename}.${OPT_LOWER}.cpp")
           message(STATUS "Using overrided ${OPT} source: ${src_directory}/${filename}.${OPT_LOWER}.cpp")
         else()
           list(APPEND ${target_src_var} "${__file}")
         endif()
-      endif()
-
-      set(__declarations_str "${__declarations_str}
+
+        set(__declarations_str "${__declarations_str}
 #define CV_CPU_DISPATCH_MODE ${OPT}
 #include \"opencv2/core/private/cv_cpu_include_simd_declarations.hpp\"
 ")
-      set(__dispatch_modes "${OPT}, ${__dispatch_modes}")
+        set(__dispatch_modes "${OPT}, ${__dispatch_modes}")
+      endif()
     endforeach()

     set(__declarations_str "${__declarations_str}


Update SwiftWindowsSupport.cmake

Update SwiftWindowsSupport.cmake

Do not attempt to use a cross-compiled compiler for a foreign target.  This is not guaranteed to work (e.g. building for ARM on x64).  This at least surfaces the error properly.

--- cmake/modules/SwiftWindowsSupport.cmake
+++ cmake/modules/SwiftWindowsSupport.cmake
@@ -81,7 +81,7 @@
 # NOTE(compnerd) we use a macro here as this modifies global variables
 macro(swift_swap_compiler_if_needed target)
   if(NOT CMAKE_C_COMPILER_ID MATCHES Clang)
-    if(CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME)
+    if(CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
       if(SWIFT_BUILT_STANDALONE)
         get_target_property(CLANG_LOCATION clang LOCATION)
         get_filename_component(CLANG_LOCATION ${CLANG_LOCATION} DIRECTORY)