Correct variable name SimpleITK_VARS

Correct variable name SimpleITK_VARS

GTEST_ROOT was not correctly being passes.

Change-Id: Ib0d63c6ea38220d7f0667de195b333a69e22c26c

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -283,13 +283,13 @@
 if ( BUILD_TESTING )
   if (USE_SYSTEM_GTEST)
     find_package( GTest REQUIRED )
-    list(APPEND SimpleITKITK_VARS GTEST_LIBRARIES GTEST_INCLUDE_DIRS GTEST_MAIN_LIBRARIES)
+    list(APPEND SimpleITK_VARS GTEST_LIBRARIES GTEST_INCLUDE_DIRS GTEST_MAIN_LIBRARIES)
   else()
     include(External_GTest)
     set( GTEST_ROOT ${GTEST_ROOT} CACHE PATH "The root directory of the gtest install prefix" )
     mark_as_advanced(GTEST_ROOT)
     list(APPEND ${CMAKE_PROJECT_NAME}_DEPENDENCIES GTest)
-    list(APPEND SimpleITKITK_VARS GTEST_ROOT)
+    list(APPEND SimpleITK_VARS GTEST_ROOT)
   endif()
 endif()

@@ -321,14 +321,14 @@
   if(_varName MATCHES "^SimpleITK_" OR _varName MATCHES "^SITK_" )
     if (NOT _varName MATCHES "^SITK_LANGUAGES_VARS")
       message( STATUS "Passing variable \"${_varName}=${${_varName}}\" to SimpleITK external project.")
-      list(APPEND SimpleITKITK_VARS ${_varName})
+      list(APPEND SimpleITK_VARS ${_varName})
     endif()
   endif()
 endforeach()

 VariableListToCache( SimpleITK_VARS  ep_simpleitk_cache )
-VariableListToArgs( SimpleITKITK_VARS  ep_simpleitk_args )
+VariableListToArgs( SimpleITK_VARS  ep_simpleitk_args )
 VariableListToCache( SITK_LANGUAGES_VARS  ep_languages_cache )
 VariableListToArgs( SITK_LANGUAGES_VARS  ep_languages_args )


Cleanup CMAKE_MODULE_INSTALL_PATH

Cleanup CMAKE_MODULE_INSTALL_PATH

--- Common.cmake
+++ Common.cmake
@@ -57,7 +57,7 @@
 include_directories(BEFORE ${CMAKE_SOURCE_DIR} ${OUTPUT_INCLUDE_DIR})

 if(MSVC)
-  set(CMAKE_MODULE_INSTALL_PATH ${CMAKE_PROJECT_NAME})
+  set(CMAKE_MODULE_INSTALL_PATH ${CMAKE_PROJECT_NAME}/CMake)
 else()
   set(CMAKE_MODULE_INSTALL_PATH share/${CMAKE_PROJECT_NAME}/CMake)
 endif()


support finding boost 1.40

support finding boost 1.40

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -33,7 +33,7 @@
 # set BOOST_ROOT to select a boost installation

 # This is required to enable the new version
-SET(Boost_ADDITIONAL_VERSIONS 1.39 1.39.0 1.38 1.38.0 1.37 1.37.0)
+SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.39 1.39.0 1.38 1.38.0 1.37 1.37.0)
 FIND_PACKAGE(Boost 1.37)

 ##################################################


[cmake]Fix small typo, leading to broken depends

--- cmake/FindD.cmake
+++ cmake/FindD.cmake
@@ -256,7 +256,7 @@
 			COMMAND "${DC}"
 			ARGS ${FLAGS_tmp} ${d_source_p_tmp} -c -of${d_obj_tmp}
 			COMMENT "Building ${d_obj_out_tmp}"
-			DEPENDS ${d_source_p} ${depends_tmp}
+			DEPENDS ${d_source_p_tmp} ${depends_tmp}
 			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 		    )
 	endforeach (d_source_p_tmp ${SOURCES_tmp})


build: add support for Boost 1.40

build: add support for Boost 1.40


Add Gadgetron_USE_CUDA (advanced) option

defaults to ON (Like Gadgetron does)

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -64,7 +64,8 @@
   set(BUILD_GADGETRON_NATIVE_PYTHON_SUPPORT OFF) # <-Disabled for v1.0
   option(BUILD_GADGETRON_NATIVE_MATLAB_SUPPORT
     "Build Gadgetron MATLAB gadgets (not required for SIRF)" OFF)
-
+  option(Gadgetron_USE_CUDA "Enable Gadgetron CUDA (if cuda libraries are present)" ON)
+  mark_as_advanced(Gadgetron_USE_CUDA)

   ExternalProject_Add(${proj}
@@ -95,6 +96,7 @@
         -DHDF5_LIBRARIES=${HDF5_LIBRARIES}
         -DISMRMRD_DIR=${ISMRMRD_DIR}
         -DMKLROOT_PATH=${MKLROOT_PATH}
+        -DUSE_CUDA=${Gadgetron_USE_CUDA}
 	    INSTALL_DIR ${Gadgetron_Install_Dir}
     DEPENDS
         ${${proj}_DEPENDENCIES}


Added get_supported_backends and get_backend_libraries_type cmake helper functions

--- BuildUtils.cmake
+++ BuildUtils.cmake
@@ -132,3 +132,56 @@
         endif()
     endforeach()
 endfunction()
+
+
+# Returns default backend library type (static/dynamic) for the current platform
+function(get_backend_libraries_type _LIB_TYPE)
+    if(PLATFORM_WIN32)
+        if(MSVC)
+            set(LIB_TYPE "shared")
+        else()
+		    # Link against static libraries on MinGW
+            set(LIB_TYPE "static")
+        endif()
+    elseif(PLATFORM_LINUX OR PLATFORM_ANDROID OR PLATFORM_MACOS)
+        set(LIB_TYPE "shared")
+    elseif(PLATFORM_UNIVERSAL_WINDOWS)
+        set(LIB_TYPE "static")
+    elseif(PLATFORM_IOS)
+        # Statically link with the engine on iOS.
+        # It is also possible to link dynamically by
+        # putting the library into the framework.
+        set(LIB_TYPE "static")
+    else()
+        message(FATAL_ERROR "Undefined platform")
+    endif()
+    set(${_LIB_TYPE} ${LIB_TYPE} PARENT_SCOPE)
+endfunction()
+
+
+# Adds the list of supported backend targets to variable ${_TARGETS} in parent scope.
+# Second argument to the function may override the target type (static/dynamic). If It
+# is not given, default target type for the platform is used.
+function(get_supported_backends _TARGETS)
+    if(${ARGC} GREATER 1)
+        set(LIB_TYPE ${ARGV1})
+    else()
+        get_backend_libraries_type(LIB_TYPE)
+    endif()
+
+    if(D3D11_SUPPORTED)
+	    list(APPEND BACKENDS GraphicsEngineD3D11-${LIB_TYPE})
+    endif()
+    if(D3D12_SUPPORTED)
+	    list(APPEND BACKENDS GraphicsEngineD3D12-${LIB_TYPE})
+    endif()
+    if(GL_SUPPORTED OR GLES_SUPPORTED)
+	    list(APPEND BACKENDS GraphicsEngineOpenGL-${LIB_TYPE})
+    endif()
+    if(VULKAN_SUPPORTED)
+	    list(APPEND BACKENDS GraphicsEngineVk-${LIB_TYPE})
+    endif()
+    # ${_TARGETS} == ENGINE_LIBRARIES
+    # ${${_TARGETS}} == ${ENGINE_LIBRARIES}
+    set(${_TARGETS} ${${_TARGETS}} ${BACKENDS} PARENT_SCOPE)
+endfunction()


CMake/file.cmake: Handle leading space from wc output

--- CMake/file.cmake
+++ CMake/file.cmake
@@ -15,6 +15,7 @@

 	execute_process (
 		COMMAND ${WC} -l ${filename}
+		COMMAND ${SED} "s/^[ ]*//"    # wc output on Mac has leading whitespace.
 		COMMAND ${SED} "s/ .*//"
 		OUTPUT_VARIABLE line_count
 		)


FIX (#3502): changed dashboard submission from my.cdash.org to cdash.mitk.org

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,4 +1,4 @@
-OPTION(USE_KITWARE_DARTBOARD "Use the Kitware Dartboard for Build Submissions." OFF)
+OPTION(USE_MITK_ORG_DASHBOARD "Use the dartboard on mitk.org for build submissions." OFF)

 # internal cdash
 set(CTEST_PROJECT_NAME "MITK")
@@ -15,24 +15,24 @@

 # configure dart for submission to kitware
-IF(USE_KITWARE_DARTBOARD)
+IF(USE_MITK_ORG_DASHBOARD)
 #
 # Dart server to submit results (used by client)
 #
     SET(DROP_METHOD "http")
-    SET(DROP_SITE "my.cdash.org")
+    SET(DROP_SITE "cdash.mitk.org")
     SET(DROP_LOCATION "/submit.php?project=MITK")
     SET(CTEST_DROP_METHOD "http")
-    SET(CTEST_DROP_SITE "my.cdash.org")
+    SET(CTEST_DROP_SITE "cdash.mitk.org")
     SET(CTEST_DROP_LOCATION "/submit.php?project=MITK")
     SET(CTEST_DROP_SITE_CDASH TRUE)

     SET(CTEST_NIGHTLY_START_TIME "21:00 CEST")
     SET (NIGHTLY_START_TIME "21:00:00 CEST")

-    SET (DOXYGEN_URL "http://docs.mitk.org/nightly/" )
+    SET (DOXYGEN_URL "http://docs.mitk.org/nightly-qt4/" )

-ENDIF(USE_KITWARE_DARTBOARD)
+ENDIF(USE_MITK_ORG_DASHBOARD)

 IF(EXISTS ${MBI_DART_WORKDIR}/notes.txt)
   MAKE_DIRECTORY(${MBI_DART_WORKDIR}/bin/Testing/Notes)


Update compiler.cmake

Update compiler.cmake

Add back optimization flags (were disabled to rule out problems). Space vs tab indentation.

--- Tudat/External/CMake/compiler.cmake
+++ Tudat/External/CMake/compiler.cmake
@@ -59,26 +59,26 @@
             set ( CMAKE_CXX_FLAGS "-Wall -std=c++0x" )
         endif()
     endif()
-
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-g")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-g -DNDEBUG")
+
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+    set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG")
     set(CMAKE_CXX_FLAGS_DEBUG          "-g")

     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wold-style-cast -Wnon-virtual-dtor")

-	# MinGW fixes
-	if( MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
-	  # MinGW fails to build with O2 or O3 optimization on several math.h function
-	  # http://ehc.ac/p/mingw/bugs/2250/
-	  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__NO_INLINE__")
-	  # MinGW gives some c11plus.xe out of memory messages:
-	  # http://sourceforge.net/p/mingw-w64/mailman/message/33182613/
-	  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0")
-	  # MinGW32 4.8.1 has no defenitions for _aligned_malloc/realloc/free
-	  #
-	  add_definitions(-DEIGEN_MALLOC_ALREADY_ALIGNED=1)
-	  add_definitions(-DEIGEN_DONT_ALIGN=1)
-	endif()
+    # MinGW fixes
+    if( MINGW AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
+      # MinGW fails to build with O2 or O3 optimization on several math.h function
+      # http://ehc.ac/p/mingw/bugs/2250/
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__NO_INLINE__")
+      # MinGW gives some c11plus.xe out of memory messages:
+      # http://sourceforge.net/p/mingw-w64/mailman/message/33182613/
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftrack-macro-expansion=0")
+      # MinGW32 4.8.1 has no defenitions for _aligned_malloc/realloc/free
+      #
+      add_definitions(-DEIGEN_MALLOC_ALREADY_ALIGNED=1)
+      add_definitions(-DEIGEN_DONT_ALIGN=1)
+    endif()

 elseif( MSVC )
     message(STATUS "Using msvc compiler.")


added QuaZip_INCLUDE_DIR

added QuaZip_INCLUDE_DIR

--- FindQuaZip.cmake
+++ FindQuaZip.cmake
@@ -5,8 +5,13 @@
 find_package_handle_standard_args(quazip DEFAULT_MSG QuaZip_LIBRARY QuaZip_INCLUDE_DIR)
 set(QuaZip_LIBRARIES ${QuaZip_LIBRARY})

+get_filename_component(QuaZip_LIBRARY_DIR ${QuaZip_LIBRARY} PATH)
+
 include_directories("${QT_PLUGINS_DIR}/../src/3rdparty/zlib/")
 # Add include directories needed to use QtSOAP.
 INCLUDE_DIRECTORIES(${QuaZip_INCLUDE_DIR})

-mark_as_advanced(QuaZip_LIBRARY QuaZip_INCLUDE_DIR)+set(QuaZip_LIBRARY_DIR "${QuaZip_LIBRARY_DIR}/../")
+LINK_DIRECTORIES(${QuaZip_LIBRARY_DIR})
+
+mark_as_advanced(QuaZip_LIBRARY QuaZip_INCLUDE_DIR)


RM: mitkPicHeaderProperty (648)

RM: mitkPicHeaderProperty (648)

--- Core/DataStructures/files.cmake
+++ Core/DataStructures/files.cmake
@@ -71,7 +71,6 @@
   mitkOperationActor.cpp
   mitkOperation.cpp
   mitkOrganTypeProperty.cpp
-  mitkPicHeaderProperty.cpp
   mitkPicHelper.cpp
   mitkPixelType.cpp
   mitkPlaneGeometry.cpp


removing duplicate cmake module

removing duplicate cmake module

--- CMake/FindOFED.cmake
+++ CMake/FindOFED.cmake
@@ -1,23 +0,0 @@
-# Copyright (c) 2011-2012 Stefan Eilemann <eile@eyescale.ch>
-
-find_path(_ofed_INCLUDE_DIR rdma/rdma_verbs.h
-  HINTS ${OFED_ROOT}/include
-  PATHS /usr/include /usr/local/include /opt/local/include)
-find_library(_rdma_LIBRARY NAMES rdmacm
-  HINTS ${OFED_ROOT}/lib
-  PATHS /usr/lib /usr/local/lib /opt/local/lib)
-find_library(_ibverbs_LIBRARY NAMES ibverbs
-  HINTS ${OFED_ROOT}/lib
-  PATHS /usr/lib /usr/local/lib /opt/local/lib)
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OFED DEFAULT_MSG
-  _ofed_INCLUDE_DIR _rdma_LIBRARY _ibverbs_LIBRARY)
-
-set(OFED_INCLUDE_DIRS ${_ofed_INCLUDE_DIR})
-set(OFED_LIBRARIES ${_rdma_LIBRARY})
-list(APPEND OFED_LIBRARIES ${_ibverbs_LIBRARY})
-
-if(OFED_FOUND AND NOT OFED_FIND_QUIETLY)
-  message(STATUS "Found OFED in ${OFED_INCLUDE_DIRS};${OFED_LIBRARIES}")
-endif()


COMP: fix pqxx lib name in FindPQXX

COMP: fix pqxx lib name in FindPQXX

--- CMake/FindPqxx.cmake
+++ CMake/FindPqxx.cmake
@@ -14,7 +14,7 @@
 FIND_PATH( PQXX_INCLUDE_DIR pqxx/pqxx )

 FIND_LIBRARY( PQXX_LIBRARY
-              NAMES PQXX
+              NAMES pqxx
               PATH_SUFFIXES pqxx )

 # handle the QUIETLY and REQUIRED arguments and set PQXX_FOUND to TRUE if


Added branch check for coverage report

Added branch check for coverage report

--- utils/CodeCoverage.cmake
+++ utils/CodeCoverage.cmake
@@ -98,15 +98,15 @@
     ADD_CUSTOM_TARGET(${_targetname}

             # Cleanup lcov
-            ${LCOV_PATH} --directory . --zerocounters
+            ${LCOV_PATH} --rc lcov_branch_coverage=1 --directory . --zerocounters

             # Run tests
             COMMAND ${_testrunner} ${ARGV3}

             # Capturing lcov counters and generating report
-            COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
-            COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'build/*' 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
-            COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
+            COMMAND ${LCOV_PATH} --rc lcov_branch_coverage=1 --directory . --capture --output-file ${_outputname}.info
+            COMMAND ${LCOV_PATH} --rc lcov_branch_coverage=1 --remove ${_outputname}.info '*unittest*' 'build/*' 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
+            COMMAND ${GENHTML_PATH} --rc lcov_branch_coverage=1 -o ${_outputname} ${_outputname}.info.cleaned
             COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned

             WORKING_DIRECTORY ${CMAKE_BINARY_DIR}


Fix project name in cmake/DownloadCpuinfo.cmake

--- cmake/DownloadCpuinfo.cmake
+++ cmake/DownloadCpuinfo.cmake
@@ -3,7 +3,7 @@
 PROJECT(cpuinfo-download NONE)

 INCLUDE(ExternalProject)
-ExternalProject_Add(fp16
+ExternalProject_Add(cpuinfo
 	GIT_REPOSITORY https://github.com/Maratyszcza/cpuinfo.git
 	GIT_TAG master
 	SOURCE_DIR "${CONFU_DEPENDENCIES_SOURCE_DIR}/cpuinfo"


minor insignificant corrections

minor insignificant corrections

--- cmake/OpenCVDetectVTK.cmake
+++ cmake/OpenCVDetectVTK.cmake
@@ -1,5 +1,4 @@
 if(NOT WITH_VTK OR ANDROID OR IOS)
-  message(STATUS "VTK support is disabled.")
   return()
 endif()

@@ -14,14 +13,9 @@
 endif()

 if(VTK_FOUND)
-  if (BUILD_SHARED_LIBS OR (NOT BUILD_SHARED_LIBS AND NOT VTK_BUILD_SHARED_LIBS))
-    set(HAVE_VTK ON)
-    message(STATUS "Found VTK ver. ${VTK_VERSION} (usefile: ${VTK_USE_FILE})")
-  else ()
-    set(HAVE_VTK OFF)
-    message(WARNING "VTK disabled. You are to build OpenCV in STATIC but VTK is SHARED!")
-  endif ()
+  set(HAVE_VTK ON)
+  message(STATUS "Found VTK ver. ${VTK_VERSION} (usefile: ${VTK_USE_FILE})")
 else()
   set(HAVE_VTK OFF)
-  message(STATUS "VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or set $VTK_DIR enviroment variable to VTK install subdirectory with UseVTK.cmake file (for windows)")
+  message(STATUS "VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or set $VTK_DIR enviroment variable to VTK install subdirectory with VTKConfig.cmake file (for windows)")
 endif()


Resolved wrong .lib includes (wrong file names for win32 libs) Close #246

--- cmake/Systems/Windows.cmake
+++ cmake/Systems/Windows.cmake
@@ -15,15 +15,15 @@
     if(CMAKE_BUILD_TYPE STREQUAL "Debug")
         set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_debug_x64.lib CACHE INTERNAL "OpenSSL libraries." FORCE)
     else()
-        set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_release_x64.lib  CACHE INTERNAL "OpenSSL libraries." FORCE)
+        set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_release_x64.lib CACHE INTERNAL "OpenSSL libraries." FORCE)
     endif()
 else()
     set(OPENSSL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libeay32_win32.lib CACHE INTERNAL "OpenSSL libraries." FORCE)

     if(CMAKE_BUILD_TYPE STREQUAL "Debug")
-        set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_debug_x32.lib CACHE INTERNAL "OpenSSL libraries." FORCE)
+        set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_debug_win32.lib CACHE INTERNAL "OpenSSL libraries." FORCE)
     else()
-        set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_release_x32.lib  CACHE INTERNAL "OpenSSL libraries." FORCE)
+        set(MYSQL_LIBRARIES ${CMAKE_SOURCE_DIR}/dep/lib/libmysql_release_win32.lib CACHE INTERNAL "OpenSSL libraries." FORCE)
     endif()
 endif()


The file FindQwt.cmake and the call find_package(Qwt QUIET) have to be coherent.


Remove unused cmake log

Remove unused cmake log

test=develop

--- cmake/external/python.cmake
+++ cmake/external/python.cmake
@@ -79,6 +79,5 @@
         "please use pip to upgrade protobuf. pip install -U protobuf")
     ENDIF()
 ENDIF(PYTHONINTERP_FOUND)
-message(STATUS ${PYTHON_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
 INCLUDE_DIRECTORIES(${PYTHON_NUMPY_INCLUDE_DIR})


[CMake] Avoid liblldb genex when figuring out the copy destination for framework tools

This genex created an order-only dependency to liblldb for every framework tool. It reduced build throughput in the first half of the compilation and pulled in unnecessary build units, e.g. debugserver required ~900 build units. With this change debugserver is (again) down at 52 build units!

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

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -199,7 +199,8 @@
 function(lldb_add_to_buildtree_lldb_framework name subdir)
   # Destination for the copy in the build-tree. While the framework target may
   # not exist yet, it will exist when the generator expression gets expanded.
-  set(copy_dest "$<TARGET_FILE_DIR:liblldb>/../../../${subdir}")
+  get_target_property(framework_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
+  set(copy_dest "${framework_build_dir}/${subdir}")

   # Copy into the given subdirectory for testing.
   add_custom_command(TARGET ${name} POST_BUILD


Only allow the BUILD_DOC option for Linux systems.

svn path=/trunk/; revision=7128

--- cmake/modules/docbook.cmake
+++ cmake/modules/docbook.cmake
@@ -20,6 +20,13 @@
 # Configuration for the building of DocBook documentation

 option(BUILD_DOC "Enable build of DocBook documentation" OFF)
+if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
+  set(
+  BUILD_DOC OFF CACHE INTERNAL
+  "Enable build of DocBook documentation"
+  )
+endif(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
+
 option(PREBUILT_DOC "Assume documentation is already built and present in doc/docbooks/src, ready to be installed. This option is useful for package maintainers" OFF)

 if (BUILD_DOC AND PREBUILT_DOC)


Set LTDL_WIN32 to ON for Win32 platform, but not for Cygwin and MSys. In that case the ltdl library and header is not searched for.

svn path=/trunk/; revision=8902

--- cmake/modules/drivers.cmake
+++ cmake/modules/drivers.cmake
@@ -43,7 +43,13 @@
   set(ENABLE_DYNDRIVERS OFF CACHE BOOL
   "Enable dynamic loading of device drivers" FORCE)
 endif(ENABLE_DYNDRIVERS AND NOT BUILD_SHARED_LIBS)
-if(ENABLE_DYNDRIVERS)
+if(ENABLE_DYNDRIVERS AND WIN32)
+  if(NOT CYGWIN AND NOT MSYS)
+    set(LTDL_WIN32 ON)
+    set(LTDL_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
+  endif(NOT CYGWIN AND NOT MSYS)
+endif(ENABLE_DYNDRIVERS AND WIN32)
+if(ENABLE_DYNDRIVERS AND NOT LTDL_WIN32)
   find_package(LTDL)
   if(LTDL_FOUND)
     set(libplplot${LIB_TAG}_RPATH ${LTDL_LIBRARY_DIR})
@@ -56,7 +62,7 @@
     set(ENABLE_DYNDRIVERS OFF CACHE BOOL
     "Enable dynamic loading of device drivers" FORCE)
   endif(LTDL_FOUND)
-endif(ENABLE_DYNDRIVERS)
+endif(ENABLE_DYNDRIVERS AND NOT LTDL_WIN32)

 # Decide whether to enable each device or not and find special resources
 # when required.


Fix CMake 3 warning

Fix CMake 3 warning

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -85,7 +85,7 @@
     COMMAND ${RUN_PREFIX} $<TARGET_FILE:${TEST_NAME}> ${RUN_ARGS}
     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

-  if("${NAME}" MATCHES "^perf" OR "${NAME}" MATCHES "perf-")
+  if(NAME MATCHES "^perf" OR NAME MATCHES "perf-")
     list(APPEND ALL_CPP_PERF_TESTS ${TEST_NAME})
     set(TEST_LABELS ${PROJECT_NAME}-perf)
     install(TARGETS ${TEST_NAME} DESTINATION share/${PROJECT_NAME}/benchmarks


Removed fatal error message used for testing

--- FindTensorFlow.cmake
+++ FindTensorFlow.cmake
@@ -17,6 +17,5 @@
 set(TensorFlow_LIBS ${TensorFlow_LIBRARY})

 if(TesorFlow_LIBS AND TensorFlow_INCLUDE_DIRS)
-    message(FATAL_ERROR "Setting")
     set(TensorFlow_FOUND 1)
 endif()


-BUG: missing bracket...

-BUG: missing bracket...

--- Testing/Dashboard/pxDashboardCommon.cmake
+++ Testing/Dashboard/pxDashboardCommon.cmake
@@ -60,7 +60,7 @@

 # Select git source to use.
 if( NOT DEFINED dashboard_git_url )
-  set( dashboard_git_url "git://github.com/ITKTools/ITKTools.git"
+  set( dashboard_git_url "git://github.com/ITKTools/ITKTools.git" )
 endif()

 # select branch to use


Remove Matt http server

Remove Matt http server

--- cmake/ITKExamplesExternalData.cmake
+++ cmake/ITKExamplesExternalData.cmake
@@ -35,9 +35,6 @@
   # Data published by developers using git-gerrit-push.
   "http://www.itk.org/files/ExternalData/%(algo)/%(hash)"
   "http://www.itk.org/files/ExamplesExternalData/%(algo)/%(hash)"
-
-  # Temporary: TODO remove me
-  #"http://mmmccormick.com/ITKExamplesExternalData/%(algo)/%(hash)"
   )

 # Tell ExternalData commands to transform raw files to content links.


Remove ANDROID_GDBSERVER

Remove ANDROID_GDBSERVER

--- cmake/modules/hunter_finalize.cmake
+++ cmake/modules/hunter_finalize.cmake
@@ -184,18 +184,7 @@
         "${ANDROID_TOOLCHAIN_MACHINE_NAME}"
     )

-    # Rejected: https://gitlab.kitware.com/cmake/cmake/merge_requests/74
-    set(
-        ANDROID_GDBSERVER
-        "${CMAKE_ANDROID_NDK}/prebuilt/android-${CMAKE_ANDROID_ARCH}/gdbserver/gdbserver"
-        CACHE
-        FILEPATH
-        "Path to gdbserver"
-    )
-
-    if(NOT EXISTS "${ANDROID_GDBSERVER}")
-      hunter_internal_error("gdbserver not found: ${ANDROID_GDBSERVER}")
-    endif()
+    # GDBSERVER moved to https://github.com/hunter-packages/android-apk/commit/32531adeb287d3e3b20498ff1a0f76336cbe0551

     if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
       if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64")


Added CMake config variable injection to Kconfig.

--- cmake/ParseConfig.cmake
+++ cmake/ParseConfig.cmake
@@ -2,6 +2,7 @@
 # Project is distributed under the terms of the MIT License

 function(parse_config _config_file _config_output)
+    get_cmake_property(_global_config_data VARIABLES)
     file(STRINGS "${_config_file}" _config_data)
     set(_output "")

@@ -11,6 +12,11 @@
             string(REGEX REPLACE "(CONFIG_[^=]+)=\"?([^\"]+)\"?" "\\1;\\2" _splitted_entry ${_entry})
             list(GET _splitted_entry 0 _entry_name)
             list(GET _splitted_entry 1 _entry_value)
+
+            if(DEFINED ${_entry_name})
+                continue()
+            endif()
+
             if("${_entry_value}" STREQUAL "y")
                 set(${_entry_name} ON PARENT_SCOPE)
                 list(APPEND _output -D${_entry_name})
@@ -24,5 +30,21 @@
         endif()
     endforeach()

+    foreach(_entry_name ${_global_config_data})
+        string(FIND "${_entry_name}" "CONFIG_" _entry_is_config)
+        if(${_entry_is_config} EQUAL 0)
+            string(TOUPPER ${${_entry_name}} _entry_value)
+
+            # Entry values should not contain any special characters, symbols or spaces
+            if("${_entry_value}" MATCHES "ON|YES|TRUE|Y")
+                list(APPEND _output -D${_entry_name})
+            elseif(NOT "${_entry_value}" MATCHES "OFF|NO|FALSE|N")
+                list(APPEND _output -D${_entry_name}=${${_entry_name}})
+            endif()
+
+            continue()
+        endif()
+    endforeach()
+
     set(${_config_output} "${_output}" PARENT_SCOPE)
 endfunction()


Ensure each configuration is handled separately in windeployqt.

--- cmake/Windeployqt.cmake
+++ cmake/Windeployqt.cmake
@@ -51,7 +51,7 @@

     # install(CODE ...) doesn't support generator expressions, but
     # file(GENERATE ...) does - store the path in a file
-    file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}_path"
+    file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${target}_$<CONFIG>_path"
         CONTENT "$<TARGET_FILE:${target}>"
     )

@@ -59,7 +59,7 @@
     # runtime files to the appropriate directory for installation
     install(CODE
         "
-        file(READ \"${CMAKE_CURRENT_BINARY_DIR}/${target}_path\" _file)
+        file(READ \"${CMAKE_CURRENT_BINARY_DIR}/${target}_\$<CONFIG>_path\" _file)
         execute_process(
             COMMAND \"${CMAKE_COMMAND}\" -E
                 env PATH=\"${_qt_bin_dir}\" \"${WINDEPLOYQT_EXECUTABLE}\"


Write error output to a logfile

Write error output to a logfile

--- cmake/custom/hdf5.cmake
+++ cmake/custom/hdf5.cmake
@@ -38,8 +38,9 @@
       HDF5_HAS_Fortran2003-test-output
     )
   if(NOT HDF5_HAS_Fortran2003)
-         message(FATAL_ERROR "HDF5 requested, but library was not compiled with --enable-fortran2003 Compiling a simple test executable failed with the following message:
-${HDF5_HAS_Fortran2003-test-output}")
+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/HDF5_HAS_Fortran2003-test.log ${HDF5_HAS_Fortran2003-test-output})
+    message(FATAL_ERROR "HDF5 requested, but library was not compiled with --enable-fortran2003 \
+Compiling a simple test executable failed, consult the log file: ${CMAKE_CURRENT_BINARY_DIR}/HDF5_HAS_Fortran2003-test.log")
   else()
     set(USE_HDF5 ON)
   endif()


Cosmetics: indentation

Cosmetics: indentation

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -517,15 +517,15 @@
         string(REGEX REPLACE "set.*SUBSYS_NAME" "" name "${name}")
         string(REPLACE ")" "" name "${name}")
         string(STRIP "${name}" name)
-#				message(STATUS "setting ${subdir} component name to ${name}")
-				set(${names} ${${names}} ${name})
+#       message(STATUS "setting ${subdir} component name to ${name}")
+        set(${names} ${${names}} ${name})
         file(STRINGS ${dirname}/${subdir}/CMakeLists.txt DEPENDENCIES REGEX "set.*SUBSYS_DEPS .*\\)")
         string(REGEX REPLACE "set.*SUBSYS_DEPS" "" DEPENDENCIES "${DEPENDENCIES}")
         string(REPLACE ")" "" DEPENDENCIES "${DEPENDENCIES}")
         string(STRIP "${DEPENDENCIES}" DEPENDENCIES)
         string(REPLACE " " ";" DEPENDENCIES "${DEPENDENCIES}")
         if(NOT("${DEPENDENCIES}" STREQUAL ""))
-					  list(REMOVE_ITEM DEPENDENCIES "#")
+            list(REMOVE_ITEM DEPENDENCIES "#")
             string(TOUPPER "PCL_${name}_DEPENDS" SUBSYS_DEPENDS)
             set(${SUBSYS_DEPENDS} ${DEPENDENCIES})
             foreach(dependee ${DEPENDENCIES})


ENH: add CMake file associated to the target library.

--- cmake/sara_macros.cmake
+++ cmake/sara_macros.cmake
@@ -244,7 +244,9 @@
   if (NOT "${_src_files}" STREQUAL "")
     # - Case 1: the project contains 'cpp' source files
     #   Specify the source files.
-    add_library(DO_Sara_${_library_name} ${_hdr_files} ${_src_files})
+    add_library(DO_Sara_${_library_name}
+      ${DO_Sara_DIR}/cmake/UseDOSara${_library_name}.cmake
+      ${_hdr_files} ${_src_files})

     # Link with other libraries.
     sara_step_message("Linking project 'DO_Sara_${_library_name}' with "


Rename generic NAME variable to the more specific CMSIS_NAME

--- cmake/subprojects.cmake
+++ cmake/subprojects.cmake
@@ -1,9 +1,9 @@
 function(adopt_subprojects)

     # Add subprojects for CMSIS
-    set(NAME "CMSIS")
-    if (";${SUBPROJECTS};" MATCHES ";${NAME};")
-        list(REMOVE_ITEM SUBPROJECTS ${NAME})
+    set(CMSIS_NAME "CMSIS")
+    if (";${SUBPROJECTS};" MATCHES ";${CMSIS_NAME};")
+        list(REMOVE_ITEM SUBPROJECTS ${CMSIS_NAME})
         list(APPEND SUBPROJECTS
                 CMSIS/BasicMathFunctions
                 CMSIS/CommonTables


Update to 1.8.14

Update to 1.8.14

--- CMakeExternals/HDF5.cmake
+++ CMakeExternals/HDF5.cmake
@@ -27,8 +27,8 @@
     # bad :( This would be fixed by using an external HDF-Installation with ITK/VTK

     ExternalProject_Add(${proj}
-       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/hdf5-1.8.12.tar.gz
-       URL_MD5 d804802feb99b87fc668a90e6fa34411
+       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/hdf5_1.8.12.tar.gz
+       URL_MD5 a482686e733514a51cde12d6fe5c5d95
        CMAKE_GENERATOR ${gen}
        CMAKE_ARGS
          ${ep_common_args}


Added Win32 msys/mingw cmake build instructions

git-svn-id: 3db15d9df66343e7f944511864f914adee1f7549@1743 01035d8c-6547-0410-b346-abe4f91aad63

--- README.cmake
+++ README.cmake
@@ -25,3 +25,17 @@
 $ make
 (as root)
 $ make install
+
+=====================
+Win32
+=====================
+
+Install MinGW & the mysys shell
+   + pwd -W prints true Win32 directory
+   + I also installed emacs, "tortise svn", and "cmake"
+
+$ cd codec2-dev
+$ mkdir build_win32
+$ cd build_win32
+$ cmake -DSPEEXDSP_INCLUDE_DIR=/usr/local/include/ -G "MSYS Makefiles" ..
+$ make


Update Lightning MDB

Update Lightning MDB

--- lmdb.cmake
+++ lmdb.cmake
@@ -10,12 +10,11 @@
 include (ExternalSource)
 include (PkgConfig)
 include (BuildSupport)
-include (PatchSupport)

 external_source (lmdb
-    0.9.8
-    lmdb-0.9.8.tar.gz
-    834777d07442318e6a8a08b85c00833a)
+    0.9.10
+    lmdb-0.9.10.tar.gz
+    313e5015517e7183d5e85ba72293719c)

 message ("Installing ${lmdb_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${lmdb_NAME}
@@ -28,7 +27,7 @@
     BUILD_IN_SOURCE     1
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     TEST_COMMAND        ${BUILDEM_ENV_STRING} make test
-    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install BUILDEM_DIR=${BUILDEM_DIR}
+    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install prefix=${BUILDEM_DIR} -i
 )

 set_target_properties(${lmdb_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)


Update missed "python36.lib" to "python37.lib"

This should be upgraded for python 3.7.

Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>

--- projects/win32/python.cmake
+++ projects/win32/python.cmake
@@ -10,6 +10,6 @@
 add_extra_cmake_args(
   -DPYTHON_EXECUTABLE:FILEPATH=<INSTALL_DIR>/bin/python.exe
   -DPYTHON_INCLUDE_DIR:PATH=<INSTALL_DIR>/bin/Include
-  -DPYTHON_LIBRARY:FILEPATH=<INSTALL_DIR>/bin/libs/python36.lib)
+  -DPYTHON_LIBRARY:FILEPATH=<INSTALL_DIR>/bin/libs/python37.lib)

 set (python_pip_executable "<INSTALL_DIR>/bin/python.exe" "-m" "pip" CACHE INTERNAL "" FORCE)


Fixes for building of DA

Fixes for building of DA

--- cmake/CMakeDA.cmake
+++ cmake/CMakeDA.cmake
@@ -10,8 +10,7 @@
 # -----------Utilities--------------------

 #list of detectors
-#set(ONLINEDETECTORS SPD SDD SSD TRD TPC FMD TOF HMP PHS CPV PMD MCH MTR T00 V00 ZDC ACO TRI EMC HLT TST GRP)
-set(ONLINEDETECTORS SPD SDD SSD TRD ACO)
+set(ONLINEDETECTORS ACO GRP TST HLT EMC TRI T00 PMD CPV PHS FMD TPC TRD ZDC V00 MTR MCH HMP TOF SSD SDD SPD)
 function(expand output input)
     string(REGEX MATCH "\\\${[^}]*}" m "${input}")
     while(m)
@@ -55,6 +54,10 @@
   string(REGEX MATCH "${pattern}:[^\n]*" _match ${file})
   if(_match)
     string(REGEX REPLACE "${pattern}:[ ]*" "" _data ${_match})
+    string(REPLACE "(" "\\(" _data "${_data}")
+    string(REPLACE ")" "\\)" _data "${_data}")
+    string(REPLACE "<" "\\<" _data "${_data}")
+    string(REPLACE ">" "\\>" _data "${_data}")
   endif(_match)
   set(${_info} ${_data} PARENT_SCOPE)
 endfunction()
@@ -64,7 +67,7 @@
 detector_module(h_module ${oldetect})
 list(APPEND mod "-I${ALICE_ROOT}/${h_module}")
 endforeach(oldetect ${ONLINEDETECTORS})
-list(APPEND mod "-I$ALICE_ROOT}/include" "-I${ALICE_ROOT}/STEER" "-I${ALICE_ROOT}/MUON/mapping" "-I$ENV{AMORE}/include/amore")
+list(APPEND mod "-I${ALICE_ROOT}/include" "-I${ALICE_ROOT}/STEER" "-I${ALICE_ROOT}/MUON/mapping" "-I$ENV{AMORE}/include/amore")

 # ----------Common stuff-------------------

@@ -109,7 +112,7 @@
 endif(DAQDALIB_PATH)
 set(DAQDALIB "${DAQDADIR}/libdaqDA.a")

-include_directories(${DAQDADIR} RAW include STEER)
+include_directories(${DAQDADIR} ${ALICE_ROOT}/RAW ${ALICE_ROOT}/include ${ALICE_ROOT}/STEER)
 include_directories(SYSTEM ${ROOTINCDIR})

 # ----------Create All Valid targets---------
@@ -266,13 +269,13 @@
 COMMAND @echo 'MONITORLIBS=$$(shell date-config --monitorlibs=noshift)' >> ${DAMAKEFILE}
 COMMAND @echo "" >> ${DAMAKEFILE}
 COMMAND @echo "${DAMODULE}${SUBDAMODULE}${DANAME}da.exe: ${DAMODULE}${SUBDAMODULE}${DANAME}da.o" >> ${DAMAKEFILE}
-COMMAND @echo -e '\t$$(LD) $$(LDFLAGS) -o ''$$''@ ''$$''< \\ \n' >> ${DAMAKEFILE}
-COMMAND @echo -e '\tlib${DALIB}.a \\ \n' >> ${DAMAKEFILE}
-COMMAND @echo -e '\t${EXTRAROOTLIB} \\ \n' >> ${DAMAKEFILE}
-COMMAND @echo -e '\t$$(ROOTSYS)/lib/libRoot.a \\ \n' >> ${DAMAKEFILE}
-COMMAND @echo -e '\t$$(ROOTSYS)/lib/libfreetype.a $$(ROOTSYS)/lib/libpcre.a \\ \n' >> ${DAMAKEFILE}
-COMMAND @echo -e '\t${SYSLIBS} \\ \n' >> ${DAMAKEFILE}
-COMMAND @echo -e '\t$$(DAQDALIB) $$(MONITORLIBS) $$(AMOREDALIBS) \n' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t$$(LD) $$(LDFLAGS) ''$$''< -o ''$$''@ \\' >> ${DAMAKEFILE}
+COMMAND @echo -e '\tlib${DALIB}.a \\' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t${EXTRAROOTLIB} \\' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t$$(ROOTSYS)/lib/libRoot.a \\' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t$$(ROOTSYS)/lib/libfreetype.a $$(ROOTSYS)/lib/libpcre.a \\' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t${SYSLIBS} \\' >> ${DAMAKEFILE}
+COMMAND @echo -e '\t$$(DAQDALIB) $$(MONITORLIBS) $$(AMOREDALIBS) \\' >> ${DAMAKEFILE}
 COMMAND @echo "" >> ${DAMAKEFILE}
 COMMAND @echo "${DAMODULE}${SUBDAMODULE}${DANAME}da.o: ${DAMODULE}${SUBDAMODULE}${DANAME}da.cxx" >> ${DAMAKEFILE}
 COMMAND @echo '         $$(CXX) -c $$(CXXFLAGS) -I$$(DAQDADIR) ''$$''< -o ''$$''@' >> ${DAMAKEFILE}
@@ -337,15 +340,15 @@
 COMMAND @echo "It uses data from ${DAMODULE} detectors at run time." >> ${DASPECFILE}
 COMMAND @echo "Build requires: daqDAlib, date, AliRoot ${DAALIROOTRELEASE},ROOT ${DAROOTRELEASE}." >> ${DASPECFILE}
 COMMAND @echo "Runtime requires: date." >> ${DASPECFILE}
-COMMAND @echo "\"Contact: ${DACONTACT}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Link: ${DALINKPAGE}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Reference Run: ${DAREFRUN}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Run type: ${DARUNTYPE}\"" >> ${DASPECFILE}
-COMMAND @echo "\"DA type: ${DATYPE}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Number of events needed: ${DANUMBEROFEVENTS}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Input files: ${DAINPUTFILES}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Output files: ${DAOUTPUTFILES}\"" >> ${DASPECFILE}
-COMMAND @echo "\"Trigger types used: ${DATRIGGERTYPE}\"" >> ${DASPECFILE}
+COMMAND @echo "Contact: ${DACONTACT}" >> ${DASPECFILE}
+COMMAND @echo "Link: ${DALINKPAGE}" >> ${DASPECFILE}
+COMMAND @echo "Reference Run: ${DAREFRUN}" >> ${DASPECFILE}
+COMMAND @echo "Run type: ${DARUNTYPE}" >> ${DASPECFILE}
+COMMAND @echo "DA type: ${DATYPE}" >> ${DASPECFILE}
+COMMAND @echo "Number of events needed: ${DANUMBEROFEVENTS}" >> ${DASPECFILE}
+COMMAND @echo "Input files: ${DAINPUTFILES}" >> ${DASPECFILE}
+COMMAND @echo "Output files: ${DAOUTPUTFILES}" >> ${DASPECFILE}
+COMMAND @echo "Trigger types used: ${DATRIGGERTYPE}" >> ${DASPECFILE}
 COMMAND @echo "" >> ${DASPECFILE}
 COMMAND @echo '\#*****************************************************************' >> ${DASPECFILE}
 COMMAND @echo '\# Do not modify following scripts' >> ${DASPECFILE}
@@ -412,11 +415,11 @@
 COMMAND rm -rf junk
 COMMAND mkdir -p junk/SOURCES junk/SPECS junk/BUILD junk/RPMS junk/SRPMS
 COMMAND cp ${DATAR} junk/SOURCES
-COMMAND rpmbuild --quiet --define "_topdir ${ALICE_ROOT}/junk/" --nodeps -bb ${DASPECFILE}
-COMMAND find junk/ -name "${DAARC}-*.rpm" -exec cp -p {} . \;
+COMMAND rpmbuild --quiet --define "_topdir ${ALICE_ROOT}/junk" --nodeps -bb ${DASPECFILE}
+COMMAND find junk/ -name "${DAARC}-*.rpm" -exec cp -p {} . ;
 COMMAND rm -rf junk
 COMMAND echo "***** RPMS created and put ${ALICE_ROOT} folder *****"
-#WORKING_DIRECTORY ${ALICE_ROOT}
+
 )

@@ -426,17 +429,14 @@
 )
 target_link_libraries(${DAEXE} "-L" "lib${DALIB}.a" ${DAOBJ} ${EXTRAROOTLIB} "${ROOTALIBDIR}/libRoot.a" "${ROOTALIBDIR}/libfreetype.a" "${ROOTALIBDIR}/libpcre.a" ${SYSLIBS} ${DAQDALIB} ${MONITORLIBS} ${AMOREDALIBS})

-add_dependencies(${DAEXE} ${DASRC} DAOBJ_${DAEXE}_ ${BINPATH} ${LIBPATH} ${DALIB}.a ${DAQDALIB} ${EXTRAROOTLIB} )
-
-
-
+add_dependencies(${DAEXE} ${DASRC} DAOBJ_${DAEXE}_ ${BINPATH} ${LIBPATH} ${DALIB}.a ${DAQDALIB} ${EXTRAROOTLIB})

 add_custom_target(DAOBJ_${DAEXE}_
 )
 add_custom_command(
 TARGET DAOBJ_${DAEXE}_
 COMMAND echo "***** Compiling ${DASRC} *****"
-COMMAND g++ -c  -DLinux -DDATE_SYS=Linux -Dlong32="int" -Dlong64="long long" -DdatePointer="long" -I/date/rorc -I/date/runControl -I/date/readList -I/date/eventBuilder -I/date/banksManager -I/date/bufferManager -I/date/db -I/date/commonDefs -I/date/monitoring -I/date/infoLogger -I/date/logbook -I${DAQDADIR} -I${ALICE_ROOT}/RAW -I${CMAKE_BINARY_DIR}/include -I$ENV{ROOTSYS}/include ${mod} ${date_head} ${ALICE_ROOT}/${DASRC} -o ${DAOBJ}
+COMMAND g++ -c -DLinux -DDATE_SYS=Linux -Dlong32="int" -Dlong64="long long" -DdatePointer="long" -I/date/rorc -I/date/runControl -I/date/readList -I/date/eventBuilder -I/date/banksManager -I/date/bufferManager -I/date/db -I/date/commonDefs -I/date/monitoring -I/date/infoLogger -I/date/logbook -I${DAQDADIR} -I${ALICE_ROOT}/RAW -I${CMAKE_BINARY_DIR}/include -I$ENV{ROOTSYS}/include ${mod} ${date_head} ${ALICE_ROOT}/${DASRC} -o ${DAOBJ}
 WORKING_DIRECTORY ${ALICE_ROOT}
 )
 add_dependencies(DAOBJ_${DAEXE}_ DADEP_${DAEXE}_ )
@@ -452,23 +452,10 @@
 )

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

 	endif(match)
   endforeach(dafile)


Improved searching for Oculus SDK libraries.

--- cmake/FindOVR.cmake
+++ cmake/FindOVR.cmake
@@ -120,16 +120,16 @@

 # Test 32/64 bits
 if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
+	set(_ovr_libname_bitsuffix "64")
 	set(_ovr_library_arch "x86_64")
 	if (WIN32)
 		set(_ovr_library_arch "x64")
-		set(_ovr_libname_bitsuffix "64")
 	endif(WIN32)
 else()
+	set(_ovr_libname_bitsuffix "32")
 	set(_ovr_library_arch "i386")
 	if (WIN32)
 		set(_ovr_library_arch "Win32")
-		set(_ovr_libname_bitsuffix "")
 	endif(WIN32)
 endif()

@@ -160,6 +160,7 @@
 list(APPEND _ovr_dynamic_library_names libOVRRT${_ovr_libname_bitsuffix}.so.5)
 list(APPEND _ovr_dynamic_library_names libOVRRT${_ovr_libname_bitsuffix}_0.so.5)
 list(APPEND _ovr_static_library_names libovr.ax${_ovr_libname_bitsuffix})
+list(APPEND _ovr_static_library_names libovr.a)
 list(APPEND _ovr_static_library_names ovr)
 list(APPEND _ovr_static_library_names OVR)
 list(APPEND _ovr_static_library_names LibOVR)
@@ -168,6 +169,7 @@
 list(APPEND _ovr_dynamic_library_debug_names OVRRT${_ovr_libname_bitsuffix}_0)
 list(APPEND _ovr_dynamic_library_debug_names libOVRRT${_ovr_libname_bitsuffix}.so.5)
 list(APPEND _ovr_dynamic_library_debug_names libOVRRT${_ovr_libname_bitsuffix}_0.so.5)
+list(APPEND _ovr_static_library_debug_names libovr.a)
 list(APPEND _ovr_static_library_debug_names ovr)
 list(APPEND _ovr_static_library_debug_names OVR)
 list(APPEND _ovr_static_library_debug_names LibOVR)
@@ -183,6 +185,8 @@
 	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_paths}
+	lib
+	lib64
 )

 find_library(OVR_DYNAMIC_LIBRARY_DEBUG
@@ -194,6 +198,8 @@
 	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_debug_paths}
+	lib
+	lib64
 )

 find_library(OVR_STATIC_LIBRARY_RELEASE
@@ -205,6 +211,8 @@
 	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_paths}
+	lib
+	lib64
 )

 find_library(OVR_STATIC_LIBRARY_DEBUG
@@ -216,6 +224,8 @@
 	c:/tools/oculus-sdk.install/OculusSDK/LibOVR
 	PATH_SUFFIXES
 	${_ovr_library_debug_paths}
+	lib
+	lib64
 )

 # Prefer dynamic libraries over static libraries
@@ -267,6 +277,7 @@
 	PATH_SUFFIXES
 	Src
 	Include
+	include
 )

 # Dependencies
@@ -327,7 +338,7 @@
 )

 if(OVR_FOUND)
-	set(OVR_LIBRARIES ${OVR_LIBRARY} ${_ovr_dependency_libraries})
+	set(OVR_LIBRARIES ${OVR_LIBRARY} ${_ovr_dependency_libraries} ${CMAKE_DL_LIBS})
 	set(OVR_INCLUDE_DIRS ${OVR_INCLUDE_DIR} ${OVR_SOURCE_DIR} ${_ovr_dependency_includes})
 	mark_as_advanced(OVR_ROOT_DIR)
 endif()


fix typo in cmake file for TBB

fix typo in cmake file for TBB

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -77,8 +77,8 @@
     endif(MSVC10)
     if(MSVC12)
         set(_TBB_COMPILER "vc12")
-    endif(MSVC10)
-    if(MSVC10)
+    endif(MSVC12)
+    if(MSVC14)
         set(_TBB_COMPILER "vc14")
     endif(MSVC14)
     # Todo: add other Windows compilers such as ICL.


mingw32 needs libgcc statically linked...

--- cmake/mingw32.cmake
+++ cmake/mingw32.cmake
@@ -15,3 +15,5 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

+# We want libgcc being statically linked. Everything else is annoying
+set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -static-libgcc")


boards: px4_fmu-v4_test remove deleted drivers/tap_esc

--- boards/px4/fmu-v4/test.cmake
+++ boards/px4/fmu-v4/test.cmake
@@ -50,7 +50,6 @@
 		rpm
 		safety_button
 		smart_battery/batmon
-		tap_esc
 		telemetry # all available telemetry drivers
 		test_ppm
 		tone_alarm


packaging: change debian shlibs policy to ">="

--- scripts/cmake/Modules/PackagingDebian.cmake
+++ scripts/cmake/Modules/PackagingDebian.cmake
@@ -19,6 +19,7 @@
 set (CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS "ON")
 set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS "ON")
 set (CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS "ON")
+set (CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS_POLICY ">=")

 set (CPACK_DEBIAN_LIBELEKTRA${SO_VERSION}_PACKAGE_NAME "${CPACK_COMPONENT_LIBELEKTRA${SO_VERSION}_DISPLAY_NAME}")
 set (CPACK_DEBIAN_LIBELEKTRA${SO_VERSION}_PACKAGE_SECTION "libs")


Use native PATH environment-variable separator on Windows for PYTHONPATH. Fixes 'Bad address' error in cmake.

Signed-off-by: William D. Jones <9a1de6cb16eb8668c16e2b606355fd4b19d336ae@comcast.net>

--- ecp5/family.cmake
+++ ecp5/family.cmake
@@ -18,7 +18,11 @@
 add_library(ecp5_chipdb OBJECT ecp5/chipdbs/)
 target_compile_definitions(ecp5_chipdb PRIVATE NEXTPNR_NAMESPACE=nextpnr_${family})
 target_include_directories(ecp5_chipdb PRIVATE ${family}/)
+if (WIN32)
+set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=\"${TRELLIS_ROOT}/libtrellis\;${TRELLIS_ROOT}/util/common\"")
+else()
 set(ENV_CMD ${CMAKE_COMMAND} -E env "PYTHONPATH=${TRELLIS_ROOT}/libtrellis:${TRELLIS_ROOT}/util/common")
+endif()
 if (MSVC)
     target_sources(ecp5_chipdb PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ecp5/resource/embed.cc)
     set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ecp5/resources/chipdb.rc PROPERTIES LANGUAGE RC)


Bump to 1.7.3

Bump to 1.7.3

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "2")
+SET(LIBREPO_PATCH "3")


Corrected a typo in CMake script

Corrected a typo in CMake script

--- cmake/FindChronoEngine.cmake
+++ cmake/FindChronoEngine.cmake
@@ -279,7 +279,7 @@
           PATHS ${CH_LIBDIR_DEBUG}
           )

-        SET(HRONOENGINE_LIBRARY_PYPARSER "")
+        SET(CHRONOENGINE_LIBRARY_PYPARSER "")
         IF(CHRONOENGINE_LIBRARY_PYPARSER_RELEASE)
           SET(CHRONOENGINE_LIBRARY_PYPARSER
             ${CHRONOENGINE_LIBRARY_PYPARSER}


Fixes in FindHDF5.cmake for Intel Xeon Phi.

Before, -lz -ldl -lm -lrt would be turned into absolute paths. This doesn't work
for the Xeon Phi where we need to cross-compile. The Intel compiler
automatically adds the libraries with the correct architecture as long as -l
arguments are passed as is.

--- cmake/Modules/FindHDF5.cmake
+++ cmake/Modules/FindHDF5.cmake
@@ -292,12 +292,8 @@
         mark_as_advanced( HDF5_${LANGUAGE}_INCLUDE_DIR )
         list( APPEND HDF5_INCLUDE_DIRS ${HDF5_${LANGUAGE}_INCLUDE_DIR} )

-        set( HDF5_${LANGUAGE}_LIBRARY_NAMES
-            ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT}
-            ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
-
         # find the HDF5 libraries
-        foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
+        foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT} )
             if( UNIX AND HDF5_USE_STATIC_LIBRARIES )
                 # According to bug 1643 on the CMake bug tracker, this is the
                 # preferred method for searching for a static library.
@@ -325,6 +321,14 @@
         endforeach()
         list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )

+        # When the wrapper lists a library with -l, e.g. -lz, simply use it as
+        # is. If find_library is called for these libraries, you end up with
+        # local libraries that will not be suitable when cross-compiling for the
+        # Intel Xeon Phi.
+        foreach(LIBNAME ${HDF5_${LANGUAGE}_LIBRARY_NAMES})
+          list(APPEND HDF5_${LANGUAGE}_LIBRARIES "-l${LIBNAME}")
+        endforeach()
+
         # Append the libraries for this language binding to the list of all
         # required libraries.
         list(APPEND HDF5_LIBRARIES ${HDF5_${LANGUAGE}_LIBRARIES})


Variables are case-sensitive.

Variables are case-sensitive.

You only see this on platforms like NetBSD where /usr/pkg is not even
close to being included in the compiler's default paths.

--- cmake/Modules/frontend.cmake
+++ cmake/Modules/frontend.cmake
@@ -7,7 +7,7 @@
 	if(LIBCACA_ENABLE)
 		find_package(libcaca REQUIRED)
 		set(HAVE_LIBCACA 1)
-		include_directories(${LIBCACA_INCLUDE_DIR})
+		include_directories(${libcaca_INCLUDE_DIR})

 		file(GLOB LIBCACA_FRONTEND_SOURCES src/frontends/caca/*.c)
 		add_executable("sgherm-caca" ${LIBCACA_FRONTEND_SOURCES} $<TARGET_OBJECTS:sgherm-core>)


CMake: Fix broken revision parsing code (#963)

--- cmake/Modules/git_tags.cmake
+++ cmake/Modules/git_tags.cmake
@@ -19,7 +19,9 @@
     execute_process(
         COMMAND ${GIT_EXECUTABLE} rev-parse --verify HEAD
         RESULT_VARIABLE result
-        OUTPUT_VARIABLE HASH)
+        OUTPUT_VARIABLE HASH
+        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
     string(STRIP ${HASH} HASH)
     set(NGRAPH_CURRENT_HASH ${HASH} PARENT_SCOPE)
 endfunction()
@@ -29,7 +31,9 @@
     execute_process(
         COMMAND ${GIT_EXECUTABLE} ls-remote --tags
         RESULT_VARIABLE RESULT
-        OUTPUT_VARIABLE TAG_LIST)
+        OUTPUT_VARIABLE TAG_LIST
+        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
     NGRAPH_GET_CURRENT_HASH()

     string(REGEX MATCH "${NGRAPH_CURRENT_HASH}\t[^\r\n]*" TAG ${TAG_LIST})
@@ -45,7 +49,9 @@
     execute_process(
         COMMAND ${GIT_EXECUTABLE} describe --tags --abbrev=0
         RESULT_VARIABLE RESULT
-        OUTPUT_VARIABLE TAG)
+        OUTPUT_VARIABLE TAG
+        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
     string(STRIP ${TAG} TAG)
     set(NGRAPH_MOST_RECENT_RELEASE_TAG ${TAG} PARENT_SCOPE)
 endfunction()


OSX: make sure postbuild scripts adress the right dir for debug builds

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -217,11 +217,16 @@
 	set(LUXRAYS_NO_DEFAULT_CONFIG true)
 	set(LUXRAYS_CUSTOM_CONFIG Config_OSX)

+	if(NOT CMAKE_BUILD_TYPE) # Assure something is set, default is "Release"
+		SET(CMAKE_BUILD_TYPE Release)
+	endif(NOT CMAKE_BUILD_TYPE)
 	if(NOT ${CMAKE_GENERATOR} MATCHES "Xcode") # will be set later in XCode
 #		SET(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "assure config" FORCE)
 		# Setup binaries output directory in Xcode manner
 		SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE} CACHE PATH "per configuration" FORCE)
 		SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE} CACHE PATH "per configuration" FORCE)
+	else() # replace CMAKE_BUILD_TYPE with XCode env var $(CONFIGURATION) globally
+		SET(CMAKE_BUILD_TYPE "$(CONFIGURATION)" )
 	endif()
 	#### OSX-flags by jensverwiebe
 	ADD_DEFINITIONS(-Wall -DHAVE_PTHREAD_H -fvisibility=hidden -fvisibility-inlines-hidden) # global compile definitions


cmake: remove base_name for dep file

cmake: remove base_name for dep file

With CMake 3.20 relative path inside DEPFILEs are treated relative to
CMAKE_CURRENT_BINARY_DIR and are transformed by CMake in its internal
dep file.

Therefore Zephyr build system must no longer add `base_name` to the
`-MT` argument for the preprocessor.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/linker/ld/target.cmake
+++ cmake/linker/ld/target.cmake
@@ -67,7 +67,6 @@
     endif()

     zephyr_get_include_directories_for_lang(C current_includes)
-    get_filename_component(base_name ${CMAKE_CURRENT_BINARY_DIR} NAME)
     get_property(current_defines GLOBAL PROPERTY PROPERTY_LINKER_SCRIPT_DEFINES)

     add_custom_command(
@@ -81,7 +80,7 @@
       COMMAND ${CMAKE_C_COMPILER}
       -x assembler-with-cpp
       ${NOSYSDEF_CFLAG}
-      -MD -MF ${linker_script_gen}.dep -MT ${base_name}/${linker_script_gen}
+      -MD -MF ${linker_script_gen}.dep -MT ${linker_script_gen}
       -D_LINKER
       -D_ASMLANGUAGE
       -imacros ${AUTOCONF_H}


[OCaml] Pass -D/-UNDEBUG through to ocamlc

Detect [/-][DU]NDEBUG in CMAKE_C_FLAGS* and pass them through to ocamlc.
This is necessary because their value might affect visibility of dump
functions in LLVM and ocamlc uses its own compiler and flags by default.

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

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

--- cmake/modules/AddOCaml.cmake
+++ cmake/modules/AddOCaml.cmake
@@ -87,6 +87,11 @@
   foreach( include_dir ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR} )
     set(c_flags "${c_flags} -I${include_dir}")
   endforeach()
+  # include -D/-UNDEBUG to match dump function visibility
+  # regex from HandleLLVMOptions.cmake
+  string(REGEX MATCH "(^| )[/-][UD] *NDEBUG($| )" flag_matches
+         "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${CMAKE_C_FLAGS}")
+  set(c_flags "${c_flags} ${flag_matches}")

   foreach( ocaml_file ${ARG_OCAML} )
     list(APPEND sources "${ocaml_file}.mli" "${ocaml_file}.ml")


[CMake with Swift] Set rpath for stage != 0 bootstrapping builds.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -577,6 +577,9 @@
       if (NOT "${bootstrapping}" STREQUAL "1")
         if(${SWIFT_HOST_VARIANT_SDK} IN_LIST SWIFT_DARWIN_PLATFORMS)
           target_link_directories(${target} PRIVATE "${sdk_dir}")
+
+          # Include the abi stable system stdlib in our rpath.
+         set(swift_runtime_rpath "/usr/lib/swift")
         endif()
       endif()
     endif()


build: clean up the mac catalyst flag handling in the host

The toolchain does not actually use any catalyst flavor, which resulted
in these paths actually being dead.  Cull them except for the one path
which simply computes the target triple.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -89,9 +89,6 @@
     ""
     ${ARGN})

-  get_maccatalyst_build_flavor(maccatalyst_build_flavor
-    "${SWFIT_HOST_VARIANT_SDK}" "")
-
   set(result ${${CFLAGS_RESULT_VAR_NAME}})

   is_darwin_based_sdk("${SWIFT_HOST_VARIANT_SDK}" IS_DARWIN)
@@ -102,12 +99,9 @@
   # MSVC, clang-cl, gcc don't understand -target.
   if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT SWIFT_COMPILER_IS_MSVC_LIKE)
     get_target_triple(target target_variant "${SWIFT_HOST_VARIANT_SDK}" "${SWIFT_HOST_VARIANT_ARCH}"
-      MACCATALYST_BUILD_FLAVOR "${maccatalyst_build_flavor}"
+      MACCATALYST_BUILD_FLAVOR ""
       DEPLOYMENT_VERSION "${DEPLOYMENT_VERSION}")
     list(APPEND result "-target" "${target}")
-    if(target_variant)
-      list(APPEND result "-target-variant" "${target_variant}")
-    endif()
   endif()

   set(_sysroot
@@ -133,21 +127,8 @@
     # side effects are introduced should a new search path be added.
     list(APPEND result
       "-arch" "${SWIFT_HOST_VARIANT_ARCH}"
-      "-F${SWIFT_SDK_${SWIFT_HOST_VARIANT_ARCH}_PATH}/../../../Developer/Library/Frameworks")
-
-    set(add_explicit_version TRUE)
-
-    # iOS-like and zippered libraries get their deployment version from the
-    # target triple
-    if(maccatalyst_build_flavor STREQUAL "ios-like" OR
-        maccatalyst_build_flavor STREQUAL "zippered")
-      set(add_explicit_version FALSE)
-    endif()
-
-    if(add_explicit_version)
-      list(APPEND result
-        "-m${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_VERSION_MIN_NAME}-version-min=${DEPLOYMENT_VERSION}")
-     endif()
+      "-F${SWIFT_SDK_${SWIFT_HOST_VARIANT_ARCH}_PATH}/../../../Developer/Library/Frameworks"
+      "-m${SWIFT_SDK_${SWIFT_HOST_VARIANT_SDK}_VERSION_MIN_NAME}-version-min=${DEPLOYMENT_VERSION}")
   endif()

   if(CFLAGS_ANALYZE_CODE_COVERAGE)
@@ -432,9 +413,6 @@
         "SHELL:-Xlinker -dead_strip")
     endif()
   endif()
-
-  get_maccatalyst_build_flavor(maccatalyst_build_flavor
-    "${SWIFT_HOST_VARIANT_SDK}" "")
 endfunction()

 # Add a single variant of a new Swift library.


Undefine IB macros when building libswift

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -730,7 +730,8 @@

   set(libswift_compile_options
       "-Xfrontend" "-validate-tbd-against-ir=none"
-      "-Xfrontend" "-enable-cxx-interop")
+      "-Xfrontend" "-enable-cxx-interop"
+      "-Xcc" "-UIBOutlet" "-Xcc" "-UIBAction" "-Xcc" "-UIBInspectable")

   if(CMAKE_BUILD_TYPE STREQUAL Debug)
     list(APPEND libswift_compile_options "-g")


Add asan.so.5 to cmake script. (#4999)

Add asan.so.5 to cmake script. (#4999)

--- cmake/modules/FindASan.cmake
+++ cmake/modules/FindASan.cmake
@@ -1,7 +1,7 @@
 set(ASan_LIB_NAME ASan)

 find_library(ASan_LIBRARY
-  NAMES libasan.so libasan.so.4 libasan.so.3 libasan.so.2 libasan.so.1 libasan.so.0
+  NAMES libasan.so libasan.so.5 libasan.so.4 libasan.so.3 libasan.so.2 libasan.so.1 libasan.so.0
   PATHS ${SANITIZER_PATH} /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib ${CMAKE_PREFIX_PATH}/lib)

 include(FindPackageHandleStandardArgs)


cmake: rewrite FindDBus.cmake to do things in a more modern and consistent way

--- cmake/modules/FindDBus.cmake
+++ cmake/modules/FindDBus.cmake
@@ -2,10 +2,12 @@
 # Once done this will define
 #
 #  DBUS_FOUND - system has D-Bus
+#  DBUS_INCLUDE_DIRS - the D-Bus include directories
 #  DBUS_INCLUDE_DIR - the D-Bus include directory
 #  DBUS_ARCH_INCLUDE_DIR - the D-Bus architecture-specific include directory
 #  DBUS_LIBRARIES - the libraries needed to use D-Bus

+# Copyright (c) 2012, George Kiagiadakis <kiagiadakis.george@gmail.com>
 # Copyright (c) 2008, Kevin Kofler, <kevin.kofler@chello.at>
 # modeled after FindLibArt.cmake:
 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
@@ -13,60 +15,29 @@
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+find_package(PkgConfig)
+if (PKG_CONFIG_FOUND)
+    pkg_check_modules(PC_DBUS dbus-1)
+endif (PKG_CONFIG_FOUND)

-  # in cache already
-  SET(DBUS_FOUND TRUE)
+find_path(DBUS_INCLUDE_DIR dbus/dbus.h
+    PATHS ${PC_DBUS_INCLUDE_DIRS}
+    PATH_SUFFIXES dbus-1.0
+)

-else (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+find_path(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h
+    PATHS ${PC_DBUS_INCLUDE_DIRS}
+    HINTS ${CMAKE_LIBRARY_PATH}/dbus-1.0/include
+          ${CMAKE_SYSTEM_LIBRARY_PATH}/dbus-1.0/include
+)

-  IF (NOT WIN32)
-    FIND_PACKAGE(PkgConfig)
-    IF (PKG_CONFIG_FOUND)
-      # use pkg-config to get the directories and then use these values
-      # in the FIND_PATH() and FIND_LIBRARY() calls
-      pkg_check_modules(_DBUS_PC dbus-1)
-    ENDIF (PKG_CONFIG_FOUND)
-  ENDIF (NOT WIN32)
+find_library(DBUS_LIBRARIES NAMES dbus-1
+    PATHS ${PC_DBUS_LIBRARY_DIRS}
+)

-  FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h
-    ${_DBUS_PC_INCLUDE_DIRS}
-    /usr/include
-    /usr/include/dbus-1.0
-    /usr/local/include
-  )
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(DBus DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)

-  FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h
-    ${_DBUS_PC_INCLUDE_DIRS}
-    /usr/lib${LIB_SUFFIX}/include
-    /usr/lib${LIB_SUFFIX}/dbus-1.0/include
-    /usr/lib64/include
-    /usr/lib64/dbus-1.0/include
-    /usr/lib/include
-    /usr/lib/dbus-1.0/include
-  )
+set(DBUS_INCLUDE_DIRS ${DBUS_INCLUDE_DIR} ${DBUS_ARCH_INCLUDE_DIR})

-  FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 dbus
-    PATHS
-     ${_DBUS_PC_LIBDIR}
-  )
-
-
-  if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
-     set(DBUS_FOUND TRUE)
-  endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
-
-
-  if (DBUS_FOUND)
-     if (NOT DBus_FIND_QUIETLY)
-        message(STATUS "Found D-Bus: ${DBUS_LIBRARIES}")
-     endif (NOT DBus_FIND_QUIETLY)
-  else (DBUS_FOUND)
-     if (DBus_FIND_REQUIRED)
-        message(FATAL_ERROR "Could NOT find D-Bus")
-     endif (DBus_FIND_REQUIRED)
-  endif (DBUS_FOUND)
-
-  MARK_AS_ADVANCED(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)
-
-endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+mark_as_advanced(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)


Fix install artefact path

Fix install artefact path

--- cmake/scripts/wire2lua.cmake
+++ cmake/scripts/wire2lua.cmake
@@ -41,7 +41,7 @@
     )
     if(LINUX)
         install(
-            FILES ${OUTPUT}
+            FILES ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT}
             DESTINATION "${WIRESHARK_ROOT_DIR}/wire_plugins"
         )
     endif()


Don't include UseVXL.cmake

Don't include UseVXL.cmake

--- cmake/snippets/depends.cmake
+++ cmake/snippets/depends.cmake
@@ -37,7 +37,6 @@
 ########################################

 find_package(VXL REQUIRED)
-include(${VXL_CMAKE_DIR}/UseVXL.cmake)

 include_directories(SYSTEM ${VXL_CORE_INCLUDE_DIR})
 include_directories(SYSTEM ${VXL_VCL_INCLUDE_DIR})


src-dependencies: don't specify the JPEG version we are looking for.

The non-turbo JPEG has version 9, so it always matches,
and there is no check that we found libjpeg-turbo.
Also, macports default to non--turbo version.
So for now let's just not specify the version.

--- cmake/src-dependencies.cmake
+++ cmake/src-dependencies.cmake
@@ -145,7 +145,7 @@
 unset(HAVE_JPEG)
 if(WITH_JPEG)
   message(STATUS "Looking for JPEG")
-  find_package(JPEG 1.5.0) # libjpeg-turbo
+  find_package(JPEG)
   if(NOT JPEG_FOUND)
     message(SEND_ERROR "Did not find JPEG! Either make it find JPEG, or pass -DWITH_JPEG=OFF to disable JPEG.")
   else()


arch: arc: use default optimization flag

The work-around previously setting ARC builds to use -O2 to fix an
ADC bug #3797 is no longer needed, we should this patch and revert
to the default -Os flag to optimize for smaller size.

Signed-off-by: Jimmy Huang <17b2f82a731dc28428cf577995da8b43f2f13d79@intel.com>

--- cmake/toolchain-zephyr.cmake
+++ cmake/toolchain-zephyr.cmake
@@ -30,11 +30,6 @@

   LIST(APPEND TOOLCHAIN_LIBS hal)
   LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
-
-elseif("${ARCH}" STREQUAL "arc")
-  # https://github.com/zephyrproject-rtos/zephyr/issues/3797
-  # -Os is broken on arc
-  set(OPTIMIZE_FOR_SIZE_FLAG "-O2")
 endif()

 set(CROSS_COMPILE ${TOOLCHAIN_HOME}/usr/bin/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_TARGET}-)


idl-config: create_client_lib: Add dependency from sources to generated cpp.

Needed if a generated header is in the list.

Change-Id: Id98d94f11facae5af0b682cf65703e7f2302ac0e

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -97,7 +97,7 @@
     # we need to find the IDL file for proper dependency tracking
     qi_find_idl_for(${c} idlfile)
     qi_generate_src(${target}
-      SRC ${idlfile}
+      SRC ${idlfile} ${ARG_SRC}
       COMMAND  ${_python_executable} ${IDL}
       --prefix ${ARG_PREFIX} # IDLS might be around here
       --search-path "${search_path}"


changed: indentation

changed: indentation

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

--- CMake/ConfigurePackages.cmake
+++ CMake/ConfigurePackages.cmake
@@ -1,346 +1,346 @@

 MACRO(OSG_CONFIGURE_ZLIB)

-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
-
-    OSG_FIND_PACKAGE(ZLIB)
-
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+
+        OSG_FIND_PACKAGE(ZLIB)
+
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/zlib.h)
-	  SET(ZLIB_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
-	ENDIF()
-
-	IF(OSG_USE_STATIC_SUPPORT_LIBS)
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgzlib.lib)
-        SET(ZLIB_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgzlib.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgzlibD.lib)
-        SET(ZLIB_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgzlibD.lib)
-	  ENDIF()
+	    SET(ZLIB_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
+	ENDIF()
+
+	IF(OSG_USE_STATIC_SUPPORT_LIBS)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgzlib.lib)
+                SET(ZLIB_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgzlib.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgzlibD.lib)
+                SET(ZLIB_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgzlibD.lib)
+	    ENDIF()
 	ELSE()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgzlib.lib)
-        SET(ZLIB_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgzlib.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgzlibD.lib)
-        SET(ZLIB_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgzlibD.lib)
-	  ENDIF()
-	ENDIF()
-
-    OSG_ADD_LIB_TARGET(OSG_ZLIB_TARGETS ZLIB_LIBRARY)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgzlib.lib)
+                SET(ZLIB_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgzlib.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgzlibD.lib)
+                SET(ZLIB_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgzlibD.lib)
+	    ENDIF()
+	ENDIF()
+
+        OSG_ADD_LIB_TARGET(OSG_ZLIB_TARGETS ZLIB_LIBRARY)
 	SET(ZLIB_LIBRARIES ${OSG_ZLIB_TARGETS} CACHE STRING "" FORCE)

 	IF(ZLIB_INCLUDE_DIR)
-	  IF(ZLIB_LIBRARY_DEBUG OR ZLIB_LIBRARY_RELEASE)
-	    SET(ZLIB_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(ZLIB_LIBRARY_DEBUG OR ZLIB_LIBRARY_RELEASE)
+	        SET(ZLIB_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)

 ENDMACRO(OSG_CONFIGURE_ZLIB)

 MACRO(OSG_CONFIGURE_GLUT)

-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
-
-    OSG_FIND_PACKAGE(GLUT)
-
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+
+        OSG_FIND_PACKAGE(GLUT)
+
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/GL/glut.h)
-	  SET(GLUT_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
-	ENDIF()
-
-	IF(OSG_USE_STATIC_SUPPORT_LIBS)
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgfreeglut.lib)
-        SET(GLUT_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgfreeglut.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgfreeglutD.lib)
-        SET(GLUT_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgfreeglutD.lib)
-	  ENDIF()
+	    SET(GLUT_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
+	ENDIF()
+
+	IF(OSG_USE_STATIC_SUPPORT_LIBS)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgfreeglut.lib)
+                SET(GLUT_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgfreeglut.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgfreeglutD.lib)
+                SET(GLUT_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgfreeglutD.lib)
+	    ENDIF()
 	ELSE()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgfreeglut.lib)
-        SET(GLUT_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgfreeglut.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgfreeglutD.lib)
-        SET(GLUT_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgfreeglutD.lib)
-	  ENDIF()
-	ENDIF()
-
-    OSG_ADD_LIB_TARGET(OSG_GLUT_TARGETS GLUT_LIBRARY)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgfreeglut.lib)
+                SET(GLUT_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgfreeglut.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgfreeglutD.lib)
+                SET(GLUT_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgfreeglutD.lib)
+	    ENDIF()
+	ENDIF()
+
+        OSG_ADD_LIB_TARGET(OSG_GLUT_TARGETS GLUT_LIBRARY)
 	SET(GLUT_LIBRARIES ${OSG_GLUT_TARGETS} CACHE STRING "" FORCE)

 	IF(GLUT_INCLUDE_DIR)
-	  IF(GLUT_LIBRARY_DEBUG OR GLUT_LIBRARY_RELEASE)
-	    SET(GLUT_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(GLUT_LIBRARY_DEBUG OR GLUT_LIBRARY_RELEASE)
+	        SET(GLUT_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)

 ENDMACRO(OSG_CONFIGURE_GLUT)

 MACRO(OSG_CONFIGURE_PNG)

-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
-    OSG_FIND_PACKAGE(PNG)
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+        OSG_FIND_PACKAGE(PNG)
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/png.h)
-	  SET(PNG_PNG_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
-	ENDIF()
-
-	IF(OSG_USE_STATIC_SUPPORT_LIBS)
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpng.lib)
-        SET(PNG_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgpng.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpngD.lib)
-        SET(PNG_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgpngD.lib)
-	  ENDIF()
+	    SET(PNG_PNG_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
+	ENDIF()
+
+	IF(OSG_USE_STATIC_SUPPORT_LIBS)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpng.lib)
+                SET(PNG_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgpng.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpngD.lib)
+                SET(PNG_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgpngD.lib)
+	    ENDIF()
 	ELSE()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgpng.lib)
-        SET(PNG_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgpng.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgpngD.lib)
-        SET(PNG_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgpngD.lib)
-	  ENDIF()
-	ENDIF()
-
-    OSG_ADD_LIB_TARGET(OSG_PNG_TARGETS PNG_LIBRARY)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgpng.lib)
+                SET(PNG_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgpng.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgpngD.lib)
+                SET(PNG_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgpngD.lib)
+	    ENDIF()
+	ENDIF()
+
+        OSG_ADD_LIB_TARGET(OSG_PNG_TARGETS PNG_LIBRARY)
 	SET(PNG_LIBRARIES ${OSG_PNG_TARGETS} CACHE STRING "" FORCE)

 	IF(PNG_PNG_INCLUDE_DIR)
-	  IF(PNG_LIBRARY_DEBUG OR PNG_LIBRARY_RELEASE)
-	    SET(PNG_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(PNG_LIBRARY_DEBUG OR PNG_LIBRARY_RELEASE)
+	        SET(PNG_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)

 ENDMACRO(OSG_CONFIGURE_PNG)

 MACRO(OSG_CONFIGURE_TIFF)

-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
-    OSG_FIND_PACKAGE(TIFF)
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+        OSG_FIND_PACKAGE(TIFF)
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/tiff.h)
-	  SET(TIFF_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
-	ENDIF()
-
-	IF(OSG_USE_STATIC_SUPPORT_LIBS)
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgtiff.lib)
-        SET(TIFF_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgtiff.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgtiffD.lib)
-        SET(TIFF_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgtiffD.lib)
-	  ENDIF()
+	    SET(TIFF_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
+	ENDIF()
+
+	IF(OSG_USE_STATIC_SUPPORT_LIBS)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgtiff.lib)
+                SET(TIFF_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgtiff.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgtiffD.lib)
+                SET(TIFF_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgtiffD.lib)
+	    ENDIF()
 	ELSE()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgtiff.lib)
-        SET(TIFF_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgtiff.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgtiffD.lib)
-        SET(TIFF_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgtiffD.lib)
-	  ENDIF()
-	ENDIF()
-
-    OSG_ADD_LIB_TARGET(OSG_TIFF_TARGETS TIFF_LIBRARY)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgtiff.lib)
+                SET(TIFF_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgtiff.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgtiffD.lib)
+                SET(TIFF_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgtiffD.lib)
+	    ENDIF()
+	ENDIF()
+
+        OSG_ADD_LIB_TARGET(OSG_TIFF_TARGETS TIFF_LIBRARY)
 	SET(TIFF_LIBRARIES ${OSG_TIFF_TARGETS} CACHE STRING "" FORCE)

 	IF(TIFF_INCLUDE_DIR)
-	  IF(TIFF_LIBRARY_DEBUG OR TIFF_LIBRARY_RELEASE)
-	    SET(TIFF_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(TIFF_LIBRARY_DEBUG OR TIFF_LIBRARY_RELEASE)
+	        SET(TIFF_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)

 ENDMACRO(OSG_CONFIGURE_TIFF)

 MACRO(OSG_CONFIGURE_OPENEXR)

-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
         OSG_FIND_PACKAGE(OpenEXR)
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/OpenEXR/ImfIO.h)
-	  SET(OPENEXR_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include;${OSG_SUPPORT_ROOT}/include/OpenEXR CACHE PATH "" FORCE)
-	ENDIF()
-
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmimf.lib)
-      SET(OPENEXR_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgilmimf.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmimfD.lib)
-      SET(OPENEXR_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgilmimfD.lib)
-	ENDIF()
-
-#      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
-#        SET(OPENEXR__LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/)
-#     ENDIF()
-#      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
-#        SET(OPENEXR__LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/)
-#     ENDIF()
-
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmthread.lib)
-      SET(OPENEXR_ILMTHREAD_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgilmthread.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmthreadD.lib)
-      SET(OPENEXR_ILMTHREAD_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgilmthreadD.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgIex.lib)
-      SET(OPENEXR_IEX_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgIex.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgIexD.lib)
-      SET(OPENEXR_IEX_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgIexD.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgHalf.lib)
-      SET(OPENEXR_HALF_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgHalf.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgHalfD.lib)
-      SET(OPENEXR_HALF_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgHalfD.lib)
-    ENDIF()
-
-    OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_LIBRARY)
-    OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_ILMTHREAD_LIBRARY)
-    OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_IEX_LIBRARY)
-    OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_HALF_LIBRARY)
+	    SET(OPENEXR_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include;${OSG_SUPPORT_ROOT}/include/OpenEXR CACHE PATH "" FORCE)
+	ENDIF()
+
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmimf.lib)
+            SET(OPENEXR_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgilmimf.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmimfD.lib)
+            SET(OPENEXR_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgilmimfD.lib)
+	ENDIF()
+
+        #      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
+        #        SET(OPENEXR__LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/)
+        #     ENDIF()
+        #      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
+        #        SET(OPENEXR__LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/)
+        #     ENDIF()
+
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmthread.lib)
+            SET(OPENEXR_ILMTHREAD_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgilmthread.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgilmthreadD.lib)
+            SET(OPENEXR_ILMTHREAD_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgilmthreadD.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgIex.lib)
+            SET(OPENEXR_IEX_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgIex.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgIexD.lib)
+            SET(OPENEXR_IEX_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgIexD.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgHalf.lib)
+            SET(OPENEXR_HALF_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgHalf.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgHalfD.lib)
+            SET(OPENEXR_HALF_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgHalfD.lib)
+        ENDIF()
+
+        OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_LIBRARY)
+        OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_ILMTHREAD_LIBRARY)
+        OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_IEX_LIBRARY)
+        OSG_ADD_LIB_TARGET(OSG_OPENEXR_TARGETS OPENEXR_HALF_LIBRARY)

 	SET(OPENEXR_LIBRARIES ${OSG_OPENEXR_TARGETS} CACHE STRING "" FORCE)

 	IF(OPENEXR_INCLUDE_DIR)
-	  IF(OPENEXR_LIBRARY_DEBUG OR OPENEXR_LIBRARY_RELEASE)
-	    SET(OPENEXR_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(OPENEXR_LIBRARY_DEBUG OR OPENEXR_LIBRARY_RELEASE)
+	        SET(OPENEXR_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)

 ENDMACRO(OSG_CONFIGURE_OPENEXR)

 MACRO(OSG_CONFIGURE_JPEG)

-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
-    OSG_FIND_PACKAGE(JPEG)
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+        OSG_FIND_PACKAGE(JPEG)
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/jpeglib.h)
-	  SET(JPEG_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
-	ENDIF()
-
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgjpg.lib)
-      SET(JPEG_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgjpg.lib)
-    ENDIF()
-    IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgjpgD.lib)
-      SET(JPEG_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgjpgD.lib)
-	ENDIF()
-
-    OSG_ADD_LIB_TARGET(OSG_JPEG_TARGETS JPEG_LIBRARY)
+	    SET(JPEG_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
+	ENDIF()
+
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgjpg.lib)
+            SET(JPEG_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgjpg.lib)
+        ENDIF()
+        IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgjpgD.lib)
+            SET(JPEG_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgjpgD.lib)
+	ENDIF()
+
+        OSG_ADD_LIB_TARGET(OSG_JPEG_TARGETS JPEG_LIBRARY)
 	SET(JPEG_LIBRARIES ${OSG_JPEG_TARGETS} CACHE STRING "" FORCE)

 	IF(JPEG_INCLUDE_DIR)
-	  IF(JPEG_LIBRARY_DEBUG OR JPEG_LIBRARY_RELEASE)
-	    SET(JPEG_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(JPEG_LIBRARY_DEBUG OR JPEG_LIBRARY_RELEASE)
+	        SET(JPEG_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)

 ENDMACRO(OSG_CONFIGURE_JPEG)

 MACRO(OSG_CONFIGURE_COLLADA)
-  IF(NOT OSG_USE_OSGSUPPORT_LIBS)
-
-    FIND_PACKAGE(Collada)
-
-  ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)
+    IF(NOT OSG_USE_OSGSUPPORT_LIBS)
+
+        FIND_PACKAGE(Collada)
+
+    ELSE(NOT OSG_USE_OSGSUPPORT_LIBS)

 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/dae.h)
-	  SET(COLLADA_DAE_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
+	    SET(COLLADA_DAE_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include CACHE PATH "" FORCE)
 	ENDIF()
 	IF(EXISTS ${OSG_SUPPORT_ROOT}/include/1.4/dom/domTypes.h)
-	  SET(COLLADA_DOM_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include/1.4 CACHE PATH "" FORCE)
-	ENDIF()
-
-	IF(OSG_USE_STATIC_SUPPORT_LIBS)
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22.lib)
-        SET(COLLADA_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22D.lib)
-        SET(COLLADA_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22D.lib)
-	  ENDIF()
-
-#      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
-#        SET(COLLADA_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/)
-#	  ENDIF()
-#      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
-#        SET(COLLADA_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/)
-#	  ENDIF()
-
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgxml2.lib)
-        SET(COLLADA_XML2_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgxml2.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgxml2D.lib)
-        SET(COLLADA_XML2_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgxml2D.lib)
-	  ENDIF()
-
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcrecpp.lib)
-        SET(COLLADA_PCRECPP_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgpcrecpp.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcrecppD.lib)
-        SET(COLLADA_PCRECPP_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgpcrecppD.lib)
-	  ENDIF()
-
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgminizip.lib)
-        SET(COLLADA_MINIZIP_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgminizip.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgminizipD.lib)
-        SET(COLLADA_MINIZIP_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgminizipD.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgiconv.lib)
-        SET(COLLADA_ICONV_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgiconv.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgiconvD.lib)
-        SET(COLLADA_ICONV_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgiconvD.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcre.lib)
-        SET(COLLADA_PCRE_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgpcre.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcreD.lib)
-        SET(COLLADA_PCRELIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgpcreD.lib)
-	  ENDIF()
+	    SET(COLLADA_DOM_INCLUDE_DIR ${OSG_SUPPORT_ROOT}/include/1.4 CACHE PATH "" FORCE)
+	ENDIF()
+
+	IF(OSG_USE_STATIC_SUPPORT_LIBS)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22.lib)
+                SET(COLLADA_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22D.lib)
+                SET(COLLADA_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgcollada14dom22D.lib)
+	    ENDIF()
+
+            #      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
+            #        SET(COLLADA_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/)
+            #	  ENDIF()
+            #      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/)
+            #        SET(COLLADA_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/)
+            #	  ENDIF()
+
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgxml2.lib)
+                SET(COLLADA_XML2_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgxml2.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgxml2D.lib)
+                SET(COLLADA_XML2_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgxml2D.lib)
+	    ENDIF()
+
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcrecpp.lib)
+                SET(COLLADA_PCRECPP_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgpcrecpp.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcrecppD.lib)
+                SET(COLLADA_PCRECPP_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgpcrecppD.lib)
+	    ENDIF()
+
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgminizip.lib)
+                SET(COLLADA_MINIZIP_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgminizip.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgminizipD.lib)
+                SET(COLLADA_MINIZIP_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgminizipD.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgiconv.lib)
+                SET(COLLADA_ICONV_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgiconv.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgiconvD.lib)
+                SET(COLLADA_ICONV_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgiconvD.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcre.lib)
+                SET(COLLADA_PCRE_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/libosgpcre.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/libosgpcreD.lib)
+                SET(COLLADA_PCRELIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/libosgpcreD.lib)
+	    ENDIF()
 	ELSE()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22.lib)
-        SET(COLLADA_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22.lib)
-	  ENDIF()
-      IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22D.lib)
-        SET(COLLADA_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22D.lib)
-	  ENDIF()
-	ENDIF()
-
-    SET(OSG_COLLADA_TARGETS )
-
-    OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_LIBRARY)
-
-	IF(OSG_USE_STATIC_SUPPORT_LIBS)
-      OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_XML2_LIBRARY)
-      OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_PCRECPP_LIBRARY)
-      OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_MINIZIP_LIBRARY)
-      OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_ICONV_LIBRARY)
-      OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_PCRE_LIBRARY)
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22.lib)
+                SET(COLLADA_LIBRARY_RELEASE ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22.lib)
+	    ENDIF()
+            IF(EXISTS ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22D.lib)
+                SET(COLLADA_LIBRARY_DEBUG ${OSG_SUPPORT_ROOT}/lib/osgcollada14dom22D.lib)
+	    ENDIF()
+	ENDIF()
+
+        SET(OSG_COLLADA_TARGETS )
+
+        OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_LIBRARY)
+
+	IF(OSG_USE_STATIC_SUPPORT_LIBS)
+            OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_XML2_LIBRARY)
+            OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_PCRECPP_LIBRARY)
+            OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_MINIZIP_LIBRARY)
+            OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_ICONV_LIBRARY)
+            OSG_ADD_LIB_TARGET(OSG_COLLADA_TARGETS COLLADA_PCRE_LIBRARY)
 	ENDIF(OSG_USE_STATIC_SUPPORT_LIBS)

-#	SET(COLLADA_LIBRARIES ${OSG_COLLADA_TARGETS} CACHE STRING "" FORCE)
+        #	SET(COLLADA_LIBRARIES ${OSG_COLLADA_TARGETS} CACHE STRING "" FORCE)

 	IF(COLLADA_DAE_INCLUDE_DIR AND COLLADA_DOM_INCLUDE_DIR)
-	  IF(COLLADA_LIBRARY_DEBUG OR COLLADA_LIBRARY_RELEASE)
-	    SET(COLLADA_FOUND TRUE)
-	  ENDIF()
-	ENDIF()
-
-  ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
+	    IF(COLLADA_LIBRARY_DEBUG OR COLLADA_LIBRARY_RELEASE)
+	        SET(COLLADA_FOUND TRUE)
+	    ENDIF()
+	ENDIF()
+
+    ENDIF(NOT OSG_USE_OSGSUPPORT_LIBS)
 ENDMACRO(OSG_CONFIGURE_COLLADA)

@@ -348,7 +348,7 @@
     SET(Boost_USE_MULTITHREADED ON )

     IF(NOT Boost_USE_STATIC_LIBS)
-      SET(Boost_USE_STATIC_LIBS OFF CACHE INTERNAL "")
+        SET(Boost_USE_STATIC_LIBS OFF CACHE INTERNAL "")
     ENDIF(NOT Boost_USE_STATIC_LIBS)

     FIND_PACKAGE(Boost COMPONENTS filesystem)
@@ -362,7 +362,7 @@
         ENDIF(UNIX)

         IF(NOT Boost_USE_STATIC_LIBS)
-          ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
+            ADD_DEFINITIONS(-DBOOST_ALL_DYN_LINK)
         ENDIF(NOT Boost_USE_STATIC_LIBS)

         IF(CMAKE_BUILD_TYPE STREQUAL "Debug" OR
@@ -404,7 +404,7 @@
     ELSE(Boost_FOUND)

         MESSAGE(SEND_ERROR "BOOST NOTFOUND." ${Boost_ERROR_REASON})
-
+
         IF(NOT BOOST_ROOT)
             SET(BOOST_ROOT "" CACHE PATH "")
         ENDIF(NOT BOOST_ROOT)
@@ -413,19 +413,19 @@
 ENDMACRO(OSG_CONFIGURE_BOOST)

 MACRO(OSG_ADD_GLUTPACKAGE OSG_DO_SETUP_TEST)
-  IF("${OSG_DO_SETUP_TEST}" STREQUAL "ON" OR "${OSG_DO_SETUP_TEST}" STREQUAL "TRUE")
+    IF("${OSG_DO_SETUP_TEST}" STREQUAL "ON" OR "${OSG_DO_SETUP_TEST}" STREQUAL "TRUE")
 	SET(${PROJECT_NAME}_DEP_TEST_INCDIR ${${PROJECT_NAME}_DEP_TEST_INCDIR} OSG_GLUT_INC_DIR)

 	IF(OSG_USE_OSGSUPPORT_LIBS AND OSG_USE_STATIC_SUPPORT_LIBS)
-      SET(${PROJECT_NAME}_DEP_TEST_LIB ${${PROJECT_NAME}_DEP_TEST_LIB} GLUT_LIBRARIES)
-      SET(${PROJECT_NAME}_DEP_TEST_DEFS ${${PROJECT_NAME}_DEP_TEST_DEFS};FREEGLUT_STATIC)
-	ENDIF()
-  ELSE()
-    SET(${PROJECT_NAME}_DEP_LIB ${${PROJECT_NAME}_DEP_LIB} GLUT_LIBRARIES)
+            SET(${PROJECT_NAME}_DEP_TEST_LIB ${${PROJECT_NAME}_DEP_TEST_LIB} GLUT_LIBRARIES)
+            SET(${PROJECT_NAME}_DEP_TEST_DEFS ${${PROJECT_NAME}_DEP_TEST_DEFS};FREEGLUT_STATIC)
+	ENDIF()
+    ELSE()
+        SET(${PROJECT_NAME}_DEP_LIB ${${PROJECT_NAME}_DEP_LIB} GLUT_LIBRARIES)
 	SET(${PROJECT_NAME}_DEP_INCDIR ${${PROJECT_NAME}_DEP_INCDIR} OSG_GLUT_INC_DIR)

 	IF(OSG_USE_OSGSUPPORT_LIBS AND OSG_USE_STATIC_SUPPORT_LIBS)
-      SET(${PROJECT_NAME}_DEP_DEFS ${${PROJECT_NAME}_DEP_DEFS};FREEGLUT_STATIC)
-	ENDIF()
-  ENDIF()
+            SET(${PROJECT_NAME}_DEP_DEFS ${${PROJECT_NAME}_DEP_DEFS};FREEGLUT_STATIC)
+	ENDIF()
+    ENDIF()
 ENDMACRO(OSG_ADD_GLUTPACKAGE SETUP_TEST)


Revert changes to CMake/SurgSimBuildFlags.cmake Macro EIGEN_DONT_ALIGN already defined for appropriate OS.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -25,9 +25,6 @@

 # We always want to use defines from <math.h>.
 add_definitions( -D_USE_MATH_DEFINES )
-
-# We disable all Eigen alignement features
-add_definitions( -DEIGEN_DONT_ALIGN )

 # G++ (C++ compilation) specific settings
 if(CMAKE_COMPILER_IS_GNUCXX)


Disable ESXi builds by default, add arg_test_vmk flag; reviewed as http://codereview.appspot.com/1640042

git-svn-id: fe3cd4388a6e5a968b09397a3d721fe124e8117a@18 5b54908e-ead4-fc18-b48a-0285e6dbc711

--- tests/runsuite.cmake
+++ tests/runsuite.cmake
@@ -56,7 +56,8 @@
 set(arg_nightly OFF)  # whether to report the results
 set(arg_long OFF)     # whether to run the long suite
 set(arg_already_built OFF) # for testing on ESXi w/ already-built suite
-set(arg_vmk_only OFF) # for testing on ESXi: only run vmk builds
+set(arg_test_vmk OFF) # for testing of ESXi on Linux: run vmk builds
+set(arg_vmk_only  OFF) # for testing on ESXi: run only vmk builds
 set(arg_include "")   # cmake file to include up front
 set(arg_preload "")   # cmake file to include prior to each 32-bit build
 set(arg_preload64 "") # cmake file to include prior to each 64-bit build
@@ -82,6 +83,9 @@
   if (${arg} STREQUAL "already_built")
     set(arg_already_built ON)
   endif (${arg} STREQUAL "already_built")
+  if (${arg} STREQUAL "test_vmk")
+    set(arg_test_vmk ON)
+  endif (${arg} STREQUAL "test_vmk")
   if (${arg} STREQUAL "vmk_only")
     set(arg_vmk_only ON)
   endif (${arg} STREQUAL "vmk_only")
@@ -113,21 +117,25 @@
   endif (UNIX)
 endforeach (arg)

+if (arg_test_vmk AND arg_vmk_only)
+  message(FATAL_ERROR "you can't specify both test_vmk and vmk_only")
+endif (arg_test_vmk AND arg_vmk_only)
+
 if (NOT arg_vmk_only)
   if (NOT EXISTS "${DR_path}")
     # env var DYNAMORIO_HOME is fallback
     set(DR_path "$ENV{DYNAMORIO_HOME}/cmake")
   endif (NOT EXISTS "${DR_path}")
   if (NOT EXISTS "${DR_path}")
-    message(FATAL_ERROR "cannot find DynamoRIO Linux build at ${DR_path}")
+    message(FATAL_ERROR "cannot find DynamoRIO build at ${DR_path}")
   endif (NOT EXISTS "${DR_path}")
 endif (NOT arg_vmk_only)

-if (UNIX)
+if (arg_vmk_only OR arg_test_vmk)
   if (NOT EXISTS "${DRvmk_path}")
     message(FATAL_ERROR "cannot find DynamoRIO VMKERNEL build at ${DRvmk_path}")
   endif (NOT EXISTS "${DRvmk_path}")
-endif (UNIX)
+endif (arg_vmk_only OR arg_test_vmk)

 # allow setting the base cache variables via an include file
 set(base_cache "")
@@ -368,18 +376,20 @@
       " ON) # only run release tests for long suite
   endif (NOT arg_vmk_only)
   if (UNIX)
-    testbuild("${name}-vmk-debug-32" OFF "
-      ${tool}
-      DynamoRIO_DIR:PATH=${DRvmk_path}
-      CMAKE_BUILD_TYPE:STRING=Debug
-      VMKERNEL:BOOL=ON
-      " OFF)
-    testbuild("${name}-vmk-release-32" OFF "
-      ${tool}
-      DynamoRIO_DIR:PATH=${DRvmk_path}
-      CMAKE_BUILD_TYPE:STRING=Release
-      VMKERNEL:BOOL=ON
-      " ON) # only run release tests for long suite
+    if (arg_vmk_only OR arg_test_vmk)
+      testbuild("${name}-vmk-debug-32" OFF "
+        ${tool}
+        DynamoRIO_DIR:PATH=${DRvmk_path}
+        CMAKE_BUILD_TYPE:STRING=Debug
+        VMKERNEL:BOOL=ON
+        " OFF)
+      testbuild("${name}-vmk-release-32" OFF "
+        ${tool}
+        DynamoRIO_DIR:PATH=${DRvmk_path}
+        CMAKE_BUILD_TYPE:STRING=Release
+        VMKERNEL:BOOL=ON
+        " ON) # only run release tests for long suite
+    endif (arg_vmk_only OR arg_test_vmk)
   else (UNIX)
     if ("${tool}" MATCHES "MEMORY")
       # No online symbol support for cygwin yet so using separate build


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -505,7 +505,6 @@
 	endif()
 	add_executable(${_TEST_NAME}_exe ${_SOURCES})
 	target_link_libraries(${_TEST_NAME}_exe ${_DEPENDS})
-	# echo_targets(${_TEST_NAME}_exe)
 	foreach(LIB_DIR ${CMAKI_LIBRARIES})
 		target_link_libraries(${_TEST_NAME}_exe ${LIB_DIR})
 		cmaki_install_3rdparty(${LIB_DIR})
@@ -517,22 +516,56 @@
 		target_link_libraries(${_TEST_NAME}_exe -lpthread)
 	endif()
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-		INSTALL(    TARGETS ${_TEST_NAME}_exe
-					DESTINATION ${BUILD_TYPE}/${_SUFFIX_DESTINATION}
-					CONFIGURATIONS ${BUILD_TYPE})
-	endforeach()
-	if (CMAKE_BUILD_TYPE STREQUAL "Release")
-		message("-- Launch ${_TEST_NAME}_exe with valgrind")
-		add_test(
-			NAME ${_TEST_NAME}_exe
-			COMMAND valgrind --tool=callgrind ${_TEST_NAME}_exe --gtest_repeat=1 --gtest_break_on_failure --gtest_shuffle --gmock_verbose=info
-			WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})
-	else()
-		add_test(
-			NAME ${_TEST_NAME}_exe
-			COMMAND ${_TEST_NAME}_exe --gtest_repeat=1 --gtest_break_on_failure --gtest_shuffle --gmock_verbose=info
-			WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})
-	endif()
+		INSTALL(  	TARGETS ${_TEST_NAME}_exe
+				DESTINATION ${BUILD_TYPE}/${_SUFFIX_DESTINATION}
+				CONFIGURATIONS ${BUILD_TYPE})
+
+		#  --gtest_repeat=1 --gtest_break_on_failure --gtest_shuffle --gmock_verbose=info
+		if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_BUILD_TYPE STREQUAL "Release"))
+			find_program(VALGRIND "valgrind")
+			if(VALGRIND)
+				add_test(
+					NAME ${_TEST_NAME}_memcheck
+					COMMAND "${VALGRIND}" --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes $<TARGET_FILE:${_TEST_NAME}> --gmock_verbose=info
+					WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+					CONFIGURATIONS ${BUILD_TYPE}
+					)
+				add_test(
+					NAME ${_TEST_NAME}_cachegrind
+					COMMAND "${VALGRIND}" --tool=cachegrind $<TARGET_FILE:${_TEST_NAME}> --gmock_verbose=info
+					WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+					CONFIGURATIONS ${BUILD_TYPE}
+					)
+				add_test(
+					NAME ${_TEST_NAME}_helgrind
+					COMMAND "${VALGRIND}" --tool=helgrind $<TARGET_FILE:${_TEST_NAME}> --gmock_verbose=info
+					WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+					CONFIGURATIONS ${BUILD_TYPE}
+					)
+				add_test(
+					NAME ${_TEST_NAME}_callgrind
+					COMMAND "${VALGRIND}" --tool=callgrind $<TARGET_FILE:${_TEST_NAME}> --gmock_verbose=info
+					WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+					CONFIGURATIONS ${BUILD_TYPE}
+					)
+				add_test(
+					NAME ${_TEST_NAME}_drd
+					COMMAND "${VALGRIND}" --tool=drd --read-var-info=yes $<TARGET_FILE:${_TEST_NAME}> --gmock_verbose=info
+					WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+					CONFIGURATIONS ${BUILD_TYPE}
+					)
+			else()
+				message(FATAL_ERROR "no valgrind detected")
+			endif()
+		else()
+			add_test(
+				NAME ${_TEST_NAME}_test
+				COMMAND $<TARGET_FILE:${_TEST_NAME}> --gmock_verbose=info
+				WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${BUILD_TYPE}
+				CONFIGURATIONS ${BUILD_TYPE}
+				)
+		endif()
+	endforeach()
 	generate_vcxproj_user(${_TEST_NAME})

 endfunction()


Collect all module/plugin globbing code in one place.

--- CMake/mitkMacroInstall.cmake
+++ CMake/mitkMacroInstall.cmake
@@ -125,21 +125,26 @@
       file(GLOB _children \"\${_bin_path}/*\")
       foreach(_child \${_children})
         if(IS_DIRECTORY \${_child})
+          set(_plugins )
+          set(_modules )
           file(GLOB_RECURSE _plugins \"\${_child}/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
           if(_plugins)
             list(APPEND GLOBBED_PLUGINS \${_plugins})
+          endif()
+          # Now glob for all modules which might have a different extensions.
+          # E.g. on MacOS plugins could have a .dylib extension as well as a .so extension
+          if(NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"\" AND NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"${CMAKE_SHARED_LIBRARY_SUFFIX}\")
+            file(GLOB_RECURSE _modules \"\${_child}/*${CMAKE_SHARED_MODULE_SUFFIX}\")
+          endif()
+          if(_modules)
+            list(APPEND GLOBBED_PLUGINS \${_modules})
           endif()
         endif()
       endforeach()
     endif()

-    set(GLOBBED_QT_PLUGINS )
-    if(NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"\" AND NOT \"${CMAKE_SHARED_MODULE_SUFFIX}\" STREQUAL \"${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-      file(GLOB_RECURSE GLOBBED_QT_PLUGINS \"\${CMAKE_INSTALL_PREFIX}/${${_target_location}_qt_plugins_install_dir}/plugins/*/*${CMAKE_SHARED_MODULE_SUFFIX}\")
-    endif()
-
     set(PLUGINS )
-    foreach(_plugin ${_install_PLUGINS} \${GLOBBED_QT_PLUGINS} \${GLOBBED_PLUGINS})
+    foreach(_plugin ${_install_PLUGINS} \${GLOBBED_PLUGINS})
       get_filename_component(_plugin_realpath \${_plugin} REALPATH)
       list(APPEND PLUGINS \${_plugin_realpath})
     endforeach()


BUG: fix endif() after renaming

BUG: fix endif() after renaming

--- CMake/OTBParseArguments.cmake
+++ CMake/OTBParseArguments.cmake
@@ -29,4 +29,4 @@
     endif(is_arg_name GREATER -1)
   endforeach(arg)
   set(${prefix}_${current_arg_name} ${current_arg_list})
-endmacro(PARSE_ARGUMENTS)
+endmacro(OTB_PARSE_ARGUMENTS)


do not leak variables

do not leak variables

--HG--
branch : findft2update

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -407,6 +407,7 @@
 	  mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
     endif()
   endif()
+  unset(OGRE_${COMPONENT}_FIND_QUIETLY)
 endmacro()

 # look for Paging component


vtkPythonPackages: avoid CMP0054 warnings

Change-Id: I7882bd5b76788c563ce9f663cc1305f20c2f177d

--- CMake/vtkPythonPackages.cmake
+++ CMake/vtkPythonPackages.cmake
@@ -20,21 +20,21 @@
   foreach (arg IN LISTS ARGN)
     if (arg MATCHES "^(DESTINATION|REGEX|OUTPUT|LABEL)$")
       set (doing "${arg}")
-    elseif ("${doing}" STREQUAL "DESTINATION")
+    elseif ("x${doing}" STREQUAL "xDESTINATION")
       set (doing "")
       set (dest-dir "${arg}")
-    elseif ("${doing}" STREQUAL "REGEX")
+    elseif ("x${doing}" STREQUAL "xREGEX")
       set (doing "SET")
       list (APPEND patterns "${arg}")
-    elseif (("${arg}" STREQUAL "EXCLUDE") AND ("${doing}" STREQUAL "SET"))
+    elseif (("x${arg}" STREQUAL "xEXCLUDE") AND ("x${doing}" STREQUAL "xSET"))
       set (doing "")
       list (GET patterns -1 cur-pattern)
       list (REMOVE_AT patterns -1)
       list (APPEND exclude-patterns "${cur-pattern}")
-    elseif ("${doing}" STREQUAL "OUTPUT")
+    elseif ("x${doing}" STREQUAL "xOUTPUT")
       set (doing "")
       set (output-file "${arg}")
-    elseif ("${doing}" STREQUAL "LABEL")
+    elseif ("x${doing}" STREQUAL "xLABEL")
       set (doing "")
       set (label "${arg}")
     else()


COMP: Updating MITK Data revision tag to right version

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

 if(BUILD_TESTING)

-  set(revision_tag a4bf7438)
+  set(revision_tag 8e15bc7f)

   ExternalProject_Add(${proj}


Bump the version of CUB in cmake build.

Bump the version of CUB in cmake build.

--- tensorflow/contrib/cmake/external/cub.cmake
+++ tensorflow/contrib/cmake/external/cub.cmake
@@ -14,8 +14,8 @@
 # ==============================================================================
 include (ExternalProject)

-set(cub_URL https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.7.4.zip)
-set(cub_HASH SHA256=20a1a39fd97e5da7f40f5f2e7fd73fd2ea59f9dc4bb8a6c5f228aa543e727e31)
+set(cub_URL https://mirror.bazel.build/github.com/NVlabs/cub/archive/1.8.0.zip)
+set(cub_HASH SHA256=6bfa06ab52a650ae7ee6963143a0bbc667d6504822cbd9670369b598f18c58c3)
 set(cub_BUILD ${CMAKE_CURRENT_BINARY_DIR}/cub/src/cub)
 set(cub_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cub/src/cub)
 set(cub_ARCHIVE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/cub_archive)


fixed warning in cmake function: 'getCompilerName' when generating an isntaller with VS2015. The new IDE was not honored

--- CMake/utility.cmake
+++ CMake/utility.cmake
@@ -443,6 +443,8 @@
     set(COMPILER_NAME "vs2012")
   elseif(MSVC_VERSION EQUAL 1800)
     set(COMPILER_NAME "vs2013")
+  elseif(MSVC_VERSION EQUAL 1900)
+    set(COMPILER_NAME "vs2015")
   elseif(CMAKE_COMPILER_IS_GNUCXX)
     set(COMPILER_NAME "gcc")
     if(WIN32)