Use add external project default installation procedure

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -33,7 +33,7 @@

   ExternalProject_Add(${proj}
      ${download_step}
-     INSTALL_COMMAND ""
+     # INSTALL_COMMAND "${CMAKE_COMMAND} -P cmake_install.cmake"
      CMAKE_GENERATOR ${gen}
      CMAKE_ARGS
        ${ep_common_args}
@@ -51,11 +51,8 @@
      DEPENDS ${proj_DEPENDENCIES}
     )

-  # MatchPoint does not support "make install" yet
-  # set(${proj}_DIR ${ep_prefix})
-  #  mitkFunctionInstallExternalCMakeProject(${proj})
   ExternalProject_Get_Property(${proj} binary_dir)
-  set(MatchPoint_DIR ${binary_dir})
+  set(${proj}_DIR ${binary_dir})
   mitkFunctionInstallExternalCMakeProject(${proj})

 else()


fix fmu-v5x: use correct GPS2 serial port

--- boards/px4/fmu-v5x/default.cmake
+++ boards/px4/fmu-v5x/default.cmake
@@ -15,7 +15,7 @@
 		TEL1:/dev/ttyS6
 		TEL2:/dev/ttyS4
 		TEL3:/dev/ttyS2
-		GPS2:/dev/ttyS0
+		GPS2:/dev/ttyS7
 	DRIVERS
 		adc
 		barometer # all available barometer drivers


cmake: set minimum pybind11 version

cmake: set minimum pybind11 version

--- pybind_interface/GetPybind11.cmake
+++ pybind_interface/GetPybind11.cmake
@@ -1,12 +1,13 @@
 include(FetchContent)

+set(MIN_PYBIND_VERSION "2.2.4")
 FetchContent_Declare(
   pybind11
   GIT_REPOSITORY https://github.com/pybind/pybind11
-  GIT_TAG v2.2.4
+  GIT_TAG "v${MIN_PYBIND_VERSION}"
 )
 FetchContent_GetProperties(pybind11)
-find_package(pybind11 CONFIG)
+find_package(pybind11 "${MIN_PYBIND_VERSION}" CONFIG)
 if((NOT pybind11_FOUND) AND (NOT pybind11_POPULATED)) # check first on system path, then attempt git fetch
   FetchContent_Populate(pybind11)
   add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR})


BUG: Update Eternia to use new cmake var names for Slicer builds

--- Eternia_Kitware_TubeTK_Slicer.cmake
+++ Eternia_Kitware_TubeTK_Slicer.cmake
@@ -38,33 +38,21 @@

 set( BOOST_ROOT /home/aylward/src/boost_1_57_0 )

-set( TubeTK_BUILD_APPLICATIONS ON )
 set( TubeTK_BUILD_IMAGE_VIEWER ON )
-set( TubeTK_BUILD_SLICER_MODULES ON )
+set( TubeTK_BUILD_USING_SLICER ON )
 set( TubeTK_USE_BOOST ON )
-set( TubeTK_USE_CTK ON )
+# set( TubeTK_USE_CPPCHECK ON )  Set per ctest type, e.g., Experimental, Nightly
+set( TubeTK_USE_IPYTHON_NOTEBOOKS ON )
+# set( TubeTK_USE_KWSTYLE ON )   Set per ctest type, e.g., Experimental, Nightly
 set( TubeTK_USE_LIBSVM ON )
-set( TubeTK_USE_NOTEBOOKS OFF )
-set( TubeTK_USE_NUMPY OFF )
+set( TubeTK_USE_NUMPY ON )
+set( TubeTK_USE_PYQTGRAPH ON )
 set( TubeTK_USE_PYTHON ON )
-set( TubeTK_USE_PYQTGRAPH OFF )
-set( TubeTK_USE_QT ON )
-set( TubeTK_USE_VTK ON )
+# set( TubeTK_USE_VALGRIND OFF ) Set per ctest type, e.g., Experimental, Nightly

 set( Slicer_DIR "/home/aylward/src/dashboards/Slicer-Debug/Slicer-build" )

-set( USE_SYSTEM_CTK OFF )
-set( USE_SYSTEM_IMAGE_VIEWER OFF )
-set( USE_SYSTEM_ITK OFF )
-set( USE_SYSTEM_JSONCPP OFF )
-set( USE_SYSTEM_LIBSVM OFF )
-set( USE_SYSTEM_PARAMETER_SERIALIZER OFF )
-set( USE_SYSTEM_SLICER ON )
-set( USE_SYSTEM_SLICER_EXECUTION_MODEL ON )
-set( USE_SYSTEM_VTK OFF )
-
 set( BUILD_DOCUMENTATION OFF )
-set( BUILD_SHARED_LIBS ON )

 set( ENV{DISPLAY} ":0" )


WIP: Hopefully fixed "fatal: Not a git repository (or any of the parent directories): .git" at https://stingray.researchlumc.nl/job/SuperElastix/job/SuperElastix/job/SELX-126-Make-compilation-logs-public/25/console (4th attempt)

--- CTest.cmake
+++ CTest.cmake
@@ -27,12 +27,12 @@

 execute_process (
     COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
     OUTPUT_VARIABLE SELX_GIT_COMMIT_SHA
 )
 execute_process (
     COMMAND ${GIT_EXECUTABLE} name-rev --name-only HEAD
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
     OUTPUT_VARIABLE SELX_GIT_BRANCH_NAME
 )


fix: Add EXPAT_INCLUDE_DIR to compiler search path

--- Modules/IO/config/Depends.cmake
+++ Modules/IO/config/Depends.cmake
@@ -56,4 +56,5 @@
 if (NOT GiftiCLib_FOUND AND VTK_FOUND)
   set(USE_EXPAT TRUE) # no WITH_EXPAT option, look for it in any case
   basis_find_package(EXPAT)
+  basis_use_package(EXPAT)
 endif ()


Correctly add mitkToFCameraPMDControllerStub to project

--- Modules/ToFHardware/files.cmake
+++ Modules/ToFHardware/files.cmake
@@ -51,7 +51,6 @@
 ELSE()
 SET(CPP_FILES ${CPP_FILES}
   mitkToFCameraPMDCamBoardControllerStub.cpp
-  mitkToFCameraPMDControllerStub.cpp
 )
 ENDIF(MITK_USE_TOF_PMDCAMBOARD)

@@ -67,16 +66,15 @@
 )
 ENDIF(MITK_USE_TOF_PMDO3)

-IF(MITK_USE_TOF_PMDCAMBOARD)
+IF(NOT MITK_USE_TOF_PMDCAMCUBE)
+IF(NOT MITK_USE_TOF_PMDCAMBOARD)
+IF(NOT MITK_USE_TOF_PMDO3)
 SET(CPP_FILES ${CPP_FILES}
-  mitkToFCameraPMDCamBoardController.cpp
-  mitkToFCameraPMDController.cpp
+  mitkToFCameraPMDControllerStub.cpp
 )
-ELSE()
-SET(CPP_FILES ${CPP_FILES}
-  mitkToFCameraPMDCamBoardControllerStub.cpp
-)
-ENDIF(MITK_USE_TOF_PMDCAMBOARD)
+ENDIF(NOT MITK_USE_TOF_PMDO3)
+ENDIF(NOT MITK_USE_TOF_PMDCAMBOARD)
+ENDIF(NOT MITK_USE_TOF_PMDCAMCUBE)

 IF(MITK_USE_TOF_MESASR4000)
 SET(CPP_FILES ${CPP_FILES}


try to fix libxml2 search

try to fix libxml2 search

--- Shared/CMake/modules/LibXml2Config.win32.cmake
+++ Shared/CMake/modules/LibXml2Config.win32.cmake
@@ -8,44 +8,54 @@
 	PATHS
 	"${WIN32_LIBXML2_FOLDER}//include"
 	PATH_SUFFIXES libxml2)
-
+message("LIBXML2_INCLUDE_DIR : ${LIBXML2_INCLUDE_DIR}")
 # Find the correct .lib / .dll.
 set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
 if(MINGW)
-   find_library(LIBXML2_LIBRARIES NAMES libxml2 xml2
+   find_library(LIBXML2_LIBRARIES NAMES libxml2
                 PATHS "${WIN32_LIBXML2_FOLDER}//libmingw")
 	set(LIBXML2_DLL "${WIN32_LIBXML2_FOLDER}//libmingw//libxml2.dll")
 elseif(WIN64)
+		message("looking for 64bit XML library")
 	if(CMAKE_BUILD_TYPE STREQUAL "Debug")
-	    find_library(LIBXML2_LIBRARIES NAMES libxml2 xml2
+	    find_library(LIBXML2_LIBRARIES NAMES libxml2
 					 PATHS "${WIN32_LIBXML2_FOLDER}//lib64//debug")
 		set(LIBXML2_DLL "${WIN32_LIBXML2_FOLDER}//lib64//debug//libxml2.dll")
 	else()
-	    find_library(LIBXML2_LIBRARIES NAMES libxml2 xml2
+	    find_library(LIBXML2_LIBRARIES NAMES libxml2
 					 PATHS "${WIN32_LIBXML2_FOLDER}//lib64//release")
 		set(LIBXML2_DLL "${WIN32_LIBXML2_FOLDER}//lib64//release//libxml2.dll")
 	endif()

 elseif(WIN32)
-   find_library(LIBXML2_LIBRARIES_DEBUG_STATIC NAMES libxml2_s xml2_s
+	message("looking for 32bit XML library")
+	message("LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES}")
+   find_library(LIBXML2_LIBRARIES_DEBUG_STATIC NAMES libxml2_s
 		PATHS
 		"${WIN32_LIBXML2_FOLDER}//lib//debug")
-	find_library(LIBXML2_LIBRARIES_RELEASE_STATIC NAMES libxml2_s xml2_s
+   message("LIBXML2_LIBRARIES_DEBUG_STATIC ${LIBXML2_LIBRARIES_DEBUG_STATIC}")
+	find_library(LIBXML2_LIBRARIES_RELEASE_STATIC NAMES libxml2_s
 		PATHS
 		"${WIN32_LIBXML2_FOLDER}//lib//release")
-   find_library(LIBXML2_LIBRARIES_DEBUG_DYNAMIC NAMES libxml2 xml2
+   message("LIBXML2_LIBRARIES_RELEASE_STATIC ${LIBXML2_LIBRARIES_RELEASE_STATIC}")
+   find_library(LIBXML2_LIBRARIES_DEBUG_DYNAMIC NAMES libxml2
 		PATHS
 		"${WIN32_LIBXML2_FOLDER}//lib//debug")
-	find_library(LIBXML2_LIBRARIES_RELEASE_DYNAMIC NAMES libxml2 xml2
+   message("LIBXML2_LIBRARIES_DEBUG_DYNAMIC ${LIBXML2_LIBRARIES_DEBUG_DYNAMIC}")
+	find_library(LIBXML2_LIBRARIES_RELEASE_DYNAMIC NAMES libxml2
 		PATHS
 		"${WIN32_LIBXML2_FOLDER}//lib//release")
+   message("LIBXML2_LIBRARIES_RELEASE_DYNAMIC ${LIBXML2_LIBRARIES_RELEASE_DYNAMIC}")
 	if(CMAKE_BUILD_TYPE STREQUAL "Debug")
-		set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES_DEBUG_DYNAMIC})
+		set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES_DEBUG_STATIC})
 		set(LIBXML2_DLL "${WIN32_LIBXML2_FOLDER}//lib//debug//libxml2.dll")
 	else()
-		set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES_RELEASE_DYNAMIC})
+		set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES_RELEASE_STATIC})
 		set(LIBXML2_DLL "${WIN32_LIBXML2_FOLDER}//lib//release//libxml2.dll")
 	endif()
+
+
+	message("after search : LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES}")

 endif()


Revert "typo"

Revert "typo"

This reverts commit 368b1cb3fa14eb63b91b914d31b1575b0ee08399.

--- cmake/FindSuiteSparse.cmake
+++ cmake/FindSuiteSparse.cmake
@@ -495,7 +495,7 @@
     COLAMD_FOUND AND
     CCOLAMD_FOUND AND
     CHOLMOD_FOUND AND
-    SUITESPARSEQR_FOUND)
+    SUITESPARSEQR_FOUND AND)
   SET(SUITESPARSE_FOUND TRUE)
   LIST(APPEND SUITESPARSE_INCLUDE_DIRS
     ${AMD_INCLUDE_DIR}


+ Set a package_ROOT CMake variable - it can be useful!

--- cmake/RezInstallCMake.cmake
+++ cmake/RezInstallCMake.cmake
@@ -228,6 +228,7 @@
 	# This won't be made with the correct permissions.  Not sure how to fix this.
 	# PERMISSIONS ${REZ_FILE_INSTALL_PERMISSIONS}
 	file(WRITE ${cmake_path})
+	file(APPEND ${cmake_path} "set(${projname}_ROOT \"${root_dir}\")\n")
 	file(APPEND ${cmake_path} "set(${projname}_INCLUDE_DIRS \"${inc_dirs}\")\n")
 	file(APPEND ${cmake_path} "set(${projname}_LIBRARY_DIRS \"${lib_dirs}\")\n")
 	file(APPEND ${cmake_path} "set(${projname}_LIBRARIES \"${library_names}\")\n")


force use of gold linker in address sanitize configuration

--- cmake/SetupSanitizers.cmake
+++ cmake/SetupSanitizers.cmake
@@ -49,7 +49,7 @@

 setup_sanitize_target("ASan"
                       "-O1 -g -fsanitize=address -fno-omit-frame-pointer -DNDEBUG"
-                      "-fsanitize=address")
+                      "-fsanitize=address -fuse-ld=gold")
 setup_sanitize_target("TSan"
                       "-O1 -g -fsanitize=thread -DNDEBUG"
                       "-fsanitize=thread")


Upgraded Boost to 1.57

Upgraded Boost to 1.57

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -36,13 +36,13 @@
     ELSE(APPLE)
         SET(TOOLSET gcc)
     ENDIF(APPLE)
-
+
     IF (NOT WIN32)
         EXTERNALPROJECT_ADD(
             boost
             PREFIX ${TPSRC}
-            URL ${TPURL}/boost_1_55_0.tar.bz2
-            URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
+            URL ${TPURL}/boost_1_57_0.tar.bz2
+            URL_MD5 "1be49befbdd9a5ce9def2983ba3e7b76"
             STAMP_DIR ${TPBUILD}/stamp
             DOWNLOAD_DIR ${TPSRC}
             SOURCE_DIR ${TPBUILD}/boost
@@ -68,8 +68,8 @@
         EXTERNALPROJECT_ADD(
             boost
             PREFIX ${TPSRC}
-            URL ${TPURL}/boost_1_55_0.tar.bz2
-            URL_MD5 "d6eef4b4cacb2183f2bf265a5a03a354"
+            URL ${TPURL}/boost_1_57_0.tar.bz2
+            URL_MD5 "1be49befbdd9a5ce9def2983ba3e7b76"
             STAMP_DIR ${TPBUILD}/stamp
             DOWNLOAD_DIR ${TPSRC}
             SOURCE_DIR ${TPBUILD}/boost
@@ -95,7 +95,7 @@

     IF (APPLE)
         EXTERNALPROJECT_ADD_STEP(boost patch-install-path
-            COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPBUILD}/boost/tools/build/v2/tools/darwin.jam
+            COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPBUILD}/boost/tools/build/src/tools/darwin.jam
             DEPENDERS build
             DEPENDEES download)
     ENDIF (APPLE)


Use CMAKE_SYSTEM_VERSION instead of ANDROID_NATIVE_API_LEVEL

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -179,14 +179,14 @@
 endif()

 if(ANDROID)
-  string(COMPARE EQUAL "${ANDROID_NATIVE_API_LEVEL}" "" _is_empty)
+  string(COMPARE EQUAL "${CMAKE_SYSTEM_VERSION}" "" _is_empty)
   if(_is_empty)
-    hunter_user_error("ANDROID_NATIVE_API_LEVEL is empty")
+    hunter_user_error("CMAKE_SYSTEM_VERSION is empty")
   endif()

-  string(COMPARE EQUAL "${ANDROID_NATIVE_API_LEVEL}" "21" _is_api_21)
-  string(COMPARE EQUAL "${ANDROID_NATIVE_API_LEVEL}" "19" _is_api_19)
-  string(COMPARE EQUAL "${ANDROID_NATIVE_API_LEVEL}" "16" _is_api_16)
+  string(COMPARE EQUAL "${CMAKE_SYSTEM_VERSION}" "21" _is_api_21)
+  string(COMPARE EQUAL "${CMAKE_SYSTEM_VERSION}" "19" _is_api_19)
+  string(COMPARE EQUAL "${CMAKE_SYSTEM_VERSION}" "16" _is_api_16)

   if(_is_api_21)
     hunter_config(Android-Google-APIs VERSION 21_r01)
@@ -206,9 +206,9 @@
     hunter_config(Sources-for-Android-SDK VERSION 16)
   else()
     hunter_user_error(
-        "Android API (ANDROID_NATIVE_API_LEVEL)"
+        "Android API (CMAKE_SYSTEM_VERSION)"
         " Expected: `21`, `19`, `16`"
-        " Got: `${ANDROID_NATIVE_API_LEVEL}`"
+        " Got: `${CMAKE_SYSTEM_VERSION}`"
     )
   endif()
 endif()


update ngraph to v0.18 test=develop

update ngraph to v0.18 test=develop

--- cmake/external/ngraph.cmake
+++ cmake/external/ngraph.cmake
@@ -37,7 +37,7 @@
 INCLUDE(ExternalProject)

 SET(NGRAPH_PROJECT         "extern_ngraph")
-SET(NGRAPH_GIT_TAG         "a444f7a959b7d87f2c117c9b57a4c387759e481e")
+SET(NGRAPH_GIT_TAG         "127e0dedfaac8c6f2b148cc03bf5f67ac5fbe6fe")
 SET(NGRAPH_SOURCES_DIR     ${THIRD_PARTY_PATH}/ngraph)
 SET(NGRAPH_INSTALL_DIR     ${THIRD_PARTY_PATH}/install/ngraph)
 SET(NGRAPH_INC_DIR         ${NGRAPH_INSTALL_DIR}/include)


[go] Teach the go cmake build functions to funnel the include directories down into the cgo-setup variables of llvm-go.

Summary:
This in turn allows us to use #includes with cgo that rely on CMake
provided include directories which is particularly useful for handling
generated headers that aren't reasonable to put in an "installable"
location.

Differential Revision: http://reviews.llvm.org/D6798

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -628,9 +628,14 @@
     set(binpath ${CMAKE_BINARY_DIR}/bin/${binary}${CMAKE_EXECUTABLE_SUFFIX})
     set(cc "${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}")
     set(cxx "${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}")
+    set(cppflags "")
+    get_property(include_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
+    foreach(d ${include_dirs})
+      set(cppflags "${cppflags} -I${d}")
+    endforeach(d)
     set(ldflags "${CMAKE_EXE_LINKER_FLAGS}")
     add_custom_command(OUTPUT ${binpath}
-      COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "cc=${cc}" "cxx=${cxx}" "ldflags=${ldflags}"
+      COMMAND ${CMAKE_BINARY_DIR}/bin/llvm-go "cc=${cc}" "cxx=${cxx}" "cppflags=${cppflags}" "ldflags=${ldflags}"
               ${ARG_GOFLAGS} build -o ${binpath} ${pkgpath}
       DEPENDS llvm-config ${CMAKE_BINARY_DIR}/bin/llvm-go${CMAKE_EXECUTABLE_SUFFIX}
               ${llvmlibs} ${ARG_DEPENDS}


nomlib-config.cmake: Clean up handling of NOMLIB_DEPS_ROOT var

* Collapse separate handling of NOMLIB_DEPS_PREFIX and
ENV{NOMLIB_DEPS_PREFIX} to one internal var (NOMLIB_DEPS_ROOT)
by appending them at script init, instead of treating the two
vars separately. This helps prevent us from accidentally modifying
the input vars and potentially passing unexpected results back to the
end-user of this module.

* Add validation checks for path existence of the deps prefix before
continuing; this takes the burden off of the end-user of this module.

--- Resources/CMake/nomlib-config.cmake
+++ Resources/CMake/nomlib-config.cmake
@@ -66,6 +66,24 @@
 #
 # To distribute this file outside of CMake, substitute the full license text
 # for the above reference.
+
+set( NOMLIB_DEPS_ROOT "NOTFOUND" )
+
+if( EXISTS ${NOMLIB_DEPS_PREFIX} )
+  # IMPORTANT: NOMLIB_DEPS_PREFIX will be an external CMake variable within
+  # this scope, of which **must** already be set by the parent script calling
+  # FIND_PACKAGE, and should **never** be modified for sake of the parent
+  # script.
+  list( APPEND NOMLIB_DEPS_ROOT ${NOMLIB_DEPS_PREFIX} )
+endif( EXISTS ${NOMLIB_DEPS_PREFIX} )
+
+if( DEFINED ENV{NOMLIB_DEPS_PREFIX} AND EXISTS ENV{NOMLIB_DEPS_PREFIX} )
+  list( APPEND NOMLIB_DEPS_ROOT ENV{NOMLIB_DEPS_PREFIX} )
+endif( DEFINED ENV{NOMLIB_DEPS_PREFIX} AND EXISTS ENV{NOMLIB_DEPS_PREFIX} )
+
+if( NOMLIB_DEPS_ROOT STREQUAL "NOTFOUND" )
+  message( FATAL_ERROR "An absolute directory path to the engine's dependencies must be set. See README.md for details." )
+endif( NOMLIB_DEPS_ROOT STREQUAL "NOTFOUND" )

 if( CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
   set( NOM_PLATFORM_OSX TRUE )
@@ -180,7 +198,6 @@
   find_library( ${output_var} NAMES ${ARGN}
                 PATHS
                 ${NOMLIB_DEPS_ROOT}
-                $ENV{NOMLIB_DEPS_ROOT}
                 ${NOM_SEARCH_PREFIX_PATHS}
                 PATH_SUFFIXES
                 ${NOM_LIBRARY_PATH_SUFFIXES} # osx, *nix
@@ -215,7 +232,6 @@
   find_path(  SDL2_INCLUDE_DIR SDL.h
               PATHS
               ${NOMLIB_DEPS_ROOT}
-              $ENV{NOMLIB_DEPS_ROOT}
               ${NOM_SEARCH_PREFIX_PATHS}
               PATH_SUFFIXES SDL2/include include
   )
@@ -263,7 +279,6 @@
   find_path(  LIBROCKET_INCLUDE_DIR Rocket/Core
               PATHS
               ${NOMLIB_DEPS_ROOT}
-              $ENV{NOMLIB_DEPS_ROOT}
               ${NOM_SEARCH_PREFIX_PATHS}
               PATH_SUFFIXES libRocket/include include
   )


Ignore missing-braces warning

Ignore missing-braces warning

--- cmake/Saiga_compiler_flags.cmake
+++ cmake/Saiga_compiler_flags.cmake
@@ -11,6 +11,10 @@
 elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing")
+endif()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-missing-braces")
 endif()

 ######### basic #########


build: match hardcoded extensions in the compiler

The swiftdoc partials must have the extension .swiftdoc.  Adjust the
output names to match this assumption.  This is needed to repair the
CMake build with the newer compiler.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -66,8 +66,8 @@
     get_filename_component(name ${source} NAME)

     set(obj ${CMAKE_CURRENT_BINARY_DIR}/${target}.dir/${name}${CMAKE_C_OUTPUT_EXTENSION})
-    set(mod ${CMAKE_CURRENT_BINARY_DIR}/${target}.dir/${name}.swiftmodule~partial)
-    set(doc ${CMAKE_CURRENT_BINARY_DIR}/${target}.dir/${name}.swiftdoc~partial)
+    set(mod ${CMAKE_CURRENT_BINARY_DIR}/${target}.dir/${name}.swiftmodule)
+    set(doc ${CMAKE_CURRENT_BINARY_DIR}/${target}.dir/${name}.swiftdoc)

     set(all_sources ${sources})
     list(INSERT all_sources ${i} -primary-file)


Temporarily bump minimum compiler version

It's pretty hard to find a reliable list of which bots use which compiler version... so I'm going to commit this change which allows us to mandate the compilers required for C++14. This bump is what we've already agreed to do, so I'll use the list of failures to figure out which bots need to bump their compiler version. I'll revert the change in a few minutes.

The last discussion of this is here: http://lists.llvm.org/pipermail/llvm-dev/2019-August/134360.html

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

--- cmake/modules/CheckCompilerVersion.cmake
+++ cmake/modules/CheckCompilerVersion.cmake
@@ -4,11 +4,11 @@

 include(CheckCXXSourceCompiles)

-set(GCC_MIN 4.8)
+set(GCC_MIN 5.1)
 set(GCC_SOFT_ERROR 5.1)
-set(CLANG_MIN 3.1)
+set(CLANG_MIN 3.5)
 set(CLANG_SOFT_ERROR 3.5)
-set(APPLECLANG_MIN 3.1)
+set(APPLECLANG_MIN 6.0)
 set(APPLECLANG_SOFT_ERROR 6.0)

 # https://en.wikipedia.org/wiki/Microsoft_Visual_C#Internal_version_numbering
@@ -17,7 +17,7 @@
 set(MSVC_SOFT_ERROR 19.1)

 # Map the above GCC versions to dates: https://gcc.gnu.org/develop.html#timeline
-set(GCC_MIN_DATE 20130322)
+set(GCC_MIN_DATE 20150422)
 set(GCC_SOFT_ERROR_DATE 20150422)


Split off 8.0.72

Split off 8.0.72

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 0 )
-set ( HPCC_POINT 71 )
+set ( HPCC_POINT 73 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.10.28

Split off 7.10.28

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

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


Split off 7.6.52

Split off 7.6.52

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 6 )
-set ( HPCC_POINT 51 )
+set ( HPCC_POINT 53 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.74

Split off 7.12.74

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 12 )
-set ( HPCC_POINT 73 )
+set ( HPCC_POINT 75 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 8.8.10

Split off 8.8.10

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 8 )
-set ( HPCC_POINT 9 )
+set ( HPCC_POINT 11 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


cmake: Add -marm for building with generic toolchain

--- makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake
+++ makefiles/cmake/toolchains/arm-linux-gnueabihf.cmake
@@ -10,7 +10,7 @@
 SET(CMAKE_SYSTEM_PROCESSOR arm)

 #ADD_DEFINITIONS("-march=armv6")
-add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard")
+add_definitions("-mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -marm")

 # rdynamic means the backtrace should work
 IF (CMAKE_BUILD_TYPE MATCHES "Debug")


use findblas for all os's.

use findblas for all os's.

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -64,11 +64,13 @@
   endif ()
 endif ()

-  if (APPLE)
-    find_package(blas)
-    if (NOT (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR))
-      message(FATAL_ERROR "Gadgetron needs CBLAS_LIBRARY and CBLAS_INCLUDE_DIR (/usr/local/Cellar/openblas/ if installed with \"brew install openblas\")")
-    endif()
+  # BLAS
+  find_package(blas)
+  if (APPLE AND NOT (CBLAS_LIBRARY AND CBLAS_INCLUDE_DIR))
+    message(FATAL_ERROR "Gadgetron needs CBLAS_LIBRARY and CBLAS_INCLUDE_DIR. If
+      these variables do not exist in your CMake, create them manually. CBLAS_LIBRARY
+      and CBLAS_INCLUDE_DIR should be FILEPATH and PATH, respectively, and live in
+      /usr/local/Cellar/openblas/ if installed with \"brew install openblas\".")
   endif()

   #option(BUILD_GADGETRON_NATIVE_PYTHON_SUPPORT


[fix] Revert cmake CXX flag cleanup.

[fix] Revert cmake CXX flag cleanup.

This flag has been removed but it is needed for the lidarview bundle
on WIndows

--- Superbuild/Projects/lidarview.cmake
+++ Superbuild/Projects/lidarview.cmake
@@ -7,6 +7,7 @@
     -DBUILD_TESTING:BOOL=OFF
     -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/common-superbuild/paraview/build
     -DVTK_DIR:PATH=${SuperBuild_BINARY_DIR}/common-superbuild/paraview/build/VTK
+    -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}
     -Dqt_version:STRING=${qt_version}
     -DPYTHONQT_DIR:PATH=<INSTALL_DIR>
     -DBOOST_ROOT:PATH=<INSTALL_DIR>


Compilation with XDR on WIN32

Compilation with XDR on WIN32

--- adm_local/cmake_files/FindXDR.cmake
+++ adm_local/cmake_files/FindXDR.cmake
@@ -30,7 +30,7 @@
 SET(XDR_FOUND 1)

 IF(WIN32)
-  LIST(APPEND XDR_INCLUDE_DIRS "${XDR_ROOT_DIR}/src/msvc")
+  LIST(APPEND XDR_INCLUDE_DIRS "${XDR_ROOT_DIR}/include/src/msvc")
 ENDIF(WIN32)

 INCLUDE(FindPackageHandleStandardArgs)


bug fix on ctest config

bug fix on ctest config

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -7,7 +7,7 @@
   add_test(
     ${testname} bash -c "
       cp ${CMAKE_CURRENT_SOURCE_DIR}/test_files/${testname}/*.fst . &&
-      ${CMAKE_BUILD_DIR}/glue-codes/fast/openfast ${testname}.fst > ${testname}.log &&
+      ${CMAKE_BINARY_DIR}/glue-codes/fast/openfast ${testname}.fst > ${testname}.log &&
       python ${CMAKE_CURRENT_SOURCE_DIR}/pass_fail.py ${CMAKE_BINARY_DIR}/reg_tests/${testname}.outb ${CMAKE_CURRENT_SOURCE_DIR}/test_files/${testname}/${testname}.outb ${TOLERANCE}
     "
   )


use a source zip for ospcommon (prevents extra rebuilds)

--- scripts/superbuild/dependencies/dep_ospcommon.cmake
+++ scripts/superbuild/dependencies/dep_ospcommon.cmake
@@ -29,9 +29,7 @@
   STAMP_DIR ${COMPONENT_NAME}/stamp
   SOURCE_DIR ${COMPONENT_NAME}/src
   BINARY_DIR ${COMPONENT_NAME}/build
-  GIT_REPOSITORY https://github.com/ospray/ospcommon
-  GIT_TAG master
-  GIT_SHALLOW ON
+  URL "https://github.com/ospray/ospcommon/archive/master.zip"
   CMAKE_ARGS
     -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
     -DCMAKE_INSTALL_PREFIX:PATH=${COMPONENT_PATH}


COMP: Suppress invalid warning

COMP: Suppress invalid warning

JIRA ITK-3621 issue resolved.

Newer version of clang warn when a static constexpr template variable
is declared in a different compilation unit than the defintion.

If this split declaration/definition is done incorrectly, clang
issues a warning every time the delaration is encountered, and
a linker error when linkage occurs.

If this split delcaration/definition is done correctly, clang
annoyingly issues a compiler warning every time the declaration is
encountered, but then links without issue.

Change-Id: I678bccfbbd0ca979be65af8624c196df9eca9101

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -118,6 +118,7 @@
   set(cxx_flags
     -Wno-deprecated
     -Wno-invalid-offsetof
+    -Wno-undefined-var-template  # suppress invalid warning when explicitly instantiated in another translation unit
     -Woverloaded-virtual
     -Wstrict-null-sentinel
   )


use java_home to find Java runtime executable under OS X

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -1807,11 +1807,30 @@
 	)
 	set (CMAKE_FIND_LIBRARY_PREFIXES "${_findLibraryPrefixesSave}")
 	set (CMAKE_FIND_LIBRARY_SUFFIXES "${_findLibrarySuffixesSave}")
+	if (CMAKE_HOST_APPLE)
+		if (EXISTS "${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Java")
+			set (_mmaJavaHome "${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Java")
+		else()
+			# OS X versions of Mathematica earlier than 10 did not have a JVM bundled
+			# but used the Java JVM pre-installed on system
+			set (_mmaJavaHome "${Mathematica_HOST_ROOT_DIR}/SystemFiles/Java")
+			if (DEFINED Mathematica_VERSION)
+				if ("${Mathematica_VERSION}" VERSION_LESS "10.0")
+					# use java_home to find path to JVM installed on system
+					if (EXISTS "/usr/libexec/java_home")
+						execute_process(
+							COMMAND "/usr/libexec/java_home" "--version" "1.6"
+							TIMEOUT 10 OUTPUT_VARIABLE _mmaJavaHome ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+					endif()
+				endif()
+			endif()
+		endif()
+	else()
+		set (_mmaJavaHome "${Mathematica_HOST_ROOT_DIR}/SystemFiles/Java")
+	endif()
 	find_program (Mathematica_JLink_JAVA_EXECUTABLE
 		NAMES "bin/${_JLinkJavaNames}"
-		HINTS
-			"${Mathematica_HOST_ROOT_DIR}/SystemFiles/Java"
-			"${Mathematica_HOST_ROOT_DIR}/Contents/SystemFiles/Java"
+		HINTS "${_mmaJavaHome}"
 		PATH_SUFFIXES ${_HostSystemIDs}
 		DOC "J/Link Java launcher."
 		NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH


removed Qguide since it loses vislibversioninfo.obj

--- cmake/icc.cmake
+++ cmake/icc.cmake
@@ -14,10 +14,7 @@

     set(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS} /MDd /Od /DDEBUG /D_DEBUG /Zi" CACHE STRING "" FORCE)
     set(CMAKE_CXX_FLAGS_RELEASE "${COMMON_CXX_FLAGS} /MD /DNDEBUG /D_NDEBUG ${INTEL_OPTIMIZATION_FLAGS}" CACHE STRING "" FORCE)
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${COMMON_CXX_FLAGS} /MD /DNDEBUG /D_NDEBUG ${INTEL_OPTIMIZATION_FLAGS} /Zi /Qopt-report:1 /Qguide:1" CACHE STRING "" FORCE)
+    # /Qguide:1 generates no result file for vislibversioninfo?
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${COMMON_CXX_FLAGS} /MD /DNDEBUG /D_NDEBUG ${INTEL_OPTIMIZATION_FLAGS} /Zi /Qopt-report:2" CACHE STRING "" FORCE)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox /Gm /MP /W3 /std=c99 /Qopenmp" CACHE STRING "" FORCE)
-
-    set(MPI_CXX_COMPILER ${CMAKE_CXX_COMPILER})
-    set(MPI_C_COMPILER ${CMAKE_C_COMPILER})
-
 endif()


use find_program to locate otool under OS X, Xcode 8 otool output fix

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -2715,10 +2715,22 @@
 			set (_path "${_libraryPath}")
 		endif()
 		if (EXISTS "${_path}")
+			find_program(Mathematica_OTOOL_EXECUTABLE "otool")
+			mark_as_advanced(Mathematica_OTOOL_EXECUTABLE)
 			get_filename_component(${_libraryAbsPath} ${_path} ABSOLUTE)
-			execute_process(
-				COMMAND otool "-D" "-X" "${${_libraryAbsPath}}" TIMEOUT 5
-				OUTPUT_VARIABLE ${_libraryInstallName} OUTPUT_STRIP_TRAILING_WHITESPACE)
+			set (_otoolOutput "")
+			if (Mathematica_OTOOL_EXECUTABLE)
+				execute_process(
+					COMMAND "${Mathematica_OTOOL_EXECUTABLE}" "-D" "-X" "${${_libraryAbsPath}}" TIMEOUT 5
+					OUTPUT_VARIABLE _otoolOutput OUTPUT_STRIP_TRAILING_WHITESPACE)
+				# install name is in last line of otool output
+				string (REPLACE "\n" ";" _otoolOutput "${_otoolOutput}")
+			endif()
+			if (_otoolOutput)
+				list (GET _otoolOutput -1 ${_libraryInstallName})
+			else()
+				set (${_libraryInstallName} "")
+			endif()
 		endif()
 	endif()
 endmacro()


windows compatibility

windows compatibility

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -36,6 +36,12 @@
     include_directories(${CMAKE_CURRENT_BINARY_DIR}/abi/include)
 endif()

+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_BINARY_DIR}")
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_BINARY_DIR}")

 add_library(ethrpc STATIC ${SOURCES})

@@ -43,13 +49,17 @@
     add_dependencies(ethrpc abi)

     if (WIN32 AND NOT MINGW)
-        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS $<TARGET_OBJECTS:abi>)
+#        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS $<TARGET_OBJECTS:abi>)
+        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS "\"${CMAKE_CURRENT_BINARY_DIR}/abi/abi.lib\"")
     elseif (${CMAKE_GENERATOR} STREQUAL "Xcode")
-        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS $<TARGET_OBJECTS:abi>)
+#        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS $<TARGET_OBJECTS:abi>)
+        set_property (TARGET ethrpc APPEND PROPERTY STATIC_LIBRARY_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/abi/libabi.a")
     else()
         set(LIB_OBJ_DIR ${CMAKE_CURRENT_BINARY_DIR}/obj)
-        set(ETHRPC_LIBRARY_PATH $<TARGET_FILE:ethrpc>)
-        set(ABI_LIBRARY_PATH $<TARGET_FILE:abi>)
+#        set(ETHRPC_LIBRARY_PATH $<TARGET_FILE:ethrpc>)
+#        set(ABI_LIBRARY_PATH $<TARGET_FILE:abi>)
+        set(ETHRPC_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/libethrpc.a)
+        set(ABI_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR}/abi/libabi.a)
         make_directory (${LIB_OBJ_DIR})

         ADD_CUSTOM_COMMAND(TARGET ethrpc


Make the new ABI build option unavailable for MSVC compiler. [ci skip]

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -44,7 +44,7 @@
 # Define all supported build options
 include (CMakeDependentOption)
 option (URHO3D_C++11 "Enable C++11 standard")
-option (URHO3D_NOABI "If set then do not explicitly specify the ABI compiler flag for code generation (GCC and Clang only)")
+cmake_dependent_option (URHO3D_NOABI "If set then do not explicitly specify the ABI compiler flag for code generation (GCC and Clang only)" FALSE "NOT MSVC" FALSE)
 mark_as_advanced (URHO3D_NOABI)
 cmake_dependent_option (IOS "Setup build for iOS platform" FALSE "XCODE" FALSE)
 if (NOT MSVC AND NOT DEFINED URHO3D_DEFAULT_64BIT)  # Only do this once in the initial configure step


using uint64 on OSX

using uint64 on OSX

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -18,17 +18,21 @@

 file(GLOB_RECURSE SOURCES "src/*.cpp")

-include(CheckTypeSize)

-check_type_size("int64_t" SIZEOF_INT64_T)

-if(NOT SIZEOF_INT64_T)
-    check_type_size("__int64_t" SIZEOF_INT64_T BUILTIN_TYPES_ONLY)
+if(APPLE)
+    add_definitions(-D__HAS_INT64__)
+else()
+    include(CheckTypeSize)
+    check_type_size("int64_t" SIZEOF_INT64_T)
+    if(NOT SIZEOF_INT64_T)
+        check_type_size("__int64_t" SIZEOF_INT64_T BUILTIN_TYPES_ONLY)
+    endif()
+    if(SIZEOF_INT64_T EQUAL 8)
+        add_definitions(-D__HAS_INT64__)
+    endif()
 endif()

-if(SIZEOF_INT64_T EQUAL 8)
-    add_definitions(-D__HAS_INT64__)
-endif()

 CopyHeaders()


Moving to submodule

Moving to submodule

--- .cget/core.cmake
+++ .cget/core.cmake
@@ -1,499 +0,0 @@
-include(CMakeParseArguments)
-
-cmake_policy(SET CMP0011 NEW)
-cmake_policy(SET CMP0012 NEW)
-
-find_package(Git)
-if(NOT GIT_FOUND)
-    message(FATAL_ERROR "Git is required in the path, or you must set ")
-endif()
-
-EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} config cget.organizeAsSubModule OUTPUT_VARIABLE CGET_ORGANIZE_AS_SUBMODULES)
-EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} config cget.useSSHForGithub OUTPUT_VARIABLE CGET_USE_SSH_FOR_GITHUB)
-
-if (NOT DEFINED CGET_VERBOSE_LEVEL)
-  EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} config cget.verbose OUTPUT_VARIABLE CGET_VERBOSE_LEVEL)
-endif()
-
-if (NOT DEFINED CGET_VERBOSE_LEVEL)
-  set(CGET_VERBOSE_LEVEL 5)
-endif()
-
-if (NOT DEFINED CGET_CORE_DIR)
-  set(CGET_CORE_DIR "${CMAKE_SOURCE_DIR}/")
-  set(CGET_IS_ROOT_DIR ON)
-
-  ADD_CUSTOM_TARGET(cget-clean-packages COMMAND ${CMAKE_COMMAND} -E remove_directory "${CGET_BIN_DIR}")
-  ADD_CUSTOM_TARGET(cget-rebuild-packages)
-endif()
-
-FILE(MD5 ${CGET_CORE_DIR}/.cget/core.cmake CGET_CORE_HASH)
-FILE(MD5 ${CGET_CORE_DIR}/.cget/core.cmake CGET_PACKAGE_HASH)
-
-set(CGET_CORE_VERSION 0.1.4)
-
-if (NOT CGET_BIN_DIR)
-  SET(CGET_BIN_DIR "${CMAKE_SOURCE_DIR}/.cget-bin/")
-endif ()
-
-function(CGET_MESSAGE LVL)
-  if(NOT CGET_VERBOSE_LEVEL LESS LVL)
-    message("cget: ${ARGN}")
-  endif()
-endfunction()
-
-macro(CGET_EXECUTE_PROCESS)
-  CGET_MESSAGE(3 "Running exec process: ${ARGN}")
-  execute_process(${ARGN} RESULT_VARIABLE EXECUTE_RESULT)
-  if(EXECUTE_RESULT)
-    message(FATAL_ERROR "Execute process '${ARGN}' failed with '${EXECUTE_RESULT}', result: ${RESULT_VARIABLE}")
-  endif()
-endmacro()
-
-if (NOT CGET_PACKAGE_DIR)
-  SET(CGET_PACKAGE_DIR ${CGET_BIN_DIR}/packages)
-endif ()
-
-if(CGET_ORGANIZE_AS_SUBMODULES AND NOT EXISTS ${CGET_PACKAGE_DIR}/.git)
-  FILE(MAKE_DIRECTORY ${CGET_PACKAGE_DIR})
-  CGET_EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} init WORKING_DIRECTORY ${CGET_PACKAGE_DIR})
-endif()
-
-SET(CGET_INSTALL_DIR ${CGET_BIN_DIR}/install_root/${CMAKE_GENERATOR})
-
-set(CGET_BUILD_CONFIGS ${CMAKE_CONFIGURATION_TYPES})
-if(NOT CGET_BUILD_CONFIGS)
-        set(CGET_BUILD_CONFIGS ${CMAKE_BUILD_TYPE})
-    else()
-        set(CGET_BUILD_CONFIGS "Debug;Release")
-endif()
-
-set(CGET_VERBOSE_SUFFIX OFF)
-
-IF(CGET_VERBOSE_SUFFIX)
-    SET(OLD_SUFFIX "${CMAKE_FIND_LIBRARY_SUFFIXES}")
-    SET(CMAKE_FIND_LIBRARY_SUFFIXES)
-    foreach(suffix ${OLD_SUFFIX})
-        foreach(configuration ${CGET_BUILD_CONFIGS})
-            list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "_${configuration}${suffix}")
-        endforeach()
-    endforeach()
-    CGET_MESSAGE(3 "${OLD_SUFFIX} vs ${CMAKE_FIND_LIBRARY_SUFFIXES}")
-ELSE()
-    set(CMAKE_DEBUG_POSTFIX "d")
-ENDIF()
-
-set(CMAKE_FIND_ROOT_PATH ${CGET_INSTALL_DIR})
-list(APPEND CMAKE_PREFIX_PATH ${CGET_INSTALL_DIR} ${CGET_INSTALL_DIR}/lib/cmake)
-set(CMAKE_LIBRARY_PATH ${CGET_INSTALL_DIR}/lib)
-
-list(APPEND CMAKE_INSTALL_RPATH ${CMAKE_LIBRARY_PATH})
-
-if(MSVC)
-    cget_message(3 "Setting up paths for '${CMAKE_GENERATOR}'")
-    if("${CMAKE_GENERATOR}" MATCHES "Win64")
-        set(CGET_ARCH "x64")
-    else()
-        set(CGET_ARCH "x86")
-    endif()
-    if("${CMAKE_GENERATOR}" MATCHES "Visual Studio 14 2015")
-        SET(CGET_MSVC_RUNTIME "v140")
-    elseif("${CMAKE_GENERATOR}" MATCHES "Visual Studio 12 2013")
-        SET(CGET_MSVC_RUNTIME "v120")
-    else()
-        MESSAGE(FATAL_ERROR " Generator not recognized ${CMAKE_GENERATOR}")
-    endif()
-    SET(CGET_NUGET_PATH_HINT "${CGET_MSVC_RUNTIME}.windesktop.msvcstl.dyn.rt-dyn.${CGET_ARCH}")
-endif()
-
-macro(CGET_NUGET_BUILD name version)
-    CGET_MESSAGE(3 "CGET_NUGET_BUILD ${ARGV}")
-    set(OUTPUTDIR ${CGET_INSTALL_DIR})
-    if(REPO_DIR)
-        set(OUTPUTDIR ${REPO_DIR})
-    endif()
-    set(searchsuffix ${ARGN})
-    if(NOT CGET_NUGET OR NOT EXISTS "${CGET_NUGET}")
-        cget_message(2 "Nuget path ${CGET_NUGET}")
-        set(CGET_NUGET)
-        find_program(CGET_NUGET nuget)
-        if(NOT CGET_NUGET  OR NOT EXISTS "${CGET_NUGET}")
-            file(DOWNLOAD https://dist.nuget.org/win-x86-commandline/latest/nuget.exe "${CGET_INSTALL_DIR}/bin/nuget.exe")
-            find_program(CGET_NUGET nuget REQUIRED)
-        endif()
-    endif()
-    CGET_EXECUTE_PROCESS(COMMAND ${CGET_NUGET} install ${name}${searchsuffix}  -version ${version} -outputdirectory "${OUTPUTDIR}")
-    set(NUGET_DIR "${OUTPUTDIR}/${name}.${CGET_NUGET_PATH_HINT}.${version}")
-    set(CGET_${name}_NUGET_DIR ${NUGET_DIR} CACHE STRING "" FORCE)
-    set(LIB_DIR "${NUGET_DIR}/lib/native/${CGET_MSVC_RUNTIME}/windesktop/msvcstl/dyn/rt-dyn/${CGET_ARCH}/")
-    list(APPEND CMAKE_LIBRARY_PATH "${LIB_DIR}/debug" "${LIB_DIR}/release")
-    list(APPEND CMAKE_INCLUDE_PATH "${NUGET_DIR}/build/native/include")
-    include_directories("${NUGET_DIR}/build/native/include")
-    CGET_WRITE_CGET_SETTINGS_FILE()
-    CGET_MESSAGE(3 "END CGET_NUGET_BUILD ${ARGV}")
-endmacro()
-
-CGET_MESSAGE(3 "Install dir: ${CGET_INSTALL_DIR}")
-CGET_MESSAGE(3 "Bin dir: ${CGET_BIN_DIR}")
-
-include_directories("${CGET_INSTALL_DIR}/include")
-link_directories("${CGET_INSTALL_DIR}" "${CMAKE_LIBRARY_PATH}")
-
-function(CGET_WRITE_CGET_SETTINGS_FILE)
-  set(WRITE_STR "SET(CMAKE_INSTALL_PREFIX \t\"${CGET_INSTALL_DIR}\" CACHE PATH \"\")\n")
-
-  foreach(varname CMAKE_INCLUDE_PATH CMAKE_LIBRARY_PATH CGET_BIN_DIR CMAKE_CONFIGURATION_TYPES CMAKE_INSTALL_RPATH CGET_PACKAGE_DIR CGET_INSTALL_DIR CGET_CORE_DIR CMAKE_FIND_ROOT_PATH CMAKE_PREFIX_PATH BUILD_SHARED_LIBS CMAKE_FIND_LIBRARY_SUFFIXES)
-    if(DEFINED ${varname})
-      set(WRITE_STR "${WRITE_STR}SET(${varname} \t\"${${varname}}\" CACHE STRING \"\")\n")
-    endif()
-  endforeach()
-
-
-  foreach(configuration ${CGET_BUILD_CONFIGS})
-    STRING(TOUPPER ${configuration} configuration_upper)
-    IF(CGET_VERBOSE_SUFFIX)
-      set(WRITE_STR "${WRITE_STR}SET(CMAKE_${configuration_upper}_POSTFIX \t\"_${configuration_upper}\" CACHE STRING \"\")\n")
-    elseif(DEFINED CMAKE_${configuration_upper}_POSTFIX)
-      set(WRITE_STR "${WRITE_STR}SET(CMAKE_${configuration_upper}_POSTFIX \t\"${CMAKE_${configuration_upper}_POSTFIX}\" CACHE STRING \"\")\n")
-    endif()
-  endforeach()
-
-
-  CGET_MESSAGE(2 "Writing load file to ${CGET_BIN_DIR}/load.cmake")
-  file(WRITE "${CGET_BIN_DIR}/load.cmake" "${WRITE_STR}")
-endfunction()
-
-if(CGET_IS_ROOT_DIR)
-  CGET_WRITE_CGET_SETTINGS_FILE()
-endif()
-
-macro(CGET_PARSE_VERSION NAME INPUT RESULT)
-  SET(${RESULT} ${${INPUT}})
-  STRING(TOLOWER "${${RESULT}}" ${RESULT})
-  STRING(TOLOWER ${NAME} CGET_${NAME}_LOWER)
-  STRING(REPLACE "${CGET_${NAME}_LOWER}" "" ${RESULT} "${${RESULT}}")
-  STRING(REGEX MATCH "([0-9]+[\\._]?)+" ${RESULT} "${${RESULT}}")
-  STRING(REPLACE "_" "." ${RESULT} "${${RESULT}}")
-endmacro()
-
-function(CGET_NORMALIZE_CMAKE_FILES DIR SUFFIX NEW_SUFFIX)
-  file(GLOB config_files RELATIVE "${DIR}" "${DIR}/*${SUFFIX}")
-  foreach (config_file ${config_files})
-    STRING(REPLACE "${SUFFIX}" "" root_name "${config_file}")
-    STRING(TOLOWER "${root_name}" root_name)
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy "${DIR}/${config_file}" "${DIR}/${root_name}-${NEW_SUFFIX}")
-  endforeach ()
-
-endfunction()
-
-SET(REL_BUILD_DIR "build-${CMAKE_GENERATOR}")
-if(CMAKE_BUILD_TYPE)
-  SET(RELEASE_REL_BUILD_DIR "${REL_BUILD_DIR}-Release")
-  SET(REL_BUILD_DIR "${REL_BUILD_DIR}-${CMAKE_BUILD_TYPE}")
-endif()
-
-macro(CGET_FILE_CONTENTS filename var)
-  if(EXISTS ${filename})
-    file(READ ${filename} "${var}")
-  endif()
-endmacro()
-
-CGET_FILE_CONTENTS("${CGET_INSTALL_DIR}/.install" INSTALL_CACHE_VAL)
-if (NOT INSTALL_CACHE_VAL STREQUAL CGET_CORE_VERSION)
-    CGET_MESSAGE(3 "Install out of date ${INSTALL_CACHE_VAL} vs ${CGET_CORE_VERSION}")
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory "${CGET_INSTALL_DIR}")
-
-    file(WRITE "${CGET_INSTALL_DIR}/.install" "${CGET_CORE_VERSION}")
-endif ()
-
-macro(CGET_PARSE_OPTIONS name)
-  set(options NO_FIND_PACKAGE REGISTRY NOSUBMODULES PROXY)
-  set(oneValueArgs NUGET_PACKAGE GITHUB GIT HG SVN URL VERSION FINDNAME COMMIT_ID REGISTRY_VERSION OPTIONS_FILE)
-  set(multiValueArgs OPTIONS FIND_OPTIONS)
-
-  CMAKE_PARSE_ARGUMENTS(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-  CGET_PARSE_VERSION(${name} ARGS_VERSION ARGS_CMAKE_VERSION)
-
-  CGET_MESSAGE(5 "PARSE_OPTIONS ${ARGV} ")
-  if (ARGS_REGISTRY)
-    set(ARGS_GITHUB "cget/${name}.cget")
-    set(ARGS_PROXY ON)
-  endif ()
-
-  if (ARGS_GITHUB)
-    if(CGET_USE_SSH_FOR_GITHUB)
-      set(ARGS_GIT "git@github.com:${ARGS_GITHUB}")
-    else()
-      set(ARGS_GIT "http://github.com/${ARGS_GITHUB}")
-    endif()
-  endif ()
-
-  string(MD5 Repo_Hash "${name} ${ARGS_GIT} ${ARGS_VERSION} ${NOSUBMODULES} ${ARGS_COMMIT_ID} ${ARGS_REGISTRY_VERSION}")
-  string(MD5 Build_Hash "${name} ${ARGS_OPTIONS} ${ARGS_NOSUBMODULES} ${CGET_BUILD_CONFIGS} ${CGET_CORE_VERSION}")
-
-  SET(CHECKOUT_TAG "${ARGS_VERSION}")
-  if (ARGS_PROXY)
-    SET(CGET_REQUESTED_VERSION ${ARGS_VERSION})
-    SET(CHECKOUT_TAG "${ARGS_REGISTRY_VERSION}")
-  endif()
-
-  set(REPO_DIR_SUFFIX "${CHECKOUT_TAG}${ARGS_COMMIT_ID}")
-
-  if("" STREQUAL "${REPO_DIR_SUFFIX}")
-    set(REPO_DIR_SUFFIX "HEAD")
-  endif()
-
-  if(ARGS_PROXY)
-    set(REPO_DIR_SUFFIX "${REPO_DIR_SUFFIX}.cget")
-  endif()
-
-  set(REPO_DIR "${CGET_PACKAGE_DIR}/${name}_${REPO_DIR_SUFFIX}")
-  set(BUILD_DIR "${REPO_DIR}/${REL_BUILD_DIR}")
-  if(DEFINED RELEASE_REL_BUILD_DIR)
-    set(RELEASE_BUILD_DIR "${REPO_DIR}/${RELEASE_REL_BUILD_DIR}")
-  endif()
-  if(NOT ARGS_PROXY)
-    set(CGET_${name}_REPO_DIR "${REPO_DIR}" CACHE STRING "" FORCE)
-    set(CGET_${name}_BUILD_DIR "${BUILD_DIR}" CACHE STRING "" FORCE)
-  endif()
-
-  CGET_MESSAGE(2 "Setup for ${name}")
-  CGET_MESSAGE(2 "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
-  CGET_MESSAGE(2 "COMMIT_ID: ${ARGS_COMMIT_ID}")
-  CGET_MESSAGE(2 "CHECKOUT_TAG: ${CHECKOUT_TAG}")
-  CGET_MESSAGE(2 "REPO_DIR: ${REPO_DIR}")
-  CGET_MESSAGE(2 "BUILD_DIR: ${BUILD_DIR}")
-  CGET_MESSAGE(2 "RELEASE_BUILD_DIR: ${RELEASE_BUILD_DIR}")
-  CGET_MESSAGE(2 "CMAKE_CONFIGURATION_TYPES: ${CMAKE_CONFIGURATION_TYPES}")
-endmacro()
-
-macro(CGET_BUILD_CMAKE name)
-  CGET_PARSE_OPTIONS(${ARGV})
-  separate_arguments(ARGS_OPTIONS)
-
-  set(CMAKE_ROOT ${REPO_DIR})
-  if(NOT EXISTS ${REPO_DIR}/CMakeLists.txt)
-    set(CMAKE_ROOT ${REPO_DIR}/cmake)
-  endif()
-
-  if(NOT DEFINED ARGS_OPTIONS_FILE)
-    SET(ARGS_OPTIONS_FILE ${CGET_BIN_DIR}/load.cmake)
-  endif()
-
-  set(CMAKE_OPTIONS ${ARGS_OPTIONS}
-    -C${ARGS_OPTIONS_FILE}
-    -G${CMAKE_GENERATOR}
-    --no-warn-unused-cli
-    )
-
-  if (ARGS_PROXY)
-    list(APPEND CMAKE_OPTIONS -DCGET_REQUESTED_VERSION=${CGET_REQUESTED_VERSION})
-  endif()
-
-  if (NOT "${CMAKE_TOOLCHAIN_FILE}" STREQUAL "")
-    set(sub_toolchain_file ${CMAKE_TOOLCHAIN_FILE})
-    if (NOT IS_ABSOLUTE ${sub_toolchain_file})
-      set(sub_toolchain_file ${CGET_CORE_DIR}/${CMAKE_TOOLCHAIN_FILE})
-    endif ()
-    list(APPEND CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${sub_toolchain_file})
-  endif ()
-
-  if(DEFINED CMAKE_BUILD_TYPE)
-    FILE(MAKE_DIRECTORY "${RELEASE_BUILD_DIR}")
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} ${CMAKE_OPTIONS} ${CMAKE_ROOT} WORKING_DIRECTORY "${BUILD_DIR}")
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build . --target install --config ${CMAKE_BUILD_TYPE}               WORKING_DIRECTORY "${BUILD_DIR}")
-
-    if(RELEASE_BUILD_DIR)
-      # Some find configs only care about the release package, so build that too
-      CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release             ${CMAKE_OPTIONS} ${CMAKE_ROOT} WORKING_DIRECTORY "${RELEASE_BUILD_DIR}")
-      CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build . --target install --config Release                           WORKING_DIRECTORY "${RELEASE_BUILD_DIR}")
-    endif()
-  else()
-
-    # Set up the packages
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} ${CMAKE_OPTIONS} ${CMAKE_ROOT} WORKING_DIRECTORY ${BUILD_DIR})
-
-    # Do a build for reach configuration
-    CGET_MESSAGE(1 "Building ${CGET_BUILD_CONFIGS}")
-    foreach(configuration ${CGET_BUILD_CONFIGS})
-      CGET_MESSAGE(2 " ${CMAKE_COMMAND} --build . --target install --config ${configuration} WORKING_DIRECTORY ${BUILD_DIR}")
-      # Some builds define configuration types all their own, so we can't fail here if the config doesn't exist
-      EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build . --target install --config ${configuration} WORKING_DIRECTORY ${BUILD_DIR})
-    endforeach()
-  endif()
-endmacro()
-
-macro(CGET_BUILD_AUTOCONF name)
-  CGET_PARSE_OPTIONS(${ARGV})
-  separate_arguments(ARGS_OPTIONS)
-endmacro()
-
-function(CGET_FORCE_BUILD name)
-  CGET_PARSE_OPTIONS(${ARGV})
-
-  if (NOT ARGS_OPTIONS)
-    CGET_MESSAGE(1 "Building ${name}...")
-  else ()
-    CGET_MESSAGE(1 "Building ${name}... (With: '${ARGS_OPTIONS}')")
-  endif ()
-  set(CGET_${name}_BUILT 0)
-
-  file(MAKE_DIRECTORY ${BUILD_DIR})
-
-  if (EXISTS "${REPO_DIR}/include.cmake")
-    set(CGET_${name}_BUILT 1)
-  elseif (EXISTS ${REPO_DIR}/CMakeLists.txt OR EXISTS ${REPO_DIR}/cmake/CMakeLists.txt)
-    CGET_BUILD_CMAKE(${ARGV})
-    set(CGET_${name}_BUILT 1)
-  elseif (EXISTS ${REPO_DIR}/autogen.sh)
-    CGET_EXECUTE_PROCESS(COMMAND ./autogen.sh WORKING_DIRECTORY ${REPO_DIR})
-  endif ()
-
-  foreach (config_variant configure config)
-    if (NOT CGET_${name}_BUILT AND EXISTS ${REPO_DIR}/${config_variant})
-      STRING(REPLACE " " " " CGET_INSTALL_DIR_SAFE "${CGET_INSTALL_DIR}")
-      message("---> ${CGET_INSTALL_DIR_SAFE}")
-      CGET_EXECUTE_PROCESS(COMMAND ./${config_variant} --prefix="${CGET_INSTALL_DIR_SAFE}" ${ARGS_OPTIONS}
-        WORKING_DIRECTORY ${REPO_DIR})
-      CGET_EXECUTE_PROCESS(COMMAND make
-        WORKING_DIRECTORY ${REPO_DIR})
-      CGET_EXECUTE_PROCESS(COMMAND make install
-        WORKING_DIRECTORY ${REPO_DIR})
-      set(CGET_${name}_BUILT 1)
-    endif ()
-  endforeach ()
-
-  if (NOT CGET_${name}_BUILT)
-    message(FATAL_ERROR "Couldn't identify build system for ${name} in ${REPO_DIR}")
-  endif ()
-
-  CGET_NORMALIZE_CMAKE_FILES("${BUILD_DIR}" "Config.cmake" "config.cmake")
-  CGET_NORMALIZE_CMAKE_FILES("${BUILD_DIR}" "ConfigVersion.cmake" "config-version.cmake")
-endfunction(CGET_FORCE_BUILD)
-
-function(CGET_BUILD)
-  CGET_PARSE_OPTIONS(${ARGV})
-  CGET_FILE_CONTENTS("${BUILD_DIR}/.built" BUILD_CACHE_VAL)
-
-  if(NOT BUILD_CACHE_VAL STREQUAL Build_Hash)
-    CGET_MESSAGE(3 "Build out of date ${BUILD_CACHE_VAL} vs ${Build_Hash}")
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUILD_DIR}")
-    IF(DEFINED RELEASE_BUILD_DIR)
-      CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory "${RELEASE_BUILD_DIR}")
-    ENDIF()
-    CGET_FORCE_BUILD(${ARGV})
-    file(WRITE "${BUILD_DIR}/.built" "${Build_Hash}")
-  endif()
-endfunction()
-
-function(CGET_DIRECT_GET_PACKAGE name)
-  CGET_PARSE_OPTIONS(${ARGV})
-  CGET_MESSAGE(3 "CGET_DIRECT_GET_PACKAGE ${ARGV}")
-  CGET_MESSAGE(1 "Getting ${name}...")
-
-  set(GIT_SUBMODULE_OPTIONS "--recursive")
-  if (ARGS_NOSUBMODULES)
-    set(GIT_SUBMODULE_OPTIONS "")
-  endif ()
-
-  set(STAGING_DIR "${REPO_DIR}")
-
-  if (NOT EXISTS ${STAGING_DIR})
-    if (MSVC AND NUGET_PACKAGE)
-        CGET_NUGET_BUILD(${NUGET_PACKAGE})
-    elseif (ARGS_GIT)
-
-      if(NOT DEFINED ARGS_COMMIT_ID AND NOT DEFINED CHECKOUT_TAG)
-
-      endif()
-
-      SET(NO_VERSION_SPECIFIED OFF)
-      if ("" STREQUAL "${CHECKOUT_TAG}")
-        set(CHECKOUT_TAG "master")
-	if(NOT DEFINED ARGS_COMMIT_ID)
-	  SET(NO_VERSION_SPECIFIED ON)
-	endif()
-      endif ()
-
-      if(ARGS_COMMIT_ID)
-	set(_GIT_OPTIONS -n)
-      else()
-	set(_GIT_OPTIONS --progress --branch=${CHECKOUT_TAG} --depth=1)
-      endif()
-
-      CGET_EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} clone ${ARGS_GIT} ${STAGING_DIR} ${_GIT_OPTIONS} ${GIT_SUBMODULE_OPTIONS} OUTPUT_QUIET ERROR_QUIET)
-
-      if(ARGS_COMMIT_ID)
-	CGET_EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} checkout ${ARGS_COMMIT_ID}
-	  WORKING_DIRECTORY ${STAGING_DIR} OUTPUT_QUIET ERROR_QUIET )
-      endif()
-
-      if(NO_VERSION_SPECIFIED)
-	CGET_MESSAGE(2 "Warning: no repo version specified for ${name} (${ARGS_GIT}). It is recommended you set one. The current one is: ")
-	CGET_EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} log --oneline -n1 WORKING_DIRECTORY ${STAGING_DIR})
-      endif()
-
-      if(CGET_ORGANIZE_AS_SUBMODULES)
-	EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} submodule add ${STAGING_DIR} WORKING_DIRECTORY ${CGET_PACKAGE_DIR} OUTPUT_QUIET ERROR_QUIET )
-	CGET_EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} add -u WORKING_DIRECTORY ${CGET_PACKAGE_DIR})
-	EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} commit -m "Registered ${name}" WORKING_DIRECTORY ${CGET_PACKAGE_DIR} OUTPUT_QUIET ERROR_QUIET )
-      endif()
-
-    endif ()
-
-  endif ()
-endfunction()
-
-function(CGET_GET_PACKAGE)
-  CGET_MESSAGE(5 "CGET_GET_PACKAGE ${ARGV}")
-
-  CGET_PARSE_OPTIONS(${ARGV})
-  CGET_FILE_CONTENTS("${REPO_DIR}/.retrieved" REPO_CACHE_VAL)
-  if (NOT REPO_CACHE_VAL STREQUAL Repo_Hash)
-    CGET_MESSAGE(3 "Repo out of date ${REPO_CACHE_VAL} vs ${Repo_Hash}")
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory "${REPO_DIR}")
-    CGET_DIRECT_GET_PACKAGE(${ARGV})
-    file(WRITE "${REPO_DIR}/.retrieved" "${Repo_Hash}")
-  ENDIF ()
-
-  CGET_MESSAGE(5 "EXIT CGET_GET_PACKAGE ${ARGV}")
-endfunction()
-
-function(CGET_HAS_DEPENDENCY name)
-  CGET_PARSE_OPTIONS(${ARGV})
-  CGET_MESSAGE(5 "CGET_HAS_DEPENDENCY ${ARGV}")
-  CGET_MESSAGE(2 "Checking out ${name}(${CHECKOUT_TAG}) into ${REPO_DIR}, building in ${BUILD_DIR}" )
-
-  CGET_GET_PACKAGE(${ARGV})
-
-  CGET_FILE_CONTENTS("${BUILD_DIR}/.built" BUILD_CACHE_VAL)
-
-  if(EXISTS "${REPO_DIR}/include.cmake" )
-    set(ARGS_NO_FIND_PACKAGE ON)
-    CGET_MESSAGE(3 "Including ${REPO_DIR}/include.cmake")
-    include("${REPO_DIR}/include.cmake")
-  elseif(NOT BUILD_CACHE_VAL STREQUAL Build_Hash)
-    CGET_MESSAGE(3 "Build out of date ${BUILD_CACHE_VAL} vs ${Build_Hash}")
-    CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory "${BUILD_DIR}")
-    IF(DEFINED RELEASE_BUILD_DIR)
-      CGET_EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory "${RELEASE_BUILD_DIR}")
-    ENDIF()
-    CGET_BUILD(${ARGV})
-    file(WRITE "${BUILD_DIR}/.built" "${Build_Hash}")
-  endif ()
-
-  if(NOT ARGS_FINDNAME)
-    set(ARGS_FINDNAME "${name}")
-  endif()
-
-  if (NOT ARGS_NO_FIND_PACKAGE)
-    CGET_MESSAGE(3 "Finding ${name} with ${ARGS_CMAKE_VERSION} ${ARGS_FIND_OPTIONS} in ${CMAKE_PREFIX_PATH} ${CMAKE_LIBRARY_PATH} ${CMAKE_INCLUDE_PATH}")
-    find_package(${ARGS_FINDNAME} ${ARGS_CMAKE_VERSION} REQUIRED ${ARGS_FIND_OPTIONS}  )
-
-    IF (${${ARGS_FINDNAME}_FOUND})
-      CGET_MESSAGE(1 "Found ${name} ${ARGS_CMAKE_VERSION}")
-    ENDIF ()
-  endif ()
-  CGET_MESSAGE(5 "EXIT CGET_HAS_DEPENDENCY ${ARGV}")
-endfunction(CGET_HAS_DEPENDENCY)
-


cmake-modules:
+ [FindThirdPartyEmotivAPI.cmake] added paths for the 1.0.0.5 version of the Emotiv API

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

--- trunk/cmake-modules/FindThirdPartyEmotivAPI.cmake
+++ trunk/cmake-modules/FindThirdPartyEmotivAPI.cmake
@@ -7,12 +7,14 @@
 # edkErrorCode.h EmoStateDLL.h
 	#FIND_PATH(PATH_EmotivAPI edk.h  PATHS "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"  "C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" "C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM" "C:/Program Files (x86)/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
 	FIND_PATH(PATH_EmotivAPI edk.h  PATHS
-		"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"
+		"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM"
 		"C:/Program Files/Emotiv Development Kit_v1.0.0.3-PREMIUM/doc/examples/include"
 		"C:\Program Files\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM"
 		"C:\Program Files\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include"
 		"C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM"
-		"C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
+		"C:\Program Files (x86)\Emotiv Research Edition SDK_v1.0.0.4-PREMIUM/doc/examples/include"
+		"C:/Program Files/Emotiv Research Edition SDK_v1.0.0.5-PREMIUM"
+		"C:/Program Files/Emotiv Research Edition SDK_v1.0.0.5-PREMIUM/doc/examples/include" $ENV{OpenViBE_dependencies})
 	IF(PATH_EmotivAPI)
 		MESSAGE(STATUS "  Found Emotiv API...")
 		INCLUDE_DIRECTORIES(${PATH_EmotivAPI})


Use Requires.private instead of Requires, patch by Rex Dieter

--- libmusicbrainz3.pc.cmake
+++ libmusicbrainz3.pc.cmake
@@ -7,7 +7,7 @@
 Description: The Musicbrainz Client Library.
 URL: http://musicbrainz.org/doc/libmusicbrainz
 Version: ${PROJECT_VERSION}
-Requires: neon >= 0.25, libdiscid
+Requires.private: neon >= 0.25, libdiscid
 Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz3
 Cflags: -I${INCLUDE_INSTALL_DIR}


Remove requirement for libdiscid from pkgconfig

git-svn-id: 95f3c568a8d713c8a134cac44d96183059969c76@13255 b0b80210-5d09-0410-99dd-b4bd03f891c0

--- libmusicbrainz4.pc.cmake
+++ libmusicbrainz4.pc.cmake
@@ -7,7 +7,7 @@
 Description: The Musicbrainz Client Library.
 URL: http://musicbrainz.org/doc/libmusicbrainz
 Version: ${PROJECT_VERSION}
-Requires.private: neon >= 0.25, libdiscid
+Requires.private: neon >= 0.25
 Libs: -L${LIB_INSTALL_DIR} -lmusicbrainz4
 Cflags: -I${INCLUDE_INSTALL_DIR}


cake pkg registry loading: fix misplaced include()

--- Modules/private/CakePkgRegistries.cmake
+++ Modules/private/CakePkgRegistries.cmake
@@ -24,10 +24,8 @@
           file(DOWNLOAD "${r}" "${filename}" SHOW_PROGRESS)
         endif()
       endif()
-    endforeach()
-
-    include("${filename}")
-
+      include("${filename}")
+    endforeach()
   endfunction()

-endif()+endif()


Update a reference to buildsettings.h

Update a reference to buildsettings.h

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -149,7 +149,7 @@

   # determine configuration settings
   set(OGRE_CONFIG_HEADERS
-    ${OGRE_CONFIG_INCLUDE_DIR}/buildsettings.h
+    ${OGRE_CONFIG_INCLUDE_DIR}/OgreBuildSettings.h
     ${OGRE_CONFIG_INCLUDE_DIR}/config.h
     ${OGRE_CONFIG_INCLUDE_DIR}/OgreConfig.h
   )


Update test data.

Update test data.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 2ec7124c) # first 8 characters of hash-tag
+  set(revision_tag 714a1d64) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


MITK-Data file was wrongly merged.

MITK-Data file was wrongly merged.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,14 +13,14 @@

 IF(BUILD_TESTING)

-  SET(revision_tag 9cb5f967fde0dece1835e51bf173510bea58da18)
-  IF(${proj}_REVISION_TAG)
-    SET(revision_tag ${${proj}_REVISION_TAG})
-  ENDIF()
-
+  SET(revision_tag 9cb5f967)
+  #IF(${proj}_REVISION_TAG)
+  #  SET(revision_tag ${${proj}_REVISION_TAG})
+  #ENDIF()
+
   ExternalProject_Add(${proj}
-    GIT_REPOSITORY http://git.mitk.org/MITK-Data.git
-    GIT_TAG ${revision_tag}
+    URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MITK-Data_${revision_tag}.tar.gz
+    URL_MD5 f0e1128618c59f7f69f9c79c9673b51b
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""


Fixed KLAMPT_INCLUDE to point to Cpp directory [ci skip]

--- CMakeModules/FindKlampt.cmake
+++ CMakeModules/FindKlampt.cmake
@@ -17,7 +17,7 @@

 FIND_PATH(KLAMPT_INCLUDE_DIR
 	Simulation/ODESimulator.h
-PATHS /usr/include/ /usr/include/Klampt /usr/local/include/Klampt ${KLAMPT_ROOT}
+PATHS /usr/include/ /usr/include/Klampt /usr/local/include/Klampt ${KLAMPT_ROOT}/Cpp
 DOC "Directory where Klamp't header files are stored" )


Updated FindMagnum.cmake from Magnum repository.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -15,14 +15,17 @@
 # components. The base library depends on Corrade, OpenGL and GLEW
 # libraries. Additional dependencies are specified by the components. The
 # optional components are:
+#  DebugTools    - DebugTools library (depends on MeshTools, Physics,
+#                  Primitives, SceneGraph and Shaders components)
 #  MeshTools     - MeshTools library
-#  Physics       - Physics library (depends on Primitives, SceneGraph and
-#                  Shaders components)
+#  Physics       - Physics library
 #  Primitives    - Library with stock geometric primitives (static)
 #  SceneGraph    - Scene graph library
 #  Shaders       - Library with stock shaders
 #  GlxApplication - GLX application (depends on X11 libraries)
 #  XEglApplication - X/EGL application (depends on EGL and X11 libraries)
+#  WindowlessGlxApplication - Windowless GLX application (depends on X11
+#   libraries)
 #  GlutApplication - GLUT application (depends on GLUT library)
 #  Sdl2Application - SDL2 application (depends on SDL2 library)
 #  NaClApplication - NaCl application (only if targetting Google Chrome
@@ -152,6 +155,21 @@
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()
         endif()
+
+        # Windowless GLX application dependencies
+        if(${component} STREQUAL WindowlessGlxApplication)
+            find_package(X11)
+            if(X11_FOUND)
+                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${X11_LIBRARIES} ${_WINDOWCONTEXT_MAGNUM_LIBRARY_DEPENDENCY})
+            else()
+                unset(MAGNUM_${_COMPONENT}_LIBRARY)
+            endif()
+        endif()
+    endif()
+
+    # DebugTools library
+    if(${component} STREQUAL DebugTools)
+        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Profiler.h)
     endif()

     # Mesh tools library


modules: update FindBullet with USE_DOUBLE_PRECISION correctly propagated.

--- modules/FindBullet.cmake
+++ modules/FindBullet.cmake
@@ -106,33 +106,44 @@
                 INTERFACE_LINK_LIBRARIES Bullet${_library})
         endif()
     endforeach()
-    # Why, Bullet, why?
+
+    # Bullet3Common doesn't have an INTERFACE_INCLUDE_DIRECTORIES property as
+    # bullet only uses include_directories(), not the target_*() variant. This
+    # means that linking to any of the targets will not drag along any include
+    # directory, which we have to fix -- and since everything depends on
+    # LinearMath, we can add it just for that target.
+    #
+    # In case of a CMake subproject, we derive the include directory from the
+    # target SOURCE_DIR.
+    #
+    # In case of Vcpkg, SOURCE_DIR is likely meaningless, but because the Vcpkg
+    # package uses a patched config file, we can use BULLET_INCLUDE_DIR.
+    if(BULLET_INCLUDE_DIR)
+        set(_BULLET_INTERFACE_INCLUDE_DIRECTORIES ${BULLET_INCLUDE_DIR})
+    else()
+        get_target_property(_BULLET_INTERFACE_INCLUDE_DIRECTORIES BulletCollision SOURCE_DIR)
+        get_filename_component(_BULLET_INTERFACE_INCLUDE_DIRECTORIES ${_BULLET_INTERFACE_INCLUDE_DIRECTORIES} DIRECTORY)
+    endif()
+
+    # Compile definitions, which is basically just USE_DOUBLE_PRECISION. If
+    # Bullet was found externally, this is contained in the BULLET_DEFINITIONS
+    # variable (which might be empty). If the variable isn't defined, it means
+    # we have a Bullet subproject. OF COURSE this isn't propagated in
+    # INTERFACE_COMPILE_DEFINITIONS, we can't expect any modicum of usability
+    # there, so we have to fetch that from the CMake option instead.
+    if(NOT DEFINED BULLET_DEFINITIONS AND USE_DOUBLE_PRECISION)
+        set(BULLET_DEFINITIONS "-DBT_USE_DOUBLE_PRECISION")
+    endif()
+
+    # Why, Bullet, why this library has to have such a different name?
     if(NOT TARGET Bullet::LinearMath)
         # Aliases of (global) targets [..] CMake 3.11 [...], as above
         add_library(Bullet::LinearMath INTERFACE IMPORTED)
         set_target_properties(Bullet::LinearMath PROPERTIES
-            INTERFACE_LINK_LIBRARIES LinearMath)
-
-        # Bullet3Common doesn't have an INTERFACE_INCLUDE_DIRECTORIES property
-        # as bullet only uses include_directories(), not the target_*()
-        # variant. This means that linking to any of the targets will not drag
-        # along any include directory, which we have to fix -- and since
-        # everything depends on LinearMath, we can add it just for that target.
-        #
-        # In case of a CMake subproject, we derive the include directory from
-        # the target SOURCE_DIR.
-        #
-        # In case of Vcpkg, SOURCE_DIR is likely meaningless, but because the
-        # Vcpkg package uses a patched config file, we can use
-        # BULLET_INCLUDE_DIR instead.
-        if(BULLET_INCLUDE_DIR)
-            set(_BULLET_INTERFACE_INCLUDE_DIRECTORIES ${BULLET_INCLUDE_DIR})
-        else()
-            get_target_property(_BULLET_INTERFACE_INCLUDE_DIRECTORIES BulletCollision SOURCE_DIR)
-            get_filename_component(_BULLET_INTERFACE_INCLUDE_DIRECTORIES ${_BULLET_INTERFACE_INCLUDE_DIRECTORIES} DIRECTORY)
-        endif()
-        set_target_properties(Bullet::LinearMath PROPERTIES
-            INTERFACE_INCLUDE_DIRECTORIES ${_BULLET_INTERFACE_INCLUDE_DIRECTORIES})
+            INTERFACE_LINK_LIBRARIES LinearMath
+            INTERFACE_INCLUDE_DIRECTORIES ${_BULLET_INTERFACE_INCLUDE_DIRECTORIES}
+            # This might define BT_USE_DOUBLE_PRECISION, or not
+            INTERFACE_COMPILE_OPTIONS "${BULLET_DEFINITIONS}")
     endif()

     # Just to make FPHSA print some meaningful location, nothing else. Luckily


COMP: start DataTreeNodeFactoryTest with command line argument

--- Core/Code/Testing/files.cmake
+++ Core/Code/Testing/files.cmake
@@ -4,7 +4,6 @@
   mitkPointSetWriterTest.cpp
   mitkMaterialPropertyTest.cpp
   mitkDataTreeNodeTest.cpp
-  mitkDataTreeNodeFactoryTest.cpp
   mitkActionTest.cpp
   mitkDataStorageTest.cpp
   mitkEnumerationPropertyTest.cpp
@@ -59,6 +58,7 @@
   mitkImageTimeSelectorTest.cpp
   mitkPicFileReaderTest.cpp
   # mitkVtkPropRendererTest.cpp
+  mitkDataTreeNodeFactoryTest.cpp
 )

 # list of images for which the tests are run


cleaned up (removed files from cmake which are not in the core any more)

--- Core/Code/Testing/files.cmake
+++ Core/Code/Testing/files.cmake
@@ -106,8 +106,6 @@
 )

 set(MODULE_CUSTOM_TESTS
-    #mitkLabeledImageToSurfaceFilterTest.cpp
-    #mitkExternalToolsTest.cpp
     mitkDataStorageTest.cpp
     mitkDataNodeTest.cpp
     mitkDicomSeriesReaderTest.cpp


added path to pmw3901 driver for fmu-v4pro cmake file

--- cmake/configs/nuttx_px4fmu-v4pro_default.cmake
+++ cmake/configs/nuttx_px4fmu-v4pro_default.cmake
@@ -25,6 +25,7 @@
 	drivers/imu/mpu6000
 	drivers/imu/mpu9250
 	drivers/oreoled
+	drivers/pmw3901
 	drivers/pwm_input
 	drivers/pwm_out_sim
 	drivers/px4flow


[t:4814] remove --run-libc-freeres=no because I fixed how things were getting linked, apparently, and don't need that anymore (it was generating false valgrind failures)

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43312 c7de825b-a66e-492c-adef-691d508d4ae1

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,4 +1,4 @@
 if(BUILD_TESTING)
-  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --num-callers=20 --leak-check=full --show-reachable=yes --run-libc-freeres=no --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown" CACHE INTERNAL "options for valgrind")
+  set(MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=no --num-callers=20 --leak-check=full --show-reachable=yes --trace-children=yes --trace-children-skip=sh,*/sh,basename,*/basename,dirname,*/dirname,rm,*/rm,cp,*/cp,mv,*/mv,cat,*/cat,diff,*/diff,test,*/tokudb_dump* --trace-children-skip-by-arg=--only_create,--test,--no-shutdown" CACHE INTERNAL "options for valgrind")
   set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_BINARY_DIR}/valgrind.suppressions" CACHE INTERNAL "suppressions file for valgrind")
 endif()


Addressing small bugfixes

Addressing small bugfixes

Forgot to have add_nodejs_module link to internal libraries by default.
Also making libc++ usage optional on all but OSX where it is required.

--- FindNodeJS.cmake
+++ FindNodeJS.cmake
@@ -24,6 +24,12 @@

 # Allow users to force archive extraction
 option(NodeJS_FORCE_EXTRACT "Extract the archive every time" Off)
+
+# Make libc++ the default when compiling with clang
+option(NodeJS_USE_CLANG_STDLIB "Use libc++ when compiling with clang" On)
+if(APPLE)
+    set(NodeJS_USE_CLANG_STDLIB On CACHE BOOL "" FORCE)
+endif()

 if(WIN32)
     # Allow users to specify that the executable should be downloaded
@@ -399,8 +405,8 @@
     list(APPEND NodeJS_LINK_FLAGS "-undefined dynamic_lookup")
 endif()

-# Use libc++ when clang is the compiler
-if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang.*")
+# Use libc++ when clang is the compiler by default
+if(NodeJS_USE_CLANG_STDLIB AND CMAKE_CXX_COMPILER_ID MATCHES ".*Clang.*")
     list(APPEND NodeJS_COMPILE_OPTIONS -stdlib=libc++)
 endif()

@@ -473,7 +479,12 @@
         )
     endif()

+    # Set any required complier flags
+    # Mostly used under windows
     target_compile_definitions(${NAME} PRIVATE ${NodeJS_DEFINITIONS})
+
+    # Link against required NodeJS libraries
+    target_link_libraries(${NAME} ${NodeJS_LIBRARIES})
 endfunction()

 # Write out the configuration for node scripts


Add module dependencies, cleanups & documentation

--- GNUModules.cmake
+++ GNUModules.cmake
@@ -1,18 +1,39 @@

-# Copyright (c) 2012 Daniel Nachbaur <daniel.nachbaur@epfl.ch>
+# Copyright (c) 2012-2013 Daniel Nachbaur <daniel.nachbaur@epfl.ch>

 # Offers a target named 'module' to create a GNU module
-# (http://modules.sourceforge.net/) from your software.
+# (http://modules.sourceforge.net/) of your software.
 #
 # The GNUModules.cmake is supposed to be included after Common.cmake,
 # CPackConfig.cmake and all targets to gather required variables from
 # them.
+#
+# Following variables you can change to override defaults:
+# - MODULE_ENV: default setup is:
+#                 setenv ${UPPER_PROJECT_NAME}_INCLUDE_DIR  $root/include
+#                 setenv ${UPPER_PROJECT_NAME}_ROOT         $root
+#                 prepend-path PATH            $root/bin
+#                 prepend-path LD_LIBRARY_PATH $root/lib
+#                 prepend-path PYTHONPATH      $root/${PYTHON_LIBRARY_PREFIX}
+#
+# - MODULE_SW_BASEDIR: the directory for the module's binaries on a machine.
+#                      default /usr/share/Modules
+#
+# - MODULE_SW_CLASS: the category/subdirectory inside the basedir for this software.
+#                    default ${CPACK_PACKAGE_VENDOR}
+#
+# - MODULE_MODULEFILES: the directory for the modulefiles.
+#                       default /usr/share/Modules/modulefiles
+#
+# - MODULE_WHATIS: the whatis description of the module.
+#                  default ${CMAKE_PROJECT_NAME} version ${VERSION}
+#
+# - MODULE_DEPENDENCIES: list of dependend modules with format:
+#                        ${CPACK_PROJECT_NAME}/${VERSION_MAJOR}.${VERSION_MINOR}

 if(MSVC)
   return()
 endif()
-
-# The following variables have to set before including GNUModules.cmake:

 # Need variables defined by (Common)CPackConfig
 if(NOT CPACK_PROJECT_NAME OR NOT CPACK_PACKAGE_VENDOR OR NOT VERSION OR
@@ -20,23 +41,19 @@
   message(FATAL_ERROR "Need CommonCPack before GNUModule")
 endif()

-# Specify the environment for your software that the module should setup
-# Example:
-#   set(MODULE_ENV "
-#   setenv         FOO_INCLUDE_DIR  $root/include
-#   setenv         FOO_ROOT         $root
-#   prepend-path   PATH             $root/bin
-#   prepend-path   LD_LIBRARY_PATH  $root/lib")
 if(NOT MODULE_ENV)
   string(TOUPPER ${CMAKE_PROJECT_NAME} UPPER_PROJECT_NAME)
-  set(MODULE_ENV "
-  setenv         ${UPPER_PROJECT_NAME}_INCLUDE_DIR  $root/include
-  setenv         ${UPPER_PROJECT_NAME}_ROOT         $root
-  prepend-path    PATH             $root/bin
-  prepend-path    LD_LIBRARY_PATH  $root/lib")
+  set(MODULE_ENV
+    "setenv ${UPPER_PROJECT_NAME}_INCLUDE_DIR  $root/include\n"
+    "setenv ${UPPER_PROJECT_NAME}_ROOT         $root\n\n"
+    "prepend-path PATH            $root/bin\n"
+    "prepend-path LD_LIBRARY_PATH $root/lib\n")
+  if(PYTHON_LIBRARY_PREFIX)
+    list(APPEND MODULE_ENV
+      "prepend-path PYTHONPATH      $root/${PYTHON_LIBRARY_PREFIX}\n")
+  endif()
 endif()

-# the base directory containing all modules on a machine
 if(NOT MODULE_SW_BASEDIR)
   set(MODULE_SW_BASEDIR $ENV{MODULE_SW_BASEDIR})
 endif()
@@ -44,7 +61,6 @@
   set(MODULE_SW_BASEDIR "/usr/share/Modules")
 endif()

-# the category/subdirectory inside the basedir for this software
 if(NOT MODULE_SW_CLASS)
   set(MODULE_SW_CLASS ${CPACK_PACKAGE_VENDOR})
 endif()
@@ -52,9 +68,12 @@
   string(REGEX REPLACE "^http://(.*)" "\\1" MODULE_SW_CLASS ${MODULE_SW_CLASS})
 endif()

-# path in MODULE_SW_BASEDIR to modulefiles
 if(NOT MODULE_MODULEFILES)
-  set(MODULE_MODULEFILES "modulefiles")
+  set(MODULE_MODULEFILES "/usr/share/Modules/modulefiles")
+endif()
+
+if(NOT MODULE_WHATIS)
+  set(MODULE_WHATIS "${CMAKE_PROJECT_NAME} version ${VERSION}")
 endif()

@@ -76,13 +95,24 @@
 elseif(APPLE)
   set(MODULE_PLATFORM "darwin${CMAKE_SYSTEM_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
 else()
-  message(STATUS "Unsupported platform for GNUModules, please add support here")
+  message(WARNING "Unsupported platform for GNUModules, please add support here")
   return()
 endif()
 set(MODULE_COMPILER "${MODULE_COMPILER_NAME}${MODULE_COMPILER_VERSION}")
 set(MODULE_ARCHITECTURE "$platform/$compiler")
 set(MODULE_ROOT "$sw_basedir/$sw_class/$package_name/$version/$architecture")
 set(MODULE_FILENAME "${MODULE_PACKAGE_NAME}/${MODULE_VERSION}-${MODULE_PLATFORM}-${MODULE_COMPILER}")
+
+# Load dependend modules if any
+if(MODULE_DEPENDENCIES)
+  foreach(MODULE_DEP ${MODULE_DEPENDENCIES})
+    list(INSERT MODULE_ENV 0
+      "module load ${MODULE_DEP}-${MODULE_PLATFORM}-${MODULE_COMPILER}\n"
+      "prereq      ${MODULE_DEP}-${MODULE_PLATFORM}-${MODULE_COMPILER}\n\n")
+  endforeach()
+endif()
+
+string(REGEX REPLACE ";" "" MODULE_ENV ${MODULE_ENV})

 file(WRITE ${CMAKE_BINARY_DIR}/${MODULE_FILENAME}
   "#%Module1.0\n"
@@ -93,18 +123,16 @@
   "#\n"
   "\n"
   "# Set internal variables\n"
-  "set             sw_basedir      \"${MODULE_SW_BASEDIR}\"\n"
-  "set             sw_class        \"${MODULE_SW_CLASS}\"\n"
+  "set sw_basedir   \"${MODULE_SW_BASEDIR}\"\n"
+  "set sw_class     \"${MODULE_SW_CLASS}\"\n"
+  "set package_name \"${MODULE_PACKAGE_NAME}\"\n"
+  "set version      \"${MODULE_VERSION}\"\n"
+  "set platform     \"${MODULE_PLATFORM}\"\n"
+  "set compiler     \"${MODULE_COMPILER}\"\n"
+  "set architecture \"${MODULE_ARCHITECTURE}\"\n"
+  "set root         \"${MODULE_ROOT}\"\n"
   "\n"
-  "set             package_name    \"${MODULE_PACKAGE_NAME}\"\n"
-  "set             version         \"${MODULE_VERSION}\"\n"
-  "set             platform        \"${MODULE_PLATFORM}\"\n"
-  "set             compiler        \"${MODULE_COMPILER}\"\n"
-  "set             architecture    \"${MODULE_ARCHITECTURE}\"\n"
-  "\n"
-  "set             root            \"${MODULE_ROOT}\"\n"
-  "\n"
-  "module-whatis   \"Loads the environment for $package_name\"\n"
+  "module-whatis \"${MODULE_WHATIS}\"\n"
   "\n"
   "proc ModulesHelp { } {\n"
   "    global package_name version architecture\n"
@@ -116,7 +144,6 @@
   "Type 'module avail' to list all the availables ones.\"\n"
   "}\n"
   "\n"
-  "# Update PATH environment:\n"
   "${MODULE_ENV}\n"
   "\n"
 )
@@ -128,7 +155,7 @@
   COMMENT "Installing GNU module source at ${MODULE_SRC_INSTALL}" VERBATIM
   DEPENDS ${ALL_DEP_TARGETS})

-set(MODULE_FILE_INSTALL "${MODULE_SW_BASEDIR}/${MODULE_MODULEFILES}")
+set(MODULE_FILE_INSTALL ${MODULE_MODULEFILES})
 add_custom_target(module
   ${CMAKE_COMMAND} -E copy ${MODULE_FILENAME} ${MODULE_FILE_INSTALL}/${MODULE_FILENAME}
   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}


Use sysconfig directly to determine python lib dir (#378)

The distutils package is deprecated and will be removed in Python 3.12.
We can achieve the same behavior using sysconfig directly.

Signed-off-by: Scott K Logan <8c724d14625be4be480086a9212b212477a303ef@cottsay.net>

--- ament_cmake_python/ament_cmake_python-extras.cmake
+++ ament_cmake_python/ament_cmake_python-extras.cmake
@@ -44,9 +44,9 @@
   if(NOT DEFINED PYTHON_INSTALL_DIR)
     # avoid storing backslash in cached variable since CMake will interpret it as escape character
     set(_python_code
-      "from distutils.sysconfig import get_python_lib"
       "import os"
-      "print(os.path.relpath(get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}'), start='${CMAKE_INSTALL_PREFIX}').replace(os.sep, '/'))"
+      "import sysconfig"
+      "print(os.path.relpath(sysconfig.get_path('purelib', vars={'base': '${CMAKE_INSTALL_PREFIX}'}), start='${CMAKE_INSTALL_PREFIX}').replace(os.sep, '/'))"
     )
     get_executable_path(_python_interpreter Python3::Interpreter CONFIGURE)
     execute_process(


cmake: do not add_plugintest if plugin is not available

--- cmake/Modules/LibAddPlugin.cmake
+++ cmake/Modules/LibAddPlugin.cmake
@@ -52,6 +52,9 @@
 						"Trying to add plugintest ${testname} but no such plugin was added (try to use LINK_PLUGIN)"
 					)
 			endif ()
+			# plugin for test was not added in previous phase or removed
+			# because of missing deps, exit quietly
+			return ()
 		endif ()

 		set (PLUGIN_NAME elektra-${testname})


add feature: refine find protobuf cmake

add feature: refine find protobuf cmake

--- cmake/modules/FindProtobuf.cmake
+++ cmake/modules/FindProtobuf.cmake
@@ -3,12 +3,6 @@
 set(Protobuf_ROOT_DIR ${PROJECT_SOURCE_DIR}/third_party/protobuf CACHE PATH "Folder contains Google Protobuf")

 set(Protobuf_DIR ${Protobuf_ROOT_DIR} /usr /usr/local)
-
-find_program(Protoc_EXECUTABLE
-             NAMES protoc
-             PATHS ${Protobuf_DIR}
-             PATH_SUFFIXES bin
-             NO_DEFAULT_PATH)

 find_path(Protobuf_INCLUDE_DIRS
           NAMES google/protobuf/message.h
@@ -22,22 +16,20 @@
              PATH_SUFFIXES lib lib64 lib/x86_64 lib/x86_64-linux-gnu lib/x64 lib/x86
              NO_DEFAULT_PATH)

+find_program(Protoc_EXECUTABLE
+             NAMES protoc
+             PATHS ${Protobuf_DIR}
+             PATH_SUFFIXES bin
+             NO_DEFAULT_PATH)
+
 find_package_handle_standard_args(Protobuf DEFAULT_MSG Protobuf_INCLUDE_DIRS Protobuf_LIBRARIES Protoc_EXECUTABLE)

 if (Protobuf_FOUND)
-  set(Protobuf_VERSION "")
-  set(Protobuf_LIB_VERSION "")
-  set(PROTOBUF_COMMON_FILE ${Protobuf_INCLUDE_DIRS}/google/protobuf/stubs/common.h)
-  file(STRINGS ${PROTOBUF_COMMON_FILE}
-       PROTOBUF_COMMON_H_CONTENTS
-       REGEX "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+")
-  if (PROTOBUF_COMMON_H_CONTENTS MATCHES "#define[ \t]+GOOGLE_PROTOBUF_VERSION[ \t]+([0-9]+)")
-    set(Protobuf_LIB_VERSION "${CMAKE_MATCH_1}")
-  endif ()
-  unset(PROTOBUF_COMMON_H_CONTENTS)
-  math(EXPR PROTOBUF_MAJOR_VERSION "${Protobuf_LIB_VERSION} / 1000000")
-  math(EXPR PROTOBUF_MINOR_VERSION "${Protobuf_LIB_VERSION} / 1000 % 1000")
-  math(EXPR PROTOBUF_SUBMINOR_VERSION "${Protobuf_LIB_VERSION} % 1000")
+  parse_header(${Protobuf_INCLUDE_DIRS}/google/protobuf/stubs/common.h
+               GOOGLE_PROTOBUF_VERSION)
+  math(EXPR PROTOBUF_MAJOR_VERSION "${GOOGLE_PROTOBUF_VERSION} / 1000000")
+  math(EXPR PROTOBUF_MINOR_VERSION "${GOOGLE_PROTOBUF_VERSION} / 1000 % 1000")
+  math(EXPR PROTOBUF_SUBMINOR_VERSION "${GOOGLE_PROTOBUF_VERSION} % 1000")
   set(Protobuf_VERSION "${PROTOBUF_MAJOR_VERSION}.${PROTOBUF_MINOR_VERSION}.${PROTOBUF_SUBMINOR_VERSION}")
   execute_process(COMMAND ${Protoc_EXECUTABLE} --version OUTPUT_VARIABLE Protoc_VERSION)
   if ("${Protoc_VERSION}" MATCHES "libprotoc ([0-9.]+)")
@@ -50,7 +42,7 @@
     message(STATUS "Found Protobuf: ${Protobuf_INCLUDE_DIRS}, ${Protobuf_LIBRARIES} (found version ${Protobuf_VERSION})")
     message(STATUS "Found Protoc: ${Protoc_EXECUTABLE} (found version ${Protoc_VERSION})")
   endif ()
-  mark_as_advanced(Protobuf_ROOT_DIR Protobuf_INCLUDE_DIRS Protobuf_LIBRARIES Protobuf_LIBRARIES_RELEASE Protobuf_LIBRARIES_DEBUG Protoc_EXECUTABLE)
+  mark_as_advanced(Protobuf_ROOT_DIR Protobuf_INCLUDE_DIRS Protobuf_LIBRARIES Protoc_EXECUTABLE)
 else ()
   if (Protobuf_FIND_REQUIRED)
     message(FATAL_ERROR "Could not find Protobuf")


Update ITK External superbuild to ITK 4.7rc01

Change-Id: Ifa68bb87828e658cd0a0412a11db8f9c40fb5549

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.6.1 )
+set(ITK_TAG_COMMAND GIT_TAG v4.7rc01 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )
@@ -89,5 +89,5 @@

 ExternalProject_Get_Property(ITK install_dir)
-set(ITK_DIR "${install_dir}/lib/cmake/ITK-4.6" )
-set(WrapITK_DIR "${install_dir}/lib/cmake/ITK-4.6/WrapITK")
+set(ITK_DIR "${install_dir}/lib/cmake/ITK-4.7" )
+set(WrapITK_DIR "${install_dir}/lib/cmake/ITK-4.7/WrapITK")


Update ITK superbuild version to 4.12rc2

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -45,7 +45,7 @@
 endif()

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.12rc01) # v4.12 Release Candidate
+set(ITK_TAG_COMMAND GIT_TAG v4.12rc02) # v4.12 Release Candidate

 if( ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


Detect additional libraries.

Detect additional libraries.

--- salome_adm/cmake_files/FindGraphviz.cmake
+++ salome_adm/cmake_files/FindGraphviz.cmake
@@ -34,8 +34,22 @@
 FIND_PATH(GRAPHVIZ_INCLUDE_DIR NAMES graphviz/graph.h)
 SET(GRAPHVIZ_INCLUDE_DIR ${GRAPHVIZ_INCLUDE_DIR}/graphviz)

-FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY NAMES graph)
-SET(GRAPHVIZ_LIBRARIES ${GRAPHVIZ_graph_LIBRARY})
+FIND_LIBRARY(GRAPHVIZ_cdt_LIBRARY      NAMES cdt)
+FIND_LIBRARY(GRAPHVIZ_cgraph_LIBRARY   NAMES cgraph)
+FIND_LIBRARY(GRAPHVIZ_graph_LIBRARY    NAMES graph)
+FIND_LIBRARY(GRAPHVIZ_gvc_LIBRARY      NAMES gvc)
+FIND_LIBRARY(GRAPHVIZ_gvpr_LIBRARY     NAMES gvpr)
+FIND_LIBRARY(GRAPHVIZ_pathplan_LIBRARY NAMES pathplan)
+FIND_LIBRARY(GRAPHVIZ_xdot_LIBRARY     NAMES xdot)
+SET(GRAPHVIZ_LIBRARIES
+  ${GRAPHVIZ_cdt_LIBRARY}
+  ${GRAPHVIZ_cgraph_LIBRARY}
+  ${GRAPHVIZ_graph_LIBRARY}
+  ${GRAPHVIZ_gvc_LIBRARY}
+  ${GRAPHVIZ_gvpr_LIBRARY}
+  ${GRAPHVIZ_pathplan_LIBRARY}
+  ${GRAPHVIZ_xdot_LIBRARY}
+  )

 # Handle the standard arguments of the find_package() command:
 INCLUDE(FindPackageHandleStandardArgs)


COMP: Make FindDCMTK more verbose

COMP: Make FindDCMTK more verbose

It will display the following text:

-- Trying to find DCMTK expecting DCMTKConfig.cmake
-- Trying to find DCMTK expecting DCMTKConfig.cmake - failed
-- Trying to find DCMTK relying on FindDCMTK.cmake
-- Trying to find DCMTK relying on FindDCMTK.cmake - ok

--- Utilities/CMake/FindDCMTK.cmake
+++ Utilities/CMake/FindDCMTK.cmake
@@ -38,12 +38,18 @@

 #
 # First, try to use NO_MODULE
+message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
 find_package(DCMTK QUIET NO_MODULE)
 if(DCMTK_FOUND
     AND NOT "x" STREQUAL "x${DCMTK_LIBRARIES}"
     AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}")
+  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok")
   return()
-endif()
+else()
+  message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
+endif()
+
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")

 # Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
 set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH "The directory containing a CMake configuration file for DCMTK." FORCE)
@@ -223,3 +229,5 @@
   REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
   FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")

+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
+


libbluray: disable UDF support

libbluray: disable UDF support

This code uses some POSIX extensions that are not available with
MinGW, so disable it for now.

--- packages/libbluray.cmake
+++ packages/libbluray.cmake
@@ -9,6 +9,7 @@
         --disable-examples
         --disable-doxygen-doc
         --disable-bdjava
+        --disable-udf
         --without-libxml2
         --without-fontconfig
     BUILD_COMMAND ${MAKE}


ENH: swtching (testing) to ITK 4.0.0

ENH: swtching (testing) to ITK 4.0.0

--- Testing/Dashboard/pxDashboard_LKEB_linux64_gcc.cmake
+++ Testing/Dashboard/pxDashboard_LKEB_linux64_gcc.cmake
@@ -13,7 +13,7 @@
 #
 # Setup: Linux 64bit, Ubuntu 2.6.32-25-server
 # gcc 4.4.3
-# Debug mode, ITK git, code coverage by gcov
+# Debug mode, ITK 4.0.0, code coverage by gcov
 # PC: LKEB (MS), goliath

 # Client maintainer: m.staring@lumc.nl
@@ -45,7 +45,7 @@
 # Dashboard settings
 SET( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/usr/local/toolkits/ITK/git/bin_debug
+ITK_DIR:PATH=/usr/local/toolkits/ITK/4.0.0/bin_debug

 // Coverage settings: -fprofile-arcs -ftest-coverage
 CMAKE_CXX_FLAGS_DEBUG:STRING=-g -O0 -fprofile-arcs -ftest-coverage


add VAD_Ceres

add VAD_Ceres

--- VAD_Ceres.cmake
+++ VAD_Ceres.cmake
@@ -24,7 +24,7 @@
   list(APPEND CMAKE_MODULE_PATH "${VAD_EXTERNAL_ROOT}/Ceres/cmake")

   #prerequisits
-  find_package(Eigen REQUIRED)
+  vigra_add_dep(Eigen REQUIRED LIVE)

   git_clone(Ceres)

@@ -32,20 +32,29 @@
   file(READ "${VAD_EXTERNAL_ROOT}/Ceres/CMakeLists.txt" FILECONTENT)
   string(REPLACE "CMAKE_SOURCE_DIR" "CMAKE_CURRENT_LIST_DIR" FILECONTENT ${FILECONTENT})
   string(REPLACE "CMAKE_BINARY_DIR" "CMAKE_CURRENT_BINARY_DIR" FILECONTENT ${FILECONTENT})
+  string(REPLACE "add_custom_target(uninstall\n" "add_custom_target(uninstall-ceres\n" FILECONTENT ${FILECONTENT})
   file(WRITE "${VAD_EXTERNAL_ROOT}/Ceres/CMakeLists.txt" ${FILECONTENT})

-  message("output: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+  #patch (HACK) logging.h
+  file(READ "${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog/glog/logging.h" FILECONTENT)
+  string(REPLACE "// Log severity level constants."
+        "#undef ERROR\n#define MAX_LOG_LEVEL -1" FILECONTENT "${FILECONTENT}")
+  file(WRITE "${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog/glog/logging.h" "${FILECONTENT}")
+
+  set(EIGENSPARSE ON) #use Eigen (no additional deps required - but suitesparse should be faster!)
+  set(MINIGLOG ON) #use miniglog
+  set(EIGENSPARSE ON)
+  set(BUILD_TESTING OFF)

   # TODO default seems to point to checkout out dir in source?!?
   add_subdirectory("${VAD_EXTERNAL_ROOT}/Ceres" "${CMAKE_BINARY_DIR}/external/Ceres")

-  if(NOT TARGET ceres)
-    message(ERROR "ceres found but no target \"ceres\"!")
-  endif()
-
   add_library(CERES::CERES INTERFACE IMPORTED)

-  set_target_properties(CERES::CERES PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${VAD_EXTERNAL_ROOT}/Ceres/include;${VAD_EXTERNAL_ROOT}/Ceres/config;${EIGEN_INCLUDE_DIRS}")
+
+  get_target_property(_CERES_INC ceres INTERFACE_INCLUDE_DIRECTORIES)
+
+  set_target_properties(CERES::CERES PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CERES_INCLUDE_DIRS};${VAD_EXTERNAL_ROOT}/Ceres/include;${VAD_EXTERNAL_ROOT}/Ceres/config;${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog;${EIGEN_INCLUDE_DIRS}")
   set_target_properties(CERES::CERES PROPERTIES INTERFACE_LINK_LIBRARIES ceres)

 endfunction()


ExternalProject_Add_Step requires COMMAND parameter with VisualStudioi. See #32

A bug has been reported on CMake bug tracker
See http://public.kitware.com/Bug/view.php?id=12430

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -282,6 +282,8 @@
   # This custom external project step forces the build and later
   # steps to run whenever a top level build is done...
   ExternalProject_Add_Step(${proj} forcebuild
+    COMMAND ${CMAKE_COMMAND} -E echo_append ""
+    COMMENT "Forcing build step for '${proj}'"
     DEPENDEES configure
     DEPENDERS build
     ALWAYS 1


Fix CMake variable type of MITK_XVFB_TESTING_COMMAND

Summary: CMake variable type was wrong passing the value to the MITK build

Test Plan: CI

Reviewers: O1 MITK Reviewer Group I, kislinsk

Reviewed By: O1 MITK Reviewer Group I, kislinsk

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

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -431,7 +431,7 @@
     -DMITK_BUILD_CONFIGURATION:STRING=${MITK_BUILD_CONFIGURATION}
     -DMITK_FAST_TESTING:BOOL=${MITK_FAST_TESTING}
     -DMITK_XVFB_TESTING:BOOL=${MITK_XVFB_TESTING}
-    -DMITK_XVFB_TESTING_COMMAND:BOOL=${MITK_XVFB_TESTING_COMMAND}
+    -DMITK_XVFB_TESTING_COMMAND:STRING=${MITK_XVFB_TESTING_COMMAND}
     -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
     # ----------------- Miscellaneous ---------------
     -DCMAKE_LIBRARY_PATH:PATH=${CMAKE_LIBRARY_PATH}


BUG: In SuperBuild.cmake, pass WITH_COVERAGE variable to CTK project.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -323,6 +323,7 @@
   CMAKE_ARGS
     ${ctk_superbuild_boolean_args}
     -DCTK_SUPERBUILD:BOOL=OFF
+    -DWITH_COVERAGE:BOOL=${WITH_COVERAGE}
     -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
     -DCTK_SUPERBUILD_BINARY_DIR:PATH=${CTK_BINARY_DIR}
     -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir}
@@ -331,7 +332,7 @@
     -DCTK_C_FLAGS:STRING=${CTK_C_FLAGS}
     -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}
     -DCTK_KWSTYLE_EXECUTABLE:FILEPATH=${CTK_KWSTYLE_EXECUTABLE}
-    -DDCMTK_DIR=${DCMTK_DIR} # FindDCMTK expects DCMTK_DIR
+    -DDCMTK_DIR:PATH=${DCMTK_DIR} # FindDCMTK expects DCMTK_DIR
   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
   BINARY_DIR ${CMAKE_BINARY_DIR}/CTK-build
   BUILD_COMMAND ""


removed set_directory_property

removed set_directory_property

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

 set( SOURCE_DOWNLOAD_CACHE ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
     "The path for downloading external source directories" )
-set_directory_properties(PROPERTIES EP_BASE ${SOURCE_DOWNLOAD_CACHE})

 mark_as_advanced( SOURCE_DOWNLOAD_CACHE )


feat(cmake/macro): Allow scripts to lower prioritize other scripts (#2329)

--- src/cmake/ac_macros.cmake
+++ src/cmake/ac_macros.cmake
@@ -9,8 +9,26 @@
 # AC_ADD_SCRIPT_LOADER
 #
 MACRO(AC_ADD_SCRIPT_LOADER script_dec include)
-    CU_ADD_GLOBAL("AC_ADD_SCRIPTS_LIST" "Add${script_dec}Scripts()\;")
-
+    set (lower_prio_scripts ${ARGN})
+    list(LENGTH lower_prio_scripts num_lower_prio_scripts)
+    if (${num_lower_prio_scripts} GREATER 0)
+        CU_GET_GLOBAL("AC_ADD_SCRIPTS_LIST")
+        foreach(lower_prio_script ${lower_prio_scripts})
+            if ("${AC_ADD_SCRIPTS_LIST}" MATCHES "Add${lower_prio_script}Scripts()")
+                message("-- ${script_dec} demands lower priority: ${lower_prio_script} --")
+                list(REMOVE_ITEM AC_ADD_SCRIPTS_LIST "Add${lower_prio_script}Scripts()")
+                CU_SET_GLOBAL("AC_ADD_SCRIPTS_LIST" "${AC_ADD_SCRIPTS_LIST}")
+                list(APPEND removed_lower_prio_scripts ${lower_prio_script})
+            endif()
+        endforeach()
+        CU_ADD_GLOBAL("AC_ADD_SCRIPTS_LIST" "Add${script_dec}Scripts()\;")
+        foreach(lower_prio_script ${removed_lower_prio_scripts})
+            CU_ADD_GLOBAL("AC_ADD_SCRIPTS_LIST" "Add${lower_prio_script}Scripts()\;")
+        endforeach()
+    else()
+        CU_ADD_GLOBAL("AC_ADD_SCRIPTS_LIST" "Add${script_dec}Scripts()\;")
+    endif()
+

     if (NOT ${include} STREQUAL "")
         CU_GET_GLOBAL("AC_ADD_SCRIPTS_INCLUDE")
@@ -26,4 +44,4 @@
 MACRO(AC_ADD_CONFIG_FILE configFilePath)
     CU_GET_GLOBAL("MODULE_CONFIG_FILE_LIST")
     CU_ADD_GLOBAL("MODULE_CONFIG_FILE_LIST" "${configFilePath}")
-ENDMACRO()+ENDMACRO()


Do not require libssl1.0.0 (not available on all buildbot platforms).

--- cmake/ssl.cmake
+++ cmake/ssl.cmake
@@ -170,8 +170,7 @@

     IF(OPENSSL_INCLUDE_DIR AND
        OPENSSL_LIBRARIES   AND
-       CRYPTO_LIBRARY      AND
-       OPENSSL_MAJOR_VERSION STREQUAL "1"
+       CRYPTO_LIBRARY
       )
       SET(OPENSSL_FOUND TRUE)
     ELSE()


ENH: ENH: MIDAS+CTest: allow the MIDAS arguments to be part of an arg rather than the entire arg

SVN-Revision: 3249

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -71,7 +71,7 @@
   foreach(arg ${ARGN})
     if(arg MATCHES "MIDAS{[^}]*}")
       string(REGEX MATCH "MIDAS{([^}]*)}" toReplace "${arg}")
-      string(REGEX REPLACE "MIDAS{([^}]*)}" "\\1" keyFile "${arg}")
+      string(REGEX REPLACE "MIDAS{([^}]*)}" "\\1" keyFile "${toReplace}")
       # Split up the checksum extension from the real filename
       string(REGEX MATCH "\\.[^\\.]*$" hash_alg "${keyFile}")
       string(REGEX REPLACE "\\.[^\\.]*$" "" base_file "${keyFile}")


Looks like I broke Android builds on nearly all platforms. This should fix it up.

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -11,10 +11,18 @@

 # Default build output paths
 if (NOT OGRE_ARCHIVE_OUTPUT)
-  set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  if(APPLE AND NOT OGRE_BUILD_PLATFORM_ANDROID)
+    set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  else()
+    set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  endif()
 endif ()
 if (NOT OGRE_LIBRARY_OUTPUT)
-  set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  if(APPLE AND NOT OGRE_BUILD_PLATFORM_ANDROID)
+    set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
+  else()
+    set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  endif()
 endif ()
 if (NOT OGRE_RUNTIME_OUTPUT)
   set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin)


do not install sample plugins when they will be linked in statically

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -331,7 +331,7 @@
     set_target_properties(${SAMPLENAME} PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
   endif()

-  if (OGRE_INSTALL_SAMPLES)
+  if (OGRE_INSTALL_SAMPLES AND NOT OGRE_STATIC)
 	ogre_install_target(${SAMPLENAME} ${OGRE_SAMPLE_PATH} FALSE)
   endif()


build: less visible caching of Spidermonkey stuff

--- CMakeModules/FindSpidermonkey.cmake
+++ CMakeModules/FindSpidermonkey.cmake
@@ -33,8 +33,7 @@

 SET(
     SPIDERMONKEY_DEFINITIONS
-    -D${SPIDERMONKEY_PLATFORM} -DJS_C_STRINGS_ARE_UTF8
-    CACHE STRING "Spidermonkey definitions")
+    -D${SPIDERMONKEY_PLATFORM} -DJS_C_STRINGS_ARE_UTF8)

 FIND_PATH(
     SPIDERMONKEY_INCLUDE_DIR
@@ -90,3 +89,5 @@
         SPIDERMONKEY_UTF8)

 ENDIF()
+
+MARK_AS_ADVANCED(SPIDERMONKEY_INCLUDE_DIR SPIDERMONKEY_LIBRARY)


CI: allow to skip testing from environment

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -67,6 +67,11 @@
   endif()
 endif()
 set (CTEST_SITE "${IMAGE_NAME}")
+
+# Detect "skip testing"
+if(DEFINED ENV{CI_SKIP_TESTING})
+  set(ci_skip_testing 1)
+endif()

 # Directory variable
 set (CTEST_SOURCE_DIRECTORY "${OTB_SOURCE_DIR}")


Lighter ci, for quicker iteration

Lighter ci, for quicker iteration

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -44,6 +44,8 @@
   endif()
 endif()

+#Warning, this variable is used in cdash_status.py. If change from
+# ${IMAGE_NAME} to something else do not forget to change it.
 set (CTEST_SITE "${IMAGE_NAME}")

 # Directory variable
@@ -81,10 +83,10 @@
   message( FATAL_ERROR "An error occurs during ctest_configure.")
 endif()

-ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
-            RETURN_VALUE _build_rv
-            CAPTURE_CMAKE_ERROR _build_error
-            )
+# ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
+#             RETURN_VALUE _build_rv
+#             CAPTURE_CMAKE_ERROR _build_error
+#             )

 if ( NOT _build_rv EQUAL 0 )
   ctest_submit()


ENH: Mark vars advanced

ENH: Mark vars advanced

--- CMake/FindFFMPEG.cmake
+++ CMake/FindFFMPEG.cmake
@@ -87,6 +87,7 @@
 ENDIF(FFMPEG_INCLUDE_DIR)

 MARK_AS_ADVANCED(
+  FFMPEG_INCLUDE_DIR
   FFMPEG_avcodec_LIBRARY
   FFMPEG_avformat_LIBRARY
   FFMPEG_vorbis_LIBRARY


Change to -1 in polkitqtversion

Change to -1 in polkitqtversion

Signed-off-by: Dario Freddi <drf@kde.org>

svn path=/trunk/kdesupport/polkit-qt-1/; revision=1065153

--- polkitqt1version.h.cmake
+++ polkitqt1version.h.cmake
@@ -23,82 +23,82 @@

 #include "export.h"

-/// @brief PolkitQt version as string at compile time.
-#define POLKITQT1_VERSION_STRING "${CMAKE_POLKITQT-1_VERSION_STRING}"
+/// @brief PolkitQt-1 version as string at compile time.
+#define POLKITQT-1_VERSION_STRING "${CMAKE_POLKITQT-1_VERSION_STRING}"

-/// @brief The major PolkitQt version number at compile time
-#define POLKITQT1_VERSION_MAJOR ${CMAKE_MAJOR_POLKITQT-1_VERSION}
+/// @brief The major PolkitQt-1 version number at compile time
+#define POLKITQT-1_VERSION_MAJOR ${CMAKE_MAJOR_POLKITQT-1_VERSION}

-/// @brief The minor PolkitQt version number at compile time
-#define POLKITQT1_VERSION_MINOR ${CMAKE_MINOR_POLKITQT-1_VERSION}
+/// @brief The minor PolkitQt-1 version number at compile time
+#define POLKITQT-1_VERSION_MINOR ${CMAKE_MINOR_POLKITQT-1_VERSION}

-/// @brief The PolkitQt release version number at compile time
-#define POLKITQT1_VERSION_RELEASE ${CMAKE_RELEASE_POLKITQT-1_VERSION}
+/// @brief The PolkitQt-1 release version number at compile time
+#define POLKITQT-1_VERSION_RELEASE ${CMAKE_RELEASE_POLKITQT-1_VERSION}

 /**
- * \brief Create a unique number from the major, minor and release number of a %PolkitQt version
+ * \brief Create a unique number from the major, minor and release number of a %PolkitQt-1 version
  *
  * This function can be used for preprocessing. For version information at runtime
- * use the version methods in the PolkitQt namespace.
+ * use the version methods in the PolkitQt-1 namespace.
  */
-#define POLKITQT1_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))
+#define POLKITQT-1_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c))

 /**
- * \brief %PolkitQt Version as a unique number at compile time
+ * \brief %PolkitQt-1 Version as a unique number at compile time
  *
- * This macro calculates the %PolkitQt version into a number. It is mainly used
+ * This macro calculates the %PolkitQt-1 version into a number. It is mainly used
  * through POLKITQT1_IS_VERSION in preprocessing. For version information at runtime
- * use the version methods in the PolkitQt namespace.
+ * use the version methods in the PolkitQt-1 namespace.
  */
-#define POLKITQT1_VERSION \
-    POLKITQT1_MAKE_VERSION(POLKITQT1_VERSION_MAJOR,POLKITQT1_VERSION_MINOR,POLKITQT1_VERSION_RELEASE)
+#define POLKITQT-1_VERSION \
+    POLKITQT-1_MAKE_VERSION(POLKITQT-1_VERSION_MAJOR,POLKITQT-1_VERSION_MINOR,POLKITQT-1_VERSION_RELEASE)

 /**
- * \brief Check if the %PolkitQt version matches a certain version or is higher
+ * \brief Check if the %PolkitQt-1 version matches a certain version or is higher
  *
  * This macro is typically used to compile conditionally a part of code:
  * \code
  * #if POLKITQT1_IS_VERSION(2,1)
- * // Code for PolkitQt 2.1
+ * // Code for PolkitQt-1 2.1
  * #else
- * // Code for PolkitQt 2.0
+ * // Code for PolkitQt-1 2.0
  * #endif
  * \endcode
  *
  * For version information at runtime
- * use the version methods in the PolkitQt namespace.
+ * use the version methods in the PolkitQt-1 namespace.
  */
-#define POLKITQT1_IS_VERSION(a,b,c) ( POLKITQT1_VERSION >= POLKITQT1_MAKE_VERSION(a,b,c) )
+#define POLKITQT-1_IS_VERSION(a,b,c) ( POLKITQT-1_VERSION >= POLKITQT-1_MAKE_VERSION(a,b,c) )

 namespace PolkitQt1 {
     /**
-     * @brief Returns the major number of PolkitQt's version, e.g.
-     * 1 for %PolkitQt 1.0.2.
+     * @brief Returns the major number of PolkitQt-1's version, e.g.
+     * 1 for %PolkitQt-1 1.0.2.
      * @return the major version number at runtime.
      */
     POLKITQT1_EXPORT unsigned int versionMajor();

     /**
-     * @brief Returns the minor number of PolkitQt's version, e.g.
-     * 0 for %PolkitQt 1.0.2.
+     * @brief Returns the minor number of PolkitQt-1's version, e.g.
+     * 0 for %PolkitQt-1 1.0.2.
      * @return the minor version number at runtime.
      */
     POLKITQT1_EXPORT unsigned int versionMinor();

     /**
-     * @brief Returns the release of PolkitQt's version, e.g.
-     * 2 for %PolkitQt 1.0.2.
+     * @brief Returns the release of PolkitQt-1's version, e.g.
+     * 2 for %PolkitQt-1 1.0.2.
      * @return the release number at runtime.
      */
     POLKITQT1_EXPORT unsigned int versionRelease();

     /**
-     * @brief Returns the %PolkitQt version as string, e.g. "1.0.2".
+     * @brief Returns the %PolkitQt-1 version as string, e.g. "1.0.2".
      *
      * On contrary to the macro POLKITQT1_VERSION_STRING this function returns
-     * the version number of PolkitQt at runtime.
-     * @return the %PolkitQt version. You can keep the string forever
+     * the version number of PolkitQt-1 at runtime.
+     * @return the %PolkitQt-1 version. You can keep the string forever
      */
     POLKITQT1_EXPORT const char* versionString();
 }


cmake: Pass _FORTIFY_SOURCE only to the precompiler.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -29,9 +29,9 @@
         if (CMAKE_BUILD_TYPE)
             string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
             if (CMAKE_BUILD_TYPE_LOWER MATCHES (release|relwithdebinfo|minsizerel))
-                check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
+                check_c_compiler_flag("-Wp,-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
                 if (WITH_FORTIFY_SOURCE)
-                    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FORTIFY_SOURCE=2")
+                    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wp,-D_FORTIFY_SOURCE=2")
                 endif (WITH_FORTIFY_SOURCE)
             endif()
         endif()