On Windows, the Boost install dir for header files includes the version.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -16,6 +16,12 @@
   set(Boost_DEPENDS ${proj})

   if(NOT DEFINED BOOST_ROOT AND NOT MITK_USE_SYSTEM_Boost)
+
+    set(_boost_version 1_56)
+    set(_boost_install_include_dir include/boost)
+    if(WIN32)
+      set(_boost_install_include_dir include/boost-${_boost_version})
+    endif()

     set(_boost_libs )
     set(_with_boost_libs )
@@ -108,12 +114,12 @@
     else()
       set(_boost_build_cmd BUILD_COMMAND ${CMAKE_COMMAND} -E echo "no binary libraries")
       set(_install_cmd ${CMAKE_COMMAND} -E echo "copying Boost header..."
-             COMMAND ${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/boost" "<INSTALL_DIR>/include/boost")
+             COMMAND ${CMAKE_COMMAND} -E copy_directory "<SOURCE_DIR>/boost" "<INSTALL_DIR>/${_boost_install_include_dir}")
     endif()

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_1_56_0.tar.bz2
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/boost_${_boost_version}_0.tar.bz2
       URL_MD5 a744cf167b05d72335f27c88115f211d
       # We use in-source builds for Boost
       BINARY_DIR ${ep_prefix}/src/${proj}
@@ -136,7 +142,7 @@
     # until the Boost CMake system is used.

     # We just copy the include directory
-    install(DIRECTORY "${install_dir}/include/boost"
+    install(DIRECTORY "${install_dir}/${_boost_install_include_dir}"
             DESTINATION "include"
             COMPONENT dev
            )


FindGSL.cmake: cache updated GSL_LIBS

FindGSL.cmake: cache updated GSL_LIBS

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

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   19)
+SET(KWSYS_DATE_STAMP_DAY   20)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   15)
+SET(KWSYS_DATE_STAMP_DAY   16)


if not found replace either debug or release library path by the other

--- CMake/FindDCMTK.cmake
+++ CMake/FindDCMTK.cmake
@@ -162,6 +162,25 @@
   mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR)
 endif()

+# If either Debug or Release has been build, but the other has not
+# we return still should not return a not found
+
+foreach(lib
+    dcmimgle
+    dcmdata
+    ofstd
+    )
+
+  if( DCMTK_${lib}_LIBRARY_RELEASE AND NOT DCMTK_${lib}_LIBRARY_DEBUG )
+    set(DCMTK_${lib}_LIBRARY_DEBUG ${DCMTK_${lib}_LIBRARY_RELEASE} )
+  endif()
+
+  if( DCMTK_${lib}_LIBRARY_DEBUG AND NOT DCMTK_${lib}_LIBRARY_RELEASE )
+    set(DCMTK_${lib}_LIBRARY_RELEASE ${DCMTK_${lib}_LIBRARY_DEBUG} )
+  endif()
+
+endforeach()
+
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(DCMTK DEFAULT_MSG
   DCMTK_config_INCLUDE_DIR


Update Toolchain.cmake

Update Toolchain.cmake

--- linux/armv7hf/Toolchain.cmake
+++ linux/armv7hf/Toolchain.cmake
@@ -12,4 +12,3 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-set(CMAKE_SYSROOT ${sys_root})


Bugfix

Bugfix

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

--- deal.II/cmake/configure/configure_1_mpi.cmake
+++ deal.II/cmake/configure/configure_1_mpi.cmake
@@ -45,7 +45,7 @@
     "Set the compiler to the detected mpi wrapper ${MPI_CXX_COMPILER}"
     )

-  IF(DEAL_II_MPICXX)
+  IF(DEAL_II_USE_MPICXX)
     SET(CMAKE_CXX_COMPILER ${MPI_CXX_COMPILER})
   ENDIF()
 ENDMACRO()


BUG: 4373. Fix provided by Gaetan Lehmann      http://www.itk.org/Bug/bug.php?op=show&bugid=4373      It is intended to fix the API of itkArrays when used from the wrapping layer.

--- Wrapping/WrapITK/Python/CreateLanguageSupport.cmake
+++ Wrapping/WrapITK/Python/CreateLanguageSupport.cmake
@@ -281,6 +281,8 @@
   SET(text "${text}      }\n")
   SET(text "${text}    }\n")
   SET(text "${text}    $1 = itks;\n")
+  SET(text "${text}  } else {\n")
+  SET(text "${text}  $1 = *s;\n")
   SET(text "${text}  }\n")
   SET(text "${text}}\n")
   SET(text "${text}%typemap(typecheck) ${type} {\n")


Add missing STATUS keyword following commit 82df2168aaa for #190 (#267)

--- Options.cmake
+++ Options.cmake
@@ -102,7 +102,7 @@
 IF(G3_SHARED_LIB)
    message( STATUS "-DG3_SHARED_LIB=ON\tBuild shared library" )
 ELSE()
-   MESSAGE("-DG3_SHARED_LIB=OFF\tBuild static library")
+   MESSAGE( STATUS "-DG3_SHARED_LIB=OFF\tBuild static library")
 ENDIF()

 # WINDOWS OPTIONS


ENH: Update DTIProcess version

ENH: Update DTIProcess version

--- SuperBuild/External_DTIProcess.cmake
+++ SuperBuild/External_DTIProcess.cmake
@@ -72,11 +72,13 @@
     -DUSE_SYSTEM_SlicerExecutionModel:BOOL=ON
     -DDTIProcess_SUPERBUILD:BOOL=OFF
     -DEXECUTABLES_ONLY:BOOL=ON
+    -DSubversion_SVN_EXECUTABLE:PATH=${SVNCOMMAND}
+    -D
     )

   ### --- End Project specific additions
   set( ${proj}_REPOSITORY ${git_protocol}://github.com/NIRALUser/DTIProcessToolkit.git)
-  set( ${proj}_GIT_TAG a7c39e485e492bc6b72f72348939d47835cd56cc )
+  set( ${proj}_GIT_TAG  863e5da765bb1177d34134b2d65f9212915410d1 )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -94,10 +96,9 @@
       ${${proj}_CMAKE_OPTIONS}
       ## We really do want to install to remove uncertainty about where the tools are
       ## (on Windows, tools might be in subfolders, like "Release", "Debug",...)
-      -DCMAKE_INSTALL_PREFIX:PATH=${EXTERNAL_BINARY_DIRECTORY}/${proj}-install
+      -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/${proj}-install
     DEPENDS
-      ${${proj}_DEPENDENCIES}
-    INSTALL_COMMAND ""
+      ${${proj}_DEPENDENCIES}
   )
   set(${extProjName}_DIR ${EXTERNAL_BINARY_DIRECTORY}/${proj}-build)
 else()


cmake: Inherit VERSION and SOVERSION from top-level MIRTK project

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -44,8 +44,6 @@
   # meta-data
   NAME        "VolumetricMapping"
   PACKAGE     "MIRTK"
-  VERSION     "1.0.0rc2" # External module version
-  SOVERSION   "0"        # API yet unstable
   AUTHORS     "Andreas Schuh"
   DESCRIPTION "Volumetric Mapping library of the Medical Image Registration ToolKit."
   COPYRIGHT   "2013-2015 Imperial College London, Andreas Schuh"


MSVC: minimum changes to enable building with the Clang toolset as a subproject.

--- nnpack.cmake
+++ nnpack.cmake
@@ -10,6 +10,7 @@
       -T v141_clang_c2
       -DNNPACK_IN_MSVC_SUBPROJECT:BOOL=true
       -DNNPACK_USE_MB_DISPATCH:BOOL=true
+      -DMB_GLOBAL_ENABLE_TIMER:BOOL=false
       ${CMAKE_CURRENT_LIST_DIR}
     WORKING_DIRECTORY "${binary_dir}"
     ERROR_VARIABLE    stderr
@@ -30,7 +31,6 @@
 #include( "${CMAKE_CURRENT_LIST_DIR}/../../core-utils/cmake-build/common_settings.cmake" )
 include( "${CMAKE_CURRENT_LIST_DIR}/../../core-utils/cmake-build/common_utils.cmake"    )

-set( nnpack_source ${CMAKE_CURRENT_LIST_DIR} )
 #file( GLOB_RECURSE nnpack_sources "${nnpack_source}/src/*.c" )
 file( GLOB_RECURSE nnpack_common_headers "${nnpack_source}/include/*.h"        )
 file( GLOB         nnpack_common_sources "${nnpack_source}/src/*.c"            )


Don't disable PCH if CMAKE_xx_COMPILER_ID is not set

Should fix #82

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -2578,7 +2578,7 @@
 			set (${_targetLanguagesVar} "" PARENT_SCOPE)
 			return()
 		endif()
-		if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$")
+		if (_targetUsePCH AND "${_language}" MATCHES "^C|CXX$" AND NOT "${CMAKE_${_language}_COMPILER_ID}" STREQUAL "")
 			cotire_check_precompiled_header_support("${_language}" "${_target}" _disableMsg)
 			if (_disableMsg)
 				set (_targetUsePCH FALSE)


cpack: make qt-gui dependency dependent on rpm distribution

--- scripts/cmake/Modules/PackagingFedora.cmake
+++ scripts/cmake/Modules/PackagingFedora.cmake
@@ -213,7 +213,11 @@
 set (CPACK_RPM_ELEKTRA-BIN-EXTRA_DEBUGINFO_PACKAGE "OFF")

 set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_NAME "${CPACK_COMPONENT_ELEKTRA-QT-GUI_DISPLAY_NAME}")
-set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_REQUIRES "qt5-qtquickcontrols")
+if ("${OS_NAME}" MATCHES "openSUSE")
+	set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_REQUIRES "libqt5-qtquickcontrols")
+else ()
+	set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_REQUIRES "qt5-qtquickcontrols")
+endif ()
 set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_SUMMARY "${CPACK_COMPONENT_ELEKTRA-QT-GUI_DESCRIPTION}")
 set (CPACK_RPM_ELEKTRA-QT-GUI_PACKAGE_DESCRIPTION "${PACKAGE_DESCRIPTION}")
 set (CPACK_RPM_ELEKTRA-QT-GUI_DEBUGINFO_PACKAGE "${PACKAGE_DEBUGINFO}")


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   09)
+SET(KWSYS_DATE_STAMP_DAY   10)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   16)
+SET(KWSYS_DATE_STAMP_DAY   17)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -1,10 +1,10 @@
 # Do not edit!  Generated by kwsysDateStamp.py

 # KWSys version date year component.  Format is CCYY.
-SET(KWSYS_DATE_STAMP_YEAR  2007)
+SET(KWSYS_DATE_STAMP_YEAR  2008)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 12)
+SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   31)
+SET(KWSYS_DATE_STAMP_DAY   01)


Add Boost as dependency because of implicit dependency in PyKEP.

--- Dependencies.cmake
+++ Dependencies.cmake
@@ -10,6 +10,18 @@
 # https://computing.llnl.gov/tutorials/pthreads/

 find_package(Threads)
+
+# -------------------------------
+
+# Boost: https://boost.org
+
+find_package(Boost)
+
+if(NOT APPLE)
+  include_directories(SYSTEM AFTER "${Boost_INCLUDE_DIRS}")
+else(APPLE)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem \"${Boost_INCLUDE_DIRS}\"")
+endif(NOT APPLE)

 # -------------------------------


psq_check_and_report_tool_version already prints the version, no need to do it ourselves

--- FindCPPCheck.cmake
+++ FindCPPCheck.cmake
@@ -75,13 +75,6 @@
                                        CPPCHECK_EXECUTABLE
                                        CPPCHECK_VERSION)

-    psq_print_if_not_quiet (CPPCheck
-                            MSG "CPPCheck version"
-                                "${CPPCHECK_VERSION} found at"
-                                "${CPPCHECK_EXECUTABLE}"
-                            DEPENDS CPPCHECK_VERSION
-                                    CPPCHECK_EXECUTABLE)
-
     set (CPPCheck_FOUND ${CPPCheck_FOUND} PARENT_SCOPE)

 endfunction (_find_cppcheck)


New version: 0.3.6

New version: 0.3.6

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "5")
+SET(HAWKEY_PATCH "6")


Update release version to 2.0.2

Update release version to 2.0.2

--- Version.cmake
+++ Version.cmake
@@ -10,7 +10,7 @@

 set(SimpleITK_VERSION_MAJOR 2)
 set(SimpleITK_VERSION_MINOR 0)
-set(SimpleITK_VERSION_PATCH 1)
+set(SimpleITK_VERSION_PATCH 2)
 #set(SimpleITK_VERSION_TWEAK "")


Add Git revision check in VERSION.cmake

Add Git revision check in VERSION.cmake

--- VERSION.cmake
+++ VERSION.cmake
@@ -6,3 +6,16 @@

 set(LIBRARY_VERSION "3.0.1")
 set(LIBRARY_SOVERSION "3")
+
+## Git revision number ##
+if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
+  execute_process(COMMAND git describe --tags HEAD
+    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    OUTPUT_VARIABLE GIT_DESCRIBE_TAGS ERROR_QUIET)
+  if(GIT_DESCRIBE_TAGS)
+    string(REGEX REPLACE "^v(.*)" "\\1" GIT_REVISION "${GIT_DESCRIBE_TAGS}")
+    if(GIT_REVISION)
+      set(PROJECT_VERSION_FULL "${GIT_REVISION}")
+    endif(GIT_REVISION)
+  endif(GIT_DESCRIBE_TAGS)
+endif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")


Bumping version for 1.1 development

Bumping version for 1.1 development

--- Version.cmake
+++ Version.cmake
@@ -9,8 +9,8 @@
 # Version info

 set(SimpleITK_VERSION_MAJOR 1)
-set(SimpleITK_VERSION_MINOR 0)
-set(SimpleITK_VERSION_PATCH 1)
+set(SimpleITK_VERSION_MINOR 1)
+set(SimpleITK_VERSION_PATCH 0)
 #set(SimpleITK_VERSION_TWEAK "")


attempt to fix a parallel sophia build.

attempt to fix a parallel sophia build.

--- cmake/BuildSophia.cmake
+++ cmake/BuildSophia.cmake
@@ -7,6 +7,7 @@
 		add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/third_party/sophia/db/libsophia.a
 			WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/third_party/sophia
 			COMMAND $(MAKE) -C db
+			DEPENDS ${CMAKE_SOURCE_DIR}/CMakeCache.txt
 		)
     else()
         add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/third_party/sophia


Softened error message when Clang Format not found.

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -15,7 +15,7 @@
       unset(clangformat_executable_tmp)
     else()
       set(CLANGFORMAT_EXECUTABLE "NotFound")
-      message(WARNING "ClangFormat: ${CLANGFORMAT_EXECUTABLE} not found! Aborting")
+      message(INFO "ClangFormat executable not found, skipping code format targets.")
     endif()
   endif()


Fix bug: install geometry shaders

Fix bug: install geometry shaders

Bounding box geometry shader was not installed

--- cmake/InstallFAST.cmake
+++ cmake/InstallFAST.cmake
@@ -170,12 +170,15 @@
 	COMPONENT fast
 	FILES_MATCHING PATTERN "*.vert"
 )
-
-# Install GL shaders
 install(DIRECTORY ${FAST_SOURCE_DIR}
 	DESTINATION fast/kernels/
 	COMPONENT fast
 	FILES_MATCHING PATTERN "*.frag"
+)
+install(DIRECTORY ${FAST_SOURCE_DIR}
+	DESTINATION fast/kernels/
+	COMPONENT fast
+	FILES_MATCHING PATTERN "*.geom"
 )

 # Install CMake files


Remove unwanted debug code.

Remove unwanted debug code.

--- cmake/FindCursesW.cmake
+++ cmake/FindCursesW.cmake
@@ -119,8 +119,6 @@
 # Proper name is *_INCLUDE_DIR
 SET(CURSESW_INCLUDE_DIR ${CURSESW_INCLUDE_PATH})

-message("${CURSESW_LIBRARY} ${CURSESW_INCLUDE_PATH}")
-
 # handle the QUIETLY and REQUIRED arguments and set CURSESW_FOUND to TRUE if
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleStandardArgs)


Strip the boost namespace output of whitespace

--- cmake/boost_tests.cmake
+++ cmake/boost_tests.cmake
@@ -33,6 +33,7 @@
     "${boost_mangle_namespace_path}"
     CMAKE_FLAGS         "-DINCLUDE_DIRECTORIES=${Boost_INCLUDE_DIRS}"
     RUN_OUTPUT_VARIABLE boost_detect_mangle_namespace)
+  string(STRIP "${boost_detect_mangle_namespace}" boost_detect_mangle_namespace)
   set(BOOST_MANGLE_NAMESPACE "${boost_detect_mangle_namespace}"
     CACHE INTERNAL "The detected mangled boost namespace")
 endif ()


update user_options.cmake sampler

update user_options.cmake sampler

--- user_options_sample.cmake
+++ user_options_sample.cmake
@@ -9,6 +9,8 @@
 SET (BOOST_ROOT "C:/Program Files/Boost" CACHE PATH "Boost ROOT")
 # If BOOST_ROOT is set, one may also want to turn on Boost_NO_SYSTEM_PATHS
 SET (Boost_NO_SYSTEM_PATHS OFF CACHE BOOL "Do not use system Boost search")
+# Use Boost static libraries (vSMC itself does not use Boost runtime)
+SET (Boost_USE_STATIC_LIBS ON CACHE BOOL "Boost use static libraries")

 # For additional Boost related variables see the CMake official FindBoost.cmake


just Boost_PROGRAM_OPTIONS_LIBRARY

just Boost_PROGRAM_OPTIONS_LIBRARY

--- bba/bba.cmake
+++ bba/bba.cmake
@@ -5,7 +5,7 @@

 IF(NOT CMAKE_CROSSCOMPILING)
     ADD_EXECUTABLE(bbasm bba/main.cc)
-	target_link_libraries(bbasm LINK_PUBLIC ${Boost_LIBRARIES})
+    target_link_libraries(bbasm LINK_PUBLIC ${Boost_PROGRAM_OPTIONS_LIBRARY})
 ENDIF(NOT CMAKE_CROSSCOMPILING)

 IF(NOT CMAKE_CROSSCOMPILING)


fix-h7-cmake-sources (#1782)

fix-h7-cmake-sources (#1782)

- adopt from chibios supported LLD drivers.

Signed-off-by: piwi1263 <994bae4cbd153cbc1b284e543355271e6af76bb5@gmail.com>

--- CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake
+++ CMake/Modules/CHIBIOS_STM32H7xx_sources.cmake
@@ -28,14 +28,14 @@
     stm32_exti.c
     hal_pal_lld.c
     hal_i2c_lld.c
-    hal_mac_lld.c
+    #hal_mac_lld.c
     hal_usb_lld.c
     hal_wspi_lld.c
     hal_trng_lld.c
     hal_rtc_lld.c
     hal_sdc_lld.c

-    hal_i2s_lld.c
+    #hal_i2s_lld.c
     hal_spi_lld.c

     hal_st_lld.c
@@ -66,24 +66,23 @@

             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/STM32H7xx
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/ADCv4
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CANv1
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/BDMAv1
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CRYPv1
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv3
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/EXTIv1
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv3
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/FDCANv1
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv3
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MDMAv1
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/OTGv1
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/QUADSPIv1
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/QUADSPIv2
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RNGv1
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2
-            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SDMMCv1
+            ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SDMMCv2
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SPIv3
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/TIMv1
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USARTv2
-            # ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USBv1
             ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/xWDGv1

         CMAKE_FIND_ROOT_PATH_BOTH
@@ -101,23 +100,23 @@
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/common/ext/ST/STM32H7xx)

 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/ADCv4)
-list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CANv1)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/BDMAv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/CRYPv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1)
-list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv3)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/EXTIv1)
-list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv3)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/FDCANv1)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv3)
-list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MACv1)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/MDMAv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/OTGv1)
-list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/QUADSPIv1)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/QUADSPIv2)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RNGv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/RTCv2)
-list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SDMMCv1)
+list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SDMMCv2)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/SPIv3)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/TIMv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USARTv2)
-# list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/USBv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/xWDGv1)


ENH: Use Slicer/ParameterSerializer and update to HEAD.

The upstream repository location is now github.com/Slicer/ParameterSerializer.

Also update the ExternalProject version to latest HEAD which contains
the latest fixes for Slicer.

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -57,10 +57,10 @@
   http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/libsvm-3.17.tar.gz )
 set( LIBSVM_HASH_OR_TAG 67f8b597ce85c1f5288d7838e57ea28a )

-# TubeTK Parameter Serializer snapshot 2014-02-05 )
+# Parameter Serializer snapshot 2014-05-31 )
 set( ParameterSerializer_URL
-  ${github_protocol}://github.com/KitwareMedical/TubeTK-ParameterSerializer.git )
-set( ParameterSerializer_HASH_OR_TAG fe360ce153bfe4efc36b276750d4606bb1d7b156 )
+  ${github_protocol}://github.com/Slicer/ParameterSerializer.git )
+set( ParameterSerializer_HASH_OR_TAG d7e94d3ff9de9a8782db6997f8e1bc45626cfa3b )

 # Slicer Execution Model snapshot 2014-05-13
 set( SlicerExecutionModel_URL


Remove Redland from library search paths

--- CMake/mitkFunctionGetLibrarySearchPaths.cmake
+++ CMake/mitkFunctionGetLibrarySearchPaths.cmake
@@ -86,9 +86,6 @@
     if(SOFA_DIR)
       list(APPEND _dir_candidates "${SOFA_DIR}/bin")
     endif()
-    if(REDLAND_INSTALL_DIR)
-      list(APPEND _dir_candidates "${REDLAND_INSTALL_DIR}/bin")
-    endif()
     list(APPEND _dir_candidates "${ITK_DIR}/bin")
   else()
     if(SOFA_DIR)


BUGsFIX: Slicer Extension Building

BUGsFIX: Slicer Extension Building

--- SuperBuild/External_SlicerExecutionModel.cmake
+++ SuperBuild/External_SlicerExecutionModel.cmake
@@ -26,7 +26,7 @@
 endif()

 # Set dependency list
-set(${proj}_DEPENDENCIES )
+set(${proj}_DEPENDENCIES "")

 if(NOT DEFINED ITK_DIR)


Improve detection of std::regex (ported from OIIO)

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -169,6 +169,7 @@
     endif ()
 endif ()

+set (CSTD_FLAGS "")
 if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_INTEL)
     if (USE_CPP VERSION_GREATER 11)
         message (STATUS "Building for C++14")
@@ -232,10 +233,13 @@
 include (CMakePushCheckState)
 include (CheckCXXSourceRuns)

+cmake_push_check_state ()
+set (CMAKE_REQUIRED_DEFINITIONS ${CSTD_FLAGS})
 check_cxx_source_runs("
       #include <regex>
       int main() {
-          return std::regex_match(\"abc\", std::regex(\"(a)(.*)\")) ? 0 : 1;
+          std::string r = std::regex_replace(std::string(\"abc\"), std::regex(\"b\"), \" \");
+          return r == \"a c\" ? 0 : -1;
       }"
       USE_STD_REGEX)
 if (USE_STD_REGEX)
@@ -243,7 +247,7 @@
 else ()
     add_definitions (-DUSE_BOOST_REGEX)
 endif ()
-
+cmake_pop_check_state ()

 # Code coverage options
 if (CODECOV AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))


Add support for compilation against Houdini libraries on Windows.

--- src/cmake/hou_deps.cmake
+++ src/cmake/hou_deps.cmake
@@ -13,13 +13,21 @@

 # Houdini
 message(STATUS "HOUDINI_ROOT: ${HOUDINI_ROOT}")
-set(HOUDINI_DSOLIB ${HOUDINI_ROOT}/dsolib/)
+
+if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+    set(HOUDINI_DSOLIB "${HOUDINI_ROOT}/custom/houdini/dsolib/")
+    set(CMAKE_FIND_LIBRARY_PREFIXES "" "lib")
+else()
+    set(HOUDINI_DSOLIB ${HOUDINI_ROOT}/dsolib)
+endif()
+message(STATUS "HOUDINI_DSOLIB: ${HOUDINI_DSOLIB}")
+
 set(HOUDINI_INCLUDE ${HOUDINI_ROOT}/toolkit/include)
+message(STATUS "HOUDINI_INCLUDE: ${HOUDINI_INCLUDE}")

 # not every library is being linked
-set(CMAKE_BUILD_RPATH ${HOUDINI_ROOT}/dsolib)
-set(CMAKE_INSTALL_RPATH ${HOUDINI_ROOT}/dsolib)
-
+set(CMAKE_BUILD_RPATH ${HOUDINI_DSOLIB})
+set(CMAKE_INSTALL_RPATH ${HOUDINI_DSOLIB})

 # hboost
 # override boost searching and inject hboost
@@ -35,21 +43,27 @@
 endmacro()

 find_library(BOOST_FILESYSTEM_LIB
-        NAMES hboost_filesystem
+        NAMES
+        hboost_filesystem
+        hboost_filesystem-mt-x64
         PATHS ${HOUDINI_DSOLIB}
         NO_DEFAULT_PATH
         REQUIRED
         )

 find_library(BOOST_REGEX_LIB
-        NAMES hboost_regex
+        NAMES
+        hboost_regex
+        hboost_regex-mt-x64
         PATHS ${HOUDINI_DSOLIB}
         NO_DEFAULT_PATH
         REQUIRED
         )

 find_library(BOOST_SYSTEM_LIB
-        NAMES hboost_system
+        NAMES
+        hboost_system
+        hboost_system-mt-x64
         PATHS ${HOUDINI_DSOLIB}
         NO_DEFAULT_PATH
         REQUIRED
@@ -154,10 +168,11 @@

 # png
 find_library(PNG_LIB
-        NAMES png
-        PATHS ${HOUDINI_DSOLIB}
-        NO_DEFAULT_PATH
-        REQUIRED
+        NAMES
+        png
+        png16
+        PATHS ${HOUDINI_DSOLIB}
+        NO_DEFAULT_PATH
         )

 set(PNG_INCLUDE_DIRS ${HOUDINI_INCLUDE})
@@ -166,7 +181,9 @@

 # OpenSubdiv
 find_library(OSD_OSDGPU_LIB
-        NAMES osdGPU
+        NAMES
+        osdGPU
+        osdGPU_md
         PATHS ${HOUDINI_DSOLIB}
         NO_DEFAULT_PATH
         REQUIRED
@@ -174,7 +191,9 @@

 find_library(OSD_OSDCPU_LIB
-        NAMES osdCPU
+        NAMES
+        osdCPU
+        osdCPU_md
         PATHS ${HOUDINI_DSOLIB}
         NO_DEFAULT_PATH
         REQUIRED
@@ -241,7 +260,9 @@

 # libz
 find_library(Z_LIB
-        NAMES z
+        NAMES
+        z
+        zdll
         PATHS ${HOUDINI_DSOLIB}
         NO_DEFAULT_PATH
         REQUIRED


added: support for installing top-level header

--- share/hugh/cmake/functions/cma_setup_library.cmake
+++ share/hugh/cmake/functions/cma_setup_library.cmake
@@ -46,6 +46,9 @@
       set(LIB_INCDIR "${PROJECT_SOURCE_DIR}/inc/${LIB_INCDIR}")
     endif()
   endif()
+
+  file(GLOB TOPLVLHDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${LIB_INCDIR}*.hpp)
+  list(APPEND LIB_SOURCES ${TOPLVLHDR})

   file(GLOB_RECURSE PUBHDRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${LIB_INCDIR}/*.hpp)
   list(APPEND LIB_SOURCES ${PUBHDRS})
@@ -102,7 +105,13 @@
             DESTINATION ${${PROJECT_NAME}_HEADER_DIRECTORY}/${LIB_INCDIR_INSTALL}
             COMPONENT   ${${PROJECT_NAME}_HDR_COMPONENT_NAME}
             PATTERN "*~" EXCLUDE)
-   endif()
+  endif()

-   cma_add_target_to_list(${LIB_NAME} CMAKE_TARGET_LIST)
+  if (TOPLVLHDR)
+    install(FILES       ${TOPLVLHDR}
+            DESTINATION ${${PROJECT_NAME}_HEADER_DIRECTORY}/${LIB_INCDIR_INSTALL}/..
+            COMPONENT   ${${PROJECT_NAME}_HDR_COMPONENT_NAME})
+  endif()
+
+  cma_add_target_to_list(${LIB_NAME} CMAKE_TARGET_LIST)
 endfunction()


[changed] BOTG_INCLUDE

[changed] BOTG_INCLUDE

--- cmake/BOTG_INCLUDE.cmake
+++ cmake/BOTG_INCLUDE.cmake
@@ -3,11 +3,10 @@
 MACRO( BOTG_DownloadExternalProjects external_projects )
     FOREACH( ep ${external_projects} )
         MESSAGE( STATUS "loading external project=${ep}...")
-        CONFIGURE_FILE(external/${ep}.in download/${ep}/CMakeLists.txt)
-        EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-            . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/external/download/${ep})
-        EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build
-            . WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/external/download/${ep})
+        SET( dest "${CMAKE_BINARY_DIR}/external/download/${ep}" )
+        CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/external/${ep}.in" "${dest}/CMakeLists.txt" )
+        EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . WORKING_DIRECTORY "${dest}")
+        EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build . WORKING_DIRECTORY "${dest}")
     ENDFOREACH()
 ENDMACRO()

@@ -23,8 +22,7 @@
 # Set the BootsOnTheGround source directory!
 ELSE()

-    GET_FILENAME_COMPONENT(parent_dir ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)
-    SET(BOTG_SOURCE_DIR "${parent_dir}" CACHE PATH INTERNAL)
+    SET(BOTG_SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/BootsOnTheGround" CACHE PATH INTERNAL)

     IF( EXISTS "${BOTG_SOURCE_DIR}" )
         MESSAGE( STATUS "[BootsOnTheGround] using BOTG_SOURCE_DIR=${BOTG_SOURCE_DIR} ... ")


Add backup path for finding googletest

Add backup path for finding googletest

--- cmake/Dependencies.cmake
+++ cmake/Dependencies.cmake
@@ -51,7 +51,8 @@
 find_package(BZip2 REQUIRED)
 find_package(GFlags REQUIRED)
 find_package(Glog REQUIRED)
-find_package(GoogleTest REQUIRED)
+find_package(GoogleTest REQUIRED
+  PATHS "${CMAKE_SOURCE_DIR}/thirdparty/install")
 find_package(CURL REQUIRED)
 find_package(Iconv REQUIRED)
 find_package(Storehouse REQUIRED CONFIG


Fix "FindFreetype.cmake".

Fix "FindFreetype.cmake".

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

-find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES include/freetype2 include)
+find_path(FREETYPE_H_PATH_ft2build NAMES ft2build.h PATH_SUFFIXES freetype2)
 find_path(FREETYPE_H_PATH_ftconfig NAMES freetype/config/ftconfig.h PATH_SUFFIXES freetype2)
 if (NOT FREETYPE_H_PATH_ftconfig)
-    find_path(FREETYPE_H_PATH_ftconfig NAMES config/ftconfig.h PATH_SUFFIXES include/freetype2 include)
+    find_path(FREETYPE_H_PATH_ftconfig NAMES config/ftconfig.h PATH_SUFFIXES freetype2)
 endif()

 find_library(FREETYPE_LIB NAMES freetype2 freetype libfreetype PATH_SUFFIXES dynamic)


Fixed android library detection.

Fixed android library detection.

--- cmake/FindOpenSLES.cmake
+++ cmake/FindOpenSLES.cmake
@@ -8,10 +8,6 @@
 if(OPENSLES_INCLUDE_DIR)
 	# Already in cache, be silent
 	set(OPENSLES_FIND_QUIETLY TRUE)
-elseif(ANDROID)
-	# Android has no pkgconfig - fallback to default paths
-	set(PC_OPENSLES_INCLUDE_DIR "${ANDROID_SYSROOT}/usr/include")
-	set(PC_OPENSLES_LIBDIR      "${ANDROID_SYSROOT}/usr/lib"    )
 else()
 	find_package(PkgConfig)
 	pkg_check_modules(PC_OPENSLES QUIET OpenSLES)


Github #277 Add option to use shared boost libraries

Pass -DSHARED_BOOST=ON to cmake to link dynamically to boost.
This makes it possible to use standard package-installed boost
libraries in a native build.

Change-Id: I6cbd72fae8b0cf8ae07f4382ab0510854c1623fd
Signed-off-by: Matthew Bentham <85b03818c46fb1de46c21a6d16f19bf625d7dee2@arm.com>

--- cmake/GlobalConfig.cmake
+++ cmake/GlobalConfig.cmake
@@ -22,6 +22,7 @@
 option(FLATBUFFERS_ROOT "Location where the flatbuffers 'include' and 'lib' folders to be found" Off)
 option(DYNAMIC_BACKEND_PATHS "Colon seperated list of paths where to load the dynamic backends from" "")
 option(BUILD_GATORD_MOCK "Build the Gatord simulator for external profiling testing." ON)
+option(SHARED_BOOST "Use dynamic linking for boost libraries" OFF)

 include(SelectLibraryConfigurations)

@@ -108,8 +109,13 @@
 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})

 # Boost
+if(SHARED_BOOST)
+    add_definitions(-DBOOST_ALL_DYN_LINK)
+    set(Boost_USE_STATIC_LIBS OFF)
+else()
+    set(Boost_USE_STATIC_LIBS ON)
+endif()
 add_definitions("-DBOOST_ALL_NO_LIB") # Turn off auto-linking as we specify the libs manually
-set(Boost_USE_STATIC_LIBS ON)
 find_package(Boost 1.59 REQUIRED COMPONENTS unit_test_framework system filesystem log program_options)
 include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
 link_directories(${Boost_LIBRARY_DIRS})


Fix bug with MPI_BUILTIN

Fix bug with MPI_BUILTIN

--- cmake/NektarCommon.cmake
+++ cmake/NektarCommon.cmake
@@ -177,13 +177,13 @@
     ADD_DEPENDENCIES(${name} boost tinyxml zlib-1.2.7)

     IF( NEKTAR_USE_MPI )
-        IF (NOT DEFINED MPI_BUILTIN)
+        IF (NOT MPI_BUILTIN)
             TARGET_LINK_LIBRARIES(${name} ${MPI_LIBRARY} ${MPI_EXTRA_LIBRARY})
             SET_TARGET_PROPERTIES(${name}
                 PROPERTIES LINK_FLAGS "${THE_LINK_FLAGS} ${MPI_LINK_FLAGS}")
+            SET_TARGET_PROPERTIES(${name}
+                PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}")
         ENDIF()
-        SET_TARGET_PROPERTIES(${name}
-            PROPERTIES COMPILE_FLAGS "${THE_COMPILE_FLAGS} ${MPI_COMPILE_FLAGS}")
     ENDIF( NEKTAR_USE_MPI )

     IF( ${CMAKE_SYSTEM} MATCHES "Linux.*" )


cmake: cl2cpp change main OUTPUT to .hpp file

To reduce number of unnecessary rebuilds on updates of OpenCL kernels

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -720,7 +720,7 @@
   if(cl_kernels)
     set(OCL_NAME opencl_kernels_${name})
     add_custom_command(
-      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp"
+      OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.hpp" "${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp"
       COMMAND ${CMAKE_COMMAND} "-DMODULE_NAME=${name}" "-DCL_DIR=${CMAKE_CURRENT_LIST_DIR}/src/opencl" "-DOUTPUT=${CMAKE_CURRENT_BINARY_DIR}/${OCL_NAME}.cpp" -P "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake"
       DEPENDS ${cl_kernels} "${OpenCV_SOURCE_DIR}/cmake/cl2cpp.cmake")
     ocv_source_group("Src\\opencl\\kernels" FILES ${cl_kernels})


Remove wrong cached value for HAVE_CXX_NEW

--- cmake/WindowsCache.cmake
+++ cmake/WindowsCache.cmake
@@ -377,7 +377,6 @@
 SET(HAVE_CRYPT_H CACHE INTERNAL "")
 SET(HAVE_CUSERID CACHE INTERNAL "")
 SET(HAVE_CXXABI_H CACHE INTERNAL "")
-SET(HAVE_CXX_NEW CACHE INTERNAL "")
 SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
 SET(HAVE_SIGNAL_H 1 CACHE INTERNAL "")
 SET(HAVE_GETHOSTBYNAME_R CACHE INTERNAL "")


xpu.cmake: use baidu-kunlun-product. update to 1116. (#48031)

--- cmake/external/xpu.cmake
+++ cmake/external/xpu.cmake
@@ -10,18 +10,9 @@
 if(NOT DEFINED XPU_BASE_URL)
   set(XPU_BASE_URL_WITHOUT_DATE
       "https://baidu-kunlun-product.su.bcebos.com/KL-SDK/klsdk-dev")
-  set(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20221110")
+  set(XPU_BASE_URL "${XPU_BASE_URL_WITHOUT_DATE}/20221116")
 else()
   set(XPU_BASE_URL "${XPU_BASE_URL}")
-endif()
-
-# ubuntu and centos: use output by XDNN API team
-if(NOT DEFINED XPU_XDNN_BASE_URL)
-  set(XPU_XDNN_BASE_URL_WITHOUT_DATE
-      "https://klx-sdk-release-public.su.bcebos.com/xdnn/dev")
-  set(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL_WITHOUT_DATE}/20221109")
-else()
-  set(XPU_XDNN_BASE_URL "${XPU_XDNN_BASE_URL}")
 endif()

 set(XPU_XCCL_BASE_URL
@@ -31,52 +22,33 @@
   set(XPU_XRE_DIR_NAME "xre-kylin_aarch64")
   set(XPU_XDNN_DIR_NAME "xdnn-kylin_aarch64")
   set(XPU_XCCL_DIR_NAME "xccl-kylin_aarch64")
-  set(XPU_XDNN_URL
-      "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
-      CACHE STRING "" FORCE)
 elseif(WITH_SUNWAY)
   set(XPU_XRE_DIR_NAME "xre-deepin_sw6_64")
   set(XPU_XDNN_DIR_NAME "xdnn-deepin_sw6_64")
   set(XPU_XCCL_DIR_NAME "xccl-deepin_sw6_64")
-  set(XPU_XDNN_URL
-      "${XPU_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
-      CACHE STRING "" FORCE)
 elseif(WITH_BDCENTOS)
   set(XPU_XRE_DIR_NAME "xre-bdcentos_x86_64")
   set(XPU_XDNN_DIR_NAME "xdnn-bdcentos_x86_64")
   set(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
-  # ubuntu and centos: use output by XDNN API team
-  set(XPU_XDNN_URL
-      "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
-      CACHE STRING "" FORCE)
 elseif(WITH_UBUNTU)
   set(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
   set(XPU_XDNN_DIR_NAME "xdnn-ubuntu_x86_64")
   set(XPU_XCCL_DIR_NAME "xccl-ubuntu_x86_64")
-  # ubuntu and centos: use output by XDNN API team
-  set(XPU_XDNN_URL
-      "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
-      CACHE STRING "" FORCE)
 elseif(WITH_CENTOS)
   set(XPU_XRE_DIR_NAME "xre-centos7_x86_64")
-  set(XPU_XDNN_DIR_NAME "xdnn-bdcentos_x86_64")
+  set(XPU_XDNN_DIR_NAME "xdnn-centos7_x86_64")
   set(XPU_XCCL_DIR_NAME "xccl-bdcentos_x86_64")
-  # ubuntu and centos: use output by XDNN API team
-  set(XPU_XDNN_URL
-      "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
-      CACHE STRING "" FORCE)
 else()
   set(XPU_XRE_DIR_NAME "xre-ubuntu_x86_64")
   set(XPU_XDNN_DIR_NAME "xdnn-ubuntu_x86_64")
   set(XPU_XCCL_DIR_NAME "xccl-ubuntu_x86_64")
-  # default: use output by XDNN API team
-  set(XPU_XDNN_URL
-      "${XPU_XDNN_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
-      CACHE STRING "" FORCE)
 endif()

 set(XPU_XRE_URL
     "${XPU_BASE_URL}/${XPU_XRE_DIR_NAME}.tar.gz"
+    CACHE STRING "" FORCE)
+set(XPU_XDNN_URL
+    "${XPU_BASE_URL}/${XPU_XDNN_DIR_NAME}.tar.gz"
     CACHE STRING "" FORCE)
 set(XPU_XCCL_URL
     "${XPU_XCCL_BASE_URL}/${XPU_XCCL_DIR_NAME}.tar.gz"


build: fix cURL ssl compilation issues

build: fix cURL ssl compilation issues

Signed-off-by: Lorenzo Fontana <0189fb5ac8a393aa741cf57f29cfe3228fcad081@gmail.com>

--- cmake/modules/cURL.cmake
+++ cmake/modules/cURL.cmake
@@ -19,13 +19,9 @@
   set(CURL_INCLUDE_DIR "${CURL_BUNDLE_DIR}/include/")
   set(CURL_LIBRARIES "${CURL_BUNDLE_DIR}/lib/.libs/libcurl.a")

-  if(NOT USE_BUNDLED_OPENSSL)
-    set(CURL_SSL_OPTION "--with-ssl")
-  else()
-    set(CURL_SSL_OPTION "--with-ssl=${OPENSSL_INSTALL_DIR}")
-    message(STATUS "Using bundled curl in '${CURL_BUNDLE_DIR}'")
-    message(STATUS "Using SSL for curl in '${CURL_SSL_OPTION}'")
-  endif()
+  set(CURL_SSL_OPTION "--with-ssl=${OPENSSL_INSTALL_DIR}")
+  message(STATUS "Using bundled curl in '${CURL_BUNDLE_DIR}'")
+  message(STATUS "Using SSL for curl in '${CURL_SSL_OPTION}'")

   externalproject_add(
     curl


fixed a typo

fixed a typo

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@6445 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_find_sse.cmake
+++ cmake/pcl_find_sse.cmake
@@ -138,7 +138,7 @@
       endif ()

     endif()
-    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
+    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${SSE_FLAGS}")
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${SSE_FLAGS}")


Distinct names for different build types

Only applies if not building for covise

--- cmake/modules/DeskvoxAddTarget.cmake
+++ cmake/modules/DeskvoxAddTarget.cmake
@@ -77,17 +77,17 @@

 function(__deskvox_set_target_postfixes target)
-  #if(BUILD_SHARED_LIBS)
-  #  set_target_properties(${target} PROPERTIES DEBUG_POSTFIX "-gd")
-  #  set_target_properties(${target} PROPERTIES RELEASE_POSTFIX "")
-  #  set_target_properties(${target} PROPERTIES MINSIZEREL_POSTFIX "-m")
-  #  set_target_properties(${target} PROPERTIES RELWITHDEBINFO_POSTFIX "-d")
-  #else()
-  #  set_target_properties(${target} PROPERTIES DEBUG_POSTFIX "$-sgd")
-  #  set_target_properties(${target} PROPERTIES RELEASE_POSTFIX "-s")
-  #  set_target_properties(${target} PROPERTIES MINSIZEREL_POSTFIX "-sm")
-  #  set_target_properties(${target} PROPERTIES RELWITHDEBINFO_POSTFIX "-sd")
-  #endif()
+  if(BUILD_SHARED_LIBS)
+    set_target_properties(${target} PROPERTIES DEBUG_POSTFIX "-gd")
+    set_target_properties(${target} PROPERTIES RELEASE_POSTFIX "")
+    set_target_properties(${target} PROPERTIES MINSIZEREL_POSTFIX "-m")
+    set_target_properties(${target} PROPERTIES RELWITHDEBINFO_POSTFIX "-d")
+  else()
+    set_target_properties(${target} PROPERTIES DEBUG_POSTFIX "$-sgd")
+    set_target_properties(${target} PROPERTIES RELEASE_POSTFIX "-s")
+    set_target_properties(${target} PROPERTIES MINSIZEREL_POSTFIX "-sm")
+    set_target_properties(${target} PROPERTIES RELWITHDEBINFO_POSTFIX "-sd")
+  endif()
 endfunction()

@@ -111,7 +111,9 @@
     set_target_properties(${name} PROPERTIES "COMPILE_FLAGS" "${COMPILE_FLAGS_OLD} -fvisibility=hidden")
   endif()

-  __deskvox_set_target_postfixes(${name})
+  if(NOT COVISE_BUILD)
+    __deskvox_set_target_postfixes(${name})
+  endif()

   target_link_libraries(${name} ${__DESKVOX_LINK_LIBRARIES})


Corrected typo

Corrected typo

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -150,7 +150,7 @@
 ROOT_BUILD_OPTION(pythia8 ON "Pythia8 EG support, requires libPythia8")
 ROOT_BUILD_OPTION(python ON "Python ROOT bindings, requires python >= 2.2")
 ROOT_BUILD_OPTION(qt ${qt_defvalue} "Qt graphics backend, requires libqt >= 4.8")
-ROOT_BUILD_OPTION(qtgsi ${gtgsi_defvalue} "GSI's Qt integration, requires libqt >= 4.8")
+ROOT_BUILD_OPTION(qtgsi ${qtgsi_defvalue} "GSI's Qt integration, requires libqt >= 4.8")
 ROOT_BUILD_OPTION(roofit ${roofit_defvalue} "Build the libRooFit advanced fitting package")
 ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
 ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")


Revert "List build options in alphabetical order"

This reverts commit 0b45b0cacb6d6d1412d852fe04b369672a07b8c3.

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -67,25 +67,29 @@
 ROOT_BUILD_OPTION(astiff ON "Include tiff support in image processing")
 ROOT_BUILD_OPTION(bonjour ON "Bonjour support, requires libdns_sd and/or Avahi")
 ROOT_BUILD_OPTION(builtin_afterimage ON "Build included libAfterImage, or use system libAfterImage")
-ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build the FITSIO library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_davix OFF "Build the Davix library internally (downloading tarfile from the Web)")
 ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build the FFTW3 library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_ftgl ON "Build included libFTGL, or use system libftgl")
 ROOT_BUILD_OPTION(builtin_freetype OFF "Build included libfreetype, or use system libfreetype")
-ROOT_BUILD_OPTION(builtin_ftgl ON "Build included libFTGL, or use system libftgl")
 ROOT_BUILD_OPTION(builtin_gl2ps OFF "Build included libgl2ps, or use system libgl2ps")
 ROOT_BUILD_OPTION(builtin_glew ON "Build included libGLEW, or use system libGLEW")
-ROOT_BUILD_OPTION(builtin_gsl OFF "Build the GSL library internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_llvm ON "Build the LLVM internally")
-ROOT_BUILD_OPTION(builtin_lzma OFF "Build included liblzma, or use system liblzma")
 ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally, or use system OpenSSL")
 ROOT_BUILD_OPTION(builtin_pcre OFF "Build included libpcre, or use system libpcre")
+ROOT_BUILD_OPTION(builtin_unuran OFF "Build included libunuran, or use system libunuran")
+ROOT_BUILD_OPTION(builtin_zlib OFF "Build included libz, or use system libz")
+ROOT_BUILD_OPTION(builtin_lzma OFF "Build included liblzma, or use system liblzma")
+ROOT_BUILD_OPTION(builtin_davix OFF "Build the Davix library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_gsl OFF "Build the GSL library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build the FITSIO library internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
+ROOT_BUILD_OPTION(builtin_llvm ON "Build the LLVM internally")
 ROOT_BUILD_OPTION(builtin_tbb OFF "Build the TBB internally")
-ROOT_BUILD_OPTION(builtin_unuran OFF "Build included libunuran, or use system libunuran")
+ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally")
+ROOT_BUILD_OPTION(builtin_vdt OFF "Build the VDT package internally")
 ROOT_BUILD_OPTION(builtin_vc OFF "Build the Vc package internally")
-ROOT_BUILD_OPTION(builtin_vdt OFF "Build the VDT package internally")
-ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally")
-ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
-ROOT_BUILD_OPTION(builtin_zlib OFF "Build included libz, or use system libz")
+ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
+ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
+ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
+ROOT_BUILD_OPTION(cxxmodules "Compile with C++ modules enabled." OFF)
 ROOT_BUILD_OPTION(castor ON "CASTOR support, requires libshift from CASTOR >= 1.5.2")
 if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
   ROOT_BUILD_OPTION(ccache ON "Enable ccache usage for speeding up builds")
@@ -96,9 +100,6 @@
 ROOT_BUILD_OPTION(cling ON "Enable new CLING C++ interpreter")
 ROOT_BUILD_OPTION(cocoa OFF "Use native Cocoa/Quartz graphics backend (MacOS X only)")
 ROOT_BUILD_OPTION(cuda OFF "Use CUDA if it is found in the system")
-ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
-ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")
-ROOT_BUILD_OPTION(cxxmodules "Compile with C++ modules enabled." OFF)
 ROOT_BUILD_OPTION(davix ON "DavIx library for HTTP/WEBDAV access")
 ROOT_BUILD_OPTION(dcache ON "dCache support, requires libdcap from DESY")
 ROOT_BUILD_OPTION(exceptions ON "Turn on compiler exception handling capability")
@@ -107,22 +108,21 @@
 ROOT_BUILD_OPTION(fitsio ON "Read images and data from FITS files, requires cfitsio")
 ROOT_BUILD_OPTION(fortran ON "Enable the Fortran components of ROOT")
 set(gcctoolchain "" CACHE PATH "Path for the gcctoolchain in case not the system gcc is used to build clang/LLVM")
+ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
 ROOT_BUILD_OPTION(gdml OFF "GDML writer and reader")
+ROOT_BUILD_OPTION(geocad OFF "ROOT-CAD Interface")
 ROOT_BUILD_OPTION(genvector ON "Build the new libGenVector library")
-ROOT_BUILD_OPTION(geocad OFF "ROOT-CAD Interface")
 ROOT_BUILD_OPTION(gfal ON "GFAL support, requires libgfal")
 ROOT_BUILD_OPTION(glite ON "gLite support, requires libglite-api-wrapper v.3 from GSI (https://subversion.gsi.de/trac/dgrid/wiki)")
 ROOT_BUILD_OPTION(globus OFF "Globus authentication support, requires Globus toolkit")
 ROOT_BUILD_OPTION(gnuinstall OFF "Perform installation following the GNU guidelines")
 ROOT_BUILD_OPTION(gsl_shared OFF "Enable linking against shared libraries for GSL (default no)")
-ROOT_BUILD_OPTION(gviz ON "Graphs visualization support, requires graphviz")
 ROOT_BUILD_OPTION(hdfs ON "HDFS support; requires libhdfs from HDFS >= 0.19.1")
 ROOT_BUILD_OPTION(http OFF "HTTP Server support")
 ROOT_BUILD_OPTION(imt ON "Implicit multi-threading support")
 ROOT_BUILD_OPTION(jemalloc OFF "Using the jemalloc allocator")
 ROOT_BUILD_OPTION(krb5 ON "Kerberos5 support, requires Kerberos libs")
 ROOT_BUILD_OPTION(ldap ON "LDAP support, requires (Open)LDAP libs")
-ROOT_BUILD_OPTION(libcxx OFF "Build using libc++, requires cxx11 option (MacOS X only, for the time being)")
 ROOT_BUILD_OPTION(macos_native OFF "Disable looking for libraries, includes and binaries in locations other than a native installation (MacOS only)")
 ROOT_BUILD_OPTION(mathmore ON "Build the new libMathMore extended math library, requires GSL (vers. >= 1.8)")
 ROOT_BUILD_OPTION(memstat ON "A memory statistics utility, helps to detect memory leaks")
@@ -141,12 +141,12 @@
 ROOT_BUILD_OPTION(python3 OFF "Python 3 ROOT bindings, requires python >= 3.1")
 ROOT_BUILD_OPTION(qt OFF "Qt graphics backend, requires libqt >= 4.8")
 ROOT_BUILD_OPTION(qtgsi OFF "GSI's Qt integration, requires libqt >= 4.8")
+ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
+ROOT_BUILD_OPTION(root7 OFF "Build the ROOT 7 interface prototype, requires cxx14")
+ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
 ROOT_BUILD_OPTION(r OFF "R ROOT bindings, requires R, Rcpp and RInside")
 ROOT_BUILD_OPTION(rfio ON "RFIO support, requires libshift from CASTOR >= 1.5.2")
-ROOT_BUILD_OPTION(roofit OFF "Build the libRooFit advanced fitting package")
-ROOT_BUILD_OPTION(root7 OFF "Build the ROOT 7 interface prototype, requires cxx14")
 ROOT_BUILD_OPTION(rpath OFF "Set run-time library load path on executables and shared libraries (at installation area)")
-ROOT_BUILD_OPTION(ruby OFF "Ruby ROOT bindings, requires ruby >= 1.8")
 ROOT_BUILD_OPTION(sapdb ON "MaxDB/SapDB support, requires libsqlod and libsqlrte")
 ROOT_BUILD_OPTION(shadowpw ON "Shadow password support")
 ROOT_BUILD_OPTION(shared ON "Use shared 3rd party libraries if possible")
@@ -159,14 +159,14 @@
 ROOT_BUILD_OPTION(thread ON "Using thread library (cannot be disabled)")
 ROOT_BUILD_OPTION(tmva ON "Build TMVA multi variate analysis library")
 ROOT_BUILD_OPTION(unuran OFF "UNURAN - package for generating non-uniform random numbers")
+ROOT_BUILD_OPTION(veccore OFF "VecCore SIMD abstraction library")
+ROOT_BUILD_OPTION(vecgeom OFF "VecGeom is a vectorized geometry library enhancing the performance of geometry navigation.")
 ROOT_BUILD_OPTION(vc OFF "Vc adds a few new types for portable and intuitive SIMD programming")
 ROOT_BUILD_OPTION(vdt OFF "VDT adds a set of fast and vectorisable mathematical functions")
-ROOT_BUILD_OPTION(veccore OFF "VecCore SIMD abstraction library")
-ROOT_BUILD_OPTION(vecgeom OFF "VecGeom is a vectorized geometry library enhancing the performance of geometry navigation.")
 ROOT_BUILD_OPTION(winrtdebug OFF "Link against the Windows debug runtime library")
-ROOT_BUILD_OPTION(x11 ON "X11 support")
 ROOT_BUILD_OPTION(xft ON "Xft support (X11 antialiased fonts)")
 ROOT_BUILD_OPTION(xml ON "XML parser interface")
+ROOT_BUILD_OPTION(x11 ON "X11 support")
 ROOT_BUILD_OPTION(xrootd ON "Build xrootd file server and its client (if supported)")

 option(fail-on-missing "Fail the configure step if a required external package is missing" OFF)
@@ -221,9 +221,9 @@
   set(builtin_xrootd_defvalue ON)
   set(builtin_llvm_defvalue ON)
   set(builtin_tbb_defvalue ON)
+  set(builtin_veccore_defvalue ON)
+  set(builtin_vdt_defvalue ON)
   set(builtin_vc_defvalue ON)
-  set(builtin_vdt_defvalue ON)
-  set(builtin_veccore_defvalue ON)
 endif()

 #---VC does not support yet Arm and PPC processors----------------------------------------------


linux-armv7: Specify system processor and fix library finding.

This commit updates the toolchain to ensure libraries associated with arm
can be found. While a new root path needed to be set for armv6, the
most recent armv7 toolchain doesn't require to explicitly set a new
root.

--- linux-armv7/Toolchain.cmake
+++ linux-armv7/Toolchain.cmake
@@ -1,5 +1,6 @@
 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_VERSION 1)
+set(CMAKE_SYSTEM_PROCESSOR arm)

 set(cross_triple "arm-linux-gnueabihf")

@@ -7,9 +8,8 @@
 set(CMAKE_CXX_COMPILER /usr/bin/${cross_triple}-c++)
 set(CMAKE_Fortran_COMPILER /usr/bin/${cross_triple}-gfortran)

-set(CMAKE_FIND_ROOT_PATH /usr/${cross_triple})
-set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
-set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
-set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+# Discard path returned by pkg-config and associated with HINTS in module
+# like FindOpenSSL.
+set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)

 set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm)


modules: updated FindMagnum.cmake once again.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -394,8 +394,8 @@
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()

-            # Find also EGL library, if on ES
-            if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES)
+            # Find also EGL library, if on ES (and not on WebGL)
+            if(MAGNUM_TARGET_GLES AND NOT MAGNUM_TARGET_DESKTOP_GLES AND NOT MAGNUM_TARGET_WEBGL)
                 find_package(EGL)
                 if(EGL_FOUND)
                     list(APPEND _MAGNUM_${_COMPONENT}_LIBRARIES ${EGL_LIBRARY})


Bugfix: Do not unset TRILINOS_DIR

Bugfix: Do not unset TRILINOS_DIR

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

--- deal.II/cmake/configure/configure_trilinos.cmake
+++ deal.II/cmake/configure/configure_trilinos.cmake
@@ -159,9 +159,6 @@
     UNSET(TRILINOS_SUPPORTS_CPP11 CACHE)
     UNSET(TRILINOS_HAS_C99_TR1_WORKAROUND CACHE)

-    IF(NOT ${var})
-      UNSET(TRILINOS_DIR CACHE)
-    ENDIF()
   ENDIF(TRILINOS_FOUND)
 ENDMACRO()


define _DEBUG_

define _DEBUG_

--- salome_adm/cmake_files/SalomeSetupPlatform.cmake
+++ salome_adm/cmake_files/SalomeSetupPlatform.cmake
@@ -105,6 +105,11 @@
   SET(PLATFORM_LIBS dl)    # Dynamic loading (dlopen, dlsym)
 ENDIF()

+## define _DEBUG_ macro
+IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
+  ADD_DEFINITIONS(-D_DEBUG_)
+ENDIF()
+
 ## Apple specific:
 IF(APPLE)
   SET(CMAKE_C_COMPILER gcc)


no need for platform specific OSPCOMMON_PATH in superbuild

--- scripts/superbuild/dependencies/dep_ospcommon.cmake
+++ scripts/superbuild/dependencies/dep_ospcommon.cmake
@@ -43,10 +43,7 @@
   BUILD_ALWAYS OFF
 )

-set(OSPCOMMON_PATH "${COMPONENT_PATH}")
-if (NOT WIN32)
-  set(OSPCOMMON_PATH "${OSPCOMMON_PATH}/lib/cmake/ospcommon")
-endif()
+set(OSPCOMMON_PATH "${COMPONENT_PATH}/lib/cmake/ospcommon")

 if (BUILD_TBB_FROM_SOURCE)
   ExternalProject_Add_StepDependencies(${COMPONENT_NAME} configure tbb)


Fix signed/unsigned mismatch

Fix signed/unsigned mismatch

--- sequoia-engine/cmake/SequoiaEngineSetCXXFlags.cmake
+++ sequoia-engine/cmake/SequoiaEngineSetCXXFlags.cmake
@@ -101,21 +101,24 @@
     if(SEQUOIA_ENGINE_OPTIMIZE)
       # TODO: figure out the LTO flags etc...
     endif()
+
+    # C4018 - signed/unsigned mismatch
+    sequoia_check_and_set_cxx_flag("/wd4018" HAVE_MSVC_WD4018)

     # C4244 - conversion from 'type1' to 'type2', possible loss of data
     sequoia_check_and_set_cxx_flag("/wd4244" HAVE_MSVC_WD4244)

-    # C4305: 'initializing': truncation from 'double' to 'const float
+    # C4267 - 'var' : conversion from 'size_t' to 'type', possible loss of data
+    sequoia_check_and_set_cxx_flag("/wd4267" HAVE_MSVC_WD4267)
+
+    # C4305 - 'initializing': truncation from 'double' to 'const float
     sequoia_check_and_set_cxx_flag("/wd4305" HAVE_MSVC_WD4305)
-
-    # C4800:  'unsigned __int64': forcing value to bool 'true' or 'false' (performance warning)
-    sequoia_check_and_set_cxx_flag("/wd4800" HAVE_MSVC_WD4800)

     # C4661 - 'function' : no prototype provided; assumed no parameters
     sequoia_check_and_set_cxx_flag("/wd4661" HAVE_MSVC_WD4661)
-
-    # C4267 - 'var' : conversion from 'size_t' to 'type', possible loss of data
-    sequoia_check_and_set_cxx_flag("/wd4267" HAVE_MSVC_WD4267)
+
+    # C4800 - 'unsigned __int64': forcing value to bool 'true' or 'false' (performance warning)
+    sequoia_check_and_set_cxx_flag("/wd4800" HAVE_MSVC_WD4800)

   #
   # GCC/Clang/Intel


Cleaned up CMake dependencies and install location.

--- catkin.cmake
+++ catkin.cmake
@@ -1,35 +1,42 @@
 cmake_minimum_required(VERSION 2.8.3)

-# TODO: We might be missing dependencies here.
 find_package(catkin REQUIRED)
 catkin_package(
     INCLUDE_DIRS include/
     LIBRARIES ${PROJECT_NAME}
+    DEPENDS ompl openrave
 )

-include(FindPkgConfig)
-pkg_check_modules(OPENRAVE REQUIRED openrave0.9)
-pkg_check_modules(OMPL REQUIRED ompl)
+find_package(OpenRAVE)
+find_package(OMPL)

 include_directories(
     include/${PROJECT_NAME}
-    ${OPENRAVE_INCLUDE_DIRS}
+    ${OpenRAVE_INCLUDE_DIRS}
     ${OMPL_INCLUDE_DIRS})
-link_directories(${OPENRAVE_LIBRARY_DIRS} ${OMPL_LIBRARY_DIRS})
+link_directories(${OpenRAVE_LIBRARY_DIRS} ${OMPL_LIBRARY_DIRS})

 add_library(${PROJECT_NAME} src/OMPLPlanner.cpp)
 target_link_libraries(${PROJECT_NAME}
-    ${OPENRAVE_LIBRARIES} ${OMPL_LIBRARIES})
+    ${OpenRAVE_LIBRARIES} ${OMPL_LIBRARIES})
+set_target_properties(${PROJECT_NAME} PROPERTIES
+    COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS} ${OMPL_CXX_FLAGS}"
+    LINK_FLAGS "${OpenRAVE_LINK_FLAGS} ${OMPL_LINK_FLAGS}")

-add_library(${PROJECT_NAME}_plugin src/OMPLMain.cpp)
+add_library(${PROJECT_NAME}_plugin SHARED
+    src/OMPLMain.cpp)
 target_link_libraries(${PROJECT_NAME}_plugin
-    ${OPENRAVE_LIBRARIES} ${OMPL_LIBRARIES})
-set_target_properties(${PROJECT_NAME}_plugin PROPERTIES PREFIX "")
+    ${PROJECT_NAME} ${OpenRAVE_LIBRARIES})
+set_target_properties(${PROJECT_NAME}_plugin PROPERTIES
+    PREFIX ""
+    COMPILE_FLAGS "${OpenRAVE_CXX_FLAGS}"
+    LINK_FLAGS "${OpenRAVE_LINK_FLAGS}"
+    LIBRARY_OUTPUT_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_LIB_DESTINATION}/openrave-${OpenRAVE_LIBRARY_SUFFIX}")

 install(TARGETS or_ompl
-    LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
+    LIBRARY DESTINATION "${CATKIN_PACKAGE_LIB_DESTINATION}")
 install(TARGETS or_ompl_plugin
-    LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}/openrave0.9)
-install(DIRECTORY include/${PROJECT_NAME}/
-    DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+    LIBRARY DESTINATION "${CATKIN_PACKAGE_LIB_DESTINATION}/openrave-${OpenRAVE_LIBRARY_SUFFIX}")
+install(DIRECTORY "include/${PROJECT_NAME}/"
+    DESTINATION "${CATKIN_PACKAGE_INCLUDE_DESTINATION}"
     PATTERN ".svn" EXCLUDE)


cmake: FindGSL.cmake fixed some warning

cmake: FindGSL.cmake fixed some warning

--- CMakeModules/FindGSL.cmake
+++ CMakeModules/FindGSL.cmake
@@ -30,12 +30,14 @@
 #added gsl depends
 #BUG in OpenSuse (missing libgslcblas.so link libgsl.so)
 #if (NOT BUILD_SHARED_LIBS)
+if (PC_GSL_LIBRARIES)
   list(REMOVE_ITEM PC_GSL_LIBRARIES gsl)
   foreach (LIB ${PC_GSL_LIBRARIES})
     find_library(GSL_${LIB} NAMES ${LIB} HINTS ${PC_GSL_LIBRARY_DIRS} )
     list(APPEND GSL_LIBRARY ${GSL_${LIB}})
     unset(GSL_${LIB} CACHE)
   endforeach(LIB)
+endif (PC_GSL_LIBRARIES)
 #endif (NOT BUILD_SHARED_LIBS)

 include(FindPackageHandleStandardArgs)


Fix locating IDL on Windows for more recent IDL versions

--- CMakeModules/FindIDL.cmake
+++ CMakeModules/FindIDL.cmake
@@ -54,7 +54,7 @@
 #
 # ``IDL_FOUND``
 #   ``TRUE`` if the IDL installation is found, ``FALSE``
-#   otherwise. All variable below are defined if IDL is found.
+#   otherwise. All variables below are defined if IDL is found.
 # ``IDL_ROOT_DIR``
 #   the final root of the IDL installation determined by the FindIDL
 #   module.
@@ -78,10 +78,6 @@
 # :command:`IDL_extract_all_installed_versions_from_registry`
 #   parses the registry for all IDL versions. Available on Windows only.
 #   The part of the registry parsed is dependent on the host processor
-# :command:`IDL_get_all_valid_IDL_roots_from_registry`
-#   returns all the possible IDL paths, according to a previously
-#   given list. Only the existing/accessible paths are kept. This is mainly
-#   useful for the searching all possible IDL installation.
 # :command:`IDL_get_version_from_root`
 #   returns the version of IDL, given the IDL root directory.
 #
@@ -115,20 +111,18 @@
 #   installed. The found versions are returned in `IDL_versions`.
 #   Set `win64` to `TRUE` if the 64 bit version of IDL should be looked for
 #   The returned list contains all versions under
-#   ``HKLM\\SOFTWARE\\ITT\\IDL`` or an empty list in case an error
+#   ``HKLM\\SOFTWARE\\Harris\\IDL``, ``HKLM\\SOFTWARE\\Exelis\\IDL``, or
+#   ``HKLM\\SOFTWARE\\ITT\\IDL``, or an empty list in case an error
 #   occurred (or nothing found).
 #
-#   .. note::
-#
-#     Only the versions are provided. No check is made over the existence of the
-#     installation referenced in the registry,
+#   The returned IDL_versions is organized in pairs
+#   ``(version_number,IDL_root_path)``.
 #
 function(IDL_extract_all_installed_versions_from_registry win64 IDL_versions)

   if(NOT CMAKE_HOST_WIN32)
     message(FATAL_ERROR "This macro can only be called by a windows host (call to reg.exe")
   endif()
-

   if(${win64} AND ${CMAKE_HOST_SYSTEM_PROCESSOR} MATCHES "64")
     set(APPEND_REG "/reg:64")
@@ -136,120 +130,96 @@
     set(APPEND_REG "/reg:32")
   endif()

-  # /reg:64 should be added on 64 bits capable OSs in order to enable the
-  # redirection of 64 bits applications
-  execute_process(
-    COMMAND reg query HKEY_LOCAL_MACHINE\\SOFTWARE\\ITT\\IDL /f * /k ${APPEND_REG}
-    RESULT_VARIABLE resultIDL
-    OUTPUT_VARIABLE varIDL
-    ERROR_VARIABLE errIDL
-    INPUT_FILE NUL
-    )
-
-  set(IDLs_from_registry)
-  if(${resultIDL} EQUAL 0)
-
-    string(
-      REGEX MATCHALL "IDL\\\\([0-9]+(\\.[0-9]+)?)"
-      IDL_versions_regex ${varIDL})
-
-    foreach(match IN LISTS IDL_versions_regex)
+  set(_IDL_versions_list)
+  foreach(_IDL_company Harris Exelis ITT)
+
+    # /reg:64 should be added on 64 bits capable OSs in order to enable the
+    # redirection of 64 bits applications
+    execute_process(
+      COMMAND reg query HKEY_LOCAL_MACHINE\\SOFTWARE\\${_IDL_company}\\IDL /f * /k ${APPEND_REG}
+      RESULT_VARIABLE resultIDL
+      OUTPUT_VARIABLE varIDL
+      ERROR_VARIABLE errIDL
+      INPUT_FILE NUL
+      )
+
+    if(${resultIDL} EQUAL 0)
+
       string(
-        REGEX MATCH "IDL\\\\(([0-9]+)(\\.([0-9]+))?)"
-        current_match ${match})
-
-      set(_IDL_current_version ${CMAKE_MATCH_1})
-      set(current_IDL_version_major ${CMAKE_MATCH_2})
-      set(current_IDL_version_minor ${CMAKE_MATCH_4})
-      if(NOT current_IDL_version_minor)
-        set(current_IDL_version_minor "0")
-      endif()
-
-      list(APPEND IDLs_from_registry ${_IDL_current_version})
-      unset(_IDL_current_version)
-    endforeach(match)
-
-  endif()
-
-  if(IDLs_from_registry)
-    list(REMOVE_DUPLICATES IDLs_from_registry)
-    list(SORT IDLs_from_registry)
-    list(REVERSE IDLs_from_registry)
-  endif()
-
-  set(${IDL_versions} ${IDLs_from_registry} PARENT_SCOPE)
+        REGEX MATCHALL "IDL\\\\([0-9]+(\\.[0-9]+)?)"
+        IDL_versions_regex ${varIDL})
+
+      foreach(match IN LISTS IDL_versions_regex)
+        string(
+          REGEX MATCH "IDL\\\\(([0-9]+)(\\.([0-9]+))?)"
+          current_match ${match})
+
+        set(_IDL_current_version ${CMAKE_MATCH_1})
+        set(current_IDL_version_major ${CMAKE_MATCH_2})
+        set(current_IDL_version_minor ${CMAKE_MATCH_4})
+        if(NOT current_IDL_version_minor)
+          set(current_IDL_version_minor "0")
+        endif()
+
+        get_filename_component(
+          current_IDL_ROOT
+          "[HKEY_LOCAL_MACHINE\\SOFTWARE\\${_IDL_company}\\IDL\\${_IDL_current_version};Installdir]"
+          ABSOLUTE)
+
+        # IDL root is "${Installdir}/IDLxy" with x.y the IDL version
+        string(REPLACE "." "" _IDL_current_version_short ${_IDL_current_version})
+        set(current_IDL_ROOT "${current_IDL_ROOT}/IDL${_IDL_current_version_short}")
+        unset(_IDL_current_version_short)
+        if(EXISTS ${current_IDL_ROOT})
+          list(APPEND _IDL_versions_list ${_IDL_current_version} ${current_IDL_ROOT})
+        endif()
+
+        unset(_IDL_current_version)
+      endforeach(match)
+
+    endif()
+
+  endforeach(_IDL_company)
+
+  set(${IDL_versions} ${_IDL_versions_list} PARENT_SCOPE)

 endfunction()

-#.rst:
-# .. command:: IDL_get_all_valid_IDL_roots_from_registry
-#
-#   Populates the IDL root with valid versions of IDL.
-#   The returned IDL_roots is organized in pairs
-#   ``(version_number,IDL_root_path)``.
-#
-#   ::
-#
-#     IDL_get_all_valid_IDL_roots_from_registry(
-#         IDL_versions
-#         IDL_roots)
-#
-#   ``IDL_versions``
-#     the versions of each of the IDL installations
-#   ``IDL_roots``
-#     the location of each of the IDL installations
-function(IDL_get_all_valid_IDL_roots_from_registry IDL_versions IDL_roots)
-
-  set(_IDL_roots_list )
-  foreach(_IDL_current_version ${IDL_versions})
-    get_filename_component(
-      current_IDL_ROOT
-      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\ITT\\IDL\\${_IDL_current_version};Installdir]"
-      ABSOLUTE)
-
-    # IDL root is "${Installdir}/IDLxy" with x.y the IDL version
-    string(REPLACE "." "" _IDL_current_version_short ${_IDL_current_version})
-    set(current_IDL_ROOT "${current_IDL_ROOT}/IDL${_IDL_current_version_short}")
-    unset(_IDL_current_version_short)
-    if(EXISTS ${current_IDL_ROOT})
-      list(APPEND _IDL_roots_list ${_IDL_current_version} ${current_IDL_ROOT})
-    endif()
-
-  endforeach(_IDL_current_version)
-  unset(_IDL_current_version)
-  set(${IDL_roots} ${_IDL_roots_list} PARENT_SCOPE)
-  unset(_IDL_roots_list)
-endfunction()
-
-
-# get IDL version for a given root path from the list of `(version_number,IDL_root_path)`` pairs
-function(IDL_get_version_from_IDL_roots_from_registry IDL_roots IDL_root IDL_version)
-  list(LENGTH IDL_roots _numbers_of_IDL_roots)
-  foreach(i RANGE 0 (_numbers_of_IDL_roots-1) 2)
-    list(GET IDL_roots 0 _IDL_version)
-    list(GET IDL_roots 1 _IDL_root)
-    if(_IDL_root STREQUAL IDL_root)
-      set(IDL_version _IDL_version PARENT_SCOPE)
+# get IDL version for a given root path from the list of `(version_number,IDL_root_path)` pairs
+function(IDL_get_version_from_IDL_versions_from_registry IDL_versions IDL_root IDL_version)
+  file(TO_CMAKE_PATH "${IDL_root}" _given_root)
+  list(LENGTH IDL_versions _numbers_of_IDL_versions)
+  foreach(i RANGE 0 (_numbers_of_IDL_versions-1) 2)
+    list(GET IDL_versions ${i} _IDL_version)
+    math(EXPR j "${i} + 1")
+    list(GET IDL_versions ${j} _IDL_root)
+    if(${_IDL_root} STREQUAL ${_given_root})
+      set(${IDL_version} ${_IDL_version} PARENT_SCOPE)
     endif()
     unset(_IDL_version)
     unset(_IDL_root)
   endforeach()
-  set(_numbers_of_IDL_roots)
+  unset(_given_root)
+  unset(_numbers_of_IDL_versions)
 endfunction()

-# Get the version of IDL from the version.txt file (Mac/Linux only).
+# Get the version of IDL from the version.txt file
 function(IDL_get_version_from_root IDL_root IDL_final_version)
   if(WIN32)
     # determine based on entries in registry
     set(_IDL_versions_from_registry)
     IDL_extract_all_installed_versions_from_registry(CMAKE_CL_64 _IDL_versions_from_registry)
+    if(IDL_FIND_DEBUG)
+      message(STATUS "[IDL] IDL versions from registry are ${_IDL_versions_from_registry}")
+    endif()
     if(_IDL_versions_from_registry)
-      IDL_get_all_valid_IDL_roots_from_registry("${_IDL_versions_from_registry}" _IDL_available_roots)
+      set(_IDL_version)
+      IDL_get_version_from_IDL_versions_from_registry("${_IDL_versions_from_registry}" ${IDL_root} _IDL_version)
       unset(_IDL_versions_from_registry)
-      IDL_get_version_from_IDL_roots_from_registry(_IDL_available_roots IDL_root IDL_final_version)
-      unset(_IDL_available_roots)
-    endif()
+      set(${IDL_final_version} ${_IDL_version} PARENT_SCOPE)
+      unset(_IDL_version)
+    endif(_IDL_versions_from_registry)
   else()
     if(EXISTS ${IDL_root}/version.txt)
       file(READ ${IDL_root}/version.txt _IDL_version LIMIT 10)
@@ -306,21 +276,15 @@
   if(WIN32)

     # On WIN32, we look for IDL installation in the registry
-    # if unsuccessful, we look for all known revision and filter the existing
-    # ones.

     # testing if we are able to extract the needed information from the registry
-    set(_IDL_versions_from_registry)
-    IDL_extract_all_installed_versions_from_registry(CMAKE_CL_64 _IDL_versions_from_registry)
+    set(_IDL_possible_roots)
+    IDL_extract_all_installed_versions_from_registry(CMAKE_CL_64 _IDL_possible_roots)

     # the returned list is empty, doing the search on all known versions
-    if(NOT _IDL_versions_from_registry)
+    if(NOT _IDL_possible_roots)
       message(STATUS "[IDL] Search for IDL from the registry unsuccessful")
     endif()
-
-    # filtering the results with the registry keys
-    IDL_get_all_valid_IDL_roots_from_registry("${_IDL_versions_from_registry}" _IDL_possible_roots)
-    unset(_IDL_versions_from_registry)

   else()


fixed http where i forgot a parentheses

fixed http where i forgot a parentheses

--- tests/web/http_put_test.cmake
+++ tests/web/http_put_test.cmake
@@ -7,7 +7,7 @@
   compress("test.tgz" "myfile.txt")
   http_put("http://httpbin.org/put" --file test.tgz --json)
   ans(res)
-  map_tryget(${res} dat
+  map_tryget(${res} data)
   ans(data)
   fwrite("result.tgz" "${data}")
   ## - does not work because of encoding


set exec privilege for thrift and protoc

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -291,6 +291,10 @@
 			install(FILES "bin/dsn.cg.bat" DESTINATION bin)
 		else()
 			install(PROGRAMS "bin/dsn.cg.sh" DESTINATION bin)
+			install(PROGRAMS "bin/Linux/thrift" DESTINATION bin/Linux)
+			install(PROGRAMS "bin/Linux/protoc" DESTINATION bin/Linux)
+			install(PROGRAMS "bin/FreeBSD/thrift" DESTINATION bin/FreeBSD)
+			install(PROGRAMS "bin/FreeBSD/protoc" DESTINATION bin/FreeBSD)
 		endif()
 	endif()
 endfunction(dsn_setup_install)


Fix MSVC skcms Windows build (#570)

Fix MSVC skcms Windows build (#570)

Fixes #568

--- third_party/skcms.cmake
+++ third_party/skcms.cmake
@@ -32,7 +32,7 @@
   target_compile_options(skcms-obj PRIVATE -DJPEGXL_BUNDLE_SKCMS=1)
   if(MSVC)
     target_compile_options(skcms-obj
-      PRIVATE /FI"${CMAKE_SOURCE_DIR}/lib/jxl/enc_jxl_skcms.h")
+      PRIVATE /FI${CMAKE_SOURCE_DIR}/lib/jxl/enc_jxl_skcms.h)
   else()
     target_compile_options(skcms-obj
       PRIVATE -include${CMAKE_SOURCE_DIR}/lib/jxl/enc_jxl_skcms.h)


Added additional module targets.

Added additional module targets.

--- CPM.cmake
+++ CPM.cmake
@@ -1,4 +1,4 @@
-# CPM - CMake Package Manager
+# CPM - Cmake based C++ Package Manager
 #
 # A CMake module for managing external dependencies.
 # CPM can be used to build traditional C/C++ libraries and CPM modules.
@@ -110,6 +110,14 @@
 #                                 associated with an exported module.
 #  CPM_KV_LIST_DEFINITION_MAP   - A list of values in the definition map.
 #
+#  CPM_KV_LIB_TARGET_MAP_*      - A key/value mapping from unique id to
+#                                 additional targets to link against.
+#                                 Key: unique path (with version).
+#                                 Value: List of additional targets.
+#                                 Used to determine the list of additional
+#                                 targets associated with an exported module.
+#  CPM_KV_LIST_LIB_TARGET_MAP   - A list of all key values in the library
+#                                 target map (CPM_KV_LIB_TARGET_MAP_*).
 #  CPM_KV_EXPORT_MAP_*          - A key/value mapping of all exported modules
 #                                 from a module.
 #                                 Key: unique path (with version).
@@ -153,6 +161,14 @@
 #     Use sparingly. Primarily used to expose external project directories
 #     to module consumers.
 #
+#  CPM_ExportAdditionalLibraryTarget <target>
+#
+#     This function is mostly used to avoid having to name targets
+#     per the ${CPM_TARGET_NAME} convention in CPM. For an example of its use
+#     see http://github.com/iauns/cpm-google-test. Google test generates
+#     its own target name when included as a subdirectory, so we must use
+#     that name.
+#
 #  CPM_ForceOnlyOneModuleVersion
 #
 #     When called from a module, this function ensures that we use only one
@@ -163,6 +179,11 @@
 #  CPM_GetSourceDir <variable_to_set> <name>
 #
 #     Retrieves the source directory for the module.
+#
+#
+#
+# TODO: Consolidate the definitions, includes, and target_lib map lists.
+# TODO: Add ability to patch source directories after we download them.
 #
 #-------------------------------------------------------------------------------
 # Pre-compute a regex to match documented keywords for each command.
@@ -508,6 +529,22 @@
   endif()
 endmacro()

+# Propogates target library map up.
+macro(_cpm_propogate_target_lib_map_up)
+  # Use CPM_KV_LIST_MOD_VERSION_MAP to propogate constraints up into the
+  # parent CPM_AddModule function's namespace. CPM_AddModule will
+  # propogate the versioning information up again to it's parent's namespace.
+  if (NOT CPM_HIERARCHY_LEVEL EQUAL 0)
+    foreach(_cpm_kvName IN LISTS CPM_KV_LIST_LIB_TARGET_MAP)
+      set(CPM_KV_LIB_TARGET_MAP_${_cpm_kvName} ${CPM_KV_LIB_TARGET_MAP_${_cpm_kvName}} PARENT_SCOPE)
+    endforeach()
+    set(_cpm_kvName) # Clear kvName
+
+    # Now propogate the list itself upwards.
+    set(CPM_KV_LIST_LIB_TARGET_MAP ${CPM_KV_LIST_LIB_TARGET_MAP} PARENT_SCOPE)
+  endif()
+endmacro()
+
 # Propogates export module map up.
 macro(_cpm_propogate_export_map_up)
   # Use CPM_KV_LIST_MOD_VERSION_MAP to propogate constraints up into the
@@ -562,6 +599,7 @@
   _cpm_propogate_version_map_up()
   _cpm_propogate_include_map_up()
   _cpm_propogate_definition_map_up()
+  _cpm_propogate_target_lib_map_up()
   _cpm_propogate_export_map_up()

   # Setup the module with appropriate definitions and includes.
@@ -627,6 +665,11 @@
 macro(CPM_ExportAdditionalDefinition def)
   set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} ${def} PARENT_SCOPE)
   set(CPM_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS} ${def})
+endmacro()
+
+macro(CPM_ExportAdditionalLibraryTarget def)
+  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} ${def} PARENT_SCOPE)
+  set(CPM_ADDITIONAL_TARGET_LIBS ${CPM_ADDITIONAL_TARGET_LIBS} ${def})
 endmacro()

 # We use this code in multiple places to check that we don't have preprocessor
@@ -1042,6 +1085,7 @@

   set(INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${__CPM_FULL_UNID})
   set(DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${__CPM_FULL_UNID})
+  set(TARGET_LIB_MAP_NAME CPM_KV_TARGET_LIB_MAP_${__CPM_FULL_UNID})

   # Save variables that get overwritten by subdirectory.
   set(CPM_PARENT_ADDITIONAL_DEFINITIONS ${CPM_ADDITIONAL_DEFINITIONS})
@@ -1073,6 +1117,7 @@
     # Add these additional include directories and definitions to our maps...
     set(${INCLUDE_MAP_NAME} ${CPM_ADDITIONAL_INCLUDE_DIRS})
     set(${DEFINITION_MAP_NAME} ${CPM_ADDITIONAL_DEFINITIONS})
+    set(${TARGET_LIB_MAP_NAME} ${CPM_ADDITIONAL_TARGET_LIBS})

     # Parse the arguments once again after adding the subdirectory (since we
     # cleared them all).
@@ -1124,9 +1169,14 @@
       foreach(module IN LISTS CPM_EXPORTED_MODULES)
         set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
         set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
+        set(IMPORT_TARGET_LIB_MAP_NAME CPM_KV_TARGET_LIB_MAP_${module})

         set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
         set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
+        set(CPM_LIBRARIES ${CPM_LIBRARIES} ${${IMPORT_TARGET_LIB_MAP_NAME}})
+        set(CPM_LIBRARIES ${CPM_LIBRARIES} PARENT_SCOPE)
+        set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} ${${IMPORT_TARGET_LIB_MAP_NAME}})
+        set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} PARENT_SCOPE)

         # Find what the module named itself, and add that definition to our
         # definitions.
@@ -1145,6 +1195,7 @@
     # Make sure there are entries for us in the include and definition lists.
     set(CPM_KV_LIST_INCLUDE_MAP ${CPM_KV_LIST_INCLUDE_MAP} ${__CPM_FULL_UNID})
     set(CPM_KV_LIST_DEFINITION_MAP ${CPM_KV_LIST_DEFINITION_MAP} ${__CPM_FULL_UNID})
+    set(CPM_KV_LIST_TARGET_LIB_MAP ${CPM_KV_LIST_TARGET_LIB_MAP} ${__CPM_FULL_UNID})

   else()
     # Set the name the module is using to setup its namespaces.
@@ -1162,9 +1213,14 @@
       foreach(module IN LISTS CPM_KV_EXPORT_MAP_${__CPM_FULL_UNID})
         set(IMPORT_INCLUDE_MAP_NAME    CPM_KV_INCLUDE_MAP_${module})
         set(IMPORT_DEFINITION_MAP_NAME CPM_KV_DEFINITION_MAP_${module})
+        set(IMPORT_TARGET_LIB_MAP_NAME CPM_KV_TARGET_LIB_MAP_${module})

         set(CPM_INCLUDE_DIRS ${CPM_INCLUDE_DIRS} ${${IMPORT_INCLUDE_MAP_NAME}})
         set(CPM_DEFINITIONS ${CPM_DEFINITIONS} ${${IMPORT_DEFINITION_MAP_NAME}})
+        set(CPM_LIBRARIES ${CPM_LIBRARIES} ${${IMPORT_TARGET_LIB_MAP_NAME}})
+        set(CPM_LIBRARIES ${CPM_LIBRARIES} PARENT_SCOPE)
+        set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} ${${IMPORT_TARGET_LIB_MAP_NAME}})
+        set(CPM_DEPENDENCIES ${CPM_DEPENDENCIES} PARENT_SCOPE)

         # Find what the module named itself, and add that definition to our
         # definitions.
@@ -1227,6 +1283,7 @@
   # Export the rest of the maps for exported modules and the like.
   _cpm_propogate_include_map_up()
   _cpm_propogate_definition_map_up()
+  _cpm_propogate_target_lib_map_up()
   _cpm_propogate_export_map_up()

   if (COMMAND CPM_PostModuleExecCallback)


Fix FindDBXML.

Fix FindDBXML.

--- cmake/FindDBXML.cmake
+++ cmake/FindDBXML.cmake
@@ -1,17 +1,11 @@
-# Find the Oracle Berkeley DB XML library and its requirements
+# Find the Oracle Berkeley DB XML library

-find_path(DBXML_INCLUDE_DIR names dbxml/DbXml.hpp)
+find_path(DBXML_INCLUDE_DIR NAMES dbxml/DbXml.hpp)

-find_library(XQILLA_LIBRARY NAMES xqilla)
-find_library(XERCES_LIBRARY NAMES xerces-c)
 find_library(DBXML_LIBRARY NAMES dbxml)
-find_library(DBCXX_LIBRARY NAMES db_cxx)

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(DBXML DEFAULT_MSG
                                   DBXML_INCLUDE_DIR DBXML_LIBRARY)
-find_package_handle_standard_args(DBCXX DEFAULT_MSG DBCXX_LIBRARY)
-find_package_handle_standard_args(XERCES DEFAULT_MSG XERCES_LIBRARY)
-find_package_handle_standard_args(XQILLA DEFAULT_MSG XQILLA_LIBRARY)

-mark_as_advanced(DBXML_LIBRARIES)
+mark_as_advanced(DBXML_INCLUDE_DIR DBXML_LIBRARY)


Update error message in FindImGui.cmake

Update error message in FindImGui.cmake

IMGUI_DIR needs to be set now.

--- cmake/FindImGui.cmake
+++ cmake/FindImGui.cmake
@@ -19,7 +19,7 @@
 )

 if(NOT IMGUI_INCLUDE_DIR)
-  message(FATAL_ERROR "IMGUI imgui.cpp not found. Set IMGUI_ROOT to imgui's top-level path (containing \"imgui.cpp\" and \"imgui.h\" files).\n")
+  message(FATAL_ERROR "IMGUI imgui.cpp not found. Set IMGUI_DIR to imgui's top-level path (containing \"imgui.cpp\" and \"imgui.h\" files).\n")
 endif()

 set(IMGUI_SOURCES
@@ -35,7 +35,7 @@

 # Extract version from header
 file(
-	STRINGS
+  STRINGS
   ${IMGUI_INCLUDE_DIR}/imgui.h
   IMGUI_VERSION
   REGEX "#define IMGUI_VERSION "


FindLua51: Also look for lua.h in the "lua-5.1" directory.

--- cmake/FindLua51.cmake
+++ cmake/FindLua51.cmake
@@ -3,14 +3,14 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(LUA_H_PATH NAMES lua.h PATH_SUFFIXES lua5.1 lua51 lua)
-find_library(LUA_LIB NAMES lua5.1 lua51 lua PATH_SUFFIXES dynamic)
-find_library(LUA_LIB_DBG NAMES lua5.1_d lua51_d lua_d PATH_SUFFIXES dynamic)
+find_path(LUA_H_PATH NAMES lua.h PATH_SUFFIXES lua5.1 lua51 lua-5.1 lua)
+find_library(LUA_LIB NAMES lua5.1 lua51 lua-5.1 lua PATH_SUFFIXES dynamic)
+find_library(LUA_LIB_DBG NAMES lua5.1_d lua51_d lua-5.1_d lua_d PATH_SUFFIXES dynamic)
 mark_as_advanced(LUA_H_PATH LUA_LIB LUA_LIB_DBG)

 if (WIN32 OR APPLE)
-    find_library(LUA_LIB_STATIC NAMES lua5.1 lua51 lua PATH_SUFFIXES static)
-    find_library(LUA_LIB_STATIC_DBG NAMES lua5.1_d lua51_d lua_d PATH_SUFFIXES static)
+    find_library(LUA_LIB_STATIC NAMES lua5.1 lua51 lua-5.1 lua PATH_SUFFIXES static)
+    find_library(LUA_LIB_STATIC_DBG NAMES lua5.1_d lua51_d lua-5.1_d lua_d PATH_SUFFIXES static)
     mark_as_advanced(LUA_LIB_STATIC LUA_LIB_STATIC_DBG)
 endif()


cmake: QGCDeploy: Update old rsync command

/libs/lib/Framework was moved to /libs/Framework

Signed-off-by: Patrick José Pereira <c2b7559029b4032a4ce95718d7d3bc36c8a1d7c1@gmail.com>

--- cmake/QGCDeploy.cmake
+++ cmake/QGCDeploy.cmake
@@ -20,7 +20,7 @@
 		COMMAND
 			${MACDEPLOYQT_EXECUTABLE} $<TARGET_FILE_DIR:QGroundControl>/../.. -appstore-compliant -qmldir=${CMAKE_SOURCE_DIR}/src
 		COMMAND
-			rsync -a ${CMAKE_SOURCE_DIR}/libs/lib/Frameworks $<TARGET_FILE_DIR:QGroundControl>/../../Contents/
+			rsync -a ${CMAKE_SOURCE_DIR}/libs/Frameworks $<TARGET_FILE_DIR:QGroundControl>/../../Contents/
 		COMMAND
 			${CMAKE_INSTALL_NAME_TOOL} -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $<TARGET_FILE:QGroundControl>
 	)


Allow adding additional dependencies before processing *dep files (#204)

--- cmake/bde_utils.cmake
+++ cmake/bde_utils.cmake
@@ -270,6 +270,8 @@
     bde_struct_append_field(${targetStruct} DEPENDS "${depends}")

     bde_struct_get_field(interfaceTarget ${targetStruct} INTERFACE_TARGET)
+    bde_struct_get_field(depends ${targetStruct} DEPENDS)
+
     if(NOT _NO_LINK)
         bde_interface_target_link_libraries(${interfaceTarget} PUBLIC "${depends}")
         bde_struct_mark_field_const(${targetStruct} DEPENDS)
@@ -288,6 +290,8 @@
     bde_struct_append_field(${targetStruct} TEST_DEPENDS "${depends}")

     bde_struct_get_field(testInterfaceTarget ${targetStruct} TEST_INTERFACE_TARGET)
+    bde_struct_get_field(depends "${targetStruct}" TEST_DEPENDS)
+
     bde_interface_target_link_libraries(${testInterfaceTarget} PRIVATE "${depends}")
     bde_struct_mark_field_const(${targetStruct} TEST_DEPENDS)


[CMake] Fix error preventing simulator sanitizers from building

This should be checking for sim archs not target archs. This bug has
been around for a long time.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@282025 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -277,7 +277,7 @@
           DARWIN_${platform}sim_ARCHS
           ${toolchain_arches})
         message(STATUS "${platform} Simulator supported arches: ${DARWIN_${platform}sim_ARCHS}")
-        if(DARWIN_${platform}_ARCHS)
+        if(DARWIN_${platform}sim_ARCHS)
           list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform}sim)
           list(APPEND PROFILE_SUPPORTED_OS ${platform}sim)
           if(DARWIN_${platform}_SYSROOT_INTERNAL)


Do not force a specific path to install osquery on Windows (#6379)

Do not set CPACK_WIX_SKIP_PROGRAM_FOLDER to true and a specific install path,
this will break the Program Files folder drive resolution
to the system drive, and instead will enable the ROOTDRIVE logic
which chooses the disk with the most space available.

Fixes osquery/osquery#6314
Fixes osquery/osquery#6342

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -341,9 +341,8 @@
     set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
     set(CPACK_WIX_PRODUCT_ICON "${CMAKE_BINARY_DIR}/package/wix/osquery.ico")
     set(CPACK_WIX_UPGRADE_GUID "ea6c7327-461e-4033-847c-acdf2b85dede")
-    set(CPACK_WIX_PATCH_FILE "${CMAKE_BINARY_DIR}/package/wix/osquery_wix_patch.xml" )
-    set(CPACK_WIX_SKIP_PROGRAM_FOLDER True)
-    set(CPACK_PACKAGE_INSTALL_DIRECTORY "C:/Program Files/osquery")
+    set(CPACK_WIX_PATCH_FILE "${CMAKE_BINARY_DIR}/package/wix/osquery_wix_patch.xml")
+    set(CPACK_PACKAGE_INSTALL_DIRECTORY "osquery")
     set(CPACK_WIX_EXTENSIONS "WixUtilExtension")
   elseif(DEFINED PLATFORM_FREEBSD)
   else()


revert stack-check options in cmake include file

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -174,7 +174,6 @@

 	if(UNIX)
 		add_compile_options(-std=c++11)
-		add_compile_options(-fstack-protector-all)
 		if(DEFINED DSN_PEDANTIC)
 			add_compile_options(-Werror)
 		endif()


Cache CPM if it is not in the cache directory.

Necessary if we want to use cached version of CPM offline.

--- CPM.cmake
+++ CPM.cmake
@@ -1650,3 +1650,17 @@

 endfunction()

+
+# Check to see if we should cache a copy of CPM in the cache directory.
+if (DEFINED CPM_MODULE_CACHE_DIR)
+  if (NOT EXISTS "${CPM_MODULE_CACHE_DIR}/github_iauns_cpm/")
+    # Clone the CPM repository into cache.
+    CPM_EnsureRepoIsCurrent(
+      TARGET_DIR "${CPM_MODULE_CACHE_DIR}/github_iauns_cpm"
+      GIT_REPOSITORY "https://github.com/iauns/cpm"
+      GIT_TAG "origin/master"
+      USE_CACHING FALSE
+      )
+  endif()
+endif()
+


Fix broken test for CMake "-NOTFOUND" string

--- halide.cmake
+++ halide.cmake
@@ -331,11 +331,11 @@
 # Given the target of a static library, return the path to the actual .a file
 function(_halide_get_static_library_actual_path TARGET OUTVAR)
   get_target_property(DIR ${TARGET} LIBRARY_OUTPUT_DIRECTORY)
-  if (NOT "${DIR}")
+  if (DIR)
+    set(DIR "${DIR}/")
+  else()
     # Set to empty string since it could be "DIR-NOTFOUND"
     set(DIR "")
-  else()
-    set(DIR "${DIR}/")
   endif()
   set(${OUTVAR} "${DIR}${CMAKE_CFG_INTDIR}/${CMAKE_STATIC_LIBRARY_PREFIX}${TARGET}${CMAKE_STATIC_LIBRARY_SUFFIX}" PARENT_SCOPE)
 endfunction()


Fix cmake build.

Fix cmake build.

PiperOrigin-RevId: 175195239

--- tensorflow/contrib/cmake/tf_c.cmake
+++ tensorflow/contrib/cmake/tf_c.cmake
@@ -21,7 +21,6 @@
     "${tensorflow_source_dir}/tensorflow/c/c_api_function.cc"
     "${tensorflow_source_dir}/tensorflow/c/eager/c_api.cc"
     "${tensorflow_source_dir}/tensorflow/c/eager/c_api.h"
-    "${tensorflow_source_dir}/tensorflow/c/eager/tape.cc"
     "${tensorflow_source_dir}/tensorflow/c/eager/tape.h"
     "${tensorflow_source_dir}/tensorflow/c/eager/runtime.cc"
     "${tensorflow_source_dir}/tensorflow/c/eager/runtime.h"


Go back to development version

Go back to development version

This reverts commit da15699dc7d15ce6ac377982e956462296fc485a.

--- Superbuild/Projects/veloview.bundle.common.cmake
+++ Superbuild/Projects/veloview.bundle.common.cmake
@@ -3,7 +3,7 @@
 # Sets VV_VERSION_{MAJOR,MINOR,PATCH}
 include(${VeloViewSuperBuild_SOURCE_DIR}/../CMake/version.cmake)
 set(VV_VERSION "${VV_VERSION_MAJOR}.${VV_VERSION_MINOR}")
-set(VV_VERSION_SUFFIX "RC3")
+set(VV_VERSION_SUFFIX)

 # Sets GD_YEAR, GD_MONTH, GD_DAY
 include(${VeloViewSuperBuild_SOURCE_DIR}/Projects/getdate.cmake)


BUG: itk_python_expression_add_test too many quotes.

The test was always passing -- CMake already adds quotes around the argument.

Change-Id: Id2c317296e94b427197b448c1eb30c9a6adfad6c

--- CMake/ITKModuleTest.cmake
+++ CMake/ITKModuleTest.cmake
@@ -232,7 +232,7 @@
   # For $<SEMICOLON>
   cmake_minimum_required(VERSION 2.8.11)
   itk_python_add_test(NAME ${PYTHON_EXPRESSION_ADD_TEST_NAME}
-    COMMAND -c "'import itk$<SEMICOLON> itk.auto_progress(2)$<SEMICOLON> ${PYTHON_EXPRESSION_ADD_TEST_EXPRESSION}'"
+    COMMAND -c "import itk$<SEMICOLON> itk.auto_progress(2)$<SEMICOLON> ${PYTHON_EXPRESSION_ADD_TEST_EXPRESSION}"
     )
 endfunction()


PKG: take startup script from Packaging dir

--- CMake/PackageHelper.cmake
+++ CMake/PackageHelper.cmake
@@ -257,11 +257,11 @@
         "${CMAKE_INSTALL_PREFIX}/bin/${EXE_FILE}${EXE_EXT}")
     endif()
     if(DEFINED Monteverdi_SOURCE_DIR)
-      if(EXISTS ${Monteverdi_SOURCE_DIR}/Packaging/Windows/${EXE_FILE}${SCR_EXT})
+      if(EXISTS ${Monteverdi_SOURCE_DIR}/Packaging/${EXE_FILE}${SCR_EXT})
         install(FILES
-          ${Monteverdi_SOURCE_DIR}/Packaging/Windows/${EXE_FILE}${SCR_EXT}
+          ${Monteverdi_SOURCE_DIR}/Packaging/${EXE_FILE}${SCR_EXT}
           DESTINATION
-          "${PKG_STAGE_DIR}/bin")
+          "${PKG_STAGE_DIR}")
     endif()
   endif()


Applying FindCUDA.cmake patches for system include directories and CUDA 3.0 beta support.

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@2707 fa922fa7-2fde-0310-acd8-f43f465a7996

--- CMake/cuda/FindCUDA.cmake
+++ CMake/cuda/FindCUDA.cmake
@@ -542,20 +542,33 @@

 # CUDA_LIBRARIES
 find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
+find_library_local_first(CUDA_CUDART_EMU_LIBRARY cudartemu "\"cudartemu\" library")
+
+if (CUDA_VERSION VERSION_GREATER 2.9.9)
+if (CUDA_BUILD_EMULATION)
+set(CUDA_LIBRARIES ${CUDA_CUDART_EMU_LIBRARY})
+else (CUDA_BUILD_EMULATION)
 set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
+endif(CUDA_BUILD_EMULATION)
+else (CUDA_VERSION VERSION_GREATER 2.9.9)
+set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
+endif (CUDA_VERSION VERSION_GREATER 2.9.9)

 # 1.1 toolkit on linux doesn't appear to have a separate library on
 # some platforms.
 find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")

 # Add cuda library to the link line only if it is found.
+if (CUDA_VERSION VERSION_LESS 2.0)
 if (CUDA_CUDA_LIBRARY)
   set(CUDA_LIBRARIES ${CUDA_LIBRARIES} ${CUDA_CUDA_LIBRARY})
 endif(CUDA_CUDA_LIBRARY)
+endif (CUDA_VERSION VERSION_LESS 2.0)

 mark_as_advanced(
   CUDA_CUDA_LIBRARY
   CUDA_CUDART_LIBRARY
+  CUDA_CUDART_EMU_LIBRARY
   )

 #######################
@@ -845,7 +858,7 @@
   endif()

   # Initialize our list of includes with the user ones followed by the CUDA system ones.
-  set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "-I${CUDA_INCLUDE_DIRS}")
+  set(CUDA_NVCC_INCLUDE_ARGS ${CUDA_NVCC_INCLUDE_ARGS_USER} "--system-include;${CUDA_INCLUDE_DIRS}")
   # Get the include directories for this directory and use them for our nvcc command.
   get_directory_property(CUDA_NVCC_INCLUDE_DIRECTORIES INCLUDE_DIRECTORIES)
   if(CUDA_NVCC_INCLUDE_DIRECTORIES)


Update Freetype versions. Thanks Transporter!

--HG--
branch : v1-8
extra : source : 343d17f6d67d3d1e3cfe4a142e756eaf676b2488

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

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

 use_pkgconfig(FREETYPE_PKGC freetype2)


Update Freetype versions. Thanks Transporter!


cmake: Compile with stricter error checking

Add -Werror=incompatible-pointer-types and -Werror=int-conversion to the
compiler flags.

I'm surprised that gcc doesn't enable them by default.

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

--- cmake/Modules/WaffleDefineCompilerFlags.cmake
+++ cmake/Modules/WaffleDefineCompilerFlags.cmake
@@ -28,6 +28,8 @@
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=implicit-function-declaration")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=incompatible-pointer-types")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")

 if(waffle_on_linux)
     # On MacOS, the SSE2 headers trigger this error.


set dir for continuous build

set dir for continuous build

git-svn-id: 8b72b58fb31a931b6e9a2bd3bb08bc6614045fb1@3493 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- test/openVibeTests.cmake
+++ test/openVibeTests.cmake
@@ -56,7 +56,7 @@
 ENDIF(${CTEST_SCRIPT_ARG} MATCHES Continuous)

 IF(${MODEL} MATCHES Continuous)
-	set(OV-ROOT-DIR              "con.ov")
+	set(OV-ROOT-DIR              "${CMAKE_CURRENT_SOURCE_DIR}/con.ov")
 	file(MAKE_DIRECTORY ${OV-ROOT-DIR})
 ELSE(${MODEL} MATCHES Continuous)
 	# create a temporary directory with very short name to host build


What a bugfix

What a bugfix

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

--- deal.II/cmake/macros/macro_set_if_empty.cmake
+++ deal.II/cmake/macros/macro_set_if_empty.cmake
@@ -1,6 +1,7 @@

 MACRO(SET_IF_EMPTY variable value)
-  IF(NOT ${${variable}} STREQUAL "")
+  IF("${${variable}}" STREQUAL "")
     SET(${variable} ${value})
+  ENDIF()
 ENDMACRO()


[INTERNAL] Setting package formats on Windows to ZIP only.

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

--- util/cmake/package.cmake
+++ util/cmake/package.cmake
@@ -50,7 +50,11 @@
     # Archive Packages (.tar & .tar.bz2)
     # ===========================================================================

-    SET(CPACK_GENERATOR "ZIP;TBZ2;DEB")
+    if (WIN32)
+        SET (CPACK_GENERATOR "ZIP")
+    else ()
+        SET (CPACK_GENERATOR "ZIP;TBZ2")
+    endif ()
     if ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE")
       SET(CPACK_PACKAGE_NAME "seqan")
     elseif ("${SEQAN_BUILD_SYSTEM}" STREQUAL "SEQAN_RELEASE_LIBRARY")


BUG: Bug fixed in remote MGHImageIO repo, update git tag

This version also disallows the bare .gz extension for MGH
Image files.  The rationale for this is that it collides
dangerously with the NIfTI reader, specifically and
compressed files in general.  This means that MGHImageIO
will reject files it formerly accepted, but this is OK for
the following reasons:

1. It is unlikely that users regularly encounter MGH files with
just the '.gz' extension.

2. The primary producer and consumer of these files,
FreeSurfer, always uses by default one of the less ambiguous
file extensions.

3. If the user regularly encounters such files, they have
choices: they can use SetImageIO to force using the MGH
reader, or they can rename the files to a less ambiguous
file extension.

4. Allowing the option of '.gz' requires sufficient knowledge
of the user/developer to select that option, that one can
fairly assume the user/developer is knowledgeable enough to
cope with any issues arising from that option being
unavailable.

Change-Id: I59d792f4b1efa45a7bf86368d3f841cc9de96ef3

--- Modules/Remote/MGHIO.remote.cmake
+++ Modules/Remote/MGHIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(MGHIO
   "MGHIO ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
-  GIT_TAG 3566fcdd053249a59ba958586d8c32e5042f285b
+  GIT_TAG d43fc18d3023a8eba2bdc50cae8adf1f77160c67
   )


STYLE: Minor code style issues for MGHIO

MGHIO now conforms to the header guard style, so bumping
the remote module to use that version.

Change-Id: Idf14f0c0db10bfce6a57dc3cdf93b99db2f0c487

--- Modules/Remote/MGHIO.remote.cmake
+++ Modules/Remote/MGHIO.remote.cmake
@@ -1,5 +1,5 @@
 itk_fetch_module(MGHIO
   "MGHIO ImageIO plugin for ITK"
   GIT_REPOSITORY https://github.com/Slicer/itkMGHImageIO.git
-  GIT_TAG b3ce10a218ee9db5927536d45448d14f6b188cde
+  GIT_TAG 662e79fe283ed7ee85fb6d80dab3739fc75eb763
   )


Enable multi-thread compilation in Visual Studio. Fixed #1407.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -545,9 +545,11 @@
         set (RELEASE_RUNTIME /MT)
         set (DEBUG_RUNTIME /MTd)
     endif ()
+    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
     set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${DEBUG_RUNTIME}")
     set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} ${RELEASE_RUNTIME} /fp:fast /Zi /GS-")
     set (CMAKE_C_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
     set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEBUG_RUNTIME}")
     set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} ${RELEASE_RUNTIME} /fp:fast /Zi /GS- /D _SECURE_SCL=0")
     set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})


CMake: *sigh*

CMake: *sigh*

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

--- deal.II/cmake/configure/configure_1_lapack.cmake
+++ deal.II/cmake/configure/configure_1_lapack.cmake
@@ -48,6 +48,15 @@

 MACRO(CHECK_FOR_LAPACK_FUNCTIONS)
   SET(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
+  #
+  # For some static lapack versions it is necessary to link with -lm.
+  # So link with it as well if -lm is already present in our link
+  # interface:
+  #
+  IF(NOT m_lib MATCHES "-NOTFOUND")
+    LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${m_lib})
+  ENDIF()
+
   ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")

   FOREACH(_func ${DEAL_II_LAPACK_FUNCTIONS})