COMP: ExternalProject - set git_EXECUTABLE using Git_EXECUTABLE if already defined

Added to avoid to reconfigure exiting dashboard

--- CMake/ExternalProject.cmake
+++ CMake/ExternalProject.cmake
@@ -771,6 +771,10 @@
     list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
   elseif(git_repository)
     #find_package(Git)
+    # Legacy - Some dashboard are configured using Git_EXECUTABLE
+    if(DEFINED Git_EXECUTABLE)
+      set(git_EXECUTABLE ${Git_EXECUTABLE})
+    endif()
     find_program(git_EXECUTABLE NAMES git.cmd git eg.cmd eg DOC "git command line client")
     if(NOT git_EXECUTABLE)
       message(FATAL_ERROR "error: could not find git for clone of ${name} - Make sure git_EXECUTABLE is set properly")


FIX (#2647): Added gdcm system libraries to linker paths if itk was build using system itk

--- CMake/MITK_ITK_Config.cmake
+++ CMake/MITK_ITK_Config.cmake
@@ -6,6 +6,7 @@
   FIND_PACKAGE(GDCM PATHS ${ITK_GDCM_DIR})
   LIST(APPEND ALL_INCLUDE_DIRECTORIES ${GDCM_INCLUDE_DIRS})
   LIST(APPEND ALL_LIBRARIES ${GDCM_LIBRARIES})
+  link_directories(${ITK_GDCM_DIR}/bin)
 ENDIF(ITK_USE_SYSTEM_GDCM)


[SourceKit/CMake] Make sure the XPC service executable isn't linked with an absolute build directory rpath

rdar://40462455

--- tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
+++ tools/SourceKit/cmake/modules/AddSwiftSourceKit.cmake
@@ -428,6 +428,11 @@

   add_dependencies(${framework_target} ${name})

+  set_target_properties(${name} PROPERTIES
+                        BUILD_WITH_INSTALL_RPATH On
+                        INSTALL_RPATH "@loader_path/../lib"
+                        INSTALL_NAME_DIR "@rpath")
+
   if (SOURCEKIT_DEPLOYMENT_OS MATCHES "^macosx")
     add_custom_command(TARGET ${name} POST_BUILD
       COMMAND ${CMAKE_COMMAND} -E create_symlink "Versions/Current/XPCServices" XPCServices


Switch to version 0.6.0: socket-based liboro

--- conf/LiboroVersion.cmake
+++ conf/LiboroVersion.cmake
@@ -3,5 +3,5 @@
 # Please do not add extra numerals in this file or change its formatting.

 SET(CPACK_PACKAGE_VERSION_MAJOR "0")
-SET(CPACK_PACKAGE_VERSION_MINOR "5")
-SET(CPACK_PACKAGE_VERSION_PATCH "9")
+SET(CPACK_PACKAGE_VERSION_MINOR "6")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")


Update repository URL

Update repository URL

--- Applications/PluginGenerator/ProjectTemplate/CMakeExternals/MITK.cmake
+++ Applications/PluginGenerator/ProjectTemplate/CMakeExternals/MITK.cmake
@@ -110,7 +110,7 @@
   endif()

   set(MITK_SOURCE_DIR "" CACHE PATH "MITK source code location. If empty, MITK will be cloned from MITK_GIT_REPOSITORY")
-  set(MITK_GIT_REPOSITORY "https://phabricator.mitk.org/diffusion/MITK/mitk.git" CACHE STRING "The git repository for cloning MITK")
+  set(MITK_GIT_REPOSITORY "https://phabricator.mitk.org/source/mitk.git" CACHE STRING "The git repository for cloning MITK")
   set(MITK_GIT_TAG "origin/master" CACHE STRING "The git tag/hash to be used when cloning from MITK_GIT_REPOSITORY")
   mark_as_advanced(MITK_SOURCE_DIR MITK_GIT_REPOSITORY MITK_GIT_TAG)


fixed test

fixed test

--- tests/package/project_tests/project_materialization_check_test.cmake
+++ tests/package/project_tests/project_materialization_check_test.cmake
@@ -13,27 +13,29 @@

   ## check that when project is opened no materialization is missing
-  events_track("project_on_package_materialization_missing")
+  events_track("project_on_package_ready" project_on_package_unready)
   ans(tracker)
   project_open()
   ans(project)
-  assertf("{tracker.project_on_package_materialization_missing}" ISNULL)
+  assertf("{tracker.project_on_package_ready}" ISNULL)
+  assertf("{tracker.project_on_package_unready}" ISNULL)

   rm("${test_dir}/packages/mock_A-0.0.0" -r)
   events_track(
-    project_on_package_materialization_missing
+    project_on_package_unready
+    project_on_package_ready
     project_on_package_dematerialized
     project_on_package_dematerializing
     )
   ans(tracker)
   project_open()
   ans(project)
-  assertf("{tracker.project_on_package_materialization_missing}" ISNOTNULL)
-  assertf("{tracker.project_on_package_materialization_missing[0].args[0]}" STREQUAL "${project}")
-  assertf("{tracker.project_on_package_materialization_missing[0].args[1].uri}" STREQUAL "mock:A")
   assertf("{tracker.project_on_package_dematerialized}" ISNOTNULL)
   assertf("{tracker.project_on_package_dematerializing}" ISNOTNULL)
+
+  assertf("{tracker.project_on_package_unready}" ISNOTNULL)
+  assertf("{tracker.project_on_package_ready}" ISNULL)


iOS: Fix FindOGRE.cmake to detect libs again

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -120,8 +120,13 @@
   foreach(dir ${OGRE_PREFIX_BUILD})
     set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH})
     set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH})
+
+    if (OGRE_BUILD_PLATFORM_APPLE_IOS)
+        set(OGRE_LIB_SEARCH_PATH ${dir}/lib/iphoneos ${dir}/lib/iphonesimulator ${OGRE_LIB_SEARCH_PATH})
+    endif()
+
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
-	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
+    set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)

   if (OGRE_PREFIX_DEPENDENCIES_DIR)


Turn off eigen alignment for 32 bit systems

Eigen alignment is working inconsistently on 32 bit linux in Release
mode, and not at all for Debug 32 bit builds. So we will turn it off by
default for all 32 bit systems (it was already off for 32 bit Windows),
and leave it on for 64 bit builds.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -122,18 +122,14 @@
 endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

 set(DEFAULT_EIGEN_ALIGNMENT OFF)
-# Enable alignement on linux by default
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	set(DEFAULT_EIGEN_ALIGNMENT ON)
-endif()
-
-# Enable alignement on Windows 64bit by default
-if(${CMAKE_CL_64})
+# Enable alignement on 64bit systems by default
+if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8")
 	set(DEFAULT_EIGEN_ALIGNMENT ON)
 endif()

 option(EIGEN_ALIGNMENT "Enable alignment in Eigen" ${DEFAULT_EIGEN_ALIGNMENT})
 mark_as_advanced(EIGEN_ALIGNMENT)
+
 if(NOT EIGEN_ALIGNMENT)
 	add_definitions( -DEIGEN_DONT_ALIGN )
 endif()


COMP: fix typo

COMP: fix typo

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

 if(BUILD_TESTING)

-  set(revision_tag 255cba2)
+  set(revision_tag 255cba29)
   #if(${proj}_REVISION_TAG)
   #  set(revision_tag ${${proj}_REVISION_TAG})
   #endif()


Don't necessarily enforce that we must build client or server - we have utilities.

--- cmake-local/osvrBuildOptions.cmake
+++ cmake-local/osvrBuildOptions.cmake
@@ -37,10 +37,6 @@

 option(BUILD_HEADER_DEPENDENCY_TESTS "Should we add targets to ensure that every public header compiles cleanly on its own? Increases number of targets greatly..." ${OSVR_ON_UNLESS_SUBPROJECT})

-if(NOT BUILD_CLIENT AND NOT BUILD_SERVER)
-    message(FATAL_ERROR "Must have at least one of BUILD_CLIENT and BUILD_SERVER enabled!")
-endif()
-
 # Consistency: can't build the examples, apps, etc if you don't have the library
 set(dependent_options
     BUILD_SERVER_EXAMPLES


Refs #2398. Fixed error

Refs #2398. Fixed error

--- cmake/dev/eprosima_libraries.cmake
+++ cmake/dev/eprosima_libraries.cmake
@@ -252,6 +252,8 @@
                 FILES_MATCHING
                 PATTERN "*d.*"
                 PATTERN "*d-*.*"
+                PATTERN "*.cmake"
+                PATTERN "*-${BUILD_TYPE_INSTALLATION}.cmake" EXCLUDE
                 )

             install(DIRECTORY ${PROJECT_BINARY_DIR}/external/install/${LIB_INSTALL_DIR}/
@@ -263,6 +265,7 @@
                 PATTERN "*"
                 PATTERN "*d.*" EXCLUDE
                 PATTERN "*d-*.*" EXCLUDE
+                PATTERN "*-debug.cmake" EXCLUDE
                 )

             # Install licenses


fixed: remote required on findcuda

fixed: remote required on findcuda

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@2236 4683daeb-ad0f-0410-a623-93161e962ae5

--- Source/Contrib/Compute/OSGContribCompute.Prepare.cmake
+++ Source/Contrib/Compute/OSGContribCompute.Prepare.cmake
@@ -6,7 +6,7 @@
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CMAKE_CURRENT_LIST_DIR}/CMake")
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CMAKE_CURRENT_LIST_DIR}/CMake/cuda")

-FIND_PACKAGE(CUDA QUIET REQUIRED)
+FIND_PACKAGE(CUDA QUIET)

 INCLUDE(ConfigurePackagesExt)


Don't use ctest for testing anymore

Don't use ctest for testing anymore

Don't need to actually run test cases as tests. This was causing
problems with two sets of tests accessing the same database and being
run in parallel

Instead, just add the test executable as a target with a dependency on
the executable and the check target

--- cmake/includes/UnitTest.cmake
+++ cmake/includes/UnitTest.cmake
@@ -25,17 +25,6 @@
         message(FATAL_ERROR "Set NAME parameter to the project name")
     endif()

-    enable_testing()
-
-    if (CMAKE_CONFIGURATION_TYPES)
-        add_custom_target(check-${TEST_NAME} COMMAND ${CMAKE_CTEST_COMMAND}
-            --force-new-ctest-process --output-on-failure --verbose
-            --build-config "$<CONFIGURATION>")
-    else()
-        add_custom_target(check-${TEST_NAME} COMMAND ${CMAKE_CTEST_COMMAND}
-            --force-new-ctest-process --output-on-failure --verbose)
-    endif()
-
     if (TEST_INCLUDES)
         include_directories(${TEST_INCLUDES})
     endif()
@@ -51,7 +40,9 @@
         ${TEST_NAME}
         ${TEST_LIBRARIES})

-    add_test(${TEST_NAME}-test test/${TEST_NAME}-test --log_level=all)
+    add_custom_target(check-${TEST_NAME} COMMAND
+        test/${TEST_NAME}-test --log_level=all)
+    add_dependencies(${TEST_NAME}-test ${TEST_NAME})
     add_dependencies(check-${TEST_NAME} ${TEST_NAME}-test)
     add_dependencies(check check-${TEST_NAME})


FindGMock: only add existing and correct include dirs

This prevents attempting to include things from
/usr/src/gmock/include/gmock/gmock.h, which in Ubuntu Trusty's
google-mock package doesn't exist at that location.

--- cmake/modules/FindGMock.cmake
+++ cmake/modules/FindGMock.cmake
@@ -353,6 +353,22 @@
         endif()
     else()
         message(STATUS "Building Gmock / Gtest from dir ${GMOCK_SRC_DIR}")
+
+        if(EXISTS "${GMOCK_SRC_DIR}/gtest/include/gtest/gtest.h")
+            set(GTEST_INCLUDE_DIR "${GMOCK_SRC_DIR}/gtest/include")
+            mark_as_advanced(GTEST_INCLUDE_DIR)
+        endif()
+        if(EXISTS "${GMOCK_SRC_DIR}/include/gmock/gmock.h")
+            set(GMOCK_INCLUDE_DIR "${GMOCK_SRC_DIR}/include")
+            mark_as_advanced(GMOCK_INCLUDE_DIR)
+        elseif(EXISTS "${GMOCK_SRC_DIR}/../../include/gmock/gmock.h")
+            set(GMOCK_INCLUDE_DIR "${GMOCK_SRC_DIR}/../../include")
+            if(IS_ABSOLUTE "${GMOCK_INCLUDE_DIR}")
+                get_filename_component(GMOCK_INCLUDE_DIR "${GMOCK_INCLUDE_DIR}" ABSOLUTE)
+            endif()
+            mark_as_advanced(GMOCK_INCLUDE_DIR)
+        endif()
+
         externalproject_add(
             gmock
             SOURCE_DIR ${GMOCK_SRC_DIR}
@@ -371,15 +387,11 @@
         add_dependencies(GMock::GMock gmock)
         add_dependencies(GMock::Main gmock)

-        externalproject_get_property(gmock source_dir binary_dir)
-        set(GTEST_INCLUDE_DIR "${source_dir}/gtest/include")
-        mark_as_advanced(GTEST_INCLUDE_DIR)
+        externalproject_get_property(gmock binary_dir)
         set(GTEST_LIBRARY "${binary_dir}/gtest/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
         mark_as_advanced(GTEST_LIBRARY)
         set(GTEST_MAIN_LIBRARY "${binary_dir}/gtest/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gtest_main${CMAKE_STATIC_LIBRARY_SUFFIX}")
         mark_as_advanced(GTEST_MAIN_LIBRARY)
-        set(GMOCK_INCLUDE_DIR "${source_dir}/include")
-        mark_as_advanced(GMOCK_INCLUDE_DIR)
         set(GMOCK_LIBRARY "${binary_dir}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}")
         mark_as_advanced(GMOCK_LIBRARY)
         set(GMOCK_MAIN_LIBRARY "${binary_dir}/${CMAKE_CFG_INTDIR}/${GTEST_LIBRARY_PREFIX}gmock_main${CMAKE_STATIC_LIBRARY_SUFFIX}")


Add CMAKE_EXECUTABLE_SUFFIX to build with Android toolchain on Windows.

Reviewers: vharron, zturner, flackr

Subscribers: tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D9177

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

--- cmake/platforms/Android.cmake
+++ cmake/platforms/Android.cmake
@@ -64,20 +64,25 @@
 set( ANDROID_TOOLCHAIN_DIR "${ANDROID_TOOLCHAIN_DIR}" CACHE INTERNAL "Android standalone toolchain directory" FORCE )
 set( ANDROID_SYSROOT "${ANDROID_TOOLCHAIN_DIR}/sysroot" CACHE INTERNAL "Android Sysroot" FORCE )

+# CMAKE_EXECUTABLE_SUFFIX is undefined in CMAKE_TOOLCHAIN_FILE
+if( WIN32 )
+ set( EXECUTABLE_SUFFIX ".exe" )
+endif()
+
 # force python exe to be the one in Android toolchian
-set( PYTHON_EXECUTABLE "${ANDROID_TOOLCHAIN_DIR}/bin/python" CACHE INTERNAL "Python exec path" FORCE )
+set( PYTHON_EXECUTABLE "${ANDROID_TOOLCHAIN_DIR}/bin/python${EXECUTABLE_SUFFIX}" CACHE INTERNAL "Python exec path" FORCE )

 if( NOT CMAKE_C_COMPILER )
- set( CMAKE_C_COMPILER   "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-gcc"     CACHE PATH "C compiler" )
- set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-g++"     CACHE PATH "C++ compiler" )
- set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-gcc"     CACHE PATH "assembler" )
- set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-strip"   CACHE PATH "strip" )
- set( CMAKE_AR           "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-ar"      CACHE PATH "archive" )
- set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-ld"      CACHE PATH "linker" )
- set( CMAKE_NM           "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-nm"      CACHE PATH "nm" )
- set( CMAKE_OBJCOPY      "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-objcopy" CACHE PATH "objcopy" )
- set( CMAKE_OBJDUMP      "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-objdump" CACHE PATH "objdump" )
- set( CMAKE_RANLIB       "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-ranlib"  CACHE PATH "ranlib" )
+ set( CMAKE_C_COMPILER   "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-gcc${EXECUTABLE_SUFFIX}"     CACHE PATH "C compiler" )
+ set( CMAKE_CXX_COMPILER "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-g++${EXECUTABLE_SUFFIX}"     CACHE PATH "C++ compiler" )
+ set( CMAKE_ASM_COMPILER "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-gcc${EXECUTABLE_SUFFIX}"     CACHE PATH "assembler" )
+ set( CMAKE_STRIP        "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-strip${EXECUTABLE_SUFFIX}"   CACHE PATH "strip" )
+ set( CMAKE_AR           "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-ar${EXECUTABLE_SUFFIX}"      CACHE PATH "archive" )
+ set( CMAKE_LINKER       "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-ld${EXECUTABLE_SUFFIX}"      CACHE PATH "linker" )
+ set( CMAKE_NM           "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-nm${EXECUTABLE_SUFFIX}"      CACHE PATH "nm" )
+ set( CMAKE_OBJCOPY      "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-objcopy${EXECUTABLE_SUFFIX}" CACHE PATH "objcopy" )
+ set( CMAKE_OBJDUMP      "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-objdump${EXECUTABLE_SUFFIX}" CACHE PATH "objdump" )
+ set( CMAKE_RANLIB       "${ANDROID_TOOLCHAIN_DIR}/bin/${ANDROID_TOOLCHAIN_NAME}-ranlib${EXECUTABLE_SUFFIX}"  CACHE PATH "ranlib" )
 endif()

 set( ANDROID_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT} -pie -fPIE -funwind-tables -fsigned-char -no-canonical-prefixes" )


mention how to bundle eigen3

mention how to bundle eigen3

--- README.cmake
+++ README.cmake
@@ -1,6 +1,8 @@
 # getting a list of possible interfaces to enable:
 grep -E "OPTION.*(Modular|Static)" CMakeLists.txt

+# if eigen3 or json-c are missing use the following to download and compile these dependencies
+cmake -DBUNDLE_EIGEN=ON -DBUNDLE_JSON=ON

 # setup cmake for developers (debugging symbols on, optimization off, etc.):
 mkdir build-debug


--- Source/TensileConfig.cmake
+++ Source/TensileConfig.cmake
@@ -31,8 +31,9 @@
     Tensile_SHORT_FILE_NAMES
     Tensile_LIBRARY_PRINT_DEBUG )

+  # Tensile_ROOT can be specified instead of installing
   set(oneValueArgs Tensile_ROOT)
-  cmake_parse_arguments(PARSE "${oneValueArgs}" ${ARGN})
+  cmake_parse_arguments(PARSE "" "${oneValueArgs}" "" ${ARGN})

   if(PARSE_Tensile_ROOT)
     # python not pre-installed, use scripts downloaded to extern/Tensile


FindOGRE.cmake fixes:
- Use OGRE_DEPENDENCIES_DIR if defined (external dependencies)
- Find media in the OGRE_SOURCE folder correctly
- Use a zip file common to 1.6 and 1.7 to detect media (OgreCore.zip doesn't exist anymore in 1.7+)

--HG--
branch : v1-7

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -58,6 +58,7 @@
 getenv_path(OGRE_SDK)
 getenv_path(OGRE_SOURCE)
 getenv_path(OGRE_BUILD)
+getenv_path(OGRE_DEPENDENCIES_DIR)
 getenv_path(PROGRAMFILES)

@@ -99,6 +100,7 @@
 # If both OGRE_BUILD and OGRE_SOURCE are set, prepare to find Ogre in a build dir
 set(OGRE_PREFIX_SOURCE ${OGRE_SOURCE} ${ENV_OGRE_SOURCE})
 set(OGRE_PREFIX_BUILD ${OGRE_BUILD} ${ENV_OGRE_BUILD})
+set(OGRE_PREFIX_DEPENDENCIES_DIR ${OGRE_DEPENDENCIES_DIR} ${ENV_OGRE_DEPENDENCIES_DIR})
 if (OGRE_PREFIX_SOURCE AND OGRE_PREFIX_BUILD)
   foreach(dir ${OGRE_PREFIX_SOURCE})
     set(OGRE_INC_SEARCH_PATH ${dir}/OgreMain/include ${dir}/Dependencies/include ${dir}/iPhoneDependencies/include ${OGRE_INC_SEARCH_PATH})
@@ -111,6 +113,12 @@
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
 	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)
+
+  if (OGRE_PREFIX_DEPENDENCIES_DIR)
+    set(OGRE_INC_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/include ${OGRE_INC_SEARCH_PATH})
+    set(OGRE_LIB_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/lib ${OGRE_LIB_SEARCH_PATH})
+    set(OGRE_BIN_SEARCH_PATH ${OGRE_PREFIX_DEPENDENCIES_DIR}/bin ${OGRE_BIN_SEARCH_PATH})
+  endif()
 else()
   set(OGRE_PREFIX_SOURCE "NOTFOUND")
   set(OGRE_PREFIX_BUILD "NOTFOUND")
@@ -493,6 +501,7 @@

 # look for the media directory
 set(OGRE_MEDIA_SEARCH_PATH
+  ${OGRE_SOURCE}
   ${OGRE_LIBRARY_DIR_REL}/..
   ${OGRE_LIBRARY_DIR_DBG}/..
   ${OGRE_LIBRARY_DIR_REL}/../..
@@ -500,12 +509,13 @@
   ${OGRE_PREFIX_SOURCE}
 )
 set(OGRE_MEDIA_SEARCH_SUFFIX
+  Samples/Media
   Media
   media
   share/OGRE/media
-  Samples/Media
 )
+
 clear_if_changed(OGRE_PREFIX_WATCH OGRE_MEDIA_DIR)
-find_path(OGRE_MEDIA_DIR NAMES packs/OgreCore.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
+find_path(OGRE_MEDIA_DIR NAMES packs/cubemapsJS.zip HINTS ${OGRE_MEDIA_SEARCH_PATH}
   PATHS ${OGRE_PREFIX_PATH} PATH_SUFFIXES ${OGRE_MEDIA_SEARCH_SUFFIX})


ENH: enable extra qt gui code

ENH: enable extra qt gui code

--- CMakeExternals/PythonQt.cmake
+++ CMakeExternals/PythonQt.cmake
@@ -44,7 +44,9 @@
         -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
         -DPYTHON_INCLUDE_DIR:PATH=${PYTHON_INCLUDE_DIR}
         -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}
+        -DPYTHON_LIBRARY:FILEPATH=${PYTHON_LIBRARY}
+        -DPythonQt_Wrap_QtGui:BOOL=ON
       )
     SET(PYTHONQT_INSTALL_DIR ${ep_install_dir})
   ENDIF()
-ENDIF()+ENDIF()


disable -Werror as it breaks some of cmakes tests

--- CMakeModules/BaseConfig.cmake
+++ CMakeModules/BaseConfig.cmake
@@ -6,7 +6,7 @@
 ENDIF(NOT CMAKE_BUILD_TYPE)

 if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    SET(RSN_BASE_C_FLAGS "-std=c99 -pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter -Werror -Wno-newline-eof")
+    SET(RSN_BASE_C_FLAGS "-std=c99 -pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter -Wno-newline-eof")
     SET(RSN_BASE_CXX_FLAGS "-Wall")

     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${RSN_BASE_C_FLAGS} -DLUA_USE_MKSTEMP")


fix small bug that occured when cmake was 'rerun'

--- Numerics/cmake/FindBLAS.cmake
+++ Numerics/cmake/FindBLAS.cmake
@@ -20,6 +20,8 @@
 # If neither WITH_BLAS nor BLAS_DIR is set, all implementation are searched in this order : mkl, openblas, accelerate, veclib, atlas, generic.
 # If available, pkg-config system is used to give hints to cmake search process.
 #
+
+
 if(NOT BLAS_FOUND)

   include(CheckFunctionExists)
@@ -381,7 +383,7 @@
 	)
     endif()
     if(BLAS_INCLUDE_DIRS)
-      set(BLAS_FOUND 1)
+      set(BLAS_FOUND 1 CACHE BOOL "Blas lib and headers have been found.")
     endif()
   endif()


Add i2cdetect to K66

Add i2cdetect to K66

--- boards/nxp/fmuk66-v3/default.cmake
+++ boards/nxp/fmuk66-v3/default.cmake
@@ -78,6 +78,7 @@

 	SYSTEMCMDS
 		bl_update
+		i2cdetect
 		config
 		dumpfile
 		esc_calib


Android toolchain file sync with original project.

Original project: https://github.com/taka-no-me/android-cmake/
Revision: 5db45cfb87fec180b74963d3680dd60d4d8d8c3a

--- platforms/android/android.toolchain.cmake
+++ platforms/android/android.toolchain.cmake
@@ -1,5 +1,5 @@
 # Copyright (c) 2010-2011, Ethan Rublee
-# Copyright (c) 2011-2013, Andrey Kamaev
+# Copyright (c) 2011-2014, Andrey Kamaev
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -12,9 +12,9 @@
 #     this list of conditions and the following disclaimer in the documentation
 #     and/or other materials provided with the distribution.
 #
-# 3.  The name of the copyright holders may be used to endorse or promote
-#     products derived from this software without specific prior written
-#     permission.
+# 3.  Neither the name of the copyright holder nor the names of its
+#     contributors may be used to endorse or promote products derived from this
+#     software without specific prior written permission.
 #
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -29,12 +29,12 @@
 # POSSIBILITY OF SUCH DAMAGE.

 # ------------------------------------------------------------------------------
-#  Android CMake toolchain file, for use with the Android NDK r5-r8
+#  Android CMake toolchain file, for use with the Android NDK r5-r9
 #  Requires cmake 2.6.3 or newer (2.8.5 or newer is recommended).
 #  See home page: https://github.com/taka-no-me/android-cmake
 #
 #  The file is mantained by the OpenCV project. The latest version can be get at
-#  https://github.com/Itseez/opencv/tree/master/platforms/android/android.toolchain.cmake
+#  http://code.opencv.org/projects/opencv/repository/revisions/master/changes/android/android.toolchain.cmake
 #
 #  Usage Linux:
 #   $ export ANDROID_NDK=/absolute/path/to/the/android-ndk
@@ -87,8 +87,7 @@
 #        "armeabi-v6 with VFP" - tuned for ARMv6 processors having VFP.
 #        "x86" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
-#        "mips" - matches to the NDK ABI with the same name
-#            (It is not tested on real devices by the authos of this toolchain)
+#        "mips" - matches to the NDK ABI with the same name.
 #            See ${ANDROID_NDK}/docs/CPU-ARCH-ABIS.html for the documentation.
 #
 #    ANDROID_NATIVE_API_LEVEL=android-8 - level of Android API compile for.
@@ -292,6 +291,16 @@
 #   - April 2013
 #     [+] support non-release NDK layouts (from Linaro git and Android git)
 #     [~] automatically detect if explicit link to crtbegin_*.o is needed
+#   - June 2013
+#     [~] fixed stl include path for standalone toolchain made by NDK >= r8c
+#   - July 2013
+#     [+] updated for NDK r9
+#   - November 2013
+#     [+] updated for NDK r9b
+#   - December 2013
+#     [+] updated for NDK r9c
+#   - January 2014
+#     [~] fix copying of shared STL
 # ------------------------------------------------------------------------------

 cmake_minimum_required( VERSION 2.6.3 )
@@ -318,7 +327,7 @@
 # rpath makes low sence for Android
 set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." )

-set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
+set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9c -r9b -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" )
 if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS)
  if( CMAKE_HOST_WIN32 )
   file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS )
@@ -464,7 +473,7 @@

 # detect current host platform
-if( NOT DEFINED ANDROID_NDK_HOST_X64 AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64")
+if( NOT DEFINED ANDROID_NDK_HOST_X64 AND (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64|x86_64|AMD64" OR CMAKE_HOST_APPLE) )
  set( ANDROID_NDK_HOST_X64 1 CACHE BOOL "Try to use 64-bit compiler toolchain" )
  mark_as_advanced( ANDROID_NDK_HOST_X64 )
 endif()
@@ -484,9 +493,7 @@
  message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" )
 endif()

-# CMAKE_HOST_SYSTEM_PROCESSOR on MacOS X always says i386 on Intel platform
-# So we do not trust ANDROID_NDK_HOST_X64 on Apple hosts
-if( NOT ANDROID_NDK_HOST_X64 AND NOT CMAKE_HOST_APPLE)
+if( NOT ANDROID_NDK_HOST_X64 )
  set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} )
 endif()

@@ -634,30 +641,27 @@

 macro( __GLOB_NDK_TOOLCHAINS __availableToolchainsVar __availableToolchainsLst __toolchain_subpath )
  foreach( __toolchain ${${__availableToolchainsLst}} )
-  # Skip renderscript folder. It's not C++ toolchain
-  if (NOT ${__toolchain} STREQUAL "renderscript")
-   if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
-     string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
-   else()
-     set( __gcc_toolchain "${__toolchain}" )
+  if( "${__toolchain}" MATCHES "-clang3[.][0-9]$" AND NOT EXISTS "${ANDROID_NDK_TOOLCHAINS_PATH}/${__toolchain}${__toolchain_subpath}" )
+   string( REGEX REPLACE "-clang3[.][0-9]$" "-4.6" __gcc_toolchain "${__toolchain}" )
+  else()
+   set( __gcc_toolchain "${__toolchain}" )
+  endif()
+  __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
+  if( __machine )
+   string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
+   if( __machine MATCHES i686 )
+    set( __arch "x86" )
+   elseif( __machine MATCHES arm )
+    set( __arch "arm" )
+   elseif( __machine MATCHES mipsel )
+    set( __arch "mipsel" )
    endif()
-   __DETECT_TOOLCHAIN_MACHINE_NAME( __machine "${ANDROID_NDK_TOOLCHAINS_PATH}/${__gcc_toolchain}${__toolchain_subpath}" )
-   if( __machine )
-    string( REGEX MATCH "[0-9]+[.][0-9]+([.][0-9x]+)?$" __version "${__gcc_toolchain}" )
-    if( __machine MATCHES i686 )
-     set( __arch "x86" )
-    elseif( __machine MATCHES arm )
-     set( __arch "arm" )
-    elseif( __machine MATCHES mipsel )
-     set( __arch "mipsel" )
-    endif()
-    list( APPEND __availableToolchainMachines "${__machine}" )
-    list( APPEND __availableToolchainArchs "${__arch}" )
-    list( APPEND __availableToolchainCompilerVersions "${__version}" )
-    list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
-   endif()
-   unset( __gcc_toolchain )
-  endif()
+   list( APPEND __availableToolchainMachines "${__machine}" )
+   list( APPEND __availableToolchainArchs "${__arch}" )
+   list( APPEND __availableToolchainCompilerVersions "${__version}" )
+   list( APPEND ${__availableToolchainsVar} "${__toolchain}" )
+  endif()
+  unset( __gcc_toolchain )
  endforeach()
 endmacro()

@@ -687,6 +691,7 @@
   endif()
   __LIST_FILTER( __availableToolchainsLst "^[.]" )
   __LIST_FILTER( __availableToolchainsLst "llvm" )
+  __LIST_FILTER( __availableToolchainsLst "renderscript" )
   __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH}" )
   if( NOT __availableToolchains AND NOT ANDROID_NDK_TOOLCHAINS_SUBPATH STREQUAL ANDROID_NDK_TOOLCHAINS_SUBPATH2 )
    __GLOB_NDK_TOOLCHAINS( __availableToolchains __availableToolchainsLst "${ANDROID_NDK_TOOLCHAINS_SUBPATH2}" )
@@ -975,7 +980,11 @@
  set( ANDROID_SYSROOT "${ANDROID_STANDALONE_TOOLCHAIN}/sysroot" )

  if( NOT ANDROID_STL STREQUAL "none" )
-  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
+  set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/include/c++/${ANDROID_COMPILER_VERSION}" )
+  if( NOT EXISTS "${ANDROID_STL_INCLUDE_DIRS}" )
+   # old location ( pre r8c )
+   set( ANDROID_STL_INCLUDE_DIRS "${ANDROID_STANDALONE_TOOLCHAIN}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/include/c++/${ANDROID_COMPILER_VERSION}" )
+  endif()
   if( ARMEABI_V7A AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}/bits" )
    list( APPEND ANDROID_STL_INCLUDE_DIRS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/${CMAKE_SYSTEM_PROCESSOR}" )
   elseif( ARMEABI AND NOT ANDROID_FORCE_ARM_BUILD AND EXISTS "${ANDROID_STL_INCLUDE_DIRS}/${ANDROID_TOOLCHAIN_MACHINE_NAME}/thumb/bits" )
@@ -1130,15 +1139,7 @@
 # case of shared STL linkage
 if( ANDROID_STL MATCHES "shared" AND DEFINED __libstl )
  string( REPLACE "_static.a" "_shared.so" __libstl "${__libstl}" )
- if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" )
-  get_filename_component( __libstlname "${__libstl}" NAME )
-  execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
-  if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
-   message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
-  endif()
-  unset( __fileCopyProcess )
-  unset( __libstlname )
- endif()
+ # TODO: check if .so file exists before the renaming
 endif()

@@ -1503,7 +1504,8 @@

 # global includes and link directories
 include_directories( SYSTEM "${ANDROID_SYSROOT}/usr/include" ${ANDROID_STL_INCLUDE_DIRS} )
-link_directories( "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" )
+get_filename_component(__android_install_path "${CMAKE_INSTALL_PREFIX}/libs/${ANDROID_NDK_ABI_NAME}" ABSOLUTE) # avoid CMP0015 policy warning
+link_directories( "${__android_install_path}" )

 # detect if need link crtbegin_so.o explicitly
 if( NOT DEFINED ANDROID_EXPLICIT_CRT_LINK )
@@ -1554,6 +1556,18 @@
  endif()
  set( LIBRARY_OUTPUT_PATH "${LIBRARY_OUTPUT_PATH_ROOT}/libs/${ANDROID_NDK_ABI_NAME}" CACHE PATH "path for android libs" )
 endif()
+
+# copy shaed stl library to build directory
+if( NOT _CMAKE_IN_TRY_COMPILE AND __libstl MATCHES "[.]so$" )
+ get_filename_component( __libstlname "${__libstl}" NAME )
+ execute_process( COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${__libstl}" "${LIBRARY_OUTPUT_PATH}/${__libstlname}" RESULT_VARIABLE __fileCopyProcess )
+ if( NOT __fileCopyProcess EQUAL 0 OR NOT EXISTS "${LIBRARY_OUTPUT_PATH}/${__libstlname}")
+  message( SEND_ERROR "Failed copying of ${__libstl} to the ${LIBRARY_OUTPUT_PATH}/${__libstlname}" )
+ endif()
+ unset( __fileCopyProcess )
+ unset( __libstlname )
+endif()
+

 # set these global flags for cmake client scripts to change behavior
 set( ANDROID True )
@@ -1663,6 +1677,19 @@
 endif()

+# force cmake to produce / instead of \ in build commands for Ninja generator
+if( CMAKE_GENERATOR MATCHES "Ninja" AND CMAKE_HOST_WIN32 )
+ # it is a bad hack after all
+ # CMake generates Ninja makefiles with UNIX paths only if it thinks that we are going to build with MinGW
+ set( CMAKE_COMPILER_IS_MINGW TRUE ) # tell CMake that we are MinGW
+ set( CMAKE_CROSSCOMPILING TRUE )    # stop recursion
+ enable_language( C )
+ enable_language( CXX )
+ # unset( CMAKE_COMPILER_IS_MINGW ) # can't unset because CMake does not convert back-slashes in response files without it
+ unset( MINGW )
+endif()
+
+
 # set some obsolete variables for backward compatibility
 set( ANDROID_SET_OBSOLETE_VARIABLES ON CACHE BOOL "Define obsolete Andrid-specific cmake variables" )
 mark_as_advanced( ANDROID_SET_OBSOLETE_VARIABLES )
@@ -1717,7 +1744,7 @@
 #   BUILD_WITH_STANDALONE_TOOLCHAIN : TRUE if standalone toolchain is used
 #   ANDROID_NDK_HOST_SYSTEM_NAME : "windows", "linux-x86" or "darwin-x86" depending on host platform
 #   ANDROID_NDK_ABI_NAME : "armeabi", "armeabi-v7a", "x86" or "mips" depending on ANDROID_ABI
-#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e; set only for NDK
+#   ANDROID_NDK_RELEASE : one of r5, r5b, r5c, r6, r6b, r7, r7b, r7c, r8, r8b, r8c, r8d, r8e, r9, r9b, r9c; set only for NDK
 #   ANDROID_ARCH_NAME : "arm" or "x86" or "mips" depending on ANDROID_ABI
 #   ANDROID_SYSROOT : path to the compiler sysroot
 #   TOOL_OS_SUFFIX : "" or ".exe" depending on host platform


fix nom.

fix nom.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -2,7 +2,7 @@
 # the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
 SET (NIGHTLY_START_TIME "00:10:00 EDT")

-SET (BUILDNAME "${BUILDNAME}_${CMAKE_BUILD_TYPE}")
+SET (BUILDNAME "${BUILDNAME}${CMAKE_BUILD_TYPE}")

 # Dart server to submit results (used by client)


removed some entries

removed some entries

--- Modules/QmitkExt/files.cmake
+++ Modules/QmitkExt/files.cmake
@@ -2,12 +2,12 @@

  QmitkApplicationBase/QmitkCommonFunctionality.cpp

- QmitkModels/QmitkDataStorageListModel.cpp
- QmitkModels/QmitkPropertiesTableModel.cpp
- QmitkModels/QmitkDataStorageTreeModel.cpp
- QmitkModels/QmitkDataStorageTableModel.cpp
- QmitkModels/QmitkPropertyDelegate.cpp
- QmitkModels/QmitkPointListModel.cpp
+ #QmitkModels/QmitkDataStorageListModel.cpp
+ #QmitkModels/QmitkPropertiesTableModel.cpp
+ #QmitkModels/QmitkDataStorageTreeModel.cpp
+ #QmitkModels/QmitkDataStorageTableModel.cpp
+ #QmitkModels/QmitkPropertyDelegate.cpp
+ #QmitkModels/QmitkPointListModel.cpp

  QmitkPropertyObservers/QmitkBasePropertyView.cpp
  QmitkPropertyObservers/QmitkBoolPropertyEditor.cpp
@@ -24,7 +24,7 @@
  QmitkPropertyObservers/QmitkNumberPropertySlider.cpp

  qclickablelabel.cpp
- QmitkAbortEventFilter.cpp
+ #QmitkAbortEventFilter.cpp
  QmitkApplicationCursor.cpp
  QmitkCallbackFromGUIThread.cpp
  QmitkRegisterClasses.cpp


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -2,16 +2,16 @@
 cmake_policy(SET CMP0011 NEW)
 cmake_policy(SET CMP0045 OLD)

-IF(NOT DEFINED CMAKE_PREFIX_PATH)
-	set(CMAKE_PREFIX_PATH ${CMAKE_MODULE_PATH}/../depends/cmakefiles)
-ENDIF()
-
-IF(NOT DEFINED ARTIFACTS_PATH)
-	set(ARTIFACTS_PATH ${CMAKE_MODULE_PATH}/../cmaki_generator)
-ENDIF()
-
 IF(NOT DEFINED CMAKI_PATH)
 	set(CMAKI_PATH ${CMAKE_MODULE_PATH})
+ENDIF()
+
+IF(NOT DEFINED CMAKE_PREFIX_PATH)
+	set(CMAKE_PREFIX_PATH ${CMAKI_PATH}/../depends/cmakefiles)
+ENDIF()
+
+IF(NOT DEFINED ARTIFACTS_PATH)
+	set(ARTIFACTS_PATH ${CMAKI_PATH}/../cmaki_generator)
 ENDIF()

 if(DEFINED CMAKI_DEBUG)
@@ -412,7 +412,6 @@
 	source_group( "Source Files" FILES ${_SOURCES} )
 	common_flags()
 	include_directories(..)
-	include_directories(h)
 	foreach(INCLUDE_DIR ${CMAKI_INCLUDE_DIRS})
 		include_directories(${INCLUDE_DIR})
 	endforeach()
@@ -447,7 +446,6 @@
 	source_group( "Source Files" FILES ${_SOURCES} )
 	common_flags()
 	include_directories(..)
-	include_directories(h)
 	foreach(INCLUDE_DIR ${CMAKI_INCLUDE_DIRS})
 		include_directories(${INCLUDE_DIR})
 	endforeach()
@@ -477,7 +475,6 @@
 	source_group( "Source Files" FILES ${_SOURCES} )
 	common_flags()
 	include_directories(..)
-	include_directories(h)
 	foreach(INCLUDE_DIR ${CMAKI_INCLUDE_DIRS})
 		include_directories(${INCLUDE_DIR})
 	endforeach()


Wave a dead chicken over the mac linker

Wave a dead chicken over the mac linker

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -156,6 +156,7 @@
 if (DARWIN)
   add_definitions(-DLL_DARWIN=1)
   set(CMAKE_CXX_LINK_FLAGS "-Wl,-headerpad_max_install_names,-search_paths_first")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
 endif (DARWIN)


BUG: Enable MRC IO in UseITK whenever the ITKReview module is enabled.

The MRC ImageIO should be registered to the ImageIO factory list in UseITK not
only when ITK_USE_REVIEW was ON, but also whenever Module_ITKReview was ON.

Change-Id: I1d44f6bf6a5ebe195964ca26af438749a1636b56

--- CMake/UseITK.cmake
+++ CMake/UseITK.cmake
@@ -41,7 +41,7 @@
   endforeach()

   # add ImageIOs in review to the automatic registration
-  if (ITK_USE_REVIEW)
+  if (ITK_USE_REVIEW OR ITKReview_LOADED)
     foreach (ImageFormat MRC)
       set (LIST_OF_FACTORIES_REGISTRATION "${LIST_OF_FACTORIES_REGISTRATION}void ${ImageFormat}ImageIOFactoryRegister__Private(void);")
       set (LIST_OF_FACTORY_NAMES  "${LIST_OF_FACTORY_NAMES}${ImageFormat}ImageIOFactoryRegister__Private,")


Update code coverage to ensure cmake binary dir

--- CodeCoverage.cmake
+++ CodeCoverage.cmake
@@ -138,7 +138,7 @@

   ADD_CUSTOM_TARGET(${_targetname}_clean
     # Cleanup lcov
-    ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory . --zerocounters
+    ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory ${CMAKE_BINARY_DIR} --zerocounters
   )

   ADD_CUSTOM_TARGET(${_targetname}_generate
@@ -155,7 +155,7 @@
 	DEPENDS ${_targetname}_generate_clean

     # Capturing lcov counters and generating report
-    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory . --capture --output-file ${_outputname}.info
+    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --directory ${CMAKE_BINARY_DIR} --no-external --capture --output-file ${_outputname}.info
     COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/include/*' '/usr/local/*' --output-file ${_outputname}.info.cleaned
     COMMAND ${CMAKE_COMMAND} -E rename ${_outputname}.info.cleaned ${_outputname}.info
   )


Remove extra white line.

Remove extra white line.


- Probably fix Findassimp

- Probably fix Findassimp

--- cmake/Find/Findassimp.cmake
+++ cmake/Find/Findassimp.cmake
@@ -15,7 +15,7 @@
     )

 FIND_LIBRARY(
-    ASSIMP_LIBRARIES_TMP
+    ASSIMP_LIBRARY_TMP
     NAMES assimp
     PATHS ${CMAKE_BINARY_DIR}/libs/lib/ ${COFFEE_ROOT_DIR} ${NATIVE_LIBRARY_DIR}
     PATH_SUFFIXES
@@ -52,18 +52,21 @@
     set ( LINK_MODE SHARED )
 endif()

-add_library ( Assimp ${LINK_MODE} IMPORTED )
+if(NOT TARGET Assimp)
+    add_library ( Assimp ${LINK_MODE} IMPORTED )
+endif()

-IF (ASSIMP_INCLUDE_DIR_TMP AND ASSIMP_LIBRARIES_TMP)
+IF (ASSIMP_INCLUDE_DIR_TMP AND ASSIMP_LIBRARY_TMP)
     SET(ASSIMP_FOUND TRUE)
     SET(ASSIMP_INCLUDE_DIR "${ASSIMP_INCLUDE_DIR_TMP}" CACHE PATH "")

     set_target_properties ( Assimp PROPERTIES
         INTERFACE_INCLUDE_DIRECTORIES "${ASSIMP_INCLUDE_DIR}"
-        IMPORTED_LOCATION "${ASSIMP_LIBRARIES}"
+        IMPORTED_LOCATION "${ASSIMP_LIBRARY_TMP}"
         )

-    get_filename_component ( ASSIMP_LIBRARIES_TMP "${ASSIMP_LIBRARIES_TMP}" REALPATH )
+    get_filename_component ( ASSIMP_LIBRARIES_TMP "${ASSIMP_LIBRARY_TMP}"
+        REALPATH )

     if(IRRXML_LIBRARIES_TMP)
@@ -102,6 +105,8 @@

 ENDIF (ASSIMP_INCLUDE_DIR_TMP AND ASSIMP_LIBRARIES_TMP)

+message ( "${ASSIMP_LIBRARIES}" )
+
 INCLUDE(FindPackageHandleStandardArgs)

 FIND_PACKAGE_HANDLE_STANDARD_ARGS(assimp


Debian packages with legacy C headers added to list of conflicts, relpaces, etc.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -127,6 +127,8 @@
   endif()
 endforeach()

+list(APPEND STD_OPENCV_DEV "libhighgui-dev" "libcv-dev" "libcvaux-dev")
+
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_PROVIDES "${STD_OPENCV_LIBS}")
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_REPLACES "${STD_OPENCV_LIBS}")


Allow serveral target libraries as last argument.
Unfortunately only one testcase sources file is allowed for now...

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

--- cmake/OpenSyncTesting.cmake
+++ cmake/OpenSyncTesting.cmake
@@ -1,10 +1,10 @@
 ENABLE_TESTING()
 INCLUDE( CTest )

-MACRO( OPENSYNC_ADD_TEST _testName _testSource _targetLibraries )
+MACRO( OPENSYNC_ADD_TEST _testName _testSource )

   ADD_EXECUTABLE( ${_testName} ${_testSource} )
-  TARGET_LINK_LIBRARIES( ${_testName} ${_targetLibraries} )
+  TARGET_LINK_LIBRARIES( ${_testName} ${ARGN} )
   ADD_TEST( ${_testName} ${CMAKE_CURRENT_BINARY_DIR}/${_testName} )

 ENDMACRO( OPENSYNC_ADD_TEST )


Update Eigen default version to 3.3.7

Update Eigen default version to 3.3.7

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -56,7 +56,7 @@
 hunter_default_version(CppNetlibUri VERSION 1.0.5-hunter)
 hunter_default_version(CreateLaunchers VERSION 0.1.0)
 hunter_default_version(CsvParserCPlusPlus VERSION 1.0.1)
-hunter_default_version(Eigen VERSION 3.3.5)
+hunter_default_version(Eigen VERSION 3.3.7)
 hunter_default_version(EnumGroup VERSION 0.0.1)
 hunter_default_version(Expat VERSION 2.1.1)
 hunter_default_version(FakeIt VERSION 2.0.3)


add mklml depends for anakin

add mklml depends for anakin

--- cmake/external/anakin.cmake
+++ cmake/external/anakin.cmake
@@ -35,6 +35,7 @@
 ExternalProject_Add(
     extern_anakin
     ${EXTERNAL_PROJECT_LOG_ARGS}
+    DEPENDS             ${MKLML_PROJECT}
     GIT_REPOSITORY      "https://github.com/PaddlePaddle/Anakin"
     GIT_TAG             "04256ba78fa3da0beb74e8036c8efd68c12824d6"
     PREFIX              ${ANAKIN_SOURCE_DIR}


Update mkl-dnn to v0.20.1 (#3220)

Update mkl-dnn to v0.20.1 (#3220)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -19,9 +19,10 @@
 # Includes blas 3.8.0 in mkldnn
 set(NGRAPH_MKLDNN_SHORT_VERSION 0)
 set(NGRAPH_MKLDNN_FULL_VERSION 0.20.0.0)
-set(NGRAPH_MKLDNN_VERSION "v0.20")
-set(NGRAPH_MKLDNN_SUB_VERSION "2019.0.5.20190502")
-set(NGRAPH_MKLDNN_GIT_TAG "v0.20")
+set(NGRAPH_MKLDNN_ASSET_VERSION "v0.20")
+set(NGRAPH_MKLDNN_VERSION "v0.20.1")
+set(NGRAPH_MKLDNN_MKLML_VERSION "2019.0.5.20190502")
+set(NGRAPH_MKLDNN_GIT_TAG "v0.20.1")

 #------------------------------------------------------------------------------
 # Fetch and install MKL-DNN
@@ -88,8 +89,8 @@

 # This section sets up MKL as an external project to be used later by MKLDNN

-set(MKLURLROOT "https://github.com/intel/mkl-dnn/releases/download/${NGRAPH_MKLDNN_VERSION}/")
-set(MKLVERSION ${NGRAPH_MKLDNN_SUB_VERSION})
+set(MKLURLROOT "https://github.com/intel/mkl-dnn/releases/download/${NGRAPH_MKLDNN_ASSET_VERSION}/")
+set(MKLVERSION ${NGRAPH_MKLDNN_MKLML_VERSION})
 if (LINUX)
     set(MKLPACKAGE "mklml_lnx_${MKLVERSION}.tgz")
     set(MKL_SHA1_HASH 6ab490f0b358124338d04ee9383c3cbc536969d8)


[CMake] Support distribution install for LLDB.framework

This patch adds the last bit of support to get LLVM_DISTRIBUTION_COMPONENTS working with libLLDB when built as a framework.

This patch adds dummy install targets for binaries built into the framework's Resources directory, and makes the framework's install target depend on all the binaries that get installed with the framework.

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

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -125,6 +125,16 @@
             RUNTIME_OUTPUT_DIRECTORY $<TARGET_FILE_DIR:liblldb>/Resources
             BUILD_WITH_INSTALL_RPATH On
             INSTALL_RPATH "@loader_path/../../../../${_dots}/${LLDB_FRAMEWORK_INSTALL_DIR}")
+      # For things inside the framework we don't need functional install targets
+      # because CMake copies the resources and headers from the build directory.
+      # But we still need this target to exist in order to use the
+      # LLVM_DISTRIBUTION_COMPONENTS build option. We also need the
+      # install-liblldb target to depend on this tool, so that it gets put into
+      # the Resources directory before the framework is installed.
+      if(ARG_GENERATE_INSTALL)
+        add_custom_target(install-${name} DEPENDS ${name})
+        add_dependencies(install-liblldb ${name})
+      endif()
     else()
       set_target_properties(${name} PROPERTIES
             BUILD_WITH_INSTALL_RPATH On
@@ -132,7 +142,7 @@
     endif()
   endif()

-  if(ARG_GENERATE_INSTALL)
+  if(ARG_GENERATE_INSTALL AND NOT ARG_INCLUDE_IN_FRAMEWORK)
     install(TARGETS ${name}
           COMPONENT ${name}
           RUNTIME DESTINATION bin)


 Visual C++ does not support -ffunction-sections -fdata-sections.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -77,7 +77,7 @@
 endfunction(add_llvm_symbol_exports)

 function(add_dead_strip target_name)
-  if(NOT CYGWIN AND NOT MINGW)
+  if(NOT CYGWIN AND NOT MINGW AND NOT MSVC)
     if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
        SET(CMAKE_CXX_FLAGS
            "${CMAKE_CXX_FLAGS}  -ffunction-sections -fdata-sections"


Add llvm-rc to LLVM_TOOLCHAIN_TOOLS (PR38386)

This means it will be installed also in builds configured with
LLVM_INSTALL_TOOLCHAIN_ONLY, such as the Windows packages.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -867,6 +867,7 @@
     llvm-ranlib
     llvm-lib
     llvm-objdump
+    llvm-rc
     )
 endif()


Not try to use pkgconfig on win

Not try to use pkgconfig on win

svn path=/trunk/kdesupport/qca/; revision=693854

--- cmake/modules/FindNss.cmake
+++ cmake/modules/FindNss.cmake
@@ -17,15 +17,16 @@
   SET(NSS_FOUND TRUE)

 else (NSS_INCLUDE_DIRS AND NSS_LIBRARIES)
+  if(NOT WIN32)
+    INCLUDE(UsePkgConfig)

-  INCLUDE(UsePkgConfig)
+    PKGCONFIG(nss _NSSIncDir _NSSLinkDir _NSSLinkFlags _NSSCflags)

-  PKGCONFIG(nss _NSSIncDir _NSSLinkDir _NSSLinkFlags _NSSCflags)
+    set(NSS_DEFINITIONS ${_NSSCflags})
+    set(NSS_INCLUDE_DIRS ${_NSSIncDir})
+    set(NSS_LIBRARIES ${_NSSLinkFlags})
+  endif(NOT WIN32)

-  set(NSS_DEFINITIONS ${_NSSCflags})
-  set(NSS_INCLUDE_DIRS ${_NSSIncDir})
-  set(NSS_LIBRARIES ${_NSSLinkFlags})
-
   if (NSS_INCLUDE_DIRS AND NSS_LIBRARIES)
      set(NSS_FOUND TRUE)
   endif (NSS_INCLUDE_DIRS AND NSS_LIBRARIES)


fix regular expression

fix regular expression

--- cmake/FindCLANG_FORMAT.cmake
+++ cmake/FindCLANG_FORMAT.cmake
@@ -30,11 +30,12 @@
                   OUTPUT_VARIABLE clang_format_version
                   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

-  if(clang_format_version MATCHES "^clang-format version .*")
+  if(clang_format_version MATCHES "clang-format version .*")
+    # clang_format_version sample: "Ubuntu clang-format version 11.0.0-2~ubuntu20.04.1"
     # clang_format_version sample: "clang-format version 3.9.1-4ubuntu3~16.04.1
     # (tags/RELEASE_391/rc2)"
     string(REGEX
-           REPLACE "clang-format version ([.0-9]+).*"
+           REPLACE ".*clang-format version ([.0-9]+).*"
                    "\\1"
                    CLANG_FORMAT_VERSION
                    "${clang_format_version}")


fix to only generate once and when necessary

--- rosidl_typesupport_opensplice_c/cmake/rosidl_typesupport_opensplice_c_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_c/cmake/rosidl_typesupport_opensplice_c_generate_interfaces.cmake
@@ -150,7 +150,10 @@
   OUTPUT_DIR "${_output_path}"
   TEMPLATE_DIR "${rosidl_typesupport_opensplice_c_TEMPLATE_DIR}"
   TARGET_DEPENDENCIES ${target_dependencies}
-  ADDITIONAL_FILES ${_dds_idl_files}
+  ADDITIONAL_FILES
+  ${_dds_idl_files}
+  ${_generated_external_msg_files}
+  ${_generated_external_srv_files}
 )

 add_custom_command(


fix version label (#3398)

fix version label (#3398)

--- cmake/Modules/git_tags.cmake
+++ cmake/Modules/git_tags.cmake
@@ -42,10 +42,15 @@
     NGRAPH_GET_CURRENT_HASH()

     if (NOT ${TAG_LIST} STREQUAL "")
-        string(REGEX MATCH "${NGRAPH_CURRENT_HASH}\t[^\r\n]*" TAG ${TAG_LIST})
-        set(FINAL_TAG ${TAG})
+        # first look for vX.Y.Z release tag
+        string(REGEX MATCH "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/v([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)" TAG ${TAG_LIST})
+        if ("${TAG}" STREQUAL "")
+            # release tag not found so now look for vX.Y.Z-rc.N tag
+            string(REGEX MATCH "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/v([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)-(rc\\.[0-9?]+)" TAG ${TAG_LIST})
+        endif()
+        set(STATUS ${TAG})
         if (NOT "${TAG}" STREQUAL "")
-            string(REGEX REPLACE "${NGRAPH_CURRENT_HASH}\trefs/tags/(.*)" "\\1" FINAL_TAG ${TAG})
+            string(REGEX REPLACE "${NGRAPH_CURRENT_HASH}[\t ]+refs/tags/(.*)" "\\1" FINAL_TAG ${TAG})
         endif()
     else()
         set(FINAL_TAG "")


cmake: ld: Disable manual linking of libgcc components for host

When the host toolchain is used, `-nostdlib` option is not specified
and therefore all default libraries, including the libgcc and its
components, are automatically linked -- so it is not necessary to
manually link them here.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/linker/ld/target.cmake
+++ cmake/linker/ld/target.cmake
@@ -13,14 +13,16 @@

 set_ifndef(LINKERFLAGPREFIX -Wl)

-if(CONFIG_EXCEPTIONS)
-  # When building with C++ Exceptions, it is important that crtbegin and crtend
-  # are linked at specific locations.
-  # The location is so important that we cannot let this be controlled by normal
-  # link libraries, instead we must control the link command specifically as
-  # part of toolchain.
-  set(CMAKE_CXX_LINK_EXECUTABLE
-      "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> ${LIBGCC_DIR}/crtbegin.o <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${LIBGCC_DIR}/crtend.o")
+if(NOT "${ZEPHYR_TOOLCHAIN_VARIANT}" STREQUAL "host")
+  if(CONFIG_EXCEPTIONS)
+    # When building with C++ Exceptions, it is important that crtbegin and crtend
+    # are linked at specific locations.
+    # The location is so important that we cannot let this be controlled by normal
+    # link libraries, instead we must control the link command specifically as
+    # part of toolchain.
+    set(CMAKE_CXX_LINK_EXECUTABLE
+        "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> ${LIBGCC_DIR}/crtbegin.o <OBJECTS> -o <TARGET> <LINK_LIBRARIES> ${LIBGCC_DIR}/crtend.o")
+  endif()
 endif()

 # Run $LINKER_SCRIPT file through the C preprocessor, producing ${linker_script_gen}


[build][gardening] adjust framework paths (#29507)

Collate -F with the framework path to avoid unwanted deduplication of options by `target_compile_options` (which is the case after #29451) -- this way no undesired side effects are introduced should a new search path be added.

Addresses rdar://problem/58934566

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -163,9 +163,12 @@
   endif()

   if(IS_DARWIN)
+    # We collate -F with the framework path to avoid unwanted deduplication
+    # of options by target_compile_options -- this way no undesired
+    # side effects are introduced should a new search path be added.
     list(APPEND result
       "-arch" "${CFLAGS_ARCH}"
-      "-F" "${SWIFT_SDK_${CFLAGS_SDK}_PATH}/../../../Developer/Library/Frameworks")
+      "-F${SWIFT_SDK_${CFLAGS_SDK}_PATH}/../../../Developer/Library/Frameworks")

     set(add_explicit_version TRUE)

@@ -405,8 +408,11 @@
   endif()

   if(IS_DARWIN)
+    # We collate -F with the framework path to avoid unwanted deduplication
+    # of options by target_compile_options -- this way no undesired
+    # side effects are introduced should a new search path be added.
     list(APPEND result
-      "-F" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/../../../Developer/Library/Frameworks")
+      "-F${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/../../../Developer/Library/Frameworks")
   endif()

   is_build_type_optimized("${build_type}" optimized)


cmake: arm64: Bail out if the old SDK is used

After the ARM/ARM64 split the SDK 0.12.4 is needed to be able to compile
the ARM64 arch code. Bail out if an old SDK is detected at compile time.

Also change the minimal supported Zephyr SDK to v0.12, as agreed in
Toolchain WG.  Main reason is added compiler architectures and important
inclusion of fixes, for example qemu and arm fixes for veneers (TFM)

Signed-off-by: Carlo Caione <ca4506c8c654a4ccf75802e86b5d162c1e96f065@baylibre.com>

--- cmake/verify-toolchain.cmake
+++ cmake/verify-toolchain.cmake
@@ -16,7 +16,11 @@
 # FORMAT=json: Print the output as a json formatted string, useful for Python

 # This is the minimum required Zephyr-SDK version which supports CMake package
-set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.11.3)
+if("${ARCH}" STREQUAL "arm64")
+  set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.12.4)
+else()
+  set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.12)
+endif()

 # Set internal variables if set in environment.
 if(NOT DEFINED ZEPHYR_TOOLCHAIN_VARIANT)
@@ -67,12 +71,12 @@
     # To support Zephyr SDK tools (DTC, and other tools) with 3rd party toolchains
     # then we keep track of current toolchain variant.
     set(ZEPHYR_CURRENT_TOOLCHAIN_VARIANT ${ZEPHYR_TOOLCHAIN_VARIANT})
-    find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} QUIET HINTS $ENV{ZEPHYR_SDK_INSTALL_DIR})
+    find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} REQUIRED QUIET HINTS $ENV{ZEPHYR_SDK_INSTALL_DIR})
     if(DEFINED ZEPHYR_CURRENT_TOOLCHAIN_VARIANT)
       set(ZEPHYR_TOOLCHAIN_VARIANT ${ZEPHYR_CURRENT_TOOLCHAIN_VARIANT})
     endif()
   else()
-    find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} QUIET PATHS
+    find_package(Zephyr-sdk ${TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION} REQUIRED QUIET PATHS
                  /usr
 		 /usr/local
 		 /opt


idl-config: Upgrade qi_create_interface.

Change-Id: I16fbba9e38ae841a632243d432c9a3601facc1e1

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -72,21 +72,36 @@
       )
 endfunction()

-function(qi_create_interface idl class_name output_dir _out)
-  _qi_find_idl(IDL)
-  string(REPLACE "::" ";" split_class ${class_name})
-  list(REVERSE split_class)
-  list(GET split_class 0 class)
-  string(TOLOWER ${class} _filename)
-  set(_filename "${_filename}_interface.hpp")
-  message("tgt ${output_dir}/${_filename}")
-  set(${_out} ${output_dir}/${_filename} PARENT_SCOPE)
-  qi_generate_src(${output_dir}/${_filename}
-    SRC ${idl} ${IDL}
-    COMMAND ${_python_executable} ${IDL}
-      ${idl}
-      -c ${class_name}
-      -o ${output_dir}/${_filename}
+#! Create interface header for given class
+#\group:SEARCH_PATH path where to search IDL files
+#\param:IDL name of IDL xml file (will be searched for if not specified)
+#\param:_out_filename variable that will be set with full path and name of generated file
+#\param:class_name Name of the class for which to generate interface
+#\param:OUTPUT_DIR Directory in which to put the result
+#\param:OUTPUT_FILE File name (default: <classname>.hpp)
+function(qi_create_interface _out_filename class_name)
+  cmake_parse_arguments(ARG "" "IDL;OUTPUT_DIR;OUTPUT_FILE" "SEARCH_PATH" ${ARGN})
+  _qi_find_idl(IDL)
+  qi_find_idl_for(${class_name} idlfile "${ARG_SEARCH_PATH}")
+  # Get bare class name without namespaces
+  if (NOT ARG_OUTPUT_FILE)
+    string(REPLACE "::" ";" split_class ${class_name})
+    list(REVERSE split_class)
+    list(GET split_class 0 class)
+    string(TOLOWER ${class} _filename)
+    set(ARG_OUTPUT_FILE "${_filename}.hpp")
+  endif()
+  message("COIN ${ARG_OUTPUT_DIR}")
+  if (NOT ARG_OUTPUT_DIR)
+    set(ARG_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
+  endif()
+  set(tgt "${ARG_OUTPUT_DIR}/${ARG_OUTPUT_FILE}")
+  set(${_out_filename} ${tgt} PARENT_SCOPE)
+  qi_generate_src(${tgt}
+    SRC ${idlfile} ${IDL}
+    COMMAND ${_python_executable} ${IDL}
+      ${idlfile}
+      -o ${tgt}
       -m interface)
 endfunction()


Set BLUEBERRY_BUILD_ALL_PLUGINS to ON if MITK_BUILD_ALL_PLUGINS is ON.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -130,6 +130,10 @@
 FOREACH(mitk_cmake_arg ${mitk_cmake_boolean_args})
   LIST(APPEND mitk_superbuild_boolean_args -D${mitk_cmake_arg}:BOOL=${${mitk_cmake_arg}})
 ENDFOREACH()
+
+IF(MITK_BUILD_ALL_PLUGINS)
+  LIST(APPEND mitk_superbuild_boolean_args -DBLUEBERRY_BUILD_ALL_PLUGINS:BOOL=ON)
+ENDIF()

 #-----------------------------------------------------------------------------
 # MITK Utilities


WIP: easing vtk build by making vtk download first

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -116,7 +116,8 @@

 set(${LOCAL_PROJECT_NAME}_DEPENDENCIES ${ITK_EXTERNAL_NAME}  )
 if(USE_VTK)
-  list(APPEND ${LOCAL_PROJECT_NAME}_DEPENDENCIES VTK)
+  set(${LOCAL_PROJECT_NAME}_DEPENDENCIES VTK  )
+  list(APPEND ${LOCAL_PROJECT_NAME}_DEPENDENCIES ${ITK_EXTERNAL_NAME} )
 endif()

 if(BUILD_STYLE_UTILS)


COMP: Re-use ITK, SlicerExtensionModel and BRAINSTools when build extension

Now that "niral_utilities", "UnivariateEntropyMultiImageMetric" and "DTIPrep"
can all be built using a regular build of ITKv4 without requiring the option
ITKV3_COMPATIBILITY to be enabled, this commit updates the requirement
of DTIPrep Slicer extension so that the build trees provided by Slicer
can be reused.

Additionally, the build time of the Slicer extension will also be
reduced.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -22,12 +22,16 @@
 if( DTIPrep_BUILD_SLICER_EXTENSION )
   set( EXTERNAL_SOURCE_IN_BINARY_DIR ON)
   set( USE_SYSTEM_VTK ON CACHE BOOL "Use system VTK" FORCE )
+  set( USE_SYSTEM_ITK ON CACHE BOOL "Use system ITK" FORCE )
+  set( USE_SYSTEM_SlicerExecutionModel ON CACHE BOOL "Use system SlicerExecutionModel" FORCE )
   #VTK_VERSION_MAJOR is define but not a CACHE variable
   set( VTK_VERSION_MAJOR ${VTK_VERSION_MAJOR} CACHE STRING "Choose the expected VTK major version to build Slicer (5, 6, 7).")
   set( USE_SYSTEM_DCMTK ON CACHE BOOL "Use system DCMTK" FORCE )
   set( USE_SYSTEM_Teem ON CACHE BOOL "Use system Teem" FORCE )
+  set( USE_SYSTEM_DTIProcess ON CACHE BOOL "Use system DTIProcess" FORCE )
   set( BUILD_SHARED_LIBS OFF CACHE BOOL "Use shared libraries" FORCE)
   unsetForSlicer(NAMES
+    BRAINSCommonLib_DIR
     CMAKE_MODULE_PATH
     CMAKE_C_COMPILER
     CMAKE_CXX_COMPILER
@@ -43,6 +47,9 @@
     )
   find_package(Slicer REQUIRED)
   unsetAllForSlicerBut( NAMES
+    BRAINSCommonLib_DIR
+    SlicerExecutionModel_DIR
+    ITK_DIR
     VTK_DIR
     QT_QMAKE_EXECUTABLE
     DCMTK_DIR
@@ -54,9 +61,6 @@
     CMAKE_CXX_COMPILER
     CMAKE_CXX_FLAGS
     CMAKE_C_FLAGS
-    ITK_DIR
-    SlicerExecutionModel_DIR
-    ITK_VERSION_MAJOR
     )
   if( APPLE )
     set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../../../../../")
@@ -167,7 +171,12 @@
 #------------------------------------------------------------------------------
 # ${LOCAL_PROJECT_NAME} dependency list
 #------------------------------------------------------------------------------
-set( ${LOCAL_PROJECT_NAME}_DEPENDENCIES DCMTK ITKv4 SlicerExecutionModel VTK DTIProcess niral_utilities BRAINSTools)
+set( ${LOCAL_PROJECT_NAME}_DEPENDENCIES VTK DCMTK ITKv4 SlicerExecutionModel DTIProcess niral_utilities)
+if( NOT DTIPrep_BUILD_SLICER_EXTENSION )
+  list(APPEND ${LOCAL_PROJECT_NAME}_DEPENDENCIES
+    BRAINSTools
+    )
+endif()
 set( ${PROJECT_NAME}_BUILD_DICOM_SUPPORT ON )
 set( ${PROJECT_NAME}_BUILD_ZLIB_SUPPORT ON )
 if( UNIX )


Revert "don't require config"

Revert "don't require config"

This reverts commit 1343f17229d7e3b2e773186b106e6c3abd55a3a0.

--- cmake/FindSuiteSparse.cmake
+++ cmake/FindSuiteSparse.cmake
@@ -495,7 +495,10 @@
     COLAMD_FOUND AND
     CCOLAMD_FOUND AND
     CHOLMOD_FOUND AND
-    SUITESPARSEQR_FOUND AND)
+    SUITESPARSEQR_FOUND AND
+    (SUITESPARSE_CONFIG_FOUND OR UFCONFIG_FOUND) AND
+    BLAS_FOUND AND
+    LAPACK_FOUND)
   SET(SUITESPARSE_FOUND TRUE)
   LIST(APPEND SUITESPARSE_INCLUDE_DIRS
     ${AMD_INCLUDE_DIR}


Added sensible default root location for MKL on Windows

Summary:
MKL on windows works with this change. Tested with MKL 2017 Update 3 (https://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-2017-release-notes).

Should fix #544

With MKL 2017 Update 3 #514 should not happen too.

Note: I used Anaconda which ships with its own MKL, so I had to make sure that the MKL 2017 Update 3 version was loaded by replacing the .dll in the `%AnacondaPrefix%\Library\bin` folder. Otherwise, numpy would load it's own version and I would have all sorts of missing procedures errors. Now that the same version is available through `conda` this is easily fixed with `conda install mkl==2017.0.3`
Closes https://github.com/caffe2/caffe2/pull/929

Differential Revision: D5429664

Pulled By: Yangqing

fbshipit-source-id: eaa150bab563ee4ce8348faee1624ac4af477513

--- cmake/Modules/FindMKL.cmake
+++ cmake/Modules/FindMKL.cmake
@@ -19,7 +19,12 @@
 caffe_option(MKL_MULTI_THREADED  "Use multi-threading"   ON IF NOT MKL_USE_SINGLE_DYNAMIC_LIBRARY)

 # ---[ Root folders
-set(INTEL_ROOT "/opt/intel" CACHE PATH "Folder contains intel libs")
+if(MSVC)
+  set(INTEL_ROOT_DEFAULT "C:/Program Files (x86)/IntelSWTools/compilers_and_libraries/windows")
+else()
+  set(INTEL_ROOT_DEFAULT "/opt/intel")
+endif()
+set(INTEL_ROOT ${INTEL_ROOT_DEFAULT} CACHE PATH "Folder contains intel libs")
 find_path(MKL_ROOT include/mkl.h PATHS $ENV{MKLROOT} ${INTEL_ROOT}/mkl
                                    DOC "Folder contains MKL")


Removed extraneous library linking, added runtime output dir for release and debug

--- cmake/PVAddExecutable.cmake
+++ cmake/PVAddExecutable.cmake
@@ -64,6 +64,8 @@
   # Set target properties
   if(PARSED_ARGS_OUTPUT_PATH)
     set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PARSED_ARGS_OUTPUT_PATH})
+    set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PARSED_ARGS_OUTPUT_PATH})
+    set_target_properties(${TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PARSED_ARGS_OUTPUT_PATH})
   endif()

   if (GDAL_FOUND AND PV_USE_GDAL)
@@ -82,12 +84,5 @@
     target_link_libraries(${TARGET} ${PV_OPENMP_LIBRARIES})
   endif()

-  if (PV_USE_CUDA)
-    target_link_libraries(${TARGET} ${CUDA_LIBRARIES})
-    target_link_libraries(${TARGET} ${CUDNN_LIBRARY})
-  endif()
+endmacro()

-  if (PV_LINK_LIBRARIES)
-    target_link_libraries(${TARGET} ${PV_LINK_LIBRARIES})
-  endif()
-endmacro()


cmake: boilerplate: Define properties earlier

The properties definitions were not doing much because they were
defined after they were used. They were actually overriding the true
properties with "".

Moving them earlier ensures that the properties behave as expected, as
documented global mutable variables.

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

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -46,6 +46,28 @@

 cmake_policy(SET CMP0000 OLD)
 cmake_policy(SET CMP0002 NEW)
+
+define_property(GLOBAL PROPERTY ZEPHYR_LIBS
+    BRIEF_DOCS "Global list of all Zephyr CMake libs that should be linked in"
+    FULL_DOCS  "Global list of all Zephyr CMake libs that should be linked in.
+zephyr_library() appends libs to this list.")
+set_property(GLOBAL PROPERTY ZEPHYR_LIBS "")
+
+define_property(GLOBAL PROPERTY GENERATED_KERNEL_OBJECT_FILES
+  BRIEF_DOCS "Object files that are generated after Zephyr has been linked once."
+  FULL_DOCS "\
+Object files that are generated after Zephyr has been linked once.\
+May include mmu tables, etc."
+  )
+set_property(GLOBAL PROPERTY GENERATED_KERNEL_OBJECT_FILES "")
+
+define_property(GLOBAL PROPERTY GENERATED_KERNEL_SOURCE_FILES
+  BRIEF_DOCS "Source files that are generated after Zephyr has been linked once."
+  FULL_DOCS "\
+Object files that are generated after Zephyr has been linked once.\
+May include isr_tables.c etc."
+  )
+set_property(GLOBAL PROPERTY GENERATED_KERNEL_SOURCE_FILES "")

 set(APPLICATION_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "Application Source Directory")
 set(APPLICATION_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Application Binary Directory")
@@ -224,23 +246,3 @@

 add_subdirectory($ENV{ZEPHYR_BASE} ${__build_dir})

-define_property(GLOBAL PROPERTY ZEPHYR_LIBS
-    BRIEF_DOCS "Global list of all Zephyr CMake libs that should be linked in"
-    FULL_DOCS  "Global list of all Zephyr CMake libs that should be linked in. zephyr_library() appends libs to this list.")
-set_property(GLOBAL PROPERTY ZEPHYR_LIBS "")
-
-define_property(GLOBAL PROPERTY GENERATED_KERNEL_OBJECT_FILES
-  BRIEF_DOCS "Object files that are generated after Zephyr has been linked once."
-  FULL_DOCS "\
-Object files that are generated after Zephyr has been linked once.\
-May include mmu tables, etc."
-  )
-set_property(GLOBAL PROPERTY GENERATED_KERNEL_OBJECT_FILES "")
-
-define_property(GLOBAL PROPERTY GENERATED_KERNEL_SOURCE_FILES
-  BRIEF_DOCS "Source files that are generated after Zephyr has been linked once."
-  FULL_DOCS "\
-Object files that are generated after Zephyr has been linked once.\
-May include isr_tables.c etc."
-  )
-set_property(GLOBAL PROPERTY GENERATED_KERNEL_SOURCE_FILES "")


remove warning (#1897)

remove warning (#1897)

--- cmake/clang_4_0_flags.cmake
+++ cmake/clang_4_0_flags.cmake
@@ -45,4 +45,4 @@

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-conversion")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-double-promotion")
-
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-func-template")


Put back USE_MPI option after merge

Put back USE_MPI option after merge

--- cmake/dtkDependencies.cmake
+++ cmake/dtkDependencies.cmake
@@ -172,16 +172,20 @@
 ## Mpi
 ## #################################################################

-mark_as_advanced(MPI_EXTRA_LIBRARY)
-mark_as_advanced(MPI_LIBRARY)
-
-find_package(MPI QUIET)
-
-if(MPI_FOUND)
-include_directories(${MPI_INCLUDE_PATH})
-set(COMPILE_FLAGS ${COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
-set(DTK_HAVE_MPI "YES")
-endif(MPI_FOUND)
+OPTION(USE_MPI "Use the MPI library for distributed computing" OFF)
+
+if(USE_MPI)
+  mark_as_advanced(MPI_EXTRA_LIBRARY)
+  mark_as_advanced(MPI_LIBRARY)
+
+  find_package(MPI QUIET)
+
+  if(MPI_FOUND)
+    include_directories(${MPI_INCLUDE_PATH})
+    set(COMPILE_FLAGS ${COMPILE_FLAGS} ${MPI_COMPILE_FLAGS})
+    set(DTK_HAVE_MPI "YES")
+  endif(MPI_FOUND)
+endif(USE_MPI)

 ## #################################################################
 ## Vrpn
@@ -213,9 +217,9 @@
 ##
 ## #################################################################

-if(MPI_FOUND AND QUAT_LIBRARY AND VRPN_LIBRARY)
+if(USE_MPI AND MPI_FOUND AND QUAT_LIBRARY AND VRPN_LIBRARY)
   add_definitions(-DDTK_WRAP_VRPN)
-endif(MPI_FOUND AND QUAT_LIBRARY AND VRPN_LIBRARY)
+endif(USE_MPI AND MPI_FOUND AND QUAT_LIBRARY AND VRPN_LIBRARY)

 ## #################################################################
 ## Qwt


[CMake] add_llvm_external_project: Just warn about nonexistent directories.

These entries were generated accidentally.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -719,7 +719,11 @@
       "Whether to build ${name} as part of LLVM"
       ${LLVM_TOOL_${nameUPPER}_BUILD_DEFAULT})
     if (LLVM_TOOL_${nameUPPER}_BUILD)
-      add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir})
+      if(EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR})
+        add_subdirectory(${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR} ${add_llvm_external_dir})
+      elseif(NOT "${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}" STREQUAL "")
+        message(WARNING "Nonexistent directory for ${name}: ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}")
+      endif()
       # FIXME: It'd be redundant.
       set(LLVM_TOOL_${nameUPPER}_BUILD Off)
     endif()


[LLVM-C] Add LLVM-C.dll to Windows installer package

This is a follow up to D56781, D56774 and D35077 to makes the LLVM-C.dll
file and LLVM-C.lib be installed on Windows, just like LTO.dll and
LTO.lib are.

Patch by Jakob Bornecrantz!

Differential revision: https://reviews.llvm.org/D63717

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -680,7 +680,9 @@
   elseif(ARG_BUILDTREE_ONLY)
     set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name})
   else()
-    if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LTO" OR
+    if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR
+        ${name} STREQUAL "LTO" OR
+        ${name} STREQUAL "LLVM-C" OR
         ${name} STREQUAL "Remarks" OR
         (LLVM_LINK_LLVM_DYLIB AND ${name} STREQUAL "LLVM"))


Fix ITK Superbuild install path to include "lib" directory

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

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

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


Update to ITK 4.9 release tag

Update to ITK 4.9 release tag

Change-Id: I313335f40e8850bbff107a0ff95902c6be70b23f

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG 5908767d9ad53585c59c4fde3b8cba79eba9a40b )
+set(ITK_TAG_COMMAND GIT_TAG v4.9.0 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


[launch_testing_ament_cmake] Add test label (#584)

* Add test label

Signed-off-by: Keisuke Shima <28d3743ebb8f8008187351764ef086cfa64e576a@users.noreply.github.com>

* Add launch_test_arguments

Signed-off-by: Keisuke Shima <28d3743ebb8f8008187351764ef086cfa64e576a@users.noreply.github.com>

--- launch_testing_ament_cmake/cmake/add_launch_test.cmake
+++ launch_testing_ament_cmake/cmake/add_launch_test.cmake
@@ -52,7 +52,7 @@
   cmake_parse_arguments(${namespace}
     ""
     "TARGET;TIMEOUT;PYTHON_EXECUTABLE"
-    "ARGS"
+    "ARGS;LABELS"
     ${ARGN})

   if(NOT ${namespace}_TIMEOUT)
@@ -89,6 +89,10 @@
     string(REPLACE "/" "_" ${namespace}_TARGET ${${namespace}_TARGET})
   endif()

+  if(NOT ${namespace}_LABELS)
+    set(${namespace}_LABELS "launch_test")
+  endif()
+
   set(${namespace}_RESULT_FILE "${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${${namespace}_TARGET}.xunit.xml")
 endmacro()

@@ -104,6 +108,8 @@
 # :type PYTHON_EXECUTABLE: string
 # :param TIMEOUT: The test timeout in seconds
 # :type TIMEOUT: integer
+# :param LABELS: The test labels
+# :type LABELS: string
 # :param ARGS: Launch arguments to pass to the launch test
 # :type ARGS: string
 function(add_launch_test filename)
@@ -130,6 +136,11 @@
     TIMEOUT "${_launch_test_TIMEOUT}"
     ${_launch_test_UNPARSED_ARGUMENTS}
   )
+  set_tests_properties(
+    "${_launch_test_TARGET}"
+    PROPERTIES
+    LABELS "${_launch_test_LABELS}"
+  )
 endfunction()

 macro(rostest__strip_prefix var prefix)


Changed cc/ld flag handling (3).

Changed cc/ld flag handling (3).

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -180,7 +180,7 @@
     ctest_start(Continuous)
     ctest_update()
     ctest_read_custom_files(${CTEST_SOURCE_DIRECTORY})
-    ctest_configure(OPTIONS "-DCI_CC_FLAGS=${CC_COVERAGE_FLAGS} -DCI_LD_FLAGS=${CC_COVERAGE_FLAGS}")
+    ctest_configure(OPTIONS "-DCI_CC_FLAGS=\"${CC_COVERAGE_FLAGS}\" -DCI_LD_FLAGS=\"${CC_COVERAGE_FLAGS}\"")
     ctest_build()
     ctest_test()
     if(CC_NAME STREQUAL "msvc")


Develop (#53)

Develop (#53)

* [changed] botgAddTPL and [added] botgDependencies botgPackageContents botgProjectContents

* [changed] version=0.9.0 [added] findTPLBLAS

* [changed] version=0.10.0 [added] findTPLLAPACK

* added lapack and blas to dependencies

* [changed] version back to 0.9.0

* [changed] added logic to do FIND_PACKAGE(MODULE) as a last resort

* [added] botgUseCStandard macro

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -90,6 +90,15 @@
 MACRO( botgUseCxxStandard version )
     botgAddCompilerFlags( CXX "GNU|Clang|Intel" ANY_SYSTEM
         "-std=c++${version}"
+    )
+ENDMACRO()
+#------------------------------------------------------------------------------
+# PUBLIC
+# Use a particular version of the C standard.
+#
+MACRO( botgUseCStandard version )
+    botgAddCompilerFlags( C "GNU|Clang|Intel" ANY_SYSTEM
+        "-std=c${version}"
     )
 ENDMACRO()
 #------------------------------------------------------------------------------
@@ -603,28 +612,22 @@

     IF( ${tribits_name}_ALLOW_PREFIND OR ${tribits_name}_FORCE_HUNTER )

-      #vanilla find
-      IF( NOT ${tribits_name}_FORCE_HUNTER )
-          MESSAGE( STATUS "[BootsOnTheGround] Calling FIND_PACKAGE(${tribits_name} CONFIG) ...")
-          FIND_PACKAGE( ${tribits_name} CONFIG QUIET )
-          #says it found it but it didn't populate any variables we need
-          IF( ${tribits_name}_FOUND )
-	      IF( "${${tribits_name}_LIBRARY_DIRS}" STREQUAL "" AND
-                  "${${tribits_name}_INCLUDE_DIRS}" STREQUAL "" )
-                  SET( ${tribits_name}_FOUND OFF )
-              ENDIF()
-          ENDIF()
-          MESSAGE( STATUS "[BootsOnTheGround] Calling FIND_PACKAGE(${tribits_name} CONFIG) ... ${tribits_name}_FOUND=${${tribits_name}_FOUND}")
+      #config find
+      MESSAGE( STATUS "[BootsOnTheGround] Calling FIND_PACKAGE(${tribits_name} CONFIG) ...")
+      FIND_PACKAGE( ${tribits_name} CONFIG QUIET )
+      #says it found it but it didn't populate any variables we need
+      IF( ${tribits_name}_FOUND )
+        IF( "${${tribits_name}_LIBRARY_DIRS}" STREQUAL "" AND
+            "${${tribits_name}_INCLUDE_DIRS}" STREQUAL "" )
+            SET( ${tribits_name}_FOUND OFF )
+        ENDIF()
       ENDIF()
+      MESSAGE( STATUS "[BootsOnTheGround] Calling FIND_PACKAGE(${tribits_name} CONFIG) ... ${tribits_name}_FOUND=${${tribits_name}_FOUND}")

       #use hunter!
       IF( NOT ${tribits_name}_FOUND AND NOT (hunter_name STREQUAL "") )
         SET( hunter_argx "" )
-        IF( hunter_name STREQUAL "" )
-            LIST(APPEND hunter_argx ${tribits_name})
-        ELSE()
-            LIST(APPEND hunter_argx ${hunter_name})
-        ENDIF()
+        LIST(APPEND hunter_argx ${hunter_name})
         LIST(APPEND hunter_argx ${hunter_args} )

         MESSAGE(STATUS "[BootsOnTheGround] Calling hunter_add_package( ${hunter_argx} )...")
@@ -637,19 +640,30 @@
         FIND_PACKAGE( ${hunter_argx} )
         CMAKE_POLICY(POP)

-        #no choice but to be successful with hunter
-        GLOBAL_SET(${tribits_name}_FOUND TRUE)
-
         #set global information about where the stuff is, converting names
         #from hunter to tribits.
-        FOREACH( type INCLUDE_DIRS LIBRARY_DIRS)
+        IF( ${hunter_name}_FOUND )
+	  FOREACH( type INCLUDE_DIRS LIBRARY_DIRS)
             GLOBAL_SET(${tribits_name}_${type} ${${hunter_name}_${type}})
-        ENDFOREACH()
+          ENDFOREACH()
+          GLOBAL_SET(${tribits_name}_FOUND TRUE)
+        ENDIF()

       ENDIF()

       MESSAGE( STATUS "[BootsOnTheGround] PREFIND result of TPL ${tribits_name}_FOUND=${${tribits_name}_FOUND}")

+    ENDIF()
+
+    #Last chance!
+    IF( NOT ${tribits_name}_FOUND )
+      MESSAGE( STATUS "[BootsOnTheGround] Last chance module mode: FIND_PACKAGE(${tribits_name}) ...")
+      FIND_PACKAGE( ${tribits_name} QUIET )
+      IF( ${tribits_name}_FOUND )
+        GLOBAL_SET(TPL_${tribits_name}_LIBRARIES "${${tribits_name}_LIBRARIES}")
+        GLOBAL_SET(TPL_${tribits_name}_INCLUDE_DIRS "")
+        GLOBAL_SET(TPL_${tribits_name}_LIBRARY_DIRS "")
+      ENDIF()
     ENDIF()

     # Third, call TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES()


Workaround bug(?) in cmake 3.17

Workaround bug(?) in cmake 3.17

--- dev/cmake/Modules/FindR.cmake
+++ dev/cmake/Modules/FindR.cmake
@@ -57,15 +57,27 @@
 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/get_bin.R)
 chomp(${R_BIN_TEXT} R_BIN_DIR)
 MESSAGE(STATUS "R_BIN_TEXT = ${R_BIN_DIR} w/ RESULT=${R_BIN_RESULT}")
-
-find_library (
+
+if (WIN32)
+# Bug in cmake 3.17, need to search for file rather than library
+find_file(
           R_LIBRARY
-          R
-          PATHS ${R_BIN_DIR} ${R_HOME_TEXT}/lib
+          NAMES R.dll
+          PATHS ${R_BIN_DIR}
           NO_DEFAULT_PATH
-          NO_CMAKE_PATH
+)
+else()
+find_library(
+          R_LIBRARY
+          NAMES R
+          PATHS ${R_BIN_EXPANDED}
+          NO_DEFAULT_PATH
+          #NO_CMAKE_PATH
           )
 MESSAGE(STATUS "R_LIBRARY = ${R_LIBRARY}")
+endif()
+MESSAGE(STATUS "R_LIBRARY = ${R_LIBRARY}")
+
 find_package_handle_standard_args(R DEFAULT_MSG
                                   R_LIBRARY R_INCLUDE_DIRS)


Added link_external_static.

Added link_external_static.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -216,11 +216,26 @@
   endif ()
 endfunction()

-macro(link_external path)
-#  message(WARNING "args... ${ARGV0} ${ARGV1}")
+macro(link_external_static path)
   set(libname "${ARGV1}")
   if (NOT libname)
-#    message(WARNING "args 2")
+    set(libname ${path})
+  endif ()
+
+  if (MINGW)
+    set(libname "${libname}.dll.a")
+    set_lib_prefix(libname)
+  elseif (MSVC)
+    set(libname "${libname}.lib")
+  endif ()
+
+  target_link_libraries(${CURRENT_TARGET} ${MYTHIC_DEPENDENCIES}/${path}/lib/${libname})
+
+endmacro()
+
+macro(link_external path)
+  set(libname "${ARGV1}")
+  if (NOT libname)
     set(libname ${path})
   endif ()

@@ -230,23 +245,12 @@
   endif ()

   if (MINGW)
-    set(libname "${libname}.dll.a")
-
-    set_lib_prefix(libname)
     set_lib_prefix(dllname)
-#    string(SUBSTRING "${libname}" 0 3 libprefix)
-#    message(WARNING "substring ${libprefix} ${libname}")
-#    if (NOT libprefix STREQUAL "lib")
-#      set(libname "lib${libname}")
-#    endif ()
-
-  elseif (MSVC)
-    set(libname "${libname}.lib")
-  endif ()
-
-  target_link_libraries(${CURRENT_TARGET} ${MYTHIC_DEPENDENCIES}/${path}/lib/${libname})
+  endif ()
+
+  link_external_static(${path} ${libname})

   add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
     COMMAND ${CMAKE_COMMAND} -E copy ${MYTHIC_DEPENDENCIES}/${path}/bin/${dllname}.dll $<TARGET_FILE_DIR:${CURRENT_TARGET}>
     )
-endmacro()
+endmacro()


one for the build dir, one for the install dir

--- cmake/all.cmake
+++ cmake/all.cmake
@@ -22,8 +22,12 @@
   include(${catkin_EXTRAS_DIR}/${f}.cmake)
 endforeach()

-set(CATKIN_CONTEXT_FILE ${catkin_BINARY_DIR}/catkin-context.py
-  CACHE INTERNAL "catkin context file")
-
+if(catkin_BINARY_DIR)
+  set(CATKIN_CONTEXT_FILE ${catkin_BINARY_DIR}/catkin-context.py
+    CACHE INTERNAL "catkin context file")
+else()
+  set(CATKIN_CONTEXT_FILE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/catkin-context.py
+    CACHE INTERNAL "catkin context file")
+endif()
 configure_file(${catkin_EXTRAS_DIR}/catkin-context.in ${CATKIN_CONTEXT_FILE})


Some debug options are removed because they are installed by Cmake automatically.

Also forcing -ggdb3 on android leads to debuging issues.

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -183,9 +183,6 @@

   set(OPENCV_EXTRA_FLAGS_RELEASE "${OPENCV_EXTRA_FLAGS_RELEASE} -DNDEBUG")
   set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -O0 -DDEBUG -D_DEBUG")
-  if(BUILD_WITH_DEBUG_INFO)
-    set(OPENCV_EXTRA_FLAGS_DEBUG "${OPENCV_EXTRA_FLAGS_DEBUG} -ggdb3")
-  endif()
 endif()

 if(MSVC)


cmake: fix ENABLE_PROFILING

cmake: fix ENABLE_PROFILING

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -189,7 +189,6 @@

   # Profiling?
   if(ENABLE_PROFILING)
-    add_extra_compiler_option("-pg -g")
     # turn off incompatible options
     foreach(flags CMAKE_CXX_FLAGS CMAKE_C_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG
                   OPENCV_EXTRA_FLAGS_RELEASE OPENCV_EXTRA_FLAGS_DEBUG OPENCV_EXTRA_C_FLAGS OPENCV_EXTRA_CXX_FLAGS)
@@ -197,6 +196,9 @@
       string(REPLACE "-ffunction-sections" "" ${flags} "${${flags}}")
       string(REPLACE "-fdata-sections" "" ${flags} "${${flags}}")
     endforeach()
+    # -pg should be placed both in the linker and in the compiler settings
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg")
+    add_extra_compiler_option("-pg -g")
   else()
     if(MSVC)
       # TODO: Clang/C2 is not supported


Use -Wno-deprecated-declarations also for clang builds

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -110,6 +110,9 @@
   if(CMAKE_COMPILER_IS_GNUCXX)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
   endif()
+  if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
+  endif()
 endif()

 if(libcxx)


Fix detection of <filesystem> on FreeBSD

Closes #1210

--- cmakemodules/FindFilesystem.cmake
+++ cmakemodules/FindFilesystem.cmake
@@ -12,6 +12,10 @@
 if(MRPT_COMPILER_IS_GCC_OR_CLANG)
     set(CMAKE_REQUIRED_LINK_OPTIONS -std=c++17)
     set(CMAKE_REQUIRED_FLAGS -std=c++17)
+    if ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+        set(CMAKE_REQUIRED_LINK_OPTIONS -stdlib=libc++)
+        set(CMAKE_REQUIRED_FLAGS -stdlib=libc++)
+    endif()
 endif()

 set(have_fs FALSE)


ci: Disable examples on static build to reduce CI cycle time

--- scripts/ci/cmake/ci-el7-gnu8-openmpi-ohpc-static.cmake
+++ scripts/ci/cmake/ci-el7-gnu8-openmpi-ohpc-static.cmake
@@ -23,6 +23,8 @@
 set(dashboard_cache "
 BUILD_SHARED_LIBS:BOOL=OFF
 CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON
+
+ADIOS2_BUILD_EXAMPLES:BOOL=OFF

 ADIOS2_USE_BZip2:BOOL=ON
 ADIOS2_USE_Blosc:BOOL=ON


CMake: if condition for NDEBUG test was reversed

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -516,7 +516,9 @@
     "Test -NDEBUG flag: ${_TRY_COMPILE_OUTPUT}\n")

   if(_TRY_SUCCESS)
-    message(STATUS "no assertions... adding -DNDEBUG")
+    message(STATUS "assertions present")
+  else()
+    message(STATUS "no assertions.. adding -DNDEBUG")
     set(LLVM_CXXFLAGS "${LLVM_CXXFLAGS} -DNDEBUG")
   endif()


Revert "Temporarily disable LLVM 12 support (for 1.6 release)"

This reverts commit aa53aa7715bd023715796a0e8356c2f8c8b52fbf.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -39,6 +39,7 @@
     NAMES
       "llvmtce-config"
       "llvm-config"
+      "llvm-config-mp-12.0" "llvm-config-12" "llvm-config120"
       "llvm-config-mp-11.0" "llvm-config-11" "llvm-config110"
       "llvm-config-mp-10.0" "llvm-config-10" "llvm-config100"
       "llvm-config-mp-9.0" "llvm-config-9" "llvm-config90"
@@ -194,8 +195,11 @@
 elseif(LLVM_VERSION MATCHES "^11[.]")
   set(LLVM_MAJOR 11)
   set(LLVM_11_0 1)
+elseif(LLVM_VERSION MATCHES "^12[.]")
+  set(LLVM_MAJOR 12)
+  set(LLVM_12_0 1)
 else()
-  message(FATAL_ERROR "LLVM version between 6.0 and 11.0 required, found: ${LLVM_VERSION}")
+  message(FATAL_ERROR "LLVM version between 6.0 and 12.0 required, found: ${LLVM_VERSION}")
 endif()

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


Make FindV8 support _g endings for debug builds.

--- build/modules/FindV8.cmake
+++ build/modules/FindV8.cmake
@@ -51,13 +51,13 @@

 # Without system dirs
 FIND_LIBRARY(V8_LIBRARIES
-  NAMES v8
+  NAMES v8 v8_g
   PATHS ${V8_LIBRARY_DIRS}
   NO_DEFAULT_PATH
   )
 IF(NOT V8_LIBRARIES)  # now look in system locations
   FIND_LIBRARY(V8_LIBRARIES
-    NAMES v8
+    NAMES v8 v8_g
     )
 ENDIF(NOT V8_LIBRARIES)


Update cmake file for armel

Update cmake file for armel

Enable build using Tizen rootfs

Signed-off-by: Hyung-Kyu Choi <b24f6a1d8ab6a697998e8a2c60eb031a02db5070@samsung.com>

--- cross/armel/toolchain.cmake
+++ cross/armel/toolchain.cmake
@@ -22,7 +22,7 @@
 set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} -target ${TOOLCHAIN}")
 set(CROSS_LINK_FLAGS "${CROSS_LINK_FLAGS} --sysroot=${CROSS_ROOTFS}")

-if("$ENV{__DistroRid}" STREQUAL "tizen.3.0.0-armel")
+if("$ENV{__DistroRid}" MATCHES "tizen.*")
     add_compile_options(-I$ENV{ROOTFS_DIR}/usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.9.2/include/c++/)
     add_compile_options(-I$ENV{ROOTFS_DIR}/usr/lib/gcc/armv7l-tizen-linux-gnueabi/4.9.2/include/c++/armv7l-tizen-linux-gnueabi)
     add_compile_options(-Wno-deprecated-declarations) # compile-time option


Updating towards ITK 4.6 with master on 6/20/14

Change-Id: I25a6346823a4a97214b20fa2357be6e3f5ae67a3

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,8 +35,8 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-# master on 6/14/14
-set(ITK_TAG_COMMAND GIT_TAG 3b7314b1ecbc5e81b082f83b9819ff04d64217a9)
+# master on 6/20/14
+set(ITK_TAG_COMMAND GIT_TAG 82fdd708851c1a80985e324c04301feecf389be8)

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


Update ITK version to official 5.1.1 tag

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

-set(_DEFAULT_ITK_GIT_TAG "6eb2bb0005da1d32065dd91b44b3796d44a84f0f")
+set(_DEFAULT_ITK_GIT_TAG "v5.1.1")
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


modules: fix dependency finding for GlxContext.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -421,7 +421,7 @@
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Context.h)

         # GLX context dependencies
-        if(${component} STREQUAL GlxStub)
+        if(${component} STREQUAL GlxContext)
             find_package(X11)
             if(X11_FOUND)
                 set(_MAGNUM_${_COMPONENT}_LIBRARIES ${X11_LIBRARIES})


Plural versions of *_INCLUDE_DIR and *_LIBRARY FindMagnum variables.

It took me years to fully accept this CMake policy. Now it's enough to
specify ${MAGNUM_LIBRARIES} instead of all those Corrade, OpenGL /
OpenGL ES, GLEW etc. dependencies (heh).

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -10,8 +10,9 @@
 #  MAGNUM_TARGET_GLES           - Defined if Magnum was built for OpenGL ES,
 #   slightly reducing feature count. The same variable is also #defined in
 #   Magnum headers.
-#  MAGNUM_LIBRARY               - Magnum library
-#  MAGNUM_INCLUDE_DIR           - Root include dir
+#  MAGNUM_LIBRARIES             - Magnum library and dependent libraries
+#  MAGNUM_INCLUDE_DIRS          - Root include dir and include dirs of
+#   dependencies
 #  MAGNUM_PLUGINS_IMPORTER_DIR  - Directory with importer plugins
 #
 # This command will try to find only the base library, not the optional
@@ -35,9 +36,13 @@
 # For each component is then defined:
 #
 #  MAGNUM_*_FOUND   - Whether the component was found
-#  MAGNUM_*_LIBRARY - Component library
+#  MAGNUM_*_LIBRARIES - Component library and dependent libraries
 #
 # Additionally these variables are defined for internal usage:
+#
+#  MAGNUM_INCLUDE_DIR                   - Root include dir (w/o dependencies)
+#  MAGNUM_LIBRARY                       - Magnum library (w/o dependencies)
+#  MAGNUM_*_LIBRARY                     - Component libraries (w/o dependencies)
 #
 #  MAGNUM_LIBRARY_INSTALL_DIR           - Library installation directory
 #  MAGNUM_PLUGINS_INSTALL_DIR           - Plugin installation directory
@@ -91,7 +96,9 @@
         # GLUT context dependencies
         if(${component} STREQUAL GlutContext)
             find_package(GLUT)
-            if(NOT GLUT_FOUND)
+            if(GLUT_FOUND)
+                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_LIBRARIES})
+            else()
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()
         endif()
@@ -99,7 +106,9 @@
         # SDL2 context dependencies
         if(${component} STREQUAL Sdl2Context)
             find_package(SDL2)
-            if(NOT SDL2_FOUND)
+            if(SDL2_FOUND)
+                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${SDL2_LIBRARY})
+            else()
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()
         endif()
@@ -108,7 +117,9 @@
         if(${component} STREQUAL EglContext)
             find_package(EGL)
             find_package(X11)
-            if(NOT EGL_FOUND OR NOT X11_FOUND)
+            if(EGL_FOUND AND X11_FOUND)
+                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY} ${X11_LIBRARIES})
+            else()
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()
         endif()
@@ -143,6 +154,7 @@

     # Decide if the library was found
     if(MAGNUM_${_COMPONENT}_LIBRARY AND _MAGNUM_${_COMPONENT}_INCLUDE_DIR)
+        set(MAGNUM_${_COMPONENT}_LIBRARIES ${MAGNUM_${_COMPONENT}_LIBRARY} ${_MAGNUM_${_COMPONENT}_LIBRARIES})
         set(Magnum_${component}_FOUND TRUE)
     else()
         set(Magnum_${component}_FOUND FALSE)
@@ -153,6 +165,21 @@
 find_package_handle_standard_args(Magnum
     REQUIRED_VARS MAGNUM_INCLUDE_DIR MAGNUM_LIBRARY
     HANDLE_COMPONENTS)
+
+# Dependent libraries and includes
+set(MAGNUM_INCLUDE_DIRS ${MAGNUM_INCLUDE_DIR}
+    ${CORRADE_INCLUDE_DIR})
+set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARY}
+    ${CORRADE_UTILITY_LIBRARY}
+    ${CORRADE_PLUGINMANAGER_LIBRARY})
+if(NOT MAGNUM_TARGET_GLES)
+    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES}
+        ${OPENGL_gl_LIBRARY}
+        ${GLEW_LIBRARY})
+else()
+    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES}
+        ${OPENGLES2_LIBRARY})
+endif()

 # Installation dirs
 set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
@@ -162,6 +189,8 @@
 set(MAGNUM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum)
 set(MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum/Plugins)
 mark_as_advanced(FORCE
+    MAGNUM_LIBRARY
+    MAGNUM_INCLUDE_DIR
     MAGNUM_LIBRARY_INSTALL_DIR
     MAGNUM_PLUGINS_INSTALL_DIR
     MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -325,7 +325,7 @@

 # Component distinction (listing them explicitly to avoid mistakes with finding
 # components from other repositories)
-set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|GlutApplication|GlxApplication|NaClApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessGlxApplication|WindowlessNaClApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext)$")
+set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|GlutApplication|GlxApplication|NaClApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessGlxApplication|WindowlessNaClApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext)$")
 set(_MAGNUM_PLUGIN_COMPONENTS "^(MagnumFont|MagnumFontConverter|ObjImporter|TgaImageConverter|TgaImporter|WavAudioImporter)$")
 set(_MAGNUM_EXECUTABLE_COMPONENTS "^(distancefieldconverter|fontconverter|info)$")


[cmake] need to include boost dir in test

--- cmake/BoostTestHelper.cmake
+++ cmake/BoostTestHelper.cmake
@@ -43,7 +43,9 @@
     add_executable(${TEST_EXECUTABLE_NAME} ${param_SOURCE})

     if(NOT ${param_INCLUDE} STREQUAL "")
-        target_include_directories(${TEST_EXECUTABLE_NAME} ${param_INCLUDE})
+        target_include_directories(${TEST_EXECUTABLE_NAME} PUBLIC ${param_INCLUDE} ${Boost_INCLUDE_DIRS})
+    else()
+        target_include_directories(${TEST_EXECUTABLE_NAME} PUBLIC ${Boost_INCLUDE_DIRS})
     endif()

     target_link_libraries(${TEST_EXECUTABLE_NAME}


GIT: use rev-list --count for > 1.7.2 and simple count for older versions 	git rev-list supports --count from versions > 1.7.2 	For the older versions counting the lines of git rev-list output 	is used for generating the serial number for ARVersion.h

--- cmake/CheckGitVersion.cmake
+++ cmake/CheckGitVersion.cmake
@@ -29,6 +29,8 @@
     find_package(Git)

     if(GIT_FOUND)
+        message(STATUS "Git version = ${GIT_VERSION_STRING}")
+
         get_git_head_revision(GIT_REFSPEC GIT_SHA1)

         # generate the short version of the revision hash
@@ -42,14 +44,26 @@
         if(NOT res EQUAL 0)
             set(GIT_SHORT_SHA1 ${GIT_SHA1})
         endif()
+
+        # Older Git version < 1.7.3 do not have --count option for rev-list
+        # We use simple rev-list and we count the lines of the output
+        string(COMPARE GREATER "${GIT_VERSION_STRING}" "1.7.3" NEWGIT)

-        # generate the short version of the revision hash
-        execute_process(COMMAND git rev-list --count ${GIT_SHA1}
-                          WORKING_DIRECTORY ${AliRoot_SOURCE_DIR}
-                          OUTPUT_STRIP_TRAILING_WHITESPACE
-                          RESULT_VARIABLE revcount
-                          OUTPUT_VARIABLE ALIROOT_SERIAL_ORIGINAL)
-
+        if(NEWGIT)
+            # generate the short version of the revision hash using --count
+            execute_process(COMMAND git rev-list --count ${GIT_SHA1}
+                            WORKING_DIRECTORY ${AliRoot_SOURCE_DIR}
+                            OUTPUT_STRIP_TRAILING_WHITESPACE
+                            RESULT_VARIABLE revcount
+                            OUTPUT_VARIABLE ALIROOT_SERIAL_ORIGINAL)
+        else()
+            # generate the short version of the revision hash using -wc -l
+            execute_process(COMMAND git rev-list ${GIT_SHA1} | wc -l
+                            WORKING_DIRECTORY ${AliRoot_SOURCE_DIR}
+                            OUTPUT_STRIP_TRAILING_WHITESPACE
+                            RESULT_VARIABLE revcount
+                            OUTPUT_VARIABLE ALIROOT_SERIAL_ORIGINAL)
+        endif()

         # GIT_REFSPEC is empty for detached mode = tags in detached mode or checkout to specific hash


METIS_FOUND is never set.
Changed the commit to fit the setting of the other *_FOUND definitions.

Change-Id: I3f0d11a9a65a0decd1a6a6b28a4a4823eb74c9c3

--- cmake/FindSuiteSparse.cmake
+++ cmake/FindSuiteSparse.cmake
@@ -523,8 +523,10 @@
   PATHS ${SUITESPARSE_CHECK_LIBRARY_DIRS})
 IF (EXISTS ${METIS_LIBRARY})
   MESSAGE(STATUS "Found METIS library: ${METIS_LIBRARY}.")
+  set(METIS_FOUND TRUE)
 ELSE (EXISTS ${METIS_LIBRARY})
   MESSAGE(STATUS "Did not find METIS library (optional SuiteSparse dependency)")
+  set(METIS_FOUND FALSE)
 ENDIF (EXISTS ${METIS_LIBRARY})
 MARK_AS_ADVANCED(METIS_LIBRARY)


Added profiling flags.

Added profiling flags.

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

--- cmake/OpenSyncTesting.cmake
+++ cmake/OpenSyncTesting.cmake
@@ -1,5 +1,11 @@
 ENABLE_TESTING()
 INCLUDE( CTest )
+
+SET( CMAKE_BUILD_TYPE PROFILING )
+SET( CMAKE_C_FLAGS_PROFILING "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wwrite-strings -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Compiler Flags" )
+SET( CMAKE_SHARED_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags" )
+SET( CMAKE_MODULE_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags" )
+SET( CMAKE_EXEC_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags" )

 MACRO( OPENSYNC_ADD_TEST _testName _testSource )


Hotfix: change to nvcc optimization for cuda 10.1

--- cmake/PVConfigProject.cmake
+++ cmake/PVConfigProject.cmake
@@ -42,7 +42,7 @@

   # CUDA flags
   set(CUDA_BASE_FLAGS "-arch=sm_30 -std=c++11")
-  set(CUDA_RELEASE_FLAGS "${CUDA_BASE_FLAGS};-O")
+  set(CUDA_RELEASE_FLAGS "${CUDA_BASE_FLAGS};-O3")
   set(CUDA_DEBUG_FLAGS "${CUDA_BASE_FLAGS};-Xptxas;-v;-keep;-lineinfo;-g;-G")

   # CUDNN path hints


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(gloox VERSION 1.0.20-p2)
+hunter_config(gloox VERSION 1.0.20-p3)
 hunter_config(wdc VERSION 1.0.1-hunter-p1)
 hunter_config(pugixml VERSION 1.8.1)
 hunter_config(puffin-stream VERSION 0.2.2.0)


fix a bug when download from github instead but the subdir is changed to a wrong one

--- cmake/mirrors/gitcode.cmake
+++ cmake/mirrors/gitcode.cmake
@@ -57,13 +57,14 @@
     message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.")
   endif()
 endmacro()
-macro(ocv_download_url_gitcode_archive_release)
+macro(ocv_download_url_gitcode_archive_release SUBDIR)
   if(DL_HASH STREQUAL "${${DL_ID}_PKG_MD5_ORIGINAL}")
     string(REPLACE "/" ";" DL_URL_split ${DL_URL})
     list(GET DL_URL_split 3 __OWNER)
     list(GET DL_URL_split 4 __REPO_NAME)
     set(DL_URL "https://gitcode.net/${__OWNER}/${__REPO_NAME}/-/archive/${${DL_ID}_RELEASE_GITCODE}/${__REPO_NAME}-")
     set(DL_HASH "${${DL_ID}_PKG_MD5_GITCODE}")
+    set(SUBDIR "${${DL_ID}_PKG_NAME_GITCODE}" PARENT_SCOPE)
   else()
     message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.")
   endif()
@@ -76,11 +77,9 @@
 elseif((DL_ID STREQUAL "TENGINE") OR (DL_ID STREQUAL "NVIDIA_OPTICAL_FLOW") OR (DL_ID STREQUAL "TIM-VX"))
   ocv_download_url_gitcode_archive_commit_id()
 elseif(DL_ID STREQUAL "TBB")
-  ocv_download_url_gitcode_archive_release()
-  set(OPENCV_TBB_SUBDIR "${TBB_PKG_NAME_GITCODE}" PARENT_SCOPE)
+  ocv_download_url_gitcode_archive_release(OPENCV_TBB_SUBDIR)
 elseif(DL_ID STREQUAL "ADE")
-  ocv_download_url_gitcode_archive_release()
-  set(ade_subdir "${ADE_PKG_NAME_GITCODE}" PARENT_SCOPE)
+  ocv_download_url_gitcode_archive_release(ade_subdir)
 else()
   message(STATUS "ocv_download: Unknown download ID ${DL_ID} for using mirror gitcode.net. Use original source instead.")
 endif()


[CMake] Fixing inconsistency caused by copy-pasta.

This will actually fix the PR 24194.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -694,8 +694,8 @@
     set(add_llvm_external_dir ${name})
   endif()
   canonicalize_tool_name(${name} nameUPPER)
-  if(NOT DEFINED LLVM_TOOL_${projectName}_BUILD)
-    option(LLVM_TOOL_${name}_BUILD
+  if(NOT DEFINED LLVM_TOOL_${nameUPPER}_BUILD)
+    option(LLVM_TOOL_${nameUPPER}_BUILD
            "Whether to build ${name} as part of LLVM" On)
   endif()
   if (LLVM_TOOL_${nameUPPER}_BUILD)