Backup. almost done getting bindings to configure properly with the stock find scripts. There are/were a few quirks I don't immediately undestand the source of but I've mopped the bulk of those up now.

--- cmake_modules/UseSWIG.cmake
+++ cmake_modules/UseSWIG.cmake
@@ -1,262 +0,0 @@
-# - SWIG module for CMake
-# Defines the following macros:
-#   SWIG_ADD_MODULE(name language [ files ])
-#     - Define swig module with given name and specified language
-#   SWIG_LINK_LIBRARIES(name [ libraries ])
-#     - Link libraries to swig module
-# All other macros are for internal use only.
-# To get the actual name of the swig module,
-# use: ${SWIG_MODULE_${name}_REAL_NAME}.
-# Set Source files properties such as CPLUSPLUS and SWIG_FLAGS to specify
-# special behavior of SWIG. Also global CMAKE_SWIG_FLAGS can be used to add
-# special flags to all swig calls.
-# Another special variable is CMAKE_SWIG_OUTDIR, it allows one to specify
-# where to write all the swig generated module (swig -outdir option)
-# The name-specific variable SWIG_MODULE_<name>_EXTRA_DEPS may be used
-# to specify extra dependencies for the generated modules.
-# If the source file generated by swig need some special flag you can use
-# SET_SOURCE_FILES_PROPERTIES( ${swig_generated_file_fullname}
-#        PROPERTIES COMPILE_FLAGS "-bla")
-
-
-#=============================================================================
-# Copyright 2004-2009 Kitware, Inc.
-# Copyright 2009 Mathieu Malaterre <mathieu.malaterre@gmail.com>
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-SET(SWIG_CXX_EXTENSION "cxx")
-SET(SWIG_EXTRA_LIBRARIES "")
-
-SET(SWIG_PYTHON_EXTRA_FILE_EXTENSION "py")
-
-#
-# For given swig module initialize variables associated with it
-#
-MACRO(SWIG_MODULE_INITIALIZE name language)
-  STRING(TOUPPER "${language}" swig_uppercase_language)
-  STRING(TOLOWER "${language}" swig_lowercase_language)
-  SET(SWIG_MODULE_${name}_LANGUAGE "${swig_uppercase_language}")
-  SET(SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG "${swig_lowercase_language}")
-
-  IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$")
-    MESSAGE(FATAL_ERROR "SWIG Error: Language \"${language}\" not found")
-  ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xUNKNOWNx$")
-
-  SET(SWIG_MODULE_${name}_REAL_NAME "${name}")
-  IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
-    # when swig is used without the -interface it will produce in the module.py
-    # a 'import _modulename' statement, which implies having a corresponding
-    # _modulename.so (*NIX), _modulename.pyd (Win32).
-
-    # This script prepended an underscore to the library name. This forces us to
-    # refer to "_${PYTHON-LIB-NAME}" in subsequent references to the library.
-    # Fixed so that it's the programmers job to name the lib. In other words, we
-    # prepend the underscore when we set the python lib name. See LPSCommon.cmake.
-    # JEB -- 070511.
-
-    #  SET(SWIG_MODULE_${name}_REAL_NAME "_${name}")
-  ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPYTHONx$")
-  IF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
-    SET(SWIG_MODULE_${name}_EXTRA_FLAGS "-shadow")
-  ENDIF("x${SWIG_MODULE_${name}_LANGUAGE}x" MATCHES "^xPERLx$")
-ENDMACRO(SWIG_MODULE_INITIALIZE)
-
-#
-# For a given language, input file, and output file, determine extra files that
-# will be generated. This is internal swig macro.
-#
-
-MACRO(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
-  GET_SOURCE_FILE_PROPERTY(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename
-    ${infile} SWIG_MODULE_NAME)
-  IF(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
-    GET_FILENAME_COMPONENT(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename "${infile}" NAME_WE)
-  ENDIF(SWIG_GET_EXTRA_OUTPUT_FILES_module_basename STREQUAL "NOTFOUND")
-  FOREACH(it ${SWIG_${language}_EXTRA_FILE_EXTENSION})
-    SET(${outfiles} ${${outfiles}}
-      "${generatedpath}/${SWIG_GET_EXTRA_OUTPUT_FILES_module_basename}.${it}")
-  ENDFOREACH(it)
-ENDMACRO(SWIG_GET_EXTRA_OUTPUT_FILES)
-
-#
-# Take swig (*.i) file and add proper custom commands for it
-#
-MACRO(SWIG_ADD_SOURCE_TO_MODULE name outfiles infile)
-  SET(swig_full_infile ${infile})
-  GET_FILENAME_COMPONENT(swig_source_file_path "${infile}" PATH)
-  GET_FILENAME_COMPONENT(swig_source_file_name_we "${infile}" NAME_WE)
-  GET_SOURCE_FILE_PROPERTY(swig_source_file_generated ${infile} GENERATED)
-  GET_SOURCE_FILE_PROPERTY(swig_source_file_cplusplus ${infile} CPLUSPLUS)
-  GET_SOURCE_FILE_PROPERTY(swig_source_file_flags ${infile} SWIG_FLAGS)
-  IF("${swig_source_file_flags}" STREQUAL "NOTFOUND")
-    SET(swig_source_file_flags "")
-  ENDIF("${swig_source_file_flags}" STREQUAL "NOTFOUND")
-  SET(swig_source_file_fullname "${infile}")
-  IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
-    STRING(REGEX REPLACE
-      "^${CMAKE_CURRENT_SOURCE_DIR}" ""
-      swig_source_file_relative_path
-      "${swig_source_file_path}")
-  ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
-    IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
-      STRING(REGEX REPLACE
-        "^${CMAKE_CURRENT_BINARY_DIR}" ""
-        swig_source_file_relative_path
-        "${swig_source_file_path}")
-      SET(swig_source_file_generated 1)
-    ELSE(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
-      SET(swig_source_file_relative_path "${swig_source_file_path}")
-      IF(swig_source_file_generated)
-        SET(swig_source_file_fullname "${CMAKE_CURRENT_BINARY_DIR}/${infile}")
-      ELSE(swig_source_file_generated)
-        SET(swig_source_file_fullname "${CMAKE_CURRENT_SOURCE_DIR}/${infile}")
-      ENDIF(swig_source_file_generated)
-    ENDIF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_BINARY_DIR}")
-  ENDIF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
-
-  SET(swig_generated_file_fullname
-    "${CMAKE_CURRENT_BINARY_DIR}")
-#  IF(swig_source_file_relative_path)
-#    SET(swig_generated_file_fullname
-#      "${swig_generated_file_fullname}/${swig_source_file_relative_path}")
-#  ENDIF(swig_source_file_relative_path)
-  # If CMAKE_SWIG_OUTDIR was specified then pass it to -outdir
-  IF(CMAKE_SWIG_OUTDIR)
-    SET(swig_outdir ${CMAKE_SWIG_OUTDIR})
-    # it may not exist, so create it:
-    file(MAKE_DIRECTORY ${CMAKE_SWIG_OUTDIR})
-  ELSE(CMAKE_SWIG_OUTDIR)
-    SET(swig_outdir ${CMAKE_CURRENT_BINARY_DIR})
-  ENDIF(CMAKE_SWIG_OUTDIR)
-  SWIG_GET_EXTRA_OUTPUT_FILES(${SWIG_MODULE_${name}_LANGUAGE}
-    swig_extra_generated_files
-    "${swig_outdir}"
-    "${infile}")
-  SET(swig_generated_file_fullname
-    "${swig_generated_file_fullname}/${swig_source_file_name_we}")
-  # add the language into the name of the file (i.e. TCL_wrap)
-  # this allows for the same .i file to be wrapped into different languages
-  SET(swig_generated_file_fullname
-    "${swig_generated_file_fullname}${SWIG_MODULE_${name}_LANGUAGE}_wrap")
-
-  IF(swig_source_file_cplusplus)
-    SET(swig_generated_file_fullname
-      "${swig_generated_file_fullname}.${SWIG_CXX_EXTENSION}")
-  ELSE(swig_source_file_cplusplus)
-    SET(swig_generated_file_fullname
-      "${swig_generated_file_fullname}.c")
-  ENDIF(swig_source_file_cplusplus)
-
-  #MESSAGE("Full path to source file: ${swig_source_file_fullname}")
-  #MESSAGE("Full path to the output file: ${swig_generated_file_fullname}")
-  GET_DIRECTORY_PROPERTY(cmake_include_directories INCLUDE_DIRECTORIES)
-  SET(swig_include_dirs)
-  FOREACH(it ${cmake_include_directories})
-    SET(swig_include_dirs ${swig_include_dirs} "-I${it}")
-  ENDFOREACH(it)
-
-  SET(swig_special_flags)
-  # default is c, so add c++ flag if it is c++
-  IF(swig_source_file_cplusplus)
-    SET(swig_special_flags ${swig_special_flags} "-c++")
-  ENDIF(swig_source_file_cplusplus)
-  SET(swig_extra_flags)
-  IF(SWIG_MODULE_${name}_EXTRA_FLAGS)
-    SET(swig_extra_flags ${swig_extra_flags} ${SWIG_MODULE_${name}_EXTRA_FLAGS})
-  ENDIF(SWIG_MODULE_${name}_EXTRA_FLAGS)
-  ADD_CUSTOM_COMMAND(
-    OUTPUT "${swig_generated_file_fullname}" ${swig_extra_generated_files}
-    COMMAND "${SWIG_EXECUTABLE}"
-    ARGS "-${SWIG_MODULE_${name}_SWIG_LANGUAGE_FLAG}"
-    ${swig_source_file_flags}
-    ${CMAKE_SWIG_FLAGS}
-    -outdir ${swig_outdir}
-    ${swig_special_flags}
-    ${swig_extra_flags}
-    ${swig_include_dirs}
-    -o "${swig_generated_file_fullname}"
-    "${swig_source_file_fullname}"
-    MAIN_DEPENDENCY "${swig_source_file_fullname}"
-    DEPENDS ${SWIG_MODULE_${name}_EXTRA_DEPS}
-    COMMENT "Swig source")
-  SET_SOURCE_FILES_PROPERTIES("${swig_generated_file_fullname}" ${swig_extra_generated_files}
-    PROPERTIES GENERATED 1)
-  SET(${outfiles} "${swig_generated_file_fullname}" ${swig_extra_generated_files})
-ENDMACRO(SWIG_ADD_SOURCE_TO_MODULE)
-
-#
-# Create Swig module
-#
-MACRO(SWIG_ADD_MODULE name language)
-  SWIG_MODULE_INITIALIZE(${name} ${language})
-  SET(swig_dot_i_sources)
-  SET(swig_other_sources)
-  FOREACH(it ${ARGN})
-    IF(${it} MATCHES ".*\\.i$")
-      SET(swig_dot_i_sources ${swig_dot_i_sources} "${it}")
-    ELSE(${it} MATCHES ".*\\.i$")
-      SET(swig_other_sources ${swig_other_sources} "${it}")
-    ENDIF(${it} MATCHES ".*\\.i$")
-  ENDFOREACH(it)
-
-  SET(swig_generated_sources)
-  FOREACH(it ${swig_dot_i_sources})
-    SWIG_ADD_SOURCE_TO_MODULE(${name} swig_generated_source ${it})
-    SET(swig_generated_sources ${swig_generated_sources} "${swig_generated_source}")
-  ENDFOREACH(it)
-  GET_DIRECTORY_PROPERTY(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES)
-  SET_DIRECTORY_PROPERTIES(PROPERTIES
-    ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources}")
-  ADD_LIBRARY(${SWIG_MODULE_${name}_REAL_NAME}
-    SHARED
-    ${swig_generated_sources}
-    ${swig_other_sources})
-  STRING(TOLOWER "${language}" swig_lowercase_language)
-  IF ("${swig_lowercase_language}" STREQUAL "java")
-    IF (APPLE)
-        # In java you want:
-        #      System.loadLibrary("LIBRARY");
-        # then JNI will look for a library whose name is platform dependent, namely
-        #   MacOS  : libLIBRARY.jnilib
-        #   Windows: LIBRARY.dll
-        #   Linux  : libLIBRARY.so
-        SET_TARGET_PROPERTIES (${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".jnilib")
-      ENDIF (APPLE)
-  ENDIF ("${swig_lowercase_language}" STREQUAL "java")
-  IF ("${swig_lowercase_language}" STREQUAL "python")
-    # this is only needed for the python case where a _modulename.so is generated
-    SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
-    # Python extension modules on Windows must have the extension ".pyd"
-    # instead of ".dll" as of Python 2.5.  Older python versions do support
-    # this suffix.
-    # http://docs.python.org/whatsnew/ports.html#SECTION0001510000000000000000
-    # <quote>
-    # Windows: .dll is no longer supported as a filename extension for extension modules.
-    # .pyd is now the only filename extension that will be searched for.
-    # </quote>
-    IF(WIN32 AND NOT CYGWIN)
-      SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
-    ENDIF(WIN32 AND NOT CYGWIN)
-  ENDIF ("${swig_lowercase_language}" STREQUAL "python")
-ENDMACRO(SWIG_ADD_MODULE)
-
-#
-# Like TARGET_LINK_LIBRARIES but for swig modules
-#
-MACRO(SWIG_LINK_LIBRARIES name)
-  IF(SWIG_MODULE_${name}_REAL_NAME)
-    TARGET_LINK_LIBRARIES(${SWIG_MODULE_${name}_REAL_NAME} ${ARGN})
-  ELSE(SWIG_MODULE_${name}_REAL_NAME)
-    MESSAGE(SEND_ERROR "Cannot find Swig library \"${name}\".")
-  ENDIF(SWIG_MODULE_${name}_REAL_NAME)
-ENDMACRO(SWIG_LINK_LIBRARIES name)
-


DOC: Document module groups.

DOC: Document module groups.

Document Core, IO, Filtering.

Change-Id: Ic51b15f5f0b06750b76ed2167e118d2a61495118

--- CMake/ITKGroups.cmake
+++ CMake/ITKGroups.cmake
@@ -18,7 +18,11 @@
 )

 set(Core_documentation
-"Documentation for Group Core"
+"This group of modules contains the framework of the toolkit used by other
+modules.  There are common base classes for data objects and process objects,
+basic data structures such as Image, Mesh, QuadEdgeMesh, and SpatialObjects, and
+common functionality for operations such as finite differences, image adaptors,
+image resampling, or image statistics."
 )

 set(IO_module_list
@@ -46,7 +50,8 @@
 )

 set(IO_documentation
-"Documentation for Group IO"
+"This group of modules contains classes for reading and writing images
+and other data objects."
 )

 set(Filtering_module_list
@@ -82,9 +87,10 @@
 ITKImageFusion
 )

-set(Filtering_documentation
-"Documentation for Group Filtering"
-)
+set(Filtering_documentation "This group of modules are filters that modify data
+in the ITK pipeline framework.  These filters take an input object, such as an
+Image, and modify it to create an output.  Filters can be chained together to
+create a processing pipeline.")

 set(Registration_module_list
 ITKFEMRegistration


cmake: Do not link to librt on Android

cmake: Do not link to librt on Android

Fixes #16

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -100,7 +100,7 @@
 endif (WIN32)

 find_library(RT_LIBRARY rt)
-if (RT_LIBRARY AND NOT LINUX)
+if (RT_LIBRARY AND NOT LINUX AND NOT ANDROID)
     set(CMOCKA_REQUIRED_LIBRARIES ${RT_LIBRARY} CACHE INTERNAL "cmocka required system libraries")
 endif ()


Split off 8.0.70

Split off 8.0.70

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

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


fix linking NiftyReg with OpenMP

fix linking NiftyReg with OpenMP

--- SuperBuild/External_NiftyReg.cmake
+++ SuperBuild/External_NiftyReg.cmake
@@ -58,17 +58,15 @@
     DOWNLOAD_DIR ${${proj}_DOWNLOAD_DIR}
     STAMP_DIR ${${proj}_STAMP_DIR}
     TMP_DIR ${${proj}_TMP_DIR}
-
     CMAKE_ARGS
-        -DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR}
-        -DCMAKE_LIBRARY_PATH=${SUPERBUILD_INSTALL_DIR}/lib
-        -DCMAKE_INCLUDE_PATH=${SUPERBUILD_INSTALL_DIR}
-        -DCMAKE_INSTALL_PREFIX=${${proj}_Install_Dir}
-        -DUSE_THROW_EXCEP=ON
-	    INSTALL_DIR ${${proj}_Install_Dir}
-    DEPENDS
-        ${${proj}_DEPENDENCIES}
-  )
+      -DCMAKE_PREFIX_PATH=${SUPERBUILD_INSTALL_DIR}
+      -DCMAKE_LIBRARY_PATH=${SUPERBUILD_INSTALL_DIR}/lib
+      -DCMAKE_INCLUDE_PATH=${SUPERBUILD_INSTALL_DIR}
+      -DCMAKE_INSTALL_PREFIX=${${proj}_Install_Dir}
+      -DUSE_THROW_EXCEP=ON
+      -DUSE_OPENMP:BOOL=OFF
+    INSTALL_DIR ${${proj}_Install_Dir}
+    DEPENDS ${${proj}_DEPENDENCIES})

     set(${proj}_ROOT        ${${proj}_SOURCE_DIR})
     set(${proj}_INCLUDE_DIR ${${proj}_SOURCE_DIR})


PKG: custom target to check build before starting packaging

--- SuperBuild/Packaging/PMacros.cmake
+++ SuperBuild/Packaging/PMacros.cmake
@@ -40,16 +40,16 @@

 macro(macro_update_dependencies_list list_variable)
   if(WIN32 OR CMAKE_CROSSCOMPILING)
-    add_custom_target(PACKAGE-check)
+    add_custom_target(PACKAGE-CHECK)
   else() #Unxies Using SuperBuild

     if(ENABLE_MONTEVERDI)
-      add_custom_target(PACKAGE-check
+      add_custom_target(PACKAGE-CHECK
         COMMAND ${CMAKE_COMMAND} --build "${SUPERBUILD_BINARY_DIR}/MVD/build"
         WORKING_DIRECTORY "${SUPERBUILD_BINARY_DIR}/MVD/build"
         )
     else()
-      add_custom_target(PACKAGE-check
+      add_custom_target(PACKAGE-CHECK
         COMMAND ${CMAKE_COMMAND} --build "${SUPERBUILD_BINARY_DIR}/OTB/build"
         WORKING_DIRECTORY "${SUPERBUILD_BINARY_DIR}/OTB/build"
         DEPENDS REMAKE
@@ -57,7 +57,7 @@
     endif(ENABLE_MONTEVERDI)
   endif()

-  list(APPEND ${list_variable} PACKAGE-check)
+  list(APPEND ${list_variable} PACKAGE-CHECK)
 endmacro()

 macro(macro_create_targets_for_package pkg)


Updated for Visual Studio 9.0 x64.

Updated for Visual Studio 9.0 x64.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@2060 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/NektarCommon.cmake
+++ library/NektarCommon.cmake
@@ -3,20 +3,21 @@
 SET(NEKTAR_LIB_DIR lib)
 SET(NEKTAR_INCLUDE_DIR include)

-IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008")
+IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008 Win64")
 	# Removes the warnings about unsafe methods such as strcpy, std::copy, memcmp, etc.
 	ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE)

-ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" )
+ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008 Win64")

 IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )
 	# Needed for M_PI to be visible in visual studio.
 	ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
 ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 7 .NET 2003" )

-IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" )
+IF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008 Win64" )
 	ADD_DEFINITIONS(-D_USE_MATH_DEFINES)
-ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" )
+ENDIF( ${CMAKE_GENERATOR} STREQUAL "Visual Studio 8 2005" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008" OR ${CMAKE_GENERATOR} STREQUAL "Visual Studio 9 2008 Win64" )
+
 IF( NEKTAR_USE_TINYXML_STL )
     ADD_DEFINITIONS( -DTIXML_USE_STL)
 ENDIF( NEKTAR_USE_TINYXML_STL )


Fix CMP0042 Warning in try compile

Fix CMP0042 Warning in try compile

Explicitly set CMAKE_MACOSX_RPATH in test code, to avoid CMP warning
and different behavior.

Change-Id: Ie758243440e8fc4b95435e3f9f7dda47bde1a491

--- CMake/sitkTargetLinkLibrariesWithDynamicLookup.cmake
+++ CMake/sitkTargetLinkLibrariesWithDynamicLookup.cmake
@@ -44,6 +44,7 @@
     file(WRITE "${test_project_dir}/CMakeLists.txt"
 "
 project(undefined C)
+set( CMAKE_MACOSX_RPATH 1)
 add_library(foo SHARED \"foo.c\")
 ")


fix regression introduced in r1449 from what I fixed back in January for i#646

this fixes http://code.google.com/p/drmemory/issues/detail?id=943

git-svn-id: ed337ca7cdb08c0ba29d8fe58632bb7686892c2d@1480 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6

--- make/cpp2asm_support.cmake
+++ make/cpp2asm_support.cmake
@@ -145,6 +145,12 @@
 # Assembler location and flags

 if (NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+  if (UNIX)
+    # i#646: cmake 2.8.5 requires ASM-ATT to find as: but we don't want to change
+    # all our vars to have -ATT suffix so we set the search list instead.
+    # This must be done prior to enable_language(ASM).
+    set(CMAKE_ASM_COMPILER_INIT gas as)
+  endif (UNIX)
   # CMake does not support assembly with VS generators
   # (http://public.kitware.com/Bug/view.php?id=11536)
   # so we have to add our own custom commands and targets
@@ -162,9 +168,6 @@
   if (DEBUG)
     set(ASM_FLAGS "${ASM_FLAGS} -g")
   endif (DEBUG)
-  # i#646: cmake 2.8.5 requires ASM-ATT to find as: but we don't want to change
-  # all our vars to have -ATT suffix so we set the search list instead
-  set(CMAKE_ASM_COMPILER_INIT gas as)
 else (UNIX)
   if (X64)
     find_program(CMAKE_ASM_COMPILER ml64.exe HINTS "${cl_path}" DOC "path to assembler")


Strip ESC calib commandline tool

Strip ESC calib commandline tool

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -57,7 +57,7 @@
 	systemcmds/param
 	systemcmds/perf
 	systemcmds/pwm
-	systemcmds/esc_calib
+	#systemcmds/esc_calib
 	systemcmds/reboot
 	#systemcmds/topic_listener
 	systemcmds/top


Treat lz4 as all other built-ins

Treat lz4 as all other built-ins

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -243,7 +243,7 @@
 endif()
 # Note: the above if-statement may change the value of builtin_lz4 to ON.
 if(builtin_lz4)
-  set(lz4_version 1.7.5)
+  set(lz4_version v1.7.5)
   message(STATUS "Building LZ4 version ${lz4_version} included in ROOT itself")
   if(CMAKE_CXX_COMPILER_ID STREQUAL Clang)
     set(LZ4_CFLAGS "-Wno-format-nonliteral")
@@ -253,7 +253,7 @@
   set(LZ4_LIBRARIES ${CMAKE_BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}lz4${CMAKE_STATIC_LIBRARY_SUFFIX})
   ExternalProject_Add(
     LZ4
-    URL https://github.com/lz4/lz4/archive/v1.7.5.tar.gz
+    URL ${lcgpackages}/lz4-${lz4_version}.tar.gz
     URL_MD5 c9610c5ce97eb431dddddf0073d919b9
     INSTALL_DIR ${CMAKE_BINARY_DIR}
     CONFIGURE_COMMAND  /bin/sh -c "PREFIX=<INSTALL_DIR> make cmake"


Change the libsuffix for DAVIX library installation (CMake)

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -672,7 +672,7 @@
       DAVIX
       URL http://grid-deployment.web.cern.ch/grid-deployment/dms/lcgutil/tar/davix/davix-${DAVIX_VERSION}.tar.gz
       INSTALL_DIR ${CMAKE_BINARY_DIR}
-      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
+      CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DLIB_SUFFIX=
     )
     set(DAVIX_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/davix)
     set(DAVIX_LIBRARY -L${CMAKE_BINARY_DIR}/lib64 -ldavix)


new cmake toolchain for Vesta following V1R2M1 driver upgrade

V1R2M1 driver upgrade moves MPI paths and libs around such that the old
toolchain no longer works.  the changes were trivial and i preserve the
V1R2M0 paths for reference by others until all BGQ systems upgrade.

i activated OpenMP flags in the clang/llvm toolchain because it now
supports OpenMP.

--- cmake/toolchains/BGQ-Vesta-clang-essl.cmake
+++ cmake/toolchains/BGQ-Vesta-clang-essl.cmake
@@ -1,37 +1,52 @@
 #set(CMAKE_SYSTEM_NAME BlueGeneQ-static)

+set(GCC_ROOT  "/bgsys/drivers/ppcfloor/gnu-linux")
+set(GCC_NAME  "powerpc64-bgq-linux")
+set(CLANG_ROOT "/home/projects/llvm")
+set(IBMCMP_ROOT "$ENV{IBM_MAIN_DIR}")
+
+set(BLAS_LIB "/soft/libraries/alcf/current/xl/BLAS/lib")
+set(LAPACK_LIB "/soft/libraries/alcf/current/xl/LAPACK/lib")
+set(ESSL_LIB "/soft/libraries/essl/current/essl/5.1/lib64")
+
+set(SPI_ROOT   "/bgsys/drivers/ppcfloor/spi")
+# V1R2M0
+#set(MPI_ROOT   "/bgsys/drivers/ppcfloor/comm/gcc")
+#set(PAMI_ROOT  "/bgsys/drivers/ppcfloor/comm/sys")
+# V1R2M1
+set(MPI_ROOT   "/bgsys/drivers/ppcfloor/comm")
+set(PAMI_ROOT  "/bgsys/drivers/ppcfloor/comm")
+
 # The serial compilers
-set(GCC_ROOT "/bgsys/drivers/ppcfloor/gnu-linux")
-set(GCC_NAME "powerpc64-bgq-linux")
-set(CLANG_ROOT "/home/projects/llvm")
 set(CMAKE_C_COMPILER       "${CLANG_ROOT}/bin/bgclang")
 set(CMAKE_CXX_COMPILER     "${CLANG_ROOT}/bin/bgclang++")
 set(CMAKE_Fortran_COMPILER "${GCC_ROOT}/bin/${GCC_NAME}-gfortran")

 # The MPI wrappers for the C and C++ compilers
-set(MPI_ROOT  "/bgsys/drivers/ppcfloor/comm/gcc")
-set(PAMI_ROOT "/bgsys/drivers/ppcfloor/comm/sys")
-set(SPI_ROOT  "/bgsys/drivers/ppcfloor/spi")
+#set(MPI_C_COMPILER   ${MPI_ROOT}/bin/mpicc)
+#set(MPI_CXX_COMPILER ${MPI_ROOT}/bin/mpicxx)
+
 set(MPI_C_COMPILE_FLAGS   "")
 set(MPI_CXX_COMPILE_FLAGS "")
 set(MPI_C_INCLUDE_PATH   "${MPI_ROOT}/include")
-set(MPI_CXX_INCLUDE_PATH "${MPI_ROOT}/include")
+set(MPI_CXX_INCLUDE_PATH "${MPI_C_INCLUDE_PATH}")
 set(MPI_C_LINK_FLAGS   "-L${MPI_ROOT}/lib -L${PAMI_ROOT}/lib -L${SPI_ROOT}/lib")
 set(MPI_CXX_LINK_FLAGS ${MPI_C_LINK_FLAGS})
-set(MPI_C_LIBRARIES "-lmpich -lopa -lmpl -ldl -lpami -lSPI -lSPI_cnk -lpthread -lrt -lstdc++")
-set(MPI_CXX_LIBRARIES "-lcxxmpich ${MPI_C_LIBRARIES}")

-#set(CXX_FLAGS_PUREDEBUG "-g -static -Bstatic")
-#set(CXX_FLAGS_PURERELEASE "-g -O2 -static -Bstatic")
-#set(CXX_FLAGS_HYBRIDDEBUG "-g -static -Bstatic")
-#set(CXX_FLAGS_HYBRIDRELEASE "-g -O2 -static -Bstatic")
-set(CXX_FLAGS_PUREDEBUG "-g")
-set(CXX_FLAGS_PURERELEASE "-g -O2")
-set(CXX_FLAGS_HYBRIDDEBUG "-g")
-set(CXX_FLAGS_HYBRIDRELEASE "-g -O2")
+# V1R2M0
+#set(MPI_C_LIBRARIES "-lmpich -lopa -lmpl -ldl -lpami -lSPI -lSPI_cnk -lpthread -lrt -lstdc++")
+#set(MPI_CXX_LIBRARIES "-lcxxmpich ${MPI_C_LIBRARIES}")
+# V1R2M1
+set(MPI_C_LIBRARIES "-lmpich-xl -lopa-xl -lmpl-xl -lpami-gcc -lSPI -lSPI_cnk -lrt -lpthread -lstdc++ -lpthread")
+set(MPI_CXX_LIBRARIES "-lmpichcxx-xl ${MPI_C_LIBRARIES}")

-#set(CMAKE_THREAD_LIBS_INIT "-fopenmp")
-#set(OpenMP_CXX_FLAGS "-fopenmp")
+set(CXX_PURE_DEBUG_FLAGS "-g")
+set(CXX_PURE_RELEASE_FLAGS "-g -O3")
+set(CXX_HYBRID_DEBUG_FLAGS "-g")
+set(CXX_HYBRID_RELEASE_FLAGS "-g -O3")
+
+set(CMAKE_THREAD_LIBS_INIT "-fopenmp")
+set(OpenMP_CXX_FLAGS "-fopenmp")

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

@@ -53,9 +68,6 @@

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

-set(LAPACK_LIB "/soft/libraries/alcf/current/gcc/LAPACK/lib")
-set(ESSL_LIB "/soft/libraries/essl/current/essl/5.1/lib64")
-set(IBMCMP_ROOT "/soft/compilers/ibmcmp-nov2012")
 set(XLF_LIB "${IBMCMP_ROOT}/xlf/bg/14.1/bglib64")
 set(XLSMP_LIB "${IBMCMP_ROOT}/xlsmp/bg/3.1/bglib64")


output all vars in case of error

output all vars in case of error

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -97,6 +97,7 @@
   )
   if(_rosbuild_check_package_location_failed)
     message("[rosbuild] Error from directory check: $ENV{ROS_ROOT}/core/rosbuild/bin/check_same_directories.py ${${PROJECT_NAME}_PACKAGE_PATH} ${PROJECT_SOURCE_DIR}")
+    message("${_rosbuild_check_package_location_failed}")
     message("${_rosbuild_check_package_location_error}")
     message(FATAL_ERROR "[rosbuild] rospack found package \"${PROJECT_NAME}\" at \"${${PROJECT_NAME}_PACKAGE_PATH}\", but the current directory is \"${PROJECT_SOURCE_DIR}\".  You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order.")
   endif(_rosbuild_check_package_location_failed)


[C++] do not use clang-formatter by default

Change-Id: I15943d69fd27fca7f33f9c7b4a1483c18e5fb196

--- cpp/CMake/AddClangFormat.cmake
+++ cpp/CMake/AddClangFormat.cmake
@@ -1,7 +1,7 @@
 option(
     ENABLE_CLANG_FORMATTER
     "Use clang-formatter to format source code?"
-    ON
+    OFF
 )
 message(STATUS "option ENABLE_CLANG_FORMATTER=" ${ENABLE_CLANG_FORMATTER})


Adding location for CASA's python libraries

--- modules/FindCoherentPython.cmake
+++ modules/FindCoherentPython.cmake
@@ -60,8 +60,14 @@
         "from distutils.sysconfig import get_python_lib"
             "print(get_python_lib())"
         )
-        if(DEFINED python_lib AND EXISTS "${python_lib}")
-            list(INSERT CMAKE_LIBRARY_PATH 0 "${python_lib}")
+        if(DEFINED python_lib)
+            if(EXISTS "${python_lib}")
+                list(INSERT CMAKE_LIBRARY_PATH 0 "${python_lib}")
+            endif()
+            if(EXISTS "${python_lib}/../config")
+                # CASA seems to put stuff here
+                list(INSERT CMAKE_LIBRARY_PATH 0 "${python_lib}/../config")
+            endif()
         endif()
         # And tries get_config_var('LIBDIR').
         # Good for virtualenv but not canopy.


ARROW-7320: [C++] Specify CMAKE_INSTALL_LIBDIR for gbenchmark

This is to fix the build error on bullx Linux.

Closes #5962 from MaChengxin/fix-ARROW-7320 and squashes the following commits:

c40dbc0a2 <macx> Improve format using cmake-format
b47e10dac <macx> Specify CMAKE_INSTALL_LIBDIR for gbenchmark

Authored-by: macx <7d0f916f8ac6caf482e4d3417fbc362fb781791a@protonmail.ch>
Signed-off-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1520,10 +1520,12 @@
     GBENCHMARK_MAIN_STATIC_LIB
     "${GBENCHMARK_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}benchmark_main${CMAKE_STATIC_LIBRARY_SUFFIX}"
     )
-  set(GBENCHMARK_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS}
-                            "-DCMAKE_INSTALL_PREFIX=${GBENCHMARK_PREFIX}"
-                            -DBENCHMARK_ENABLE_TESTING=OFF
-                            -DCMAKE_CXX_FLAGS=${GBENCHMARK_CMAKE_CXX_FLAGS})
+  set(GBENCHMARK_CMAKE_ARGS
+      ${EP_COMMON_CMAKE_ARGS}
+      "-DCMAKE_INSTALL_PREFIX=${GBENCHMARK_PREFIX}"
+      -DCMAKE_INSTALL_LIBDIR=lib
+      -DBENCHMARK_ENABLE_TESTING=OFF
+      -DCMAKE_CXX_FLAGS=${GBENCHMARK_CMAKE_CXX_FLAGS})
   if(APPLE)
     set(GBENCHMARK_CMAKE_ARGS ${GBENCHMARK_CMAKE_ARGS} "-DBENCHMARK_USE_LIBCXX=ON")
   endif()


ARROW-14207: [C++] Add missing dependencies for bundled Boost targets

They are needed for building some tests We may build these tests before bundled Boost targets are built.

This also removes Boost from libarrow_bundled_dependencies.a. Because Boost is only used for tests.

Closes #11300 from kou/cpp-boost-bundled-missing-dependency

Authored-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -806,7 +806,8 @@
                         CONFIGURE_COMMAND ${BOOST_CONFIGURE_COMMAND}
                         BUILD_COMMAND ${BOOST_BUILD_COMMAND}
                         INSTALL_COMMAND "" ${EP_LOG_OPTIONS})
-    list(APPEND ARROW_BUNDLED_STATIC_LIBS boost_system_static boost_filesystem_static)
+    add_dependencies(boost_system_static boost_ep)
+    add_dependencies(boost_filesystem_static boost_ep)
   else()
     externalproject_add(boost_ep
                         ${EP_LOG_OPTIONS}


Support hiredis::hiredis_ssl and hiredis::hiredis_ssl_static

--- 3rd_party/redis/redis.cmake
+++ 3rd_party/redis/redis.cmake
@@ -23,6 +23,7 @@

 # if (VCPKG_TOOLCHAIN)
 #     find_package(hiredis QUIET)
+#     find_package(hiredis_ssl QUIET NO_MODULE)
 #     PROJECT_3RD_PARTY_REDIS_HIREDIS_IMPORT()
 # endif ()

@@ -54,6 +55,9 @@
         message(FATAL_ERROR "hiredis not found")
     endif()

+    if (TARGET hiredis::hiredis_static OR TARGET hiredis::hiredis)
+        find_package(hiredis_ssl QUIET NO_MODULE)
+    endif()
     PROJECT_3RD_PARTY_REDIS_HIREDIS_IMPORT()
 endif ()

@@ -80,10 +84,6 @@
     if (NOT TARGET hiredis-happ)
         EchoWithColor(COLOR RED "-- Dependency: hiredis-happ not found")
         message(FATAL_ERROR "hiredis-happ not found")
-    else ()
-        if (TARGET hiredis::hiredis_static OR TARGET hiredis::hiredis)
-            find_package(hiredis_ssl QUIET NO_MODULE)
-        endif()
     endif ()

     list(APPEND 3RD_PARTY_PUBLIC_LINK_NAMES hiredis-happ)


Add copyright to boost helper script.

Add copyright to boost helper script.

--- cmake-local/CMakeBoostHelper.cmake
+++ cmake-local/CMakeBoostHelper.cmake
@@ -1,4 +1,13 @@
 # Help CMake find recent Boost MSVC binaries without manual configuration.
+#
+# Original Author:
+# 2014-2016 Ryan Pavlik <ryan.pavlik@gmail.com>
+#
+# Copyright Sensics, Inc. 2014-2016.
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
 if(MSVC)
     if(NOT DEFINED Boost_USE_MULTITHREADED)
         set(Boost_USE_MULTITHREADED ON) # Most common ABI


change unset -> set, it is less clear but it is supported by sles11

--- cmake/Modules/FindLibArchive.cmake
+++ cmake/Modules/FindLibArchive.cmake
@@ -46,11 +46,11 @@
   set(_LibArchive_VERSION_STRING)
 endif()

-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibArchive
-	DEFAULT_MSG LibArchive_LIBRARY
-	LibArchive_INCLUDE_DIR)
-
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+find_package_handle_standard_args(LibArchive
+                                  REQUIRED_VARS LibArchive_LIBRARY LibArchive_INCLUDE_DIR
+                                  VERSION_VAR LibArchive_VERSION
+  )
 set(LIBARCHIVE_FOUND)

 if(LibArchive_FOUND)


Fix CPack NSIS homepage

Fix CPack NSIS homepage

Summary: BITCOINABC_HOMEPAGE_URL does not exist. Use the existing homepage that is already set.

Test Plan:
Setup win64 cross build:
```
cd depends
make build-win64
cd ..
mkdir build-win64
cmake -GNinja .. -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Win64.cmake -DBUILD_BITCOIN_SEEDER=OFF
```
Build the package and inspect build contents:
```
ninja package
less _CPack_Packages/x86_64-w64-mingw32/NSIS/project.nsi  # verify URL is set
less CPackConfig.cmake  # verify homepage is set
```

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D5372

--- cmake/modules/PackageOptions.cmake
+++ cmake/modules/PackageOptions.cmake
@@ -34,7 +34,7 @@
 set(CPACK_NSIS_EXECUTABLES_DIRECTORY "${CMAKE_INSTALL_BINDIR}")
 set(_nsis_bitcoin_qt "bitcoin-qt.exe")

-set(CPACK_NSIS_URL_INFO_ABOUT "${BITCOINABC_HOMEPAGE_URL}")
+set(CPACK_NSIS_URL_INFO_ABOUT "${CPACK_PACKAGE_HOMEPAGE_URL}")
 set(CPACK_NSIS_CONTACT "${CPACK_PACKAGE_CONTACT}")

 set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/pixmaps/bitcoin-abc.ico")


Add DLL copy commands for armnnTfLiteParser.dll

Change-Id: Ibf4448bc898d2265ddba1be038d8ebc757bcdc2e

--- cmake/AddDllCopyCommands.cmake
+++ cmake/AddDllCopyCommands.cmake
@@ -55,6 +55,12 @@
                                         "${PROTOBUF_ROOT}/bin/libprotobuf.dll")
         endif()

+        # armnnTfLiteParser.dll
+        if ("armnnTfLiteParser" IN_LIST target_deps)
+            addDllCopyCommand(${target} "$<TARGET_FILE_DIR:armnnTfLiteParser>/armnnTfLiteParser.dll"
+                                        "$<TARGET_FILE_DIR:armnnTfLiteParser>/armnnTfLiteParser.dll")
+        endif()
+
         # caffe.dll and its dependencies
         listContainsRegex(includeCaffeDlls "${target_deps}" "caffe")
         if (${includeCaffeDlls})


Introduce a fix that was in the patches branch

--- cmake/modules/FindOracle.cmake
+++ cmake/modules/FindOracle.cmake
@@ -75,6 +75,8 @@
       ${ORACLE_HOME}/bin
     )
     IF(SQLPLUS_EXECUTABLE)
+       get_filename_component(bindir ${SQLPLUS_EXECUTABLE} PATH)         # sqlplus executable needs its shared libraries
+       set(ENV{LD_LIBRARY_PATH} ${bindir}/../lib:$ENV{LD_LIBRARY_PATH})
 		EXECUTE_PROCESS(COMMAND ${SQLPLUS_EXECUTABLE} -version OUTPUT_VARIABLE sqlplus_out)
 		STRING(REGEX MATCH "([0-9.]+)" sqlplus_version ${sqlplus_out})
 		MESSAGE(STATUS "Found sqlplus version: ${sqlplus_version}")


Make PyLint depend on Python

Make PyLint depend on Python

It depends on Python because it needs Python to build with.

--- cmake/modules/FindPyLint.cmake
+++ cmake/modules/FindPyLint.cmake
@@ -6,11 +6,12 @@
 if(BUILD_PYLINT)
 	if(NOT PYLINT_FOUND)
 		message(STATUS "Building PyLint from source.")
+		find_package(Python REQUIRED)
 		include(ExternalProject)
-		find_package(Python REQUIRED)
 		ExternalProject_Add(PyLint
 			URL https://pypi.python.org/packages/4e/4b/2f14a233e6c86bbfff9568d3357860573dea51be7c96eecab9471ab6ca6f/pylint-1.6.4.tar.gz#md5=66ba9c27e067568bdabcdd7c21303903
 			URL_HASH SHA512=8252A46F8A7FF6A70F2EA10A94A9E8618A903014210CF87C061E649FBE0C2106FB1B63643605AE0ED3F4652E8ED09442F4FD32A0DF11F3639E6E35128E432D51
+			DEPENDS Python
 			CONFIGURE_COMMAND ""
 			BUILD_COMMAND ${PYTHON_EXECUTABLE} setup.py build
 			INSTALL_COMMAND ${PYTHON_EXECUTABLE} setup.py install


Fix test for `.exe` suffix on Windows

Fix test for `.exe` suffix on Windows

Without this change (using the correct regex syntax), the `eventexe` executable is missing the `.exe` (mandatory) suffix on Windows


Replace regex escaping/matching with string(FIND)


Restore installation of _rdict.pcms in case if NO_CXXMODULE in ROOT_GENERATE_DICTIONARY() was enabled

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -428,7 +428,10 @@
     endif(ARG_MULTIDICT)

     if(runtime_cxxmodules)
-      set(pcm_name)
+      # Currently we are not able to build R C++ module, so we still need to be able to install it's _rdict.pcm.
+      if(NOT ARG_NO_CXXMODULE)
+        set(pcm_name)
+      endif()
       if(cpp_module)
         set(cpp_module_file ${library_output_dir}/${cpp_module}.pcm)
         if (APPLE)


Update CMAKE_SHARED_LINKER_FLAGS with existing value

Setting of CMAKE_SHARED_LINKER_FLAGS overwrites any existing value
when configuring Linux/Windows, so user cannot add any required
flags (e.g. via LDFLAGS) which may be required for packaging etc.

Following conventions used for CMAKE_{C,CXX}_FLAGS, prepend existing
value of CMAKE_SHARED_LINKER_FLAGS to argument when setting a new
value for CMAKE_SHARED_LINKER_FLAGS.

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -54,7 +54,7 @@
   set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")

-  set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")

   # Select flags.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
@@ -89,7 +89,7 @@
   set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")

-  set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")

   # Select flags.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
@@ -145,25 +145,25 @@
   if(ICC_MAJOR EQUAL 11)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-    set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()

   if(ICC_MAJOR EQUAL 12)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-    set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()

   if(ICC_MAJOR EQUAL 13)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-    set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()

   if(ICC_MAJOR EQUAL 14)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873 -wd1478")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279 -wd2536 -wd873 -wd1478")
-    set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${BIT_ENVIRONMENT} -Wl,--no-undefined")
   endif()

   set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")


Fixed issue in python cmake to update wheel package (#6384)

* Fixed issue in python cmake to update wheel package

* Fixes python cmake issue for OV EP

Added post build step for libonnxruntime_providers_openvino
that copies the updated libonnxruntime_providers_openvino.so file
to /onnxruntime/capi directory every time this target is rebuilt.

Signed-off-by: MaajidKhan <c6b54bb1da2ed38335accd20ff17d695144938c9@gmail.com>

* Removed post_build step from onnxruntime_python.cmake

Now that we have added the post build step to copy
onnxruntime_providers_openvino.so and providers_shared.so
to /onnxruntime/capi directory in onnxruntime_providers.cmake file.
so removing the duplication of the same from here.

Signed-off-by: MaajidKhan <c6b54bb1da2ed38335accd20ff17d695144938c9@gmail.com>

* Fixed python cmake issue for OpenVINO-EP

->Fixed issue for both Linux and windows

Signed-off-by: MaajidKhan <c6b54bb1da2ed38335accd20ff17d695144938c9@gmail.com>

Co-authored-by: MaajidKhan <c6b54bb1da2ed38335accd20ff17d695144938c9@gmail.com>

--- cmake/onnxruntime_python.cmake
+++ cmake/onnxruntime_python.cmake
@@ -395,15 +395,13 @@
 endif()

 if (onnxruntime_USE_OPENVINO)
-  if(NOT WIN32)
     add_custom_command(
       TARGET onnxruntime_pybind11_state POST_BUILD
       COMMAND ${CMAKE_COMMAND} -E copy
-          ${OPENVINO_DLL_PATH} $<TARGET_FILE:onnxruntime_providers_openvino>
+          $<TARGET_FILE:onnxruntime_providers_openvino>
           $<TARGET_FILE:onnxruntime_providers_shared>
           $<TARGET_FILE_DIR:${build_output_target}>/onnxruntime/capi/
     )
-  endif()
 endif()

 if (onnxruntime_USE_TVM)


enable readline support if header and lib found

--- cmake_admin/FindReadline.cmake
+++ cmake_admin/FindReadline.cmake
@@ -10,9 +10,9 @@
 find_path ( READLINE_INCLUDE_DIR NAMES history.h readline/history.h )
 find_library ( READLINE_LIBRARIES NAMES readline )

-if ( READLINE_INCLUDE_DIR )
-    set ( HAVE_READLINE TRUE CACHE TYPE BOOL )
-endif ( READLINE_INCLUDE_DIR )
+if ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )
+    set ( HAVE_READLINE TRUE CACHE BOOL )
+endif ( READLINE_INCLUDE_DIR AND READLINE_LIBRARIES )

 include ( FindPackageHandleStandardArgs )
 FIND_PACKAGE_HANDLE_STANDARD_ARGS( READLINE DEFAULT_MSG


Allow extra arguments for configure targets

--- conf/sprokit-macro-configure.cmake
+++ conf/sprokit-macro-configure.cmake
@@ -8,6 +8,9 @@
 #
 #   sprokit_configure_extra_dests
 #     A list of other paths to configure the file into.
+#
+#   sprokit_configure_cmake_args
+#     Extra arguments to pass to CMake when running the generated script.
 #
 # Their syntax is:
 #
@@ -79,6 +82,7 @@
     OUTPUT  "${dest}"
             ${extra_output}
     COMMAND "${CMAKE_COMMAND}"
+            ${sprokit_configure_cmake_args}
             -P "${configure_script}"
     MAIN_DEPENDENCY
             "${source}"


ImportedProjectUtils: Fix cmakelint errors

--- ImportedProjectUtils.cmake
+++ ImportedProjectUtils.cmake
@@ -18,7 +18,7 @@
 include ("smspillaz/cmake-header-language/DetermineHeaderLanguage")
 include (CMakeParseArguments)

-if (NOT CMAKE_SCRIPT_MODE_FILE )
+if (NOT CMAKE_SCRIPT_MODE_FILE)
     include (ExternalProject)
 endif ()

@@ -110,7 +110,7 @@
     set (${CLINES}
          "${${CLINES}}\nset (${COPT} \"${VALUE}\" CACHE ${UTYPE} \"\" FORCE)")

-endmacro (psq_import_utils_append_typed_cache_definition)
+endmacro ()

 # psq_import_utils_append_cache_definition
 #
@@ -145,7 +145,7 @@
         psq_import_utils_append_cache_definition (${CACHE_OPTION}
                                                   ${VALUE}
                                                   ${CACHE_LINES})
-    endif (DEFINED ${VALUE})
+    endif ()

 endmacro ()

@@ -182,7 +182,7 @@

                 list (APPEND NAMESPACED_VARIABLES ${VAR})

-            endif (NS_POS EQUAL 0)
+            endif ()

         endforeach ()

@@ -207,9 +207,7 @@
                                                             ${TYPE}
                                                             CACHE_DEFS)

-        endif (NOT CACHE_VARIABLE_TYPE STREQUAL "STATIC" AND
-               NOT CACHE_VARIABLE_TYPE STREQUAL "INTERNAL" AND
-               NOT CACHE_VARIABLE_TYPE STREQUAL "UNINITIALIZED")
+        endif ()

     endforeach ()

@@ -227,7 +225,7 @@
              PARENT_SCOPE)
         return ()

-    endif (NOT ${PAIRS_LIST})
+    endif ()

     list (LENGTH ${PAIRS_LIST} PAIRS_LIST_LENGTH)
     math (EXPR PAIRS_LIST_MODULO "${PAIRS_LIST_LENGTH} % 2")
@@ -236,7 +234,7 @@

         message (FATAL_ERROR "Length of ${PAIRS_LIST} must be even")

-    endif (NOT PAIRS_LIST_MODULO EQUAL 0)
+    endif ()

     math (EXPR PAIRS_LIST_MAXIMUM_COUNT "${PAIRS_LIST_LENGTH} - 1")
     foreach (PAIRS_LIST_INDEX RANGE 0 ${PAIRS_LIST_MAXIMUM_COUNT} 2)
@@ -275,13 +273,13 @@

         message (FATAL_ERROR "COMMAND must be set")

-    endif (NOT EXEC_AND_CHECK_SUCCESS_COMMAND)
+    endif ()

     if (NOT EXEC_AND_CHECK_SUCCESS_WORKING_DIRECTORY)

         message (FATAL_ERROR "WORKING_DIRECTORY must be set")

-    endif (NOT EXEC_AND_CHECK_SUCCESS_WORKING_DIRECTORY)
+    endif ()

     set (LOG_PREFIX
@@ -304,7 +302,7 @@
         message (FATAL_ERROR "${NAME} (${EXEC_AND_CHECK_SUCCESS_COMMAND})"
                              " failed with ${RESULT}")

-    endif (NOT RESULT EQUAL 0)
+    endif ()

 endfunction ()

@@ -403,7 +401,7 @@
              "                          ${METAPROJECT_APPEND_EXPORTS_SCRIPT}\n"
              "                          LOG)\n")

-    endif (GENERATE_EXPORTS)
+    endif ()

     string (REPLACE ";"
                     ""
@@ -466,7 +464,7 @@
                              "which will automatically append the correct "
                              "command to the external project's CMakeLists.txt")

-    endif (NOT EXISTS ${EXTERNAL_PROJECT_EXPORTS})
+    endif ()

     set (${EXTERNAL_PROJECT_EXPORTS_RETURN}
          ${EXTERNAL_PROJECT_EXPORTS}
@@ -556,10 +554,10 @@
     file (MAKE_DIRECTORY "${EXTERNAL_PROJECT_BINARY_DIR}")
     file (MAKE_DIRECTORY "${EXTERNAL_PROJECT_STAMP_DIR}")

-    # We need to be a little bit clever about setting EXTERNAL_PROJECT_SOURCE_DIR
-    # and EXTERNAL_PROJECT_BINARY_DIR. If the caller specifies SOURCE_DIR or
-    # BINARY_DIR then externalproject_add will just use those, so we need to
-    # make sure that we use them too.
+    # We need to be a little bit clever about setting
+    # EXTERNAL_PROJECT_SOURCE_DIR and EXTERNAL_PROJECT_BINARY_DIR. If the caller
+    # specifies SOURCE_DIR or BINARY_DIR then externalproject_add will just use
+    # those, so we need to make sure that we use them too.
     set (CAPTURE_EP_ARGS SOURCE_DIR BINARY_DIR STAMP_DIR)

     foreach (ARG ${IMPORT_PROJECT_OPTIONS})
@@ -584,9 +582,9 @@
                 list (REMOVE_ITEM IMPORT_PROJECT_OPTIONS
                       "${EXTERNAL_PROJECT_${ARG}}")

-            endif (NOT "${ARG}" STREQUAL "SOURCE_DIR")
-
-        endif (NOT FOUND_IN_CAPTURE_EP_ARGS EQUAL -1)
+            endif ()
+
+        endif ()

     endforeach ()

@@ -609,11 +607,11 @@

         set (GENERATE_EXPORTS ON)

-    else (IMPORT_PROJECT_GENERATE_EXPORTS)
+    else ()

         set (GENERATE_EXPORTS OFF)

-    endif (IMPORT_PROJECT_GENERATE_EXPORTS)
+    endif ()

     # Create meta-project to download and configure external project at
     # configure-time. The METAPROJECT_BUILD_DIR will be set on success.


CMake: Make FindOgre script useable on OSX with static builds

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -68,14 +68,13 @@
   set(OGRE_LIB_SUFFIX "")
 endif ()

-
-if(APPLE AND NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+if(APPLE AND NOT OGRE_STATIC)
 	set(OGRE_LIBRARY_NAMES "Ogre${OGRE_LIB_SUFFIX}")
 else()
     set(OGRE_LIBRARY_NAMES "OgreMain${OGRE_LIB_SUFFIX}")
 endif()
 get_debug_names(OGRE_LIBRARY_NAMES)
-
+
 # construct search paths from environmental hints and
 # OS specific guesses
 if (WIN32)
@@ -145,7 +144,7 @@
 set(OGRE_PREFIX_WATCH ${OGRE_PREFIX_PATH} ${OGRE_PREFIX_SOURCE} ${OGRE_PREFIX_BUILD})
 clear_if_changed(OGRE_PREFIX_WATCH ${OGRE_RESET_VARS})

-if(NOT OGRE_BUILD_PLATFORM_APPLE_IOS)
+if(NOT OGRE_STATIC)
 	# try to locate Ogre via pkg-config
 	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")

@@ -383,11 +382,9 @@
 # look for Overlay component
 ogre_find_component(Overlay OgreOverlaySystem.h)

-
 #########################################################
 # Find Ogre plugins
-#########################################################
-
+#########################################################
 macro(ogre_find_plugin PLUGIN HEADER)
   # On Unix, the plugins might have no prefix
   if (CMAKE_FIND_LIBRARY_PREFIXES)
@@ -411,9 +408,9 @@
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
   set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
-    HINTS ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt release release/opt relwithdebinfo relwithdebinfo/opt minsizerel minsizerel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
-    HINTS ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt debug debug/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt debug debug/opt)
   make_library_set(OGRE_${PLUGIN}_LIBRARY)

   if (OGRE_${PLUGIN}_LIBRARY OR OGRE_${PLUGIN}_INCLUDE_DIR)
@@ -446,9 +443,9 @@
           PATH_SUFFIXES "" bin bin/debug debug)
       elseif (UNIX)
         get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_REL} PATH)
-        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)")
-        get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
-        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)")
+        set(OGRE_PLUGIN_DIR_REL ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (release)" FORCE)
+	    get_filename_component(OGRE_PLUGIN_DIR_TMP ${OGRE_${PLUGIN}_LIBRARY_DBG} PATH)
+        set(OGRE_PLUGIN_DIR_DBG ${OGRE_PLUGIN_DIR_TMP} CACHE STRING "Ogre plugin dir (debug)" FORCE)
       endif ()
     endif ()

@@ -479,7 +476,7 @@
 ogre_find_plugin(RenderSystem_GLES2 OgreGLES2RenderSystem.h RenderSystems/GLES2/include)
 ogre_find_plugin(RenderSystem_Direct3D9 OgreD3D9RenderSystem.h RenderSystems/Direct3D9/include)
 ogre_find_plugin(RenderSystem_Direct3D11 OgreD3D11RenderSystem.h RenderSystems/Direct3D11/include)
-
+
 if (OGRE_STATIC)
   # check if dependencies for plugins are met
   if (NOT DirectX_FOUND)


[OGRE-133] GL3Plus RenderSystem is missing from FindOGRE.cmake

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -28,7 +28,9 @@
 #  Plugin_BSPSceneManager, Plugin_CgProgramManager,
 #  Plugin_OctreeSceneManager, Plugin_OctreeZone,
 #  Plugin_ParticleFX, Plugin_PCZSceneManager,
-#  RenderSystem_GL, RenderSystem_Direct3D9,
+#  RenderSystem_GL, RenderSystem_GL3Plus,
+#  RenderSystem_GLES, RenderSystem_GLES2,
+#  RenderSystem_Direct3D9, RenderSystem_Direct3D11
 #  Paging, Terrain, Volume, Overlay
 #
 # For each of these components, the following variables are defined:
@@ -130,7 +132,7 @@
 set(OGRE_COMPONENTS Paging Terrain Volume Overlay
   Plugin_BSPSceneManager Plugin_CgProgramManager Plugin_OctreeSceneManager
   Plugin_OctreeZone Plugin_PCZSceneManager Plugin_ParticleFX
-  RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GLES RenderSystem_GLES2)
+  RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GL3Plus RenderSystem_GLES RenderSystem_GLES2)
 set(OGRE_RESET_VARS
   OGRE_CONFIG_INCLUDE_DIR OGRE_INCLUDE_DIR
   OGRE_LIBRARY_FWK OGRE_LIBRARY_REL OGRE_LIBRARY_DBG
@@ -472,6 +474,7 @@
 ogre_find_plugin(Plugin_OctreeSceneManager OgreOctreeSceneManager.h PlugIns/OctreeSceneManager/include)
 ogre_find_plugin(Plugin_ParticleFX OgreParticleFXPrerequisites.h PlugIns/ParticleFX/include)
 ogre_find_plugin(RenderSystem_GL OgreGLRenderSystem.h RenderSystems/GL/include)
+ogre_find_plugin(RenderSystem_GL3Plus OgreGL3PlusRenderSystem.h RenderSystems/GL3Plus/include)
 ogre_find_plugin(RenderSystem_GLES OgreGLESRenderSystem.h RenderSystems/GLES/include)
 ogre_find_plugin(RenderSystem_GLES2 OgreGLES2RenderSystem.h RenderSystems/GLES2/include)
 ogre_find_plugin(RenderSystem_Direct3D9 OgreD3D9RenderSystem.h RenderSystems/Direct3D9/include)
@@ -488,6 +491,9 @@
   if (NOT OPENGL_FOUND)
     set(OGRE_RenderSystem_GL_FOUND FALSE)
   endif ()
+  if (NOT OPENGL_FOUND)
+    set(OGRE_RenderSystem_GL3Plus_FOUND FALSE)
+  endif ()
   if (NOT OPENGLES_FOUND)
     set(OGRE_RenderSystem_GLES_FOUND FALSE)
   endif ()
@@ -506,6 +512,9 @@
     ${DirectX_D3D11_LIBRARIES}
   )
   set(OGRE_RenderSystem_GL_LIBRARIES ${OGRE_RenderSystem_GL_LIBRARIES}
+    ${OPENGL_LIBRARIES}
+  )
+  set(OGRE_RenderSystem_GL3Plus_LIBRARIES ${OGRE_RenderSystem_GL3Plus_LIBRARIES}
     ${OPENGL_LIBRARIES}
   )
   set(OGRE_RenderSystem_GLES_LIBRARIES ${OGRE_RenderSystem_GLES_LIBRARIES}


FindOGRE script: Fixed static linking order for ZZip and ZLIB, added Xrandr lib for Linux

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -215,9 +215,9 @@
   endif ()

-  set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZLIB_LIBRARIES} ${ZZip_LIBRARIES}
+  set(OGRE_LIBRARIES ${OGRE_LIBRARIES} ${ZZip_LIBRARIES} ${ZLIB_LIBRARIES}
     ${FreeImage_LIBRARIES} ${FREETYPE_LIBRARIES}
-    ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY}
+    ${X11_LIBRARIES} ${X11_Xt_LIBRARIES} ${XAW_LIBRARY} ${X11_Xrandr_LIB}
     ${Cocoa_LIBRARIES} ${Carbon_LIBRARIES})

   if (NOT ZLIB_FOUND OR NOT ZZip_FOUND)
@@ -229,8 +229,10 @@
   if (NOT FREETYPE_FOUND)
     set(OGRE_DEPS_FOUND FALSE)
   endif ()
-  if (UNIX AND NOT X11_FOUND)
-    set(OGRE_DEPS_FOUND FALSE)
+  if (UNIX AND NOT APPLE)
+	if (NOT X11_FOUND)
+      set(OGRE_DEPS_FOUND FALSE)
+	endif ()
   endif ()

   if (OGRE_CONFIG_THREADS)


switch FindASSIMP to LibFindMacros

switch FindASSIMP to LibFindMacros

--- CMakeModules/FindASSIMP.cmake
+++ CMakeModules/FindASSIMP.cmake
@@ -5,23 +5,16 @@
 #  ASSIMP_INCLUDE_DIR - the Assimp include directories
 #  ASSIMP_LIBRARY - link these to use Assimp

-FIND_PATH( ASSIMP_INCLUDE_DIR assimp
-  PATHS
-  /usr/include
-  /usr/local/include
-  /opt/local/include
-)
+include(LibFindMacros)

-FIND_LIBRARY( ASSIMP_LIBRARY assimp
-  PATHS
-  /usr/lib64
-  /usr/lib
-  /usr/local/lib
-  /opt/local/lib
-)
+libfind_pkg_check_modules(ASSIMP_PKGCONF assimp)

-SET( ASSIMP_FOUND FALSE )
+find_path(ASSIMP_INCLUDE_DIR assimp/scene.h
+          DOC "ASSIMP include file"
+          HINTS ${ASSIMP_PKGCONF_INCLUDE_DIRS})

-IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
-  SET( ASSIMP_FOUND TRUE )
-ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
+find_library(ASSIMP_LIBRARY NAMES assimp
+             DOC "ASSIMP library file"
+             HINTS ${ASSIMP_PKGCONF_LIBRARY_DIRS} )
+
+libfind_process(ASSIMP)


COMP: Use cmake variable MITK_ENABLE_RENDERING_TESTING to enable interaction test. Avoid crash on linux due to vtkRenderWindow creation.

--- Core/Code/Testing/files.cmake
+++ Core/Code/Testing/files.cmake
@@ -53,7 +53,6 @@
   mitkPointSetWriterTest.cpp
   mitkPointSetReaderTest.cpp
   mitkPointSetInteractorTest.cpp
-  mitkPointSetDataInteractorTest.cpp
   mitkPropertyTest.cpp
   mitkPropertyListTest.cpp
   mitkSlicedGeometry3DTest.cpp
@@ -95,6 +94,15 @@
   mitkLookupTableTest.cpp
   mitkSTLFileReaderTest.cpp
 )
+
+if(MITK_ENABLE_RENDERING_TESTING) #since mitkInteractionTestHelper is currently creating a vtkRenderWindow
+set(MODULE_TESTS
+  ${MODULE_TESTS}
+  mitkPointSetDataInteractorTest.cpp
+)
+endif()
+
+message (${MODULE_TESTS})

 # test with image filename as an extra command line parameter
 set(MODULE_IMAGE_TESTS


Behave better in multi-project cmake (#198)

If a sub-project uses ament_lint, don't apply it to the top-level project headers

Signed-off-by: Dan Rose <2591e5f46f28d303f9dc027d475a5c60d8dea17a@digilabs.io>

--- ament_cmake_cppcheck/cmake/ament_cmake_cppcheck_lint_hook.cmake
+++ ament_cmake_cppcheck/cmake/ament_cmake_cppcheck_lint_hook.cmake
@@ -35,7 +35,7 @@

   # BUILDSYSTEM_TARGETS only supported in CMake >= 3.7
   if(NOT CMAKE_VERSION VERSION_LESS "3.7.0")
-    get_directory_property(_build_targets DIRECTORY ${CMAKE_SOURCE_DIR} BUILDSYSTEM_TARGETS)
+    get_directory_property(_build_targets DIRECTORY ${PROJECT_SOURCE_DIR} BUILDSYSTEM_TARGETS)
     foreach(_target ${_build_targets})
       # Include directories property is different for INTERFACE libraries
       get_target_property(_target_type ${_target} TYPE)
@@ -50,12 +50,12 @@
       #     1. Reduces execution time (less include directories to search)
       #     2. cppcheck will not check for errors in external packages
       foreach(_include_dir ${_include_dirs})
-        # TODO(jacobperron): Escape special regex characters in CMAKE_SOURCE_DIR
+        # TODO(jacobperron): Escape special regex characters in PROJECT_SOURCE_DIR
         #                    Related CMake feature request: https://gitlab.kitware.com/cmake/cmake/issues/18409
         # Check if include directory is a subdirectory of the source directory
-        string(REGEX MATCH "^${CMAKE_SOURCE_DIR}/.*" _is_subdirectory ${_include_dir})
+        string(REGEX MATCH "^${PROJECT_SOURCE_DIR}/.*" _is_subdirectory ${_include_dir})
         # Check if include directory is part of a generator expression (e.g. $<BUILD_INTERFACE:...>)
-        string(REGEX MATCH "^\\$<.*:${CMAKE_SOURCE_DIR}/.*>$" _is_genexp_subdirectory "${_include_dir}")
+        string(REGEX MATCH "^\\$<.*:${PROJECT_SOURCE_DIR}/.*>$" _is_genexp_subdirectory "${_include_dir}")
         if(_is_subdirectory OR _is_genexp_subdirectory)
           list_append_unique(_all_include_dirs ${_include_dir})
         endif()


Adding version for CMakeConfig

Adding version for CMakeConfig

--- math/minuit2/StandAlone.cmake
+++ math/minuit2/StandAlone.cmake
@@ -85,6 +85,21 @@
     target_link_libraries(MinuitCommon INTERFACE MPI::MPI_CXX)
 endif()

+
+
+# Make a config file to make this usable as a CMake Package
+# Start by adding the version in a CMake understandable way
+include(CMakePackageConfigHelpers)
+write_basic_package_version_file(
+    Minuit2ConfigVersion.cmake
+    VERSION ${Minuit2_VERSION}
+    COMPATIBILITY AnyNewerVersion
+    )
+
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Minuit2ConfigVersion.cmake"
+    DESTINATION share/cmake/Modules/Minuit2)
+
+# Now, install the Interface targets
 install(TARGETS MinuitCommon
         EXPORT Minuit2Config)


make: lint real routing graph

make: lint real routing graph

Signed-off-by: Jeffrey Elms <23ce84ca7a7de9dc17ad8e8b0bbd717d4f9f9884@freshred.net>

--- make/devices.cmake
+++ make/devices.cmake
@@ -236,6 +236,7 @@
   get_target_property_required(XSLTPROC env XSLTPROC)
   get_target_property(XSLTPROC_TARGET env XSLTPROC_TARGET)
   get_target_property_required(XMLLINT env XMLLINT)
+  get_target_property(XMLLINT_TARGET env XMLLINT_TARGET)
   set(ARCH_SCHEMA ${symbiflow-arch-defs_SOURCE_DIR}/common/xml/fpga_architecture.xsd)

   add_custom_command(
@@ -267,7 +268,7 @@
     OUTPUT ${MERGE_XMLLINT_OUTPUT}
     DEPENDS
       ${MERGE_XML_OUTPUT}
-      ${XMLLINT}
+      ${XMLLINT} ${XMLLINT_TARGET}
       ${ARCH_SCHEMA}
     COMMAND
       ${XMLLINT}
@@ -345,14 +346,20 @@
   get_target_property_required(QUIET_CMD env QUIET_CMD)
   get_target_property(QUIET_CMD_TARGET env QUIET_CMD_TARGET)

+  get_target_property_required(XMLLINT env XMLLINT)
+  get_target_property(XMLLINT_TARGET env XMLLINT_TARGET)
+  set(ROUTING_SCHEMA ${symbiflow-arch-defs_SOURCE_DIR}/common/xml/routing_resource.xsd)
+
   set(DEVICE ${DEFINE_DEVICE_DEVICE})
   foreach(PACKAGE ${DEFINE_DEVICE_PACKAGES})
     get_target_property_required(DEVICE_FULL_TEMPLATE ${DEFINE_DEVICE_ARCH} DEVICE_FULL_TEMPLATE)
     string(CONFIGURE ${DEVICE_FULL_TEMPLATE} DEVICE_FULL)
     set(OUT_RRXML_VIRT_FILENAME rr_graph_${DEVICE}_${PACKAGE}.rr_graph.virt.xml)
     set(OUT_RRXML_REAL_FILENAME rr_graph_${DEVICE}_${PACKAGE}.rr_graph.real.xml)
+    set(OUT_RRXML_REAL_LINT_FILENAME rr_graph_${DEVICE}_${PACKAGE}.rr_graph.real.lint.html)
     set(OUT_RRXML_VIRT ${CMAKE_CURRENT_BINARY_DIR}/${OUT_RRXML_VIRT_FILENAME})
     set(OUT_RRXML_REAL ${CMAKE_CURRENT_BINARY_DIR}/${OUT_RRXML_REAL_FILENAME})
+    set(OUT_RRXML_REAL_LINT ${CMAKE_CURRENT_BINARY_DIR}/${OUT_RRXML_REAL_LINT_FILENAME})

     #
     # Generate a rr_graph for a device.
@@ -424,8 +431,22 @@
     add_custom_target(
       ${DEFINE_DEVICE_ARCH}_${DEFINE_DEVICE_DEVICE}_${PACKAGE}_rrxml_real
       DEPENDS ${OUT_RRXML_REAL}
-    )
+      )
     add_dependencies(all_rrgraph_xmls ${DEFINE_DEVICE_ARCH}_${DEFINE_DEVICE_DEVICE}_${PACKAGE}_rrxml_real)
+
+    # Lint the "real" rr_graph.xml
+    add_custom_command(
+      OUTPUT ${OUT_RRXML_REAL_LINT}
+      DEPENDS
+        ${OUT_RRXML_REAL}
+        ${XMLLINT} ${XMLLINT_TARGET}
+        ${ROUTING_SCHEMA}
+      COMMAND
+        ${QUIET_CMD} ${XMLLINT}
+	--output ${OUT_RRXML_REAL_LINT}
+	--schema ${ROUTING_SCHEMA}
+	${OUT_RRXML_REAL}
+      )

     # Define dummy boards.  PROG_TOOL is set to false to disallow programming.
     define_board(
@@ -876,7 +897,9 @@
     COMMAND
       ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/echo/vpr_stdout.log ${OUT_LOCAL}/echo/pack.log
     WORKING_DIRECTORY ${OUT_LOCAL}/echo
-  )
+    )
+
+  # TODO: validate .net xml file against common/xml/packed_netlist.xsd

   # Generate placement.
   # -------------------------------------------------------------------------


CMake fix after dali2 rename.

CMake fix after dali2 rename.

Change-Id: Ib28a2d1b97946885b71c12be702a57bc7bbf2cdf
Signed-off-by: Victor Cebollada <bd4ca07245b7f4eb2d3ace02513dff6e050d7f4b@samsung.com>

--- build/tizen/profiles/windows-profile.cmake
+++ build/tizen/profiles/windows-profile.cmake
@@ -80,5 +80,5 @@
         unofficial::angle::libEGL
         unofficial::angle::libGLESv2
         unofficial::cairo::cairo
-        dali-core::dali-core
+        dali2-core::dali2-core
 )


Reverting benchmark cmake changes. They break out-of-tree benchmark builds, which is used by some bots

Revert "Refactor out the creation of the benchmark libraries into a helper routine swift_benchmark_library. Initially just use it for DriverUtils."

This reverts commit ac539730e45fae3e18803e876d654ff79539e227. (+3 squashed commits)
Squashed commits:
[755f057] Revert "[benchmark][cmake] Refactor the swift benchmark helper libraries to use swift_benchmark_library."

This reverts commit a82945e03325a600c280278dc4ab2002ef1b8dd3.
[58e09c6] Revert "[benchmark][cmake] "swift_benchmark_library" => "add_swift_benchmark_library"."

This reverts commit 0e4b7b69cd005c68e082b740264b7da8d8ddb0af.
[5f5f2c1] Revert "[benchmark][cmake] Fix typo. This is NFC since this option is usually disabled."

This reverts commit 30f4b1b3e58db0b0aa7d1ff241fd0561e42e40b5.

--- benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
+++ benchmark/cmake/modules/AddSwiftBenchmarkSuite.cmake
@@ -1,5 +1,6 @@

 include(CMakeParseArguments)
+

 # Run a shell command and assign output to a variable or fail with an error.
 # Example usage:
@@ -19,57 +20,6 @@
   set(${RUNCMD_VARIABLE} ${${RUNCMD_VARIABLE}} PARENT_SCOPE)
 endfunction(runcmd)

-function (add_swift_benchmark_library objfile_out sibfile_out)
-  cmake_parse_arguments(BENCHLIB "" "MODULE_PATH;SOURCE_DIR;OBJECT_DIR" "SOURCES;LIBRARY_FLAGS" ${ARGN})
-
-  precondition(BENCHLIB_MODULE_PATH)
-  precondition(BENCHLIB_SOURCE_DIR)
-  precondition(BENCHLIB_OBJECT_DIR)
-  precondition(BENCHLIB_SOURCES)
-
-  set(module_name_path "${BENCHLIB_MODULE_PATH}")
-  get_filename_component(module_name "${module_name_path}" NAME)
-  set(srcdir "${BENCHLIB_SOURCE_DIR}")
-  set(objdir "${BENCHLIB_OBJECT_DIR}")
-  set(sources "${BENCHLIB_SOURCES}")
-
-  set(objfile "${objdir}/${module_name}.o")
-  set(swiftmodule "${objdir}/${module_name}.swiftmodule")
-
-  precondition(objfile_out)
-  add_custom_command(
-    OUTPUT "${objfile}"
-    DEPENDS ${stdlib_dependencies} ${sources}
-    COMMAND "${SWIFT_EXEC}"
-      ${BENCHLIB_LIBRARY_FLAGS}
-      "-force-single-frontend-invocation"
-      "-parse-as-library"
-      "-module-name" "${module_name}"
-      "-emit-module" "-emit-module-path" "${swiftmodule}"
-      "-o" "${objfile}"
-      ${sources})
-  set(${objfile_out} "${objfile}" PARENT_SCOPE)
-
-  if(SWIFT_BENCHMARK_EMIT_SIB)
-    precondition(sibfile_out)
-    set(sibfile "${objdir}/${module_name}.sib")
-
-    add_custom_command(
-      OUTPUT "${sibfile}"
-      DEPENDS
-      ${stdlib_dependencies} ${sources}
-      COMMAND "${SWIFT_EXEC}"
-        ${BENCHLIB_LIBRARY_FLAGS}
-        "-force-single-frontend-invocation"
-        "-parse-as-library"
-        "-module-name" "${module_name}"
-        "-emit-sib"
-        "-o" "${sibfile}"
-        ${sources})
-    set(sibfile_out "${sibfile}" PARENT_SCOPE)
-  endif()
-endfunction()
-
 function (swift_benchmark_compile_archopts)
   cmake_parse_arguments(BENCH_COMPILE_ARCHOPTS "" "PLATFORM;ARCH;OPT" "" ${ARGN})
   set(sdk ${${BENCH_COMPILE_ARCHOPTS_PLATFORM}_sdk})
@@ -117,43 +67,84 @@
   set(bench_library_objects)
   set(bench_library_sibfiles)
   foreach(module_name_path ${BENCH_DRIVER_LIBRARY_MODULES})
-    set(sources "${srcdir}/${module_name_path}.swift")
-
     get_filename_component(module_name "${module_name_path}" NAME)
+
     if("${module_name}" STREQUAL "DriverUtils")
-      list(APPEND sources "${srcdir}/utils/ArgParse.swift")
-    endif()
-
-    set(objfile_out)
-    set(sibfile_out)
-    add_swift_benchmark_library(objfile_out sibfile_out
-      MODULE_PATH "${module_name_path}"
-      SOURCE_DIR "${srcdir}"
-      OBJECT_DIR "${objdir}"
-      SOURCES ${sources}
-      LIBRARY_FLAGS ${common_options_driver} ${BENCH_DRIVER_LIBRARY_FLAGS})
-    precondition(objfile_out)
-    list(APPEND bench_library_objects "${objfile_out}")
+      set(extra_sources "${srcdir}/utils/ArgParse.swift")
+    endif()
+
+    set(objfile "${objdir}/${module_name}.o")
+    set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+    list(APPEND bench_library_objects "${objfile}")
+    set(source "${srcdir}/${module_name_path}.swift")
+    add_custom_command(
+        OUTPUT "${objfile}"
+        DEPENDS ${stdlib_dependencies} "${source}" ${extra_sources}
+        COMMAND "${SWIFT_EXEC}"
+        ${common_options_driver}
+        ${BENCH_DRIVER_LIBRARY_FLAGS}
+        "-force-single-frontend-invocation"
+        "-parse-as-library"
+        "-module-name" "${module_name}"
+        "-emit-module" "-emit-module-path" "${swiftmodule}"
+        "-o" "${objfile}"
+        "${source}" ${extra_sources})
+    if(SWIFT_BENCHMARK_EMIT_SIB)
+      set(sibfile "${objdir}/${module_name}.sib")
+      list(APPEND bench_library_sibfiles "${sibfile}")
+      add_custom_command(
+          OUTPUT "${sibfile}"
+          DEPENDS
+            ${stdlib_dependencies} "${srcdir}/${module_name_path}.swift"
+            ${extra_sources}
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options_driver}
+          ${BENCH_DRIVER_LIBRARY_FLAGS}
+          "-force-single-frontend-invocation"
+          "-parse-as-library"
+          "-module-name" "${module_name}"
+          "-emit-sib"
+          "-o" "${sibfile}"
+          "${source}" ${extra_sources})
+    endif()
+  endforeach()
+
+  foreach(module_name_path ${BENCH_LIBRARY_MODULES})
+    get_filename_component(module_name "${module_name_path}" NAME)
+
+    set(objfile "${objdir}/${module_name}.o")
+    set(swiftmodule "${objdir}/${module_name}.swiftmodule")
+    set(source "${srcdir}/${module_name_path}.swift")
+    list(APPEND bench_library_objects "${objfile}")
+    add_custom_command(
+        OUTPUT "${objfile}"
+        DEPENDS
+          ${stdlib_dependencies} "${srcdir}/${module_name_path}.swift"
+          ${extra_sources}
+        COMMAND "${SWIFT_EXEC}"
+        ${common_options}
+        "-force-single-frontend-invocation"
+        "-parse-as-library"
+        "-module-name" "${module_name}"
+        "-emit-module" "-emit-module-path" "${swiftmodule}"
+        "-o" "${objfile}"
+        "${source}" ${extra_sources})
     if (SWIFT_BENCHMARK_EMIT_SIB)
-      precondition(sibfile_out)
-      list(APPEND bench_library_sibfiles "${sibfile_out}")
-    endif()
-  endforeach()
-
-  foreach(module_name_path ${BENCH_LIBRARY_MODULES})
-    set(sources "${srcdir}/${module_name_path}.swift")
-
-    add_swift_benchmark_library(objfile_out sibfile_out
-      MODULE_PATH "${module_name_path}"
-      SOURCE_DIR "${srcdir}"
-      OBJECT_DIR "${objdir}"
-      SOURCES ${sources}
-      LIBRARY_FLAGS ${common_options})
-    precondition(objfile_out)
-    list(APPEND bench_library_objects "${objfile_out}")
-    if (SWIFT_BENCHMARK_EMIT_SIB)
-      precondition(sibfile_out)
-      list(APPEND bench_library_sibfiles "${sibfile_out}")
+      set(sibfile "${objdir}/${module_name}.sib")
+      list(APPEND bench_library_sibfiles "${sibfile}")
+      add_custom_command(
+          OUTPUT "${sibfile}"
+          DEPENDS
+            ${stdlib_dependencies} "${srcdir}/${module_name_path}.swift"
+            ${extra_sources}
+          COMMAND "${SWIFT_EXEC}"
+          ${common_options}
+          "-force-single-frontend-invocation"
+          "-parse-as-library"
+          "-module-name" "${module_name}"
+          "-emit-sib"
+          "-o" "${sibfile}"
+          "${source}" ${extra_sources})
     endif()
   endforeach()


Install header files as part of make install.

--- functions.cmake
+++ functions.cmake
@@ -182,6 +182,7 @@

     if(ARG_INSTALL)
         install(TARGETS ${TARGET} DESTINATION ${ARG_INSTALL})
+        __install_header_files(${TARGET})
     endif()

     if(ARG_OUTPUT_NAME)
@@ -190,6 +191,18 @@

     __add_target_to_module(${TARGET})
     __export_include_directories(${TARGET})
+endfunction()
+
+function(__install_header_files TARGET)
+    # Only install header files for main libraries (that does not contain underscore).
+    # Currently all header files are installed as they are not explicitly listed for each library.
+    if (NOT ${TARGET} MATCHES "_")
+      file(GLOB_RECURSE HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
+      foreach(HEADER ${HEADERS})
+          get_filename_component(RELDIR ${HEADER} DIRECTORY)
+          install(FILES ${HEADER} DESTINATION include/vespa/${TARGET}/${RELDIR})
+      endforeach()
+   endif()
 endfunction()

 function(vespa_add_executable TARGET)


ENH: vtkSource -> vtkDataSetAlgorithm

ENH: vtkSource -> vtkDataSetAlgorithm

--- Utilities/Upgrading/NewPipeConvertDataSet.cmake
+++ Utilities/Upgrading/NewPipeConvertDataSet.cmake
@@ -19,6 +19,11 @@

 STRING (REGEX REPLACE
   "vtkDataSetToDataSetFilter"
+  "vtkDataSetAlgorithm"
+  H_CONTENTS "${H_CONTENTS}")
+
+STRING (REGEX REPLACE
+  "vtkSource"
   "vtkDataSetAlgorithm"
   H_CONTENTS "${H_CONTENTS}")


cpack: Exclude object directories.

cpack: Exclude object directories.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -19,7 +19,7 @@

 ### source generator
 set(CPACK_SOURCE_GENERATOR "TGZ")
-set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/build/;/obj/;tags;cscope.*;.ycm_extra_conf.pyc")
+set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;obj*;tags;cscope.*;.ycm_extra_conf.pyc")
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")

 if (WIN32)


Replace dashboard.akonadi-project.org with my.cdash.org

svn path=/trunk/kdesupport/akonadi/; revision=1106973

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -4,10 +4,10 @@
 ## # The following are required to uses Dart and the Cdash dashboard
 ##   ENABLE_TESTING()
 ##   INCLUDE(CTest)
-set(CTEST_PROJECT_NAME "AkonadiServer")
+set(CTEST_PROJECT_NAME "akonadi")
 set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "dashboard.akonadi-project.org")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=AkonadiServer")
+set(CTEST_DROP_SITE "my.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=akonadi")
 set(CTEST_DROP_SITE_CDASH TRUE)


changed CDash to viennastar.iue.tuwien.ac.at

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -8,6 +8,6 @@
 set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
-set(CTEST_DROP_SITE "frudo.iue.tuwien.ac.at:50080")
+set(CTEST_DROP_SITE "viennastar.iue.tuwien.ac.at")
 set(CTEST_DROP_LOCATION "/CDash/submit.php?project=ViennaData")
 set(CTEST_DROP_SITE_CDASH TRUE)


Fix checking REASON_EXCLUDE_LINK_DEPENDENCY's sequence issue

--- reason.util.cmake
+++ reason.util.cmake
@@ -106,13 +106,13 @@
     endif()
   endfunction()

-  get_target_property(DEP_TYPE "${DEP}" "TYPE")
-  reason_verbose("  dependency type: [type=${DEP_TYPE}]")
-
   list(FIND REASON_EXCLUDE_LINK_DEPENDENCY "${DEP}" DEP_IN_EXCLUDE)
   if("${DEP_IN_EXCLUDE}" STREQUAL "-1")
     return()
   endif()
+
+  get_target_property(DEP_TYPE "${DEP}" "TYPE")
+  reason_verbose("  dependency type: [type=${DEP_TYPE}]")

   reason_verbose("  add dep interface include directories: [dep=${DEP}]")
   reason_extract_include_dirs("${TARGET_NAME}" "${DEP}" "INTERFACE_INCLUDE_DIRECTORIES")


Suite pour ajout de la version 3.0.0 dans l'arborescence OTB.

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -36,6 +36,7 @@
     INCLUDE(${ITK_SOURCE_DIR}/Utilities/itkThirdParty.cmake)
  	INCLUDE(${ITK_SOURCE_DIR}/itkIncludeDirectories.cmake)
 ELSE(OTB_USE_EXTERNAL_ITK)
+        INCLUDE(${OTB_SOURCE_DIR}/Utilities/ITK/Utilities/itkThirdParty.cmake)
  	INCLUDE(${OTB_SOURCE_DIR}/Utilities/ITK/itkIncludeDirectories.cmake)
 ENDIF(OTB_USE_EXTERNAL_ITK)


Add project meta files

Add project meta files

--- Doxygit.cmake
+++ Doxygit.cmake
@@ -210,4 +210,5 @@

 execute_process(
   COMMAND "${GIT_EXECUTABLE}" add --all images ${Entries} ${RemovedEntries}
-  css/github.css index.html WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
+  css/github.css index.html _projects/*.md
+  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")


Rename doxygen and doxycopy target for consistency

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -32,19 +32,17 @@
 # * COMMON_PROJECT_DOMAIN a reverse DNS name. (Defaults to: org.doxygen)
 #
 # Generated targets
+# * (PROJECT-)doxygen generates documentation on installed headers
+# * (PROJECT-)doxycopy runs doxygen and then copies the documentation to the
+#   documention folder, which is assumed to be located at:
+#   PROJECT_SOURCE_DIR/../GIT_DOCUMENTATION_REPO or
+#   PROJECT_SOURCE_DIR/../GIT_ORIGIN_org
+#   When using subprojects, it is the responsiblity of the user to clone
+#   the documentation repository in the project's parent folder.
 # * doxygen_install for internal use - runs cmake_install after building all the
 #   software components
 # * doxygen_html for internal use - runs doxygen_install and generates the
 #   documentation
-# * doxygen runs doxygen_html (and optionally coverage)
-# * doxycopy runs doxygen then copies the documentation to the documention
-#   folder, which is assumed to be located at:
-#   PROJECT_SOURCE_DIR/../GIT_DOCUMENTATION_REPO or
-#   PROJECT_SOURCE_DIR/../GIT_ORIGIN_org
-#   When using Buildyard, this git repository is automatically cloned if it was
-#   correctly declared as a project dependency.
-#   When using subprojects, it is the responsiblity of the user to clone
-#   the documentation repository in the project's parent folder.

 if(NOT DOXYGEN_FOUND)
   find_package(Doxygen QUIET)
@@ -115,11 +113,11 @@
 endif()
 add_dependencies(doxygen_html doxygen_html_${PROJECT_NAME})

-add_custom_target(doxygen_${PROJECT_NAME} DEPENDS doxygen_html_${PROJECT_NAME})
-set_target_properties(doxygen_${PROJECT_NAME} PROPERTIES
+add_custom_target(${PROJECT_NAME}-doxygen DEPENDS doxygen_html_${PROJECT_NAME})
+set_target_properties(${PROJECT_NAME}-doxygen PROPERTIES
   EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER "doxygen")
 if(ENABLE_COVERAGE) # CoverageReport generated by "tests" in this case
-  add_dependencies(doxygen_${PROJECT_NAME} coverage_${PROJECT_NAME})
+  add_dependencies(${PROJECT_NAME}-doxygen coverage_${PROJECT_NAME})
 endif()

 if(NOT TARGET doxygen)
@@ -127,7 +125,7 @@
   set_target_properties(doxygen PROPERTIES
     EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER "doxygen")
 endif()
-add_dependencies(doxygen doxygen_${PROJECT_NAME})
+add_dependencies(doxygen ${PROJECT_NAME}-doxygen)

 make_directory(${PROJECT_BINARY_DIR}/doc/html)
 install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html
@@ -153,21 +151,21 @@
   if(IS_DIRECTORY ${_GIT_DOC_SRC_DIR})
     set(GIT_DOCUMENTATION_DIR
       ${_GIT_DOC_SRC_DIR}/${PROJECT_NAME}-${VERSION_MAJOR}.${VERSION_MINOR})
-    add_custom_target(doxycopy_${PROJECT_NAME}
+    add_custom_target(${PROJECT_NAME}-doxycopy
       COMMAND ${CMAKE_COMMAND} -E remove_directory ${GIT_DOCUMENTATION_DIR}
       COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_BINARY_DIR}/doc/html ${GIT_DOCUMENTATION_DIR}
       COMMAND ${CMAKE_COMMAND} -E copy ${_jekyll_md_file} ${_GIT_DOC_SRC_DIR}/_projects
       COMMENT "Copying API documentation to ${GIT_DOCUMENTATION_DIR}"
-      DEPENDS doxygen_${PROJECT_NAME} VERBATIM)
+      DEPENDS ${PROJECT_NAME}-doxygen VERBATIM)
   else()
-    add_custom_target(doxycopy_${PROJECT_NAME}
+    add_custom_target(${PROJECT_NAME}-doxycopy
       COMMENT "doxycopy target not available, missing ${_GIT_DOC_SRC_DIR}")
   endif()
 else()
-  add_custom_target(doxycopy_${PROJECT_NAME}
+  add_custom_target(${PROJECT_NAME}-doxycopy
     COMMENT "doxycopy target not available, missing GIT_DOCUMENTATION_REPO")
 endif()
-set_target_properties(doxycopy_${PROJECT_NAME} PROPERTIES
+set_target_properties(${PROJECT_NAME}-doxycopy PROPERTIES
   EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER "doxygen")

 if(NOT TARGET doxycopy)
@@ -175,4 +173,4 @@
   set_target_properties(doxycopy PROPERTIES
     EXCLUDE_FROM_DEFAULT_BUILD ON FOLDER "doxygen")
 endif()
-add_dependencies(doxycopy doxycopy_${PROJECT_NAME})
+add_dependencies(doxycopy ${PROJECT_NAME}-doxycopy)


Removed unused parameters (argc, argv ) for testing compilations in GLEW_MX

--- FindGLEW_MX.cmake
+++ FindGLEW_MX.cmake
@@ -18,7 +18,7 @@
   set(TEST_SRC ${CMAKE_BINARY_DIR}/glew_test.cpp)
   file(WRITE ${TEST_SRC}
     "#include <GL/glew.h>\n"
-    "int main(int argc, char* argv[])\n"
+    "int main( )\n"
     "{\n"
     "  glewContextInit(0);\n"
     "}\n"
@@ -40,7 +40,7 @@
   elseif(X11_FOUND)
     file(WRITE ${TEST_SRC}
       "#include <GL/glxew.h>\n"
-      "int main(int argc, char* argv[])\n"
+      "int main( )\n"
       "{\n"
       "  glxewContextInit(0);\n"
       "}\n"


Add glxewContextInit needed on OS X since MacPorts GLEXMx does not cover GLX

--- FindGLEW_MX.cmake
+++ FindGLEW_MX.cmake
@@ -1,5 +1,5 @@
 # Copyright (c) 2010 Daniel Pfeifer <daniel@pfeifer-mail.de>
-#               2011 Stefan Eilemann <eile@eyescale.ch>
+#               2011-2013 Stefan Eilemann <eile@eyescale.ch>

 find_path(_glew_mx_INCLUDE_DIR GL/glew.h
   /usr/include /usr/local/include /opt/local/include)
@@ -15,16 +15,13 @@
     "int main(int argc, char* argv[])\n"
     "{\n"
     "  glewContextInit(0);\n"
+    "}\n"
     )
-  if(X11_FOUND)
-    file(APPEND ${TEST_SRC} "  glxewContextInit();\n")
-  endif()
-  file(APPEND ${TEST_SRC} "}\n")

   try_compile(_glew_mx_SUPPORTED ${CMAKE_BINARY_DIR}/glew_test ${TEST_SRC}
     CMAKE_FLAGS
-      "-DINCLUDE_DIRECTORIES:STRING=${_glew_mx_INCLUDE_DIR}"
-      "-DLINK_LIBRARIES:STRING=${_glew_mx_LIBRARY}"
+    "-DINCLUDE_DIRECTORIES:STRING=${_glew_mx_INCLUDE_DIR}"
+    "-DLINK_LIBRARIES:STRING=${_glew_mx_LIBRARY}"
     COMPILE_DEFINITIONS -DGLEW_MX=1
     )

@@ -32,7 +29,27 @@
     message(STATUS "  ${_glew_mx_LIBRARY} does not support GLEW_MX.")
     set(_glew_mx_INCLUDE_DIR 0)
     set(_glew_mx_LIBRARY 0)
-  endif(NOT _glew_mx_SUPPORTED)
+  elseif(X11_FOUND)
+    file(WRITE ${TEST_SRC}
+      "#include <GL/glxew.h>\n"
+      "int main(int argc, char* argv[])\n"
+      "{\n"
+      "  glxewContextInit(0);\n"
+      "}\n"
+      )
+
+    try_compile(_glxew_mx_SUPPORTED ${CMAKE_BINARY_DIR}/glew_test ${TEST_SRC}
+      CMAKE_FLAGS
+      "-DINCLUDE_DIRECTORIES:STRING=${_glew_mx_INCLUDE_DIR}"
+      "-DLINK_LIBRARIES:STRING=${_glew_mx_LIBRARY}"
+      COMPILE_DEFINITIONS -DGLEW_MX=1
+      )
+    if(NOT _glxew_mx_SUPPORTED)
+      message(STATUS "  ${_glew_mx_LIBRARY} is missing glxewContextInit().")
+      set(_glew_mx_INCLUDE_DIR 0)
+      set(_glew_mx_LIBRARY 0)
+    endif()
+  endif()
 endif()

 include(FindPackageHandleStandardArgs)


Fix ILMBASE_LIBRARY_DIR in FindIlmBase.cmake

--- FindIlmBase.cmake
+++ FindIlmBase.cmake
@@ -3,7 +3,7 @@
 set(ILMBASE_LIBRARIES    "${CONAN_LIBS_ILMBASE}")

 set(ILMBASE_INCLUDE_DIR  "${ILMBASE_INCLUDE_DIRS}")
-set(ILMBASE_LIBRARY_DIR  "${ILMBASE_LIB_DIRS}")
+set(ILMBASE_LIBRARY_DIR  "${ILMBASE_LIBRARY_DIRS}")
 set(ILMBASE_LIBRARY      "${ILMBASE_LIBRARIES}")

 foreach (LIBNAME ${ILMBASE_LIBRARIES})


Removed old stuff

Removed old stuff

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@176 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -369,17 +369,9 @@
     acg_set_target_props (${_target}Static)

     if (NOT APPLE)
-# todo : create correct so names
       set_target_properties (${_target}Static PROPERTIES
                              LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
                             )
-
-# todo : rename the lib to omit the static name extension
-      install (TARGETS ${_target}Static
-               RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
-               LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
-               ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR} )
-
     endif ()
   endif ()


Change ulink to rm -f to avoid the error when file not exist

--- cmake/CopyUtils.cmake
+++ cmake/CopyUtils.cmake
@@ -21,7 +21,7 @@
   FILE(TO_NATIVE_PATH ${_source} COPY_FILE_INTERNAL_native_source)
   FILE(TO_NATIVE_PATH ${_dest} COPY_FILE_INTERNAL_native_dest)
   ADD_CUSTOM_COMMAND(OUTPUT ${_dest}
-    COMMAND unlink ${COPY_FILE_INTERNAL_native_dest}
+    COMMAND rm -f ${COPY_FILE_INTERNAL_native_dest}
     COMMAND cp -Pp
       ${COPY_FILE_INTERNAL_native_source} ${COPY_FILE_INTERNAL_native_dest}
     DEPENDS ${_depends})


macro for binary targets

macro for binary targets

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -28,4 +28,27 @@
 		FILE( GLOB_RECURSE tmp_header "${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE}/${MODULE}/*.hh" )
 		LIST( APPEND DUNE_HEADERS ${tmp_header} )
 	ENDFOREACH(MODULE)
-ENDMACRO( ADD_DUNE_MODULES )+ENDMACRO( ADD_DUNE_MODULES )
+
+MACRO( ADD_DUNE_EXECUTABLE target sources headers libs )
+	ADD_EXECUTABLE(${target} ${sources} ${headers} ${DUNE_HEADERS} )
+	#for some $@#&& reason these targets DO NOT inherit flags added via TARGET_LINK_LIBRARIES nor INCLUDE_DIRECTORIES
+	#so we need some magic to readd them
+	foreach(arg ${MY_CXX_FLAGS} )
+		set(bar "${bar} ${arg}")
+	endforeach(arg ${MY_CXX_FLAGS} )
+	set_target_properties( ${target} PROPERTIES COMPILE_FLAGS  ${bar} )
+# 	get_target_property(tmp_flags ${target} LINK_FLAGS  )
+# 	if( NOT ${tmp_flags} )
+# 		set( tmp_flags "" )
+# 	endif( NOT ${tmp_flags} )
+# 	message(STATUS ${tmp_flags} )
+# 	set( tmp_flags "${bar} ${tmp_flags}" )
+# 	set_target_properties( ${target} PROPERTIES LINK_FLAGS  ${tmp_flags} )
+
+	add_dependencies( ${target} config_refresh )
+ENDMACRO( ADD_DUNE_EXECUTABLE )
+
+add_custom_target( config_refresh
+				${CMAKE_CURRENT_SOURCE_DIR}/cmake/regen_config_header.sh ${CMAKE_CURRENT_BINARY_DIR}/cmake_config.h
+				)


fixes cairo renderer debug configuration. Copied FindCairo had a lot of issues with the multiconfiguration settings. Rewrite of the whole file

--- cmake/FindCairo.cmake
+++ cmake/FindCairo.cmake
@@ -1,142 +1,98 @@
-# Copyright (C) 2020 Sony Interactive Entertainment Inc.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  Redistributions in binary form must reproduce the above copyright
-#     notice, this list of conditions and the following disclaimer in the
-#     documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
-# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.

 #[=======================================================================[.rst:
 FindCairo
---------------
+-----------

-Find Cairo headers and libraries.
+Find Cairo 2D graphics library.
+

 Imported Targets
 ^^^^^^^^^^^^^^^^
+This module defines :prop_tgt:`IMPORTED` target ``Cairo::Cairo``, if
+cairo has been found.

-``Cairo::Cairo``
-  The Cairo library, if found.
-
-Result Variables
+Result variables
 ^^^^^^^^^^^^^^^^

-This will define the following variables in your project:
+This module will set the following variables in your project:

-``Cairo_FOUND``
-  true if (the requested version of) Cairo is available.
-``Cairo_VERSION``
-  the version of Cairo.
-``Cairo_LIBRARIES``
-  the libraries to link against to use Cairo.
-``Cairo_INCLUDE_DIRS``
-  where to find the Cairo headers.
-``Cairo_COMPILE_OPTIONS``
-  this should be passed to target_compile_options(), if the
-  target is not used for linking
-
+``CAIRO_FOUND``
+  True if cairo headers and library were found.
+``CAIRO_INCLUDE_DIRS``
+  Directory where cairo headers are located.
+``CAIRO_LIBRARIES``
+  cairo libraries to link against.
+``CAIRO_VERSION_MAJOR``
+  The major version of cairo
+``CAIRO_VERSION_MINOR``
+  The minor version of cairo
+``CAIRO_VERSION_PATCH``
+  The patch version of cairo
+``CAIRO_VERSION_STRING``
+  version number as a string (ex: "1.16.0")
 #]=======================================================================]

-find_package(PkgConfig QUIET)
-pkg_check_modules(PC_CAIRO QUIET cairo)
-set(Cairo_COMPILE_OPTIONS ${PC_CAIRO_CFLAGS_OTHER})
-set(Cairo_VERSION ${PC_CAIRO_VERSION})
+if(NOT CAIRO_LIBRARY)
+  find_path(CAIRO_INCLUDE_DIR NAMES cairo.h HINTS ${PC_CAIRO_INCLUDEDIR} ${PC_CAIRO_INCLUDE_DIR} PATH_SUFFIXES cairo)
+  find_library(CAIRO_LIBRARY_RELEASE NAMES ${Cairo_NAMES} cairo HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS})
+  find_library(CAIRO_LIBRARY_DEBUG NAMES ${Cairo_NAMES} cairod HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS})
+  include(SelectLibraryConfigurations)
+  select_library_configurations(CAIRO)
+else()
+  file(TO_CMAKE_PATH "${CAIRO_LIBRARY}" CAIRO_LIBRARY)
+endif()

-find_path(Cairo_INCLUDE_DIR
-    NAMES cairo.h
-    HINTS ${PC_CAIRO_INCLUDEDIR} ${PC_CAIRO_INCLUDE_DIR}
-    PATH_SUFFIXES cairo
-)
+if(CAIRO_INCLUDE_DIR AND NOT CAIRO_VERSION)
+  if(EXISTS "${CAIRO_INCLUDE_DIR}/cairo-version.h")
+      file(READ "${CAIRO_INCLUDE_DIR}/cairo-version.h" CAIRO_VERSION_CONTENT)

-find_library(Cairo_LIBRARY_RELEASE
-    NAMES ${Cairo_NAMES} cairo
-    HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS}
-)
+      string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+      set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}")

-find_library(Cairo_LIBRARY_DEBUG
-    NAMES ${Cairo_NAMES} cairod
-    HINTS ${PC_CAIRO_LIBDIR} ${PC_CAIRO_LIBRARY_DIRS}
-)
+      string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+      set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}")

-if (Cairo_INCLUDE_DIR AND NOT Cairo_VERSION)
-    if (EXISTS "${Cairo_INCLUDE_DIR}/cairo-version.h")
-        file(READ "${Cairo_INCLUDE_DIR}/cairo-version.h" Cairo_VERSION_CONTENT)
+      string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}")
+      set(CAIRO_VERSION_PATCH "${CMAKE_MATCH_1}")

-        string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${Cairo_VERSION_CONTENT}")
-        set(Cairo_VERSION_MAJOR "${CMAKE_MATCH_1}")
-
-        string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${Cairo_VERSION_CONTENT}")
-        set(Cairo_VERSION_MINOR "${CMAKE_MATCH_1}")
-
-        string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${Cairo_VERSION_CONTENT}")
-        set(Cairo_VERSION_PATCH "${CMAKE_MATCH_1}")
-
-        set(Cairo_VERSION "${Cairo_VERSION_MAJOR}.${Cairo_VERSION_MINOR}.${Cairo_VERSION_PATCH}")
-    endif ()
-endif ()
+      set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_PATCH}")
+      set(CAIRO_VERSION_STRING ${CAIRO_VERSION})
+  endif()
+endif()

 include(FindPackageHandleStandardArgs)
-if(Cairo_LIBRARY_RELEASE AND Cairo_LIBRARY_DEBUG)
-  # set the libaries varible to use the release and debug versions
-  find_package_handle_standard_args(Cairo
-    FOUND_VAR Cairo_FOUND
-    REQUIRED_VARS Cairo_LIBRARY_RELEASE Cairo_LIBRARY_DEBUG Cairo_INCLUDE_DIR
-    VERSION_VAR Cairo_VERSION
-  )
-  set(Cairo_LIBRARIES optimized ${Cairo_LIBRARY_RELEASE} debug ${Cairo_LIBRARY_DEBUG})
-elseif(Cairo_LIBRARY_RELEASE)
-  # only the release library is available
-  find_package_handle_standard_args(Cairo
-    FOUND_VAR Cairo_FOUND
-    REQUIRED_VARS Cairo_LIBRARY_RELEASE Cairo_INCLUDE_DIR
-    VERSION_VAR Cairo_VERSION
-  )
-  set(Cairo_LIBRARIES optimized ${Cairo_LIBRARY_RELEASE})
-elseif(Cairo_LIBRARY_DEBUG)
-  # only the debug library is available
-  find_package_handle_standard_args(Cairo
-    FOUND_VAR Cairo_FOUND
-    REQUIRED_VARS Cairo_LIBRARY_DEBUG Cairo_INCLUDE_DIR
-    VERSION_VAR Cairo_VERSION
-  )
-  set(Cairo_LIBRARIES debug ${Cairo_LIBRARY_DEBUG})
-else()
-  # neither library is available - give standard error message
-  find_package_handle_standard_args(Cairo
-    FOUND_VAR Cairo_FOUND
-    REQUIRED_VARS Cairo_LIBRARY_RELEASE Cairo_LIBRARY_DEBUG Cairo_INCLUDE_DIR
-    VERSION_VAR Cairo_VERSION
-  )
-endif()
+find_package_handle_standard_args(Cairo
+  REQUIRED_VARS
+    CAIRO_LIBRARY
+    CAIRO_INCLUDE_DIR
+    VERSION_VAR
+    CAIRO_VERSION_STRING
+)
+mark_as_advanced(CAIRO_INCLUDE_DIR CAIRO_LIBRARY)

-if (NOT TARGET Cairo::Cairo)
-    add_library(Cairo::Cairo UNKNOWN IMPORTED GLOBAL)
+if (CAIRO_FOUND)
+  set(CAIRO_LIBRARIES ${CAIRO_LIBRARY})
+  set(CAIRO_INCLUDE_DIRS ${CAIRO_INCLUDE_DIR})
+  if(NOT TARGET Cairo::Cairo)
+    add_library(Cairo::Cairo UNKNOWN IMPORTED)
     set_target_properties(Cairo::Cairo PROPERTIES
-        IMPORTED_LOCATION "${Cairo_LIBRARY_RELEASE}"
-        IMPORTED_LOCATION_DEBUG "${Cairo_LIBRARY_DEBUG}"
-        INTERFACE_COMPILE_OPTIONS "${Cairo_COMPILE_OPTIONS}"
-        INTERFACE_INCLUDE_DIRECTORIES "${Cairo_INCLUDE_DIR}"
-    )
+                          INTERFACE_INCLUDE_DIRECTORIES ${CAIRO_INCLUDE_DIR}
+                          IMPORTED_LINK_INTERFACE_LANGUAGES C)
+
+    if(CAIRO_LIBRARY_RELEASE)
+      set_property(TARGET Cairo::Cairo APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
+      set_target_properties(Cairo::Cairo PROPERTIES IMPORTED_LOCATION_RELEASE "${CAIRO_LIBRARY_RELEASE}")
+    endif()
+
+    if(CAIRO_LIBRARY_DEBUG)
+      set_property(TARGET Cairo::Cairo APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
+      set_target_properties(Cairo::Cairo PROPERTIES IMPORTED_LOCATION_DEBUG "${CAIRO_LIBRARY_DEBUG}")
+    endif()
+
+    if(NOT CAIRO_LIBRARY_RELEASE AND NOT CAIRO_LIBRARY_DEBUG)
+        set_target_properties(Cairo::Cairo PROPERTIES IMPORTED_LOCATION "${CAIRO_LIBRARY}")
+    endif()
+  endif()
 endif ()
-
-mark_as_advanced(Cairo_INCLUDE_DIR Cairo_LIBRARY_RELEASE Cairo_LIBRARY_DEBUG)
-
-if (Cairo_FOUND)
-    set(Cairo_LIBRARIES ${Cairo_LIBRARY})
-    set(Cairo_INCLUDE_DIRS ${Cairo_INCLUDE_DIR})
-endif ()


Added search path for VS 2013 built-in DXSDK

--- cmake/FindDXSDK.cmake
+++ cmake/FindDXSDK.cmake
@@ -44,6 +44,7 @@
             "$ENV{DXSDK_ROOT}/Include"
             "C:/Program Files (x86)/Microsoft DirectX SDK*/Include"
             "C:/Program Files/Microsoft DirectX SDK*/Include"
+            "C:/Program Files (x86)/Windows Kits/8.1/Include/um"
     )

     if ("${CMAKE_GENERATOR}" MATCHES "[Ww]in64")
@@ -61,6 +62,7 @@
             "$ENV{DXSDK_ROOT}/Lib/${ARCH}"
             "C:/Program Files (x86)/Microsoft DirectX SDK*/Lib/${ARCH}"
             "C:/Program Files/Microsoft DirectX SDK*/Lib/${ARCH}"
+            "C:/Program Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/${ARCH}"
     )

     set(DXSDK_LIBRARY_DIR ${LIBRARY_DIR})


Fixed debug static binding to use debug build

--- cmake/FindSILLY.cmake
+++ cmake/FindSILLY.cmake
@@ -13,7 +13,7 @@
     find_library(SILLY_LIB_STATIC_DBG NAMES SILLY_d libSILLY_d PATH_SUFFIXES static)

     cegui_find_libraries(SILLY_LIB_STATIC "libpng;jpeg;zlib" static)
-    cegui_find_libraries(SILLY_LIB_STATIC_DBG "libpng_d;jpeg_d;zlib" static)
+    cegui_find_libraries(SILLY_LIB_STATIC_DBG "libpng_d;jpeg_d;zlib_d" static)

     set( SILLY_DEFINITIONS_STATIC "SILLY_STATIC" CACHE STRING "preprocessor definitions" )
     mark_as_advanced(SILLY_DEFINITIONS_STATIC SILLY_LIB_STATIC SILLY_LIB_STATIC_DBG)


[CMake] Only add an OS to the supported OS lists if there are supported architectures for that OS.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -348,10 +348,13 @@
     set(DARWIN_10.4_BUILTIN_MIN_VER_FLAG
         -mmacosx-version-min=${DARWIN_10.4_BUILTIN_MIN_VER})
     set(DARWIN_10.4_SKIP_CC_KEXT On)
-    list(APPEND BUILTIN_SUPPORTED_OS 10.4)
     darwin_test_archs(10.4
       DARWIN_10.4_ARCHS
       ${toolchain_arches})
+    message(STATUS "OSX 10.4 supported arches: ${DARWIN_10.4_ARCHS}")
+    if(DARWIN_10.4_ARCHES)
+      list(APPEND BUILTIN_SUPPORTED_OS 10.4)
+    endif()

     if(DARWIN_iossim_SYSROOT)
       set(DARWIN_iossim_CFLAGS
@@ -366,13 +369,15 @@
       set(DARWIN_iossim_BUILTIN_MIN_VER_FLAG
         -mios-simulator-version-min=${DARWIN_iossim_BUILTIN_MIN_VER})

-      list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
-      list(APPEND BUILTIN_SUPPORTED_OS iossim)
       set(DARWIN_iossim_SKIP_CC_KEXT On)
       darwin_test_archs(iossim
         DARWIN_iossim_ARCHS
         ${toolchain_arches})
       message(STATUS "iOS Simulator supported arches: ${DARWIN_iossim_ARCHS}")
+      if(DARWIN_iossim_ARCHS)
+        list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
+        list(APPEND BUILTIN_SUPPORTED_OS iossim)
+      endif()
       foreach(arch ${DARWIN_iossim_ARCHS})
         list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
         set(CAN_TARGET_${arch} 1)
@@ -392,13 +397,15 @@
       set(DARWIN_ios_BUILTIN_MIN_VER_FLAG
         -miphoneos-version-min=${DARWIN_ios_BUILTIN_MIN_VER})

-      list(APPEND SANITIZER_COMMON_SUPPORTED_OS ios)
-      list(APPEND BUILTIN_SUPPORTED_OS ios)
-      list(APPEND PROFILE_SUPPORTED_OS ios)
       darwin_test_archs(ios
         DARWIN_ios_ARCHS
         ${toolchain_arches})
       message(STATUS "iOS supported arches: ${DARWIN_ios_ARCHS}")
+      if(DARWIN_ios_ARCHS)
+        list(APPEND SANITIZER_COMMON_SUPPORTED_OS ios)
+        list(APPEND BUILTIN_SUPPORTED_OS ios)
+        list(APPEND PROFILE_SUPPORTED_OS ios)
+      endif()
       foreach(arch ${DARWIN_ios_ARCHS})
         list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
         set(CAN_TARGET_${arch} 1)


[Compiler-rt][CFI] Enabling CFI for MIPS64

Reviewers: eugenis

Subscribers: jaydeep, sagar, Sanitizers

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -268,7 +268,7 @@
 set(ALL_UBSAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
     ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
 set(ALL_SAFESTACK_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM64} ${MIPS32} ${MIPS64})
-set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64})
+set(ALL_CFI_SUPPORTED_ARCH ${X86} ${X86_64} ${MIPS64})
 set(ALL_ESAN_SUPPORTED_ARCH ${X86_64})

 if(APPLE)


[axl_cmake] minor modifications in import_qt.cmake (better debug message printing)

--- cmake/import_qt.cmake
+++ cmake/import_qt.cmake
@@ -25,67 +25,67 @@
 	if (Qt5Core_FOUND)
 	 	set (QT_FOUND TRUE)
 		set (QTCORE_FOUND TRUE)
+		set (QTCORE_CMAKE_DIR ${Qt5Core_DIR})
 	endif ()

 	find_package (Qt5Gui)
 	if (Qt5Gui_FOUND)
 		set (QTGUI_FOUND TRUE)
+		set (QTGUI_CMAKE_DIR ${Qt5Gui_DIR})
 	endif ()

 	find_package (Qt5Widgets)
 	if (Qt5Widgets_FOUND)
 		set (QTWIDGETS_FOUND TRUE)
+		set (QTWIDGETS_CMAKE_DIR ${Qt5Widgets_DIR})
 	endif ()

 	find_package (Qt5Network)
 	if (Qt5Network_FOUND)
 		set (QTNETWORK_FOUND TRUE)
+		set (QTNETWORK_CMAKE_DIR ${Qt5Network_DIR})
 	endif ()
 else ()
 	if (EXISTS ${QT_CMAKE_DIR}/Qt5Core/Qt5CoreConfig.cmake)
 		include ("${QT_CMAKE_DIR}/Qt5Core/Qt5CoreConfig.cmake")
 	 	set (QT_FOUND TRUE)
 		set (QTCORE_FOUND TRUE)
+		set (QTCORE_CMAKE_DIR ${QT_CMAKE_DIR}/Qt5Core)
 	endif ()

 	if (EXISTS ${QT_CMAKE_DIR}/Qt5Gui/Qt5GuiConfig.cmake)
 		include ("${QT_CMAKE_DIR}/Qt5Gui/Qt5GuiConfig.cmake")
 		set (QTGUI_FOUND TRUE)
+		set (QTGUI_CMAKE_DIR ${QT_CMAKE_DIR}/Qt5Gui)
 	endif ()

 	if (EXISTS ${QT_CMAKE_DIR}/Qt5Widgets/Qt5WidgetsConfig.cmake)
 		include ("${QT_CMAKE_DIR}/Qt5Widgets/Qt5WidgetsConfig.cmake")
 		set (QTWIDGETS_FOUND TRUE)
+		set (QTWIDGETS_CMAKE_DIR ${QT_CMAKE_DIR}/Qt5Widgets)
 	endif ()

 	if (EXISTS ${QT_CMAKE_DIR}/Qt5Network/Qt5NetworkConfig.cmake)
 		include ("${QT_CMAKE_DIR}/Qt5Network/Qt5NetworkConfig.cmake")
 		set (QTNETWORK_FOUND TRUE)
+		set (QTNETWORK_CMAKE_DIR ${QT_CMAKE_DIR}/Qt5Network)
 	endif ()
 endif ()

 if (QT_FOUND)
 	axl_message ("QT paths:")
-	axl_message ("    Core:")
-	axl_message ("        CMake files:" "${Qt5Core_DIR}")
-	axl_message ("        Includes:"    "${Qt5Core_INCLUDE_DIRS}")
+	axl_message ("    Core CMake files:" "${QTCORE_CMAKE_DIR}")

 	if (QTGUI_FOUND)
-		axl_message ("    Gui:")
-		axl_message ("        CMake files:" "${Qt5Gui_DIR}")
-		axl_message ("        Includes:"    "${Qt5Gui_INCLUDE_DIRS}")
+		axl_message ("    Gui CMake files:" "${QTGUI_CMAKE_DIR}")
 	endif ()

 	if (QTWIDGETS_FOUND)
-		axl_message ("    Widgets:")
-		axl_message ("        CMake files:" "${Qt5Widgets_DIR}")
-		axl_message ("        Includes:"    "${Qt5Widgets_INCLUDE_DIRS}")
+		axl_message ("    Widgets CMake files:" "${QTWIDGETS_CMAKE_DIR}")
 	endif ()

 	if (QTNETWORK_FOUND)
-		axl_message ("    Network:")
-		axl_message ("        CMake files:" "${Qt5Network_DIR}")
-		axl_message ("        Includes:"    "${Qt5Network_INCLUDE_DIRS}")
+		axl_message ("    Network CMake files:" "${QTNETWORK_CMAKE_DIR}")
 	endif ()
 endif ()