Update builtin version of TBB to 2019_U8

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1101,8 +1101,8 @@
 endif()

 if(builtin_tbb)
-  set(tbb_builtin_version 2019_U7)
-  set(tbb_sha256 4204a93f4c0fd989fb6f79acae74feb02ee39725c93968773d9b6efeb75c7a6a)
+  set(tbb_builtin_version 2019_U8)
+  set(tbb_sha256 7b1fd8caea14be72ae4175896510bf99c809cd7031306a1917565e6de7382fba)
   if(CMAKE_CXX_COMPILER_ID MATCHES Clang)
     set(_tbb_compiler compiler=clang)
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)


Add 'AND use_link_script'

Add 'AND use_link_script'

--- cmake/modules/hunter_unpack_directory.cmake
+++ cmake/modules/hunter_unpack_directory.cmake
@@ -82,7 +82,7 @@
     endif()

     # For LIST_DIRECTORIES
-    if(CMAKE_VERSION VERSION_LESS 3.3)
+    if(CMAKE_VERSION VERSION_LESS 3.3 AND use_link_script)
       hunter_internal_error(
           "CMake version 3.3 at least needed."
           "Current version is ${CMAKE_VERSION}."


the module macro no longer needs the rng bit

--- src/CMake/CycamoreModuleMacros.cmake
+++ src/CMake/CycamoreModuleMacros.cmake
@@ -36,55 +36,3 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/${_name}Tests.cpp
     PARENT_SCOPE)
 endmacro()
-
-macro(find_modules _type)
-  SET(TYPE_PATH "${CYCLUS_ROOT_DIR}/lib/Models/${_type}/*/")
-  FILE(GLOB all_valid_subdirs ${TYPE_PATH} "*/*.rng")
-  FOREACH(dir ${all_valid_subdirs})
-    STRING(REPLACE "${CYCLUS_ROOT_DIR}/lib/Models/${_type}/" "" model_name "${dir}" )
-    SET(${_type}_REFS ${${_type}_REFS} "<ref name='${model_name}'/>")
-    SET(RNG_INCLUDES ${RNG_INCLUDES} "<include href='../lib/Models/${_type}/${model_name}/${model_name}.rng'/>")
-  ENDFOREACH(dir)
-endmacro()
-
-macro(find_all_modules)
-  find_modules(Facility)
-  find_modules(Inst)
-  find_modules(Region)
-  find_modules(Market)
-  find_modules(Converter)
-  find_modules(Stub)
-  find_modules(StubComm)
-endmacro()
-
-macro(clean_includes)
-  STRING(REPLACE ";" "\n\ \ " RNG_INCLUDES "${RNG_INCLUDES}")
-endmacro()
-
-macro(clean_refs _type)
-  STRING(REPLACE ";" "\n\ \ \ \ \ \ \ \ " ${_type}_REFS "${${_type}_REFS}")
-endmacro()
-
-macro(clean_all_refs)
-  clean_refs(Facility)
-  MESSAGE(STATUS "Facility_REFS ${Facility_REFS}")
-  clean_refs(Inst)
-  clean_refs(Region)
-  clean_refs(Market)
-  clean_refs(Converter)
-  clean_refs(Stub)
-  clean_refs(StubComm)
-endmacro()
-
-macro(install_rng)
-  find_all_modules()
-  clean_includes()
-  clean_all_refs()
-  CONFIGURE_FILE(${CYCLUS_CORE_SHARE_DIR}/cyclus.rng.in
-    ${PROJECT_BINARY_DIR}/share/cyclus.rng @ONLY)
-  INSTALL(FILES
-    ${PROJECT_BINARY_DIR}/share/cyclus.rng
-    DESTINATION ${CYCLUS_CORE_SHARE_DIR}
-    COMPONENT data
-  )
-endmacro()


[chore] CMake: deprecate custom processor count logic (#868)

CMake 2.8.5 shipped with a built-in module.

Also quote `KO_DOWNLOAD_DIR`.

Today it looks like this: https://github.com/Kitware/CMake/blob/283330976f2379eec214bfe1d51a27c29cc1f8fc/Modules/ProcessorCount.cmake

For 3.5 it looks like this: https://github.com/Kitware/CMake/blob/64130a7e793483e24c1d68bdd234f81d5edb2d51/Modules/ProcessorCount.cmake

Either way, same idea but more complete with "automatic" updates & improvements.

--- thirdparty/cmake_modules/koreader_thirdparty_common.cmake
+++ thirdparty/cmake_modules/koreader_thirdparty_common.cmake
@@ -1,24 +1,8 @@
 if(NOT DEFINED PROCESSOR_COUNT)
-  # Unknown:
-  set(PROCESSOR_COUNT 0)
-
-  # Linux:
-  set(cpuinfo_file "/proc/cpuinfo")
-  if(EXISTS "${cpuinfo_file}")
-    file(STRINGS "${cpuinfo_file}" procs REGEX "^processor.: [0-9]+$")
-    list(LENGTH procs PROCESSOR_COUNT)
-  endif()
-
-  # Mac:
-  if(APPLE)
-    execute_process(COMMAND sysctl -n hw.ncpu OUTPUT_VARIABLE ncpu)
-    set(PROCESSOR_COUNT "${ncpu}")
-  endif()
-
-  # Windows:
-  if(WIN32)
-    set(PROCESSOR_COUNT "$ENV{NUMBER_OF_PROCESSORS}")
-  endif()
+    include(ProcessorCount)
+    ProcessorCount(N)
+    # 0 if unknown
+    set(PROCESSOR_COUNT ${N})
 endif()

 if(APPLE)
@@ -54,4 +38,4 @@
     set(${varName} "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-prefix/src/${PROJECT_NAME}-build")
 endmacro(ep_get_binary_dir)

-set(KO_DOWNLOAD_DIR ${CMAKE_CURRENT_SOURCE_DIR}/build/downloads)
+set(KO_DOWNLOAD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/build/downloads")


Update for newer exclude variable

Update for newer exclude variable

--- itk-module.cmake
+++ itk-module.cmake
@@ -7,6 +7,12 @@
 # ITKStreamingSinc depends on ITKCommon
 # The testing module in ITKStreamingSinc depends on ITKTestKernel
 # and ITKMetaIO(besides ITKStreamingSinc and ITKCore)
+
+# ITK version 4.5 changed it from EXCLUDE_FROM_ALL to EXCLUDE_FROM_DEFAULT
+set( _EXCLUDE "EXCLUDE_FROM_ALL" )
+if (NOT "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}.${ITK_VERSION_MINOR_PATCH}" VERSION_LESS "4.5")
+  set( _EXCLUDE "EXCLUDE_FROM_DEFAULT" )
+endif()

 # define the dependencies of the include module and the tests
 itk_module(StreamingSinc
@@ -20,5 +26,5 @@
     ITKStatistics
   DESCRIPTION
     "${DOCUMENTATION}"
-  EXCLUDE_FROM_ALL
+  ${_EXCLUDE}
 )


Fixing rename README file in CMake code

Fixing rename README file in CMake code

--- itk-module.cmake
+++ itk-module.cmake
@@ -1,5 +1,5 @@
 get_filename_component( MY_CURENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-file( READ "${MY_CURENT_DIR}/README" DOCUMENTATION )
+file( READ "${MY_CURENT_DIR}/README.rst" DOCUMENTATION )

 # ITK version 4.5 changed it from EXCLUDE_FROM_ALL to EXCLUDE_FROM_DEFAULT


DOC: Improve the `itk-module.cmake` documentation,

Improve the `itk-module.cmake` file documentation:
- Re-use the `README.rst` documentation to increase consistency.
- Add comments.

--- itk-module.cmake
+++ itk-module.cmake
@@ -1,8 +1,14 @@
-set(DOCUMENTATION "The module provides run-length encoded storage for
-image content, iterators for efficient reading and writing, and a
-specialization of region of interest filter which can also be used to
-convert to and from regular itk::Image.")
+# the top-level README is used for describing this module, just
+# re-used it for documentation here
+get_filename_component(MY_CURENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+file(READ "${MY_CURENT_DIR}/README.rst" DOCUMENTATION)

+# itk_module() defines the module dependencies in RLEImage
+# The testing module in RLEImage depends on ITKTestKernel
+# By convention those modules outside of ITK are not prefixed with
+# ITK
+
+# define the dependencies of the include module and the tests
 itk_module(RLEImage
   DEPENDS
     ITKImageGrid


ARROW-2726: [C++] Fix the latest Boost version

Boost 1.68.0 isn't released yet.

Author: Kouhei Sutou <kou@clear-code.com>

Closes #2150 from kou/cpp-fix-latest-boost-version and squashes the following commits:

42ff1c4c <Kouhei Sutou>  Fix the latest Boost version

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -146,7 +146,7 @@
   "1.62.0" "1.61"
   "1.61.0" "1.62"
   "1.60.0" "1.60")
-list(GET Boost_ADDITIONAL_VERSIONS 0 BOOST_LATEST_VERSION)
+list(GET Boost_ADDITIONAL_VERSIONS 2 BOOST_LATEST_VERSION)
 string(REPLACE "." "_" BOOST_LATEST_VERSION_IN_PATH ${BOOST_LATEST_VERSION})
 set(BOOST_LATEST_URL
   "https://dl.bintray.com/boostorg/release/${BOOST_LATEST_VERSION}/source/boost_${BOOST_LATEST_VERSION_IN_PATH}.tar.gz")


Need to set the PCSC_LIBRARIES to PCSC_LDFLAGS

--- cmake/pcscd.cmake
+++ cmake/pcscd.cmake
@@ -75,6 +75,7 @@
         set(ENV{PKG_CONFIG_PATH} "${PCSCLITE_PKG_PATH}:$ENV{PKG_CONFIG_PATH}")
         pkg_check_modules(PCSC REQUIRED libpcsclite)
         if(PCSC_FOUND)
+            set(PCSC_LIBRARIES ${PCSC_LDFLAGS})
             if(VERBOSE_CMAKE)
                 message("PCSC_FOUND: ${PCSC_FOUND}")
                 message("PCSC_LIBRARY_DIRS: ${PCSC_LIBRARY_DIRS}")


Improved testing from CMake project

Improved testing from CMake project

Build tests optimization
Now lite-test added to CTest collection

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -170,8 +170,7 @@
   ${protobuf_source_dir}/src/google/protobuf/wire_format_unittest.cc
 )

-add_executable(tests ${tests_files} ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
-target_link_libraries(tests libprotoc libprotobuf gmock_main)
+enable_testing()

 set(test_plugin_files
   ${protobuf_source_dir}/src/google/protobuf/compiler/mock_code_generator.cc
@@ -182,11 +181,15 @@
 add_executable(test_plugin ${test_plugin_files})
 target_link_libraries(test_plugin libprotoc libprotobuf gmock)

+add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$<TARGET_FILE:test_plugin>")
+
 set(lite_test_files
   ${protobuf_source_dir}/src/google/protobuf/lite_unittest.cc
 )
 add_executable(lite-test ${lite_test_files} ${common_lite_test_files} ${lite_test_proto_files})
 target_link_libraries(lite-test libprotobuf-lite)
+add_test(NAME lite-test COMMAND lite-test
+  WORKING_DIRECTORY ${protobuf_source_dir})

 set(lite_arena_test_files
   ${protobuf_source_dir}/src/google/protobuf/lite_arena_unittest.cc
@@ -194,9 +197,13 @@
 add_executable(lite-arena-test ${lite_arena_test_files} ${common_lite_test_files} ${lite_test_proto_files})
 target_link_libraries(lite-arena-test libprotobuf-lite gmock_main)

-enable_testing()
-add_compile_options(-DGOOGLE_PROTOBUF_TEST_PLUGIN_PATH="$<TARGET_FILE:test_plugin>")
 add_library(libtests STATIC ${common_test_files} ${tests_proto_files} ${lite_test_proto_files})
+
+# Native single tests
+add_executable(tests ${tests_files})
+target_link_libraries(tests libtests libprotoc libprotobuf gmock_main)
+
+# Sparated tests for CTest
 foreach(file ${tests_files})
   get_filename_component(name ${file} NAME_WE)
   add_executable(${name} ${file})


KALYPSO-2795 Enabling generation of .pdb files in release builds.

/Zi was added to objects, /DEBUG to exe, lib, etc, linker optimizations
re-enabled because /DEBUG disables them.

Change-Id: Ibd9580eda01ba4cdf24fad2c0c802583343734fc
Signed-off-by: Kevin Harris <b16c7501a564c6f0d79fef9d1ffebe8567c896e4@emc.com>
Reviewed-on: https://gerrit.mozy.lab.emc.com/115325
Reviewed-by: Andrew Skowronski <1ff840f17aa27241e38803f65229adef2e3fc60a@emc.com>

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -55,7 +55,7 @@
     #Although we set same settings the actual subdirectories will be
     #a bit difference as described below.

-    #Windows:
+    #Windows:
     #By default the .lib and .exe files are output in Debug\Release subdirectories
     #of each source directory.
     #build32Or64.bat is responsible for setting the output directory based on the architecture
@@ -100,12 +100,21 @@
         #Only warnings that are never useful should be added here. In other cases they should be disabled
         #on a case by case basis on the settings for individual target or file
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4345 -wd4503")
+
+        # /Zi generates debug information in the .obj files.
+        set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi")
+        # Tell the linker to generate .pdb files for release builds (/DEBUG), but still remove unreferenced
+        # functions (/OPT:REF), and merge functions with identical assembly instructions (/OPT:ICF).
+        # Specifying /DEBUG automatically turns off the other (necessary) optimizations that are reenabled.
+        set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
+        set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
+        set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG /OPT:REF /OPT:ICF")
     else()
-    if(LINUX)
+        if(LINUX)
             #prepare for linking to pthread
-        set(THREADS_PREFER_PTHREAD_FLAG ON)
-        find_package(Threads REQUIRED)
-    endif()
+            set(THREADS_PREFER_PTHREAD_FLAG ON)
+            find_package(Threads REQUIRED)
+        endif()

         #If code coverage option is enabled then debug build flags change
         if (BUILD_COVERAGE)
@@ -134,9 +143,11 @@
         target_link_libraries(${targetname} Threads::Threads rt dl z)

         #centos may need krb5 also when static linking openssl
-	    if(${LINUX_DISTRO} STREQUAL "CentOS")
+        if(${LINUX_DISTRO} STREQUAL "CentOS")
             target_link_libraries(${targetname} krb5 k5crypto)
         endif()
+    elseif(MSVC)
+        set_property(TARGET ${targetname} APPEND PROPERTY LINK_FLAGS_RELEASE /DEBUG)
     endif()
 endmacro()


Revert change to use find_program instead of setting direct paths to compilers

--- toolchain/Toolchain-Freescale-HC12.cmake
+++ toolchain/Toolchain-Freescale-HC12.cmake
@@ -27,15 +27,15 @@
 # Toolchain - Compilers, librarian (archiver) and linker.
 #              Piper is a Freescale command line tool that is used to redirect their GUI tools output to stdout.
 #
-find_program(HC12_PIPER         NAMES piper)
-find_program(HC12_BURNER        NAMES burner)
-find_program(CMAKE_C_COMPILER   NAMES chc12)
-find_program(CMAKE_CXX_COMPILER NAMES chc12)
-find_program(CMAKE_AR           NAMES libmaker)
-find_program(CMAKE_LINKER       NAMES linker)
+set(HC12_PIPER         ${HC12_PATH}/Prog/piper)
+set(HC12_BURNER        ${HC12_PATH}/Prog/burner.exe)
+set(CMAKE_C_COMPILER   ${HC12_PATH}/Prog/chc12.exe)
+set(CMAKE_CXX_COMPILER ${HC12_PATH}/Prog/chc12.exe)
+set(CMAKE_AR           ${HC12_PATH}/Prog/libmaker.exe)
+set(CMAKE_LINKER       ${HC12_PATH}/Prog/linker.exe)

-set(CMAKE_OBJCOPY FALSE)
-set(CMAKE_OBJDUMP FALSE)
+set(CMAKE_OBJCOPY      FALSE)
+set(CMAKE_OBJDUMP      FALSE)

 include_directories(${HC12_PATH}/lib/hc12c/include)
 link_directories(${HC12_PATH}/lib/hc12c/lib)


COMP: OpenCVConfig.cmake cannot be included in ctest script mode.

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -47,22 +47,6 @@
   string(REGEX REPLACE ".*Qt version ([0-9.]+) .*" "\\1" MY_QT_VERSION ${MY_QT_VERSION})
 endif()

-set(OPENCV_DIR)
-if(WIN32)
-  find_package(OpenCV CONFIG PATHS "${CTEST_BINARY_DIRECTORY}/ep")
-  if(OpenCV_FOUND)
-    set(_opencv_link_directories
-      "${OpenCV_LIB_DIR_DBG}"
-      "${OpenCV_LIB_DIR_OPT}"
-      "${OpenCV_3RDPARTY_LIB_DIR_DBG}"
-      "${OpenCV_3RDPARTY_LIB_DIR_OPT}")
-    list(REMOVE_DUPLICATES _opencv_link_directories)
-    foreach(_opencv_link_directory ${_opencv_link_directories})
-      list(APPEND OPENCV_DIR "${_opencv_link_directory}/../bin")
-    endforeach()
-  endif()
-endif()
-
 #
 # Project specific properties
 #
@@ -78,9 +62,22 @@

 set(CTEST_PATH "$ENV{PATH}")
 if(WIN32)
+  set(CMAKE_PREFIX_PATH "${CTEST_BINARY_DIRECTORY}/ep;${CMAKE_PREFIX_PATH}" CACHE STRING "" FORCE)
+  if(CMAKE_CL_64)
+    set(CMAKE_LIBRARY_ARCHITECTURE x64)
+  else()
+    set(CMAKE_LIBRARY_ARCHITECTURE x86)
+  endif()
+  find_library(OPENCV_LIBRARY opencv_core248 PATH_SUFFIXES vc10 vc11 vc12 vc13 vc14 NO_DEFAULT_PATH)
+  if(OPENCV_LIBRARY)
+    get_filename_component(OPENCV_BIN_DIR "${OPENCV_LIBRARY}" DIRECTORY)
+  endif()
+  message("OpenCV runtime path: ${OPENCV_BIN_DIR}")
+
   set(SOFA_BINARY_DIR "${CTEST_BINARY_DIRECTORY}/SOFA-build/bin/${CTEST_BUILD_CONFIGURATION}")
   set(BLUEBERRY_OSGI_DIR "${CTEST_BINARY_DIRECTORY}/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin/${CTEST_BUILD_CONFIGURATION}")
-  set(CTEST_PATH "${CTEST_PATH};${CTEST_BINARY_DIRECTORY}/ep/bin;${QT_BINARY_DIR};${SOFA_BINARY_DIR};${BLUEBERRY_OSGI_DIR};${OPENCV_DIR}")
+
+  set(CTEST_PATH "${CTEST_PATH};${CTEST_BINARY_DIRECTORY}/ep/bin;${QT_BINARY_DIR};${SOFA_BINARY_DIR};${BLUEBERRY_OSGI_DIR};${OPENCV_BIN_DIR}")
 endif()
 set(ENV{PATH} "${CTEST_PATH}")


- issue 2557: ensure that clapack is successfully found on macOS

--- CMakeModules/FindCLAPACK.cmake
+++ CMakeModules/FindCLAPACK.cmake
@@ -46,8 +46,35 @@
 set(BLA_VENDOR "Apple")
 find_package(LAPACK)

+
+if (BLAS_FOUND AND APPLE)
+  add_definitions(-DHAVE_APPLE)
+  if (NOT CLAPACK_INCLUDE_DIR)
+    set(CLAPACK_INCLUDE_DIR "${COPASI_SOURCE_DIR}")
+  endif (NOT CLAPACK_INCLUDE_DIR)
+
+
+  if (NOT CLAPACK_LIBRARIES)
+    set(CLAPACK_LIBRARIES ${BLAS_LIBRARIES})
+  endif(NOT CLAPACK_LIBRARIES)
+
+endif()
+
 if (LAPACK_FOUND)
   add_definitions(-DHAVE_APPLE)
+  if (NOT CLAPACK_INCLUDE_DIR)
+    set(CLAPACK_INCLUDE_DIR "${COPASI_SOURCE_DIR}")
+  endif (NOT CLAPACK_INCLUDE_DIR)
+
+
+  if (NOT CLAPACK_LIBRARIES)
+    set(CLAPACK_LIBRARIES ${LAPACK_LIBRARIES})
+  endif(NOT CLAPACK_LIBRARIES)
+
+  if (NOT CLAPACK_LINKER_FLAGS)
+    set(CLAPACK_LINKER_FLAGS ${LAPACK_LINKER_FLAGS})
+  endif(NOT CLAPACK_LINKER_FLAGS)
+
 endif ()

 if (NOT LAPACK_FOUND)
@@ -123,6 +150,7 @@
   set (BLA_VENDOR "COPASI Dependencies")
 endif()

+if (NOT BLASWRAP_INCLUDE_DIR)
 find_path(BLASWRAP_INCLUDE_DIR blaswrap.h
     PATHS $ENV{LAPACK_DIR}/include
           $ENV{LAPACK_DIR}
@@ -136,11 +164,13 @@
           /opt/include
           /usr/freeware/include
 )
+endif(NOT BLASWRAP_INCLUDE_DIR)

 if (BLASWRAP_INCLUDE_DIR)
   add_definitions(-DHAVE_BLASWRAP_H)
 endif (BLASWRAP_INCLUDE_DIR)

+if (NOT F2C_INCLUDE_DIR)
 find_path(F2C_INCLUDE_DIR f2c.h
     PATHS $ENV{LAPACK_DIR}/include
           $ENV{LAPACK_DIR}
@@ -154,11 +184,13 @@
           /opt/include
           /usr/freeware/include
 )
+endif(NOT F2C_INCLUDE_DIR)

 if (F2C_INCLUDE_DIR)
   add_definitions(-DHAVE_F2C_H)
 endif (F2C_INCLUDE_DIR)

+if (NOT BLAS_INCLUDE_DIR)
 find_path(BLAS_INCLUDE_DIR blas.h
     PATHS $ENV{LAPACK_DIR}/include
           $ENV{LAPACK_DIR}
@@ -172,11 +204,13 @@
           /opt/include
           /usr/freeware/include
 )
+endif(NOT BLAS_INCLUDE_DIR)

 if (BLAS_INCLUDE_DIR)
   add_definitions(-DHAVE_BLAS_H)
 endif (BLAS_INCLUDE_DIR)

+if (NOT LAPACKWRAP_INCLUDE_DIR)
 find_path(LAPACKWRAP_INCLUDE_DIR lapackwrap.h
     PATHS $ENV{LAPACK_DIR}/include
           $ENV{LAPACK_DIR}
@@ -190,11 +224,13 @@
           /opt/include
           /usr/freeware/include
 )
+endif( NOT LAPACKWRAP_INCLUDE_DIR)

 if (LAPACKWRAP_INCLUDE_DIR)
   add_definitions(-DHAVE_LAPACKWRAP_H)
 endif (LAPACKWRAP_INCLUDE_DIR)

+if(NOT CLAPACK_INCLUDE_DIR)
 find_path(CLAPACK_INCLUDE_DIR clapack.h
     PATHS $ENV{LAPACK_DIR}/include
           $ENV{LAPACK_DIR}
@@ -208,6 +244,8 @@
           /opt/include
           /usr/freeware/include
 )
+endif(NOT CLAPACK_INCLUDE_DIR)
+

 if (CLAPACK_INCLUDE_DIR)
   add_definitions(-DHAVE_CLAPACK_H)


add forgotten preprocessor flags for TBB

--- CMake_preprocessor_flags.cmake
+++ CMake_preprocessor_flags.cmake
@@ -35,3 +35,8 @@
 if (CUSOLVER_AVAILABLE)
     add_definitions(-DCUSOLVER_AVAILABLE)
 endif()
+
+# export TBB compile flag
+if (ENABLE_TBB)
+    add_definitions(-DENABLE_TBB)
+endif()


Update Hunter

Update Hunter

--- common.cmake
+++ common.cmake
@@ -6,6 +6,6 @@
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")

 HunterGate(
-    URL "https://github.com/ruslo/hunter/archive/v0.17.9.tar.gz"
-    SHA1 "83aedab25adebc6c5ee9f8fa4618403d41fef275"
+    URL "https://github.com/ruslo/hunter/archive/v0.17.10.tar.gz"
+    SHA1 "9dd07d0cae492bbbdf5d3049721b9526f4581b67"
 )


Add "TARGETS" meta data for specifying supported targets

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -42,13 +42,13 @@
 NUM_ALL_TESTS=0
 NUM_SUCCESS_TRANS=0
 NUM_FAIL_TRANS=0
-NUM_SKIPPED_TRANS=0
+NUM_SKIP_TRANS=0
 NUM_SUCCESS_COMPILE=0
 NUM_FAIL_COMPILE=0
-NUM_SKIPPED_COMPILE=0
+NUM_SKIP_COMPILE=0
 NUM_SUCCESS_EXECUTE=0
 NUM_FAIL_EXECUTE=0
-NUM_SKIPPED_EXECUTE=0
+NUM_SKIP_EXECUTE=0
 NUM_WARNING=0
 FAILED_TESTS=""
 SKIPPED_TESTS=""
@@ -76,6 +76,9 @@
 FAIL_TRANSLATE=1
 FAIL_COMPILE=2
 FAIL_EXECUTE=3
+SKIP_TRANSLATE=4
+SKIP_COMPILE=5
+SKIP_EXECUTE=6
 ###############################################################

 function print_error()
@@ -106,9 +109,9 @@

 function print_results_short()
 {
-    echo  -n "[TRANSLATE] $NUM_SUCCESS_TRANS/$NUM_FAIL_TRANS/$NUM_SKIPPED_TRANS/$NUM_ALL_TESTS"
-    echo  -n ", [COMPILE] $NUM_SUCCESS_COMPILE/$NUM_FAIL_COMPILE/$NUM_SKIPPED_COMPILE/$NUM_ALL_TESTS"
-    echo  ", [EXECUTE] $NUM_SUCCESS_EXECUTE/$NUM_FAIL_EXECUTE/$NUM_SKIPPED_EXECUTE/$NUM_ALL_TESTS."
+    echo  -n "[TRANSLATE] $NUM_SUCCESS_TRANS/$NUM_FAIL_TRANS/$NUM_SKIP_TRANS/$NUM_ALL_TESTS"
+    echo  -n ", [COMPILE] $NUM_SUCCESS_COMPILE/$NUM_FAIL_COMPILE/$NUM_SKIP_COMPILE/$NUM_ALL_TESTS"
+    echo  ", [EXECUTE] $NUM_SUCCESS_EXECUTE/$NUM_FAIL_EXECUTE/$NUM_SKIP_EXECUTE/$NUM_ALL_TESTS."
 }

 function email_results()
@@ -129,15 +132,15 @@
 function print_results()
 {
 	local msg=""
-	msg+="[TRANSLATE] $NUM_SUCCESS_TRANS/$NUM_FAIL_TRANS/$NUM_SKIPPED_TRANS/$NUM_ALL_TESTS."
-	msg+="\n[COMPILE]   $NUM_SUCCESS_COMPILE/$NUM_FAIL_COMPILE/$NUM_SKIPPED_COMPILE/$NUM_ALL_TESTS."
-	msg+="\n[EXECUTE]   $NUM_SUCCESS_EXECUTE/$NUM_FAIL_EXECUTE/$NUM_SKIPPED_EXECUTE/$NUM_ALL_TESTS."
+	msg+="[TRANSLATE] $NUM_SUCCESS_TRANS/$NUM_FAIL_TRANS/$NUM_SKIP_TRANS/$NUM_ALL_TESTS."
+	msg+="\n[COMPILE]   $NUM_SUCCESS_COMPILE/$NUM_FAIL_COMPILE/$NUM_SKIP_COMPILE/$NUM_ALL_TESTS."
+	msg+="\n[EXECUTE]   $NUM_SUCCESS_EXECUTE/$NUM_FAIL_EXECUTE/$NUM_SKIP_EXECUTE/$NUM_ALL_TESTS."
 	msg+="\n"
 	if [ "x" != "x$FAILED_TESTS" ]; then
 		msg+="\n!!! $(echo "$FAILED_TESTS" | wc -w) failure(s)!!!"
 		msg+="\nFailed tests: $FAILED_TESTS"
-	elif [ $NUM_SKIPPED_TRANS -gt 0 -o $NUM_SKIPPED_COMPILE -gt 0 \
-							  -o $NUM_SKIPPED_EXECUTE -gt 0 ]; then
+	elif [ $NUM_SKIP_TRANS -gt 0 -o $NUM_SKIP_COMPILE -gt 0 \
+							  -o $NUM_SKIP_EXECUTE -gt 0 ]; then
 		msg+="\nCompleted successfully with some tests skipped."
 		msg+="\nSkipped tests: $SKIPPED_TESTS"
 	else
@@ -201,6 +204,18 @@
 		fi
     done
 	echo $ap
+}
+
+function find_in_array()
+{
+	local haystack=${1}[@]
+	local needle=${2}
+	for i in ${!haystack}; do
+		if [ ${i} = ${needle} ]; then
+			return 0
+		fi
+	done
+	return 1
 }

 function generate_empty_translation_configuration()
@@ -943,6 +958,18 @@
 	echo $DESC
 }

+function get_targets()
+{
+	local test=$1
+	TARGETS=$(grep -o '\WTARGETS: .*$' $test | sed 's/\WTARGETS: \(.*\)$/\1/')
+	if [ "$TARGETS" ]; then
+		echo $TARGETS
+	else
+		# assume all targets
+		echo $DEFAULT_TARGETS
+	fi
+}
+
 function list_tests()
 {
 	echo "Available test cases"
@@ -1056,6 +1083,7 @@
 	local STAGE=$5
 	local cfg=$6
 	local DESC=$(get_desc $TEST)
+	local SUPPORTED_TARGETS=($(get_targets $TEST))

 	local test_wd=$WD/$TARGET/$SHORTNAME/$(basename $cfg)
 	mkdir -p $test_wd
@@ -1070,6 +1098,15 @@
 		fi
 		cat $cfg
 		echo "Dimension: $DIM"
+		echo "Supported targets:" ${SUPPORTED_TARGETS[@]}
+
+		if ! find_in_array SUPPORTED_TARGETS $TARGET; then
+			# skip
+			echo "Target $TARGET not supported for this test"
+			do_test_finish $SKIP_TRANSLATE
+			popd > /dev/null
+			return $SKIP_TRANSLATE
+		fi

 		echo "[TRANSLATE] Processing $SHORTNAME for $TARGET target"
 		#echo $PHYSISC --$TARGET -I@CMAKE_SOURCE_DIR@/include \
@@ -1148,17 +1185,29 @@
 			;;
 		$FAIL_TRANSLATE)
 			inc NUM_FAIL_TRANS
+			FAILED_TESTS="$FAILED_TESTS $test_sig"
 			;;
 		$FAIL_COMPILE)
 			inc NUM_FAIL_COMPILE
+			FAILED_TESTS="$FAILED_TESTS $test_sig"
 			;;
 		$FAIL_EXECUTE)
 			inc NUM_FAIL_EXECUTE
+			FAILED_TESTS="$FAILED_TESTS $test_sig"
+			;;
+		$SKIP_TRANSLATE)
+			inc NUM_SKIP_TRANS
+			SKIPPED_TESTS="$SKIPPED_TESTS $test_sig"
+			;;
+		$SKIP_COMPILE)
+			inc NUM_SKIP_COMPILE
+			SKIPPED_TESTS="$SKIPPED_TESTS $test_sig"
+			;;
+		$SKIP_EXECUTE)
+			inc NUM_SKIP_EXECUTE
+			SKIPPED_TESTS="$SKIPPED_TESTS $test_sig"
 			;;
 	esac
-	if [ "$code" != $RETURN_SUCCESS ]; then
-		FAILED_TESTS="$FAILED_TESTS $test_sig"
-	fi
 }

 function fetch_results()
@@ -1371,16 +1420,9 @@
 			SHORTNAME=$(basename $TEST)
 			if is_skipped_module_test $TEST $TARGET; then
 				echo "Skipping $SHORTNAME for $TARGET target"
-				inc NUM_SKIPPED_TRANS
+				inc NUM_SKIP_TRANS
 				SKIPPED_TESTS="$SKIPPED_TESTS $SHORTNAME"
 				continue;
-			fi
-			echo $SHORTNAME
-			if [ $TARGET = mpi -a $SHORTNAME = test_cplusplus.cc ] ; then
-				echo "Translation of C++ not supported in MPI"
-				inc NUM_SKIPPED_TRANS
-				SKIPPED_TESTS="$SKIPPED_TESTS $SHORTNAME"
-				continue
 			fi
 			DIM=$(grep -o '\WDIM: .*$' $TEST | sed 's/\WDIM: \(.*\)$/\1/')
 			if [ "$CONFIG_ARG" != "" ]; then


Remove invalid eigen reference

Remove invalid eigen reference

This is a left over from cleanup 0acf6db64f0d6a79998879517519df628e388023

Signed-off-by: Nicolae Rosia <207aa917b021b404c269e8647897b2cc6117052a@gmail.com>

--- cmake/posix/px4_impl_posix.cmake
+++ cmake/posix/px4_impl_posix.cmake
@@ -171,7 +171,6 @@
         set(PX4_BASE )
         set(added_include_dirs
 		src/modules/systemlib
-                src/lib/eigen
                 src/platforms/posix/include
                 mavlink/include/mavlink
                 )


Update bgfx

Update bgfx


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -27,7 +27,7 @@
 hunter_config(vmime VERSION 0.9.3.0)
 hunter_config(gloox VERSION 1.0.20-p5)
 hunter_config(wdc VERSION 1.0.1-hunter-p1)
-hunter_config(pugixml VERSION 1.8.1)
+hunter_config(pugixml VERSION 1.8.1.1)
 hunter_config(puffin-stream VERSION 0.2.2.0)
 hunter_config(puffin-buffer VERSION 0.3.2.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -27,7 +27,7 @@
 hunter_config(vmime VERSION 0.9.3.0)
 hunter_config(gloox VERSION 1.0.20-p5)
 hunter_config(wdc VERSION 1.0.1-hunter-p1)
-hunter_config(pugixml VERSION 1.8.1.1)
+hunter_config(pugixml VERSION 1.8.1.2)
 hunter_config(puffin-stream VERSION 0.2.2.0)
 hunter_config(puffin-buffer VERSION 0.3.2.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)


Update default.cmake

Update default.cmake

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

 # NOTE: no names with spaces!

-hunter_config(puffin-buffer VERSION 0.2.0.0)
+hunter_config(puffin-buffer VERSION 0.2.0.1)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


name benchmark exe with _bench.out ext

name benchmark exe with _bench.out ext

--- toolchains/darwin.benchmark.cmake
+++ toolchains/darwin.benchmark.cmake
@@ -22,7 +22,7 @@
     string(REPLACE ".cpp" "" bench ${_src_file_path})
     string(REGEX MATCH "([^/]*)$" bench_name ${bench})

-    set(EXECUTABLE_NAME "${bench_name}.out")
+    set(EXECUTABLE_NAME "${bench_name}_bench.out")

     add_executable(${EXECUTABLE_NAME} ${_src_file_path} ${OSX_PLATFORM_SRC})


Remove usage of deprecated FORCE_*_COMPILER setting

--- toolchain/iOS.cmake
+++ toolchain/iOS.cmake
@@ -46,9 +46,8 @@
 endif (CMAKE_UNAME)

 # Force the compilers to gcc for iOS
-include (CMakeForceCompiler)
-CMAKE_FORCE_C_COMPILER (/usr/bin/gcc Apple)
-CMAKE_FORCE_CXX_COMPILER (/usr/bin/g++ Apple)
+set (CMAKE_C_COMPILER /usr/bin/gcc)
+set (CMAKE_CXX_COMPILER /usr/bin/g++)
 set(CMAKE_AR ar CACHE FILEPATH "" FORCE)

 # Skip the platform compiler checks for cross compiling


Change some comparisons to modern cmake syntax

I think?

--- toolchain/iOS.cmake
+++ toolchain/iOS.cmake
@@ -93,26 +93,20 @@
 set (IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING "Type of iOS Platform")

 # Check the platform selection and setup for developer root
-if (${IOS_PLATFORM} STREQUAL "OS")
+if (IOS_PLATFORM STREQUAL "OS")
 	set (IOS_PLATFORM_LOCATION "iPhoneOS.platform")

 	# This causes the installers to properly locate the output libraries
 	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos")
-elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR")
-    set (SIMULATOR true)
+elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
+	set (SIMULATOR true)
 	set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")

 	# This causes the installers to properly locate the output libraries
 	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
-elseif (${IOS_PLATFORM} STREQUAL "SIMULATOR64")
-    set (SIMULATOR true)
-	set (IOS_PLATFORM_LOCATION "iPhoneSimulator.platform")
-
-	# This causes the installers to properly locate the output libraries
-	set (CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphonesimulator")
-else (${IOS_PLATFORM} STREQUAL "OS")
+else (IOS_PLATFORM STREQUAL "OS")
 	message (FATAL_ERROR "Unsupported IOS_PLATFORM value selected. Please choose OS or SIMULATOR")
-endif (${IOS_PLATFORM} STREQUAL "OS")
+endif ()

 # Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT
 # Note Xcode 4.3 changed the installation location, choose the most recent one available


Tune GCC/Clang to produce generic binary when -march is not specified.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -606,6 +606,10 @@
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARM_CFLAGS}")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARM_CFLAGS}")
         else ()
+            if (NOT XCODE AND NOT WEB)
+                set (CMAKE_C_FLAGS "-mtune=generic ${CMAKE_C_FLAGS}")
+                set (CMAKE_CXX_FLAGS "-mtune=generic ${CMAKE_CXX_FLAGS}")
+            endif ()
             if (URHO3D_SSE AND NOT XCODE AND NOT WEB)
                 # This may influence the effective SSE level when URHO3D_SSE is on as well
                 set (URHO3D_DEPLOYMENT_TARGET native CACHE STRING "Specify the minimum CPU type on which the target binaries are to be deployed (non-ARM platform only), see GCC/Clang's -march option for possible values; Use 'generic' for targeting a wide range of generic processors")


Exclude Bullet's Clang workaround on all Apple platforms.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -730,7 +730,7 @@
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fcolor-diagnostics")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fcolor-diagnostics")
         endif ()
-        if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0.1 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 7.0.1)
+        if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.1 AND NOT APPLE)
             # Workaround for Clang 7.0.1 and above until the Bullet upstream has fixed the Clang 7 diagnostic checks issue (see https://github.com/bulletphysics/bullet3/issues/2114)
             set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-argument-outside-range")
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-argument-outside-range")


MITK 2013.12.00 version update

MITK 2013.12.00 version update

--- CMake/mitkSetupVariables.cmake
+++ CMake/mitkSetupVariables.cmake
@@ -6,8 +6,8 @@

 # MITK_VERSION
 set(MITK_VERSION_MAJOR "2013")
-set(MITK_VERSION_MINOR "09")
-set(MITK_VERSION_PATCH "99")
+set(MITK_VERSION_MINOR "12")
+set(MITK_VERSION_PATCH "00")
 set(MITK_VERSION_STRING "${MITK_VERSION_MAJOR}.${MITK_VERSION_MINOR}.${MITK_VERSION_PATCH}")
 if(MITK_VERSION_PATCH STREQUAL "99")
   set(MITK_VERSION_STRING "${MITK_VERSION_STRING}-${MITK_REVISION_SHORTID}")


build CHANGE find libyang module c++ bindings

--- CMakeModules/FindLibYANG.cmake
+++ CMakeModules/FindLibYANG.cmake
@@ -5,6 +5,10 @@
 #  LIBYANG_INCLUDE_DIRS - the LibYANG include directory
 #  LIBYANG_LIBRARIES - Link these to use LibYANG
 #  LIBYANG_VERSION - SO version of the found libyang library
+#
+#  LIBYANG_CPP_FOUND - system has LibYANG C++ bindings
+#  LIBYANG_CPP_INCLUDE_DIRS - the LibYANG C++ include directory
+#  LIBYANG_CPP_LIBRARIES - Link these to use LibYANG C++ bindings
 #
 #  Author Radek Krejci <rkrejci@cesnet.cz>
 #  Copyright (c) 2015 CESNET, z.s.p.o.
@@ -76,9 +80,54 @@
     set(LIBYANG_LIBRARIES ${LIBYANG_LIBRARY})
     mark_as_advanced(LIBYANG_INCLUDE_DIRS LIBYANG_LIBRARIES)

-    # handle the QUIETLY, REQUIRED and VERSION arguments and set LIBYANG_FOUND to TRUE
+    # handle the QUIETLY and REQUIRED arguments and set SYSREPO_FOUND to TRUE
     # if all listed variables are TRUE
     find_package_handle_standard_args(LibYANG FOUND_VAR LIBYANG_FOUND
         REQUIRED_VARS LIBYANG_LIBRARY LIBYANG_INCLUDE_DIR
         VERSION_VAR LIBYANG_VERSION)
 endif()
+
+#C++ bindings
+if (LIBYANG_CPP_LIBRARIES AND LIBYANG_CPP_INCLUDE_DIRS)
+    # in cache already
+    set(LIBYANG_CPP_FOUND TRUE)
+else ()
+    find_path(LIBYANG_CPP_INCLUDE_DIR
+        NAMES
+        libyang/Libyang.hpp
+        PATHS
+        /usr/include
+        /usr/local/include
+        /opt/local/include
+        /sw/include
+        ${CMAKE_INCLUDE_PATH}
+        ${CMAKE_INSTALL_PREFIX}/include
+    )
+
+    find_library(LIBYANG_CPP_LIBRARY
+        NAMES
+        yang-cpp
+        libyang-cpp
+        PATHS
+        /usr/lib
+        /usr/lib64
+        /usr/local/lib
+        /usr/local/lib64
+        /opt/local/lib
+        /sw/lib
+        ${CMAKE_LIBRARY_PATH}
+        ${CMAKE_INSTALL_PREFIX}/lib
+    )
+
+    if (LIBYANG_CPP_INCLUDE_DIR AND LIBYANG_CPP_LIBRARY)
+        set(LIBYANG_CPP_FOUND TRUE)
+    else ()
+        set(LIBYANG_CPP_FOUND FALSE)
+    endif ()
+
+    set(LIBYANG_CPP_INCLUDE_DIRS ${LIBYANG_CPP_INCLUDE_DIR})
+    set(LIBYANG_CPP_LIBRARIES ${LIBYANG_CPP_LIBRARY})
+
+    # show the LIBYANG_CPP_INCLUDE_DIRS and LIBYANG_CPP_LIBRARIES variables only in the advanced view
+    mark_as_advanced(LIBYANG_CPP_INCLUDE_DIRS LIBYANG_CPP_LIBRARIES)
+endif()


COMP: Update IsotropicWavelets, remove FrequencyIterators

Remove the classes merged into the internal module ITKImageFrequency

Change-Id: I5ec78adb2db011f3840d79d897d095e537bd2541

--- Modules/Remote/IsotropicWavelets.remote.cmake
+++ Modules/Remote/IsotropicWavelets.remote.cmake
@@ -9,5 +9,5 @@
 "
   # Upstream repository was transfered from phcerdan to InsightSoftwareConsortium
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets.git
-  GIT_TAG 4baebf4123287f54bae4ddfbaa45827a852bf3e8
+  GIT_TAG 7757890c444358b94312c1a087e51bfb414f80b5
 )


Fix and cleanup ceghi_add_sample macro.

Fix and cleanup ceghi_add_sample macro.

Now does the right thing on OS X, should still work everywhere else too.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -333,53 +333,28 @@
 endmacro()

 #
-# Define a CEGUI sample app
+# Define a CEGUI sample module
 #
 macro (cegui_add_sample _NAME)
-    add_dependencies(${CEGUI_TARGET_NAME} ${CEGUI_SAMPLEFRAMEWORK_EXENAME}
-                            ${CEGUI_TARGET_NAME} ${_NAME}${CEGUI_SLOT_VERSION}
-    )
-
-    set (CEGUI_TARGET_NAME ${_NAME}${CEGUI_SLOT_VERSION})
-
-    include_directories(${CMAKE_SOURCE_DIR}/samples/common/include)
-
+    set (CEGUI_TARGET_NAME ${_NAME})
+
     cegui_gather_files()
-
+
 	set(CORE_HEADER_FILES ${CORE_HEADER_FILES}
 		${CMAKE_SOURCE_DIR}/samples/common/include/Sample.h
 		${CMAKE_SOURCE_DIR}/samples/common/include/SampleBase.h
 	)

     # Each demo will become a dynamically linked library as plugin (module)
-	add_library(${CEGUI_TARGET_NAME} MODULE ${CORE_SOURCE_FILES} ${CORE_HEADER_FILES})
-
-    if (NOT APPLE)
-        set_target_properties(${CEGUI_TARGET_NAME} PROPERTIES
-            INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CEGUI_LIB_INSTALL_DIR}"
-        )
-    endif()
-
-    if (APPLE)
-        # we add these to ensure the dynamically loaded modules we will be
-        # using are built before the .app's post build step that copies
-        # libs into the app bundle.
-        add_dependencies(${CEGUI_TARGET_NAME} ${CEGUI_CORE_WR_LIBNAME}
-                                              CEGUI${CEGUI_OPTION_DEFAULT_XMLPARSER}
-                                              CEGUI${CEGUI_OPTION_DEFAULT_IMAGECODEC}
-        )
-
-        cegui_apple_app_setup(${CEGUI_TARGET_NAME} FALSE)
-    endif()
+    cegui_add_library_impl(${CEGUI_TARGET_NAME} TRUE CORE_SOURCE_FILES CORE_HEADER_FILES TRUE FALSE)
+
+    add_dependencies(${CEGUI_SAMPLEFRAMEWORK_EXENAME} ${CEGUI_TARGET_NAME})
+
+    include_directories(${CMAKE_SOURCE_DIR}/samples/common/include)

     #Library link setup
     cegui_target_link_libraries(${CEGUI_TARGET_NAME}
         ${CEGUI_BASE_LIBNAME}
-    )
-
-    # Installation
-    install(TARGETS ${CEGUI_TARGET_NAME}
-    LIBRARY DESTINATION bin
     )

     # Add the MetaData chunk of the sample to the final xml


SWDEV-273235 - Find UGL headers based on AMD_DRIVERS_PATH

All KMD/asic_reg/UGL headers are located under the drivers folder. No
need for the AMD_UGL_PATH variable as it essentially is
${AMD_DRIVERS_PATH}/ugl.

Change-Id: I070d737d50f2096493b3e75ef9b9e824cb19d048

--- cmake/FindAMD_UGL.cmake
+++ cmake/FindAMD_UGL.cmake
@@ -24,17 +24,18 @@

 find_path(AMD_UGL_INCLUDE_DIR GL/glx.h
   HINTS
-    ${AMD_UGL_PATH}
+    ${AMD_DRIVERS_PATH}
   PATHS
     # p4 repo layout
-    ${CMAKE_SOURCE_DIR}/drivers/ugl/inc
-    ${CMAKE_SOURCE_DIR}/../drivers/ugl/inc
-    ${CMAKE_SOURCE_DIR}/../../drivers/ugl/inc
+    ${CMAKE_SOURCE_DIR}/drivers
+    ${CMAKE_SOURCE_DIR}/../drivers
+    ${CMAKE_SOURCE_DIR}/../../drivers
     # github ent repo layout
-    ${CMAKE_SOURCE_DIR}/drivers/drivers/ugl/inc
-    ${CMAKE_SOURCE_DIR}/../drivers/drivers/ugl/inc
-    ${CMAKE_SOURCE_DIR}/../../drivers/drivers/ugl/inc
-  NO_DEFAULT_PATH)
+    ${CMAKE_SOURCE_DIR}/drivers/drivers
+    ${CMAKE_SOURCE_DIR}/../drivers/drivers
+    ${CMAKE_SOURCE_DIR}/../../drivers/drivers
+  PATH_SUFFIXES
+    ugl/inc)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(AMD_UGL


Fix qtpng linking issue with Qt 5.7.1 on OSX

--- cmake/FindEasyQt5.cmake
+++ cmake/FindEasyQt5.cmake
@@ -113,11 +113,15 @@
                 HINTS ${Qt5_LIBRARY_DIRECTORIES}
                 NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
                 NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
+            find_library(qtpng_LIBRARIES qtpng
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)

             target_link_libraries(EasyQt5 INTERFACE
                 Qt5::QCocoaIntegrationPlugin Qt5::PrintSupport
                 Qt5::Core Qt5::Widgets Qt5::Network
-                ${Qt5PlatformSupport_LIBRARIES} ${qtpcre_LIBRARIES}
+                ${Qt5PlatformSupport_LIBRARIES} ${qtpcre_LIBRARIES} ${qtpng_LIBRARIES}
                 ${COCOA_LIBRARIES} ${CARBON_LIBRARIES} ${SECURITY_LIBRARIES}
                 ${ZLIB_LIBRARIES} ${CUPS_LIBRARIES} ${SC_LIBRARIES} ${OPENGL_LIBRARIES})
         endif()


Fix DEFAULT_NO_BINDINGS logic.

Fix DEFAULT_NO_BINDINGS logic.

svn path=/trunk/; revision=7674

--- cmake/modules/gcw.cmake
+++ cmake/modules/gcw.cmake
@@ -92,23 +92,30 @@
   endif(NOT gcw_HEADERS)
 endif(PLD_gcw)

-if(PLD_gcw)
-  if(DEFAULT_NO_BINDINGS)
-    option(ENABLE_gnome2 "Enable Gnome2 bindings" OFF)
-    option(ENABLE_pygcw "Enable Python Gnome2 bindings" OFF)
-  else(DEFAULT_NO_BINDINGS)
-    option(ENABLE_gnome2 "Enable Gnome2 bindings" ON)
-    option(ENABLE_pygcw "Enable Python Gnome2 bindings" ON)
-  endif(DEFAULT_NO_BINDINGS)
-else(PLD_gcw)
+if(DEFAULT_NO_BINDINGS)
+  option(ENABLE_gnome2 "Enable Gnome2 bindings" OFF)
+  option(ENABLE_pygcw "Enable Python Gnome2 bindings" OFF)
+else(DEFAULT_NO_BINDINGS)
+  option(ENABLE_gnome2 "Enable Gnome2 bindings" ON)
+  option(ENABLE_pygcw "Enable Python Gnome2 bindings" ON)
+endif(DEFAULT_NO_BINDINGS)
+
+if(ENABLE_gnome2 AND NOT PLD_gcw)
   message(STATUS
   "WARNING: PLD_gcw is OFF so "
-  "setting ENABLE_gnome2 and ENABLE_pygcw to OFF."
+  "setting ENABLE_gnome2 to OFF."
   )
   set(ENABLE_gnome2 OFF CACHE BOOL "Enable Gnome2 bindings" FORCE)
+endif(ENABLE_gnome2 AND NOT PLD_gcw)
+
+if(ENABLE_pygcw AND NOT PLD_gcw)
+  message(STATUS
+  "WARNING: PLD_gcw is OFF so "
+  "setting ENABLE_pygcw to OFF."
+  )
   set(ENABLE_pygcw OFF CACHE BOOL "Enable Python Gnome2 bindings" FORCE)
-endif(PLD_gcw)
-
+endif(ENABLE_pygcw AND NOT PLD_gcw)
+
 if(ENABLE_gnome2)
   set(gcw_true "")
   set(gcw_false "#")


Fix issue 429

Fix issue 429

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -530,7 +530,7 @@
             set(${SUBSYS_DEPENDS} ${DEPENDENCIES})
             foreach(dependee ${DEPENDENCIES})
                 string(TOUPPER "PCL_${dependee}_DEPENDIES" SUBSYS_DEPENDIES)
-                set(${SUBSYS_DEPENDIES} ${${SUBSYS_DEPENDIES}} ${subdir})
+                set(${SUBSYS_DEPENDIES} ${${SUBSYS_DEPENDIES}} ${name})
             endforeach(dependee)
         endif(NOT("${DEPENDENCIES}" STREQUAL ""))
     endforeach(subdir)


enabling static C++ runtime linking per default

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -41,7 +41,7 @@
 SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG")

 # optionally use static runtime library
-OPTION(USE_STATIC_RUNTIME "Use the static version of the C/C++ runtime library." OFF)
+OPTION(USE_STATIC_RUNTIME "Use the static version of the C/C++ runtime library." ON)
 IF (USE_STATIC_RUNTIME)
   STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
   STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})


build

build

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -20,7 +20,6 @@

   # Includes
   include_directories("zlib")
-  include_directories("../build/modules/zlib")

   # Add module subdirectory
   add_subdirectory("zlib")


Fix python search path for Windows

Fix python search path for Windows

--- CMake/mitkFunctionInstallPython.cmake
+++ CMake/mitkFunctionInstallPython.cmake
@@ -31,12 +31,12 @@
       set(_py_include_postfix python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/) # add the slash here so windows and unix will work with same code
       set(_python_runtime_dir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/)
     else() #WIN32
-      list(APPEND _python_dirs "${Python_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/Lib")
+      list(APPEND _python_dirs "${Python_DIR}/Lib")
       #list(APPEND _python_dirs "${Python_DIR}/bin")
       set(PYTHON_LIB_SUFFIX .pyd)
       set(_py_include_postfix )
       set(_python_runtime_dir )
-      set(_search_path "${Python_DIR}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/bin")
+      set(_search_path "${Python_DIR}/bin")
     endif()

     file(GLOB_RECURSE item RELATIVE "${_python_dirs}/${_python_runtime_dir}" "${_python_dirs}/${_python_runtime_dir}*")


QtDesigner library type is set to MODULE

* QtDesigner plugin should always be build as shared library.module

* Setting the type as MODULE will enforce the fact no other library could
link against the plugin.

--- CMake/ctkMacroBuildQtDesignerPlugin.cmake
+++ CMake/ctkMacroBuildQtDesignerPlugin.cmake
@@ -26,7 +26,7 @@
 #! \ingroup CMakeAPI
 MACRO(ctkMacroBuildQtDesignerPlugin)
   CtkMacroParseArguments(MY
-    "NAME;EXPORT_DIRECTIVE;SRCS;MOC_SRCS;UI_FORMS;INCLUDE_DIRECTORIES;TARGET_LIBRARIES;RESOURCES;LIBRARY_TYPE"
+    "NAME;EXPORT_DIRECTIVE;SRCS;MOC_SRCS;UI_FORMS;INCLUDE_DIRECTORIES;TARGET_LIBRARIES;RESOURCES"
     ""
     ${ARGN}
     )
@@ -38,9 +38,7 @@
   IF(NOT DEFINED MY_EXPORT_DIRECTIVE)
     MESSAGE(FATAL_ERROR "EXPORT_DIRECTIVE is mandatory")
   ENDIF()
-  IF(NOT DEFINED MY_LIBRARY_TYPE)
-    SET(MY_LIBRARY_TYPE "SHARED")
-  ENDIF()
+  SET(MY_LIBRARY_TYPE "MODULE")

   # Define library name
   SET(lib_name ${MY_NAME})


Restricted use of static BOOST libs to Windows

--- cmake/BALLConfigBoost.cmake
+++ cmake/BALLConfigBoost.cmake
@@ -1,5 +1,7 @@
 SET(BALL_BOOST_COMPONENTS system thread iostreams)
-SET(Boost_USE_STATIC_LIBS ON)
+if ( WIN32 )
+	SET(Boost_USE_STATIC_LIBS ON)
+endif()
 SET(Boost_ADDITIONAL_VERSIONS "1.39" "1.39.0" "1.40" "1.40.0" "1.41" "1.41.0"
 	"1.42" "1.42.0" "1.43" "1.43.0")
 SET(Boost_DETAILED_FAILURE_MSG ON)


[CMake] LLVM_COMPILE_FLAGS also applies to C files

LLVM_COMPILE_FLAGS also applies to C files, otherwise tuning flags,
etc. won't be picked up.

https://reviews.llvm.org/D67171

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -58,7 +58,7 @@
   if(update_src_props)
     foreach(fn ${sources})
       get_filename_component(suf ${fn} EXT)
-      if("${suf}" STREQUAL ".cpp")
+      if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c")
         set_property(SOURCE ${fn} APPEND_STRING PROPERTY
           COMPILE_FLAGS "${target_compile_flags}")
       endif()


Reverting r225319; since there is a folder named Examples, attempting to add a target of the same name causes problems for IDEs like Visual Studio.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -513,12 +513,6 @@
     install(TARGETS ${name} RUNTIME DESTINATION examples)
   endif()
   set_target_properties(${name} PROPERTIES FOLDER "Examples")
-
-  if(NOT TARGET examples)
-    add_custom_target(examples DEPENDS ${name})
-  else()
-    add_dependencies(examples ${name})
-  endif()
 endmacro(add_llvm_example name)


[CMake] Fix linker detection in AddLLVM.cmake

Fix linker not being correctly detected when a custom one is specified
through LLVM_USE_LINKER CMake variable.

In particular,

  cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_LINKER=gold ../llvm

resulted into

  Linker detection: GNU ld

instead of

  Linker detection: GNU Gold

due to the construction not accounting for such variable. It led to the general
confusion and prevented setting linker-specific flags inside functions defined
in AddLLVM.cmake.

Thanks Oleksii Vilchanskyi for the patch!

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -149,8 +149,13 @@

 if(NOT WIN32 AND NOT APPLE)
   # Detect what linker we have here
+  if( LLVM_USE_LINKER )
+    set(command ${CMAKE_C_COMPILER} -fuse-ld=${LLVM_USE_LINKER} -Wl,--version)
+  else()
+    set(command ${CMAKE_C_COMPILER} -Wl,--version)
+  endif()
   execute_process(
-    COMMAND ${CMAKE_C_COMPILER} -Wl,--version
+    COMMAND ${command}
     OUTPUT_VARIABLE stdout
     ERROR_VARIABLE stderr
     )


Only attempt to quiet clang warnings on apple's special clang version

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -29,7 +29,7 @@
         set(_common_options "-march=${GCC_ARCH} -Wall -Wno-unknown-pragmas")
         set(_common_cxx_options "-march=${GCC_ARCH} -Wall -Wno-unknown-pragmas")

-        if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+        if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND APPLE)
             set(_common_cxx_options "${_common_cxx_options} -Wno-c++14-extensions")
         endif()


Use a minimal set of OpenCASCADE libraries.

This eases the configuration avoiding to look for unused or nonexistent
libraries.

--- CMakeModules/FindOpenCascade.cmake
+++ CMakeModules/FindOpenCascade.cmake
@@ -63,8 +63,6 @@
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBRep TKBRep)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCAF TKCAF)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCDF TKCDF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKDCAF TKDCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKDraw TKDraw)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKernel TKernel)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFeat TKFeat)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFillet TKFillet)
@@ -81,26 +79,17 @@
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOffset TKOffset)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOpenGl TKOpenGl)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPrim TKPrim)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKQADraw TKQADraw)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKService TKService)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKShHealing TKShHealing)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKStdL TKStdL)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKStd TKStd)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP209 TKSTEP209)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPAttr TKSTEPAttr)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPBase TKSTEPBase)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP TKSTEP)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTL TKSTL)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTObjDRAW TKTObjDRAW)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTObj TKTObj)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTopAlgo TKTopAlgo)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTopTest TKTopTest)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKV3d TKV3d)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKVCAF TKVCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKViewerTest TKViewerTest)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKVRML TKVRML)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXCAF TKXCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDEDRAW TKXDEDRAW)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDEIGES TKXDEIGES)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDESTEP TKXDESTEP)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXMesh TKXMesh)
@@ -109,7 +98,6 @@
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlTObj TKXmlTObj)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXmlXCAF TKXmlXCAF)
 FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSBase TKXSBase)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSDRAW TKXSDRAW)

 set (OPENCASCADE_LIBRARY_TYPE_DESCR
 "Specifies the type of library to be used. 'Shared' libraries
@@ -149,7 +137,6 @@
     ${OPENCASCADE_TKBRep}
     ${OPENCASCADE_TKCAF}
     ${OPENCASCADE_TKCDF}
-    ${OPENCASCADE_TKDCAF}
     ${OPENCASCADE_TKernel}
     ${OPENCASCADE_TKG2d}
     ${OPENCASCADE_TKG3d}
@@ -169,7 +156,6 @@
     ${OPENCASCADE_TKSTEPBase}
     ${OPENCASCADE_TKTopAlgo}
     ${OPENCASCADE_TKV3d}
-    ${OPENCASCADE_TKVCAF}
     ${OPENCASCADE_TKXCAF}
     ${OPENCASCADE_TKXDEIGES}
     ${OPENCASCADE_TKXDESTEP}


ENH: update to new domain name: vtk.org, paraview.org, itk.org

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -11,7 +11,7 @@
        "http://${DROP_SITE}/cgi-bin/Submit-vtk-TestingResults.pl")

 # Project Home Page
-SET (PROJECT_URL "http://www.visualizationtoolkit.org/")
+SET (PROJECT_URL "http://www.vtk.org/")

 # Dart server configuration
 SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/vtk-rollup-dashboard.sh")


Change debug project name

Change debug project name

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@26628 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/setup_deal_ii.cmake
+++ deal.II/cmake/setup_deal_ii.cmake
@@ -49,9 +49,12 @@
   "${CMAKE_INSTALL_PREFIX}/${DEAL_II_INCLUDE_RELDIR}"
   )

+#
+# Set the library and project name depending on build type:
+#
 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
   SET(DEAL_II_BASE_NAME "deal_II.g")
-  SET(DEAL_II_PROJECT_NAME "deal.II.g")
+  SET(DEAL_II_PROJECT_NAME "deal.II_DEBUG")
 ELSE()
   SET(DEAL_II_BASE_NAME "deal_II")
   SET(DEAL_II_PROJECT_NAME "deal.II")


Update superbuild version of muparserX to 4.0.8

--- SuperBuild/CMake/External_muparserx.cmake
+++ SuperBuild/CMake/External_muparserx.cmake
@@ -31,8 +31,8 @@

 ExternalProject_Add(MUPARSERX
   PREFIX MUPARSERX
-  URL "https://github.com/beltoforion/muparserx/archive/v4.0.7.zip"
-  URL_MD5 67819fc478436ea8f647c804e6f2e1a2
+  URL "https://github.com/beltoforion/muparserx/archive/v4.0.8.zip"
+  URL_MD5 b4cbf819a7a8a3d74fd1dcc1890a3670
   BINARY_DIR ${MUPARSERX_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Use v0.9.0-rc2 branch of SIRF

Use v0.9.0-rc2 branch of SIRF

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -62,6 +62,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY ${${proj}_URL}
+    GIT_TAG v0.9.0-rc2
     SOURCE_DIR ${SOURCE_DOWNLOAD_CACHE}/${proj}

     CMAKE_ARGS


Fixed build error

Fixed build error

This build error was introduced by recent changes on master branch:

LINK : fatal error LNK1181: cannot open input file 'vtkCommonExecutionModelPythonD.lib' [D:\D\N\S-1-E-b\SlicerVMTK-build\VMTK-build\vtkVmtk\Common\vtkvmtkCommonPythonD.vcxproj] [D:\D\N\S-1-E-b\SlicerVMTK-build\VMTK.vcxproj]

Fixed by reverting to the commit before this breaking change.

More info:
https://discourse.slicer.org/t/vmtk-vessel-filtering-not-working/1263/16

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -24,7 +24,7 @@
   ExternalProject_Add(${proj}
     ${${proj}_EP_ARGS}
     GIT_REPOSITORY "${git_protocol}://github.com/vmtk/vmtk.git"
-    GIT_TAG "master"
+    GIT_TAG "2cecfb427a45bbb5240de687929954c60ebab06f" # "more debugging test for mac os 10.13" (58c8829) commit broke Python wrapping, so we need to use the one before
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${proj}-build
     CMAKE_CACHE_ARGS


Update hunter gate

Update hunter gate

--- HunterGate.cmake
+++ HunterGate.cmake
@@ -14,8 +14,8 @@

 cmake_minimum_required(VERSION 2.8.10)

-set(HUNTER_MINIMUM_VERSION "0.3.4")
-set(HUNTER_MINIMUM_VERSION_HASH 6d3d74ee229b2c3c738a6ddb25677a611ba0beda)
+set(HUNTER_MINIMUM_VERSION "0.3.5")
+set(HUNTER_MINIMUM_VERSION_HASH 8048d54d542cb1f0892bba1d62ed2807e98a40f9)

 # Set HUNTER_ROOT cmake variable to suitable value.
 # Info about variable can be found in HUNTER_ROOT_INFO.


Update Mosaic remote module version

Update Mosaic remote module version

--- Modules/Remote/Mosaic.remote.cmake
+++ Modules/Remote/Mosaic.remote.cmake
@@ -5,5 +5,5 @@
 https://github.com/remicres/otb-mosaic
 "
   GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
-  GIT_TAG f4845baae5f8c5b5ae15387875dd5fa79e81fc96
+  GIT_TAG 516dfa7e7b91aa0263e495ee6b3878a03ced9173
 )


ENH: Update EXPAT to version 2.4.1

ENH: Update EXPAT to version 2.4.1

--- SuperBuild/CMake/External_expat.cmake
+++ SuperBuild/CMake/External_expat.cmake
@@ -24,8 +24,8 @@

 ExternalProject_Add(EXPAT
   PREFIX EXPAT
-  URL "http://downloads.sourceforge.net/project/expat/expat/2.3.0/expat-2.3.0.tar.gz"
-  URL_MD5 fb89c9a3dcc1e00e0fe0d0200af692dc
+  URL "http://downloads.sourceforge.net/project/expat/expat/2.4.1/expat-2.4.1.tar.gz"
+  URL_MD5 8738ef9ed1c5dcc03207286ea84f4299
   BINARY_DIR ${EXPAT_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}
   DOWNLOAD_DIR ${DOWNLOAD_LOCATION}


Remove the unknown CMAKE_SYSTEM_PROCESSOR warning when configuring
ABSL_RANDOM_RANDEN_COPTS

Everything works fine when this is empty

Fixes #1301

PiperOrigin-RevId: 484014466
Change-Id: I2fa96d845320f23063e1e86ee2df3ac14bd44012

--- absl/copts/AbseilConfigureCopts.cmake
+++ absl/copts/AbseilConfigureCopts.cmake
@@ -67,7 +67,6 @@
     message(WARNING "Value of CMAKE_SIZEOF_VOID_P (${CMAKE_SIZEOF_VOID_P}) is not supported.")
   endif()
 else()
-  message(WARNING "Value of CMAKE_SYSTEM_PROCESSOR (${CMAKE_SYSTEM_PROCESSOR}) is unknown and cannot be used to set ABSL_RANDOM_RANDEN_COPTS")
   set(ABSL_RANDOM_RANDEN_COPTS "")
 endif()


ENH: update remote module MorphologicalContourInterpolation

$ git shortlog --no-merges e132944a..210b1a9
Dženan Zukić (2):
      ENH: switching to ITKv5 threading model
      STYLE: method-local variables do not follow member-name pattern

Change-Id: Id176d70f88b62fd3b786e350125081d197d32e46

--- Modules/Remote/MorphologicalContourInterpolation.remote.cmake
+++ Modules/Remote/MorphologicalContourInterpolation.remote.cmake
@@ -14,5 +14,5 @@
 This work is supported by NIH grant R01 EB014346
 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'."
   GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git
-  GIT_TAG e132944a3fad51465919464b57ed54e8194fe5ae
+  GIT_TAG 210b1a92a3a2ff4611c769e8a657eeae448428a6
   )


Remove unneeded slash in symlink name.

Remove unneeded slash in symlink name.

--- functions.cmake
+++ functions.cmake
@@ -558,7 +558,7 @@
 endfunction()

 function(install_absolute_symlink TARGET LINK)
-    install(CODE "execute_process(COMMAND ln -snf ${TARGET} \$ENV{DESTDIR}/${CMAKE_INSTALL_PREFIX}/${LINK})")
+    install(CODE "execute_process(COMMAND ln -snf ${TARGET} \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${LINK})")
 endfunction(install_absolute_symlink)

 function(install_symlink TARGET LINK)


rust: find cargo with find_program to give a better error message when cargo isn't available

Summary:
If you build Watchman from source on a machine without cargo, the
error message was confusing. You'd see "command not found" somewhere
mixed into ninja's output.

Change RustStaticLibrary, which is only used by Watchman and EdenFS,
to find cargo with find_program instead of guessing its name and
assuming it exists. This gives a much less confusing error message at
CMake configure time.

Reviewed By: genevievehelsel

Differential Revision: D40441374

fbshipit-source-id: eeafe615616775c660c700e14cf1f6b2fd9715a8

--- build/fbcode_builder/CMake/RustStaticLibrary.cmake
+++ build/fbcode_builder/CMake/RustStaticLibrary.cmake
@@ -57,6 +57,8 @@
     "directory = \"${ESCAPED_RUST_VENDORED_CRATES_DIR}\"\n"
   )
 endif()
+
+find_program(CARGO_COMMAND cargo REQUIRED)

 # Cargo is a build system in itself, and thus will try to take advantage of all
 # the cores on the system. Unfortunately, this conflicts with Ninja, since it
@@ -119,11 +121,6 @@
   set(staticlib_name "${CMAKE_STATIC_LIBRARY_PREFIX}${crate_name}${CMAKE_STATIC_LIBRARY_SUFFIX}")
   set(rust_staticlib "${CMAKE_CURRENT_BINARY_DIR}/${target_dir}/${staticlib_name}")

-  set(cargo_cmd cargo)
-  if(WIN32)
-    set(cargo_cmd cargo.exe)
-  endif()
-
   if(DEFINED ARG_FEATURES)
     set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name} --features ${ARG_FEATURES})
   else()
@@ -142,7 +139,7 @@
       "${CMAKE_COMMAND}" -E env
       "CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}"
       ${extra_cargo_env}
-      ${cargo_cmd}
+      ${CARGO_COMMAND}
       ${cargo_flags}
     COMMENT "Building Rust crate '${crate_name}'..."
     JOB_POOL rust_job_pool
@@ -195,11 +192,6 @@
     set(features )
   endif()

-  set(cargo_cmd cargo)
-  if(WIN32)
-    set(cargo_cmd cargo.exe)
-  endif()
-
   if(DEFINED ARG_FEATURES)
     set(cargo_flags build $<IF:$<CONFIG:Debug>,,--release> -p ${crate_name} --features ${ARG_FEATURES})
   else()
@@ -219,7 +211,7 @@
       "${CMAKE_COMMAND}" -E env
       "CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR}"
       ${extra_cargo_env}
-      ${cargo_cmd}
+      ${CARGO_COMMAND}
       ${cargo_flags}
     COMMENT "Building Rust executable '${crate_name}'..."
     JOB_POOL rust_job_pool


Update TODO.

Update TODO.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -1,6 +1,7 @@
 macro(initialize_tests)
   if(NOT TARGET tests)
-    message("TODO: use rostest-check-results to verify that result files were generated")
+    message("TODO: figure out what to do about rosbuild testing macros that we
+    don't support yet: rosbuild_add_roslaunch_check, rosbuild_declare_test, rosbuild_count_cores, rosbuild_check_for_display, rosbuild_check_for_vm.  Also: labeled tests.")
     add_custom_target(tests)
   endif()
   if(NOT TARGET test)


Teaking FindOpenCascade to help with linking of iges plugin

--- CMakeModules/FindOpenCascade.cmake
+++ CMakeModules/FindOpenCascade.cmake
@@ -1,106 +1,138 @@
-# LocateOPENCASCADE
-# This module defines
-# OPENCASCADE_LIBRARY
-# OPENCASCADE_FOUND, if false, do not try to link to OPENCASCADE
-# OPENCASCADE_INCLUDE_DIR, where to find the headers
-#
-# $OPENCASCADE_DIR is an environment variable that would
-# correspond to the ./configure --prefix=$OPENCASCADE_DIR
-# used in building OPENCASCADE.
-
-FIND_PATH(OPENCASCADE_INCLUDE_DIR BRepMesh.hxx
-  PATHS
-    ${OPENCASCADE_DIR}
-    $ENV{OPENCASCADE_DIR}
-    ~/Library/Frameworks
-    /Library/Frameworks
-    /usr/local
-    /usr
-    /sw # Fink
-    /opt/local # DarwinPorts
-    /opt/csw # Blastwave
-    /opt
-    /usr/freeware
-  PATH_SUFFIXES
-    opencascade
-    inc
-    include
-    inc/cascade
-    include/cascade
-)
-
-MACRO(FIND_OPENCASCADE_LIBRARY MYLIBRARY MYLIBRARYNAME)
-
-    FIND_LIBRARY("${MYLIBRARY}"
-        NAMES "${MYLIBRARYNAME}"
-        PATHS
-        $ENV{OPENCASCADE_DIR}/lib}
-        $ENV{OPENCASCADE_LIB}
-        ${OPENCASCADE_DIR}/lib
-        $ENV{OPENCASCADE_DIR}/lib
-        ${OPENCASCADE_DIR}/lib/
-        ~/Library/Frameworks
-        /Library/Frameworks
-        /usr/local/lib
-        /usr/lib
-        /sw/lib
-        /opt/local/lib
-        /opt/csw/lib
-        /opt/lib
-        /usr/freeware/lib64
-        )
-
-
-ENDMACRO(FIND_OPENCASCADE_LIBRARY LIBRARY LIBRARYNAME)
-
-# Find release (optimized) libs
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKVRML_LIBRARY TKVrml)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTL_LIBRARY TKStl)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBREP_LIBRARY TKBRep)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKIGES_LIBRARY TKIGES)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSHHEALING_LIBRARY TKShHealing)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP_LIBRARY TKSTEP)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP209_LIBRARY TKSTEP209)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPATTR_LIBRARY TKSTEPAttr)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPBASE_LIBRARY TKSTEPBase)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSBASE_LIBRARY TKXSBase)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSHAPESCHEMA_LIBRARY TKShapeSchema)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBO_LIBRARY TKBO)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_FWOSPLUGIN_LIBRARY FWOSPlugin)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_PTKERNEL_LIBRARY PTKernel)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBOOL_LIBRARY TKBool)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCAF_LIBRARY TKCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCDF_LIBRARY TKCDF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKERNEL_LIBRARY TKernel)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFEAT_LIBRARY TKFeat)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFILLET_LIBRARY TKFillet)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG2D_LIBRARY TKG2d)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG3d_LIBRARY TKG3D)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGEOMALGO_LIBRARY TKGeomAlgo)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGEOMBASE_LIBRARY TKGeomBase)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKHLR_LIBRARY TKHLR)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMATH_LIBRARY TKMath)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOFFSET_LIBRARY TKOffset)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPCAF_LIBRARY TKPCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPRIM_LIBRARY TKPrim)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPSHAPE_LIBRARY TKPShape)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSERVICE_LIBRARY TKService)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTOPALGO_LIBRARY TKTopAlgo)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMESH_LIBRARY TKMesh)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKV3D_LIBRARY TKV3d)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXCAF_LIBRARY TKXCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDEIGES_LIBRARY TKXDEIGES)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXLCAF_LIBRARY TKXLCAF)
-FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKLCAF_LIBRARY TKLCAF)
-
-
-SET(OPENCASCADE_LIBRARY ${OPENCASCADE_TKMESH_LIBRARY})
-
-SET(OPENCASCADE_FOUND "NO")
-IF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
-    SET(OPENCASCADE_FOUND "YES")
-ENDIF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
-
-IF(OPENCASCADE_INCLUDE_DIR)
-    SET(OPENCASCADE_FOUND "YES")
-ENDIF(OPENCASCADE_INCLUDE_DIR)
+# LocateOPENCASCADE
+# This module defines
+# OPENCASCADE_LIBRARY
+# OPENCASCADE_FOUND, if false, do not try to link to OPENCASCADE
+# OPENCASCADE_INCLUDE_DIR, where to find the headers
+#
+# $OPENCASCADE_DIR is an environment variable that would
+# correspond to the ./configure --prefix=$OPENCASCADE_DIR
+# used in building OPENCASCADE.
+
+FIND_PATH(OPENCASCADE_INCLUDE_DIR BRepMesh.hxx
+  PATHS
+    ${OPENCASCADE_DIR}
+    $ENV{OPENCASCADE_DIR}
+    ~/Library/Frameworks
+    /Library/Frameworks
+    /usr/local
+    /usr
+    /sw # Fink
+    /opt/local # DarwinPorts
+    /opt/csw # Blastwave
+    /opt
+    /usr/freeware
+  PATH_SUFFIXES
+    opencascade
+    inc
+    include
+    inc/cascade
+    include/cascade
+)
+
+MACRO(FIND_OPENCASCADE_LIBRARY MYLIBRARY MYLIBRARYNAME)
+
+    FIND_LIBRARY("${MYLIBRARY}"
+        NAMES "${MYLIBRARYNAME}"
+        PATHS
+        $ENV{OPENCASCADE_DIR}/lib}
+        $ENV{OPENCASCADE_LIB}
+        ${OPENCASCADE_DIR}/lib
+        $ENV{OPENCASCADE_DIR}/lib
+        ${OPENCASCADE_DIR}/lib/
+        ~/Library/Frameworks
+        /Library/Frameworks
+        /usr/local/lib
+        /usr/lib
+        /sw/lib
+        /opt/local/lib
+        /opt/csw/lib
+        /opt/lib
+        /usr/freeware/lib64
+        )
+
+        MESSAGE("#Foundlibrary " ${${MYLIBRARY}})
+
+ENDMACRO()
+
+
+# Find release (optimized) libs
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKVRML_LIBRARY TKVrml)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTL_LIBRARY TKStl)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBREP_LIBRARY TKBRep)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKIGES_LIBRARY TKIGES)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSHHEALING_LIBRARY TKShHealing)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP_LIBRARY TKSTEP)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEP209_LIBRARY TKSTEP209)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPATTR_LIBRARY TKSTEPAttr)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSTEPBASE_LIBRARY TKSTEPBase)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXSBASE_LIBRARY TKXSBase)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSHAPESCHEMA_LIBRARY TKShapeSchema)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBO_LIBRARY TKBO)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_FWOSPLUGIN_LIBRARY FWOSPlugin)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_PTKERNEL_LIBRARY PTKernel)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKBOOL_LIBRARY TKBool)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCAF_LIBRARY TKCAF)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKCDF_LIBRARY TKCDF)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKERNEL_LIBRARY TKernel)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFEAT_LIBRARY TKFeat)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKFILLET_LIBRARY TKFillet)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG2D_LIBRARY TKG2d)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKG3d_LIBRARY TKG3D)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGEOMALGO_LIBRARY TKGeomAlgo)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKGEOMBASE_LIBRARY TKGeomBase)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKHLR_LIBRARY TKHLR)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMATH_LIBRARY TKMath)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKOFFSET_LIBRARY TKOffset)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPCAF_LIBRARY TKPCAF)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPRIM_LIBRARY TKPrim)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKPSHAPE_LIBRARY TKPShape)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKSERVICE_LIBRARY TKService)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKTOPALGO_LIBRARY TKTopAlgo)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKMESH_LIBRARY TKMesh)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKV3D_LIBRARY TKV3d)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXCAF_LIBRARY TKXCAF)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXDEIGES_LIBRARY TKXDEIGES)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKXLCAF_LIBRARY TKXLCAF)
+FIND_OPENCASCADE_LIBRARY(OPENCASCADE_TKLCAF_LIBRARY TKLCAF)
+
+
+SET(OPENCASCADE_LIBRARY ${OPENCASCADE_LIBRARY}
+#    ${OPENCASCADE_TKBREP_LIBRARY}
+#    ${OPENCASCADE_TKIGES_LIBRARY}
+#    ${OPENCASCADE_TKSHHEALING_LIBRARY}
+#    ${OPENCASCADE_TKSTEP_LIBRARY}
+#    ${OPENCASCADE_TKSTEP209_LIBRARY}
+#    ${OPENCASCADE_TKSTEPATTR_LIBRARY}
+#    ${OPENCASCADE_TKSTEPBASE_LIBRARY}
+#    ${OPENCASCADE_TKXSBASE_LIBRARY}
+#    ${OPENCASCADE_TKBO_LIBRARY}
+#    ${OPENCASCADE_TKBOOL_LIBRARY}
+#    ${OPENCASCADE_TKCAF_LIBRARY}
+#    ${OPENCASCADE_TKCDF_LIBRARY}
+#    ${OPENCASCADE_TKERNEL_LIBRARY}
+#    ${OPENCASCADE_TKFEAT_LIBRARY}
+#    ${OPENCASCADE_TKFILLET_LIBRARY}
+#    ${OPENCASCADE_TKG2D_LIBRARY}
+#    ${OPENCASCADE_TKGEOMALGO_LIBRARY}
+#    ${OPENCASCADE_TKGEOMBASE_LIBRARY}
+#    ${OPENCASCADE_TKHLR_LIBRARY}
+#    ${OPENCASCADE_TKMATH_LIBRARY}
+#    ${OPENCASCADE_TKOFFSET_LIBRARY}
+#    ${OPENCASCADE_TKPRIM_LIBRARY}
+#    ${OPENCASCADE_TKSERVICE_LIBRARY}
+#    ${OPENCASCADE_TKTOPALGO_LIBRARY}
+#    ${OPENCASCADE_TKMESH_LIBRARY}
+#    ${OPENCASCADE_TKV3D_LIBRARY}
+#    ${OPENCASCADE_TKXCAF_LIBRARY}
+    ${OPENCASCADE_TKXDEIGES_LIBRARY}
+#    ${OPENCASCADE_TKLCAF_LIBRARY}
+)
+
+SET(OPENCASCADE_FOUND "NO")
+IF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
+    SET(OPENCASCADE_FOUND "YES")
+ENDIF(OPENCASCADE_LIBRARY AND OPENCASCADE_INCLUDE_DIR)
+
+IF(OPENCASCADE_INCLUDE_DIR)
+    SET(OPENCASCADE_FOUND "YES")
+ENDIF(OPENCASCADE_INCLUDE_DIR)


Make the code formatting check test more robust.

--- cmake/cmake_command_check_code_formatting.in.cmake
+++ cmake/cmake_command_check_code_formatting.in.cmake
@@ -1,8 +1,16 @@
 set(_FAILED_FILES)
 set(_FILES @FILES_TO_FORMAT@)
+
+if(WIN32)
+  # Windows uses CRLF at line endings but files are actually stored with
+  # LF line ending, UNIX style. So we will ignore differences in line
+  # endings on Windows.
+  set(GIT_DIFF_OPTION_FOR_WINDOWS --ignore-space-at-eol)
+endif()
+
 foreach(file ${_FILES})
-  execute_process(COMMAND @CLANG_FORMAT_EXE@ ${file}
-    COMMAND @GIT_EXE@ diff --no-index -- ${file} -
+  execute_process(COMMAND "@CLANG_FORMAT_EXE@" "${file}"
+    COMMAND "@GIT_EXE@" diff --no-index ${GIT_DIFF_OPTION_FOR_WINDOWS} -- "${file}" -
     RESULT_VARIABLE _RESULT
     OUTPUT_VARIABLE _STDOUT
     ERROR_VARIABLE _STDERR


boards: nxp_fmurt1062-v1 remove irlock and lights/blinkm to save flash

--- boards/nxp/fmurt1062-v1/default.cmake
+++ boards/nxp/fmurt1062-v1/default.cmake
@@ -32,8 +32,8 @@
 		imu/invensense/icm20602
 		imu/invensense/icm20689
 		#imu/mpu6000 # legacy icm20602/icm20689 driver
-		irlock
-		lights/blinkm
+		#irlock
+		#lights/blinkm
 		lights/rgbled
 		lights/rgbled_ncp5623c
 		lights/rgbled_pwm


NIFTYREG to build libZ and libpng

NIFTYREG to build libZ and libpng

reinstated use of OpenMP

--- SuperBuild/External_NIFTYREG.cmake
+++ SuperBuild/External_NIFTYREG.cmake
@@ -65,7 +65,8 @@
       -DCMAKE_INSTALL_PREFIX=${${proj}_Install_Dir}
       -DUSE_THROW_EXCEP=ON
       # fixes lib_reg_maths.a `GOMP_parallel' undefined reference linker errors
-      -DUSE_OPENMP:BOOL=OFF
+      -DUSE_OPENMP:BOOL=ON
+      -DBUILD_ALL_DEP:BOOL=ON
     INSTALL_DIR ${${proj}_Install_Dir}
     DEPENDS ${${proj}_DEPENDENCIES})


vtk use system protobuf

vtk use system protobuf

Merge branch 'Vtk_use_system_protobuf' into 'kitware-master'

See merge request bjacquet/VeloView-kwinternal!256

--- Superbuild/Projects/paraview.cmake
+++ Superbuild/Projects/paraview.cmake
@@ -1,3 +1,9 @@
+set(pv_cmake_options "")
+find_package(Protobuf)
+if (Protobuf_FOUND)
+  list(APPEND pv_cmake_options "-DVTK_USE_SYSTEM_PROTOBUF:BOOL=TRUE" )
+  message(MESSAGE "Found a system-wide Protobuf library, tell VTK to use it to avoid runtime version mismatch")
+endif()
 superbuild_add_project(paraview
   DEPENDS qt5 python pythonqt
   DEFAULT_ON
@@ -59,6 +65,7 @@
     -DPARAVIEW_QT_VERSION:STRING=${qt_version}
     -DVTK_RENDERING_BACKEND:STRING=OpenGL2
     -DVTK_LEGACY_SILENT:BOOL=TRUE
+    ${pv_cmake_options}

     -DPARAVIEW_BUILD_PLUGIN_PythonQtPlugin:BOOL=TRUE
     -DPYTHONQT_DIR:PATH=<INSTALL_DIR>


Prefer system libraries in linux native packages. #4865

For our RUNPATH, look for shared libraries in /usr/lib[64] before
/usr/lib[64]/condor. This matches the RUNPATH in the tarball packaging.
And it fixes a problem with the cream_gahp, where we can end up using
two incompatible versions of the Globus pthread library, leading to
failure.

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -410,7 +410,7 @@
 	endif()

 	set( EXTERNALS_LIB "${C_LIB}" )
-	set( CONDOR_RPATH "/${C_LIB}" )
+	set( CONDOR_RPATH "/${C_LIB_PUBLIC}:/${C_LIB}" )
 	set( PYTHON_RPATH "/${C_LIB}" )

 	# Generate empty folder to ship with package


CMake: Workaround: Try to drop "-fuse-ld=gold" in configure_1_mpi.cmake

--- cmake/configure/configure_1_mpi.cmake
+++ cmake/configure/configure_1_mpi.cmake
@@ -40,15 +40,36 @@
       )

     IF(NOT MPI_WORKING_COMPILER)
-      MESSAGE(STATUS "Could not find a sufficient MPI installation: "
-        "Unable to compile a simple test program."
+      #
+      # Try a workaround and drop "-fuse-ld=gold" (if present) from the
+      # linker invocation
+      #
+      MESSAGE(STATUS "Unable to compile a simple test program. "
+        "Try to drop \"-fuse-ld=gold\" from the linker flags."
         )
-      SET(MPI_ADDITIONAL_ERROR_STRING
-        ${MPI_ADDITIONAL_ERROR_STRING}
-        "Unable to compile and link a simple test program with your MPI installation. \n"
+      STRING(REPLACE "-fuse-ld=gold" "" _filtered_flags "${DEAL_II_LINKER_FLAGS}")
+
+      CHECK_COMPILER_SETUP(
+        "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_SAVED} ${MPI_CXX_FLAGS}"
+        "${_filtered_flags} ${DEAL_II_LINKER_FLAGS_SAVED} ${MPI_LINKER_FLAGS}"
+        MPI_WORKING_COMPILER
+        ${DEAL_II_LIBRARIES} ${MPI_LIBRARIES}
         )
-      SET(${var} FALSE)
+
+      IF(MPI_WORKING_COMPILER)
+        SET(DEAL_II_LINKER_FLAGS "${_filtered_flags}")
+      ELSE()
+        MESSAGE(STATUS "Could not find a sufficient MPI installation: "
+          "Unable to compile a simple test program."
+          )
+        SET(MPI_ADDITIONAL_ERROR_STRING
+          ${MPI_ADDITIONAL_ERROR_STRING}
+          "Unable to compile and link a simple test program with your MPI installation. \n"
+          )
+        SET(${var} FALSE)
+      ENDIF()
     ENDIF()
+
   ENDIF()
 ENDMACRO()


Enable -Wnon-virtual-dtor build warning

Enable -Wnon-virtual-dtor build warning

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -209,6 +209,8 @@
     append_if(CMAKE_C_FLAGS "-Wcovered-switch-default" C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG)
     append_if(CMAKE_CXX_FLAGS "-Wno-uninitialized" USE_NO_UNINITIALIZED)
     append_if(CMAKE_CXX_FLAGS "-Wno-maybe-uninitialized" USE_NO_MAYBE_UNINITIALIZED)
+    check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
+    append_if(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
   endif (LLVM_ENABLE_WARNINGS)
   if (LLVM_ENABLE_WERROR)
     add_llvm_definitions( -Werror )


cmake: Add the correct linker flags for profiling

--- cmake/modules/TelepathyDefaults.cmake
+++ cmake/modules/TelepathyDefaults.cmake
@@ -26,6 +26,9 @@
     set(CMAKE_C_FLAGS_DEBUG            "-ggdb -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
     set(CMAKE_C_FLAGS_DEBUGFULL        "-O0 -g3 -ggdb -fno-inline")
     set(CMAKE_C_FLAGS_PROFILE          "-pg -g3 -ggdb -DNDEBUG")
+
+    set(CMAKE_EXE_LINKER_FLAGS_PROFILE    "-pg -ggdb")
+    set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "-pg -ggdb")

     set(DISABLE_WERROR 0 CACHE BOOL "compile without -Werror (normally enabled in development builds)")


Issue a warning instead of fatal errors when checks for libatomic fail.

This should fix PR26631, PR26622 and has the nice property that the addition
of the CheckLibcxxAtomic.cmake module acts as an NFC on the platforms of the
reporters (at least for the time being).

As these bug reports explain, CMake fails the atomic check because the
include headers might not exist in the host environment. We could
potentially point to the headers provided by libcxx itself.

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@260961 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CheckLibcxxAtomic.cmake
+++ cmake/Modules/CheckLibcxxAtomic.cmake
@@ -33,9 +33,9 @@
     list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
     check_cxx_atomics(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
     if (NOT LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
-      message(FATAL_ERROR "Host compiler must support std::atomic!")
+      message(WARNING "Host compiler must support std::atomic!")
     endif()
   else()
-    message(FATAL_ERROR "Host compiler appears to require libatomic, but cannot find it.")
+    message(WARNING "Host compiler appears to require libatomic, but cannot find it.")
   endif()
 endif()


Enable building LLVMgold.dll under mingw.

Summary:
Plugins can (and should) be enabled under mingw if we are building
libLLVM.dll, so this is just a missed case. This allows LLVMgold.dll to
be built now under mingw.

Reviewers: llvm-commits, pirama, beanz, chapuni

Reviewed By: chapuni

Subscribers: chapuni, mgorny

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -792,7 +792,7 @@
 # Plugin support
 # FIXME: Make this configurable.
 if(WIN32 OR CYGWIN)
-  if(BUILD_SHARED_LIBS)
+  if(BUILD_SHARED_LIBS OR LLVM_BUILD_LLVM_DYLIB)
     set(LLVM_ENABLE_PLUGINS ON)
   else()
     set(LLVM_ENABLE_PLUGINS OFF)


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -518,3 +518,9 @@
 	cmaki_find_package(google-gmock)
 	cmaki2_test(${ARGV})
 endmacro()
+
+macro(cmaki_python_library)
+	cmaki2_library(${ARGV})
+	list(GET ${ARGV} 0 TARGET_NAME)
+	set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
+endmacro()


extension building test

extension building test

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

 if (DEFINED ${LOCAL_PROJECT_NAME}_BUILD_SLICER_EXTENSION)
 message(STATUS "-----------------------------BUILD_SLICER_EXTENSION defined------------------------------")
-set(extension_args "${Slicer_DIR} ${Slicer_EXTENSION_DESCRIPTION_DIR} ${CMAKE_BUILD_TYPE}")
+set(extension_args "-DSlicer_DIR=${Slicer_DIR} -DSlicer_EXTENSION_DESCRIPTION_DIR=${Slicer_EXTENSION_DESCRIPTION_DIR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
 else()
 message(STATUS "-----------------------------BUILD_SLICER_EXTENSION not defined------------------------------")
 set(extension_args "")


ENH: Add OpenIGTLink into the external project super build


Pass Configuration to ctest for SIRF

Pass Configuration to ctest for SIRF

On multi-configuration systems, ctest needs the -C <config> flag. We now
pass this on to the ctest command used to execute the SIRF tests.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -171,5 +171,6 @@
 # add tests
 enable_testing()
 add_test(NAME SIRF_TESTS
-	 COMMAND ${CMAKE_CTEST_COMMAND} test WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SIRF-prefix/src/SIRF-build/)
+         COMMAND ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
+         WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SIRF-prefix/src/SIRF-build/)


Accept double circumflex as list separator.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -24,6 +24,7 @@
       set(BOOST_ROOT "${CMAKE_CURRENT_BINARY_DIR}/${proj}-install")

       # We need binary boost libraries
+      string(REPLACE "^^" ";" MITK_USE_Boost_LIBRARIES "${MITK_USE_Boost_LIBRARIES}")
       foreach(_boost_lib ${MITK_USE_Boost_LIBRARIES})
         set(_boost_libs ${_boost_libs} --with-${_boost_lib})
       endforeach()


Find python3 first

Find python3 first

--- CMake/hoomd/HOOMDPythonSetup.cmake
+++ CMake/hoomd/HOOMDPythonSetup.cmake
@@ -5,6 +5,8 @@
 if (HOOMD_INCLUDE_DIR)
     list(APPEND CMAKE_MODULE_PATH ${HOOMD_INCLUDE_DIR}/hoomd/extern/pybind/tools)
 endif()
+
+set(PYBIND11_PYTHON_VERSION 3)

 # trick pybind11 tools to allow us to manage C++ flags
 # cmake ignores this in 2.8, but when pybind11 sees this


sitkLanguageOptions: Improve setting of default value for wrap options

This commit makes sure no calls to "find_package(<languageName>)" are
done if the options WRAP_DEFAULT or WRAP_<languageName> is explicitly
set to OFF.

Indeed, systematically calling "find_package()" can have side-effects.
See https://discourse.slicer.org/t/nightly-mac-slicer-4-9-0-2018-03-13-macosx-amd64-does-not-open/23

Co-authored-by: Jean-Christophe Fillion-Robin <859d3fd8ca46de62a08fca56c64958e301f5352c@kitware.com>

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -1,11 +1,12 @@
 #
-# - This module finds the languages supported by SimpleITK, and
-#present the option to enable support
-#
-
-#
-# Currently this will search for Python, Java, TCL, Ruby, C#, R
-# Additionally it give the option to wrap LUA.
+# - This module finds the languages supported by SimpleITK. By default
+#a find package will be performed for each language, and if it is
+#detected wrapping for that language will be enabled
+#(WRAP_<languageName>=ON). This behavior can be overridden by setting
+#"WRAP_DEFAULT" to FALSE. Individual languages can be disabled with
+#the WRAP_<languageName> option. If either WRAP_DEFAULT or WRAP_<languageName> is
+#false then no find_package for the language will be performed, and
+#the language will not be wrapped.
 #

 include(sitkTargetLinkLibrariesWithDynamicLookup)
@@ -15,24 +16,53 @@
   SITK_UNDEFINED_SYMBOLS_ALLOWED
   )

-option(WRAP_DEFAULT "The default initial value for wrapping a language when it is detected on the system." ON)
+option(WRAP_DEFAULT "Enables automatic detection and wrapping for all languages." ON)
 mark_as_advanced(WRAP_DEFAULT)

-#
-# Macro to set "_QUIET" and "_QUIET_LIBRARY" based on the first
-# argument being defined and true, to either REQUIRED or QUIET.
-#
-macro(set_QUIET var)
-  if ( DEFINED  ${var} AND ${var} )
-    set( _QUIET "REQUIRED" )
+# Arguments:
+# - languageName - name of the language, will check variable
+#   `WRAP_<languageName>`
+#
+# Modified Variables:
+#  - _do_find_package - always defined, true if find_pacakge for
+#    languages should be run.
+#  - _find_package_extra_args - may be set to `REQUIRED` of `QUIET` as
+#    needed.
+#  - WRAP_<languageName>_DEFAULT - may be set to `ON` or `OFF` if it
+#    can be determined with out a find_package call
+#
+macro(sitkLanguageShouldDoFindPackage languageName )
+
+  if ( DEFINED  WRAP_${languageName} )
+    if ( WRAP_${languageName} )
+      # Variable `WRAP_<languageName>` is defined and TRUE, we need
+      # to call  `find_package` with `REQUIRED`
+      set(_do_find_package 1)
+      set(_find_package_extra_args  "REQUIRED")
+      set(WRAP_${languageName}_DEFAULT ON)
+    else()
+      # Variable `WRAP_<languageName>` is defined and FALSE, we do  *NOT* need
+      # to call  `find_package` at all to initialize the `WRAP_<languageName>_DEFAULT`
+      # variable
+      set(WRAP_${languageName}_DEFAULT OFF)
+      set(_do_find_package 0)
+    endif()
+  elseif( WRAP_DEFAULT )
+    # The variable `WRAP_<languageName>` is *NOT* defined and
+    # WRAP_DEFAULT=ON, so we must "quietly" do a find package to
+    # determine the value for `WRAP_<languageName>_DEFAULT` variable
+    set(_do_find_package 1)
+    set(_find_package_extra_args "QUIET")
   else()
-    set( _QUIET "QUIET" )
-  endif()
-  if ( SITK_UNDEFINED_SYMBOLS_ALLOWED )
-    set( _QUIET_LIBRARY "QUIET" )
-  else()
-    set( _QUIET_LIBRARY ${_QUIET} )
-  endif()
+    # The variable `WRAP_<languageName>` is *NOT* defined and explicitly all
+    # languages are disabled by WRAP_DEFAULT=OFF, we do *NOT* need to
+    # call `find_package` to initialize the
+    # `WRAP_<languageName>_DEFAULT` variable.
+    set(WRAP_${languageName}_DEFAULT OFF)
+    set(_do_find_package 0)
+  endif()
+
+
 endmacro()

 #
@@ -42,21 +72,23 @@
 #-----------------------------------------------------------
 # Lua

-set_QUIET( WRAP_LUA )
-find_package ( Lua ${_QUIET} )
-
-if ( LUA_FOUND )
-  set( WRAP_LUA_DEFAULT ${WRAP_DEFAULT} )
-else()
-  set( WRAP_LUA_DEFAULT OFF )
-endif()
-
-set( LUA_ADDITIONAL_LIBRARIES "" CACHE STRING "Additional libraries which may be needed for lua such as readline.")
-mark_as_advanced( LUA_ADDITIONAL_LIBRARIES )
+sitkLanguageShouldDoFindPackage( LUA )
+
+if( _do_find_package )
+
+  find_package ( Lua ${_find_package_extra_args} )
+
+  set( WRAP_LUA_DEFAULT ${LUA_FOUND} )
+endif()
+

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

 if ( WRAP_LUA )
+
+  set( LUA_ADDITIONAL_LIBRARIES "" CACHE STRING "Additional libraries which may be needed for lua such as readline.")
+  mark_as_advanced( LUA_ADDITIONAL_LIBRARIES )
+
   find_package( LuaInterp REQUIRED )
   list( APPEND SITK_LANGUAGES_VARS
     LUA_EXECUTABLE
@@ -72,28 +104,40 @@
 #-----------------------------------------------------------
 # Python

-set_QUIET( WRAP_PYTHON )
-find_package ( PythonInterp ${_QUIET})
-if ( PYTHONINTERP_FOUND )
-  find_package ( PythonLibs ${PYTHON_VERSION_STRING} EXACT ${_QUIET_LIBRARY} )
-else ()
-  find_package ( PythonLibs ${_QUIET_LIBRARY} )
-endif()
-
-if ( PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND
-    AND (PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING) )
-  set( WRAP_PYTHON_DEFAULT ${WRAP_DEFAULT} )
-else()
-  set( WRAP_PYTHON_DEFAULT OFF )
+sitkLanguageShouldDoFindPackage( PYTHON )
+
+if( _do_find_package )
+
+  find_package ( PythonInterp ${_find_package_extra_args})
+
+  # if we don't need to link against a library, the make the
+  # find_package quiet.
+  if ( SITK_UNDEFINED_SYMBOLS_ALLOWED )
+    set( _find_package_extra_args "QUIET" )
+  endif()
+
+  if ( PYTHONINTERP_FOUND )
+    find_package ( PythonLibs ${PYTHON_VERSION_STRING} EXACT ${_find_package_extra_args} )
+  else ()
+    find_package ( PythonLibs ${_find_package_extra_args} )
+  endif()
+
+  if ( PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND
+      AND (PYTHON_VERSION_STRING VERSION_EQUAL PYTHONLIBS_VERSION_STRING) )
+    set( WRAP_PYTHON_DEFAULT ON )
+  else()
+    set( WRAP_PYTHON_DEFAULT OFF )
+  endif()
 endif()

 option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )

-if ( WRAP_PYTHON AND PYTHON_VERSION_STRING VERSION_LESS 2.7 )
-  message( WARNING "Python version less than 2.7: \"${PYTHON_VERSION_STRING}\"." )
-endif()

 if ( WRAP_PYTHON )
+  if ( PYTHON_VERSION_STRING VERSION_LESS 2.7 )
+    message( WARNING "Python version less than 2.7: \"${PYTHON_VERSION_STRING}\"." )
+  endif()
+
   list( APPEND SITK_LANGUAGES_VARS
     PYTHON_DEBUG_LIBRARY
     PYTHON_EXECUTABLE
@@ -114,14 +158,19 @@
 #-----------------------------------------------------------
 # Java

-set_QUIET( WRAP_JAVA )
-find_package ( Java COMPONENTS Development Runtime ${_QUIET} )
-find_package ( JNI ${_QUIET} )
-if ( JAVA_FOUND AND JNI_FOUND )
-  set( WRAP_JAVA_DEFAULT ${WRAP_DEFAULT} )
-else ( ${JAVA_FOUND} AND JNI_FOUND )
-  set( WRAP_JAVA_DEFAULT OFF )
-endif ( )
+sitkLanguageShouldDoFindPackage( JAVA )
+
+if( _do_find_package )
+
+  find_package ( Java COMPONENTS Development Runtime ${_find_package_extra_args} )
+  find_package ( JNI ${_find_package_extra_args} )
+
+  if ( JAVA_FOUND AND JNI_FOUND )
+    set( WRAP_JAVA_DEFAULT ON )
+  else ( ${JAVA_FOUND} AND JNI_FOUND )
+    set( WRAP_JAVA_DEFAULT OFF )
+  endif ( )
+endif()

 option ( WRAP_JAVA "Wrap Java" ${WRAP_JAVA_DEFAULT} )

@@ -154,15 +203,14 @@
 #-----------------------------------------------------------
 # Tcl

-set_QUIET(WRAP_TCL)
-
-find_package ( TCL ${_QUIET} )
-
-if ( TCL_FOUND )
-  set ( WRAP_TCL_DEFAULT ${WRAP_DEFAULT} )
-else ( )
-  set ( WRAP_TCL_DEFAULT OFF )
-endif ( )
+sitkLanguageShouldDoFindPackage( WRAP_TCL )
+
+if( _do_find_package )
+
+  find_package ( TCL ${_find_package_extra_args} )
+
+  set ( WRAP_TCL_DEFAULT ${TCL_FOUND} )
+endif()

 option ( WRAP_TCL "Wrap Tcl" ${WRAP_TCL_DEFAULT} )

@@ -181,14 +229,18 @@
 #-----------------------------------------------------------
 # Ruby

-set_QUIET( WRAP_RUBY )
-
-find_package ( Ruby ${_QUIET} )
-if ( RUBY_FOUND )
-  set ( WRAP_RUBY_DEFAULT ${WRAP_DEFAULT} )
-else ( )
-  set ( WRAP_RUBY_DEFAULT OFF )
-endif ( )
+sitkLanguageShouldDoFindPackage( RUBY )
+
+if( _do_find_package )
+
+  find_package ( Ruby ${_find_package_extra_args} )
+
+  if ( RUBY_FOUND )
+    set ( WRAP_RUBY_DEFAULT ${WRAP_DEFAULT} )
+  else ( )
+    set ( WRAP_RUBY_DEFAULT OFF )
+  endif ( )
+endif()

 option ( WRAP_RUBY "Wrap Ruby" ${WRAP_RUBY_DEFAULT} )

@@ -207,14 +259,18 @@
 #-----------------------------------------------------------
 #  CSharp

-set_QUIET( WRAP_CSHARP )
-
-find_package( CSharp ${_QUIET} )
-if ( CSHARP_FOUND AND NOT MINGW )
-  set ( WRAP_CSHARP_DEFAULT ${WRAP_DEFAULT} )
-else ()
-  set ( WRAP_CSHARP_DEFAULT OFF )
-endif ()
+sitkLanguageShouldDoFindPackage( CSHARP )
+
+if( _do_find_package )
+
+  find_package( CSharp ${_find_package_extra_args} )
+
+  if ( CSHARP_FOUND AND NOT MINGW )
+    set ( WRAP_CSHARP_DEFAULT ON )
+  else ()
+    set ( WRAP_CSHARP_DEFAULT OFF )
+  endif ()
+endif()

 option ( WRAP_CSHARP "Wrap C#" ${WRAP_CSHARP_DEFAULT} )

@@ -230,14 +286,18 @@
 #-----------------------------------------------------------
 #  R

-set_QUIET( WRAP_R )
-
-find_package(R ${_QUIET})
-if ( R_FOUND AND NOT WIN32 )
-  set ( WRAP_R_DEFAULT ${WRAP_DEFAULT} )
-else( )
-  set ( WRAP_R_DEFAULT OFF )
-endif( )
+sitkLanguageShouldDoFindPackage( R )
+
+if( _do_find_package )
+
+  find_package(R ${_find_package_extra_args})
+
+  if ( R_FOUND AND NOT WIN32 )
+    set ( WRAP_R_DEFAULT ON )
+  else( )
+    set ( WRAP_R_DEFAULT OFF )
+  endif( )
+endif()

 option ( WRAP_R "Wrap R" ${WRAP_R_DEFAULT} )


Update MatchPoint Fixes T22463

Update MatchPoint Fixes T22463

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -26,8 +26,8 @@
       set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
     else()
       set(download_step
-          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1610.tar.gz
-          URL_MD5 a9508c8d9ab58a20cf8fa45adb972a02
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev1681.tar.gz
+          URL_MD5 fa18c890751a192ac72803d115a1c702
          )
     endif()


Fix path for CLAW JARs

Fix path for CLAW JARs

--- properties.cmake
+++ properties.cmake
@@ -50,7 +50,7 @@
 set(OMNI_BUILD_JAR_CX2X_XCODEML "${BUILD_DIR}/${OMNI_CX2X_XCODEML_NAME}.jar")

 # Define CLAW jar archives install location.
-set(CX2X_JAR_INSTALL_LOCATION "${CMAKE_INSTALL_PREFIX}/share/cx2x")
+set(CX2X_JAR_INSTALL_LOCATION "${CMAKE_INSTALL_PREFIX}/share/claw")
 set(OMNI_JAR_CX2X_CLAW "${CX2X_JAR_INSTALL_LOCATION}/${OMNI_CX2X_CLAW_NAME}.jar")
 set(OMNI_JAR_CX2X_XCODEML "${CX2X_JAR_INSTALL_LOCATION}/${OMNI_CX2X_XCODEML_NAME}.jar")


cmake: Replace pkg_check_modules with waffle_pkg_config

Define a new macro waffle_pkg_config, which replaces each occurence of
pkg_check_modules.

Macro waffle_pkg_config is a smart wrapper around CMake's standard
pkg_check_modules macro.

waffle_pkg_config fixes a fatal flaw of pkg_check_modules.  Unlike
pkg_check_modules, waffle_pkg_config calls pkg-config and checks for the
requested package *each* time the macro is called.

Signed-off-by: Chad Versace <a557f7f75bf28dc19ac99107f5cc7cd6b3fbdb1a@linux.intel.com>

--- cmake/Modules/WaffleFindDependencies.cmake
+++ cmake/Modules/WaffleFindDependencies.cmake
@@ -25,6 +25,36 @@

 find_package(PkgConfig)

+#
+# Macro waffle_pkg_config is a smart wrapper around CMake's standard
+# pkg_check_modules macro.
+#
+# waffle_pkg_config fixes a fatal flaw of pkg_check_modules.  Unlike
+# pkg_check_modules, waffle_pkg_config calls pkg-config and checks for the
+# requested package *each* time the macro is called.
+#
+# Flaws in pkg_check_modules
+# --------------------------
+# For each package prefix (that is, the first argument to pkg_check_modules),
+# pkg_check_modules calls pkg-config only if no previous invocation succeeded
+# in finding the package.  Therefore, if someone increments the required
+# version parameter of some call to pkg_check_modules, then pkg_check_modules
+# does not check for the new version of the package if a previous invocation of
+# CMake succeeded in finding the older version.
+#
+# For example, consider the following patch to some CMakeLists.txt.
+#     - pkg_check_modules(FOO REQUIRED foo>=1.0)
+#     + pkg_check_modules(FOO REQUIRED foo>=2.0)
+# Suppose that the system has foo-1.0 installed but not foo-2.0; and that
+# a previous invocation of CMake suceeded in finding foo-1.0. Future
+# invocations of CMake will continue to succeed even though the system lacks
+# foo-2.0.
+#
+macro(waffle_pkg_config ...)
+    unset(${ARGV0}_FOUND CACHE)
+    pkg_check_modules(${ARGV})
+endmacro()
+
 if(waffle_on_mac)
     find_package(OpenGL REQUIRED)
     find_library(COCOA_FRAMEWORK Cocoa REQUIRED)
@@ -32,23 +62,23 @@
 endif()

 if(waffle_has_egl)
-    pkg_check_modules(egl REQUIRED egl)
+    waffle_pkg_config(egl REQUIRED egl)
 endif()

 if(waffle_has_glx)
-    pkg_check_modules(gl REQUIRED gl)
+    waffle_pkg_config(gl REQUIRED gl)
 endif()

 if(waffle_has_wayland)
-    pkg_check_modules(wayland-client REQUIRED wayland-client>=1)
-    pkg_check_modules(wayland-egl REQUIRED wayland-egl>=9.1)
+    waffle_pkg_config(wayland-client REQUIRED wayland-client>=1)
+    waffle_pkg_config(wayland-egl REQUIRED wayland-egl>=9.1)
 endif()

 if(waffle_has_x11)
-    pkg_check_modules(x11-xcb REQUIRED x11-xcb)
+    waffle_pkg_config(x11-xcb REQUIRED x11-xcb)
 endif()

 if(waffle_has_gbm)
-    pkg_check_modules(gbm REQUIRED gbm)
-    pkg_check_modules(libudev REQUIRED libudev)
+    waffle_pkg_config(gbm REQUIRED gbm)
+    waffle_pkg_config(libudev REQUIRED libudev)
 endif()


Switched flag from soft to hard float

Switched flag from soft to hard float

Former-commit-id: 98053c8eba7f4f811cbbd63aad5b1210236b2556

--- Toolchain-imx6.cmake
+++ Toolchain-imx6.cmake
@@ -6,8 +6,8 @@
 # specify the cross compiler
 SET(CMAKE_C_COMPILER   ${CUBIXCROSS_DIR}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-gcc)
 SET(CMAKE_CXX_COMPILER ${CUBIXCROSS_DIR}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++)
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=softfp")
-SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=softfp")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard")
+SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard")

 # where is the target environment
 SET(CMAKE_FIND_ROOT_PATH ${CUBIXCROSS_DIR}/rootfs)


BUG: update hdf5 url

BUG: update hdf5 url

--- SuperBuild/CMake/External_hdf5.cmake
+++ SuperBuild/CMake/External_hdf5.cmake
@@ -29,7 +29,7 @@

 ExternalProject_Add(HDF5
   PREFIX HDF5
-  URL "http://support.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.10.1.tar.gz"
+  URL "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.1/src/hdf5-1.10.1.tar.gz"
   URL_MD5 43a2f9466702fb1db31df98ae6677f15
   SOURCE_DIR ${HDF5_SB_SRC}
   BINARY_DIR ${HDF5_SB_BUILD_DIR}


CMake: Pick up debug and optimized versions of p4est if available

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

--- deal.II/cmake/modules/FindP4EST.cmake
+++ deal.II/cmake/modules/FindP4EST.cmake
@@ -34,29 +34,14 @@
 SET_IF_EMPTY(SC_DIR "$ENV{SC_DIR}")

 #
-# We used to recommend installing p4est with a custom script that
-# compiled p4est twice, once in debug and once in optimized mode.
-# the installation would then have happened into directories
-# $P4EST_DIR/DEBUG and $P4EST_DIR/FAST. If we can find these
-# two directories, then use the FAST directory rather than trying
-# to figure out how we can build deal.II against the two libraries
-# depending on whether we are in debug or optimized mode.
-#
-IF(P4EST_DIR
-   AND EXISTS ${P4EST_DIR}/DEBUG
-   AND EXISTS ${P4EST_DIR}/FAST)
-  MESSAGE(STATUS "Found old-style p4est directory layout")
-  SET (P4EST_DIR ${P4EST_DIR}/FAST)
-ENDIF()
-
-
-#
 # Search for the sc library, usually bundled with p4est. If no SC_DIR was
 # given, take what we chose for p4est.
 #

 FIND_PATH(P4EST_INCLUDE_DIR p4est_config.h
   HINTS
+    ${P4EST_DIR}/FAST
+    ${P4EST_DIR}/DEBUG
     ${P4EST_DIR}
   PATH_SUFFIXES
     p4est include/p4est include src
@@ -64,34 +49,61 @@

 FIND_PATH(SC_INCLUDE_DIR sc.h
   HINTS
+    ${SC_DIR}/FAST
+    ${SC_DIR}/DEBUG
     ${SC_DIR}
+    ${P4EST_DIR}/FAST
+    ${P4EST_DIR}/DEBUG
     ${P4EST_DIR}
   PATH_SUFFIXES
     sc include/p4est include src sc/src
   )

-FIND_LIBRARY(P4EST_LIBRARY
+FIND_LIBRARY(P4EST_LIBRARY_OPTIMIZED
   NAMES p4est
   HINTS
+    ${P4EST_DIR}/FAST
+    ${P4EST_DIR}/DEBUG
     ${P4EST_DIR}
   PATH_SUFFIXES
     lib${LIB_SUFFIX} lib64 lib src
   )

-FIND_LIBRARY(SC_LIBRARY
+FIND_LIBRARY(P4EST_LIBRARY_DEBUG
+  NAMES p4est
+  HINTS
+    ${P4EST_DIR}/DEBUG
+  PATH_SUFFIXES
+    lib${LIB_SUFFIX} lib64 lib src
+  )
+
+FIND_LIBRARY(SC_LIBRARY_OPTIMIZED
   NAMES sc
   HINTS
+    ${SC_DIR}/FAST
+    ${SC_DIR}/DEBUG
     ${SC_DIR}
+    ${P4EST_DIR}/FAST
+    ${P4EST_DIR}/DEBUG
     ${P4EST_DIR}
   PATH_SUFFIXES
     lib${LIB_SUFFIX} lib64 lib src sc/src
   )

-SET(_output ${P4EST_LIBRARY} ${SC_LIBRARY})
+FIND_LIBRARY(SC_LIBRARY_DEBUG
+  NAMES sc
+  HINTS
+    ${SC_DIR}/DEBUG
+    ${P4EST_DIR}/DEBUG
+  PATH_SUFFIXES
+    lib${LIB_SUFFIX} lib64 lib src sc/src
+  )
+
+SET(_output ${P4EST_LIBRARY_OPTMIZED} ${SC_LIBRARY_OPTIMIZED})
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(P4EST DEFAULT_MSG
   _output # Cosmetic: Gives nice output
-  P4EST_LIBRARY
-  SC_LIBRARY
+  P4EST_LIBRARY_OPTIMIZED
+  SC_LIBRARY_OPTIMIZED
   P4EST_INCLUDE_DIR
   SC_INCLUDE_DIR
   )
@@ -103,10 +115,29 @@
   SC_INCLUDE_DIR
   )

+
 IF(P4EST_FOUND)
-  SET(P4EST_LIBRARIES
-    ${P4EST_LIBRARY}
-    ${SC_LIBRARY}
+
+  IF( "${P4EST_LIBRARY_OPTIMIZED}" STREQUAL "${P4EST_LIBRARY_DEBUG}"
+      AND
+      "${SC_LIBRARY_OPTIMIZED}" STREQUAL "${SC_LIBRARY_DEBUG}" )
+    SET(P4EST_LIBRARIES
+      ${P4EST_LIBRARY_OPTIMIZED}
+      ${SC_LIBRARY_OPTIMIZED}
+      )
+  ELSE()
+    SET(P4EST_LIBRARIES
+      optimized
+      ${P4EST_LIBRARY_OPTIMIZED}
+      ${SC_LIBRARY_OPTIMIZED}
+      debug
+      ${P4EST_LIBRARY_DEBUG}
+      ${SC_LIBRARY_DEBUG}
+      general
+      )
+  ENDIF()
+
+  LIST(APPEND P4EST_LIBRARIES
     ${LAPACK_LIBRARIES} # for good measure
     ${MPI_C_LIBRARIES} # for good measure
     )
@@ -123,6 +154,7 @@
   IF("${P4EST_MPI_STRING}" STREQUAL "")
     SET(P4EST_WITH_MPI FALSE)
   ELSE()
+
     SET(P4EST_WITH_MPI TRUE)
   ENDIF()


cmake: Fix Windows issue running menuconfig in Command Prompt if winpty on Path

Previous version assumed having winpty on the Path meant that it would be needed,
but some tools (like Atlassian Sourcetree) permanently add winpty to the path.

Symptom is arrow keys not working in menuconfig dialog.

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -18,7 +18,11 @@

 if(CMAKE_HOST_WIN32)
     # Prefer a prebuilt mconf-idf on Windows
-    find_program(WINPTY winpty)
+    if(DEFINED ENV{MSYSTEM})
+        find_program(WINPTY winpty)
+    else()
+        unset(WINPTY CACHE)  # in case previous CMake run was in a tty and this one is not
+    endif()
     find_program(MCONF mconf-idf)

     # Fall back to the old binary which was called 'mconf' not 'mconf-idf'


Fix include paths when building with external protobuf

--- cmake/OpenCVFindProtobuf.cmake
+++ cmake/OpenCVFindProtobuf.cmake
@@ -50,7 +50,8 @@
       add_library(libprotobuf UNKNOWN IMPORTED)
       set_target_properties(libprotobuf PROPERTIES
         IMPORTED_LOCATION "${Protobuf_LIBRARY}"
-        INTERFACE_INCLUDE_SYSTEM_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
+        INTERFACE_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
+        INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${Protobuf_INCLUDE_DIR}"
       )
       get_protobuf_version(Protobuf_VERSION "${Protobuf_INCLUDE_DIR}")
     endif()


Bump Firestore version to 7.7.0 (#288)

Bump Firestore version to 7.7.0 (#288)

--- cmake/external/firestore.cmake
+++ cmake/external/firestore.cmake
@@ -18,9 +18,7 @@
   return()
 endif()

-# Use a Firestore version slightly after 7.5.1, as it
-# contains a minor crash fix we'd like to include.
-set(version 5e76aa968bfce5e9c8fb0f28f523793f0e9ed5f3)
+set(version CocoaPods-7.7.0)
 ExternalProject_Add(
   firestore