Detecting and building with the Intel compiler ( icc ) . It should fix problem reported in ROOT-5250

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -8,30 +8,26 @@
   set(BIT_ENVIRONMENT "-m64")
   set(SPECIAL_CINT_FLAGS "-DG__64BIT")
   if(CMAKE_COMPILER_IS_GNUCXX)
-    Message(STATUS "Found GNU compiler collection")
-    Set(ROOT_ARCHITECTURE linuxx8664gcc)
-  else(CMAKE_COMPILER_IS_GNUCXX)
-    if(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-      Set(ROOT_ARCHITECTURE linuxx8664icc)
-    else(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-      message(FATAL_ERROR "There is no Setup for this compiler up to now. Don't know what to do. Stop cmake at this point.")
-    endIf(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-  endIf(CMAKE_COMPILER_IS_GNUCXX)
-else(${SYSCTL_OUTPUT} MATCHES x86_64)
+    message(STATUS "Found GNU compiler collection")
+    set(ROOT_ARCHITECTURE linuxx8664gcc)
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)
+    set(ROOT_ARCHITECTURE linuxx8664icc)
+  else()
+    message(FATAL_ERROR "There is no Setup for this compiler up to now. Don't know what to do. Stop cmake at this point.")
+  endif()
+else()
   message(STATUS "Found a 32bit system")
   set(BIT_ENVIRONMENT "-m32")
   set(SPECIAL_CINT_FLAGS "")
   if(CMAKE_COMPILER_IS_GNUCXX)
     message(STATUS "Found GNU compiler collection")
     set(ROOT_ARCHITECTURE linux)
-  else(CMAKE_COMPILER_IS_GNUCXX)
-    if(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-      set(ROOT_ARCHITECTURE linuxicc)
-    else(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-      message(FATAL_ERROR "There is no Setup for this compiler up to now. Don't know what to do. Stop cmake at this point.")
-    endif(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-  endif(CMAKE_COMPILER_IS_GNUCXX)
-endif(${SYSCTL_OUTPUT} MATCHES x86_64)
+  elseif(CMAKE_CXX_COMPILER_ID STREQUAL Linux)
+    set(ROOT_ARCHITECTURE linuxicc)
+  else()
+    message(FATAL_ERROR "There is no Setup for this compiler up to now. Don't know what to do. Stop cmake at this point.")
+  endif()
+endif()

 set(SYSLIBS "-lm -ldl ${CMAKE_THREAD_LIBS_INIT} -rdynamic")
 set(XLIBS "${XPMLIBDIR} ${XPMLIB} ${X11LIBDIR} -lXext -lX11")
@@ -73,85 +69,83 @@

   set(EXEEXT "")
   set(SOEXT "so")
-else(CMAKE_COMPILER_IS_GNUCXX)
-  if(${CMAKE_CXX_COMPILER} MATCHES "icpc")
+
+elseif(CMAKE_CXX_COMPILER_ID STREQUAL Intel)

-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -wd1476")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -restrict")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -wd1476")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -restrict")
+
+  set(CMAKE_Fortran_FLAGS "${CMAKE_FORTRAN_FLAGS} -fPIC")
+
+  set(CINT_CXX_DEFINITIONS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION ${SPECIAL_CINT_FLAGS}")
+  set(CINT_C_DEFINITIONS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION ${SPECIAL_CINT_FLAGS}")
+
+
+  # Check icc compiler version and set compile flags according to the
+  execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v
+                  ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE)
+
+  string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ]([0-9]+)\\.[0-9]+.*" "\\2" ICC_MAJOR "${_icc_version_info}")
+  string(REGEX REPLACE "(^V|^icc[ ]v)ersion[ ][0-9]+\\.([0-9]+).*" "\\2" ICC_MINOR "${_icc_version_info}")
+
+  message(STATUS "Found ICC major version ${ICC_MAJOR}")
+  message(STATUS "Found ICC minor version ${ICC_MINOR}")
+
+  if(ICC_MAJOR EQUAL 9)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd1572")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd1572")
+    set(ICC_GE_9  9)
+  endif()
+
+  if(ICC_MAJOR EQUAL 10)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd1572")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd1572")
+    set(ICC_GE_9  10)
+    if(ICC_MINOR GREATER 0)
+      set(ICC_GE_101 101)
+    endif()
+  endif()
+
+  if(ICC_MAJOR EQUAL 11)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
+    set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
+    #set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} ${BIT_ENVIRONMENT}")
+    #set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${BIT_ENVIRONMENT}")
+    set(ICC_GE_9  11)
+    set(ICC_GE_101 110)
+  endif()
+
+  if(ICC_MAJOR EQUAL 12)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
+    set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
+    #set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} ${BIT_ENVIRONMENT}")
+    #set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${BIT_ENVIRONMENT}")
+    set(ICC_GE_9  12)
+    set(ICC_GE_101 120)
+  endif()
+
+
+  set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
+  set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
+
+
+  # Select flags.
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 -g")
+  set(CMAKE_CXX_FLAGS_RELEASE        "-O")
+  set(CMAKE_CXX_FLAGS_DEBUG          "-g -O")
+  set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O0 -g")
+  set(CMAKE_C_FLAGS_RELEASE          "-O")
+  set(CMAKE_C_FLAGS_DEBUG            "-g -O2")
+
+  #Settings for cint
+  set(CPPPREP "${CMAKE_CXX_COMPILER} -E -C")
+  set(CXXOUT "-o ")
+  set(EXPLICITLINK "no") #TODO
+
+  set(EXEEXT "")
+  set(SOEXT "so")
+
+endif()

-    set(CMAKE_Fortran_FLAGS "${CMAKE_FORTRAN_FLAGS} -fPIC")
-
-    set(CINT_CXX_DEFINITIONS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION ${SPECIAL_CINT_FLAGS}")
-    set(CINT_C_DEFINITIONS "-DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__STD_EXCEPTION ${SPECIAL_CINT_FLAGS}")
-
-
-    # Check icc compiler version and set compile flags according to the
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -v
-                    ERROR_VARIABLE _icc_version_info ERROR_STRIP_TRAILING_WHITESPACE)
-
-    string(REGEX REPLACE "^Version[ ]([0-9]+)\\.[0-9]+.*" "\\1" ICC_MAJOR "${_icc_version_info}")
-    string(REGEX REPLACE "^Version[ ][0-9]+\\.([0-9]+).*" "\\1" ICC_MINOR "${_icc_version_info}")
-
-    message(STATUS "Found ICC major version ${ICC_MAJOR}")
-    message(STATUS "Found ICC minor version ${ICC_MINOR}")
-
-    if(ICC_MAJOR EQUAL 9)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd1572")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd1572")
-      set(ICC_GE_9  9)
-    endif(ICC_MAJOR EQUAL 9)
-
-    if(ICC_MAJOR EQUAL 10)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd1572")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -wd1572")
-      set(ICC_GE_9  10)
-      if(ICC_MINOR GREATER 0)
-        set(ICC_GE_101 101)
-      endif(ICC_MINOR GREATER 0)
-    endif(ICC_MAJOR EQUAL 10)
-
-    if(ICC_MAJOR EQUAL 11)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-      set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
-      #set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} ${BIT_ENVIRONMENT}")
-      #set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${BIT_ENVIRONMENT}")
-      set(ICC_GE_9  11)
-      set(ICC_GE_101 110)
-    endif(ICC_MAJOR EQUAL 11)
-
-    if(ICC_MAJOR EQUAL 12)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${BIT_ENVIRONMENT} -wd1572 -wd279")
-      set(CMAKE_SHARED_LINKER_FLAGS "${BIT_ENVIRONMENT} -Wl,--no-undefined")
-      #set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} ${BIT_ENVIRONMENT}")
-      #set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} ${BIT_ENVIRONMENT}")
-      set(ICC_GE_9  12)
-      set(ICC_GE_101 120)
-    endif(ICC_MAJOR EQUAL 12)
-
-
-    set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
-    set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")
-
-
-    # Select flags.
-    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 -g")
-    set(CMAKE_CXX_FLAGS_RELEASE        "-O")
-    set(CMAKE_CXX_FLAGS_DEBUG          "-g -O")
-    set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O0 -g")
-    set(CMAKE_C_FLAGS_RELEASE          "-O")
-    set(CMAKE_C_FLAGS_DEBUG            "-g -O2")
-
-    #Settings for cint
-    set(CPPPREP "${CMAKE_CXX_COMPILER} -E -C")
-    set(CXXOUT "-o ")
-    set(EXPLICITLINK "no") #TODO
-
-    set(EXEEXT "")
-    set(SOEXT "so")
-  else(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-
-  endif(${CMAKE_CXX_COMPILER} MATCHES "icpc")
-endif(CMAKE_COMPILER_IS_GNUCXX)
-


cmake: improved variable handling in zephyr_check_cache()

A cache variable specified by the user as `-DVAR=value` will have the
type UNINITIALIZED in the CMake cache.

Later CMake re-runs will execute the line:
set(${variable} ${CACHED_${variable}} CACHE STRING
    "Selected ${variable_text}" FORCE)

This will update the cache type from UNINITIALIZED to STRING and thus
may be picked up by other tools as a change.

To ensure the type is initialized to string, this is added:
set(${variable} ${${variable}} CACHE STRING "Selected ${variable_text}")

This code will not change the value of an existing CMake cache variable
because there is no FORCE, but what it will do is to update the cache
variable type to STRING.

As part of this, include the existing parent scope setting of variable
inside the `if(DEFINED ...)` as there is no reason to clear a variable
there is not having a value.

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

--- cmake/modules/extensions.cmake
+++ cmake/modules/extensions.cmake
@@ -2461,8 +2461,11 @@
     )
   endif()

-  # Store the specified variable in parent scope and the cache
-  set(${variable} ${${variable}} PARENT_SCOPE)
+  if(DEFINED ${variable})
+    # Store the specified variable in parent scope and the cache
+    set(${variable} ${${variable}} PARENT_SCOPE)
+    set(${variable} ${${variable}} CACHE STRING "Selected ${variable_text}")
+  endif()
   set(CACHED_${variable} ${${variable}} CACHE STRING "Selected ${variable_text}")

   if(CACHE_VAR_WATCH)


Working Build System

Working Build System

--- cmake/platform/Propeller.cmake
+++ cmake/platform/Propeller.cmake
@@ -663,7 +663,9 @@
     "-m${${TARGET_NAME}_MM}"
     "-m${${TARGET_NAME}_MM}")

-    target_link_libraries("${EXE_TARGET}" ${LIB_TARGETS})
+    target_link_libraries("${EXE_TARGET}"
+    "-Wl,--start-group" ${LIB_TARGETS} "-Wl,--end-group")
+
     setup_upload("${EXE_TARGET}")

 endfunction()


fix HDF5 include var inconsistencies on some installations

Change-Id: I54d750bc2be7829f1c5ab71e19b741e43e5a72ef

--- VAD_HDF5.cmake
+++ VAD_HDF5.cmake
@@ -12,7 +12,7 @@

   if (NOT TARGET hdf5_cpp)
     add_library(hdf5_cpp INTERFACE IMPORTED)
-    set_target_properties(hdf5_cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HDF5_CXX_INCLUDE_DIRS}")
+    set_target_properties(hdf5_cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HDF5_CXX_INCLUDE_DIRS};${HDF5_CXX_INCLUDE_DIR}")
     set_target_properties(hdf5_cpp PROPERTIES INTERFACE_LINK_LIBRARIES "${HDF5_CXX_LIBRARIES}")
   endif()
 endfunction()


Use a single call to APPEND for all files

--- rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_opensplice_cpp/cmake/rosidl_typesupport_opensplice_cpp_generate_interfaces.cmake
@@ -35,31 +35,33 @@
   get_filename_component(_extension "${_idl_file}" EXT)
   if("${_extension}" STREQUAL ".msg")
     get_filename_component(name "${_idl_file}" NAME_WE)
-    list(APPEND _generated_files "${_output_path}/${name}_.h")
-    list(APPEND _generated_files "${_output_path}/${name}_.cpp")
-    list(APPEND _generated_files "${_output_path}/${name}_Dcps.h")
-    list(APPEND _generated_files "${_output_path}/${name}_Dcps.cpp")
-    list(APPEND _generated_files "${_output_path}/${name}_Dcps_impl.h")
-    list(APPEND _generated_files "${_output_path}/${name}_Dcps_impl.cpp")
-    list(APPEND _generated_files "${_output_path}/${name}_SplDcps.h")
-    list(APPEND _generated_files "${_output_path}/${name}_SplDcps.cpp")
-    list(APPEND _generated_files "${_output_path}/ccpp_${name}_.h")
-    list(APPEND _generated_files "${_output_path}/${name}_TypeSupport.h")
-    list(APPEND _generated_files "${_output_path}/${name}_TypeSupport.cpp")
+    list(APPEND _generated_files
+      "${_output_path}/${name}_.h"
+      "${_output_path}/${name}_.cpp"
+      "${_output_path}/${name}_Dcps.h"
+      "${_output_path}/${name}_Dcps.cpp"
+      "${_output_path}/${name}_Dcps_impl.h"
+      "${_output_path}/${name}_Dcps_impl.cpp"
+      "${_output_path}/${name}_SplDcps.h"
+      "${_output_path}/${name}_SplDcps.cpp"
+      "${_output_path}/ccpp_${name}_.h"
+      "${_output_path}/${name}_TypeSupport.h"
+      "${_output_path}/${name}_TypeSupport.cpp")
   elseif("${_extension}" STREQUAL ".srv")
     get_filename_component(name "${_idl_file}" NAME_WE)
     list(APPEND _generated_files "${_output_path}/${name}_ServiceTypeSupport.cpp")

     foreach(_suffix Request Response)
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_.h")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_.cpp")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_Dcps.h")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_Dcps.cpp")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_Dcps_impl.h")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_Dcps_impl.cpp")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_SplDcps.h")
-      list(APPEND _generated_files "${_output_path}/Sample${name}${_suffix}_SplDcps.cpp")
-      list(APPEND _generated_files "${_output_path}/ccpp_Sample${name}${_suffix}_.h")
+      list(APPEND _generated_files
+        "${_output_path}/Sample${name}${_suffix}_.h"
+        "${_output_path}/Sample${name}${_suffix}_.cpp"
+        "${_output_path}/Sample${name}${_suffix}_Dcps.h"
+        "${_output_path}/Sample${name}${_suffix}_Dcps.cpp"
+        "${_output_path}/Sample${name}${_suffix}_Dcps_impl.h"
+        "${_output_path}/Sample${name}${_suffix}_Dcps_impl.cpp"
+        "${_output_path}/Sample${name}${_suffix}_SplDcps.h"
+        "${_output_path}/Sample${name}${_suffix}_SplDcps.cpp"
+        "${_output_path}/ccpp_Sample${name}${_suffix}_.h")
     endforeach()
   endif()
 endforeach()


PROTON-1752: Update library versions after ABI review

--- proton-c/versions.cmake
+++ proton-c/versions.cmake
@@ -1,19 +1,19 @@
 set(PN_LIB_CORE_MAJOR_VERSION 10)
-set(PN_LIB_CORE_MINOR_VERSION 2)
-set(PN_LIB_CORE_PATCH_VERSION 1)
+set(PN_LIB_CORE_MINOR_VERSION 3)
+set(PN_LIB_CORE_PATCH_VERSION 0)
 set(PN_LIB_CORE_VERSION "${PN_LIB_CORE_MAJOR_VERSION}.${PN_LIB_CORE_MINOR_VERSION}.${PN_LIB_CORE_PATCH_VERSION}")

 set(PN_LIB_PROACTOR_MAJOR_VERSION 1)
 set(PN_LIB_PROACTOR_MINOR_VERSION 2)
-set(PN_LIB_PROACTOR_PATCH_VERSION 0)
+set(PN_LIB_PROACTOR_PATCH_VERSION 1)
 set(PN_LIB_PROACTOR_VERSION "${PN_LIB_PROACTOR_MAJOR_VERSION}.${PN_LIB_PROACTOR_MINOR_VERSION}.${PN_LIB_PROACTOR_PATCH_VERSION}")

 set(PN_LIB_LEGACY_MAJOR_VERSION 11)
-set(PN_LIB_LEGACY_MINOR_VERSION 2)
+set(PN_LIB_LEGACY_MINOR_VERSION 3)
 set(PN_LIB_LEGACY_PATCH_VERSION 0)
 set(PN_LIB_LEGACY_VERSION "${PN_LIB_LEGACY_MAJOR_VERSION}.${PN_LIB_LEGACY_MINOR_VERSION}.${PN_LIB_LEGACY_PATCH_VERSION}")

 set(PN_LIB_CPP_MAJOR_VERSION 11)
 set(PN_LIB_CPP_MINOR_VERSION 2)
-set(PN_LIB_CPP_PATCH_VERSION 0)
+set(PN_LIB_CPP_PATCH_VERSION 1)
 set(PN_LIB_CPP_VERSION "${PN_LIB_CPP_MAJOR_VERSION}.${PN_LIB_CPP_MINOR_VERSION}.${PN_LIB_CPP_PATCH_VERSION}")


Fix cpp proto list

Fix cpp proto list

--- cmake/cpp.cmake
+++ cmake/cpp.cmake
@@ -240,7 +240,17 @@
 # Generate Protobuf cpp sources
 set(PROTO_HDRS)
 set(PROTO_SRCS)
-file(GLOB_RECURSE proto_files RELATIVE ${PROJECT_SOURCE_DIR} "ortools/*.proto")
+file(GLOB_RECURSE proto_files RELATIVE ${PROJECT_SOURCE_DIR}
+  "ortools/bop/*.proto"
+  "ortools/constraint_solver/*.proto"
+  "ortools/data/*.proto"
+  "ortools/glop/*.proto"
+  "ortools/graph/*.proto"
+  "ortools/linear_solver/*.proto"
+  "ortools/sat/*.proto"
+  "ortools/util/*.proto"
+  "ortools/linear_solver/*.proto"
+  )

 # Get Protobuf include dir
 get_target_property(protobuf_dirs protobuf::libprotobuf INTERFACE_INCLUDE_DIRECTORIES)


formatting

formatting

--- cmake/icc.cmake
+++ cmake/icc.cmake
@@ -38,19 +38,19 @@
 # check whether GCC (and therefore standard library) version is new enough for
 # C++11 on Linux systems
 IF (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
-	SET(GCC_VERSION_REQUIRED "4.8.0")
+  SET(GCC_VERSION_REQUIRED "4.8.0")

-	IF(NOT GCC_VERSION)
-	  EXECUTE_PROCESS(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE)
-	  SET(GCC_VERSION ${GCC_OUTPUT} CACHE STRING "GCC Version")
-	  MARK_AS_ADVANCED(GCC_VERSION)
-	ENDIF()
+  IF(NOT GCC_VERSION)
+    EXECUTE_PROCESS(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_OUTPUT OUTPUT_STRIP_TRAILING_WHITESPACE)
+    SET(GCC_VERSION ${GCC_OUTPUT} CACHE STRING "GCC Version")
+    MARK_AS_ADVANCED(GCC_VERSION)
+  ENDIF()

-	IF (GCC_VERSION VERSION_LESS GCC_VERSION_REQUIRED AND NOT OSPRAY_WARNED_GCC_VERSION)
-		# only warn as another libstdc++ could be in the library path...
-	  MESSAGE(WARNING "GCC version 4.8.0 or greater is required for a sufficient version of libstdc++.")
-	  SET(OSPRAY_WARNED_GCC_VERSION ON CACHE INTERNAL "Warned about required GCC version.")
-	ENDIF()
+  IF (GCC_VERSION VERSION_LESS GCC_VERSION_REQUIRED AND NOT OSPRAY_WARNED_GCC_VERSION)
+        # only warn as another libstdc++ could be in the library path...
+    MESSAGE(WARNING "GCC version 4.8.0 or greater is required for a sufficient version of libstdc++.")
+    SET(OSPRAY_WARNED_GCC_VERSION ON CACHE INTERNAL "Warned about required GCC version.")
+  ENDIF()
 ENDIF()

 SET(OSPRAY_COMPILER_SUPPORTS_AVX  TRUE)


Updated lua macros

Updated lua macros

--- cmake/lua.cmake
+++ cmake/lua.cmake
@@ -54,11 +54,13 @@
         DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_name}
     )
     # Install with run permissions
-    install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${_name} DESTINATION ${INSTALL_BIN} )
+    install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${_name} DESTINATION ${INSTALL_BIN} COMPONENT Runtime)
   else()
     # Add .lua suffix and install as is
     install ( PROGRAMS ${_source} DESTINATION ${INSTALL_BIN}
-            RENAME ${_source_name}.lua )
+            RENAME ${_source_name}.lua
+            COMPONENT Runtime
+    )
   endif()
 endmacro ()

@@ -102,7 +104,9 @@

     if ( ${is_install} )
       install ( FILES ${_first_source} DESTINATION ${INSTALL_LMOD}/${_module_dir}
-                RENAME ${_module_filename} )
+                RENAME ${_module_filename}
+                COMPONENT Runtime
+      )
     endif ()
   else ()  # Lua C binary module
     enable_language ( C )
@@ -123,7 +127,7 @@
     set_target_properties ( ${_target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY
                 "${_module_dir}" PREFIX "" OUTPUT_NAME "${_module_filenamebase}" )
     if ( ${is_install} )
-      install ( TARGETS ${_target} DESTINATION ${INSTALL_CMOD}/${_module_dir})
+      install ( TARGETS ${_target} DESTINATION ${INSTALL_CMOD}/${_module_dir} COMPONENT Runtime)
     endif ()
   endif ()
 endmacro ()


Make sure the RE2 library is compiled with maximal optimization.

--- cmake/re2.cmake
+++ cmake/re2.cmake
@@ -9,7 +9,7 @@
   PATCH_COMMAND ""

   SOURCE_DIR "${CMAKE_SOURCE_DIR}/ext/re2-2017-05-01"
-  CMAKE_ARGS -BUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=True -DCMAKE_INSTALL_PREFIX=${GLOBAL_OUTPUT_PATH}/re2
+  CMAKE_ARGS -BUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=True -DCMAKE_INSTALL_PREFIX=${GLOBAL_OUTPUT_PATH}/re2

   TEST_COMMAND ""
 )


CMake: Bugfix: Only run "make sign" if it is necessary

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31718 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
@@ -97,11 +97,15 @@

   IF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
     IF(DEFINED OSX_CERTIFICATE_NAME)
-      ADD_CUSTOM_TARGET(sign ALL
+      ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_BINARY_DIR}/${TARGET}.signed
         COMMAND codesign -f -s ${OSX_CERTIFICATE_NAME} ${TARGET}
+        COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/${TARGET}.signed
         COMMENT "Digitally signing ${TARGET}"
         DEPENDS ${TARGET}
         VERBATIM
+        )
+      ADD_CUSTOM_TARGET(sign ALL
+        DEPENDS ${CMAKE_BINARY_DIR}/${TARGET}.signed
         )
       ADD_DEPENDENCIES(run sign)
     ELSE()


Update FindQwt to find only upcoming 6.0 release.

--- cmake/FindQwt.cmake
+++ cmake/FindQwt.cmake
@@ -4,9 +4,9 @@
 ## Copyright (C) 2008-2011 - Julien Wintz, Inria.
 ## Created: Mon Jun  6 16:20:06 2011 (+0200)
 ## Version: $Id$
-## Last-Updated: Tue Jun  7 15:13:19 2011 (+0200)
+## Last-Updated: Mon Jul  4 11:49:32 2011 (+0200)
 ##           By: Julien Wintz
-##     Update #: 7
+##     Update #: 8
 ######################################################################
 ##
 ### Commentary:
@@ -26,7 +26,7 @@

 if(QT4_FOUND)

-  find_path(QWT_INCLUDE_DIR qwt.h
+  find_path(QWT_INCLUDE_DIR qwt_plot_renderer.h
     /usr/local/qwt/include
     /usr/local/include
     /usr/include/qwt


cmake: fix multiple shield parsing

cmake: fix multiple shield parsing

When multiple shields are defined, only the shield last in the -DSHIELD
list gets defined in `.config`. This is due to too many backslashes
used defining it for an env setting.

Signed-off-by: Ryan McClelland <8b67290475031698c81d147ec4ac7ae4d9451537@fb.com>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -90,6 +90,8 @@
 # A list of common environment settings used when invoking Kconfig during CMake
 # configure time or menuconfig and related build target.
 string(REPLACE ";" "\\\;" SHIELD_AS_LIST_ESCAPED "${SHIELD_AS_LIST}")
+# cmake commands are escaped differently
+string(REPLACE ";" "\\;" SHIELD_AS_LIST_ESCAPED_COMMAND "${SHIELD_AS_LIST}")

 set(COMMON_KCONFIG_ENV_SETTINGS
   PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
@@ -251,7 +253,7 @@
 execute_process(
   COMMAND ${CMAKE_COMMAND} -E env
   ${COMMON_KCONFIG_ENV_SETTINGS}
-  SHIELD_AS_LIST=${SHIELD_AS_LIST_ESCAPED}
+  SHIELD_AS_LIST=${SHIELD_AS_LIST_ESCAPED_COMMAND}
   ${PYTHON_EXECUTABLE}
   ${ZEPHYR_BASE}/scripts/kconfig/kconfig.py
   --zephyr-base=${ZEPHYR_BASE}


CMake/options: Do not ignore the standard CMAKE_INSTALL_* variables

This makes life much easier for distributions shipping this software,
if things work when the standard variables are set, rather than having
to special-case `yubico-piv-tool` and its `YKPIV_INSTALL_*` variables.

See https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -28,6 +28,7 @@
 #These are the Variables that can be overridden with the command line arguments in the form:
 # cmake -DVARIABLE1=VALUE1 -DVARIABLE2=VALUE2

+include(GNUInstallDirs)
 option(BUILD_ONLY_LIB "Build only the library" OFF)
 option(BUILD_STATIC_LIB "Buid static libraries" ON)
 option(ENABLE_HARDWARE_TESTS "Enable/disable tests that require a YubiKey to be plugged in" OFF)
@@ -49,21 +50,21 @@

 # Set various install paths
 if (NOT DEFINED YKPIV_INSTALL_LIB_DIR)
-    set(YKPIV_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "Installation directory for libraries")
+    set(YKPIV_INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "Installation directory for libraries")
 endif ()

 if (NOT DEFINED YKPIV_INSTALL_INC_DIR)
-    set(YKPIV_INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation directory for headers")
+    set(YKPIV_INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH "Installation directory for headers")
 endif ()

 if (NOT DEFINED YKPIV_INSTALL_BIN_DIR)
-    set(YKPIV_INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
+    set(YKPIV_INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}" CACHE PATH "Installation directory for executables")
 endif ()

 if (NOT DEFINED YKPIV_INSTALL_MAN_DIR)
-    set(YKPIV_INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man" CACHE PATH "Installation directory for manual pages")
+    set(YKPIV_INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_MANDIR}" CACHE PATH "Installation directory for manual pages")
 endif ()

 if (NOT DEFINED YKPIV_INSTALL_PKGCONFIG_DIR)
-    set(YKPIV_INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
+    set(YKPIV_INSTALL_PKGCONFIG_DIR "${YKPIV_INSTALL_LIB_DIR}/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
 endif ()


ENH: skip OpenMP on Windows

ENH: skip OpenMP on Windows

--- cmake/DependenciesConfig.cmake
+++ cmake/DependenciesConfig.cmake
@@ -14,7 +14,10 @@
 endmacro(configure_mpi)

 macro(configure_openmp)
-  if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
+  if (MSVC)
+    message ("Skipped check for OpenMP (Windows)")
+    set(OPENMP_FOUND FALSE)
+  elseif(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
     message ("Dependency check for OpenMP")

     find_package(OpenMP)


Corrected typos in python embed detection for cmake

git-svn-id: 39e099a8ed5324aded674b764a67f7a08796d9a7@2018 662fdd30-d327-0410-a531-f549c87e1e9e

--- cmake/TestForPythonEmbed.cmake
+++ cmake/TestForPythonEmbed.cmake
@@ -18,8 +18,8 @@

 " PY_EMBED)
 	IF(PY_EMBED)
-	    MESSAGE(STATUS "Python is embeddable")
-	    SET(PYTHON_EMEDABLE TRUE)
+	    MESSAGE(STATUS "Python is embedable")
+	    SET(PYTHON_EMBEDABLE TRUE)
 	ELSE(PY_EMBED)
 	    MESSAGE(STATUS "Python is not embedable")
 	    SET(PYTHON_EMBEDABLE FALSE)


:loud_sound: add compiler version output

--- cmake/download_test_data.cmake
+++ cmake/download_test_data.cmake
@@ -16,11 +16,36 @@
 # determine the operating system (for debug and support purposes)
 find_program(UNAME_COMMAND uname)
 find_program(VER_COMMAND ver)
+find_program(LSB_RELEASE_COMMAND lsb_release)
+find_program(SW_VERS_COMMAND sw_vers)
+set(OS_VERSION_STRINGS "${CMAKE_SYSTEM}")
+if (VER_COMMAND)
+    execute_process(COMMAND ${VER_COMMAND} OUTPUT_VARIABLE VER_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
+    set(OS_VERSION_STRINGS "${OS_VERSION_STRINGS}; ${VER_COMMAND_RESULT}")
+endif()
+if (SW_VERS_COMMAND)
+    execute_process(COMMAND ${SW_VERS_COMMAND} OUTPUT_VARIABLE SW_VERS_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
+    string(REGEX REPLACE "[ ]*\n" "; " SW_VERS_COMMAND_RESULT "${SW_VERS_COMMAND_RESULT}")
+    set(OS_VERSION_STRINGS "${OS_VERSION_STRINGS}; ${SW_VERS_COMMAND_RESULT}")
+endif()
+if (LSB_RELEASE_COMMAND)
+    execute_process(COMMAND ${LSB_RELEASE_COMMAND} -a OUTPUT_VARIABLE LSB_RELEASE_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
+    string(REGEX REPLACE "[ ]*\n" "; " LSB_RELEASE_COMMAND_RESULT "${LSB_RELEASE_COMMAND_RESULT}")
+    set(OS_VERSION_STRINGS "${OS_VERSION_STRINGS}; ${LSB_RELEASE_COMMAND_RESULT}")
+endif()
 if (UNAME_COMMAND)
     execute_process(COMMAND ${UNAME_COMMAND} -a OUTPUT_VARIABLE UNAME_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
-if (VER_COMMAND)
-    execute_process(COMMAND ${VER_COMMAND} OUTPUT_VARIABLE VER_COMMAND_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE)
+    set(OS_VERSION_STRINGS "${OS_VERSION_STRINGS}; ${UNAME_COMMAND_RESULT}")
 endif()

-message(STATUS "Operating system: ${UNAME_COMMAND_RESULT} ${VER_COMMAND_RESULT} ${CMAKE_SYSTEM}")
+message(STATUS "Operating system: ${OS_VERSION_STRINGS}")
+
+# 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)
+    set(CMAKE_CXX_COMPILER "${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()
+string(REGEX REPLACE "[ ]*\n" "; " CXX_VERSION_RESULT "${CXX_VERSION_RESULT}")
+message(STATUS "Compiler: ${CXX_VERSION_RESULT}")


Backport changes to the download page to the master branch.

--- doc/www-data.in/download.cmake
+++ doc/www-data.in/download.cmake
@@ -115,7 +115,7 @@

 We maintain an always up-to-date Debian GNU/Linux and Ubuntu package
 repository at http://tarantoo.org/dist/debian and http://tarantool.org/dist/debian and http://tarantool.org/dist/ubuntu respectively.

 At the moment the repository contains builds for Debian "Sid", "Squeeze",
@@ -129,6 +129,20 @@
     sudo apt-get update
     sudo apt-get install tarantool tarantool-client

+### CentOS 5-6 GNU/Linux
+
+CentOS GNU/Linux repository is available at
+http://tarantool.org/dist/centos.
+
+Add the following section to your yum repository list (/etc/yum.repos.d/tarantool.repo)
+to enable it:
+
+    [tarantool]
+    name=CentOS-$releasever - Tarantool
+    baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/
+    enabled=1
+    gpgcheck=0
+
 # Development branch

 In the same manner as for [the stable
@@ -262,7 +276,7 @@
 Мы поддерживаем собственные репозитории .deb пакетов, который
 содержит последние версии сервера и клиентских библиотек для
 *Debian GNU/Linux* и  *Ubuntu*:
-http://tarantoo.org/dist/debian,
+http://tarantool.org/dist/debian,
 http://tarantool.org/dist/ubuntu.

 Репозитории содержат пакеты для Debian "Sid", "Squeeze",
@@ -277,6 +291,18 @@
     sudo apt-get update
     sudo apt-get install tarantool tarantool-client

+CentOS GNU/Linux репозиторий доступен по адресу:
+http://tarantool.org/dist/centos.
+
+Добавьте следующую секцию в Ваш список репозиториев
+(/etc/yum.repos.d/tarantool.repo) чтобы сделать его доступным для Yum:
+
+    [tarantool]
+    name=CentOS-$releasever - Tarantool
+    baseurl=http://tarantool.org/dist/centos/$releasever/os/$basearch/
+    enabled=1
+    gpgcheck=0
+
 ### Архив старых релизов

 Архив старых релизов доступен по адресу <a


GCCXML is not needed in ROOT6

GCCXML is not needed in ROOT6

--- cmake/modules/FindGCCXML.cmake
+++ cmake/modules/FindGCCXML.cmake
@@ -1,16 +0,0 @@
-# - Try to find GCCXML
-#
-#  GCCXML_EXECUTABLE  - path to the GCCXML executable
-#  GCCXML_FOUND       - True if GCCXML found.
-
-
-find_program(GCCXML_EXECUTABLE NAMES gccxml)
-
-if(GCCXML_EXECUTABLE)
-  set(GCCXML_FOUND TRUE)
-endif()
-
-mark_as_advanced(
-  GCCXML_EXECUTABLE
-)
-


CMakeLists.txt: Add manual libusb search, useful for *bsd

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

--- cmake/modules/FindHidApi.cmake
+++ cmake/modules/FindHidApi.cmake
@@ -40,13 +40,16 @@

 if((NOT HIDAPI_FOUND))
   message(STATUS "hidapi not found via pkg-config, trying find_library()")
-  find_library(HIDAPI NAMES hidapi-hidraw hidapi-libusb hidapi)
+  find_library(HIDAPI NAMES hidapi-libusb)
   if (NOT HIDAPI)
     message(STATUS "Failed to find system installation of hidapi")
   else()
     message(STATUS "Found HIDAPI: ${HIDAPI}")
+    find_library(LIBUSB libusb)
+    message(STATUS "Found HIDAPI: ${LIBUSB}")
     set(HIDAPI_LIBRARIES "${HIDAPI}")
-    set(HIDAPI_STATIC_LIBRARIES "${HIDAPI}")
+    set(LIBUSB_LIBRARIES "${HIDAPI}")
+    set(HIDAPI_STATIC_LIBRARIES "${HIDAPI} ${LIBUSB}")
     set(HIDAPI_FOUND YES)
     find_path(HIDAPI_INCLUDE_DIRS hidapi/hidapi.h)
     message(STATUS "Include files in: ${HIDAPI_INCLUDE_DIRS}")


Reland "[cmake] Move common code out of the condition."

This reverts commit 3af89d4c15aa540f3fb8ed51c4842bef61083281.

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -413,19 +413,19 @@
   #---Set the library output directory-----------------------
   ROOT_GET_LIBRARY_OUTPUT_DIR(library_output_dir)
   set (runtime_cxxmodule_dependencies )
+  set(library_name ${libprefix}${library_target_name}${libsuffix})
+  set(newargs -s ${library_output_dir}/${library_name})
+  set(rootmap_name ${library_output_dir}/${libprefix}${library_target_name}.rootmap)
   if(ARG_MODULE)
     set(cpp_module)
-    set(library_name ${libprefix}${library_target_name}${libsuffix})
-    set(newargs -s ${library_output_dir}/${library_name})
     set(master_pcm_name ${library_output_dir}/${libprefix}${library_target_name}_rdict.pcm)
     if(ARG_MULTIDICT)
       set(newargs ${newargs} -multiDict)
       set(pcm_name ${library_output_dir}/${libprefix}${library_target_name}_${dictionary}_rdict.pcm)
-      set(rootmap_name ${library_output_dir}/${libprefix}${library_target_name}.rootmap)
+      set(rootmap_name ${library_output_dir}/${libprefix}${library_target_name}32.rootmap)
     else()
       set(cpp_module ${library_target_name})
       set(pcm_name ${master_pcm_name})
-      set(rootmap_name ${library_output_dir}/${libprefix}${library_target_name}.rootmap)
     endif(ARG_MULTIDICT)

     if(runtime_cxxmodules)
@@ -444,10 +444,7 @@
       endif(cpp_module)
     endif()
   else()
-    set(library_name ${libprefix}${library_target_name}${libsuffix})
-    set(newargs -s ${library_output_dir}/${library_name})
     set(pcm_name ${library_output_dir}/${libprefix}${library_target_name}_rdict.pcm)
-    set(rootmap_name ${library_output_dir}/${libprefix}${library_target_name}.rootmap)
   endif()

   if (ARG_NO_CXXMODULE)


Cleanup of compilation flags for gcc and clang

o no-schedule-insns, no-inline  is not needed at O0

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -59,12 +59,12 @@
   # Select flags.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG")
-  set(CMAKE_CXX_FLAGS_DEBUG          "-g  -fno-reorder-blocks -fno-schedule-insns -fno-inline")
-  set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline")
-  set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+  set(CMAKE_CXX_FLAGS_DEBUG          "-g")
+  set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3")
+  set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -ftest-coverage -fprofile-arcs")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -DNDEBUG")
   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG")
-  set(CMAKE_C_FLAGS_DEBUG            "-g  -fno-reorder-blocks -fno-schedule-insns -fno-inline")
+  set(CMAKE_C_FLAGS_DEBUG            "-g")
   set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline")
   set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs")

@@ -94,14 +94,14 @@
   # Select flags.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG")
-  set(CMAKE_CXX_FLAGS_DEBUG          "-g -fno-schedule-insns -fno-inline")
-  set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3 -fno-inline")
-  set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+  set(CMAKE_CXX_FLAGS_DEBUG          "-g")
+  set(CMAKE_CXX_FLAGS_DEBUGFULL      "-g3")
+  set(CMAKE_CXX_FLAGS_PROFILE        "-g3 -ftest-coverage -fprofile-arcs")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -DNDEBUG")
   set(CMAKE_C_FLAGS_RELEASE          "-O2 -DNDEBUG")
-  set(CMAKE_C_FLAGS_DEBUG            "-g  -fno-schedule-insns -fno-inline")
-  set(CMAKE_C_FLAGS_DEBUGFULL        "-g3 -fno-inline")
-  set(CMAKE_C_FLAGS_PROFILE          "-g3 -fno-inline -ftest-coverage -fprofile-arcs")
+  set(CMAKE_C_FLAGS_DEBUG            "-g")
+  set(CMAKE_C_FLAGS_DEBUGFULL        "-g3")
+  set(CMAKE_C_FLAGS_PROFILE          "-g3 -ftest-coverage -fprofile-arcs")

   #Settings for cint
   set(CPPPREP "${CXX} -E -C")


Removed cmake line that set CUDA_FOUND to false if the CUDA driver library was not found.


CMake GCC ARM: use nosys specs for linker

Use retarged version (nosys.specs) for Mbed OS. To resolve an issue with debug/develop profiles.
Otherwise we get kill or getpid errors from linker, as we use nosys lib but no specs defined.

--- cmake/toolchains/GCC_ARM.cmake
+++ cmake/toolchains/GCC_ARM.cmake
@@ -9,15 +9,15 @@

 list(APPEND link_options
     "-Wl,--start-group"
-    "-lstdc++"
-    "-lsupc++"
-    "-lm"
-    "-lc"
-    "-lgcc"
-    "-lnosys"
+        "-lstdc++"
+        "-lsupc++"
+        "-lm"
+        "-lc"
+        "-lgcc"
+        "-lnosys"
     "-Wl,--end-group"
-    "-T"
-    "${CMAKE_BINARY_DIR}/${APP_TARGET}.link_script.ld"
+    "-specs=nosys.specs"
+    "-T" "${CMAKE_BINARY_DIR}/${APP_TARGET}.link_script.ld"
 )

 list(APPEND common_options


simpler FindCXX11HashMapAndSet

simpler FindCXX11HashMapAndSet

--- src/stx/cmake/FindCXX11HashMapAndSet.cmake
+++ src/stx/cmake/FindCXX11HashMapAndSet.cmake
@@ -28,27 +28,30 @@
 STRING(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION})
 LIST(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
 LIST(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
-SET(HAVE_HASH_MAP 0)
+SET(HAVE_HASH_MAP 1)
 SET(HASH_MAP_CLASS unordered_map)

 #Check for all of the possible combinations of unordered_map and hash_map
-FOREACH(header tr1/unordered_map unordered_map)
-    FOREACH(namespace std::tr1 std )
-        IF(HAVE_HASH_MAP EQUAL 0 AND NOT STL_HASH_OLD_GCC)
-            CONFIGURE_FILE("${CMAKE_CURRENT_LIST_DIR}/TestHashMap.cc.in" "${CMAKE_CURRENT_BINARY_DIR}/TestHashMap.cc")
-            TRY_COMPILE(HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_BINARY_DIR}/TestHashMap.cc")
-            IF (HASH_MAP_COMPILE_RESULT AND HASH_MAP_RUN_RESULT EQUAL 1)
-                SET(HASH_MAP_H <${header}>)
-                STRING(REPLACE "map" "set" HASH_SET_H ${HASH_MAP_H})
-                SET(HASH_NAMESPACE ${namespace})
-                SET(HASH_MAP_CLASS unordered_map)
-                SET(HASH_SET_CLASS unordered_set)
-                SET(HAVE_HASH_MAP 1)
-                SET(HAVE_HASH_SET 1)
-            ENDIF()
-        ENDIF()
-    ENDFOREACH(namespace)
-ENDFOREACH(header)
+IF (HAVE_HASH_MAP EQUAL 0)
+  FOREACH(header tr1/unordered_map unordered_map)
+      FOREACH(namespace std::tr1 std )
+          IF(HAVE_HASH_MAP EQUAL 0 AND NOT STL_HASH_OLD_GCC)
+              CONFIGURE_FILE("${CMAKE_CURRENT_LIST_DIR}/TestHashMap.cc.in" "${CMAKE_CURRENT_BINARY_DIR}/TestHashMap.cc")
+              TRY_COMPILE(HASH_MAP_COMPILE_RESULT ${PROJECT_BINARY_DIR}/CMakeTmp "${CMAKE_CURRENT_BINARY_DIR}/TestHashMap.cc")
+              IF (HASH_MAP_COMPILE_RESULT AND HASH_MAP_RUN_RESULT EQUAL 1)
+                  SET(HASH_MAP_H <${header}>)
+                  STRING(REPLACE "map" "set" HASH_SET_H ${HASH_MAP_H})
+                  SET(HASH_NAMESPACE ${namespace})
+                  SET(HASH_MAP_CLASS unordered_map)
+                  SET(HASH_SET_CLASS unordered_set)
+                  SET(HAVE_HASH_MAP 1)
+                  SET(HAVE_HASH_SET 1)
+              ENDIF()
+          ENDIF()
+      ENDFOREACH(namespace)
+  ENDFOREACH(header)
+ENDIF()
+
 IF (HAVE_HASH_MAP EQUAL 0)
     SET(HASH_MAP_CLASS hash_map)
     FOREACH(header ext/hash_map hash_map)


Print compile flags in the order they are used during the build

The flags for a build type are always appended to the other compile
flags, including those set by the user.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -232,8 +232,8 @@
 " GLIBCXX_USE_CXX11_ABI)

 #---Print the final compiler flags--------------------------------------------------------------------
+string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE)
 message(STATUS "ROOT Platform: ${ROOT_PLATFORM}")
 message(STATUS "ROOT Architecture: ${ROOT_ARCHITECTURE}")
-string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
-message(STATUS "Build Type: ${CMAKE_BUILD_TYPE} (flags = '${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}')")
-message(STATUS "Compiler Flags: ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${CMAKE_CXX_FLAGS}")
+message(STATUS "Build Type: '${CMAKE_BUILD_TYPE}' (flags = '${CMAKE_CXX_FLAGS_${BUILD_TYPE}}')")
+message(STATUS "Compiler Flags: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BUILD_TYPE}}")


HPCC-23794 remove compiler version detection from Nagios

--- cmake_modules/nmCommonSetup.cmake
+++ cmake_modules/nmCommonSetup.cmake
@@ -175,12 +175,6 @@
   if ("${CMAKE_C_COMPILER_ID}" MATCHES "Clang")
    set (CMAKE_COMPILER_IS_CLANG 1)
   endif()
-  if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG)
-    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-  endif ()
-  if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
-    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CMAKE_CXX_COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-  endif ()

   if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
     set ( CMAKE_BUILD_TYPE "Release" )


removed MATLAB_ROOT for Gadgetron

removed MATLAB_ROOT for Gadgetron

variable is obsolete, but we don't really want Matlab support
in Gadgetron anyway (for the moment)

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -26,9 +26,6 @@

 # Set dependency list
 set(${proj}_DEPENDENCIES "Boost;HDF5;ISMRMRD;FFTW3double;googletest;Armadillo")
-
-message(STATUS "MATLAB_ROOT=" ${MATLAB_ROOT})
-#message(STATUS "STIR_DIR=" ${STIR_DIR})

 # Include dependent projects if any
 ExternalProject_Include_Dependencies(${proj} DEPENDS_VAR ${proj}_DEPENDENCIES)
@@ -68,7 +65,6 @@
         -DCMAKE_INSTALL_PREFIX=${Gadgetron_Install_Dir}
         -DBOOST_INCLUDEDIR=${BOOST_ROOT}/include/
         -DBOOST_LIBRARYDIR=${BOOST_LIBRARY_DIR}
-        -DMATLAB_ROOT=${MATLAB_ROOT}
         -DGTEST_ROOT=${GTEST_ROOT}
         -DHDF5_ROOT=${HDF5_ROOT}
         -DHDF5_INCLUDE_DIRS=${HDF5_INCLUDE_DIRS}


Fix "cegui_add_dependency_dynamic_libs" and "cegui_add_dependency_static_libs" so that if only debug libraries are available, they link to those libraries.

--- cmake/CEGUIMacros.cmake
+++ cmake/CEGUIMacros.cmake
@@ -87,6 +87,8 @@
             else()
                 target_link_libraries(${_TARGET_NAME} ${${_DEP_NAME}_LIBRARIES})
             endif()
+        elseif (${_DEP_NAME}_LIBRARIES_DBG)
+                target_link_libraries(${_TARGET_NAME} ${${_DEP_NAME}_LIBRARIES_DBG})
         endif()
     endif()
 endmacro()
@@ -110,6 +112,8 @@
             else()
                 target_link_libraries(${_TARGET_NAME} ${${_DEP_NAME}_LIBRARIES_STATIC})
             endif()
+        elseif (${_DEP_NAME}_LIBRARIES_STATIC_DBG)
+            target_link_libraries(${_TARGET_NAME} ${${_DEP_NAME}_LIBRARIES_STATIC_DBG})
         else()
             cegui_add_dependency_dynamic_libs(${_TARGET_NAME} ${_DEP_NAME})
         endif()


Make it possible for MSVC flags to pass try_flags.

--- cmake/DaemonFlags.cmake
+++ cmake/DaemonFlags.cmake
@@ -54,9 +54,19 @@

 function(try_flag LIST FLAG)
     string(REGEX REPLACE "[/=-]" "_" TEST ${FLAG})
-    set(CMAKE_REQUIRED_FLAGS "-Werror")
-    check_CXX_compiler_flag("${FLAG}" ${TEST})
-    set(CMAKE_REQUIRED_FLAGS "")
+    if (MSVC) # check_CXX_compiler_flag apparently always fails for MSVC.
+              # MSVC ignores unknown uptions, so just check if it begins with '/'.
+        string(SUBSTRING "${FLAG}" 0 1 FLAG_FIRST_CHAR)
+        if ("${FLAG_FIRST_CHAR}" STREQUAL "/")
+            set(${TEST} 1)
+        else()
+            set(${TEST} 0)
+        endif()
+    else()
+        set(CMAKE_REQUIRED_FLAGS "-Werror")
+        check_CXX_compiler_flag("${FLAG}" ${TEST})
+        set(CMAKE_REQUIRED_FLAGS "")
+    endif()
     if (${TEST})
         set(${LIST} ${${LIST}} ${FLAG} PARENT_SCOPE)
     endif()


#15: Enable compilation using VS2012+

#15: Enable compilation using VS2012+

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -35,7 +35,7 @@
   else()
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
   endif()
-elseif (MSVC AND MSVC12)
+elseif (MSVC AND (MSVC11 OR MSVC12 OR MSVC13))
   # C++11 support is implicitly enabled.
 else()
   message(FATAL_ERROR "Your compiler does not support C++11 - aborting!")


fixing a typo in PCL_CUDA_ADD_LIBRARY

fixing a typo in PCL_CUDA_ADD_LIBRARY

git-svn-id: 5398946ba177a3e438c2dae55e2cdfc2fb96c905@1734 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -110,7 +110,7 @@
     if(PCL_SHARED_LIBS)
         # to overcome a limitation in cuda_add_library, we add manually PCLAPI_EXPORTS macro
         cuda_add_library(${_name} ${PCL_LIB_TYPE} ${ARGN} OPTIONS -arch sm_20 -DPCLAPI_EXPORTS)
-    elseif(PCL_SHARED_LIBS)
+    else(PCL_SHARED_LIBS)
         cuda_add_library(${_name} ${PCL_LIB_TYPE} ${ARGN} OPTIONS -arch sm_20)
     endif(PCL_SHARED_LIBS)


execute universal build script with /bin/bash to avoid execute permission missing problem

--- toolchains/ios.toolchain.cmake
+++ toolchains/ios.toolchain.cmake
@@ -88,7 +88,7 @@
     add_custom_command(
         TARGET ${target}
         POST_BUILD
-        COMMAND "${TNUN_toolchains_dir}/ios.universal_build.sh"
+        COMMAND /bin/bash "${TNUN_toolchains_dir}/ios.universal_build.sh"
         WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
         VERBATIM
     )


Cleaned up catkin.cmake file

Cleaned up catkin.cmake file

--- catkin.cmake
+++ catkin.cmake
@@ -15,20 +15,19 @@

 include_directories(
     include/${PROJECT_NAME}
-    ${catkin_INCLUDE_DIRS}
     ${Boost_INCLUDE_DIRS}
     ${Eigen_INCLUDE_DIRS}
     ${OMPL_INCLUDE_DIRS}
+    ${OpenRAVE_INCLUDE_DIRS}
     ${TinyXML_INCLUDE_DIRS}
-    ${OpenRAVE_INCLUDE_DIRS}
-    ${Eigen_INCLUDE_DIRS}
+    ${catkin_INCLUDE_DIRS}
 )
 link_directories(
     ${OMPL_LIBRARY_DIRS}
     ${catkin_LIBRARY_DIRS}
 )
 add_definitions(
-  ${Eigen_DEFINITIONS}
+    ${Eigen_DEFINITIONS}
 )

 # Generate the OMPL planner wrappers.
@@ -45,22 +44,22 @@

 # Helper library.
 add_library(${PROJECT_NAME}
+    src/OMPLConversions.cpp
     src/OMPLPlanner.cpp
     src/OMPLSimplifier.cpp
-    src/OMPLConversions.cpp
     src/RobotStateSpace.cpp
+    src/TSR.cpp
     src/TSRChain.cpp
-    src/TSR.cpp
     src/TSRGoal.cpp
     src/TSRRobot.cpp
     "${CMAKE_CURRENT_BINARY_DIR}/src/PlannerRegistry.cpp"
 )
 target_link_libraries(${PROJECT_NAME}
+    ${Boost_LIBRARIES}
+    ${Eigen_LIBRARIES}
+    ${OMPL_LIBRARIES}
     ${OpenRAVE_LIBRARIES}
-    ${OMPL_LIBRARIES}
-    ${Boost_LIBRARIES}
     ${TinyXML_LIBRARIES}
-    ${Eigen_LIBRARIES}
 )

 # OpenRAVE plugin.


Add macros to CMake config to find GLEW and SDL2 the way RM itself does.

--- cmake/osvrRenderManagerConfig.cmake
+++ cmake/osvrRenderManagerConfig.cmake
@@ -50,7 +50,7 @@
 set(OSVRRM_USE_OPENGLES20 @OSVRRM_USE_OPENGLES20@)

 # Helper function to copy required libraries to an install directory
-set(OSVRRM_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}")
+set(OSVRRM_CONFIG_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "" FORCE)
 function(osvrrm_install_dependencies _destination)
 	foreach(_config Debug Release RelWithDebInfo MinSizeRel)
 		string(TOUPPER "${_config}" _CONFIG)
@@ -69,5 +69,21 @@
 	endforeach()
 endfunction()

+# Find SDL2 using the script bundled with RenderManager.
+macro(osvrrm_find_SDL2)
+    set(OSVRRM_PREV_CMAKE_MODULES  ${CMAKE_MODULE_PATH})
+    set(CMAKE_MODULE_PATH "${OSVRRM_CONFIG_DIR}" ${CMAKE_MODULE_PATH})
+    find_package(SDL2 ${ARGN})
+    set(CMAKE_MODULE_PATH ${OSVRRM_PREV_CMAKE_MODULES})
+endmacro()
+
+# Find GLEW using the script bundled with RenderManager.
+macro(osvrrm_find_GLEW)
+    set(OSVRRM_PREV_CMAKE_MODULES  ${CMAKE_MODULE_PATH})
+    set(CMAKE_MODULE_PATH "${OSVRRM_CONFIG_DIR}" ${CMAKE_MODULE_PATH})
+    find_package(GLEW ${ARGN})
+    set(CMAKE_MODULE_PATH ${OSVRRM_PREV_CMAKE_MODULES})
+endmacro()
+
 # Hook for a super-build to optionally inject configuration after target import.
 include("${CMAKE_CURRENT_LIST_DIR}/osvrRenderManagerConfigSuperBuildSuffix.cmake" OPTIONAL)


Async++: cacheable

Async++: cacheable

--- cmake/projects/Async++/hunter.cmake
+++ cmake/projects/Async++/hunter.cmake
@@ -23,4 +23,5 @@
 )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)
+hunter_cacheable(Async++)
 hunter_download(PACKAGE_NAME Async++)


fix infovis

fix infovis

tests segfault when they can't make a vtkTextMapper

Change-Id: I750386307c0dfe8231d9107e956eb5946cddf521

--- Views/Infovis/module.cmake
+++ Views/Infovis/module.cmake
@@ -5,6 +5,7 @@
     vtkRenderingContext2D
     vtkViewsCore
     vtkRenderingLabel
+    vtkRenderingFreeTypeOpenGL
     vtkInfovisLayout
     vtkInteractionStyle
     vtkFiltersModeling


Enable -O3

Enable -O3

--- arch/x86_64/platform.cmake
+++ arch/x86_64/platform.cmake
@@ -3,7 +3,7 @@
     -DX86_64
 )

-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --target=x86_64-pc-none-elf -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --target=x86_64-pc-none-elf -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -O3")
 # Be careful of what you pass in here. Input will go directly to LLD, so no Clang flags allowed
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -T${CMAKE_SOURCE_DIR}/arch/x86_64/mint.lds")
 set(CMAKE_ASM_NASM_COMPILE_OBJECT "${CMAKE_ASM_NASM_COMPILE_OBJECT} -felf64")


Fix compilation with Boost 1.67

Fix compilation with Boost 1.67

The boost_python library has been renamed in Boost 1.67 and the
FindBoost.cmake module requires a Python version suffix:

References:
- https://www.boost.org/docs/libs/1_67_0/libs/python/doc/html/rn.html
- https://cmake.org/cmake/help/v3.12/module/FindBoost.html

Fix taken from:
https://github.com/ros-perception/image_common/pull/85

Without this, on macos where homebrew already updated to 1.67,
compilation otherwise fails with an error like

    Unable to find the requested Boost libraries.

    Boost version: 1.67.0

    Boost include path: /usr/local/include

    Could not find the following Boost libraries:

            boost_python

    Some (but not all) of the required Boost libraries were found.  You may
    need to install these additional Boost libraries.  Alternatively, set
    BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
    to the location of Boost.

--- Schweizer-Messer/python_module/cmake/add_python_export_library.cmake
+++ Schweizer-Messer/python_module/cmake/add_python_export_library.cmake
@@ -67,9 +67,26 @@
   INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})

   if(APPLE)
-    SET(BOOST_COMPONENTS python system)
+    SET(BOOST_COMPONENTS system)
   else()
-    SET(BOOST_COMPONENTS python)
+    SET(BOOST_COMPONENTS)
+  endif()
+  if(PYTHONLIBS_VERSION_STRING VERSION_LESS 3)
+    find_package(Boost QUIET)
+    if(Boost_VERSION LESS 106700)
+      list(APPEND BOOST_COMPONENTS python)
+    else()
+      # The boost_python library has been renamed in Boost 1.67 and the FindBoost.cmake
+      # module requires a Python version suffix:
+      #
+      # References:
+      # - https://www.boost.org/docs/libs/1_67_0/libs/python/doc/html/rn.html
+      # - https://cmake.org/cmake/help/v3.12/module/FindBoost.html
+      #
+      list(APPEND BOOST_COMPONENTS python27)
+    endif()
+  else()
+    list(APPEND BOOST_COMPONENTS python3)
   endif()
   find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})


ENH (#581): Added IAdaptable.cpp to cmake file list

--- Utilities/openCherry/Bundles/org.opencherry.core.runtime/files.cmake
+++ Utilities/openCherry/Bundles/org.opencherry.core.runtime/files.cmake
@@ -1,6 +1,6 @@
 SET(SRC_CPP_FILES
   cherryExpressionVariables.cpp
-  #cherryIAdaptable.cpp
+  cherryIAdaptable.cpp
   cherryIAdapterManager.cpp
   #cherryPlatformObject.cpp
   cherryRuntime.cpp


Make the 'contacts' resource the default address book

svn path=/trunk/KDE/kdepim/; revision=1023760

--- akonadi/defaultsetup/defaultaddressbook.cmake
+++ akonadi/defaultsetup/defaultaddressbook.cmake
@@ -1,9 +1,7 @@
 [Agent]
 Id=defaultaddressbook
-Type=akonadi_vcard_resource
-Name=My Addressbook
+Type=akonadi_contacts_resource
+Name=Personal Contacts

 [Settings]
-Path[$e]=~/${KDE_DEFAULT_HOME}/share/apps/kabc/std.vcf
-AutosaveInterval=1
-
+Path[$e]=$HOME/.local/share/contacts/


Increase cpplint timeout (#90)

Increase cpplint timeout (#90)

* increase cpplint timeout to 120 seconds

* expose timeout and use 120 as default rather than hard coding it

* copy-n-paste

--- ament_cmake_cpplint/cmake/ament_cpplint.cmake
+++ ament_cmake_cpplint/cmake/ament_cpplint.cmake
@@ -24,13 +24,15 @@
 # :type MAX_LINE_LENGTH: integer
 # :param ROOT: override the --root option of cpplint
 # :type ROOT: string
+# :param TIMEOUT: the test timeout in seconds, default: 120
+# :type TIMEOUT: integer
 # :param ARGN: the files or directories to check
 # :type ARGN: list of strings
 #
 # @public
 #
 function(ament_cpplint)
-  cmake_parse_arguments(ARG "" "MAX_LINE_LENGTH;ROOT;TESTNAME" "FILTERS" ${ARGN})
+  cmake_parse_arguments(ARG "" "MAX_LINE_LENGTH;ROOT;TESTNAME;TIMEOUT" "FILTERS" ${ARGN})
   if(NOT ARG_TESTNAME)
     set(ARG_TESTNAME "cpplint")
   endif()
@@ -53,6 +55,9 @@
     list(APPEND cmd "--root" "${ARG_ROOT}")
   endif()
   list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})
+  if(NOT ARG_TIMEOUT)
+    set(ARG_TIMEOUT 120)
+  endif()

   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ament_cpplint")
   ament_add_test(
@@ -61,6 +66,7 @@
     OUTPUT_FILE "${CMAKE_BINARY_DIR}/ament_cpplint/${ARG_TESTNAME}.txt"
     RESULT_FILE "${result_file}"
     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+    TIMEOUT "${ARG_TIMEOUT}"
   )
   set_tests_properties(
     "${ARG_TESTNAME}"


FIX (#1731): Allow my.cdash for dart clients

Changed config back to use of DROP_SITE and CTEST_DROP_SITE in parallel, since some clients seem to prefer the old names

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -3,17 +3,25 @@
 # internal cdash
 set(CTEST_PROJECT_NAME "MITK")
 set(CTEST_NIGHTLY_START_TIME "21:00:00 CET")
+set(NIGHTLY_START_TIME "21:00:00 CET")

 set(CTEST_DROP_METHOD "http")
 set(CTEST_DROP_SITE "mbits")
 set(CTEST_DROP_LOCATION "/cdash/submit.php?project=MITK")
 set(CTEST_DROP_SITE_CDASH TRUE)
+set(DROP_METHOD "http")
+set(DROP_SITE "mbits")
+set(DROP_LOCATION "/cdash/submit.php?project=MITK")
+

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


[FIX] Limit inclusion of doxygen search path

--- Doxyfile.cmake
+++ Doxyfile.cmake
@@ -581,7 +581,7 @@
 # directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.

-INPUT                  = ${PROJECT_SOURCE_DIR}
+INPUT                  = ${PROJECT_SOURCE_DIR}/translator  ${PROJECT_SOURCE_DIR}/runtime ${PROJECT_SOURCE_DIR}/util ${PROJECT_SOURCE_DIR}/common ${PROJECT_SOURCE_DIR}/include

 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is


use correct CFLAG and LDFLAG while build bitcode

Use CFLAG and LDFLAG settings as llvm_compile.py

--- scripts/buildTracerBitcode.cmake
+++ scripts/buildTracerBitcode.cmake
@@ -11,12 +11,12 @@
   set(FULLTRACE_SO "${CMAKE_CURRENT_BINARY_DIR}/../../full-trace/full_trace.so")

   set(CFLAGS "-g" "-static" "-O1" "-fno-slp-vectorize" "-fno-vectorize"
-		"-fno-unroll-loops" "-fno-inline")
+		"-fno-unroll-loops" "-fno-inline" "-fno-builtin")

   set(OPT_FLAGS "-disable-inlining" "-S" "-load=${FULLTRACE_SO}" "-fulltrace")
   set(LLC_FLAGS "-O0" "-disable-fp-elim" "-filetype=asm")
   set(FINAL_CXX_FLAGS "-static" "-O0" "-fno-inline")
-  set(FINAL_CXX_LDFLAGS "-lm" "-lboost_iostreams" "-lz")
+  set(FINAL_CXX_LDFLAGS "-lm" "-lz")


removed FindGLEW.cmake

removed FindGLEW.cmake

--- FindGLEW.cmake
+++ FindGLEW.cmake
@@ -1,46 +0,0 @@
-# Try to find GLEW library and include path.
-  # Once done this will define
-  #
-  # GLEW_FOUND
-  # GLEW_INCLUDE_PATH
-  # GLEW_LIBRARY
-  #
-
-  IF (WIN32)
-          FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
-                  $ENV{PROGRAMFILES}/GLEW/include
-                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
-                  DOC "The directory where GL/glew.h resides")
-          FIND_LIBRARY( GLEW_LIBRARY
-                  NAMES glew GLEW glew32 glew32s
-                  PATHS
-                  $ENV{PROGRAMFILES}/GLEW/lib
-                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
-                  ${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
-                  DOC "The GLEW library")
-  ELSE (WIN32)
-          FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
-                  /usr/include
-                  /usr/local/include
-                  /sw/include
-                  /opt/local/include
-                  DOC "The directory where GL/glew.h resides")
-          FIND_LIBRARY( GLEW_LIBRARY
-                  NAMES GLEW glew
-                  PATHS
-                  /usr/lib64
-                  /usr/lib
-                  /usr/local/lib64
-                  /usr/local/lib
-                  /sw/lib
-                  /opt/local/lib
-                  DOC "The GLEW library")
-  ENDIF (WIN32)
-
-  IF (GLEW_INCLUDE_PATH)
-          SET( GLEW_FOUND 1 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
-  ELSE (GLEW_INCLUDE_PATH)
-          SET( GLEW_FOUND 0 CACHE STRING "Set to 1 if GLEW is found, 0 otherwise")
-  ENDIF (GLEW_INCLUDE_PATH)
-
-  MARK_AS_ADVANCED( GLEW_FOUND )


Fix arc4random detection.

Fix arc4random detection.

Patch by Pascal Stumpf.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -25,7 +25,7 @@
 #cmakedefine ENABLE_TIMESTAMPS ${ENABLE_TIMESTAMPS}

 /* Define to 1 if you have the `arc4random' function. */
-#cmakedefine HAVE_ARC4RANDOM
+#cmakedefine HAVE_DECL_ARC4RANDOM ${HAVE_DECL_ARC4RANDOM}

 /* Define to 1 if you have the `backtrace' function. */
 #cmakedefine HAVE_BACKTRACE ${HAVE_BACKTRACE}


Pass MITK_DATA_DIR in superbuild

Pass MITK_DATA_DIR in superbuild

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -194,6 +194,7 @@
     -DMITK_USE_GDCMIO:BOOL=${MITK_USE_GDCMIO}
     -DMITK_USE_DCMTK:BOOL=${MITK_USE_DCMTK}
     -DMITK_USE_QT:BOOL=${MITK_USE_QT}
+    -DMITK_DATA_DIR:PATH=${MITK_DATA_DIR}

   SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}
   BINARY_DIR ${CMAKE_BINARY_DIR}/MITK-build


Update name of CMake file for linking with dynamic lookup

Change-Id: I6c8b6ac4e6d55b8cf76fede232eba806ddda158b

--- CMake/sitkProjectLanguageCommon.cmake
+++ CMake/sitkProjectLanguageCommon.cmake
@@ -70,6 +70,6 @@

 set ( CMAKE_SWIG_GLOBAL_FLAGS -I${SIMPLEITK_WRAPPING_COMMON_DIR} ${CMAKE_SWIG_GLOBAL_FLAGS} )

-include(sitkExtras)
+include(sitkTargetLinkLibrariesWithDynamicLookup)
 include(sitkStripOption)
 include(sitkForbidDownloadsOption)


CI: adapt the build name

CI: adapt the build name

--- CI/main_ci.cmake
+++ CI/main_ci.cmake
@@ -26,7 +26,12 @@
 set (CTEST_BUILD_CONFIGURATION "Release")
 set (CTEST_CMAKE_GENERATOR "Ninja")

-set (CTEST_BUILD_NAME "$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}_to_$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
+set (CTEST_BUILD_NAME "$ENV{CI_COMMIT_SHORT_SHA}")
+if("$ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" AND "$ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME}")
+  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} to $ENV{CI_MERGE_REQUEST_TARGET_BRANCH_NAME})")
+elseif(("$ENV{CI_COMMIT_REF_NAME}")
+  set (CTEST_BUILD_NAME "${CTEST_BUILD_NAME} ($ENV{CI_COMMIT_SHORT_SHA})")
+endif()
 set (CTEST_SITE "${IMAGE_NAME}")

 # Directory variable


nxphlite-v3:Updated config with upstream naming changes

   Reordering and renaming to match master for v3 config

--- cmake/configs/nuttx_nxphlite-v3_default.cmake
+++ cmake/configs/nuttx_nxphlite-v3_default.cmake
@@ -10,82 +10,89 @@
 	#
 	# Board support modules
 	#
+	drivers/airspeed
+	drivers/blinkm
+#NOT Supported	drivers/bma180
+#NOT Supported	drivers/bmi160
+	drivers/bmp280
+	drivers/boards/nxphlite-v3
+	drivers/bst
+	drivers/camera_trigger
 	drivers/device
+	drivers/ets_airspeed
+	drivers/frsky_telemetry
+	drivers/fxos8700cq
+	drivers/gps
+	drivers/hmc5883
+	drivers/hott
+	drivers/hott/hott_sensors
+	drivers/hott/hott_telemetry
+	drivers/iridiumsbd
 	drivers/kinetis
 	drivers/kinetis/adc
 	drivers/kinetis/tone_alarm
+	drivers/l3gd20
 	drivers/led
-	drivers/px4fmu
-	drivers/boards/nxphlite-v3
-	drivers/rgbled
-	drivers/fxos8700cq
+	drivers/lis3mdl
+	drivers/ll40ls
+	drivers/lsm303d
+	drivers/mb12xx
+	drivers/mkblctrl
+	drivers/mpl3115a2
 	drivers/mpu6000
 	drivers/mpu9250
-	drivers/hmc5883
+	drivers/ms4525_airspeed
+	drivers/ms5525_airspeed
 	drivers/ms5611
-	drivers/mpl3115a2
-	drivers/mb12xx
-	drivers/srf02
+	drivers/oreoled
+# NOT Portable YET drivers/pwm_input
+	drivers/pwm_out_sim
+	drivers/px4flow
+	drivers/px4fmu
+	drivers/rgbled
+	drivers/sdp3x_airspeed
 	drivers/sf0x
 	drivers/sf1xx
-	drivers/ll40ls
+	drivers/snapdragon_rc_pwm
+	drivers/srf02
+	drivers/tap_esc
 	drivers/trone
-	drivers/gps
-	drivers/pwm_out_sim
-	drivers/hott
-	drivers/hott/hott_telemetry
-	drivers/hott/hott_sensors
-	drivers/blinkm
-	drivers/airspeed
-	drivers/ets_airspeed
-	drivers/meas_airspeed
-	drivers/frsky_telemetry
+	drivers/vmount
 	modules/sensors
-	drivers/mkblctrl
-	drivers/px4flow
-	drivers/oreoled
-	drivers/vmount
-# NOT Portable YET drivers/pwm_input
-	drivers/camera_trigger
-	drivers/bst
-	drivers/snapdragon_rc_pwm
-	drivers/lis3mdl
-	drivers/bmp280
-#No External SPI drivers/bma180
-#No External SPI 	drivers/bmi160
-	drivers/tap_esc

 	#
 	# System commands
 	#
 	systemcmds/bl_update
+	systemcmds/config
+	systemcmds/dumpfile
+	systemcmds/esc_calib
+## Needs bbsrm 	systemcmds/hardfault_log
+	systemcmds/led_control
 	systemcmds/mixer
+	systemcmds/motor_ramp
+	systemcmds/mtd
+	systemcmds/nshterm
 	systemcmds/param
 	systemcmds/perf
 	systemcmds/pwm
-	systemcmds/esc_calib
-## Needs bbsrm 	systemcmds/hardfault_log
 	systemcmds/reboot
+	systemcmds/sd_bench
+	systemcmds/top
 	systemcmds/topic_listener
-	systemcmds/top
-	systemcmds/config
-	systemcmds/nshterm
-	systemcmds/mtd
-	systemcmds/dumpfile
+	systemcmds/usb_connected
 	systemcmds/ver
-	systemcmds/sd_bench
-	systemcmds/motor_ramp
-	systemcmds/usb_connected

 	#
 	# Testing
 	#
 	drivers/sf0x/sf0x_tests
-### NOT Portable YET drivers/test_ppm
+### NOT Portable YET 	drivers/test_ppm
+	#lib/rc/rc_tests
 	modules/commander/commander_tests
-	modules/mc_pos_control/mc_pos_control_tests
 	lib/controllib/controllib_test
 	modules/mavlink/mavlink_tests
+	modules/mc_pos_control/mc_pos_control_tests
 	modules/unit_test
 	modules/uORB/uORB_tests
 	systemcmds/tests
@@ -95,21 +102,21 @@
 	#
 	modules/commander
 	modules/events
+	modules/gpio_led
+	modules/land_detector
 	modules/load_mon
+	modules/mavlink
 	modules/navigator
-	modules/mavlink
-	modules/gpio_led
-##NO CAN YET	modules/uavcan
-	modules/land_detector
+#NO UAVCAN YET	modules/uavcan
 	modules/camera_feedback

 	#
-	# Estimation modules (EKF/ SO3 / other filters)
+	# Estimation modules
 	#
 	modules/attitude_estimator_q
-	modules/position_estimator_inav
 	modules/ekf2
 	modules/local_position_estimator
+	modules/position_estimator_inav

 	#
 	# Vehicle Control
@@ -125,17 +132,17 @@
 	#
 	# Logging
 	#
+	modules/logger
 	modules/sdlog2
-	modules/logger

 	#
 	# Library modules
 	#
+	modules/dataman
 	modules/systemlib/param
 	modules/systemlib
 	modules/systemlib/mixer
 	modules/uORB
-	modules/dataman

 	#
 	# Libraries
@@ -175,27 +182,32 @@
 	examples/rover_steering_control

 	#
+	# Segway
+	#
+	examples/segway
+
+	#
 	# Demo apps
 	#
-	#examples/math_demo
+
 	# Tutorial code from
 	# https://px4.io/dev/px4_simple_app
 	examples/px4_simple_app

 	# Tutorial code from
 	# https://px4.io/dev/daemon
-	#examples/px4_daemon_app
+	examples/px4_daemon_app

 	# Tutorial code from
 	# https://px4.io/dev/debug_values
-	#examples/px4_mavlink_debug
+	examples/px4_mavlink_debug

 	# Tutorial code from
 	# https://px4.io/dev/example_fixedwing_control
 	examples/fixedwing_control

 	# Hardware test
-	#examples/hwtest
+	examples/hwtest

 	# EKF
 	examples/ekf_att_pos_estimator


typoe in build_clblas.cmake

typoe in build_clblas.cmake

--- src/cmake/build_clBLAS.cmake
+++ src/cmake/build_clBLAS.cmake
@@ -10,7 +10,7 @@
     STAMP_DIR ${CMAKE_BINARY_DIR}/clBLAS/stamp
     SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/clMathLibraries/clBLAS/src
     PREFIX ${CMAKE_BINARY_DIR}/clBLAS
-    INSTALL_DIR=${CMAKE_INSTALL_PREFIX}
+    INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
     #CONFIGURE_COMMAND ${CMAKE_COMMAND} -Wno-dev "-G${CMAKE_GENERATOR}" <SOURCE_DIR>
     #-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
     #"-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} -w -fPIC"


Reverting mgpu back to main repo.

Reverting mgpu back to main repo.

--- cmake/FetchModernGPU.cmake
+++ cmake/FetchModernGPU.cmake
@@ -8,9 +8,8 @@

 FetchContent_Declare(
     moderngpu
-    GIT_REPOSITORY https://github.com/neoblizz/moderngpu.git
-    # tag at master branch of neoblizz/moderngpu.
-    GIT_TAG        origin/master
+    GIT_REPOSITORY https://github.com/moderngpu/moderngpu.git
+    GIT_TAG        v2.13.0
 )

 FetchContent_GetProperties(moderngpu)


Only use /usr/lib64 on x86_64, ia64 for example still uses /usr/lib

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -113,7 +113,7 @@
 #
 SET(INSTALL_BINDIR_RPM              "bin")
 SET(INSTALL_INCLUDEDIR_RPM          "include/mysql")
-IF(64BIT)
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
   SET(INSTALL_LIBDIR_RPM            "lib64")
 ELSE()
   SET(INSTALL_LIBDIR_RPM            "lib")


Fix: boost optional components finding break the build on UNIX

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

--- cmake/pcl_find_boost.cmake
+++ cmake/pcl_find_boost.cmake
@@ -14,18 +14,16 @@
 # Disable the config mode of find_package(Boost)
 set(Boost_NO_BOOST_CMAKE ON)

-# Optional boost modules
-find_package(Boost 1.40.0 COMPONENTS mpi serialization)
-
 # Required boost modules
 find_package(Boost 1.40.0 REQUIRED COMPONENTS system filesystem thread date_time iostreams)

 if(Boost_FOUND)
   set(BOOST_FOUND TRUE)
+	# Optional boost modules
+	find_package(Boost 1.40.0 COMPONENTS mpi serialization)
   # Obtain diagnostic information about Boost's automatic linking outputted
   # during compilation time.
   add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
-
   include_directories(${Boost_INCLUDE_DIRS})
   link_directories(${Boost_LIBRARY_DIRS})
 endif(Boost_FOUND)


qi_create_python_ext: fix for mac and windows

* set correct name on all platforms

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

--- cmake/qibuild/python.cmake
+++ cmake/qibuild/python.cmake
@@ -123,8 +123,21 @@
   message(STATUS "Python extension: ${target}")
   set_target_properties(${target}
     PROPERTIES PREFIX ""
-    LIBRARY_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${QI_SDK_LIB}/python2.7/site-packages
   )
+  if(UNIX)
+    set_target_properties(${target} PROPERTIES
+      SUFFIX ".so"
+      LIBRARY_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${QI_SDK_LIB}/python2.7/site-packages
+    )
+  endif()
+
+  if(WIN32)
+    set_target_properties(${target} PROPERTIES
+      SUFFIX ".pyd"
+      RUNTIME_OUTPUT_DIRECTORY_RELEASE ${QI_SDK_DIR}/${QI_SDK_LIB}/python2.7/site-packages
+      RUNTIME_OUTPUT_DIRECTORY_DEBUG ${QI_SDK_DIR}/${QI_SDK_LIB}/python2.7/site-packages
+    )
+  endif()

   qi_use_lib(${target} PYTHON)
   qi_install_python(TARGETS ${target} COMPONENT runtime)


python.cmake: make it possible to re-use PYTHON2_EXECUTABLE later

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

--- cmake/qibuild/python.cmake
+++ cmake/qibuild/python.cmake
@@ -13,7 +13,7 @@
 set(_QI_PYTHON_CMAKE TRUE)

-find_program(_python2_executable NAMES python2 python)
+find_program(PYTHON2_EXECUTABLE NAMES python2 python)

 function(_set_qibuild_python_path)
   if(WIN32)
@@ -60,7 +60,7 @@
     ""
     ${ARGN})

-  if(NOT _python2_executable)
+  if(NOT PYTHON2_EXECUTABLE)
     qi_error("Could not find Python executable")
   endif()

@@ -74,7 +74,7 @@
     list(APPEND _execute_process_args OUTPUT_VARIABLE ${ARG_OUTPUT_VARIABLE})
   endif()
   execute_process(COMMAND
-    ${_python2_executable} "${script}" ${ARG_ARGUMENTS}
+    ${PYTHON2_EXECUTABLE} "${script}" ${ARG_ARGUMENTS}
                   ERROR_VARIABLE _err
                   RESULT_VARIABLE _rc
                   ${_execute_process_args}


qibuild/target: get rid of 'STAGE' args for qi_create_* functions

Change-Id: I16a2e55ac56ef84aedab5a3a48d527fa79061e03
Reviewed-on: http://gerrit.aldebaran.lan:8080/745
Reviewed-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Tested-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -43,7 +43,6 @@
 #                        have to compile the target explicitly.
 #                        Warning: you will NOT be able to create install rules
 #                          for this target.
-# \flag:STAGE Stage the binary.
 # \flag:WIN32 Build an executable with a WinMain entry point on windows.
 # \flag:MACOSX_BUNDLE Refer to the add_executable documentation.
 # \param:SUBFOLDER The destination subfolder. The install rules generated will be
@@ -55,7 +54,7 @@
 function(qi_create_bin name)
   qi_debug("qi_create_bin(${name})")

-  cmake_parse_arguments(ARG "NO_RPATH;NO_INSTALL;EXCLUDE_FROM_ALL;STAGE" "SUBFOLDER" "SRC;DEPENDS;SUBMODULE" ${ARGN})
+  cmake_parse_arguments(ARG "NO_RPATH;NO_INSTALL;EXCLUDE_FROM_ALL" "SUBFOLDER" "SRC;DEPENDS;SUBMODULE" ${ARGN})

   set(ARG_SRC "${ARG_UNPARSED_ARGUMENTS}" "${ARG_SRC}")
   qi_set_global("${name}_SUBFOLDER" "${ARG_SUBFOLDER}")
@@ -123,7 +122,6 @@
 # \arg:name The name of the target script
 # \arg:source The source script, that will be copied in the sdk to bin/<name>
 # \flag:NO_INSTALL Do not generate install rule for the script
-# \flag:STAGE Stage the binary.
 # \param:SUBFOLDER The subfolder in sdk/bin to install the script into. (sdk/bin/<subfolder>)
 #
 function(qi_create_script name source)
@@ -179,7 +177,6 @@
 #                  be impossible to use the library from another project using
 #                  a package of the project.
 #                  You can by-pass this behavior by setting QI_INSTALL_INTERNAL to "ON"
-# \flag:NO_STAGE Do not stage the library.
 # \flag:NO_FPIC Do not set -fPIC on static libraries (will be set for shared lib by CMake anyway)
 # \param:SUBFOLDER The destination subfolder. The install rules generated will be
 #                  sdk/lib/<subfolder>
@@ -189,7 +186,7 @@
 # \example:target
 function(qi_create_lib name)
   cmake_parse_arguments(ARG
-    "NOBINDLL;NO_INSTALL;NO_STAGE;NO_FPIC;SHARED;STATIC;INTERNAL"
+    "NOBINDLL;NO_INSTALL;NO_FPIC;SHARED;STATIC;INTERNAL"
     "SUBFOLDER"
     "SRC;SUBMODULE;DEPENDS" ${ARGN})


CI: enable -Werror on OSX

CI: enable -Werror on OSX

--- ci-build.cmake
+++ ci-build.cmake
@@ -31,6 +31,7 @@
         -DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=TRUE)

     set(OTHER
+        ${OTHER}
         -DOGRE_DEPENDENCIES_DIR=${CMAKE_CURRENT_SOURCE_DIR}/ogredeps
         ${CROSS})
 endif()


cleanup: removing old way

cleanup: removing old way

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -29,210 +29,56 @@
   endif()
 endif()

-if (CONAN_EXPORTED OR CONAN_LIBS)
-  # standard conan installation, deps will be defined in conanfile.py
-  # and not necessary to call conan again, conan is already running
-  if (CONAN_EXPORTED)
-    include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake)
-    conan_basic_setup()
-  endif()
-
-  set(INCLUDEOS_PREFIX ${CONAN_INCLUDEOS_ROOT})
-
-
-  #TODO use these
-  #CONAN_SETTINGS_ARCH Provides arch type
-  #CONAN_SETTINGS_BUILD_TYPE provides std cmake "Debug" and "Release" "are they set by conan_basic?"
-  #CONAN_SETTINGS_COMPILER AND CONAN_SETTINGS_COMPILER_VERSION
-  #CONAN_SETTINGS_OS ("Linux","Windows","Macos")
-
-  if (NOT DEFINED ARCH)
-    if (${CONAN_SETTINGS_ARCH} STREQUAL "x86")
-      set(ARCH i686)
-    else()
-      set(ARCH ${CONAN_SETTINGS_ARCH})
-    endif()
-  endif()
-
-
-  set(NAME_STUB "${CONAN_INCLUDEOS_ROOT}/src/service_name.cpp")
-  set(CRTN ${CONAN_LIB_DIRS_MUSL}/crtn.o)
-  set(CRTI ${CONAN_LIB_DIRS_MUSL}/crti.o)
-
-  set(TRIPLE "${ARCH}-pc-linux-elf")
-  set(LIBRARIES ${CONAN_LIBS})
-  set(CONAN_LIBS "")
-
-  #set(ELF_SYMS elf_syms)
-
-  find_program(ELF_SYMS elf_syms)
-  if (ELF_SYMS-NOTFOUND)
-    message(FATAL_ERROR "elf_syms not found")
-  endif()
-
-  find_program(DISKBUILDER diskbuilder)
-  if (DISKBUILDER-NOTFOUND)
-    message(FATAL_ERROR "diskbuilder not found")
-  endif()
-
-  set(LINK_SCRIPT ${INCLUDEOS_PREFIX}/${ARCH}/linker.ld)
-  #includeos package can provide this!
-  include_directories(
-    ${INCLUDEOS_PREFIX}/include/os
-  )
-
-
-else()
-  #TODO initialise self
-  #message(FATAL_ERROR "Not running under conan")
-  #TODO surely we can fix this!!
-  if (NOT DEFINED ARCH)
-    if (DEFINED ENV{ARCH})
-      set(ARCH $ENV{ARCH})
-    else()
-      set(ARCH x86_64)
-    endif()
-  endif()
-
-  set(TRIPLE "${ARCH}-pc-linux-elf")
-  include_directories(
-    ${INCLUDEOS_PREFIX}/${ARCH}/include/c++/v1
-    #${INCLUDEOS_PREFIX}/${ARCH}/include/c++/v1/experimental
-    ${INCLUDEOS_PREFIX}/${ARCH}/include
-    ${INCLUDEOS_PREFIX}/include/os
-  )
-
-  set(NAME_STUB "${INCLUDEOS_PREFIX}/src/service_name.cpp")
-  set(CRTN ${INCLUDEOS_PREFIX}/${ARCH}/lib/crtn.o)
-  set(CRTI ${INCLUDEOS_PREFIX}/${ARCH}/lib/crti.o)
-  #TODO do the whole ye old dance
-
-  add_library(libos STATIC IMPORTED)
-  set_target_properties(libos PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libos PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libos.a)
-
-  add_library(libarch STATIC IMPORTED)
-  set_target_properties(libarch PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libarch PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libarch.a)
-
-  add_library(libplatform STATIC IMPORTED)
-  set_target_properties(libplatform PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libplatform PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/platform/lib${PLATFORM}.a)
-
-  if(${ARCH} STREQUAL "x86_64")
-    add_library(libbotan STATIC IMPORTED)
-    set_target_properties(libbotan PROPERTIES LINKER_LANGUAGE CXX)
-    set_target_properties(libbotan PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libbotan-2.a)
-
-    add_library(libs2n STATIC IMPORTED)
-    set_target_properties(libs2n PROPERTIES LINKER_LANGUAGE CXX)
-    set_target_properties(libs2n PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libs2n.a)
-
-    add_library(libssl STATIC IMPORTED)
-    set_target_properties(libssl PROPERTIES LINKER_LANGUAGE CXX)
-    set_target_properties(libssl PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libssl.a)
-
-    add_library(libcrypto STATIC IMPORTED)
-    set_target_properties(libcrypto PROPERTIES LINKER_LANGUAGE CXX)
-    set_target_properties(libcrypto PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libcrypto.a)
-    set(OPENSSL_LIBS libs2n libssl libcrypto)
-
-    include_directories(${INSTALL_LOC}/${ARCH}/include)
-  endif()
-  if (NOT ${PLATFORM} STREQUAL x86_nano )
-    add_library(http_parser STATIC IMPORTED)
-    set_target_properties(http_parser PROPERTIES LINKER_LANGUAGE CXX)
-    set_target_properties(http_parser PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/http_parser.o)
-
-    add_library(uzlib STATIC IMPORTED)
-    set_target_properties(uzlib PROPERTIES LINKER_LANGUAGE CXX)
-    set_target_properties(uzlib PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libtinf.a)
-
-  endif()
-
-  add_library(musl_syscalls STATIC IMPORTED)
-  set_target_properties(musl_syscalls PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(musl_syscalls PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libmusl_syscalls.a)
-
-  add_library(libcxx STATIC IMPORTED)
-  add_library(cxxabi STATIC IMPORTED)
-  add_library(libunwind STATIC IMPORTED)
-  add_library(libcxx_experimental STATIC IMPORTED)
-
-  set_target_properties(libcxx PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libcxx PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libc++.a)
-  set_target_properties(cxxabi PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(cxxabi PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libc++abi.a)
-  set_target_properties(libunwind PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libunwind PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libunwind.a)
-  set_target_properties(libcxx_experimental PROPERTIES LINKER_LANGUAGE CXX)
-  set_target_properties(libcxx_experimental PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libc++experimental.a)
-
-  add_library(libc STATIC IMPORTED)
-  set_target_properties(libc PROPERTIES LINKER_LANGUAGE C)
-  set_target_properties(libc PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/libc.a)
-
-  add_library(libpthread STATIC IMPORTED)
-  set_target_properties(libpthread PROPERTIES LINKER_LANGUAGE C)
-  set_target_properties(libpthread PROPERTIES IMPORTED_LOCATION "${INCLUDEOS_PREFIX}/${ARCH}/lib/libpthread.a")
-
-  #allways use the provided libcompiler.a
-  set(COMPILER_RT_FILE "${INCLUDEOS_PREFIX}/${ARCH}/lib/libcompiler.a")
-
-
-  add_library(libgcc STATIC IMPORTED)
-  set_target_properties(libgcc PROPERTIES LINKER_LANGUAGE C)
-  set_target_properties(libgcc PROPERTIES IMPORTED_LOCATION "${COMPILER_RT_FILE}")
-
-  if ("${PLATFORM}" STREQUAL "x86_solo5")
-    add_library(solo5 STATIC IMPORTED)
-    set_target_properties(solo5 PROPERTIES LINKER_LANGUAGE C)
-    set_target_properties(solo5 PROPERTIES IMPORTED_LOCATION ${INCLUDEOS_PREFIX}/${ARCH}/lib/solo5_hvt.o)
-  endif()
-
-  if (${PLATFORM} STREQUAL x86_nano)
-    set(LIBRARIES
-      libos
-      libplatform
-      libarch
-      musl_syscalls
-      ${LIBR_CMAKE_NAMES}
-      libos
-      libcxx
-      libunwind
-      libpthread
-      libc
-      libgcc
-    )
-
+# standard conan installation, deps will be defined in conanfile.py
+# and not necessary to call conan again, conan is already running
+if (CONAN_EXPORTED)
+  include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake)
+  conan_basic_setup()
+endif()
+
+set(INCLUDEOS_PREFIX ${CONAN_INCLUDEOS_ROOT})
+
+
+#TODO use these
+#CONAN_SETTINGS_ARCH Provides arch type
+#CONAN_SETTINGS_BUILD_TYPE provides std cmake "Debug" and "Release" "are they set by conan_basic?"
+#CONAN_SETTINGS_COMPILER AND CONAN_SETTINGS_COMPILER_VERSION
+#CONAN_SETTINGS_OS ("Linux","Windows","Macos")
+
+if (NOT DEFINED ARCH)
+  if (${CONAN_SETTINGS_ARCH} STREQUAL "x86")
+    set(ARCH i686)
   else()
-    set(LIBRARIES
-      libgcc
-      libplatform
-      libarch
-      ${LIBR_CMAKE_NAMES}
-      libos
-      http_parser
-      uzlib
-      libbotan
-      ${OPENSSL_LIBS}
-      musl_syscalls
-      libcxx_experimental
-      libcxx
-      libunwind
-      libpthread
-      libc
-      libgcc
-    )
-  endif()
-  if ("${PLATFORM}" STREQUAL "x86_solo5")
-    set(LIBRARIES ${LIBRARIES} solo5)
-  endif()
-
-  set(ELF_SYMS ${INCLUDEOS_PREFIX}/bin/elf_syms)
-  set(DISKBUILDER ${INCLUDEOS_PREFIX}/bin/diskbuilder)
-  set(LINK_SCRIPT ${INCLUDEOS_PREFIX}/${ARCH}/linker.ld)
-endif()
+    set(ARCH ${CONAN_SETTINGS_ARCH})
+  endif()
+endif()
+
+
+set(NAME_STUB "${CONAN_INCLUDEOS_ROOT}/src/service_name.cpp")
+set(CRTN ${CONAN_LIB_DIRS_MUSL}/crtn.o)
+set(CRTI ${CONAN_LIB_DIRS_MUSL}/crti.o)
+
+set(TRIPLE "${ARCH}-pc-linux-elf")
+set(LIBRARIES ${CONAN_LIBS})
+set(CONAN_LIBS "")
+
+#set(ELF_SYMS elf_syms)
+
+find_program(ELF_SYMS elf_syms)
+if (ELF_SYMS-NOTFOUND)
+  message(FATAL_ERROR "elf_syms not found")
+endif()
+
+find_program(DISKBUILDER diskbuilder)
+if (DISKBUILDER-NOTFOUND)
+  message(FATAL_ERROR "diskbuilder not found")
+endif()
+
+set(LINK_SCRIPT ${INCLUDEOS_PREFIX}/${ARCH}/linker.ld)
+#includeos package can provide this!
+include_directories(
+  ${INCLUDEOS_PREFIX}/include/os
+)

 # arch and platform defines
@@ -301,35 +147,6 @@
   set(JSON_CONFIG_FILE_${ELF_TARGET} ${FILE} PARENT_SCOPE)
 endfunction()

-
-function(os_add_conan_package TARGET PACKAGE)
-
-#TODO MOVE SOMEWHERE MORE SANE
-
-  if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
-     message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
-     file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake"
-                    "${CMAKE_BINARY_DIR}/conan.cmake")
-  endif()
-  #TODO se if this goes all wack
-  include(${CMAKE_BINARY_DIR}/conan.cmake)
-  #should we specify a directory.. can we run it multiple times ?
-  conan_cmake_run(
-    REQUIRES ${PACKAGE}
-    BASIC_SETUP
-    CMAKE_TARGETS
-  )
-  #convert pkg/version@user/channel to pkg;versin;user;chanel
-  string(REPLACE "@" ";" LIST ${PACKAGE})
-  string(REPLACE "/" ";" LIST ${LIST})
-  #get the first element
-  list(GET LIST 0 PKG)
-
-  os_link_libraries(${TARGET} CONAN_PKG::${PKG})
-
-endfunction()
-
-# TODO: fix so that we can add two executables in one service (NAME_STUB)
 function(os_add_executable TARGET NAME)
   set(ELF_TARGET ${TARGET}${ELF_POSTFIX})
   add_executable(${ELF_TARGET} ${ARGN} ${NAME_STUB})
@@ -422,9 +239,6 @@
    os_add_library_from_path(${TARGET} ${DRIVER} "${INCLUDEOS_PREFIX}/${ARCH}/drivers/stdout")
 endfunction()

-function(os_add_os_library TARGET LIB)
-  os_add_library_from_path(${TARGET} ${LIB} "${INCLUDEOS_PREFIX}/${ARCH}/lib")
-endfunction()

 #input file blob name and blob type eg add_binary_blob(<somefile> input.bin binary)
 #results in an object called binary_input_bin


CMAKE: Make FOR_PRODUCTION option upper case

--- cmake/os.cmake
+++ cmake/os.cmake
@@ -109,8 +109,8 @@
 set(BUILD_SHARED_LIBRARIES OFF)
 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")

-option(for_production "Stop the OS when conditions not suitable for production" ON)
-if (for_production)
+option(FOR_PRODUCTION "Stop the OS when conditions not suitable for production" ON)
+if (FOR_PRODUCTION)
   set(PROD_USE "--defsym __for_production_use=0x2000")
 else()
   set(PROD_USE "--defsym __for_production_use=0x1000")


rr_graph: adding bb place algorithm when creating rr_graph virt

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

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -448,6 +448,7 @@
         ${QUIET_CMD} ${VPR} ${DEVICE_MERGED_FILE}
         --device ${DEVICE_FULL}
         ${symbiflow-arch-defs_SOURCE_DIR}/common/wire.eblif
+        --place_algorithm bounding_box
         --route_chan_width 6
         --echo_file on
         --min_route_chan_width_hint 1


install: circuits: add also place constraints

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

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -1474,32 +1474,6 @@
     set(SDC_DEPS ${ADD_FPGA_TARGET_INPUT_SDC_FILE})
   endif()

-  if (${ADD_FPGA_TARGET_INSTALL_CIRCUIT})
-    set(INSTALL_DEPS "")
-    append_file_dependency(INSTALL_DEPS ${OUT_EBLIF_REL})
-
-    install(
-      FILES ${OUT_EBLIF}
-      RENAME ${NAME}.eblif
-      DESTINATION "benchmarks/circuits"
-    )
-
-    if (NOT SDC_FILE STREQUAL "")
-      install(
-        FILES ${SDC_FILE}
-        RENAME ${NAME}.sdc
-        DESTINATION "benchmarks/sdc"
-      )
-      append_file_dependency(INSTALL_DEPS ${SDC_DEPS})
-    endif()
-
-    add_custom_target(
-      "INSTALL_${NAME}_CIRCUIT"
-      ALL
-      DEPENDS ${INSTALL_DEPS}
-    )
-  endif()
-
   # Generate routing and generate HLC.
   set(OUT_ROUTE ${OUT_LOCAL}/${TOP}.route)

@@ -1706,6 +1680,51 @@
       set(FIX_CLUSTERS_ARG --fix_clusters ${OUT_IO})
     endif()

+  endif()
+
+  if (${ADD_FPGA_TARGET_INSTALL_CIRCUIT})
+    set(INSTALL_DEPS "")
+
+    # Install circuit
+    append_file_dependency(INSTALL_DEPS ${OUT_EBLIF_REL})
+
+    install(
+      FILES ${OUT_EBLIF}
+      RENAME ${NAME}.eblif
+      DESTINATION "benchmarks/circuits"
+    )
+
+    # Install place constraints
+    set(CONSTR_FILE "")
+    if (NOT ${NO_PLACE_CONSTR})
+      append_file_dependency(INSTALL_DEPS ${OUT_CONSTR_REL})
+      set(CONSTR_FILE ${OUT_CONSTR})
+    else()
+      append_file_dependency(INSTALL_DEPS ${OUT_IO_REL})
+      set(CONSTR_FILE ${OUT_IO})
+    endif()
+
+    install(
+      FILES ${CONSTR_FILE}
+      RENAME ${NAME}.place
+      DESTINATION "benchmarks/place_constr"
+    )
+
+    # Install SDC constraints
+    if (NOT SDC_FILE STREQUAL "")
+      install(
+        FILES ${SDC_FILE}
+        RENAME ${NAME}.sdc
+        DESTINATION "benchmarks/sdc"
+      )
+      append_file_dependency(INSTALL_DEPS ${SDC_DEPS})
+    endif()
+
+    add_custom_target(
+      "INSTALL_${NAME}_CIRCUIT"
+      ALL
+      DEPENDS ${INSTALL_DEPS}
+    )
   endif()

   # Generate placement.


Passing missing values for MPI_LINK_FLAGS and MPI_LIBRARIES into ParMETIS

--- external/cmake/parmetis.cmake
+++ external/cmake/parmetis.cmake
@@ -46,6 +46,8 @@
     CMAKE_ARGS -D CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
                -D BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
                -D MPI_INCLUDE_PATH=${MPI_C_INCLUDE_PATH}
+               -D MPI_LIBRARIES=${MPI_C_LIBRARIES}
+               -D MPI_LINK_FLAGS=${MPI_LINK_FLAGS}
                -D DISABLE_PARMETIS_PROGRAMS=ON
     INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
   )


cmake: checked_find_package enhancements (#3061)

* New SETVARIABLES option sets named cmake variabes to true if the
  package is found.
* DEBUG should print variables even if not found. Duh, failing to find
  the package is the most important debugging situation.

--- src/cmake/checked_find_package.cmake
+++ src/cmake/checked_find_package.cmake
@@ -37,8 +37,11 @@
 #     turned off explicitly from one of these sources.
 #   * Print a message if the package is enabled but not found. This is based
 #     on ${Pkgname}_FOUND or $PKGNAME_FOUND.
-#   * Optional DEFINITIONS <string> are passed to add_definitions if the
+#   * Optional DEFINITIONS <string>... are passed to add_definitions if the
 #     package is found.
+#   * Optional SETVARIABLES <id>... is a list of CMake variables to set to
+#     TRUE if the package is found (they will not be set or changed if the
+#     package is not found).
 #   * Optional PRINT <list> is a list of variables that will be printed
 #     if the package is found, if VERBOSE is on.
 #   * Optional DEPS <list> is a list of hard dependencies; for each one, if
@@ -74,7 +77,7 @@
         # singleValueKeywords:
         "ENABLE;ISDEPOF;VERSION_MIN;VERSION_MAX;RECOMMEND_MIN;RECOMMEND_MIN_REASON"
         # multiValueKeywords:
-        "DEFINITIONS;PRINT;DEPS"
+        "DEFINITIONS;PRINT;DEPS;SETVARIABLES"
         # argsToParse:
         ${ARGN})
     string (TOLOWER ${pkgname} pkgname_lower)
@@ -143,23 +146,10 @@
                 endif ()
             endforeach ()
             message (STATUS "${ColorGreen}Found ${pkgname} ${${pkgname}_VERSION} ${_config_status}${ColorReset}")
-            if (_pkg_VERBOSE)
-                if (_pkg_DEBUG)
-                    dump_matching_variables (${pkgname})
-                endif ()
-                set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
-                                    ${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR
-                                    ${pkgname}_INCLUDE_DIRS ${pkgname_upper}_INCLUDE_DIRS
-                                    ${pkgname}_LIBRARIES ${pkgname_upper}_LIBRARIES
-                                    ${_pkg_PRINT})
-                list (REMOVE_DUPLICATES _vars_to_print)
-                foreach (_v IN LISTS _vars_to_print)
-                    if (NOT "${${_v}}" STREQUAL "")
-                        message (STATUS "    ${_v} = ${${_v}}")
-                    endif ()
-                endforeach ()
-            endif ()
             add_definitions (${_pkg_DEFINITIONS})
+            foreach (_v IN LISTS _pkg_SETVARIABLES)
+                set (${_v} TRUE)
+            endforeach ()
             if (_pkg_RECOMMEND_MIN)
                 if (${${pkgname}_VERSION} VERSION_LESS ${_pkg_RECOMMEND_MIN})
                     message (STATUS "${ColorYellow}Recommend ${pkgname} >= ${_pkg_RECOMMEND_MIN} ${_pkg_RECOMMEND_MIN_REASON} ${ColorReset}")
@@ -187,6 +177,22 @@
                 message (FATAL_ERROR "${ColorRed}${pkgname} is required, aborting.${ColorReset}")
             endif ()
         endif()
+        if (_pkg_VERBOSE AND (${pkgname}_FOUND OR ${pkgname_upper}_FOUND OR _pkg_DEBUG))
+            if (_pkg_DEBUG)
+                dump_matching_variables (${pkgname})
+            endif ()
+            set (_vars_to_print ${pkgname}_INCLUDES ${pkgname_upper}_INCLUDES
+                                ${pkgname}_INCLUDE_DIR ${pkgname_upper}_INCLUDE_DIR
+                                ${pkgname}_INCLUDE_DIRS ${pkgname_upper}_INCLUDE_DIRS
+                                ${pkgname}_LIBRARIES ${pkgname_upper}_LIBRARIES
+                                ${_pkg_PRINT})
+            list (REMOVE_DUPLICATES _vars_to_print)
+            foreach (_v IN LISTS _vars_to_print)
+                if (NOT "${${_v}}" STREQUAL "")
+                    message (STATUS "    ${_v} = ${${_v}}")
+                endif ()
+            endforeach ()
+        endif ()
     else ()
         if (NOT _quietskip)
             message (STATUS "${ColorRed}Not using ${pkgname} -- disabled ${_disablereason} ${ColorReset}")


[config.h] silence HAVE_MPI -Wundef

[config.h] silence HAVE_MPI -Wundef

--- config.h.cmake
+++ config.h.cmake
@@ -61,6 +61,10 @@
 # define ENABLE_MPI 0
 #endif

+#ifndef HAVE_MPI
+# define HAVE_MPI 0
+#endif
+
 #ifndef HAVE_CONSTEXPR
 # define HAVE_CONSTEXPR 0
 #endif


Fix typos

Fix typos

--- .cmake/Modules/FindLibUsb.cmake
+++ .cmake/Modules/FindLibUsb.cmake
@@ -51,12 +51,12 @@
             set(LibUsb_LIBRARY_NAMES ${PkgConfigLibUsb_STATIC_LIBRARIES})
             set(LibUsb_INCLUDE_HINTS ${PkgConfigLibUsb_STATIC_INCLUDE_DIRS})
             set(LibUsb_LIBRARY_HINTS ${PkgConfigLibUsb_STATIC_LIBRARY_DIRS})
-            set(LibUsb_LDFLAGS ${PkgCOnfigLibUsb_STATIC_LDFLAGS_OTHER})
+            set(LibUsb_LDFLAGS ${PkgConfigLibUsb_STATIC_LDFLAGS_OTHER})
         else()
             set(LibUsb_LIBRARY_NAMES ${PkgConfigLibUsb_LIBRARIES})
             set(LibUsb_INCLUDE_HINTS ${PkgConfigLibUsb_INCLUDE_DIRS})
             set(LibUsb_LIBRARY_HINTS ${PkgConfigLibUsb_LIBRARY_DIRS})
-            set(LibUsb_LDFLAGS ${PkgCOnfigLibUsb_LDFLAGS_OTHER})
+            set(LibUsb_LDFLAGS ${PkgConfigLibUsb_LDFLAGS_OTHER})
         endif()
     endif()
 endif()


Fix: atomic not compiling when using TBB and Ogre from sources on Win32 32bit architecture
See for details: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=78443

--HG--
branch : v1-9

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -60,7 +60,7 @@
 	if (OGRE_CONFIG_THREAD_PROVIDER STREQUAL "tbb")
 		set(OGRE_THREAD_PROVIDER 3)
 		include_directories(${TBB_INCLUDE_DIRS})
-		if (WIN32)
+		if (WIN32 AND MINGW)
 			add_definitions(-D_WIN32_WINNT=0x0501)
 		endif ()


FindMKL.cmake: add more search paths

FindMKL.cmake: add more search paths

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -225,6 +225,7 @@
         /opt/intel/tbb/lib
         /opt/intel/lib
         /opt/intel/oneapi/mkl/latest/lib
+        /opt/intel/oneapi/compiler/latest/linux/compiler/lib
         /opt/intel/oneapi/lib
         $ENV{MKLROOT}/lib
         ${ENV_LIBRARY_PATHS}
@@ -255,6 +256,7 @@
         /opt/intel/tbb/lib
         /opt/intel/lib
         /opt/intel/oneapi/mkl/latest/lib
+        /opt/intel/oneapi/compiler/latest/linux/compiler/lib
         /opt/intel/oneapi/lib
         $ENV{MKLROOT}/lib
         ${ENV_LIBRARY_PATHS}


[windows] fix finding of OpenSplice

[windows] fix finding of OpenSplice

--- opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
+++ opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
@@ -29,10 +29,15 @@

 # check if provided OSPL_HOME is from an "official" binary package
 set(_ospl_home "$ENV{OSPL_HOME}")
-if(NOT "${_ospl_home} " STREQUAL " " AND
-    NOT EXISTS "${_ospl_home}/release.com")
+if(WIN32)
+  set(_ospl_release_file release.bat)
+else()
+  set(_ospl_release_file release.com)
+endif()
+if(NOT "${_ospl_home} " STREQUAL " " AND NOT EXISTS "${_ospl_home}/${_ospl_release_file}")
   set(_ospl_home "")
 endif()
+unset(_ospl_release_file)

 if(NOT "${_ospl_home} " STREQUAL " ")
   # look inside of OSPL_HOME if defined


simplify condition

simplify condition

--- ament_cmake_core/cmake/environment_hooks/ament_generate_package_environment.cmake
+++ ament_cmake_core/cmake/environment_hooks/ament_generate_package_environment.cmake
@@ -49,10 +49,7 @@

       # collect package hooks to be sourced for this extension
       set(ENVIRONMENT_HOOKS "")
-      if(
-        DEFINED _AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension} AND
-        NOT "${_AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension}}" STREQUAL ""
-      )
+      if(DEFINED _AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension})
         list(SORT _AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension})
         foreach(hook ${_AMENT_CMAKE_ENVIRONMENT_HOOKS_${extension}})
           set(native_hook "/${hook}")


UNSET(_HAS_CXX0X_FLAG) if gcc is <= 4.6.3

--- cmake/CheckCXX11Features.cmake
+++ cmake/CheckCXX11Features.cmake
@@ -81,6 +81,9 @@
     # TODO: check if there's a version
     IF("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6.3")
         set(CXX11_COMPILER_FLAGS "-std=c++0x")
+    ELSE()
+        MESSAGE("Your compiler cannot expand a variadic template parameter into a fixed-length argument list.")
+        UNSET(_HAS_CXX0X_FLAG)
     ENDIF()
 endif ()


FindLapack template

FindLapack template

--- cmake/Modules/FindLAPACK.cmake
+++ cmake/Modules/FindLAPACK.cmake
@@ -163,7 +163,7 @@
   NAMES lapack
   PATHS /usr/local/opt  # homebrew
   HINTS ${_lapack_hints} ${pc_lapack_LIBRARY_DIRS} ${pc_lapack_LIBDIR}
-  PATH_SUFFIXES lib lapack lapack/lib)
+  PATH_SUFFIXES lapack lapack/lib)
 if(LAPACK_LIB)
   list(APPEND LAPACK_LIBRARY ${LAPACK_LIB})
 else()
@@ -204,7 +204,7 @@
   NAMES_PER_DIR
   PATHS /usr/local/opt
   HINTS ${_lapack_hints} ${pc_blas_LIBRARY_DIRS} ${pc_blas_LIBDIR}
-  PATH_SUFFIXES lib lapack lapack/lib blas)
+  PATH_SUFFIXES lapack lapack/lib blas)

 if(BLAS_LIBRARY)
   list(APPEND LAPACK_LIBRARY ${BLAS_LIBRARY})


properly set OpenCL lib search path

properly set OpenCL lib search path

--- cmake/OpenCVDetectOpenCL.cmake
+++ cmake/OpenCVDetectOpenCL.cmake
@@ -20,14 +20,24 @@
               DOC "OpenCL include directory"
               NO_DEFAULT_PATH)

-    if (X86_64 AND WIN32)
-      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib/Win64 lib/x86_64 lib/x64)
-    elseif (X86 AND WIN32)
-      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib/Win32 lib/x86)
-    elseif (X86_64 AND UNIX)
-      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib64 lib)
-    elseif (X86 AND UNIX)
-      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib32 lib)
+    if(WIN32)
+      if(X86_64)
+        set(OPENCL_POSSIBLE_LIB_SUFFIXES lib/Win64 lib/x86_64 lib/x64)
+      elseif(X86)
+        set(OPENCL_POSSIBLE_LIB_SUFFIXES lib/Win32 lib/x86)
+      else()
+        set(OPENCL_POSSIBLE_LIB_SUFFIXES lib)
+      endif()
+    elseif(UNIX)
+      if(X86_64)
+        set(OPENCL_POSSIBLE_LIB_SUFFIXES lib64 lib)
+      elseif(X86)
+        set(OPENCL_POSSIBLE_LIB_SUFFIXES lib32 lib)
+      else()
+        set(OPENCL_POSSIBLE_LIB_SUFFIXES lib)
+      endif()
+    else()
+      set(OPENCL_POSSIBLE_LIB_SUFFIXES lib)
     endif()

     find_library(OPENCL_LIBRARY


Changed cmake python library search startegy for crosscompiling

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -83,7 +83,12 @@
       endif()

       # not using _version_string here, because it might not conform to the CMake version format
-      find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
+      if(CMAKE_CROSSCOMPILING)
+        # builder version can differ from target, matching base version (e.g. 2.7)
+        find_host_package(PythonLibs "${_version_major_minor}")
+      else()
+        find_host_package(PythonLibs "${_version_major_minor}.${_version_patch}" EXACT)
+      endif()

       if(PYTHONLIBS_FOUND)
         # Copy outputs


-Wdelete-non-abstract-non-virtual-dtor is clang specific warnings

--- cmake/XglCompilerOptions.cmake
+++ cmake/XglCompilerOptions.cmake
@@ -222,12 +222,17 @@
             target_compile_options(${TARGET} PRIVATE
                 -Werror
                 -Wno-error=comment
-                -Wno-error=delete-non-abstract-non-virtual-dtor
                 -Wno-error=ignored-qualifiers
                 -Wno-error=missing-braces
                 -Wno-error=pointer-arith
                 -Wno-error=unused-parameter
             )
+            if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+                target_compile_options(${TARGET} PRIVATE
+                    -Wno-error=delete-non-abstract-non-virtual-dtor
+                )
+            endif()
+
         endif()

         target_compile_options(${TARGET} PRIVATE
@@ -271,7 +276,6 @@
             target_compile_options(${TARGET} PRIVATE
                 # Output with color if in terminal: https://github.com/ninja-build/ninja/wiki/FAQ
                 -fcolor-diagnostics
-
                 -Wthread-safety
             )
         endif()