Don't check for libintl.h on Darwin (OSX) (#20094)

--- src/pal/src/configure.cmake
+++ src/pal/src/configure.cmake
@@ -37,7 +37,10 @@
 check_include_files(numa.h HAVE_NUMA_H)
 check_include_files(pthread_np.h HAVE_PTHREAD_NP_H)
 check_include_files("sys/auxv.h;asm/hwcap.h" HAVE_AUXV_HWCAP_H)
-check_include_files("libintl.h" HAVE_LIBINTL_H)
+
+if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+  check_include_files("libintl.h" HAVE_LIBINTL_H)
+endif()

 if(NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD AND NOT CMAKE_SYSTEM_NAME STREQUAL NetBSD)
   set(CMAKE_REQUIRED_FLAGS "-ldl")


Remove trailing references to VolumeOpenGLNew

--- Rendering/Volume/module.cmake
+++ Rendering/Volume/module.cmake
@@ -1,11 +1,3 @@
-if (Module_vtkRenderingVolumeOpenGLNEW AND
-    NOT (VTK_RENDERING_BACKEND STREQUAL "OpenGL2"))
-  set(VTK_RENDERING_VOLUME_BACKEND
-    "vtkRenderingVolumeOpenGLNew")
-else ()
-  set (VTK_RENDERING_VOLUME_BACKEND "")
-endif()
-
 vtk_module(vtkRenderingVolume
   GROUPS
     Rendering
@@ -17,7 +9,6 @@
     vtkTestingCore
     vtkTestingRendering
     vtkRenderingVolume${VTK_RENDERING_BACKEND}
-    ${VTK_RENDERING_VOLUME_BACKEND}
     vtkRenderingFreeType
     vtkIOXML
     vtkImagingSources


fix error finding make

fix error finding make

SVN-Revision: 159

--- tests/runsuite.cmake
+++ tests/runsuite.cmake
@@ -257,6 +257,7 @@
 set(CTEST_COMMAND "${CTEST_EXECUTABLE_NAME}")
 if (UNIX OR NOT arg_use_nmake)
   set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+  find_program(MAKE_COMMAND make DOC "make command")
   if (have_cygwin)
     # seeing errors building in parallel: pdb collision?
     set(CTEST_BUILD_COMMAND_BASE "${MAKE_COMMAND} -j2")


Nagios Monitoring 6.4.2-1 Gold

Nagios Monitoring 6.4.2-1 Gold

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 6 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 0 )
+set ( HPCC_POINT 2 )
 set ( HPCC_MATURITY "release")
 set ( HPCC_SEQUENCE 1 )
 ###


Split off 6.0.0 branch

Split off 6.0.0 branch

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

--- version.cmake
+++ version.cmake
@@ -3,7 +3,7 @@
 ###
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 6 )
-set ( HPCC_MINOR 0 )
+set ( HPCC_MINOR 1 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "trunk" )
 set ( HPCC_SEQUENCE 0 )


[axl] release 1.8.0 (re-release)

[axl] release 1.8.0 (re-release)

prev release was never publicly available

--- version.cmake
+++ version.cmake
@@ -10,8 +10,8 @@
 #...............................................................................

 set (JANCY_VERSION_MAJOR     1)
-set (JANCY_VERSION_MINOR     7)
-set (JANCY_VERSION_REVISION  9)
+set (JANCY_VERSION_MINOR     8)
+set (JANCY_VERSION_REVISION  0)
 set (JANCY_VERSION_TAG)

 set (JANCY_VERSION_FILE_SUFFIX "${JANCY_VERSION_MAJOR}.${JANCY_VERSION_MINOR}.${JANCY_VERSION_REVISION}")


Bump version number

Bump version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapSerial_VERSION 0.3.2)
+set(LeapSerial_VERSION 0.3.3)


Split off 8.4.18

Split off 8.4.18

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 4 )
-set ( HPCC_POINT 17 )
+set ( HPCC_POINT 19 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Graph Control 6.0.6-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -4,8 +4,8 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 6 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 4 )
-set ( HPCC_MATURITY "release" )
+set ( HPCC_POINT 6 )
+set ( HPCC_MATURITY "rc" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


Split off 7.8.50

Split off 7.8.50

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

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


Update ITK version along 4.13 release branch

This patch contains numerous CMake configuration warning fixes.

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

-set(ITK_GIT_TAG "8bbd7e7ac6ee71932bfb4b00a34c70f1ac02f7e7" CACHE
-  STRING "Tag in ITK git repo") # release-4.13
+set(ITK_GIT_TAG "8862e36ad879b46d6cb3e8682852d78d5673accd" CACHE STRING "Tag in ITK git repo") # along release-4.13
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


PKG: QT5 drags other system dlls

PKG: QT5 drags other system dlls

--- Packaging/PackageGlobals.cmake
+++ Packaging/PackageGlobals.cmake
@@ -46,11 +46,15 @@
   advapi32.dll
   comdlg32.dll
   crypt32.dll
+  dwmapi.dll
+  d3d9.dll
   gdi32.dll
   glu32.dll
   imm32.dll
   kernel32.dll
+  netapi32.dll
   normaliz.dll
+  mpr.dll
   odbc32.dll
   ole32.dll
   oleaut32.dll
@@ -62,6 +66,9 @@
   shell32.dll
   shfolder.dll
   user32.dll
+  userenv.dll
+  uxtheme.dll
+  version.dll
   winmm.dll
   winspool.drv
   wldap32.dll


fix typo for REQUIRED_USE (#3011)

fix typo for REQUIRED_USE (#3011)

Signed-off-by: Bernd Waibel <35fe5ef1f1f3bb5320981e27f03a2c26751a0b0c@posteo.net>

--- src/cmake/checked_find_package.cmake
+++ src/cmake/checked_find_package.cmake
@@ -3,7 +3,7 @@
 # https://github.com/OpenImageIO/oiio/blob/master/LICENSE.md

-set (REQUIED_DEPS "" CACHE STRING
+set (REQUIRED_DEPS "" CACHE STRING
      "Additional dependencies to consider required (semicolon-separated list, or ALL)")
 set (OPTIONAL_DEPS "" CACHE STRING
      "Additional dependencies to consider optional (semicolon-separated list, or ALL)")


set qd dependency to "libqd0 | libqd2c2a" because the package is named differently in maverick/lucid.

--- src/package_details.cmake
+++ src/package_details.cmake
@@ -8,7 +8,7 @@
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "2D voronoi diagram algorithm" CACHE STRING "name")
 set(CPACK_PACKAGE_VENDOR https://github.com/aewallin/openvoronoi CACHE STRING "web")
 set(CPACK_DEBIAN_PACKAGE_SECTION "science" CACHE STRING "name3")
-set(CPACK_DEBIAN_BUILD_DEPENDS debhelper python git cmake libboost-dev libqd0 libqd-dev libboost-python-dev libgomp1 CACHE STRINGS "name")
+set(CPACK_DEBIAN_BUILD_DEPENDS debhelper python git cmake libboost-dev "libqd0 | libqd2c2a" libqd-dev libboost-python-dev libgomp1 CACHE STRINGS "name")
 set(CPACK_DEBIAN_PACKAGE_DEPENDS python git cmake libboost-python libqd0 libgomp1 CACHE STRING "name")
 set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEB_ARCHITECTURE} CACHE STRING "name6")
 set(CPACK_DEBIAN_PACKAGE_PRIORITY optional CACHE STRING "name7")


erthink-cmake: tally revision number since the last release, not from an epoch.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -113,13 +113,30 @@
       message(FATAL_ERROR "Please install latest version of git ('show --no-patch --format=%H HEAD' failed)")
     endif()

-    execute_process(COMMAND ${GIT} rev-list --count --no-merges HEAD
+    execute_process(COMMAND ${GIT} tag --sort=-version:refname
+      OUTPUT_VARIABLE tag_list
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      WORKING_DIRECTORY ${source_root_directory}
+      RESULT_VARIABLE rc)
+    if(rc)
+      message(FATAL_ERROR "Please install latest version of git ('tag --sort=-version:refname' failed)")
+    endif()
+    string(REGEX REPLACE "\n" ";" tag_list "${tag_list}")
+    set(last_release_tag "")
+    set(git_revlist_arg "HEAD")
+    foreach(tag IN LISTS tag_list)
+      if(NOT last_release_tag)
+        string(REGEX MATCH "^v[0-9]+(\.[0-9]+)+" last_release_tag "${tag}")
+        set(git_revlist_arg "${tag}..HEAD")
+      endif()
+    endforeach(tag)
+    execute_process(COMMAND ${GIT} rev-list --count "${git_revlist_arg}"
       OUTPUT_VARIABLE ${name}_GIT_REVISION
       OUTPUT_STRIP_TRAILING_WHITESPACE
       WORKING_DIRECTORY ${source_root_directory}
       RESULT_VARIABLE rc)
     if(rc OR "${name}_GIT_REVISION" STREQUAL "")
-      message(FATAL_ERROR "Please install latest version of git ('rev-list --count --no-merges HEAD' failed)")
+      message(FATAL_ERROR "Please install latest version of git ('rev-list --count ${git_revlist_arg}' failed)")
     endif()

     string(REGEX MATCH "^(v)?([0-9]+)\\.([0-9]+)\\.([0-9]+)(.*)?" git_version_valid "${${name}_GIT_DESCRIBE}")
@@ -136,7 +153,7 @@
     endif()
   endif()

-  if(NOT ${name}_GIT_VERSION OR NOT ${name}_GIT_TIMESTAMP OR NOT ${name}_GIT_REVISION)
+  if(NOT ${name}_GIT_VERSION OR NOT ${name}_GIT_TIMESTAMP OR ${name}_GIT_REVISION STREQUAL "")
     if(GIT AND EXISTS "${source_root_directory}/.git")
       message(WARNING "Unable to retrive ${name} version from git.")
     endif()


Squashed '3rdparty/github/cmake-utils-remote/' changes from aaa7c50..3c115a5

3c115a5 Add test to check

git-subtree-dir: 3rdparty/github/cmake-utils-remote
git-subtree-split: 3c115a5a4bd38cf32637fee5aecba21c5da9ce63


SVN_SILENT made messages (.desktop file)

--- xine/xine.desktop.cmake
+++ xine/xine.desktop.cmake
@@ -67,7 +67,7 @@
 Comment[ca@valencia]=Dorsal del Xine pel Phonon
 Comment[cs]=Phonon Xine backend
 Comment[da]=Xine-backend til Phonon
-Comment[de]=Phonon-Treiber für Xine
+Comment[de]=Phonon-Back-End für Xine
 Comment[el]=Σύστημα υποστήριξης του Phonon Xine
 Comment[en_GB]=Phonon Xine backend
 Comment[es]=Motor Xine para Phonon


update boost versions

update boost versions

linux 1.65.1, osx 1.68.0, regardless of devel=ON/OFF

--- version_config.cmake
+++ version_config.cmake
@@ -22,10 +22,19 @@
 #=========================================================================

 ## BOOST
-set(Boost_VERSION 1.65.0)
-set(Boost_REQUIRED_VERSION 1.65.0)
-set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.0/boost_1_65_0.zip)
-set(Boost_MD5 eb1e11262e0cfc6949d054f6d8d25dc6)
+if (APPLE) # really should be checking for CLang
+    # Boost 1.65 contains a bug for recent Clang https://github.com/CCPPETMR/SIRF-SuperBuild/issues/170
+    set(Boost_VERSION 1.68.0)
+    set(Boost_REQUIRED_VERSION 1.66.0)
+    set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/${Boost_VERSION}/boost_1_68_0.zip)
+    set(Boost_MD5 f4096c4583947b0eb103c8539f1623a3)
+else()
+     # Use version in Ubuntu 18.04
+     set(Boost_VERSION 1.65.1)
+     set(Boost_REQUIRED_VERSION 1.65.1)
+     set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/${Boost_VERSION}/boost_1_65_1.zip)
+     set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)
+endif()

 ## Armadillo
 set(Armadillo_URL   https://downloads.sourceforge.net/project/arma/armadillo-7.800.2.tar.xz)
@@ -103,21 +112,6 @@
 set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)

-  # Gadgetron needs 1.65
-  if (APPLE) # really should be checking for CLang
-      # Boost 1.65 contains a bug for recent Clang https://github.com/CCPPETMR/SIRF-SuperBuild/issues/170
-      set(Boost_VERSION 1.68.0)
-      set(Boost_REQUIRED_VERSION 1.66.0)
-      set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/${Boost_VERSION}/boost_1_68_0.zip)
-      set(Boost_MD5 f4096c4583947b0eb103c8539f1623a3)
-  else()
-       # Use version in Ubuntu 18.04
-       set(Boost_VERSION 1.65.1)
-       set(Boost_REQUIRED_VERSION 1.65.1)
-       set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/${Boost_VERSION}/boost_1_65_1.zip)
-       set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)
-  endif()
-
   set (DEFAULT_SIRF_TAG origin/master)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )


Don't pass empty CMAKE_BUILD_RPATH to linker.

--- build_settings.cmake
+++ build_settings.cmake
@@ -87,8 +87,10 @@
 if(EXTRA_LINK_DIRECTORY)
     link_directories(${EXTRA_LINK_DIRECTORY})
 endif()
+if(CMAKE_BUILD_RPATH)
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,${CMAKE_BUILD_RPATH}")
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,${CMAKE_BUILD_RPATH}")
+endif()

 # Don't allow unresolved symbols in executables or shared libraries
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")


json-rpc-cpp: Fix build by passing the toolchain file

--- cmake/ProjectJsonRpcCpp.cmake
+++ cmake/ProjectJsonRpcCpp.cmake
@@ -8,6 +8,7 @@
 get_target_property(CURL_LIBRARY CURL::libcurl IMPORTED_LOCATION_RELEASE)

 set(CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
+               -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
                -DCMAKE_BUILD_TYPE=Release
                # Build static lib but suitable to be included in a shared lib.
                -DCMAKE_POSITION_INDEPENDENT_CODE=${BUILD_SHARED_LIBS}


Check library type before reading properties

Former-commit-id: ddf244c9715cfe320f88b63f5ce0cd6f3b920eab

--- cmake/getExpandedTarget.cmake
+++ cmake/getExpandedTarget.cmake
@@ -133,10 +133,18 @@
             unset(interface_libs)
             unset(imported_lib)
             get_target_property(interface_libs  ${target_name} INTERFACE_LINK_LIBRARIES)
-            get_target_property(private_libs  ${target_name} LINK_LIBRARIES)
+            get_target_property(lib_type ${lib} TYPE)
+            get_target_property(lib_impt ${lib} IMPORTED)
+            if(lib_impt)
+                # The location property can only be read on imported targets
+                get_target_property(imported_lib  ${target_name} LOCATION)
+            endif()
+            if(NOT lib_type MATCHES "INTERFACE")
+                get_target_property(private_libs  ${target_name} LINK_LIBRARIES)
+            endif()
             # Now we have all the libs in the target "lib".
             # interface_libs may contain many other targets. That's ok, for now we only do one level of expansion.
-            foreach(elem ${interface_libs};${private_libs})
+            foreach(elem ${imported_lib};${interface_libs};${private_libs})
                 if(TARGET ${elem})
                     list(APPEND target_names_expanded ${elem})
                 endif()


toolchain: require Zephyr SDK 0.9.3

toolchain: require Zephyr SDK 0.9.3

SDK 0.9.3 has been out for a while, to avoid inconsistency and false
positive when filing bugs, require the latest version.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/host-tools-zephyr.cmake
+++ cmake/host-tools-zephyr.cmake
@@ -15,7 +15,7 @@
   return()
 endif()

-set(REQUIRED_SDK_VER 0.9.2)
+set(REQUIRED_SDK_VER 0.9.3)
 set(TOOLCHAIN_VENDOR zephyr)
 set(TOOLCHAIN_ARCH x86_64)


Fixed libuv library searching

Fixed libuv library searching

Added ${CMAKE_LIBRARY_ARCHITECTURE} path suffix for libuv search

--- cmake/modules/FindLibuv.cmake
+++ cmake/modules/FindLibuv.cmake
@@ -53,7 +53,7 @@
 find_library(LIBUV_LIBRARY
   NAMES ${_LIBUV_NAMES}
   ${_LIBUV_ROOT_HINTS_AND_PATHS}
-  PATH_SUFFIXES lib
+  PATH_SUFFIXES lib lib/${CMAKE_LIBRARY_ARCHITECTURE}
   NO_DEFAULT_PATH)

 # Extract version number if possible.


Dependencies.cmake: update zlib to 1.2.10 as zlib 1.2.8 is gone

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -98,9 +98,9 @@
     if(MSVC OR EMSCRIPTEN) # other platforms ship zlib
         message(STATUS "Building zlib")
         file(DOWNLOAD
-            http://zlib.net/zlib-1.2.8.tar.gz
-            ./zlib-1.2.8.tar.gz)
-        execute_process(COMMAND cmake -E tar xf zlib-1.2.8.tar.gz)
+            http://zlib.net/zlib-1.2.10.tar.gz
+        ./zlib-1.2.10.tar.gz)
+        execute_process(COMMAND cmake -E tar xf zlib-1.2.10.tar.gz)
         execute_process(COMMAND cmake
             -DCMAKE_INSTALL_PREFIX=${OGREDEPS_PATH}
             -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
@@ -108,8 +108,8 @@
             -G ${CMAKE_GENERATOR}
             ${CROSS}
             .
-            WORKING_DIRECTORY zlib-1.2.8)
-        execute_process(COMMAND cmake --build zlib-1.2.8 --target install)
+            WORKING_DIRECTORY zlib-1.2.10)
+        execute_process(COMMAND cmake --build zlib-1.2.10 --target install)
     endif()

     message(STATUS "Building ZZIPlib")


Use CTK with updated CLI support and fixed ctkPathLineEdit size hint.

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

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag f8d63311)
+    set(revision_tag f25f19e5)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -49,7 +49,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 cbd57918a076d6c3830313c01724ceaf
+      URL_MD5 70fadbc62ec5c7d83a6e672fd5be36b1
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


Fix declaration of CLAW_XMOD_GENERIC

Fix declaration of CLAW_XMOD_GENERIC

--- properties.cmake
+++ properties.cmake
@@ -32,9 +32,6 @@
 set(CLAW_LIB_SH "claw_f_lib.sh")
 set(CLAW_X2T_DRIVER_LIB_DIR "${CMAKE_INSTALL_PREFIX}/libexec/")

-# Common module files
-set(CLAW_XMOD_GENERIC "${OMNI_HOME}/fincludes")
-
 #
 # OMNI Compiler variables
 #
@@ -50,6 +47,9 @@
 set(OMNI_JAR_F_BACKEND "${OMNI_CLASSPATH}/om-f-back.jar")
 set(OMNI_JAR_C_BACKEND "${OMNI_CLASSPATH}/om-c-back.jar")
 set(OMNI_F2X_FLAGS "")
+
+# Common module files
+set(CLAW_XMOD_GENERIC "${OMNI_HOME}/fincludes")

 # Define OMNI Compiler jar archives build location.
 set(LOCAL_OMNI_JAR_TOOLS "${CMAKE_SOURCE_DIR}/omni-compiler/XcodeML-Exc-Tools/build/om-exc-tools.jar")


Fix issue 374 (likely): turns out sleep(X) takes an integer in Perl => infloop startup times out

SVN-Revision: 335

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -99,14 +99,10 @@
 endif (NOT PERL)

 # use perl since /bin/sleep not on all platforms
-set(SLEEP_SHORT ${PERL} -e "sleep(0.2)")
-set(SLEEP_LONG ${PERL} -e "sleep(2)")
-if (WIN32)
-  set(TIMEOUT_SHORT "100")
-else (WIN32)
-  # somehow sleep is much much shorter
-  set(TIMEOUT_SHORT "500")
-endif (WIN32)
+# select(undef, undef, undef, X) sleeps for X seconds where X can be non-int.
+set(SLEEP_SHORT ${PERL} -e "select(undef, undef, undef, 0.1)")
+set(TIMEOUT_SHORT "100")  # *0.1 = 10 seconds
+set(SLEEP_LONG ${PERL} -e "select(undef, undef, undef, 2)")
 set(TIMEOUT_APP "120")

 # intra-arg space=@@ and inter-arg space=@


[cmake] fix include paths for doxygen

[cmake] fix include paths for doxygen

--- cmake/CaneyDocumentation.cmake
+++ cmake/CaneyDocumentation.cmake
@@ -2,6 +2,12 @@

 if(CANEY_CREATE_DOCUMENTATION)
 	find_package(Doxygen REQUIRED)
+
+	file(GLOB components_includes components/*/include)
+	set(INCLUDE_PATH)
+	foreach(incl ${components_includes})
+		set(INCLUDE_PATH "${INCLUDE_PATH} \"${incl}\"")
+	endforeach()

 	configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in" "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile" @ONLY)


Mourads patch

Mourads patch

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -19,10 +19,11 @@
 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
     HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni
+    $ENV{PROGRAMFILES}/OpenNI/include
     PATH_SUFFIXES openni)
 #add a hint so that it can find it without the pkg-config
 find_library(OPENNI_LIBRARY OpenNI
-    HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib)
+    HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib $ENV{PROGRAMFILES}/OpenNI/Lib)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
 set(OPENNI_LIBRARIES ${OPENNI_LIBRARY})


Added default Eigen search path to support Eigen that comes with PCL

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -32,7 +32,7 @@
 # --- Eigen ---
 if(WITH_EIGEN)
   find_path(EIGEN_INCLUDE_PATH "Eigen/Core"
-            PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
+            PATHS /usr/local /opt /usr $ENV{EIGEN_ROOT}/include ENV ProgramFiles ENV ProgramW6432
             PATH_SUFFIXES include/eigen3 include/eigen2 Eigen/include/eigen3 Eigen/include/eigen2
             DOC "The path to Eigen3/Eigen2 headers"
             CMAKE_FIND_ROOT_PATH_BOTH)


[cmake] work around a Debian/Ubuntu bug in Python install paths

--- cmake/PythonInstallSetup.cmake
+++ cmake/PythonInstallSetup.cmake
@@ -33,6 +33,12 @@
 #
 function(set_python_install_path)
   set(python_install_options "--record;${CMAKE_BINARY_DIR}/python_install_manifest.txt")
+
+  execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
+    "import sys; print('%d.%d'%(sys.version_info.major,sys.version_info.minor))"
+    OUTPUT_VARIABLE PY_VERSION)
+  string(STRIP ${PY_VERSION} PY_VERSION)
+
   if(siconos_python_install STREQUAL "user")
     # --- Case 1 : siconos_python_install=user ---
     # In that case, we need to find the user path. It depends on the operation system
@@ -41,7 +47,7 @@
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
       "import site; print(site.ENABLE_USER_SITE)" OUTPUT_VARIABLE ENABLE_USER)
     string(STRIP ${ENABLE_USER} ENABLE_USER)
-
+
     if(ENABLE_USER) # --user works ...
       # Find install path for --user (site.USER_SITE)
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
@@ -60,8 +66,10 @@
       # which probably means that python is run using virtualenv
       # Command to find 'global' site-packages
       # default path will probably be ok --> no options
+      # note: the '.replace()' is to work around the following Debian/Ubuntu bug:
+      #   https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1408092
       set(GET_SITE_PACKAGE
-       "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
+       "from distutils.sysconfig import get_python_lib; print(get_python_lib().replace('/python3/','/python${PY_VERSION}/'))")
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
        "${GET_SITE_PACKAGE}" OUTPUT_VARIABLE PY_INSTALL_DIR)
     endif()
@@ -70,9 +78,11 @@
   elseif(siconos_python_install STREQUAL prefix)
     # Case 2 : siconos_python_install=prefix
     # we use CMAKE_INSTALL_PREFIX as the path for python install
+      # note: the '.replace()' is to work around the following Debian/Ubuntu bug:
+      #   https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/1408092
     list(APPEND python_install_options --prefix=${CMAKE_INSTALL_PREFIX})
       set(GET_SITE_PACKAGE
-       "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'))")
+       "from distutils.sysconfig import get_python_lib; print(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}').replace('/python3/','/python${PY_VERSION}/'))")
       execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
        "${GET_SITE_PACKAGE}" OUTPUT_VARIABLE PY_INSTALL_DIR)
   else()


Find Botan: Reformat CMake code

Find Botan: Reformat CMake code

--- cmake/Modules/FindLibBotan.cmake
+++ cmake/Modules/FindLibBotan.cmake
@@ -1,3 +1,4 @@
+# ~~~
 # Try to find the Botan library.
 #
 # Defines:
@@ -10,29 +11,28 @@
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-#
+# ~~~

 if (NOT BOTAN_FOUND)
-  include (FindPkgConfig)
-  pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan-2 botan)
+	include (FindPkgConfig)
+	pkg_search_module (BOTAN QUIET botan-1.10 botan-1.9 botan-1.8 botan-2 botan)
 endif ()

 if (BOTAN_FOUND)
-  # try to compile and link a minimal sample program against libbotan
-  try_compile (HAS_BOTAN_4SURE
-    "${CMAKE_BINARY_DIR}"
-    "${PROJECT_SOURCE_DIR}/src/plugins/crypto/compile_botan.cpp"
-    CMAKE_FLAGS
-      -DINCLUDE_DIRECTORIES:STRING=${BOTAN_INCLUDE_DIRS}
-      -DLINK_LIBRARIES:PATH=${BOTAN_LIBRARIES}
-  )

-  if (NOT HAS_BOTAN_4SURE)
-    message (STATUS "Botan compile/linker test failed")
-    set (BOTAN_FOUND OFF)
-    set (BOTAN_INCLUDE_DIR "")
-    set (BOTAN_LIBRARIES "")
-  endif ()
+	# try to compile and link a minimal sample program against libbotan
+	try_compile (HAS_BOTAN_4SURE
+		     "${CMAKE_BINARY_DIR}"
+		     "${PROJECT_SOURCE_DIR}/src/plugins/crypto/compile_botan.cpp"
+		     CMAKE_FLAGS -DINCLUDE_DIRECTORIES:STRING=${BOTAN_INCLUDE_DIRS}
+				 -DLINK_LIBRARIES:PATH=${BOTAN_LIBRARIES})

-  unset (HAS_BOTAN_4SURE)
+	if (NOT HAS_BOTAN_4SURE)
+		message (STATUS "Botan compile/linker test failed")
+		set (BOTAN_FOUND OFF)
+		set (BOTAN_INCLUDE_DIR "")
+		set (BOTAN_LIBRARIES "")
+	endif ()
+
+	unset (HAS_BOTAN_4SURE)
 endif ()


fix installation of resolver|storage plugin links

--- cmake/Modules/LibAddMacros.cmake
+++ cmake/Modules/LibAddMacros.cmake
@@ -23,7 +23,7 @@
 		WORKING_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
 		)

-	set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+	set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${TARGET_PLUGIN_FOLDER}")

 	install(CODE "
 		message (STATUS \"Installing symlink: \$ENV{DESTDIR}${LIB_INSTALL_DIR}/${dest} -> ${src}\")


Remove lcov call to print summary

Remove lcov call to print summary

The summary option has been added in lcov version 1.10.

--- cmake/modules/CodeCoverage.cmake
+++ cmake/modules/CodeCoverage.cmake
@@ -75,7 +75,6 @@
   add_custom_target(codecov_postrun
     ${CodeCov_GNU_LCOV} --quiet --directory . --capture --output-file coverage.info ${_CodeCov_GNU_LCOV_BRANCH_COVERAGE_OPTION}
     COMMAND ${CodeCov_GNU_LCOV} --quiet --remove coverage.info '/usr/*' --output-file coverage.info.cleaned ${_CodeCov_GNU_LCOV_BRANCH_COVERAGE_OPTION}
-    COMMAND ${CodeCov_GNU_LCOV} --summary coverage.info.cleaned ${_CodeCov_GNU_LCOV_BRANCH_COVERAGE_OPTION}
     COMMAND ${CodeCov_GNU_GENHTML} --quiet -o coverage coverage.info.cleaned ${_CodeCov_GNU_LCOV_BRANCH_COVERAGE_OPTION}
     COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned


embree_DIR no longer an advanced CMake variable

--- common/cmake/embree-config.cmake
+++ common/cmake/embree-config.cmake
@@ -7,8 +7,6 @@
 SET(EMBREE_INCLUDE_DIRS ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_INCLUDEDIR@)
 SET(EMBREE_LIBRARY ${EMBREE_ROOT_DIR}/@CMAKE_INSTALL_LIBDIR@/@EMBREE_LIBRARY_FULLNAME@)
 SET(EMBREE_LIBRARIES ${EMBREE_LIBRARY})
-
-MARK_AS_ADVANCED(embree_DIR)

 SET(EMBREE_VERSION @EMBREE_VERSION@)
 SET(EMBREE_VERSION_MAJOR @EMBREE_VERSION_MAJOR@)


Cache PYTHON_EXECUTABLE for windows

Cache PYTHON_EXECUTABLE for windows

Summary: This way it can be overwritten when cross compiling.

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -250,10 +250,10 @@
   endif()

   # Set the same variables as FindPythonInterp and FindPythonLibs.
-  set(PYTHON_EXECUTABLE         "${PYTHON_EXECUTABLE}"          PARENT_SCOPE)
-  set(PYTHON_LIBRARY            "${PYTHON_LIBRARY}"             PARENT_SCOPE)
-  set(PYTHON_DLL                "${PYTHON_DLL}"                 PARENT_SCOPE)
-  set(PYTHON_INCLUDE_DIR        "${PYTHON_INCLUDE_DIR}"         PARENT_SCOPE)
+  set(PYTHON_EXECUTABLE         "${PYTHON_EXECUTABLE}"          CACHE PATH "")
+  set(PYTHON_LIBRARY            "${PYTHON_LIBRARY}"             CACHE PATH "")
+  set(PYTHON_DLL                "${PYTHON_DLL}"                 CACHE PATH "")
+  set(PYTHON_INCLUDE_DIR        "${PYTHON_INCLUDE_DIR}"         CACHE PATH "")
   set(PYTHONLIBS_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}"  PARENT_SCOPE)
   set(PYTHON_VERSION_STRING     "${PYTHON_VERSION_STRING}"      PARENT_SCOPE)
   set(PYTHON_VERSION_MAJOR      "${PYTHON_VERSION_MAJOR}"       PARENT_SCOPE)


Fix internal-only include dir for libxml2

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -344,7 +344,7 @@
        ${SECURITY_LIBRARY}
        ${DEBUG_SYMBOLS_LIBRARY})

-  include_directories(AFTER /usr/include/libxml2)
+  include_directories(AFTER "${CMAKE_OSX_SYSROOT}/usr/include/libxml2")
 else()
   if (LIBXML2_FOUND)
     add_definitions( -DLIBXML2_DEFINED )


Include headers from the source directory during the build

Do not add ${CMAKE_BINARY_DIR}/include in all directories. Using
include_directories() hides problems from targets missing required
includes. Adding ${CMAKE_BINARY_DIR}/include when ROOT_LINKER_LIBRARY()
is called is bad because it allows incremental builds to succeed when a
build from scratch would fail due to missing includes. This is because
missing headers that a target needs will have been copied to the build
directory and then will be found there first instead of being found in
the corresponding source directory.

Unfortunately, we cannot completely remove ${CMAKE_BINARY_DIR}/include
from the include path because generated headers like RConfigure.h and
ROOT/RConfig.hxx exist only in that directory and are needed for
compilation, so for now we still add the include as private to each
target created by ROOT_LINKER_LIBRARY(), but only after include
directories from the source directory, not before. This means that
headers will be picked up preferentially from the source directory.

In the future we need to avoid copying all headers into the build
directory to be able to fix this.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -662,7 +662,6 @@
   if(ARG_TEST) # we are building a test, so add EXCLUDE_FROM_ALL
     set(_all EXCLUDE_FROM_ALL)
   endif()
-  include_directories(BEFORE ${CMAKE_BINARY_DIR}/include)
   set(library_name ${library})
   if(TARGET ${library})
     message("Target ${library} already exists. Renaming target name to ${library}_new")
@@ -708,6 +707,28 @@

   if(DEFINED CMAKE_CXX_STANDARD)
     target_compile_features(${library} INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
+  endif()
+
+  if(PROJECT_NAME STREQUAL "ROOT")
+    if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
+      target_include_directories(${library}
+        PRIVATE
+          ${CMAKE_CURRENT_SOURCE_DIR}/inc
+        INTERFACE
+          $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc>
+      )
+    endif()
+    if(root7 AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc)
+      target_include_directories(${library}
+        PRIVATE
+          ${CMAKE_CURRENT_SOURCE_DIR}/v7/inc
+        INTERFACE
+          $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/v7/inc>
+      )
+    endif()
+
+    # needed for generated headers like RConfigure.h and ROOT/RConfig.hxx
+    target_include_directories(${library} PRIVATE ${CMAKE_BINARY_DIR}/include)
   endif()

   if(TARGET G__${library})


Minor: Use functions instead of macros for better scope control.

--- cmake/modules/testhelper.cmake
+++ cmake/modules/testhelper.cmake
@@ -1,4 +1,4 @@
-macro(addTestTargetToLibavgPythonPackage testTarget)
+function(addTestTargetToLibavgPythonPackage testTarget)
     add_custom_target(copy_${testTarget} ALL)
     add_dependencies(copy_${testTarget} ${testTarget})
     add_custom_command(TARGET copy_${testTarget}
@@ -6,19 +6,19 @@
         "${CMAKE_CURRENT_BINARY_DIR}/${testTarget}"
         "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest"
         )
-endmacro()
+endfunction()

-macro(addTestDataToLibavgPythonPackage testTarget dataDir)
+function(addTestDataToLibavgPythonPackage testTarget dataDir)
     add_custom_command(TARGET copy_${testTarget}
         COMMAND ${CMAKE_COMMAND} -E copy_directory
         "${CMAKE_CURRENT_SOURCE_DIR}/${dataDir}"
         "${CMAKE_BINARY_DIR}/python/libavg/test/cpptest/baseline"
         )
-endmacro()
+endfunction()

-macro(addPluginToLibavgPythonPackage plugin)
+function(addPluginToLibavgPythonPackage plugin)
     add_custom_target(copy_${plugin} ALL)
     add_dependencies(copy_${plugin} ${plugin})
     add_custom_command(TARGET copy_${plugin}
@@ -26,4 +26,4 @@
         "${CMAKE_CURRENT_BINARY_DIR}/${plugin}${CMAKE_SHARED_MODULE_SUFFIX}"
         "${CMAKE_BINARY_DIR}/python/libavg/test/plugin"
         )
-endmacro()
+endfunction()


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -1,5 +1,6 @@
 [Desktop Entry]
 Name=Instant Messaging
+Name[bs]=Brze poruke
 Name[ca]=Missatgeria instantània
 Name[ca@valencia]=Missatgeria instantània
 Name[cs]=Instant Messaging
@@ -33,6 +34,7 @@
 Name[zh_CN]=即时通讯
 Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
+Comment[bs]=Počnite ćaskanje s nekim od IM kontakta ili promijenite vaš IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[ca@valencia]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM


Consider address model to build Boost with correct architecture.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -31,22 +31,21 @@
       endforeach()
     endif()

+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      set(_boost_address_model "address-model=64")
+    else()
+      set(_boost_address_model "address-model=32")
+    endif()
+
     if(WIN32)
       set(_shell_extension .bat)
-      if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-        set(_boost_address_model "address-model=64")
-      else()
-        set(_boost_address_model "address-model=32")
-      endif()
       if(MSVC)
-        if(MSVC_VERSION EQUAL 1400)
-          set(_boost_toolset "toolset=msvc-8.0")
-        elseif(MSVC_VERSION EQUAL 1500)
-          set(_boost_toolset "toolset=msvc-9.0")
-        elseif(MSVC_VERSION EQUAL 1600)
-          set(_boost_toolset "toolset=msvc-10.0")
+        if(MSVC_VERSION EQUAL 1600)
+          set(_boost_toolset "msvc-10.0")
         elseif(MSVC_VERSION EQUAL 1700)
-          set(_boost_toolset "toolset=msvc-11.0")
+          set(_boost_toolset "msvc-11.0")
+        elseif(MSVC_VERSION EQUAL 1800)
+          set(_boost_toolset "msvc-12.0")
         endif()
       endif()
       set(_install_lib_dir "--libdir=<INSTALL_DIR>/bin")
@@ -92,6 +91,7 @@
         link=${_boost_link}
         ${_boost_cxxflags}
         ${_boost_linkflags}
+        ${_boost_address_model}
         threading=multi
         runtime-link=shared
         -q


Changed source of DCMTK source code in superbuild to official OFFIS repository

--- CMakeExternals/DCMTK.cmake
+++ CMakeExternals/DCMTK.cmake
@@ -33,8 +33,8 @@
       SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
       BINARY_DIR ${proj}-build
       PREFIX ${proj}${ep_suffix}
-      GIT_REPOSITORY "${git_protocol}://github.com/commontk/DCMTK.git"
-      GIT_TAG "origin/patched"
+      GIT_REPOSITORY "http://git.dcmtk.org/dcmtk.git"
+      GIT_TAG "origin/master"
       CMAKE_GENERATOR ${gen}
       BUILD_COMMAND ""
       CMAKE_ARGS


From Kristofer Tingdahl, Added missing core OSG libraries.

--- CMakeModules/FindOSG.cmake
+++ CMakeModules/FindOSG.cmake
@@ -96,12 +96,17 @@
         [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
         /usr/freeware/lib64
     )
-
+
     IF( NOT ${MYLIBRARY}_DEBUG)
         IF(MYLIBRARY)
             SET(${MYLIBRARY}_DEBUG ${MYLIBRARY})
-         ENDIF(MYLIBRARY)
-    ENDIF( NOT ${MYLIBRARY}_DEBUG)
+        ENDIF(MYLIBRARY)
+    ELSE()
+        IF( NOT MYLIBRARY )
+            SET(${MYLIBRARY} ${${MYLIBRARY}_DEBUG} )
+        ENDIF(NOT MYLIBRARY)
+
+    ENDIF( NOT ${MYLIBRARY}_DEBUG )

 ENDMACRO(FIND_OSG_LIBRARY LIBRARY LIBRARYNAME)

@@ -111,11 +116,19 @@
 FIND_OSG_LIBRARY(OSGDB_LIBRARY osgDB)
 FIND_OSG_LIBRARY(OSGTEXT_LIBRARY osgText)
 FIND_OSG_LIBRARY(OSGWIDGET_LIBRARY osgWidget)
+FIND_OSG_LIBRARY(OSGQT_LIBRARY osgQt)
 FIND_OSG_LIBRARY(OSGTERRAIN_LIBRARY osgTerrain)
 FIND_OSG_LIBRARY(OSGFX_LIBRARY osgFX)
 FIND_OSG_LIBRARY(OSGVIEWER_LIBRARY osgViewer)
 FIND_OSG_LIBRARY(OSGVOLUME_LIBRARY osgVolume)
+FIND_OSG_LIBRARY(OSGMANIPULATOR_LIBRARY osgManipulator)
+FIND_OSG_LIBRARY(OSGANIMATION_LIBRARY osgAnimation)
+FIND_OSG_LIBRARY(OSGPARTICLE_LIBRARY osgParticle)
+FIND_OSG_LIBRARY(OSGSHADOW_LIBRARY osgShadow)
+FIND_OSG_LIBRARY(OSGPRESENTATION_LIBRARY osgPresentation)
+FIND_OSG_LIBRARY(OSGSIM osgSim)
 FIND_OSG_LIBRARY(OPENTHREADS_LIBRARY OpenThreads)
+

 SET(OSG_FOUND "NO")
 IF(OSG_LIBRARY AND OSG_INCLUDE_DIR)


Fix parsing of compatible version 7e08788/#28

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -180,15 +180,27 @@
   if(${${_dependent}_name}_VERSION)
     set(${${_dependent}_name}_findmode EXACT)
     set(_FIND_VERSION "${${${_dependent}_name}_VERSION}")
+    set(_FIND_MAX_VERSION "${${${_dependent}_name}_VERSION}")
+
     if("${_FIND_VERSION}" MATCHES "^([0-9]+\\.[0-9]+)")
       set(_FIND_VERSION "${CMAKE_MATCH_1}")
     endif()
   else()
     set(${${_dependent}_name}_findmode REQUIRED)
+    set(_FIND_VERSION)
   endif()
   list(APPEND DEPENDENTS
-    "find_package(${_dependent} ${_FIND_VERSION} ${${${_dependent}_name}_findmode} \${_req} \${_quiet})\n"
-    "if(${${_dependent}_name}_FOUND)\n"
+    "find_package(${_dependent} ${_FIND_VERSION} \${_req} \${_quiet})\n"
+    "if(${${_dependent}_name}_FOUND)\n")
+  if(_FIND_VERSION)
+    list(APPEND DEPENDENTS
+      "  if(\"${${${_dependent}_name}_VERSION}\" MATCHES \"^([0-9]+\\\\.[0-9]+)\")\n"
+      "    if(CMAKE_MATCH_1 VERSION_GREATER ${_FIND_VERSION})\n"
+      "      message(FATAL_ERROR \"${${_dependent}_name} ${${${_dependent}_name}_VERSION} not compatible with ${_FIND_VERSION}\")\n"
+      "    endif()\n"
+      "  endif()\n")
+  endif()
+  list(APPEND DEPENDENTS
     "  list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${${_dependent}_name}_LIBRARIES})\n"
     "  list(APPEND ${UPPER_PROJECT_NAME}_INCLUDE_DIRS \${${${_dependent}_name}_INCLUDE_DIRS})\n"
     "else()\n"


Split off 7.8.38

Split off 7.8.38

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

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


Fix to remove unreferenced components

Fix to remove unreferenced components

--- packaging/WiX/CPackWixConfig.cmake
+++ packaging/WiX/CPackWixConfig.cmake
@@ -23,7 +23,7 @@
  ENDIF()
 ELSE()
   SET(CPACK_COMPONENTS_USED
-    "Server;Client;DataFiles;Development;SharedLibraries;Embedded;Debuginfo;Documentation;IniFiles;Readme;Server_Scripts;DebugBinaries")
+    "Server;Client;DataFiles;Development;SharedLibraries;Documentation;IniFiles;Readme;Server_Scripts;DebugBinaries")
 ENDIF()


Windows curl options

Windows curl options

--- Tools/CMake/modules/module_curl.cmake
+++ Tools/CMake/modules/module_curl.cmake
@@ -39,8 +39,8 @@
 set(HTTP_ONLY ON CACHE INTERNAL "" FORCE)
 set(PICKY_COMPILER ON CACHE INTERNAL "" FORCE)
 if(WIN32)
-    set(CMAKE_USE_WINSSL ON CACHE INTERNAL "" FORCE)
-    set(CURL_STATIC_CRT ${USE_STATIC_CRT} CACHE INTERNAL "" FORCE)
+    set(CURL_USE_SCHANNEL ON CACHE INTERNAL "" FORCE)
+    set(CURL_STATIC_CRT ${TORQUE_STATIC} CACHE INTERNAL "" FORCE)
     set(ENABLE_INET_PTON ON CACHE INTERNAL "" FORCE)
 elseif(APPLE)
     set(CURL_USE_OPENSSL OFF CACHE INTERNAL "" FORCE)


BUG: Fix Doxygen configuration for output formats

Convert CMake bool to YES/NO, and correct name for configuration
variables.

--- Utilities/Doxygen/DoxygenConfig.cmake
+++ Utilities/Doxygen/DoxygenConfig.cmake
@@ -161,11 +161,13 @@
 set(DOXYGEN_DOT_IMAGE_FORMAT "svg")
 set(DOXYGEN_DOT_GRAPH_MAX_NODES "150")
 set(DOXYGEN_DOT_MULTI_TARGETS "YES")
-set(DOXYGEN_DOXYGEN_HTML "${ITK_DOXYGEN_HTML}")
-set(DOXYGEN_DOXYGEN_DOCSET "${ITK_DOXYGEN_DOCSET}")
-set(DOXYGEN_DOXYGEN_CHM "${ITK_DOXYGEN_CHM}")
-set(DOXYGEN_DOXYGEN_QHP "${ITK_DOXYGEN_QHP}")
-set(DOXYGEN_DOXYGEN_ECLIPSEHELP "${ITK_DOXYGEN_ECLIPSEHELP}")
-set(DOXYGEN_DOXYGEN_LATEX "${ITK_DOXYGEN_LATEX}")
-set(DOXYGEN_DOXYGEN_RTF "${ITK_DOXYGEN_RTF}")
-set(DOXYGEN_DOXYGEN_XML "${ITK_DOXYGEN_XML}")
+
+foreach(_FORMAT IN ITEMS HTML DOCSET CHM QHP ECLIPSEHELP LATEX RTF
+    XML)
+  # map ON/OFF to YES/NO
+  if (ITK_DOXYGEN_${_FORMAT})
+      set(DOXYGEN_GENERATE_${_FORMAT} "YES")
+    else()
+      set(DOXYGEN_GENERATE_${_FORMAT} "NO")
+  endif()
+endforeach()


COMP: remove debug message() calls

COMP: remove debug message() calls

--- CMake/i18n_qt4.cmake
+++ CMake/i18n_qt4.cmake
@@ -15,7 +15,7 @@
 # Func
 function( add_to_qt4_i18n_files RESULT )
   foreach( F ${ARGN} )
-    message( "${F}" )
+    #message( "${F}" )

     get_filename_component( ABS_FILE ${F} ABSOLUTE )

@@ -54,11 +54,11 @@
   endforeach()

-  message( "HEADERS=${HEADERS}" )
+  #message( "HEADERS=${HEADERS}" )

   foreach( F ${HEADERS} )
-    message( "F=${F}" )
+    #message( "F=${F}" )

     set( ABS_FILE "${ABS_INCLUDE_DIR}/${F}" )


CMake: upgrade GLFW to version 3.3.2

CMake: upgrade GLFW to version 3.3.2

--- CMakeExternals.cmake
+++ CMakeExternals.cmake
@@ -176,19 +176,15 @@

     if(WIN32)
       set(GLFW_IMPORT_LIB "lib/glfw3dll.lib")
-      set(GLFW_LIB "lib/glfw3.dll")
-      set(MOVE_CMD COMMANDS COMMAND ${CMAKE_COMMAND} -E copy "\"<INSTALL_DIR>/lib/glfw3.dll\" \"<INSTALL_DIR>/bin/glfw3.dll\""
-                            COMMAND ${CMAKE_COMMAND} -E remove -f \"<INSTALL_DIR>/lib/glfw3.dll\")
+      set(GLFW_LIB "bin/glfw3.dll")
     else()
       set(GLFW_LIB "lib/libglfw.so")
-      set(MOVE_CMD)
     endif()

     add_external_project(glfw SHARED
       GIT_REPOSITORY https://github.com/glfw/glfw.git
-      GIT_TAG "3.2.1"
+      GIT_TAG "3.3.2"
       BUILD_BYPRODUCTS "<INSTALL_DIR>/${GLFW_LIB}" "<INSTALL_DIR>/${GLFW_IMPORT_LIB}"
-      ${MOVE_CMD}
       CMAKE_ARGS
         -DBUILD_SHARED_LIBS=ON
         -DGLFW_BUILD_EXAMPLES=OFF


Disable Google Benchmark tests by default

--- NonServerBuild.cmake
+++ NonServerBuild.cmake
@@ -16,7 +16,7 @@
 ENDIF ()

 IF(EXISTS "${phosphor_SOURCE_DIR}/thirdparty/google/benchmark/CMakeLists.txt")
-    SET(BENCHMARK_ENABLE_TESTING FALSE)
+    option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." OFF)
     ADD_SUBDIRECTORY(${phosphor_SOURCE_DIR}/thirdparty/google/benchmark EXCLUDE_FROM_ALL)
 ENDIF ()


if DEVEL_BUILD=ON, use boost 1.65.1

if DEVEL_BUILD=ON, use boost 1.65.1

--- version_config.cmake
+++ version_config.cmake
@@ -94,6 +94,13 @@

 set(DEFAULT_SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)
+
+  # Gadgetron needs 1.65
+  set(Boost_VERSION 1.65.1)
+  set(Boost_REQUIRED_VERSION 1.65.1)
+  set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.65.1/boost_1_65_1.zip)
+  set(Boost_MD5 9824a7a3e25c9d4fdf2def07bce8651c)
+
   set (DEFAULT_SIRF_TAG origin/master)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )


use older version of STIR until problem fixed

--- version_config.cmake
+++ version_config.cmake
@@ -115,7 +115,7 @@
   set (DEFAULT_SIRF_TAG origin/master)
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG origin/master)
+  set(DEFAULT_STIR_TAG f0c5df05fba86e51adcb573727175909e1c9c616)

   ## siemens_to_ismrmrd
   set(DEFAULT_siemens_to_ismrmrd_URL https://github.com/ismrmrd/siemens_to_ismrmrd )


CMake: Bugfix

CMake: Bugfix

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

--- deal.II/cmake/modules/FindTBB.cmake
+++ deal.II/cmake/modules/FindTBB.cmake
@@ -55,7 +55,7 @@

   IF(NOT TBB_DEBUG_LIBRARY MATCHES "-NOTFOUND")
     SET(TBB_WITH_DEBUGLIB TRUE)
-    SET(TBB_LIBRARIES debug ${TBB_LIBARY} release ${TBB_LIBRARY})
+    SET(TBB_LIBRARIES debug ${TBB_LIBARY} optimized ${TBB_LIBRARY})
   ELSE()
     SET(TBB_LIBRARIES ${TBB_LIBARY})
   ENDIF()


Remove zlib dependence from openssl because openssl config is not transparent and there's no obvious way to set zlib include and lib path

--- openssl.cmake
+++ openssl.cmake
@@ -9,8 +9,6 @@
 include (ExternalProject)
 include (ExternalSource)
 include (BuildSupport)
-
-include (zlib)

 external_source (openssl
     1.0.1c
@@ -37,7 +35,6 @@
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ${SSL_CONFIGURE_COMMAND}
         --prefix=${BUILDEM_DIR}
-        zlib
         shared
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     BUILD_IN_SOURCE     1
@@ -47,4 +44,4 @@

 set_target_properties(${openssl_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)

-endif (NOT openssl_NAME)+endif (NOT openssl_NAME)


ENH: superbuild: issue with qt4 and system sqlite

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -36,7 +36,33 @@
     URL_MD5 2edbe4d6c2eff33ef91732602f3518eb
     BINARY_DIR ${QT4_SB_SRC}
     INSTALL_DIR ${SB_INSTALL_PREFIX}
-    CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${QT4_SB_SRC} configure -prefix ${CMAKE_WIN_INSTALL_PREFIX} -opensource -confirm-license -release -shared -nomake demos -nomake examples -nomake tools -no-phonon-backend -no-phonon -no-script -no-scripttools -no-multimedia -no-webkit -qt-sql-sqlite -plugin-sql-sqlite -no-nis -no-qt3support -system-zlib -system-libpng -system-libtiff -system-libjpeg -system-sqlite
+    CONFIGURE_COMMAND
+      configure
+        -prefix ${CMAKE_WIN_INSTALL_PREFIX}
+        -opensource
+        -confirm-license
+        -release
+        -shared
+        -nomake demos
+        -nomake examples
+        -nomake tools
+        -no-phonon-backend
+        -no-phonon
+        -no-script
+        -no-scripttools
+        -no-multimedia
+        -no-webkit
+        -qt-sql-sqlite
+        -plugin-sql-sqlite
+        -no-nis
+        -no-qt3support
+        -system-zlib
+        -system-libpng
+        -system-libtiff
+        -system-libjpeg
+        #-system-sqlite
+        -L ${CMAKE_WIN_INSTALL_PREFIX}\\lib
+        -I ${CMAKE_WIN_INSTALL_PREFIX}\\include
     DEPENDS ${${proj}_DEPENDENCIES}
     )


cmake: detect MIT gssapi shim on osx

cmake: detect MIT gssapi shim on osx

--- cmake/Modules/FindGSSAPI.cmake
+++ cmake/Modules/FindGSSAPI.cmake
@@ -54,7 +54,8 @@
             OUTPUT_VARIABLE
                 _GSSAPI_VENDOR_STRING)

-        if (_GSSAPI_VENDOR_STRING MATCHES ".*Massachusetts.*")
+        if ((_GSSAPI_VENDOR_STRING MATCHES ".*Massachusetts.*") OR (_GSSAPI_VENDOR_STRING
+                        MATCHES ".*MITKerberosShim.*"))
             set(GSSAPI_FLAVOR_MIT TRUE)
         else()
             execute_process(


beginning to add boost as external project

--- cmake/Modules/SetupBoost.cmake
+++ cmake/Modules/SetupBoost.cmake
@@ -1,5 +1,20 @@
 SET(Boost_VERSION "1_59_0")
 SET(Boost_SHA1 "5123209db194d66d69a9cfa5af8ff473d5941d97")
+
+#[[
+BZIP2_FOUND - system has BZip2
+BZIP2_INCLUDE_DIR - the BZip2 include directory
+BZIP2_LIBRARIES - Link these to use BZip2
+BZIP2_NEED_PREFIX - this is set if the functions are prefixed with BZ2_
+BZIP2_VERSION_STRING - the version of BZip2 found (since CMake 2.8.8)
+]]
+FIND_PACKAGE(BZip2 REQUIRED)
+#[[
+ZLIB_INCLUDE_DIRS   - where to find zlib.h, etc.
+ZLIB_LIBRARIES      - List of libraries when using zlib.
+ZLIB_FOUND          - True if zlib found.
+]]
+FIND_PACKAGE(ZLIB REQUIRED)

 # download into libraries/external/boost (so it gets ignored by git)
 SET(BOOST_DOWNLOAD_OUT "${READDY_GLOBAL_DIR}/libraries/external/boost/boost_${Boost_VERSION}.tar.gz")
@@ -42,6 +57,3 @@
     ENDIF(NOT Result EQUAL "0")
 ENDIF(NOT b2Path)

-INCLUDE(ExternalProject)
-
-# todo requires bzip2, zlib (find package)


[modules] Prefer the headers from $ROOTSYS/include.

If we have -Icomponent/inc and -I$ROOTSYS/include we first try to resolve the
header A from component/inc. However if header B from $ROOTSYS/include
activated a module containing header A we get a redefinition errors.

Those errors are in a way correct because we cannot possibly know that two
headers with the same name coming from two different locations are the same.

This patch give a preference to $ROOTSYS/include and once we move away from
copying headers to a common directory we will rework that part of the modules
support when -Dcxxmodules=On is specified.

This should fix the clangHEAD nightly builds.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -822,6 +822,7 @@
 #---------------------------------------------------------------------------------------------------
 function(ROOT_ADD_INCLUDE_DIRECTORIES library)
   if(PROJECT_NAME STREQUAL "ROOT")
+
     if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/inc)
       target_include_directories(${library}
         PRIVATE
@@ -847,8 +848,19 @@
       )
     endif()

-    # needed for generated headers like RConfigure.h and ROOT/RConfig.hxx
-    target_include_directories(${library} PRIVATE ${CMAKE_BINARY_DIR}/include)
+    if (cxxmodules)
+      # needed for generated headers like RConfigure.h and ROOT/RConfig.hxx
+      # FIXME: We prepend ROOTSYS/include because if we have built a module
+      # and try to resolve the 'same' header from a different location we will
+      # get a redefinition error.
+      # We should remove these lines when the fallback include is removed. Then
+      # we will need a module.modulemap file per `inc` directory.
+      target_include_directories(${library} BEFORE PRIVATE ${CMAKE_BINARY_DIR}/include)
+    else()
+      # needed for generated headers like RConfigure.h and ROOT/RConfig.hxx
+      target_include_directories(${library} PRIVATE ${CMAKE_BINARY_DIR}/include)
+    endif()
+
   endif()

 endfunction(ROOT_ADD_INCLUDE_DIRECTORIES)


Lots of changes

Lots of changes

--- cmake/platform/Propeller.cmake
+++ cmake/platform/Propeller.cmake
@@ -21,7 +21,7 @@
 # C Flags ######################################################################

 set(PROPELLER_C_FLAGS
-"-ffunction-sections -fdata-sections -mfcache -m32bit-doubles")
+"-ffunction-sections -fdata-sections -m32bit-doubles") # -mfcache

 set(CMAKE_C_FLAGS
 "-Os ${PROPELLER_C_FLAGS} -std=c99") # removed -g
@@ -359,6 +359,14 @@
 ################################################################################

 function(generate_spin_object SPIN_FILE)
+
+    SET(EX "^[\t ]*[Dd][Aa][Tt].*$")
+    file(STRINGS "${SPIN_FILE}" SPIN_FILE_STRINGS REGEX "${EX}")
+
+    if(NOT SPIN_FILE_STRINGS)
+        set(SPIN_FILE_OBJECT "" PARENT_SCOPE)
+        return()
+    endif()

     if(NOT DEFINED SPIN_INCLUDE_LIST)
         set(SPIN_INCLUDE_LIST "")
@@ -719,7 +727,7 @@
             set_target_properties("${FF_PATH_NAME}" PROPERTIES
             COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
             LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
-            SUFFIX ".a")
+            SUFFIX ".a" LINKER_LANGUAGE "CXX")

             set(LIB_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)

@@ -760,7 +768,7 @@
             set_target_properties("${FF_PATH_NAME}" PROPERTIES
             COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
             LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
-            SUFFIX ".elf")
+            SUFFIX ".elf" LINKER_LANGUAGE "CXX")

             set(EXE_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)


Correct find Assimp file for Windows machines.

--- cmake_modules/FindASSIMP.cmake
+++ cmake_modules/FindASSIMP.cmake
@@ -9,7 +9,6 @@
 #
 # The following variables can be set as arguments for the module:
 # - ASSIMP_ROOT_DIR: Root directory of Assimp
-# - ASSIMP_USE_STATIC_LIBS: Specifies to use static versions of Assimp (Windows)
 #

 # Additional modules
@@ -26,17 +25,10 @@
             DOC "The directory where assimp/version.h resides"
     )

-    # Use assimp.lib for static library
-    if (ASSIMP_USE_STATIC_LIBS)
-        set(ASSIMP_LIBRARY_NAME assimp)
-    else()
-        set(ASSIMP_LIBRARY_NAME assimpdll)
-    endif()
-
     # Find library files
     find_library(
             ASSIMP_LIBRARY
-            NAMES ${ASSIMP_LIBRARY_NAME}
+            NAMES assimp
             PATHS
             $ENV{PROGRAMFILES}/lib
             ${ASSIMP_ROOT_DIR}/lib


cmake-modules
*FindThirdPartyPython.cmake : windows compatibility.

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@2703 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyPython.cmake
+++ trunk/cmake-modules/FindThirdPartyPython.cmake
@@ -3,25 +3,46 @@
 # Adds library to target
 # Adds include path
 # ---------------------------------
-INCLUDE("FindPythonLibs")

-IF(PYTHONLIBS_FOUND)
-	MESSAGE(STATUS "  Found Python...")
-	INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
+IF(WIN32)
+FIND_PATH(PATH_PYTHON include/Python.h PATHS $ENV{OV_DEP_PYTHON} $ENV{OpenViBE_dependencies} NO_DEFAULT_PATH)
+	IF(PATH_PYTHON)
+		MESSAGE(STATUS "  Found Python...")
+		INCLUDE_DIRECTORIES(${PATH_PYTHON}/include)
+
+		FILE(GLOB_RECURSE lib_files ${PATH_PYTHON}/libs/*.lib)
+
+		FOREACH(PYTHON_LIB ${lib_files})
+			MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB}")
+			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB})
+		ENDFOREACH(PYTHON_LIB)

-	FOREACH(PYTHON_LIB ${PYTHON_LIBRARIES})
-		SET(PYTHON_LIB1 "PYTHON_LIB1-NOTFOUND")
-		FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS NO_DEFAULT_PATH)
-		FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS "/")
-		IF(PYTHON_LIB1)
-			MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB1}")
-			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB1})
-		ELSE(PYTHON_LIB1)
-			MESSAGE(STATUS "    [FAILED] Third party lib ${PYTHON_LIB}")
-		ENDIF(PYTHON_LIB1)
-	ENDFOREACH(PYTHON_LIB)
+		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
+	ELSE(PATH_PYTHON)
+		MESSAGE(STATUS "  FAILED to find Python")
+	ENDIF(PATH_PYTHON)
+ENDIF(WIN32)

-	ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
-ELSE(PYTHONLIBS_FOUND)
-	MESSAGE(STATUS "  FAILED to find Python")
-ENDIF(PYTHONLIBS_FOUND)
+IF(UNIX)
+	INCLUDE("FindPythonLibs")
+	IF(PYTHONLIBS_FOUND)
+		MESSAGE(STATUS "  Found Python...")
+		INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
+
+		FOREACH(PYTHON_LIB ${PYTHON_LIBRARIES})
+			SET(PYTHON_LIB1 "PYTHON_LIB1-NOTFOUND")
+			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS NO_DEFAULT_PATH)
+			FIND_LIBRARY(PYTHON_LIB1 NAMES ${PYTHON_LIB} PATHS "/")
+			IF(PYTHON_LIB1)
+				MESSAGE(STATUS "    [  OK  ] Third party lib ${PYTHON_LIB1}")
+				TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${PYTHON_LIB1})
+			ELSE(PYTHON_LIB1)
+				MESSAGE(STATUS "    [FAILED] Third party lib ${PYTHON_LIB}")
+			ENDIF(PYTHON_LIB1)
+		ENDFOREACH(PYTHON_LIB)
+
+		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyPython)
+	ELSE(PYTHONLIBS_FOUND)
+		MESSAGE(STATUS "  FAILED to find Python")
+	ENDIF(PYTHONLIBS_FOUND)
+ENDIF(UNIX)


Fix dependency resolvement (refs cginternals/openll-cpp#5)

--- globjects-config.cmake
+++ globjects-config.cmake
@@ -9,8 +9,12 @@
 #   glbinding-config.cmake overwrites the variable MODULE_NAMES
 include(CMakeFindDependencyMacro)

-find_dependency(glm)
-find_dependency(glbinding)
+if (NOT TARGET glm::glm)
+    find_dependency(glm)
+endif ()
+if (NOT TARGET glbinding::glbinding)
+    find_dependency(glbinding)
+endif ()
 find_package(Eigen3 3.3 QUIET)


Do not warn about unknown warnings

Do not warn about unknown warnings

--- CMake/mitkMacroCreateModule.cmake
+++ CMake/mitkMacroCreateModule.cmake
@@ -220,6 +220,8 @@
             # not as an error (although -Werror was given).

             mitkFunctionCheckCompilerFlags("-Wno-error=c++0x-static-nonintegral-init" module_compile_flags)
+            mitkFunctionCheckCompilerFlags("-Wno-error=static-member-init" module_compile_flags)
+            mitkFunctionCheckCompilerFlags("-Wno-unknown-warning-option" module_compile_flags)
             mitkFunctionCheckCompilerFlags("-Wno-error=gnu" module_compile_flags)

             # VNL headers throw a lot of these, not fixable for us at least in ITK 3


COMP: add missing dir

COMP: add missing dir

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -304,6 +304,7 @@
   Fusion
   GeospatialAnalysis
   Hyperspectral
+  Simulation
   Testing
   UtilitiesAdapters/CurlAdapters
   UtilitiesAdapters/OssimAdapters


Remove some imt tutorials from the test batteries for classic builds

on ubuntus, despite the usage of -pthread, the executable root.exe
is not linked to libpthread: the -Wl,--as-needed flag is being specified.
As a result, the usage of any thread in a macro results in a crash.

--- tutorials/CTestCustom.cmake
+++ tutorials/CTestCustom.cmake
@@ -2,8 +2,14 @@

 set(CTEST_CUSTOM_TESTS_IGNORE ${CTEST_CUSTOM_TESTS_IGNORE} tutorial-pyroot-zdemo)

-if("$ENV{COMPILER}" STREQUAL "classic") #  TTreeProcessorM{T,P} are not available
+if("$ENV{COMPILER}" STREQUAL "classic")
+  #  TTreeProcessorM{T,P} are not available
   list(APPEND CTEST_CUSTOM_TESTS_IGNORE tutorial-multicore-mp102_readNtuplesFillHistosAndFit)
+  #  pthread is not retained on ubuntus when building root.exe
+  list(APPEND CTEST_CUSTOM_TESTS_IGNORE
+       tutorial-multicore-mt101_fillNtuples
+       tutorial-multicore-mt001_fillHistos
+       tutorial-multicore-mt201_parallelHistoFill)
 endif()

 if (CTEST_BUILD_NAME MATCHES aarch64 AND CTEST_BUILD_NAME MATCHES dbg)


fix bug in using system expat

fix bug in using system expat

--- vtkIncludeDirectories.cmake
+++ vtkIncludeDirectories.cmake
@@ -106,12 +106,6 @@
   ${VTK_SOURCE_DIR}/Common/Testing/Cxx
 )

-# Give access to a few utilities.
-SET(VTK_INCLUDE_DIRS_SOURCE_TREE ${VTK_INCLUDE_DIRS_SOURCE_TREE}
-  ${VTK_BINARY_DIR}/Utilities/expat
-  ${VTK_SOURCE_DIR}/Utilities/expat
-)
-
 #-----------------------------------------------------------------------------
 # Include directories from the build tree.
 SET(VTK_INCLUDE_DIRS_BUILD_TREE ${VTK_BINARY_DIR})
@@ -146,3 +140,4 @@
 VTK_THIRD_PARTY_INCLUDE(JPEG jpeg)
 VTK_THIRD_PARTY_INCLUDE(PNG  png)
 VTK_THIRD_PARTY_INCLUDE(TIFF tiff)
+VTK_THIRD_PARTY_INCLUDE(EXPAT expat)


Fixed typo

Fixed typo

--- Prototype/CMake/FindLIBSBML.cmake
+++ Prototype/CMake/FindLIBSBML.cmake
@@ -1,7 +1,7 @@
 # - Find LIBSBML
 # This module finds an installed SBML library.  It sets the following
 # variables:
-#  LIBSBML_FOUND - set to true if XSD is found
+#  LIBSBML_FOUND - set to true if libSBML is found
 #  LIBSBML_INCLUDE_DIR - libSBML include directory
 #  LIBSBML_LIBRARY - libSBML library


CMake: Warn user about incorrect llvm setup on windows.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -127,6 +127,12 @@
     if (MSVC)
         option(URHO3D_MINIDUMPS "Enable writing minidumps on crash" ${URHO3D_ENABLE_ALL})
     endif ()
+
+    if (URHO3D_CSHARP)
+        if (NOT LLVM_VERSION_EXPLICIT OR NOT LIBCLANG_LIBRARY OR NOT LIBCLANG_INCLUDE_DIR OR NOT LIBCLANG_SYSTEM_INCLUDE_DIR OR NOT CLANG_BINARY)
+            message(FATAL_ERROR "CSharp support requires clang installation. Please also define following cmake build options: LLVM_VERSION_EXPLICIT, LIBCLANG_LIBRARY, LIBCLANG_INCLUDE_DIR, LIBCLANG_SYSTEM_INCLUDE_DIR, CLANG_BINARY")
+        endif ()
+    endif ()
 else ()
     set(URHO3D_RENDERER OpenGL)
 endif ()


Issue #44: Try being less strict for Mac libs.

--- CMake/mpAddPythonBindings.cmake
+++ CMake/mpAddPythonBindings.cmake
@@ -28,7 +28,7 @@

   if (DEFINED MYPROJECT_PYTHON_VERSION)
     find_package(PythonInterp ${MYPROJECT_PYTHON_VERSION} EXACT REQUIRED)
-    find_package(PythonLibs ${MYPROJECT_PYTHON_VERSION} EXACT REQUIRED)
+    find_package(PythonLibs ${MYPROJECT_PYTHON_VERSION} REQUIRED)
   else()
     find_package(PythonInterp)
     find_package(PythonLibs)


Disable errors on warnings

Disable errors on warnings

Boost ASIO triggers many conversion warnings.

--- CMakeExternals/cpprestsdk.cmake
+++ CMakeExternals/cpprestsdk.cmake
@@ -19,6 +19,7 @@
       ${ep_common_cache_args}
       -DBUILD_SAMPLES:BOOL=OFF
       -DBUILD_TESTS:BOOL=OFF
+      -DWERROR:BOOL=OFF
     )

     if(OPENSSL_ROOT_DIR)


Replaced local FindOurDCMTK.cmake with stock Cmake's FindDCMTK.cmake as the later is now feature complete and has full support for debug and release libraries.

--- CMakeModules/FindOurDCMTK.cmake
+++ CMakeModules/FindOurDCMTK.cmake
@@ -1,270 +0,0 @@
-# - find DCMTK libraries
-#
-
-#  DCMTK_INCLUDE_DIRS  - Directories to include to use DCMTK
-#  DCMTK_LIBRARIES     - Files to link against to use DCMTK
-#  DCMTK_FOUND         - If false, don't try to use DCMTK
-#  DCMTK_DIR           - (optional) Source directory for DCMTK
-#
-# DCMTK_DIR can be used to make it simpler to find the various include
-# directories and compiled libraries if you've just compiled it in the
-# source tree. Just set it to the root of the tree where you extracted
-# the source.
-#
-# Written for VXL by Amitha Perera.
-# Modified by Robert Osfied to enable support for install placements of DCMTK 3.5.4 versions onwards
-
-FIND_PATH( DCMTK_ROOT_INCLUDE_DIR dcmtk/config/osconfig.h
-    ${DCMTK_DIR}/config/include
-    ${DCMTK_DIR}/include
-    /usr/local/dicom/include
-    /usr/local/include/
-    /usr/include/
-    /usr/local/dicom/include/
-)
-
-FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
-    ${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/config
-    ${DCMTK_DIR}/config/include
-    ${DCMTK_DIR}/include
-    /usr/local/dicom/include
-    /usr/local/include/dcmtk/config
-    /usr/include/dcmtk/config
-    /usr/local/dicom/include/dcmtk/config
-)
-
-FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
-    ${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/ofstd
-    ${DCMTK_DIR}/ofstd/include
-    ${DCMTK_DIR}/include/ofstd
-    /usr/local/dicom/include/dcmtk/ofstd
-    /usr/local/include/dcmtk/ofstd
-    /usr/include/dcmtk/ofstd
-    /usr/local/dicom/include/dcmtk/ofstd
-)
-
-FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
-    PATHS
-        ${DCMTK_DIR}/ofstd/libsrc
-        ${DCMTK_DIR}/ofstd/libsrc/Release
-        ${DCMTK_DIR}/ofstd/libsrc/Debug
-        ${DCMTK_DIR}/ofstd/Release
-        ${DCMTK_DIR}/ofstd/Debug
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-
-FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
-    ${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmdata
-    ${DCMTK_DIR}/dcmdata/include
-    ${DCMTK_DIR}/include/dcmdata
-    /usr/local/dicom/include/dcmtk/dcmdata
-    /usr/local/include/dcmtk/dcmdata
-    /usr/include/dcmtk/dcmdata
-    /usr/local/dicom/include/dcmtk/dcmdata
-)
-
-FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
-    PATHS
-        ${DCMTK_DIR}/dcmdata/libsrc
-        ${DCMTK_DIR}/dcmdata/libsrc/Release
-        ${DCMTK_DIR}/dcmdata/libsrc/Debug
-        ${DCMTK_DIR}/dcmdata/Release
-        ${DCMTK_DIR}/dcmdata/Debug
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-
-FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
-    ${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimgle
-    ${DCMTK_DIR}/dcmimgle/include
-    ${DCMTK_DIR}/include/dcmimgle
-    /usr/local/dicom/include/dcmtk/dcmimgle
-    /usr/local/include/dcmtk/dcmimgle
-    /usr/include/dcmtk/dcmimgle
-    /usr/local/dicom/include/dcmtk/dcmimgle
-)
-
-FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
-    PATHS
-        ${DCMTK_DIR}/dcmimgle/libsrc
-        ${DCMTK_DIR}/dcmimgle/libsrc/Release
-        ${DCMTK_DIR}/dcmimgle/libsrc/Debug
-        ${DCMTK_DIR}/dcmimgle/Release
-        ${DCMTK_DIR}/dcmimgle/Debug
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-FIND_PATH( DCMTK_dcmimage_INCLUDE_DIR diregist.h
-    ${DCMTK_ROOT_INCLUDE_DIR}/dcmtk/dcmimage
-    ${DCMTK_DIR}/dcmimage/include
-    ${DCMTK_DIR}/include/dcmimage
-    /usr/local/dicom/include/dcmtk/dcmimage
-    /usr/local/include/dcmtk/dcmimage
-    /usr/include/dcmtk/dcmimage
-    /usr/local/dicom/include/dcmtk/dcmimage
-)
-
-FIND_LIBRARY( DCMTK_dcmimage_LIBRARY dcmimage
-    PATHS
-        ${DCMTK_DIR}/dcmimage/libsrc
-        ${DCMTK_DIR}/dcmimage/libsrc/Release
-        ${DCMTK_DIR}/dcmimage/libsrc/Debug
-        ${DCMTK_DIR}/dcmimage/Release
-        ${DCMTK_DIR}/dcmimage/Debug
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
-    PATHS
-        ${DCMTK_DIR}/imagectn/libsrc/Release
-        ${DCMTK_DIR}/imagectn/libsrc/
-        ${DCMTK_DIR}/imagectn/libsrc/Debug
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
-    PATHS
-        ${DCMTK_DIR}/dcmnet/libsrc/Release
-        ${DCMTK_DIR}/dcmnet/libsrc/Debug
-        ${DCMTK_DIR}/dcmnet/libsrc/
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-FIND_LIBRARY(DCMTK_oflog_LIBRARY oflog
-    PATHS
-        ${DCMTK_DIR}/dcmnet/libsrc/Release
-        ${DCMTK_DIR}/dcmnet/libsrc/Debug
-        ${DCMTK_DIR}/dcmnet/libsrc/
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-FIND_LIBRARY(DCMTK_ofstd_LIBRARY ofstd
-    PATHS
-        ${DCMTK_DIR}/dcmnet/libsrc/Release
-        ${DCMTK_DIR}/dcmnet/libsrc/Debug
-        ${DCMTK_DIR}/dcmnet/libsrc/
-        ${DCMTK_DIR}/lib
-        /usr/local/dicom/lib
-        /usr/local/lib64
-        /usr/lib64
-        /usr/local/lib
-        /usr/lib
-        /usr/local/dicom/lib
-    PATH_SUFFIXES dcmtk
-)
-
-IF( DCMTK_config_INCLUDE_DIR
-    AND DCMTK_ofstd_INCLUDE_DIR
-    AND DCMTK_ofstd_LIBRARY
-    AND DCMTK_dcmdata_INCLUDE_DIR
-    AND DCMTK_dcmdata_LIBRARY
-    AND DCMTK_dcmimgle_INCLUDE_DIR
-    AND DCMTK_dcmimgle_LIBRARY
-    AND DCMTK_dcmimage_INCLUDE_DIR
-    AND DCMTK_dcmimage_LIBRARY )
-
-  SET( DCMTK_FOUND "YES" )
-  SET( DCMTK_INCLUDE_DIRS
-    ${DCMTK_config_INCLUDE_DIR}
-    ${DCMTK_ofstd_INCLUDE_DIR}
-    ${DCMTK_dcmdata_INCLUDE_DIR}
-    ${DCMTK_dcmimgle_INCLUDE_DIR}
-    ${DCMTK_dcmimage_INCLUDE_DIR}
-  )
-
-  SET( DCMTK_LIBRARIES
-    ${DCMTK_dcmimgle_LIBRARY}
-    ${DCMTK_dcmimage_LIBRARY}
-    ${DCMTK_dcmdata_LIBRARY}
-    ${DCMTK_ofstd_LIBRARY}
-    ${DCMTK_config_LIBRARY}
-  )
-
-  IF(DCMTK_imagedb_LIBRARY)
-   SET( DCMTK_LIBRARIES
-   ${DCMTK_LIBRARIES}
-   ${DCMTK_imagedb_LIBRARY}
-   )
-  ENDIF()
-
-  IF(DCMTK_dcmnet_LIBRARY)
-   SET( DCMTK_LIBRARIES
-   ${DCMTK_LIBRARIES}
-   ${DCMTK_dcmnet_LIBRARY}
-   )
-  ENDIF()
-
-  IF(DCMTK_oflog_LIBRARY)
-   SET( DCMTK_LIBRARIES
-   ${DCMTK_LIBRARIES}
-   ${DCMTK_oflog_LIBRARY}
-   )
-  ENDIF()
-
-  IF(DCMTK_ofstd_LIBRARY)
-   SET( DCMTK_LIBRARIES
-   ${DCMTK_LIBRARIES}
-   ${DCMTK_ofstd_LIBRARY}
-   )
-  ENDIF()
-
-  IF( WIN32 )
-    SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
-  ENDIF()
-
-ENDIF()
-
-IF( NOT DCMTK_FOUND )
-  SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
-  MARK_AS_ADVANCED( DCMTK_DIR )
-ENDIF()


Building external packages for windows is working.  It will build both mingw and msvc bin/headers in one call.

--- scripts/external-package.cmake
+++ scripts/external-package.cmake
@@ -1,38 +1,37 @@

 function(platform_build_external key generator)
-  file(MAKE_DIRECTORY build)
   set(build_path "build/${key}")
+  set(bin_path "bin/${key}")
   file(MAKE_DIRECTORY ${build_path})
+  file(MAKE_DIRECTORY ${bin_path})
+
   if (generator)
-    execute_process(COMMAND cmake -G ${generator} ../../cmake
-      WORKING_DIRECTORY ${build_path}
-      RESULT_VARIABLE output
-      )
-  else ()
-    execute_process(COMMAND cmake -DCMAKE_INSTALL_PREFIX=${parent_dir} ../../cmake
-      WORKING_DIRECTORY ${build_path}
-      RESULT_VARIABLE output
-      )
+    set(generator_flag "-G")
   endif ()
+
+  execute_process(COMMAND cmake ${generator_flag} ${generator} -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/bin/${key} ../../cmake
+    WORKING_DIRECTORY ${build_path}
+    RESULT_VARIABLE output
+    )
   message(${output})

-#  execute_process(COMMAND cmake -DCMAKE_INSTALL_PREFIX=${CMAKE_SOURCE_DIR}/bin/msvc --build .
-#    WORKING_DIRECTORY ${build_path}
-#    RESULT_VARIABLE output
-#    )
-#  message(${output})
-#
-#    execute_process(COMMAND cmake -P cmake_install.cmake
-#      WORKING_DIRECTORY ${build_path}
-#      RESULT_VARIABLE output
-#      )
-#    message(${output})
+  if (MSVC)
+    set(config_flag "--config")
+    set(config_value RELWITHDEBINFO)
+  endif ()
+
+  execute_process(COMMAND cmake --build . ${config_flag} ${config_value}
+    WORKING_DIRECTORY ${build_path}
+    RESULT_VARIABLE output
+    )
+  message(${output})
+
 endfunction()

 function(build_external)
   if (WIN32)
     platform_build_external(mingw "MinGW Makefiles")
-    #    platform_build_external(msvc)
+    platform_build_external(msvc "")
   endif ()

 endfunction()


[C++] Upgrade gtest and gmock to release-1.10.0 and supress warnings

--- cpp/CMake/AddGtestGmock.cmake
+++ cpp/CMake/AddGtestGmock.cmake
@@ -22,9 +22,16 @@
         DOWNLOAD_DIR "googletest-repo"
         TIMEOUT 10
         GIT_REPOSITORY https://github.com/google/googletest.git
-        GIT_TAG aa148eb2b7f70ede0eb10de34b6254826bfb34f4
+        GIT_TAG release-1.10.0
         CONFIGURE_COMMAND "" # Disable configuring
         BUILD_COMMAND "" # Disable building
+        # Patch commands below are specific for release-1.10.0 to fix
+        # compiler warnings wrt. switch statements not covering all values.
+        PATCH_COMMAND
+            COMMAND "sed" "-i" "1 i #pragma GCC diagnostic ignored \"-Wswitch-enum\"" "googletest/src/gtest.cc"
+            COMMAND "sed" "-i" "2 i #pragma GCC diagnostic ignored \"-Wsign-conversion\"" "googletest/src/gtest.cc"
+            COMMAND "sed" "-i" "1 i #pragma GCC diagnostic ignored \"-Wsign-conversion\"" "googlemock/include/gmock/gmock-more-actions.h"
+            COMMAND "sed" "-i" "1 i #pragma GCC diagnostic ignored \"-Wswitch-enum\"" "googlemock/src/gmock-spec-builders.cc"
         INSTALL_COMMAND "" # Disable install step
     )

@@ -55,7 +62,7 @@
     set(googletest_source_dir ${source_dir})
     message(STATUS "variable googletest_source_dir=${googletest_source_dir}")
     set(GTEST_INCLUDE_DIRS ${googletest_source_dir}/include)
-    set(GTEST_LIBRARIES ${googletest_binary_dir}/libgtest.a)
+    set(GTEST_LIBRARIES ${googletest_binary_dir}/lib/libgtest.a)

     ### Add google mock ###########################################################

@@ -82,7 +89,7 @@
     set(googlemock_source_dir ${source_dir})
     message(STATUS "variable googlemock_source_dir=${googlemock_source_dir}")
     set(GMOCK_INCLUDE_DIRS ${googlemock_source_dir}/include)
-    set(GMOCK_LIBRARIES ${googlemock_binary_dir}/libgmock.a)
+    set(GMOCK_LIBRARIES ${googlemock_binary_dir}/lib/libgmock.a)
 endif(USE_PLATFORM_GTEST_GMOCK)

 function(AddTest TARGET)


Added property for CameraIntrinsics

Added property for CameraIntrinsics

--- Modules/CameraCalibration/files.cmake
+++ Modules/CameraCalibration/files.cmake
@@ -2,6 +2,7 @@
  mitkEndoDebug.cpp
  mitkTransform.cpp
  mitkCameraIntrinsics.cpp
+ mitkCameraIntrinsicsProperty.cpp
  mitkXMLSerializable.cpp
  mitkNavigationDataHandEyeCalibrationFilter.cpp
  mitkEndoDebugToXmlFile.cpp


Update common.cmake

Update common.cmake

--- common.cmake
+++ common.cmake
@@ -59,7 +59,7 @@
 endif()

-set(LIBS ${LIBS} ${CHECK_LIBRARIES} ${PROJECT})
+set(LIBS ${PROJECT} ${LIBS} ${CHECK_LIBRARIES} ${PROJECT})

 include_directories( include  )


double /

double /

error message (L.16) had same issue, edited L.14 back and put removed it from L.11 to keep it consistent with other files

--- cmake/FindAsio.cmake
+++ cmake/FindAsio.cmake
@@ -8,10 +8,10 @@

 if (Asio_INCLUDE_DIR STREQUAL "Asio_INCLUDE_DIR-NOTFOUND")
   message(WARNING "Using git-module path for Asio")
-  set(Asio_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/asio/asio/include/)
+  set(Asio_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/lib/asio/asio/include)
 endif ()

-file(READ ${Asio_INCLUDE_DIR}asio/version.hpp version_hpp)
+file(READ ${Asio_INCLUDE_DIR}/asio/version.hpp version_hpp)
 if (NOT version_hpp MATCHES "ASIO_VERSION ([0-9])([0-9][0-9][0-9])([0-9][0-9])")
   message(FATAL_ERROR "Cannot get ASIO_VERSION from version.hpp. ${Asio_INCLUDE_DIR}/asio/version.hpp")
 endif ()


be more verbose on failure

be more verbose on failure

--- cmake/checkgdb.cmake
+++ cmake/checkgdb.cmake
@@ -7,7 +7,8 @@
 	#		--args ${EXECUTABLE} ${FILE} ${ARGS}
 	#			RESULT_VARIABLE GDB_RESULT)
 	#endif()
-	if ("${OUTPUT}" MATCHES "THE FOLLOWING TESTS FAILED.*")
+	if (OUTPUT MATCHES "THE FOLLOWING TESTS FAILED.*")
+		MESSAGE( STATUS "FAIL:  ${OUTPUT}")
 		MESSAGE( FATAL_ERROR "FAIL:  ${ARGS}, EXITCODE:  ${RESULT}" )
-	endif ("${OUTPUT}" MATCHES ".*THE FOLLOWING TESTS FAILED.*")
+	endif (OUTPUT MATCHES "THE FOLLOWING TESTS FAILED.*")
 endif (RESULT)


Fixes half cmake ext path when superbuild mode is off.

--- cmake/ext/half.cmake
+++ cmake/ext/half.cmake
@@ -1,11 +1,17 @@
-cmake_minimum_required(VERSION 3.7)
+#---------------------------------------------------------------------------
+# Get and build half, if it is not already present

 set(GEARSHIFFT_HALF_VERSION "1.12.0" CACHE STRING "'half' version to be built.")
 set_property(CACHE GEARSHIFFT_HALF_VERSION PROPERTY STRINGS "1.12.0")

-set(half_INCLUDE_DIR ${GEARSHIFFT_SUPERBUILD_EXT_DIR}/half/src/ExtHalf/include
+if(NOT GEARSHIFFT_SUPERBUILD_EXT_DIR)
+  set(half_BASE_DIR ${GEARSHIFFT_ROOT}/ext/half)
+else()
+  set(half_BASE_DIR ${GEARSHIFFT_SUPERBUILD_EXT_DIR}/half)
+endif()
+
+set(half_INCLUDE_DIR ${half_BASE_DIR}/src/ExtHalf/include
   CACHE PATH "'half' include directory")
-

 # for convenience setup a target
 add_library(half INTERFACE)
@@ -24,7 +30,7 @@

   # half-code is a header-only library, so no build and install required
   ExternalProject_Add(ExtHalf
-    PREFIX ${GEARSHIFFT_SUPERBUILD_EXT_DIR}/half
+    PREFIX ${half_BASE_DIR}
     URL https://downloads.sourceforge.net/project/half/half/${GEARSHIFFT_HALF_VERSION}/half-${GEARSHIFFT_HALF_VERSION}.zip
     URL_MD5 86d023c0729abf3465bcd55665a39013
     INSTALL_COMMAND ""


Optimize libunwind finder

Optimize libunwind finder

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -1,4 +1,9 @@
 include_guard(GLOBAL)
+
+# Check mkstemp/_mktemp/_mktemp_s for file system
+include(CheckCXXSourceCompiles)
+include(CheckCSourceCompiles)
+include(CMakeDependentOption)

 include("${CMAKE_CURRENT_LIST_DIR}/FetchToolset.cmake")

@@ -8,7 +13,7 @@

 # 默认配置选项
 # ######################################################################################################################
-option(LIBUNWIND_ENABLED "Enable using libunwind." OFF)
+cmake_dependent_option(LIBUNWIND_ENABLED "Enable using libunwind." ON "NOT WIN32;NOT MINGW;NOT CYGWIN" OFF)
 option(LOG_WRAPPER_ENABLE_LUA_SUPPORT "Enable lua support." ON)
 option(LOG_WRAPPER_CHECK_LUA "Check lua support." ON)
 set(LOG_WRAPPER_MAX_SIZE_PER_LINE
@@ -29,11 +34,6 @@
   endif()
 endif()

-# Check mkstemp/_mktemp/_mktemp_s for file system
-include(CheckCXXSourceCompiles)
-include(CheckCSourceCompiles)
-include(CMakeDependentOption)
-
 if(WIN32)
   check_cxx_source_compiles(
     "
@@ -99,7 +99,7 @@
 if(LOG_WRAPPER_ENABLE_STACKTRACE)
   if(NOT ANDROID AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
     # include("${ATFRAMEWORK_CMAKE_TOOLSET_DIR}/ports/jemalloc/jemalloc.cmake")
-    if(NOT WIN32 AND NOT MINGW)
+    if(LIBUNWIND_ENABLED)
       include("${ATFRAMEWORK_CMAKE_TOOLSET_DIR}/ports/libunwind/libunwind.cmake")
     endif()
   endif()


ENH: Updated git tag

ENH: Updated git tag

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -133,7 +133,7 @@
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
   set(${proj}_REPOSITORY "https://github.com/InsightSoftwareConsortium/ITK.git")
-  set(${proj}_GIT_TAG 18614a74ee1232bbf5c5f1142dffc5c718ff9f63) # 10-Mar-2014
+  set(${proj}_GIT_TAG 32c0b9f0f20de3d26da1e0f5556368113707e039)
   set(ITK_VERSION_ID ITK-4.6)

   ExternalProject_Add(${proj}


Use correct headless build variable.

Use correct headless build variable.

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -133,10 +133,10 @@
     SET(SCI_PYTHON_LIBRARY ${SCI_PYTHON_NAME})

     # required by interpreter interface
-    IF(SEG3D_BUILD_INTERFACE)
+    IF(BUILD_HEADLESS)
+      SET(PYTHON_MODULE_SEARCH_PATH Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/lib/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
+    ELSE()
       SET(PYTHON_MODULE_SEARCH_PATH ../Frameworks/Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/lib/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
-    ELSE()
-      SET(PYTHON_MODULE_SEARCH_PATH Python.framework/Versions/${SCI_PYTHON_VERSION_SHORT}/lib/${SCI_PYTHON_NAME} CACHE INTERNAL "Python modules." FORCE)
     ENDIF()
     SET(SCI_PYTHON_FRAMEWORK_ARCHIVE ${INSTALL_DIR}/${python_FRAMEWORK_ARCHIVE})
   ELSE()


SuperBuild: OSSIM: skip building test apps

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -62,6 +62,7 @@
     -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
     -DBUILD_OSSIM_APPS:BOOL=OFF
     -DBUILD_OSSIM_TESTS:BOOL=OFF
+    -DBUILD_OSSIM_TEST_APPS:BOOL=OFF
     -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
     -DINSTALL_ARCHIVE_DIR:STRING=lib
     -DINSTALL_LIBRARY_DIR:STRING=lib


[build][efi bootloader] Cosmetic CMake improvements

--- bootloader/efi/GenericBuild.cmake
+++ bootloader/efi/GenericBuild.cmake
@@ -2,15 +2,20 @@
 # Remove -rdynamic
 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)

+file(GLOB COMMON_SOURCES "${CMAKE_SOURCE_DIR}/common/*.c")
+
+add_library(
+
+   efi_app_${EFI_ARCH}
+   SHARED
+
+   ${SOURCES}
+   ${COMMON_SOURCES}
+)

 set(
    COMPILE_FLAGS_LIST

-   -DSTATIC_EXOS_ASM_STRING
-   -DEFI_FUNCTION_WRAPPER
-   -DNO_EXOS_ASSERT
-   -DNO_EXOS_STATIC_WRAPPER
-   -DGNU_EFI_USE_MS_ABI        # allows to call UEFI funcs without the wrapper
    -maccumulate-outgoing-args  # necessary in order to use MS_ABI
    -std=c99
    -fno-stack-protector
@@ -19,10 +24,6 @@
    -mno-red-zone
    -nostdinc
    -g
-   -I${CMAKE_SOURCE_DIR}/include
-   -I${CMAKE_SOURCE_DIR}/include/system_headers
-   -I${GNUEFI_DIR}/inc
-   -I${GNUEFI_DIR}/inc/${EFI_ARCH}
 )

 set(
@@ -37,26 +38,6 @@
 JOIN("${COMPILE_FLAGS_LIST}" ${SPACE} COMPILE_FLAGS)
 JOIN("${LINK_FLAGS_LIST}" ${SPACE} LINK_FLAGS)

-set(
-   OBJCOPY_OPTS
-
-   -j .text -j .sdata -j .data -j .dynamic
-   -j .dynsym -j .rel -j .rela -j .reloc
-
-   --target=efi-app-${EFI_ARCH}
-)
-
-file(GLOB COMMON_SOURCES "${CMAKE_SOURCE_DIR}/common/*.c")
-
-add_library(
-
-   efi_app_${EFI_ARCH}
-   SHARED
-
-   ${SOURCES}
-   ${COMMON_SOURCES}
-)
-
 set_target_properties(

    efi_app_${EFI_ARCH}
@@ -66,9 +47,48 @@
       LINK_FLAGS ${LINK_FLAGS}
 )

-target_link_libraries(efi_app_${EFI_ARCH} ${GNUEFI_DIR}/${EFI_ARCH}/gnuefi/crt0-efi-${EFI_ARCH}.o)
-target_link_libraries(efi_app_${EFI_ARCH} ${GNUEFI_DIR}/${EFI_ARCH}/lib/libefi.a)
-target_link_libraries(efi_app_${EFI_ARCH} ${GNUEFI_DIR}/${EFI_ARCH}/gnuefi/libgnuefi.a)
+target_include_directories(
+
+   efi_app_${EFI_ARCH}
+
+   PRIVATE
+
+   ${CMAKE_SOURCE_DIR}/include
+   ${CMAKE_SOURCE_DIR}/include/system_headers
+   ${GNUEFI_DIR}/inc
+   ${GNUEFI_DIR}/inc/${EFI_ARCH}
+)
+
+target_compile_definitions(
+
+   efi_app_${EFI_ARCH}
+
+   PRIVATE
+
+   STATIC_EXOS_ASM_STRING
+   EFI_FUNCTION_WRAPPER
+   NO_EXOS_ASSERT
+   NO_EXOS_STATIC_WRAPPER
+   GNU_EFI_USE_MS_ABI        # allows to call UEFI funcs without the wrapper
+)
+
+target_link_libraries(
+
+   efi_app_${EFI_ARCH}
+
+   ${GNUEFI_DIR}/${EFI_ARCH}/gnuefi/crt0-efi-${EFI_ARCH}.o
+   ${GNUEFI_DIR}/${EFI_ARCH}/lib/libefi.a
+   ${GNUEFI_DIR}/${EFI_ARCH}/gnuefi/libgnuefi.a
+)
+
+set(
+   OBJCOPY_OPTS
+
+   -j .text -j .sdata -j .data -j .dynamic
+   -j .dynsym -j .rel -j .rela -j .reloc
+
+   --target=efi-app-${EFI_ARCH}
+)

 add_custom_command(
    OUTPUT


Additional symbol check for Autofs && MOUNT_UNDER_SCRATCH ===GT:Fixed=== #2959

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -146,6 +146,7 @@
 	check_library_exists(dl dlopen "" HAVE_DLOPEN)
 	check_symbol_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_DECL_RES_INIT)
 	check_symbol_exists(MS_PRIVATE "sys/mount.h" HAVE_MS_PRIVATE)
+	check_symbol_exists(MS_SHARED  "sys/mount.h" HAVE_MS_SHARED)

 	check_function_exists("access" HAVE_ACCESS)
 	check_function_exists("clone" HAVE_CLONE)


[CMake] Build sanitized C++ runtimes for Fuchsia

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@311033 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -33,10 +33,10 @@
 endforeach()

 if(NOT APPLE)
-  list(APPEND LLVM_BUILTIN_TARGETS "default")
+  set(LLVM_BUILTIN_TARGETS "default;${LLVM_BUILTIN_TARGETS}" CACHE STRING "" FORCE)
 endif()

-set(LLVM_RUNTIME_TARGETS "default;x86_64-fuchsia;aarch64-fuchsia" CACHE STRING "")
+set(LLVM_RUNTIME_TARGETS "default;x86_64-fuchsia;aarch64-fuchsia;x86_64-fuchsia-asan:x86_64-fuchsia;aarch64-fuchsia-asan:aarch64-fuchsia" CACHE STRING "")
 foreach(target x86_64;aarch64)
   set(RUNTIMES_${target}-fuchsia_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_CMAKE_SYSROOT ${FUCHSIA_${target}_SYSROOT} CACHE PATH "")
@@ -44,6 +44,7 @@
   set(RUNTIMES_${target}-fuchsia_UNIX 1 CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_LLVM_ENABLE_LIBCXX ON CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_LIBUNWIND_USE_COMPILER_RT ON CACHE BOOL "")
+  set(RUNTIMES_${target}-fuchsia_LIBUNWIND_ENABLE_STATIC OFF CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_LIBCXXABI_ENABLE_STATIC OFF CACHE BOOL "")
@@ -51,6 +52,11 @@
   set(RUNTIMES_${target}-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "")
   set(RUNTIMES_${target}-fuchsia_LIBCXX_ENABLE_STATIC OFF CACHE BOOL "")
   set(RUNTIMES_${target}-fuchsia_SANITIZER_USE_COMPILER_RT ON CACHE BOOL "")
+
+  set(RUNTIMES_${target}-fuchsia-asan_LLVM_USE_SANITIZER Address CACHE STRING "")
+  set(RUNTIMES_${target}-fuchsia-asan_LLVM_RUNTIMES_PREFIX "${target}-fuchsia/" CACHE STRING "")
+  set(RUNTIMES_${target}-fuchsia-asan_LLVM_RUNTIMES_LIBDIR_SUFFIX "/asan" CACHE STRING "")
+  set(RUNTIMES_${target}-fuchsia-asan_LIBCXX_INSTALL_HEADERS OFF CACHE BOOL "")
 endforeach()

 # Setup toolchain.


From Pere:
correct gcc version detection.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@44212 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -25,9 +25,9 @@
 #---Obtain the major and minor version of the GNU compiler-------------------------------------------
 if (CMAKE_COMPILER_IS_GNUCXX)
   exec_program(${CMAKE_C_COMPILER} ARGS "-dumpversion" OUTPUT_VARIABLE _gcc_version_info)
-  string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]" "\\1" GCC_MAJOR "${_gcc_version_info}")
-  string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]" "\\1" GCC_MINOR "${_gcc_version_info}")
-  string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9])" "\\1" GCC_PATCH "${_gcc_version_info}")
+  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\1" GCC_MAJOR "${_gcc_version_info}")
+  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\2" GCC_MINOR "${_gcc_version_info}")
+  string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\\.?([0-9])?" "\\3" GCC_PATCH "${_gcc_version_info}")
   message(STATUS "Found GCC. Major version ${GCC_MAJOR}, minor version ${GCC_MINOR}")
   set(COMPILER_VERSION gcc${GCC_MAJOR}${GCC_MINOR}${GCC_PATCH})
 else()


Do not overwrite LibCrypto_LIBRARY if it's already specified (#2993)

--- cmake/modules/FindLibCrypto.cmake
+++ cmake/modules/FindLibCrypto.cmake
@@ -59,12 +59,13 @@
         ${CMAKE_INSTALL_PREFIX}/lib
         )

-    if (BUILD_SHARED_LIBS)
-        set(LibCrypto_LIBRARY ${LibCrypto_SHARED_LIBRARY})
-    else()
-        set(LibCrypto_LIBRARY ${LibCrypto_STATIC_LIBRARY})
+    if (NOT LibCrypto_LIBRARY)
+        if (BUILD_SHARED_LIBS)
+            set(LibCrypto_LIBRARY ${LibCrypto_SHARED_LIBRARY})
+        else()
+            set(LibCrypto_LIBRARY ${LibCrypto_STATIC_LIBRARY})
+        endif()
     endif()
-

     include(FindPackageHandleStandardArgs)
     find_package_handle_standard_args(LibCrypto DEFAULT_MSG


Make framework-header-fix process copied headers

Summary:
Previously the framework-header-fix script would change the sources
before they were copied, leading to unnecessary rebuilds on repeat
`ninja lldb` invocations. This runs the script on the headers after
they're copied into the produced LLDB.framework, meaning it doesn't
affect any files being built.

Patch by Keith Smiley <keithbsmiley@gmail.com>!

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

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@338058 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 7a2e008011e152769cfa2fb7eac5c8b999b28401)

--- cmake/modules/LLDBFramework.cmake
+++ cmake/modules/LLDBFramework.cmake
@@ -12,24 +12,21 @@
                      COMMAND ${CMAKE_COMMAND} -E copy ${header} ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
   list(APPEND framework_headers ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders/${basename})
 endforeach()
-add_custom_target(lldb-framework-headers
-  DEPENDS ${framework_headers}
-  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh ${CMAKE_CURRENT_BINARY_DIR} ${LLDB_VERSION})
+
+add_custom_command(TARGET lldb-framework POST_BUILD
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
+  COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $<TARGET_FILE_DIR:liblldb>/Headers ${LLDB_VERSION}
+)

 if (NOT IOS)
   if (NOT LLDB_BUILT_STANDALONE)
     add_dependencies(lldb-framework clang-headers)
   endif()
   add_custom_command(TARGET lldb-framework POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
     COMMAND ${CMAKE_COMMAND} -E create_symlink Versions/Current/Headers ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Headers
     COMMAND ${CMAKE_COMMAND} -E create_symlink ${LLDB_FRAMEWORK_VERSION} ${LLDB_FRAMEWORK_DIR}/LLDB.framework/Versions/Current
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${LLDB_PATH_TO_SWIFT_BUILD}/lib/swift/clang/ $<TARGET_FILE_DIR:liblldb>/Resources/Clang
     COMMAND ${CMAKE_COMMAND} -E copy_directory ${LLDB_PATH_TO_SWIFT_BUILD}/lib/swift $<TARGET_FILE_DIR:liblldb>/Resources/Swift
-  )
-else()
-  add_custom_command(TARGET lldb-framework POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/FrameworkHeaders $<TARGET_FILE_DIR:liblldb>/Headers
   )
 endif()

@@ -42,5 +39,4 @@
   PUBLIC_HEADER "${framework_headers}")

 add_dependencies(lldb-framework
-  lldb-framework-headers
   lldb-suite)


Add back f6e4fbb that got lost in merge of PR130 by Mattias Ellert.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -340,7 +340,7 @@
     set(pcm_name)
   else()
     if(CMAKE_PROJECT_NAME STREQUAL ROOT)
-      set(command ${CMAKE_COMMAND} -E env "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> -rootbuild)
+      set(command ${CMAKE_COMMAND} -E env "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH}" "ROOTIGNOREPREFIX=1" $<TARGET_FILE:rootcling> -rootbuild)
       set(ROOTCINTDEP rootcling)
     else()
       set(command rootcling)


Small fixes for FindRapidJson.cmake

Small fixes for FindRapidJson.cmake

This tiny fix cleans up the FindRapidJson.cmake file, which wasn't
actually searching for the rapidjson.h header correctly but instead
assuming a particular location for it, making some of the other code in
the file redundant.

Change-Id: I5fe3c664b8a078b6610440a8ae4173f38d57a84b
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3631
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
Tested-by: jenkins
(cherry picked from commit 438d1512cc78899473d6684b9ca07a6a9b7b100a)
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3649
Tested-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>
Reviewed-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>

--- cmake_modules/FindRapidJson.cmake
+++ cmake_modules/FindRapidJson.cmake
@@ -1,13 +1,12 @@
 # - Find rapidjson headers and lib.
-# This module defines RAPIDJSON_INCLUDE_DIR, directory containing headers
+# This module defines RAPIDJSON_INCLUDE_DIR, the directory containing headers

 set(RAPIDJSON_SEARCH_HEADER_PATHS
-  ${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include/rapidjson
+  ${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include/
 )

-set(RAPIDJSON_INCLUDE_DIR
-  ${CMAKE_SOURCE_DIR}/thirdparty/rapidjson/include
-)
+find_path(RAPIDJSON_INCLUDE_DIR rapidjson/rapidjson.h HINTS
+  ${RAPIDJSON_SEARCH_HEADER_PATHS})

 if (RAPIDJSON_INCLUDE_DIR)
   set(RAPIDJSON_FOUND TRUE)