fix bug in cmake/FindJpegPkg.cmake

fix bug in cmake/FindJpegPkg.cmake

--- cmake/FindJpegPkg.cmake
+++ cmake/FindJpegPkg.cmake
@@ -20,13 +20,13 @@
     set(IMPORTED_JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIR})
     set(IMPORTED_JPEG_LIBRARIES ${JPEG_LIBRARIES})
   else()
-    find_package(PkgConfig)
+    find_package(PkgConfig REQUIRED)
     pkg_check_modules(JPEG libjpeg)
     if(JPEG_FOUND)
       message(STATUS "JPEG found by pkgconfig")

       if (DEFINED JPEG_INCLUDE_DIRS)
-        set(IMPORTED_JPEG_INCLUDE_DIRS ${LibUSB_INCLUDE_DIRS})
+        set(IMPORTED_JPEG_INCLUDE_DIRS ${JPEG_INCLUDE_DIRS})
       endif()

       if(JPEG_LIBRARIES)
@@ -35,7 +35,7 @@
           PATHS ${JPEG_LIBDIR} ${JPEG_LIBRARY_DIRS}
         )
         if(JPEG_LIBRARY)
-          set(IMPORTED_JPEG_LIBRARIES ${LibUSB_LIBRARY})
+          set(IMPORTED_JPEG_LIBRARIES ${JPEG_LIBRARY})
         else()
           message(WARNING "Could not found libjpeg library file")
         endif()


Extract octomap version from package file

--- cmake/Findoctomap.cmake
+++ cmake/Findoctomap.cmake
@@ -18,6 +18,18 @@
 	)
 	select_library_configurations(OCTOMAP_${COMPONENT})
 endforeach()
+
+find_file(
+	OCTOMAP_PACKAGE_FILE
+	NAMES octomap/package.xml octomap/stack.xml
+	PATH_SUFFIXES share
+)
+
+if(OCTOMAP_PACKAGE_FILE)
+	file(STRINGS "${OCTOMAP_PACKAGE_FILE}" _OCTOMAP_VERSION_TAG REGEX ".*<version>[^<]*</version>.*")
+	string(REGEX REPLACE ".*<version>([^<]*)</version>.*" "\\1" OCTOMAP_VERSION "${_OCTOMAP_VERSION_TAG}")
+	unset(_OCTOMAP_VERSION_TAG)
+endif()

 set(OCTOMAP_INCLUDE_DIRS ${OCTOMAP_INCLUDE_DIR})
 set(OCTOMAP_LIBRARIES ${OCTOMAP_OCTOMATH_LIBRARY} ${OCTOMAP_OCTOMAP_LIBRARY})
@@ -56,3 +68,4 @@
 endforeach()

 mark_as_advanced(OCTOMAP_INCLUDE_DIR)
+mark_as_advanced(OCTOMAP_PACKAGE_FILE)


Set proper C++17 standard in cmake

Set proper C++17 standard in cmake

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -1,8 +1,5 @@
-set(CMAKE_CXX_FLAGS "-Wall -std=c++17")
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-set(CMAKE_CXX_FLAGS_MINSIZEREL "-O3 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)

 # Some release optimization flags for GCC/Clang.
 if (NOT WIN32)


cudnn widndows

cudnn widndows

--- cmake/cudnn.cmake
+++ cmake/cudnn.cmake
@@ -25,13 +25,30 @@
     $ENV{CUDNN_ROOT}
     $ENV{CUDNN_ROOT}/lib64
     $ENV{CUDNN_ROOT}/lib
-    /usr/lib)
-find_library(CUDNN_LIBRARY NAMES libcudnn.so libcudnn.dylib # libcudnn_static.a
+    /usr/lib
+	${CUDA_TOOLKIT_ROOT_DIR}
+	${CUDA_TOOLKIT_ROOT_DIR}/lib/x64
+	)
+set(CUDNN_LIB_NAME "")
+if (LINUX)
+set(CUDNN_LIB_NAME "libcudnn.so")
+endif(LINUX)
+
+if(WIN32)
+# only support cudnn7
+set(CUDNN_LIB_NAME "cudnn.lib" "cudnn64_7.dll")
+endif(WIN32)
+
+if(Apple)
+set(CUDNN_LIB_NAME "libcudnn.dylib" "libcudnn.so")
+endif(Apple)
+find_library(CUDNN_LIBRARY NAMES ${CUDNN_LIB_NAME} # libcudnn_static.a
     PATHS ${CUDNN_CHECK_LIBRARY_DIRS} ${CUDNN_INCLUDE_DIR} ${__libpath_hist}
           NO_DEFAULT_PATH
     DOC "Path to cuDNN library.")

-
+message("Include Dir" ${CUDNN_INCLUDE_DIR})
+message("Library Dir" ${CUDNN_LIBRARY})
 if(CUDNN_INCLUDE_DIR AND CUDNN_LIBRARY)
     set(CUDNN_FOUND ON)
 else()


Remove accidental prefix before plain old bash command.  Will need a different solution on Windows.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -35,7 +35,7 @@
     # handle lingers in the test results directory), because CMake doesn't
     # seem to be able to do it.
     add_custom_target(clean-test-results
-                      COMMAND ${env_sh_path} ${PYTHON_EXECUTABLE} if ! rm -rf ${rosbuild_test_results_dir}\; then echo "WARNING: failed to remove test-results directory"\; fi)
+                      COMMAND if ! rm -rf ${rosbuild_test_results_dir}\; then echo "WARNING: failed to remove test-results directory"\; fi)
     # Make the tests target depend on clean-test-results, which will ensure
     # that test results are deleted before we try to build tests, and thus
     # before we try to run tests.


Add install directive for .passwd

Add install directive for .passwd

--- cmake/users.cmake
+++ cmake/users.cmake
@@ -31,3 +31,6 @@
 file (WRITE ${USER_PWD_FILE} "${USER_ANONYMOUS_NAME}:${USER_ANONYMOUS_UID}:${USER_ANONYMOUS_DESCR}:\n")
 file (APPEND ${USER_PWD_FILE} "${USER_ADMIN_NAME}:${USER_ADMIN_UID}:${USER_ADMIN_DESCR}:${USER_ADMIN_DIGEST}\n")
 file (APPEND ${USER_PWD_FILE} "${USER_NAME}:${USER_UID}:${USER_DESCR}:${USER_DIGEST}\n")
+
+# install directives
+install ( FILES ${USER_PWD_FILE} DESTINATION ./access )


Revert "disabled link warning under Windows" This reverts commit c4d91483c28507632631059e7f05c28239356181.

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -38,7 +38,7 @@

 SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /DEBUG")

-SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4217 /IGNORE:11082")  # locally defined symbol XXX imported in function YYY (happens as the ISPC API layer uses exported library functions)
+SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4217")  # locally defined symbol XXX imported in function YYY (happens as the ISPC API layer uses exported library functions)
 SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG")

 # optionally use static runtime library


On Windows always use MSVC options (icc is compatible to them)

--- components/ospcommon/cmake/macros.cmake
+++ components/ospcommon/cmake/macros.cmake
@@ -362,7 +362,11 @@

   IF (${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
     SET(OSPRAY_COMPILER_ICC ON)
-    INCLUDE(icc)
+    IF(WIN32) # icc on Windows behaves like msvc
+      INCLUDE(msvc)
+    ELSE()
+      INCLUDE(icc)
+    ENDIF()
   ELSEIF (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
     SET(OSPRAY_COMPILER_GCC ON)
     INCLUDE(gcc)


Fix typo (GCC->CLANG) in general Clang compiler defs.

Bug: 18329517
Change-Id: I440f37723987c1dd85e7482f0d32ac157565e25d
(cherry picked from commit 713ab1e9034564f842935cd011fdea8abc9ea90c)

--- framework/delibs/cmake/CFlags.cmake
+++ framework/delibs/cmake/CFlags.cmake
@@ -148,9 +148,9 @@
 	set(CLANG_COMMON_FLAGS "-Wall -Wextra -Wno-long-long -Wshadow -Wundef")

 	if (DE_CPU_IS_X86)
-		set(GCC_MACHINE_FLAGS "-m32")
+		set(CLANG_MACHINE_FLAGS "-m32")
 	elseif (DE_CPU_IS_X86_64)
-		set(GCC_MACHINE_FLAGS "-m64")
+		set(CLANG_MACHINE_FLAGS "-m64")
 	endif ()

 	# For 3rd party sw disable all warnings


Exclude single lines as well.

Exclude single lines as well.

--- cmake/CoverallsGenerateGcov.cmake
+++ cmake/CoverallsGenerateGcov.cmake
@@ -305,8 +305,16 @@
 			RES
 			"${GCOV_LINE}")

+		# Check if we should exclude lines using the Lcov syntax.
 		string(REGEX MATCH "LCOV_EXCL_START" START_SKIP "${GCOV_LINE}")
 		string(REGEX MATCH "LCOV_EXCL_END" END_SKIP "${GCOV_LINE}")
+		string(REGEX MATCH "LCOV_EXCL_LINE" LINE_SKIP "${GCOV_LINE}")
+
+		set(RESET_SKIP 0)
+		if (LINE_SKIP AND NOT DO_SKIP)
+			set(DO_SKIP 1)
+			set(RESET_SKIP 1)
+		endif()

 		if (START_SKIP)
 			set(DO_SKIP 1)
@@ -347,6 +355,9 @@
 			message(WARNING "Failed to properly parse line (RES_COUNT = ${RES_COUNT}) ${GCOV_FILE}:${GCOV_LINE_COUNT}\n-->${GCOV_LINE}")
 		endif()

+		if (RESET_SKIP)
+			set(DO_SKIP 0)
+		endif()
 		math(EXPR GCOV_LINE_COUNT "${GCOV_LINE_COUNT}+1")
 	endforeach()


Fixed ant search on Windows

Fixed ant search on Windows

--- cmake/OpenCVDetectApacheAnt.cmake
+++ cmake/OpenCVDetectApacheAnt.cmake
@@ -1,7 +1,7 @@
 file(TO_CMAKE_PATH "$ENV{ANT_DIR}" ANT_DIR_ENV_PATH)
 file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles_ENV_PATH)

-if(WIN32)
+if(CMAKE_HOST_WIN32)
   set(ANT_NAME ant.bat)
 else()
   set(ANT_NAME ant)


[cmake] Make paths of headers when building G__Core dictionary relative.

Core is split differently than the rest of ROOT. We generate the target of
G__Core from within core/base, thus CMAKE_CURRENT_SOURCE_DIR cannot make
headers from the rest of core subfolders relative.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -238,6 +238,12 @@
     endif()
   endforeach()
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  rheaderfiles "${headerfiles}")
+  # Replace the non-standard folder layout of Core.
+  if (ARG_STAGE1 AND ${ARG_MODULE} STREQUAL "Core")
+    set(core_folders "base|clib|cont|doc|lzma|macosx|meta|metautils|multiproc|newdelete|pcre|rint|textinput|thread|unix|utils|winnt|zip")
+    string(REGEX REPLACE "${CMAKE_SOURCE_DIR}/core/(${core_folders})/inc/" ""  rheaderfiles "${rheaderfiles}")
+  endif()
+
   #---Get the list of include directories------------------
   get_directory_property(incdirs INCLUDE_DIRECTORIES)
   if(CMAKE_PROJECT_NAME STREQUAL ROOT)


root_linker_library: adding a dummy source file is no longer necessary

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -644,11 +644,6 @@
     target_link_libraries(${library} PUBLIC ${ARG_LIBRARIES} ${ARG_DEPENDENCIES})
     set_target_properties(${library} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
   else()
-    #---Need to add a dummy source file if all sources are OBJECT libraries (Xcode, ...)
-    if(NOT lib_srcs MATCHES "(^|[;])[^$][^<]")
-      add_custom_command(OUTPUT dummy.cxx COMMAND ${CMAKE_COMMAND} -E touch dummy.cxx)
-      set(lib_srcs ${lib_srcs} dummy.cxx)
-    endif()
     add_library( ${library} ${_all} ${ARG_TYPE} ${lib_srcs})
     if(ARG_TYPE STREQUAL SHARED)
       set_target_properties(${library} PROPERTIES  ${ROOT_LIBRARY_PROPERTIES} )


Update onnxruntime_providers.cmake to remove the reference of "onnxruntime_tvm_dependencies" (#11780)

--- cmake/onnxruntime_providers.cmake
+++ cmake/onnxruntime_providers.cmake
@@ -441,7 +441,7 @@
     endif()
   endif()

-  add_dependencies(onnxruntime_providers_cuda onnxruntime_providers_shared ${onnxruntime_EXTERNAL_DEPENDENCIES} ${onnxruntime_tvm_dependencies})
+  add_dependencies(onnxruntime_providers_cuda onnxruntime_providers_shared ${onnxruntime_EXTERNAL_DEPENDENCIES})
   target_link_libraries(onnxruntime_providers_cuda PRIVATE cublas cudnn curand cufft ${ABSEIL_LIBS} ${ONNXRUNTIME_PROVIDERS_SHARED})
   target_include_directories(onnxruntime_providers_cuda PRIVATE ${ONNXRUNTIME_ROOT} ${CMAKE_CURRENT_BINARY_DIR} ${onnxruntime_CUDNN_HOME}/include ${eigen_INCLUDE_DIRS} ${TVM_INCLUDES} PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
   # ${CMAKE_CURRENT_BINARY_DIR} is so that #include "onnxruntime_config.h" inside tensor_shape.h is found


testing.cmake : don't test chefStream if APPLE

--- test/testing.cmake
+++ test/testing.cmake
@@ -335,8 +335,10 @@
     set(RUNDIR run)
   endif()
   set(MDIR ${MESHES}/phasta/1-1-Chef-Tet-Part/${RUNDIR})
-  mpi_test(chefStream 1 ${CMAKE_CURRENT_BINARY_DIR}/chefStream
-    WORKING_DIRECTORY ${MDIR})
+  if(NOT APPLE)
+    mpi_test(chefStream 1 ${CMAKE_CURRENT_BINARY_DIR}/chefStream
+      WORKING_DIRECTORY ${MDIR})
+  endif()
   mpi_test(chef0 1 ${CMAKE_CURRENT_BINARY_DIR}/chef
     WORKING_DIRECTORY ${MDIR})
   set(MDIR ${MESHES}/phasta/1-1-Chef-Tet-Part)


ENH: Hard links are not supported on windows without admin privileges.  Just copy the file into its human readable name for now.

SVN-Revision: 3152

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -116,7 +116,8 @@
 file(REMOVE \"${MIDAS_DATA_DIR}/${base_file}\")

 if(WIN32)
-  execute_process(COMMAND fsutil hardlink create \"${MIDAS_DATA_DIR}/${base_file}\" \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\")
+  # windows does not support symlinks, so we must duplicate the file
+  configure_file(\"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\" \"${MIDAS_DATA_DIR}/${base_file}\" COPYONLY)
 else(WIN32)
   execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink \"${MIDAS_DATA_DIR}/MIDAS_Hashes/${checksum}\" \"${MIDAS_DATA_DIR}/${base_file}\")
 endif(WIN32)
@@ -136,6 +137,7 @@
   endforeach(downloadScript)

   add_test(${testName}_fetchData "${CMAKE_COMMAND}" -P "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake")
+  set_tests_properties(${testName}_fetchData PROPERTIES FAIL_REGULAR_EXPRESSION "Error downloading")
   # Finally, create the test
   add_test(${testName} ${testArgs})
   set_tests_properties(${testName} PROPERTIES DEPENDS ${testName}_fetchData)


Exclude Polhemus from Build_Configuration ALL

--- CMake/BuildConfigurations/All.cmake
+++ CMake/BuildConfigurations/All.cmake
@@ -31,6 +31,7 @@
   SOFA_PLUGINS_DIR
   SUPERBUILD
   BiophotonicsHardware_SpectroCam
+  POLHEMUS_TRACKER

   KWSTYLE
   MICROBIRD_TRACKER


[CMake] Generating XCode project for static targets

https://ogre3d.atlassian.net/browse/OGRE-559

CMake >3.8.x overwrites target output type, when target type set as 'FRAMEWORK' via set_terget_property

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -232,7 +232,8 @@
 endfunction(ogre_config_component)

 function(ogre_config_framework LIBNAME)
-  if (APPLE AND NOT APPLE_IOS)
+  get_target_property(targetType ${LIBNAME} TYPE)
+  if (APPLE AND NOT APPLE_IOS AND NOT (${targetType} STREQUAL "STATIC_LIBRARY"))
       set_target_properties(${LIBNAME} PROPERTIES FRAMEWORK TRUE)

       # Set the INSTALL_PATH so that frameworks can be installed in the application package


add "RDKit" to the beginning of all library names (#1349)

--- Code/cmake/Modules/RDKitUtils.cmake
+++ Code/cmake/Modules/RDKitUtils.cmake
@@ -56,27 +56,30 @@
         INSTALL(TARGETS ${RDKLIB_NAME}_static EXPORT ${RDKit_EXPORTED_TARGETS}
                 DESTINATION ${RDKit_LibDir}/${RDKLIB_DEST}
                 COMPONENT dev )
+        set_target_properties(${RDKLIB_NAME}_static PROPERTIES
+                              OUTPUT_NAME "RDKit${RDKLIB_NAME}_static")
+
       endif(RDK_INSTALL_STATIC_LIBS)
     IF(RDKLIB_LINK_LIBRARIES)
       target_link_libraries(${RDKLIB_NAME} ${RDKLIB_LINK_LIBRARIES})
     ENDIF(RDKLIB_LINK_LIBRARIES)
   endif(MSVC)
   if(WIN32)
-    set_target_properties(${RDKLIB_NAME} PROPERTIES
-                          OUTPUT_NAME "${RDKLIB_NAME}"
+    set_target_properties(${RDKLIB_NAME} PROPERTIES
+                          OUTPUT_NAME "RDKit${RDKLIB_NAME}"
                           VERSION "${RDKit_ABI}.${RDKit_Year}.${RDKit_Month}")
   else(WIN32)
-    set_target_properties(${RDKLIB_NAME} PROPERTIES
-                          OUTPUT_NAME ${RDKLIB_NAME}
-                          VERSION ${RDKit_VERSION}
+    set_target_properties(${RDKLIB_NAME} PROPERTIES
+                          OUTPUT_NAME "RDKit${RDKLIB_NAME}"
+                          VERSION ${RDKit_VERSION}
                           SOVERSION ${RDKit_ABI} )
-  endif(WIN32)
-  set_target_properties(${RDKLIB_NAME} PROPERTIES
+  endif(WIN32)
+  set_target_properties(${RDKLIB_NAME} PROPERTIES
                         ARCHIVE_OUTPUT_DIRECTORY ${RDK_ARCHIVE_OUTPUT_DIRECTORY}
                         RUNTIME_OUTPUT_DIRECTORY ${RDK_RUNTIME_OUTPUT_DIRECTORY}
                         LIBRARY_OUTPUT_DIRECTORY ${RDK_LIBRARY_OUTPUT_DIRECTORY})
 endmacro(rdkit_library)
-
+
 macro(rdkit_headers)
   if (NOT RDK_INSTALL_INTREE)
     PARSE_ARGUMENTS(RDKHDR
@@ -105,14 +108,14 @@
                           LIBRARY_OUTPUT_DIRECTORY
                           ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
 else(WIN32)
-    set_target_properties(${RDKPY_NAME} PROPERTIES
+    set_target_properties(${RDKPY_NAME} PROPERTIES
                           LIBRARY_OUTPUT_DIRECTORY
                           ${RDK_PYTHON_OUTPUT_DIRECTORY}/${RDKPY_DEST})
-endif(WIN32)
-    target_link_libraries(${RDKPY_NAME} ${RDKPY_LINK_LIBRARIES}
+endif(WIN32)
+    target_link_libraries(${RDKPY_NAME} ${RDKPY_LINK_LIBRARIES}
                           ${PYTHON_LIBRARIES} ${Boost_LIBRARIES} )

-    INSTALL(TARGETS ${RDKPY_NAME}
+    INSTALL(TARGETS ${RDKPY_NAME}
             LIBRARY DESTINATION ${RDKit_PythonDir}/${RDKPY_DEST})
   endif(RDK_BUILD_PYTHON_WRAPPERS)
 endmacro(rdkit_python_extension)


Use same version of robotlocomotion/lcmtypes as drake

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -206,8 +206,8 @@
     )

   ExternalProject_Add(robotlocomotion-lcmtypes
-    GIT_REPOSITORY https://github.com/robotlocomotion/lcmtypes
-    GIT_TAG 4bd59a1
+    GIT_REPOSITORY https://github.com/robotlocomotion/lcmtypes.git
+    GIT_TAG 821ff4b
     ${cmake3_args}
     CMAKE_CACHE_ARGS
       ${default_cmake_args}


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -155,8 +155,13 @@

 			# 5. compilo y genera el paquete en local
 			message("Generating artifact ${PACKAGE} ...")
+			#
+			# ojo: estoy hay que mejorarlo
+			# no queremos usar "-o", queremos que trate de compilar las dependencias (sin -o)
+			# pero queremos que evite compilar cosas que estan en cache remota
+			#
 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY} -o
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY}
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)


Add pthreads to iomp5 parallelized mkl

Add pthreads to iomp5 parallelized mkl

Former-commit-id: 7f752ba9e6c5f91e6b6d16e020c452df121ba887

--- cmake-modules/SetupMKL.cmake
+++ cmake-modules/SetupMKL.cmake
@@ -76,7 +76,8 @@
             target_link_libraries(mkl::mkl INTERFACE  gfortran::gfortran openmp::openmp)
         elseif(MKL_THREADING_LAYER MATCHES intel)
             find_package(Fortran REQUIRED)
-            target_link_libraries(mkl::mkl INTERFACE mkl::mkl_gf_lp_ithread gfortran::gfortran mkl::iomp5)
+            find_package(Threads REQUIRED)
+            target_link_libraries(mkl::mkl INTERFACE mkl::mkl_gf_lp_ithread gfortran::gfortran mkl::iomp5 Threads::Threads m dl)
             get_target_property(MKL_INCLUDE_DIR mkl::mkl_gf_lp_ithread INTERFACE_INCLUDE_DIRECTORIES)
             target_include_directories(mkl::mkl SYSTEM INTERFACE ${MKL_INCLUDE_DIR})
         elseif(MKL_THREADING_LAYER MATCHES tbb)


fix logic error

fix logic error

--- cmake/FindMetaExamples.cmake
+++ cmake/FindMetaExamples.cmake
@@ -6,7 +6,7 @@
 		LIST(REMOVE_ITEM META_EXAMPLE_LISTINGS ${CMAKE_SOURCE_DIR}/examples/meta/src/gaussian_processes/gaussian_process_regression.sg)
 	ENDIF()

-	IF(NOT USE_GPL_SHOGUN)
+	IF(USE_GPL_SHOGUN)
 		LIST(REMOVE_ITEM META_EXAMPLE_LISTINGS ${CMAKE_SOURCE_DIR}/examples/meta/src/gaussian_processes/gaussian_process_regression.sg)
 	ENDIF()


adding options to enable and disable specific intrinsics

--- cmake/SIMDTestAndSetup.cmake
+++ cmake/SIMDTestAndSetup.cmake
@@ -4,40 +4,53 @@

 include(CheckCXXSourceRuns)

-check_cxx_source_runs("
-  #include <immintrin.h>
-  int main() {
-    __m512 n = _mm512_set1_epi8(42);
-    (void)_mm512_cmpeq_epi8_mask(n, n);
-    return 0;
-  }
-" HAVE_AVX512BW)
+option(USE_AVX512BW "Enable AVX512BW intrinsics (if available)" ON)
+option(USE_AVX2 "Enable AVX2 intrinsics (if available)" ON)
+option(USE_SSE2 "Enable SSE2 intrinsics (if available)" ON)
+option(USE_NEON "Enable NEON intrinsics (if available)" ON)

-check_cxx_source_runs("
-  #include <immintrin.h>
-  int main() {
-    __m256i n = _mm256_set1_epi8(42);
-    (void)_mm256_movemask_epi8(_mm256_and_si256(n, n));
-    return 0;
-  }
-" HAVE_AVX2)
+if (USE_AVX512BW)
+  check_cxx_source_runs("
+    #include <immintrin.h>
+    int main() {
+      __m512 n = _mm512_set1_epi8(42);
+      (void)_mm512_cmpeq_epi8_mask(n, n);
+      return 0;
+    }
+  " HAVE_AVX512BW)
+endif()

-check_cxx_source_runs("
-  #include <emmintrin.h>
-  int main() {
-    __m128i n = _mm_set1_epi8(42);
-    return 0;
-  }
-" HAVE_SSE2)
+if (USE_AVX2)
+  check_cxx_source_runs("
+    #include <immintrin.h>
+    int main() {
+      __m256i n = _mm256_set1_epi8(42);
+      (void)_mm256_movemask_epi8(_mm256_and_si256(n, n));
+      return 0;
+    }
+  " HAVE_AVX2)
+endif()

-check_cxx_source_runs("
-  #include <arm_neon.h>
-  int main() {
-    uint64x2_t n;
-    uint64_t m = vgetq_lane_u64(n, 0);
-    return 0;
-  }
-" HAVE_NEON)
+if (USE_SSE2)
+  check_cxx_source_runs("
+    #include <emmintrin.h>
+    int main() {
+      __m128i n = _mm_set1_epi8(42);
+      return 0;
+    }
+  " HAVE_SSE2)
+endif()
+
+if (USE_NEON)
+  check_cxx_source_runs("
+    #include <arm_neon.h>
+    int main() {
+      uint64x2_t n;
+      uint64_t m = vgetq_lane_u64(n, 0);
+      return 0;
+    }
+  " HAVE_NEON)
+endif()

 set(simd_definitions "")
 set(simd_flags "")


Update AddSwift.cmake

Update AddSwift.cmake

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1094,7 +1094,7 @@
   # conformance sections. This wouldn't be necessary if the link was done by
   # the swift binary: rdar://problem/19007002
   if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR
-    "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
+     "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
     list(APPEND link_flags
         "-Xlinker" "-T"
         "-Xlinker" "${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}/swift.ld")


Working on osx64 fix on conda

Working on osx64 fix on conda

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -136,3 +136,11 @@
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")

 message(STATUS "Building with flags: ${CMAKE_CXX_FLAGS}.")
+
+ # This is an OS X specific setting that is suggested to be enabled. See:
+ # https://blog.kitware.com/upcoming-in-cmake-2-8-12-osx-rpath-support/
+ # http://stackoverflow.com/questions/31561309/cmake-warnings-under-os-x-macosx-rpath-is-not-specified-for-the-following-targe
+ if(APPLE)
+     message(STATUS "OSX detected, setting the 'CMAKE_MACOSX_RPATH' option to TRUE.")
+     set(CMAKE_MACOSX_RPATH TRUE)
+ endif()


Fixed omission of variable overwriting flags

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -162,6 +162,7 @@
          # make the build log readable.
          if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
              set(CMAKE_CXX_FLAGS
+                     "${CMAKE_CXX_FLAGS}"
                      " -Wno-float-conversion"
                      " -Wno-unreachable-code-return"
                      " -Wno-unused-template"


Added compile flags to conda osx64 build due for mac>=10.9

https://mathematica.stackexchange.com/questions/34692/mathlink-linking-error-after-os-x-10-9-mavericks-upgrade

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -61,7 +61,7 @@
     set ( CMAKE_C_FLAGS_RELEASE        "-O3 -DNDEBUG" )
     set ( CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g" )

-    set ( CMAKE_CXX_FLAGS                "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11" )
+    set ( CMAKE_CXX_FLAGS                "-Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -std=c++11 -stdlib=libstdc++ -lstdc++" )
     set ( CMAKE_CXX_FLAGS_DEBUG          "-g" )
     set ( CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG" )
     set ( CMAKE_CXX_FLAGS_RELEASE        "-O3 -DNDEBUG" )


Add gfortran workaround for potential ABI violation

for #2154

--- cmake/fc.cmake
+++ cmake/fc.cmake
@@ -44,7 +44,10 @@

 if (${F_COMPILER} STREQUAL "GFORTRAN")
   set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_GFORT")
+  # ensure reentrancy of lapack codes
   set(FCOMMON_OPT "${FCOMMON_OPT} -Wall -frecursive")
+  # work around ABI violation in passing string arguments from C
+  set(FCOMMON_OPT "$(FCOMMON_OPT) -fno-optimize-sibling-calls")
   #Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
   if (NOT NO_LAPACK)
     set(EXTRALIB "{EXTRALIB} -lgfortran")


remove xpBuildNpmModule() and NPM_INSTALL option from ipPatch()

see issue https://github.com/smanders/externpro/issues/193#issue-328326063

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -180,10 +180,9 @@
 endfunction()

 function(ipPatch)
-  set(options NPM_INSTALL)
   set(oneValueArgs NAME PARENT SUBDIR PATCH PATCH_STRIP DLURL DLMD5 DLNAME)
-  set(multiValueArgs NPM_FLAGS SIBLINGS DLADD)
-  cmake_parse_arguments(P "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+  set(multiValueArgs SIBLINGS DLADD)
+  cmake_parse_arguments(P "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
   string(TOLOWER ${P_NAME} prj)
   if(DEFINED P_PARENT)
     set(tgt ${P_PARENT}_${prj})
@@ -198,16 +197,7 @@
   if(NOT DEFINED P_DLURL AND NOT DEFINED P_PATCH)
     return()
   endif()
-  if(P_NPM_INSTALL)
-    # npm installs into the download directory (DWNLD_DIR)
-    # use for libraries that can be pulled directly through npm without
-    # the need for a patch
-    if(NOT DEFINED NODE_EXE OR NOT DEFINED NODE_NPM)
-      message(FATAL_ERROR "${P_NAME} with NPM_INSTALL doesn't have NODE_EXE or NODE_NPM defined")
-    endif()
-    list(APPEND P_NPM_FLAGS --no-bin-links --only=prod --legacy-bundling)
-    set(patchCmd ${NODE_EXE} ${NODE_NPM} install ${P_NPM_FLAGS})
-  elseif(DEFINED P_PATCH)
+  if(DEFINED P_PATCH)
     if(COMMAND patch_patch)
       if(NOT TARGET patch)
         patch_patch()
@@ -254,14 +244,6 @@
     UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
     BINARY_DIR ${NULL_DIR} INSTALL_DIR ${NULL_DIR}
     )
-  if(UNIX AND P_NPM_INSTALL) # ensure permissions are proper on unix
-    ExternalProject_Get_Property(${tgt} SOURCE_DIR)
-    ExternalProject_Add_Step(${tgt} ${tgt}_permissions
-      COMMAND chmod -R u+rwX,go+rX,go-w ${SOURCE_DIR} # 755 for directories 644 for files
-      DEPENDEES download # change permissions after files are downloaded
-      DEPENDERS patch # change permissions before npm install
-      )
-  endif()
   set_property(TARGET ${tgt} PROPERTY FOLDER ${src_folder})
   # additional things to download (no extract/patch support, yet)
   if(DEFINED P_DLADD)
@@ -525,34 +507,6 @@
   endif()
 endfunction()

-# npm installs downloaded repo to the download directory
-# use for libraries that are manually downloaded from the git repo and possibly
-# patched that still require an npm install (usually needed if there are
-# node_module dependencies)
-function(xpBuildNpmModule)
-  set(oneValueArgs NAME)
-  set(multiValueArgs NPM_FLAGS)
-  cmake_parse_arguments(P "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
-  string(TOLOWER ${P_NAME} prj)
-  string(TOUPPER ${P_NAME} PRJ)
-  if(TARGET ${prj}_bld)
-    return()
-  endif()
-  if(XP_DEFAULT OR XP_PRO_${PRJ})
-    list(APPEND P_NPM_FLAGS --no-bin-links --only=prod --legacy-bundling)
-    ExternalProject_Get_Property(${prj} SOURCE_DIR)
-    ExternalProject_Add(${prj}_bld DEPENDS ${prj}
-      DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR}
-      SOURCE_DIR ${SOURCE_DIR}
-      PATCH_COMMAND ${NODE_EXE} ${NODE_NPM} install ${P_NPM_FLAGS}
-      UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND ""
-      BINARY_DIR ${NULL_DIR}
-      INSTALL_DIR ${NULL_DIR}
-      )
-    set_property(TARGET ${prj}_bld PROPERTY FOLDER ${bld_folder})
-  endif()
-endfunction()
-
 function(ipMarkdownLink var _ret)
   list(LENGTH var len)
   if(NOT ${len} EQUAL 3)


AWI for Jerry Bauck:
Moved @Ada_Is_2007_With_and_Use_Numerics@ string to its proper place in the
with-use section and fixed case problems in same.

svn path=/trunk/; revision=8020

--- bindings/ada/plplot_auxiliary.ads.cmake
+++ bindings/ada/plplot_auxiliary.ads.cmake
@@ -29,12 +29,12 @@
     Ada.Strings.Bounded,
     Ada.Strings.Unbounded;

-package PLplot_Auxiliary is
-
 -- COMMENT THIS LINE IF YOUR COMPILER DOES NOT INCLUDE THESE
 -- DEFINITIONS, FOR EXAMPLE, IF IT IS NOT ADA 2005 WITH ANNEX G.3 COMPLIANCE.
 --with Ada.Numerics.Long_Real_Arrays; use Ada.Numerics.Long_Real_Arrays;
-@Ada_Is_2007_with_and_use_Numerics@
+@Ada_Is_2007_With_and_Use_Numerics@
+
+package PLplot_Auxiliary is

 --------------------------------------------------------------------------------
 --           Utility type declarations used by the bindings                   --


Remove header.

Remove header.

	* build-aux/cmake/modules/CPackInfo.cmake: Here.

--- build-aux/cmake/modules/CPackInfo.cmake
+++ build-aux/cmake/modules/CPackInfo.cmake
@@ -1,15 +1,3 @@
-##
-## CPackInfo.cmake: This file is part of libport.
-## Copyright (C) Gostai S.A.S., 2006-2008.
-##
-## This software is provided "as is" without warranty of any kind,
-## either expressed or implied, including but not limited to the
-## implied warranties of fitness for a particular purpose.
-##
-## See the LICENSE file for more information.
-## For comments, bug reports and feedback: http://www.urbiforge.com
-##
-
 # This module setup the variables used by cpack. It uses many variables already
 # set for package information. Here the list:
 #


Use README by default as WELCOME file.

Use README by default as WELCOME file.

	* build-aux/cmake/modules/CPackInfo.cmake: Do that.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/CPackInfo.cmake
+++ build-aux/cmake/modules/CPackInfo.cmake
@@ -36,7 +36,7 @@
 set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
 set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYRIGHT")
 set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README")
-set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/WELCOME")
+set(CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_SOURCE_DIR}/README")
 set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
 set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
 set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})


Eigen only fails if required

Eigen only fails if required

--- modules/FindEigen.cmake
+++ modules/FindEigen.cmake
@@ -14,7 +14,7 @@
 # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
 # Copyright (c) 2009 Benoit Jacob <jacob.benoit.1@gmail.com>
 # Redistribution and use is allowed according to the terms of the 2-clause BSD license.
-# Modified by RSDT@UCL
+# Modified by RSDT@UCL

 if(NOT Eigen3_FIND_VERSION)
   if(NOT Eigen3_FIND_VERSION_MAJOR)
@@ -99,7 +99,7 @@
     endif(NOT EXTERNAL_ROOT)
     find_package(Hg)
     if(HG_FOUND)
-
+
       message(STATUS "Eigen3 not found. Will attempt to download it.")
       include(ExternalProject)
       ExternalProject_Add(
@@ -108,7 +108,7 @@
           HG_REPOSITORY https://bitbucket.org/eigen/eigen/
           HG_TAG 3.2.0
           TIMEOUT 10
-          CMAKE_ARGS
+          CMAKE_ARGS
             -DCMAKE_INSTALL_PREFIX=${EXTERNAL_ROOT}
             -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
             -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
@@ -121,11 +121,15 @@
           LOG_CONFIGURE ON
           LOG_BUILD ON)
       set(EIGEN3_INCLUDE_DIR ${EXTERNAL_ROOT}/include/eigen3)
-
+
     else(HG_FOUND)
-
-      message(FATAL_ERROR "Hg not found, and eigen not found.\nNeed one or the other.")
-
+
+      if(Eigen_REQUIRED)
+          message(FATAL_ERROR "Cannot find nor donwload eigen.")
+      else()
+          message(STATUS "Cannot find nor donwload eigen.")
+      endif()
+
     endif(HG_FOUND)
   endif(CMAKE_VERSION VERSION_LESS 2.8.10)
 endif(NOT EIGEN3_FOUND)


Revert use of 'add_compiler_options' to support CMake < 2.8.12

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -9,7 +9,9 @@

 if (UNIX)
   if (CMAKE_COMPILER_IS_GNUCC OR COMPILER_IS_CLANG)
-    add_compile_options(-g -Wall -Wextra -Wunused)
+    # add_compile_options(-g -Wall -Wextra -Wunused) # only since CMake 2.8.12, so...
+    add_definitions(-g -Wall -Wextra -Wunused)
+
     set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Weffc++")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")

@@ -28,7 +30,8 @@
         # with -fPIC
         check_c_compiler_flag("-fPIC" WITH_FPIC)
         if (WITH_FPIC)
-            add_compile_options(-fPIC)
+            # add_compile_options(-fPIC) # Only since CMake 2.8.12, so...
+            add_definitions(-fPIC)
         endif (WITH_FPIC)
     endif (NOT CYGWIN)


cmake: change CPU_BASELINE=DETECT for MacOSX

--- cmake/OpenCVCompilerOptimizations.cmake
+++ cmake/OpenCVCompilerOptimizations.cmake
@@ -258,7 +258,10 @@
   endif()

   if(NOT DEFINED CPU_BASELINE)
-    if(X86_64)
+    if(APPLE)
+      # MacOS X has limited set of possible supported H/W, so compiler is configured well
+      set(CPU_BASELINE "DETECT" CACHE STRING "${HELP_CPU_BASELINE}")
+    elseif(X86_64)
       set(CPU_BASELINE "SSE3" CACHE STRING "${HELP_CPU_BASELINE}")
     else()
       set(CPU_BASELINE "SSE2" CACHE STRING "${HELP_CPU_BASELINE}")


Fix library name

Fix library name

--- cmake/Qt5Widgets_HunterPlugin_5_6.cmake
+++ cmake/Qt5Widgets_HunterPlugin_5_6.cmake
@@ -37,8 +37,8 @@
   # Qt non-imported
   _qt_cmake_extra_helpers_add_interface_release_debug(
       Qt5::Widgets
-      "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}.a"
-      "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}_debug.a"
+      "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}.a"
+      "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}_debug.a"
   )

   _qt_cmake_extra_helpers_add_interface_release_debug(
@@ -97,8 +97,8 @@
   # Qt non-imported
   _qt_cmake_extra_helpers_add_interface_release_debug(
       Qt5::Widgets
-      "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}.a"
-      "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}_debug.a"
+      "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}.a"
+      "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}_debug.a"
   )

   _qt_cmake_extra_helpers_add_interface_release_debug(
@@ -160,7 +160,7 @@
   # defined `hb_ot_tags_from_script'
   # should be set before Qt5::Gui
   _qt_cmake_extra_helpers_add_interface(
-      Qt5::Widgets "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}.a"
+      Qt5::Widgets "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}.a"
   )

   # should be set before Qt5::Gui
@@ -170,7 +170,7 @@

   # libs should be set before libQt5PlatformSupport
   # defined: QPlatformMenuItem::activated()
-  # (depends on z, lib${_qt_harfbuff_name}, GL)
+  # (depends on z, lib${_qt_harfbuzz_name}, GL)
   _qt_cmake_extra_helpers_add_interface(Qt5::Widgets Qt5::Gui)

   # before libQt5PlatformSupport.a
@@ -207,8 +207,8 @@
   # defined: '_hb_buffer_create'
   _qt_cmake_extra_helpers_add_interface_release_debug(
       Qt5::Widgets
-      "${_qt_install_prefix}/lib/${_qt_harfbuff_name}.lib"
-      "${_qt_install_prefix}/lib/${_qt_harfbuff_name}d.lib"
+      "${_qt_install_prefix}/lib/${_qt_harfbuzz_name}.lib"
+      "${_qt_install_prefix}/lib/${_qt_harfbuzz_name}d.lib"
   )

   # defined: 'CreateTLSIndex'
@@ -316,8 +316,8 @@
   # defined: '_hb_buffer_create'
   _qt_cmake_extra_helpers_add_interface_release_debug(
       Qt5::Widgets
-      "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}.a"
-      "${_qt_install_prefix}/lib/lib${_qt_harfbuff_name}d.a"
+      "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}.a"
+      "${_qt_install_prefix}/lib/lib${_qt_harfbuzz_name}d.a"
   )

   # defined: 'QPalette::~QPalette'


Change Live555-Groupsock library name: Groupsock -> groupsock

--- cmake/TbagFindPackage/FindLive555.cmake
+++ cmake/TbagFindPackage/FindLive555.cmake
@@ -18,7 +18,7 @@
 include (TbagSimpleFindLibrary)
 tbag_simple_find_library (BasicUsageEnvironment BasicUsageEnvironment/BasicUsageEnvironment.hh BasicUsageEnvironment)
 tbag_simple_find_library (UsageEnvironment UsageEnvironment/UsageEnvironment.hh UsageEnvironment)
-tbag_simple_find_library (Groupsock groupsock/Groupsock.hh Groupsock)
+tbag_simple_find_library (Groupsock groupsock/Groupsock.hh groupsock)
 tbag_simple_find_library (LiveMedia liveMedia/liveMedia.hh liveMedia)

 if (BasicUsageEnvironment_FOUND OR UsageEnvironment_FOUND OR Groupsock_FOUND OR LiveMedia_FOUND)


All 'externals' are handled as modules.

All 'externals' are handled as modules.

The externals name may be changed to 'single version'. All modules that
require a single version to be statically linked against the project
must be placed in a separate repository. This is to differentiate
modules that don't play nice with others when versioning is taken into
account.

--- CPM.cmake
+++ CPM.cmake
@@ -824,20 +824,3 @@
   _cpm_propogate_source_added_map_up()
 endfunction()

-macro(CPM_AddExternal name)
-  # We use AddModule as the backbone in add external. We check to make sure
-  # that only one version of an external can exist.
-  _cpm_parse_arguments(CPM_AddExternal _CPM_ "${ARGN}")
-
-  CPM_AddModule(${name}
-    ${_CPM_SOURCE_DIR}
-    ${_CPM_GIT_TAG}
-    ${_CPM_GIT_REPOSITORY}
-    ${_CPM_USE_EXISTING_VER})
-
-endmacro()
-
-# I fully implemented the external project approach, see commit SHA:
-# 107d0952bd3a64c371d1d3224271bdcca915b2fa . I also tagged it as
-# "External_Project_Approach".
-#


PythonAutoDetectOSX: Fix query of SDK path converting SDK version into a two-component string

--- cmake/PythonAutoDetectOSX.cmake
+++ cmake/PythonAutoDetectOSX.cmake
@@ -13,6 +13,8 @@
               res
       ERROR_QUIET
       OUTPUT_STRIP_TRAILING_WHITESPACE)
+    # Transform into a two-component string (e.g "10.15.6" -> "10.15")
+    string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*$" "\\1" SDK_VERSION "${SDK_VERSION}")
     if(res)
       # Probably running on an older version of XCode, instead try to list all available
       # SDKs and extract the version of the first one.


fix Clang name in cmake file

fix Clang name in cmake file

Signed-off-by: Vassil Vassilev <0b291c0bdb4e22c8b7705ceedf8e168ff73f20e8@cern.ch>

--- cmake/modules/ClingConfig.cmake
+++ cmake/modules/ClingConfig.cmake
@@ -6,7 +6,7 @@

 # Don't just use any llvm / clang: cling needs its own:
 find_package(LLVM REQUIRED CONFIG NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_LIST_DIR}/../llvm")
-find_package(clang REQUIRED CONFIG NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_LIST_DIR}/../clang")
+find_package(Clang REQUIRED CONFIG NO_DEFAULT_PATH PATHS "${CMAKE_CURRENT_LIST_DIR}/../clang")

 # Provide all our library targets to users.
 include("${CMAKE_CURRENT_LIST_DIR}/ClingTargets.cmake")


Don't use pkg-config variables directly in FindGObject.cmake.

--- cmake/modules/FindGObject.cmake
+++ cmake/modules/FindGObject.cmake
@@ -55,11 +55,7 @@
    ${PKG_GOBJECT2_LIBDIR}
    )

-IF (WIN32)
 SET (GOBJECT_LIBRARIES ${_GObjectLibs} ${_GModuleLibs} ${_GThreadLibs} ${_GLibs})
-ELSE (WIN32)
-SET (GOBJECT_LIBRARIES ${PKG_GOBJECT2_LIBRARIES})
-ENDIF (WIN32)

 MARK_AS_ADVANCED(GOBJECT_INCLUDE_DIR GOBJECT_LIBRARIES)


using mblur time range tests

using mblur time range tests

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -16,7 +16,7 @@

 set(CTEST_PROJECT_NAME "Embree")
 set(CTEST_NIGHTLY_START_TIME "22:00:00 UTC")
-set(TEST_MODELS_HASH a1b183a3b76eb40c4c2e6a2d4dc5ca08090d8400)
+set(TEST_MODELS_HASH 00c14f0cb39ff3a3a87a93957e20998014220976)

 IF (NOT CTEST_DROP_SITE)
   set(CTEST_DROP_METHOD "http")


Corrected a CTestConfig file problem.

Corrected a CTestConfig file problem.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,7 +1,4 @@
 # CTest/CDash configuration
-
-SET(CTEST_PROJECT_SUBPROJECTS netcdf ncgen ncdump nccopy nc_test)
-SET(CTEST_USE_LAUNCHERS 1)

 IF(USE_REMOTE_CDASH)
 	set(CTEST_PROJECT_NAME "netcdf-c")


Using our OpenSSL from superbuild requires pkg-config (#1927)

When we build OpenSSL from source, we tell the Curl build to use OpenSSL's
pkg-config files to find OpenSSL. If pkg-config is not available, the
curl configure fails beacuse the test programs won't build. This is
buried inside of Curl's config.log and the problem is not directly
obvious. The Curl configure fails with a very unhelpful error, and
the underlying reason is the test programs try to link default
lib/include paths rather than our 'externals/install/lib'.
At best the top level build will fail with a confusing error,
at worst we might link a system SSL we don't want in superbuild
mode.

Co-authored-by: joe maley <16a9a54ddf4259952e3c118c763138e83693d7fd@tiledb.io>

--- cmake/Modules/FindCurl_EP.cmake
+++ cmake/Modules/FindCurl_EP.cmake
@@ -98,6 +98,10 @@
   else()
     set(DEPENDS)
     if (TARGET ep_openssl)
+      # This branch specifically intends that curl will find our OpenSSL
+      # via pkg-config. Ensure it exists to avoid confusing errors.
+      find_package(PkgConfig REQUIRED)
+
       list(APPEND DEPENDS ep_openssl)
       set(WITH_SSL "--with-ssl")
       set(SSL_PKG_CONFIG_PATH "${TILEDB_EP_INSTALL_PREFIX}/lib/pkgconfig:${TILEDB_EP_INSTALL_PREFIX}/lib64/pkgconfig")


build: build target libdispatch as necessary

This should not be predicated on the host libdispatch being built, only
if concurrency is being built in multithreaded mode.

--- cmake/modules/Libdispatch.cmake
+++ cmake/modules/Libdispatch.cmake
@@ -34,19 +34,23 @@
 endif()

 set(DISPATCH_SDKS)
+
+# Build the host libdispatch if needed.
 if(SWIFT_BUILD_HOST_DISPATCH)
   if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
     if(NOT "${SWIFT_HOST_VARIANT_SDK}" IN_LIST SWIFT_SDKS)
       list(APPEND DISPATCH_SDKS "${SWIFT_HOST_VARIANT_SDK}")
     endif()
   endif()
-
-  foreach(sdk ${SWIFT_SDKS})
-    if(NOT "${sdk}" IN_LIST SWIFT_APPLE_PLATFORMS)
-      list(APPEND DISPATCH_SDKS "${sdk}")
-    endif()
-  endforeach()
 endif()
+
+# Build any target libdispatch if needed.
+foreach(sdk ${SWIFT_SDKS})
+  # Apple targets have libdispatch available, do not build it.
+  if(NOT "${sdk}" IN_LIST SWIFT_APPLE_PLATFORMS)
+    list(APPEND DISPATCH_SDKS "${sdk}")
+  endif()
+endforeach()

 foreach(sdk ${DISPATCH_SDKS})
   set(ARCHS ${SWIFT_SDK_${sdk}_ARCHITECTURES})


[CMake] Limit copy-legacy-layouts dependency to the stdlib (#22593)

When we do standalone overlay builds, they should rely on these
layouts already being in the toolchain. (In particular, the target
is never created.)

No tests because this configuration isn't (currently) being tested
outside of Apple.

--- cmake/modules/SwiftSource.cmake
+++ cmake/modules/SwiftSource.cmake
@@ -440,9 +440,13 @@
   #
   # See stdlib/CMakeLists.txt and TypeConverter::TypeConverter() in
   # lib/IRGen/GenType.cpp.
-  set(SWIFTFILE_PLATFORM "${SWIFT_SDK_${SWIFTFILE_SDK}_LIB_SUBDIR}")
-  set(copy_legacy_layouts_dep
-      "copy-legacy-layouts-${SWIFTFILE_PLATFORM}-${SWIFTFILE_ARCHITECTURE}")
+  if(SWIFTFILE_IS_STDLIB_CORE)
+    set(SWIFTFILE_PLATFORM "${SWIFT_SDK_${SWIFTFILE_SDK}_LIB_SUBDIR}")
+    set(copy_legacy_layouts_dep
+        "copy-legacy-layouts-${SWIFTFILE_PLATFORM}-${SWIFTFILE_ARCHITECTURE}")
+  else()
+    set(copy_legacy_layouts_dep)
+  endif()

   add_custom_command_target(
       dependency_target


Master: I think the problem lies elsewhere....

--- cmake_modules/FindASSIMPM.cmake
+++ cmake_modules/FindASSIMPM.cmake
@@ -63,7 +63,7 @@
     	/opt/local/lib/
     )

-	find_library(ASSIMP_LIBRARIES_DEBUG NAMES assimpd
+	find_library(ASSIMP_LIBRARIES_DEBUG NAMES assimpd assimp
     	PATHS
     	/usr/lib/
     	/usr/local/lib/


Fix dependencies for targets

Fix dependencies for targets

--- test/base_test.cmake
+++ test/base_test.cmake
@@ -39,10 +39,17 @@
 endif()

 # Target for the transformation
-add_custom_target(
-  transform-${TEST_NAME}
-  DEPENDS ${OUTPUT_FILE} ${EXECUTABLE_ORIGINAL} ${EXECUTABLE_TRANSFORMED}
-)
+if(NOT NO_COMPILE)
+  add_custom_target(
+    transform-${TEST_NAME}
+    DEPENDS ${OUTPUT_FILE} ${EXECUTABLE_ORIGINAL} ${EXECUTABLE_TRANSFORMED}
+  )
+else()
+  add_custom_target(
+    transform-${TEST_NAME}
+    DEPENDS ${OUTPUT_FILE}
+  )
+endif()

 # Target to clean the generated file (Output of clawfc)
 add_custom_target(


Bump GAPID version to v0.5.2

Bump GAPID version to v0.5.2

--- version.cmake
+++ version.cmake
@@ -13,10 +13,10 @@
 # limitations under the License.

 # True source of GAPID versions.
-# Increment these numbers before releasing a new version.
+# Increment these numbers immediately after releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
 set(GAPID_VERSION_MINOR 5)
-set(GAPID_VERSION_POINT 1)
+set(GAPID_VERSION_POINT 2)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


Graph Control 4.2.4-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 4 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Bump version to 8.0

Bump version to 8.0

--- version.cmake
+++ version.cmake
@@ -2,7 +2,7 @@

 project(OpenBoardView)
 string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
-set(PROJECT_VERSION "7.4")
+set(PROJECT_VERSION "8.0")
 set(PROJECT_DESCRIPTION "Viewer for PCB layouts")
 set(PROJECT_URL "http://openboardview.org")
 set(PROJECT_LICENSE "MIT")


fixed up search for FRI source

fixed up search for FRI source

--- config/FRI-Client-SDK_Cpp.cmake
+++ config/FRI-Client-SDK_Cpp.cmake
@@ -1,25 +1,25 @@
 # Sets up KUKA Sunrise FRI Cpp SDK with KUKA connectivity suite
 message(STATUS "Looking for File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")
-set(FRI_Client_SDK_Cpp_zip_PATH "${CMAKE_CURRENT_PROJECT_DIR}/data/FRI-Client-SDK_Cpp.zip" CACHE FILEPATH "File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")
+set(FRI_Client_SDK_Cpp_zip_PATH "${CMAKE_SOURCE_DIR}/data/" CACHE FILEPATH "File Path to FRI-Client-SDK_Cpp.zip KUKA FRI C++ API zip file from sunrise connectivity suite v1.9")

-find_path(FRI_Client_SDK_Cpp_zip RI-Client-SDK_Cpp.zip HINTS ${CMAKE_PROJECT_DIR}/data/ ${CMAKE_CURRENT_PROJECT_DIR}/data/ FRI_Client_SDK_Cpp_zip_PATH)
+find_path(FRI_Client_SDK_Cpp_zip_FILEPATH FRI-Client-SDK_Cpp.zip HINTS ${FRI_Client_SDK_Cpp_zip_PATH} ${CMAKE_PROJECT_DIR}/data/ ${CMAKE_CURRENT_PROJECT_DIR}/data/ )

-if(EXISTS "${FRI_Client_SDK_Cpp_zip}")
-    message(STATUS "Found FRI-Client-SDK_Cpp.zip in ${FRI_Client_SDK_Cpp_zip}/FRI-Client-SDK_Cpp.zip")
+if(EXISTS "${FRI_Client_SDK_Cpp_zip_FILEPATH}")
+    message(STATUS "Found FRI-Client-SDK_Cpp.zip in ${FRI_Client_SDK_Cpp_zip_FILEPATH}/FRI-Client-SDK_Cpp.zip")
     # directory where fri code will be extracted
     set(FRI_DIR ${CMAKE_BINARY_DIR}/FRI_Client_SDK_Cpp)
     set(FRI_SRC_DIR ${FRI_DIR}/src)

-    message(STATUS "extracting FRI C++ SDK... ${FRI_Client_SDK_Cpp_zip} to ${CMAKE_CURRENT_BINARY_DIR}")
+    message(STATUS "extracting FRI C++ SDK... ${FRI_Client_SDK_Cpp_zip_FILEPATH} to ${CMAKE_CURRENT_BINARY_DIR}")
     file(MAKE_DIRECTORY ${FRI_DIR})
-    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${FRI_Client_SDK_Cpp_zip}/FRI-Client-SDK_Cpp.zip
+    execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${FRI_Client_SDK_Cpp_zip_FILEPATH}/FRI-Client-SDK_Cpp.zip
       WORKING_DIRECTORY ${FRI_DIR}
       RESULT_VARIABLE rv)

     if(NOT rv EQUAL 0)
       message(STATUS "extracting... FRI-Client-SDK_Cpp [error clean up]")
       file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/FRI-Client-SDK_Cpp")
-      message(FATAL_ERROR "error: extract of '${FRI_Client_SDK_Cpp_zip}' failed")
+      message(FATAL_ERROR "error: extract of '${FRI_Client_SDK_Cpp_zip_FILEPATH}' failed")
     else()

         if(Nanopb_FOUND)


change the day switch time to 5:00 UTC

change the day switch time to 5:00 UTC

--HG--
extra : convert_revision : svn%3A283d02a7-25f6-0310-bc7c-ecb5cbfe19da/trunk/kdesupport/eigen2%40907787

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -5,7 +5,7 @@
 ##   ENABLE_TESTING()
 ##   INCLUDE(Dart)
 set(CTEST_PROJECT_NAME "Eigen")
-set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "05:00:00 UTC")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "www.cdash.org")


fix bad commit 6ff0512a

fix bad commit 6ff0512a

@cwsmith when you use mpi_test
you need to put `./` in front of the
executables or CMake won't find them
(it only finds the outermost executable,
i.e. mpirun)

--- test/testing.cmake
+++ test/testing.cmake
@@ -7,21 +7,21 @@
     COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} ${PROCS} ${VALGRIND} ${VALGRIND_ARGS} ${EXE} ${ARGN}
   )
 endfunction(mpi_test)
-mpi_test(shapefun 1 shapefun)
-mpi_test(shapefun2 1 shapefun2)
-mpi_test(bezierElevation 1 bezierElevation)
-mpi_test(bezierMesh 1 bezierMesh)
-mpi_test(bezierMisc 1 bezierMisc)
-mpi_test(bezierRefine 1 bezierRefine)
-mpi_test(bezierSubdivision 1 bezierSubdivision)
-mpi_test(bezierValidity 1 bezierValidity)
+mpi_test(shapefun 1 ./shapefun)
+mpi_test(shapefun2 1 ./shapefun2)
+mpi_test(bezierElevation 1 ./bezierElevation)
+mpi_test(bezierMesh 1 ./bezierMesh)
+mpi_test(bezierMisc 1 ./bezierMisc)
+mpi_test(bezierRefine 1 ./bezierRefine)
+mpi_test(bezierSubdivision 1 ./bezierSubdivision)
+mpi_test(bezierValidity 1 ./bezierValidity)

-mpi_test(align 1 align)
-mpi_test(eigen_test 1 eigen_test)
-mpi_test(integrate 1 integrate)
-mpi_test(qr_test 1 qr)
-mpi_test(base64 1 base64)
-mpi_test(tensor_test 1 tensor)
+mpi_test(align 1 ./align)
+mpi_test(eigen_test 1 ./eigen_test)
+mpi_test(integrate 1 ./integrate)
+mpi_test(qr_test 1 ./qr)
+mpi_test(base64 1 ./base64)
+mpi_test(tensor_test 1 ./tensor)

 if(ENABLE_SIMMETRIX)
   set(GXT smd)


Improve boost helper for reconfigures.

Improve boost helper for reconfigures.

--- CMakeBoostHelper.cmake
+++ CMakeBoostHelper.cmake
@@ -20,8 +20,8 @@
             list(APPEND CMAKE_PREFIX_PATH ${_haslibs})
             find_package(Boost QUIET)
             if(Boost_FOUND AND NOT Boost_LIBRARY_DIR)
-                set(BOOST_ROOT "${Boost_INCLUDE_DIR}")
-                set(BOOST_LIBRARYDIR "${Boost_INCLUDE_DIR}/${_libdir}")
+                set(BOOST_ROOT "${Boost_INCLUDE_DIR}" CACHE PATH "")
+                set(BOOST_LIBRARYDIR "${Boost_INCLUDE_DIR}/${_libdir}" CACHE PATH "")
             endif()
         endif()
     endif()


Check MSVC_VERSION instead of CMAKE_GENERATOR (#11351)

--- cmake/custom/ArangoDB_FindOpenSSL_WIN32.cmake
+++ cmake/custom/ArangoDB_FindOpenSSL_WIN32.cmake
@@ -48,12 +48,16 @@
 endif(OPENSSL_USE_STATIC_LIBS)

 # visual studio version
-if (${CMAKE_GENERATOR} MATCHES "2017")
+# see https://cmake.org/cmake/help/latest/variable/MSVC_VERSION.html
+# related: https://cmake.org/cmake/help/latest/variable/MSVC_TOOLSET_VERSION.html
+if (1909 LESS ${MSVC_VERSION} AND ${MSVC_VERSION} LESS 1920)
+# 1910-1919: VS 15.0 (v141 toolset)
     set(VS_VERSION "2017")
-elseif (${CMAKE_GENERATOR} MATCHES "2019")
+elseif (1919 LESS ${MSVC_VERSION} AND ${MSVC_VERSION} LESS 1930)
+# 1920-1929: VS 16.0 (v142 toolset)
     set(VS_VERSION "2019")
 else()
-    message(FATAL_ERROR "Generator not supported: ${CMAKE_GENERATOR}")
+    message(FATAL_ERROR "MSVC version not supported: ${MSVC_VERSION} (supported are 1910-1929)")
 endif()

 #store original suffixes


xc7/boards: Disable zybo programming tool

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- xc7/boards.cmake
+++ xc7/boards.cmake
@@ -13,6 +13,4 @@
   BOARD zybo
   DEVICE xc7z010
   PACKAGE test
-  PROG_TOOL ${OPENOCD_TARGET}
-  PROG_CMD "${OPENOCD} -f ${PRJXRAY_DIR}/utils/openocd/board-digilent-basys3.cfg -c \\\"init $<SEMICOLON> pld load 0 \${OUT_BIN} $<SEMICOLON> exit\\\""
 )


Only add user forks if GITHUB_USER (cmake or env) variable is set

--- GitExternal.cmake
+++ GitExternal.cmake
@@ -23,10 +23,9 @@
 #  GIT_EXTERNAL_VERBOSE
 #    When set, displays information about git commands that are executed
 #
-# CMake variables
-#  GIT_EXTERNAL_USER_FORK If set, a remote called 'user' is set up for github
-#    repositories, pointing to github.com/<user>/<project>. Defaults to user
-#    name or GIT_EXTERNAL_USER environment variable.
+# CMake or environment variables:
+#  GITHUB_USER If set, a remote called 'user' is set up for github
+#    repositories, pointing to github.com/<user>/<project>.

 if(NOT GIT_FOUND)
   find_package(Git QUIET)
@@ -38,16 +37,10 @@
 include(CMakeParseArguments)
 option(GIT_EXTERNAL_VERBOSE "Print git commands as they are executed" OFF)

-set(GIT_EXTERNAL_USER $ENV{GIT_EXTERNAL_USER})
-if(NOT GIT_EXTERNAL_USER)
-  if(MSVC)
-    set(GIT_EXTERNAL_USER $ENV{USERNAME})
-  else()
-    set(GIT_EXTERNAL_USER $ENV{USER})
-  endif()
-endif()
-set(GIT_EXTERNAL_USER_FORK ${GIT_EXTERNAL_USER} CACHE STRING
-  "Github user name used to setup remote for user forks")
+if(NOT GITHUB_USER AND $ENV{GITHUB_USER})
+  set(GITHUB_USER $ENV{GITHUB_USER} CACHE STRING
+    "Github user name used to setup remote for 'user' forks")
+endif()

 macro(GIT_EXTERNAL_MESSAGE msg)
   if(GIT_EXTERNAL_VERBOSE)
@@ -100,13 +93,12 @@
   endif()

   # set up "user" remote for github forks
-  if(GIT_EXTERNAL_USER_FORK AND REPO MATCHES ".*github.com.*")
-    string(REGEX REPLACE "(.*github.com[\\/:]).*(\\/.*)"
-      "\\1${GIT_EXTERNAL_USER_FORK}\\2" GIT_EXTERNAL_USER_REPO ${REPO})
+  if(GITHUB_USER AND REPO MATCHES ".*github.com.*")
+    string(REGEX REPLACE "(.*github.com[\\/:]).*(\\/.*)" "\\1${GITHUB_USER}\\2"
+      GIT_EXTERNAL_USER_REPO ${REPO})
     execute_process(
       COMMAND "${GIT_EXECUTABLE}" remote add user ${GIT_EXTERNAL_USER_REPO}
-      RESULT_VARIABLE nok ERROR_VARIABLE error
-      WORKING_DIRECTORY "${DIR}")
+      OUTPUT_QUIET ERROR_QUIET WORKING_DIRECTORY "${DIR}")
   endif()

   file(RELATIVE_PATH __dir ${CMAKE_SOURCE_DIR} ${DIR})


get rid of cmake/Qt5.cmake

get rid of cmake/Qt5.cmake

--- cmake/Qt5.cmake
+++ cmake/Qt5.cmake
@@ -1,9 +0,0 @@
-# Qt5 stuff
-set(CMAKE_AUTOMOC ON)
-if(BUILD_AS_STATIC)
-    set(QT_STATIC ON)
-    add_definitions(-DQT_STATIC)
-endif()
-
-find_package(Qt5Core)
-


fix getting CMAKE_PREFIX_PATH from environment

--- cmake/all.cmake
+++ cmake/all.cmake
@@ -11,7 +11,7 @@
 # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
 # or CMAKE_PREFIX_PATH from the environment
 if(NOT DEFINED CMAKE_PREFIX_PATH)
-  if($ENV{CMAKE_PREFIX_PATH})
+  if(NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
     string(REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
   endif()
 endif()


use target_compile_features()

use target_compile_features()

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -64,6 +64,7 @@
 else()
 	add_library(${PROJECT_NAME} STATIC "")
 endif()
+target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
 if(NOT APPLE)
 	set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION})
 else()


modules: updated FindMagnumIntegration.cmake.

ImGuiIntegration now uses Magnum::Shaders instead of custom code that
worked on ES3 only. This also means the example can now run on ES2 and
WebGL 1.


Set working directory and file path for out-of-source build

Part of #18

--- test/base_test.cmake
+++ test/base_test.cmake
@@ -2,9 +2,9 @@
 # Perform code transformation and compare the output with a reference

 # Define input and output file name
-set (ORIGINAL_FILE original_code.f90)
-set (OUTPUT_FILE transformed_code.f90)
-set (REFERENCE_FILE reference.f90)
+set (ORIGINAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/original_code.f90)
+set (OUTPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/transformed_code.f90)
+set (REFERENCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/reference.f90)

 # Define executable file name
 set (EXECUTABLE_ORIGINAL original_code_${TEST_NAME})
@@ -23,6 +23,7 @@
   add_custom_command(
     OUTPUT  ${OUTPUT_FILE}
     COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} --debug -J ${XMOD_DIR} --Wx-d -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     DEPENDS ${ORIGINAL_FILE}
     COMMENT "Translating CLAW directive with ${CLAWFC}"
   )
@@ -30,6 +31,7 @@
   add_custom_command(
     OUTPUT  ${OUTPUT_FILE}
     COMMAND ${CLAWFC} ${OPTIONAL_FLAGS} -J ${XMOD_DIR} -o ${OUTPUT_FILE} ${ORIGINAL_FILE}
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
     DEPENDS ${ORIGINAL_FILE}
     COMMENT "Translating CLAW directive with ${CLAWFC}"
   )


Disable building swift-lldb with modules until Swift is modularized.

--- cmake/caches/Apple-lldb-base.cmake
+++ cmake/caches/Apple-lldb-base.cmake
@@ -4,7 +4,8 @@
 set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64 CACHE STRING "")
 set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
 set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
-set(LLVM_ENABLE_MODULES ON CACHE BOOL "")
+# Unfortunately this is blocked on Swift being properly modularized.
+set(LLVM_ENABLE_MODULES OFF CACHE BOOL "")

 # Release builds set these explicitly:
 #set(LLDB_VERSION_MAJOR 9999 CACHE STRING "")


Actually change the version number this time...

svn path=/trunk/; revision=10373

--- cmake/modules/plplot_version.cmake
+++ cmake/modules/plplot_version.cmake
@@ -1,15 +1,15 @@
 # For now, must set this by hand before each release.  This value affects
 # at least the documentation build and perhaps other parts of the release.
-set(RELEASE_DATE "2009-05-10")
+set(RELEASE_DATE "2009-09-06")

 # Version data that need review and possible modification for each release.

-set(VERSION 5.9.4)
+set(VERSION 5.9.5)

 # CPack version numbers for release tarball name.
 set(CPACK_PACKAGE_VERSION_MAJOR 5)
 set(CPACK_PACKAGE_VERSION_MINOR 9)
-set(CPACK_PACKAGE_VERSION_PATCH 4)
+set(CPACK_PACKAGE_VERSION_PATCH 5)

 # PLplot library version information.


Package version and arcus version tweak

Package version and arcus version tweak

--- CPackConfig.cmake
+++ CPackConfig.cmake
@@ -1,15 +1,17 @@
 set(CPACK_PACKAGE_VENDOR "Ultimaker")
 set(CPACK_PACKAGE_CONTACT "Arjen Hiemstra <a.hiemstra@ultimaker.com>")
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Cura Engine")
-set(CPACK_PACKAGE_VERSION "15.05.90")
+set(CPACK_PACKAGE_VERSION "15.05.90" CACHE STRING "Cura Engine Package Version")
 set(CPACK_GENERATOR "DEB")
 if(NOT DEFINED CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
   execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()
 set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")

+set(MINIMAL_ARCUS_VERSION "15.05.90" CACHE STRING "Minimal Arcus Version")
+
 set(DEB_DEPENDS
-    "arcus (>= 15.05.90)"
+    "arcus (>= ${MINIMAL_ARCUS_VERSION})"
     "protobuf (>= 3.0.0)"
     "libstdc++6 (>= 4.9.0)"
     "libgcc1 (>= 4.9.0)"


change the day switch time to 5:00 UTC

change the day switch time to 5:00 UTC


ouch, missing closing paren

ouch, missing closing paren

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -4,7 +4,7 @@
    "call to 'Vc::Warnings::_operator_bracket_warning' declared with attribute warning"
    "warning is a GCC extension"
    "^-- "  # Ignore output from cmake
-   "^\\*\\*\\* WARNING non-zero return value in ctest from: make"  # Ignore output from ctest
+   "^\\*\\*\\* WARNING non-zero return value in ctest from: make") # Ignore output from ctest

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION} "^make\\[[1-9]\\]: ")
 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION} "^collect2: ld returned . exit status")


CHG: added new components

CHG: added new components

--- Qmitk/files.cmake
+++ Qmitk/files.cmake
@@ -25,6 +25,8 @@
   QmitkFunctionalityComponents/QmitkSurfaceCreatorComponent.cpp
   QmitkFunctionalityComponents/QmitkThresholdComponent.cpp
   QmitkFunctionalityComponents/QmitkSingleTimeStepExporterComponent.cpp
+  QmitkFunctionalityComponents/QmitkImageCropperComponent.cpp
+  QmitkFunctionalityComponents/QmitkEmptyComponent.cpp
   QmitkHelpBrowser.cpp
   QmitkInteractionFunctionalityComponent.cpp
   QmitkLevelWindowWidgetContextMenu.cpp
@@ -81,6 +83,8 @@
   QmitkFunctionalityComponents/QmitkSurfaceCreatorComponentGUI.ui
   QmitkFunctionalityComponents/QmitkThresholdComponentGUI.ui
   QmitkFunctionalityComponents/QmitkSingleTimeStepExporterComponentGUI.ui
+  QmitkFunctionalityComponents/QmitkImageCropperComponentGUI.ui
+  QmitkFunctionalityComponents/QmitkEmptyComponentGUI.ui
   QmitkLevelWindowPresetDefinition.ui
   QmitkLevelWindowRangeChange.ui
   QmitkLevelWindowWidget.ui
@@ -119,6 +123,8 @@
   QmitkFunctionalityComponents/QmitkSurfaceCreatorComponent.h
   QmitkFunctionalityComponents/QmitkThresholdComponent.h
   QmitkFunctionalityComponents/QmitkSingleTimeStepExporterComponent.h
+  QmitkFunctionalityComponents/QmitkImageCropperComponent.h
+  QmitkFunctionalityComponents/QmitkEmptyComponent.h
   QmitkHelpBrowser.h
   QmitkInteractionFunctionalityComponent.h
   QmitkLevelWindowWidgetContextMenu.h


Debug update.

Debug update.

--- ModularDeps.cmake
+++ ModularDeps.cmake
@@ -4,20 +4,35 @@

 find_package(Git REQUIRED)

+# The global dependency list.
+set(DEPENDENCY_LIST)
+
 function(add_dependency DEP_NAME DEP_REPO)
-  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps")
-    message(STATUS "The '${CMAKE_CURRENT_SOURCE_DIR}/deps' directory already exists.")
+  message("dsdada: ${PROJECT_SOURCE_DIR}")
+  # Determine if the dependency has already been added.
+  set(DEP_INDEX)
+  list(FIND DEPENDENCY_LIST "${DEP_NAME}" DEP_INDEX)
+  if(DEP_INDEX GREATER -1)
+    message(STATUS "The dependency '${DEP_NAME}' is already satisfied.")
+    return()
+  endif()
+  message(STATUS "Adding the dependency '${DEP_NAME}'.")
+
+  # Create the deps/ directory if it does not exist already.
+  if(EXISTS "${PROJECT_SOURCE_DIR}/deps")
+    message(STATUS "The '${PROJECT_SOURCE_DIR}/deps' directory already exists.")
   else()
-    message(STATUS "The '${CMAKE_CURRENT_SOURCE_DIR}/deps' directory does not exist, creating it.")
-    file(MAKE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/deps")
+    message(STATUS "The '${PROJECT_SOURCE_DIR}/deps' directory does not exist, creating it.")
+    file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/deps")
   endif()

-  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/${DEP_NAME}")
+  # Try to check out the dependency.
+  if(EXISTS "${PROJECT_SOURCE_DIR}/deps/${DEP_NAME}")
     message(STATUS "The '${DEP_NAME}' dir exists already.")
   else()
     message(STATUS "Cloning the '${DEP_NAME}' dependency.")
     execute_process(COMMAND "${GIT_EXECUTABLE}" "clone" "${DEP_REPO}" "${DEP_NAME}"
-      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/deps"
+      WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/deps"
       RESULT_VARIABLE RES
       ERROR_VARIABLE OUT
       OUTPUT_VARIABLE OUT)
@@ -26,6 +41,14 @@
     endif()
     message(STATUS "'${DEP_NAME}' was successfully cloned.")
   endif()
+
+  # Add the dependency to the global dependency list.
+  # NOTE: we cannot use list(APPEND) here because DEPENDENCY_LIST is a global variable,
+  # and in order to access it we need to use the PARENT_SCOPE option of the set() command.
+  set(DEPENDENCY_LIST ${DEPENDENCY_LIST} "${DEP_NAME}" PARENT_SCOPE)
+
+  # Add the subdirectory of the dependency.
+  add_subdirectory("${PROJECT_SOURCE_DIR}/deps/${DEP_NAME}")
 endfunction()

 # Mark as included.


Speedup cppcheck execution

Speedup cppcheck execution

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -43,7 +43,7 @@

 function(add_cppcheck_sources _targetname)
   if(CPPCHECK_FOUND)
-    set(_cppcheck_args --force -I ${CMAKE_SOURCE_DIR}
+    set(_cppcheck_args -I ${CMAKE_SOURCE_DIR}
       --error-exitcode=2 --inline-suppr
       --suppress=unmatchedSuppression ${CPPCHECK_EXTRA_ARGS})
     set(_input ${ARGN})
@@ -141,7 +141,7 @@
       "add_cppcheck given a target name that does not exist: '${_name}' !")
   endif()
   if(CPPCHECK_FOUND)
-    set(_cppcheck_args --force -I ${CMAKE_SOURCE_DIR}
+    set(_cppcheck_args -I ${CMAKE_SOURCE_DIR}
       --error-exitcode=2 --inline-suppr
       --suppress=unmatchedSuppression ${CPPCHECK_EXTRA_ARGS})


upload

upload

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -156,7 +156,7 @@
 			# 5. compilo y genera el paquete en local
 			message("Generating artifact ${PACKAGE} ...")
 			execute_process(
-				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY} --no-upload -o
+				COMMAND python ${ARTIFACTS_PATH}/build.py ${PACKAGE} --depends=${DEPENDS_PATHFILE} --cmakefiles=${CMAKI_PATH} --prefix=${CMAKE_PREFIX_PATH} --third-party-dir=${CMAKE_PREFIX_PATH} --server=${CMAKI_REPOSITORY} -o
 				WORKING_DIRECTORY "${ARTIFACTS_PATH}"
 				RESULT_VARIABLE artifacts_result
 				)


disable output compression since this feature seems to be broken

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -146,7 +146,7 @@
 endif(NOT EIGEN_NO_UPDATE)

 # which ctest command to use for running the dashboard
-SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}")
+SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE} --no-compress-output")
 if($ENV{EIGEN_CTEST_ARGS})
 SET (CTEST_COMMAND "${CTEST_COMMAND} $ENV{EIGEN_CTEST_ARGS}")
 endif($ENV{EIGEN_CTEST_ARGS})


List also Ldg as option for texture memory.

--- tests/Makefile.cmake
+++ tests/Makefile.cmake
@@ -33,7 +33,7 @@

 # Source-to-source compiler configuration
 # use local memory -> set HIPACC_LMEM to off|on
-# use texture memory -> set HIPACC_TEX to off|Linear1D|Linear2D|Array2D
+# use texture memory -> set HIPACC_TEX to off|Linear1D|Linear2D|Array2D|Ldg
 # vectorize code (experimental, doesn't work) -> set HIPACC_VEC to off|on
 # pad images to a multiple of n bytes -> set HIPACC_PAD to n
 # map n output pixels to one thread -> set HIPACC_PPT to n


Fix assert_target_does_not_exist copy-paste error

--- CMakeUnit.cmake
+++ CMakeUnit.cmake
@@ -58,12 +58,12 @@

     _target_exists (${TARGET_NAME} RESULT)

-    if (NOT RESULT)
-
-        message (SEND_ERROR
-                 "Expected ${TARGET_NAME} to be a target")
-
-    endif (NOT RESULT)
+    if (RESULT)
+
+        message (SEND_ERROR
+                 "Expected ${TARGET_NAME} not to be a target")
+
+    endif (RESULT)

 endfunction (assert_target_does_not_exist)


Fix binary deps not actually running before command needing them

--- test/test_driver.cmake
+++ test/test_driver.cmake
@@ -66,7 +66,7 @@
     )
     foreach(bin_dep ${TEST_TARGET_BIN_DEPS})
         add_custom_command(
-            TARGET ${test_target}
+            TARGET ${test_target}_testrunner
             PRE_BUILD
             COMMAND cmake --build . --target ${bin_dep}
             WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"


Fix Doxyfile template.

Fix Doxyfile template.

--- Doxyfile.cmake
+++ Doxyfile.cmake
@@ -1,5 +1,5 @@
-PROJECT_NAME        = "${PACKAGE_NAME}"
-PROJECT_NUMBER      = ${PACKAGE_VERSION}
+PROJECT_NAME        = "${PROJECT_NAME}"
+PROJECT_NUMBER      = ${PROJECT_VERSION}
 HTML_OUTPUT         = docs
 GENERATE_LATEX      = NO
 GENERATE_MAN        = NO


Make doxygen output reproducible

Make doxygen output reproducible

Signed-off-by: Sebastian Ramacher <63df716952f6985d63bd730444128636613d6384@debian.org>

--- Doxyfile.cmake
+++ Doxyfile.cmake
@@ -18,3 +18,4 @@
 EXPAND_ONLY_PREDEF  = YES
 PREDEFINED          = LIBMB5_DEPRECATED(f)=
 REPEAT_BRIEF        = NO
+HTML_TIMESTAMP      = NO


Set WIN32 option only on release configuration.

	In Debug mode it is useful to have console output.

	* build-aux/cmake/modules/Gostai.cmake: Do that.

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>


[MINOR] Remove unused code.

[MINOR] Remove unused code.

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -641,9 +641,6 @@
 				if [ "$TARGET" = "mpi" -o "$TARGET" = "mpi-cuda" ]; then
 					np_target=$MPI_PROC_DIM
 					echo "[EXECUTE] Trying with process configurations: $np_target"
-                    # Make sure compiled binaries are synched to other nodes
-		    # This is a temporary workaround for the Raccoon cluster.
-					#sleep 30
 				fi
 				for np in $np_target; do
 					if execute $SHORTNAME $TARGET $np $DIM; then


CMake: Fix a few definition to suppress warnings.

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

--- include/llvm/Config/llvm-config.h.cmake
+++ include/llvm/Config/llvm-config.h.cmake
@@ -47,7 +47,7 @@
 #cmakedefine LLVM_MANDIR "${LLVM_MANDIR}"

 /* Build multithreading support into LLVM */
-#cmakedefine LLVM_MULTITHREADED
+#cmakedefine LLVM_MULTITHREADED ${LLVM_MULTITHREADED}

 /* LLVM architecture name for the native architecture, if available */
 #cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}
@@ -62,10 +62,10 @@
 #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter

 /* Define if this is Unixish platform */
-#cmakedefine LLVM_ON_UNIX
+#cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}

 /* Define if this is Win32ish platform */
-#cmakedefine LLVM_ON_WIN32
+#cmakedefine LLVM_ON_WIN32 ${LLVM_ON_WIN32}

 /* Define to path to circo program if found or 'echo circo' otherwise */
 #cmakedefine LLVM_PATH_CIRCO "${LLVM_PATH_CIRCO}"


[cmake] Instead of figuring out the exact location of all of the various libraries when translating Xcode targets, just use the path already provided in LLVMConfig.cmake for the configuration that we compiled LLVM specifically for.

If we compile LLVM for <CONFIG> in build-script with Xcode as our generator,
LLVMExports.cmake will have specific IMPORTED_*_<CONFIG> variables set for all
of our targets. These variables are what we really want to splat across all
Swift Xcode build configurations.

This patch rips out the old code that determined the actual location and instead
just grabs the IMPORTED_*_<CONFIG> variables and splats it accordingly.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -49,41 +49,81 @@
   endif()
 endfunction()

-# What this function does is go through each of the passed in imported targets
-# from LLVM/Clang and changes them to use the appropriate fully expanded paths.
-#
-# TODO: This function needs a better name.
-function(fix_imported_target_locations_for_xcode targets)
-  foreach(t ${targets})
-    if (NOT TARGET ${t})
-      message(FATAL_ERROR "${t} is not a target?!")
-    endif()
-
-    get_target_property(TARGET_TYPE ${t} TYPE)
-
-    if (NOT "${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY" AND
-        NOT "${TARGET_TYPE}" STREQUAL "SHARED_LIBRARY" AND
-        NOT "${TARGET_TYPE}" STREQUAL "EXECUTABLE")
-      message(FATAL_ERROR "Unsupported imported target type ${TARGET_TYPE}")
-    endif()
-
-    # Ok, so at this point, we know that we have an executable, static library,
-    # or shared library.
-    #
-    # First we handle the executables.
-    if ("${TARGET_TYPE}" STREQUAL "EXECUTABLE")
-      set_target_properties(${t} PROPERTIES
-        IMPORTED_LOCATION_DEBUG "${LLVM_BINARY_OUTPUT_INTDIR}/${t}"
-        IMPORTED_LOCATION_RELEASE "${LLVM_BINARY_OUTPUT_INTDIR}/${t}")
+function(check_imported_target_has_imported_configuration target config)
+  get_target_property(IMPORTED_CONFIGS_LIST ${target} IMPORTED_CONFIGURATIONS)
+  if ("${IMPORTED_CONFIGS_LIST}" STREQUAL "NOTFOUND")
+    message(FATAL_ERROR "No import configuration of ${target} specified?!")
+  endif()
+
+  list(FIND "${IMPORTED_CONFIGS_LIST}" "${config}" FOUND_CONFIG)
+  if (NOT FOUND_CONFIG)
+    message(FATAL_ERROR "${target} does not have imported config '${config}'?! \
+Instead: ${IMPORTED_CONFIGS_LIST}")
+  endif()
+endfunction()
+
+function(fixup_imported_target_property_for_xcode target property real_build_type)
+  set(FULL_PROP_NAME "${property}_${real_build_type}")
+
+  # First try to lookup the value associated with the "real build type".
+  get_target_property(PROP_VALUE ${target} ${FULL_PROP_NAME})
+
+  # If the property is unspecified, return.
+  if ("${PROP_VALUE}" STREQUAL "NOTFOUND")
+    return()
+  endif()
+
+  # Otherwise for each cmake configuration that is not real_build_type, hardcode
+  # its value to be PROP_VALUE.
+  foreach(c ${CMAKE_CONFIGURATION_TYPES})
+    if ("${c}" STREQUAL "${real_build_type}")
       continue()
     endif()
-
-    # Otherwise, we have libraries. Since libclang has an extra lib prefix in
-    # its target name, we have to handle it specially.
-    get_imported_library_prefix(PREFIX "${t}" "${CMAKE_${TARGET_TYPE}_PREFIX}")
-    set_target_properties(${t} PROPERTIES
-      IMPORTED_LOCATION_DEBUG "${LLVM_LIBRARY_OUTPUT_INTDIR}/${PREFIX}${t}.${CMAKE_${TARGET_TYPE}_SUFFIX}"
-      IMPORTED_LOCATION_RELEASE "${LLVM_LIBRARY_OUTPUT_INTDIR}/${PREFIX}${t}.${CMAKE_${TARGET_TYPE}_SUFFIX}")
+    set_target_properties(${target} PROPERTIES ${FULL_PROP_NAME} "${PROP_VALUE}")
+  endforeach()
+endfunction()
+
+# When building with Xcode, we only support compiling against the LLVM
+# configuration that was specified by build-script. This becomes a problem since
+# if we compile LLVM-Release and Swift-Debug, Swift is going to look in the
+# Debug, not the Release folder for LLVM's code and thus will be compiling
+# against an unintended set of libraries, if those libraries exist at all.
+#
+# Luckily, via LLVMConfig.cmake, we know the configuration that LLVM was
+# compiled in, so we can grab the imported location for that configuration and
+# splat it across the other configurations as well.
+function(fix_imported_targets_for_xcode imported_targets)
+  # This is the set of configuration specific cmake properties that are
+  # supported for imported targets in cmake 3.4.3. Sadly, beyond hacks, it seems
+  # that there is no way to dynamically query the list of set properties of a
+  # target.
+  #
+  # *NOTE* In fixup_imported_target_property_for_xcode, we add the _${CONFIG}
+  # *suffix.
+  set(imported_target_properties
+    IMPORTED_IMPLIB
+    IMPORTED_LINK_DEPENDENT_LIBRARIES
+    IMPORTED_LINK_INTERFACE_LANGUAGES
+    IMPORTED_LINK_INTERFACE_LIBRARIES
+    IMPORTED_LINK_INTERFACE_MULTIPLICITY
+    IMPORTED_LOCATION
+    IMPORTED_NO_SONAME
+    IMPORTED_SONAME)
+
+  foreach(target ${imported_targets})
+    if (NOT TARGET ${target})
+      message(FATAL_ERROR "${target} is not a target?!")
+    endif()
+
+    # First check that we actually imported the configuration that LLVM said
+    # that we did. This is just a sanity check.
+    check_imported_target_has_imported_configuration(${target} ${LLVM_BUILD_TYPE})
+
+    # Then loop through all of the imported properties and translate.
+    foreach(property ${imported_properties})
+      fixup_imported_target_property_for_xcode(
+        ${target} ${property} ${LLVM_BUILD_TYPE})
+    endforeach()
   endforeach()
 endfunction()

@@ -147,7 +187,7 @@
   set(LLVM_LIBRARY_OUTPUT_INTDIR "${LLVM_LIBRARY_DIR}")

   if (XCODE)
-    fix_imported_target_locations_for_xcode("${LLVM_EXPORTED_TARGETS}")
+    fix_imported_targets_for_xcode("${LLVM_EXPORTED_TARGETS}")
   endif()

   if(NOT ${is_cross_compiling})
@@ -240,7 +280,7 @@
   set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")

   if (XCODE)
-    fix_imported_target_locations_for_xcode("${CLANG_EXPORTED_TARGETS}")
+    fix_imported_targets_for_xcode("${CLANG_EXPORTED_TARGETS}")
   endif()

   include_directories("${CLANG_BUILD_INCLUDE_DIR}"


Minor build system touch-ups

Minor build system touch-ups

--- src/cmake/externalpackages.cmake
+++ src/cmake/externalpackages.cmake
@@ -52,9 +52,12 @@
 ###########################################################################
 # IlmBase setup

-find_package (IlmBase REQUIRED)
+if (NOT ILMBASE_INCLUDE_DIR)
+    find_package (IlmBase REQUIRED)
+endif ()

 include_directories ("${ILMBASE_INCLUDE_DIR}")
+include_directories ("${ILMBASE_INCLUDE_DIR}/OpenEXR")

 macro (LINK_ILMBASE target)
     target_link_libraries (${target} ${ILMBASE_LIBRARIES})
@@ -72,7 +75,7 @@
 endif ()

 if (NOT DEFINED Boost_ADDITIONAL_VERSIONS)
-  set (Boost_ADDITIONAL_VERSIONS "1.57" "1.56"
+  set (Boost_ADDITIONAL_VERSIONS "1.60" "1.59" "1.58" "1.57" "1.56"
                                  "1.55" "1.54" "1.53" "1.52" "1.51" "1.50"
                                  "1.49" "1.48" "1.47" "1.46" "1.45" "1.44"
                                  "1.43" "1.43.0" "1.42" "1.42.0")


Removed unneeded code

Removed unneeded code

--- tools/cmake/ANHLibrary.cmake
+++ tools/cmake/ANHLibrary.cmake
@@ -16,10 +16,10 @@
 ########################
 #
 # include(ANHLibrary)
-#
+#
 # AddANHLibrary(Common
-#     MMOSERVER_DEPS
-#         Utils
+#     MMOSERVER_DEPS
+#         Utils
 # )
 #
 #
@@ -29,7 +29,7 @@
 # include(ANHLibrary)
 #
 # AddANHLibrary(ScriptEngine
-#     DEPENDS
+#     DEPENDS
 #         Utils
 #         Common
 #     SOURCES # disables source lookup and uses this list
@@ -39,8 +39,8 @@
 #     ADDITIONAL_SOURCE_DIRS
 #         ${CMAKE_CURRENT_SOURCE_DIR}/glue_files
 #     ADDITIONAL_INCLUDE_DIRS
-#         ${LUA_INCLUDE_DIR}
-#         ${NOISE_INCLUDE_DIR}
+#         ${LUA_INCLUDE_DIR}
+#         ${NOISE_INCLUDE_DIR}
 #         ${TOLUAPP_INCLUDE_DIR}
 #     DEBUG_LIBRARIES
 #         ${LUA_LIBRARY_DEBUG}
@@ -57,10 +57,10 @@

 FUNCTION(AddANHLibrary name)
     PARSE_ARGUMENTS(ANHLIB "DEPENDS;SOURCES;HEADERS;TEST_SOURCES;ADDITIONAL_LINK_DIRS;ADDITIONAL_INCLUDE_DIRS;ADDITIONAL_LIBRARY_DIRS;ADDITIONAL_SOURCE_DIRS;DEBUG_LIBRARIES;OPTIMIZED_LIBRARIES" "" ${ARGN})
-
+
     set(base_name ${name})
     set(name ${name}_lib)
-
+
     LIST(LENGTH ANHLIB_SOURCES __source_files_list_length)
     LIST(LENGTH ANHLIB_DEBUG_LIBRARIES _debug_list_length)
     LIST(LENGTH ANHLIB_OPTIMIZED_LIBRARIES _optimized_list_length)
@@ -68,9 +68,9 @@
     LIST(LENGTH ANHLIB_ADDITIONAL_INCLUDE_DIRS _includes_list_length)
     LIST(LENGTH ANHLIB_ADDITIONAL_LIBRARY_DIRS _librarydirs_list_length)
     LIST(LENGTH ANHLIB_ADDITIONAL_SOURCE_DIRS _sources_list_length)
-
+
     # Grab all of the source files and all of the unit test files.
-    IF(__source_files_list_length EQUAL 0)
+    IF(__source_files_list_length EQUAL 0)
         # load up all of the source and header files for the project
         FILE(GLOB_RECURSE SOURCES *.cc *.cpp *.h)
         FILE(GLOB_RECURSE HEADERS *.h)
@@ -80,40 +80,40 @@
         set(TEST_SOURCES ${ANHLIB_TEST_SOURCES})
         set(HEADERS ${ANHLIB_HEADERS})
     ENDIF()
-
+
     # Group the source files based on the directory structure.
     FOREACH(__source_file ${SOURCES})
         STRING(REGEX REPLACE "(${CMAKE_CURRENT_SOURCE_DIR}/)((.*/)*)(.*)" "\\2" __source_dir "${__source_file}")
         STRING(REGEX REPLACE "(${CMAKE_CURRENT_SOURCE_DIR}/${__source_dir})(.*)" "\\2" __source_filename "${__source_file}")
-
+
         STRING(REPLACE "/" "\\\\" __source_group "${__source_dir}")
         SOURCE_GROUP("${__source_group}" FILES ${__source_file})
     ENDFOREACH()
-
-    LIST(LENGTH TEST_SOURCES _tests_list_length)
+
+    LIST(LENGTH TEST_SOURCES _tests_list_length)
     IF(_tests_list_length GREATER 0)
-        LIST(REMOVE_ITEM SOURCES ${TEST_SOURCES}) # Remove the unit tests from the sources list.
-    ENDIF()
-
+        LIST(REMOVE_ITEM SOURCES ${TEST_SOURCES}) # Remove the unit tests from the sources list.
+    ENDIF()
+
     # get the number of .cc .cpp files
     set(_tmp ${SOURCES})
     LIST(REMOVE_ITEM _tmp ${HEADERS})
     LIST(LENGTH _tmp _sources_list_length)
-
+
     IF(_includes_list_length GREATER 0)
         INCLUDE_DIRECTORIES(${ANHLIB_ADDITIONAL_INCLUDE_DIRS})
     ENDIF()
-
+
     IF(_librarydirs_list_length GREATER 0)
         LINK_DIRECTORIES(${ANHLIB_ADDITIONAL_LIBRARY_DIRS})
     ENDIF()
-
+
     # Create the Common library
     ADD_LIBRARY(${name} STATIC ${SOURCES})
     SET_TARGET_PROPERTIES(${name}
-        PROPERTIES OUTPUT_NAME ${base_name})
+        PROPERTIES OUTPUT_NAME ${base_name})
 	SET_TARGET_PROPERTIES(${name} PROPERTIES LINKER_LANGUAGE CXX)
-
+
     IF(_project_deps_list_length GREATER 0)
         ADD_DEPENDENCIES(${name} ${ANHLIB_DEPENDS})
     ENDIF()
@@ -121,19 +121,19 @@
     IF(UNIX)
         SET_TARGET_PROPERTIES(${name} PROPERTIES COMPILE_FLAGS -fPIC)
     ENDIF()
-
+
     IF(_debug_list_length GREATER 0)
         FOREACH(debug_library ${ANHLIB_DEBUG_LIBRARIES})
             if (NOT ${debug_library} MATCHES ".*NOTFOUND")
-                TARGET_LINK_LIBRARIES(${name} debug ${debug_library})
+                TARGET_LINK_LIBRARIES(${name} debug ${debug_library})
             endif()
         ENDFOREACH()
     ENDIF()
-
+
     IF(_optimized_list_length GREATER 0)
         FOREACH(optimized_library ${ANHLIB_OPTIMIZED_LIBRARIES})
             if (NOT ${optimized_library} MATCHES ".*NOTFOUND")
-                TARGET_LINK_LIBRARIES(${name} optimized ${optimized_library})
+                TARGET_LINK_LIBRARIES(${name} optimized ${optimized_library})
             endif()
         ENDFOREACH()
     ENDIF()
@@ -141,73 +141,62 @@
     IF(_tests_list_length GREATER 0)
         # Create an executable for the test and link it to gtest and anh
         INCLUDE_DIRECTORIES(${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIR})
-
+
         ADD_EXECUTABLE(${name}_test ${TEST_SOURCES})
-
-        # only link to the library if their are sources (header only libs
+
+        # only link to the library if their are sources (header only libs
         # don't generate binaries)
         if(_sources_list_length GREATER 0)
             TARGET_LINK_LIBRARIES(${name}_test
                 ${name}
             )
         endif()
-
-        TARGET_LINK_LIBRARIES(${name}_test
+
+        TARGET_LINK_LIBRARIES(${name}_test
             ${ANHLIB_DEPENDS}
             ${GTEST_BOTH_LIBRARIES}
             ${GMOCK_LIBRARIES})
         add_dependencies(${name}_test DEPS)
-
+
         IF(_project_deps_list_length GREATER 0)
             ADD_DEPENDENCIES(${name}_test ${ANHLIB_DEPENDS})
         ENDIF()
-
+
         IF(_debug_list_length GREATER 0)
             FOREACH(debug_library ${ANHLIB_DEBUG_LIBRARIES})
                 if (NOT ${debug_library} MATCHES ".*NOTFOUND")
-                    TARGET_LINK_LIBRARIES(${name}_test debug ${debug_library})
+                    TARGET_LINK_LIBRARIES(${name}_test debug ${debug_library})
                 endif()
             ENDFOREACH()
         ENDIF()
-
+
         IF(_optimized_list_length GREATER 0)
             FOREACH(optimized_library ${ANHLIB_OPTIMIZED_LIBRARIES})
                 if (NOT ${optimized_library} MATCHES ".*NOTFOUND")
-                    TARGET_LINK_LIBRARIES(${name}_test optimized ${optimized_library})
+                    TARGET_LINK_LIBRARIES(${name}_test optimized ${optimized_library})
                 endif()
             ENDFOREACH()
         ENDIF()
-
+
         IF(WIN32)
-            # Set the default output directory for binaries for convenience.
-            set(RUNTIME_OUTPUT_BASE_DIRECTORY "${CMAKE_BINARY_DIR}")
-
-            SET_TARGET_PROPERTIES(${name}_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${RUNTIME_OUTPUT_BASE_DIRECTORY}/bin")
-
-            # Mysql is built with the static runtime but all of our projects and deps
-            # use the dynamic runtime, in this instance it's a non-issue so ignore
-            # the problem lib.
-            SET_TARGET_PROPERTIES(${name}_test PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMT")
-            SET_TARGET_PROPERTIES(${name}_test PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB:LIBCMT /LTCG")
-
             # Create a custom built user configuration so that the "run in debug mode"
             # works without any issues.
-    	    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/tools/windows/user_project.vcxproj.in
+    	    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/tools/windows/user_project.vcxproj.in
     	        ${CMAKE_CURRENT_BINARY_DIR}/${name}_tests.vcxproj.user @ONLY)

             if(ENABLE_TEST_REPORT)
                 add_test(
                     NAME all_${name}_tests
                     COMMAND ${name}_test "--gtest_output=xml:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
-                    WORKING_DIRECTORY "${RUNTIME_OUTPUT_BASE_DIRECTORY}/bin/\$(configuration)"
+                    WORKING_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\$(configuration)"
                 )
             endif()
-        ELSE()
+        ELSE()
             IF(ENABLE_TEST_REPORT)
                 add_test(
                     NAME all_${name}_tests_${configuration}
                     CONFIGURATIONS ${configuration}
-                    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${name}_test "--gtest_output=xml:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
+                    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}_test "--gtest_output=xml:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
                 )
             ENDIF()
         ENDIF()


update linux

update linux

--- tools/cmake/ANHLibrary.cmake
+++ tools/cmake/ANHLibrary.cmake
@@ -201,7 +201,7 @@
             IF(ENABLE_TEST_REPORT)
                 add_test(
                     NAME all_${name}_tests
-                    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}_test "--gtest_output=xml:${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
+                    COMMAND ${CMAKE_COMMAND} -E chdir ${CMAKE_BINARY_DIR} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${name}_test "--catch_system_error=yes  --log_level=test_suite --output_format=XML>${PROJECT_BINARY_DIR}/reports/$<CONFIGURATION>/"
                 )
             ENDIF()
         ENDIF()


add linux dependences to packages

add linux dependences to packages

--- packaging/linux/LinuxPackaging.cmake
+++ packaging/linux/LinuxPackaging.cmake
@@ -50,8 +50,10 @@

 if(${DISTRIBUTOR_ID} MATCHES fc|fedora|Fedora|Centos|centos|SUSE|Suse|suse)
   set(CPACK_GENERATOR RPM)
+  set(CPACK_RPM_PACKAGE_REQUIRES "qt, qtwebkit")
 else()
   set(CPACK_GENERATOR DEB)
+  set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-sql-sqlite, libqt4-webkit)
 endif()

 set(CPACK_GENERATOR "${CPACK_GENERATOR}" CACHE STRING "Type of package to build")


Update DownloadLibrary.cmake

Update DownloadLibrary.cmake

--- cmake-modules/DownloadLibrary.cmake
+++ cmake-modules/DownloadLibrary.cmake
@@ -13,10 +13,10 @@

 		file(MAKE_DIRECTORY ${PROJECT_SOURCE_DIR}/${name})

-		if(EXISTS "${name}.tar.gz")
-			set(TARBELL_NAME ${name}.tar.gz)
+		if(EXISTS "${PROJECT_SOURCE_DIR}/${name}.tar.gz")
+			set(TARBELL_NAME "${name}.tar.gz")
 		else()
-			set(TARBELL_NAME ${name}.tgz)
+			set(TARBELL_NAME "${name}.tgz")
 		endif()

 		execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${TARBELL_NAME} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})


Don't set the ``_DEBUG`` define. This is related to issue #463

--- cmake/compiler_flags_override.cmake
+++ cmake/compiler_flags_override.cmake
@@ -12,14 +12,13 @@
 if (("${CMAKE_${_lang}_COMPILER_ID}" MATCHES "Clang") OR ("${CMAKE_${_lang}_COMPILER_ID}" MATCHES "GNU"))
   # Taken from Modules/Compiler/GNU.cmake but -DNDEBUG is removed
   set(CMAKE_${_lang}_FLAGS_INIT "")
-  # FIXME: should we have -D_DEBUG here to match MSVC build?
   set(CMAKE_${_lang}_FLAGS_DEBUG_INIT "-g -O0")
   set(CMAKE_${_lang}_FLAGS_MINSIZEREL_INIT "-Os")
   set(CMAKE_${_lang}_FLAGS_RELEASE_INIT "-O3")
   set(CMAKE_${_lang}_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
   # FIXME: Remove "x.." when CMP0054 is set to NEW
 elseif ("x${CMAKE_${_lang}_COMPILER_ID}" STREQUAL "xMSVC")
-  set(CMAKE_${_lang}_FLAGS_DEBUG_INIT "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1")
+  set(CMAKE_${_lang}_FLAGS_DEBUG_INIT "/MTd /Zi /Ob0 /Od /RTC1")
   set(CMAKE_${_lang}_FLAGS_MINSIZEREL_INIT     "/MT /O1 /Ob1")
   set(CMAKE_${_lang}_FLAGS_RELEASE_INIT        "/MT /O2 /Ob2")
   set(CMAKE_${_lang}_FLAGS_RELWITHDEBINFO_INIT "/MT /Zi /O2 /Ob1")


fix path for installing tkdnd on MacOS

fix path for installing tkdnd on MacOS

--- cmake/external_projects/tcltk.cmake
+++ cmake/external_projects/tcltk.cmake
@@ -63,7 +63,7 @@
   PATCH_COMMAND  patch -p1 < ${CMAKE_CURRENT_LIST_DIR}/tkdnd_macosx.patch
   UPDATE_COMMAND "" # Disable update
   BUILD_IN_SOURCE 1
-  CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX}/../MacOS --libdir=${CMAKE_INSTALL_PREFIX}/../MacOS
+  CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX}/Contents/MacOS --libdir=${CMAKE_INSTALL_PREFIX}/Contents/MacOS
   BUILD_COMMAND make
   INSTALL_COMMAND make install
   LOG_DOWNLOAD 1


Save HUNTER_INSTALL_PREFIX in file

Save HUNTER_INSTALL_PREFIX in file

--- cmake/modules/hunter_finalize.cmake
+++ cmake/modules/hunter_finalize.cmake
@@ -8,6 +8,7 @@
 include(hunter_sanity_checks)
 include(hunter_status_debug)
 include(hunter_status_print)
+include(hunter_test_string_not_empty)

 # Continue initialization of key variables (also see 'hunter_initialize')
 #   * calculate toolchain-id
@@ -120,4 +121,13 @@
   set(HUNTER_ALLOW_CONFIG_LOADING YES)
   include("${HUNTER_CONFIG_ID_PATH}/config.cmake")
   set(HUNTER_ALLOW_CONFIG_LOADING NO)
+
+  hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}")
+  hunter_test_string_not_empty("${CMAKE_BINARY_DIR}")
+
+  file(
+      WRITE
+      "${CMAKE_BINARY_DIR}/_3rdParty/Hunter/install-root-dir"
+      "${HUNTER_INSTALL_PREFIX}"
+  )
 endmacro()


Fix auto-increment package version

Fix auto-increment package version

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -93,7 +93,11 @@
 if(GIT_REVISION)
   if(NOT PACKAGE_VERSION_REVISION STREQUAL GIT_REVISION)
     if(PACKAGE_VERSION_REVISION)
-      math(EXPR CMAKE_PACKAGE_VERSION "${CMAKE_PACKAGE_VERSION} + 1")
+      if(CMAKE_PACKAGE_VERSION)
+        math(EXPR CMAKE_PACKAGE_VERSION "${CMAKE_PACKAGE_VERSION} + 1")
+      else()
+        set(CMAKE_PACKAGE_VERSION "1")
+      endif()
     else()
       set(CMAKE_PACKAGE_VERSION "")
     endif()


Tweak path

Tweak path

--- CommonCPack.cmake
+++ CommonCPack.cmake
@@ -95,7 +95,7 @@
     set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}")
   endif()
   if(NOT CPACK_RPM_POST_INSTALL_SCRIPT_FILE)
-    set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/CMake/rpmPostInstall.sh")
+    set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_CURRENT_LIST_DIR}/rpmPostInstall.sh")
   endif()
 else()
   if(CMAKE_PACKAGE_VERSION)


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -31,14 +31,15 @@
 Name[sr@ijekavian]=Брзо гласништво
 Name[sr@ijekavianlatin]=Brzo glasništvo
 Name[sr@latin]=Brzo glasništvo
-Name[sv]=Direktmeddelanden
+Name[sv]=Direktmeddelandekontakter
 Name[tr]=Anında Mesajlaşma
+Name[ug]=مۇڭداشقۇ
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
 Name[zh_CN]=即时通讯
 Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
-Comment[bs]=Počnite ćaskanje s nekim od IM kontakta ili promijenite vaš IM status
+Comment[bs]=Pokrenite ćaskanje s bilo kojim od vaših IM kontakta ili promijenite svoj IM status
 Comment[ca]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[ca@valencia]=Inicia un xat amb qualsevol dels vostres contactes de MI o canvia el vostre estat de MI
 Comment[cs]=Začít rozhovor s kterýmkoliv vaším kontaktem v IM nebo změnit stav na IM


Linked cuda libraries

Linked cuda libraries

--- cmake/Util/Op.cmake
+++ cmake/Util/Op.cmake
@@ -83,6 +83,7 @@
       find_package(CUDA REQUIRED)
       target_compile_definitions(${args_LIB_NAME} PUBLIC -DHAVE_CUDA)
       target_include_directories(${args_LIB_NAME} PUBLIC ${CUDA_INCLUDE_DIRS})
+      target_link_libraries(${args_LIB_NAME} PUBLIC ${CUDA_LIBRARIES})

       if(COMPILER_SUPPORTS_CXX1Y)
         set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11")


Add the attentionbank to the link library list

--- lib/FindAtomSpace.cmake
+++ lib/FindAtomSpace.cmake
@@ -26,6 +26,9 @@
    PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)

 find_library(ATOMSPACE_atomutils_LIBRARY atomutils
+   PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)
+
+find_library(ATOMSPACE_attentionbank_LIBRARY attentionbank
    PATH ${ATOMSPACE_LIBPATH} PATH_SUFFIXES opencog)

 find_library(ATOMSPACE_clearbox_LIBRARY clearbox
@@ -67,6 +70,7 @@
 set(ATOMSPACE_LIBRARIES
 	${ATOMSPACE_atombase_LIBRARY}
 	${ATOMSPACE_atomcore_LIBRARY}
+	${ATOMSPACE_attentionbank_LIBRARY}
 	${ATOMSPACE_LIBRARY}
 	${ATOMSPACE_atomspaceutils_LIBRARY}
 	${ATOMSPACE_truthvalue_LIBRARY}


Fix use update_file to resolve window line endings for github/index.html

--- github.cmake
+++ github.cmake
@@ -77,5 +77,6 @@
 "</html>\n"
 )

-update_file("${CMAKE_CURRENT_BINARY_DIR}/index.html" index.html)
+update_file("${CMAKE_CURRENT_BINARY_DIR}/index.html"
+  "${CMAKE_CURRENT_SOURCE_DIR}/index.html")
 install(FILES index.html DESTINATION share/${CMAKE_PROJECT_NAME})


Fix BDMGlyphFilter.so dependency, build only when needed, not always.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -13,7 +13,7 @@
 # -----------------------------------------------------------------------------

 # Detect the system flavour and version. Generate variables
-# called DETECTED_OS (ubuntu-18.04, ubuntu-20.04, centos-7, osx)
+# called DETECTED_OS (ubuntu-18.04, ubuntu-20.04, centos-7, osx)
 # and DETECTED_OS_VERS (ubuntu-18.04, ubuntu-20.04, centos-7 or osx-11.2-i386).
 function(detect_os)
     if(APPLE)
@@ -137,13 +137,16 @@
     set(PLUG_LIB_XTENSION "so")
   endif()

-  add_custom_target(BDMGlyphFilter
+  add_custom_command(
+    OUTPUT ${CMAKE_INSTALL_PVPLUGINDIR}/BDMGlyphFilter.so ${CMAKE_INSTALL_ROOT}/lib/libBDM.${PLUG_LIB_XTENSION}
     WORKING_DIRECTORY ${CMAKE_BDM_PVPLUGINDIR}
     COMMAND ${LAUNCHER} ${CMAKE_COMMAND} -B "${BDM_PVPLUGIN_BUILDDIR}"
     COMMAND ${LAUNCHER} ${CMAKE_COMMAND} --build "${BDM_PVPLUGIN_BUILDDIR}"
     COMMAND ${CMAKE_COMMAND} -E copy "${BDM_PVPLUGIN_BUILDDIR}/lib/paraview-${CMAKE_BDM_PVVERSION}/plugins/BDMGlyphFilter/BDMGlyphFilter.so" "${CMAKE_INSTALL_PVPLUGINDIR}"
     COMMAND ${CMAKE_COMMAND} -E copy "${BDM_PVPLUGIN_BUILDDIR}/lib/paraview-${CMAKE_BDM_PVVERSION}/plugins/BDMGlyphFilter/libBDM.${PLUG_LIB_XTENSION}" "${CMAKE_INSTALL_ROOT}/lib"
   )
+  list(APPEND artifact_files_builddir ${CMAKE_INSTALL_PVPLUGINDIR}/BDMGlyphFilter.so ${CMAKE_INSTALL_ROOT}/lib/libBDM.${PLUG_LIB_XTENSION})
+  set(artifact_files_builddir ${artifact_files_builddir} PARENT_SCOPE)
 endfunction(BuildParaViewPlugin)

 # Check if the OS given by the user is supported by the current BioDynaMo release.
@@ -345,9 +348,6 @@
     endif()

     add_custom_target(copy_files_bdm ALL DEPENDS ${artifact_files_builddir})
-    if(paraview)
-      add_dependencies(copy_files_bdm BDMGlyphFilter)
-    endif()
     add_dependencies(copy_files_bdm biodynamo)
 endfunction()


Fix make build

Fix make build

--- cmake/AddVersion.cmake
+++ cmake/AddVersion.cmake
@@ -1,10 +1,10 @@
 set(VERSION_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/version.sh")

 function(add_version SOURCE)
-  add_custom_target(
+  add_custom_command(
     COMMAND "${VERSION_SCRIPT}" > "${SOURCE}"
     COMMENT "Generating version file ${SOURCE}"
-    BYPRODUCTS "${SOURCE}"
+    OUTPUT "${SOURCE}" .PHONY
     VERBATIM
     )
 endfunction()


FindARPACK

FindARPACK

--- cmake/FindARPACK.cmake
+++ cmake/FindARPACK.cmake
@@ -1,11 +1,11 @@
 SET(ARPACK_SEARCH_PATHS ${ARPACK_DIR})

 FIND_LIBRARY(ARPACK_LIB NAMES arpack PATHS ${ARPACK_SEARCH_PATHS} NO_DEFAULT_PATH)
-FIND_LIBRARY(ARPACK_LIB NAMES arpack ${ARPACK_SEARCH_PATHS})
+FIND_LIBRARY(ARPACK_LIB NAMES arpack)

 if(USE_MPI)
   FIND_LIBRARY(PARPACK_LIB NAMES parpack PATHS ${ARPACK_SEARCH_PATHS} NO_DEFAULT_PATH)
-  FIND_LIBRARY(PARPACK_LIB NAMES parpack PATHS ${ARPACK_SEARCH_PATHS})
+  FIND_LIBRARY(PARPACK_LIB NAMES parpack)
 endif (USE_MPI)

 SET(ARPACK_FOUND FALSE)


Update doc.

Update doc.

--- cmake/FindLIBIGL.cmake
+++ cmake/FindLIBIGL.cmake
@@ -3,8 +3,6 @@
 #
 #  LIBIGL_FOUND - system has LIBIGL
 #  LIBIGL_INCLUDE_DIR - **the** LIBIGL include directory
-#  LIBIGL_INCLUDE_DIRS - LIBIGL include directories
-#  LIBIGL_SOURCES - the LIBIGL source files
 if(LIBIGL_FOUND)
     return()
 endif()


[cmake] enable finding of 2018a,b

[cmake] enable finding of 2018a,b


Update FindOpenCL.cmake

Update FindOpenCL.cmake

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -122,6 +122,7 @@
     PATHS
       /usr/local/cuda/lib64
       ENV AMDAPPSDKROOT/lib/sdk
+      /opt/amdgpu-pro/lib/x86_64-linux-gnu/
     )
 endif()


Add a binary dir paths.

Add a binary dir paths.

--- cmake/TbagConfig.cmake
+++ cmake/TbagConfig.cmake
@@ -238,8 +238,8 @@
     # Configure cmake settings.
     tbag_config__add_shared_library_option ()
     tbag_config__add_third ("$ENV{TPARTY_HOME}/local") # Setup the THIRD_PREFIX variable.
-    tbag_config__add_source_dir_paths  ()
-    #tbag_config__add_binary_dir_paths ()
+    tbag_config__add_source_dir_paths ()
+    tbag_config__add_binary_dir_paths ()

     tbag_utils__exists_define_or_die (THIRD_PREFIX)
     tbag_config__add_libraries ("${THIRD_PREFIX}" ${__tbag_config_INFORMATION_LIBRARIES})


cmake: dtc: silence output from check_dtc_flag

We'd get output from a cmake build that would have lines like:

Version: DTC 1.4.7
Version: DTC 1.4.7

This was a side effect of check_dtc_flag.  Add the OUTPUT_QUIET option
to execute_process to supress this output.

Signed-off-by: Kumar Gala <a5e5248af4cd4f0ed8c515f61d40a6e2db46a66e@linaro.org>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -709,6 +709,7 @@
     COMMAND
     ${DTC} ${flag} -v
     ERROR_QUIET
+    OUTPUT_QUIET
     RESULT_VARIABLE dtc_check_ret
   )
   if (dtc_check_ret EQUAL 0)


cmake: Fix target_ld_options()

cmake: Fix target_ld_options()

target_ld_options() was only testing whether a flag could be passed to
the compiler driver when it was compiling an object file. Not whether
a flag could be passed to the compiler driver when it was linking an
elf file.

For most flags, these tests would have the same result, but it does
not for flags like -Wl,--print-memory-usage or -Wl,notaflag.

This patch fixes #5488 by re-using the method from #5459.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -838,7 +838,12 @@
 function(target_ld_options target scope)
   foreach(option ${ARGN})
     string(MAKE_C_IDENTIFIER check${option} check)
-    check_c_compiler_flag(${option} ${check})
+
+    set(SAVED_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${option}")
+    check_c_compiler_flag("" ${check})
+    set(CMAKE_REQUIRED_FLAGS ${SAVED_CMAKE_REQUIRED_FLAGS})
+
     target_link_libraries_ifdef(${check} ${target} ${scope} ${option})
   endforeach()
 endfunction()


COMP: update findQwt for debian unstable

--- CMake/FindQwt.cmake
+++ CMake/FindQwt.cmake
@@ -104,7 +104,7 @@

 find_library ( QWT_LIBRARY
-  NAMES qwt qwt${QWT_MAJOR_VERSION}
+  NAMES qwt qwt${QWT_MAJOR_VERSION} qwt-qt5
   HINTS ${QT_LIBRARY_DIR}
 )


Somehow, several defines were deleted whilst working on LFS for Windows.  This restores those definitions.

--- config.h.in.cmake
+++ config.h.in.cmake
@@ -11,7 +11,11 @@
   #pragma warning( disable: 4018 4996 4244 4305 )
   #define unlink _unlink
   #define open _open
-#define off_t __int64
+  #define close _close
+  #define read _read
+  #define lseek _lseeki64
+
+  #define off_t __int64
   #define _off_t __int64

   #ifndef _OFF_T_DEFINED


compile PointSetIOFactory

compile PointSetIOFactory

--- Core/IO/files.cmake
+++ Core/IO/files.cmake
@@ -22,6 +22,7 @@
   mitkPicFileWriter.cpp
   mitkPicVolumeTimeSeriesIOFactory.cpp
   mitkPicVolumeTimeSeriesReader.cpp
+  mitkPointSetIOFactory.cpp
   mitkPointSetReader.cpp
   mitkPointSetWriter.cpp
   mitkRawImageFileReader.cpp


updates dependencies in libdvid

updates dependencies in libdvid