ENH: Update RigidAlignment

ENH: Update RigidAlignment

Update RigidAlignment to use NIRALUser/RigidAlignment master as of 2021-05-26

--- SuperBuild/External_RigidAlignment.cmake
+++ SuperBuild/External_RigidAlignment.cmake
@@ -28,13 +28,13 @@

   ExternalProject_SetIfNotDefined(
     ${CMAKE_PROJECT_NAME}_${proj}_GIT_REPOSITORY
-    "${EP_GIT_PROTOCOL}://github.com/vicory/RigidAlignment.git"
+    "${EP_GIT_PROTOCOL}://github.com/NIRALUser/RigidAlignment.git"
     QUIET
     )

   ExternalProject_SetIfNotDefined(
     ${CMAKE_PROJECT_NAME}_${proj}_GIT_TAG
-    "6545c99d5d301912e6f9471eb21754b4846b92d9" # slicersalt-0.0.0-2017-09-11-ca0c6dfff1
+    "07e6049bc3ddcc75e35130602c6f34b494566e33" # master 2021-05-26
     QUIET
     )


PKG: remove unused {OTB_LATEST_MAJOR_MINOR. was not working with share/OTB-x.y

--- SuperBuild/Packaging/PackageHelper.cmake
+++ SuperBuild/Packaging/PackageHelper.cmake
@@ -85,13 +85,6 @@

   set(EXE_SEARCHDIRS ${OTB_INSTALL_DIR}/bin)
   list(APPEND  EXE_SEARCHDIRS ${DEPENDENCIES_INSTALL_DIR}/bin)
-
-  # detect OTB version major and minor
-  file(GLOB _installed_otb_ver ${OTB_INSTALL_DIR}/lib/cmake/OTB-*)
-  list(SORT _installed_otb_ver)
-  list(GET _installed_otb_ver -1 _latest_installed_otb_ver)
-  get_filename_component(OTB_LATEST_MAJOR_MINOR ${_latest_installed_otb_ver} NAME)
-  message(STATUS "Latest OTB found : ${OTB_LATEST_MAJOR_MINOR}")

   macro_empty_package_staging_directory()


Changed: Debug Shared library linker flag for visual studio, INCREMENTAL
was changed from YES to NO.

Signed-off-with-cleanup-by: gerrit <788f206ccdc6f0273070dd892b0148035dd2ebe5@vossg.org>

--- CMake/SetupCompiler.cmake
+++ CMake/SetupCompiler.cmake
@@ -150,7 +150,7 @@
         CACHE STRING "OpenSG defaults" FORCE )

     SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG
-        "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} msvcprtd.lib msvcrtd.lib"
+        "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /INCREMENTAL:NO msvcprtd.lib msvcrtd.lib"
         CACHE STRING "OpenSG defaults" FORCE )

     SET(CMAKE_SHARED_LINKER_FLAGS_DEBUGOPT


Removed special characters from variable

--- CMake/usCTestScript.cmake
+++ CMake/usCTestScript.cmake
@@ -43,14 +43,14 @@

 endmacro()

-function(create_initial_cache var _shared _threading _sf _c++11 _autoload)
+function(create_initial_cache var _shared _threading _sf _cxx11 _autoload)

   set(_initial_cache "
       US_BUILD_TESTING:BOOL=ON
       US_BUILD_SHARED_LIBS:BOOL=${_shared}
       US_ENABLE_THREADING_SUPPORT:BOOL=${_threading}
       US_ENABLE_SERVICE_FACTORY_SUPPORT:BOOL=${_sf}
-      US_USE_C++11:BOOL=${_c++11}
+      US_USE_C++11:BOOL=${_cxx11}
       US_ENABLE_AUTOLOADING_SUPPORT:BOOL=${_autoload}
       ")

@@ -68,7 +68,7 @@
   if(_sf)
     set(CTEST_DASHBOARD_NAME "${CTEST_DASHBOARD_NAME}-servicefactory")
   endif()
-  if(_c++11)
+  if(_cxx11)
     set(CTEST_DASHBOARD_NAME "${CTEST_DASHBOARD_NAME}-cxx11")
   endif()
   if(_autoload)


Fixed SOFA dependencies for Mac.

Fixed SOFA dependencies for Mac.

--- CMakeExternals/SOFA.cmake
+++ CMakeExternals/SOFA.cmake
@@ -134,7 +134,7 @@
   list(APPEND download_cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-gl.cmake)

   set(file "sofa-rev${rev}-cmake.zip")
-  set(md5 "8381ec98ad47b48f34d19b836bc1063c")
+  set(md5 "662f19af4212b9a201abaf0b6592a7e7")

   write_downloadfile_script(
     "${stamp_dir}/download-cmake.cmake"


Remove bad extra bracket

Remove bad extra bracket

--- Modules/BasicPlugin.cmake
+++ Modules/BasicPlugin.cmake
@@ -90,7 +90,7 @@
   endif()
   if(BP_NO_INSTALL)
     message(WARNING "basic_plugin no longer accepts the NO_INSTALL option")
-  endif(()
+  endif()

   if(BP_BASENAME_ONLY)
     set(plugin_name "${name}_${type}")


Add _FILE_OFFSET_BITS to build stuff

Add _FILE_OFFSET_BITS to build stuff

--- src/lio/cmake/LStoreCommon.cmake
+++ src/lio/cmake/LStoreCommon.cmake
@@ -47,9 +47,11 @@
 # http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
 # _REENTRANT - tells the std library to enable reentrant functions
 # _GNU_SOURCE - uses GNU (not POSIX) functions
-# _LARGEFILE64_SOURCE - this should probably be changed to _FILE_OFFSET_BITS
+# _LARGEFILE64_SOURCE - Along with...
+# _FILE_OFFSET_BITS - Tell gcc that we want 64 bit offsets
 # TODO: Is this truely needed?
 # LINUX=2 - APR seems to want it
+
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64")
 set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")


Split off 7.10.56

Split off 7.10.56

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 55 )
+set ( HPCC_POINT 57 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 6.0.0-betarc1 Beta 1 Release Candidate 1

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -5,8 +5,8 @@
 set ( HPCC_MAJOR 6 )
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_MATURITY "betarc" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


CMake: Load cache if using PRINT_STRING and variable isn't found

--- version.cmake
+++ version.cmake
@@ -49,6 +49,9 @@
 endif()

 if(DEFINED PRINT_STRING)
+	if(NOT DEFINED ${PRINT_STRING})
+		load_cache($ENV{PWD} READ_WITH_PREFIX "" ${PRINT_STRING})
+	endif()
 	execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${${PRINT_STRING}}")
 elseif(NOT VERSION_STRING_CACHE OR NOT VERSION_STRING STREQUAL VERSION_STRING_CACHE)
 	set(VERSION_STRING_CACHE ${VERSION_STRING} CACHE STRING "" FORCE)


add wx propgrid library to wx_libs

add wx propgrid library to wx_libs

* also remove Solaris/SunOS hack that was needed (we no longer support Solaris 10)
* see issue https://github.com/smanders/externpro/issues/121

--- projects/use/usexp-wxwidgets-config.cmake
+++ projects/use/usexp-wxwidgets-config.cmake
@@ -25,11 +25,7 @@
 if(NOT DEFINED wx_libs)
   # http://docs.wxwidgets.org/trunk/page_libs.html
   # TRICKY: reverse dependency order (base should be last)
-  set(wx_libs aui richtext adv gl html core net xml base)
-  if(${CMAKE_SYSTEM_NAME} STREQUAL SunOS)
-    # wxGL brings in -lGL -lGLU, and -lGLU caused us segfaults on Solaris
-    list(REMOVE_ITEM wx_libs gl)
-  endif()
+  set(wx_libs aui propgrid richtext adv gl html core net xml base)
 endif()
 if(UNIX)
   set(wxWidgets_CONFIG_OPTIONS --prefix=${XP_ROOTDIR} --version=${wxVersion})


cmake: fix linking of static libraries

cmake: fix linking of static libraries

--- cmake/Arduino.cmake
+++ cmake/Arduino.cmake
@@ -597,9 +597,9 @@
     # Compile elf
     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
                         COMMAND ${AVR_C_COMPILER}
-                        ARGS     ${COMPILE_FLAGS}
-                        ${INPUT_SRCS}
-                        -o ${TARGET_PATH}.elf
+                        ARGS    ${INPUT_SRCS}
+                                -o ${TARGET_PATH}.elf
+                                ${COMPILE_FLAGS}
                         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                         COMMENT "Compiling elf"
                         VERBATIM)


Fix gsl cblas detection on Windows

Fix gsl cblas detection on Windows

--- cmake/FindGSL.cmake
+++ cmake/FindGSL.cmake
@@ -57,7 +57,7 @@
   endif(NOT GSL_GSL_LIBRARY)

   FIND_LIBRARY(GSL_GSLCBLAS_LIBRARY
-    NAMES libgslcblas.dll.a gslcblas libgslcblas cblas_mt
+    NAMES libgslcblas.dll.a gslcblas libgslcblas cblas_mt cblas
     PATHS  ${GSL_POSSIBLE_ROOT_DIRS}
     PATH_SUFFIXES lib
     DOC "GSL cblas library dir" )


Allow FindTBB to look in default paths.

Allow FindTBB to look in default paths.

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -157,7 +157,14 @@

 find_library(TBB_LIBRARY        ${_TBB_LIB_NAME}        ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH)
+IF (NOT TBB_LIBRARY)
+	find_library(TBB_LIBRARY        ${_TBB_LIB_NAME}        ${TBB_LIBRARY_DIR})
+ENDIF()
+
 find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} ${TBB_LIBRARY_DIR} NO_DEFAULT_PATH)
+IF (NOT TBB_MALLOC_LIBRARY)
+	find_library(TBB_MALLOC_LIBRARY ${_TBB_LIB_MALLOC_NAME} ${TBB_LIBRARY_DIR})
+ENDIF()
 #TBB_CORRECT_LIB_DIR(TBB_LIBRARY)
 #TBB_CORRECT_LIB_DIR(TBB_MALLOC_LIBRARY)
 mark_as_advanced(TBB_LIBRARY TBB_MALLOC_LIBRARY)


Make libobjc compile on i686.

Make libobjc compile on i686.

Lua tests don't pass though.

--- cmake/libobjc.cmake
+++ cmake/libobjc.cmake
@@ -10,7 +10,7 @@
             set (extra_cflags "${extra_cflags} -fno-inline")
         endif()
         set (extra_ldflags "")
-    else ()
+    else()
         set (extra_cflags "-O3")
         if (CC_HAS_WNO_UNUSED_RESULT)
             set (extra_cflags "${extra_cflags} -Wno-unused-result")
@@ -20,8 +20,11 @@
         endif()
         set (extra_ldflags "-s")
     endif()
-    if (${TARGET_OS_LINUX})
+    if (TARGET_OS_LINUX)
         set (extra_cflags "${extra_cflags} -D_GNU_SOURCE")
+       if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "686")
+            set (extra_cflags "${extra_cflags} -march=i586")
+       endif()
     endif()
     if (CMAKE_COMPILER_IS_CLANG)
         set (extra_cflags "${extra_cflags} -Wno-deprecated-objc-isa-usage")


Use `@loader_path` instead of `@executable_path` on macOS

`@executable_path` resolves to the directory of "the main executable for
the process" while `@loader_path` is the directory of "the mach-o binary
which contains the load command using @loader_path" (see `man dyld`).

This means that using `@executable_path` constrains where I can put
binaries that link to `libospray` if I need `RPATH` to resolve
correctly. In particular, if I install `libospray` into (say)
`/usr/local/lib`, the linker resolves `RPATH` references correctly only
if my linked executable is in `/usr/local/*`.

On the other hand, using `@loader_path` constrains only the
location of the libraries that `libospray` depends on, and my linked
executable can be anywhere in the file system.

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -7,7 +7,7 @@
   set(CMAKE_SKIP_INSTALL_RPATH OFF)
   if (APPLE)
     set(CMAKE_MACOSX_RPATH ON)
-    set(CMAKE_INSTALL_RPATH "@executable_path/" "@executable_path/../${CMAKE_INSTALL_LIBDIR}")
+    set(CMAKE_INSTALL_RPATH "@loader_path/" "@loader_path/../${CMAKE_INSTALL_LIBDIR}")
   else()
     set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
     # on per target basis:


fix invalide paddle_version on tag branch test=develop (#15551)

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -31,8 +31,23 @@
           set(tmp_version "${GIT_TAG_NAME}~1")
         endif()
       else()
-        # otherwise, we always set PADDLE_VERSION to 0.0.0 to represent latest
-        set(PADDLE_VERSION "0.0.0")
+        execute_process(
+          COMMAND ${GIT_EXECUTABLE} describe --exact-match --tags ${tmp_version}
+          WORKING_DIRECTORY ${PADDLE_SOURCE_DIR}
+          OUTPUT_VARIABLE GIT_EXACT_TAG_NAME
+          RESULT_VARIABLE GIT_EXACT_TAG_RESULT
+          ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+        if (NOT ${GIT_EXACT_TAG_NAME})
+          # Check if current branch is tag branch
+          if (${GIT_EXACT_TAG_NAME} MATCHES "v${TAG_VERSION_REGEX}")
+            string(REPLACE "v" "" PADDLE_VERSION ${GIT_EXACT_TAG_NAME})
+          else()
+            set(PADDLE_VERSION "0.0.0")
+          endif()
+        else()
+          # otherwise, we always set PADDLE_VERSION to 0.0.0 to represent latest
+          set(PADDLE_VERSION "0.0.0")
+        endif()
       endif()
     else()
       set(PADDLE_VERSION "0.0.0")


Increase timeout 60s -> 120s for dogfood test

--- tests.cmake
+++ tests.cmake
@@ -336,7 +336,7 @@
     PROPERTIES
     LABELS "tool=tas;expensive"
     COST 0.5
-    TIMEOUT 60
+    TIMEOUT 120
 )

 check_std_outputs(NAME "text disassembly"       COMMAND ${CMAKE_TENYR_COMPILER} ARGS -ftext -d)


(maint) Update Facter header file name.

(maint) Update Facter header file name.

There is no 'facter' header, so update to 'facter/version.h' to properly
locate Facter's include directory.

--- cmake/FindFacter.cmake
+++ cmake/FindFacter.cmake
@@ -1,6 +1,6 @@
 include(FindDependency)

-find_dependency(Facter DISPLAY "facter" HEADERS "facter" LIBRARIES facter)
+find_dependency(Facter DISPLAY "facter" HEADERS "facter/version.h" LIBRARIES facter)

 include(FeatureSummary)
 set_package_properties(Facter PROPERTIES DESCRIPTION "A library for collecting system facts" URL "https://github.com/puppetlabs/facter")


Search for zipconf.h too in FindLIBZIP

Search for zipconf.h too in FindLIBZIP

--- cmake/FindLIBZIP.cmake
+++ cmake/FindLIBZIP.cmake
@@ -25,10 +25,18 @@
 endif ()

 # Find header files and, on Windows, the DLL
-find_path (LIBZIP_INCLUDE_DIRS "zip.h"
+find_path (LIBZIP_INCLUDE_DIR_zip "zip.h"
     ${_LIBZIP_hints}
     PATHS ${LIBZIP_DIR} $ENV{LIBZIP_DIR}
     PATH_SUFFIXES "include")
+find_path (LIBZIP_INCLUDE_DIR_zipconf "zipconf.h"
+    ${_LIBZIP_hints}
+    PATHS ${LIBZIP_DIR} $ENV{LIBZIP_DIR}
+    PATH_SUFFIXES "include" "lib/libzip/include")
+set (LIBZIP_INCLUDE_DIRS
+    "${LIBZIP_INCLUDE_DIR_zip}" "${LIBZIP_INCLUDE_DIR_zipconf}"
+)
+
 mark_as_advanced (LIBZIP_INCLUDE_DIRS)

 if (WIN32)


[CMake/OpenAL] OpenAL soft's DLL is searched

- This allows it to be referenced & installed alongside projects

--- cmake/FindOpenAL.cmake
+++ cmake/FindOpenAL.cmake
@@ -49,6 +49,23 @@
         REQUIRED
         NO_DEFAULT_PATH
     )
+
+    if (WIN32)
+        # Under Windows, finding the DLL may be useful in some cases
+        find_file(
+            OPENAL_DLL
+
+            NAMES
+                soft_oal.dll
+            HINTS
+                ENV OPENALDIR
+                ENV OPENAL_SDK_PATH
+            PATH_SUFFIXES
+                bin bin/Win64
+            PATHS
+                ${OPENAL_SEARCH_PATHS}
+        )
+    endif ()
 elseif (APPLE)
     set(OPENAL_LIBS "-framework OpenAL")

@@ -100,3 +117,6 @@

 message("  - Include directory: ${OPENAL_INCLUDE_DIRS}")
 message("  - Library: ${OPENAL_LIBS}")
+if (WIN32)
+    message("  - DLL: ${OPENAL_DLL}")
+endif ()


Removed xxsum.c from xxHash target. (#122)

xxsum.c is an entry point (has a main) and should not be part of
the library. This already lead to an ODR violation when running
gtest.

--- cmake/FindxxHash.cmake
+++ cmake/FindxxHash.cmake
@@ -1,6 +1,6 @@
 set(DIR external/xxHash-r42)

-add_library(xxHash OBJECT ${DIR}/xxhash.c ${DIR}/xxhsum.c)
+add_library(xxHash OBJECT ${DIR}/xxhash.c)
 target_include_directories(xxHash SYSTEM PUBLIC ${DIR})

 add_library(xxHash::xxHash ALIAS xxHash)


Fix quotes

Fix quotes

--- cmake/frc-deploy.cmake
+++ cmake/frc-deploy.cmake
@@ -20,7 +20,7 @@

 # Use FRC_PREFER_TARGET to try a specific target first
 # Can be "mdns", "usb", "static", or an address
-string(TOLOWER ${FRC_PREFER_TARGET} FRC_PREFER_TARGET)
+string(TOLOWER "${FRC_PREFER_TARGET}" FRC_PREFER_TARGET)
 set(target_mdns "roboRIO-${TEAM_NUMBER}-FRC.local")
 set(target_usb "172.22.11.2")
 set(target_static "10.${TEAM_NUMBER_HIGH}.${TEAM_NUMBER_LOW}.2")


BUG: compiler-bindir and ccbin conflict

BUG: compiler-bindir and ccbin conflict

- Use CUDA_NVCC_FLAGS as a list
- Remove equal sign after compiler-bindir (FindCUDA does not expect it
when looking for flag conflict)

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -57,7 +57,7 @@

     IF(GCC_PATH)
       MESSAGE(STATUS "nvcc-check: Found adequate gcc (${GCC_PATH})... telling nvcc to use it!")
-      SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC_PATH})
+      LIST(APPEND CUDA_NVCC_FLAGS --compiler-bindir ${GCC_PATH})
     ELSE(GCC_PATH)
       MESSAGE(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda.\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
     ENDIF(GCC_PATH)


Minor tweaks to packaging

Minor tweaks to packaging

--- projects/tomviz.bundle.common.cmake
+++ projects/tomviz.bundle.common.cmake
@@ -1,9 +1,10 @@
 # Enable CPack packaging.
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "tomviz")
-set(CPACK_PACKAGE_NAME "tomviz")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Tomviz")
+set(CPACK_PACKAGE_NAME "Tomviz")
 set(CPACK_PACKAGE_VENDOR "Kitware")
 set(CPACK_PACKAGE_VERSION_MAJOR ${tomviz_version_major})
 set(CPACK_PACKAGE_VERSION_MINOR ${tomviz_version_minor})
+set(CPACK_PACKAGE_INSTALL_DIRECTORY "tomviz")
 if (tomviz_version_suffix)
   set(CPACK_PACKAGE_VERSION_PATCH ${tomviz_version_patch}-${tomviz_version_suffix})
 else()


copy zlib.lib to zdll.lib to stop Qt from annoying

--- CMake/External_zlib.cmake
+++ CMake/External_zlib.cmake
@@ -55,6 +55,13 @@
         )

       endif()
+
+    if(MSVC)
+      ExternalProject_Add_Step(${proj} msvc_copy_hell
+        COMMAND ${CMAKE_COMMAND} -E copy ${ZLIB_SB_BUILD_DIR}/zlib.lib ${CMAKE_INSTALL_PREFIX}/lib/zdll.lib
+        DEPENDEES install
+      )
+    endif()

      message(STATUS "  Using zlib SuperBuild version")
 endif()


Revert "Allow for compilation of r bindings if FIND_LIBRARY fails to find the default framework location for macOS"

This reverts commit 1a0b5efa2418845d7a4fb64312918f05913fcbc7.

--- copasi/common.cmake
+++ copasi/common.cmake
@@ -39,9 +39,6 @@

 if (APPLE)
   FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation REQUIRED)
-  if (NOT COREFOUNDATION_LIBRARY AND EXISTS /System/Library/Frameworks/CoreFoundation.framework)
-  set(COREFOUNDATION_LIBRARY /System/Library/Frameworks/CoreFoundation.framework)
-  endif()
   MARK_AS_ADVANCED (COREFOUNDATION_LIBRARY)
   SET(SE_EXTERNAL_LIBS ${SE_EXTERNAL_LIBS} ${COREFOUNDATION_LIBRARY})
 endif (APPLE)


[build] Disallow calls to objc_msgSend() with no function pointer cast.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -280,6 +280,9 @@
   if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4068")
   endif()
+
+  # Disallow calls to objc_msgSend() with no function pointer cast.
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DOBJC_OLD_DISPATCH_PROTOTYPES=0")
 endmacro()

 # Like 'llvm_config()', but uses libraries from the selected build


Simplify

Simplify

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

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -52,13 +52,10 @@
 #     - The CMake Generator to use (e.g. "Unix Makefiles", or "Ninja", see
 #       $ man cmake)
 #     - If unspecified the generator of a configured build directory will
-#       be used. If this information is not available, an error is thrown.
+#       be used, otherwise "Unix Makefiles".
 #
 #   TRACK
 #     - TODO (defaults to "Experimental")
-#
-#   NO_JOBS
-#     - The number of concurrent build and test jobs (defaults to 1).
 #
 #   CONFIG_FILE
 #     - A configuration file (see ../deal.II/docs/development/Config.sample)
@@ -172,11 +169,8 @@
   IF(NOT "${_generator}" STREQUAL "")
     SET(CTEST_CMAKE_GENERATOR ${_generator})
   ELSE()
-    MESSAGE(FATAL_ERROR "
-The build directory is not configured and CTEST_CMAKE_GENERATOR is not set.
-Please set CTEST_CMAKE_GENERATOR to the generator that should be used.
-"
-     )
+    # default to "Unix Makefiles"
+    SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
   ENDIF()
 ELSE()
   # ensure that CTEST_CMAKE_GENERATOR (that was apparantly set) is
@@ -325,16 +319,6 @@
 ENDIF()

 #
-# NO_JOBS:
-#
-
-IF("${NO_JOBS}" STREQUAL "")
-  SET(NO_JOBS "1")
-ENDIF()
-
-MESSAGE("-- NO_JOBS:                ${NO_JOBS}")
-
-#
 # Declare files that should be submitted as notes:
 #

@@ -362,6 +346,6 @@
   --build ${CTEST_BINARY_DIRECTORY} --target setup_test
   )

-CTEST_TEST(PARALLEL_LEVEL ${NO_JOBS})
+CTEST_TEST()

 CTEST_SUBMIT()


vigra: Always build with -O2 instead of -O3 (does this slow things down terribly?)

--- vigra.cmake
+++ vigra.cmake
@@ -84,7 +84,7 @@
         -DCMAKE_CXX_FLAGS=-pthread

         -DCMAKE_CXX_LINK_FLAGS=-pthread
-        -DCMAKE_CXX_FLAGS_RELEASE="${CMAKE_CXX_FLAGS_RELEASE}" # On the Janelia cluster, use -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG" (not -O3)
+        -DCMAKE_CXX_FLAGS_RELEASE=-O2\ -DNDEBUG # Some versions of gcc miscompile vigra at -O3
         -DCMAKE_CXX_FLAGS_DEBUG="${CMAKE_CXX_FLAGS_DEBUG}"
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
     TEST_COMMAND        ${BUILDEM_ENV_STRING} $(MAKE) check


Avoid glog on debug builds

Avoid glog on debug builds

Former-commit-id: 147b3d79d7ccdf5ee01143b546b940a867e861d0

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -55,7 +55,9 @@
         endif()
         find_package(Fortran REQUIRED)
     endif()
-
+    if(CMAKE_BUILD_TYPE MATCHES "Debug")
+        list(APPEND DMRG_CONAN_OPTIONS OPTIONS ceres-solver:use_glog=False)
+    endif()

     unset(CONAN_BUILD_INFO)


cmake: fix error in converting project variables to namespaced ones

Closes https://github.com/espressif/esp-idf/issues/2764

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -18,25 +18,31 @@

 macro(project name)

-    # Bridge existing documented variable names with library namespaced variables in order for old projects to work.
+    # Bridge existing documented variable names with library namespaced
+    # variables in order for old projects to work.
+
     if(COMPONENT_DIRS)
         spaces2list(COMPONENT_DIRS)

         foreach(component_dir ${COMPONENT_DIRS})
-            get_filename_component(full_path ${component_dir} ABSOLUTE)
-            get_filename_component(idf_path "${IDF_PATH}/components" ABSOLUTE)
+            get_filename_component(component_dir ${component_dir} ABSOLUTE BASE_DIR ${CMAKE_SOURCE_DIR})
+            list(APPEND IDF_COMPONENT_DIRS "${component_dir}")
+        endforeach()
+    endif()

-            if(NOT full_path STREQUAL idf_path)
-                set(IDF_EXTRA_COMPONENT_DIRS "${IDF_EXTRA_COMPONENT_DIRS} ${component_dir}")
-            endif()
+    if(EXTRA_COMPONENT_DIRS)
+        spaces2list(EXTRA_COMPONENT_DIRS)
+
+        foreach(component_dir ${EXTRA_COMPONENT_DIRS})
+            get_filename_component(component_dir ${component_dir} ABSOLUTE BASE_DIR ${CMAKE_SOURCE_DIR})
+            list(APPEND IDF_EXTRA_COMPONENT_DIRS "${component_dir}")
         endforeach()
-    else()
-        if(MAIN_SRCS)
-            set(IDF_EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS} ${CMAKE_SOURCE_DIR}/components")
-        else()
-            set(IDF_EXTRA_COMPONENT_DIRS "${EXTRA_COMPONENT_DIRS} \
-                                        ${CMAKE_SOURCE_DIR}/components ${CMAKE_SOURCE_DIR}/main")
-        endif()
+    endif()
+
+    list(APPEND IDF_EXTRA_COMPONENT_DIRS "${CMAKE_SOURCE_DIR}/components")
+
+    if(NOT MAIN_SRCS)
+        list(APPEND IDF_EXTRA_COMPONENT_DIRS "${CMAKE_SOURCE_DIR}/main")
     endif()

     if(COMPONENTS)


Bump paraview version

Bump paraview version

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -29,7 +29,7 @@
 set(PARAVIEW_VERSION 4.3)
 add_revision(paraview
   GIT_REPOSITORY git://github.com/gcasey/ParaView.git
-  GIT_TAG fixedrep)
+  GIT_TAG origin/veloview)

 add_revision(veloview
     SOURCE_DIR ${CMAKE_SOURCE_DIR}/..


Bump the default OSX Deployment target to 10.10

--- standard/StandardProject.cmake
+++ standard/StandardProject.cmake
@@ -67,7 +67,7 @@
       if(_developer_sdk_version)
         set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${_developer_sdk_version}.sdk" CACHE STRING "Mac OS X build environment" FORCE)
         if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
-          set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Mac OS X deployment target" FORCE)
+          set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "Mac OS X deployment target" FORCE)
         endif()
       endif()
     endif()


#97485: cmake fails for DAs in trunk + some cleanup

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -151,10 +151,6 @@
 	add_custom_target(${BASIC_TARGET}
 	WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
 	)
-  set(DYN_TARGET "daqDA-${ONLINEDETECTORNAME}-all-dyn")
-  add_custom_target(${DYN_TARGET}
-    WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-    )
 	set(BASIC_RPM "daqDA-${ONLINEDETECTORNAME}-all-rpm")
 	add_custom_target(${BASIC_RPM}
 	WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
@@ -187,7 +183,6 @@
 	  endif(DANAME)
 	add_dependencies(${BASIC_TARGET} ${DATARGETNAME})
 	add_dependencies(${BASIC_RPM} ${DATARGETNAME}-rpm)
-      add_dependencies(${DYN_TARGET} ${DATARGETNAME}-dyn)
 	 set(DATARGETDIR "${DAINSTALL}/${DAMODULE}/tgt_$ENV{ALICE_TARGET}")
 	  file(MAKE_DIRECTORY ${DATARGETDIR})
 	  set(DAOBJ "${DATARGETDIR}/${DAMODULE}${SUBDAMODULE}${DANAME}da.o")
@@ -195,7 +190,6 @@
 	  set(DALIB "${DAMODULE}${SUBDAMODULE}${DANAME}DA")
 	  set(DAEXE "${DAMODULE}${SUBDAMODULE}${DANAME}da.exe")
 	  set(DADEP "${DATARGETDIR}/${DAMODULE}${SUBDAMODULE}${DANAME}da.d")
-      set(DADYNEXE "${DAMODULE}${SUBDAMODULE}${DANAME}da")

 	# DAVERSION
       execute_process(COMMAND svn info ${CMAKE_SOURCE_DIR}/${DASRC} OUTPUT_VARIABLE _daversion OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -244,15 +238,10 @@
 	  set(CMAKE_MODULE_LINKER_FLAGS ${LDFLAGS})

 add_dependencies(DA-all ${DATARGETNAME})
-      add_dependencies(DA-dyn-all ${DATARGETNAME}-dyn)
 add_custom_target(${DATARGETNAME}
 WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
 )
 add_dependencies(${DATARGETNAME} ${DAEXE})
-      add_custom_target(${DATARGETNAME}-dyn
-	WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
-	)
-      add_dependencies(${DATARGETNAME}-dyn ${DADYNEXE})

 set(ZIP)
 foreach(_lib ${ALIROOTALIBS})
@@ -476,16 +465,7 @@
 )

-#target_link_libraries(${DAEXE} "-L" "lib${DALIB}.a" ${DAOBJ} ${EXTRAROOTLIB} "${ROOTALIBDIR}/libRoot.a" "${ROOTALIBDIR}/libfreetype.a" "${ROOTALIBDIR}/libpcre.a" ${SYSLIBS} ${DAQDALIB} ${MONITORLIBS} ${AMOREDALIBS})
-
 add_dependencies(${DAEXE} ${DASRC} DAOBJ_${DAEXE}_ ${BINPATH} ${LIBPATH} ${DALIB}.a ${DAQDALIB} ${ROOTLIB})
-
-      add_custom_target(${DADYNEXE}
-	COMMAND echo "***** Making executable ${DADYNEXE} *****"
-	COMMAND g++ ${LDFLAGS} -L${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${DAOBJ} ${ALIROOTDLIBS} ${ROOTDLIBS} ${SYSLIBS} ${DAQDALIB} ${AMOREDADLIBS} ${MONITORLIBS} -o ${DADYNEXE}
-	WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-	)
-      add_dependencies(${DADYNEXE} ${DASRC} DAOBJ_${DAEXE}_ ${BINPATH} ${LIBPATH} ${DAQDALIB} ${ALIROOTDLIBS})

 add_custom_target(DAOBJ_${DAEXE}_
 )
@@ -494,10 +474,7 @@
 COMMAND echo "***** Compiling ${DASRC} *****"
 COMMAND echo "${DFLAGS}"
 	COMMAND g++ -c ${AMOREDEFINITIONS} -D${CMAKE_SYSTEM_NAME} ${DATE_CFLAGS} -I${DATE_ROOT}/infoLogger -I${DATE_ROOT}/logbook -I${DAQDADIR} -I${CMAKE_SOURCE_DIR}/RAW -I${CMAKE_BINARY_DIR}/include -I${ROOTINCDIR} ${mod} ${date_head} ${CMAKE_SOURCE_DIR}/${DASRC} -o ${DAOBJ}
-	#COMMAND g++ -c ${DATEFLAGS} -I${DAQDADIR} -I${CMAKE_SOURCE_DIR}/RAW -I${CMAKE_BINARY_DIR}/include -I${ROOTINCDIR} ${mod} ${date_head} ${CMAKE_SOURCE_DIR}/${DASRC} -o ${DAOBJ}
-# -DDATE_SYS=${CMAKE_SYSTEM_NAME} -DDATE_SYS=Linux -Dlong32="int" -Dlong64="long long" -DdatePointer="long" -I${DATE_ROOT}/rorc -I${DATE_ROOT}/runControl -I${DATE_ROOT}/readList -I${DATE_ROOT}/eventBuilder -I${DATE_ROOT}/banksManager -I${DATE_ROOT}/bufferManager -I${DATE_ROOT}/db -I${DATE_ROOT}/commonDefs -I${DATE_ROOT}/monitoring
 	WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-	# ${CMAKE_SOURCE_DIR}
 )
 add_dependencies(DAOBJ_${DAEXE}_ DADEP_${DAEXE}_ )

@@ -508,17 +485,12 @@
 COMMAND echo "***** Making detector-algorithm dependencies ${DADEP} *****"
 	COMMAND g++ -MM ${DATE_CFLAGS} -I${DAQDADIR} -I${CMAKE_SOURCE_DIR}/RAW -I${CMAKE_BINARY_DIR}/include -I${ROOTINCDIR} ${mod} ${date_head} ${CMAKE_SOURCE_DIR}/${DASRC} > ${DADEP}
 	WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-	# ${CMAKE_SOURCE_DIR}
-	# -DDATE_SYS=Linux -Dlong32="int" -Dlong64="long long" -DdatePointer="long" -I${DATE_ROOT}/rorc -I${DATE_ROOT}/runControl -I${DATE_ROOT}/readList -I${DATE_ROOT}/eventBuilder -I${DATE_ROOT}/banksManager -I${DATE_ROOT}/bufferManager -I${DATE_ROOT}/db -I${DATE_ROOT}/commonDefs -I${DATE_ROOT}/monitoring -I${DATE_ROOT}/infoLogger -I${DATE_ROOT}/logbook
 )

 add_custom_command(TARGET clean
 COMMAND rm -rf junk*.exe
 WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
-      add_custom_command(TARGET clean
-	COMMAND rm -rf ${DADYNEXE}
-	WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})

 	endif(match)


working gsl_config call, fatal error if failed

--- cmake/FindGSL.cmake
+++ cmake/FindGSL.cmake
@@ -84,7 +84,10 @@

     IF (GSL_CONFIG)
       # set CXXFLAGS to be fed into CXX_FLAGS by the user:
-      SET(GSL_CXX_FLAGS "`${GSL_CONFIG} --cflags`")
+      EXEC_PROGRAM(${GSL_CONFIG}
+        ARGS --cflags
+        OUTPUT_VARIABLE _local_gsl_cxx_flags)
+      SET(GSL_CXX_FLAGS ${_local_gsl_cxx_flags}/include CACHE STRING INTERNAL)

       # set INCLUDE_DIRS to prefix+include
       EXEC_PROGRAM(${GSL_CONFIG}
@@ -132,9 +135,11 @@
   	  #MESSAGE(STATUS "Using GSL from ${GSL_PREFIX}")

     ELSE(GSL_CONFIG)
-      MESSAGE("FindGSL.cmake: gsl-config not found. Please set it manually. GSL_CONFIG=${GSL_CONFIG}")
+      MESSAGE(FATAL_ERROR "FindGSL.cmake: gsl-config not found. Please set it manually. GSL_CONFIG=${GSL_CONFIG}")
     ENDIF(GSL_CONFIG)

+  ELSE(UNIX)
+    MESSAGE(FATAL_ERROR "Missing case: NOT WIN32 and NOT UNIX")
   ENDIF(UNIX)
 ENDIF(WIN32)


Improved detection of OIS, with default paths built by the Ogre dependencies package.

--- cmake/FindOIS.cmake
+++ cmake/FindOIS.cmake
@@ -3,10 +3,28 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(OIS_H_PATH NAMES OIS.h PATH_SUFFIXES OIS)
-find_library(OIS_LIB NAMES OIS libOIS)
-find_library(OIS_LIB_DBG NAMES OIS_d libOIS_d)
+set(ENV_OIS_HOME $ENV{OIS_HOME})
+if (ENV_OIS_HOME)
+  string( REGEX REPLACE "\\\\" "/" ENV_OIS_HOME ${ENV_OIS_HOME} )
+endif ()

+set(OIS_PREFIX_PATH
+  ${OIS_HOME} ${ENV_OIS_HOME}
+)
+
+
+find_path(OIS_H_PATH NAMES OIS.h
+        PATHS ${OIS_PREFIX_PATH}
+        PATH_SUFFIXES OIS include includes)
+
+find_library(OIS_LIB NAMES OIS libOIS
+        PATHS ${OIS_PREFIX_PATH}
+        PATH_SUFFIXES Release lib/Release
+        )
+find_library(OIS_LIB_DBG NAMES OIS_d libOIS_d
+        PATHS ${OIS_PREFIX_PATH}
+        PATH_SUFFIXES Debug lib/Debug
+        )
 mark_as_advanced(OIS_H_PATH OIS_LIB OIS_LIB_DBG)

 find_package_handle_standard_args(OIS DEFAULT_MSG OIS_LIB OIS_H_PATH)


r11269/sofa : push 4e590b6..5a54685

r11269/sofa : push 4e590b6..5a54685

* commit 5a54685096f67e09499213e1af754872f90f3f65
cmake: check that the options for float and double are not both enabled

|  1 file changed, 2 insertions(+)

* commit 1e833ceda4d6bc12fa4b03a7f48b433fcd3716b1
cmake: cosmetic changes

|  1 file changed, 15 insertions(+), 21 deletions(-)

* commit cf948df24a95f7fe20fa593e16440f7d7697b669
cmake: disable tutorial chainHybrid, because it depends on a plugin

   1 file changed, 2 insertions(+), 1 deletion(-)

Former-commit-id: ec4487fb7b428f11af127ae1ccc419e3f5390c19

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -185,28 +185,23 @@
 endif()

-## tutorial
+## tutorials
 if(PS3)
-    sofa_option(SOFA-TUTORIAL_CHAIN_HYBRID BOOL OFF "Build Chain hybrid tutorial")
-    sofa_option(SOFA-TUTORIAL_COMPOSITE_OBJECT BOOL OFF "Build Composite object tutorial")
-    sofa_option(SOFA-TUTORIAL_HOUSE_OF_CARDS BOOL OFF "Build House of cards tutorial")
-    sofa_option(SOFA-TUTORIAL_MIXED_PENDULUM BOOL OFF "Build Mixed Pendulum tutorial")
-    sofa_option(SOFA-TUTORIAL_ONE_PARTICLE BOOL OFF "Build One particle tutorial")
-    #sofa_option(SOFA-TUTORIAL_ONE_PARTICLE_WITH_SOFA_TYPEDEFS BOOL OFF "Build One particle with sofa typedefs tutorial")
-    sofa_option(SOFA-TUTORIAL_ONE_TETRAHEDRON BOOL OFF "Build One tetrahedron tutorial")
-    #sofa_option(SOFA-TUTORIAL_ANATOMY_MODELLING BOOL OFF "Build Anatomy modelling tutorial")
-else()
-    sofa_option(SOFA-TUTORIAL_CHAIN_HYBRID BOOL ON "Build Chain hybrid tutorial")
-    sofa_option(SOFA-TUTORIAL_COMPOSITE_OBJECT BOOL ON "Build Composite object tutorial")
-    sofa_option(SOFA-TUTORIAL_HOUSE_OF_CARDS BOOL OFF "Build House of cards tutorial")
-    sofa_option(SOFA-TUTORIAL_MIXED_PENDULUM BOOL ON "Build Mixed Pendulum tutorial")
-    sofa_option(SOFA-TUTORIAL_ONE_PARTICLE BOOL ON "Build One particle tutorial")
-    #sofa_option(SOFA-TUTORIAL_ONE_PARTICLE_WITH_SOFA_TYPEDEFS BOOL OFF "Build One particle with sofa typedefs tutorial")
-    sofa_option(SOFA-TUTORIAL_ONE_TETRAHEDRON BOOL ON "Build One tetrahedron tutorial")
-    #sofa_option(SOFA-TUTORIAL_ANATOMY_MODELLING BOOL OFF "Build Anatomy modelling tutorial")
-endif()
-
-# core
+    set(tutorial_option_default_value OFF)
+else()
+    set(tutorial_option_default_value ON)
+endif()
+# Disabled by default because it depends on the SceneCreator plugin - Marc
+sofa_option(SOFA-TUTORIAL_CHAIN_HYBRID BOOL OFF "Build the \"Chain Hybrid\" tutorial")
+sofa_option(SOFA-TUTORIAL_COMPOSITE_OBJECT BOOL ${tutorial_option_default_value} "Build the \"Composite Object\" tutorial")
+sofa_option(SOFA-TUTORIAL_HOUSE_OF_CARDS BOOL ${tutorial_option_default_value} "Build the \"House of Cards\" tutorial")
+sofa_option(SOFA-TUTORIAL_MIXED_PENDULUM BOOL ${tutorial_option_default_value} "Build the \"Mixed Pendulum\" tutorial")
+sofa_option(SOFA-TUTORIAL_ONE_PARTICLE BOOL ${tutorial_option_default_value} "Build the \"One Particle\" tutorial")
+#sofa_option(SOFA-TUTORIAL_ONE_PARTICLE_WITH_SOFA_TYPEDEFS BOOL ${tutorial_option_default_value} "Build the \"One Particle with sofa typedefs\" tutorial")
+sofa_option(SOFA-TUTORIAL_ONE_TETRAHEDRON BOOL ${tutorial_option_default_value} "Build the \"One Tetrahedron\" tutorial")
+#sofa_option(SOFA-TUTORIAL_ANATOMY_MODELLING BOOL ${tutorial_option_default_value} "Build the \"Anatomy Modelling\" tutorial")
+
+## framework
 sofa_option(SOFA-LIB_CORE BOOL ON "")
 sofa_option(SOFA-LIB_DEFAULTTYPE BOOL ON "")
 sofa_option(SOFA-LIB_HELPER BOOL ON "")
@@ -365,6 +360,8 @@
     list(APPEND compilerDefines SOFA_FLOAT)
 elseif(SOFA-MISC_USE_DOUBLE AND NOT SOFA-MISC_USE_FLOAT)
     list(APPEND compilerDefines SOFA_DOUBLE)
+elseif(SOFA-MISC_USE_DOUBLE AND SOFA-MISC_USE_FLOAT)
+    message(FATAL_ERROR "You can't enable both SOFA-MISC_USE_FLOAT and SOFA-MISC_USE_DOUBLE")
 endif()

 # use OpenMP multithreading


kconfig: pass env variable to menuconfig invocation

--- tools/cmake/kconfig.cmake
+++ tools/cmake/kconfig.cmake
@@ -61,12 +61,13 @@
     add_custom_target(menuconfig
         ${menuconfig_depends}
         # create any missing config file, with defaults if necessary
-        COMMAND ${confgen_basecommand} --output config ${SDKCONFIG}
+        COMMAND ${confgen_basecommand} --env "IDF_TARGET=${IDF_TARGET}" --output config ${SDKCONFIG}
         COMMAND ${CMAKE_COMMAND} -E env
         "COMPONENT_KCONFIGS=${kconfigs}"
         "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}"
         "IDF_CMAKE=y"
         "KCONFIG_CONFIG=${SDKCONFIG}"
+        "IDF_TARGET=${IDF_TARGET}"
         ${CMAKE_BINARY_DIR}/${MCONF} ${ROOT_KCONFIG}
         VERBATIM
         USES_TERMINAL)


Change ACRE_LINK_TYPE to INTERCEPT_LINK_TYPE (#149)

`ACRE_LINK_TYPE` is not defined anywhere, causing this error when building a client plugin:
`value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug'`

This will fix that.

--- CMakeModules/cxx_compiler_functions.cmake
+++ CMakeModules/cxx_compiler_functions.cmake
@@ -3,12 +3,12 @@
 		# This target defaults to 32-bit on linux
 		SET(CMAKE_CXX_FLAGS "-std=c++11 -march=i686 -m32 -O2 -s -fPIC -fpermissive")

-		if(ACRE_LINK_TYPE STREQUAL "static")
+		if(INTERCEPT_LINK_TYPE STREQUAL "static")
 			set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
 			set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc -static-libstdc++")
 		endif()
 	elseif(MSVC)
-		if(ACRE_LINK_TYPE STREQUAL "static")
+		if(INTERCEPT_LINK_TYPE STREQUAL "static")
 			set(CMAKE_CXX_FLAGS_DEBUG "/D _DEBUG /MTd /Zi /Ob0 /Od /RTC1" PARENT_SCOPE)
 			set(CMAKE_CXX_FLAGS_MINSIZEREL     "/MT /O1 /Ob1 /D NDEBUG" PARENT_SCOPE)
 			set(CMAKE_CXX_FLAGS_RELEASE       "/MT /O2 /Ob2 /D NDEBUG" PARENT_SCOPE)


cmake: warn if libgmx seems to be double, but GMX_DOUBLE=OFF

--- CMakeModules/FindGROMACS.cmake
+++ CMakeModules/FindGROMACS.cmake
@@ -81,7 +81,7 @@
   include(CheckLibraryExists)
   check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" GromacsVersion "" FOUND_GROMACS_VERSION)
   if(NOT FOUND_GROMACS_VERSION)
-    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY and GROMACS_DEP_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so' -DGROMACS_DEP_LIBRARIES='/path/to/libblas.so;/path/to/libm.so') !")
+    message(FATAL_ERROR "Could not find GromacsVersion in ${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}, take look at the error message in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log to find out what was going wrong. If you don't have pkg-config installed you will most likely have to set GROMACS_LIBRARY and GROMACS_DEP_LIBRARY by hand which sets the gromacs lib and it's depencies (i.e. -DGROMACS_LIBRARY='/path/to/libgmx.so' -DGROMACS_DEP_LIBRARIES='/path/to/libblas.so;/path/to/libm.so') ! For double precision gromacs please use -DGMX_DOUBLE=ON additionally.")
   endif(NOT FOUND_GROMACS_VERSION)
   check_library_exists("${GROMACS_LIBRARY};${GROMACS_DEP_LIBRARIES}" init_mtop "" FOUND_GROMACS_INIT_MTOP)
   if(NOT FOUND_GROMACS_INIT_MTOP)
@@ -97,6 +97,11 @@
     set(GMX_VERSION 50)
   endif(FOUND_GROMACS_INIT_DOMDEC_VSITES)
   set(GROMACS_VERSION ${GMX_VERSION} CACHE STRING "Gromacs lib interface version")
+
+  #if(${GROMACS_LIBRARY} MATCHES ".*lib[^/.]_d\\.[^.]*$" AND NOT GMX_DOUBLE)
+  if(${GROMACS_LIBRARY} MATCHES "lib[^/]*_d\\.[^.]*$" AND NOT GMX_DOUBLE)
+    message(WARNING "You are using ${GROMACS_LIBRARY}, which seems to be a double precision library. If this is not the case ignore this warning otherwise enable compling against double precision gromacs using -DGMX_DOUBLE=ON")
+  endif()
 else(GROMACS_LIBRARY)
   set(GMX_VERSION 45)
 endif (GROMACS_LIBRARY)


finish migration to new build macros -- check before linking debug libs

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1296 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -207,8 +207,10 @@
     # FindPythonLibs.cmake
     if (PYTHONLIBS_FOUND)
         set (PYTHON_LIBRARIES ${PYTHON_LIBRARY})
-        set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
         set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
+        if (PYTHON_DEBUG_LIBRARY)
+            set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
+        endif ()
     endif ()

 endmacro (configure_python)


modules: updated FindCorrade.cmake from Corrade repository.

--- modules/FindCorrade.cmake
+++ modules/FindCorrade.cmake
@@ -97,7 +97,7 @@
 #
 #   This file is part of Corrade.
 #
-#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013
+#   Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
 #             Vladimír Vondruš <mosra@centrum.cz>
 #
 #   Permission is hereby granted, free of charge, to any person obtaining a


cmake: fixed os.cmake to work when conan install is already run

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -41,13 +41,18 @@
   endif()
 endif()

-
-
-if (CONAN_EXPORTED)
+if (CONAN_EXPORTED OR CONAN_LIBS)
   # standard conan installation, deps will be defined in conanfile.py
   # and not necessary to call conan again, conan is already running
-  include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake)
-  conan_basic_setup()
+  if (CONAN_EXPORTED)
+    include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake)
+    conan_basic_setup()
+    #hack for editable package
+    set(INCLUDEOS_PREFIX ${CONAN_INCLUDEOS_ROOT})
+  else()
+    #hack for editable package
+    set(INCLUDEOS_PREFIX ${CONAN_INCLUDEOS_ROOT}/install)
+  endif()

   #TODO use these
@@ -72,11 +77,12 @@
   set(TRIPLE "${ARCH}-pc-linux-elf")
   set(LIBRARIES ${CONAN_LIBS})
   set(ELF_SYMS elf_syms)
-  set(LINK_SCRIPT ${CONAN_INCLUDEOS_ROOT}/${ARCH}/linker.ld)
+  set(LINK_SCRIPT ${INCLUDEOS_PREFIX}/${ARCH}/linker.ld)
   #includeos package can provide this!
   include_directories(
-    ${CONAN_INCLUDEOS_ROOT}/include/os
-  )
+    ${INCLUDEOS_PREFIX}/include/os
+  )
+

 else()
   #TODO initialise self
@@ -89,6 +95,7 @@
       set(ARCH x86_64)
     endif()
   endif()
+
   set(TRIPLE "${ARCH}-pc-linux-elf")
   include_directories(
     ${INCLUDEOS_PREFIX}/${ARCH}/include/c++/v1
@@ -224,6 +231,13 @@
   set(LINK_SCRIPT ${INCLUDEOS_PREFIX}/${ARCH}/linker.ld)
 endif()

+#TODO get the TARGET executable from diskimagebuild
+if (CONAN_TARGETS)
+  #find_package(diskimagebuild)
+  set(DISKBUILDER diskbuilder)
+else()
+  set(DISKBUILDER ${INCLUDEOS_PREFIX}/bin/diskbuilder)
+endif()
 # arch and platform defines
 #message(STATUS "Building for arch ${ARCH}, platform ${PLATFORM}")

@@ -461,10 +475,10 @@

   add_custom_command(
       OUTPUT  memdisk.fat
-      COMMAND ${INCLUDEOS_PREFIX}/bin/diskbuilder -o memdisk.fat ${REL_PATH}
+      COMMAND ${DISKBUILDER} -o memdisk.fat ${REL_PATH}
       COMMENT "Creating memdisk"
       DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/manifest.txt ${TARGET}_disccontent
-      )
+  )
   add_custom_target(${TARGET}_diskbuilder DEPENDS memdisk.fat)
   os_add_dependencies(${TARGET} ${TARGET}_diskbuilder)
   os_add_memdisk(${TARGET} "${CMAKE_CURRENT_BINARY_DIR}/memdisk.fat")


- CMake: Fixed a stupid mistake that gcc happened to recognize as valid, replaced "and" by "&&" operator as it should have been from the start

--- CMakeConfig/templates/yafray_config.h.cmake
+++ CMakeConfig/templates/yafray_config.h.cmake
@@ -5,7 +5,7 @@
 #include <core_api/color_console.h>
 #include <core_api/console_verbosity.h>

-#if defined(_WIN32) and !defined(__MINGW32__)
+#if defined(_WIN32) && !defined(__MINGW32__)
 	#define NOMINMAX
 #endif


avoid some configure warnings to show up on the dashboard

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -19,7 +19,7 @@
 SET (CTEST_DROP_SITE_CDASH TRUE)
 SET (CTEST_CUSTOM_WARNING_EXCEPTION
     ${CTEST_CUSTOM_WARNING_EXCEPTION}
-    "Warning: GNU Bison not available.*"
-    "Warning: FlexLexer.h has not been found.*"
-    "Warning: using repository file")
+    "Warning: GNU Bison.*"
+    "Warning: using repository file.*"
+    "Warning: urning: GNU Flex.*")
 # SET (CTEST_COMPRESS_SUBMISSION ON)


Experimenting with Boost Test.

Experimenting with Boost Test.

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -1,6 +1,5 @@
 IF(WIN32)
-    SET(CTEST_CUSTOM_POST_TEST
-      "C:\Windows\System32\cmd /C type Testing\Temporary\LastTest.log")
+    SET(CTEST_CUSTOM_POST_TEST "C:\\Windows\\System32\\cmd /C type Testing\\Temporary\\LastTest.log")
 ELSE(WIN32)
     SET(CTEST_CUSTOM_POST_TEST "cat Testing/Temporary/LastTest.log")
 ENDIF(WIN32)


uninstaller: add TintinCDKCameraLensOnly.conf to the remove list

--- windows_all_in_installer_config.cmake
+++ windows_all_in_installer_config.cmake
@@ -51,6 +51,7 @@
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCamera.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraHighAmbient.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraShortRange.conf`\n
+  \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraLensOnly.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraNoCalibration.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraLongRange.conf`\n
   \\\${FileRemove} `C:\\\\Program Files\\\\VoxelCommon\\\\conf` `TintinCDKCameraPhaseOffset.bin`\n


increase timeout for msan tests

increase timeout for msan tests

--- CI/config/with_msan.cmake
+++ CI/config/with_msan.cmake
@@ -3,3 +3,4 @@
 include(without_python)
 set_option(USE_SANITIZER msan)
 set_option(USE_LIBCXX "/libcxx_msan")
+set_option(tests_timeout 48)


Fix include installation directory

Fix include installation directory

Change-Id: I0d8d8e09604afe455178f13eab66b7b0e7e2275b

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -310,7 +310,7 @@
       ${PARAM_INTERFACE_LIB_EXTRA_INCLUDE_DIRS}
   )

-  set(INCLUDE_PREFIX "${CMAKE_INSTALL_INCLUDEDIR}/${CUSTOM_PREFIX}/modules/core")
+  set(INCLUDE_PREFIX "${CMAKE_INSTALL_INCLUDEDIR}/${CUSTOM_PREFIX}/modules/${VALUE_NAME}")

   set_property (TARGET ${VALUE_CODE_IMPLEMENTATION_LIB}interface
     PROPERTY PUBLIC_HEADER
@@ -338,7 +338,7 @@
   set(prefix ${CMAKE_INSTALL_PREFIX})
   set(exec_prefix "\${prefix}")
   set(libdir "\${exec_prefix}/${CMAKE_INSTALL_LIBDIR}")
-  set(includedir "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}/${CUSTOM_PREFIX}/modules/${VALUE_NAME}")
+  set(includedir "\${prefix}/${INCLUDE_PREFIX}")

   execute_process (
      COMMAND ${KTOOL_PROCESSOR_LINE} -it cpp_pkgconfig -c ${CMAKE_CURRENT_BINARY_DIR} -lf


CMake: improved compile flags and added default build type. Also fixed the Eigen compile flags.

--- CMake/CompilerFlags.cmake
+++ CMake/CompilerFlags.cmake
@@ -1,5 +1,21 @@
 MESSAGE( STATUS ">> -------------------------------------------------------------------- <<" )
 MESSAGE( STATUS ">> --------------------- CompilerFlags.cmake -------------------------- <<" )
+
+######### Set a default build type in case none is passed #############
+if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
+    message(STATUS "Setting build type to 'Release' as none was specified.")
+    set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
+    # Set the possible values of build type for cmake-gui
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
+endif()
+#######################################################################
+
+######### Extra flags for Eigen #######################################
+SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        -DEIGEN_NO_DEBUG -DEIGEN_FAST_MATH=0")
+SET(CMAKE_CXX_FLAGS_MINSIZEREL     "${CMAKE_CXX_FLAGS_DEBUG}          -DEIGEN_NO_DEBUG -DEIGEN_FAST_MATH=0")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DEIGEN_FAST_MATH=0")
+SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG}          -DEIGEN_FAST_MATH=0")
+#######################################################################

 ######## GNU Compiler Collection - gcc ###############################
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
@@ -10,12 +26,12 @@
 	message(FATAL_ERROR "GCC version must be at least 5.1!")
 endif()
 ### Compiler Flags
-set( CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -DEIGEN_NO_DEBUG" )
+set( CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS} -std=c++11" )
 ### Linker Flags
 if (APPLE)
-	set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -DEIGEN_NO_DEBUG -Wl,-no_compact_unwind -pthread" )
+	set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_compact_unwind -pthread" )
 else()
-	set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -DEIGEN_NO_DEBUG -pthread" )
+	set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -pthread" )
 endif()
 # set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}    "-O3")
 ######################################################################
@@ -26,17 +42,17 @@
 		### Message
 		MESSAGE( STATUS ">> Chose compiler:                Clang emcc" )
 		### Compiler Flags
-		set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -DEIGEN_NO_DEBUG" )
+		set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
 		### Linker Flags
 		### 	optimization, memory growth and exported functions
-		set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O2 -DEIGEN_NO_DEBUG" )
+		set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" )
 	else ()
 		### Message
 		MESSAGE( STATUS ">> Chose compiler:                Clang" )
 		### Compiler Flags
-		set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -DEIGEN_NO_DEBUG" )
+		set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11" )
 		### Linker Flags
-		set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O3 -DEIGEN_NO_DEBUG" )
+		set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}" )
 	endif ()
 ######################################################################

@@ -54,12 +70,12 @@
 	### Message
 	MESSAGE( STATUS ">> Chose compiler:                Intel" )
 	### Compiler Flags
-	set( CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS} -O3 -std=c++11 -DEIGEN_NO_DEBUG" )
+	set( CMAKE_CXX_FLAGS         "${CMAKE_CXX_FLAGS} -std=c++11" )
 	### Linker Flags
 	if (APPLE)
-		set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -DEIGEN_NO_DEBUG -Wl,-no_compact_unwind -pthread" )
+		set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_compact_unwind -pthread" )
 	else()
-		set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -DEIGEN_NO_DEBUG -pthread" )
+		set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -pthread" )
 	endif()
 ######################################################################


macro languages have annoying side-effects

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1283 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -183,10 +183,10 @@
         message (STATUS "trying brute-force search ")

         # take names to be directory names, and include "."
-        set (PKG_NAMES ${PKG_NAMES} ".")
+        set (${PREFIX}_PATH_NAMES ${PKG_NAMES} ".")

         # generate a combination of possible search paths
-        sagase_generate_paths (include_paths library_paths NAMES ${PKG_NAMES} PREFIXES ${PKG_PREFIXES})
+        sagase_generate_paths (include_paths library_paths NAMES ${${PREFIX}_PATH_NAMES} PREFIXES ${PKG_PREFIXES})

         # all C and C++ headers
         set (HEADER_POSTFIXES ".h" ".hpp" ".hh" ".hxx")
@@ -206,9 +206,9 @@
         foreach (component_ ${PKG_COMPONENTS})

             # get header path
-            foreach (pkgname_ ${PKG_NAMES})
+            foreach (pathname_ ${${PREFIX}_PATH_NAMES})
                 foreach (header_extension_ ${HEADER_POSTFIXES})
-                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pkgname_}/${component_}${header_extension_} ${include_paths})
+                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pathname_}/${component_}${header_extension_} ${include_paths})

                     if (${PREFIX}_${component_}_INCLUDE_DIR)
                         set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})


fix cmake check for dlsym() when a subproject of mysql 5.6

--- cmake_modules/TokuFeatureDetection.cmake
+++ cmake_modules/TokuFeatureDetection.cmake
@@ -74,6 +74,8 @@
 check_function_exists(random_r HAVE_RANDOM_R)
 check_function_exists(mincore HAVE_MINCORE)

+## clear this out in case mysql modified it
+set(CMAKE_REQUIRED_LIBRARIES "")
 set(EXTRA_SYSTEM_LIBS "")
 check_function_exists(dlsym HAVE_DLSYM_WITHOUT_DL)
 if (NOT HAVE_DLSYM_WITHOUT_DL)


ENH: ExternalData: Attach download rules to content links in IDEs

Each data file to be created in the build tree corresponds one-to-one with
a raw file or content link in the source tree.  Use the MAIN_DEPENDENCY of
add_custom_command to attach the build rule to the source tree file.  This
looks much nicer in the IDE project file browser and avoids ".rule" files.

Change-Id: Id8c5043be9baad39701522a074b24bc6a48ce233

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -207,7 +207,7 @@
                                  -DExternalData_ACTION=local
                                  -DExternalData_CONFIG=${config}
                                  -P ${_ExternalData_SELF}
-        DEPENDS "${name}"
+        MAIN_DEPENDENCY "${name}"
         )
       list(APPEND files "${file}")
     endif()
@@ -238,7 +238,7 @@
                                  -DExternalData_CONFIG=${config}
                                  -P ${_ExternalData_SELF}
         # Update whenever the object hash changes.
-        DEPENDS "${name}${ext}"
+        MAIN_DEPENDENCY "${name}${ext}"
         )
       list(APPEND files "${file}${stamp}")
     endif()


Upgrade CTK to May 17, 2022

Upgrade CTK to May 17, 2022

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -14,8 +14,6 @@
   set(CTK_DEPENDS ${proj})

   if(NOT DEFINED CTK_DIR)
-
-    set(revision_tag "7210c5bc")

     set(ctk_optional_cache_args )
     if(MITK_USE_Python3)
@@ -51,8 +49,8 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      GIT_REPOSITORY https://github.com/commontk/CTK
-      GIT_TAG ${revision_tag}
+      GIT_REPOSITORY https://github.com/MITK/CTK.git
+      GIT_TAG ec816cbb-patched
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Clean up script a little bit, make it a bit friendlier.

--- CMake/FindMatlabMex.cmake
+++ CMake/FindMatlabMex.cmake
@@ -95,10 +95,11 @@
 IF(NOT "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
   MESSAGE(FATAL_ERROR "Could not find MATLAB mex compiler; try specifying MATLAB_ROOT.")
 ELSE(NOT "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
-  MESSAGE(STATUS "Found MATLAB mex compiler: ${MATLAB_MEX}")
-  MESSAGE(STATUS "MATLAB root: ${MATLAB_ROOT}")
+  IF("${MATLAB_MEX}")
+    MESSAGE(STATUS "Found MATLAB mex compiler: ${MATLAB_MEX}")
+    MESSAGE(STATUS "MATLAB root: ${MATLAB_ROOT}")
+  ENDIF("${MATLAB_MEX}")
 ENDIF(NOT "${MATLAB_MEX}" AND "${MatlabMex_FIND_REQUIRED}")
-

 MARK_AS_ADVANCED(
   MATLAB_MEX


On MSVC, enable intrinsics explicitly to avoid linker error on __InterlockedCompareExchange16 in debug mode when threading enabled

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -142,6 +142,12 @@
   set(CMAKE_SUPPRESS_REGENERATION true)
 endif()

+if (MSVC)
+  # Enable intrinsics on MSVC in debug mode
+  # Not actually necessary in release mode since /O2 implies /Oi but can't easily add this per build type?
+  add_definitions(/Oi)
+endif (MSVC)
+
 ### Commented because the FindOGRE script can currently fill this role better ###
 # # Create the CMake package files
 # if (WIN32)


CMake: OGRE_LIB_SUFFIX is used on windows as well

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -152,20 +152,23 @@
 configure_file(${OGRE_TEMPLATES_DIR}/OgreBuildSettings.h.in ${OGRE_BINARY_DIR}/include/OgreBuildSettings.h @ONLY)
 install(FILES ${OGRE_BINARY_DIR}/include/OgreBuildSettings.h DESTINATION include/OGRE)

+set(OGRE_LIB_SUFFIX "")
+
+if (OGRE_STATIC)
+  set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}Static")
+endif ()
+if (OGRE_BUILD_TYPE STREQUAL "debug")
+  set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}_d")
+endif ()

 # Create the pkg-config package files on Unix systems
 if (UNIX)
-  set(OGRE_LIB_SUFFIX "")
   set(OGRE_PLUGIN_PREFIX "")
   set(OGRE_PLUGIN_EXT ".so")
   set(OGRE_PAGING_ADDITIONAL_PACKAGES "")
   if (OGRE_STATIC)
-    set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}Static")
     set(OGRE_PLUGIN_PREFIX "lib")
     set(OGRE_PLUGIN_EXT ".a")
-  endif ()
-  if (OGRE_BUILD_TYPE STREQUAL "debug")
-    set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}_d")
   endif ()

   set(OGRE_ADDITIONAL_LIBS "")


FindMKL.cmake: improve error message and support GNU openMP

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -161,6 +161,9 @@
       intel64
       intel64/gcc4.7)
   mark_as_advanced(MKL_${mkl_args_NAME}_LINK_LIBRARY)
+  iF(NOT MKL_${mkl_args_NAME}_LINK_LIBRARY)
+    message(FATAL_ERROR "MKL part ${mkl_args_NAME} (library ${mkl_args_LIBRARY_NAME}) not found")
+  endif()

   #message(STATUS "NAME: ${mkl_args_NAME} LIBNAME: ${mkl_args_LIBRARY_NAME} MKL_${mkl_args_NAME}_LINK_LIBRARY  ${MKL_${mkl_args_NAME}_LINK_LIBRARY}")

@@ -226,11 +229,13 @@
     set_package_properties(OpenMP PROPERTIES TYPE REQUIRED PURPOSE "Used for thread parallelization in MKL")
   endif()
   find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_gnu_thread)
-  add_library(MKL::ThreadingLibrary SHARED IMPORTED)
-  set_target_properties(MKL::ThreadingLibrary
-    PROPERTIES
-      IMPORTED_LOCATION "${OpenMP_gomp_LIBRARY}"
-      INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
+  if(NOT TARGET MKL::ThreadingLibrary)
+    add_library(MKL::ThreadingLibrary SHARED IMPORTED)
+    set_target_properties(MKL::ThreadingLibrary
+      PROPERTIES
+        IMPORTED_LOCATION "${OpenMP_gomp_LIBRARY}"
+        INTERFACE_LINK_LIBRARIES OpenMP::OpenMP_CXX)
+  endif()
 elseif(MKL_THREAD_LAYER STREQUAL "TBB")
   find_mkl_library(NAME ThreadLayer LIBRARY_NAME mkl_tbb_thread)
   find_mkl_library(NAME ThreadingLibrary LIBRARY_NAME tbb)


Increment version to 3.2.2

Increment version to 3.2.2

--- CMakeModules/Version.cmake
+++ CMakeModules/Version.cmake
@@ -3,7 +3,7 @@
 #
 SET(AF_VERSION_MAJOR "3")
 SET(AF_VERSION_MINOR "2")
-SET(AF_VERSION_PATCH "1")
+SET(AF_VERSION_PATCH "2")

 SET(AF_VERSION "${AF_VERSION_MAJOR}.${AF_VERSION_MINOR}.${AF_VERSION_PATCH}")
 SET(AF_API_VERSION_CURRENT ${AF_VERSION_MAJOR}${AF_VERSION_MINOR})


fixed: check if something is a target

fixed: check if something is a target

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

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -736,10 +736,12 @@

     FOREACH(OSGDEP ${${PROJECT_NAME}_DEP_OSG_LIB})
         OSG_CHECKED_INCLUDE  ("${CMAKE_BINARY_DIR}/${OSGDEP}.cmake")
-
-        IF(${OSGDEP})
+
+        SET(${_OSGDEP_IMPORTED} FALSE)
+
+        IF(TARGET ${OSGDEP})
           GET_PROPERTY(_OSGDEP_IMPORTED TARGET ${OSGDEP} PROPERTY IMPORTED)
-        ENDIF(${OSGDEP})
+        ENDIF(TARGET ${OSGDEP})

         IF(NOT _OSGDEP_IMPORTED)
           ADD_DEPENDENCIES     (${PROJECT_NAME} ${OSGDEP})


Added library prefix for assimp.

Added library prefix for assimp.

--- CMake/ExternalAssimp.cmake
+++ CMake/ExternalAssimp.cmake
@@ -22,12 +22,12 @@
     DESTINATION ${POLYCODE_DEPS_TOOLS_PREFIX}/Include)

 # install debug lib
-INSTALL(FILES ${install_dir}/lib/assimp${CMAKE_STATIC_LIBRARY_SUFFIX}
+INSTALL(FILES ${install_dir}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}assimp${CMAKE_STATIC_LIBRARY_SUFFIX}
     DESTINATION ${POLYCODE_DEPS_TOOLS_PREFIX}/Lib/Debug
     CONFIGURATIONS Debug
     RENAME assimpd${CMAKE_STATIC_LIBRARY_SUFFIX})

 # install release lib
-INSTALL(FILES ${install_dir}/lib/assimp${CMAKE_STATIC_LIBRARY_SUFFIX}
+INSTALL(FILES ${install_dir}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}assimp${CMAKE_STATIC_LIBRARY_SUFFIX}
     DESTINATION ${POLYCODE_DEPS_TOOLS_PREFIX}/Lib/Release
     CONFIGURATIONS Release)


FindMKL.cmake: use interface libraries

FindMKL.cmake: use interface libraries

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -326,8 +326,10 @@
     if(NOT TARGET MKL::MKL)
         add_library(MKL::MKL UNKNOWN IMPORTED)
         set_target_properties(MKL::MKL PROPERTIES
-            IMPORTED_LOCATION             "${MKL_LIBRARIES}"
             INTERFACE_INCLUDE_DIRECTORIES "${MKL_INCLUDE_DIR}")
+        foreach(_lib ${MKL_LIBRARIES})
+	  set_property(TARGET MKL::MKL APPEND_STRING PROPERTY INTERFACE_LINK_LIBRARIES " ${_lib}")
+	endforeach()
     endif()
 else()
     if (MKL_FIND_REQUIRED)


Fixed confusing print message that seems to find nonexistent ROS versions

--- CMakeModules/FindROS.cmake
+++ CMakeModules/FindROS.cmake
@@ -26,7 +26,7 @@
   MESSAGE("ROS_VERSION not defined")
   FOREACH(version ${AVAILABLE_ROS_VERSIONS})
     IF(NOT ROS_FOUND)
-      FIND_PATH(ROS_H ros.h PATHS /opt/ros/${version}/include/ros)
+      FIND_PATH(ROS_H ros.h PATHS /opt/ros/${version}/include/ros NO_DEFAULT_PATH)
       IF(ROS_H)
         MESSAGE(STATUS "Found ros version ${version}")
         SET(ROS_VERSION2 ${version})
@@ -36,7 +36,7 @@
   ENDFOREACH(version)
 ELSE(ROS_VERSION MATCHES "")
   MESSAGE("ROS_VERSION defined as " ${ROS_VERSION})
-  FIND_PATH(ROS_H ros.h PATHS /opt/ros/${ROS_VERSION}/include/ros)
+  FIND_PATH(ROS_H ros.h PATHS /opt/ros/${ROS_VERSION}/include/ros NO_DEFAULT_PATH)
   IF(ROS_H)
     MESSAGE("Found ros version ${ROS_VERSION}")
     SET(ROS_FOUND 1)


Remove inadvertent comment

Remove inadvertent comment

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -3,7 +3,7 @@
 function(halide_use_image_io TARGET)
   foreach(PKG PNG JPEG)
     # It's OK to call find_package() for the same package multiple times.
-    # find_package(${PKG} QUIET)
+    find_package(${PKG} QUIET)
     if(${PKG}_FOUND)
       target_compile_definitions(${TARGET} PRIVATE ${${PKG}_DEFINITIONS})
       target_include_directories(${TARGET} PRIVATE ${${PKG}_INCLUDE_DIRS})


Remove errant code it GTest external project file.

There must have been a copy error with the lua code.

Change-Id: I5e8a86310f51f2f66a03a98d9035c207c6fd4caa

--- SuperBuild/External_GTest.cmake
+++ SuperBuild/External_GTest.cmake
@@ -18,11 +18,6 @@
 sitkSourceDownload(GTEST_URL "gtest-${GTEST_TARGET_VERSION}.zip" ${GTEST_DOWNLOAD_SOURCE_HASH})

 file(WRITE "${GTEST_binary_dir}/CMakeCacheInit.txt" "${ep_common_cache}" )
-
-set(GTEST_PATCH_COMMAND ${CMAKE_COMMAND} -E copy_if_different
-  ${CMAKE_CURRENT_SOURCE_DIR}/lua.cmake
-  ${lua_source_dir}/CMakeLists.txt
-)

 set(${proj}_ARCHIVE_OUTPUT_DIRECTORY "<BINARY_DIR>/lib")
 if (CMAKE_GENERATOR MATCHES "Visual Studio")


Update PythonExternal.cmake

Update PythonExternal.cmake

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -154,7 +154,7 @@
     SET(SCI_PYTHON_FRAMEWORK_ARCHIVE ${INSTALL_DIR}/${python_FRAMEWORK_ARCHIVE})
   ELSE()
     SET(SCI_PYTHON_ROOT_DIR ${INSTALL_DIR})
-    SET(SCI_PYTHON_INCLUDE ${INSTALL_DIR}/include/${SCI_PYTHON_NAME}${SCI_PYTHON_VERSION_SHORT})
+    SET(SCI_PYTHON_INCLUDE ${INSTALL_DIR}/include/${SCI_PYTHON_NAME})
     SET(SCI_PYTHON_LIBRARY_DIR ${SCI_PYTHON_ROOT_DIR}/lib)
     SET(SCI_PYTHON_LINK_LIBRARY_DIRS ${SCI_PYTHON_LIBRARY_DIR})
     IF(SCIRUN_BITS MATCHES 64)


COMP: file was not meant to be committed...

--- Core/Rendering/files.cmake
+++ Core/Rendering/files.cmake
@@ -27,8 +27,6 @@
   mitkPointSetSliceMapper2D.cpp
   mitkPointSetVtkMapper3D.cpp
   mitkPolyDataGLMapper2D.cpp
-  mitkSceneDistortionRendering.cpp
-  mitkSceneDistortionRendering.cpp
   mitkSplineMapper2D.cpp
   mitkSplineVtkMapper3D.cpp
   mitkSurfaceMapper2D.cpp
@@ -42,7 +40,6 @@
   mitkVtkWidgetRendering.cpp
   mitkColoredRectangleRendering.cpp
   vtkMitkRectangleProp.cpp
-  vtkMitkSceneDistortionProp.cpp
   vtkUnstructuredGridMapper.cpp
 )


Include the OpenGL dependency script on high level.

--- CMake/Options/OptionNativeOpenGL.cmake
+++ CMake/Options/OptionNativeOpenGL.cmake
@@ -6,7 +6,6 @@
 	-D_IRRIMGUI_NATIVE_OPENGL_
 	)
 	SET (IRRIMGUI_FAST_OPENGL_TEXTURE_CREATION ON CACHE BOOL "Enables the fast OpenGL texture creation to translate a ITexture object to an OpenGL handle instead of creating a copy. This is a very instable hack. Disable this, when the example 7 (RenderWindow) fails.")
-	INCLUDE(DependencyOpenGL)
 else ()
 	message(STATUS "Use Irrlicht based render driver...")
 endif ()


fixed path error in script

fixed path error in script

--- CMakeExternals/Numpy.cmake
+++ CMakeExternals/Numpy.cmake
@@ -70,7 +70,7 @@
           ")
       # configure step
       set(_configure_step ${CMAKE_BINARY_DIR}/${proj}_configure_step.cmake)
-      file(WRITE ${_configure_script}
+      file(WRITE ${_configure_step}
          "include(\"${_external_python_project}\")
           file(WRITE \"${CMAKE_BINARY_DIR}/${proj}/site.cfg\" \"\")
           MITK_PYTHON_BUILD_STEP(${proj} configure setup.py config)
@@ -78,7 +78,7 @@

       # build step
       set(_build_step ${CMAKE_BINARY_DIR}/${proj}_build_step.cmake)
-      file(WRITE ${_build_script}
+      file(WRITE ${_build_step}
          "include(\"${_external_python_project}\")
           MITK_PYTHON_BUILD_STEP(${proj} configure setup.py build --fcompiler=none)
          ")


STYLE (#4432): removed some obsolete code

--- BlueBerry/CMake/MacroInstallPlugin.cmake
+++ BlueBerry/CMake/MacroInstallPlugin.cmake
@@ -46,21 +46,11 @@
   ENDFOREACH()
   SET_TARGET_PROPERTIES(${_INSTALL_TARGETS}
                         PROPERTIES INSTALL_RPATH "${_target_install_rpath}")
-
-  IF(FALSE)
-  INSTALL(TARGETS ${_INSTALL_TARGETS}
-          RUNTIME DESTINATION bin
-          LIBRARY DESTINATION bin
-          ARCHIVE DESTINATION bin
-     )
-  ENDIF(FALSE)
-  # IF(FALSE)
+
   INSTALL(TARGETS ${_INSTALL_TARGETS}
           RUNTIME DESTINATION ${_plugin_install_dir}/bin
           LIBRARY DESTINATION ${_plugin_install_dir}/bin
           #ARCHIVE DESTINATION ${_plugin_install_dir}/bin
-     )
-  # ENDIF(FALSE)
-
+  )

 ENDMACRO()


fix flexdeplists (again)

fix flexdeplists (again)

Change-Id: I8944707de88e403ae06cae67d76068dc7990bc67

--- external/flexdeplists/FlexDepLists.cmake
+++ external/flexdeplists/FlexDepLists.cmake
@@ -221,6 +221,10 @@

   if (ARGV0)
     set(_FDP_PNU ${ARGV0})
+    if (${ARGC} EQUAL 0)
+      message("WTF CMAKE ARE YOU KIDDING ME: _FDP_PNU: ARGV0 -> ${_FDP_PNU} (count ${ARGC}}")
+      string(TOUPPER ${PROJECT_NAME} _FDP_PNU)
+    endif()
   else()
     string(TOUPPER ${PROJECT_NAME} _FDP_PNU)
   endif()
@@ -289,7 +293,15 @@

 macro(dep_lists_prepare_env)

-  string(TOUPPER ${PROJECT_NAME} _FDP_PNU)
+  if (ARGV0)
+    set(_FDP_PNU ${ARGV0})
+    if (${ARGC} EQUAL 0)
+      message("WTF CMAKE ARE YOU KIDDING ME: _FDP_PNU: ARGV0 -> ${_FDP_PNU} (count ${ARGC}}")
+      string(TOUPPER ${PROJECT_NAME} _FDP_PNU)
+    endif()
+  else()
+    string(TOUPPER ${PROJECT_NAME} _FDP_PNU)
+  endif()

   #####################################################
   ## SET INCLUDES, LIBS, ... (public)


Update cmake policies to address warnings in CMake 3.1.

--- CPM.cmake
+++ CPM.cmake
@@ -282,10 +282,19 @@
     set(_cpm_keyword_sep "|")
   endif()
 endforeach()
+
 # Duplicate of the 'Are we already parsing a function?' code above.
 # Just completes the regex.
 if(_cpm_func)
   set(_cpm_keywords_${_cpm_func} "${_cpm_keywords_${_cpm_func}})$")
+endif()
+
+# Set cmake policies
+# cmake --help-policy CMP0054
+if (COMMAND cmake_policy)
+  if (POLICY CMP0054)
+    cmake_policy(SET CMP0054 NEW)
+  endif()
 endif()

 # Include dependencies


More debugging.

More debugging.

--- CPM.cmake
+++ CPM.cmake
@@ -957,6 +957,9 @@

         set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
         set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
+
+        message("Exported includes: ${${IMPORT_INCLUDE_MAP_NAME}}")
+        message("Exported definitions: ${${IMPORT_DEFINITION_MAP_NAME}}")
       endforeach()
     endif()


fix path to farsight include folder

fix path to farsight include folder

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1220 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/TelepathyFarsight2.cmake
+++ CMakeModules/TelepathyFarsight2.cmake
@@ -6,7 +6,7 @@
 macro (INCLUDE_TELEPATHY_FARSIGHT2)

     if (MSVC)
-	  include_directories (${NAALI_DEP_PATH}telepathy-farsight2/include)
+	  include_directories (${NAALI_DEP_PATH}/telepathy-farsight2/include)
 	  link_directories (${NAALI_DEP_PATH}/telepathy-farsight2/lib)
     else(NOT MSVC AND TELEPATHY_FARSIGHT2_FOUND)
 	  include_directories(${TELEPATHY_FARSIGHT2_INCLUDE_DIRS})


[FIX] Fixing CTD support in build system such that dependencies are modelled correctly.

Previously, there were missing dependencies from CTD creation to the creating binary.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13644 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -116,7 +116,7 @@
                       COMMAND ${CMAKE_COMMAND} -E copy "${_BINARY_PATH}" "${PAYLOAD_TMP_BIN_PATH}")
   add_custom_target (target_ctd_ctds_${_BINARY}
                      COMMAND ${_BINARY_PATH} --write-ctd "${CTD_PATH}/${_BINARY}.ctd"
-                     DEPENDS target_ctd_mkdir)
+                     DEPENDS target_ctd_mkdir ${_BINARY})
   list (APPEND PREPARE_CTD_CTDS_TARGETS target_ctd_ctds_${_BINARY})
 endforeach ()


ENH: Does not add a cppcheck test when there's no cxx files

Change-Id: I7cf9e75ad581b429415068d657525a24832fabc0

--- CMake/ITKModuleCPPCheckTest.cmake
+++ CMake/ITKModuleCPPCheckTest.cmake
@@ -1,22 +1,33 @@
 macro( itk_module_cppcheck_test _name )
   if( EXISTS "${${_name}_SOURCE_DIR}/src" )
-    add_cppcheck_dir(
-      ${_name}_SRC_DIR # _name
-      "${${_name}_SOURCE_DIR}/src" #_dir
-      ${${_name}_SOURCE_DIR}/include #_include_dirs
-      VERBOSE
-      FORCE
-      )
+    file( GLOB _cxx_files *.cxx )
+    list( LENGTH _cxx_files _num_cxx_files )
+    # let's make sure there are actually cxx files in the src dir
+    if( ${_num_cxx_files} GREATER 0 )
+      add_cppcheck_dir(
+        ${_name}_SRC_DIR # _name
+        "${${_name}_SOURCE_DIR}/src" #_dir
+        ${${_name}_SOURCE_DIR}/include #_include_dirs
+        VERBOSE
+        FORCE
+        ALL
+       )
+    endif()
   endif()

   if( EXISTS "${${_name}_SOURCE_DIR}/test" )
-    add_cppcheck_dir(
-      ${_name}_TEST_DIR # _name
-      "${${_name}_SOURCE_DIR}/test" #_dir
-      ${${_name}_SOURCE_DIR}/include #_include_dirs
-      VERBOSE
-      FORCE
-      ALL
-      )
+    file( GLOB _cxx_files *.cxx )
+    list( LENGTH _cxx_files _num_cxx_files )
+    # let's make sure there are actually cxx files in the src dir
+    if( ${_num_cxx_files} GREATER 0 )
+      add_cppcheck_dir(
+        ${_name}_TEST_DIR # _name
+        "${${_name}_SOURCE_DIR}/test" #_dir
+        ${${_name}_SOURCE_DIR}/include #_include_dirs
+        VERBOSE
+        FORCE
+        ALL
+        )
+    endif()
   endif()
 endmacro()


revert accidental checkin of FindFreetype

--HG--
branch : nostaticzlib

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -44,7 +44,7 @@
 message(STATUS "CMAKE_PREFIX_PATH: ${CMAKE_PREFIX_PATH}")

 find_path(FREETYPE_INCLUDE_DIR NAMES freetype.h freetype/freetype.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
-find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h freetype/ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS} PATH_SUFFIXES freetype2)
+find_path(FREETYPE_FT2BUILD_INCLUDE_DIR NAMES ft2build.h HINTS ${FREETYPE_INC_SEARCH_PATH} ${FREETYPE_PKGC_INCLUDE_DIRS})

 find_library(FREETYPE_LIBRARY_REL NAMES ${FREETYPE_LIBRARY_NAMES} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
 find_library(FREETYPE_LIBRARY_DBG NAMES ${FREETYPE_LIBRARY_NAMES_DBG} HINTS ${FREETYPE_LIB_SEARCH_PATH} ${FREETYPE_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)


improved artifacts

improved artifacts

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -70,15 +70,18 @@

 	# get version now
 	execute_process(
-		COMMAND python ${ARTIFACTS_PATH}/get_package.py --name=${PACKAGE} --depends=${CMAKI_PATH}/../depends.yml
+		COMMAND python ${ARTIFACTS_PATH}/get_package.py --name=${PACKAGE} --depends=${CMAKI_PATH}/../depends.json
 		WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 		OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
 	if(RESULT_VERSION)
 		set(VERSION_REQUEST ${RESULT_VERSION})
 		set(EXTRA_VERSION "--version=${VERSION_REQUEST}")
 	else()
+		set(VERSION_REQUEST "")
 		set(EXTRA_VERSION "")
 	endif()
+
+	# MESSAGE(" python ${ARTIFACTS_PATH}/check_remote_version.py --server=${PACKAGE_BASE_URL} --artifacts=${CMAKE_PREFIX_PATH} --platform=${CMAKI_PLATFORM} --name=${PACKAGE} ${EXTRA_VERSION} ")

 	#######################################################
 	# get version in local cache or remote artifacts server
@@ -93,7 +96,9 @@
 		# message("---- found ${PACKAGE_NAME} (${VERSION})")
 		set(FORCE_GENERATE_ARTIFACT FALSE)
 	else()
-		message("can't get version for: ${PACKAGE}, request: ${VERSION_REQUEST}")
+		message("can't get version for: ${PACKAGE}, request: ${VERSION_REQUEST}, will be generated.")
+		# generate artifact with version request
+		set(VERSION ${VERSION_REQUEST})
 		set(FORCE_GENERATE_ARTIFACT TRUE)
 	endif()
 	#######################################################
@@ -119,7 +124,7 @@
 			# generar artefactos de una version determinada

 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.yml --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o -d
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${CMAKI_PATH}/../depends.json --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} -o -d
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)
@@ -192,14 +197,21 @@
 	endif()

 	execute_process(
-		COMMAND python ${ARTIFACTS_PATH}/save_package.py --name=${PACKAGE} --version=${VERSION} --depends=${CMAKI_PATH}/../depends.yml
+		COMMAND python ${ARTIFACTS_PATH}/save_package.py --name=${PACKAGE} --version=${VERSION} --depends=${CMAKI_PATH}/../depends.json
 		WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 		RESULT_VARIABLE artifacts_result
 		)
 	if(artifacts_result)
 		message(FATAL_ERROR "can't save package version: ${PACKAGE} ${VERSION}")
 	endif()
-	find_package(${PACKAGE} ${VERSION} EXACT REQUIRED)
+
+	if(${PACKAGE_MODE} STREQUAL "EXACT")
+		# message("-- using ${PACKAGE} in EXACT")
+		find_package(${PACKAGE} ${VERSION} EXACT REQUIRED)
+	else()
+		# message("-- using ${PACKAGE} in COMPATIBLE")
+		find_package(${PACKAGE} ${VERSION} REQUIRED)
+	endif()

 	string(TOUPPER "${PACKAGE}" PACKAGE_UPPER)


Fix bug with CMAKE_FIND_ROOT_PATH variable in FindOmniORBPy.cmake

--- salome_adm/cmake_files/FindOmniORBPy.cmake
+++ salome_adm/cmake_files/FindOmniORBPy.cmake
@@ -34,17 +34,11 @@
 ##############################################################################

 SET(_py_version "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
-SET(CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH})
-SET(_doc "Path to python-backend directory (omniidl_be) including python.py file")
-IF(WIN32)
-  FIND_PATH(OMNIORB_PYTHON_BACKEND
-     NAMES python.py PATHS "/lib/python/omniidl_be" DOC ${_doc})
-ELSE()
-  FIND_PATH(OMNIORB_PYTHON_BACKEND
-     NAMES python.py
-     PATHS "/lib/python${_py_version}/site-packages/omniidl_be" "/usr/lib/omniidl/omniidl_be"
-     DOC ${_doc})
-ENDIF()
+FIND_PATH(OMNIORB_PYTHON_BACKEND
+  NAMES python.py
+  PATHS "${OMNIORBPY_ROOT_DIR}" "/usr"
+  PATH_SUFFIXES "/lib/python${_py_version}/site-packages/omniidl_be" "/lib/omniidl/omniidl_be" "/lib/python/omniidl_be"
+  DOC "Path to python-backend directory (omniidl_be) including python.py file")

 ##############################################################################
 # Cook our stuff


remove redundant if

remove redundant if

--- FindICU.cmake
+++ FindICU.cmake
@@ -674,15 +674,13 @@
     icudebug("GENRB_EXECUTABLE")
     icudebug("PKGDATA_EXECUTABLE")
     # <COMPONENT>_(FOUND|LIBRARY)
-    if(${ICU_PUBLIC_VAR_NS}_DEBUG)
-        set(${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLES "FOUND" "LIBRARY" "LIBRARY_RELEASE" "LIBRARY_DEBUG")
-        foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS})
-            string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT)
-            foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLE ${${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLES})
-                icudebug("${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_${${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLE}")
-            endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLE)
-        endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT)
-    endif(${ICU_PUBLIC_VAR_NS}_DEBUG)
+    set(${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLES "FOUND" "LIBRARY" "LIBRARY_RELEASE" "LIBRARY_DEBUG")
+    foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PRIVATE_VAR_NS}_COMPONENTS})
+        string(TOUPPER "${${ICU_PRIVATE_VAR_NS}_COMPONENT}" ${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT)
+        foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLE ${${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLES})
+            icudebug("${${ICU_PRIVATE_VAR_NS}_UPPER_COMPONENT}_${${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLE}")
+        endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT_VARIABLE)
+    endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT)

 endif(${ICU_PUBLIC_VAR_NS}_DEBUG)


Removed check for Wreturn-type compatibility

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -233,11 +233,6 @@
   set (internal_compiler_warning_flags "${internal_compiler_warning_flags} -Werror -Wextra -Wreturn-type -Wunused -Wno-unused-variable -Wno-unused-parameter -Wno-missing-field-initializers")
   set (external_compiler_warning_flags "${external_compiler_warning_flags} -Wno-unused-variable -Wno-unused-parameter -Wno-incompatible-pointer-types -Wno-deprecated-declarations")

-  CHECK_CXX_COMPILER_FLAG(-Wreturn-type COMPILER_SUPPORTS_WARNING_RETURN_TYPE)
-  if (COMPILER_SUPPORTS_WARNING_RETURN_TYPE)
-    set(internal_compiler_warning_flags "${internal_compiler_warning_flags} -Wreturn-type")
-  endif()
-
   CHECK_CXX_COMPILER_FLAG(-m${BITNESS} COMPILER_SUPPORTS_MACHINE_OPTION)
   if (COMPILER_SUPPORTS_MACHINE_OPTION)
     set(shared_compile_flags "${shared_compile_flags} -m${BITNESS}")


Correct hash variable used for SwigWin

Correct hash variable used for SwigWin

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -42,7 +42,7 @@
     # swig.exe available as pre-built binary on Windows:
     ExternalProject_Add(Swig
       URL "${SWIGWIN_URL}"
-      URL_HASH MD5=${SWIG_DOWNLOAD_WIN_HASH}
+      URL_HASH MD5=${SWIGWIN_DOWNLOAD_HASH}
       SOURCE_DIR ${swig_source_dir}
       CONFIGURE_COMMAND ""
       BUILD_COMMAND ""


COMP: Fixed CMake configuration error by passing C compiler

Current branch master is up to date.
[ 29%] Performing configure step for 'VMTK'
loading initial cache file /.../SlicerExtension-VMTK-build/VMTK-prefix/tmp/VMTK-cache-Release.cmake
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Check for working C compiler: /dev/null
-- Check for working C compiler: /dev/null -- broken

--- SuperBuild/External_VMTK.cmake
+++ SuperBuild/External_VMTK.cmake
@@ -33,8 +33,10 @@
       -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
       -DBUILD_SHARED_LIBS:BOOL=ON
       -DBUILD_DOCUMENTATION:BOOL=OFF
+      -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
-      -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
+      -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+      -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
       -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/SlicerVmtk-build
       # installation location for the pypes/scripts
       -DVMTK_INSTALL_BIN_DIR:PATH=${Slicer_INSTALL_QTLOADABLEMODULES_PYTHON_LIB_DIR}/pypes


STRING REGEX REPLACE fix

STRING REGEX REPLACE fix

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -85,7 +85,7 @@
       STRING(REGEX REPLACE "/" "\\\\"  _${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}")
     ELSE ()
       SET(_${_FINDPACKAGE}_RUNTIME_DIRECTORY "${${_FINDPACKAGE}_ROOT_DIR}/lib")
-      STRING(REGEX REPLACE " " "\\ "  _${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}")
+      STRING(REGEX REPLACE " " "\\\\ "  _${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}")
     ENDIF ()
     SET(${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_${_FINDPACKAGE}_RUNTIME_DIRECTORY}" CACHE INTERNAL "${dependTarget} Runtime Directory")
     IF (NOT TEST_PATH)


cmake: fix ffmpeg check code

cmake: fix ffmpeg check code

--- cmake/OpenCVFindLibsVideo.cmake
+++ cmake/OpenCVFindLibsVideo.cmake
@@ -236,6 +236,7 @@
       if(NOT __VALID_FFMPEG)
         #message(FATAL_ERROR "FFMPEG: test check build log:\n${TRY_OUT}")
         message(STATUS "WARNING: Can't build ffmpeg test code")
+        set(HAVE_FFMPEG FALSE)
       else()
         ocv_append_build_options(VIDEOIO FFMPEG)
       endif()


Add additional library names for UMFPACK to FindUMFPACK.

--- cmake/modules/FindUMFPACK.cmake
+++ cmake/modules/FindUMFPACK.cmake
@@ -57,7 +57,7 @@
 MACRO(FIND_UMFPACK_LIBRARY _comp _name)
   STRING(TOUPPER ${_comp} _comp_uppercase)
   DEAL_II_FIND_LIBRARY(${_comp}_LIBRARY
-    NAMES ${_name}
+    NAMES ${_name} lib${_name}
     HINTS
       ${${_comp_uppercase}_DIR}
       ${SUITESPARSE_DIR}/${_comp}


[cmake] Modernize some conditionals. NFC

The "x${...}" form was a workaround for CMake versions prior to 3.1,
where the if command would interpret arguments as variables even when
quoted [1]. We can drop the workaround now that our minimum CMake
version is 3.4.

[1] https://cmake.org/cmake/help/v3.1/policy/CMP0054.html

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

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

--- cmake/modules/LLVM-Config.cmake
+++ cmake/modules/LLVM-Config.cmake
@@ -99,9 +99,9 @@

   llvm_map_components_to_libnames(LIBRARIES ${link_components})
   get_target_property(t ${executable} TYPE)
-  if("x${t}" STREQUAL "xSTATIC_LIBRARY")
+  if(t STREQUAL "STATIC_LIBRARY")
     target_link_libraries(${executable} INTERFACE ${LIBRARIES})
-  elseif("x${t}" STREQUAL "xSHARED_LIBRARY" OR "x${t}" STREQUAL "xMODULE_LIBRARY")
+  elseif(t STREQUAL "SHARED_LIBRARY" OR t STREQUAL "MODULE_LIBRARY")
     target_link_libraries(${executable} PRIVATE ${LIBRARIES})
   else()
     # Use plain form for legacy user.


[CMake] Warn about @objc inferred via the deprecated rules in stdlib/overlay builds

We want to know about these, both because they have an impact on our migration to Swift 4 and because we don’t want to vend extra Objective-C entry points.

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -272,6 +272,10 @@
     list(APPEND swift_flags "-autolink-force-load")
   endif()

+	if (SWIFTFILE_IS_STDLIB_CORE OR SWIFTFILE_IS_SDK_OVERLAY)
+		list(APPEND swift_flags "-Xfrontend" "-warn-swift3-objc-inference")
+  endif()
+
   list(APPEND swift_flags ${SWIFT_EXPERIMENTAL_EXTRA_FLAGS})

   if(SWIFTFILE_OPT_FLAGS)


Fix linking with tp-qt4 in the tests.

Fix linking with tp-qt4 in the tests.

--- cmake/modules/TpQt4Macros.cmake
+++ cmake/modules/TpQt4Macros.cmake
@@ -347,7 +347,7 @@
 macro(tpqt4_add_generic_unit_test _fancyName _name)
     tpqt4_generate_moc_i(${_name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/_gen/${_name}.cpp.moc.hpp)
     add_executable(test-${_name} ${_name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/_gen/${_name}.cpp.moc.hpp)
-    target_link_libraries(test-${_name} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} telepathy-qt4 ${ARGN})
+    target_link_libraries(test-${_name} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} ${TELEPATHY_QT4_LIBRARIES} ${ARGN})
     add_test(${_fancyName} ${SH} ${CMAKE_CURRENT_BINARY_DIR}/runGenericTest.sh ${CMAKE_CURRENT_BINARY_DIR}/test-${_name})
     list(APPEND tpqt4_test_cases test-${_name})

@@ -358,7 +358,7 @@
 macro(tpqt4_add_dbus_unit_test _fancyName _name)
     tpqt4_generate_moc_i(${_name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/_gen/${_name}.cpp.moc.hpp)
     add_executable(test-${_name} ${_name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/_gen/${_name}.cpp.moc.hpp)
-    target_link_libraries(test-${_name} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} telepathy-qt4 ${ARGN})
+    target_link_libraries(test-${_name} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} ${TELEPATHY_QT4_LIBRARIES} ${ARGN})
     set(with_session_bus ${CMAKE_CURRENT_BINARY_DIR}/runDbusTest.sh)
     add_test(${_fancyName} ${SH} ${with_session_bus} ${CMAKE_CURRENT_BINARY_DIR}/test-${_name})
     list(APPEND tpqt4_test_cases test-${_name})


fix symdiff linking python3

fix symdiff linking python3

--- appveyor.cmake
+++ appveyor.cmake
@@ -15,5 +15,5 @@

 SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:strict /EHsc")
 SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO")
-SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
+SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO /NODEFAULTLIB:python3")
 SET (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} /SAFESEH:NO")


utils: detect platform arch for linux 64bit and 32bit

--- Engine/scripts/utils.cmake
+++ Engine/scripts/utils.cmake
@@ -35,8 +35,14 @@
 		else() # 32 bit
 			set(${platform_architecture} "x32" PARENT_SCOPE)
 		endif()
+	elseif(WIN32)
+		if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") # 64 bit
+			set(${platform_architecture} "x64" PARENT_SCOPE)
+		else() # 32 bit
+			set(${platform_architecture} "x32" PARENT_SCOPE)
+		endif()
 	else()
-		if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") # 64 bit
+		if(CMAKE_SIZEOF_VOID_P GREATER 4) # 64 bit
 			set(${platform_architecture} "x64" PARENT_SCOPE)
 		else() # 32 bit
 			set(${platform_architecture} "x32" PARENT_SCOPE)


Adding macros HAVE_SNPRINTF and _HAVE_SNPRINTF for save string functions calls.

svn path=/trunk/; revision=8484

--- config.h.cmake
+++ config.h.cmake
@@ -64,6 +64,12 @@
 /* Define if isnan is available */
 #cmakedefine HAVE_ISNAN

+/* Define if snprintf is available */
+#cmakedefine HAVE_SNPRINTF
+
+/* Define if _snprintf is available */
+#cmakedefine _HAVE_SNPRINTF
+
 /* Define if [incr], [Tcl] is available */
 #cmakedefine HAVE_ITCL


petsc runs control removed

petsc runs control removed

--- util/cmake/petsc/FindPETSc.cmake
+++ util/cmake/petsc/FindPETSc.cmake
@@ -275,6 +275,7 @@
   mark_as_advanced (PETSC_INCLUDE_DIR PETSC_INCLUDE_CONF)
   set (petsc_includes_minimal ${PETSC_INCLUDE_CONF} ${PETSC_INCLUDE_DIR})

+if(false)
   petsc_test_runs ("${petsc_includes_minimal}" "${PETSC_LIBRARIES_TS}" petsc_works_minimal)
   if (petsc_works_minimal)
     message (STATUS "Minimal PETSc includes and libraries work.  This probably means we are building with shared libs.")
@@ -305,6 +306,7 @@
       endif (petsc_works_alllibraries)
     endif (petsc_works_allincludes)
   endif (petsc_works_minimal)
+endif (false)

   # We do an out-of-source build so __FILE__ will be an absolute path, hence __INSDIR__ is superfluous
   if (${PETSC_VERSION} VERSION_LESS 3.1)
@@ -323,7 +325,7 @@
   mark_as_advanced (PETSC_INCLUDES PETSC_LIBRARIES PETSC_COMPILER PETSC_DEFINITIONS PETSC_MPIEXEC PETSC_EXECUTABLE_RUNS)
 endif ()

-include (FindPackageHandleStandardArgs)
-find_package_handle_standard_args (PETSc
-  "PETSc could not be found.  Be sure to set PETSC_DIR and PETSC_ARCH."
-  PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS)
+#include (FindPackageHandleStandardArgs)
+#find_package_handle_standard_args (PETSc
+ # "PETSc could not be found.  Be sure to set PETSC_DIR and PETSC_ARCH."
+ # PETSC_INCLUDES PETSC_LIBRARIES PETSC_EXECUTABLE_RUNS)


Turn unused result warnings into errors on Clang/gcc

This is the last part of the proposal 1. from `[RFC] Improving LLPC Result checking`.

Now that all results are handled (https://github.com/GPUOpen-Drivers/llpc/pull/1500),
turn unused result warnings into errors so that we don't regress.

Issue: https://github.com/GPUOpen-Drivers/llpc/issues/1474

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -27,6 +27,7 @@
             -Werror=unused-variable
             -Wunused-function
             -Werror=unused-function
+            -Werror=unused-result  # Error out on unused results of functions marked with LLPC_NODISCARD
         )

         target_compile_options("${PROJECT_NAME}" PRIVATE $<$<COMPILE_LANGUAGE:CXX>:


Update Depdendencies.cmake

Update Depdendencies.cmake

Downgrade Qt to 5.15.2 for Mac

--- cmake/Depdendencies.cmake
+++ cmake/Depdendencies.cmake
@@ -57,8 +57,8 @@
             )
       	elseif(APPLE)
             fast_download_dependency(qt5
-                    5.15.5
-                    72148381272a3a5e07c9ca04cc5fb8d882c066a9d19816093a451dba296baa7f
+                    5.15.2
+		    0f5ff6ea8a9299cda1f41922f310a1f8f5bb8bf8829c46e85eb68e2638e2a840
                     libQt5Core.dylib libQt5Gui.dylib libQt5Widgets.dylib libQt5OpenGL.dylib libQt5Multimedia.dylib libQt5MultimediaWidgets.dylib libQt5Network.dylib libQt5PrintSupport.dylib libQt5SerialPort.dylib
             )
         else()


Another typo on warning removal

Another typo on warning removal

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -17,7 +17,7 @@
   # the flag -ftest-coverage causes nvcc to barf, so exclude that one
   if (CMAKE_COMPILER_IS_GNUCC)
     string (REPLACE "-ftest-coverage" "" TMP "${CMAKE_CXX_FLAGS}")
-    string (REPLACE "-ftemplate-depth-50" "" TMP "${TMP}")
+    string (REPLACE "-ftemplate-depth=50" "" TMP "${TMP}")
     string (REPLACE " " "," TMP "${TMP}")
     set (CUDA_CXX_FLAGS ${CUDA_CXX_FLAGS} ${TMP})
   endif ()


Corrected the FindGengetopt to remove a warning

--- cmake/FindGengetopt.cmake
+++ cmake/FindGengetopt.cmake
@@ -5,7 +5,7 @@
 DD(GENGETOPT)
   GET_FILENAME_COMPONENT(CLITK_CMAKE_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
   ADD_SUBDIRECTORY(${CLITK_CMAKE_DIR}/../utilities/gengetopt ${CMAKE_CURRENT_BINARY_DIR}/gengetopt)
-ELSE(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
+ELSE((GENGETOPT STREQUAL "GENGETOPT-NOTFOUND") OR (GENGETOPT STREQUAL ""))
   IF(EXISTS ${GENGETOPT})
     ADD_EXECUTABLE(gengetopt IMPORTED)
     SET_PROPERTY(TARGET gengetopt PROPERTY IMPORTED_LOCATION ${GENGETOPT})
@@ -13,7 +13,7 @@
 	  SET(GENGETOPT "GENGETOPT-NOTFOUND" CACHE FILEPATH "Path to a program." FORCE)
     MESSAGE(FATAL_ERROR "No gengetopt executable found at the specified location")
   ENDIF(EXISTS ${GENGETOPT})
-ENDIF(GENGETOPT STREQUAL "GENGETOPT-NOTFOUND")
+ENDIF((GENGETOPT STREQUAL "GENGETOPT-NOTFOUND") OR (GENGETOPT STREQUAL ""))

 MACRO (WRAP_GGO GGO_SRCS)
   FOREACH(GGO_FILE ${ARGN})


The vendor directory is called third_party.

Stops generating cmake files in third_party go modules.

--- cmake/Modules/UseGo.cmake
+++ cmake/Modules/UseGo.cmake
@@ -104,7 +104,7 @@
     if(TARGET ${tag_name})
         return()
     endif()
-    if(NOT IS_DIRECTORY ${path} OR ${path} MATCHES "vendor" OR NOT ${path} MATCHES "github.com/google/gapid")
+    if(NOT IS_DIRECTORY ${path} OR ${path} MATCHES "third_party" OR NOT ${path} MATCHES "github.com/google/gapid")
       add_library(${tag_name} INTERFACE)
       # It is difficult to handle external packages correctly during the build,
       # so compile them explicitly before everything else (single threaded).


Workaround Embree symlink issue (finding libembree.so)

--- cmake/ospray_macros.cmake
+++ cmake/ospray_macros.cmake
@@ -50,6 +50,12 @@
             " <embree-install-dir>/lib/cmake/embree-<version>.")
   else()
     message(STATUS "Found Embree v${EMBREE_VERSION}: ${EMBREE_LIBRARY}")
+  endif()
+
+  # workaround issue in Embree v2.15.0-v2.16.4
+  # where embree-config.cmake returned the symlink in EMBREE_LIBRARY
+  if (IS_SYMLINK ${EMBREE_LIBRARY})
+    get_filename_component(EMBREE_LIBRARY ${EMBREE_LIBRARY} REALPATH)
   endif()

   set(EMBREE_LIBRARIES ${EMBREE_LIBRARY})


Fixes a compilation issues between recent versions of GCC and CUDA < 8.0

--- cmake/pcl_find_cuda.cmake
+++ cmake/pcl_find_cuda.cmake
@@ -66,4 +66,6 @@
 	include(${PCL_SOURCE_DIR}/cmake/CudaComputeTargetFlags.cmake)
 	APPEND_TARGET_ARCH_FLAGS()

+  # Prevent compilation issues between recent gcc versions and old CUDA versions
+  list(APPEND CUDA_NVCC_FLAGS "-D_FORCE_INLINES")
 endif()


ENH: Update niral_utilities version

ENH: Update niral_utilities version

--- SuperBuild/External_niral_utilities.cmake
+++ SuperBuild/External_niral_utilities.cmake
@@ -77,7 +77,7 @@

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/niral_utilities.git )
-  set( ${proj}_GIT_TAG 8034509e6598e06842a668e051b8ca84842fcd0c)
+  set( ${proj}_GIT_TAG 6924bab40c14705e67da0b0fe6292a0253b241c5)
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


SuperBuild: make boost build verbose

SuperBuild: make boost build verbose

--- SuperBuild/CMake/External_boost.cmake
+++ SuperBuild/CMake/External_boost.cmake
@@ -28,7 +28,6 @@
   --with-date_time
   --with-program_options
   --with-thread
-  -d0
   )

 if(UNIX)


CDRIVER-2895 fix make dist on cmake 3.[3|4]

--- build/cmake/make_dist/MakeDistFiles.cmake
+++ build/cmake/make_dist/MakeDistFiles.cmake
@@ -1,5 +1,5 @@

-if (${CMAKE_VERSION} VERSION_LESS 3.3)
+if (${CMAKE_VERSION} VERSION_LESS 3.5)
    include (CMakeParseArguments)
 endif ()


On Windows, build condor_utils library faster with multiple cores.  #6079

We do this by setting the /MP flag when building source files in
condor_utils, so we get task-level parallelism when the utils lib
is built on its own first.  We do not want to use
the /MP other modules, since we already are using project-level parallelism
once the utils are built.

--- build/cmake/macros/CondorPrecompiledHeaders.cmake
+++ build/cmake/macros/CondorPrecompiledHeaders.cmake
@@ -58,11 +58,16 @@
 					set_source_files_properties(
 						${src_file}
 						PROPERTIES
-						COMPILE_FLAGS "/Yu\"condor_common.h\" /Fp\"${PrecompiledBinary}\""
+						COMPILE_FLAGS "/MP /Yu\"condor_common.h\" /Fp\"${PrecompiledBinary}\""
 						OBJECT_DEPENDS "${PrecompiledBinary}"
 						)
 				else()
 					dprint("file ${src_file} NOT using condor_common.h first")
+					set_source_files_properties(
+						${src_file}
+						PROPERTIES
+						COMPILE_FLAGS "/MP"
+						)
 				endif()
 		endif()
     endforeach()
@@ -79,7 +84,6 @@
 			)
 	endif(UseCondorCommon)

-
   endif()  # of if MSVC and project has enough targets to be worth our time

 ENDMACRO(ADD_PRECOMPILED_HEADER)


Revert latest update of the MatchPoint third party file

Summary: Revert the latest MatchPoint third party file update to that the master is stable again.

Test Plan: manual

Reviewers: O1 MITK Core, floca

Reviewed By: O1 MITK Core, floca

Maniphest Tasks: T26270

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

--- 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_rev_471e4259.tar.gz
-          URL_MD5 ef2f1f80a41ee561d9dfe8d7437055f0
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev_24ef6072.tar.gz
+          URL_MD5 b0a0d7d63da5071db8e73dd6e6b4db7c
          )
     endif()


ManageString: reviewed comment

ManageString: reviewed comment

--- Modules/ManageString.cmake
+++ Modules/ManageString.cmake
@@ -1,42 +1,39 @@
-# - Collection of String utility macros.
-#
-# Included by:
-#   ManageVarible
+# - Manage String by utility functions
 #
 # Defines the following functions:
-#   STRING_APPEND(<var> <str> [separator])
-#     - Append a string to a variable
+#   STRING_APPEND(<var> <str> [<separator>])
+#     - Append a string to a variable.
 #       * Parameters:
 #         + var: A variable that stores the result.
 #         + str: A string to be appended to end of line.
 #         + separator: Separator to separate between strings.
 #
-#   STRING_ESCAPE_BACKSLASH(<var> <str> )
-#     - Escape the dollar sign ($)
-#       * Parameters:
-#         + var: A variable that stores the result.
-#         + str: A string.
-#
-#   STRING_ESCAPE_DOLLAR(<var> <str> )
-#     - Escape the dollar sign ($)
-#       * Parameters:
-#         + var: A variable that stores the result.
-#         + str: A string.
-#
-#   STRING_ESCAPE_QUOTE(<var> <str> )
-#     - Escape the double quote (")
-#       * Parameters:
-#         + var: A variable that stores the result.
-#         + str: A string.
-#
-#   STRING_ESCAPE_SEMICOLON(<var> <str> )
-#     - Escape the semicolon
+#   STRING_ESCAPE_BACKSLASH(<var> <str>)
+#     - Escape the backslash (\).
+#       * Parameters:
+#         + var: A variable that stores the result.
+#         + str: A string.
+#
+#   STRING_ESCAPE_DOLLAR(<var> <str>)
+#     - Escape the dollar sign ($).
+#       * Parameters:
+#         + var: A variable that stores the result.
+#         + str: A string.
+#
+#   STRING_ESCAPE_QUOTE(<var> <str>)
+#     - Escape the double quote (").
+#       * Parameters:
+#         + var: A variable that stores the result.
+#         + str: A string.
+#
+#   STRING_ESCAPE_SEMICOLON(<var> <str>)
+#     - Escape the semicolon (;).
 #       * Parameters:
 #         + var: A variable that stores the result.
 #         + str: A string.
 #
 #   STRING_PADDING(<var> <str> <length> [<padStr>])
-#     - Padding the string to specified length
+#     - Padding the string to specified length.
 #       * Parameters:
 #         + var: A variable that stores the result.
 #         + str: A string.
@@ -44,14 +41,15 @@
 #         + padStr: String that used in padding. Default: " "
 #
 #   STRING_PREPEND(<var> <str> [<separator>])
-#     - Prepend a string to a variable
+#     - Prepend a string to a variable.
 #       * Parameters:
 #         + var: A variable that stores the result.
 #         + str: A string to be appended to end of line.
 #         + separator: Separator to separate between strings.
 #
 #   STRING_SPLIT(<var> <delimiter> <str>
-#       [NOESCAPE_SEMICOLON] [ESCAPE_VARIABLE] [ALLOW_EMPTY])
+#       [NOESCAPE_SEMICOLON] [ESCAPE_VARIABLE] [ALLOW_EMPTY]
+#     )
 #     - Split a string into a list using a delimiter,
 #       which can be in 1 or more characters long.
 #       * Parameters:
@@ -65,9 +63,10 @@
 #   STRING_TRIM(<var> <str> [NOUNQUOTE])
 #     - Trim a string by removing the leading and trailing spaces,
 #       just like STRING(STRIP ...) in CMake 2.6 and later.
-#       This macro is needed as CMake 2.4 does not support STRING(STRIP ..)
-#       This macro also remove quote and double quote marks around the string,
-#       unless NOUNQUOTE is defined.
+#       This macro was developed as CMake 2.4 does not support
+#        STRING(STRIP ..)
+#       This macro also remove quote and double quote marks around
+#       the string, unless NOUNQUOTE is defined.
 #       * Parameters:
 #         + var: A variable that stores the result.
 #         + str: A string.
@@ -88,7 +87,6 @@
 #         + var: A variable that stores the result.
 #         + strList: A list of strings.
 #         + str: (Optional) more string to be join.
-#
 #

 IF(DEFINED _MANAGE_STRING_CMAKE_)