Avoid using -Wl,-z,defs on Cygwin.

Avoid using -Wl,-z,defs on Cygwin.

Prior to CMAKE 2.8.4 that was covered by the WIN32 conditional but
from 2.8.4 CMAKE no longer defined WIN32 when running under Cygwin
and it needs its own test.

Patch by Martell Malone!

http://reviews.llvm.org/D11347

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -131,7 +131,7 @@

 # Pass -Wl,-z,defs. This makes sure all symbols are defined. Otherwise a DSO
 # build might work on ELF but fail on MachO/COFF.
-if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR
+if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
         ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")


Fix to allow any boolean value in the configuration with -Dxxx=yyy. (-Dvc=on was not working properly)

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -2,10 +2,10 @@
 function(RootConfigure)

 #---Define all sort of variables to bridge between the old Module.mk and the new CMake equivalents-----------
-foreach(v 1 ON YES TRUE Y)
+foreach(v 1 ON YES TRUE Y on yes true y)
   set(value${v} yes)
 endforeach()
-foreach(v 0 OFF NO FALSE N IGNORE NOTFOUND)
+foreach(v 0 OFF NO FALSE N IGNORE off no false n ignore)
   set(value${v} no)
 endforeach()

@@ -409,22 +409,52 @@
 set(dicttype ${ROOT_DICTTYPE})

 #---RConfigure-------------------------------------------------------------------------------------------------
-foreach(v 1 ON YES TRUE Y)
-  set(has${v} define)
-endforeach()
-foreach(v 0 OFF NO FALSE N IGNORE NOTFOUND "")
-  set(has${v} undef)
-endforeach()
 set(setresuid undef)
-set(hasmathmore ${has${mathmore}})
-set(haspthread ${has${CMAKE_USE_PTHREADS_INIT}})
-set(hasxft ${has${xft}})
-set(hascling ${has${cling}})
-set(haslzmacompression ${has${lzma}})
-set(hascocoa ${has${cocoa}})
-set(hasvc ${has${vc}})
-set(usec++11 ${has${cxx11}})
-set(uselibc++ ${has${libcxx}})
+if(mathmore)
+  set(hasmathmore define)
+else()
+  set(hasmathmore undef)
+endif()
+if(CMAKE_USE_PTHREADS_INIT)
+  set(haspthread define)
+else()
+  set(haspthread undef)
+endif()
+if(xft)
+  set(hasxft define)
+else()
+  set(hasxft undef)
+endif()
+if(cling)
+  set(hascling define)
+else()
+  set(hascling undef)
+endif()
+if(lzma)
+  set(haslzmacompression define)
+else()
+  set(haslzmacompression undef)
+endif()
+if(cocoa)
+  set(hascocoa define)
+else()
+  set(hascocoa undef)
+endif()
+if(vc)
+  set(hasvc define)
+else()
+  set(hasvc undef)
+endif()
+if(cxx11)
+  set(usec++11 define)
+else()
+  set(usec++11 undef)
+endif()
+if(libcxx)
+  set(uselibc++ define)
+else()
+  set(uselibc++ undef)
+endif()
 set(hasllvm undef)
 set(llvmdir /**/)
 if(gcctoolchain)


refs #64 fix clang on linux problems

refs #64 fix clang on linux problems

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -87,6 +87,7 @@
   -Wmissing-format-attribute
   -Wno-error=missing-format-attribute
   -Wno-error=address-of-array-temporary
+  -Wno-error=tautological-constant-out-of-range-compare
   -fno-rtti
   -fno-exceptions
   )
@@ -128,7 +129,7 @@

 ## set extra release flags
 ## need to set flags for RelWithDebInfo as well because we want the MySQL/MariaDB builds to use them
-if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang)
+if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
   # have tried -flto and -O4, both make our statically linked executables break apple's linker
   set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG")
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -g -O3 -UNDEBUG")


ENH: removed extra print out of dependecies in superbuild

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -237,12 +237,6 @@
 endforeach()
 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/ExternalProjectDependencies.txt "${ep_dependency_graph}\n")

-#-----------------------------------------------------------------------------
-# Now delegate back to the main SimpleITK with ${CMAKE_PROJECT_NAME}_SuperBuild=OFF
-# to actually build Simple ITK
-#-----------------------------------------------------------------------------
-message(STATUS "${CMAKE_PROJECT_NAME}_DEPENDENCIES ${${CMAKE_PROJECT_NAME}_DEPENDENCIES}")
-
 #
 # Use CMake file which present options for wrapped languages, and finds languages as needed
 #


ARROW-3214: [C++] Disable insecure warnings in MinGW build

It's already disabled in MSVC build.

Author: Kouhei Sutou <kou@clear-code.com>

Closes #2539 from kou/cpp-disable-insecure-warnings-with-mingw and squashes the following commits:

c4c96b3a <Kouhei Sutou> Add endif() expression for easy to read
7ac8a8b2 <Kouhei Sutou>  Disable insecure warnings in MinGW build

--- cpp/cmake_modules/SetupCxxFlags.cmake
+++ cpp/cmake_modules/SetupCxxFlags.cmake
@@ -25,46 +25,48 @@

 # compiler flags that are common across debug/release builds

-if (MSVC)
+if (WIN32)
   # TODO(wesm): Change usages of C runtime functions that MSVC says are
   # insecure, like std::getenv
   add_definitions(-D_CRT_SECURE_NO_WARNINGS)

-  # ARROW-1931 See https://github.com/google/googletest/issues/1318
-  #
-  # This is added to CMAKE_CXX_FLAGS instead of CXX_COMMON_FLAGS since only the
-  # former is passed into the external projects
-  if (MSVC_VERSION VERSION_GREATER 1900)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
-  endif()
-
-  if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    # clang-cl
-    set(CXX_COMMON_FLAGS "-EHsc")
-  elseif(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 19)
-    message(FATAL_ERROR "Only MSVC 2015 (Version 19.0) and later are supported
-    by Arrow. Found version ${CMAKE_CXX_COMPILER_VERSION}.")
-  else()
-    # Fix annoying D9025 warning
-    string(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-
-    # Set desired warning level (e.g. set /W4 for more warnings)
+  if (MSVC)
+    # ARROW-1931 See https://github.com/google/googletest/issues/1318
     #
-    # ARROW-2986: Without /EHsc we get C4530 warning
-    set(CXX_COMMON_FLAGS "/W3 /EHsc")
-  endif()
-
-  if (ARROW_USE_STATIC_CRT)
-    foreach (c_flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG
-                    CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
-                    CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG
-                    CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
-      string(REPLACE "/MD" "-MT" ${c_flag} "${${c_flag}}")
-    endforeach()
-  endif()
-
-  # Support large object code
-  set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /bigobj")
+    # This is added to CMAKE_CXX_FLAGS instead of CXX_COMMON_FLAGS since only the
+    # former is passed into the external projects
+    if (MSVC_VERSION VERSION_GREATER 1900)
+      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
+    endif()
+
+    if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+      # clang-cl
+      set(CXX_COMMON_FLAGS "-EHsc")
+    elseif(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 19)
+      message(FATAL_ERROR "Only MSVC 2015 (Version 19.0) and later are supported
+      by Arrow. Found version ${CMAKE_CXX_COMPILER_VERSION}.")
+    else()
+      # Fix annoying D9025 warning
+      string(REPLACE "/W3" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+
+      # Set desired warning level (e.g. set /W4 for more warnings)
+      #
+      # ARROW-2986: Without /EHsc we get C4530 warning
+      set(CXX_COMMON_FLAGS "/W3 /EHsc")
+    endif()
+
+    if (ARROW_USE_STATIC_CRT)
+      foreach (c_flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG
+		      CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO
+		      CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG
+		      CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
+	string(REPLACE "/MD" "-MT" ${c_flag} "${${c_flag}}")
+      endforeach()
+    endif()
+
+    # Support large object code
+    set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} /bigobj")
+  endif(MSVC)
 else()
   # Common flags set below with warning level
   set(CXX_COMMON_FLAGS "")


Upgrade downloaded eigen version to latest bugfix release

--- modules/LookUpEigen3.cmake
+++ modules/LookUpEigen3.cmake
@@ -12,7 +12,7 @@
   # with SSL
   set(file_found FALSE)
   set(Eigen3_URL "${EXTERNAL_ROOT}/eigen.tgz")
-  set(Eigen3_MD5 6a578dba42d1c578d531ab5b6fa3f741)
+  set(Eigen3_MD5 f2a417d083fe8ca4b8ed2bc613d20f07)
   if(EXISTS "${EXTERNAL_ROOT}/eigen.tgz")
       file(MD5 "${EXTERNAL_ROOT}/eigen.tgz" file_md5)
       if(file_md5 EQUAL "${Eigen3_MD5}")
@@ -24,13 +24,13 @@
       find_package(Wget)
       if(WGET_FOUND)
           execute_process(COMMAND ${WGET_EXECUTABLE}
-            http://bitbucket.org/eigen/eigen/get/3.2.9.tar.gz
+            http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
             -O ${EXTERNAL_ROOT}/eigen.tgz
           )
       else()
           find_program(CURL_EXECUTABLE curl)
           execute_process(COMMAND ${CURL_EXECUTABLE}
-            -L http://bitbucket.org/eigen/eigen/get/3.2.9.tar.gz
+            -L http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
             -o ${EXTERNAL_ROOT}/eigen.tgz
           )
       endif()


Pass Boost_INCLUDE_DIR on to eigen3

Pass Boost_INCLUDE_DIR on to eigen3

--- modules/LookUpEigen3.cmake
+++ modules/LookUpEigen3.cmake
@@ -41,6 +41,7 @@
         "CMAKE_C_.*"
         "CMAKE_CXX_.*"
         "BLAS_.*" "FFTW3_.*"
+        ".*_INCLUDE_DIRS?"
     ALSOADD
         "\nset(CMAKE_INSTALL_PREFIX \"${EXTERNAL_ROOT}\" CACHE STRING \"\")\n"
 )


CMake: Bugfix: Query petscvariables for the full link interface for petsc

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@29352 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindPETSC.cmake
+++ deal.II/cmake/modules/FindPETSC.cmake
@@ -33,27 +33,6 @@
 SET_IF_EMPTY(PETSC_DIR "$ENV{PETSC_DIR}")
 SET_IF_EMPTY(PETSC_ARCH "$ENV{PETSC_ARCH}")

-#
-# So, well, yes. I'd like to include the PETScConfig.cmake file via
-# FIND_PACKAGE(), but it is broken beyond belief:
-#
-# - In source, i.e. PETSC_DIR/PETSC_ARCH, it sets BUILD_SHARED_LIBS.
-# - It does not contain its very own version number
-# - It does not contain its very own library location(s) or name(s)
-# - It does not contain necessary includes
-#
-# - It writes a lot of FIND_LIBRARY(..) statements. Seriously. What the
-#   heck? If its not the same library you're linking against, you cannot
-#   assume to be API compatible, so why not just give a list of libraries?
-#
-# - It is not even considered to be installed in the gentoo petsc package
-#   :-]
-#
-
-#
-# TODO: We'll have to guess which external libraries we'll have to link
-# against someday to avoid underlinkage
-#

 FIND_LIBRARY(PETSC_LIBRARY
   NAMES petsc
@@ -62,12 +41,54 @@
     ${PETSC_DIR}
     ${PETSC_DIR}/${PETSC_ARCH}
   PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
-)
+  )

 #
-# So, up to this point it was easy. Now, the tricky part:
+# So, up to this point it was easy. Now, the tricky part. Search for
+# petscvariables and determine the link interface from that file:
 #
+FIND_FILE(PETSC_PETSCVARIABLES
+  NAMES petscvariables
+  HINTS
+    ${PETSC_DIR}
+    ${PETSC_DIR}/${PETSC_ARCH}
+  PATH_SUFFIXES conf
+  )
+
+IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
+
+  FILE(STRINGS "${PETSC_PETSCVARIABLES}" _external_link_line
+    REGEX "^PETSC_WITH_EXTERNAL_LIB =.*")
+  SEPARATE_ARGUMENTS(_external_link_line)
+
+  SET(_hints)
+  FOREACH(_token ${_external_link_line}})
+    IF(_token MATCHES "^-L")
+      # Build up hints with the help of all tokens passed with -L:
+      STRING(REGEX REPLACE "^-L" "" _token "${_token}")
+      LIST(APPEND _hints ${_token})
+    ELSEIF(_token MATCHES "^-l")
+      # Search for every library that was specified with -l:
+      STRING(REGEX REPLACE "^-l" "" _token "${_token}")
+      IF(NOT _token MATCHES "(petsc|stdc\\+\\+|gcc_s)")
+        FIND_LIBRARY(PETSC_LIBRARY_${_token}
+          NAMES ${_token}
+          HINTS ${_hintes}
+          )
+        IF(NOT PETSC_LIBRARY_${_token} MATCHES "-NOTFOUND")
+          LIST(APPEND _petsc_libraries ${PETSC_LIBRARY_${_token}})
+        ENDIF()
+        #
+        # Remove from cache, so that updating PETSC search paths will
+        # find a (possibly) new link interface
+        #
+        UNSET(PETSC_LIBRARY_${_token} CACHE)
+      ENDIF()
+    ENDIF()
+  ENDFOREACH()
+ENDIF()
+

 #
 # Search for the first part of the includes:
@@ -111,6 +132,7 @@
 IF(PETSC_FOUND)
   SET(PETSC_LIBRARIES
     ${PETSC_LIBRARY}
+    ${_petsc_libraries}
     )
   SET(PETSC_INCLUDE_DIRS
     ${PETSC_INCLUDE_DIR_ARCH}


Fix case in finding the components
Fix expansion in the if for non defined variables
Fix absolute path of the matlab binary program

git-svn-id: 609522d7d408cfa97e9ff3bac4923f7fa96011fc@133 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -474,6 +474,9 @@

 else()
   # for linux/osx
+
+
+

   if(NOT DEFINED MATLAB_ROOT OR NOT ${MATLAB_ROOT})

@@ -486,8 +489,13 @@
     if(NOT ${MATLAB_PROGRAM})
       #execute_process(COMMAND which matlab OUTPUT_VARIABLE _which_matlab RESULT_VARIABLE _which_matlab_result)
       get_filename_component(MATLAB_PROGRAM "matlab" PROGRAM)
-      if(MATLAB_FIND_DEBUG)
-        message(STATUS "[MATLAB] matlab program result from the command line ${MATLAB_PROGRAM}")
+      get_filename_component(MATLAB_PROGRAM ${MATLAB_PROGRAM} ABSOLUTE)
+      if(EXISTS ${MATLAB_PROGRAM})
+        if(MATLAB_FIND_DEBUG)
+          message(STATUS "[MATLAB] matlab program result from the command line ${MATLAB_PROGRAM}")
+        endif()
+      else()
+        unset(MATLAB_PROGRAM)
       endif()

     endif()
@@ -569,7 +577,11 @@
 endif()

-if(NOT MATLAB_VERSION OR ${MATLAB_VERSION} STREQUAL "NOT-FOUND")
+if((NOT (DEFINED MATLAB_VERSION)) OR (NOT MATLAB_VERSION))
+  set(MATLAB_VERSION "NOT-FOUND")
+endif()
+
+if(${MATLAB_VERSION} STREQUAL "NOT-FOUND")
   if((NOT DEFINED MATLAB_PROGRAM) OR (NOT ${MATLAB_PROGRAM}) OR (NOT EXISTS ${MATLAB_PROGRAM}))
     if(MATLAB_FIND_DEBUG)
       message(STATUS "[MATLAB] - Unknown version, looking for Matlab under ${MATLAB_ROOT}")
@@ -700,7 +712,7 @@

 # component Mex Compiler
-list(FIND MATLAB_FIND_COMPONENTS MEX_COMPILER _matlab_find_mex_compiler)
+list(FIND Matlab_FIND_COMPONENTS MEX_COMPILER _matlab_find_mex_compiler)
 if(_matlab_find_mex_compiler GREATER -1)
   find_program(
     MATLAB_MEX_COMPILER
@@ -716,7 +728,7 @@
 endif()

 # component Matlab program
-list(FIND MATLAB_FIND_COMPONENTS MAIN_PROGRAM _matlab_find_matlab_program)
+list(FIND Matlab_FIND_COMPONENTS MAIN_PROGRAM _matlab_find_matlab_program)
 if(_matlab_find_matlab_program GREATER -1)
   # todo cleanup with code above
   if(NOT DEFINED MATLAB_PROGRAM)
@@ -736,9 +748,8 @@

 # Component MX library
-list(FIND MATLAB_FIND_COMPONENTS MX_LIBRARY _matlab_find_mx)
+list(FIND Matlab_FIND_COMPONENTS MX_LIBRARY _matlab_find_mx)
 if(_matlab_find_mx GREATER -1)
-
   find_library(
     MATLAB_MX_LIBRARY
     mx
@@ -752,7 +763,7 @@
 endif()

 # Component ENG library
-list(FIND MATLAB_FIND_COMPONENTS ENG_LIBRARY _matlab_find_eng)
+list(FIND Matlab_FIND_COMPONENTS ENG_LIBRARY _matlab_find_eng)
 if(_matlab_find_eng GREATER -1)
   find_library(
     MATLAB_ENG_LIBRARY


Remove dependency on GNU make

Remove dependency on GNU make

--- toolchain.cmake
+++ toolchain.cmake
@@ -16,7 +16,6 @@
 find_program(CMAKE_OBJDUMP NAMES arm-none-eabi-objdump PATHS $ENV{ARM_TOOLCHAIN})
 find_program(CMAKE_GCC_SIZE NAMES arm-none-eabi-size PATHS $ENV{ARM_TOOLCHAIN})
 find_program(GDB NAMES arm-none-eabi-gdb-py PATHS $ENV{ARM_TOOLCHAIN})
-find_program(CMAKE_MAKE_PROGRAM NAMES make PATHS $ENV{ARM_TOOLCHAIN})

 CMAKE_FORCE_C_COMPILER(${CC} GNU)
 CMAKE_FORCE_CXX_COMPILER(${CXX} GNU)
@@ -33,4 +32,8 @@

 find_program(CLANG_FORMAT NAMES clang-format HINTS $ENV{CLANG_PATH})

-set(CMAKE_EXECUTABLE_FORMAT ELF)+set(CMAKE_EXECUTABLE_FORMAT ELF)
+
+if(${CMAKE_GENERATOR} STREQUAL "MinGW Makefiles")
+    find_program(CMAKE_MAKE_PROGRAM NAMES make PATHS $ENV{ARM_TOOLCHAIN})
+endif()


Fix for the added stdlib parameters for VIGRA - quotation marks were missing.

--- vigra.cmake
+++ vigra.cmake
@@ -85,8 +85,8 @@
         -DFFTW3F_LIBRARY=
         -DFFTW3_INCLUDE_DIR=${BUILDEM_DIR}/include
         -DFFTW3_LIBRARY=${BUILDEM_DIR}/lib/libfftw3.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
-        -DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}
-        -DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}
+        "-DCMAKE_CXX_FLAGS=-pthread ${VIGRA_CXX_FLAGS} ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
+        "-DCMAKE_CXX_LINK_FLAGS=-pthread ${BUILDEM_ADDITIONAL_CXX_FLAGS}"
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
     TEST_COMMAND        ${BUILDEM_ENV_STRING} $(MAKE) check
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE) install


close cmake if

close cmake if

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -11,7 +11,7 @@

         if(NOT EXISTS ${OpenCV_DIR})
             message(SEND_ERROR "${OpenCV_DIR}. File does not exist.")
-        else(NOT EXISTS ${OpenCV_DIR})
+        endif(NOT EXISTS ${OpenCV_DIR})

         find_package(PkgConfig)
         pkg_check_modules(OpenCV opencv)


use LIB_SUFFIX for TARGET_TOOL_EXEC_FOLDER

if *only* former is given
when TARGET_TOOL_EXEC_FOLDER is directly set, the behaviour is as before
closes #33

--- cmake/ElektraCache.cmake
+++ cmake/ElektraCache.cmake
@@ -300,7 +300,7 @@
     )

 set (TARGET_TOOL_EXEC_FOLDER
-		"lib/elektra/tool_exec"
+		"lib${LIB_SUFFIX}/elektra/tool_exec"
 		CACHE STRING
 		"This folder (below prefix) will be used to install additional kdb-tools"
     )


MINIFICPP-1854 upgrade expected-lite to v0.6.0 (gcc-12 compilation fix)

Signed-off-by: Ferenc Gerlits <935a9a037c0eb96fabee8eebe1d7089d664f797c@gmail.com>
This closes #1342

--- cmake/ExpectedLite.cmake
+++ cmake/ExpectedLite.cmake
@@ -18,7 +18,7 @@
 include(FetchContent)

 FetchContent_Declare(expected-lite
-    URL      https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.5.0.tar.gz
-    URL_HASH SHA256=80f8c91d228cdc5cac3698141c0321d51dcdb0239c2fdcdeae7d46a9a58f2297
+    URL      https://github.com/martinmoene/expected-lite/archive/refs/tags/v0.6.0.tar.gz
+    URL_HASH SHA256=90478ff7345100bf7539b12ea2c5ff04a7b6290bc5c280f02b473d5c65165342
 )
 FetchContent_MakeAvailable(expected-lite)


restored OpenCVModule.cmake

restored OpenCVModule.cmake

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -432,8 +432,6 @@
   file(GLOB lib_hdrs     "include/opencv2/*.hpp" "include/opencv2/${name}/*.hpp" "include/opencv2/${name}/*.h")
   file(GLOB lib_hdrs_detail "include/opencv2/${name}/detail/*.hpp" "include/opencv2/${name}/detail/*.h")

-  file(GLOB_RECURSE qq "src/q/*.h*")
-
   file(GLOB lib_device_srcs "src/cuda/*.cu")
   set(device_objs "")
   set(lib_device_hdrs "")
@@ -447,7 +445,7 @@
   endif()

   ocv_set_module_sources(${ARGN} HEADERS ${lib_hdrs} ${lib_hdrs_detail}
-                                 SOURCES ${lib_srcs} ${lib_int_hdrs} ${device_objs} ${lib_device_srcs} ${lib_device_hdrs} ${qq})
+                                 SOURCES ${lib_srcs} ${lib_int_hdrs} ${device_objs} ${lib_device_srcs} ${lib_device_hdrs})

   source_group("Src" FILES ${lib_srcs} ${lib_int_hdrs})
   source_group("Include" FILES ${lib_hdrs})


cmake: Fix exclude path for clang-format

--- cmake/clang-format.cmake
+++ cmake/clang-format.cmake
@@ -2,7 +2,7 @@
 include("functions")

 # get_all_cpp_files2(ALL_PROJECT_CPP_FILES)
-get_all_cpp_files(ALL_PROJECT_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/external;${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/tools/firmware-update/33u/lib;${CMAKE_CURRENT_SOURCE_DIR}/src/include/*;${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms")
+get_all_cpp_files(ALL_PROJECT_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/external;${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}/tools/firmware-update/33u/lib;${CMAKE_CURRENT_SOURCE_DIR}/src/include/;${CMAKE_CURRENT_SOURCE_DIR}/src/algorithms;")

 add_custom_target(clang-format
   COMMAND clang-format -i


fix ctest script

fix ctest script

--- cmake/ctest_script.cmake
+++ cmake/ctest_script.cmake
@@ -25,6 +25,9 @@
 ##
 ## ctest -S ctest_script.cmake -D CTEST_TEST_MODEL=Experimental -D CTEST_CONFIGURATION_TYPE=Release -D CTEST_BUILD_JOBS=8 -D CTEST_CMAKE_GENERATOR="Unix Makefiles" -D CNAME=gcc -D CXXNAME=g++ -D CTEST_TEST_TIMEOUT=100 -D CTEST_MEMORYCHECK_TYPE=Valgrind -D test_coverage=TRUE
 ##
+## Different dashboard projects and subprojects are possible:
+##
+## ctest -S /path/to/ctest_script.cmake -D PROJECT_NAME=myGismo -D CTEST_BUILD_JOBS=2 -D CTEST_CMAKE_GENERATOR="Unix Makefiles" -D CTEST_TEST_TIMEOUT=100 -D LABELS_FOR_SUBPROJECTS='gismo;examples;unittests' -D CTEST_SOURCE_DIRECTORY=./gismo_src -D CTEST_BINARY_DIRECTORY=./build
 ##
 ## On linux this script can be invoked in a cronjob. e.g.:
 ##    $ crontab -e
@@ -348,16 +351,17 @@
   if(DEFINED DROP_METHOD)
     set(CTEST_DROP_METHOD ${DROP_METHOD})
   endif()
-  set(CTEST_LABELS_FOR_SUBPROJECTS ${LABELS_FOR_SUBPROJECTS})
+  #set(CTEST_LABELS_FOR_SUBPROJECTS ${LABELS_FOR_SUBPROJECTS}) #!Dangerous!

   ctest_configure(OPTIONS "${CMAKE_ARGS};-DCTEST_USE_LAUNCHERS=${CTEST_USE_LAUNCHERS};-DBUILD_TESTING=ON;-DDART_TESTING_TIMEOUT=${CTEST_TEST_TIMEOUT}")

   ctest_submit(PARTS Configure Update)

   #"${CMAKE_VERSION}" VERSION_LESS "3.10"
-  if(NOT "x${CTEST_LABELS_FOR_SUBPROJECTS}" STREQUAL "x")
-
-    foreach(subproject ${CTEST_LABELS_FOR_SUBPROJECTS})
+  if(NOT "x${LABELS_FOR_SUBPROJECTS}" STREQUAL "x")
+
+    foreach(subproject ${LABELS_FOR_SUBPROJECTS})
+      #message("Subproject ${subproject}")
       set_property(GLOBAL PROPERTY SubProject ${subproject}) #cdash subproject
       set_property(GLOBAL PROPERTY Label ${subproject})      #test selection
       ctest_build(TARGET ${subproject} APPEND)


Fix travis' ctest script

Fix travis' ctest script

--- cmake/travis_build.cmake
+++ cmake/travis_build.cmake
@@ -9,7 +9,7 @@

 ctest_start("Continuous")
 ctest_configure(
-  "-DSELENIUM_TESTS=OFF"
+  OPTIONS "-DSELENIUM_TESTS=OFF"
 )
 ctest_build()
 ctest_test(PARALLEL_LEVEL 1 RETURN_VALUE res)


Added dxgi.dll to WINDOWS_SYSTEM_DLLS

Added dxgi.dll to WINDOWS_SYSTEM_DLLS

--- Packaging/PackageGlobals.cmake
+++ Packaging/PackageGlobals.cmake
@@ -46,20 +46,21 @@
   advapi32.dll
   comdlg32.dll
   crypt32.dll
+  d2d1.dll
+  d3d11.dll
+  d3d9.dll
   dnsapi.dll
   dwmapi.dll
   dwrite.dll
-  d2d1.dll
-  d3d9.dll
-  d3d11.dll
+  dxgi.dll
   gdi32.dll
   glu32.dll
   imm32.dll
   iphlpapi.dll
   kernel32.dll
+  mpr.dll
   netapi32.dll
   normaliz.dll
-  mpr.dll
   odbc32.dll
   ole32.dll
   oleaut32.dll


Don't submit a notes file if it doesn't exist.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -14,4 +14,6 @@
 set(CTEST_DROP_LOCATION "/submit.php?project=geojs")
 set(CTEST_DROP_SITE_CDASH TRUE)

-set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/build_notes.json")
+if(EXISTS "${CTEST_BINARY_DIRECTORY}/build_notes.json")
+    set(CTEST_NOTES_FILES "${CTEST_BINARY_DIRECTORY}/build_notes.json")
+endif()


Upload the 3.2 testing result to its own CDash project

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

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "manao.inria.fr")
-set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen")
+set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Eigen3.2")
 set(CTEST_DROP_SITE_CDASH TRUE)
-set(CTEST_PROJECT_SUBPROJECTS
-Official
-Unsupported
-)


Closes #2208

Closes #2208

--- Superbuild/EigenExternal.cmake
+++ Superbuild/EigenExternal.cmake
@@ -28,7 +28,7 @@

 # TODO: test on Windows
 ExternalProject_Add(Eigen_external
-  URL "https://github.com/eigenteam/eigen-git-mirror/archive/3.3.7.tar.gz"
+  URL "https://gitlab.com/libeigen/eigen/-/archive/3.3.9/eigen-3.3.9.tar.gz"
   PATCH_COMMAND ""
   CONFIGURE_COMMAND ""
   BUILD_IN_SOURCE ON


Put in a missing word that was bugging me...

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31652 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
+++ deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake
@@ -152,7 +152,7 @@
 #      $ make edit_cache     - to change (cached) configuration variables
 #                              and rerun the configure and generate phases of CMake
 #
-#      $ make strip_comments - strip the source files in this
+#      $ make strip_comments - to strip the source files in this
 #                              directory off the documentation comments
 #      $ make clean          - to remove the generated executable as well as
 #                              all intermediate compilation files


Fix configure error with git-svn repositories

--- DoxygenRule.cmake
+++ DoxygenRule.cmake
@@ -24,9 +24,11 @@
 if(GIT_EXECUTABLE)
   execute_process(COMMAND ${GIT_EXECUTABLE} config --get remote.origin.url
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_ORIGIN_URL)
-  string(REGEX REPLACE ".*github.com[\\/:](.*)\\/.*" "\\1" GIT_ORIGIN_ORG
-    ${GIT_ORIGIN_URL})
-  string(TOLOWER ${GIT_ORIGIN_ORG} GIT_ORIGIN_ORG)
+  if(GIT_ORIGIN_URL) # can be empty for git-svn repos
+    string(REGEX REPLACE ".*github.com[\\/:](.*)\\/.*" "\\1" GIT_ORIGIN_ORG
+      ${GIT_ORIGIN_URL})
+    string(TOLOWER ${GIT_ORIGIN_ORG} GIT_ORIGIN_ORG)
+  endif()
 endif()
 if(NOT GIT_ORIGIN_ORG)
   set(GIT_ORIGIN_ORG eyescale)


SK:

SK:

-BUG: now it crashed, maybe this works

--- src/Testing/Dashboard/elxDashboard_BIGR_winXP32_VS2008.cmake
+++ src/Testing/Dashboard/elxDashboard_BIGR_winXP32_VS2008.cmake
@@ -24,7 +24,8 @@

 # default: automatically determined
 #set(CTEST_UPDATE_COMMAND /path/to/svn)
-set(CTEST_UPDATE_COMMAND "C:/Program Files/Subversion/bin/svn.exe --config-dir d:/dox/rest/confignoext")
+#set(CTEST_UPDATE_COMMAND "C:/Program Files/Subversion/bin/svn.exe --config-dir d:/dox/rest/confignoext")
+set(CTEST_UPDATE_COMMAND "D:/scripts/svn.bat")

 # Specify the kind of dashboard to submit
 # default: Nightly


added missing loggingzeug to cmake config

--- libzeug-config.cmake
+++ libzeug-config.cmake
@@ -116,6 +116,7 @@
 find(io          iozeug/iozeug_api.h                   ${LIB_PATHS})
 find(threading   threadingzeug/threadingzeug_api.h     ${LIB_PATHS})
 find(script      scriptzeug/scriptzeug_api.h           ${LIB_PATHS})
+find(logging     loggingzeug/loggingzeug_api.h         ${LIB_PATHS})

 # DEBUG
 #message("LIBZEUG_INCLUDES  = ${LIBZEUG_INCLUDES}")


boards: ARC: nsim: simplify runner setup & pass MP_NUM_CPUS unconditionally

Do not check for exact SoC to pass '--cores=${CONFIG_MP_NUM_CPUS}'
options to runners an pass it unconditionally instead.

That preventis from issues when adding new SoC/board.

Signed-off-by: Eugeniy Paltsev <ec089b543c2604b626d7ce60c03e4d074ed102c7@synopsys.com>
Signed-off-by: Evgeniy Paltsev <7de4ab8b01334d64e4e84734c688a8a936513edc@gmail.com>

--- boards/arc/nsim/board.cmake
+++ boards/arc/nsim/board.cmake
@@ -10,12 +10,9 @@
 endif()

 string(REPLACE "nsim" "mdb" MDB_ARGS "${BOARD}.args")
-if((CONFIG_SOC_NSIM_HS_SMP OR CONFIG_SOC_NSIM_HS6X_SMP))
-  board_runner_args(mdb-nsim "--cores=${CONFIG_MP_NUM_CPUS}" "--nsim_args=${MDB_ARGS}")
-  board_runner_args(mdb-hw "--cores=${CONFIG_MP_NUM_CPUS}")
-else()
-  board_runner_args(mdb-nsim "--nsim_args=${MDB_ARGS}")
-endif()
+
+board_runner_args(mdb-nsim "--cores=${CONFIG_MP_NUM_CPUS}" "--nsim_args=${MDB_ARGS}")
+board_runner_args(mdb-hw "--cores=${CONFIG_MP_NUM_CPUS}")

 board_finalize_runner_args(arc-nsim)
 include(${ZEPHYR_BASE}/boards/common/mdb-nsim.board.cmake)


tools: Add --always option to git describe for Cmake

Fixed differences in getting of the project version for Make and Cmake.

--- tools/cmake/third_party/GetGitRevisionDescription.cmake
+++ tools/cmake/third_party/GetGitRevisionDescription.cmake
@@ -112,6 +112,7 @@
 		"-C"
 		${_repo_dir}
 		describe
+		"--always"
 		${hash}
 		${ARGN}
 		WORKING_DIRECTORY


Have the header files for the samples show up in project files.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -59,7 +59,7 @@
         link_directories(${DIRECTXSDK_LIBRARY_DIR})
     endif()

-    add_executable(${CEGUI_TARGET_NAME} ${CORE_SOURCE_FILES})
+    add_executable(${CEGUI_TARGET_NAME} ${CORE_SOURCE_FILES} ${CORE_HEADER_FILES})
     set_target_properties(${CEGUI_TARGET_NAME} PROPERTIES VERSION ${CEGUI_VERSION})

     # append the _d (or whatever) for debug builds as needed.


Revert "Change naming of packaged tarballs to match tag naming scheme - this should fix deployment to CVMFS"

This reverts commit 96b2e4f603a3ae854d636f5d00adfd7781bc948d.

--- cmake/CPackConfig.cmake
+++ cmake/CPackConfig.cmake
@@ -17,7 +17,7 @@
 IF(NOT TAG_FOUND)
     SET(CPACK_PACKAGE_VERSION "latest")
 ELSE()
-    SET(CPACK_PACKAGE_VERSION "v${PROJECT_VERSION}")
+    SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
 ENDIF()

 SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")


Fixes pubub alias targets

Fixes pubub alias targets

--- cmake/CelixConfig.cmake
+++ cmake/CelixConfig.cmake
@@ -70,13 +70,13 @@

 #Setting up pubsub admin alias to the v1 version.
 if (TARGET Celix::pubsub_admin_zmq_v1)
-  add_library(Celix::celix_pubsub_admin_zmq ALIAS Celix::pubsub_admin_zmq_v1)
+  add_library(Celix::celix_pubsub_admin_zmq ALIAS Celix::celix_pubsub_admin_zmq_v1)
 endif ()
 if (TARGET Celix::pubsub_admin_tcp_v1)
-  add_library(Celix::celix_pubsub_admin_tcp ALIAS Celix::pubsub_admin_tcp_v1)
+  add_library(Celix::celix_pubsub_admin_tcp ALIAS Celix::celix_pubsub_admin_tcp_v1)
 endif ()
 if (TARGET Celix::pubsub_admin_websocket_v1)
-  add_library(Celix::celix_pubsub_admin_websocket ALIAS Celix::pubsub_admin_websocket_v1)
+  add_library(Celix::celix_pubsub_admin_websocket ALIAS Celix::celix_pubsub_admin_websocket_v1)
 endif ()

 set(CELIX_BUNDLES_DIR ${REL_INSTALL_DIR}/share/celix/bundles)


Improve EasyQt5 reliability with static Qt5 builds

--- cmake/FindEasyQt5.cmake
+++ cmake/FindEasyQt5.cmake
@@ -33,23 +33,33 @@
         string(TOLOWER "${HOST_CPU}-${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}" HOST)
     endif()

-    find_package(Qt5 REQUIRED
-        COMPONENTS Widgets Network PrintSupport
-        HINTS "${CMAKE_SOURCE_DIR}/qt5/${HOST}"
-        NO_CMAKE_FIND_ROOT_PATH)
+    if (CMAKE_CROSSCOMPILING)
+        find_package(Qt5 REQUIRED
+            COMPONENTS Widgets Network PrintSupport
+            HINTS "${CMAKE_SOURCE_DIR}/qt5/${HOST}"
+            NO_SYSTEM_ENVIRONMENT_PATH
+            NO_CMAKE_SYSTEM_PATH
+            NO_CMAKE_SYSTEM_PACKAGE_REGISTRY)
+    else()
+        find_package(Qt5 REQUIRED
+            COMPONENTS Widgets Network PrintSupport
+            HINTS "${CMAKE_SOURCE_DIR}/qt5/${HOST}")
+    endif()
 endif()

 if(Qt5_FOUND AND NOT TARGET EasyQt5)
     add_library(EasyQt5 INTERFACE)

+    get_target_property(Qt5_TYPE Qt5::Core TYPE)
+    get_target_property(Qt5_LOCATION Qt5::Core LOCATION)
+    message(STATUS "Found Qt5: ${Qt5_LOCATION} (${Qt5_TYPE})")
+
     # Static libraries are painful. Be careful when you touch this, it was made
     # through an extremely evolved trial and error process :]
-    get_target_property(QT5_TYPE Qt5::Core TYPE)
-    if(QT5_TYPE STREQUAL "STATIC_LIBRARY")
-        get_target_property(QT5_DIRECTORY Qt5::Core LOCATION)
-        get_filename_component(QT5_DIRECTORY "${QT5_DIRECTORY}" DIRECTORY)
-        get_filename_component(QT5_DIRECTORY "${QT5_DIRECTORY}" DIRECTORY)
-        set(QT5_LIBRARY_DIRECTORIES "${QT5_DIRECTORY}/lib" "${QT5_DIRECTORY}/plugins/platforms")
+    if(Qt5_TYPE STREQUAL "STATIC_LIBRARY")
+        get_filename_component(Qt5_DIRECTORY "${Qt5_LOCATION}" DIRECTORY)
+        get_filename_component(Qt5_DIRECTORY "${Qt5_DIRECTORY}" DIRECTORY)
+        set(Qt5_LIBRARY_DIRECTORIES "${Qt5_DIRECTORY}/lib" "${Qt5_DIRECTORY}/plugins/platforms")

         if(WIN32)
             # Fix undefined reference to _imp__WSAAsyncSelect@16
@@ -57,17 +67,21 @@

             # Why is there no config package for this?
             find_library(Qt5PlatformSupport_LIBRARIES Qt5PlatformSupport
-                HINTS ${QT5_LIBRARY_DIRECTORIES}
-                NO_CMAKE_FIND_ROOT_PATH)
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
             find_library(qtpcre_LIBRARIES qtpcre
-                HINTS ${QT5_LIBRARY_DIRECTORIES}
-                NO_CMAKE_FIND_ROOT_PATH)
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
             find_library(qtfreetype_LIBRARIES qtfreetype
-                HINTS ${QT5_LIBRARY_DIRECTORIES}
-                NO_CMAKE_FIND_ROOT_PATH)
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
             find_library(qwindows_LIBRARIES qwindows
-                HINTS ${QT5_LIBRARY_DIRECTORIES}
-                NO_CMAKE_FIND_ROOT_PATH)
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)

             target_link_libraries(EasyQt5 INTERFACE
                 Qt5::QWindowsIntegrationPlugin imm32 winmm
@@ -83,11 +97,13 @@
             find_package(OpenGL REQUIRED)

             find_library(Qt5PlatformSupport_LIBRARIES Qt5PlatformSupport
-                HINTS ${QT5_LIBRARY_DIRECTORIES}
-                NO_CMAKE_FIND_ROOT_PATH)
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)
             find_library(qtpcre_LIBRARIES qtpcre
-                HINTS ${QT5_LIBRARY_DIRECTORIES}
-                NO_CMAKE_FIND_ROOT_PATH)
+                HINTS ${Qt5_LIBRARY_DIRECTORIES}
+                NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH NO_SYSTEM_ENVIRONMENT_PATH
+                NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH)

             target_link_libraries(EasyQt5 INTERFACE
                 Qt5::QCocoaIntegrationPlugin Qt5::PrintSupport


Updated FindPomerol

Updated FindPomerol

--- cmake/FindPomerol.cmake
+++ cmake/FindPomerol.cmake
@@ -1,4 +1,4 @@
-#  Try to find GFTools. Once done this will define
+#  Try to find Pomerol. Once done this will define
 #  Pomerol_FOUND - System has GFTools
 #  Pomerol_INCLUDE_DIRS - The GFTools include directories
 #  Pomerol_DEFINITIONS - Compiler switches required for using GFTools
@@ -8,12 +8,13 @@
 set(Pomerol_DEFINITIONS ${PC_Pomerol_CFLAGS_OTHER})

 #include
-find_path(Pomerol_INCLUDE_DIR GridObject.hpp
-          HINTS ${PC_Pomerol_INCLUDEDIR} ${PC_Pomerol_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR}
+find_path(Pomerol_INCLUDE_DIR TwoParticleGF.h
+          HINTS ${PC_Pomerol_INCLUDEDIR} ${PC_Pomerol_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIR} "${Pomerol_ROOT}/include/pomerol"
          )
 #lib
+message (STATUS ${Pomerol_ROOT}/include/pomerol)
 find_library(Pomerol_LIBRARY NAMES pomerol libpomerol
-             HINTS ${PC_Pomerol_LIBDIR} ${PC_Pomerol_LIBRARY_DIRS} )
+             HINTS ${PC_Pomerol_LIBDIR} ${PC_Pomerol_LIBRARY_DIRS} ${Pomerol_ROOT}/lib)

 set(Pomerol_INCLUDE_DIRS ${Pomerol_INCLUDE_DIR} )
 set(Pomerol_LIBRARIES ${Pomerol_LIBRARY})
@@ -21,6 +22,6 @@
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set Pomerol_FOUND to TRUE
 # if all listed variables are TRUE
-find_package_handle_standard_args(GFTools "No GFTools found" Pomerol_LIBRARY Pomerol_INCLUDE_DIR)
+find_package_handle_standard_args(GFTools "No Pomerol found" Pomerol_LIBRARY Pomerol_INCLUDE_DIR)

-mark_as_advanced(Pomerol_INCLUDE_DIR Pomerol_DEFINITIONS)
+mark_as_advanced(Pomerol_INCLUDE_DIR Pomerol_INCLUDE_DIRS Pomerol_LIBRARY Pomerol_LIBRARIES Pomerol_DEFINITIONS)


Delete gcda and gcno files on make clean.

Cmake does not know about the gcda and gcno files generated by the compiler.
With this patch they will be added to the clean target, so they will be cleaned
on make clean. Beware that this patch can't clean all files, due we can't know,
if a file includes e.g. a header for which a second gcov file will be generated.

--- cmake/Findcodecov.cmake
+++ cmake/Findcodecov.cmake
@@ -195,6 +195,7 @@
 	# use different implementations for code coverage.
 	get_target_property(TSOURCES ${TNAME} SOURCES)
 	set(TARGET_LANGUAGES "")
+	set(ADDITIONAL_FILES "")
 	foreach (FILE ${TSOURCES})
 		# If expression was found, FILE is a generator-expression for an object
 		# library. Object libraries will be ignored.
@@ -202,6 +203,9 @@
 		if ("${_file}" STREQUAL "")
 			codecov_lang_of_source(${FILE} LANG)
 			list(APPEND TARGET_LANGUAGES ${LANG})
+
+			list(APPEND ADDITIONAL_FILES "${FILE}.gcno")
+			list(APPEND ADDITIONAL_FILES "${FILE}.gcda")
 		endif ()
 	endforeach ()
 	list(REMOVE_DUPLICATES TARGET_LANGUAGES)
@@ -240,6 +244,17 @@
 			PROPERTY LINK_FLAGS " ${COVERAGE_${TARGET_LANG}_FLAGS}"
 		)

+		# Add gcov files generated by compiler to clean target.
+		set(CLEAN_FILES "")
+		foreach (FILE ${ADDITIONAL_FILES})
+			codecov_path_of_source(${FILE} FILE)
+			list(APPEND CLEAN_FILES "CMakeFiles/${TNAME}.dir/${FILE}")
+		endforeach()
+
+		set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
+			"${CLEAN_FILES}")
+
+
 		add_gcov_target(${TNAME})
 		add_lcov_target(${TNAME})
 	endif()


Set CMP0072 to NEW to prefer GLVND over legacy OpenGL modules

--- cmake/pcl_find_gl.cmake
+++ cmake/pcl_find_gl.cmake
@@ -2,6 +2,10 @@
 # In addition sets two flags if the found versions are Apple frameworks
 # OPENGL_IS_A_FRAMEWORK
 # GLUT_IS_A_FRAMEWORK
+
+if(POLICY CMP0072)
+  cmake_policy(SET CMP0072 NEW)
+endif()

 find_package(OpenGL QUIET REQUIRED)


set RELEASE_OUTPUT_NAME for executables on Windows

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@4237 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -187,7 +187,9 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF
+                                                DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
+                                                RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     elseif(__COMPILER_PATHSCALE)
@@ -227,7 +229,9 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF
+                                                DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
+                                                RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     elseif(__COMPILER_PATHSCALE)
@@ -267,7 +271,9 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX})
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF
+                                                DEBUG_OUTPUT_NAME ${_name}${CMAKE_DEBUG_POSTFIX}
+                                                RELEASE_OUTPUT_NAME ${_name}${CMAKE_RELEASE_POSTFIX})
     elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
       set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     else()


windows dll lookup dir prefix

windows dll lookup dir prefix

--- cmake/zacc.shared.cmake
+++ cmake/zacc.shared.cmake
@@ -246,7 +246,13 @@

         add_executable("${target_name}.${branch}" ${test_main})
-        target_compile_definitions(${target_name}.${branch} PRIVATE ZACC_TEST_LIBNAME="../lib/$<TARGET_FILE_NAME:${target_name}.${branch}.impl>")
+
+        if(NOT WIN32) # dlls are copied to bin folder for windows targets
+            set(search_prefix "../lib/")
+        endif()
+
+        target_compile_definitions(${target_name}.${branch} PRIVATE ZACC_TEST_LIBNAME="${search_prefix}$<TARGET_FILE_NAME:${target_name}.${branch}.impl>")
+
         target_link_libraries("${target_name}.${branch}" gtest zacc.system ${target_libraries} zacc.system zacc.system.loader zacc.interface.${branch}.defs)
         add_dependencies("${target_name}.${branch}" "${target_name}.${branch}.impl")


Use static runtime library in Release config

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -34,5 +34,7 @@
 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} /MP")
 SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE} ${ADDITIONAL_CXX_FLAGS}")
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${ADDITIONAL_CXX_FLAGS}")
+# use static runtime library
+string (REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
 # remove define NDEBUG and instead set define DEBUG for config RelWithDebInfo
 string (REPLACE "NDEBUG" "DEBUG" CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})


disabled warning

disabled warning

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -42,6 +42,7 @@

 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /Qdiag-disable:11082 ")  # warning #11082: locally defined symbol XXX imported
 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 "${CMAKE_SHARED_LINKER_FLAGS} /IGNORE:4044")  # warning LNK4044: unrecognized option '/Qdiag-disable:11082'; ignored
 SET(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG")

 # optionally use static runtime library


Revert "adding /Qinline-max-size- to windows icc flags"
This increased compile times under Windows to over 1 hour which is not acceptable.
Further too aggressive inlining caused excessive stack usage during BVH
build, which caused crashes when compiled with ICC16.

This reverts commit 0aaa6765075ce020b15428333c624c4b58dec8b9.

--- common/cmake/msvc.cmake
+++ common/cmake/msvc.cmake
@@ -40,8 +40,8 @@
 ENDIF()

 SET(CMAKE_CXX_FLAGS_DEBUG          "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}")
-SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 /Qinline-max-size-")
-SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 /Qinline-max-size-")
+SET(CMAKE_CXX_FLAGS_RELEASE        "${CMAKE_CXX_FLAGS_RELEASE}        ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS} /Ox /Oi /Gy /Qinline-max-total-size- /Qinline-factor=200 ")

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


Reverted to using osgEarth direct download instead of GIT tag

NOTE: osgEarth copy of source code referenced by URL has slightly modified cmake script to disable building of osgEarth internal applications (not needed by omegalib, and also seem to cause linking problems on some linux builds)

--- external/UseOsgEarth.cmake
+++ external/UseOsgEarth.cmake
@@ -105,8 +105,7 @@
 ExternalProject_Add(
     osgearth
     DEPENDS osg gdal minizip
-    GIT_REPOSITORY https://github.com/gwaldron/osgearth.git
-    GIT_TAG c446b57a235d91de0564c314ffd8ea00daedf50b
+    URL https://omegalib.googlecode.com/files/osgearth-10db273f4f.tar.gz
     CMAKE_ARGS
         ${OSGEARTH_ARGS}
     INSTALL_COMMAND ""


Correct usage of install(DIRECTORY ... PATTERN) which matches at end of file name

--- cmake/CubInstallRules.cmake
+++ cmake/CubInstallRules.cmake
@@ -18,7 +18,7 @@

 install(DIRECTORY "${CUB_SOURCE_DIR}/cub/cmake/"
   DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/cub"
-  PATTERN cub-header-search EXCLUDE
+  PATTERN *.cmake.in EXCLUDE
 )
 # Need to configure a file to store the infix specified in
 # CMAKE_INSTALL_INCLUDEDIR since it can be defined by the user


Revert NMake fix to allow for precompiled 3rdparty to work correctly.

--- cmake/Modules/FindGQE.cmake
+++ cmake/Modules/FindGQE.cmake
@@ -24,18 +24,18 @@

 # find the GQE include directory
 find_path(GQE_INCLUDE_DIR GQE/Config.hpp
-          PATH_SUFFIXES include
-          PATHS
-          ~/Library/Frameworks
-          /Library/Frameworks
-          /usr/local/
-          /usr/
-          /sw          # Fink
-          /opt/local/  # DarwinPorts
-          /opt/csw/    # Blastwave
-          /opt/
-          ${GQEDIR}
-          $ENV{GQEDIR})
+  PATH_SUFFIXES include
+  PATHS
+  ~/Library/Frameworks
+  /Library/Frameworks
+  /usr/local/
+  /usr/
+  /sw          # Fink
+  /opt/local/  # DarwinPorts
+  /opt/csw/    # Blastwave
+  /opt/
+  ${GQEDIR}
+  $ENV{GQEDIR})

 # check the version number
 set(GQE_VERSION_OK TRUE)
@@ -59,7 +59,7 @@
   else()
     # GQE version is < 2.0
     if (GQE_REQUESTED_VERSION GREATER 19)
-        set(GQE_VERSION_OK FALSE)
+      set(GQE_VERSION_OK FALSE)
       set(GQE_VERSION_MAJOR 1)
       set(GQE_VERSION_MINOR x)
     endif()
@@ -69,15 +69,15 @@
 # find the requested components
 set(GQE_FOUND TRUE) # will be set to false if one of the required modules is not found
 set(FIND_GQE_LIB_PATHS ~/Library/Frameworks
-                        /Library/Frameworks
-                        /usr/local
-                        /usr
-                        /sw
-                        /opt/local
-                        /opt/csw
-                        /opt
-                        ${GQEDIR}
-                        $ENV{GQEDIR})
+  /Library/Frameworks
+  /usr/local
+  /usr
+  /sw
+  /opt/local
+  /opt/csw
+  /opt
+  ${GQEDIR}
+  $ENV{GQEDIR})

 #set(FIND_GQE_PATH_SUFFIXES lib64 lib)
 #if (WINDOWS AND COMPILER_GCC)
@@ -89,7 +89,7 @@
 #else()
 #	set(FIND_GQE_PATH_SUFFIXES ${FIND_GQE_PATH_SUFFIXES} libs-gcc)
 #endif()
-
+
 foreach(FIND_GQE_COMPONENT ${GQE_FIND_COMPONENTS})
   string(TOLOWER ${FIND_GQE_COMPONENT} FIND_GQE_COMPONENT_LOWER)
   string(TOUPPER ${FIND_GQE_COMPONENT} FIND_GQE_COMPONENT_UPPER)
@@ -105,27 +105,28 @@

   # debug library
   find_library(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG
-               ${FIND_GQE_COMPONENT_NAME}-d
-               PATH_SUFFIXES lib64 lib
-               PATHS ${FIND_GQE_LIB_PATHS})
+    ${FIND_GQE_COMPONENT_NAME}-d
+    PATH_SUFFIXES lib64 lib
+    PATHS ${FIND_GQE_LIB_PATHS})

   # release library
   find_library(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE
-               ${FIND_GQE_COMPONENT_NAME}
-               PATH_SUFFIXES lib64 lib
-               PATHS ${FIND_GQE_LIB_PATHS})
+    ${FIND_GQE_COMPONENT_NAME}
+    PATH_SUFFIXES lib64 lib
+    PATHS ${FIND_GQE_LIB_PATHS})

   if (GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG OR GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE)
     # library found
     set(GQE_${FIND_GQE_COMPONENT_UPPER}_FOUND TRUE)
-
+
     # if both are found, set GQE_XXX_LIBRARY to contain both
     if (GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG AND GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE)
       # This causes problems with building under NMake Makefiles (command line Visual Studio)
-      #set(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY debug     ${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG}
-      #                                            optimized ${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE})
-      # Use Release only if both are found
-      set(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY        ${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE})
+      set(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY debug     ${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG}
+        optimized ${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE})
+
+      # Use this instead if your using NMake and you have problems compiling/linking
+      #set(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY        ${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE})
     endif()

     # if only one debug/release variant is found, set the other to be equal to the found one
@@ -149,8 +150,8 @@

   # mark as advanced
   MARK_AS_ADVANCED(GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY
-                   GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE
-                   GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG)
+    GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_RELEASE
+    GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY_DEBUG)

   # add to the global list of libraries
   set(GQE_LIBRARIES ${GQE_LIBRARIES} "${GQE_${FIND_GQE_COMPONENT_UPPER}_LIBRARY}")
@@ -158,24 +159,24 @@

 # handle errors
 if(NOT GQE_VERSION_OK)
-    # GQE version not ok
-    set(FIND_GQE_ERROR "GQE found but version too low (requested: ${GQE_FIND_VERSION}, found: ${GQE_VERSION_MAJOR}.${GQE_VERSION_MINOR})")
-    set(GQE_FOUND FALSE)
+  # GQE version not ok
+  set(FIND_GQE_ERROR "GQE found but version too low (requested: ${GQE_FIND_VERSION}, found: ${GQE_VERSION_MAJOR}.${GQE_VERSION_MINOR})")
+  set(GQE_FOUND FALSE)
 elseif(NOT GQE_FOUND)
-    # include directory or library not found
-    set(FIND_GQE_ERROR "Could NOT find GQE (missing: ${FIND_GQE_MISSING})")
+  # include directory or library not found
+  set(FIND_GQE_ERROR "Could NOT find GQE (missing: ${FIND_GQE_MISSING})")
 endif()
 if (NOT GQE_FOUND)
-    if(GQE_FIND_REQUIRED)
-        # fatal error
-        message(FATAL_ERROR ${FIND_GQE_ERROR})
-    elseif(NOT GQE_FIND_QUIETLY)
-        # error but continue
-        message(STATUS "${FIND_GQE_ERROR}")
-    endif()
+  if(GQE_FIND_REQUIRED)
+    # fatal error
+    message(FATAL_ERROR ${FIND_GQE_ERROR})
+  elseif(NOT GQE_FIND_QUIETLY)
+    # error but continue
+    message(STATUS "${FIND_GQE_ERROR}")
+  endif()
 endif()

 # handle success
 if(GQE_FOUND)
-    message(STATUS "Found GQE: ${GQE_INCLUDE_DIR}")
+  message(STATUS "Found GQE: ${GQE_INCLUDE_DIR}")
 endif()


Set CPACK_DEBIAN_PACKAGE_ARCHITECTURE instead of CPACK_DEBIAN_ARCHITECTURE

Because that's the variable actually used by CPack.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -25,21 +25,21 @@

 #arch
 if(X86)
-  set(CPACK_DEBIAN_ARCHITECTURE "i386")
+  set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
   set(CPACK_RPM_PACKAGE_ARCHITECTURE "i686")
 elseif(X86_64)
-  set(CPACK_DEBIAN_ARCHITECTURE "amd64")
+  set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
   set(CPACK_RPM_PACKAGE_ARCHITECTURE "x86_64")
 elseif(ARM)
-  set(CPACK_DEBIAN_ARCHITECTURE "armhf")
+  set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "armhf")
   set(CPACK_RPM_PACKAGE_ARCHITECTURE "armhf")
 else()
-  set(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
+  set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
   set(CPACK_RPM_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
 endif()

 if(CPACK_GENERATOR STREQUAL "DEB")
-  set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_ARCHITECTURE})
+  set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_DEBIAN_PACKAGE_ARCHITECTURE})
 elseif(CPACK_GENERATOR STREQUAL "RPM")
   set(OPENCV_PACKAGE_ARCH_SUFFIX ${CPACK_RPM_PACKAGE_ARCHITECTURE})
 else()


Added Debian changelog to -tests package.

(cherry picked from commit a87ccb9ac068ef1cb9a5c99cd98615fade6676bf)

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -146,7 +146,7 @@
                   OUTPUT_STRIP_TRAILING_WHITESPACE)

   set(CHANGELOG_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}")
-  set(ALL_COMPONENTS "libs" "dev" "docs" "python" "java" "samples")
+  set(ALL_COMPONENTS "libs" "dev" "docs" "python" "java" "samples" "tests")
   foreach (comp ${ALL_COMPONENTS})
     set(DEBIAN_CHANGELOG_OUT_FILE    "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian")
     set(DEBIAN_CHANGELOG_OUT_FILE_GZ "${CMAKE_BINARY_DIR}/deb-packages-gen/${comp}/changelog.Debian.gz")


Undoing the removal of the 2nd CUDA and cuDNN libraries linking

--- cmake/PVAddExecutable.cmake
+++ cmake/PVAddExecutable.cmake
@@ -20,7 +20,7 @@
 macro(pv_add_executable TARGET)
   cmake_parse_arguments(
     PARSED_ARGS
-    ""
+    "NO_MPI"
     "OUTPUT_PATH"
     "SRC"
     ${ARGN}
@@ -84,5 +84,11 @@
     target_link_libraries(${TARGET} ${PV_OPENMP_LIBRARIES})
   endif()

+  # This looks redundant, but linking order of cuda libraries can make a difference. Including
+  # these a second time is a bit of a hack, but it can fix things in some cases
+  if (PV_USE_CUDA)
+    target_link_libraries(${TARGET} ${CUDA_LIBRARIES})
+    target_link_libraries(${TARGET} ${CUDNN_LIBRARIES})
+  endif()
 endmacro()


added MySQL-client to configs/default

added MySQL-client to configs/default

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -59,6 +59,7 @@
 hunter_config(libdaemon VERSION 0.14)
 hunter_config(Libssh2 VERSION 1.4.4-patch-2)
 hunter_config(Lua VERSION 5.3.2)
+hunter_config(MySQL-client VERSION 6.1.6)
 hunter_config(OpenCV VERSION 3.0.0-p6)
 hunter_config(OpenCV-Extra VERSION 3.0.0)
 hunter_config(OpenSSL VERSION 1.0.2d)


added guard to target

added guard to target

--- cmake/megamol_options.cmake
+++ cmake/megamol_options.cmake
@@ -55,7 +55,7 @@
   endif()
   find_package(MPI REQUIRED)
   if(MPI_C_FOUND)
-    add_definitions("-DWITH_MPI")
+    target_compile_definitions(MPI::MPI_C INTERFACE "-DWITH_MPI")
   endif()
 endif()


[CMake] Adapt to clang r309390

[CMake] Adapt to clang r309390

This removes the configuration order dependence between LLDB and Clang.

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

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -76,10 +76,7 @@
   # Hack: only some LLDB libraries depend on the clang autogenerated headers,
   # but it is simple enough to make all of LLDB depend on some of those
   # headers without negatively impacting much of anything.
-  get_property(CLANG_TABLEGEN_TARGETS GLOBAL PROPERTY CLANG_TABLEGEN_TARGETS)
-  if(CLANG_TABLEGEN_TARGETS)
-    add_dependencies(${name} ${CLANG_TABLEGEN_TARGETS})
-  endif()
+  add_dependencies(${name} clang-tablegen-targets)

   set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
 endfunction(add_lldb_library)


Reverting cmake/modules/AddLLVM.cmake changes from revision 300184 (Added by mistake).

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1213,8 +1213,7 @@
       endif()
       string(FIND ${lit_suite} Inputs is_inputs)
       string(FIND ${lit_suite} Output is_output)
-      string(FIND ${lit_suite} .svn is_svn)
-      if (NOT (is_inputs EQUAL -1 AND is_output EQUAL -1 AND is_svn EQUAL -1))
+      if (NOT (is_inputs EQUAL -1 AND is_output EQUAL -1))
         continue()
       endif()


increase size once more (#4385)

increase size once more (#4385)

--- cmake/packages/bundle.cmake
+++ cmake/packages/bundle.cmake
@@ -35,8 +35,8 @@

 # we wrap HDIUTIL to inject our own parameter:
 find_program(HDIUTIL_EXECUTABLE hdiutil)
-# for now 300MB seems to be enough:
-set(CMAKE_DMG_SIZE 300)
+# for now 310MB seems to be enough:
+set(CMAKE_DMG_SIZE 310)
 configure_file("${PROJECT_SOURCE_DIR}/Installation/MacOSX/Bundle/hdiutilwrapper.sh.in"
   "${CMAKE_CURRENT_BINARY_DIR}/hdiutilwrapper.sh"
   @ONLY)


Only use nacl .bat on windows with msvc

Only use nacl .bat on windows with msvc

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

 set(PLATFORM_PREFIX ${DEPS_DIR}/pnacl/bin)
 set(PLATFORM_TRIPLET "pnacl")
-if (WIN32)
+if (MSVC)
   set(PNACL_BIN_EXT ".bat")
 else()
   set(PNACL_BIN_EXT "")


open-source repo doesn't need SimModSuite

--- cmake/FindSimModSuite.cmake
+++ cmake/FindSimModSuite.cmake
@@ -1,70 +0,0 @@
-# - Try to find Simmetrix SimModSuite
-# Once done this will define
-#  SIMMODSUITE_FOUND - System has SimModSuite
-#  SIMMODSUITE_INCLUDE_DIRS - The SimModSuite include directories
-#  SIMMODSUITE_LIBRARIES - The libraries needed to use SimModSuite
-#  SIMMODSUITE_DEFINITIONS - Compiler switches required for using SimModSuite
-#
-# This implementation assumes a simmetrix install has the following structure
-# VERSION/
-#         include/*.h
-#         lib/ARCHOS/*.a
-
-set(SIM_ARCHOS "" CACHE STRING "Architecture and operating system string of the Simmetrix SimModSuite build")
-if(SIM_ARCHOS MATCHES "^$")
-  set(SIM_ARCHOS "x64_rhel5_gcc41")
-endif()
-
-set(SIM_MPI "" CACHE STRING "MPI implementation used for SimPartitionWrapper")
-if(SIM_MPI MATCHES "^$")
-  set(SIM_MPI "openmpi")
-endif()
-
-# not sure how simmodsuite will work within tribits - ignore for now
-set(SIMMODSUITE_LIBS "")
-set(SIM_LIB_NAMES
-  SimPartitionedMesh-mpi
-  SimMeshing
-  SimModel
-  SimMeshTools
-  SimPartitionWrapper-${SIM_MPI})
-foreach(lib ${SIM_LIB_NAMES})
-  find_library(simlib ${lib}
-    PATHS ${SIMMETRIX_LIB_DIR}
-    PATH_SUFFIXES ${SIM_ARCHOS})
-  if(simlib MATCHES "^simlib-NOTFOUND$")
-    message(FATAL_ERROR "simmetrix library ${lib} not found in ${SIMMETRIX_LIB_DIR}")
-  endif()
-  set(SIMMODSUITE_LIBS ${SIMMODSUITE_LIBS} ${simlib})
-endforeach()
-string(REGEX REPLACE "libSimMeshing.*" " " simLibDir "${simMesh}")
-
-find_path(SIMMODSUITE_INCLUDE_DIR
-  NAMES SimUtil.h SimError.h SimModel.h
-  PATHS ${SIMMETRIX_INCLUDE_DIR})
-if(NOT EXISTS "${SIMMODSUITE_INCLUDE_DIR}")
-  message(FATAL_ERROR "simmetrix include dir not found")
-endif()
-
-string(REGEX REPLACE
-  "/include$" ""
-  SIMMODSUITE_INSTALL_DIR
-  "${SIMMODSUITE_INCLUDE_DIR}")
-
-string(REGEX MATCH
-  "[0-9]+.[0-9]+-[0-9]+"
-  SIM_VERSION
-  "${SIMMODSUITE_INCLUDE_DIR}")
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set PARMETIS_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(SIMMODSUITE  DEFAULT_MSG
-                                  SIMMODSUITE_LIBS SIMMODSUITE_INCLUDE_DIR)
-
-mark_as_advanced(SIMMODSUITE_INCLUDE_DIR SIMMODSUITE_LIBS)
-
-set(SIM_LINK_LIBS "")
-foreach(lib ${SIM_LIB_NAMES})
-  set(SIM_LINK_LIBS "${SIM_LINK_LIBS} -l${lib}")
-endforeach()


Mark the libs component required

Mark the libs component required

Everything else depends on it, after all.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -73,6 +73,7 @@

 #depencencies
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)
+set(CPACK_COMPONENT_LIBS_REQUIRED TRUE)
 set(CPACK_COMPONENT_SAMPLES_DEPENDS libs dev)
 set(CPACK_COMPONENT_DEV_DEPENDS libs)
 set(CPACK_COMPONENT_DOCS_DEPENDS libs)


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(puffin-buffer VERSION 0.1.1.0)
+hunter_config(puffin-buffer VERSION 0.2.0.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)
 hunter_config(Android-Build-Tools VERSION 22.0.1)


Boost: Use 1.64.0 for MinGW

Boost: Use 1.64.0 for MinGW

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -45,6 +45,9 @@
 if(MSVC)
   # https://github.com/boostorg/build/issues/299
   hunter_config(Boost VERSION 1.66.0)
+elseif(MINGW)
+  # https://github.com/boostorg/build/issues/301
+  hunter_config(Boost VERSION 1.64.0)
 else()
   hunter_config(Boost VERSION 1.67.0)
 endif()


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(puffin-stream VERSION 0.1.0.1)
+hunter_config(puffin-stream VERSION 0.1.0.2)
 hunter_config(puffin-buffer VERSION 0.3.0.0)
 hunter_config(AllTheFlopsThreads VERSION 0.1-p0)
 hunter_config(Android-Apk VERSION 1.1.13)


Update iDynTreeOptions.cmake

Update iDynTreeOptions.cmake

--- cmake/iDynTreeOptions.cmake
+++ cmake/iDynTreeOptions.cmake
@@ -5,7 +5,7 @@
 else()
 option(IDYNTREE_SHARED_LIBRARY "Compile iDynTree as a shared library" TRUE)
 endif()
-set(BUILD_SHARED_LIBS ${IDYNTREE_SHARED_LIBRARY})
+option(BUILD_SHARED_LIBS "Build libraries as shared as opposed to static" ${IDYNTREE_SHARED_LIBRARY})

 #########################################################################
 option(IDYNTREE_ONLY_DOCS "Only produce iDynTree documentation, without compiling" FALSE)


Adding version string to ACME output

Adding version string to ACME output

Change-Id: I2f7845885c29dca2cb0587caa5eb987b484b5e03

--- cmake/internal/config.cmake
+++ cmake/internal/config.cmake
@@ -15,6 +15,10 @@
 #

 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) # required for target property 'include_directory'
+
+SET (ACME_VERSION "v0.4.0")
+
+MESSAGE(STATUS "ACME Version: ${ACME_VERSION}")

 IF ("${TARGET_OS}" STREQUAL "")
 	SET(TARGET_OS ${CMAKE_SYSTEM_NAME})


[CMake] Add LINK_LIBS and LINK_COMPONENTS options

This patch adds CMake options to add_lldb_library and add_lldb_executable for specifying LLVM components and direct library links.

This patch is NFC, but it is a small separable bit of a series of much larger patches that I'll be landing over the next day or two.

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

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -23,9 +23,10 @@
   cmake_parse_arguments(PARAM
     "MODULE;SHARED;STATIC;OBJECT"
     ""
-    "DEPENDS"
+    "DEPENDS;LINK_LIBS;LINK_COMPONENTS"
     ${ARGN})
   llvm_process_sources(srcs ${PARAM_UNPARSED_ARGUMENTS})
+  list(APPEND LLVM_LINK_COMPONENTS ${PARAM_LINK_COMPONENTS})

   if (MSVC_IDE OR XCODE)
     string(REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR})
@@ -56,22 +57,19 @@
   if (PARAM_OBJECT)
     add_library(${name} ${libkind} ${srcs})
   else()
-    if (PARAM_SHARED)
-      if (LLDB_LINKER_SUPPORTS_GROUPS)
-        llvm_add_library(${name} ${libkind} ${srcs} LINK_LIBS
-                                -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group
-                                -Wl,--start-group ${CLANG_USED_LIBS} -Wl,--end-group
-                                DEPENDS ${PARAM_DEPENDS}
-          )
-      else()
-        llvm_add_library(${name} ${libkind} ${srcs} LINK_LIBS
-                                ${LLDB_USED_LIBS} ${CLANG_USED_LIBS}
-                                DEPENDS ${PARAM_DEPENDS}
-          )
-      endif()
-    else()
-      llvm_add_library(${name} ${libkind} ${srcs} DEPENDS ${PARAM_DEPENDS})
+    if (PARAM_SHARED AND LLDB_LINKER_SUPPORTS_GROUPS)
+      set(start_group -Wl,--start-group)
+      set(end_group -Wl,--end-group)
     endif()
+    llvm_add_library(${name} ${libkind} ${srcs} LINK_LIBS
+                                ${start_group}
+                                ${LLDB_USED_LIBS}
+                                ${end_group}
+                                ${start_group}
+                                ${CLANG_USED_LIBS}
+                                ${end_group}
+                                ${PARAM_LINK_LIBS}
+                                DEPENDS ${PARAM_DEPENDS})

     if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "liblldb")
       if (PARAM_SHARED)
@@ -112,8 +110,17 @@
 endfunction(add_lldb_library)

 function(add_lldb_executable name)
-  cmake_parse_arguments(ARG "INCLUDE_IN_FRAMEWORK;GENERATE_INSTALL" "" "" ${ARGN})
+  cmake_parse_arguments(ARG
+    "INCLUDE_IN_FRAMEWORK;GENERATE_INSTALL"
+    ""
+    "LINK_LIBS;LINK_COMPONENTS"
+    ${ARGN}
+    )
+
+  list(APPEND LLVM_LINK_COMPONENTS ${ARG_LINK_COMPONENTS})
   add_llvm_executable(${name} ${ARG_UNPARSED_ARGUMENTS})
+
+  target_link_libraries(${name} ${ARG_LINK_LIBS})
   set_target_properties(${name} PROPERTIES
     FOLDER "lldb executables")


[CMake] add_llvm_symbol_exports: Use ${native_export_file} instead of equivalent constant "symbol.*', since it is defined.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -5,28 +5,28 @@
 function(add_llvm_symbol_exports target_name export_file)
   if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set(native_export_file "symbol.exports")
-    add_custom_command(OUTPUT symbol.exports
-      COMMAND sed -e "s/^/_/" < ${export_file} > symbol.exports
+    add_custom_command(OUTPUT ${native_export_file}
+      COMMAND sed -e "s/^/_/" < ${export_file} > ${native_export_file}
       DEPENDS ${export_file}
       VERBATIM
       COMMENT "Creating export file for ${target_name}")
     set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                 LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/symbol.exports")
+                 LINK_FLAGS " -Wl,-exported_symbols_list,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
   elseif(LLVM_HAVE_LINK_VERSION_SCRIPT)
     # Gold and BFD ld require a version script rather than a plain list.
     set(native_export_file "symbol.exports")
     # FIXME: Don't write the "local:" line on OpenBSD.
-    add_custom_command(OUTPUT symbol.exports
-      COMMAND echo "{" > symbol.exports
-      COMMAND grep -q "[[:alnum:]]" ${export_file} && echo "  global:" >> symbol.exports || :
-      COMMAND sed -e "s/$/;/" -e "s/^/    /" < ${export_file} >> symbol.exports
-      COMMAND echo "  local: *;" >> symbol.exports
-      COMMAND echo "};" >> symbol.exports
+    add_custom_command(OUTPUT ${native_export_file}
+      COMMAND echo "{" > ${native_export_file}
+      COMMAND grep -q "[[:alnum:]]" ${export_file} && echo "  global:" >> ${native_export_file} || :
+      COMMAND sed -e "s/$/;/" -e "s/^/    /" < ${export_file} >> ${native_export_file}
+      COMMAND echo "  local: *;" >> ${native_export_file}
+      COMMAND echo "};" >> ${native_export_file}
       DEPENDS ${export_file}
       VERBATIM
       COMMENT "Creating export file for ${target_name}")
     set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                 LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/symbol.exports")
+                 LINK_FLAGS " -Wl,--version-script,${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
   else()
     set(native_export_file "symbol.def")

@@ -38,19 +38,18 @@
     # Using ${export_file} in add_custom_command directly confuses cmd.exe.
     file(TO_NATIVE_PATH ${export_file} export_file_backslashes)

-    add_custom_command(OUTPUT symbol.def
-      COMMAND ${CMAKE_COMMAND} -E echo "EXPORTS" > symbol.def
-      COMMAND ${CAT} ${export_file_backslashes} >> symbol.def
+    add_custom_command(OUTPUT ${native_export_file}
+      COMMAND ${CMAKE_COMMAND} -E echo "EXPORTS" > ${native_export_file}
+      COMMAND ${CAT} ${export_file_backslashes} >> ${native_export_file}
       DEPENDS ${export_file}
       VERBATIM
       COMMENT "Creating export file for ${target_name}")
     if(CYGWIN OR MINGW)
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                   LINK_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/symbol.def")
+                   LINK_FLAGS "${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
     else()
       set_property(TARGET ${target_name} APPEND_STRING PROPERTY
-                   LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/symbol.def")
-    endif()
+                   LINK_FLAGS " ${CMAKE_CURRENT_BINARY_DIR}/${native_export_file}")
   endif()

   add_custom_target(${target_name}_exports DEPENDS ${native_export_file})


[CMake] Allow for Solaris ld -V output on stdout

In recent versions of Solaris 11.4 (previously 12), ld -V output went to
stdout instead of stderr. Since AddLLVM.cmake only expects it on stderr,
Solaris ld wasn't properly detected and options not understood by it are
passed during the build.

The following patch fixes this, allowing for both variants.

Tested on i386-pc-solaris2.11.4 (on top of D35755 which is needed for
proper Solaris support).

Patch by Rainer Orth.

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

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -169,7 +169,8 @@
   elseif("${stdout}" MATCHES "GNU ld")
     set(LLVM_LINKER_IS_GNULD ON)
     message(STATUS "Linker detection: GNU ld")
-  elseif("${stderr}" MATCHES "Solaris Link Editors")
+  elseif("${stderr}" MATCHES "Solaris Link Editors" OR
+         "${stdout}" MATCHES "Solaris Link Editors")
     set(LLVM_LINKER_IS_SOLARISLD ON)
     message(STATUS "Linker detection: Solaris ld")
   else()


Make FindGIO.cmake respect QUIET requests

--- cmake/modules/FindGIO.cmake
+++ cmake/modules/FindGIO.cmake
@@ -20,8 +20,9 @@
     pkgconfig(gio-2.0 _LibGIOIncDir _LibGIOLinkDir _LibGIOLinkFlags _LibGIOCflags)
 endif(NOT WIN32)

+if (NOT GIO_FIND_QUIETLY)
 MESSAGE(STATUS "gio include dir: ${_LibGIOIncDir}")
-
+endif (NOT GIO_FIND_QUIETLY)
 # first try without default paths to respect PKG_CONFIG_PATH

 find_path(GIO_MAIN_INCLUDE_DIR glib.h
@@ -33,7 +34,9 @@
         PATH_SUFFIXES glib-2.0
         PATHS ${_LibGIOIncDir} )

-MESSAGE(STATUS "found gio main include dir: ${GIO_MAIN_INCLUDE_DIR}")
+if (NOT GIO_FIND_QUIETLY)
+  MESSAGE(STATUS "found gio main include dir: ${GIO_MAIN_INCLUDE_DIR}")
+endif (NOT GIO_FIND_QUIETLY)

 # search the glibconfig.h include dir under the same root where the library is found
 find_library(GIO_LIBRARIES
@@ -69,4 +72,3 @@
 find_package_handle_standard_args(GIO  DEFAULT_MSG  GIO_LIBRARIES GIO_MAIN_INCLUDE_DIR)

 mark_as_advanced(GIO_INCLUDE_DIR GIO_LIBRARIES)
-


qi_install_python: fix default destination on windows

Change-Id: I3837212a17041c6977fe33f8a4b4c6f3281f250d
Reviewed-on: http://gerrit.aldebaran.lan/52143
Tested-by: gerrit
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/install.cmake
+++ cmake/qibuild/install.cmake
@@ -274,7 +274,7 @@
     set(_qi_sdk_python_site_packages "${QI_SDK_LIB}")
   else()
     if(WIN32)
-      set(_qi_sdk_python_site_packages "${QI_SDK_LIB}/Lib/site-packages")
+      set(_qi_sdk_python_site_packages "${QI_SDK_LIB}")
     else()
       if(NOT APPLE AND DEFINED PYTHON_INSTALL_SCHEME AND "${PYTHON_INSTALL_SCHEME}" STREQUAL "DEBIAN")
         set(_qi_sdk_python_site_packages "${QI_SDK_LIB}/python${_python_version_major}/dist-packages")


some nacl toolchain glitches in mingw

some nacl toolchain glitches in mingw

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

 set(PLATFORM_PREFIX ${DEPS_DIR}/pnacl/bin)
 set(PLATFORM_TRIPLET "pnacl")
-if (MSVC)
+if (WIN32)
     set(PNACL_BIN_EXT ".bat")
 else()
     set(PNACL_BIN_EXT "")
@@ -57,18 +57,20 @@
     if (NOT PYTHONINTERP_FOUND)
         message(FATAL_ERROR "Please set the PNACLPYTHON environment variable to your Python2 executable")
     endif()
-    set(PNACLPYTHON_PREFIX "env PNACLPYTHON=${PYTHON_EXECUTABLE}")
-    set(PNACLPYTHON_PREFIX2 env "PNACLPYTHON=${PYTHON_EXECUTABLE}")
+    set(PNACLPYTHON_PREFIX "env PNACLPYTHON=${PYTHON_EXECUTABLE} ")
+    set(PNACLPYTHON_PREFIX2 env "PNACLPYTHON=${PYTHON_EXECUTABLE} ")
 endif()

-set(CMAKE_C_CREATE_STATIC_LIBRARY "${PNACLPYTHON_PREFIX} <CMAKE_AR> rc <TARGET> <LINK_FLAGS> <OBJECTS>")
-set(CMAKE_CXX_CREATE_STATIC_LIBRARY "${PNACLPYTHON_PREFIX} <CMAKE_AR> rc <TARGET> <LINK_FLAGS> <OBJECTS>")
+# These commands can fail on windows if there is a space at the beginning

-set(CMAKE_C_COMPILE_OBJECT "${PNACLPYTHON_PREFIX} <CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
-set(CMAKE_CXX_COMPILE_OBJECT "${PNACLPYTHON_PREFIX} <CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+set(CMAKE_C_CREATE_STATIC_LIBRARY "${PNACLPYTHON_PREFIX}<CMAKE_AR> rc <TARGET> <LINK_FLAGS> <OBJECTS>")
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY "${PNACLPYTHON_PREFIX}<CMAKE_AR> rc <TARGET> <LINK_FLAGS> <OBJECTS>")

-set(CMAKE_C_LINK_EXECUTABLE "${PNACLPYTHON_PREFIX} <CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-set(CMAKE_CXX_LINK_EXECUTABLE "${PNACLPYTHON_PREFIX} <CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+set(CMAKE_C_COMPILE_OBJECT "${PNACLPYTHON_PREFIX}<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+set(CMAKE_CXX_COMPILE_OBJECT "${PNACLPYTHON_PREFIX}<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
+
+set(CMAKE_C_LINK_EXECUTABLE "${PNACLPYTHON_PREFIX}<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+set(CMAKE_CXX_LINK_EXECUTABLE "${PNACLPYTHON_PREFIX}<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")

 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)


Updated to match efm32-base

Updated to match efm32-base


MSVC: Remove some cmake commands that were causing the build to fail

--- msvc/Custom-vs.cmake
+++ msvc/Custom-vs.cmake
@@ -1,25 +1,12 @@
 # CUSTOM PROPERTIES TO SET
 # GLOBAL
-
-find_package(FLTK REQUIRED)
-find_package(Java)
-find_package(JNI)
-find_package(PythonLibs)
-find_package(SWIG REQUIRED)
-
-# TODO: Get this to work.
-# find_package(VSTSDK2X)
-
-set(CMAKE_VERBOSE_MAKEFILE ON)
-# set(Eigen3_DIR "D:\\msys64\\home\\restore\\vcpkg\\packages\\eigen3_x64-windows\\share\\eigen3")
-# find_package (Eigen3 3.3 REQUIRED NO_MODULE)

 # Csound build options for MSVC
 set(BUILD_BUCHLA_OPCODES ON)
 set(BUILD_CHUA_OPCODES ON)
 set(BUILD_CSBEATS ON)
 set(BUILD_CSOUNDVST ON)
-set(BUILD_CSOUND_AC ON)
+set(BUILD_CSOUND_AC OFF)
 set(BUILD_CSOUND_AC_LUA_INTERFACE OFF)
 set(BUILD_CSOUND_AC_PYTHON_INTERFACE ON)
 set(BUILD_CUDA_OPCODES OFF)
@@ -83,6 +70,7 @@

 # Misc build options
 set(HAVE_BIG_ENDIAN 0)
+set(CMAKE_VERBOSE_MAKEFILE ON)
 set(CMAKE_16BIT_TYPE "unsigned short")
 set(FAIL_MISSING OFF) # Enable when packaging
 set(CMAKE_PREFIX_PATH "${PROJECT_SOURCE_DIR}\\msvc\\deps;${PROJECT_SOURCE_DIR}\\msvc\\deps\\swigwin-3.0.12;${PROJECT_SOURCE_DIR}\\msvc\\deps\\win_flex_bison;${PROJECT_SOURCE_DIR}\\msvc\\deps\\fluidsynthdeps")
@@ -103,6 +91,3 @@
 # - C4477 format string type differences
 set(CMAKE_C_FLAGS "${CMAKE_CX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4996 /wd4047 /wd4090 /wd4477")
-
-find_path(SYSTEM_INCLUDE_DIR zlib.h)
-include_directories(${SYSTEM_INCLUDE_DIR})


Rename to install_app_component_symlink

Rename to install_app_component_symlink

--- functions.cmake
+++ functions.cmake
@@ -691,7 +691,7 @@
     install_symlink(lib/jars/${NAME}-${PARAM_CLASSIFIER}.jar conf/configserver-app/components/${NAME}.jar)
 endfunction()

-function(install_components_symlink APPNAME NAME)
+function(install_app_component_symlink APPNAME NAME)
     cmake_parse_arguments(
         PARAM
         ""


Add c++11 support to nvcc

Add c++11 support to nvcc

--- cmake/Cuda.cmake
+++ cmake/Cuda.cmake
@@ -206,6 +206,7 @@
 endforeach()

 # Set C++11 support
+list(APPEND CUDA_NVCC_FLAGS "-std=c++11")
 list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC")

 # Set :expt-relaxed-constexpr to suppress Eigen warnings


external zlib

external zlib

--- cmake/ExternalZlib.cmake
+++ cmake/ExternalZlib.cmake
@@ -13,7 +13,10 @@
             -DCMAKE_INSTALL_MESSAGE:BOOL=LAZY
             -DCMAKE_INSTALL_PREFIX:STRING=${FAST_EXTERNAL_INSTALL_DIR}
 )
-
-set(ZLIB_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
+if(WIN32)
+	set(ZLIB_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/zlibd.lib)
+else(WIN32)
+	set(ZLIB_LIBRARY ${FAST_EXTERNAL_INSTALL_DIR}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}z${CMAKE_SHARED_LIBRARY_SUFFIX})
+endif(WIN32)
 list(APPEND LIBRARIES ${ZLIB_LIBRARY})
 list(APPEND FAST_EXTERNAL_DEPENDENCIES zlib)


cmake: Print module versions in summary

cmake: Print module versions in summary

Makes helping with build issues easier as we readily see what versions
are being used.
Cmake already prints the version but only when run the first time and
not on subsequent calls, so the information is often lost

--- cmake/common/utils.cmake
+++ cmake/common/utils.cmake
@@ -13,6 +13,13 @@
 # colored_option {{{

 function(colored_option text flag)
+  # Append version of option, if ${flag}_VERSION is set
+  set(version ${${flag}_VERSION})
+
+  if(NOT "${version}" STREQUAL "")
+    set(text "${text} (${version})")
+  endif()
+
   if(${flag})
     message_colored(STATUS "[X]${text}" "32;1")
   else()
@@ -233,6 +240,9 @@
     elseif(${type} STREQUAL "pkg-config")
       find_package(PkgConfig REQUIRED)
       pkg_check_modules(PKG_${flag} REQUIRED ${pkg})
+
+      # Set packet version so that it can be used in the summary
+      set(${flag}_VERSION ${PKG_${flag}_VERSION} PARENT_SCOPE)
       list(APPEND ${out_library} ${PKG_${flag}_LIBRARIES})
       list(APPEND ${out_include_dirs} ${PKG_${flag}_INCLUDE_DIRS})
     else()


remove legacy target in cmake/util.cmake

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -53,118 +53,3 @@
                 "-Wl,--end-group")
     endif()
 endfunction()
-
-# compile_cu_as_cpp
-# Make a cu file compiled as C++
-# Arguments: Source files
-macro(compile_cu_as_cpp)
-    foreach(s ${ARGN})
-        set_source_files_properties(${s} PROPERTIES LANGUAGE CXX)
-        set_source_files_properties(${s} PROPERTIES COMPILE_FLAGS "-x c++")
-    endforeach()
-endmacro()
-
-# link_paddle_exe
-# add paddle library for a paddle executable, such as trainer, pserver.
-#
-# It will handle WITH_PYTHON etc.
-function(link_paddle_exe TARGET_NAME)
-    if(WITH_RDMA)
-        generate_rdma_links()
-    endif()
-
-    if(MOBILE_INFERENCE)
-        target_circle_link_libraries(${TARGET_NAME}
-            ARCHIVE_START
-            paddle_gserver
-            paddle_function
-            ARCHIVE_END
-            paddle_math
-            paddle_utils
-            paddle_parameter
-            paddle_proto
-            paddle_cuda
-            ${EXTERNAL_LIBS}
-            ${CMAKE_THREAD_LIBS_INIT}
-            ${CMAKE_DL_LIBS}
-            ${RDMA_LD_FLAGS}
-            ${RDMA_LIBS})
-    else()
-        target_circle_link_libraries(${TARGET_NAME}
-            ARCHIVE_START
-            paddle_gserver
-            paddle_function
-            ARCHIVE_END
-            paddle_pserver
-            paddle_trainer_lib
-            paddle_network
-            paddle_math
-            paddle_utils
-            paddle_parameter
-            paddle_proto
-            paddle_cuda
-            paddle_optimizer
-            ${EXTERNAL_LIBS}
-            ${CMAKE_THREAD_LIBS_INIT}
-            ${CMAKE_DL_LIBS}
-            ${RDMA_LD_FLAGS}
-            ${RDMA_LIBS})
-    endif()
-
-    if(ANDROID)
-        target_link_libraries(${TARGET_NAME} log)
-    endif(ANDROID)
-
-    if(WITH_MKLML AND MKLML_LIB_DIR AND MKLML_IOMP_LIB)
-      target_link_libraries(${TARGET_NAME} "-L${MKLML_LIB_DIR} -liomp5 -Wl,--as-needed")
-    endif()
-
-    add_dependencies(${TARGET_NAME} ${external_project_dependencies})
-endfunction()
-
-# link_paddle_test
-# Link a paddle unittest for target
-# TARGET_NAME: the unittest target name
-# Rest Arguemnts: not used.
-function(link_paddle_test TARGET_NAME)
-    link_paddle_exe(${TARGET_NAME})
-    target_link_libraries(${TARGET_NAME}
-                          paddle_test_main
-                          paddle_test_util
-                          ${GTEST_LIBRARIES})
-endfunction()
-
-# add_unittest_without_exec
-#
-# create a paddle unittest. not specifically define how to run this unittest.
-# TARGET_NAME: the unittest target name, same as executable file name
-# Rest Arguments: the source files to compile this unittest.
-macro(add_unittest_without_exec TARGET_NAME)
-    add_executable(${TARGET_NAME} ${ARGN})
-    link_paddle_test(${TARGET_NAME})
-endmacro()
-
-# add_unittest
-# create a paddle unittest and just to execute this binary to make unittest.
-#
-# TARGET_NAME: the unittest target name, same as executable file name
-# Rest Arguments: the source files to compile this unittest.
-macro(add_unittest TARGET_NAME)
-    add_unittest_without_exec(${TARGET_NAME} ${ARGN})
-    add_test(${TARGET_NAME} ${TARGET_NAME})
-endmacro()
-
-# add_simple_unittest
-# create a paddle unittest with file name. It just compile ${TARGET_NAME}.cpp to
-# ${TARGET_NAME} and then execute it.
-macro(add_simple_unittest TARGET_NAME)
-    add_unittest(${TARGET_NAME} ${TARGET_NAME}.cpp)
-endmacro()
-
-# Creates C resources file from files in given resource file
-function(create_resources res_file output_file)
-  add_custom_command(
-    OUTPUT ${output_file}
-    COMMAND python ARGS ${PADDLE_SOURCE_DIR}/cmake/make_resource.py ${res_file} ${output_file}
-    DEPENDS ${res_file} ${PADDLE_SOURCE_DIR}/cmake/make_resource.py)
-endfunction()


Set MACOSX_BUNDLE_ICON_FILE to icon.icns and fix copying of file

--- BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
+++ BlueBerry/CMake/FunctionCreateBlueBerryApplication.cmake
@@ -114,10 +114,12 @@
 # Add executable icon (Mac)
 # -----------------------------------------------------------------------
 if(APPLE)
-  if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns")
-    set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns")
-    file(COPY ${MACOSX_BUNDLE_ICON_FILE} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/")
-    file(INSTALL ${MACOSX_BUNDLE_ICON_FILE} DESTINATION "${_APP_NAME}.app/Contents/Resources/")
+  set(icon_name "icon.icns")
+  set(icon_full_path "${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon_name}")
+  if(EXISTS "${icon_full_path}")
+    set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${icon_name}")
+    file(COPY ${icon_full_path} "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/")
+    INSTALL (FILES ${icon_full_path} DESTINATION "${_APP_NAME}.app/Contents/Resources/")
   endif()
 endif()


cmake: fix build type debug

cmake: fix build type debug

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -121,7 +121,7 @@

 # linker stuff
 set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) # this removed -rdynamic from linker output
-if (CMAKE_BUILD_TYPE MATCHES DEBUG)
+if (CMAKE_BUILD_TYPE STREQUAL "Debug")
   set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -o <TARGET> <LINK_FLAGS> <OBJECTS> ${CRTI} --start-group <LINK_LIBRARIES> --end-group ${CRTN}")
 else()
   set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_LINKER> -S -o <TARGET> <LINK_FLAGS> <OBJECTS> ${CRTI} --start-group <LINK_LIBRARIES> --end-group ${CRTN}")
@@ -160,7 +160,7 @@
   target_link_libraries(${ELF_TARGET} ${LIBRARIES})

   # TODO: if not debug strip
-  if (CMAKE_BUILD_TYPE MATCHES DEBUG)
+  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(STRIP_LV )
   else()
     set(STRIP_LV ${CMAKE_STRIP} --strip-all ${CMAKE_CURRENT_BINARY_DIR}/${TARGET})


CMake: Bugfix, bail out with a prominent error message if the build type for a client project is unsupported

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@28831 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
+++ deal.II/cmake/macros/macro_deal_ii_initialize_cached_variables.cmake
@@ -35,6 +35,9 @@
       )
   ENDIF()

+  #
+  # Set build type according to available libraries
+  #
   IF(DEAL_II_BUILD_TYPE MATCHES "Debug")
     SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING
       "Choose the type of build, options are: Debug, Release"
@@ -42,6 +45,25 @@
   ELSE()
     SET(CMAKE_BUILD_TYPE "Release" CACHE STRING
       "Choose the type of build, options are: Debug, Release"
+      )
+  ENDIF()
+
+  #
+  # Bail out if build type is unknown...
+  #
+  IF( NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Release" AND
+      NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
+    MESSAGE(FATAL_ERROR
+      "\nCMAKE_BUILD_TYPE does neither match Release nor Debug!\n\n"
+      )
+  ENDIF()
+  #
+  # ... or unsupported
+  #
+  IF(NOT DEAL_II_BUILD_TYPE MATCHES "${CMAKE_BUILD_TYPE}")
+    MESSAGE(FATAL_ERROR "\n"
+      "CMAKE_BUILD_TYPE \"${CMAKE_BUILD_TYPE}\" unsupported by current installation!\n"
+      "deal.II was build with \"${DEAL_II_BUILD_TYPE}\" only build type.\n\n"
       )
   ENDIF()


Fixed introduced bug which prevents locating dependencies even if directly specified.

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -1527,7 +1527,7 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH "${CMAKE_SOURCE_DIR}" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )


support large files (>4G) in file functions like stat(2)

svn path=/trunk/kdesupport/strigi/; revision=697354


windows: default to c++17

windows: default to c++17

Summary:
While compiling EdenFS on Windows, for every single file being compiled,
cl.exe complains that 2 incompatible /std option are being passed in on the
command line, a c++latest, and a c++17. The former is added by this file,
while the later is added by cmake via CMAKE_CXX_STANDARD.

I'm not exactly sure why the default is set to c++latest, but it's guaranteed
to always force cl.exe to generate a warning, as it simply cannot be set via
CMAKE_CXX_STANDARD.

A better fix to this would be to set CMAKE_CXX_STANDARD to 17, but since
folly still supports cmake 3.0, that didn't know about c++17, this can't
be done.

Reviewed By: yfeldblum

Differential Revision: D21392360

fbshipit-source-id: fc0e29ed89adf0a2c0b0193e7bd5f033463ed376

--- CMake/FollyCompilerMSVC.cmake
+++ CMake/FollyCompilerMSVC.cmake
@@ -39,7 +39,7 @@
   message(FATAL_ERROR "MSVC_FAVORED_ARCHITECTURE must be set to one of exactly, 'blend', 'AMD64', 'INTEL64', or 'ATOM'! Got '${MSVC_FAVORED_ARCHITECTURE}' instead!")
 endif()

-set(MSVC_LANGUAGE_VERSION "c++latest" CACHE STRING "One of 'c++17', or 'c++latest'. This determines which version of C++ to compile as.")
+set(MSVC_LANGUAGE_VERSION "c++17" CACHE STRING "One of 'c++17', or 'c++latest'. This determines which version of C++ to compile as.")
 set_property(
   CACHE MSVC_LANGUAGE_VERSION
   PROPERTY STRINGS


folly: remove warning->error promotion from cmake build

Summary:
Running down various warning/error issues is proving
to be a tiresome game of wackamole.   Here's the latest issue:

```
folly/container/test/F14TestUtil.h:400:16: error: ?void* mem
      std::memcpy(p, &n, sizeof(std::size_t));
      ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_algobase.h:64,
                  from /opt/rh/devtoolset-8/root/usr/include/c++/8/bits/char_traits.h:39,
                  from /opt/rh/devtoolset-8/root/usr/include/c++/8/string:40,
                  from /opt/rh/devtoolset-8/root/usr/include/c++/8/stdexcept:39,
                  from /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/shipit/folly/folly/container/F14Map.h:30,
                  from /data/users/wez/scratch/dataZusersZwezZfbsource/fbcode_builder_getdeps/shipit/folly/folly/container/test/F14MapTest.cpp:17
/opt/rh/devtoolset-8/root/usr/include/c++/8/bits/stl_pair.h:198:12: note: ?struct std::pair<const std::basic_string<char>, int>? declared here
      struct pair
            ^~~~
```

The targeted solution is to use `-Wno-class-memaccess` as we do with our
internal builds, but that is a gcc-specific option that fails when used with
the apple clang compiler.

The simplest option is just to disable warning->error promotion in
the cmake build, as it feels like a losing battle to keep chasing
the different combinations/permutations.

Reviewed By: yfeldblum

Differential Revision: D14702575

fbshipit-source-id: d8daa6c9588e7c84c991a0ef86baf700bd32fe8c

--- CMake/FollyCompilerUnix.cmake
+++ CMake/FollyCompilerUnix.cmake
@@ -34,7 +34,6 @@
       -std=${CXX_STD}
       -finput-charset=UTF-8
       -fsigned-char
-      -Werror
       -Wall
       -Wno-deprecated
       -Wno-deprecated-declarations


COMP: ITKModuleExternal: Reset targets file

This comment ensures that the targets file remains the same between
two successive configuration.

Change-Id: I6a050baad5cd6dc6cc072862809e45f372fd33d1

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -97,6 +97,7 @@
 file(MAKE_DIRECTORY ${${itk-module}-targets-build-directory})
 set(${itk-module}-targets-build "${${itk-module}-targets-build-directory}/${itk-module}Targets.cmake")
 set(${itk-module}_TARGETS_FILE_BUILD "${${itk-module}-targets-build}")
+file(WRITE "${${itk-module}_TARGETS_FILE_BUILD}" "") # Clear targets
 set(${itk-module}_ENABLE_SHARED "${ITK_MODULE_${itk-module}_ENABLE_SHARED}")
 itk_module_impl()


FindOGRE.cmake now detects Boost even when Ogre is not statically compiled.

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -290,7 +290,7 @@
       set(OGRE_DEPS_FOUND FALSE)
 	endif ()
   endif ()
-
+endif()
   if (OGRE_CONFIG_THREADS)
     if (OGRE_CONFIG_THREAD_PROVIDER EQUAL 1)
       if (OGRE_STATIC)
@@ -301,7 +301,7 @@
       endif()

       set(OGRE_BOOST_COMPONENTS thread date_time)
-
+      find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
       if(Boost_FOUND AND Boost_VERSION GREATER 104900)
         if(Boost_VERSION GREATER 105300)
             set(OGRE_BOOST_COMPONENTS thread date_time system atomic chrono)
@@ -335,7 +335,7 @@
       endif ()
     endif ()
   endif ()
-
+if (OGRE_STATIC)
   if (NOT OGRE_DEPS_FOUND)
     pkg_message(OGRE "Could not find all required dependencies for the Ogre package.")
     set(OGRE_FOUND FALSE)


Enable Eigen Alignment only on Linux

Enable Eigen Alignment only on Linux

Also rename the CMake variable to EIGEN_DONT_ALIGN since it matches the
name of the parameter.

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -123,8 +123,13 @@
 	add_definitions( -D_POSIX_C_SOURCE=200809L )  # request POSIX APIs
 endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")

-option(EIGEN3_DONT_ALIGN "Disable alignment of vectors in Eigen " ON)
-mark_as_advanced(EIGEN3_DONT_ALIGN)
-if(EIGEN3_DONT_ALIGN)
+# Eigen Alignment, enabled on Linux by default
+if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+	option(EIGEN_DONT_ALIGN "Disable alignment of vectors in Eigen" OFF)
+else(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+	option(EIGEN_DONT_ALIGN "Disable alignment of vectors in Eigen" ON)
+endif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
+mark_as_advanced(EIGEN_DONT_ALIGN)
+if(EIGEN_DONT_ALIGN)
 	add_definitions( -DEIGEN_DONT_ALIGN )
-endif(EIGEN3_DONT_ALIGN)
+endif(EIGEN_DONT_ALIGN)


corrected md5sum

corrected md5sum

--- armadillo.cmake
+++ armadillo.cmake
@@ -15,7 +15,7 @@
 external_source (armadillo
     4.000.2
     armadillo-4.000.2.tar.gz
-    b2891c7b59b96337c154c5d961fd40
+    b2891c7b59b96337c154c5d961fd40fb
     http://downloads.sourceforge.net/project/arma
     "FORCE"
     )


CMake: Do not set `CMAKE_AR`

CMake: Do not set `CMAKE_AR`

The variable for archiver is automatically set by CMake. There is
no need to explicitly set it, unless a project really needs to
override the default archiver.

--- tools/cmake/toolchains/ARM.cmake
+++ tools/cmake/toolchains/ARM.cmake
@@ -4,7 +4,6 @@
 set(CMAKE_ASM_COMPILER "armclang")
 set(CMAKE_C_COMPILER "armclang")
 set(CMAKE_CXX_COMPILER "armclang")
-set(CMAKE_AR "armar")
 set(ARM_ELF2BIN "fromelf")
 set_property(GLOBAL PROPERTY ELF2BIN ${ARM_ELF2BIN})


Split off 7.10.32

Split off 7.10.32

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

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


fix cmake script overwriting compiler path

This fixes #2343

--- cmake/download_test_data.cmake
+++ cmake/download_test_data.cmake
@@ -48,7 +48,7 @@
 # determine the compiler (for debug and support purposes)
 if (MSVC)
     execute_process(COMMAND ${CMAKE_CXX_COMPILER} OUTPUT_VARIABLE CXX_VERSION_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_VARIABLE CXX_VERSION_RESULT ERROR_STRIP_TRAILING_WHITESPACE)
-    set(CMAKE_CXX_COMPILER "${CXX_VERSION_RESULT}; MSVC_VERSION=${MSVC_VERSION}; MSVC_TOOLSET_VERSION=${MSVC_TOOLSET_VERSION}")
+    set(CXX_VERSION_RESULT "${CXX_VERSION_RESULT}; MSVC_VERSION=${MSVC_VERSION}; MSVC_TOOLSET_VERSION=${MSVC_TOOLSET_VERSION}")
 else()
     execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version OUTPUT_VARIABLE CXX_VERSION_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()


FFMPEG requires libbz2 when being statically linked.

--- cmake/modules/FindFFMPEG.cmake
+++ cmake/modules/FindFFMPEG.cmake
@@ -111,6 +111,11 @@
   /usr/lib
 )

+FIND_LIBRARY(FFMPEG_bz2_LIBRARY bz2
+  /usr/local/lib
+  /usr/lib
+)
+
 SET(FFMPEG_LIBRARIES)
 IF(FFMPEG_INCLUDE_DIR)
   IF(FFMPEG_avformat_LIBRARY)
@@ -158,6 +163,10 @@
           LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_z_LIBRARY})
         ENDIF(FFMPEG_z_LIBRARY)

+        IF(FFMPEG_bz2_LIBRARY)
+          LIST(APPEND FFMPEG_LIBRARIES ${FFMPEG_bz2_LIBRARY})
+        ENDIF(FFMPEG_bz2_LIBRARY)
+
         SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} CACHE INTERNAL "All presently found FFMPEG libraries.")

       ENDIF(FFMPEG_avutil_LIBRARY)


Use the correct Python lib for each build configuration generated by the Visual Studio CMake generator

Summary:
Previously `CMAKE_BUILD_TYPE` was used to determine whether to link in `python27.lib` or `python27_d.lib`, unfortunately this only works reliably when using a CMake generator that generates a single build configuration (e.g. Ninja). The Visual Studio CMake generator generates four build configurations at once (`Debug`, `Release`, `RelWithDebInfo`, `MinSizeRel`), so if `CMAKE_BUILD_TYPE` is set to `Debug` all four build configurations end up linking in `python27_d.lib`, this is clearly undesirable.

To ensure that the correct Python lib is used for each build configuration the value of `PYTHON_LIBRARY` is now determined using generator expressions that evaluate to either the debug or release Python lib. The values of `PYTHON_EXECUTABLE` and `PYTHON_DLL` are now likewise determined using generator expressions.

Note that these changes only apply to the Windows build.

Patch by Vadim Macagon. Thanks!

Reviewers: zturner, brucem

Subscribers: zturner, lldb-commits

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

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

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -48,15 +48,39 @@
   if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
     if (NOT "${PYTHON_HOME}" STREQUAL "")
       file(TO_CMAKE_PATH "${PYTHON_HOME}" PYTHON_HOME)
-      if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
-        file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_EXECUTABLE)
-        file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/python27_d.lib" PYTHON_LIBRARY)
-        file(TO_CMAKE_PATH "${PYTHON_HOME}/python27_d.dll" PYTHON_DLL)
-      else()
-        file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_EXECUTABLE)
-        file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/python27.lib" PYTHON_LIBRARY)
-        file(TO_CMAKE_PATH "${PYTHON_HOME}/python27.dll" PYTHON_DLL)
-      endif()
+      file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_DEBUG_EXE)
+      file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/python27_d.lib" PYTHON_DEBUG_LIB)
+      file(TO_CMAKE_PATH "${PYTHON_HOME}/python27_d.dll" PYTHON_DEBUG_DLL)
+
+      file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_RELEASE_EXE)
+      file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/python27.lib" PYTHON_RELEASE_LIB)
+      file(TO_CMAKE_PATH "${PYTHON_HOME}/python27.dll" PYTHON_RELEASE_DLL)
+
+      # Generator expressions are evaluated in the context of each build configuration generated
+      # by CMake. Here we use the $<CONFIG:Debug>:VALUE logical generator expression to ensure
+      # that the debug Python library, DLL, and executable are used in the Debug build configuration.
+      #
+      # Generator expressions can be difficult to grok at first so here's a breakdown of the one
+      # used for PYTHON_LIBRARY:
+      #
+      # 1. $<CONFIG:Debug> evaluates to 1 when the Debug configuration is being generated,
+      #    or 0 in all other cases.
+      # 2. $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIB}> expands to ${PYTHON_DEBUG_LIB} when the Debug
+      #    configuration is being generated, or nothing (literally) in all other cases.
+      # 3. $<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_LIB}> expands to ${PYTHON_RELEASE_LIB} when
+      #    any configuration other than Debug is being generated, or nothing in all other cases.
+      # 4. The conditionals in 2 & 3 are mutually exclusive.
+      # 5. A logical expression with a conditional that evaluates to 0 yields no value at all.
+      #
+      # Due to 4 & 5 it's possible to concatenate 2 & 3 to obtain a single value specific to each
+      # build configuration. In this example the value will be ${PYTHON_DEBUG_LIB} when generating the
+      # Debug configuration, or ${PYTHON_RELEASE_LIB} when generating any other configuration.
+      # Note that it's imperative that there is no whitespace between the two expressions, otherwise
+      # CMake will insert a semicolon between the two.
+
+      set (PYTHON_EXECUTABLE $<$<CONFIG:Debug>:${PYTHON_DEBUG_EXE}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_EXE}>)
+      set (PYTHON_LIBRARY $<$<CONFIG:Debug>:${PYTHON_DEBUG_LIB}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_LIB}>)
+      set (PYTHON_DLL $<$<CONFIG:Debug>:${PYTHON_DEBUG_DLL}>$<$<NOT:$<CONFIG:Debug>>:${PYTHON_RELEASE_DLL}>)

       file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIR)
       if (NOT LLDB_RELOCATABLE_PYTHON)