separate mklml download path and install path

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -21,9 +21,10 @@
 SET(MKLML_PROJECT       "extern_mklml")
 SET(MKLML_VER           "mklml_lnx_2018.0.20170425")
 SET(MKLML_URL           "https://github.com/01org/mkl-dnn/releases/download/v0.9/${MKLML_VER}.tgz")
-SET(MKLML_DOWNLOAD_DIR  "${CMAKE_INSTALL_PREFIX}/opt/paddle/third_party/mklml")
+SET(MKLML_DOWNLOAD_DIR  "${THIRD_PARTY_PATH}/mklml")
+SET(MKLML_INSTALL_DIR   "${CMAKE_INSTALL_PREFIX}/opt/paddle/third_party/mklml")

-SET(MKLML_ROOT          ${MKLML_DOWNLOAD_DIR}/${MKLML_VER})
+SET(MKLML_ROOT          ${MKLML_INSTALL_DIR}/${MKLML_VER})
 SET(MKLML_INC_DIR       ${MKLML_ROOT}/include)
 SET(MKLML_LIB_DIR       ${MKLML_ROOT}/lib)
 SET(MKLML_LIB           ${MKLML_LIB_DIR}/libmklml_intel.so)
@@ -38,7 +39,8 @@
     PREFIX                ${MKLML_DOWNLOAD_DIR}
     DOWNLOAD_DIR          ${MKLML_DOWNLOAD_DIR}
     DOWNLOAD_COMMAND      wget --no-check-certificate -O ${MKLML_DOWNLOAD_DIR}/${MKLML_VER}.tgz ${MKLML_URL}
-                          && tar -xzf ${MKLML_DOWNLOAD_DIR}/${MKLML_VER}.tgz
+                          && mkdir -p ${MKLML_INSTALL_DIR}
+                          && tar -xzf ${MKLML_DOWNLOAD_DIR}/${MKLML_VER}.tgz -C ${MKLML_INSTALL_DIR}
     DOWNLOAD_NO_PROGRESS  1
     UPDATE_COMMAND        ""
     PATCH_COMMAND         ""


iOS: Fix to prevent absolute paths from being inserted into resources.cfg for iOS to fix running the sample browser on devices.

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -27,11 +27,11 @@
     set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
   else()
     if(OGRE_INSTALL_SAMPLES_SOURCE)
-      set(OGRE_MEDIA_PATH "media")
+      set(OGRE_MEDIA_PATH "Media")
       set(OGRE_MEDIA_DIR_REL "../../../${OGRE_MEDIA_PATH}")
       set(OGRE_MEDIA_DIR_DBG "../../../${OGRE_MEDIA_PATH}")
     else()
-      set(OGRE_MEDIA_PATH "Samples/media")
+      set(OGRE_MEDIA_PATH "Samples/Media")
       set(OGRE_MEDIA_DIR_REL "../../../../${OGRE_MEDIA_PATH}")
       set(OGRE_MEDIA_DIR_DBG "../../../../${OGRE_MEDIA_PATH}")
     endif()
@@ -142,17 +142,20 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
-if (NOT OGRE_BUILD_PLATFORM_IPHONE)
-  set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
-  set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
-endif ()
-
+set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/Media")
+set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/Media")
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")
   set(OGRE_SAMPLES_DIR_REL ".")
   set(OGRE_SAMPLES_DIR_DBG ".")
 elseif (APPLE)
+  # iPhone needs to use relative paths in the config files
+  if(OGRE_BUILD_PLATFORM_IPHONE)
+    set(OGRE_MEDIA_DIR_REL "${OGRE_MEDIA_PATH}")
+    set(OGRE_MEDIA_DIR_DBG "${OGRE_MEDIA_PATH}")
+  endif(OGRE_BUILD_PLATFORM_IPHONE)
+
   # not used on OS X, uses Resources
   set(OGRE_PLUGIN_DIR_REL "")
   set(OGRE_PLUGIN_DIR_DBG "")


ctkMacroBuildLib - On Linux, set -fPIC compile flag if build statically

--- CMake/ctkMacroBuildLib.cmake
+++ CMake/ctkMacroBuildLib.cmake
@@ -147,6 +147,13 @@
     SET_TARGET_PROPERTIES(${lib_name} PROPERTIES ${CTK_LIBRARY_PROPERTIES})
   ENDIF()
   SET_TARGET_PROPERTIES(${lib_name} PROPERTIES CTK_LIB_TARGET_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+
+  # Library properties specific to STATIC build
+  IF(MY_LIBRARY_TYPE STREQUAL "STATIC")
+    IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
+      SET_TARGET_PROPERTIES(${lib_name} PROPERTIES COMPILE_FLAGS "-fPIC")
+    ENDIF()
+  ENDIF()

   # Install rules
   IF(MY_LIBRARY_TYPE STREQUAL "SHARED")


cmake MAINTENANCE remove duplicate definition

--- CMakeModules/UseCompat.cmake
+++ CMakeModules/UseCompat.cmake
@@ -13,7 +13,6 @@

     check_symbol_exists(get_current_dir_name "unistd.h" HAVE_GET_CURRENT_DIR_NAME)

-    list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_POSIX_C_SOURCE=200809L)
     check_symbol_exists(strndup "string.h" HAVE_STRNDUP)
     check_symbol_exists(getline "stdio.h" HAVE_GETLINE)


Bugfix: Do not try to inject a "\n\t" into xml files

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31540 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -565,7 +565,7 @@
 ENDIF()
 FILE(GLOB _xml_files ${_path}/*.xml)
 EXECUTE_PROCESS(COMMAND sed -i -e
-  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
+  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\" CompilerVersion=\"${_compiler_version}\"/g
   ${_xml_files}
   OUTPUT_QUIET RESULT_VARIABLE  _res
   )


Revert "Bugfix: Do not try to inject a "\n\t" into xml files"

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31549 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -565,7 +565,7 @@
 ENDIF()
 FILE(GLOB _xml_files ${_path}/*.xml)
 EXECUTE_PROCESS(COMMAND sed -i -e
-  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\" CompilerVersion=\"${_compiler_version}\"/g
+  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
   ${_xml_files}
   OUTPUT_QUIET RESULT_VARIABLE  _res
   )


disable widgets which depend on QCharts

disable widgets which depend on QCharts

--- Modules/QmitkExt/files.cmake
+++ Modules/QmitkExt/files.cmake
@@ -100,8 +100,8 @@
 if( NOT ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION} VERSION_LESS 5.4.0 )
   set(CPP_FILES
     ${CPP_FILES}
-    QmitkVtkHistogramWidget.cpp
-    QmitkVtkLineProfileWidget.cpp
+    #QmitkVtkHistogramWidget.cpp
+    #QmitkVtkLineProfileWidget.cpp //VTK6_TODO
   )
 endif()

@@ -183,8 +183,8 @@
 if( NOT ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}.${VTK_BUILD_VERSION} VERSION_LESS 5.4.0 )
   set(MOC_H_FILES
     ${MOC_H_FILES}
-    QmitkVtkHistogramWidget.h
-    QmitkVtkLineProfileWidget.h
+    #QmitkVtkHistogramWidget.h
+    #QmitkVtkLineProfileWidget.h //VTK6_TODO
   )
 endif()


Add missing library

Add missing library

--- lib/FindAtomSpace.cmake
+++ lib/FindAtomSpace.cmake
@@ -14,6 +14,9 @@
    /usr/lib/ /usr/lib64/ /usr/local/lib/ /usr/local/lib64/)

 find_library(ATOMSPACE_atombase_LIBRARY atombase
+   PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)
+
+find_library(ATOMSPACE_atomcore_LIBRARY atomcore
    PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)

 find_library(ATOMSPACE_LIBRARY atomspace
@@ -63,6 +66,7 @@

 set(ATOMSPACE_LIBRARIES
 	${ATOMSPACE_atombase_LIBRARY}
+	${ATOMSPACE_atomcore_LIBRARY}
 	${ATOMSPACE_LIBRARY}
 	${ATOMSPACE_atomspaceutils_LIBRARY}
 	${ATOMSPACE_truthvalue_LIBRARY}


Fix .mod problem

Fix .mod problem

--- test/module_test.cmake
+++ test/module_test.cmake
@@ -44,24 +44,6 @@
   set(DEBUG_FLAG --debug)
 endif()

-# Execute the CLAW compiler for CPU target
-add_custom_command(
-  OUTPUT  ${OUTPUT_FILE_CPU}
-  COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=cpu ${DIRECTIVE_CPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_CPU} ${ORIGINAL_FILE}
-  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-  DEPENDS ${ORIGINAL_FILE}
-  COMMENT "Translating CLAW directive with ${CLAWFC} for CPU target"
-)
-
-# Execute the CLAW compiler for GPU target
-add_custom_command(
-  OUTPUT  ${OUTPUT_FILE_GPU}
-  COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=gpu ${DIRECTIVE_GPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_GPU} ${ORIGINAL_FILE}
-  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-  DEPENDS ${ORIGINAL_FILE}
-  COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target"
-)
-
 add_custom_command(
   OUTPUT  ${MAIN_CPU}
   COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/main.f90 ${MAIN_CPU}
@@ -73,10 +55,30 @@
   COMMENT "Copy main.f90 to ${MAIN_GPU}"
 )

+# Execute the CLAW compiler for CPU target
+add_custom_command(
+  OUTPUT  ${OUTPUT_FILE_CPU}
+  COMMAND touch ${ORIGINAL_FILE}
+  COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=cpu ${DIRECTIVE_CPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_CPU} ${ORIGINAL_FILE}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+  DEPENDS ${ORIGINAL_FILE}
+  COMMENT "Translating CLAW directive with ${CLAWFC} for CPU target"
+)
+
+# Execute the CLAW compiler for GPU target
+add_custom_command(
+  OUTPUT  ${OUTPUT_FILE_GPU}
+  COMMAND touch ${ORIGINAL_FILE}
+  COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --target=gpu ${DIRECTIVE_GPU} ${DEBUG_FLAG} -J ${XMOD_DIR} -o ${OUTPUT_FILE_GPU} ${ORIGINAL_FILE}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+  DEPENDS ${ORIGINAL_FILE}
+  COMMENT "Translating CLAW directive with ${CLAWFC} for GPU target"
+)
+
 # Target for the transformation
 add_custom_target(
   transform-${TEST_NAME}
-  DEPENDS ${OUTPUT_FILE_CPU} ${OUTPUT_FILE_GPU} ${EXECUTABLE_ORIGINAL} ${EXECUTABLE_TRANSFORMED_CPU} ${EXECUTABLE_TRANSFORMED_GPU}
+  DEPENDS ${MAIN_CPU} ${OUTPUT_FILE_CPU} ${MAIN_GPU} ${OUTPUT_FILE_GPU} ${EXECUTABLE_ORIGINAL} ${EXECUTABLE_TRANSFORMED_CPU} ${EXECUTABLE_TRANSFORMED_GPU}
 )

 # Target to clean the generated file (Output of clawfc)


Update code coverage module

Update code coverage module

--- modules/code_coverage.cmake
+++ modules/code_coverage.cmake
@@ -13,30 +13,54 @@
 #
 # autocmake.yml configuration::
 #
-#   docopt: "--coverage Enable code coverage [default: False]."
+#   docopt: "--coverage Enable code coverage [default: OFF]."
 #   define: "'-DENABLE_CODE_COVERAGE={0}'.format(arguments['--coverage'])"

 option(ENABLE_CODE_COVERAGE "Enable code coverage" OFF)

 if(ENABLE_CODE_COVERAGE)
-    if(DEFINED CMAKE_Fortran_COMPILER_ID)
-        if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
-            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fprofile-arcs -ftest-coverage")
-        endif()
+  if(NOT CMAKE_BUILD_TYPE STREQUAL "debug")
+    message(WARNING "Code coverage analysis results with an optimized (non-Debug) build may be misleading")
+  endif()
+
+  find_program(GCOV_PATH gcov)
+  if(NOT GCOV_PATH)
+    message(FATAL_ERROR "Code coverage analysis requires gcov!")
+  endif()
+
+  if(DEFINED CMAKE_Fortran_COMPILER_ID)
+    if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
+      set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fprofile-arcs -ftest-coverage")
+    else()
+      message(FATAL_ERROR "Code coverage analysis requires the GNU Fortran compiler!")
     endif()
+  endif()

-    if(DEFINED CMAKE_C_COMPILER_ID)
-        if(CMAKE_C_COMPILER_ID MATCHES GNU)
-            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
-        endif()
+  if(DEFINED CMAKE_C_COMPILER_ID)
+    if(CMAKE_C_COMPILER_ID MATCHES "(Apple)?[Cc]lang")
+      if(CMAKE_C_COMPILER_VERSION VERSION_LESS 3)
+        message(FATAL_ERROR "Code coverage analysis on Mac OS X requires Clang version 3.0.0 or greater!")
+      else()
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
+      endif()
+    elseif(CMAKE_C_COMPILER_ID MATCHES GNU)
+      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-arcs -ftest-coverage")
+    else()
+      message(FATAL_ERROR "Code coverage analysis requires the GNU C compiler!")
     endif()
+  endif()

-    if(DEFINED CMAKE_CXX_COMPILER_ID)
-        if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
-            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-        endif()
-        if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
-            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
-        endif()
+  if(DEFINED CMAKE_CXX_COMPILER_ID)
+    if(CMAKE_CXX_COMPILER_ID MATCHES "(Apple)?[Cc]lang")
+      if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3)
+        message(FATAL_ERROR "Code coverage analysis on Mac OS X requires Clang version 3.0.0 or greater!")
+      else()
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+      endif()
+    elseif(CMAKE_CXX_COMPILER_ID MATCHES GNU)
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-arcs -ftest-coverage")
+    else()
+      message(FATAL_ERROR "Code coverage analysis requires the GNU C++ compiler!")
     endif()
+  endif()
 endif()


ENH: Update version of DCMTK to 3.6.1_20170529

DCMTK diff can be seen in https://github.com/InsightSoftwareConsortium/DCMTK/compare/efe1a177eac040b6d41aae0db7714cd970e12bc5...4a843721146eccba2524b011e36bae64a8ae52a0

Change-Id: I014dc99c5bcbcee72275a0026ea9a69ba2a87105

--- Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake
+++ Modules/ThirdParty/DCMTK/DCMTKGitTag.cmake
@@ -1,10 +1,10 @@
 # Set GIT tag here for use in multiple CMakeLists.txt
 #
 set(DCMTK_GIT_REPOSITORY "https://github.com/InsightSoftwareConsortium/DCMTK.git")
-# 2016.10.12 patched
+# 2017.05.29 patched
 # Patch list:
 # COMP: Uses ITK PNG instead of system PNG (537c3f4)
 # BUG: when using ITK_ZLIB, wasn't finding zlib header (d037077)
 # COMP: Set 3rd party package CMake variables only if needed (be4f772)
 # COMP: Mods to allow using ITK libs (22c30e5)
-set(DCMTK_GIT_TAG "537c3f4d68a7f923fa811fca26be46d9149e8e1d")
+set(DCMTK_GIT_TAG "4a843721146eccba2524b011e36bae64a8ae52a0")


Version: Update development date

Version: Update development date

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


Updated for 32-bit builds.

Updated for 32-bit builds.

--- make/proto_server.cmake
+++ make/proto_server.cmake
@@ -11,9 +11,9 @@

 if (${ARCH_PROCESSOR} MATCHES "i386")
   set(BIT_FLAG "-m32")
-else  (${ARCH_PROCESSOR} MATCHES "i386")
+else  ()
   set(BIT_FLAG "-m64")
-endif (${ARCH_PROCESSOR} MATCHES "i386")
+endif ()

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_FLAG} -Wall -std=c++11")


enable clang sanitizers on Mac

enable clang sanitizers on Mac

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -15,21 +15,24 @@

 list( APPEND TNUN_default_warnings -Wdocumentation )

-if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 8
-    list( APPEND TNUN_compiler_LTO -fwhole-program-vtables )
+list( APPEND TNUN_compiler_LTO -fwhole-program-vtables )

-    # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
-    # http://clang.llvm.org/docs/AddressSanitizer.html
-    # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
-    set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address -fsanitize=safe-stack )
-    # -fsanitize=cfi disabled because of error:
-    # clang-3.9: error: invalid argument '-fsanitize=cfi' only allowed with '-flto'
+# http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
+# http://clang.llvm.org/docs/AddressSanitizer.html
+# http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
+set( TNUN_linker_runtime_sanity_checks -fsanitize=undefined -fsanitize=address )
+# -fsanitize=cfi disabled because of error:
+# clang-3.9: error: invalid argument '-fsanitize=cfi' only allowed with '-flto'

-    # -fsanitize=thread -fsanitize=memory disabled because of error:
-    # clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=thread'
-    # clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=memory'
-    set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )
+# -fsanitize=thread -fsanitize=memory disabled because of error:
+# clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=thread'
+# clang-3.9: error: invalid argument '-fsanitize=address' not allowed with '-fsanitize=memory'
+# set( TNUN_compiler_runtime_sanity_checks ${TNUN_linker_runtime_sanity_checks} -fno-omit-frame-pointer )
+
+if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 9.2
+    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=safe-stack )
 endif()
+
 if( NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang" ) # Tested with XCode 8.3
     set( TNUN_compiler_runtime_integer_checks -fsanitize=integer )
     set( TNUN_linker_runtime_integer_checks   ${TNUN_compiler_runtime_integer_checks} )


Incorporate Xcode 11.4 build fix (#180)

Incorporate Xcode 11.4 build fix (#180)

--- cmake/projects/Boost/hunter.cmake
+++ cmake/projects/Boost/hunter.cmake
@@ -168,6 +168,17 @@
     "https://github.com/cpp-pm/boost/archive/v1.72.0-p0.tar.gz"
     SHA1
     6022cd8eea0f04cbfb78df8064fcd134e40a7735
+)
+
+hunter_add_version(
+    PACKAGE_NAME
+    Boost
+    VERSION
+    "1.72.0-p1"
+    URL
+    "https://github.com/cpp-pm/boost/archive/v1.72.0-p1.tar.gz"
+    SHA1
+    04f570acbe0beb762e588ad3de292d0328a79c64
 )

 # up until 1.63 sourcefourge was used
@@ -445,4 +456,4 @@
         endif()
     endif()
     endif()
-endif()+endif()


Avoid compilation for failure test

Avoid compilation for failure test

--- test/failure_test.cmake
+++ test/failure_test.cmake
@@ -43,11 +43,6 @@
 endif()

 add_custom_target(
-  compile-${TEST_NAME}
-  DEPENDS ${EXECUTABLE_ORIGINAL}
-)
-
-add_custom_target(
   transform-${TEST_NAME}
   DEPENDS ${OUTPUT_FILE}
 )
@@ -62,9 +57,7 @@
 )

 # Add target to the global build/clean target
-add_dependencies(${BUILD_TEST_TARGET} compile-${TEST_NAME})
 add_dependencies(${CLEAN_TEST_TARGET} clean-${TEST_NAME})
-add_dependencies(${BUILD_TEST_TARGET}-${TEST_SET} compile-${TEST_NAME})
 add_dependencies(${CLEAN_TEST_TARGET}-${TEST_SET} clean-${TEST_NAME})

 # Define additional compilation flags


github ci aarch64 config build re add cpp-httplib  3

--- toolchains/aarch64-linux-gnu.toolchain.cmake
+++ toolchains/aarch64-linux-gnu.toolchain.cmake
@@ -14,3 +14,6 @@
 # cache flags
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags")
+set(OPENSSL_ROOT_DIR  "${workspaceFolder}/openssl-1.1.1i/install")
+set(OPENSSL_INCLUDE_DIR "${workspaceFolder}/openssl-1.1.1i/install/include")
+set(OPENSSL_CRYPTO_LIBRARY "${workspaceFolder}/openssl-1.1.1i/install/lib")


Remove remaining references to gaia

Remove remaining references to gaia

--- tests/PythonTests.cmake
+++ tests/PythonTests.cmake
@@ -46,7 +46,7 @@
       NAME ${name}
       WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
       COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append "--rcfile=${py_coverage_rc}"
-              "--source=romanesco,gaia" -m unittest -v ${module}
+              "--source=romanesco" -m unittest -v ${module}
     )
   else()
     add_test(
@@ -69,7 +69,7 @@
       NAME ${name}
       WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
       COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append "--rcfile=${py_coverage_rc}"
-              "--source=romanesco,gaia" "${py_testdir}/docstring_test.py" -v ${module}
+              "--source=romanesco" "${py_testdir}/docstring_test.py" -v ${module}
     )
   else()
     add_test(


Bugfix

Bugfix

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

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -308,7 +308,7 @@
 "###
 #
 #  SVN information:
-#        SVN_WC_URL:               ${SVN_WC_URL}
+#        SVN_WC_URL:               ${_svn_WC_URL}
 #        SVN_WC_REVISION:          ${_svn_WC_REVISION}
 #        SVN_WC_LAST_CHANGED_DATE: ${_svn_WC_LAST_CHANGED_DATE}
 #


 - updated win32.install.cmake : added GLES libs in install

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12446 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/win32.install.cmake
+++ rdo/packages/cmake/trunk/win32.install.cmake
@@ -17,6 +17,9 @@
 FIND_FILE(DLL_D_QT_CORE    Qt5Cored.dll    PATHS ${QT_LIBRARY_DIR})
 FIND_FILE(DLL_D_QT_CUI     Qt5Guid.dll     PATHS ${QT_LIBRARY_DIR})
 FIND_FILE(DLL_D_QT_WIDGETS Qt5Widgetsd.dll PATHS ${QT_LIBRARY_DIR})
+
+FIND_FILE(DLL_GLES libEGL.dll    PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_EGL  libGLESv2.dll PATHS ${QT_LIBRARY_DIR})

 FIND_FILE(DLL_D_QWINDOWS qwindowsd.dll PATHS ${QT_PLATFORM_DIR})
 FIND_FILE(DLL_D_QMINIMAL qminimald.dll PATHS ${QT_PLATFORM_DIR})
@@ -48,6 +51,8 @@
     ${DLL_D_QT_CORE}
     ${DLL_D_QT_CUI}
     ${DLL_D_QT_WIDGETS}
+    ${DLL_GLES}
+    ${DLL_EGL}
     ${DLL_D_QWINDOWS}
     ${DLL_D_QMINIMAL}
     ${DLL_D_MSVCR}


[build] Update libmagic tag (fix for arm64 mac in conda-forge feedstock) (#3461)

--- cmake/Modules/FindMagic_EP.cmake
+++ cmake/Modules/FindMagic_EP.cmake
@@ -90,7 +90,7 @@
     ExternalProject_Add(ep_magic
       PREFIX "externals"
       GIT_REPOSITORY "https://github.com/TileDB-Inc/file-windows.git"
-      GIT_TAG "5.38.1.tiledb"
+      GIT_TAG "5.38.2.tiledb"
       GIT_SUBMODULES_RECURSE TRUE
       UPDATE_COMMAND ""
       CMAKE_ARGS


Temporarily turn off xfig device by default until the multiple stream issue
is fixed.  This workaround will allow testing to continue during this
critical pre-release time.

svn path=/trunk/; revision=9265

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -128,7 +128,7 @@
 "wingcc:wingcc:ON"
 "wxwidgets:wxwidgets:ON"
 "wxpng:wxwidgets:OFF"
-"xfig:xfig:ON"
+"xfig:xfig:OFF"
 "xwin:xwin:ON"
 )


Avoiding problem with relative path.

Avoiding problem with relative path.

Then running the Nightly build of the Testing directory against
and installed ITK. This file doesn't pull the CTestConfig.cmake
file in the top directory of ITK. It looks like the ITKTesting_SOURCE_DIR
cmake variable is not defined yet at the time that this file is
viewed by ctest.

We avoid the problem by simply copying the content of CTestConfig.cmake.
It is not an ideal solution, since now the two files can go out of sync.
Exploring the perfect solution may require assistance from CMake Gurus.

Change-Id: Ia59399e6ded22e6cc4cd2ec015488de34ca37f87

--- Testing/CTestConfig.cmake
+++ Testing/CTestConfig.cmake
@@ -1 +1,7 @@
-include("${ITKTesting_SOURCE_DIR}/../CTestConfig.cmake")
+set(CTEST_PROJECT_NAME "ITK")
+set(CTEST_NIGHTLY_START_TIME "1:00:00 UTC")
+
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "www.cdash.org")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Insight")
+set(CTEST_DROP_SITE_CDASH TRUE)


SK:

SK:

-BUG: running ctest_configure twice seems to solve the problem of
missing KNNlib build. The optino --two-build-config did not help.

--- src/Testing/Dashboard/elxDashboardCommon.cmake
+++ src/Testing/Dashboard/elxDashboardCommon.cmake
@@ -155,6 +155,9 @@
     message("Found ${res} changed files")
     if(res GREATER 0)
       ctest_configure()
+      # run cmake twice; this seems to be necessary, otherwise the
+      # KNN lib is not built
+      ctest_configure()
       ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
       ctest_build()
       ctest_test()
@@ -169,6 +172,9 @@
   ctest_start(${dashboard_model})
   ctest_update()
   ctest_configure()
+  # run cmake twice; this seems to be necessary, otherwise the
+  # KNN lib is not built
+  ctest_configure()
   ctest_read_custom_files(${CTEST_BINARY_DIRECTORY})
   ctest_build()
   ctest_test()


CMake: Require miniupnpc API version 10 or greater

--- contrib/cmake/FindMiniupnp.cmake
+++ contrib/cmake/FindMiniupnp.cmake
@@ -6,8 +6,9 @@

 set(MINIUPNP_PREFIX "" CACHE PATH "path ")

-find_path(MINIUPNP_INCLUDE_DIR miniupnpc/miniupnpc.h
-        PATHS ${MINIUPNP_PREFIX}/include /usr/include /usr/local/include )
+find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h
+        PATHS ${MINIUPNP_PREFIX}/include /usr/include /usr/local/include
+        PATH_SUFFIXES miniupnpc)

 find_library(MINIUPNP_LIBRARY NAMES miniupnpc libminiupnpc
         PATHS ${MINIUPNP_PREFIX}/lib /usr/lib /usr/local/lib)
@@ -17,9 +18,25 @@
     set(MINIUPNP_FOUND TRUE)
 endif()

+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(
+        Miniupnpc DEFAULT_MSG
+        MINIUPNP_INCLUDE_DIR
+        MINIUPNP_LIBRARY
+)
+
 if(MINIUPNP_FOUND)
-    if(NOT Miniupnp_FIND_QUIETLY)
-        MESSAGE(STATUS "Found Miniupnp: ${MINIUPNP_LIBRARY}")
+    file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+")
+    if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)")
+        set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}")
+        if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10")
+            if(NOT Miniupnp_FIND_QUIETLY)
+                message(STATUS "Found Miniupnpc API version " ${MINIUPNPC_API_VERSION})
+            endif()
+            set(MINIUPNP_FOUND true)
+        else()
+            message(FATAL_ERROR "Unsupported Miniupnpc version!")
+        endif()
     endif()
 else()
     if(MINIUPNP_FIND_REQUIRED)


cmake: fix find CGAL

cmake: fix find CGAL

--- build/Modules/FindCGAL.cmake
+++ build/Modules/FindCGAL.cmake
@@ -66,9 +66,9 @@
 		include("${CGAL_DIR}/CGALConfig.cmake")
 		set(CGAL_TARGET_LIBS "")
 		if(TARGET CGAL::CGAL)
-			get_target_property(CGAL_TARGET_LIBS CGAL::CGAL IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
+			get_target_property(CGAL_TARGET_LIBS CGAL::CGAL INTERFACE_LINK_LIBRARIES)
 		elseif(TARGET CGAL)
-			get_target_property(CGAL_TARGET_LIBS CGAL IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE)
+			get_target_property(CGAL_TARGET_LIBS CGAL INTERFACE_LINK_LIBRARIES)
 		endif()
 		if(NOT CGAL_TARGET_LIBS)
 			set(CGAL_TARGET_LIBS "")


Improve compiler detection for x86_64 target

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com

--- build/configs/toolchain_linux_x86_64.cmake
+++ build/configs/toolchain_linux_x86_64.cmake
@@ -15,7 +15,9 @@
 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_PROCESSOR x86_64)

-set(CMAKE_C_COMPILER x86_64-linux-gnu-gcc)
-set(CMAKE_CXX_COMPILER x86_64-linux-gnu-g++)
+find_program(CMAKE_C_COMPILER NAMES x86_64-linux-gnu-gcc x86_64-unknown-linux-gnu-gcc)
+find_program(CMAKE_CXX_COMPILER NAMES x86_64-linux-gnu-g++ x86_64-unknown-linux-gnu-g++)
+# FIXME: This could break cross compilation, when the strip is not for the target architecture
+find_program(CMAKE_STRIP NAMES x86_64-linux-gnu-strip x86_64-unknown-linux-gnu-strip strip)

 set(FLAGS_COMMON_ARCH -ffixed-rbp)


DOC: Only warn when Module_NeuralNetworks is selected

The warning should not be issued if the module is not requested.

--- Modules/Remote/NeuralNetworks.remote.cmake
+++ Modules/Remote/NeuralNetworks.remote.cmake
@@ -13,7 +13,7 @@
   GIT_TAG c293e56699d6d102dcde567baf1cf5b704819c17
   )

-  if(NOT ITK_LEGACY_SILENT)
+  if(NOT ITK_LEGACY_SILENT AND Module_NeuralNetworks)
     message(WARNING "NeuralNetworks remote module is deprecated.
     Development of this module has ended, and it will be removed
     in future ITK versions.")


Create Version.cmake

Create Version.cmake

--- src/Version.cmake
+++ src/Version.cmake
@@ -1,2 +1,2 @@
 # This version number is loaded by the package and the project.
-SET( VERSION "0.9.0" )
+SET( VERSION "0.9.1" )


Update FindOpenJpeg for openjpeg-2.3 (#1871)

Fixes #1867

--- src/cmake/modules/FindOpenJpeg.cmake
+++ src/cmake/modules/FindOpenJpeg.cmake
@@ -59,11 +59,13 @@

 # Generic search paths
 set (OpenJpeg_include_paths
+     /usr/local/include/openjpeg-2.3
      /usr/local/include/openjpeg-2.2
      /usr/local/include/openjpeg-2.1
      /usr/local/include/openjpeg-2.0
      /usr/local/include/openjpeg
      /usr/local/include
+     /usr/include/openjpeg-2.3
      /usr/include/openjpeg-2.2
      /usr/include/openjpeg-2.1
      /usr/include/openjpeg-1.5
@@ -87,6 +89,7 @@
        ${OpenJpeg_library_paths}
       )
   set (OpenJpeg_include_paths
+       ${OPENJPEG_HOME}/include/openjpeg-2.3
        ${OPENJPEG_HOME}/include/openjpeg-2.2
        ${OPENJPEG_HOME}/include/openjpeg-2.1
        ${OPENJPEG_HOME}/include/openjpeg-2.0


Make sure we look for release lib for release config and not debug!

--HG--
branch : v0-8

--- cmake/CEGUIFindHelpers.cmake
+++ cmake/CEGUIFindHelpers.cmake
@@ -72,7 +72,7 @@

     _find_dep_lib(${_PREFIX} ${_LIB} dynamic)
     _find_dep_lib(${_PREFIX} ${_LIB}_d dynamic _DBG)
-    _find_dep_lib(${_PREFIX} ${_LIB}_d static _STATIC TRUE)
+    _find_dep_lib(${_PREFIX} ${_LIB} static _STATIC TRUE)
     _find_dep_lib(${_PREFIX} ${_LIB}_d static _STATIC_DBG TRUE)

     cegui_find_package_handle_standard_args(${_PREFIX} ${_PREFIX}_FOUND_ALL_LIBS ${_PREFIX}_INCLUDE_DIR)


Adds if not defs around the flag declorations

Checks to see if the varibles ARDUINO_C_FLAGS and ARDUINO_CXX_FLAGS has
already been set and only sets them if they are not. This fixes a bug
where the user could not define the flags manually as they where always
overwritten.

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -2032,7 +2032,9 @@
 #=============================================================================#
 #                              C Flags
 #=============================================================================#
-set(ARDUINO_C_FLAGS "-mcall-prologues -ffunction-sections -fdata-sections")
+if (NOT DEFINED ARDUINO_C_FLAGS)
+    set(ARDUINO_C_FLAGS "-mcall-prologues -ffunction-sections -fdata-sections")
+endif (NOT DEFINED ARDUINO_C_FLAGS)
 set(CMAKE_C_FLAGS                "-g -Os       ${ARDUINO_C_FLAGS}"    CACHE STRING "")
 set(CMAKE_C_FLAGS_DEBUG          "-g           ${ARDUINO_C_FLAGS}"    CACHE STRING "")
 set(CMAKE_C_FLAGS_MINSIZEREL     "-Os -DNDEBUG ${ARDUINO_C_FLAGS}"    CACHE STRING "")
@@ -2042,7 +2044,9 @@
 #=============================================================================#
 #                             C++ Flags
 #=============================================================================#
-set(ARDUINO_CXX_FLAGS "${ARDUINO_C_FLAGS} -fno-exceptions")
+if (NOT DEFINED ARDUINO_CXX_FLAGS)
+    set(ARDUINO_CXX_FLAGS "${ARDUINO_C_FLAGS} -fno-exceptions")
+endif (NOT DEFINED ARDUINO_CXX_FLAGS)
 set(CMAKE_CXX_FLAGS                "-g -Os       ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
 set(CMAKE_CXX_FLAGS_DEBUG          "-g           ${ARDUINO_CXX_FLAGS}" CACHE STRING "")
 set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG ${ARDUINO_CXX_FLAGS}" CACHE STRING "")


build: use the architecture directory for Windows resources

Windows does not support fat binaries, so the target specific components should
be placed into the architecture subdirectory.  Due to the cross-compilation
model that swift has, this needs to be added explicitly for now.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -2019,8 +2019,8 @@
         swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"
           TARGETS ${name}-windows-${SWIFT_PRIMARY_VARIANT_ARCH}
           RUNTIME DESTINATION "bin"
-          LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
-          ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}"
+          LIBRARY DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}"
+          ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${resource_dir}/${resource_dir_sdk_subdir}/${SWIFT_PRIMARY_VARIANT_ARCH}"
           PERMISSIONS ${file_permissions})
       else()
         swift_install_in_component("${SWIFTLIB_INSTALL_IN_COMPONENT}"


cmake: add missing ws

cmake: add missing ws

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -99,7 +99,7 @@
 	# https://boringssl.googlesource.com/boringssl/+/63a0797ff247f13870b649c3f6239d80be202752
 	# https://charm.cs.illinois.edu/redmine/issues/1743
 	add_definitions (-D_DARWIN_C_SOURCE)
-endif(APPLE)
+endif (APPLE)

 if (WIN32)
 	set (HAVE_WIN32 "1")


select the architecture based on nvcc result   * cache the result   * DRY   * brush up based on review

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -53,6 +53,12 @@
   message(STATUS "CUDA detected: " ${CUDA_VERSION})

   set(_generations "Fermi" "Kepler" "Maxwell" "Pascal" "Volta" "Turing")
+  set(_arch_fermi   "2.0")
+  set(_arch_kepler  "3.0;3.5;3.7")
+  set(_arch_maxwell "5.0;5.2")
+  set(_arch_pascal  "6.0;6.1")
+  set(_arch_volta   "7.0")
+  set(_arch_turing  "7.5")
   if(NOT CMAKE_CROSSCOMPILING)
     list(APPEND _generations "Auto")
   endif()
@@ -70,29 +76,57 @@
     unset(CUDA_ARCH_PTX CACHE)
   endif()

+  macro(ocv_filter_available_architecture result_list)
+    if(DEFINED CUDA_SUPPORTED_CC)
+      set(${result_list} "${CUDA_SUPPORTED_CC}")
+    else()
+      set(CC_LIST ${ARGN})
+      foreach(target_arch ${CC_LIST})
+        string(REPLACE "." "" target_arch_short ${target_arch})
+        set(NVCC_OPTION "-gencode;arch=compute_${target_arch_short},code=sm_${target_arch_short}")
+        execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${NVCC_OPTION} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu"
+                         WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
+                         RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
+                         ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+        if(_nvcc_res EQUAL 0)
+          set(${result_list} "${${result_list}} ${target_arch}")
+        endif()
+      endforeach()
+      string(STRIP ${${result_list}} ${result_list})
+      set(CUDA_SUPPORTED_CC ${${result_list}} CACHE INTERNAL "List of supported compute capability")
+    endif()
+  endmacro()
+
+  macro(ocv_detect_native_cuda_arch status output)
+    execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
+                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
+                     RESULT_VARIABLE ${status} OUTPUT_VARIABLE ${output}
+                     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+  endmacro()
+
+  macro(ocv_wipeout_deprecated _arch_bin_list)
+    string(REPLACE "2.1" "2.1(2.0)" ${_arch_bin_list} ${${_arch_bin_list}})
+  endmacro()
+
   set(__cuda_arch_ptx "")
   if(CUDA_GENERATION STREQUAL "Fermi")
-    set(__cuda_arch_bin "2.0")
+    set(__cuda_arch_bin ${_arch_fermi})
   elseif(CUDA_GENERATION STREQUAL "Kepler")
-    set(__cuda_arch_bin "3.0 3.5 3.7")
+    set(__cuda_arch_bin ${_arch_kepler})
   elseif(CUDA_GENERATION STREQUAL "Maxwell")
-    set(__cuda_arch_bin "5.0 5.2")
+    set(__cuda_arch_bin ${_arch_maxwell})
   elseif(CUDA_GENERATION STREQUAL "Pascal")
-    set(__cuda_arch_bin "6.0 6.1")
+    set(__cuda_arch_bin ${_arch_pascal})
   elseif(CUDA_GENERATION STREQUAL "Volta")
-    set(__cuda_arch_bin "7.0")
+    set(__cuda_arch_bin ${_arch_volta})
   elseif(CUDA_GENERATION STREQUAL "Turing")
-    set(__cuda_arch_bin "7.5")
+    set(__cuda_arch_bin ${_arch_turing})
   elseif(CUDA_GENERATION STREQUAL "Auto")
-    execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
-                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
-                     RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
-                     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+    ocv_detect_native_cuda_arch(_nvcc_res _nvcc_out)
     if(NOT _nvcc_res EQUAL 0)
       message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
     else()
-      set(__cuda_arch_bin "${_nvcc_out}")
-      string(REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin}")
+      string(REGEX MATCHALL "[0-9]+\\.[0-9]" __cuda_arch_bin "${_nvcc_out}")
     endif()
   endif()

@@ -101,28 +135,26 @@
       set(__cuda_arch_bin "3.2")
       set(__cuda_arch_ptx "")
     elseif(AARCH64)
-      execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
-                       WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
-                       RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
-                       ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+      ocv_detect_native_cuda_arch(_nvcc_res _nvcc_out)
       if(NOT _nvcc_res EQUAL 0)
         message(STATUS "Automatic detection of CUDA generation failed. Going to build for all known architectures.")
         set(__cuda_arch_bin "5.3 6.2 7.2")
       else()
         set(__cuda_arch_bin "${_nvcc_out}")
-        string(REPLACE "2.1" "2.1(2.0)" __cuda_arch_bin "${__cuda_arch_bin}")
       endif()
       set(__cuda_arch_ptx "")
     else()
-      if(CUDA_VERSION VERSION_LESS "9.0")
-        set(__cuda_arch_bin "2.0 3.0 3.5 3.7 5.0 5.2 6.0 6.1")
-      elseif(CUDA_VERSION VERSION_LESS "10.0")
-        set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0")
-      else()
-        set(__cuda_arch_bin "3.0 3.5 3.7 5.0 5.2 6.0 6.1 7.0 7.5")
-      endif()
-    endif()
-  endif()
+      ocv_filter_available_architecture(__cuda_arch_bin
+          ${_arch_fermi}
+          ${_arch_kepler}
+          ${_arch_maxwell}
+          ${_arch_pascal}
+          ${_arch_volta}
+          ${_arch_turing}
+      )
+    endif()
+  endif()
+  ocv_wipeout_deprecated(__cuda_arch_bin)

   set(CUDA_ARCH_BIN ${__cuda_arch_bin} CACHE STRING "Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported")
   set(CUDA_ARCH_PTX ${__cuda_arch_ptx} CACHE STRING "Specify 'virtual' PTX architectures to build PTX intermediate code for")


added `-Xptxas;-dlcm=ca` and `-target-os-variant=Android` to nvcc flags

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -152,6 +152,11 @@
   set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ${NVCC_FLAGS_EXTRA})
   set(OpenCV_CUDA_CC "${NVCC_FLAGS_EXTRA}")

+  if(ANDROID)
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xptxas;-dlcm=ca")
+    set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-target-os-variant=Android")
+  endif()
+
   message(STATUS "CUDA NVCC target flags: ${CUDA_NVCC_FLAGS}")

   OCV_OPTION(CUDA_FAST_MATH "Enable --use_fast_math for CUDA compiler " OFF)


Update ADD_GUILE_MODULE

Update ADD_GUILE_MODULE

--- cmake/OpenCogFunctions.cmake
+++ cmake/OpenCogFunctions.cmake
@@ -16,8 +16,8 @@

 # By default Guile return the path to its installation location.
 # Such path will not work for users who wants to compile and install
-# the project with a custom CMAKE_INSTALL_PREFIX. Compiling with
-# custom PREFIX is a common practice. To support custom PREFIX
+# the project with a custom CMAKE_INSTALL_PREFIX. Compiling with
+# custom PREFIX is a common practice. To support custom PREFIX
 # this condition is added to override GUILE_SITE_DIR value using
 # `cmake -DGUILE_SITE_DIR=...`.
 IF (NOT DEFINED GUILE_SITE_DIR)
@@ -93,7 +93,6 @@
     SET(multiValueArgs FILES DEPENDS)
     CMAKE_PARSE_ARGUMENTS(SCM "${options}" "${oneValueArgs}"
         "${multiValueArgs}" ${ARGN})
-
     # NOTE:  The keyword arguments 'FILES' and 'MODULE_DESTINATION' are
     # required.
     IF((DEFINED SCM_FILES) AND (DEFINED SCM_MODULE_DESTINATION))
@@ -125,7 +124,7 @@

             # Specify module paths.
             STRING(REGEX MATCH
-                "^(${PREFIX_DIR_PATH})([a-z0-9/-]+)*/([a-z0-9-]+)" ""
+                "^(${PREFIX_DIR_PATH})([a-z0-9/-_]+)*/([a-z0-9-_]+)" ""
                 ${SCM_MODULE_DESTINATION})

             # MODULE_NAME: it is equal to the MODULE_DESTINATION directory name


Applying patch of @alamaison (2375c2) on FindOpenSSL

FindOpenSSL.cmake has been modified in CMake. The new Find module
produces targets for OpenSSL. This version of file contains the
target creations and eliminate (be previous commit of @alamaison)
the hint paths that are not liked by hunter.

--- cmake/find/FindOpenSSL.cmake
+++ cmake/find/FindOpenSSL.cmake
@@ -43,6 +43,7 @@
 # Copyright 2006-2009 Kitware, Inc.
 # Copyright 2006 Alexander Neundorf <neundorf@kde.org>
 # Copyright 2009-2011 Mathieu Malaterre <mathieu.malaterre@gmail.com>
+# Copyright 2015 Alexander Lamaison <alexander.lamaison@gmail.com>
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -57,11 +58,6 @@
 if(HUNTER_STATUS_DEBUG)
   message("[hunter] Custom FindOpenSSL module")
 endif()
-
-if (UNIX)
-  find_package(PkgConfig QUIET)
-  pkg_check_modules(_OPENSSL QUIET openssl)
-endif ()

 # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
 if(OPENSSL_USE_STATIC_LIBS)
@@ -72,36 +68,6 @@
     set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
   endif()
 endif()
-
-if (WIN32)
-  # http://www.slproweb.com/products/Win32OpenSSL.html
-  set(_OPENSSL_ROOT_HINTS
-    ${OPENSSL_ROOT_DIR}
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (32-bit)_is1;Inno Setup: App Path]"
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\OpenSSL (64-bit)_is1;Inno Setup: App Path]"
-    ENV OPENSSL_ROOT_DIR
-    )
-  file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _programfiles)
-  set(_OPENSSL_ROOT_PATHS
-    "${_programfiles}/OpenSSL"
-    "${_programfiles}/OpenSSL-Win32"
-    "${_programfiles}/OpenSSL-Win64"
-    "C:/OpenSSL/"
-    "C:/OpenSSL-Win32/"
-    "C:/OpenSSL-Win64/"
-    )
-  unset(_programfiles)
-else ()
-  set(_OPENSSL_ROOT_HINTS
-    ${OPENSSL_ROOT_DIR}
-    ENV OPENSSL_ROOT_DIR
-    )
-endif ()
-
-set(_OPENSSL_ROOT_HINTS_AND_PATHS
-    HINTS ${_OPENSSL_ROOT_HINTS}
-    PATHS ${_OPENSSL_ROOT_PATHS}
-    )

 find_path(OPENSSL_INCLUDE_DIR
   NAMES
@@ -154,7 +120,8 @@
       NAMES
         libeay32${_OPENSSL_MSVC_RT_MODE}d
         libeay32d
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         ${_OPENSSL_PATH_SUFFIXES}
     )
@@ -163,7 +130,8 @@
       NAMES
         libeay32${_OPENSSL_MSVC_RT_MODE}
         libeay32
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         ${_OPENSSL_PATH_SUFFIXES}
     )
@@ -172,7 +140,8 @@
       NAMES
         ssleay32${_OPENSSL_MSVC_RT_MODE}d
         ssleay32d
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         ${_OPENSSL_PATH_SUFFIXES}
     )
@@ -182,7 +151,8 @@
         ssleay32${_OPENSSL_MSVC_RT_MODE}
         ssleay32
         ssl
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         ${_OPENSSL_PATH_SUFFIXES}
     )
@@ -208,7 +178,8 @@
     find_library(LIB_EAY
       NAMES
         ${LIB_EAY_NAMES}
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         "lib"
         "lib/MinGW"
@@ -217,7 +188,8 @@
     find_library(SSL_EAY
       NAMES
         ${SSL_EAY_NAMES}
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         "lib"
         "lib/MinGW"
@@ -234,9 +206,8 @@
     find_library(LIB_EAY
       NAMES
         libeay32
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
-      HINTS
-        ${_OPENSSL_LIBDIR}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         lib
     )
@@ -244,9 +215,8 @@
     find_library(SSL_EAY
       NAMES
         ssleay32
-      ${_OPENSSL_ROOT_HINTS_AND_PATHS}
-      HINTS
-        ${_OPENSSL_LIBDIR}
+      HINTS
+        "${OPENSSL_ROOT}"
       PATH_SUFFIXES
         lib
     )
@@ -263,9 +233,8 @@
       ssl
       ssleay32
       ssleay32MD
-    ${_OPENSSL_ROOT_HINTS_AND_PATHS}
     HINTS
-      ${_OPENSSL_LIBDIR}
+      "${OPENSSL_ROOT}"
     PATH_SUFFIXES
       lib
   )
@@ -273,9 +242,8 @@
   find_library(OPENSSL_CRYPTO_LIBRARY
     NAMES
       crypto
-    ${_OPENSSL_ROOT_HINTS_AND_PATHS}
     HINTS
-      ${_OPENSSL_LIBDIR}
+      "${OPENSSL_ROOT}"
     PATH_SUFFIXES
       lib
   )
@@ -321,40 +289,47 @@
   set(${DEC} ${_res} PARENT_SCOPE)
 endfunction()

-if (OPENSSL_INCLUDE_DIR)
-  if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
-    file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
-         REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
-
-    # The version number is encoded as 0xMNNFFPPS: major minor fix patch status
-    # The status gives if this is a developer or prerelease and is ignored here.
-    # Major, minor, and fix directly translate into the version numbers shown in
-    # the string. The patch field translates to the single character suffix that
-    # indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
-    # on.
-
-    string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
-           "\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
-    list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
-    list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
-    from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
-    list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
-    from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
-    list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)
-
-    if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
-      from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
-      # 96 is the ASCII code of 'a' minus 1
-      math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
-      unset(_tmp)
-      # Once anyone knows how OpenSSL would call the patch versions beyond 'z'
-      # this should be updated to handle that, too. This has not happened yet
-      # so it is simply ignored here for now.
-      string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
-    endif ()
-
-    set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
+if(OPENSSL_INCLUDE_DIR AND EXISTS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h")
+  file(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" openssl_version_str
+    REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])+.*")
+
+  string(COMPARE EQUAL "${openssl_version_str}" "" _is_empty)
+  if(_is_empty)
+    message(
+        FATAL_ERROR
+        "Incorrect OPENSSL_VERSION_NUMBER define in header"
+        ": ${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h"
+    )
+  endif()
+
+  # The version number is encoded as 0xMNNFFPPS: major minor fix patch status
+  # The status gives if this is a developer or prerelease and is ignored here.
+  # Major, minor, and fix directly translate into the version numbers shown in
+  # the string. The patch field translates to the single character suffix that
+  # indicates the bug fix state, which 00 -> nothing, 01 -> a, 02 -> b and so
+  # on.
+
+  string(REGEX REPLACE "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F][0-9a-fA-F])([0-9a-fA-F]).*$"
+    "\\1;\\2;\\3;\\4;\\5" OPENSSL_VERSION_LIST "${openssl_version_str}")
+  list(GET OPENSSL_VERSION_LIST 0 OPENSSL_VERSION_MAJOR)
+  list(GET OPENSSL_VERSION_LIST 1 OPENSSL_VERSION_MINOR)
+  from_hex("${OPENSSL_VERSION_MINOR}" OPENSSL_VERSION_MINOR)
+  list(GET OPENSSL_VERSION_LIST 2 OPENSSL_VERSION_FIX)
+  from_hex("${OPENSSL_VERSION_FIX}" OPENSSL_VERSION_FIX)
+  list(GET OPENSSL_VERSION_LIST 3 OPENSSL_VERSION_PATCH)
+
+  if (NOT OPENSSL_VERSION_PATCH STREQUAL "00")
+    from_hex("${OPENSSL_VERSION_PATCH}" _tmp)
+    # 96 is the ASCII code of 'a' minus 1
+    math(EXPR OPENSSL_VERSION_PATCH_ASCII "${_tmp} + 96")
+    unset(_tmp)
+    # Once anyone knows how OpenSSL would call the patch versions beyond 'z'
+    # this should be updated to handle that, too. This has not happened yet
+    # so it is simply ignored here for now.
+    string(ASCII "${OPENSSL_VERSION_PATCH_ASCII}" OPENSSL_VERSION_PATCH_STRING)
   endif ()
+
+  set(OPENSSL_VERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}.${OPENSSL_VERSION_FIX}${OPENSSL_VERSION_PATCH_STRING}")
 endif ()

 include(FindPackageHandleStandardArgs)


build: correct flags for Windows build

build: correct flags for Windows build

Adjust the preprocessor macros to get correct DLL Storage for imported
functions.  This should help identify cases of incorrect linkage to
msvcrt/ucrt.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -230,15 +230,13 @@

   if("${CFLAGS_SDK}" STREQUAL "WINDOWS")
     # MSVC doesn't support -Xclang. We don't need to manually specify
-    # -D_MD or D_MDd either, as CMake does this automatically.
+    # the dependent libraries as `cl` does so.
     if(NOT "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
       list(APPEND result -Xclang;--dependent-lib=oldnames)
       # TODO(compnerd) handle /MT, /MTd
       if("${CFLAGS_BUILD_TYPE}" STREQUAL "Debug")
-        list(APPEND result "-D_MDd")
         list(APPEND result -Xclang;--dependent-lib=msvcrtd)
       else()
-        list(APPEND result "-D_MD")
         list(APPEND result -Xclang;--dependent-lib=msvcrt)
       endif()
     endif()
@@ -260,6 +258,7 @@
     if("${CFLAGS_ARCH}" MATCHES arm)
       list(APPEND result "-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE")
     endif()
+    list(APPEND result "-D_MT")
     # TODO(compnerd) handle /MT
     list(APPEND result "-D_DLL")
     # NOTE: We assume that we are using VS 2015 U2+
@@ -399,6 +398,12 @@

   if(SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS)
     list(APPEND result "-D" "SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS")
+  endif()
+
+  if(sdk STREQUAL WINDOWS)
+    list(APPEND result "-Xcc" "-D_MT")
+    # TODO(compnerd) handle /MT /MTd
+    list(APPEND result "-Xcc" "-D_DLL")
   endif()

   set("${result_var_name}" "${result}" PARENT_SCOPE)


[cmake] Add support for compiling all swift libraries with guaranteed normal arguments.

I was using --extra-swift-args before, but lets do this for real now.

rdar://34222540

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -311,6 +311,10 @@

   if(enable_assertions)
     list(APPEND result "-D" "INTERNAL_CHECKS_ENABLED")
+  endif()
+
+  if (SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS)
+    list(APPEND result "-Xfrontend" "-enable-guaranteed-normal-arguments")
   endif()

   set("${result_var_name}" "${result}" PARENT_SCOPE)


Restore default libc++ api level to 21

Restore default libc++ api level to 21

--- cmake/platform/android.cmake
+++ cmake/platform/android.cmake
@@ -21,7 +21,7 @@
         endif()

         if(NOT ANDROID_NATIVE_API_LEVEL)
-            set(ANDROID_NATIVE_API_LEVEL "android-19")
+            set(ANDROID_NATIVE_API_LEVEL "android-21")
         endif()

         # API levels below 9 will not build with libc++


Fix Ldap include path in cmake find module.

Change-Id: I877475e7f2b4888a712c3aef5bd207e35046afb1
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3865
Reviewed-by: Nong Li <99a5e5f8f5911755b88e0b536d46aafa102bed41@cloudera.com>
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
Tested-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>

--- cmake_modules/FindLdap.cmake
+++ cmake_modules/FindLdap.cmake
@@ -13,7 +13,7 @@
 )

 set(LDAP_INCLUDE_DIR
-  ${THIRDPARTY_LDAP}/install/include
+  ${THIRDPARTY_LDAP}/impala_install/include
 )

 find_library(LDAP_LIB_PATH NAMES ldap


fix find include

fix find include

--- cmake_modules/FindOCCT.cmake
+++ cmake_modules/FindOCCT.cmake
@@ -38,10 +38,12 @@
 		set(OCCT_LIB_DIR $ENV{OCCT_LIB_DIR})
 		message(STATUS "$OCCT_LIB_DIR defined: ${OCCT_LIB_DIR}")
 	endif()
-	find_path(OCCT_INCLUDE_DIR include inc opencascade
-		${OCCT_ROOT}
+	find_path(OCCT_INCLUDE_DIR  NAMES opencascade
+		PATHS
 		${OCCT_ROOT}/include
-		)
+		${OCCT_ROOT}/include/opencascade
+		${OCCT_ROOT}/inc
+		)
 	foreach(libName ${OCCT_LIB_NAMES})
 		find_library(libPathRelease${libName} NAMES ${libName}
 			PATHS
@@ -67,7 +69,7 @@
 	set(OCCT_FOUND TRUE)

 else(OCCT_INCLUDE_DIR AND OCCT_LIBRARIES)
-	find_path(OCCT_INCLUDE_DIR opencascade
+	find_path(OCCT_INCLUDE_DIR gp_pnt.hxx
 		/usr/include
 		/usr/local/include
 		/opt/local/include
@@ -83,7 +85,7 @@
 		set(OCCT_LIBRARIES_RELEASE ${OCCT_LIBRARIES_RELEASE} ${libPathRelease${libName}})
 		find_library(libPathDebug${libName} NAMES ${libName}
 			PATHS
-			${OCCT_DEBUG_LIB_DIR
+			${OCCT_DEBUG_LIB_DIR}
 	    	/usr/lib/
     		/usr/local/lib/
 	    	/opt/local/lib/}


pedestrian workaround for Fortran OMP

pedestrian workaround for Fortran OMP

--- modules/omp.cmake
+++ modules/omp.cmake
@@ -24,7 +24,25 @@
     find_package(OpenMP)
     if(OPENMP_FOUND)
         if(DEFINED CMAKE_Fortran_COMPILER_ID)
-            set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
+            # the following works with recent CMake (added Aug 2014)
+            # set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${OpenMP_Fortran_FLAGS}")
+
+            # therefore we use a pedestrian approach:
+            if(CMAKE_Fortran_COMPILER_ID MATCHES GNU)
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fopenmp")
+            endif()
+            if(CMAKE_Fortran_COMPILER_ID MATCHES Intel)
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -openmp")
+            endif()
+            if(CMAKE_Fortran_COMPILER_ID MATCHES PGI)
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -mp")
+            endif()
+            if(CMAKE_Fortran_COMPILER_ID MATCHES XL)
+                set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -qsmp")
+            endif()
+            if(CMAKE_Fortran_COMPILER_ID MATCHES Cray)
+                # do nothing in this case
+            endif()
         endif()
         if(DEFINED CMAKE_C_COMPILER_ID)
             set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")


release

release

--- mpg-2014-20.cmake
+++ mpg-2014-20.cmake
@@ -1,5 +1,5 @@
-# SET(CCTAG_BUILD_TYPE "Release")
-SET(CCTAG_BUILD_TYPE "Debug")
+SET(CCTAG_BUILD_TYPE "Release")
+# SET(CCTAG_BUILD_TYPE "Debug")

 STRING( TOUPPER "${CCTAG_BUILD_TYPE}" CCTAG_BUILD_MODE )

@@ -13,7 +13,7 @@
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DTHIS_IS_RELEASE_MODE")

 SET(COMPILE_STATIC_CCTAG_LIBRARY true)
-SET(CCTAG_SERIALIZE 1)
+SET(CCTAG_SERIALIZE 0)

 set(USE_CUDA true)


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

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

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -21,11 +21,13 @@
 Name[gl]=GStreamer
 Name[id]=GStreamer
 Name[is]=GStreamer
+Name[it]=GStreamer
 Name[ja]=GStreamer
 Name[ko]=GStreamer
 Name[nb]=GStreamer
 Name[nl]=GStreamer
 Name[nn]=GStreamer
+Name[pt_BR]=GStreamer
 Name[se]=GStreamer
 Name[sk]=GStreamer
 Name[sr]=Гстример
@@ -48,11 +50,13 @@
 Comment[gl]=Infraestrutura de GStreamer para Phonon
 Comment[id]=Backend phonon GStreamer
 Comment[is]=Phonon GStreamer bakendi
+Comment[it]=Motore Gstreamer di Phonon
 Comment[ja]=Phonon GStreamer バックエンド
 Comment[ko]=Phonon GStreamer 백엔드
 Comment[nb]=Phonon-motor for GStreamer
 Comment[nl]=GStreamer-backend (Phonon)
 Comment[nn]=Phonon-motor for GStreamer
+Comment[pt_BR]=Infraestrutura do GStreamer para o Phonon
 Comment[se]=Phonon GStreamer duogášmohtor
 Comment[sk]=Podsystém Phonon GStreamer
 Comment[sr]=Гстример као позадина Фонона


cmake: treat unregistered components as unresolved

--- tools/cmake/build.cmake
+++ tools/cmake/build.cmake
@@ -181,7 +181,8 @@
 #
 function(__build_resolve_and_add_req var component_target req type)
     __component_get_target(_component_target ${req})
-    if(NOT _component_target)
+    __component_get_property(_component_registered ${component_target} __COMPONENT_REGISTERED)
+    if(NOT _component_target OR NOT _component_registered)
         message(FATAL_ERROR "Failed to resolve component '${req}'.")
     endif()
     __component_set_property(${component_target} ${type} ${_component_target} APPEND)


Fixed to only use BINARYEN_ROOT if set to cmake.

--- CMakeModules/wasm.cmake
+++ CMakeModules/wasm.cmake
@@ -35,9 +35,7 @@

     endif()

-  endif()
-
-  if (NOT BINARYEN_BIN)
+  else()

     message(STATUS "BINARYEN_BIN not defined looking in PATH")
     find_path(BINARYEN_BIN


Correctly declare content before populating it

--- cmake/modules/jegp_find_dependencies.cmake
+++ cmake/modules/jegp_find_dependencies.cmake
@@ -1,10 +1,11 @@
+include(FetchContent)
+
+FetchContent_Declare(range-v3
+    GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
+    GIT_SHALLOW True)
+
 find_package(range-v3 0.3.6 QUIET)
 if(NOT range-v3_FOUND)
-    include(FetchContent)
-
-    FetchContent_Declare(range-v3
-        GIT_REPOSITORY https://github.com/ericniebler/range-v3.git
-        GIT_SHALLOW True)
     FetchContent_GetProperties(range-v3)
     if(NOT range-v3_POPULATED)
         FetchContent_Populate(range-v3)


ENH: Added revision to CI when building with XDK.

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -123,7 +123,12 @@
 PROJ_LIB= PROJ_LIB
 ")

+# Sources are already checked out : do nothing for update
+set(CTEST_GIT_UPDATE_CUSTOM echo No update)
+
 ctest_start (Experimental TRACK Experimental)
+
+ctest_update()

 ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}"
     SOURCE "${OTB_SOURCE_DIR}"


Use a CTK version which compiles against DCMTK 3.6.1 snapshot (22/02/12).

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag de466419)
+    SET(revision_tag 70c0a8d3)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -37,7 +37,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 29d075daa07dbc5618158e4f81d5f431
+      URL_MD5 a3130b2c3e7a1d320740938f61b65840
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


CMake: use absolute paths for downloading deps

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -99,25 +99,25 @@
         message(STATUS "Building zlib")
         file(DOWNLOAD
             http://zlib.net/zlib-1.2.11.tar.gz
-            ./zlib-1.2.11.tar.gz
+            ${OGRE_BINARY_DIR}/zlib-1.2.11.tar.gz
             EXPECTED_MD5 1c9f62f0778697a09d36121ead88e08e)
-        execute_process(COMMAND cmake -E tar xf zlib-1.2.11.tar.gz)
+        execute_process(COMMAND cmake -E tar xf zlib-1.2.11.tar.gz WORKING_DIRECTORY ${OGRE_BINARY_DIR})
         execute_process(COMMAND cmake
             -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
             -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
             -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
             -G ${CMAKE_GENERATOR}
             ${CROSS}
-            .
-            WORKING_DIRECTORY zlib-1.2.11)
-        execute_process(COMMAND cmake --build zlib-1.2.11 --target install)
+            ${CMAKE_BINARY_DIR}/zlib-1.2.11
+            WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/zlib-1.2.11)
+        execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/zlib-1.2.11 --target install)
     endif()

     message(STATUS "Building ZZIPlib")
     file(DOWNLOAD
         https://github.com/paroj/ZZIPlib/archive/master.tar.gz
-        ./ZZIPlib-master.tar.gz)
-    execute_process(COMMAND cmake -E tar xf ZZIPlib-master.tar.gz)
+        ${OGRE_BINARY_DIR}/ZZIPlib-master.tar.gz)
+    execute_process(COMMAND cmake -E tar xf ZZIPlib-master.tar.gz WORKING_DIRECTORY ${OGRE_BINARY_DIR})
     execute_process(COMMAND cmake
         -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
@@ -125,19 +125,20 @@
         -DBUILD_SHARED_LIBS=${OGREDEPS_SHARED}
         -G ${CMAKE_GENERATOR}
         ${CROSS}
-        .
-        WORKING_DIRECTORY ZZIPlib-master)
-    execute_process(COMMAND cmake --build ZZIPlib-master --target install)
+        ${CMAKE_BINARY_DIR}/ZZIPlib-master
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/ZZIPlib-master)
+    execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/ZZIPlib-master --target install)

     message(STATUS "Building freetype")
     file(DOWNLOAD
         http://download.savannah.gnu.org/releases/freetype/freetype-2.6.5.tar.gz
-        ./freetype-2.6.5.tar.gz)
-    execute_process(COMMAND cmake -E tar xf freetype-2.6.5.tar.gz)
+        ${OGRE_BINARY_DIR}/freetype-2.6.5.tar.gz)
+    execute_process(COMMAND cmake -E tar xf freetype-2.6.5.tar.gz WORKING_DIRECTORY ${OGRE_BINARY_DIR})
     # patch toolchain for iOS
     execute_process(COMMAND cmake -E copy
         ${CMAKE_SOURCE_DIR}/CMake/toolchain/ios.toolchain.xcode.cmake
-        freetype-2.6.5/builds/cmake/iOS.cmake)
+        freetype-2.6.5/builds/cmake/iOS.cmake
+		WORKING_DIRECTORY ${OGRE_BINARY_DIR})
     execute_process(COMMAND cmake
         -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
         -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
@@ -147,9 +148,9 @@
         -DPROJECT_SOURCE_DIR=${CMAKE_BINARY_DIR}/freetype-2.6.5
         ${CROSS}
         -G ${CMAKE_GENERATOR}
-        ..
-        WORKING_DIRECTORY freetype-2.6.5/objs)
-    execute_process(COMMAND cmake --build freetype-2.6.5/objs --target install)
+        ${CMAKE_BINARY_DIR}/freetype-2.6.5
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs)
+    execute_process(COMMAND cmake --build ${CMAKE_BINARY_DIR}/freetype-2.6.5/objs --target install)
 endif()

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


Update the boost versions to look for.

Update the boost versions to look for.


vtkModuleTop: handle UsrMove-like setups

The problem is that when the package is found via a directory with a
symlink which points into the install prefix, we should use the
configured install prefix. Example:

    /usr (install prefix)
    /usr/lib/cmake/vtk-6.2 (configuration's path)
    /lib -> /usr/lib (UsrMove)
    /lib/cmake/vtk-6.2 (path VTK was found by)

The problem here is that when we traverse up the 3 components to try and
find '/usr', we end up finding '/' instead. To fix this, we detect this
by resolving the found path and the expected path to remove all
symlinks. If these are the same, use the configured path, otherwise go
up the tree the correct number of components.

Still unsupported is finding VTK by a path with a symlink into the
prefix and VTK has been relocated since being installed.

Fixes #15065.

Change-Id: I181a126382941eb7e33304d426719abd5769048b

--- CMake/vtkModuleTop.cmake
+++ CMake/vtkModuleTop.cmake
@@ -419,14 +419,26 @@
 # Generate VTKConfig.cmake for the install tree.
 set(VTK_CONFIG_CODE "
 # Compute the installation prefix from this VTKConfig.cmake file location.
-get_filename_component(VTK_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
+set(_vtk_installed_prefix \"${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_PACKAGE_DIR}\")
+set(_vtk_requested_prefix \"\${CMAKE_CURRENT_LIST_DIR}\")
+get_filename_component(_vtk_installed_prefix_full \"\${_vtk_installed_prefix}\" REALPATH)
+get_filename_component(_vtk_requested_prefix_full \"\${_vtk_requested_prefix}\" REALPATH)
+if (_vtk_installed_prefix_full STREQUAL _vtk_requested_prefix_full)
+  set(VTK_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
+else ()
+  set(VTK_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_DIR}\")")
+
 # Construct the proper number of get_filename_component(... PATH)
 # calls to compute the installation prefix.
 string(REGEX REPLACE "/" ";" _count "${VTK_INSTALL_PACKAGE_DIR}")
 foreach(p ${_count})
   set(VTK_CONFIG_CODE "${VTK_CONFIG_CODE}
-get_filename_component(VTK_INSTALL_PREFIX \"\${VTK_INSTALL_PREFIX}\" PATH)")
-endforeach()
+  get_filename_component(VTK_INSTALL_PREFIX \"\${VTK_INSTALL_PREFIX}\" PATH)")
+endforeach()
+
+set(VTK_CONFIG_CODE "${VTK_CONFIG_CODE}
+endif ()")
+
 set(VTK_CONFIG_CODE "${VTK_CONFIG_CODE}
 set(VTK_MODULES_DIR \"\${VTK_INSTALL_PREFIX}/${VTK_INSTALL_PACKAGE_DIR}/Modules\")")
 set(VTK_CONFIG_CMAKE_DIR "\${VTK_INSTALL_PREFIX}/${VTK_INSTALL_PACKAGE_DIR}")


Update to a Qt 4.6 compatible CTK

Update to a Qt 4.6 compatible CTK

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   IF(NOT DEFINED CTK_DIR)

-    SET(revision_tag 282be3d)
+    SET(revision_tag 834f67b5)
     IF(${proj}_REVISION_TAG)
       SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


Update CTK to current master

Update CTK to current master

Summary: Necessary because only the newest CTK version is python 3 compatible

Test Plan: covered by current tests. successful builds on ubuntu und windows 10

Reviewers: O1 MITK Core, kislinsk

Reviewed By: O1 MITK Core, kislinsk

Maniphest Tasks: T26467

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

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -22,7 +22,7 @@
       list(APPEND ctk_optional_cache_args
            -DCTK_LIB_Scripting/Python/Widgets:BOOL=ON
            -DCTK_ENABLE_Python_Wrapping:BOOL=OFF
-           -DCTK_APP_ctkSimplePythonShell:BOOL=ON
+           -DCTK_APP_ctkSimplePythonShell:BOOL=OFF
            "-DPYTHON_EXECUTABLE:FILEPATH=${Python3_EXECUTABLE}"
            "-DPYTHON_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIR}"
            "-DPYTHON_LIBRARY:FILEPATH=${Python3_LIBRARY}"
@@ -84,7 +84,7 @@
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_DIR:PATH=${DCMTK_DIR}
-        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_fae23012.tar.gz # From https://github.com/kislinsk/PythonQt.git
+        -DPythonQt_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/PythonQt_fae23012.tar.gz
         ${${proj}_CUSTOM_CMAKE_ARGS}
       CMAKE_CACHE_ARGS
         ${ep_common_cache_args}


Pass CXX_STANDARD to ITK build in superbuild

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -51,6 +51,7 @@
     INSTALL_COMMAND ""
     CMAKE_CACHE_ARGS
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+      -DCMAKE_CXX_STANDARD:STRING=${DCMQI_CMAKE_CXX_STANDARD}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
       -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}


Added falsely removed keyword

Added falsely removed keyword

--- CMakeExternals/ITK.cmake
+++ CMakeExternals/ITK.cmake
@@ -48,7 +48,7 @@
      SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
      BINARY_DIR ${proj}-build
      PREFIX ${proj}-cmake
-     ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.7.0-1d4dcc92.tar.gz
+     URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-4.7.0-1d4dcc92.tar.gz
      URL_MD5 d689ccb115d0a8278e9f2b93392c1df7
      INSTALL_COMMAND ""
      PATCH_COMMAND ${ITK_PATCH_COMMAND}


[update] test jenkins

[update] test jenkins

--- mk/linux.cmake
+++ mk/linux.cmake
@@ -11,7 +11,6 @@
     set (EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/linux)
     set (LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/linux)
     set (LIBRARY_DIR_PATH ${PROJECT_SOURCE_DIR}/lib/linux/)
-
 endmacro()

 macro (display_linux_platform_configs)


More debugging messages.

More debugging messages.

--- CPM.cmake
+++ CPM.cmake
@@ -805,6 +805,7 @@
     # Setup module interface definition. This is the name the module is using
     # to identify itself in it's headers.
     if (DEFINED CPM_LAST_MODULE_NAME)
+      message("Module's name: ${CPM_LAST_MODULE_NAME}")
       _cpm_check_and_add_preproc(${name} ${CPM_LAST_MODULE_NAME} ${__CPM_FULL_UNID})
     else()
       message(FATAL_ERROR "A module (${name}) failed to define its name!")


Debugging.

Debugging.

--- CPM.cmake
+++ CPM.cmake
@@ -950,6 +950,7 @@
     # Check to see if the module exported any of its modules. If so, then export each
     # of the exported modules into our parents includes / definitions.
     if (DEFINED CPM_EXPORTED_MODULES)
+      message("Exported modules: ${CPM_EXPORTED_MODULES}")
       foreach(module IN LISTS CPM_EXPORTED_MODULES)
         set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
         set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})


Correct bug in InitModule.

Correct bug in InitModule.

--- CPM.cmake
+++ CPM.cmake
@@ -404,7 +404,7 @@
 macro(CPM_InitModule name)
   # Ensure the parent function knows what we decided to name ourselves.
   # This name will correspond to our module's namespace directives.
-  set(CPM_LAST_MODULE_NAME ${CPM_LAST_MODULE_NAME} PARENT_SCOPE)
+  set(CPM_LAST_MODULE_NAME ${name} PARENT_SCOPE)

   # Build the appropriate definition for the module. We stored the unique ID
   _cpm_build_preproc_name(name __CPM_TMP_VAR)


Cleanup.

Cleanup.

--- runtime/hipacc_cu.hpp.cmake
+++ runtime/hipacc_cu.hpp.cmake
@@ -710,31 +710,14 @@
         default:
             std::cerr << "ERROR: Specified compute capability '" << cc << "' is not supported!" << std::endl;
             exit(EXIT_FAILURE);
-            break;
-        case 10:
-            target_cc = CU_TARGET_COMPUTE_10;
-            break;
-        case 11:
-            target_cc = CU_TARGET_COMPUTE_11;
-            break;
-        case 12:
-            target_cc = CU_TARGET_COMPUTE_12;
-            break;
-        case 13:
-            target_cc = CU_TARGET_COMPUTE_13;
-            break;
-        case 20:
-            target_cc = CU_TARGET_COMPUTE_20;
-            break;
-        case 21:
-            target_cc = CU_TARGET_COMPUTE_21;
-            break;
-        case 30:
-            target_cc = CU_TARGET_COMPUTE_30;
-            break;
-        case 35:
-            target_cc = CU_TARGET_COMPUTE_35;
-            break;
+        case 10: target_cc = CU_TARGET_COMPUTE_10; break;
+        case 11: target_cc = CU_TARGET_COMPUTE_11; break;
+        case 12: target_cc = CU_TARGET_COMPUTE_12; break;
+        case 13: target_cc = CU_TARGET_COMPUTE_13; break;
+        case 20: target_cc = CU_TARGET_COMPUTE_20; break;
+        case 21: target_cc = CU_TARGET_COMPUTE_21; break;
+        case 30: target_cc = CU_TARGET_COMPUTE_30; break;
+        case 35: target_cc = CU_TARGET_COMPUTE_35; break;
     }
     #endif


revert to previous version

revert to previous version

e67f1a25c21f664102091ccd6e510d962496060e

--- version_config.cmake
+++ version_config.cmake
@@ -21,85 +21,20 @@
 #
 #=========================================================================

-## BOOST
+
 set(Boost_VERSION 1.63.0)
 set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.zip)
 set(Boost_MD5 3c706b3fc749884ea5510c39474fd732)

-## Armadillo
-set(Armadillo_URL   https://downloads.sourceforge.net/project/arma/armadillo-7.800.2.tar.xz?r=http%3A%2F%2Farma.sourceforge.net%2Fdownload.html&ts=1492950217&use_mirror=freefr
- )
-set(Armadillo_MD5 c601f3a5ec6d50666aa3a539fa20e6ca )
+set(STIR_TAG stir_rel_3_00)
+set(GADGETRON_TAG v3.8.2)
+set(ISMRMRD_TAG v1.3.2)

-## FFTW3
-if(WIN32)
-  # Just use precompiled version
-  # TODO would prefer the next zip file but for KT using an ftp URL times-out (firewall?)
-  #set(${proj}_URL ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip )
-  #set(${proj}_MD5 cb3c5ad19a89864f036e7a2dd5be168c )
-  set(FFTW3_URL https://s3.amazonaws.com/install-gadgetron-vs2013/Dependencies/FFTW/zip/FFTW3.zip )
-  set(FFTW3_MD5 a42eac92d9ad06d7c53fb82b09df2b6e )
-else(WIN32)
-  set(FFTW3_URL http://www.fftw.org/fftw-3.3.5.tar.gz )
-  set(FFTW3_MD5 6cc08a3b9c7ee06fdd5b9eb02e06f569 )
-endif(WIN32)
-
-set(FFTW3double_URL ${FFTW3_URL})
-set(FFTW3double_MD5 ${FFTW3_MD5})
-
-
-
-
-## HDF5
-set(HDF5_URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.tar.gz )
-set(HDF5_MD5 6fb456d03a60f358f3c077288a6d1cd8 )
-
-## SWIG
-if (WIN32)
-  set(SWIG_URL http://prdownloads.sourceforge.net/swig/swigwin-3.0.12.zip  )
-  set(SWIG_MD5 a49524dad2c91ae1920974e7062bfc93 )
-else(WIN32)
-  set(SWIG_URL http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz )
-  set(SWIG_MD5 82133dfa7bba75ff9ad98a7046be687c )
-endif(WIN32)
 option(DEVEL_BUILD "Use current versions of major packages" OFF)

-## Googletest
-set(googletest_URL https://github.com/google/googletest )
-set(googletest_TAG release-1.8.0)
-
-option (DEVEL_BUILD "Developer Build" OFF)
-#SIRF
-set(SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)
-  set (SIRF_TAG master)
-  ## STIR
-  set(STIR_URL https://github.com/UCL/STIR )
-  set(STIR_TAG master)
-
-  ## Gadgetron
-  set(Gadgetron_URL https://github.com/gadgetron/gadgetron )
-  set(Gadgetron_TAG master)
-
-  ## ISMRMRD
-  set(ISMRMRD_URL https://github.com/ismrmrd/ismrmrd )
-  set(ISMRMRD_TAG master)
-
+set (default_SIRF_GIT_TAG master)
 else()
-  set(SIRF_TAG v0.9.0)
-  ## STIR
-  set(STIR_URL https://github.com/CCPPETMR/STIR )
-  set(STIR_TAG 8bf37d9d7fdde7cb3a98a6f848d93827dbd98a18)
-
-  ## Gadgetron
-  set(Gadgetron_URL https://github.com/CCPPETMR/gadgetron )
-  set(Gadgetron_TAG f03829ef45e57466829e6ec46da7a7cf61db1c8a)
-
-  ## ISMRMRD
-  set(ISMRMRD_URL https://github.com/CCPPETMR/ismrmrd )
-  set(ISMRMRD_TAG 35012c6c8000616546c2d6b1757eba0c5b21b2d4)
-
+set(default_SIRF_GIT_TAG v0.9.0)
 endif()
-option(GIT_TAG_SIRF "git tag for SIRF" ${SIRF_TAG})
-mark_as_advanced(STIR_URL STIR_TAG Gadgetron_URL Gadgetron_TAG ISMRMRD_URL ISMRMRD_TAG)
-
+option(GIT_TAG_SIRF "git tag for SIRF" ${default_SIRF_GIT_TAG})


New version: 0.4.18

New version: 0.4.18

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "17")
+SET(HAWKEY_PATCH "18")


fix EqStringifyShaders.cmake (fixes ID: 3138516)

--- EqStringifyShaders.cmake
+++ EqStringifyShaders.cmake
@@ -10,7 +10,9 @@
     add_custom_command(OUTPUT ${OUTPUT_FILES}
       COMMAND ${CMAKE_COMMAND} -DEQ_STRINGIFY_SHADERS_PROCESSING_MODE=ON
         -DINPUT="${INPUT}" -DOUTPUT="${OUTPUT}"
-        -P ${CMAKE_SOURCE_DIR}/CMake/EqStringifyShaders.cmake)
+        -P ${CMAKE_SOURCE_DIR}/CMake/EqStringifyShaders.cmake
+      DEPENDS ${INPUT}
+      )
     list(APPEND ${SOURCES} ${OUTPUT_FILES})
   endforeach(FILE ${ARGN})
 endmacro(EQ_STRINGIFY_SHADERS SOURCES)
@@ -38,8 +40,8 @@
   )

 foreach(LINE ${LINES})
-  string(REPLACE "\"" "\\\"" LINE ${LINE})
+  string(REPLACE "\"" "\\\"" LINE "${LINE}")
   file(APPEND ${OUTPUT}.cpp "   \"${LINE}\\n\"\n")
-endforeach(LINE ${LINES})
+endforeach(LINE)

 file(APPEND ${OUTPUT}.cpp "   ;\n")


Fixed OgreInstallDependencies.cmake to only install the CG.dll if OGRE_BUILD_PLUGIN_CG is on

--- Dependencies/OgreInstallDependencies.cmake
+++ Dependencies/OgreInstallDependencies.cmake
@@ -42,29 +42,39 @@

   # copy the dependency DLLs to the right places
   install(FILES
+    ${OGRE_DEP_BIN_DIR}/debug/OIS_d.dll
+	  DESTINATION bin/debug CONFIGURATIONS Debug
+  )
+  install(FILES
+    ${OGRE_DEP_BIN_DIR}/release/OIS.dll
+	  DESTINATION bin/release CONFIGURATIONS Release None ""
+  )
+  install(FILES
+    ${OGRE_DEP_BIN_DIR}/release/OIS.dll
+	  DESTINATION bin/relwithdebinfo CONFIGURATIONS RelWithDebInfo
+  )
+  install(FILES
+    ${OGRE_DEP_BIN_DIR}/release/OIS.dll
+	  DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel
+  )
+  if (OGRE_BUILD_PLUGIN_CG)
+  install(FILES
     ${OGRE_DEP_BIN_DIR}/debug/cg.dll
-    ${OGRE_DEP_BIN_DIR}/debug/OIS_d.dll
-    ${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll
 	  DESTINATION bin/debug CONFIGURATIONS Debug
   )
   install(FILES
     ${OGRE_DEP_BIN_DIR}/release/cg.dll
-    ${OGRE_DEP_BIN_DIR}/release/OIS.dll
-    ${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
 	  DESTINATION bin/release CONFIGURATIONS Release None ""
   )
   install(FILES
     ${OGRE_DEP_BIN_DIR}/release/cg.dll
-    ${OGRE_DEP_BIN_DIR}/release/OIS.dll
-    ${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
 	  DESTINATION bin/relwithdebinfo CONFIGURATIONS RelWithDebInfo
   )
   install(FILES
     ${OGRE_DEP_BIN_DIR}/release/cg.dll
-    ${OGRE_DEP_BIN_DIR}/release/OIS.dll
-    ${OGRE_DEP_BIN_DIR}/release/libgles_cm.dll
 	  DESTINATION bin/minsizerel CONFIGURATIONS MinSizeRel
   )
+  endif ()

   # install GLES dlls
   if (OGRE_BUILD_RENDERSYSTEM_GLES)
@@ -88,17 +98,17 @@
 endif ()

 # copy the required DLLs to the build directory (configure_file is the only copy-like op I found in CMake)
-configure_file(${OGRE_DEP_BIN_DIR}/debug/cg.dll ${OGRE_BINARY_DIR}/bin/debug/cg.dll COPYONLY)
 configure_file(${OGRE_DEP_BIN_DIR}/debug/OIS_d.dll ${OGRE_BINARY_DIR}/bin/debug/OIS_d.dll COPYONLY)
+configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/release/OIS.dll COPYONLY)
+configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/OIS.dll COPYONLY)
+configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/minsizerel/OIS.dll COPYONLY)

-configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/release/cg.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/release/OIS.dll COPYONLY)
-
-configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/cg.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/OIS.dll COPYONLY)
-
-configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/minsizerel/cg.dll COPYONLY)
-configure_file(${OGRE_DEP_BIN_DIR}/release/OIS.dll ${OGRE_BINARY_DIR}/bin/minsizerel/OIS.dll COPYONLY)
+if (OGRE_BUILD_PLUGIN_CG)
+	configure_file(${OGRE_DEP_BIN_DIR}/debug/cg.dll ${OGRE_BINARY_DIR}/bin/debug/cg.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/release/cg.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/relwithdebinfo/cg.dll COPYONLY)
+	configure_file(${OGRE_DEP_BIN_DIR}/release/cg.dll ${OGRE_BINARY_DIR}/bin/minsizerel/cg.dll COPYONLY)
+endif ()

 if (OGRE_BUILD_RENDERSYSTEM_GLES)
 	configure_file(${OGRE_DEP_BIN_DIR}/debug/libgles_cm.dll ${OGRE_BINARY_DIR}/bin/debug/libgles_cm.dll COPYONLY)


Add new free type version.

Add new free type version.

--HG--
branch : v1-8

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -31,7 +31,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype249 freetype248 freetype246 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


Skip pclint creation if pclint executable not found

--- ament_cmake_pclint/cmake/ament_pclint.cmake
+++ ament_cmake_pclint/cmake/ament_pclint.cmake
@@ -97,16 +97,29 @@
   list(APPEND cmd "--xunit-file" "${result_file}")

   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ament_pclint")
-  ament_add_test(
-    "${ARG_TESTNAME}"
-    COMMAND ${cmd}
-    OUTPUT_FILE "${CMAKE_BINARY_DIR}/ament_pclint/${ARG_TESTNAME}.txt"
-    RESULT_FILE "${result_file}"
-    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-  )
-  set_tests_properties(
-    "${ARG_TESTNAME}"
-    PROPERTIES
-    LABELS "pclint;linter"
-  )
+
+  set(pclint_exec "pclp64")  # Windows executable name
+  if(APPLE)
+      set(pclint_exec "${pclint_exec}_osx")
+  elseif(UNIX)  # i.e. UNIX AND NOT APPLE
+      set(pclint_exec "${pclint_exec}_linux")
+  endif()
+  find_program(pclint_BIN NAMES "${pclint_exec}")
+
+  if(pclint_BIN)
+    ament_add_test(
+      "${ARG_TESTNAME}"
+      COMMAND ${cmd}
+      OUTPUT_FILE "${CMAKE_BINARY_DIR}/ament_pclint/${ARG_TESTNAME}.txt"
+      RESULT_FILE "${result_file}"
+      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    )
+    set_tests_properties(
+      "${ARG_TESTNAME}"
+      PROPERTIES
+      LABELS "pclint;linter"
+    )
+  else()
+    message(WARNING "WARNING: ${pclint_exec} not found, skipping pclint test creation")
+  endif()
 endfunction()


Update link-all.cmake

Update link-all.cmake

Allow link-all to fallthrough if there is an error in the python script

--- scripts/link-all.cmake
+++ scripts/link-all.cmake
@@ -68,12 +68,13 @@
   )
   if(NOT result EQUAL 0)
     message(
-        FATAL_ERROR
+        WARNING
         "Python script failed: ${cmd}, ${result}, ${output}, ${error}"
         "(may help: https://stackoverflow.com/a/2009505/2288008)"
     )
+  else()
+    return()
   endif()
-  return()
 endif()

 set(shell "/bin/bash")


rewrite it again

rewrite it again

--- cmake/FindGSTREAMER.cmake
+++ cmake/FindGSTREAMER.cmake
@@ -1,39 +1,34 @@
 include(LibFindMacros)
 libfind_package(GSTREAMER LibXml2)
-libfind_pkg_check_modules(GSTREAMER_PKGCONF gstreamer-0.10)

-foreach(arg ${GSTREAMER_PKGCONF_CFLAGS})
+find_package(PkgConfig)
+pkg_check_modules(PC_GSTREAMER QUIET gstreamer-0.10)
+
+foreach(arg ${PC_GSTREAMER_CFLAGS})
     if (NOT "${arg}" MATCHES "-I.*")
         set(GSTREAMER_CFLAGS "${GSTREAMER_CFLAGS} ${arg}")
     endif()
 endforeach()

-find_path(GSTREAMER_INCLUDE_DIR
-    NAMES gst/gst.h
-    PATHS ${GSTREAMER_PKGCONF_INCLUDE_DIRS}
-    PATH_SUFFIXES gstreamer-0.10
-)
+find_path(GSTREAMER_INCLUDE_DIR NAMES gst/gst.h
+          HINTS ${PC_GSTREAMER_INCLUDEDIR} ${PC_GSTREAMER_INCLUDE_DIRS}
+          PATH_SUFFIXES gstreamer-0.10)

-find_library(GSTREAMER_LIBRARY
-    NAMES gstreamer-0.10
-    PATHS ${GSTREAMER_PKGCONF_LIBRARY_DIRS}
-)
+find_library(GSTREAMER_LIBRARY NAMES gstreamer-0.10
+             HINTS ${PC_GSTREAMER_LIBDIR} ${PC_GSTREAMER_LIBRARY_DIRS})

-find_library(GSTAPP_LIBRARY
-    NAMES gstapp-0.10
-    PATHS ${GSTREAMER_PKGCONF_LIBRARY_DIRS}
-)
+find_library(GSTAPP_LIBRARY NAMES gstapp-0.10
+             HINTS ${PC_GSTREAMER_LIBDIR} ${PC_GSTREAMER_LIBRARY_DIRS})

-find_library(GSTBASE_LIBRARY
-    NAMES gstbase-0.10
-    PATHS ${GSTREAMER_PKGCONF_LIBRARY_DIRS}
-)
+find_library(GSTBASE_LIBRARY NAMES gstbase-0.10
+             HINTS ${PC_GSTREAMER_LIBDIR} ${PC_GSTREAMER_LIBRARY_DIRS})

-find_library(GSTAUDIO_LIBRARY
-    NAMES gstaudio-0.10
-    PATHS ${GSTREAMER_PKGCONF_LIBRARY_DIRS}
-)
+find_library(GSTAUDIO_LIBRARY NAMES gstaudio-0.10
+             HINTS ${PC_GSTREAMER_LIBDIR} ${PC_GSTREAMER_LIBRARY_DIRS})

-set(GSTREAMER_PROCESS_INCLUDES GSTREAMER_INCLUDE_DIR LIBXML2_INCLUDE_DIR)
-set(GSTREAMER_PROCESS_LIBS GSTREAMER_LIBRARY GSTAPP_LIBRARY GSTBASE_LIBRARY GSTAUDIO_LIBRARY LIBXML2_LIBRARIES)
-libfind_process(GSTREAMER)
+set(GSTREAMER_LIBRARIES ${GSTREAMER_LIBRARY} ${GSTAPP_LIBRARY} ${GSTBASE_LIBRARY} ${GSTAUDIO_LIBRARY} ${LIBXML2_LIBRARIES})
+set(GSTREAMER_INCLUDE_DIRS ${GSTREAMER_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GSTREAMER DEFAULT_MSG GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARY GSTAPP_LIBRARY GSTBASE_LIBRARY GSTAUDIO_LIBRARY)
+mark_as_advanced(GSTREAMER_INCLUDE_DIR GSTREAMER_LIBRARY GSTAPP_LIBRARY GSTBASE_LIBRARY GSTAUDIO_LIBRARY)


Tweak wincairo disabling WARNING message when not a Windows platform.

svn path=/trunk/; revision=10900

--- cmake/modules/cairo.cmake
+++ cmake/modules/cairo.cmake
@@ -174,7 +174,7 @@

 if(NOT WIN32)
   message(STATUS
-    "WARNING: Not a Windows Computer. Setting wincairo driver to OFF."
+    "WARNING: Not a Windows platform so setting wincairo driver to OFF."
   )
   set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE)
 endif(NOT WIN32)


Use correct path when looking up df wrapper.

--- cmake/px4_add_board.cmake
+++ cmake/px4_add_board.cmake
@@ -261,7 +261,7 @@
 		foreach(driver ${DF_DRIVERS})
 			list(APPEND config_df_driver_list ${driver})

-			if(EXISTS "${PX4_SOUCE_DIR}/platforms/posix/drivers/df_${driver}_wrapper")
+			if(EXISTS "${PX4_SOURCE_DIR}/src/platforms/posix/drivers/df_${driver}_wrapper")
 				list(APPEND config_module_list platforms/posix/drivers/df_${driver}_wrapper)
 			endif()
 		endforeach()


COMP: Fix dashboards that wrap Java... correct typo.

--- CMake/KitCommonBlock.cmake
+++ CMake/KitCommonBlock.cmake
@@ -31,7 +31,7 @@
 # source files
 #
 IF (VTK_WRAP_JAVA)
-  INCLUDE(KitCommonJavarapBlock)
+  INCLUDE(KitCommonJavaWrapBlock)
 ENDIF (VTK_WRAP_JAVA)

 TARGET_LINK_LIBRARIES(vtk${KIT} ${KIT_LIBS})


COMP: Merge branch 'bug-18824-BoostWinIncludeDir'

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -20,7 +20,7 @@
     set(_boost_version 1_56)
     set(_boost_install_include_dir include/boost)
     if(WIN32)
-      set(_boost_install_include_dir include/boost-${_boost_version})
+      set(_boost_install_include_dir include/boost-${_boost_version}/boost)
     endif()

     set(_boost_libs )


Use standard dcmtk snapshot for building.

After discussion at CTK hackfest, decision was taken to keep
CTK's default version of the upstream libraries at published
releases wherever possible.  Applications (slicer, mitk, maf, etc)
can use the DCMTK_DIR setting to specify a newer version if
needed and provide tested backwards compatible patches if there
are fixes needed to work with newer versions.

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -23,7 +23,7 @@
   if(CTK_SUPERBUILD)

     if(NOT DEFINED DCMTK_DIR)
-      set(revision_tag ab844899a92f46e2d880c38c85ce098933533aef)
+      set(revision_tag ae3b946f6e6231)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()


They released a new version of Boost. Add it to the list.


ENH: Adding a new postgres include directory.

--- CMake/FindPOSTGRES.cmake
+++ CMake/FindPOSTGRES.cmake
@@ -38,6 +38,7 @@
       /usr/local/pgsql/include
       /usr/local/include
       /usr/include
+      /usr/include/postgresql
     NO_DEFAULT_PATH
   )


Fixed detection of gpsd - need to ensure that gpsd_config.h was installed
along with the other gpsd header files.

svn path=/trunk/KDE/kdeedu/marble/; revision=942859

--- Findlibgps.cmake
+++ Findlibgps.cmake
@@ -6,15 +6,18 @@
 #

 FIND_PATH(libgps_INCLUDES libgpsmm.h)
-
+FIND_PATH(libgpsconf_INCLUDES gpsd_config.h)

 FIND_LIBRARY(libgps_LIBRARIES gps)

-IF (libgps_LIBRARIES AND libgps_INCLUDES)
+IF (libgps_LIBRARIES AND libgps_INCLUDES AND libgpsconf_INCLUDES)
    SET(libgps_FOUND TRUE)
-ELSE(libgps_LIBRARIES AND libgps_INCLUDES)
+ELSE (libgps_LIBRARIES AND libgps_INCLUDES AND libgpsconf_INCLUDES)
     MESSAGE(STATUS "Not building with Gpsd Support")
-ENDIF (libgps_LIBRARIES AND libgps_INCLUDES)
+    IF (libgps_INCLUDES AND NOT libgpsconf_INCLUDES)
+        MESSAGE(STATUS "Installed gpsd does not provide gpsd_config.h - see http://lists.berlios.de/pipermail/gpsd-users/2007-August/002819.html for details on how to fix this.")
+    ENDIF(libgps_INCLUDES AND NOT libgpsconf_INCLUDES)
+ENDIF (libgps_LIBRARIES AND libgps_INCLUDES AND libgpsconf_INCLUDES)

 IF (libgps_FOUND)
    IF (NOT libgps_FIND_QUIETLY)


CI: fix message type when test are failing

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -208,7 +208,7 @@
   "${OTB_SOURCE_DIR}/log/test_cmake_error_log.txt" "${_test_error}")

 if ( NOT _test_rv EQUAL 0 )
-  message( WARNING "Some tests have failed.")
+  message( SEND_ERROR "Some tests have failed.")
 endif()

 ctest_submit()


Fix bug 297: Incorrect use of Boost_USE_STATIC_LIBS causes boost library search to fail when trying to switch to Boost dynamic libs

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -135,7 +135,11 @@
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
 	# Try again with the other type of libs
-	set(Boost_USE_STATIC_LIBS NOT ${Boost_USE_STATIC_LIBS})
+	if(Boost_USE_STATIC_LIBS)
+		set(Boost_USE_STATIC_LIBS)
+	else()
+		set(Boost_USE_STATIC_LIBS ON)
+	endif()
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
 find_package(Boost QUIET)


Update VTK to fix "garbage collection is no longer supported" error. See #534

Thanks to "towerbj" for reporting the problem and suggestion a fix.

$ git shortlog d3b6652..f3f70ec --no-merges
Dave DeMarle (3):
      backport a fix to 5.10 branch to fix vrml clang compilation
      fix the last fix
      bug 14180 silence icc and clang complaints about legacy

David Gobbi (1):
      BUG: Fix incorrect code detected by static analysis.

Sean McBride (1):
      Removed -fobjc-gc from VTK_REQUIRED_OBJCXX_FLAGS

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -25,7 +25,7 @@

 if(NOT DEFINED VTK_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})

-  set(revision_tag d3b66526624ba8e55addcddb0ec28c40982473ac)
+  set(revision_tag f3f70ec0912cf836a3d5954a95cb04f0237fbdc4)
   if(${proj}_REVISION_TAG)
     set(revision_tag ${${proj}_REVISION_TAG})
   endif()


Revert "CMake: remove hack for gcc4.9+ , unneeded"

This reverts commit e2643cc30b96753ad243bd0a6809f058cc460d66.

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -312,6 +312,26 @@
 	endif()

+	# Compatibility with gcc >= 4.9 which requires the use of gcc's own wrappers for
+	# ar and ranlib in combination with LTO works also with LTO disabled
+	IF(UNIX AND CMAKE_COMPILER_IS_GNUCXX AND (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug") AND
+		  CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "4.9")
+		set(CMAKE_AR "gcc-ar")
+		set(CMAKE_RANLIB "gcc-ranlib")
+		# EXTERNAL_STATICLIB_CMAKE_DEFINITIONS_OPTIMIZED duplicates settings for
+		# CMAKE_AR and CMAKE_RANLIB. This is a workaround for a CMAKE bug
+		# (https://gitlab.kitware.com/cmake/cmake/issues/15547) that prevents
+		# the correct propagation of CMAKE_AR and CMAKE_RANLIB variables to all
+		# externals
+		list(APPEND EXTERNAL_STATICLIB_CMAKE_DEFINITIONS_OPTIMIZED
+			 -DCMAKE_AR:PATH=gcc-ar
+			 -DCMAKE_RANLIB:PATH=gcc-ranlib)
+		# And ditto for externals that use the configure-based build system
+		list(APPEND EXTERNAL_STATICLIB_CONFIGURE_DEFINITIONS_OPTIMIZED
+			 AR=gcc-ar
+			 RANLIB=gcc-ranlib)
+	ENDIF()
+

         #
         # set OPTIMIZATION flags


Added proper ws2_32 & pthread dependencies for the Civetweb library.

--- Source/CMake/Modules/Urho3D-CMake-magic.cmake
+++ Source/CMake/Modules/Urho3D-CMake-magic.cmake
@@ -469,10 +469,10 @@
         endif ()
     endif ()

-    # ThirdParty/kNet external dependency
-    if (${TARGET} MATCHES kNet|Main)
+    # ThirdParty/kNet & ThirdParty/Civetweb external dependency
+    if (${TARGET} MATCHES Civetweb|kNet|Main)
         if (WIN32)
-            set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} ws2_32.lib)
+            set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} ws2_32)
         elseif (NOT ANDROID)
             set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} pthread)
         endif ()
@@ -481,9 +481,9 @@
     # Engine/Core external dependency
     if (${TARGET} MATCHES Core|Main)
         if (WIN32)
-            set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} winmm.lib)
+            set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} winmm)
             if (ENABLE_MINIDUMPS)
-                set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dbghelp.lib)
+                set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} dbghelp)
             endif ()
         elseif (NOT ANDROID)
             set (LINK_LIBS_ONLY ${LINK_LIBS_ONLY} pthread)


fix: (WIP) ios build

fix: (WIP) ios build


writing the outline for the mbed RPC cmake file again

--- firmware/mbed/mbed-rpc.cmake
+++ firmware/mbed/mbed-rpc.cmake
@@ -0,0 +1,26 @@
+# The cmake build file that sets up everything for building the mbed RPC
+# classes for use along with the 'mbed_libraries' library.
+
+# select the source files for the RPC classes
+file(GLOB RPC_SRC "${MBED_RPC_PATH}/*.cpp")
+
+# add a library for building the RPC classes
+add_library(rpc_library ${RPC_SRC})
+
+# we add dependencies for the source files since those
+# are downloaded with the mbed_libraries external project
+add_dependencies(rpc_library mbed_libraries ${RPC_SRC})
+
+# pass the mbed_libraries target to the linker
+target_link_libraries(rpc_library mbed_libraries)
+
+# include the directory for anything that depends on this target library
+target_include_directories(rpc_library PUBLIC ${MBED_RPC_PATH})
+
+# only build if required
+set_target_properties(rpc_library PROPERTIES EXCLUDE_FROM_ALL TRUE)
+
+# add the external project's path/src info into the accessory library lists
+set(MBED_ASSEC_LIBS_INCLUDES    ${MBED_ASSEC_LIBS_INCLUDES} ${SOURCE_DIR}       )
+set(MBED_ASSEC_LIBS_SRCS        ${MBED_ASSEC_LIBS_SRCS}     ${MBED_RPC_PATH}    )
+set(MBED_ASSEC_LIBS_DEPENDS     ${MBED_ASSEC_LIBS_DEPENDS}  rpc_library         )


Tell FindBoost.cmake to output which Boost components are missing on failure.

--- Common.cmake
+++ Common.cmake
@@ -78,6 +78,7 @@

 # Boost settings
 set(Boost_NO_BOOST_CMAKE ON CACHE BOOL "Enable fix for FindBoost.cmake" )
+set(Boost_DETAILED_FAILURE_MSG ON) # Output which components are missing
 add_definitions(-DBOOST_ALL_NO_LIB) # Don't use 'pragma lib' on Windows
 add_definitions(-DBoost_NO_BOOST_CMAKE) # Fix for CMake problem in FindBoost
 if(NOT Boost_USE_STATIC_LIBS)


Name it 'Personal Calendar', to be more similar to the default contact resource.

svn path=/branches/work/akonadi-ports/kdepim/; revision=1030650

--- akonadi/defaultsetup/defaultcalendar.cmake
+++ akonadi/defaultsetup/defaultcalendar.cmake
@@ -1,7 +1,7 @@
 [Agent]
 Id=defaultcalendar
 Type=akonadi_ical_resource
-Name=My Calendar
+Name=Personal Calendar

 [Settings]
 Path[$e]=~/${KDE_DEFAULT_HOME}/share/apps/korganizer/std.ics


BUG: mantis 1077 - broken link for openscenegraph 3.2

--- SuperBuild/CMake/External_openthreads.cmake
+++ SuperBuild/CMake/External_openthreads.cmake
@@ -40,7 +40,7 @@
   else()
     ExternalProject_Add(${proj}
       PREFIX ${proj}
-      URL "http://www.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip"
+      URL "http://trac.openscenegraph.org/downloads/developer_releases/OpenSceneGraph-3.2.0.zip"
       URL_MD5 4980f8692712a24d4c99f363f80c6814
       SOURCE_DIR ${OPENTHREADS_SB_SRC}
       BINARY_DIR ${OPENTHREADS_SB_BUILD_DIR}


Added linker option for emscripten fetch api

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -59,6 +59,7 @@
 option(FIPS_EMSCRIPTEN_USE_EMMALLOC "emscripten: use emmalloc allocator" OFF)
 option(FIPS_EMSCRIPTEN_ALLOW_MEMORY_GROWTH "emscripten: allow memory growth" OFF)
 option(FIPS_EMSCRIPTEN_USE_WASM_TRAP_MODE_CLAMP "emscripten: use trap-mode clamp for wasm" ON)
+option(FIPS_EMSCRIPTEN_USE_FETCH "emscripten: use fetch API" OFF)
 set(FIPS_EMSCRIPTEN_TOTAL_MEMORY 134217728 CACHE STRING "emscripten: total heap size in bytes")
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_MEM_INIT_METHOD 1 CACHE STRING "emscripten: how to represent initial memory content (0..2)")
@@ -149,6 +150,9 @@
     set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --closure 0")
 endif()
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} -s ASSERTIONS=0")
+if (FIPS_EMSCRIPTEN_USE_FETCH)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s FETCH=1")
+endif()

 set(EMSC_EXE_LINKER_FLAGS "${EMSC_EXE_LINKER_FLAGS} --shell-file ${FIPS_EMSCRIPTEN_SHELL_HTML}")


px4fmu-v2 disable teraranger distance sensor

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -26,7 +26,7 @@
 	drivers/distance_sensor/sf0x
 	drivers/distance_sensor/sf1xx
 	drivers/distance_sensor/srf02
-	drivers/distance_sensor/teraranger
+	#drivers/distance_sensor/teraranger
 	#drivers/distance_sensor/tfmini
 	#drivers/distance_sensor/ulanding
 	#drivers/frsky_telemetry


Added lib/terrain_estimation and lib/runway_takeoff requierd from rebase on master

--- cmake/configs/nuttx_px4fmu-v4_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4_default.cmake
@@ -115,6 +115,8 @@
 	lib/geo_lookup
 	lib/conversion
 	lib/launchdetection
+	lib/terrain_estimation
+	lib/runway_takeoff
 	platforms/nuttx

 	# had to add for cmake, not sure why wasn't in original config


Fix unresolved external symbol errors with LZ4 on Windows

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -154,7 +154,7 @@
       URL http://lcgpackages.web.cern.ch/lcgpackages/tarFiles/sources/lz4-${lz4_version}.tar.gz
       URL_MD5 c9610c5ce97eb431dddddf0073d919b9
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CONFIGURE_COMMAND cl /c "${LZ4_CFLAGS}" lib/lz4.c lib/lz4hc.c lib/lz4frame.c lib/xxhash.c
+      CONFIGURE_COMMAND cl /c "${LZ4_CFLAGS}" -DXXH_NAMESPACE=LZ4_ lib/lz4.c lib/lz4hc.c lib/lz4frame.c lib/xxhash.c
       BUILD_COMMAND lib /NODEFAULTLIB lz4.obj lz4hc.obj lz4frame.obj xxhash.obj /OUT:${LZ4_LIBRARIES}
       INSTALL_COMMAND xcopy "lib\\*.h" "${NATIVE_INCLUDEDIR}\\" /Y
       LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1 BUILD_IN_SOURCE 1


Follow style of current externals for Vc

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1273,13 +1273,12 @@
   set(Vc_PROJECT "Vc-${Vc_VERSION}")
   set(Vc_SRC_URI "${lcgpackages}/${Vc_PROJECT}.tar.gz")
   set(Vc_SRC_MD5 "a248e904f0b1a330ad8f37ec50cbad30")
-  set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/externals/install/${Vc_PROJECT}")
+  set(Vc_DESTDIR "${CMAKE_BINARY_DIR}/${Vc_PROJECT}")
   set(Vc_ROOTDIR "${Vc_DESTDIR}/${CMAKE_INSTALL_PREFIX}")
   set(Vc_LIBNAME "${CMAKE_STATIC_LIBRARY_PREFIX}Vc${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(Vc_LIBRARY "${Vc_ROOTDIR}/${_LIBDIR_DEFAULT}/${Vc_LIBNAME}")

   ExternalProject_Add(${Vc_PROJECT}
-    PREFIX externals
     URL     ${Vc_SRC_URI}
     URL_MD5 ${Vc_SRC_MD5}
     BUILD_IN_SOURCE 0


Change the threshold of vc on windows

Change the threshold of vc on windows

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -732,8 +732,8 @@
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
   elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0)  # equivalent to MSVC 2010
-      message(STATUS "VC requires MSVC version >= 2010; switching OFF 'vc' option")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17.0)  # equivalent to MSVC 2010
+      message(STATUS "VC requires MSVC version >= 2011; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
     endif()
   endif()


Point to the actual path of libbenchmark.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1616,7 +1616,7 @@
                   -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
     # Disable install step
     INSTALL_COMMAND ""
-    BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/googletest-prefix/src/libbenchmark.a"
+    BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/googlebenchmark-prefix/src/googlebenchmark-build/src/libbenchmark.a"
     # Wrap download, configure and build steps in a script to log output
     LOG_DOWNLOAD ON
     LOG_CONFIGURE ON


Clear variables set to NOTFOUND to let builtin FTGL to override them


[PyROOT] Add check for deprecated pyroot_experimental option

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1565,6 +1565,11 @@
   endif()
 endif()

+#---Check for deprecated PyROOT experimental ---------------------------------------------
+if(pyroot_experimental)
+  message(FATAL_ERROR "pyroot_experimental is now called pyroot! Please reconfigure with -Dpyroot=ON")
+endif()
+
 #---Check for MPI---------------------------------------------------------------------
 if (mpi)
   message(STATUS "Looking for MPI")


VS2008 dev+ [ci skip]

VS2008 dev+ [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -32,9 +32,9 @@
   -DPCRE2_BUILD_PCRE2GREP=N
   -DPCRE2_SUPPORT_JIT=Y
   -DPCRE2_BUILD_TESTS=N)
-IF (MSVC)
-  LIST (APPEND _PCRE2_CMAKE_ARGS "-DPCRE2_STATIC_RUNTIME=1")
-ENDIF ()
+# IF (MSVC)
+#   LIST (APPEND _PCRE2_CMAKE_ARGS "-DPCRE2_STATIC_RUNTIME=1")
+# ENDIF ()
 IF (FIXME_CMAKE_ABSOLUTE)
   LIST (APPEND _PCRE2_CMAKE_ARGS "-DPCRE2_CMAKE_INCLUDE=${FIXME_CMAKE_ABSOLUTE}")
 ENDIF ()