Make -fpermissive workaround enabled by default when CUDA 3.0 is in use.

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

--- CMake/hoomd/HOOMDCFlagsSetup.cmake
+++ CMake/hoomd/HOOMDCFlagsSetup.cmake
@@ -54,7 +54,13 @@

 if (CMAKE_COMPILER_IS_GNUCXX)
+    # workaround for compiler warnings in nvcc generated code
     set(CUDA_ADDITIONAL_OPTIONS "-Xcompiler;-Wno-strict-aliasing")
+    # workaround for surf errors with CUDA 3.0 beta
+    if (CUDA_VERSION VERSION_EQUAL 3.0)
+        message(STATUS "Enabling -fpermissive workaround for CUDA 3.0 beta")
+        set(CUDA_ADDITIONAL_OPTIONS "-Xcompiler;-Wno-strict-aliasing -fpermissive")
+    endif (CUDA_VERSION VERSION_EQUAL 3.0)
 else (CMAKE_COMPILER_IS_GNUCXX)
     set(CUDA_ADDITIONAL_OPTIONS "")
 endif (CMAKE_COMPILER_IS_GNUCXX)


Fix set_src_compiled().

Fix set_src_compiled().

--- src/inserts/functions.cmake
+++ src/inserts/functions.cmake
@@ -900,7 +900,11 @@
     if (N EQUAL 0)
         return()
     endif()
-    set_source_files_properties(${src2} PROPERTIES HEADER_FILE_ONLY False)
+    if (${ARGC} GREATER 1)
+        set_source_files_properties(${src2} PROPERTIES LANGUAGE ${ARGV1})
+    else()
+        set_source_files_properties(${src2} PROPERTIES LANGUAGE CXX)
+    endif()
     #set(src ${src} ${src2} PARENT_SCOPE)
 endfunction()

@@ -912,6 +916,8 @@
     get_filename_component(n ${f} NAME_WE)
     qt5_create_moc_command(${SDIR}/${f} ${BDIR}/${n}.moc "" "" ${this} "")
     set(src ${src} ${BDIR}/${n}.moc PARENT_SCOPE)
+    # not all mocs must be compiled
+    #set_source_files_properties(${BDIR}/${n}.moc PROPERTIES LANGUAGE CXX)
 endfunction()

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


cmake: remove unused FindDRM.cmake

cmake: remove unused FindDRM.cmake

--- cmake/FindDRM.cmake
+++ cmake/FindDRM.cmake
@@ -1,57 +0,0 @@
-# - FindDRM
-#
-# Copyright 2015 LunarG, Inc.
-
-find_package(PkgConfig)
-
-if(NOT DRM_FIND_COMPONENTS)
-    set(DRM_FIND_COMPONENTS libdrm)
-endif()
-
-include(FindPackageHandleStandardArgs)
-set(DRM_FOUND true)
-set(DRM_INCLUDE_DIRS "")
-set(DRM_LIBRARIES "")
-foreach(comp ${DRM_FIND_COMPONENTS})
-    # component name
-    string(REPLACE "lib" "" compname ${comp})
-    string(TOUPPER ${compname} compname)
-    # header name
-    if(comp STREQUAL "libdrm")
-        set(headername xf86drm.h)
-    elseif(comp STREQUAL "libdrm_intel")
-        set(headername intel_bufmgr.h)
-    else()
-        string(REPLACE "libdrm_" "" headername ${comp})
-    endif()
-    # library name
-    string(REPLACE "lib" "" libname ${comp})
-
-    pkg_check_modules(PC_${comp} QUIET ${comp})
-
-    find_path(${compname}_INCLUDE_DIR NAMES ${headername}
-        HINTS
-        ${PC_${comp}_INCLUDEDIR}
-        ${PC_${comp}_INCLUDE_DIRS}
-        )
-
-    find_library(${compname}_LIBRARY NAMES ${libname}
-        HINTS
-        ${PC_${comp}_LIBDIR}
-        ${PC_${comp}_LIBRARY_DIRS}
-        )
-
-    find_package_handle_standard_args(${comp}
-        FOUND_VAR ${comp}_FOUND
-        REQUIRED_VARS ${compname}_INCLUDE_DIR ${compname}_LIBRARY)
-    mark_as_advanced(${compname}_INCLUDE_DIR ${compname}_LIBRARY)
-
-    list(APPEND DRM_INCLUDE_DIRS ${${compname}_INCLUDE_DIR})
-    list(APPEND DRM_LIBRARIES ${${compname}_LIBRARY})
-
-    if(NOT ${comp}_FOUND)
-        set(DRM_FOUND false)
-    endif()
-endforeach()
-
-list(REMOVE_DUPLICATES DRM_INCLUDE_DIRS)


Put mic TBB libs in mic folder to avoid overwriting of intel64 version

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -188,6 +188,6 @@
   MARK_AS_ADVANCED(TBB_DLL_MALLOC)
   INSTALL(PROGRAMS ${TBB_DLL} ${TBB_DLL_MALLOC} DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT apps) # 3rd party?
 ELSEIF (OSPRAY_ZIP_MODE)
-  INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
-  INSTALL(PROGRAMS ${TBB_LIBRARIES_MIC} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib_mic)
+  INSTALL(PROGRAMS ${TBB_LIBRARY} ${TBB_LIBRARY_MALLOC} DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib) # /intel64?
+  INSTALL(PROGRAMS ${TBB_LIBRARIES_MIC} DESTINATION ${CMAKE_INSTALL_LIBDIR}/mic COMPONENT lib_mic)
 ENDIF()


Corrected package name for Ubuntu.

Corrected package name for Ubuntu.

--- cmake/dtkPack.cmake
+++ cmake/dtkPack.cmake
@@ -29,6 +29,7 @@
   execute_process(COMMAND lsb_release -irs
     COMMAND sed "s/ //"
     COMMAND sed "s/Fedora/fc/"
+    COMMAND tr -d '\n' # In Ubuntu the string is Ubuntu\n10.04\n
     OUTPUT_VARIABLE DISTRIB
     OUTPUT_STRIP_TRAILING_WHITESPACE)
   execute_process(COMMAND arch


fix dyload link undefined reference dlsym

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -93,6 +93,7 @@
 if(NOT APPLE)
     find_package(Threads REQUIRED)
     link_libraries(${CMAKE_THREAD_LIBS_INIT})
+    set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl")
 endif(NOT APPLE)

 function(merge_static_libs TARGET_NAME)


ENH: Bump the WikiExamples to April 19, 2016 version

New examples and updates.

--- Remote/WikiExamples.remote.cmake
+++ Remote/WikiExamples.remote.cmake
@@ -6,8 +6,8 @@

 # If the environement var WikiExamplesTag exists, use it
 if (NOT DEFINED ENV{WikiExamplesTag})
-  # February 29, 2016
-  set(GIT_TAG ab816c494f60b7e94c992e9e5dabcadd28227dc1)
+  # April 19, 2016
+  set(GIT_TAG 533e7047fc8bbec29cfe82686cd66eec9b94ba0c)
 else()
   set(GIT_TAG $ENV{WikiExamplesTag})
 endif()
@@ -15,7 +15,5 @@
 vtk_fetch_module(WikiExamples
   "A collection of examples that illustrate how to use VTK."
   GIT_REPOSITORY https://github.com/lorensen/VTKWikiExamples.git
-  # February 14, 2016
-  # New baselines
   GIT_TAG ${GIT_TAG}
   )


Fix a compile failure on tt-dev.mail.ru

Fix a compile failure on tt-dev.mail.ru

--- cmake/libobjc.cmake
+++ cmake/libobjc.cmake
@@ -6,7 +6,10 @@
         set (extra_cflags "${CC_DEBUG_OPT} -O0 -fno-inline")
         set (extra_ldflags "")
     else ()
-        set (extra_cflags "-O3 -Wno-unused-result")
+        set (extra_cflags "-O3")
+        if (CC_HAS_WNO_UNUSED_RESULT)
+            set (extra_cflags "${extra_cflags} -Wno-unused-result")
+       endif()
         set (extra_ldflags "-s")
     endif()
     if (${TARGET_OS_LINUX})


cmake: Install OpenSSL includes correctly

--- cmake/openssl.cmake
+++ cmake/openssl.cmake
@@ -26,5 +26,5 @@

   install(FILES ${OPENSSL_LIB_CRYPTO}  DESTINATION includeos/${ARCH}/lib)
   install(FILES ${OPENSSL_LIB_SSL}     DESTINATION includeos/${ARCH}/lib)
-  install(DIRECTORY ${OPENSSL_INCLUDE} DESTINATION includeos/${ARCH}/include)
+  install(DIRECTORY ${OPENSSL_INCLUDE} DESTINATION includeos/${ARCH})
 endif()


r9655/sofa : CHANGE: use of extern template with cmake

Former-commit-id: f0a3681bd08b1d5cbf3c3da25ff21d50a39b1828

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -334,8 +334,8 @@

 # use external template
 option(SOFA-MISC_EXTERN_TEMPLATE "Use extern template" ON)
-if(SOFA-MISC_EXTERN_TEMPLATE)
-	list(APPEND compilerDefines SOFA_EXTERN_TEMPLATE)
+if(NOT SOFA-MISC_EXTERN_TEMPLATE)
+	list(APPEND compilerDefines SOFA_NO_EXTERN_TEMPLATE)
 endif()

 # float / double or both


OSPDataType.h already moved to include/ospray

--- cmake/package.cmake
+++ cmake/package.cmake
@@ -48,8 +48,6 @@
   COMPONENT devel
   FILES_MATCHING PATTERN "*.h"
 )
-# OSPDataType.h is included by ospray.h, should eventually move to include/ospray as well
-INSTALL(FILES ${PROJECT_SOURCE_DIR}/ospray/common/OSPDataType.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ospray COMPONENT devel)

 ##############################################################
 # install documentation


use /opt/vespa as example in comment

use /opt/vespa as example in comment

--- build_settings.cmake
+++ build_settings.cmake
@@ -42,7 +42,7 @@

 # Default RPATH settings for CMake 3.4:
 # For non-installed targets, reference external libraries using an RPATH into the build tree.
-# For installed targets, reference external libraries using INSTALL_RPATH (i.e. /home/y/lib64 on ylinux)
+# For installed targets, reference external libraries using INSTALL_RPATH (i.e. /opt/vespa/lib64 on ylinux)
 set(CMAKE_CMAKE_SKIP_BUILD_RPATH FALSE)
 set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
 set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)


WIP: point to fork of elastix. #75

WIP: point to fork of elastix. #75

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -19,8 +19,8 @@

 set( proj Elastix )

-set( ELASTIX_GIT_REPOSITORY https://github.com/SuperElastix/elastix )
-set( ELASTIX_GIT_TAG 5b554d4063888c44c27089d6d5836a89b23988f3 )
+set( ELASTIX_GIT_REPOSITORY https://github.com/FBerendsen/elastix )
+set( ELASTIX_GIT_TAG f75266819b9e2714685a94a622e2aadc10790132 )

 UPDATE_SELX_SUPERBUILD_COMMAND(${proj})


Revert tryrun.cmake changes that brought coreclr's tryrun stuff (#42397)

--- cross/tryrun.cmake
+++ cross/tryrun.cmake
@@ -1,4 +1,3 @@
-set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
 set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})

 macro(set_cache_value)
@@ -15,55 +14,14 @@
 endif()

 if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$")
-  set_cache_value(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL_EXITCODE 1)
-  set_cache_value(GETPWUID_R_SETS_ERRNO_EXITCODE 0)
-  set_cache_value(HAS_POSIX_SEMAPHORES_EXITCODE 0)
-  set_cache_value(HAVE_CLOCK_MONOTONIC_COARSE_EXITCODE 0)
   set_cache_value(HAVE_CLOCK_MONOTONIC_EXITCODE 0)
-  set_cache_value(HAVE_CLOCK_THREAD_CPUTIME_EXITCODE 0)
   set_cache_value(HAVE_CLOCK_REALTIME_EXITCODE 0)
-  set_cache_value(HAVE_COMPATIBLE_ACOS_EXITCODE 0)
-  set_cache_value(HAVE_COMPATIBLE_ASIN_EXITCODE 0)
-  set_cache_value(HAVE_COMPATIBLE_ATAN2_EXITCODE 0)
-  set_cache_value(HAVE_COMPATIBLE_ILOGB0_EXITCODE 1)
-  set_cache_value(HAVE_COMPATIBLE_ILOGBNAN_EXITCODE 1)
-  set_cache_value(HAVE_COMPATIBLE_LOG10_EXITCODE 0)
-  set_cache_value(HAVE_COMPATIBLE_LOG_EXITCODE 0)
-  set_cache_value(HAVE_COMPATIBLE_POW_EXITCODE 0)
-  set_cache_value(HAVE_LARGE_SNPRINTF_SUPPORT_EXITCODE 0)
-  set_cache_value(HAVE_MMAP_DEV_ZERO_EXITCODE 0)
-  set_cache_value(HAVE_PROCFS_CTL_EXITCODE 1)
-  set_cache_value(HAVE_PROCFS_MAPS_EXITCODE 0)
-  set_cache_value(HAVE_PROCFS_STATUS_EXITCODE 0)
-  set_cache_value(HAVE_PROCFS_STAT_EXITCODE 0)
-  set_cache_value(HAVE_SCHED_GETCPU_EXITCODE 0)
-  set_cache_value(HAVE_SCHED_GET_PRIORITY_EXITCODE 0)
-  set_cache_value(HAVE_VALID_NEGATIVE_INF_POW_EXITCODE 0)
-  set_cache_value(HAVE_VALID_POSITIVE_INF_POW_EXITCODE 0)
-  set_cache_value(HAVE_WORKING_CLOCK_GETTIME_EXITCODE 0)
-  set_cache_value(HAVE_WORKING_GETTIMEOFDAY_EXITCODE 0)
-  set_cache_value(ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS_EXITCODE 1)
-  set_cache_value(PTHREAD_CREATE_MODIFIES_ERRNO_EXITCODE 1)
-  set_cache_value(REALPATH_SUPPORTS_NONEXISTENT_FILES_EXITCODE 1)
-  set_cache_value(SEM_INIT_MODIFIES_ERRNO_EXITCODE 1)
-

   if(ALPINE_LINUX)
     set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 1)
-    set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 0)
-    set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 1)
-    set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 1)
   else()
     set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 0)
-    set_cache_value(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT_EXITCODE 1)
-    set_cache_value(SSCANF_SUPPORT_ll_EXITCODE 0)
-    set_cache_value(UNGETC_NOT_RETURN_EOF_EXITCODE 0)
   endif()
-
 else()
   message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!")
 endif()
-
-if(TARGET_ARCH_NAME STREQUAL "x86")
-  set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
-endif()


Bumped the version number

Bumped the version number

--- projects/tomviz.bundle.common.cmake
+++ projects/tomviz.bundle.common.cmake
@@ -1,7 +1,7 @@
 # We hardcode the version numbers since we cannot determine versions during
 # configure stage.
 set (tomviz_version_major 0)
-set (tomviz_version_minor 3)
+set (tomviz_version_minor 4)
 set (tomviz_version_patch 0)
 set (tomviz_version_suffix)
 set (tomviz_version "${tomviz_version_major}.${tomviz_version_minor}.${tomviz_version_patch}")


Added Gentoo install location for Cg to the FindCg.cmake script

--HG--
branch : v1-7

--- CMake/Packages/FindCg.cmake
+++ CMake/Packages/FindCg.cmake
@@ -26,7 +26,8 @@
 set(Cg_PREFIX_PATH ${Cg_HOME} ${ENV_Cg_HOME}
   ${OGRE_SOURCE}/Dependencies
   ${ENV_OGRE_SOURCE}/Dependencies
-  ${OGRE_HOME} ${ENV_OGRE_HOME})
+  ${OGRE_HOME} ${ENV_OGRE_HOME}
+  /opt/nvidia-cg-toolkit)
 create_search_paths(Cg)
 # redo search if prefix path changed
 clear_if_changed(Cg_PREFIX_PATH
@@ -49,4 +50,4 @@
 make_library_set(Cg_LIBRARY)

 findpkg_finish(Cg)
-add_parent_dir(Cg_INCLUDE_DIRS Cg_INCLUDE_DIR)+add_parent_dir(Cg_INCLUDE_DIRS Cg_INCLUDE_DIR)


Changes to module GLOB logic exclude test modules

Ensure that VTK test languages (C++, Python and Java)
are past around in new GLOB macros.

Change-Id: Ifc761e06b4a930d5175b4740130d926ab14b2805

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -456,7 +456,7 @@
 endmacro()

 # called internally to add one module to the list of available modules
-macro(vtk_add_module src f bld)
+macro(vtk_add_module src f bld ) # [test-langs]
   unset(vtk-module)
   include(${src}/${f} OPTIONAL)
   if(DEFINED vtk-module)
@@ -483,7 +483,7 @@
 macro(vtk_module_glob src bld) # [test-langs]
   file(GLOB meta RELATIVE "${src}" "${src}/*/*/module.cmake")
   foreach(f ${meta})
-    vtk_add_module(${src} ${f} ${bld})
+    vtk_add_module(${src} ${f} ${bld} ${ARGN})
   endforeach()
 endmacro()

@@ -492,14 +492,14 @@
 macro(vtk_module_search) # [test-langs]
   set(VTK_MODULES_ALL)

-  vtk_module_glob("${VTK_SOURCE_DIR}" "${VTK_BINARY_DIR}")
+  vtk_module_glob("${VTK_SOURCE_DIR}" "${VTK_BINARY_DIR}" ${ARGN})

   #go through any additional dirs, and make modules of any ./module.cmakes found under them
   foreach(pair ${vtk_module_search_path})
     string(REGEX MATCH "^([^,]*),([^,]*)$" m "${pair}")
     set(src "${CMAKE_MATCH_1}")
     set(bld "${CMAKE_MATCH_2}")
-    vtk_add_module("${src}" module.cmake "${bld}")
+    vtk_add_module("${src}" module.cmake "${bld}" ${ARGN})
   endforeach()

 endmacro()


fix small type in wasm cmake change

fix small type in wasm cmake change

--- CMakeModules/FindWasm.cmake
+++ CMakeModules/FindWasm.cmake
@@ -3,7 +3,7 @@
 # TODO: Check if compiler is able to generate wasm32

 find_program(WASM_CLANG clang PATHS ${WASM_ROOT}/bin NO_DEFAULT_PATH)
-find_program(WASM_LLC llc HPATHS ${WASM_ROOT}/bin NO_DEFAULT_PATH)
+find_program(WASM_LLC llc PATHS ${WASM_ROOT}/bin NO_DEFAULT_PATH)
 find_program(WASM_LLVM_LINK llvm-link PATHS ${WASM_ROOT}/bin NO_DEFAULT_PATH)

 include(FindPackageHandleStandardArgs)


modules: work around GLUT_Xi_LIBRARY-related CMake errors on Ubuntu.

These libraries are not needed for GlutApplication, thus we link only to
GLUT_glut_LIBRARY now. Hopefully this won't break linking somewhere
else.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -245,7 +245,7 @@
         if(${component} STREQUAL GlutApplication)
             find_package(GLUT)
             if(GLUT_FOUND)
-                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_LIBRARIES} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY})
+                set(_MAGNUM_${_COMPONENT}_LIBRARIES ${GLUT_glut_LIBRARY} ${_WINDOWCONTEXT_MAGNUM_LIBRARIES_DEPENDENCY})
             else()
                 unset(MAGNUM_${_COMPONENT}_LIBRARY)
             endif()


Compile CUDA files as C++.

Compile CUDA files as C++.

git-svn-id: bd2008fbba0f7d30fd6598b54f2cd88503fdd2e4@657 95f4ed2b-212e-0410-8b90-d31948207fce

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -57,7 +57,7 @@

 #SET(CUDA_OPTIONS "-ncfe")
-SET(CUDA_OPTIONS "")
+SET(CUDA_OPTIONS "--host-compilation=C++")

 IF (CUDA_EMULATION)
 	SET (CUDA_OPTIONS "${CUDA_OPTIONS} -deviceemu")
@@ -90,18 +90,18 @@
 	GET_FILENAME_COMPONENT(filepath ${file} PATH)

 	#  parse file for dependencies
-	FILE(READ "${file}" CONTENTS)
-	#STRING(REGEX MATCHALL "#[ \t]*include[ \t]+[<\"][^>\"]*" DEPS "${CONTENTS}")
-	STRING(REGEX MATCHALL "#[ \t]*include[ \t]+\"[^\"]*" DEPS "${CONTENTS}")
+	FILE(READ "${file}" CONTENTS)
+	#STRING(REGEX MATCHALL "#[ \t]*include[ \t]+[<\"][^>\"]*" DEPS "${CONTENTS}")
+	STRING(REGEX MATCHALL "#[ \t]*include[ \t]+\"[^\"]*" DEPS "${CONTENTS}")

 	SET(${dependencies})

 	FOREACH(DEP ${DEPS})
 		STRING(REGEX REPLACE "#[ \t]*include[ \t]+\"" "" DEP "${DEP}")
-
+
 		FIND_PATH(PATH_OF_${DEP} ${DEP}
 			${filepath})
-
+
 		IF(NOT ${PATH_OF_${DEP}} STREQUAL PATH_OF_${DEP}-NOTFOUND)
 			#MESSAGE("${file} : ${PATH_OF_${DEP}}/${DEP}")
 			SET(${dependencies} ${${dependencies}} ${PATH_OF_${DEP}}/${DEP})
@@ -119,22 +119,22 @@

 	FOREACH (CUFILE ${ARGN})
 		GET_FILENAME_COMPONENT (CUFILE ${CUFILE} ABSOLUTE)
-		GET_FILENAME_COMPONENT (CFILE ${CUFILE} NAME_WE)
-		SET (CFILE ${CMAKE_CURRENT_BINARY_DIR}/${CFILE}.gen.c)
+		GET_FILENAME_COMPONENT (CPPFILE ${CUFILE} NAME_WE)
+		SET (CPPFILE ${CMAKE_CURRENT_BINARY_DIR}/${CPPFILE}.gen.cpp)

 		GET_CUFILE_DEPENDENCIES(CUDEPS ${CUFILE})
 		#MESSAGE("${CUDEPS}")

 		ADD_CUSTOM_COMMAND (
-			OUTPUT ${CFILE}
+			OUTPUT ${CPPFILE}
 			COMMAND ${CUDA_COMPILER}
-			ARGS -cuda ${cuda_includes} ${CUDA_OPTIONS} -o ${CFILE} ${CUFILE}
+			ARGS -cuda ${cuda_includes} ${CUDA_OPTIONS} -o ${CPPFILE} ${CUFILE}
 			MAIN_DEPENDENCY ${CUFILE}
 			DEPENDS ${CUDEPS})

-		#MACRO_ADD_FILE_DEPENDENCIES(${CUFILE} ${CFILE})
+		#MACRO_ADD_FILE_DEPENDENCIES(${CUFILE} ${CPPFILE})

-		SET (${outfiles} ${${outfiles}} ${CFILE})
+		SET (${outfiles} ${${outfiles}} ${CPPFILE})
 	ENDFOREACH (CUFILE)

 	SET_SOURCE_FILES_PROPERTIES(${outfiles} PROPERTIES GENERATED 1)


Fix for bug #78521: Cmake - recompiling AliRoot when switching to a new ROOT tag

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

 cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

-set(ROOTSYS $ENV{ROOTSYS})
+set(ROOTSYS $ENV{ROOTSYS} CACHE STRING "" FORCE)
 if(NOT ROOTSYS)
   message(FATAL_ERROR "Environment variable $ROOTSYS is not set !")
 else()


MDEV-4607 : libreadline-related  compilation problems on NetBSD.

Problem :
libreadline.so was already present on the machine, however the cmake check NEW_READLINE_INTERFACE was unsuccessfull indicating, thus bundled library had to be used instead of  system library.
The problem was that the value for HAVE_HIST_ENTRY cmake variable  was cached with incorrect  value (1 on NetBSD).

The fix is to change HAVE_HIST_ENTRY to 0 with  CACHE FORCE, after switching to bundled readline.

--- cmake/readline.cmake
+++ cmake/readline.cmake
@@ -115,7 +115,7 @@

 MACRO (MYSQL_USE_BUNDLED_READLINE)
   SET(USE_NEW_READLINE_INTERFACE 1)
-  SET(HAVE_HIST_ENTRY)
+  SET(HAVE_HIST_ENTRY 0 CACHE INTERNAL "" FORCE)
   SET(READLINE_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/cmd-line-utils)
   SET(READLINE_LIBRARY readline)
   ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/cmd-line-utils/readline)


update Go to 1.5 beta

update Go to 1.5 beta

--- golang.cmake
+++ golang.cmake
@@ -11,10 +11,10 @@
 include (BuildSupport)

 external_source (golang
-    1.4.2
-    go1.4.2.src.tar.gz
-    907f85c8fa765d31f7f955836fec4049
-    https://storage.googleapis.com/golang)
+    1.5.0
+    go1.5beta1.tar.gz
+    7ee7ccb6c6771b3df9b00a42dfb04345
+    https://github.com/golang/go/archive)

 message ("Installing ${golang_NAME} into build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${golang_NAME}


STYLE: Addition of a comment

STYLE: Addition of a comment

--- DTIAtlasFiberAnalyzer.cmake
+++ DTIAtlasFiberAnalyzer.cmake
@@ -150,6 +150,7 @@
 ENDIF(COMPILE_FIBERCOMPARE)

+#### Set paths for Testing subdirectory and find Slicer for packaging the extension
 if( EXTENSION_SUPERBUILD_BINARY_DIR )
   find_package(Slicer REQUIRED)
   include(${Slicer_USE_FILE})


ENH: Update TubeTK to support Write3DImagesAs4DImage in python

Bump TubeTK version to support generation of 4D images in python.

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,5 +48,5 @@
   "http://www.tubetk.org"
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG 549e2c561072fdcde716c871393760355a3588d9
+  GIT_TAG ac8ce8baee1dcabca5d32c3d42922aed458f8f79
   )


ENH: update tag for otbGRM remote module

--- Modules/Remote/otbGRM.remote.cmake
+++ Modules/Remote/otbGRM.remote.cmake
@@ -32,5 +32,5 @@
 http://tully.ups-tlse.fr/lassallep/grm
 "
   GIT_REPOSITORY https://github.com/orfeotoolbox/GRM
-  GIT_TAG 75ffa60a382de74ae7a66328919d7da543eaf013
+  GIT_TAG 043c523df522dd31fb2dfc460ef292e6a679a81f
 )


modules: did I mention already that I'm producing only crap today?

--- modules/FindEGL.cmake
+++ modules/FindEGL.cmake
@@ -61,8 +61,6 @@
     EGL_INCLUDE_DIR)

 if(NOT TARGET EGL::EGL)
-    add_library(EGL::EGL UNKNOWN IMPORTED)
-
     # Work around BUGGY framework support on OSX
     # http://public.kitware.com/pipermail/cmake/2016-April/063179.html
     if(APPLE AND ${EGL_LIBRARY} MATCHES "\\.framework$")


Small fixes and added a package maintainer

--- Installer/CPackConfig.cmake
+++ Installer/CPackConfig.cmake
@@ -6,6 +6,8 @@
 set(CPACK_PACKAGE_VERSION "${${PROJECT_NAME_UPPER}_VERSION}")
 set(CPACK_PACKAGE_VENDOR "None")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Web service for generating EDLs of various types.")
+set(CPACK_PACKAGE_VENDOR "Pedro Cipriano")
+set(CPACK_PACKAGE_CONTACT "Pedro Cipriano <pedro.cipriano@outlook.com>")

 set(CPACK_STRIP_FILES ON)
 set(CPACK_GENERATOR "ZIP")
@@ -45,8 +47,6 @@
         set(CPACK_RPM_POST_UNINSTALL_SCRIPT_FILE "${PROJECT_BINARY_DIR}/Installer/postrm")
     endif()
     set(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
-    set(CPACK_DEBIAN_PACKAGE_MAINTAINER "")
-    set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "")
     set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${PROJECT_BINARY_DIR}/Installer/preinst;${PROJECT_BINARY_DIR}/Installer/prerm;${PROJECT_BINARY_DIR}/Installer/postinst;${PROJECT_BINARY_DIR}/Installer/postrm")
 endif()


update avbot version

update avbot version

--- cpacksettings.cmake
+++ cpacksettings.cmake
@@ -10,7 +10,7 @@
 SET(CPACK_PACKAGE_VENDOR "avplayer.org")
 SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
 SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
-SET(CPACK_PACKAGE_VERSION_MAJOR "11")
+SET(CPACK_PACKAGE_VERSION_MAJOR "12")
 SET(CPACK_PACKAGE_VERSION_MINOR "0")
 SET(CPACK_PACKAGE_VERSION_PATCH "0")
 if(WIN32)


[numerics] add missing link lib for test lib

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -615,4 +615,6 @@
   END_TEST(SOCP/test)

   add_library(numerics-test SHARED ${TEST_UTILS_SOURCES})
+  target_link_libraries(numerics-test ${COMPONENT})
+  target_link_libraries(numerics-test ${PRIVATE} ${${COMPONENT}_LINK_LIBRARIES})
 endif()


Fix libsodium CMake package discovery script

Summary:
Fix `FindSodium.cmake` which was broken by renaming it from `Findsodium.cmake`
without updating the content to match. According to the CMake docs
https://cmake.org/cmake/help/v3.0/module/FindPackageHandleStandardArgs.html:

> the name of the result-variable can be set either to either
> <UPPERCASED_NAME>_FOUND or <OriginalCase_Name>_FOUND using the FOUND_VAR
> option.

where "result-variable" is the first variable passed to
`find_package_handle_standard_args`.

This inconsistency breaks `find_package_handle_standard_args` behavior, in
particularly the `REQUIRED` option passed to `find_package` has no effect.
Instead one gets a gazillion of errors of the form:

```
CMake Error in CMakeLists.txt:
  Target "fizz" contains relative path in its INTERFACE_INCLUDE_DIRECTORIES:

    "sodium_INCLUDE_DIR-NOTFOUND"
```
and incorrect build files are generated.

Reviewed By: yfeldblum

Differential Revision: D9725524

fbshipit-source-id: 648d00c8116e889b4cc703411bae5801ca0814ee

--- wangle/cmake/FindSodium.cmake
+++ wangle/cmake/FindSodium.cmake
@@ -224,7 +224,8 @@

 # communicate results
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(sodium
+find_package_handle_standard_args(
+    Sodium # The name must be either uppercase or match the filename case.
     REQUIRED_VARS
         sodium_LIBRARY_RELEASE
         sodium_LIBRARY_DEBUG


find_program arguments inverted

find_program arguments inverted

--- FindICU.cmake
+++ FindICU.cmake
@@ -249,7 +249,7 @@
     endforeach(${ICU_PRIVATE_VAR_NS}_COMPONENT)

     # Try to find out compiler flags
-    find_program(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT} icu-config)
+    find_program(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE icu-config HINTS ${${ICU_PRIVATE_VAR_NS}_ROOT})
     if(${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE)
         execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_C_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
         execute_process(COMMAND ${${ICU_PUBLIC_VAR_NS}_CONFIG_EXECUTABLE} --cxxflags OUTPUT_VARIABLE ${ICU_PUBLIC_VAR_NS}_CXX_FLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)


Bump to 1.5.2

Bump to 1.5.2

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


Update version configuration to 2.1.1.1

Update version configuration to 2.1.1.1

--- Version.cmake
+++ Version.cmake
@@ -11,7 +11,7 @@
 set(SimpleITK_VERSION_MAJOR 2)
 set(SimpleITK_VERSION_MINOR 1)
 set(SimpleITK_VERSION_PATCH 1)
-#set(SimpleITK_VERSION_TWEAK "")
+set(SimpleITK_VERSION_TWEAK 1)

 include(sitkSourceVersion)


Turn off svn checkout by default--Fixes #1619

--- Superbuild/Superbuild.cmake
+++ Superbuild/Superbuild.cmake
@@ -76,7 +76,7 @@

 ###########################################
 # Configure data
-OPTION(BUILD_WITH_SCIRUN_DATA "Svn checkout data" ON)
+OPTION(BUILD_WITH_SCIRUN_DATA "Svn checkout data" OFF)

 ###########################################
 # Configure Windows executable to run with


`android.cmake`: adjust the behavior of FIND_XXX() commands.

Set values of the following parameters:
`CMAKE_FIND_ROOT_PATH_MODE_PROGRAM`,
`CMAKE_FIND_ROOT_PATH_MODE_LIBRARY`,
`CMAKE_FIND_ROOT_PATH_MODE_INCLUDE`.

	modified:   android.cmake


COMP: Remove unused CMAKE_C_FLAGS for JsonCpp build.

--- CMake/Superbuild/External_JsonCpp.cmake
+++ CMake/Superbuild/External_JsonCpp.cmake
@@ -62,7 +62,6 @@
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
       -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
-      -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
       -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}
       -DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}


Bugfix

Bugfix

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

--- deal.II/contrib/cmake/macros/macro_strip_flag.cmake
+++ deal.II/contrib/cmake/macros/macro_strip_flag.cmake
@@ -1,5 +1,7 @@

 MACRO(STRIP_FLAG variable flag)
-  STRING(REGEX REPLACE " ${flag}" "" ${variable} ${${variable}})
+  IF(NOT "${variable}" STREQUAL "")
+    STRING(REGEX REPLACE " ${flag}" "" ${variable} ${${variable}})
+  ENDIF()
 ENDMACRO()


Boost repo transferred to CIBC-Internal organization. Closes #576.

--- src/CMake/BoostConfig.cmake
+++ src/CMake/BoostConfig.cmake
@@ -77,7 +77,7 @@
     # git checkout -q will silence message about detached head (harmless).
     ExternalProject_Add(Boost_external
       PREFIX ${boost_BINARY_DIR}
-      GIT_REPOSITORY "https://github.com/SCIInstitute/boost.git"
+      GIT_REPOSITORY "https://github.com/CIBC-Internal/boost.git"
       GIT_TAG ${boost_GIT_TAG}
       SOURCE_DIR ${boost_SOURCE_DIR}
       BINARY_DIR ${boost_BINARY_DIR}


Fixed library issue with HDF5 in TBTKConfig.cmake.

--- CMake/TBTKConfigTemplate.cmake
+++ CMake/TBTKConfigTemplate.cmake
@@ -16,7 +16,7 @@
 #Detect packages
 FIND_PACKAGE(BLAS REQUIRED)
 FIND_PACKAGE(LAPACK REQUIRED)
-FIND_PACKAGE(HDF5 QUIET)
+FIND_PACKAGE(HDF5 COMPONENTS C CXX QUIET)
 FIND_PACKAGE(ARPACK QUIET)
 FIND_PACKAGE(CUDA QUIET)
 FIND_PACKAGE(CURL QUIET)
@@ -66,10 +66,12 @@

 IF(HDF5_FOUND)
 	MESSAGE("[X] HDF5")
-	LIST(APPEND TBTK_LIBRARIES "hdf5")
-	LIST(APPEND TBTK_LIBRARIES "hdf5_cpp")
+#	LIST(APPEND TBTK_LIBRARIES "hdf5")
+#	LIST(APPEND TBTK_LIBRARIES "hdf5_cpp")
 	INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
-	LINK_DIRECTORIES(${HDF5_LIBRARY_DIRS})
+#	LINK_DIRECTORIES(${HDF5_LIBRARY_DIRS})
+	ADD_DEFINITIONS(${HDF_DEFINITIONS})
+	LIST(APPEND TBTK_LIBRARIES ${HDF5_LIBRARIES})
 ELSE(HDF5_FOUND)
 	MESSAGE("[ ] HDF5")
 ENDIF(HDF5_FOUND)


Fixed CMake variable expansion.

Fixed CMake variable expansion.

--- CMake/mitkMacroUseModule.cmake
+++ CMake/mitkMacroUseModule.cmake
@@ -49,7 +49,7 @@
       if(MODULE_FIRST_LEVEL_DEPENDS)
         list(FIND MODULE_FIRST_LEVEL_DEPENDS ${dependency} _index)
         if(_index GREATER -1)
-          message(WARNING "Module ${dependency} is deprecated since ${@MODULE_NAME@_DEPRECATED_SINCE}")
+          message(WARNING "Module ${dependency} is deprecated since ${${dependency}_DEPRECATED_SINCE}")
         endif()
       endif()
     endif()


* Fixes xmlrpc and curl. PythonScriptModule: Python is still a problem python26_d.lib is somehow added by magic...

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1305 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -214,9 +214,9 @@
     if (PYTHONLIBS_FOUND)
         set (PYTHON_LIBRARIES ${PYTHON_LIBRARY})
         set (PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_PATH})
-        if (PYTHON_DEBUG_LIBRARY)
-            set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
-        endif ()
+		#if (PYTHON_DEBUG_LIBRARY)
+        #    set (PYTHON_DEBUG_LIBRARIES ${PYTHON_DEBUG_LIBRARY})
+        #endif ()
     endif ()

 endmacro (configure_python)
@@ -226,9 +226,6 @@
         NAMES PythonQt
         COMPONENTS PythonQt PythonQt_QtAll
         PREFIXES ${ENV_NAALI_DEP_PATH})
-
-    # TODO: not currently working
-    #find_debug_libraries (PYTHON "_d")

 endmacro (configure_python_qt)

@@ -275,25 +272,32 @@
 macro (configure_xmlrpc)
     sagase_configure_package (XMLRPC
         NAMES xmlrpc xmlrpcepi xmlrpc-epi
-        COMPONENTS xmlrpc xmlrpcepi xmlrpc-epi
+        COMPONENTS xmlrpc xmlrpcepi xmlrpc-epi xmlrpcepid
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/src
-        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi)
-
-    find_debug_libraries (XMLRPC "d")
-
+        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Debug
+		${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Release)
+
+	if (MSVC)
+		set (XMLRPC_LIBRARIES xmlrpcepi)
+		set (XMLRPC_DEBUG_LIBRARIES xmlrpcepid)
+	endif()
+
 endmacro (configure_xmlrpc)

 macro (configure_curl)
     sagase_configure_package (CURL
         NAMES Curl curl libcurl
-        COMPONENTS curl libcurl libcurl_imp
+        COMPONENTS curl libcurl_imp libcurld_imp
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Debug
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Release)

-    find_debug_libraries (CURL "d")
-
+	if (MSVC)
+		set (CURL_LIBRARIES libcurl_imp)
+		set (CURL_DEBUG_LIBRARIES libcurld_imp)
+	endif()
+
 endmacro (configure_curl)

 macro (configure_openjpeg)


Update clFFT tag to staged branch

Update clFFT tag to staged branch

--- CMakeModules/build_clFFT.cmake
+++ CMakeModules/build_clFFT.cmake
@@ -14,7 +14,7 @@
 ExternalProject_Add(
     clFFT-ext
     GIT_REPOSITORY https://github.com/arrayfire/clFFT.git
-    GIT_TAG af3.3.1
+    GIT_TAG arrayfire-release-test
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


Must set the OGRE_MEDIA_DIR_* to an absolute path for build folder versions

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -142,6 +142,8 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
+set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/media")
+set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/media")
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


Fix (kind of) copying DLLs with CMake <= 2.8.9.

The conditional copying of DLLs etc. into the target directory based
on the build configuration (e.g. Debug vs non-Debug) is handy, but the
implementation relies on conditional generator expressions, which were
added in CMake 2.8.10.  For older versions of CMake, we now fall back
to copying those files unconditionally, with a warning message.

This is OK for now, because none of the file names we copy conflict.
In other other words, if you need FooBar_d.dll, it's OK to also copy
FooBar.dll which you don't need.  But if we really needed to support
conditional copying on older versions of CMake, we could do so using
an external tool that would be passed $<CONFIGURATION> as an argument.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -24,6 +24,8 @@
 	"Build a single binary with all unit tests.  [Does not work yet!]" OFF)
 option(SURGSIM_EXAMPLES_BUILD "Include the examples in the build" ON)
 mark_as_advanced(SURGSIM_TESTS_ALL_IN_ONE)  # hide it as long as it's broken
+
+set(SURGSIM_COPY_WARNING_ONCE TRUE)

 # Copy zero or more files to the location of a built target, after the
 # target is built successfully, but only if the condition (which
@@ -48,12 +50,21 @@
 			set(CMD_SKIP echo "${TARGET}: Not copying ${FNAME} for $<CONFIGURATION>")
 			# Build a list of properly conditionalized list elements.
 			set(CONDITIONAL_COMMAND  ${CMAKE_COMMAND} -E)
-			foreach(TOKEN ${CMD_COPY})
-				list(APPEND CONDITIONAL_COMMAND $<${CONDITION}:${TOKEN}>)
-			endforeach(TOKEN ${CMD_COPY})
-			foreach(TOKEN ${CMD_SKIP})
-				list(APPEND CONDITIONAL_COMMAND $<$<NOT:${CONDITION}>:${TOKEN}>)
-			endforeach(TOKEN ${CMD_SKIP})
+			if(CMAKE_VERSION VERSION_LESS 2.8.10)
+				if(SURGSIM_COPY_WARNING_ONCE)
+					# Only show the message once *per directory*.
+					set(SURGSIM_COPY_WARNING_ONCE FALSE)
+					message("Will copy target libraries unconditionally.  Please consider upgrading to CMake 2.8.10 or later.")
+				endif(SURGSIM_COPY_WARNING_ONCE)
+				list(APPEND CONDITIONAL_COMMAND ${CMD_COPY})
+			else()
+				foreach(TOKEN ${CMD_COPY})
+					list(APPEND CONDITIONAL_COMMAND $<${CONDITION}:${TOKEN}>)
+				endforeach(TOKEN ${CMD_COPY})
+				foreach(TOKEN ${CMD_SKIP})
+					list(APPEND CONDITIONAL_COMMAND $<$<NOT:${CONDITION}>:${TOKEN}>)
+				endforeach(TOKEN ${CMD_SKIP})
+			endif()
 			# Now use the conditional command we built.  (Can't use VERBATIM!)
 			add_custom_command(TARGET ${TARGET} POST_BUILD
 				COMMAND ${CONDITIONAL_COMMAND})


[cmake] update option to enable CoAP Observe through CMake (#7932)

Change the definition of OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE
through target_compile_detinifions().

Signed-off-by: Luis Ubieda <b8e86b404ba325fdae6c59362b935d33209daef2@gmail.com>

--- etc/cmake/options.cmake
+++ etc/cmake/options.cmake
@@ -134,7 +134,7 @@

 option(OT_COAP_OBSERVE "enable coap observe (RFC7641) api support")
 if(OT_COAP_OBSERVE)
-    list(APPEND OT_PRIVATE_DEFINES "OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1")
+    target_compile_definitions(ot-config INTERFACE "OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=1")
 endif()

 option(OT_COMMISSIONER "enable commissioner support")


[build] fix the condition of enabling Border Routing counters (#1602)

Fix an issue that Border Routing counters is not available when
`OTBR_BORDER_ROUTING` is off but `OTBR_BACKBONE_ROUTER` is on.

--- etc/cmake/options.cmake
+++ etc/cmake/options.cmake
@@ -43,7 +43,7 @@
 option(OTBR_BORDER_ROUTING "Enable Border Routing Manager" OFF)

 option(OTBR_BORDER_ROUTING_COUNTERS "Enable Border Routing Counters" ON)
-if (OTBR_BORDER_ROUTING AND OTBR_BORDER_ROUTING_COUNTERS)
+if (OTBR_BORDER_ROUTING_COUNTERS)
     target_compile_definitions(otbr-config INTERFACE OTBR_ENABLE_BORDER_ROUTING_COUNTERS=1)
 endif()


Windows: Switched to default CRT linkage.

We previously attempted to manually override the CRT to be static
everywhere. Not only did this emit warnings, it was also error-prone
and unnecessary. We can, and should, just use the defaults, which is
`/MDd` in debug mode (multi-threaded, dynamic, debug linkage). Linking
to the CRT dynamically results in smaller libraries and executables,
reduces linking time, and avoids bugs when sharing allocated memory
across modules.

Review: https://reviews.apache.org/r/66010

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -316,14 +316,7 @@
   # Build against the multi-threaded version of the C runtime library (CRT).
   if (BUILD_SHARED_LIBS)
     message(WARNING "Building with shared libraries is a work-in-progress.")
-
     set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
-
-    # Use dynamic CRT.
-    set(CRT " /MD")
-  else ()
-    # Use static CRT.
-    set(CRT " /MT")
   endif ()

   if (ENABLE_SSL)
@@ -337,25 +330,6 @@

   # Force use of Unicode C and C++ Windows APIs.
   add_definitions(-DUNICODE -D_UNICODE)
-
-  # NOTE: We APPEND ${CRT} rather than REPLACE so it gets picked up by
-  # dependencies.
-  foreach (lang C CXX)
-    # Debug library for debug configuration, release otherwise.
-
-    # Handle single-configuration generators such as Ninja.
-    if (CMAKE_BUILD_TYPE MATCHES Debug)
-      string(APPEND CMAKE_${lang}_FLAGS "${CRT}d")
-    else ()
-      string(APPEND CMAKE_${lang}_FLAGS ${CRT})
-    endif ()
-
-    # Handle multi-configuration generators such as Visual Studio.
-    string(APPEND CMAKE_${lang}_FLAGS_DEBUG "${CRT}d")
-    foreach (config RELEASE RELWITHDEBINFO MINSIZEREL)
-      string(APPEND CMAKE_${lang}_FLAGS_${config} ${CRT})
-    endforeach ()
-  endforeach ()

   # Convenience flags to simplify Windows support in C++ source; used to
   # `#ifdef` out some platform-specific parts of Mesos.  We choose to define


CMake: Tweaked naming in a for loop.

CMake: Tweaked naming in a for loop.

--- cmake/CompilationConfigure.cmake
+++ cmake/CompilationConfigure.cmake
@@ -220,9 +220,9 @@
 if (WIN32)
   # Speed up incremental linking for the VS compiler/linker, for more info, see:
   # https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the-incremental-developer-build-scenario/
-  foreach(t EXE SHARED STATIC MODULE)
-    string(APPEND CMAKE_${t}_LINKER_FLAGS_DEBUG " /debug:fastlink")
-  endforeach()
+  foreach (type EXE SHARED STATIC MODULE)
+    string(APPEND CMAKE_${type}_LINKER_FLAGS_DEBUG " /debug:fastlink")
+  endforeach ()

   # COFF/PE and friends are somewhat limited in the number of sections they
   # allow for an object file. We use this to avoid those problems.


Drop <boost/current_function.hpp> from the list of required headers when TriBITS looks for Boost

--- cmake/TPLs/FindTPLBoostOrg.cmake
+++ cmake/TPLs/FindTPLBoostOrg.cmake
@@ -9,7 +9,6 @@
                    boost/math/tools/rational.hpp
                    boost/geometry.hpp
                    boost/range.hpp
-                   boost/current_function.hpp
   )

 # Use CMake FindBoost module to check version is sufficient


work around to support TinyXML2 5.0.0

work around to support TinyXML2 5.0.0

--- cmake/modules/FindTinyXML2.cmake
+++ cmake/modules/FindTinyXML2.cmake
@@ -4,7 +4,12 @@

 find_package(TinyXML2 CONFIG QUIET)
 if(TinyXML2_FOUND)
-    message(STATUS "Found TinyXML2")
+    message(STATUS "Found TinyXML2: ${TinyXML2_DIR}")
+    if(NOT TINYXML2_LIBRARY AND TARGET tinyxml2)
+        # in this case, we're probably using TinyXML2 version 5.0.0 or greater
+        # in which case tinyxml2 is an exported target and we should use that
+        set(TINYXML2_LIBRARY tinyxml2)
+    endif()
 else()
     if(THIRDPARTY OR ANDROID)
         find_path(TINYXML2_INCLUDE_DIR NAMES tinyxml2.h NO_CMAKE_FIND_ROOT_PATH)
@@ -14,7 +19,7 @@

     if(THIRDPARTY)
-            find_path(TINYXML2_SOURCE_DIR NAMES tinyxml2.cpp NO_CMAKE_FIND_ROOT_PATH)
+        find_path(TINYXML2_SOURCE_DIR NAMES tinyxml2.cpp NO_CMAKE_FIND_ROOT_PATH)
     else()
         find_library(TINYXML2_LIBRARY tinyxml2)
     endif()


Update cpp_resource.cmake

Update cpp_resource.cmake

--- cmake/modules/cpp_resource.cmake
+++ cmake/modules/cpp_resource.cmake
@@ -15,8 +15,9 @@
   else()
     set_property(GLOBAL PROPERTY CPPRSC_CMD cpp_rsc)
   endif()
-
-
+
+  message(STATUS "Resource compiler: " ${CPPRSC_CMD})
+
 endfunction(find_resource_compiler)

 function(add_resource name)


IMPALA-4650: Allow protobuf to find non-system libraries and binaries

This change makes PROTOBUF_GENERATE_CPP able to pick up Protobuf
libraries and binaries that are found by CMake but not installed on the
system LD_LIBRARY_PATH.

Change-Id: I942b3f18e25e2abc5aac167412b65abb680d3c5a
Reviewed-on: http://gerrit.cloudera.org:8080/5658
Tested-by: Impala Public Jenkins
Reviewed-by: Henry Robinson <3eca10f30041813f045165784e24b5a950a6cc7e@cloudera.com>

--- cmake_modules/FindProtobuf.cmake
+++ cmake_modules/FindProtobuf.cmake
@@ -139,6 +139,7 @@
     SET(ARG_BINARY_ROOT "${CMAKE_CURRENT_BINARY_DIR}")
   endif()
   GET_FILENAME_COMPONENT(ARG_BINARY_ROOT ${ARG_BINARY_ROOT} ABSOLUTE)
+  GET_FILENAME_COMPONENT(PROTO_LIB_DIR ${PROTOBUF_SHARED_LIBRARY} DIRECTORY)

   foreach(FIL ${ARG_PROTO_FILES})
     get_filename_component(ABS_FIL ${FIL} ABSOLUTE)
@@ -161,7 +162,9 @@

     add_custom_command(
       OUTPUT "${PROTO_CC_OUT}" "${PROTO_H_OUT}"
-      COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
+      COMMAND  ${CMAKE_COMMAND}
+        -E env "LD_LIBRARY_PATH=${PROTO_LIB_DIR}:$ENV{LD_LIBRARY_PATH}"
+        ${PROTOBUF_PROTOC_EXECUTABLE}
       ARGS
         --plugin $<TARGET_FILE:protoc-gen-insertions>
         --cpp_out ${ARG_BINARY_ROOT}


Corrected second typo in the same line

Corrected second typo in the same line

--- SuperBuild/External_SIRF.cmake
+++ SuperBuild/External_SIRF.cmake
@@ -26,7 +26,7 @@
 set(${proj}_DEPENDENCIES "Boost;HDF5;ISMRMRD;FFTW3;SWIG")

 if (${BUILD_GADGETRON})
-    set(${proj}_DEPENDENCIES "${${proj}_DEPENEDCIES};Gadgetron")
+    set(${proj}_DEPENDENCIES "${${proj}_DEPENDENCIES};Gadgetron")
 endif()
 if (${BUILD_NIFTYREG})
   set(${proj}_DEPENDENCIES "${${proj}_DEPENDENCIES};NIFTYREG")


fixed unfound STIR_ROOT directory

fixed unfound STIR_ROOT directory

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -35,6 +35,7 @@
   )

   set(STIR_ROOT       ${STIR_Install_Dir})
+  set(STIR_DIR       ${CMAKE_CURRENT_BINARY_DIR}/INSTALL/lib/cmake)
   set(STIR_INCLUDE_DIRS ${STIR_ROOT}/stir)

    else()


updating documentation file

updating documentation file

--- src/docbook/index.xml.cmake
+++ src/docbook/index.xml.cmake
@@ -653,8 +653,15 @@
 <entry>fastphylo sequence XML format</entry>
 <entry>-O xml</entry>
 <entry><xref linkend="fastphylo_distance_matrix_xml_format"/></entry>
-
-</row>
+</row>
+
+<row>
+<entry>Binary distance matrix format</entry>
+<entry>-O binary</entry>
+<entry><xref linkend="binary_distance_matrix_format"/></entry>
+</row>
+
+
 <row>
 <entry>phylip distance matrix format</entry>
 <entry>-O phylip</entry>
@@ -906,8 +913,14 @@
 <entry>fastphylo sequence XML format</entry>
 <entry>-O xml</entry>
 <entry><xref linkend="fastphylo_distance_matrix_xml_format"/></entry>
-
-</row>
+</row>
+
+<row>
+<entry>Binary distance matrix format</entry>
+<entry>-O binary</entry>
+<entry><xref linkend="binary_distance_matrix_format"/></entry>
+</row>
+
 <row>
 <entry>phylip distance matrix format</entry>
 <entry>-O phylip</entry>
@@ -1034,8 +1047,14 @@
 <entry>fastphylo sequence XML format</entry>
 <entry>-I xml</entry>
 <entry><xref linkend="fastphylo_distance_matrix_xml_format"/></entry>
-
-</row>
+</row>
+
+<row>
+<entry>Binary distance matrix format</entry>
+<entry>-I binary</entry>
+<entry><xref linkend="binary_distance_matrix_format"/></entry>
+</row>
+
 <row>
 <entry>phylip distance matrix format</entry>
 <entry>-I phylip</entry>
@@ -1397,6 +1416,23 @@

 </para></sect3>

+
+
+<sect3 id="binary_distance_matrix_format">
+    <title>Binary distance matrix format</title>
+<para>
+The Binary distance matrix format is chosen by the option <userinput>-O binary</userinput> to fastdist, fastprot and fastprot_mpi or the option  <userinput>-I binary</userinput> to fnj.
+Using the binary format option, fastphylo performs row-wise operations in computing the upper triangular distance matrix. Furthermore, the upper triangular distance matrix
+is then stored in a binary format instead of plain text. The main advantage of introducing binary format is that it reduces the
+disk space utilization and speedup the performance of fastphylo since only half of the matrix is computted instead of the whole distance matrix.
+
+In the binnary format output file, we first store fastphylo's current version followed by the number of sequences, then accessions and
+finally, rows of the upper trianguler distance matrix. We use colon delimiter for binary format to delimit each component separately.
+
+</para></sect3>
+
+
+
   <sect3 id="fastphylo_tree_count_xml_format">
     <title>Fastphylo tree count XML format</title>
 <para>


Added iostreams to initial boost search, fixes iostreams undefined reference when using boost versions earlier than 1.35

git-svn-id: 5cda8128732f5b679951344c24659131be7d2dfc@2410 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/hoomd/HOOMDBoostSetup.cmake
+++ src/CMake/hoomd/HOOMDBoostSetup.cmake
@@ -21,7 +21,7 @@
 set(Boost_ADDITIONAL_VERSIONS "1.45.1;1.45.0;1.45;1.44.1;1.44.0;1.44;1.43.1;1.43.0;1.43;1.42.1;1.42.0;1.42;1.41.0;1.41;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38")

 # first, see if we can get any supported version of Boost
-find_package(Boost 1.32.0 COMPONENTS thread filesystem python signals program_options unit_test_framework REQUIRED)
+find_package(Boost 1.32.0 COMPONENTS thread filesystem python signals program_options unit_test_framework iostreams REQUIRED)

 # if we get boost 1.35 or greator, we need to get the system library too


[#1455] Add libgcrypt11 as a package dependency for debian builds

--- CMake/Packages.cmake
+++ CMake/Packages.cmake
@@ -17,6 +17,7 @@
       "zlib1g"
       "libbz2-1.0"
       "libreadline6"
+      "libgcrypt11"
     )
     if(NOT OSQUERY_BUILD_DISTRO STREQUAL "lucid")
       set(PACKAGE_ITERATION "1.ubuntu10")


Fix FindCabal, remove DEFINED so that IF ELSE ENDIF arguments match

--- lib/FindCabal.cmake
+++ lib/FindCabal.cmake
@@ -16,7 +16,7 @@
     ENDIF(out MATCHES "(.)*'hackage.haskell.org' does not exist(.)*")

     SET(CABAL_FOUND TRUE)
-ELSE (DEFINED CABAL_EXECUTABLE)
+ELSE (CABAL_EXECUTABLE)
 	SET(CABAL_FOUND FALSE)
-ENDIF (DEFINED CABAL_EXECUTABLE)
+ENDIF (CABAL_EXECUTABLE)


Fix typo in FindOculusSdk.cmake

Fix typo in FindOculusSdk.cmake

--- CMake/FindOculusSdk.cmake
+++ CMake/FindOculusSdk.cmake
@@ -52,7 +52,7 @@
 	endif()

 	set(DEBUG_LIB_DIR   LibOVR/Lib/Windows/${ARCH}/Debug/VS2012)
-	set(RELEASE_DIR_DIR LibOVR/Lib/Windows/${ARCH}/Release/VS2012)
+	set(RELEASE_LIB_DIR LibOVR/Lib/Windows/${ARCH}/Release/VS2012)
 else()
 	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 		set(ARCH x86_64)


Fix: Define flags for debug PVRFramework builds

--- Dependencies/Helper.cmake
+++ Dependencies/Helper.cmake
@@ -1,9 +1,15 @@
 # Store this files directory to find osx/ios build files when calling below function
 set(HELPER_DIR ${CMAKE_CURRENT_LIST_DIR})

+# Define flags for debug PVRFramework builds
+if(WIN32)
+    set(DEBUG_FLAGS "/DDEBUG /D_CRT_SECURE_NO_WARNINGS /MTd")
+    set(CMAKE_C_FLAGS_DEBUG  ${DEBUG_FLAGS})
+    set(CMAKE_CXX_FLAGS_DEBUG  ${DEBUG_FLAGS})
+endif()
+
 function(platform_specific_build_and_install)
-
-
+
 	# Start by converting single source shaders based on build type
 	set (ASSET_TARGETS "")
 	FOREACH(shader ${SINGLE_SOURCE_SHADERS})


boards: cuav_x7pro_test disable LPE to save flash

--- boards/cuav/x7pro/test.cmake
+++ boards/cuav/x7pro/test.cmake
@@ -59,7 +59,7 @@
 		uavcan
 	MODULES
 		airspeed_selector
-		attitude_estimator_q
+		#attitude_estimator_q
 		battery_status
 		camera_feedback
 		commander
@@ -75,7 +75,7 @@
 		land_detector
 		landing_target_estimator
 		load_mon
-		local_position_estimator
+		#local_position_estimator
 		logger
 		mavlink
 		mc_att_control


Switched back to RELEASE for some projects, added ICU to libxml

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -1377,7 +1377,7 @@

       -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-      -DCMAKE_BUILD_TYPE=DEBUG
+      -DCMAKE_BUILD_TYPE=RELEASE
       -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
       -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
       -DCMAKE_SHARED_LINKER_FLAGS=${CMAKE_SHARED_LINKER_FLAGS}
@@ -1724,6 +1724,7 @@
       ${GIT} clone --depth 1 git://git.gnome.org/libxml2 ${LIBXML_TARGET}
   CONFIGURE_COMMAND
       <SOURCE_DIR>/autogen.sh --prefix=${LIBXML_PREFIX} ${HOST}
+          --with-icu=${ICU_PREFIX}
           --with-lzma=${XZ_PREFIX}
           --with-zlib=${ZLIB_PREFIX}
           CC=${CMAKE_C_COMPILER}
@@ -1732,6 +1733,7 @@
           LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
           ${WITH_PYTHON}
           ${CONFIGURE_LIB_TYPE})
+add_dependencies(${LIBXML_TARGET} ${ICU_TARGET})
 add_dependencies(${LIBXML_TARGET} ${XZ_TARGET})
 add_dependencies(${LIBXML_TARGET} ${ZLIB_TARGET})

@@ -1946,7 +1948,7 @@
   CMAKE_ARGS
       -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
       -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-      -DCMAKE_BUILD_TYPE=DEBUG
+      -DCMAKE_BUILD_TYPE=RELEASE
       -DCMAKE_C_FLAGS=${MYSQLCPPCONN_C_FLAGS}
       -DCMAKE_CXX_FLAGS=${MYSQLCPPCONN_CXX_FLAGS}
       -DCMAKE_SHARED_LINKER_FLAGS=${MYSQLCPPCONN_LINKER_FLAGS}


removed bug in package symlinker

removed bug in package symlinker

--- cmake/package/extensions/symlinker/package_dependency_symlinker.cmake
+++ cmake/package/extensions/symlinker/package_dependency_symlinker.cmake
@@ -14,6 +14,10 @@
   map_import_properties(${package} dependencies package_descriptor content_dir)
   map_tryget(${package_descriptor} dependencies)
   ans(dependency_constraints)
+  if(NOT dependencies)
+    return()
+  endif()
+
   map_keys(${dependencies})
   ans(dependency_uris)


- Add WASM option to libraries

- Add WASM option to libraries

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -70,6 +70,11 @@
         target_compile_options(${TARGET} PRIVATE
             -s USE_SDL=2
             )
+        if(COFFEE_GENERATE_WASM)
+            target_compile_options( ${TARGET} PRIVATE
+                -s WASM=1
+                )
+        endif()
     endif()

     set_property(TARGET ${TARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)


Find steam include folder not steam_api file itself

--- cmake/Modules/FindSteamworks.cmake
+++ cmake/Modules/FindSteamworks.cmake
@@ -26,8 +26,8 @@
 endif()

-find_path(Steamworks_INCLUDE_DIR steam_api.h HINTS ${Steamworks_ROOT}/public
-          PATH_SUFFIXES steam)
+find_path(Steamworks_INCLUDE_DIR steam/steam_api.h HINTS
+          ${Steamworks_ROOT}/public)
 find_library(Steamworks_LIB steam_api HINTS ${Steamworks_ROOT}
              PATH_SUFFIXES redistributable_bin/${SUBDIR})


add extra endline

add extra endline

--- cmake/firebase_unity_version.cmake
+++ cmake/firebase_unity_version.cmake
@@ -32,4 +32,4 @@
   "8.6.0"
    CACHE STRING
   "Version tag of Firebase CPP SDK to download (if no local or not passed in) and use (no trailing .0)"
-)+)


build: allow the user to specify `llvm-tblgen`

This follows the same pattern as Clang and permits the user to specify
the tablegen to use via `-DLLVM_TABLEGEN=`.  This allows for
cross-compiling LLDB for a foreign target (e.g. Windows ARM64 on Windows
X64).  The LLVM dependency for LLDB in that case must be a Windows ARM64
build which cannot cross-compile llvm-tblgen due to the way that Visual
Studio works.  Instead, permit the user to have a separate tablegen
build which can be used during the build.

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

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -44,31 +44,35 @@
 find_program(lit_full_path ${lit_file_name} ${config_dirs} NO_DEFAULT_PATH)
 set(LLVM_DEFAULT_EXTERNAL_LIT ${lit_full_path} CACHE PATH "Path to llvm-lit")

-if(CMAKE_CROSSCOMPILING)
-  set(LLVM_NATIVE_BUILD "${LLDB_PATH_TO_LLVM_BUILD}/NATIVE")
-  if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
-    message(FATAL_ERROR
-      "Attempting to cross-compile LLDB standalone but no native LLVM build
-      found. Please cross-compile LLVM as well.")
+if(LLVM_TABLEGEN)
+  set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
+else()
+  if(CMAKE_CROSSCOMPILING)
+    set(LLVM_NATIVE_BUILD "${LLDB_PATH_TO_LLVM_BUILD}/NATIVE")
+    if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
+      message(FATAL_ERROR
+        "Attempting to cross-compile LLDB standalone but no native LLVM build
+        found. Please cross-compile LLVM as well.")
+    endif()
+
+    if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+      set(HOST_EXECUTABLE_SUFFIX ".exe")
+    endif()
+
+    if (NOT CMAKE_CONFIGURATION_TYPES)
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    else()
+      # NOTE: LLVM NATIVE build is always built Release, as is specified in
+      # CrossCompile.cmake
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    endif()
+  else()
+    set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
+    append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
+    find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
   endif()
-
-  if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
-    set(HOST_EXECUTABLE_SUFFIX ".exe")
-  endif()
-
-  if (NOT CMAKE_CONFIGURATION_TYPES)
-    set(LLVM_TABLEGEN_EXE
-      "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-  else()
-    # NOTE: LLVM NATIVE build is always built Release, as is specified in
-    # CrossCompile.cmake
-    set(LLVM_TABLEGEN_EXE
-      "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-  endif()
-else()
-  set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
-  append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
-  find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
 endif()

 # They are used as destination of target generators.


[CMake] -fmodules-local-submodule-visibility is a cc1-only option.

This should fix modules builds on platforms other than Darwin after r274196.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -465,13 +465,13 @@
   endif()
   if (LLVM_ENABLE_MODULES)
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(module_flags "-fmodules -Xclang -fmodules-cache-path=module.cache")
+    set(module_flags "-fmodules -fmodules-cache-path=module.cache")
     if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
       # On Darwin -fmodules does not imply -fcxx-modules.
       set(module_flags "${module_flags} -fcxx-modules")
     endif()
     if (LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
-      set(module_flags "${module_flags} -fmodules-local-submodule-visibility")
+      set(module_flags "${module_flags} -Xclang -fmodules-local-submodule-visibility")
     endif()
     set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${module_flags}")


Fixing external projects settings

Fixing external projects settings

--- cmake_scripts/external-projects.cmake
+++ cmake_scripts/external-projects.cmake
@@ -50,7 +50,6 @@

 include_directories(
      ${EXTERNAL_PROJECTS_PREFIX}/src/externalRapidJson/include
-     ${EXTERNAL_PROJECTS_PREFIX}/src/externalLest/include/
+     ${EXTERNAL_PROJECTS_PREFIX}/src/externalLest/include
+     ${EXTERNAL_PROJECTS_PREFIX}/installed/include
     )
-
-include_directories($<BUILD_INTERFACE:${EXTERNAL_PROJECTS_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}>)


Fixed broken build (rapidjson)

Fixed broken build (rapidjson)

--- cmake_scripts/external-projects.cmake
+++ cmake_scripts/external-projects.cmake
@@ -19,8 +19,12 @@
     PREFIX "${EXTERNAL_PROJECTS_PREFIX}"
     GIT_REPOSITORY "https://github.com/Tencent/rapidjson.git"
     GIT_TAG "master"
-    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_INSTALL_PREFIX}
-    )
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTERNAL_PROJECTS_INSTALL_PREFIX}
+        -DRAPIDJSON_BUILD_DOC=OFF
+        -DRAPIDJSON_BUILD_EXAMPLES=OFF
+        -DRAPIDJSON_BUILD_TESTS=OFF
+        -DRAPIDJSON_BUILD_THIRDPARTY_GTEST=OFF
+        )

 set(EXTERNAL_RAPIDJSON_INCLUDE_DIR ${EXTERNAL_PROJECTS_INSTALL_PREFIX}/include/rapidjson)


Outsource file copying into it's own function

--- ext/CopySharedLibraries.cmake
+++ ext/CopySharedLibraries.cmake
@@ -22,7 +22,17 @@
 # OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                                         #
 #########################################################################################

-macro(ghl_copy_shared_libraries target ghoul_dir)
+function (copy_files target)
+    # Add the copy command
+    foreach(file_i ${ARGN})
+        add_custom_command(TARGET ${target} POST_BUILD
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different
+        "${file_i}"
+        $<TARGET_FILE_DIR:${target}>)
+    endforeach ()
+endfunction ()
+
+macro (ghl_copy_shared_libraries target ghoul_dir)
     # Windows DLL
     if (WIN32)
         # DevIL
@@ -47,12 +57,6 @@
             set(SHARED_LIBS ${SHARED_LIBS} ${FREEIMAGE_DLL_DIR}/FreeImage.dll)
         endif ()

-        # Add the copy command
-        foreach(file_i ${SHARED_LIBS})
-            add_custom_command(TARGET ${target} POST_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy_if_different
-            "${file_i}"
-            $<TARGET_FILE_DIR:${target}>)
-        endforeach ()
+        copy_files(${target} ${SHARED_LIBS})
     endif (WIN32)
 endmacro ()


return result from scanning include files

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -1180,7 +1180,7 @@

 function (cotire_scan_includes _includesVar)
 	set(_options "")
-	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_VERSION LANGUAGE UNPARSED_LINES)
+	set(_oneValueArgs COMPILER_ID COMPILER_EXECUTABLE COMPILER_ARG1 COMPILER_VERSION LANGUAGE UNPARSED_LINES SCAN_RESULT)
 	set(_multiValueArgs COMPILE_DEFINITIONS COMPILE_FLAGS INCLUDE_DIRECTORIES SYSTEM_INCLUDE_DIRECTORIES
 		IGNORE_PATH INCLUDE_PATH IGNORE_EXTENSIONS INCLUDE_PRIORITY_PATH COMPILER_LAUNCHER)
 	cmake_parse_arguments(_option "${_options}" "${_oneValueArgs}" "${_multiValueArgs}" ${ARGN})
@@ -1252,6 +1252,9 @@
 	set (${_includesVar} ${_includes} PARENT_SCOPE)
 	if (_option_UNPARSED_LINES)
 		set (${_option_UNPARSED_LINES} ${_unparsedLines} PARENT_SCOPE)
+	endif()
+	if (_option_SCAN_RESULT)
+		set (${_option_SCAN_RESULT} ${_result} PARENT_SCOPE)
 	endif()
 endfunction()

@@ -1440,12 +1443,13 @@
 		INCLUDE_PATH ${_option_INCLUDE_PATH}
 		IGNORE_EXTENSIONS ${_option_IGNORE_EXTENSIONS}
 		INCLUDE_PRIORITY_PATH ${_option_INCLUDE_PRIORITY_PATH}
-		UNPARSED_LINES _unparsedLines)
+		UNPARSED_LINES _unparsedLines
+		SCAN_RESULT _scanResult)
 	cotire_generate_unity_source("${_prefixFile}"
 		PROLOGUE ${_prologue} EPILOGUE ${_epilogue} LANGUAGE "${_option_LANGUAGE}" ${_selectedHeaders})
 	set (_unparsedLinesFile "${_prefixFile}.log")
 	if (_unparsedLines)
-		if (COTIRE_VERBOSE OR NOT _selectedHeaders)
+		if (COTIRE_VERBOSE OR _scanResult OR NOT _selectedHeaders)
 			list (LENGTH _unparsedLines _skippedLineCount)
 			message (STATUS "${_skippedLineCount} line(s) skipped, see ${_unparsedLinesFile}")
 		endif()


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -10,57 +10,115 @@
 InitialPreference=15

 Name=GStreamer
+Name[ast]=GStreamer
+Name[bg]=GStreamer
+Name[bs]=Gstreamer
 Name[ca]=GStreamer
 Name[ca@valencia]=GStreamer
 Name[cs]=GStreamer
+Name[da]=GStreamer
 Name[de]=GStreamer
+Name[el]=GStreamer
 Name[en_GB]=GStreamer
 Name[es]=GStreamer
+Name[et]=GStreamer
+Name[eu]=GStreamer
+Name[fa]=GStreamer
 Name[fi]=GStreamer
 Name[fr]=GStreamer
+Name[ga]=GStreamer
 Name[gl]=GStreamer
+Name[hsb]=GStreamer
+Name[hu]=GStreamer
 Name[id]=GStreamer
 Name[is]=GStreamer
+Name[it]=GStreamer
 Name[ja]=GStreamer
+Name[kk]=GStreamer
 Name[ko]=GStreamer
+Name[ku]=GStreamer
+Name[lt]=GStreamer
+Name[lv]=GStreamer
+Name[mai]=GStreamer
+Name[mr]=जी-स्ट्रीमर
 Name[nb]=GStreamer
+Name[nds]=GStreamer
 Name[nl]=GStreamer
 Name[nn]=GStreamer
+Name[pa]=ਜੀਸਟੀਰਮਰ
+Name[pl]=GStreamer
+Name[pt]=GStreamer
+Name[pt_BR]=GStreamer
+Name[ro]=GStreamer
+Name[ru]=GStreamer
 Name[se]=GStreamer
 Name[sk]=GStreamer
+Name[sl]=GStreamer
 Name[sr]=Гстример
 Name[sr@ijekavian]=Гстример
 Name[sr@ijekavianlatin]=GStreamer
 Name[sr@latin]=GStreamer
 Name[sv]=Gstreamer
+Name[th]=GStreamer
+Name[tr]=GStreamer
+Name[ug]=GStreamer
 Name[uk]=GStreamer
 Name[x-test]=xxGStreamerxx
+Name[zh_CN]=GStreamer
+Name[zh_TW]=GStreamer

 Comment=Phonon GStreamer backend
+Comment[bg]=Phonon GStreamer
+Comment[bs]=Gstreamer kao pozadina Phonona
 Comment[ca]=Dorsal GStreamer del Phonon
 Comment[ca@valencia]=Dorsal GStreamer del Phonon
 Comment[cs]=Podpůrná vrstva GStreamer pro Phonon
+Comment[da]=GStreamer-backend til Phonon
 Comment[de]=Phonon-Treiber für GStreamer
+Comment[el]=Σύστημα υποστήριξης GStreamer του Phonon
 Comment[en_GB]=Phonon GStreamer backend
 Comment[es]=Motor GStreamer para Phonon
+Comment[et]=Phononi GStreameri taustaprogramm
+Comment[eu]=Phonon-en GStreamer bizkarraldekoa
+Comment[fa]=پسانه‌ی جی‌استریمر برای فنون (Phonon GStreamer backend)
 Comment[fi]=Phonon GStreamer -taustajärjestelmä
 Comment[fr]=Moteur GStreamer pour Phonon
+Comment[ga]=Inneall GStreamer le haghaidh Phonon
 Comment[gl]=Infraestrutura de GStreamer para Phonon
 Comment[hsb]=Phonon GStreamer backend
 Comment[hu]=Phonon GStreamer-modul
 Comment[id]=Backend phonon GStreamer
 Comment[is]=Phonon GStreamer bakendi
+Comment[it]=Motore Gstreamer di Phonon
 Comment[ja]=Phonon GStreamer バックエンド
+Comment[kk]=Phonon GStreamer тетігі
 Comment[ko]=Phonon GStreamer 백엔드
+Comment[ku]=Binesaza Phonon GStreamer
+Comment[lt]=Phonon GStreamer galinė sąsaja
+Comment[lv]=Phonon GStreamer aizmugure
+Comment[mr]=फोनॉन जी-स्ट्रीमर बॅकएन्ड
 Comment[nb]=Phonon-motor for GStreamer
+Comment[nds]=GStreamer-Hülpprogramm för Phonon
 Comment[nl]=GStreamer-backend (Phonon)
 Comment[nn]=Phonon-motor for GStreamer
+Comment[pa]=ਫੋਨੋਨ ਜਸਟੀਰਮਰ ਬੈਕਐਂਡ
+Comment[pl]=Obsługa GStreamera przez Phonon
+Comment[pt]=Infra-estrutura do GStreamer para o Phonon
+Comment[pt_BR]=Infraestrutura do GStreamer para o Phonon
+Comment[ro]=Suportul GStreamer pentru Phonon
+Comment[ru]=Механизм GStreamer для Phonon
 Comment[se]=Phonon GStreamer duogášmohtor
 Comment[sk]=Podsystém Phonon GStreamer
+Comment[sl]=Zaledje GStreamer za Phonon
 Comment[sr]=Гстример као позадина Фонона
 Comment[sr@ijekavian]=Гстример као позадина Фонона
 Comment[sr@ijekavianlatin]=GStreamer kao pozadina Phonona
 Comment[sr@latin]=GStreamer kao pozadina Phonona
 Comment[sv]=Phonon Gstreamer-gränssnitt
+Comment[th]=โปรแกรมเบื้องหลัง GStreamer ของ Phonon
+Comment[tr]=Phonon GStreamer arka ucu
+Comment[ug]=Phonon GStreamer نىڭ ئارقائۇچى
 Comment[uk]=Модуль використання GStreamer у Phonon
 Comment[x-test]=xxPhonon GStreamer backendxx
+Comment[zh_CN]=Phonon GStreamer 后端
+Comment[zh_TW]=Phonon GStreamer 後端介面


fix cmake build error on linux

fix cmake build error on linux

--- scripts/cmake/Cuda.cmake
+++ scripts/cmake/Cuda.cmake
@@ -19,8 +19,8 @@
 	endif()

     get_filename_component(__libpath_hist ${CUDA_CUDART_LIBRARY} PATH)
-    find_library(CUDNN_LIBRARY NAMES ${CUDNN_LIB_NAME} # libcudnn_static.a
-       PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE} ${__libpath_hist}
+    find_library(CUDNN_LIBRARY NAMES ${CUDNN_LIB_NAME}
+       PATHS ${CUDNN_ROOT} $ENV{CUDNN_ROOT} ${CUDNN_INCLUDE} ${__libpath_hist} ${__libpath_hist}/../lib
        DOC "Path to cuDNN library.")

     if(CUDNN_INCLUDE AND CUDNN_LIBRARY)
@@ -84,6 +84,7 @@
 	else(HAVE_CUDNN)
         message(STATUS "Could not locate cuDNN, disabling cuDNN support.")
 		remove_definitions(-DLIBVOT_USE_CUDNN)
+        set(LIBVOT_USE_CUDNN OFF)
     endif()
 endif(LIBVOT_USE_CUDNN)


- issue 2640: found another place that needed to change to intall_libdir

--- cmake-set-dependencies.cmake
+++ cmake-set-dependencies.cmake
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 by Pedro Mendes, Virginia Tech Intellectual
+# Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual
 # Properties, Inc., University of Heidelberg, and University of
 # of Connecticut School of Medicine.
 # All rights reserved.
@@ -154,8 +154,8 @@
 set (SBW_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "SBW include directory" FORCE)
 endif()
 if (NOT EXISTS ${SBW_LIBRARY})
-set (SBW_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libSBW-static.a CACHE FILEPATH "SBW library" FORCE)
-set (SBW_LIBRARIES ${COPASI_DEPENDENCY_DIR}/lib/libSBW-static.a CACHE FILEPATH "SBW library" FORCE)
+set (SBW_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libSBW-static.a CACHE FILEPATH "SBW library" FORCE)
+set (SBW_LIBRARIES ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libSBW-static.a CACHE FILEPATH "SBW library" FORCE)
 endif()

@@ -164,7 +164,7 @@
 set (LIBSBML_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "SBML include directory" FORCE)
 endif()
 if (NOT EXISTS ${LIBSBML_LIBRARY})
-set (LIBSBML_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libsbml-static.a CACHE FILEPATH "libSBML library" FORCE)
+set (LIBSBML_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libsbml-static.a CACHE FILEPATH "libSBML library" FORCE)
 endif()

 # libsedml
@@ -172,7 +172,7 @@
 set (LIBSEDML_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "SEDML include directory" FORCE)
 endif()
 if (NOT EXISTS ${LIBSEDML_LIBRARY})
-set (LIBSEDML_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libsedml-static.a CACHE FILEPATH "libSEDML library" FORCE)
+set (LIBSEDML_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libsedml-static.a CACHE FILEPATH "libSEDML library" FORCE)
 endif()

@@ -181,7 +181,7 @@
 set (RAPTOR_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "raptor include directory" FORCE)
 endif()
 if (NOT EXISTS ${RAPTOR_LIBRARY})
-set (RAPTOR_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libraptor.a CACHE FILEPATH "raptor library" FORCE)
+set (RAPTOR_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libraptor.a CACHE FILEPATH "raptor library" FORCE)
 endif()

 if (NOT APPLE AND (NOT BLA_VENDOR OR "${BLA_VENDOR}" STREQUAL "COPASI Dependencies"))
@@ -189,15 +189,15 @@
   # clapack
   set (CLAPACK_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "clapack include directory" FORCE)

-  set(CLAPACK_LIBRARY_F2C "${COPASI_DEPENDENCY_DIR}/lib/libf2c.a")
+  set(CLAPACK_LIBRARY_F2C "${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libf2c.a")

   if (NOT EXISTS "${CLAPACK_LIBRARY_F2C}")
-    set(CLAPACK_LIBRARY_F2C "/usr/lib/libgfortran.so")
+    set(CLAPACK_LIBRARY_F2C "/usr/${CMAKE_INSTALL_LIBDIR}/libgfortran.so")
   endif()

   set (CLAPACK_LIBRARIES
-       ${COPASI_DEPENDENCY_DIR}/lib/liblapack.a;${COPASI_DEPENDENCY_DIR}/lib/libblas.a;${CLAPACK_LIBRARY_F2C}
+       ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/liblapack.a;${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libblas.a;${CLAPACK_LIBRARY_F2C}
        CACHE FILEPATH "lapack library" FORCE)

   add_definitions(-DHAVE_BLASWRAP_H)
@@ -215,7 +215,7 @@
 set (CPPUNIT_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "cpp unit include directory" FORCE)
 endif()
 if (NOT EXISTS ${CPPUNIT_LIBRARY})
-set (CPPUNIT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libcppunit.a CACHE FILEPATH "cppunit library" FORCE)
+set (CPPUNIT_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libcppunit.a CACHE FILEPATH "cppunit library" FORCE)
 endif()

 # expat
@@ -223,14 +223,14 @@
 set (LIBEXPAT_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "expat include directory" FORCE)
 endif()
 if (NOT EXISTS ${LIBEXPAT_LIBRARY})
-set (LIBEXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libexpat.a CACHE FILEPATH "expat library" FORCE)
+set (LIBEXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libexpat.a CACHE FILEPATH "expat library" FORCE)
 endif()

 if (NOT EXISTS ${EXPAT_INCLUDE_DIR})
 set (EXPAT_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "expat include directory" FORCE)
 endif()
 if (NOT EXISTS ${EXPAT_LIBRARY})
-set (EXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libexpat.a CACHE FILEPATH "expat library" FORCE)
+set (EXPAT_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libexpat.a CACHE FILEPATH "expat library" FORCE)
 endif()

 # mml
@@ -238,7 +238,7 @@
 set (MML_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "mml include directory" FORCE)
 endif()
 if (NOT EXISTS ${MML_LIBRARY})
-set (MML_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libmml.a CACHE FILEPATH "mml library" FORCE)
+set (MML_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libmml.a CACHE FILEPATH "mml library" FORCE)
 endif()

 # QWT
@@ -246,7 +246,7 @@
 set (QWT_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "qwt include directory" FORCE)
 endif()
 if (NOT EXISTS ${QWT_LIBRARY})
-set (QWT_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libqwt.a CACHE FILEPATH "qwt library" FORCE)
+set (QWT_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libqwt.a CACHE FILEPATH "qwt library" FORCE)
 endif()

 # QWT Plot
@@ -254,10 +254,10 @@
 set (QWTPLOT3D_INCLUDE_DIR ${COPASI_DEPENDENCY_DIR}/include CACHE PATH "qwtplot3d include directory" FORCE)
 endif()
 if (NOT EXISTS ${QWTPLOT3D_LIBRARY})
-set (QWTPLOT3D_LIBRARY ${COPASI_DEPENDENCY_DIR}/lib/libqwtplot3d.a CACHE FILEPATH "qwtplot3d library" FORCE)
-endif()
-
-
-endif()
-
-endif()
+set (QWTPLOT3D_LIBRARY ${COPASI_DEPENDENCY_DIR}/${CMAKE_INSTALL_LIBDIR}/libqwtplot3d.a CACHE FILEPATH "qwtplot3d library" FORCE)
+endif()
+
+
+endif()
+
+endif()


Hoist c11 support out of gcc / clang guard, since sunstudio supports it

--- cmake/Modules/Compiler.cmake
+++ cmake/Modules/Compiler.cmake
@@ -18,15 +18,17 @@
 	set( SUNSTUDIO 1 )
 endif( CMAKE_C_COMPILER_ID EQUAL SunPro )

+check_c11( )
+if( HAVE_C11 )
+	list( APPEND CMAKE_REQUIRED_FLAGS -std=c11 )
+else( HAVE_C11 )
+	list( APPEND CMAKE_REQUIRED_FLAGS -std=c99 )
+endif( HAVE_C11 )
+
+list( APPEND CMAKE_REQUIRED_DEFINITIONS -Wall )
+
 if( CLANG OR GCC )
-	check_c11( )
-	if( HAVE_C11 )
-		add_definitions( -std=c11 )
-	else( HAVE_C11 )
-		add_definitions( -std=c99 )
-	endif( HAVE_C11 )
-
-	add_definitions( -Wall -pedantic )
+	list( APPEND CMAKE_REQUIRED_FLAGS -pedantic )

 	check_c_compiler_flag( -fPIC HAVE_FPIC )
 	if( HAVE_FPIC )


Enable CUDA_NVCC_FLAGS at arch detect step.

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -73,7 +73,7 @@
   elseif(CUDA_GENERATION STREQUAL "Volta")
     set(__cuda_arch_bin "7.0")
   elseif(CUDA_GENERATION STREQUAL "Auto")
-    execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
+    execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
                      WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
                      RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
                      ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -90,7 +90,7 @@
       set(__cuda_arch_bin "3.2")
       set(__cuda_arch_ptx "")
     elseif(AARCH64)
-      execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
+      execute_process( COMMAND "${CUDA_NVCC_EXECUTABLE}" ${CUDA_NVCC_FLAGS} "${OpenCV_SOURCE_DIR}/cmake/checks/OpenCVDetectCudaArch.cu" "--run"
                        WORKING_DIRECTORY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/"
                        RESULT_VARIABLE _nvcc_res OUTPUT_VARIABLE _nvcc_out
                        ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)


Use (%site-dir) as install directory for guile files

--- cmake/OpenCogFunctions.cmake
+++ cmake/OpenCogFunctions.cmake
@@ -20,9 +20,13 @@
 # MODULE_DIR_PATH in the PARENT_SCOPE.
 FUNCTION(PROCESS_MODULE_STRUCTURE FILE_NAME)
     SET(GUILE_BIN_DIR "${CMAKE_BINARY_DIR}/opencog/scm")
-    SET(GUILE_INSTALL_DIR "${DATADIR}/scm")
+    IF(HAVE_GUILE AND (GUILE_VERSION VERSION_GREATER 2.2))
+        EXECUTE_PROCESS(COMMAND guile -c "(display (%site-dir))"
+            OUTPUT_VARIABLE GUILE_INSTALL_DIR
+            OUTPUT_STRIP_TRAILING_WHITESPACE)
+    ENDIF()

-    # Create symlinks in build directory mirroring the install path structure.
+    # Copy files into build directory mirroring the install path structure.
     # Also configure for install.
     IF ("${MODULE_NAME}.scm" STREQUAL "${FILE_NAME}")
         EXECUTE_PROCESS(
@@ -116,7 +120,7 @@
             LIST(APPEND GUILE_MODULE_DEPENDS ${MODULE_FILE_DEPEND})
         ENDFOREACH()
         IF( NOT ( TARGET "${MODULE_NAME}_GUILE_INSTALL"))
-		ADD_CUSTOM_TARGET("${MODULE_NAME}_GUILE_INSTALL" ALL DEPENDS "${GUILE_MODULE_DEPENDS}")
+            ADD_CUSTOM_TARGET("${MODULE_NAME}_GUILE_INSTALL" ALL DEPENDS "${GUILE_MODULE_DEPENDS}")
         ENDIF()
     ELSE()
         IF(NOT DEFINED SCM_FILES)


[cmake] add setting to turn off warning about 'register' keyword (for QT)

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -414,6 +414,13 @@
 		)

 	# C++ specific warnings
+
+	axl_create_compiler_flag_setting(
+		GCC_FLAG_CPP_WARNING_REGISTER
+		DESCRIPTION "Warn about use of the 'register' keyword"
+		DEFAULT "-Wno-register"
+		"-Wregister" "-Wno-register"
+		)

 	axl_create_compiler_flag_setting(
 		GCC_FLAG_CPP_WARNING_INVALID_OFFSETOF


Revert "[CMake] Fix dependency on codesign steps"

This reverts commit 10506e00c09d97342ecce687ef8ef6aa43ebda1d.

There are dylibs in lib/swift/macosx/x86_64/ and lib/swift/macosx/, and
with this patch the dylibs in the latter path don't get updated when the
code changes and are stale.

I'm not sure exactly how to correct this patch so let's just try again
when it updates both sets of dylibs.

rdar://28660201

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1465,25 +1465,17 @@
         endif()

         set(lipo_target "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
-
-        if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
-          set(unsigned "-unsigned")
-        endif()
-
         _add_swift_lipo_target(
             ${sdk}
-            ${lipo_target}${unsigned}
-            "${UNIVERSAL_LIBRARY_NAME}${unsigned}"
+            ${lipo_target}
+            ${UNIVERSAL_LIBRARY_NAME}
             ${THIN_INPUT_TARGETS})

         if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND SWIFTLIB_SHARED)
           # Ad-hoc sign stdlib dylibs
-          add_custom_command_target(unused_var
-            COMMAND ${CMAKE_COMMAND} -E copy ${UNIVERSAL_LIBRARY_NAME}${unsigned} ${UNIVERSAL_LIBRARY_NAME}
-            COMMAND "codesign" "-f" "-s" "-" "${UNIVERSAL_LIBRARY_NAME}"
-            OUTPUT ${UNIVERSAL_LIBRARY_NAME}
-            DEPENDS ${lipo_target}${unsigned}
-            CUSTOM_TARGET_NAME ${lipo_target})
+          add_custom_command(TARGET "${name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}"
+                             POST_BUILD
+                             COMMAND "codesign" "-f" "-s" "-" "${UNIVERSAL_LIBRARY_NAME}")
         endif()

         # Cache universal libraries for dependency purposes


build: add a workaround for reflection test on Windows

Copy the runtime component into the swift runtime directory.  Normally
the runtime directory is not the same as the library directory on
Windows.  This copies the runtime component into the build tree into the
runtime directory to permit the tests to find the standard library.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1027,6 +1027,11 @@
     set_target_properties("${target}" PROPERTIES
       LIBRARY_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}
       ARCHIVE_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
+    if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND SWIFTLIB_SINGLE_IS_STDLIB_CORE
+        AND libkind STREQUAL SHARED)
+      add_custom_command(TARGET ${target} POST_BUILD
+        COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${target}> ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
+    endif()

     foreach(config ${CMAKE_CONFIGURATION_TYPES})
       string(TOUPPER ${config} config_upper)


[CMake] Allow TableGen.cmake to be included multiple times

This patch allows TableGen.cmake to be safely included multiple times in sub-projects.

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -110,7 +110,7 @@
   set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${target} PARENT_SCOPE)
 endfunction()

-if(LLVM_USE_HOST_TOOLS)
+if(LLVM_USE_HOST_TOOLS AND NOT TARGET NATIVE_LIB_LLVMTABLEGEN)
   llvm_ExternalProject_BuildCmd(tblgen_build_cmd LLVMSupport
     ${LLVM_NATIVE_BUILD}
     CONFIGURATION Release)


Attempt to fix syntax error (CMake module).

--- cmake/third_party/xsmm.cmake
+++ cmake/third_party/xsmm.cmake
@@ -7,7 +7,7 @@
   message(STATUS "Found LIBXSMM (${LIBXSMMROOT})")
   file(GLOB XSMM_SRCS LIST_DIRECTORIES false CONFIGURE_DEPENDS ${LIBXSMMROOT}/include/libxsmm/*.c)

-  if(${XSMM_SRCS})
+  if(XSMM_SRCS)
     list(REMOVE_ITEM XSMM_SRCS ${LIBXSMMROOT}/include/libxsmm/libxsmm_generator_gemm_driver.c)
   else()
     file(GLOB XSMM_SRCS LIST_DIRECTORIES false CONFIGURE_DEPENDS ${LIBXSMMROOT}/src/*.c)


FindHIP: Apply remove_item on non-empty lists only

Change-Id: Ib7fcb992d7e1bb679d4d86676fe3d980ba204815

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -514,7 +514,9 @@
     # Separate the sources from the options
     HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _hcc_options _nvcc_options ${ARGN})
     HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} NVCC_OPTIONS ${_nvcc_options})
-    list(REMOVE_ITEM _sources "${_source_files}")
+    if(_source_files)
+        list(REMOVE_ITEM _sources ${_source_files})
+    endif()
     if("x${HCC_HOME}" STREQUAL "x")
         set(HCC_HOME "/opt/rocm/hcc")
     endif()
@@ -530,7 +532,9 @@
     # Separate the sources from the options
     HIP_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _hipcc_options _hcc_options _nvcc_options ${ARGN})
     HIP_PREPARE_TARGET_COMMANDS(${hip_target} OBJ _generated_files _source_files ${_sources} ${_cmake_options} HIPCC_OPTIONS ${_hipcc_options} HCC_OPTIONS ${_hcc_options} NVCC_OPTIONS ${_nvcc_options})
-    list(REMOVE_ITEM _sources "${_source_files}")
+    if(_source_files)
+        list(REMOVE_ITEM _sources ${_source_files})
+    endif()
     add_library(${hip_target} ${_cmake_options} ${_generated_files} ${_sources})
     set_target_properties(${hip_target} PROPERTIES LINKER_LANGUAGE ${HIP_C_OR_CXX})
 endmacro()


Find OVR 0.4.4 libraries.

Find OVR 0.4.4 libraries.

--- cmake/FindOVR.cmake
+++ cmake/FindOVR.cmake
@@ -170,7 +170,8 @@
 	ovr
 	OVR
 	LibOVR
-	ovr${_ovr_libname_bitsuffix})
+	ovr${_ovr_libname_bitsuffix}
+	libovr${_ovr_libname_bitsuffix})

 list(APPEND _ovr_dynamic_library_debug_names
 	OVRRT${_ovr_libname_bitsuffix}
@@ -184,6 +185,7 @@
 	OVR
 	LibOVR
 	ovr${_ovr_libname_bitsuffix}d
+	libovr${_ovr_libname_bitsuffix}d
 	OVR${_ovr_libname_bitsuffix}d)

 find_library(OVR_DYNAMIC_LIBRARY_RELEASE


improved FindSIP.cmake: actually use Python PATH, and try sipconfig.py sip_bin as well

om my mac I installed SIP from source since macports would have built a complete python.
so the sipconfig.py path is actually correct and really worth a try.

--- cmake/FindSIP.cmake
+++ cmake/FindSIP.cmake
@@ -62,12 +62,20 @@
 	SET(CMAKE_FIND_LIBRARY_PREFIXES "${OLD_CMAKE_FIND_LIBRARY_PREFIXES}")

   # (c) Try to find the sip executable:
-
+
+  # let's try the configured binary directory anyway, in case, you know, it's actually correct...
+  EXECUTE_PROCESS ( COMMAND ${PYTHON_EXECUTABLE} -c "import sipconfig; print sipconfig.Configuration().sip_bin"
+		OUTPUT_VARIABLE SIP_CONFIG_EXECUTABLE
+		OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+  GET_FILENAME_COMPONENT(SIP_CONFIG_BIN_DIRS "${SIP_CONFIG_EXECUTABLE}" PATH)
+
   # Use the path to the python installation as a hint for finding sip
-  GET_FILENAME_COMPONENT(SIP_POSSIBLE_BIN_DIRS "${PYTHON_EXECUTABLE}" ABSOLUTE)
+  GET_FILENAME_COMPONENT(SIP_POSSIBLE_BIN_DIRS "${PYTHON_EXECUTABLE}" PATH)
   FIND_PROGRAM(SIP_EXECUTABLE sip
     ${SIP_POSSIBLE_BIN_DIRS}
     /usr/bin/
+    ${SIP_CONFIG_BIN_DIRS}
   )

   # (d) Try to extract version information from sip.h:


using CMAKE_CURRENT_SOURCE_DIR in place of CMAKE_SOURCE_DIR for FetchContent

--- cmake/LIEFGit.cmake
+++ cmake/LIEFGit.cmake
@@ -6,35 +6,35 @@

 execute_process(
   COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE LIEF_COMMIT_HASH
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )

 execute_process(
   COMMAND ${GIT_EXECUTABLE} rev-list --count ${LIEF_COMMIT_HASH}
-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE LIEF_COMMIT_COUNT
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )

 execute_process(
   COMMAND ${GIT_EXECUTABLE} describe --abbrev=0 --tags HEAD --always
-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE LIEF_GIT_TAG
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )

 execute_process(
   COMMAND ${GIT_EXECUTABLE} tag --list --points-at=HEAD
-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE LIEF_GIT_COMMIT_TAGGED
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )

 execute_process(
   COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
-  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+  WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   OUTPUT_VARIABLE LIEF_GIT_BRANCH
   OUTPUT_STRIP_TRAILING_WHITESPACE
 )


cmake: Fix environment for cross-compile installs

Currently the include directory is arch-dependent.
However, the location where the *.cmake files are installed
is arch-independent. This difference causes an issue with
cross compile environments.

--- cmake/install.cmake
+++ cmake/install.cmake
@@ -26,7 +26,7 @@

 set(export_name "VulkanHeadersConfig")
 set(namespace "Vulkan::")
-set(cmake_files_install_dir ${CMAKE_INSTALL_DATADIR}/cmake/VulkanHeaders/)
+set(cmake_files_install_dir ${CMAKE_INSTALL_LIBDIR}/cmake/VulkanHeaders/)

 # Set EXPORT_NAME for consistency with established names. The CMake generated ones won't work.
 set_target_properties(Vulkan-Headers PROPERTIES EXPORT_NAME "Headers")


remove unrelated arrow cmake code

remove unrelated arrow cmake code

--- cmake/Modules/ConfigureGoogleTest.cmake
+++ cmake/Modules/ConfigureGoogleTest.cmake
@@ -34,5 +34,3 @@
 #   -DGTEST_ROOT:PATH=/path/to/googletest_install_dir
 set(GTEST_ROOT ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/thirdparty/googletest-install/)
 message(STATUS "GTEST_ROOT: " ${GTEST_ROOT})
-
-link_directories(${GTEST_ROOT}/lib/)


Fix issue 15730.

Fix issue 15730.

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -346,7 +346,7 @@
   ocv_update(CPU_MSA_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_msa.cpp")
   ocv_update(CPU_KNOWN_OPTIMIZATIONS "MSA")
   ocv_update(CPU_MSA_FLAGS_ON "-mmsa")
-  set(CPU_BASELINE "MSA" CACHE STRING "${HELP_CPU_BASELINE}")
+  set(CPU_BASELINE "DETECT" CACHE STRING "${HELP_CPU_BASELINE}")
 elseif(PPC64LE)
   ocv_update(CPU_KNOWN_OPTIMIZATIONS "VSX;VSX3")
   ocv_update(CPU_VSX_TEST_FILE "${OpenCV_SOURCE_DIR}/cmake/checks/cpu_vsx.cpp")


review rework

review rework

--- cmake/cmake_celix/BundlePackaging.cmake
+++ cmake/cmake_celix/BundlePackaging.cmake
@@ -18,8 +18,8 @@

 set(CELIX_NO_POSTFIX_BUILD_TYPES RelWithDebInfo Release CACHE STRING "The build type used for creating bundle without a build type postfix.")
-set(CELIX_DEFAULT_JAR_COMMAND_ARGUMENTS -cfm0 CACHE STRING "Default no compression is applied")
-set(CELIX_DEFAULT_ZIP_COMMAND_ARGUMENTS -rq0 CACHE STRING "Default no compression is applied")
+set(CELIX_JAR_COMMAND_ARGUMENTS -cfm0 CACHE STRING "Default no compression is applied")
+set(CELIX_ZIP_COMMAND_ARGUMENTS -rq0 CACHE STRING "Default no compression is applied")

 find_program(JAR_COMMAND jar NO_CMAKE_FIND_ROOT_PATH)
@@ -275,7 +275,7 @@
     if(JAR_COMMAND)
         add_custom_command(OUTPUT ${BUNDLE_FILE}
             COMMAND ${CMAKE_COMMAND} -E make_directory ${BUNDLE_CONTENT_DIR}
-            COMMAND ${JAR_COMMAND} ${CELIX_DEFAULT_JAR_COMMAND_ARGUMENTS} ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
+            COMMAND ${JAR_COMMAND} ${CELIX_JAR_COMMAND_ARGUMENTS} ${BUNDLE_FILE} ${BUNDLE_GEN_DIR}/MANIFEST.MF -C ${BUNDLE_CONTENT_DIR} .
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
             DEPENDS  ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
@@ -285,7 +285,7 @@

         add_custom_command(OUTPUT ${BUNDLE_FILE}
             COMMAND ${CMAKE_COMMAND} -E copy_if_different ${BUNDLE_GEN_DIR}/MANIFEST.MF META-INF/MANIFEST.MF
-            COMMAND ${ZIP_COMMAND} ${CELIX_DEFAULT_ZIP_COMMAND_ARGUMENTS} ${BUNDLE_FILE} *
+            COMMAND ${ZIP_COMMAND} ${CELIX_ZIP_COMMAND_ARGUMENTS} ${BUNDLE_FILE} *
             COMMENT "Packaging ${BUNDLE_TARGET_NAME}"
             DEPENDS ${BUNDLE_TARGET_NAME} "$<TARGET_PROPERTY:${BUNDLE_TARGET_NAME},BUNDLE_DEPEND_TARGETS>" ${BUNDLE_GEN_DIR}/MANIFEST.MF
             WORKING_DIRECTORY ${BUNDLE_CONTENT_DIR}


Fixed path to breakpad libs

Fixed path to breakpad libs

--- cmake/modules/BuildGoogleBreakpad.cmake
+++ cmake/modules/BuildGoogleBreakpad.cmake
@@ -105,9 +105,9 @@
 if(WIN32 AND NOT MINGW)
   set(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR ${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/include/breakpad)

-  set(BREAKPAD_COMMON_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/breakpad/client/windows/$<CONFIG>/lib")
-  set(BREAKPAD_CRASH_CLIENT_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/breakpad/client/windows/crash_generation/$<CONFIG>/lib")
-  set(BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/breakpad/client/windows/handler/$<CONFIG>/lib")
+  set(BREAKPAD_COMMON_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/$<CONFIG>/lib")
+  set(BREAKPAD_CRASH_CLIENT_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/crash_generation/$<CONFIG>/lib")
+  set(BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR "${BREAKPAD_EXCEPTION_HANDLER_INSTALL_DIR}/lib/breakpad/client/windows/handler/$<CONFIG>/lib")
   set(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES
     "${BREAKPAD_COMMON_LIBRARY_DIR}/common.lib"
     "${BREAKPAD_EXCEPTION_HANDLER_LIBRARY_DIR}/exception_handler.lib"


build: fix the clang-cl executable link command

ClangClCompileRules.cmake overrides CMAKE_C_LINK_EXECUTABLE to invoke the C
compiler, but clang-cl does not accept linker flags, so tests will fail to link.
The default is fine, so delete this line.

Signed-off-by: Kim Topley <b240e9af83531ac049af314c640f722869aeb57d@apple.com>

--- cmake/modules/ClangClCompileRules.cmake
+++ cmake/modules/ClangClCompileRules.cmake
@@ -3,6 +3,3 @@
 # put a -- before the input file path to force it to be treated as a path.
 string(REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
 string(REPLACE "-c <SOURCE>" "-c -- <SOURCE>" CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT}")
-
-set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-


PARQUET-954: Use Brotli 0.6 release

PARQUET-954: Use Brotli 0.6 release

Author: Uwe L. Korn <uwe@apache.org>

Closes #302 from xhochy/PARQUET-954 and squashes the following commits:

b68a10a [Uwe L. Korn] Use Brotli 0.6 release

--- cmake_modules/ThirdpartyToolchain.cmake
+++ cmake_modules/ThirdpartyToolchain.cmake
@@ -20,8 +20,7 @@
 set(SNAPPY_VERSION "1.1.3")
 set(THRIFT_VERSION "0.10.0")

-# Brotli 0.5.2 does not install headers/libraries yet, but 0.6.0.dev does
-set(BROTLI_VERSION "5db62dcc9d386579609540cdf8869e95ad334bbd")
+set(BROTLI_VERSION "v0.6.0")

 # find boost headers and libs
 set(Boost_DEBUG TRUE)


spec files rather like 0/1 than fales/true

--- cmake/ArangoDBInstall.cmake
+++ cmake/ArangoDBInstall.cmake
@@ -85,14 +85,14 @@
 ################################################################################
 ### @brief detect if we're on a systemd enabled system; if install unit file.
 ################################################################################
-set(IS_SYSTEMD_INSTALL false)
+set(IS_SYSTEMD_INSTALL 0)
 set(SYSTEMD_UNIT_DIR "")
 if (UNIX)
   find_package(PkgConfig QUIET)
   pkg_check_modules(SYSTEMD systemd)
   if (SYSTEMD_FOUND)
     pkg_get_variable(SYSTEMD_UNIT_DIR systemd systemdsystemunitdir)
-    set(IS_SYSTEMD_INSTALL true)
+    set(IS_SYSTEMD_INSTALL 1)
     configure_file (
         ${ARANGODB_SOURCE_DIR}/Installation/systemd/arangodb3.service.in
         ${PROJECT_BINARY_DIR}${SYSTEMD_UNIT_DIR}/arangodb3.service


Extra checks not needed.

Extra checks not needed.

Run step of try_run(...) can be skipped by setting CMAKE_CROSSCOMPILING
and specifying a value for RUN_${FEATURE}. See cmake try_run(...) docs.

--- cmake/CXXFeatureCheck.cmake
+++ cmake/CXXFeatureCheck.cmake
@@ -36,8 +36,6 @@
   else()
     if(NOT COMPILE_${FEATURE})
       message("-- Performing Test ${FEATURE} -- failed to compile")
-    elseif(COMPILE_${FEATURE} AND (${CMAKE_CROSSCOMPILING} AND NOT RUN_${FEATURE}))
-      message("-- Performing Test ${FEATURE} -- compiled but failed to run, likely because CMAKE_CROSSCOMPILING is set")
     else()
       message("-- Performing Test ${FEATURE} -- compiled but failed to run")
     endif()


Detect if the linker is gold and if so always use --gc-sections.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -142,6 +142,14 @@
   set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)
 endfunction(add_llvm_symbol_exports)

+if(NOT WIN32 AND NOT APPLE)
+  execute_process(COMMAND ${CMAKE_C_COMPILER} -Wl,--version
+                  OUTPUT_VARIABLE stdout)
+  if("${stdout}" MATCHES "GNU gold")
+    set(LLVM_LINKER_IS_GOLD ON)
+  endif()
+endif()
+
 function(add_link_opts target_name)
   # Pass -O3 to the linker. This enabled different optimizations on different
   # linkers.
@@ -150,12 +158,18 @@
                  LINK_FLAGS " -Wl,-O3")
   endif()

+  if(LLVM_LINKER_IS_GOLD)
+    # With gold gc-sections is always safe.
+    set_property(TARGET ${target_name} APPEND_STRING PROPERTY
+                 LINK_FLAGS " -Wl,--gc-sections")
+  endif()
+
   if(NOT LLVM_NO_DEAD_STRIP)
     if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
       # ld64's implementation of -dead_strip breaks tools that use plugins.
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
                    LINK_FLAGS " -Wl,-dead_strip")
-    elseif(NOT WIN32)
+    elseif(NOT WIN32 AND NOT LLVM_LINKER_IS_GOLD)
       # Object files are compiled with -ffunction-data-sections.
       # Versions of bfd ld < 2.23.1 have a bug in --gc-sections that breaks
       # tools that use plugins. Always pass --gc-sections once we require


Bug#1046260 CentOS builds: "no debugging symbols found"

Bug#1046260 CentOS builds: "no debugging symbols found"
Do not strip the binary in rpmbuild.

See http://public.kitware.com/Bug/view.php?id=7435

--- cmake/tarantool_cpack.cmake
+++ cmake/tarantool_cpack.cmake
@@ -16,6 +16,7 @@
     set (CPACK_RPM_PACKAGE_SUMMARY "Tarantool/Box - an efficient in-memory data store")
     set (CPACK_RPM_PACKAGE_GROUP "Databases")
     set (CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/cmake/rpm_post_install.sh")
+    set (CPACK_RPM_SPEC_INSTALL_POST /bin/true)
     set (CPACK_SET_DESTDIR "ON")
     set (CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
 else()


Restore cmake incantation to fix NaCl build

--- cmake/toolchain-pnacl.cmake
+++ cmake/toolchain-pnacl.cmake
@@ -37,7 +37,7 @@

 set(CMAKE_C_COMPILER      "${PLATFORM_PREFIX}/${PLATFORM_TRIPLET}-clang${PNACL_BIN_EXT}")
 set(CMAKE_CXX_COMPILER    "${PLATFORM_PREFIX}/${PLATFORM_TRIPLET}-clang++${PNACL_BIN_EXT}")
-set(CMAKE_AR              "${PLATFORM_PREFIX}/${PLATFORM_TRIPLET}-ar${PNACL_BIN_EXT}")
+set(CMAKE_AR              "${PLATFORM_PREFIX}/${PLATFORM_TRIPLET}-ar${PNACL_BIN_EXT}" CACHE FILEPATH "Archiver" FORCE)
 set(CMAKE_RANLIB          "${PLATFORM_PREFIX}/${PLATFORM_TRIPLET}-ranlib${PNACL_BIN_EXT}")
 set(CMAKE_FIND_ROOT_PATH  "${PLATFORM_PREFIX}/../le32-nacl")


spiffs: restore dependency of flash targets on spiffs images

Closes https://github.com/espressif/esp-idf/issues/5066

--- components/spiffs/project_include.cmake
+++ components/spiffs/project_include.cmake
@@ -47,14 +47,16 @@
             ADDITIONAL_MAKE_CLEAN_FILES
             ${image_file})

-
         idf_component_get_property(main_args esptool_py FLASH_ARGS)
         idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS)
         esptool_py_flash_target(${partition}-flash "${main_args}" "${sub_args}")
         esptool_py_flash_target_image(${partition}-flash "${partition}" "${offset}" "${image_file}")

+        add_dependencies(${partition}-flash spiffs_${partition}_bin)
+
         if(arg_FLASH_IN_PROJECT)
             esptool_py_flash_target_image(flash "${partition}" "${offset}" "${image_file}")
+            add_dependencies(flash spiffs_${partition}_bin)
         endif()
     else()
         set(message "Failed to create SPIFFS image for partition '${partition}'. "


git-svn-id: http://svn.pointclouds.org/pcl/trunk@5771 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- surface/src/on_nurbs/on_nurbs.cmake
+++ surface/src/on_nurbs/on_nurbs.cmake
@@ -31,7 +31,7 @@
 	src/on_nurbs/sequential_fitter.cpp
 	src/on_nurbs/sparse_mat.cpp)

-if(false)
+if(true)
   set(ON_NURBS_SOURCES ${ON_NURBS_SOURCES} src/on_nurbs/nurbs_solve_eigen.cpp)
 else()
 	set(ON_NURBS_SOURCES ${ON_NURBS_SOURCES} src/on_nurbs/nurbs_solve_umfpack.cpp)


git-svn-id: https://svn.pointclouds.org/pcl/trunk@5771 a9d63959-f2ad-4865-b262-bf0e56cfafb6


Added name to cpack

Added name to cpack

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -56,7 +56,7 @@
 SET (CPACK_RESOURCE_FILE_LICENSE "${CUR_SOURCE_DIR}/../LICENSE")
 SET (CPACK_PACKAGE_DESCRIPTION "OpenALPR - Open Source Automatic License Plate Recognition")
 SET (CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenALPR is an open source Automated License Plate Recognition library written in C++.  The library analyzes images and identifies license plates. The output is the text representation of any license plate characters found in the image.  Check out a live online demo here: http://www.openalpr.com/demo.html" )
-SET (CPACK_PACKAGE_CONTACT "matt@ndu.com")
+SET (CPACK_PACKAGE_CONTACT "Matt Hill <matt@ndu.com>")
 SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_ARCHITECTURE}")

 SET (CPACK_COMPONENTS_ALL Libraries ApplicationData)


rpi: fix link error

rpi: fix link error

--- build/cmake/arch-arm-rpi.cmake
+++ build/cmake/arch-arm-rpi.cmake
@@ -17,6 +17,8 @@
   cflags(
     -target arm-none-eabi
   )
+elseif(GCC)
+  target_link_libraries(kernel gcc)
 endif()

 add_definitions(


[changed] version number

[changed] version number

--- Version.cmake
+++ Version.cmake
@@ -2,5 +2,5 @@
   SET(REPOSITORY_NAME Testing123)
 ENDIF()
 SET(${REPOSITORY_NAME}_MAJOR_VERSION "0" )
-SET(${REPOSITORY_NAME}_VERSION "${${REPOSITORY_NAME}_MAJOR_VERSION}.7")
+SET(${REPOSITORY_NAME}_VERSION "${${REPOSITORY_NAME}_MAJOR_VERSION}.7.1")


ENH: Bump version of TubeTK

ENH: Bump version of TubeTK

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "093685798d607d"
+    GIT_TAG "12491ea3fb822aa8fccd5805a287272b7b5f9483"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Using commits as version for Boost.Compute external build

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -1,6 +1,6 @@
-set(VER 0.4)
-set(URL https://github.com/kylelutz/compute/archive/v${VER}.tar.gz)
-set(MD5 0d881bd8e8c1729559bc9b98d6b25a3c)
+set(VER 415e7a0a21b7fc2cb5a6aaa7ea14a4f32e884631)
+set(URL https://github.com/kylelutz/compute/archive/${VER}.tar.gz)
+set(MD5 733daf88c39c7337c51cd5adb0efb51b)

 set(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 set(srcDir "${thirdPartyDir}/compute-${VER}")


Update boost.compute repository and commit

--- CMakeModules/build_boost_compute.cmake
+++ CMakeModules/build_boost_compute.cmake
@@ -1,6 +1,6 @@
-SET(VER 415e7a0a21b7fc2cb5a6aaa7ea14a4f32e884631)
-SET(URL https://github.com/kylelutz/compute/archive/${VER}.tar.gz)
-SET(MD5 733daf88c39c7337c51cd5adb0efb51b)
+SET(VER 79aa8f9086fdf6ef6db78e889de0273b0eb7bd19)
+SET(URL https://github.com/boostorg/compute/archive/${VER}.tar.gz)
+SET(MD5 dba3318cbdac912dddce71f2a38ffa43)

 SET(thirdPartyDir "${CMAKE_BINARY_DIR}/third_party")
 SET(srcDir "${thirdPartyDir}/compute-${VER}")


- Add flag to indicate Android API version

--- cmake/Modules/BuildFlags.cmake
+++ cmake/Modules/BuildFlags.cmake
@@ -62,6 +62,8 @@
         message("-- Building Android project with native_app_glue bindings")
         add_definitions("-DANDROID_DONT_USE_SDL2")
     endif()
+
+    add_definitions ( "-DANDROID_API_LEVEL=${ANDROID_NATIVE_API_LEVEL}" )
 endif()

 if(NOT COFFEE_BUILD_GLES)


remove comment messages

remove comment messages

--- cmake/coverallsGcovJsons.cmake
+++ cmake/coverallsGcovJsons.cmake
@@ -117,8 +117,6 @@
 # (The directories the .gcda files and .o files are found in)
 # and run gcov on those.
 foreach(GCDA ${GCDA_FILES})
-	# message("Process: ${GCDA}")
-	# message("------------------------------------------------------------------------------")
 	get_filename_component(GCDA_DIR ${GCDA} PATH)

 	#
@@ -384,7 +382,6 @@
 	set(GCOV_FILE_COVERAGE "${GCOV_FILE_COVERAGE}]")

 	# Generate the final JSON for this file.
-	# message("Generate JSON for non-gcov file: ${NOT_COVERED_SRC}...")
 	string(CONFIGURE ${SRC_FILE_TEMPLATE} FILE_JSON)
 	set(JSON_GCOV_FILES "${JSON_GCOV_FILES}${FILE_JSON}, ")
 endforeach()


CMakeLists.txt:: Fix cmake warning on mac builds

Signed-off-by: Andrew Andrianov <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@ncrmnt.org>

--- cmake/modules/FindHidApi.cmake
+++ cmake/modules/FindHidApi.cmake
@@ -20,7 +20,8 @@
   set(HIDAPI_SOURCES "${HIDAPI_DIR}/mac/hid.c")
   set(HIDAPI_LIBRARIES "-framework IOKit -framework CoreFoundation")
   set(HIDAPI_STATIC_LIBRARIES ${HIDAPI_LIBRARIES})
-else()
+  set(CMAKE_MACOSX_RPATH 1)
+  else()
   FIND_PACKAGE(PkgConfig)
   PKG_CHECK_MODULES(HIDAPI hidapi-libusb REQUIRED)
   #hidapi-libusb pkg-config file misses the libusb dependency