r9406/sofa : ADD: the name of a plugin is now automatically deduced from the name of it's parent folder. For plugins containing more than one project, we should use the same convention as in the "Compliant" plugin, repeating the name of the plugin in the name of its subprojects (for readability purpose but we can use a complete different name if needed), for instance :
> Compliant
  / CompliantLib
  / CompliantRun
  / CompliantTest
But for all these projects we generate only one cmake option (here PLUGIN_COMPLIANT) to easily enable or disable the plugin projects

Former-commit-id: a608167f38308d4e191d6696e8c3f586e219f940

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -14,24 +14,40 @@
 	set(compilerDefines)

 	# plugins (auto-search)
-	file(GLOB pluginPathes "${SOFA_APPLICATIONS_PLUGINS_DIR}/*")
-	foreach(pluginPath ${pluginPathes})
-		if(IS_DIRECTORY ${pluginPath} AND EXISTS ${pluginPath}/CMakeLists.txt)
-			file(RELATIVE_PATH pluginOriginalName ${SOFA_APPLICATIONS_PLUGINS_DIR} ${pluginPath})
-			string(TOUPPER ${pluginOriginalName} pluginName)
-			option("PLUGIN_${pluginName}" "Enable plugin ${pluginOriginalName}" OFF)
-			RegisterDependencies(${pluginOriginalName} OPTION "PLUGIN_${pluginName}" COMPILE_DEFINITIONS "SOFA_HAVE_PLUGIN_${pluginName}" PATH "${pluginPath}")
+	file(GLOB pluginDirs "${SOFA_APPLICATIONS_PLUGINS_DIR}/*")
+	foreach(pluginDir ${pluginDirs})
+		if(IS_DIRECTORY ${pluginDir})
+			get_filename_component(pluginName ${pluginDir} NAME)
+			string(TOUPPER ${pluginName} pluginToUpperName)
+			file(GLOB_RECURSE pluginPathes "${pluginDir}/*CMakeLists.txt") # WARNING: this wildcard expression can catch "example/badCMakeLists.txt"
+			if(NOT pluginPathes STREQUAL "")
+				option("PLUGIN_${pluginToUpperName}" "Enable plugin ${pluginProjectName}" OFF)
+				foreach(pluginPath ${pluginPathes})
+					get_filename_component(projectFilename ${pluginPath} NAME)
+					string(REPLACE "/${projectFilename}" "" pluginFolder ${pluginPath})
+					get_filename_component(pluginProjectName ${pluginFolder} NAME)
+					RegisterDependencies(${pluginProjectName} OPTION "PLUGIN_${pluginToUpperName}" COMPILE_DEFINITIONS "SOFA_HAVE_PLUGIN_${pluginToUpperName}" PATH "${pluginFolder}")
+				endforeach()
+			endif()
 		endif()
 	endforeach()

 	# dev-plugins (auto-search)
-	file(GLOB devPluginPathes "${SOFA_APPLICATIONS_DEV_PLUGINS_DIR}/*")
-	foreach(devPluginPath ${devPluginPathes})
-		if(IS_DIRECTORY ${devPluginPath} AND EXISTS ${devPluginPath}/CMakeLists.txt)
-			file(RELATIVE_PATH devPluginOriginalName ${SOFA_APPLICATIONS_DEV_PLUGINS_DIR} ${devPluginPath})
-			string(TOUPPER ${devPluginOriginalName} devPluginName)
-			option("PLUGIN-DEV_${devPluginName}" "Enable dev plugin ${devPluginOriginalName}" OFF)
-			RegisterDependencies(${devPluginOriginalName} OPTION "PLUGIN-DEV_${devPluginName}" COMPILE_DEFINITIONS "SOFA_HAVE_DEVPLUGIN_${devPluginName}" PATH "${devPluginPath}")
+	file(GLOB devPluginDirs "${SOFA_APPLICATIONS_DEV_PLUGINS_DIR}/*")
+	foreach(devPluginDir ${devPluginDirs})
+		if(IS_DIRECTORY ${devPluginDir})
+			get_filename_component(devPluginName ${devPluginDir} NAME)
+			string(TOUPPER ${devPluginName} devPluginToUpperName)
+			file(GLOB_RECURSE devPluginPathes "${devPluginDir}/*CMakeLists.txt") # WARNING: this wildcard expression can catch "example/badCMakeLists.txt"
+			if(NOT devPluginPathes STREQUAL "")
+				option("PLUGIN-DEV_${devPluginToUpperName}" "Enable dev plugin ${devPluginProjectName}" OFF)
+				foreach(pluginPath ${pluginPathes})
+					get_filename_component(devProjectFilename ${pluginPath} NAME)
+					string(REPLACE "/${devProjectFilename}" "" devPluginFolder ${pluginPath})
+					get_filename_component(devPluginProjectName ${devPluginFolder} NAME)
+					RegisterDependencies(${devPluginProjectName} OPTION "PLUGIN-DEV_${devPluginToUpperName}" COMPILE_DEFINITIONS "SOFA_HAVE_DEVPLUGIN_${devPluginToUpperName}" PATH "${devPluginFolder}")
+				endforeach()
+			endif()
 		endif()
 	endforeach()


Better RPM dependencies (to TBB)

Better RPM dependencies (to TBB)

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -175,7 +175,7 @@
     SET(OSPLIB_REQS "embree-lib >= ${EMBREE_VERSION_REQUIRED}")
     OSPRAY_CONFIGURE_TASKING_SYSTEM() # for OSPRAY_TASKING_SYSTEM
     IF(${OSPRAY_TASKING_SYSTEM} STREQUAL "TBB")
-      SET(OSPLIB_REQS "${OSPLIB_REQS}, tbb >= 3.0")
+      SET(OSPLIB_REQS "${OSPLIB_REQS}, tbb >= ${TBB_VERSION_REQUIRED}")
     ENDIF()
     IF(CMAKE_VERSION VERSION_LESS "3.4.0")
       OSPRAY_WARN_ONCE(RPM_PACKAGING "You need at least v3.4.0 of CMake for generating RPMs")
@@ -186,6 +186,9 @@
       SET(CPACK_RPM_lib_PACKAGE_REQUIRES ${OSPLIB_REQS})
       SET(CPACK_RPM_apps_PACKAGE_REQUIRES "ospray-lib >= ${OSPRAY_VERSION}")
       SET(CPACK_RPM_devel_PACKAGE_REQUIRES "ospray-lib = ${OSPRAY_VERSION}, ispc >= ${ISPC_VERSION_REQUIRED}")
+      IF(${OSPRAY_TASKING_SYSTEM} STREQUAL "TBB")
+        SET(CPACK_RPM_devel_PACKAGE_REQUIRES "${CPACK_RPM_devel_PACKAGE_REQUIRES}, tbb-devel >= ${TBB_VERSION_REQUIRED}")
+      ENDIF()
       SET(CPACK_RPM_mpi_PACKAGE_REQUIRES "ospray-lib = ${OSPRAY_VERSION}")
     ENDIF()


Set CONFIG_GCC correctly in the cmake build.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: I70539530b5db7f971928706122626d524a8fae61

--- build/cmake/aom_configure.cmake
+++ build/cmake/aom_configure.cmake
@@ -112,6 +112,10 @@
   # Flag(s) added here negate CMake defaults and produce build output similar
   # to the existing configure/make build system.
   add_compiler_flag_if_supported("-Wno-unused-function")
+
+  if (CMAKE_C_COMPILER_ID MATCHES "GNU\|Clang")
+    set(CONFIG_GCC 1)
+  endif ()
 endif ()

 # Test compiler support.


Enable position independent code property to avoid the error: relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a shared object

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -20,6 +20,9 @@
     set(CMAKE_DEBUG_POSTFIX "_d_s")
     set(CMAKE_RELEASE_POSTFIX "_s")
 endif()
+
+# Enable position independent code property
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)

 # Check if compiler support the c++17 standard
 include(CheckCXXCompilerFlag)


Make necessary changes in CMake so that the Direct3D 11 Renderer is built by default if and only if the necessary DirectX support is available.

--- cmake/FindDirectXSDK.cmake
+++ cmake/FindDirectXSDK.cmake
@@ -8,7 +8,11 @@
 if (MINGW)

     set (DIRECTXSDK_FOUND TRUE)
-    set (DIRECTXSDK_MAX_D3D 11)
+    if( MINGW_W64_FOUND AND (MINGW_W64_VER_MAJOR LESS 4) )
+        set( DIRECTXSDK_MAX_D3D 10 )
+    else()
+        set (DIRECTXSDK_MAX_D3D 11)
+    endif()

 else ()


add config path to error message when available (fix #288)

--- cmake/catkin_package.cmake
+++ cmake/catkin_package.cmake
@@ -149,7 +149,11 @@
     if(${depend_name}_FOUND)
       # verify that these packages are really catkin packages
       if(NOT ${depend_name}_FOUND_CATKIN_PROJECT)
-        message(FATAL_ERROR "catkin_package() CATKIN_DEPENDS on '${depend_name}' which is not a catkin package")
+        if(DEFINED ${depend_name}_CONFIG)
+          message(FATAL_ERROR "catkin_package() CATKIN_DEPENDS on '${depend_name}', which has been found in '${${depend_name}_CONFIG}', but it is not a catkin package")
+        else()
+          message(FATAL_ERROR "catkin_package() CATKIN_DEPENDS on '${depend_name}', but it is not a catkin package")
+        endif()
       endif()
       if(catkin_ALL_FOUND_COMPONENTS)
         list(FIND catkin_ALL_FOUND_COMPONENTS ${depend_name} _index)


Eliminate the impact on incremental compilation (#21410)

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -60,12 +60,10 @@
     CONFIGURE_COMMAND     ""
     BUILD_COMMAND         ""
     UPDATE_COMMAND        ""
-    INSTALL_COMMAND       ""
+    INSTALL_COMMAND       ${CMAKE_COMMAND} -E copy_directory ${MKLML_SOURCE_DIR}/include ${MKLML_INC_DIR} &&
+			  ${CMAKE_COMMAND} -E copy_directory ${MKLML_SOURCE_DIR}/lib ${MKLML_LIB_DIR}
 )

-add_custom_command(TARGET ${MKLML_PROJECT} POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${MKLML_SOURCE_DIR}/include ${MKLML_INC_DIR}
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${MKLML_SOURCE_DIR}/lib ${MKLML_LIB_DIR})

 INCLUDE_DIRECTORIES(${MKLML_INC_DIR})


bump argon version (#348)

bump argon version (#348)

--- cmake/external_argon.cmake
+++ cmake/external_argon.cmake
@@ -30,7 +30,17 @@
 if (NGRAPH_ARGON_ENABLE)
     # Repository
     set(ARGON_CMAKE_GIT_REPOSITORY git@github.com:NervanaSystems/argon-transformer.git)
-    set(ARGON_CMAKE_GIT_TAG yixing/reverse-build)
+
+    # Set argon_transformer tag
+    # Notes:
+    # - Before we have ngraph CI job for argon transformer, ngraph master might not be
+    #   compatible with argon transformer. To ensure compatibility, checkout the ngraph commit point
+    #   where the following `ARGON_CMAKE_GIT_TAG` is set and build ngraph with argon using this
+    #   commit.
+    # - After we have ngraph CI job for argon transformer, ngraph master will be compatible with
+    #   argon transformer guaranteed by CI.
+    set(ARGON_CMAKE_GIT_TAG ec0b55008755b4d18474ac50216ef8cbf0f11598) # Tue Jan 2 2018
+
     set(ARGON_CMAKE_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/argon)
     if (NOT DEFINED PREBUILD_ARGON_PATH)
         set(PREBUILD_ARGON_PATH "")


Fix CMake code to work with older cmake version, such as 2.6.2

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -40,17 +40,23 @@
     IF(CMAKE_GENERATOR MATCHES "Visual Studio")
       STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
     ENDIF()
-    IF(ARG_COMPONENT STREQUAL "Server" AND (target MATCHES "mysqld" OR type MATCHES "MODULE"))
-      #MESSAGE("PDB: ${targets}")
-      SET(comp Server)
-    ELSEIF(ARG_COMPONENT MATCHES Development
-      OR ARG_COMPONENT MATCHES SharedLibraries
-      OR ARG_COMPONENT MATCHES Embedded)
-
-      SET(comp Debuginfo)
-    ELSE()
-      SET(comp Debuginfo_archive_only) # not in MSI
-    ENDIF()
+    IF(ARG_COMPONENT STREQUAL "Server")
+      IF(target MATCHES "mysqld" OR type MATCHES "MODULE")
+        #MESSAGE("PDB: ${targets}")
+        SET(comp Server)
+      ENDIF()
+    ENDIF()
+
+    IF(NOT comp MATCHES Server)
+      IF(ARG_COMPONENT MATCHES Development
+        OR ARG_COMPONENT MATCHES SharedLibraries
+        OR ARG_COMPONENT MATCHES Embedded)
+        SET(comp Debuginfo)
+      ELSE()
+        SET(comp Debuginfo_archive_only) # not in MSI
+      ENDIF()
+    ENDIF()
+
     INSTALL(FILES ${pdb_location} DESTINATION ${ARG_INSTALL_LOCATION} COMPONENT ${comp})
   ENDFOREACH()
   ENDIF()


Try to avoid searching for dependencies twice

Refactor lcm_option to require its dependency immediately if the option
is ON (e.g. a second run after the user has used ccmake or cmake-gui),
and to not search again if the dependency is already found.

--- lcm-cmake/functions.cmake
+++ lcm-cmake/functions.cmake
@@ -10,7 +10,15 @@

 #------------------------------------------------------------------------------
 macro(lcm_option NAME DOCSTRING TEST)
-  find_package(${ARGN})
+  # Look for the dependency; if the option already exists and is ON, go ahead
+  # and require it, otherwise just see if we find it
+  if(DEFINED ${NAME} AND ${NAME})
+    find_package(${ARGN} REQUIRED)
+  else()
+    find_package(${ARGN})
+  endif()
+
+  # Create the option; ON by default if the dependency is found, otherwise OFF
   if(${TEST})
     set(_${NAME}_DEFAULT ON)
   else()
@@ -18,7 +26,10 @@
   endif()
   option(${NAME} ${DOCSTRING} ${_${NAME}_DEFAULT})
   unset(_${NAME}_DEFAULT)
-  if(${NAME})
+
+  # If the option is ON and we didn't already find the dependency, require it
+  # now
+  if(${NAME} AND NOT ${TEST})
     find_package(${ARGN} REQUIRED)
   endif()
 endmacro()


cmake: Remove leftover parameter.

cmake: Remove leftover parameter.

Signed-off-by: Tim 'mithro' Ansell <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@mith.ro>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -287,7 +287,6 @@
     NAME ${DEFINE_DEVICE_TYPE_ARCH}_${DEFINE_DEVICE_TYPE_DEVICE_TYPE}_arch_merged
     FILE ${DEFINE_DEVICE_TYPE_ARCH_XML}
     OUTPUT ${DEVICE_MERGED_FILE}
-    DIR ${OUT_DEVICE_DIR}
   )

   append_file_dependency(SPECIALIZE_CARRYCHAINS_DEPS ${DEVICE_MERGED_FILE})


bugfix to embree-config.cmake, embree library is now called embree3

--- common/cmake/package.cmake
+++ common/cmake/package.cmake
@@ -94,11 +94,11 @@

 # why does this have to be so complicated...
 IF (WIN32)
-  SET(EMBREE_LIBRARY_NAME ${CMAKE_IMPORT_LIBRARY_PREFIX}embree${CMAKE_IMPORT_LIBRARY_SUFFIX})
+  SET(EMBREE_LIBRARY_NAME ${CMAKE_IMPORT_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}${CMAKE_IMPORT_LIBRARY_SUFFIX})
 ELSEIF (APPLE)
-  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree.${EMBREE_CONFIG_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX})
-ELSE()
-  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${CMAKE_SHARED_LIBRARY_SUFFIX}.${EMBREE_CONFIG_VERSION})
+  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}.${EMBREE_CONFIG_VERSION}${CMAKE_SHARED_LIBRARY_SUFFIX})
+ELSE()
+  SET(EMBREE_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}embree${EMBREE_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX}.${EMBREE_CONFIG_VERSION})
 ENDIF()

 IF (WIN32 OR EMBREE_ZIP_MODE)
@@ -128,7 +128,7 @@
 #SET(CPACK_PACKAGE_ICON ${PROJECT_SOURCE_DIR}/embree-doc/images/icon.png)
 #SET(CPACK_PACKAGE_RELOCATABLE TRUE)
 SET(CPACK_STRIP_FILES TRUE) # do not disable, stripping symbols is important for security reasons
-SET(CMAKE_STRIP "${PROJECT_SOURCE_DIR}/scripts/strip.sh") # needs this to properly strip under MacOSX
+SET(CMAKE_STRIP "${PROJECT_SOURCE_DIR}/scripts/strip.sh") # need this to properly strip under MacOSX

 SET(CPACK_PACKAGE_VERSION_MAJOR ${EMBREE_VERSION_MAJOR})
 SET(CPACK_PACKAGE_VERSION_MINOR ${EMBREE_VERSION_MINOR})


x11_egl: use quotes to include glesv1_cm directories am: f5e7ab6b79
am: 8f736c4099

Change-Id: I1ed036b76748718ad559de0506edc2dd9aab0847

--- targets/x11_egl/x11_egl.cmake
+++ targets/x11_egl/x11_egl.cmake
@@ -38,7 +38,7 @@
 if (GLES1_LIBRARIES)
 	set(DEQP_SUPPORT_GLES1	ON)
 	set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARIES})
-	set(CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS})
+	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS}")
 	if ("${PKG_GLES1_INCLUDE_DIRS}" STREQUAL "")
 		# PKG_GLES1_INCLUDE_DIRS empty, see if matching include
 		# path (GLES/gl.h) exists beside library directory


Output OpenMesh Build type in cmake header printout

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@632 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGOutput.cmake
+++ cmake/ACGOutput.cmake
@@ -29,6 +29,7 @@
     acg_color_message ("${_escape}[40;37m*                                                          *${_escape}[0m")
     acg_color_message ("${_escape}[40;37m* Package : ${_escape}[32m${_project} ${_escape}[37m      *${_escape}[0m")
     acg_color_message ("${_escape}[40;37m* Version : ${_escape}[32m${_version} ${_escape}[37m      *${_escape}[0m")
+    acg_color_message ("${_escape}[40;37m* Type    : ${_escape}[32m${CMAKE_BUILD_TYPE} ${_escape}[37m                                         *${_escape}[0m")
     acg_color_message ("${_escape}[40;37m************************************************************${_escape}[0m")
 endfunction ()


MAINT: don't include source files in the debug package to avoid package clashing.

--- cmake/DOInstall.cmake
+++ cmake/DOInstall.cmake
@@ -3,30 +3,33 @@
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

-# Eigen 3
-do_message("Installing Eigen")
-install(DIRECTORY ${DO_ThirdParty_DIR}/eigen/Eigen
-        DESTINATION include
-        COMPONENT Eigen3)
-set(CPACK_COMPONENT_Eigen3_REQUIRED 1)
+# Install the sources.
+if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
+  # Eigen 3
+  do_message("Installing Eigen")
+  install(DIRECTORY ${DO_ThirdParty_DIR}/eigen/Eigen
+    DESTINATION include
+    COMPONENT Eigen3)
+  set(CPACK_COMPONENT_Eigen3_REQUIRED 1)

-# DO++ source files
-install(FILES ${DO_DIR}/COPYING.README
-              ${DO_DIR}/COPYING.MPL2
-        DESTINATION share/DO/Sara
-        COMPONENT Sources)
-install(DIRECTORY ${DO_DIR}/cmake
-        DESTINATION share/DO/Sara
-        COMPONENT Sources)
-install(DIRECTORY ${DO_DIR}/src/DO
-        DESTINATION include/
-        COMPONENT Sources)
-install(FILES ${DO_SOURCE_DIR}/Defines.hpp
-        DESTINATION include/DO/Sara
-        COMPONENT Sources)
-set(CPACK_COMPONENT_Sources_REQUIRED 1)
+  # DO-Sara source files
+  install(FILES ${DO_DIR}/COPYING.README
+    ${DO_DIR}/COPYING.MPL2
+    DESTINATION share/DO/Sara
+    COMPONENT Sources)
+  install(DIRECTORY ${DO_DIR}/cmake
+    DESTINATION share/DO/Sara
+    COMPONENT Sources)
+  install(DIRECTORY ${DO_DIR}/src/DO
+    DESTINATION include/
+    COMPONENT Sources)
+  install(FILES ${DO_SOURCE_DIR}/Defines.hpp
+    DESTINATION include/DO/Sara
+    COMPONENT Sources)
+  set(CPACK_COMPONENT_Sources_REQUIRED 1)
+endif ()

-# DO++ component libraries
+# DO-Sara component libraries
 foreach (component ${DO_COMPONENTS})
   do_message("Installing DO.${component}")
   include(${DO_${component}_USE_FILE})


Fixed FindDXSDK to prefer more recent D3DCompile

The most up-to-date version of the HLSL compiler is now shipped as part
of the Windows SDK. Previously, the HLSL compiler was included with
the DirectX SDK.

There is more that we can do to improve this cmake module, but this
makes it more likely to find the correct tool.

--- cmake/FindDXSDK.cmake
+++ cmake/FindDXSDK.cmake
@@ -42,9 +42,9 @@
             "$ENV{DXSDK_LOCATION}/Include"
             "${DXSDK_ROOT}/Include"
             "$ENV{DXSDK_ROOT}/Include"
+            "C:/Program Files (x86)/Windows Kits/8.1/Include/um"
             "C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
             "C:/Program Files/Microsoft DirectX SDK*/Include"
-            "C:/Program Files (x86)/Windows Kits/8.1/Include/um"
     )

     if ("${CMAKE_GENERATOR}" MATCHES "[Ww]in64")
@@ -60,9 +60,9 @@
             "$ENV{DXSDK_LOCATION}/Lib/${ARCH}"
             "${DXSDK_ROOT}/Lib/${ARCH}"
             "$ENV{DXSDK_ROOT}/Lib/${ARCH}"
+            "C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/${ARCH}"
             "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/${ARCH}"
             "C:/Program Files/Microsoft DirectX SDK*/Lib/${ARCH}"
-            "C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/${ARCH}"
     )

     set(DXSDK_LIBRARY_DIR ${LIBRARY_DIR})


find also the glibconfig.h which is under a really strange location on windows

--- cmake/FindGLIB2.cmake
+++ cmake/FindGLIB2.cmake
@@ -26,7 +26,7 @@
              PATHS ${PKG_GLIB_LIBRARY_DIRS} )

 find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
-          PATH_SUFFIXES glib-2.0/include
+          PATH_SUFFIXES glib-2.0/include ../lib/glib-2.0/include
           PATHS ${PKG_GLIB_INCLUDE_DIRS} ${PKG_GLIB_LIBRARIES} ${CMAKE_SYSTEM_LIBRARY_PATH})

 set(GLIB2_INCLUDE_DIR ${GLIB2_MAIN_INCLUDE_DIR})


try no backslash

try no backslash

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -264,10 +264,15 @@
     SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${lib_root})
     ADD_DEPENDENCIES(${lib_name} ${lib_src} ${lib_h})

+    set(dest_ "lib/cyclus")
+    if (inst_dir)
+      set(dest_ "${dest_}/${inst_dir}")
+    endif()
+
     # install library
     INSTALL(
         TARGETS ${lib_name}
-        LIBRARY DESTINATION lib/cyclus/${inst_dir}
+        LIBRARY DESTINATION "${dest_}"
         COMPONENT ${lib_name}
         )
     SET(${lib_name}_LIB ${lib_name} CACHE INTERNAL "Agent library alias." FORCE)


Bugfix

Bugfix

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30871 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -346,11 +346,6 @@
 #                                                                      #
 ########################################################################

-#
-# We submit Build and Regression Tests to subprojects according to the svn
-# branch:
-#
-
 IF(NOT "${_branch}" STREQUAL "")
   SET_PROPERTY(GLOBAL PROPERTY SubProject ${_branch})
 ENDIF()
@@ -358,10 +353,8 @@
 CTEST_START(Experimental TRACK ${TRACK})

 CTEST_CONFIGURE(OPTIONS "${_options}")
-CTEST_SUBMIT(PARTS Notes Configure)

 CTEST_BUILD(TARGET) # run all target
-CTEST_SUBMIT(PARTS Build)

 # TODO: Run this during the BUILD stage...
 EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
@@ -369,4 +362,4 @@
   )

 CTEST_TEST()
-CTEST_SUBMIT(PARTS Test)
+CTEST_SUBMIT()


Fixing gflags static link

Fixing gflags static link

Former-commit-id: c11df1f6e1bae765f8de32c18240349050f9c8f2

--- cmake-modules/Fetch_Ceres.cmake
+++ cmake-modules/Fetch_Ceres.cmake
@@ -33,7 +33,7 @@
     ### Compiler-dependent flags ###
     ################################
     if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
-        set(FLAGS "${FLAGS}  -v --gcc-toolchain=${GCC_TOOLCHAIN} -stdlib=libstdc++")
+        set(FLAGS "${FLAGS} -static -v --gcc-toolchain=${GCC_TOOLCHAIN} -stdlib=libstdc++")
     endif()
     set(FLAGS "${FLAGS} -I${GLOG_INCLUDE_DIR} -L${GLOG_LIBRARY_DIR} -I${GFLAGS_INCLUDE_DIR}  -L${GFLAGS_LIBRARY_DIR}")


Set WORKING_DIRECTORY in custom_targets. We've to be in source dir, not build.

--- cmake/CppStyleGuideChecks.cmake
+++ cmake/CppStyleGuideChecks.cmake
@@ -15,14 +15,17 @@
   if (${CLANG_FORMAT_FOUND})
     add_custom_target(${make_target_id}
       COMMAND ${BUILD_SUPPORT_DIR}/run-clang-format.sh ${CMAKE_CURRENT_SOURCE_DIR} ${CLANG_FORMAT_BIN} 1 `${get_files_cmd} ${PROJECT_SOURCE_DIR}`
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
       COMMENT "Run clang-format on selected files and update them in-place")

     add_custom_target(show-${make_target_id}
       COMMAND ${BUILD_SUPPORT_DIR}/run-clang-format.sh ${CMAKE_CURRENT_SOURCE_DIR} ${CLANG_FORMAT_BIN} 2 `${get_files_cmd} ${PROJECT_SOURCE_DIR}`
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
       COMMENT "Run clang-format on selected files and display differences")

     add_custom_target(check-${make_target_id}
       COMMAND ${BUILD_SUPPORT_DIR}/run-clang-format.sh ${CMAKE_CURRENT_SOURCE_DIR} ${CLANG_FORMAT_BIN} 0 `${get_files_cmd} ${PROJECT_SOURCE_DIR}`
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
       COMMENT "Run clang-format on selected files. Fails if any file needs to be reformatted")
   endif()
 endfunction(add_clang_format_target)
@@ -32,17 +35,20 @@
   if (${CLANG_TIDY_FOUND})
     add_custom_target(${make_target_id}
       COMMAND ${BUILD_SUPPORT_DIR}/run-clang-tidy.sh ${CLANG_TIDY_BIN} ${clang_tidy_header_helper}  ${CMAKE_BINARY_DIR}/compile_commands.json 1
-              `${get_files_cmd}  ${PROJECT_SOURCE_DIR} | grep -v -F -f ${PROJECT_SOURCE_DIR}/.clang-tidy-ignore`
+              `${get_files_cmd} ${PROJECT_SOURCE_DIR} | grep -v -F -f ${PROJECT_SOURCE_DIR}/.clang-tidy-ignore`
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
       COMMENT "Run clang-tidy on selected files and attempt to fix any warning automatically")

     add_custom_target(show-${make_target_id}
       COMMAND ${BUILD_SUPPORT_DIR}/run-clang-tidy.sh ${CLANG_TIDY_BIN} ${clang_tidy_header_helper} ${CMAKE_BINARY_DIR}/compile_commands.json 2
               `${get_files_cmd} ${PROJECT_SOURCE_DIR} | grep -v -F -f ${PROJECT_SOURCE_DIR}/.clang-tidy-ignore`
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
       COMMENT "Run clang-tidy on selected files and display errors.")

     add_custom_target(check-${make_target_id}
       COMMAND ${BUILD_SUPPORT_DIR}/run-clang-tidy.sh ${CLANG_TIDY_BIN} ${clang_tidy_header_helper} ${CMAKE_BINARY_DIR}/compile_commands.json 0
               `${get_files_cmd} ${PROJECT_SOURCE_DIR} | grep -v -F -f ${PROJECT_SOURCE_DIR}/.clang-tidy-ignore`
+      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
       COMMENT "Run clang-tidy on selected files. Fails if errors are found.")
   endif()
 endfunction(add_clang_tidy_target)
@@ -50,12 +56,14 @@
 function(add_cpplint_target make_target_id get_files_cmd)
   add_custom_target(${make_target_id}
     COMMAND ${BUILD_SUPPORT_DIR}/cpplint/runCppLint.sh `${get_files_cmd} ${PROJECT_SOURCE_DIR}`
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     COMMENT "Run cpplint on selected files. Fails if errors are found.")
 endfunction(add_cpplint_target)

 if (GIT_FOUND)
   add_custom_target(fetch-master
     COMMAND git fetch origin master
+    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
     COMMENT "Fetch latest changes from origin master. If you forked the project,
        make sure that it is synchronized with the biodynamo repository!")

@@ -79,6 +87,6 @@
              Failing tests and issues from cpplint must be fixed manually.")
 endif()

-add_clang_format_target(format-all "${ALL_SRC_FILES}" )
-add_clang_tidy_target(tidy-all "${ALL_SRC_FILES}" )
-add_cpplint_target(check-cpplint-all "${ALL_SRC_FILES}" )
+add_clang_format_target(format-all "${ALL_SRC_FILES}")
+add_clang_tidy_target(tidy-all "${ALL_SRC_FILES}")
+add_cpplint_target(check-cpplint-all "${ALL_SRC_FILES}")


fix 2 for xlink local cmake

fix 2 for xlink local cmake

- fixes luxonis/depthai-core#272
- replaces PR #298

--- cmake/depthaiDependencies.cmake
+++ cmake/depthaiDependencies.cmake
@@ -54,15 +54,13 @@
 find_package(nlohmann_json ${_QUIET} CONFIG REQUIRED)

 # XLink
-if(DEPTHAI_XLINK_LOCAL)
+if(DEPTHAI_XLINK_LOCAL AND (NOT CONFIG_MODE))
     set(_BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}")
     set(BUILD_SHARED_LIBS OFF)
     add_subdirectory("${DEPTHAI_XLINK_LOCAL}" ${CMAKE_CURRENT_BINARY_DIR}/XLink)
     set(BUILD_SHARED_LIBS "${_BUILD_SHARED_LIBS_SAVED}")
     unset(_BUILD_SHARED_LIBS_SAVED)
-    if(NOT BUILD_SHARED_LIBS)
-        list(APPEND targets_to_export XLink)
-    endif()
+    list(APPEND targets_to_export XLink)
 else()
     find_package(XLink ${_QUIET} CONFIG REQUIRED)
 endif()


Lua "5.1.5-p2"

Lua "5.1.5-p2"

--- cmake/projects/Lua/hunter.cmake
+++ cmake/projects/Lua/hunter.cmake
@@ -54,6 +54,18 @@
     5387f5408ce189b2b34741ab4b28c0936b6bcbe3
 )

+# NOTE: Test '5.1.*' version with 'toluapp' package (!)
+hunter_add_version(
+    PACKAGE_NAME
+    Lua
+    VERSION
+    "5.1.5-p2"
+    URL
+    "https://github.com/hunter-packages/lua/archive/v5.1.5-p2.tar.gz"
+    SHA1
+    cc804e53073686f31f59629dbc964538c60be521
+)
+
 hunter_cacheable(Lua)
 hunter_pick_scheme(DEFAULT url_sha1_cmake)
 hunter_download(PACKAGE_NAME Lua)


Update ADD_TEST_DIRECTORY() to create test output directories.

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -836,9 +836,17 @@
       # path separator
       ADD_TEST(${TESTNAME} "${Zorba_TESTDRIVER}"
 	"--rbkt-src" "${TEST_DIR}"
+	"--rbkt-bin" "${PROJECT_BINARY_DIR}/test/rbkt"
 	"--module-path"
 	"${CMAKE_BINARY_DIR}/URI_PATH/${PATH_SEP}${DEPENDENCY_MODULE_PATH}"
 	"${TESTFILE}")
+      # Create test results output directory, if it doesn't exist
+      GET_FILENAME_COMPONENT(_bucket_path "${TESTFILE}" PATH)
+      SET (_full_bucket_path
+	"${PROJECT_BINARY_DIR}/test/rbkt/QueryResults/${_bucket_path}")
+      IF (NOT EXISTS "${_full_bucket_path}")
+	FILE (MAKE_DIRECTORY "${_full_bucket_path}")
+      ENDIF (NOT EXISTS "${_full_bucket_path}")

       # On non-Windows, call EXPECTED_FAILURE() for known crashes
       IF (${_crash_idx} GREATER -1)


corrected a typo (INCLUDE was misspelled on line 4)

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@347 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/FindTinyXml.cmake
+++ library/FindTinyXml.cmake
@@ -3,7 +3,7 @@
 GET_FILENAME_COMPONENT(SECOND_THIRD_PARTY_INCLUDE ${CMAKE_SOURCE_DIR}/../../ThirdParty ABSOLUTE)

 FIND_PATH(TINYXML_BASE tinyxml/tinyxml.h /usr/include /usr/local/include
-			${FIRST_THIRD_PARTY_INLCUDE} ${SECOND_THIRD_PARTY_INCLUDE} )
+			${FIRST_THIRD_PARTY_INCLUDE} ${SECOND_THIRD_PARTY_INCLUDE} )

 IF (TINYXML_BASE)
   SET(TINYXML_FOUND TRUE)


minor: remove dupliate line

minor: remove dupliate line

--- common/config.h.cmake
+++ common/config.h.cmake
@@ -6,7 +6,6 @@
 #cmakedefine PS_DEBUG
 #cmakedefine PS_VERBOSE_DEBUG
 #cmakedefine PS_VERBOSE
-#cmakedefine PS_DEBUG

 #endif /* PHYSIS_COMMON_CONFIG_H_ */


cmake: kconfig: sort results of new glob expressions

Similar to 2f811b79, see that commit for the explanation.

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -121,11 +121,13 @@
     idf_build_get_property(bootloader_kconfigs_proj BOOTLOADER_KCONFIGS_PROJ)

     file(GLOB kconfig "${component_dir}/Kconfig")
+    list(SORT kconfig)
     if(EXISTS "${kconfig}" AND NOT IS_DIRECTORY "${kconfig}")
         list(APPEND bootloader_kconfigs "${kconfig}")
     endif()

     file(GLOB kconfig "${component_dir}/Kconfig.projbuild")
+    list(SORT kconfig)
     if(EXISTS "${kconfig}" AND NOT IS_DIRECTORY "${kconfig}")
         list(APPEND bootloader_kconfigs_proj "${kconfig}")
     endif()


ENH: Update elastix to revision 5278

ENH: Update elastix to revision 5278

--- SuperBuild/External_Elastix.cmake
+++ SuperBuild/External_Elastix.cmake
@@ -2,7 +2,7 @@

 file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/${proj}-build/CMakeCacheInit.txt" "${ep_common_cache}" )
 set( ELASTIX_REPOSITORY http://github.com/kaspermarstal/elastix )
-set( ELASTIX_TAG 31d502ba103e56f1c878923680ca1a706f348011 )
+set( ELASTIX_TAG 90fc77940e59277300ef911ae4460017b0946e1f )

 ExternalProject_Add( ${proj}
   GIT_REPOSITORY ${ELASTIX_REPOSITORY}


Improved arch/platform detection. (3)

Improved arch/platform detection. (3)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -153,12 +153,12 @@
         set(CC_ARCH "arm")
     endif()
 endif()
-string(LENGTH "${CC_PLATFORM}" ${CC_PLATFORM_LENGTH})
-if(CC_PLATFORM_LENGTH GREATER 7)
+string(LENGTH "${CC_PLATFORM}" CC_PLATFORM_LENGTH)
+if(CC_PLATFORM_LENGTH GREATER 7 OR CC_PLATFORM_LENGTH LESS 3)
     message( FATAL_ERROR "Platform ${CC_PLATFORM} not supported.")
 endif()
-string(LENGTH "${CC_ARCH}" ${CC_ARCH_LENGTH})
-if(CC_ARCH_LENGTH GREATER 6)
+string(LENGTH "${CC_ARCH}" CC_ARCH_LENGTH)
+if(CC_ARCH_LENGTH GREATER 6 OR CC_ARCH_LENGTH LESS 3)
     message( FATAL_ERROR "Architecture ${CC_ARCH} not supported.")
 endif()
 set(CI_BUILD_NAME "${CC_NAME}-${CC_VERSION}-${CC_PLATFORM}-${CC_ARCH}")


better find

better find

--- capi/cmake/FindMantisAPI.cmake
+++ capi/cmake/FindMantisAPI.cmake
@@ -32,6 +32,7 @@
     find_library(MantisAPI_LIBRARIES NAMES MantisAPI
       PATHS
       ${CMAKE_LIB_PATH}
+      ${CMAKE_INSTALL_PREFIX}/lib
       /usr/lib
       /usr/lib/mantis
       /usr/local/lib


fixed copy and paste error

fixed copy and paste error

--- src/modules/modules.cmake
+++ src/modules/modules.cmake
@@ -49,7 +49,7 @@
   message(STATUS "adding module ${sub}")
   add_library(${sub} ${CMAKE_CURRENT_LIST_DIR}/${sub}/main.cpp)
   if(TARGET boost)
-    add_dependencies(bare boost)
+    add_dependencies(${sub} boost)
   endif(TARGET boost)
   set (INCLUDE_LIST "${INCLUDE_LIST}#include \"modules/${sub}/main.h\"\n")
   set (MODULE_LIST "${MODULE_LIST}(${sub})")


[brief] Removes debugging messages from Compiler.cmake.

[detailed]

--- config/Compiler.cmake
+++ config/Compiler.cmake
@@ -30,11 +30,9 @@
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
     set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")
 elseif(ATLAS_COMPILER_INTEL)
-    message(STATUS "Here")
     if(WIN32)
-        message(STATUS "Over here")
         add_definitions(
-            /Qdiag-disable:82,3346,3280,1879
+            /Qdiag-disable:82,3346,3280,1879,2557
             )
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
         set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /ZI")


Update CPM_Export* macros to use ARGV foreach.

--- CPM.cmake
+++ CPM.cmake
@@ -682,23 +682,29 @@
 # consumers. This is necessary for externals, and only exposes the include
 # definition to the direct consumer of the module. None of the consumer's
 # parents.
-macro(CPM_ExportAdditionalIncludeDir dir)
-  get_filename_component(tmp_src_dir ${dir} ABSOLUTE)
-  set(CPM_ADDITIONAL_INCLUDE_DIRS ${CPM_ADDITIONAL_INCLUDE_DIRS} "${tmp_src_dir}" PARENT_SCOPE)
-  set(CPM_ADDITIONAL_INCLUDE_DIRS ${CPM_ADDITIONAL_INCLUDE_DIRS} "${tmp_src_dir}")
+macro(CPM_ExportAdditionalIncludeDir)
+  foreach (item ${ARGV})
+    get_filename_component(tmp_src_dir ${item} ABSOLUTE)
+    set(CPM_ADDITIONAL_INCLUDE_DIRS ${CPM_ADDITIONAL_INCLUDE_DIRS} "${tmp_src_dir}" PARENT_SCOPE)
+    set(CPM_ADDITIONAL_INCLUDE_DIRS ${CPM_ADDITIONAL_INCLUDE_DIRS} "${tmp_src_dir}")
+  endforeach()
 endmacro()

 # This macro allows modules to expose additional definitions.
 # As with ExportAdditionalIncludeDirectory, this only exposes the definition
 # to the direct consumer of the module. None of the consumer's parents.
-macro(CPM_ExportAdditionalDefinition def)
-  set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} "${def}" PARENT_SCOPE)
-  set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} "${def}")
-endmacro()
-
-macro(CPM_ExportAdditionalLibraryTarget def)
-  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} "${def}" PARENT_SCOPE)
-  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} "${def}")
+macro(CPM_ExportAdditionalDefinition)
+  foreach (item ${ARGV})
+    set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} ${item} PARENT_SCOPE)
+    set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} ${item})
+  endforeach()
+endmacro()
+
+macro(CPM_ExportAdditionalLibraryTarget)
+  foreach (item ${ARGV})
+    set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} ${item} PARENT_SCOPE)
+    set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} ${item})
+  endforeach()
 endmacro()

 # We use this code in multiple places to check that we don't have preprocessor


Add empty string test.

Add empty string test.

--- CPM.cmake
+++ CPM.cmake
@@ -507,11 +507,13 @@
 endfunction()

 macro(_cpm_make_valid_unid_or_path variable)
-  string(REGEX REPLACE "https://github.com/" "github_" ${variable} ${${variable}})
-  string(REGEX REPLACE "http://github.com/" "github_" ${variable} ${${variable}})
-
-  string(REGEX REPLACE "/" "_" ${variable} ${${variable}})
-  string(REGEX REPLACE "[:/\\.?-]" "" ${variable} ${${variable}})
+  if (NOT "${${variable}}" STREQUAL "")
+    string(REGEX REPLACE "https://github.com/" "github_" ${variable} ${${variable}})
+    string(REGEX REPLACE "http://github.com/" "github_" ${variable} ${${variable}})
+
+    string(REGEX REPLACE "/" "_" ${variable} ${${variable}})
+    string(REGEX REPLACE "[:/\\.?-]" "" ${variable} ${${variable}})
+  endif()
 endmacro()

 macro(_cpm_obtain_version_from_params parentVar)


Nested preprocessor directives are going to be an issue.

Figuring out a way around them.

--- CPM.cmake
+++ CPM.cmake
@@ -170,38 +170,64 @@
 # If CPM_UNIQUE_ID exists then use that as the base directory for CPM.
 # Note that we are already in the parent's namespace (we are not in a
 # function), so we directly modify the appropriate GLOBAL variables.
+# This will wipe out any pre-existing include directories.
 if (DEFINED CPM_UNIQUE_ID)
   set(CPM_NS_HEADER_FILE "${CPM_DIR_OF_CPM}/include/${CPM_UNIQUE_ID}/cpm/cpm.h")
   set(CPM_INCLUDE_DIRS "${CPM_DIR_OF_CPM}/include/${CPM_UNIQUE_ID}")
+  set(CPM_PARENT_NS_DIRECTIVE "\n#define CPM_NAMESPACE\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}#define CPM_IN_PARENT_DIRECTIVE\n")
 else()
   set(CPM_NS_HEADER_FILE "${CPM_DIR_OF_CPM}/include/cpm/cpm.h")
   set(CPM_INCLUDE_DIRS "${CPM_DIR_OF_CPM}/include")
+  # We don't undefine CPM_NAMESPACE in the parent.
+  set(CPM_PARENT_NS_DIRECTIVE "\n                          #define CPM_IN_PARENT_DIRECTIVE\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}  #define CPM_NAMESPACE \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}    #ifndef ${CPM_UNIQUE_ID}##_cpm_def \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}      #define ${CPM_UNIQUE_ID}##_cpm_def \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}      namespace ${CPM_UNIQUE_ID} { \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}    #else \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}      #undef ${CPM_UNIQUE_ID}##_cpm_def \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}      } \\\n")
+  set(CPM_PARENT_NS_DIRECTIVE "${CPM_PARENT_NS_DIRECTIVE}    #endif \n")
 endif()
+
+function(_cpm_write_include_header incFile uniqueID)
+  file(APPEND ${incFile} "// This file was automatically generated by CPM.\n")
+  file(APPEND ${incFile} "// It includes all automatically generated namespaces.\n\n")
+  #file(APPEND ${CPM_NS_HEADER_FILE} "#ifndef __CPM__CPM__HEADER_H_\n")
+  #file(APPEND ${CPM_NS_HEADER_FILE} "#define __CPM__CPM__HEADER_H_\n\n")
+  file(APPEND ${incFile} "#ifndef CPM_NAMESPACE_NAME\n")
+  # We are either a top level.
+  # Define a dummy namespace preprocessor definition
+  # that will undefine CPM_NAMESPACE when a second occurance appears.
+  file(APPEND ${incFile} "  #define CPM_NAMESPACE \\\n")
+  file(APPEND ${incFile} "    #ifndef ${uniqueID}_cpm_def \\\n")
+  file(APPEND ${incFile} "      #define ${uniqueID}_cpm_def \\\n")
+  file(APPEND ${incFile} "    #else \\\n")
+  file(APPEND ${incFile} "      #undef CPM_NAMESPACE \\\n")
+  file(APPEND ${incFile} "      #undef ${uniqueID}_cpm_def \\\n")
+  file(APPEND ${incFile} "    #endif \n")
+  file(APPEND ${incFile} ${CPM_PARENT_NS_DIRECTIVE})
+  file(APPEND ${incFile} "#else\n")
+  file(APPEND ${incFile} "  #undef CPM_NAMESPACE\n")
+  file(APPEND ${incFile} "")
+  file(APPEND ${incFile} "  #define CPM_NAMESPACE \\\n")
+  file(APPEND ${incFile} "    #ifndef CPM_NAMESPACE_NAME##_def \\\n")
+  file(APPEND ${incFile} "      #define CPM_NAMESPACE_NAME##_def \\\n")
+  file(APPEND ${incFile} "      namespace CPM_NAMESPACE_NAME { \\\n")
+  file(APPEND ${incFile} "    #else \\\n")
+  file(APPEND ${incFile} "      #undef CPM_NAMESPACE \\\n")
+  file(APPEND ${incFile} "      #undef CPM_NAMESPACE_NAME##_def \\\n")
+  file(APPEND ${incFile} "      #define CPM_NAMESPACE #error CPM_NAMESPACE not defined here.\\\n")
+  file(APPEND ${incFile} "      } \\\n")
+  file(APPEND ${incFile} "    #endif\n")
+  file(APPEND ${incFile} "#endif\n\n")
+  #file(APPEND ${CPM_NS_HEADER_FILE} "#endif\n")
+endfunction()

 # Delete old cpm header file and begin constructing a new one.
 file(REMOVE ${CPM_NS_HEADER_FILE})
-file(APPEND ${CPM_NS_HEADER_FILE} "// This file was automatically generated by CPM.\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "// It includes all automatically generated namespaces.\n\n")
-#file(APPEND ${CPM_NS_HEADER_FILE} "#ifndef __CPM__CPM__HEADER_H_\n")
-#file(APPEND ${CPM_NS_HEADER_FILE} "#define __CPM__CPM__HEADER_H_\n\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "#ifndef CPM_NAMESPACE_NAME\n")
-# Define a dummy namespace preprocessor definition
-# that will undefine CPM_NAMESPACE when a second occurance appears.
-file(APPEND ${CPM_NS_HEADER_FILE} "  #define CPM_NAMESPACE\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "#else\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "  #undef CPM_NAMESPACE\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "  #define CPM_NAMESPACE \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "    #ifndef CPM_NAMESPACE_NAME##_def \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "      #define CPM_NAMESPACE_NAME##_def \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "      namespace CPM_NAMESPACE_NAME { \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "    #else \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "      #undef CPM_NAMESPACE \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "      #undef CPM_NAMESPACE_NAME##_def \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "      #define CPM_NAMESPACE #error CPM_NAMESPACE not defined here.\\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "      } \\\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "    #endif\n")
-file(APPEND ${CPM_NS_HEADER_FILE} "#endif\n\n")
-#file(APPEND ${CPM_NS_HEADER_FILE} "#endif\n")
+_cpm_write_include_header(${CPM_NS_HEADER_FILE})

 # Function for parsing arguments and values coming into the specified function
 # name 'f'. 'name' is the target name. 'ns' (namespace) is a value prepended


convert ccache module to yml

convert ccache module to yml

--- modules/ccache.cmake
+++ modules/ccache.cmake
@@ -10,10 +10,10 @@
 #
 #   CCACHE_FOUND
 #
-# autocmake.cfg configuration::
+# autocmake.yml configuration::
 #
-#   docopt: --ccache=<USE_CCACHE> Toggle use of ccache <ON/OFF> [default: ON].
-#   define: '-DUSE_CCACHE="{0}"'.format(arguments['--ccache'])
+#   docopt: "--ccache=<USE_CCACHE> Toggle use of ccache <ON/OFF> [default: ON]."
+#   define: "'-DUSE_CCACHE=\"{0}\"'.format(arguments['--ccache'])"

 if(USE_CCACHE)
     find_program(CCACHE_FOUND ccache)


FindNPP.cmake: added support of NPP 3.2

FindNPP.cmake: added support of NPP 3.2

--- modules/gpu/FindNPP.cmake
+++ modules/gpu/FindNPP.cmake
@@ -68,10 +68,11 @@

 # Find NPP library
 find_library(CUDA_NPP_LIBRARIES
-	NAMES npp${NPP_SUFFIX} libnpp${NPP_SUFFIX}
-	PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}/common/lib"
+	NAMES "npp" "npp${NPP_SUFFIX}" "libnpp${NPP_SUFFIX}"
+	PATHS "${CUDA_NPP_LIBRARY_ROOT_DIR}"
+	PATH_SUFFIXES "common/lib" "common/npp/lib"
 	DOC "NPP library"
-	)
+	)

 # Search default search paths, after we search our own set of paths.
 find_library(CUDA_NPP_LIBRARIES NAMES npp${NPP_SUFFIX} libnpp${NPP_SUFFIX} DOC "NPP library")


Added 64 bit check to set default install path

--- CMake/mitkSetupCPack.cmake
+++ CMake/mitkSetupCPack.cmake
@@ -22,6 +22,16 @@
     endif()
   endif()
 endif(NOT CPACK_GENERATOR)
+
+# On windows set default install directory appropriately for 32 and 64 bit
+# installers if not already set
+if(WIN32 AND NOT CPACK_NSIS_INSTALL_ROOT)
+  if(CMAKE_CL_64)
+    set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES64")
+  else()
+    set(CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
+  endif()
+endif()

 # include required mfc libraries
 include(InstallRequiredSystemLibraries)


cmake: Remove unused sparselibSetup CMake module

--- CMake/sparselibSetup.cmake
+++ CMake/sparselibSetup.cmake
@@ -1,27 +0,0 @@
-
-include_directories(${SPHARMPDM_SOURCE_DIR}/Libraries/SparseLibMVIml)
-link_directories(${SPHARMP_BINARY_DIR}/bin)
-
-# here prepared only for ISO C++ compatibles compilers
-
-# IBM xlC  v. 1.1
-# CCCFLAGS        = -DCOMPLEX=complex
-# LDFLAGS         = -lm -lcomplex
-
-# Sun C++ 4.0.1
-# CCCFLAGS        = -DMV_VECTOR_BOUNDS_CHECK -g -DCOMPLEX_OSTREAM -DCOMPLEX=complex
-# LDFLAGS         =   -lm -lcomplex
-
-# g++ v. 2.6.3
-# CCCFLAGS                =   -O5 '-DCOMPLEX=std::complex<double>'
-# LDFLAGS                 =   -lm
-
-
-if(WIN32)
-add_definitions("-DCOMPLEX=std::complex<double>")
-else()
-add_definitions('-DCOMPLEX=std::complex<double>')
-endif()
-
-link_libraries(SparseMatrixLib)
-


Update DCMQI to official v1.2.4

Update DCMQI to official v1.2.4

Summary: Update DCMQI to official v1.2.4

Test Plan: CI

Reviewers: O1 MITK Reviewer Group I, kislinsk

Reviewed By: O1 MITK Reviewer Group I, kislinsk

Differential Revision: https://phabricator.mitk.org/D492

--- CMakeExternals/DCMQI.cmake
+++ CMakeExternals/DCMQI.cmake
@@ -27,7 +27,7 @@
     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
       GIT_REPOSITORY https://github.com/QIICR/dcmqi.git
-      GIT_TAG 83f498e9
+      GIT_TAG v1.2.4
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


From Michael Platings, "I've updated the FBX plugin to use the latest version of the FBX SDK. I've checked in the plugin files myself, but I need you to check in this change to FindFBX.cmake to change the SDK directory."

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -9,7 +9,7 @@
 # correspond to the ./configure --prefix=$FBX_DIR

 IF(WIN32)
-SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2010.2" CACHE PATH "Location of FBX SDK directory")
+SET(FBX_ROOT "$ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.2" CACHE PATH "Location of FBX SDK directory")
 ELSE(WIN32)
 SET(FBX_ROOT $ENV{FBX_DIR} CACHE PATH "Location of FBX SDK directory")
 ENDIF(WIN32)


From David Callu, "Here a fix for FindFBX.cmake

under linux, library name to look for must be fbxsdk instead of libfbxsdk."

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -35,7 +35,7 @@
 IF(APPLE)
     SET(FBX_LIBNAME "libfbxsdk")
 ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(FBX_LIBNAME "libfbxsdk")
+    SET(FBX_LIBNAME "fbxsdk")
 ELSE()
     SET(FBX_LIBNAME "libfbxsdk-md")
 ENDIF()
@@ -57,7 +57,7 @@
     PATHS ${FBX_SEARCH_PATHS}
     PATH_SUFFIXES "lib/${FBX_LIBDIR}/release" "lib/${FBX_LIBDIR}")

-#Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.
+#Once one of the calls succeeds the result variable will be set and stored in the cache so that no call will search again.

 #no debug d suffix, search in debug folder only
 FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME}
@@ -66,7 +66,7 @@
 FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG}
     PATHS ${FBX_SEARCH_PATHS}
     PATH_SUFFIXES "lib/${FBX_LIBDIR}")
-
+
 IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
     SET(FBX_FOUND "YES")
 ELSE()
@@ -108,5 +108,5 @@
     ELSE()
         SET(FBX_FOUND "NO")
     ENDIF()
-
+
 ENDIF()


FindGSL.cmake: cache updated GSL_LIBS

FindGSL.cmake: cache updated GSL_LIBS

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -25,11 +25,10 @@
 pkg_check_modules(PC_GSL gsl)
 find_path(GSL_INCLUDE_DIR gsl/gsl_linalg.h HINTS ${PC_GSL_INCLUDE_DIRS})
 find_library(GSL_LIBRARY NAMES gsl HINTS ${PC_GSL_LIBRARY_DIRS} )
-find_library(GSL_LIBRARY NAMES HINTS ${PC_GSL_LIBRARY_DIRS} )

 #added gsl depends
 #BUG in OpenSuse (missing libgslcblas.so link libgsl.so)
-#if (NOT BUILD_SHARED_LIBS)
+#if (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)
 if (PC_GSL_LIBRARIES)
   list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
   foreach (LIB ${PC_GSL_LIBRARIES})
@@ -37,8 +36,9 @@
     list(APPEND GSL_LIBRARY ${GSL_${LIB}})
     unset(GSL_${LIB} CACHE)
   endforeach(LIB)
+  set(GSL_LIBRARY "${GSL_LIBRARY}" CACHE FILEPATH "lib GSL and its deps" FORCE)
 endif (PC_GSL_LIBRARIES)
-#endif (NOT BUILD_SHARED_LIBS)
+#endif (NOT BUILD_SHARED_LIBS and PC_GSL_LIBRARIES)

 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set GSL_FOUND to TRUE


Remove comments about eigen alignment

Remove comments about eigen alignment

Former-commit-id: 7493bb87b2b4ec1046881776f4eccfde41c4e69c

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -183,11 +183,11 @@
             # make Eigen infer some of the flags differently. In any case, settinc c++17 and no flags for eigen anywhere
             # lets Eigen do its thing in the same way everywhere.

-            message(STATUS "Applying special Eigen compile definitions for Tetralith: EIGEN_MAX_ALIGN_BYTES=16")
+#            message(STATUS "Applying special Eigen compile definitions for Tetralith: EIGEN_MAX_ALIGN_BYTES=16")
 #            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MALLOC_ALREADY_ALIGNED=0) # May work to fix CERES segfault?
 #            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MAX_ALIGN_BYTES=16)  # May work to fix CERES segfault?
         else()
-            message(STATUS "Applying special Eigen compile definitions for general machines: EIGEN_MAX_ALIGN_BYTES=16")
+#            message(STATUS "Applying special Eigen compile definitions for general machines: EIGEN_MAX_ALIGN_BYTES=16")
 #            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MALLOC_ALREADY_ALIGNED=0) # May work to fix CERES segfaults!!!
 #            target_compile_definitions(CONAN_PKG::eigen INTERFACE EIGEN_MAX_ALIGN_BYTES=16)  # May work to fix CERES segfault?
         endif()


linking still...

linking still...

Former-commit-id: b6b8e49f103d6090ef2250f9c740e4e83de134a6

--- cmake-modules/Fetch_Glog.cmake
+++ cmake-modules/Fetch_Glog.cmake
@@ -53,4 +53,7 @@
     else()
         message(STATUS "Dependency glog does not have IMPORTED_LOCATION_${BUILD_TYPE}/_NOCONFIG")
     endif()
+
+    remove_shared(glog::glog)
+    remove_pthread(glog::glog)
 endif()


Update SuperBuild LZ4 version to 1.8.2. #847

This is needed to solve a linking error on centos 6 with lz4.

--- cmake/Modules/FindLZ4_EP.cmake
+++ cmake/Modules/FindLZ4_EP.cmake
@@ -76,8 +76,8 @@
     if (WIN32)
       ExternalProject_Add(ep_lz4
         PREFIX "externals"
-        URL "https://github.com/lz4/lz4/releases/download/v1.8.1.2/lz4_v1_8_1_win64.zip"
-        URL_HASH SHA1=c0f50f59f4cf4ff861d9dffc64c735032e7778f9
+        URL "https://github.com/lz4/lz4/releases/download/v1.8.2/lz4_v1_8_2_win64.zip"
+        URL_HASH SHA1=330f97a88b91a4b9a15ddfe063321849a3a9e62d
         CONFIGURE_COMMAND ""
         BUILD_IN_SOURCE TRUE
         BUILD_COMMAND ""
@@ -90,7 +90,7 @@
             ${TILEDB_EP_BASE}/src/ep_lz4/dll/liblz4.lib
             ${TILEDB_EP_INSTALL_PREFIX}/bin &&
           ${CMAKE_COMMAND} -E copy_if_different
-            ${TILEDB_EP_BASE}/src/ep_lz4/dll/liblz4.so.1.8.1.dll
+            ${TILEDB_EP_BASE}/src/ep_lz4/dll/liblz4.so.1.8.2.dll
             ${TILEDB_EP_INSTALL_PREFIX}/bin/liblz4.dll &&
           ${CMAKE_COMMAND} -E copy_if_different
             ${TILEDB_EP_BASE}/src/ep_lz4/static/liblz4_static.lib
@@ -108,8 +108,8 @@
     else()
       ExternalProject_Add(ep_lz4
         PREFIX "externals"
-        URL "https://github.com/lz4/lz4/archive/v1.8.1.2.zip"
-        URL_HASH SHA1=6d89d448f976188b44abcdb9083cac4ebcfbb46c
+        URL "https://github.com/lz4/lz4/archive/v1.8.2.zip"
+        URL_HASH SHA1=ebf6c227965318ecd73820ade8f5dbd83d48b3e8
         CONFIGURE_COMMAND ""
         BUILD_IN_SOURCE TRUE
         INSTALL_COMMAND $(MAKE) PREFIX=${TILEDB_EP_INSTALL_PREFIX} install


ability to enable OpenMP simultaneously with other parallel framework

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -46,8 +46,25 @@
   set(HAVE_CSTRIPES 0)
 endif()

+# --- GCD ---
+if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
+  set(HAVE_GCD 1)
+else()
+  set(HAVE_GCD 0)
+endif()
+
+# --- Concurrency ---
+if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
+  set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
+  file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
+  try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
+  file(REMOVE "${_fname}")
+else()
+  set(HAVE_CONCURRENCY 0)
+endif()
+
 # --- OpenMP ---
-if(WITH_OPENMP AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES)
+if(WITH_OPENMP)
   find_package(OpenMP)
   if(OPENMP_FOUND)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
@@ -55,20 +72,3 @@
   endif()
   set(HAVE_OPENMP "${OPENMP_FOUND}")
 endif()
-
-# --- GCD ---
-if(APPLE AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
-  set(HAVE_GCD 1)
-else()
-  set(HAVE_GCD 0)
-endif()
-
-# --- Concurrency ---
-if(MSVC AND NOT HAVE_TBB AND NOT HAVE_CSTRIPES AND NOT HAVE_OPENMP)
-  set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
-  file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
-  try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")
-  file(REMOVE "${_fname}")
-else()
-  set(HAVE_CONCURRENCY 0)
-endif()


Search for dictionary headers using target properties if available

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -267,6 +267,11 @@
   # rootcling invoked on foo.h should find foo.h in the current source dir,
   # no matter what.
   list(APPEND incdirs ${CMAKE_CURRENT_SOURCE_DIR})
+
+  if(TARGET ${ARG_MODULE})
+    get_target_property(target_incdirs ${ARG_MODULE} INCLUDE_DIRECTORIES)
+    list(APPEND incdirs ${target_incdirs})
+  endif()

   #---Get the list of header files-------------------------
   # CMake needs dependencies from ${CMAKE_CURRENT_SOURCE_DIR} while rootcling wants


- patch wrapper to add folder to python path, so the shared library is found on all systems


Correct error that was just introduced by previous commit; when pkg-config
is not present, then cannot use it for install-tree builds!

svn path=/trunk/; revision=7344

--- cmake/modules/pkg-config.cmake
+++ cmake/modules/pkg-config.cmake
@@ -55,7 +55,7 @@
   message(STATUS "WARNING: Build of examples in install tree will not work.")
   # Turn off pkg-config build.  (This means both build methods will be
   # commented out.)
-  set(pkg_config_true "")
+  set(pkg_config_true "#")
 endif(PKGCONFIG_EXECUTABLE)

 macro(pc_transform_link_flags _link_flags_out _link_flags_in)


SuperBuild: shark: allow extra user option to link with pthread

--- SuperBuild/CMake/External_shark.cmake
+++ SuperBuild/CMake/External_shark.cmake
@@ -9,6 +9,14 @@

 ADD_SUPERBUILD_CMAKE_VAR(SHARK Boost_INCLUDE_DIR)
 ADD_SUPERBUILD_CMAKE_VAR(SHARK BOOST_LIBRARYDIR)
+
+#shark master branch has a fix to avoid explicit link with libs
+#but tag 3.3 which we use still need a fix.
+if(UNIX)
+  set(SHARK_SB_CONFIG_USER "" CACHE STRING "Extra options to be passed to shark cmake configure cache")
+  mark_as_advanced(SHARK_SB_CONFIG_USER)
+  list(APPEND SHARK_SB_CONFIG "${SHARK_SB_CONFIG_USER}")
+endif()

 ExternalProject_Add(SHARK
   PREFIX SHARK


Only set the working path if the variable is set

--- conf/sprokit-macro-tests.cmake
+++ conf/sprokit-macro-tests.cmake
@@ -80,8 +80,12 @@
             ${ARGN})
   set_tests_properties(test-${name}-${instance}
     PROPERTIES
-      WORKING_DIRECTORY       "${sprokit_test_working_path}"
       FAIL_REGULAR_EXPRESSION "^Error: ;\nError: ")
+  if (sprokit_test_working_path)
+    set_tests_properties(test-${name}-${instance}
+      PROPERTIES
+        WORKING_DIRECTORY       "${sprokit_test_working_path}")
+  endif ()

   # TODO: How to get CTest the full path to the test with config subdir?
   if (NOT CMAKE_CONFIGURATION_TYPES)


ctest: fail early if the compiler is too old

Don't submit anything to the dashboard for non-C++11 compilers.

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- test.cmake
+++ test.cmake
@@ -283,6 +283,10 @@
    set(configure_options "${configure_options};-DTARGET_ARCHITECTURE=${target_architecture}")
 endif()

+if("${COMPILER_VERSION}" MATCHES "(GCC|Open64).*4\\.[01234567]\\." OR "${COMPILER_VERSION}" MATCHES "GCC 4.8.0")
+   message(FATAL_ERROR "Compiler too old for C++11 (${COMPILER_VERSION})")
+endif()
+
 macro(go)
    # SubProjects currently don't improve the overview but rather make the dashboard more cumbersume to navigate
    #set_property(GLOBAL PROPERTY SubProject "master: ${compiler}")
@@ -298,22 +302,15 @@

    # enter the following section for Continuous builds only if the CTEST_UPDATE above found changes
    if(NOT ${dashboard_model} STREQUAL "Continuous" OR res GREATER 0)
-      if("${COMPILER_VERSION}" MATCHES "(g\\+\\+|GCC|Open64).*4\\.[01234567]\\.")
-         file(WRITE "${CTEST_BINARY_DIRECTORY}/abort_reason" "Compiler too old for C++11: ${COMPILER_VERSION}")
-         list(APPEND CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/abort_reason")
-         ctest_submit(PARTS Notes)
-         set(res 1)
-      else()
-         CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}"
-            OPTIONS "${configure_options}"
-            APPEND
-            RETURN_VALUE res)
-         list(APPEND CTEST_NOTES_FILES
-            #"${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeOutput.log"
-            "${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeError.log"
-            )
-         ctest_submit(PARTS Notes Configure)
-      endif()
+      CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}"
+         OPTIONS "${configure_options}"
+         APPEND
+         RETURN_VALUE res)
+      list(APPEND CTEST_NOTES_FILES
+         #"${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeOutput.log"
+         "${CTEST_BINARY_DIRECTORY}/CMakeFiles/CMakeError.log"
+         )
+      ctest_submit(PARTS Notes Configure)
       unset(CTEST_NOTES_FILES) # less clutter in ctest -V output
       if(res EQUAL 0)
          foreach(label other Scalar SSE AVX AVX2 MIC)


[3388126] Fix Boost license file location in CMake

--HG--
branch : v1-7

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -194,7 +194,7 @@
 		PATTERN "xpressive" EXCLUDE
 	  )
 	  # License
-	  install(FILES "${Boost_INCLUDE_DIR}/LICENSE_1_0.txt" DESTINATION "boost_${Boost_LIB_VERSION}")
+	  install(FILES "${Boost_INCLUDE_DIR}/../LICENSE_1_0.txt" DESTINATION "boost_${Boost_LIB_VERSION}")
 	  # libraries
 	  if (Boost_THREAD_FOUND)
 	    install(FILES ${Boost_THREAD_LIBRARY_DEBUG} DESTINATION "boost_${Boost_LIB_VERSION}/lib" CONFIGURATIONS Debug)


Do not pass unneeded language arguments on the command line

Only pass language CMake variable to the SimpleITK sub-superbuild
project when the language is enabled.

Change-Id: I65154c132b6cf0ea28a44a1e48dfd2180dd65bfc

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -36,12 +36,14 @@

 option ( WRAP_LUA "Wrap Lua" ${WRAP_LUA_DEFAULT} )

-list( APPEND SITK_LANGUAGES_VARS
-  LUA_LIBRARIES
-  LUA_INCLUDE_DIR
-  LUA_VERSION_STRING
-  LUA_ADDITIONAL_LIBRARIES
-  )
+if ( WRAP_LUA )
+  list( APPEND SITK_LANGUAGES_VARS
+    LUA_LIBRARIES
+    LUA_INCLUDE_DIR
+    LUA_VERSION_STRING
+    LUA_ADDITIONAL_LIBRARIES
+    )
+endif()

@@ -66,21 +68,26 @@
 else()
   set( WRAP_PYTHON_DEFAULT OFF )
 endif()
-list( APPEND SITK_LANGUAGES_VARS
-  PYTHON_DEBUG_LIBRARY
-  PYTHON_EXECUTABLE
-  PYTHON_LIBRARY
-  PYTHON_INCLUDE_DIR
-#  PYTHON_INCLUDE_PATH ( deprecated )
-   )
+
+option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
+
+if ( WRAP_PYTHON )
+  list( APPEND SITK_LANGUAGES_VARS
+    PYTHON_DEBUG_LIBRARY
+    PYTHON_EXECUTABLE
+    PYTHON_LIBRARY
+    PYTHON_INCLUDE_DIR
+    #  PYTHON_INCLUDE_PATH ( deprecated )
+    )
 # Debian "jessie" has this additional variable required to match
 # python versions.
-if(PYTHON_INCLUDE_DIR2)
-  list( APPEND SITK_LANGUAGES_VARS
-    PYTHON_INCLUDE_DIR2
-    )
-endif()
-option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
+  if(PYTHON_INCLUDE_DIR2)
+    list( APPEND SITK_LANGUAGES_VARS
+      PYTHON_INCLUDE_DIR2
+      )
+  endif()
+endif ()
+

 if (DEFINED  WRAP_JAVA AND WRAP_JAVA)
   set(_QUIET "REQUIRED")
@@ -95,28 +102,31 @@
 else ( ${JAVA_FOUND} AND ${JNI_FOUND} )
   set( WRAP_JAVA_DEFAULT OFF )
 endif ( ${JAVA_FOUND} AND ${JNI_FOUND} )
-list( APPEND SITK_LANGUAGES_VARS
-  Java_JAVA_EXECUTABLE
-  Java_JAVAC_EXECUTABLE
-  Java_JAR_EXECUTABLE
-  Java_VERSION_STRING
-  Java_VERSION_MAJOR
-  Java_VERSION_MINOR
-  Java_VERSION_PATCH
-  Java_VERSION_TWEAK
-  Java_VERSION
-  Java_INCLUDE_DIRS
-  Java_LIBRARIES
-  JNI_INCLUDE_DIRS
-  JNI_LIBRARIES
-  JAVA_AWT_LIBRARY
-  JAVA_JVM_LIBRARY
-  JAVA_INCLUDE_PATH
-  JAVA_INCLUDE_PATH2
-  JAVA_AWT_INCLUDE_PATH
-
-  )
+
 option ( WRAP_JAVA "Wrap Java" ${WRAP_JAVA_DEFAULT} )
+
+if ( WRAP_JAVA )
+  list( APPEND SITK_LANGUAGES_VARS
+    Java_JAVA_EXECUTABLE
+    Java_JAVAC_EXECUTABLE
+    Java_JAR_EXECUTABLE
+    Java_VERSION_STRING
+    Java_VERSION_MAJOR
+    Java_VERSION_MINOR
+    Java_VERSION_PATCH
+    Java_VERSION_TWEAK
+    Java_VERSION
+    Java_INCLUDE_DIRS
+    Java_LIBRARIES
+    JNI_INCLUDE_DIRS
+    JNI_LIBRARIES
+    JAVA_AWT_LIBRARY
+    JAVA_JVM_LIBRARY
+    JAVA_INCLUDE_PATH
+    JAVA_INCLUDE_PATH2
+    JAVA_AWT_INCLUDE_PATH
+    )
+endif()

 if (DEFINED  WRAP_TCL AND WRAP_TCL)
@@ -131,14 +141,20 @@
 else ( ${TCL_FOUND} )
   set ( WRAP_TCL_DEFAULT OFF )
 endif ( ${TCL_FOUND} )
-list( APPEND SITK_LANGUAGES_VARS
-  TCL_LIBRARY
-  TCL_INCLUDE_PATH
-  TCL_TCLSH
-  TK_LIBRARY
-  TK_INCLUDE_PATH
-  TK_WISH )
+
 option ( WRAP_TCL "Wrap Tcl" ${WRAP_TCL_DEFAULT} )
+
+if ( WRAP_TCL )
+  list( APPEND SITK_LANGUAGES_VARS
+    TCL_LIBRARY
+    TCL_INCLUDE_PATH
+    TCL_TCLSH
+    TK_LIBRARY
+    TK_INCLUDE_PATH
+    TK_WISH
+    )
+endif()
+

 find_package ( Ruby QUIET )
 if ( ${RUBY_FOUND} )
@@ -146,14 +162,19 @@
 else ( ${RUBY_FOUND} )
   set ( WRAP_RUBY_DEFAULT OFF )
 endif ( ${RUBY_FOUND} )
-list( APPEND SITK_LANGUAGES_VARS
-  RUBY_EXECUTABLE
-  RUBY_INCLUDE_DIRS
-  RUBY_LIBRARY
-  RUBY_VERSION
-  RUBY_FOUND
-  RUBY_INCLUDE_PATH )
+
 option ( WRAP_RUBY "Wrap Ruby" ${WRAP_RUBY_DEFAULT} )
+
+if ( WRAP_RUBY )
+  list( APPEND SITK_LANGUAGES_VARS
+    RUBY_EXECUTABLE
+    RUBY_INCLUDE_DIRS
+    RUBY_LIBRARY
+    RUBY_VERSION
+    RUBY_FOUND
+    RUBY_INCLUDE_PATH
+    )
+endif()

 if (DEFINED  WRAP_CSHARP AND WRAP_CSHARP)
@@ -168,12 +189,17 @@
 else ()
   set ( WRAP_CSHARP_DEFAULT OFF )
 endif ()
-list( APPEND SITK_LANGUAGES_VARS
-  CSHARP_COMPILER
-  CSHARP_INTERPRETER
-  CSHARP_PLATFORM
-)
+
 option ( WRAP_CSHARP "Wrap C#" ${WRAP_CSHARP_DEFAULT} )
+
+if ( WRAP_CSHARP )
+  list( APPEND SITK_LANGUAGES_VARS
+    CSHARP_COMPILER
+    CSHARP_INTERPRETER
+    CSHARP_PLATFORM
+    )
+endif()
+

 if (DEFINED  WRAP_R AND WRAP_R)
   set(_QUIET "REQUIRED")
@@ -188,14 +214,17 @@
   set ( WRAP_R_DEFAULT OFF )
 endif( )

-
-list( APPEND SITK_LANGUAGES_VARS
- R_INCLUDE_DIR
- R_LIBRARIES
- R_LIBRARY_BASE
- R_COMMAND
- RSCRIPT_EXECUTABLE )
 option ( WRAP_R "Wrap R" ${WRAP_R_DEFAULT} )
+
+if ( WRAP_R )
+  list( APPEND SITK_LANGUAGES_VARS
+    R_INCLUDE_DIR
+    R_LIBRARIES
+    R_LIBRARY_BASE
+    R_COMMAND
+    RSCRIPT_EXECUTABLE )
+endif()
+

 if( WIN32 )
   mark_as_advanced( WRAP_R )


batch script moved to batch folder

batch script moved to batch folder

--- examples/test_signal1D/test_signal1D.cmake
+++ examples/test_signal1D/test_signal1D.cmake
@@ -17,6 +17,10 @@
 	make_directory("scripts/test_signal1D/")
 	file(COPY "scripts/" DESTINATION "scripts/test_signal1D/"	FILES_MATCHING PATTERN "*")
 	file(COPY "test_signal1D/scripts/" DESTINATION "scripts/test_signal1D/" FILES_MATCHING PATTERN "*")
+
+	# copy batch scripts
+	make_directory("batch/test_signal1D/")
+	file(COPY "test_signal1D/batch/" DESTINATION "batch/test_signal1D/" FILES_MATCHING PATTERN "*")

 	# copy data
 	file(COPY "test_signal1D/data/" DESTINATION "data" FILES_MATCHING PATTERN "*")


deactivated mitkNavigationDataRecorderTest (bug-16349), mitkNavigationDataTransformFilterTest (bug-16361), mitkNavigationToolReaderAndWriterTest (bug-16350), mitkNavigationToolStorageSerializerAndDeserializerTest (bug-16351), created bugs for all of this tests.

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -8,14 +8,14 @@
    mitkNavigationDataLandmarkTransformFilterTest.cpp
    mitkNavigationDataObjectVisualizationFilterTest.cpp
    mitkNavigationDataTest.cpp
-   mitkNavigationDataRecorderTest.cpp
+   #mitkNavigationDataRecorderTest.cpp
    mitkNavigationDataReferenceTransformFilterTest.cpp
    mitkNavigationDataSequentialPlayerTest.cpp
    mitkNavigationDataSourceTest.cpp
    mitkNavigationDataToMessageFilterTest.cpp
    mitkNavigationDataToNavigationDataFilterTest.cpp
    mitkNavigationDataToPointSetFilterTest.cpp
-   mitkNavigationDataTransformFilterTest.cpp
+   #mitkNavigationDataTransformFilterTest.cpp
    mitkNDIPassiveToolTest.cpp
    mitkNDIProtocolTest.cpp
    mitkNDITrackingDeviceTest.cpp
@@ -33,8 +33,8 @@
    # ------------------ Navigation Tool Management Tests -------------------
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
-   mitkNavigationToolReaderAndWriterTest.cpp
-   mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
+   #mitkNavigationToolReaderAndWriterTest.cpp
+   #mitkNavigationToolStorageSerializerAndDeserializerTest.cpp
    # -----------------------------------------------------------------------
 )


COMP(#17303): disabled tests because of bug 17181 and bug 17303

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -8,7 +8,8 @@
    # mark it as critical.

    ################## DISABLED TESTS #################################################
-   # <none>
+   # mitkNavigationToolStorageDeserializerTest.cpp # disabled because of bug 17303
+   # mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp # disabled because of bug 17181

    ################# RUNNING TESTS ###################################################
    mitkCameraVisualizationTest.cpp
@@ -45,9 +46,7 @@
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
-   mitkNavigationToolStorageDeserializerTest.cpp
    mitkNavigationToolStorageSerializerTest.cpp
-   mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp
    # -----------------------------------------------------------------------
 )


COMP: disabled test which crashes at the moment

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -13,6 +13,7 @@
    ################## DISABLED TESTS #####################################################
    # mitkNavigationToolStorageDeserializerTest.cpp # This test was disabled because of bug 17303.
    # mitkNavigationToolStorageSerializerAndDeserializerIntegrationTest.cpp # This test was disabled because of bug 17181.
+   # mitkNavigationToolStorageSerializerTest.cpp # This test was disabled because of bug 18671

    ################# RUNNING TESTS #######################################################
    mitkCameraVisualizationTest.cpp
@@ -53,7 +54,6 @@
    mitkNavigationToolStorageTest.cpp
    mitkNavigationToolTest.cpp
    mitkNavigationToolReaderAndWriterTest.cpp
-   mitkNavigationToolStorageSerializerTest.cpp
    # -----------------------------------------------------------------------
 )


Remove redundant -mfpu=neon flag.

Remove redundant -mfpu=neon flag.

This flag is already added in line 131.

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -171,10 +171,6 @@
     endif()
   endif()

-  if(ENABLE_NEON)
-    add_extra_compiler_option(-mfpu=neon)
-  endif()
-
   # Profiling?
   if(ENABLE_PROFILING)
     add_extra_compiler_option("-pg -g")


Typos.

Typos.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -220,7 +220,7 @@
 function(ROOT_GENERATE_DICTIONARY dictionary)
   CMAKE_PARSE_ARGUMENTS(ARG "STAGE1;MULTIDICT;NOINSTALL" "MODULE" "LINKDEF;OPTIONS;DEPENDENCIES" ${ARGN})

-  # Check if OPTIONS starts with a dash
+  # Check if OPTIONS start with a dash.
   if (ARG_OPTIONS)
     foreach(ARG_O ${ARG_OPTIONS})
       if (NOT ARG_O MATCHES "^-*")
@@ -273,7 +273,7 @@
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  headerfiles "${headerfiles}")
   # Replace the non-standard folder layout of Core.
   if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
-    # FIXME: Glob these folder.
+    # FIXME: Glob these folders.
     set(core_folders "base|clib|clingutils|cont|dictgen|doc|foundation|lzma|macosx|meta|metacling|multiproc|newdelete|pcre|rint|rootcling_stage1|textinput|thread|unix|winnt|zip")
     string(REGEX REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  headerfiles "${headerfiles}")
   endif()


Updated to version 1.3.1

Updated to version 1.3.1

--- cmake/modules/SRSLTEVersion.cmake
+++ cmake/modules/SRSLTEVersion.cmake
@@ -20,5 +20,5 @@

 SET(SRSLTE_VERSION_MAJOR 001)
 SET(SRSLTE_VERSION_MINOR 003)
-SET(SRSLTE_VERSION_PATCH 000)
+SET(SRSLTE_VERSION_PATCH 001)
 SET(SRSLTE_VERSION_STRING "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}")


Fix typo

Fix typo

--- cmake/projects/Clang/hunter.cmake
+++ cmake/projects/Clang/hunter.cmake
@@ -9,7 +9,7 @@

 hunter_add_version(
     PACKAGE_NAME
-    LLVM
+    Clang
     VERSION
     "3.6.2-p0"
     URL


Change MITK_BUILD_TUTORIAL to MITK_BUILD_EXAMPLES

--- CMakeExternals/MITK.cmake
+++ CMakeExternals/MITK.cmake
@@ -14,7 +14,7 @@

   option(MITK_USE_SUPERBUILD "Use superbuild for MITK" ON)
   option(MITK_USE_BLUEBERRY "Build the BlueBerry platform in MITK" ON)
-  option(MITK_BUILD_TUTORIAL "Build the MITK tutorial" OFF)
+  option(MITK_BUILD_EXAMPLES "Build the MITK examples" OFF)
   option(MITK_BUILD_ALL_PLUGINS "Build all MITK plugins" OFF)
   option(MITK_BUILD_TESTING "Build the MITK unit tests" OFF)
   option(MITK_USE_CTK "Use CTK in MITK" ${MITK_USE_BLUEBERRY})
@@ -46,7 +46,7 @@
   set(mitk_cmake_boolean_args
     MITK_USE_SUPERBUILD
     MITK_USE_BLUEBERRY
-    MITK_BUILD_TUTORIAL
+    MITK_BUILD_EXAMPLES
     MITK_BUILD_ALL_PLUGINS
     MITK_USE_CTK
     MITK_USE_DCMTK
@@ -54,35 +54,24 @@
     MITK_USE_OpenCV
     MITK_USE_Python
    )
-
-  set(DESIRED_QT_VERSION 5)

   if(MITK_USE_QT)
     # Look for Qt at the superbuild level, to catch missing Qt libs early
-    if(APPLE)
-	  set(DESIRED_QT_VERSION 4)
-      find_package(Qt4 4.7 REQUIRED)
-	else()
-	  find_package(Qt5
-	    5.0.0
-	    COMPONENTS
+	  find_package(Qt5 5.0.0 COMPONENTS
 		  Concurrent
 		  OpenGL
 		  PrintSupport
 		  Script
 		  Sql
 		  Svg
+      Widgets
 		  WebKitWidgets
 		  Xml
 		  XmlPatterns
 		  UiTools
-		REQUIRED)
-	endif()
-  endif()
-
-  set(additional_mitk_cmakevars
-    -DDESIRED_QT_VERSION:STRING=${DESIRED_QT_VERSION}
-  )
+      Help
+		  REQUIRED)
+  endif()

   # Configure the set of default pixel types
   set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES


Fix bug 285: Feature summary was incorrect if OGRE_CONFIG_ALLOCATOR=1.

--HG--
branch : v1-7

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -133,7 +133,7 @@
 endmacro ()

 # allocator settings
-if (OGRE_CONFIG_ALlOCATOR EQUAL 1)
+if (OGRE_CONFIG_ALLOCATOR EQUAL 1)
 	set(_allocator "standard")
 elseif (OGRE_CONFIG_ALLOCATOR EQUAL 2)
 	set(_allocator "nedmalloc")


arquivo inútil

arquivo inútil

--- CMakeInclude/FindGLM.cmake
+++ CMakeInclude/FindGLM.cmake
@@ -1,63 +0,0 @@
-# FindGLM - attempts to locate the glm matrix/vector library.
-#
-# This module defines the following variables (on success):
-#   GLM_INCLUDE_DIRS  - where to find glm/glm.hpp
-#   GLM_FOUND         - if the library was successfully located
-#
-# It is trying a few standard installation locations, but can be customized
-# with the following variables:
-#   GLM_ROOT_DIR      - root directory of a glm installation
-#                       Headers are expected to be found in either:
-#                       <GLM_ROOT_DIR>/glm/glm.hpp           OR
-#                       <GLM_ROOT_DIR>/include/glm/glm.hpp
-#                       This variable can either be a cmake or environment
-#                       variable. Note however that changing the value
-#                       of the environment varible will NOT result in
-#                       re-running the header search and therefore NOT
-#                       adjust the variables set by this module.
-
-#=============================================================================
-# Copyright 2012 Carsten Neumann
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-# default search dirs
-SET(_glm_HEADER_SEARCH_DIRS
-    "/usr/include"
-    "/usr/local/include")
-
-# check environment variable
-SET(_glm_ENV_ROOT_DIR "$ENV{GLM_ROOT_DIR}")
-
-IF(NOT GLM_ROOT_DIR AND _glm_ENV_ROOT_DIR)
-    SET(GLM_ROOT_DIR "${_glm_ENV_ROOT_DIR}")
-ENDIF(NOT GLM_ROOT_DIR AND _glm_ENV_ROOT_DIR)
-
-# put user specified location at beginning of search
-IF(GLM_ROOT_DIR)
-    SET(_glm_HEADER_SEARCH_DIRS "${GLM_ROOT_DIR}"
-                                "${GLM_ROOT_DIR}/include"
-                                 ${_glm_HEADER_SEARCH_DIRS})
-ENDIF(GLM_ROOT_DIR)
-
-# locate header
-FIND_PATH(GLM_INCLUDE_DIR "glm/glm.hpp"
-    PATHS ${_glm_HEADER_SEARCH_DIRS})
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLM DEFAULT_MSG
-    GLM_INCLUDE_DIR)
-
-IF(GLM_FOUND)
-    SET(GLM_INCLUDE_DIRS "${GLM_INCLUDE_DIR}")
-
-    MESSAGE(STATUS "GLM_INCLUDE_DIR = ${GLM_INCLUDE_DIR}")
-ENDIF(GLM_FOUND)


ql: pp3: disable PINMAP_XML

ql: pp3: disable PINMAP_XML

Signed-off-by: Paweł Czarnecki <be3a62494a976d1435cc0900bd9adf3fa1029787@antmicro.com>

--- quicklogic/common/cmake/quicklogic_install.cmake
+++ quicklogic/common/cmake/quicklogic_install.cmake
@@ -280,19 +280,24 @@
     DESTINATION "share/symbiflow/arch/${DEVICE}_${PACKAGE}/${PART}"
     RENAME "pinmap_${ADD_QUICKLOGIC_BOARD_FABRIC_PACKAGE}.csv")

-  get_target_property_required(PINMAP ${BOARD} PINMAP_XML)
-  get_file_location(PINMAP_XML_FILE ${PINMAP_XML})
-  get_filename_component(PINMAP_XML_FILE_REAL ${PINMAP_XML_FILE} REALPATH)
-  get_filename_component(PINMAP_XML_FILE_NAME ${PINMAP_XML_FILE} NAME)
-  append_file_dependency(DEPS ${PINMAP_XML})
-  add_custom_target(
-    "PINMAP_XML_INSTALL_${BOARD}_${DEVICE}_${PACKAGE}_${PINMAP_XML_FILE_NAME}"
-    ALL
-    DEPENDS ${DEPS}
-    )
-  install(FILES ${PINMAP_XML_FILE_REAL}
-    DESTINATION "share/symbiflow/arch/${DEVICE}_${PACKAGE}/${PART}"
-    RENAME "pinmap_${ADD_QUICKLOGIC_BOARD_FABRIC_PACKAGE}.xml")
+
+  if(NOT "${FAMILY}" STREQUAL "pp3")
+	  get_target_property_required(PINMAP ${BOARD} PINMAP_XML)
+	  get_file_location(PINMAP_XML_FILE ${PINMAP_XML})
+	  get_filename_component(PINMAP_XML_FILE_REAL ${PINMAP_XML_FILE} REALPATH)
+	  get_filename_component(PINMAP_XML_FILE_NAME ${PINMAP_XML_FILE} NAME)
+	  append_file_dependency(DEPS ${PINMAP_XML})
+	  add_custom_target(
+	  "PINMAP_XML_INSTALL_${BOARD}_${DEVICE}_${PACKAGE}_${PINMAP_XML_FILE_NAME}"
+	  ALL
+	  DEPENDS ${DEPS}
+	  )
+	  install(FILES ${PINMAP_XML_FILE_REAL}
+	  DESTINATION "share/symbiflow/arch/${DEVICE}_${PACKAGE}/${PART}"
+	  RENAME "pinmap_${ADD_QUICKLOGIC_BOARD_FABRIC_PACKAGE}.xml")
+  else()
+	  message(status ": workaround: skipping PINMAP_XML install for ${FAMILY} ${DEVICE}")
+  endif()

   get_target_property(CLKMAP ${BOARD} CLKMAP)
   if(NOT "${CLKMAP}" MATCHES ".*-NOTFOUND")


Temporarily set Google Benchmark version to v1.4.0

1.4.1 (and master) has bug: https://github.com/google/benchmark/issues/603

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -102,7 +102,7 @@
   download_project(
     PROJ           googlebenchmark
     GIT_REPOSITORY https://github.com/google/benchmark.git
-    GIT_TAG        master
+    GIT_TAG        v1.4.0
     INSTALL_DIR    ${GOOGLEBENCHMARK_ROOT}
     CMAKE_ARGS     -DCMAKE_BUILD_TYPE=RELEASE -DBENCHMARK_ENABLE_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     LOG_DOWNLOAD   TRUE


Added possibility to make subfolders in modules' folders "src/".

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -422,8 +422,8 @@
 # Usage:
 # ocv_glob_module_sources(<extra sources&headers in the same format as used in ocv_set_module_sources>)
 macro(ocv_glob_module_sources)
-  file(GLOB lib_srcs "src/*.cpp")
-  file(GLOB lib_int_hdrs "src/*.hpp" "src/*.h")
+  file(GLOB_RECURSE lib_srcs "src/*.cpp")
+  file(GLOB_RECURSE lib_int_hdrs "src/*.hpp" "src/*.h")
   file(GLOB lib_hdrs "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
   file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.hpp" "include/opencv2/${name}/detail/*.h")


[cmake] ccache off by default

[cmake] ccache off by default

--- cmake/SiconosSetup.cmake
+++ cmake/SiconosSetup.cmake
@@ -216,7 +216,7 @@
 ENDIF()

 # =========== use ccache if available ===========
-OPTION (WITH_CCACHE "Use ccache" ON)
+OPTION (WITH_CCACHE "Use ccache" OFF)
 IF(WITH_CCACHE)
   find_program(CCACHE_FOUND ccache)
   if(CCACHE_FOUND)


build type compiler flags not passed to nvcc

nvcc is only forwarding `CMAKE_CXX_FLAGS` via `-Xcompiler` to the host compiler.
`CMAKE_CXX_FLAGS_[Release|Debug|RELWITHDEBINFO]` will be ignored.
The result can be slow code if `CMAKE_BUILD_TYPE=Release` is used. CMake
build releases by default with `-O3`

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -888,5 +888,10 @@
                  PROPERTY INTERFACE_COMPILE_OPTIONS)
     string(REPLACE ";" " " _ALPAKA_COMPILE_OPTIONS_STRING "${_ALPAKA_COMPILE_OPTIONS_PUBLIC}")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_ALPAKA_COMPILE_OPTIONS_STRING}")
-endif()
-
+
+    # Append CMAKE_CXX_FLAGS_[Release|Debug|RelWithDebInfo] to CMAKE_CXX_FLAGS
+    # because FindCUDA only propagates the latter to nvcc.
+    string(TOUPPER "${CMAKE_BUILD_TYPE}" build_config)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${build_config}}")
+endif()
+


Bug #58372 cmake should not write temporary files in the source directory

--- cmake/do_abi_check.cmake
+++ cmake/do_abi_check.cmake
@@ -53,23 +53,27 @@
 SET(abi_check_out ${BINARY_DIR}/abi_check.out)

 FOREACH(file ${ABI_HEADERS})
-  SET(tmpfile ${file}.pp.tmp)
-    EXECUTE_PROCESS(
-     COMMAND ${COMPILER}
-       -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
-       -I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
-       ${file}
-       ERROR_QUIET OUTPUT_FILE ${tmpfile})
-    EXECUTE_PROCESS(
-      COMMAND sed -e
-      "/^# /d" -e "/^[	]*$/d"  -e "/^#pragma GCC set_debug_pwd/d" -e "/^#ident/d"
-      RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
+  GET_FILENAME_COMPONENT(header_basename ${file} NAME)
+  SET(tmpfile ${BINARY_DIR}/${header_basename}.pp.tmp)
+
+  EXECUTE_PROCESS(
+    COMMAND ${COMPILER}
+      -E -nostdinc -dI -DMYSQL_ABI_CHECK -I${SOURCE_DIR}/include
+      -I${BINARY_DIR}/include -I${SOURCE_DIR}/include/mysql -I${SOURCE_DIR}/sql
+      ${file}
+      ERROR_QUIET OUTPUT_FILE ${tmpfile})
+  EXECUTE_PROCESS(
+    COMMAND sed -e "/^# /d"
+                -e "/^[	]*$/d"
+                -e "/^#pragma GCC set_debug_pwd/d"
+                -e "/^#ident/d"
+    RESULT_VARIABLE result OUTPUT_FILE ${abi_check_out} INPUT_FILE ${tmpfile})
   IF(NOT ${result} EQUAL 0)
     MESSAGE(FATAL_ERROR "sed returned error ${result}")
   ENDIF()
   FILE(REMOVE ${tmpfile})
-  EXECUTE_PROCESS(COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE
-     result)
+  EXECUTE_PROCESS(
+    COMMAND diff -w ${file}.pp ${abi_check_out} RESULT_VARIABLE result)
   IF(NOT ${result} EQUAL 0)
     MESSAGE(FATAL_ERROR
       "ABI check found difference between ${file}.pp and ${abi_check_out}")


CMake: enable packaging for Release with Debug builds (RelWithDebInfo)

* this ensures that the respective Qt dlls are included

--- cmake/installutils.cmake
+++ cmake/installutils.cmake
@@ -119,7 +119,7 @@
                     install(FILES ${QTARGET_DIR}/${qtarget}.dll
                             DESTINATION bin
                             COMPONENT ${ivw_comp}
-                            CONFIGURATIONS Release)
+                            CONFIGURATIONS Release RelWithDebInfo)
                     foreach(plugin ${${qtarget}_PLUGINS})
                         get_target_property(_loc ${plugin} LOCATION)
                         get_filename_component(_path ${_loc} PATH)


cmake: Consider master branch when naming packages

--- cmake/package-name.cmake
+++ cmake/package-name.cmake
@@ -53,9 +53,15 @@
         git_commit_count(GIT_COMMIT_COUNT)
         git_branch(GIT_BRANCH)

-        set(${return_value}
-          "${name}_${version}.${GIT_COMMIT_COUNT}~${GIT_BRANCH}_${GIT_COMMIT_HASH}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}"
-          PARENT_SCOPE)
+        if ("${GIT_BRANCH}" STREQUAL "master")
+          set(${return_value}
+            "${name}_${version}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}" PARENT_SCOPE)
+        else ()
+          set(${return_value}
+            "${name}_${version}.${GIT_COMMIT_COUNT}~${GIT_BRANCH}_${GIT_COMMIT_HASH}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}"
+            PARENT_SCOPE)
+
+        endif ("${GIT_BRANCH}" STREQUAL "master")

       else () # this will be the case when users download the github zip and compile on deb systems


Fix build outside of ${CMAKE_SOURCE_DIR}: Detecting file version failed if SOURCE != BINARY_DIR

--- cmake/version_info.cmake
+++ cmake/version_info.cmake
@@ -3,7 +3,7 @@
   # if we build from a git repository, we calculate the file version:
   #  Patch number is numer of commits for given file
   IF(EXISTS ${CMAKE_SOURCE_DIR}/.git)
-    EXECUTE_PROCESS(COMMAND git --git-dir=${CMAKE_BINARY_DIR}/.git --work-tree=${CMAKE_SOURCE_DIR} rev-list HEAD --count -- ${FILE_NAME}
+    EXECUTE_PROCESS(COMMAND git --git-dir=${CMAKE_SOURCE_DIR}/.git --work-tree=${CMAKE_SOURCE_DIR} rev-list HEAD --count -- ${FILE_NAME}
       OUTPUT_VARIABLE FV)
     STRING(REPLACE "\n" "" FV ${FV})
     SET(${FILE_VERSION} ${FV} PARENT_SCOPE)


Improve detection of TBB

Improve detection of TBB

- Detect OSS version library location
- Extend to more recent versions of msvc compiler

--- ext/cmake_modules/FindTBB.cmake
+++ ext/cmake_modules/FindTBB.cmake
@@ -53,6 +53,7 @@
 # TBB_FOUND, If false, don't try to use TBB.
 # TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h

+cmake_policy(SET CMP0054 NEW)

 if (WIN32)
     # has em64t/vc8 em64t/vc9
@@ -74,6 +75,12 @@
     if(MSVC10)
         set(_TBB_COMPILER "vc10")
     endif(MSVC10)
+    if(MSVC11)
+        set(_TBB_COMPILER "vc11")
+    endif(MSVC11)
+    if(MSVC12)
+        set(_TBB_COMPILER "vc12")
+    endif(MSVC12)
     # Todo: add other Windows compilers such as ICL.
     set(_TBB_ARCHITECTURE ${TBB_ARCHITECTURE})
 endif (WIN32)
@@ -176,6 +183,8 @@
     string(REPLACE vc8 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
     string(REPLACE vc9 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
     string(REPLACE vc10 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc11 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
+    string(REPLACE vc12 "${_TBB_COMPILER}" ${var_name} ${${var_name}})
 endmacro(TBB_CORRECT_LIB_DIR var_content)

@@ -208,6 +217,9 @@
     #       ENV{TBB_ARCH_PLATFORM} and the TBB_ARCHITECTURE and TBB_COMPILER
     #       variables and search them both.
     set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}/lib" ${_TBB_LIBRARY_DIR})
+    if (NOT ${_TBB_LIBRARY_DIR})
+      set (_TBB_LIBRARY_DIR "${_TBB_INSTALL_DIR}/lib/${_TBB_ARCHITECTURE}/${_TBB_COMPILER}" ${_TBB_LIBRARY_DIR})
+    endif(NOT ${_TBB_LIBRARY_DIR})
 endif ((NOT ${TBB_ARCHITECTURE} STREQUAL "") AND (NOT ${TBB_COMPILER} STREQUAL ""))

 # GvdB: Mac OS X distribution places libraries directly in lib directory.


py/mkrules.cmake: Expand lists in core cmake custom commands.

The core cmake rules use custom commands to invoke qstr processing
scripts. For the zephyr port, it's possible that list arguments to these
commands may contain generator expressions, therefore we need to expand
them properly.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>

---

Updated commit message per Pycopy conventions.

Change-Id: I65ca62514fa718e1a514663c71d4d1d6124dfe8f

--- py/mkrules.cmake
+++ py/mkrules.cmake
@@ -73,6 +73,7 @@
     DEPENDS ${MICROPY_MODULEDEFS}
         ${MICROPY_SOURCE_QSTR}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -81,6 +82,7 @@
     COMMAND touch ${MICROPY_QSTR_DEFS_SPLIT}
     DEPENDS ${MICROPY_QSTR_DEFS_LAST}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -88,6 +90,7 @@
     COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdefs.py cat qstr _ ${MICROPY_GENHDR_DIR}/qstr ${MICROPY_QSTR_DEFS_COLLECTED}
     DEPENDS ${MICROPY_QSTR_DEFS_SPLIT}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -95,6 +98,7 @@
     COMMAND cat ${MICROPY_PY_QSTRDEFS} ${MICROPY_QSTR_DEFS_COLLECTED} | sed "s/^Q(.*)/\"&\"/" | ${CMAKE_C_COMPILER} -E ${MICROPY_CPP_FLAGS} - | sed "s/^\\\"\\(Q(.*)\\)\\\"/\\1/" > ${MICROPY_QSTR_DEFS_PREPROCESSED}
     DEPENDS ${MICROPY_QSTR_DEFS_COLLECTED}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 add_custom_command(
@@ -102,6 +106,7 @@
     COMMAND ${Python3_EXECUTABLE} ${MICROPY_PY_DIR}/makeqstrdata.py ${MICROPY_QSTR_DEFS_PREPROCESSED} > ${MICROPY_QSTR_DEFS_GENERATED}
     DEPENDS ${MICROPY_QSTR_DEFS_PREPROCESSED}
     VERBATIM
+    COMMAND_EXPAND_LISTS
 )

 # Build frozen code if enabled


(maint) - Update libcthun-client file extension

--- vendor/cthun-client.cmake
+++ vendor/cthun-client.cmake
@@ -15,4 +15,4 @@
 )
 externalproject_get_property(cthun-client SOURCE_DIR)
 set(CTHUN_CLIENT_INCLUDE_DIRS "${SOURCE_DIR}/src")
-set(CTHUN_CLIENT_LIB "${SOURCE_DIR}/lib/libcthun-client.a")
+set(CTHUN_CLIENT_LIB "${SOURCE_DIR}/lib/libcthun-client.so")


Removed erroneous lib reference

Removed erroneous lib reference

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -670,7 +670,6 @@
    addLib(glad)
 endif()
 addLib(assimp)
-addLib(meshOptimizer)

 if(WIN32)
     # copy pasted from T3D build system, some might not be needed


Rename to use the new Binaryen's trap mode setting. Tested on Emscripten incoming SDK version 1.37.9.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -1428,7 +1428,7 @@
         endif ()
         if (EMSCRIPTEN_WASM)
             # Allow emitting of code that might trap (for higher performance)
-            list (APPEND LINK_FLAGS "-s WASM=1 -s BINARYEN_IMPRECISE=1")  # TODO: BINARYEN_IMPRECISE could be renamed to BINARYEN_EMIT_POTENTIAL_TRAPS or something like that in the coming release)
+            list (APPEND LINK_FLAGS "-s WASM=1 -s \"BINARYEN_TRAP_MODE='allow'\"")
         endif ()
         if (URHO3D_TESTING)
             # Inject code into the generated Module object to enable capture of stdout, stderr and exit(); and also to enable processing of request parameters as app's arguments


Don't set C++11 standard flag if another c++ standard is passed.

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -54,10 +54,10 @@
     set(CMAKE_BUILD_TYPE "Debug")
 endif (COVERAGE AND NOT MSVC)

-if (C++11)
+if (NOT CMAKE_CXX_STANDARD AND C++11)
     find_package(CXX11 REQUIRED)
     set(CPPUTEST_CXX_FLAGS "${CPPUTEST_CXX_FLAGS} ${CXX11_FLAGS}")
-endif (C++11)
+endif ()

 set(GMOCK_HOME $ENV{GMOCK_HOME})
 if (DEFINED ENV{GMOCK_HOME})


Fixed a bug when CXX_RESULT_VAR was CMAKE_CXX_FLAGS.

--- CMake/mitkFunctionCheckCompilerFlags.cmake
+++ CMake/mitkFunctionCheckCompilerFlags.cmake
@@ -58,6 +58,11 @@
     message(FATAL_ERROR "FLAG_TO_TEST shouldn't be empty")
   endif()

+  # Save the contents of CXX_RESULT_VAR temporarily.
+  # This is needed of ${CXX_RESULT_VAR} is one of the CMAKE_<LANG>_FLAGS_* variables.
+  set(_saved_c_result_var ${${C_RESULT_VAR}})
+  set(_saved_cxx_result_var ${${CXX_RESULT_VAR}})
+
   # Clear all flags. If not, existing flags triggering warnings might lead to
   # false-negatives when checking for certain compiler flags.
   set(CMAKE_C_FLAGS )
@@ -91,13 +96,13 @@
   CHECK_CXX_COMPILER_FLAG(${FLAG_TO_TEST_FIXED} HAS_CXX_FLAG_${suffix})

   if(HAS_CXX_FLAG_${suffix})
-    set(${CXX_RESULT_VAR} "${${CXX_RESULT_VAR}} ${FLAG_TO_TEST}" PARENT_SCOPE)
+    set(${CXX_RESULT_VAR} "${_saved_cxx_result_var} ${FLAG_TO_TEST}" PARENT_SCOPE)
   endif()

   CHECK_C_COMPILER_FLAG(${FLAG_TO_TEST_FIXED} HAS_C_FLAG_${suffix})

   if(HAS_C_FLAG_${suffix})
-    set(${C_RESULT_VAR} "${${C_RESULT_VAR}} ${FLAG_TO_TEST}" PARENT_SCOPE)
+    set(${C_RESULT_VAR} "${_saved_c_result_var} ${FLAG_TO_TEST}" PARENT_SCOPE)
   endif()

 endfunction()


ENH: Updates fftw dependency

ENH: Updates fftw dependency

Updates the fftw dependency to version 3.3.4

Change-Id: I076faac73dd492a5ed1cc1014ea2be681163f99e

--- CMake/itkExternal_FFTW.cmake
+++ CMake/itkExternal_FFTW.cmake
@@ -53,8 +53,8 @@
       set(FFTW_SHARED_FLAG --enable-shared)
     endif()

-    set(_fftw_target_version 3.3.3)
-    set(_fftw_url_md5 "0a05ca9c7b3bfddc8278e7c40791a1c2")
+    set(_fftw_target_version 3.3.4)
+    set(_fftw_url_md5 "2edab8c06b24feeb3b82bbb3ebf3e7b3")
     set(_fftw_url "http://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=${_fftw_url_md5}&name=fftw-${_fftw_target_version}.tar.gz")

     if(ITK_USE_FFTWF)


Update GLM to latest version

Update GLM to latest version

--- CMakeModules/build_glm.cmake
+++ CMakeModules/build_glm.cmake
@@ -1,7 +1,6 @@
-SET(VER 0.9.6.3)
+SET(VER 0.9.7.4)
 SET(URL https://github.com/g-truc/glm/archive/${VER}.tar.gz)
-SET(MD5 bc288083697d25dfbd41a813929086f0)
-
+SET(MD5 475b0092c3baaf6ac899dc0dcd87f898)
 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/glm-${VER}")
 SET(archive ${srcDir}.tar.gz)


updated macros to install in correct place

--- src/CMake/CyclusModuleMacros.cmake
+++ src/CMake/CyclusModuleMacros.cmake
@@ -1,13 +1,13 @@
-macro(cyclus_init  _path _name)
+macro(cyclus_init  _path _dir _name)

   SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY
     ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}${_path})

   # Build the cyclus executable from the CYCLUS_SRC source files
-  ADD_LIBRARY( ${_name}       ${_name}.cc )
+  ADD_LIBRARY( ${_dir}       ${_name}.cc )
   # Link the libraries to libcycluscore
-  TARGET_LINK_LIBRARIES(${_name} dl cycluscore)
-  SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${_name} )
+  TARGET_LINK_LIBRARIES(${_dir} dl cycluscore)
+  SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${_dir} )

   CONFIGURE_FILE(
     ${CYCLUS_SOURCE_DIR}/Core${_path}/${_name}.rng
@@ -15,7 +15,7 @@
     COPYONLY
     )

-  install(TARGETS ${_name}
+  install(TARGETS ${_dir}
     LIBRARY DESTINATION lib${_path}
     COMPONENT ${_path}
     )
@@ -28,7 +28,7 @@

 macro(cyclus_init_model _type _dir _name)
   SET(MODEL_PATH "/Models/${_type}/${_dir}")
-  cyclus_init(${MODEL_PATH} ${_name})
+  cyclus_init(${MODEL_PATH} ${_dir} ${_name})

   SET(${_type}TestSource ${${_type}TestSource}
     ${CMAKE_CURRENT_SOURCE_DIR}/${_name}_tests.cc


SVN_SILENT made messages (.desktop file)

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -55,6 +55,7 @@
 Name[sv]=Gstreamer
 Name[th]=GStreamer
 Name[tr]=GStreamer
+Name[ug]=GStreamer
 Name[uk]=GStreamer
 Name[x-test]=xxGStreamerxx
 Name[zh_CN]=GStreamer


example: Add CHECK_INSTALL_DIR override for FindCheck.cmake

If pkg-config is not installed on the system, then the
FindCheck.cmake script may fail. This is especially likely
on Windows. In this case, we expect that the variable
CHECK_INSTALL_DIR points to the install location of Check.

If this variable is not defined, then the find_path() and
find_library() functions will try to locate Check the
best that it can.

--- doc/example/cmake/FindCheck.cmake
+++ doc/example/cmake/FindCheck.cmake
@@ -24,10 +24,17 @@

 # Look for CHECK include dir and libraries
 IF( NOT CHECK_FOUND )
-
-	FIND_PATH( CHECK_INCLUDE_DIR check.h )
-
-	FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
+	IF ( CHECK_INSTALL_DIR )
+		MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
+		SET ( CHECK_INCLUDE_DIR  "${CHECK_INSTALL_DIR}/include" )
+		SET ( CHECK_INCLUDE_DIRS "${CHECK_INCLUDE_DIR}" )
+		FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
+		FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
+		SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
+	ELSE ( CHECK_INSTALL_DIR )
+		FIND_PATH( CHECK_INCLUDE_DIR check.h )
+		FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
+	ENDIF ( CHECK_INSTALL_DIR )

 	IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
 		SET( CHECK_FOUND 1 )


Bug fixed FindLibRaw to work also on Windows. (#1959)

--- src/cmake/modules/FindLibRaw.cmake
+++ src/cmake/modules/FindLibRaw.cmake
@@ -32,7 +32,7 @@
           PATH_SUFFIXES libraw
          )

-FIND_LIBRARY(LibRaw_LIBRARIES NAMES raw
+FIND_LIBRARY(LibRaw_LIBRARIES NAMES raw libraw
              HINTS
              ${LIBRAW_PATH}
              ${PC_LIBRAW_LIBDIR}
@@ -45,6 +45,10 @@
              ${PC_LIBRAW_R_LIBDIR}
              ${PC_LIBRAW_R_LIBRARY_DIRS}
             )
+
+IF(WIN32)
+   SET( LibRaw_r_LIBRARIES ${LibRaw_LIBRARIES} )
+ENDIF()

 IF(LibRaw_INCLUDE_DIR)
    FILE(READ ${LibRaw_INCLUDE_DIR}/libraw/libraw_version.h _libraw_version_content)


fmurt1062-v1:Update board modules ==FMUv5

--- boards/nxp/fmurt1062-v1/default.cmake
+++ boards/nxp/fmurt1062-v1/default.cmake
@@ -31,13 +31,10 @@
 		gps
 		#heater
 		imu/adis16448
+		imu/adis16477
 		imu/adis16497
-		#imu # all available imu drivers
-		imu/bma180
 		imu/bmi055
-		imu/bmi160
 		imu/mpu6000
-		imu/mpu9250
 		irlock
 		lights/blinkm
 		lights/rgbled
@@ -50,9 +47,10 @@
 		pca9685
 		power_monitor/ina226
 		#protocol_splitter
+#		pwm_input - not ptorable
 		pwm_out_sim
 		px4fmu
-#		rc_input needs serial DMA driver
+		rc_input
 		roboclaw
 		safety_button
 		tap_esc


--- ds9/ds9.desktop.cmake
+++ ds9/ds9.desktop.cmake
@@ -9,6 +9,7 @@
 InitialPreference=15

 Name=DirectShow9
+Name[bs]=DirectShow9
 Name[ca]=DirectShow9
 Name[ca@valencia]=DirectShow9
 Name[cs]=DirectShow9


Default CMAKE_LINK_DEPENDS_SHARED to ON

Default CMAKE_LINK_DEPENDS_SHARED to ON

This helps to speed up builds by only relinking targets to shared
lib dependencies only if the shared lib interfaces have changed.

--- Modules/CetCMakeSettings.cmake
+++ Modules/CetCMakeSettings.cmake
@@ -34,6 +34,39 @@
 #     This applies to both full paths and those created by generator expressions.
 #
 set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
+
+
+# CET projects are (universally?) laid out so that the root source and
+# build directories are equivalent to the root of the include
+# directory.  If we want these to be in the build/install interfaces
+# automatically, can use directory property as listed below to do this
+# Could also provide a macro/function to add additional paths.
+#
+# - Set up so these are always added to the include directories
+#   property in the build interface, and that they always appear first
+#   to avoid clashes with any installed.
+#   Could also set the install interface using CMAKE_INSTALL_INCLUDEDIR
+#   though this would only account for a single use case (e.g. if
+#   a library installed both arch independent AND dependent headers)
+#   However, that's a special case and could be handled by additional
+#   calls to target_include_directories. Advantage of setting
+#   INSTALL_INTERFACE here is that it'll always appear FIRST in the
+#   interface include dirs, so avoiding one source of clashes (if
+#   INTERFACE_INCLUDE_DIRS has absolute paths relating to deps. may
+#   be resolved by going to fully imported targets)
+
+#set_directory_properties(PROPERTIES
+#  INCLUDE_DIRECTORIES
+#  "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR};${PROJECT_BINARY_DIR}>;$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
+#    )
+
+#.rst
+# - ``CMAKE_LINK_DEPENDS_NO_SHARED`` : ON
+#
+#   - Do not relink a target to any shared library dependencies when
+#     only the shared library implementation has changed.
+#
+set(CMAKE_LINK_DEPENDS_NO_SHARED ON)

 #.rst:
 # - ``CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION`` : ON


Neatification

Neatification

--- Modules/CetCurrentSubdir.cmake
+++ Modules/CetCurrentSubdir.cmake
@@ -1,13 +1,10 @@
 # internal function

-function (_cet_current_subdir OUTPUT_VAR)
-
-  if( PACKAGE_TOP_DIRECTORY )
-    STRING( REGEX REPLACE "^${PACKAGE_TOP_DIRECTORY}(.*)" "\\1" OUTPUT_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}" )
+function(_cet_current_subdir OUTPUT_VAR)
+  if(PACKAGE_TOP_DIRECTORY)
+    string(REGEX REPLACE "^${PACKAGE_TOP_DIRECTORY}(.*)" "\\1" OUTPUT_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}")
   else()
-    STRING( REGEX REPLACE "^${CMAKE_SOURCE_DIR}(.*)" "\\1" OUTPUT_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}" )
+    string(REGEX REPLACE "^${CMAKE_SOURCE_DIR}(.*)" "\\1" OUTPUT_SUBDIR "${CMAKE_CURRENT_SOURCE_DIR}")
   endif()
-  ##message(STATUS "_cet_current_subdir found ${OUTPUT_SUBDIR}" )
   set (${OUTPUT_VAR} "${OUTPUT_SUBDIR}" PARENT_SCOPE)
-
 endfunction()