Fixed status message in utilies.cmake

Fixed status message in utilies.cmake

--- cmake/stm32/utilities.cmake
+++ cmake/stm32/utilities.cmake
@@ -122,6 +122,7 @@
     foreach(FAMILY ${ARGV})
         if(STM32_USE_CMSIS_FROM_CUBE_${FAMILY})
             stm32_fetch_cube(${FAMILY})
+            message(STATUS "Cube fetched for ${FAMILY} at ${STM32_CUBE_${FAMILY}_PATH}")
             set(STM32_CMSIS_${FAMILY}_PATH ${STM32_CUBE_${FAMILY}_PATH}/Drivers/CMSIS/Device/ST/STM32${FAMILY}xx PARENT_SCOPE)
         else()
             set(CMSIS_NAME STM32-CMSIS-${FAMILY})
@@ -142,7 +143,7 @@
     foreach(FAMILY ${ARGV})
         if(STM32_USE_HAL_FROM_CUBE_${FAMILY})
             stm32_fetch_cube(${FAMILY})
-            message("Cube fetched for ${FAMILY} at ${STM32_CUBE_${FAMILY}_PATH}")
+            message(STATUS "Cube fetched for ${FAMILY} at ${STM32_CUBE_${FAMILY}_PATH}")
             set(STM32_HAL_${FAMILY}_PATH ${STM32_CUBE_${FAMILY}_PATH}/Drivers/STM32${FAMILY}xx_HAL_Driver PARENT_SCOPE)
         else()
             set(HAL_NAME STM32-HAL-${FAMILY})


boost build: zlib bzip2 with user-config.jam

issue https://github.com/smanders/externpro/issues/308#issuecomment-830413015

--- projects/boost.cmake
+++ projects/boost.cmake
@@ -172,6 +172,30 @@
   endif()
 endfunction()
 ####################
+function(userConfigJam jamFile)
+  # TRICKY: need zlib, bzip2 include directories at cmake-time (before they're built)
+  # so can't use xpGetPkgVar, xpFindPkg, etc - this complicates having multiple versions
+  # of zlib and bzip2 (boost will have to choose a version here)
+  xpGetArgValue(${PRO_ZLIB} ARG VER VALUE zlibVer)
+  xpGetArgValue(${PRO_BZIP2} ARG VER VALUE bzip2Ver)
+  set(zlibInc ${STAGE_DIR}/include/zlib_${zlibVer}/zlib)
+  set(bzip2Inc ${STAGE_DIR}/include/bzip2_${bzip2Ver}/bzip2)
+  if(WIN32)
+    set(prefix lib)
+  endif()
+  include(${STAGE_DIR}/share/cmake/xpopts.cmake)
+  xpSetPostfix()
+  set(zlibName ${prefix}z_${zlibVer}${CMAKE_RELEASE_POSTFIX})
+  set(bzip2Name bz2_${bzip2Ver}${CMAKE_RELEASE_POSTFIX})
+  ExternalProject_Get_Property(${bl_PRO} TMP_DIR)
+  set(cfgFile ${TMP_DIR}/user-config.jam)
+  file(WRITE ${cfgFile}
+    "using zlib : ${zlibVer} : <search>${STAGE_DIR}/lib <name>${zlibName} <include>${zlibInc} ;\n"
+    "using bzip2 : ${bzip2Ver} : <search>${STAGE_DIR}/lib <name>${bzip2Name} <include>${bzip2Inc} ;\n"
+    )
+  set(${jamFile} "${cfgFile}" PARENT_SCOPE)
+endfunction()
+####################
 function(build_boostlibs)
   # @param[in] PRO - project id (boost, boostold)
   # @param[in] B2PATH - path to b2
@@ -232,6 +256,7 @@
     --ignore-site-config --layout=versioned link=static threading=multi
     address-model=${BUILD_PLATFORM} variant=${boost_VARIANT}
     runtime-link=${boost_RUNTIME_LINK} toolset=${boost_TOOLSET} ${boost_FLAGS}
+    --debug-configuration
     )
   # libraries with build issues
   set(exclude_libs locale math mpi python)
@@ -240,23 +265,6 @@
   foreach(lib ${exclude_libs})
     list(APPEND boost_BUILD --without-${lib})
   endforeach()
-  # TRICKY: need zlib, bzip2 include directories at cmake-time (before they're built)
-  # so can't use xpGetPkgVar, xpFindPkg, etc - this complicates having multiple versions
-  # of zlib and bzip2 (boost will have to choose a version here)
-  xpGetArgValue(${PRO_ZLIB} ARG VER VALUE zlibVer)
-  xpGetArgValue(${PRO_BZIP2} ARG VER VALUE bzip2Ver)
-  set(zlibInc ${STAGE_DIR}/include/zlib_${zlibVer}/zlib)
-  set(bzip2Inc ${STAGE_DIR}/include/bzip2_${bzip2Ver}/bzip2)
-  list(APPEND boost_BUILD -s ZLIB_INCLUDE=${zlibInc} -s ZLIB_LIBPATH=${STAGE_DIR}/lib)
-  list(APPEND boost_BUILD -s BZIP2_INCLUDE=${bzip2Inc} -s BZIP2_LIBPATH=${STAGE_DIR}/lib)
-  if(WIN32)
-    include(${STAGE_DIR}/share/cmake/xpopts.cmake)
-    xpSetPostfix()
-    # TRICKY: BINARY (zlibstatic, bz2) needs to be the name of the binary,
-    # not including the file extension, or the "lib" prefix on UNIX
-    list(APPEND boost_BUILD -s ZLIB_BINARY=libz_${zlibVer}${CMAKE_RELEASE_POSTFIX})
-    list(APPEND boost_BUILD -s BZIP2_BINARY=bz2_${bzip2Ver}${CMAKE_RELEASE_POSTFIX})
-  endif()
   set(boost_INSTALL install --libdir=${STAGE_DIR}/lib --includedir=${STAGE_DIR}/include)
   addproject_boost(${bl_PRO}_bld)
   list(APPEND ${bl_PRO}_DEPENDS ${bl_PRO}_bld) # serialize the build
@@ -279,11 +287,13 @@
       # reported here: http://permalink.gmane.org/gmane.comp.lib.boost.user/75695
       # if we build boost (on MSW) within source tree, the errors don't happen
     endif()
+    userConfigJam(USER_CONFIG_JAM_FILE)
     set(boost_STAGE stage --stagedir=${baseDir}/Build/${XP_TARGET}/stage)
     ExternalProject_Get_Property(${bl_PRO} SOURCE_DIR)
     ExternalProject_Add(${XP_TARGET} DEPENDS ${${bl_PRO}_DEPENDS}
       DOWNLOAD_COMMAND "" DOWNLOAD_DIR ${NULL_DIR}
-      SOURCE_DIR ${SOURCE_DIR} CONFIGURE_COMMAND ""
+      SOURCE_DIR ${SOURCE_DIR}
+      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${USER_CONFIG_JAM_FILE} ${SOURCE_DIR}/tools/build/src/
       BUILD_COMMAND ${boost_BUILD} ${boost_STAGE} BUILD_IN_SOURCE 1 # <BINARY_DIR>==<SOURCE_DIR>
       INSTALL_COMMAND ${boost_BUILD} ${boost_INSTALL} INSTALL_DIR ${NULL_DIR}
       )


Coverage should be off by default

Coverage should be off by default

--- cmake/modules/RootBenchOptions.cmake
+++ cmake/modules/RootBenchOptions.cmake
@@ -1 +1 @@
-set(coverage ON "Test coverage")+set(coverage OFF "Test coverage")


windows.cmake: remove the /INCREMENTAL:NO flag, this produces a warning with UWP

--- cmake-toolchains/windows.cmake
+++ cmake-toolchains/windows.cmake
@@ -77,7 +77,7 @@
 if (FIPS_MSVC_LTCG)
     set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
     set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL")
-    set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /INCREMENTAL:NO /LTCG")
+    set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG")
     set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS} /LTCG")
 endif()


CMake: gtest: insist on BUILD_SHARED_LIBS=OFF

--- cmake/Modules/GoogleTest.cmake
+++ cmake/Modules/GoogleTest.cmake
@@ -24,6 +24,10 @@
 if(result)
   message(FATAL_ERROR "Build step for googletest failed: ${result}")
 endif()
+
+# shared googletest exibits varous spririous failures.
+# let's insist on static library.
+set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)

 # Prevent overriding the parent project's compiler/linker
 # settings on Windows


Revert "As for MacOS, hide inlines."

Revert "As for MacOS, hide inlines."

Breaks roottest/python/cpp.
This reverts commit 5beed7bec9514eee573febc23cd202963e59664f.

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -108,7 +108,7 @@

 if(CMAKE_COMPILER_IS_GNUCXX)

-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -fvisibility-inlines-hidden")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe ${BIT_ENVIRONMENT} -Wall -W -fPIC")

   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${BIT_ENVIRONMENT} -std=legacy")
@@ -145,7 +145,7 @@

 elseif(CMAKE_CXX_COMPILER_ID STREQUAL Clang)

-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -fvisibility-inlines-hidden")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe ${BIT_ENVIRONMENT} ${FP_MATH_FLAGS} -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -fPIC")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe ${BIT_ENVIRONMENT} -Wall -W -fPIC")

   set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${BIT_ENVIRONMENT} -std=legacy")


added cov option to compiler flags

added cov option to compiler flags

--- cmake/set_compiler_flags.cmake
+++ cmake/set_compiler_flags.cmake
@@ -35,6 +35,7 @@
     add_cxx_compiler_flag("-O0" "DEBUG")
     add_cxx_compiler_flag("-fprofile-arcs" "DEBUG")
     add_cxx_compiler_flag("-ftest-coverage" "DEBUG")
+    add_cxx_compiler_flag("--coverage" "DEBUG")

     add_cxx_compiler_flag("-g0" "RELEASE")
     add_cxx_compiler_flag("-O3" "RELEASE")


Fix some style in the vxl_tests code

Fix some style in the vxl_tests code

--- cmake/snippets/vxl_tests.cmake
+++ cmake/snippets/vxl_tests.cmake
@@ -14,6 +14,8 @@
 "
 #include <config_compiler>

+#include <cstdlib>
+
 int
 main()
 {
@@ -21,7 +23,7 @@
 #error \"VCL_CAN_STATIC_CONST_INIT_FLOAT is defined\"
 #endif

-  return 0;
+  return EXIT_SUCCESS;
 }
 ")


Only one trap can be added.

Only one trap can be added.

This prevents leakage of the /tmp/heaptrack_fifo$$ files.

--- heaptrack.sh.cmake
+++ heaptrack.sh.cmake
@@ -130,13 +130,17 @@
 # setup named pipe to read data from
 pipe=/tmp/heaptrack_fifo$$
 mkfifo $pipe
-trap "rm -f $pipe" EXIT

 # interpret the data and compress the output on the fly
 output="$output.gz"
 "$INTERPRETER" < $pipe | gzip -c > "$output" &
 debuggee=$!
-trap "kill $debuggee 2> /dev/null" EXIT
+
+function cleanup {
+    rm -f "$pipe"
+    kill "$debuggee" 2> /dev/null
+}
+trap cleanup EXIT

 echo "starting application, this might take some time..."
 echo "output will be written to $output"


Bring  into  for possible manuel comparision.

--- utilities/cmake/setup_test_case.macro.cmake
+++ utilities/cmake/setup_test_case.macro.cmake
@@ -37,7 +37,6 @@
       ${_test_directory}
     DEPENDS
       ${_input_file_list_full}
-      ${_test_src_directory}/${_comparison_file}
       # Remove dependency on the project main target to avoid race condition
       # in parallel testing.
       # Always build the excutable before run cTest.
@@ -45,12 +44,21 @@
     VERBATIM
     )

+  # Bring ${_comparison_file} into ${_test_directory} for possible manuel comparision.
+    ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/${_comparison_file}
+    COMMAND  ${_exec_copy}  ${_para_copy} ${_test_src_directory}/${_comparison_file} ${_test_directory}/${_comparison_file}
+    WORKING_DIRECTORY
+      ${_test_directory}
+    DEPENDS
+      ${_test_src_directory}/${_comparison_file}
+    VERBATIM
+    )
   # Compare output
   ADD_CUSTOM_TARGET(diff_${_test_name}
-    COMMAND ${_exec_diff} ${_para_diff} ${_test_directory}/${_output_file}  ${_test_src_directory}/${_comparison_file}
+    COMMAND ${_exec_diff} ${_para_diff} ${_test_directory}/${_output_file}  ${_test_directory}/${_comparison_file}
     DEPENDS
       ${_test_directory}/${_output_file}
-      ${_test_src_directory}/${_comparison_file}
+      ${_test_directory}/${_comparison_file}
     VERBATIM
     )


ice40: support PREGENERATED_BBA_PATH

ice40: support PREGENERATED_BBA_PATH

Add support for pregenerating BBA files, to build on Windows
and Darwin.

Signed-off-by: Sean Cross <d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@xobs.io>

--- ice40/family.cmake
+++ ice40/family.cmake
@@ -39,14 +39,20 @@
             set(DEV_CC_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.bin)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ice40/constids.inc)
             set(DEV_GFXH ${CMAKE_CURRENT_SOURCE_DIR}/ice40/gfx.h)
-            add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} -g ${DEV_GFXH} ${OPT_FAST} ${OPT_SLOW} ${DEV_TXT_DB} > ${DEV_CC_BBA_DB}
-                DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB}
-                )
-            add_custom_command(OUTPUT ${DEV_CC_DB}
-                COMMAND bbasm ${DEV_CC_BBA_DB} ${DEV_CC_DB}
-                DEPENDS bbasm ${DEV_CC_BBA_DB}
-                )
+            if(PREGENERATED_BBA_PATH)
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm ${PREGENERATED_BBA_PATH}/chipdb-${dev}.bin ${DEV_CC_DB}
+                    )
+            else()
+                add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
+                    COMMAND ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} -g ${DEV_GFXH} ${OPT_FAST} ${OPT_SLOW} ${DEV_TXT_DB} > ${DEV_CC_BBA_DB}
+                    DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB}
+                    )
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm ${DEV_CC_BBA_DB} ${DEV_CC_DB}
+                    DEPENDS bbasm ${DEV_CC_BBA_DB}
+                    )
+            endif()
             if (SERIALIZE_CHIPDB)
                 set(PREV_DEV_CC_BBA_DB ${DEV_CC_BBA_DB})
             endif()
@@ -78,16 +84,23 @@
             set(DEV_CC_DB ${CMAKE_CURRENT_SOURCE_DIR}/ice40/chipdbs/chipdb-${dev}.cc)
             set(DEV_CONSTIDS_INC ${CMAKE_CURRENT_SOURCE_DIR}/ice40/constids.inc)
             set(DEV_GFXH ${CMAKE_CURRENT_SOURCE_DIR}/ice40/gfx.h)
-            add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
-                COMMAND ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} -g ${DEV_GFXH} ${OPT_FAST} ${OPT_SLOW} ${DEV_TXT_DB} > ${DEV_CC_BBA_DB}.new
-                COMMAND mv ${DEV_CC_BBA_DB}.new ${DEV_CC_BBA_DB}
-                DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB}
-                )
-            add_custom_command(OUTPUT ${DEV_CC_DB}
-                COMMAND bbasm --c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new
-                COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
-                DEPENDS bbasm ${DEV_CC_BBA_DB}
-                )
+            if(PREGENERATED_BBA_PATH)
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm --c ${PREGENERATED_BBA_PATH}/chipdb-${dev}.bba ${DEV_CC_DB}.new
+                    COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
+                    )
+            else()
+                add_custom_command(OUTPUT ${DEV_CC_BBA_DB}
+                    COMMAND ${PYTHON_EXECUTABLE} ${DB_PY} -p ${DEV_CONSTIDS_INC} -g ${DEV_GFXH} ${OPT_FAST} ${OPT_SLOW} ${DEV_TXT_DB} > ${DEV_CC_BBA_DB}.new
+                    COMMAND mv ${DEV_CC_BBA_DB}.new ${DEV_CC_BBA_DB}
+                    DEPENDS ${DEV_CONSTIDS_INC} ${DEV_GFXH} ${DEV_TXT_DB} ${DB_PY} ${PREV_DEV_CC_BBA_DB}
+                    )
+                add_custom_command(OUTPUT ${DEV_CC_DB}
+                    COMMAND bbasm --c ${DEV_CC_BBA_DB} ${DEV_CC_DB}.new
+                    COMMAND mv ${DEV_CC_DB}.new ${DEV_CC_DB}
+                    DEPENDS bbasm ${DEV_CC_BBA_DB}
+                    )
+            endif()
             if (SERIALIZE_CHIPDB)
                 set(PREV_DEV_CC_BBA_DB ${DEV_CC_BBA_DB})
             endif()


build: Add UndefinedBehaviorSanitizer

build: Add UndefinedBehaviorSanitizer

--- cmake/01-core.cmake
+++ cmake/01-core.cmake
@@ -95,7 +95,7 @@
 endif()

 # Custom build type ; SANITIZE
-SET(CMAKE_CXX_FLAGS_SANITIZE "-O1 -g -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls"
+SET(CMAKE_CXX_FLAGS_SANITIZE "-O0 -g -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer -fno-optimize-sibling-calls"
   CACHE STRING "Flags used by the C++ compiler during sanitize builds." FORCE)
 SET(CMAKE_C_FLAGS_SANITIZE ""
   CACHE STRING "Flags used by the C compiler during sanitize builds." FORCE)


build: clean up warning from CMake about a stray break()

--- cmake/FindLZO.cmake
+++ cmake/FindLZO.cmake
@@ -13,6 +13,5 @@
   if (EXISTS ${LZO_LIBRARY})
     set (LZO_LIBRARIES ${LZO_LIBRARY})
     set (LZO_FOUND "LZO_FOUND")
-    break ()
   endif ()
 endif ()


adding verbose messages

adding verbose messages

--- cmake/FindUsd.cmake
+++ cmake/FindUsd.cmake
@@ -19,9 +19,11 @@

 # Tangent specific build variables
 if(DEFINED ENV{REZ_HOUDINI_ROOT})
+    message(STATUS "Rez Houdini USD override")
     set(USE_HOUDINI_USD TRUE)
     set(HOUDINI_ROOT $ENV{HFS})
 else()
+    message(STATUS "Rez Pixar USD override")
     set(USE_HOUDINI_USD FALSE)
     set(USD_ROOT $ENV{REZ_USD_ROOT})
 endif()
@@ -30,8 +32,10 @@
 add_library(UsdInterface INTERFACE)
 add_library(Usd::Usd ALIAS UsdInterface)

+message(STATUS "Use Houdini Usd ${USE_HOUDINI_USD}")
+
 if(${USE_HOUDINI_USD})
     include(cmake/FindHoudiniUsd.cmake)
 else()
     include(cmake/FindPixarUsd.cmake)
-endif()+endif()


Fixed typos in Linux CMake sections

Fixed typos in Linux CMake sections

--- cmake/LibXML2.cmake
+++ cmake/LibXML2.cmake
@@ -26,11 +26,11 @@
 		find_package(LibXML2 REQUIRED)

 		# Create a target from this source if not already done
-		if(TARGET libxml2)
+		if(NOT TARGET libxml2)
 			add_library(libxml2 UNKNOWN IMPORTED)
 		endif()

-		set_property(${projectTarget} libxml2 PROPERTY IMPORTED_LOCATION ${LibXML2_LIBRARIES})
+		set_property(TARGET ${projectTarget} libxml2 PROPERTY IMPORTED_LOCATION ${LibXML2_LIBRARIES})
 	endif()

 	add_dependencies(${projectTarget} libxml2)


i ensured that the doxygen integration functions in Windows.

--- cmake/doxygen.cmake
+++ cmake/doxygen.cmake
@@ -33,7 +33,7 @@
 set(DOXYGEN_FLAGS ${DOXYGEN_CONFIG})
 set(DOXYGEN_CONFIG_TEMPLATE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Doxyfile.in)

-set(DOXYGEN_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen)
+set(DOXYGEN_OUTPUT_DIRECTORY "\"${CMAKE_CURRENT_BINARY_DIR}/doxygen\"")
 set(DOXYGEN_FULL_PATH_NAMES NO)
 set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES)
 set(DOXYGEN_SOURCE_BROWSER NO)
@@ -52,7 +52,7 @@

 	foreach(i ${ARGN})
 		set(DOXYGEN_INPUT
-			"${DOXYGEN_INPUT} ${CMAKE_CURRENT_SOURCE_DIR}/${i}"
+			"${DOXYGEN_INPUT} \"${CMAKE_CURRENT_SOURCE_DIR}/${i}\""
 			)
 	endforeach()
 	configure_file(${DOXYGEN_CONFIG_TEMPLATE} ${DOXYGEN_CONFIG})


cmake: update summary after Ubuntu 14.04 build fix

Signed-off-by: Artur Wojcik <ea75e86c6673ace627dcd6a91fbef5d4fea719d0@intel.com>

--- cmake/summary.cmake
+++ cmake/summary.cmake
@@ -81,9 +81,7 @@
     endif()
     report_status("")
     report_status("  Dependencies:")
-    if (ENABLE_AEON_SERVICE)
-        report_status("    Boost                      : Yes (ver. ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION})")
-    endif()
+    report_status("    Boost                      : Yes (ver. ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION})")
     report_status("    OpenCV                     : " OpenCV_FOUND THEN "Yes (ver. ${OpenCV_VERSION})" ELSE "Not Found")
     report_status("    SoX                        : " SOX_FOUND THEN "Yes (ver. ${SOX_VERSION})" ELSE "Not Found")
     report_status("    Curl                       : " CURL_FOUND THEN "Yes (ver. ${CURL_VERSION_STRING})" ELSE "Not Found")


Version 0.2.4

Version 0.2.4

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -1 +1 @@
-set(HUNTER_VERSION "0.2.3")
+set(HUNTER_VERSION "0.2.4")


cmake: warn on functions without parameter type list

fix #1545

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -131,7 +131,7 @@
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wshadow")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wcomments -Wtrigraphs -Wundef")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wuninitialized -Winit-self")
-#set (COMMON_FLAGS "${COMMON_FLAGS} -Wmissing-declarations -Wmissing-prototypes") # not fixed in code
+#set (C_EXTRA_FLAGS "${C_EXTRA_FLAGS} -Wstrict-prototypes") # not yet fixed in code

 # Not every compiler understands -Wmaybe-uninitialized
 check_c_compiler_flag(-Wmaybe-uninitialized HAS_CFLAG_MAYBE_UNINITIALIZED)


search clang-format

search clang-format

--- cmake/FindCLANG_FORMAT.cmake
+++ cmake/FindCLANG_FORMAT.cmake
@@ -7,6 +7,10 @@

 find_program(CLANG_FORMAT_EXECUTABLE
              NAMES clang-format
+                   clang-format-14
+                   clang-format-13
+                   clang-format-12
+                   clang-format-11
                    clang-format-10
                    clang-format-9
                    clang-format-8


included boolean if root version newer than v.6.08 in FindROOT

--- cmake/Modules/FindROOT.cmake
+++ cmake/Modules/FindROOT.cmake
@@ -21,6 +21,8 @@
 SET(ROOT_DEFINITIONS "")

 SET(ROOT_INSTALLED_VERSION_TOO_OLD FALSE)
+
+SET(ROOT_INSTALLED_VERSION_TOO_NEW FALSE)

 SET(ROOT_CONFIG_EXECUTABLE ROOT_CONFIG_EXECUTABLE-NOTFOUND)

@@ -52,11 +54,20 @@
   IF (NOT ROOT_MIN_VERSION)
     SET(ROOT_MIN_VERSION "5.00/00")
   ENDIF (NOT ROOT_MIN_VERSION)
+
+  # from 6.08/00 on no backward compatibility for TMVA anymore
+  IF (NOT ROOT_MAX_VERSION)
+    SET(ROOT_MAX_VERSION "6.07/00")
+  ENDIF (NOT ROOT_MAX_VERSION)

   # now parse the parts of the user given version string into variables
   STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" req_root_major_vers "${ROOT_MIN_VERSION}")
   STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" req_root_minor_vers "${ROOT_MIN_VERSION}")
   STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+)" "\\1" req_root_patch_vers "${ROOT_MIN_VERSION}")
+
+  STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+" "\\1" max_root_major_vers "${ROOT_MAX_VERSION}")
+  STRING(REGEX REPLACE "^[0-9]+\\.([0-9][0-9])+\\/[0-9][0-9]+.*" "\\1" max_root_minor_vers "${ROOT_MAX_VERSION}")
+  STRING(REGEX REPLACE "^[0-9]+\\.[0-9][0-9]+\\/([0-9][0-9]+)" "\\1" max_root_patch_vers "${ROOT_MAX_VERSION}")

   # and now the version string given by qmake
   STRING(REGEX REPLACE "^([0-9]+)\\.[0-9][0-9]+\\/[0-9][0-9]+.*" "\\1" found_root_major_vers "${ROOTVERSION}")
@@ -69,6 +80,7 @@

   # compute an overall version number which can be compared at once
   MATH(EXPR req_vers "${req_root_major_vers}*10000 + ${req_root_minor_vers}*100 + ${req_root_patch_vers}")
+  MATH(EXPR max_vers "${max_root_major_vers}*10000 + ${max_root_minor_vers}*100 + ${max_root_patch_vers}")
   MATH(EXPR found_vers "${found_root_major_vers}*10000 + ${found_root_minor_vers}*100 + ${found_root_patch_vers}")

   IF (found_vers LESS req_vers)
@@ -77,6 +89,11 @@
   ELSE (found_vers LESS req_vers)
     SET(ROOT_FOUND TRUE)
   ENDIF (found_vers LESS req_vers)
+
+  IF (max_vers LESS found_vers)
+    MESSAGE("Current ROOT version \"${ROOTVERSION}\" is newer than 6.07/00, TMVA works differently now")
+    SET(ROOT_INSTALLED_VERSION_TOO_NEW TRUE)
+  ENDIF (max_vers LESS found_vers)

 ENDIF (ROOT_CONFIG_EXECUTABLE)


Turned CMake ENABLE_UNIT_TEST to OFF by default

--- cmake/Modules/Packages.cmake
+++ cmake/Modules/Packages.cmake
@@ -51,7 +51,7 @@
 #
 ################################################################################

-option(ENABLE_UNIT_TEST "Enable unit testing" ON)
+option(ENABLE_UNIT_TEST "Enable unit testing" OFF)
 add_feature(ENABLE_UNIT_TEST "Enable unit testing")

 if(ENABLE_UNIT_TEST)


Since W32 works on Win64 too, rename it to GDI

--- cmake/Modules/frontend.cmake
+++ cmake/Modules/frontend.cmake
@@ -35,20 +35,20 @@

 macro(win32_check)
 	if(HAVE_WINDOWS)
-		option(WIN32_ENABLE "Enable the Win32 frontend" on)
+		option(WIN32_ENABLE "Enable the Win32 GDI frontend" on)
 	endif()

 	if(WIN32_ENABLE)
 		set(HAVE_WIN32 1)

 		file(GLOB W32_FRONTEND_SOURCES src/frontends/w32/*.c)
-		add_executable("sgherm-w32" WIN32 ${W32_FRONTEND_SOURCES} $<TARGET_OBJECTS:sgherm-core>)
+		add_executable("sgherm-gdi" WIN32 ${W32_FRONTEND_SOURCES} $<TARGET_OBJECTS:sgherm-core>)

 		if(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
 			# necessary to work around 'stdbool' and related stuff
 			file(GLOB_RECURSE ALL_SOURCES src/*.c)
 			set_source_files_properties(ALL_SOURCES PROPERTIES LANGUAGE CXX)
-			set_target_properties("sgherm-w32" PROPERTIES LINKER_LANGUAGE CXX)
+			set_target_properties("sgherm-gdi" PROPERTIES LINKER_LANGUAGE CXX)
 		endif()

 		set(HAVE_FRONTEND on)


Changing Intel OpenMP flag to qopenmp

Changing Intel OpenMP flag to qopenmp

--- cmake/custom/math_libs.cmake
+++ cmake/custom/math_libs.cmake
@@ -384,7 +384,7 @@
         set(_omp_flag)
         if(HAVE_MKL_BLAS OR HAVE_MKL_LAPACK)
             if(MKL_COMPILER_BINDINGS MATCHES Intel)
-                set(_omp_flag -openmp)
+                set(_omp_flag -qopenmp)
             endif()
             if(MKL_COMPILER_BINDINGS MATCHES GNU)
                 set(_omp_flag -fopenmp)


Switch libxml example to cmake build

Switch libxml example to cmake build

--- cmake/external/libxml2.cmake
+++ cmake/external/libxml2.cmake
@@ -36,14 +36,11 @@
     GIT_REPOSITORY GIT_REPOSITORY https://gitlab.gnome.org/GNOME/libxml2
     GIT_TAG master
     UPDATE_COMMAND ""
-    CONFIGURE_COMMAND ${LIBXML2_SRC_DIR}/autogen.sh --without-python
-                                                    --prefix=${LIBXML2_INSTALL_DIR}
-                                                    --enable-static
-                                                    CC=${CMAKE_C_COMPILER}
-                                                    CXX=${CMAKE_CXX_COMPILER}
-                                                    CFLAGS=${LIBXML2_CFLAGS}
-                                                    CXXFLAGS=${LIBXML2_CXXFLAGS}
-    BUILD_COMMAND make -j ${CPU_COUNT} all
-    INSTALL_COMMAND make install
+    CMAKE_CACHE_ARGS -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+                     -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+    CMAKE_ARGS -DCMAKE_C_FLAGS=${LIBXML2_CFLAGS} -DCMAKE_CXX_FLAGS=${LIBXML2_CXXFLAGS}
+               -DCMAKE_INSTALL_PREFIX=${LIBXML2_INSTALL_DIR}
+               -DCMAKE_INSTALL_LIBDIR=lib
+               -DBUILD_SHARED_LIBS=OFF
     BUILD_BYPRODUCTS ${LIBXML2_BUILD_BYPRODUCTS}
 )


Modify a CMake rule: executables generated by Swift depend on swiftSwiftOnoneSupport.

This makes sure that such executables are only built after swiftSwiftOnoneSupport is built.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1859,6 +1859,8 @@

   # All Swift executables depend on the standard library.
   list(APPEND SWIFTEXE_TARGET_LINK_FAT_LIBRARIES swiftCore)
+  # All Swift executables depend on the swiftSwiftOnoneSupport library.
+  list(APPEND SWIFTEXE_TARGET_DEPENDS swiftSwiftOnoneSupport)

   if(NOT "${SWIFT_BUILD_STDLIB}")
     list(REMOVE_ITEM SWIFTEXE_TARGET_LINK_FAT_LIBRARIES


update windows.cmake to fix common build issues on Windows (#984)

* fix merge conflict, separate helper macro addition from this change

* add NO_STRICT from catkin level for Windows build.

* add Q_NOWINSTRICT

* add more global helper.

* add  WIN32_LEAN_AND_MEAN

*  Avoid using set_target_properties on ALIAS targets (#26)

* Avoid using set_target_properties on ALIAS targets

This change is to fix the error like below:
2018-11-30T10:40:39.7610068Z CMake Error at C:/opt/ros/melodic/x64/share/catkin/cmake/platform/windows.cmake:47 (set_target_properties):
2018-11-30T10:40:39.7610963Z   set_target_properties can not be used on an ALIAS target.
2018-11-30T10:40:39.7611263Z Call Stack (most recent call first):
2018-11-30T10:40:39.7611903Z   abseil_cpp/CMake/AbseilHelpers.cmake:67 (add_library)
2018-11-30T10:40:39.7612185Z   abseil_cpp/absl/base/CMakeLists.txt:74 (absl_library)

* nit

* Globally enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS for Windows build. (#29)

Walking through the projects we touched for ROS, many of them simply are just missing the dllimport/dllexport declarative, so no imported library is generated and breaks the build for downstream projects. Some are fixed by defining dllexport/dllimport, by defining WINDOWS_EXPORT_ALL_SYMBOLS, or by switching them to STATIC library (STATIC lib sometimes even creates more problems since the author assumes it is a shared lib at run-time).

In order to quickly enabling more untouched ROS packages, I am suggesting to enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS globally to quickly enabling them, but we should still encourage the package owners to explicitly use dllexport in our cookbook.

* update comments, reorder definitions in alphabetical order (#37)

* spelling

--- cmake/platform/windows.cmake
+++ cmake/platform/windows.cmake
@@ -41,9 +41,10 @@
   if(WIN32)
     function(add_library library)
       # Check if its an external, imported library (e.g. boost libs via cmake module definition)
-      list(FIND ARGN "IMPORTED" FIND_POS)
+      list(FIND ARGN "IMPORTED" FIND_IMPORTED)
+      list(FIND ARGN "ALIAS" FIND_ALIAS)
       _add_library(${ARGV0} ${ARGN})
-      if(${FIND_POS} EQUAL -1)
+      if(${FIND_IMPORTED} EQUAL -1 AND ${FIND_ALIAS} EQUAL -1)
         set_target_properties(${ARGV0}
           PROPERTIES
               RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_BIN_DESTINATION}
@@ -54,3 +55,36 @@
     endfunction()
   endif()
 endif()
+
+# It is encouraged to follow this guide to enable exports for dll's in a cross-platform way:
+#   http://wiki.ros.org/win_ros/Contributing/Dll%20Exports
+# however, since not every project has implemented import/export macros, enable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS as a workaround
+#   https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/
+if(BUILD_SHARED_LIBS)
+  if(WIN32)
+    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
+  endif()
+endif()
+
+# For Windows, add definitions to exclude defining common names macros that cause name collision
+if(WIN32)
+  # enable Math Constants (https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants)
+  add_definitions(-D_USE_MATH_DEFINES)
+
+  # do not define STRICT macros (minwindef.h or boost\winapi\basic_types.hpp)
+  add_definitions(-DNO_STRICT)
+
+  # do not define min/max macros
+  add_definitions(-DNOMINMAX)
+
+  # do not define STRICT macros (qtgui\qwindowdefs_win.h)
+  add_definitions(-DQ_NOWINSTRICT)
+
+  # keep minimum windows headers inclusion
+  add_definitions(-DWIN32_LEAN_AND_MEAN)
+endif()
+
+if(MSVC)
+  # https://blogs.msdn.microsoft.com/vcblog/2018/04/09/msvc-now-correctly-reports-__cplusplus/
+  add_compile_options(/Zc:__cplusplus)
+endif()


Replace add_definitions with add_compile_definitions (-U_DEBUG).

--- cmake/third_party/xsmm.cmake
+++ cmake/third_party/xsmm.cmake
@@ -36,7 +36,7 @@
 target_compile_definitions(xsmm PRIVATE
   __BLAS=0
 )
-add_definitions(-U_DEBUG)
+add_compile_definitions(-U_DEBUG)

 set(THREADS_PREFER_PTHREAD_FLAG ON)
 find_package(Threads REQUIRED)


cmake: Set minimum required Zephyr SDK version to 0.13

In order to use the newlib retagetable locking interface (for thread
safety), which requires the newlib multi-threading feature to be
enabled, the Zephyr SDK 0.13.0 or above must be used.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/verify-toolchain.cmake
+++ cmake/verify-toolchain.cmake
@@ -16,11 +16,7 @@
 # FORMAT=json: Print the output as a json formatted string, useful for Python

 # This is the minimum required Zephyr-SDK version which supports CMake package
-if("${ARCH}" STREQUAL "arm64")
-  set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.12.4)
-else()
-  set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.12)
-endif()
+set(TOOLCHAIN_ZEPHYR_MINIMUM_REQUIRED_VERSION 0.13)

 # Set internal variables if set in environment.
 if(NOT DEFINED ZEPHYR_TOOLCHAIN_VARIANT)


Fix Emscripten toolchain file for determining EMCC version in Windows.

--- CMake/Toolchains/emscripten.toolchain.cmake
+++ CMake/Toolchains/emscripten.toolchain.cmake
@@ -35,24 +35,24 @@
 set (CMAKE_SYSTEM_VERSION 1)

 # specify the cross compiler
+if (CMAKE_HOST_WIN32)
+    set (TOOL_EXT .bat)
+endif ()
 if (NOT EMSCRIPTEN_ROOT_PATH AND DEFINED ENV{EMSCRIPTEN_ROOT_PATH})
     file (TO_CMAKE_PATH $ENV{EMSCRIPTEN_ROOT_PATH} EMSCRIPTEN_ROOT_PATH)
 endif ()
-if (NOT EXISTS ${EMSCRIPTEN_ROOT_PATH}/emcc)
+if (NOT EXISTS ${EMSCRIPTEN_ROOT_PATH}/emcc${TOOL_EXT})
     message (FATAL_ERROR "Could not find Emscripten cross compilation tool. "
         "Use EMSCRIPTEN_ROOT_PATH environment variable or build option to specify the location of the toolchain.")
 endif ()
 if (NOT EMCC_VERSION)
-    execute_process (COMMAND ${EMSCRIPTEN_ROOT_PATH}/emcc --version RESULT_VARIABLE EXIT_CODE OUTPUT_VARIABLE EMCC_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process (COMMAND ${EMSCRIPTEN_ROOT_PATH}/emcc${TOOL_EXT} --version RESULT_VARIABLE EXIT_CODE OUTPUT_VARIABLE EMCC_VERSION ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
     if (EXIT_CODE EQUAL 0)
         string (REGEX MATCH "[^ .]+\\.[^.]+\\.[^ ]+" EMCC_VERSION "${EMCC_VERSION}")    # Stringify as it could be empty when an error has occured
     else ()
         message (FATAL_ERROR "Could not determine the emcc version. Make sure you have installed and activated the Emscripten SDK correctly.")
     endif ()
     set (EMCC_VERSION ${EMCC_VERSION} CACHE STRING "emcc version being used in this build tree")    # Cache the result even when there was error in determining the version
-endif ()
-if (CMAKE_HOST_WIN32)
-    set (TOOL_EXT .bat)
 endif ()
 set (COMPILER_PATH ${EMSCRIPTEN_ROOT_PATH})
 # ccache support could only be enabled for emcc prior to 1.31.3 when the CCACHE_CPP2 env var is also set to 1, newer emcc version could enable ccache support without this caveat (see https://github.com/kripken/emscripten/issues/3365 for more detail)


Apply cmake-init 400f3654f4b77f3d745c6b48d5f40ef09dbf0598

--- deploy/packages/pack-cpplocate.cmake
+++ deploy/packages/pack-cpplocate.cmake
@@ -47,21 +47,29 @@
 # Package components
 #

-set(CPACK_COMPONENTS_ALL runtime dev examples docs)
-
-set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "cpplocate library")
-set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Runtime components for cpplocate library")
+set(CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "${META_PROJECT_NAME} library")
+set(CPACK_COMPONENT_RUNTIME_DESCRIPTION "Runtime components for ${META_PROJECT_NAME} library")

 set(CPACK_COMPONENT_DEV_DISPLAY_NAME "C/C++ development files")
-set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for cpplocate library")
+set(CPACK_COMPONENT_DEV_DESCRIPTION "Development files for ${META_PROJECT_NAME} library")
 set(CPACK_COMPONENT_DEV_DEPENDS runtime)

-set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Example applications")
-set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example applications for cpplocate library")
-set(CPACK_COMPONENT_EXAMPLES_DEPENDS runtime)
-
-set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation")
-set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation of cpplocate library")
+set(CPACK_COMPONENTS_ALL runtime dev)
+
+if (OPTION_BUILD_EXAMPLES)
+    set(CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "Example applications")
+    set(CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example applications for ${META_PROJECT_NAME} library")
+    set(CPACK_COMPONENT_EXAMPLES_DEPENDS runtime)
+
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} examples)
+endif()
+
+if (OPTION_BUILD_DOCS)
+    set(CPACK_COMPONENT_DOCS_DISPLAY_NAME "Documentation")
+    set(CPACK_COMPONENT_DOCS_DESCRIPTION "Documentation of ${META_PROJECT_NAME} library")
+
+    set(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} docs)
+endif()

 #


Update square-Link.cmake

Update square-Link.cmake

--- devops/cmake/square-Link.cmake
+++ devops/cmake/square-Link.cmake
@@ -35,12 +35,7 @@

     target_link_libraries ( ${PROJECT_NAME}

-        #S2-CanvasModel
         S2-DragModel
-        S2-JsonModel
-        #S2-NodeModel
-        #S2-TreeModel
-        #S2-GraphModel
     )

 endmacro(Link_Models)
@@ -55,11 +50,6 @@
     target_link_libraries ( ${PROJECT_NAME}

         S3-TableFrame
-        #S3-Diag
-        #S4-TaskManager
-        #S3-Pathstroke
-        #S3-undo
-        #S3-NetworkFrame
     )

 endmacro(Link_Systems)


less cluttering of build dir

less cluttering of build dir

git-svn-id: dea4c50957f75874cf9791776be29d2e34106c50@266 ef0d8562-5c19-0410-972e-841db63a069c

--- CMakeModules/CompilerVisibility.cmake
+++ CMakeModules/CompilerVisibility.cmake
@@ -22,14 +22,14 @@
 IF(NOT DEFINED HAVE_NASM_VISIBILITY)
   MESSAGE(STATUS "Performing Test HAVE_NASM_VISIBILITY")
   SET(SOURCE "global _foo:function hidden\n_foo:")
-  FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeTmp/src.nasm" "${SOURCE}")
+  FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.nasm" "${SOURCE}")

   TRY_COMPILE(HAVE_NASM_VISIBILITY
         ${CMAKE_BINARY_DIR}
-        ${CMAKE_BINARY_DIR}/CMakeTmp/src.nasm
+        ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/src.nasm
         OUTPUT_VARIABLE OUTPUT)

-  WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeOutput.log
+  WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
     "Performing nasm visibility test with the following output:\n"
     "${OUTPUT}\n"
     "Source file was:\n${SOURCE}\n" APPEND)


Issue #51: Try OpenCV version 3.4.5

Issue #51: Try OpenCV version 3.4.5

--- CMake/ExternalProjects/OpenCV.cmake
+++ CMake/ExternalProjects/OpenCV.cmake
@@ -24,7 +24,7 @@
   message(FATAL_ERROR "OpenCV_DIR variable is defined but corresponds to non-existing directory")
 endif()

-set(version "4.0.1")
+set(version "3.4.5")
 set(location "https://github.com/opencv/opencv.git")
 mpMacroDefineExternalProjectVariables(OpenCV ${version} ${location})
 set(proj_DEPENDENCIES )


Create .app bundles for samples on OS X

Create .app bundles for samples on OS X

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -99,6 +99,11 @@
       INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib)
     set_property(TARGET ${SAMPLENAME} PROPERTY INSTALL_RPATH_USE_LINK_PATH TRUE)
   endif ()
+
+  # On OS X, create .app bundle
+  if (APPLE)
+    set_property(TARGET ${SAMPLENAME} PROPERTY MACOSX_BUNDLE TRUE)
+  endif ()

   if (OGRE_INSTALL_SAMPLES)
     install(TARGETS ${SAMPLENAME}


fix bundling

fix bundling

--- superbuild/Projects/apple/nuclearRGG.bundle.cmake
+++ superbuild/Projects/apple/nuclearRGG.bundle.cmake
@@ -47,7 +47,7 @@
               execute_process(
                 COMMAND ${CMAKE_CURRENT_LIST_DIR}/fixup_bundle.py
                         \"\${CMAKE_INSTALL_PREFIX}/${Package_Folder}/RGGNuclear.app/meshkit/coregen\"
-                        \"${install_location}/lib\"
+                        \"${SEARCH_LOC}\"
                         \"${install_location}/plugins\")
     "
     COMPONENT superbuild)


Add the possibility to define a custom build-string suffix

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -426,6 +426,10 @@
   else()
     set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-64bit)
   endif()
+
+  if(EIGEN_BUILD_STRING_SUFFIX)
+    set(TMP_BUILD_STRING ${TMP_BUILD_STRING}-${EIGEN_BUILD_STRING_SUFFIX})
+  endif()

   string(TOLOWER ${TMP_BUILD_STRING} BUILDNAME)
 endmacro(ei_set_build_string)


-update FindAutomoc4.cmake to include documentation, same as in kdelibs/cmake/modules/FindAutomoc4.cmake

Alex

svn path=/trunk/kdesupport/phonon/; revision=905550

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -3,19 +3,41 @@
 #
 #  AUTOMOC4_FOUND - automoc4 has been found
 #  AUTOMOC4_EXECUTABLE - the automoc4 tool
+#  AUTOMOC4_VERSION - the full version of automoc4
+#  AUTOMOC4_VERSION_MAJOR, AUTOMOC4_VERSION_MINOR, AUTOMOC4_VERSION_PATCH - AUTOMOC4_VERSION
+#                     broken into its components
 #
 # It also adds the following macros
 #  AUTOMOC4(<target> <SRCS_VAR>)
 #    Use this to run automoc4 on all files contained in the list <SRCS_VAR>.
 #
-#  AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h)
+#  AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h ...)
 #    Use this to add more header files to be processed with automoc4.
+#
+#  AUTOMOC4_ADD_EXECUTABLE(<target_NAME> src1 src2 ...)
+#    This macro does the same as ADD_EXECUTABLE, but additionally
+#    adds automoc4 handling for all source files.
+#
+# AUTOMOC4_ADD_LIBRARY(<target_NAME> src1 src2 ...)
+#    This macro does the same as ADD_LIBRARY, but additionally
+#    adds automoc4 handling for all source files.
+
+# Internal helper macro, may change or be removed anytime:
+# _ADD_AUTOMOC4_TARGET(<target_NAME> <SRCS_VAR>)
+#
+# Since version 0.9.88:
+# The following two macros are only to be used for KDE4 projects
+# and do something which makes sure automoc4 works for KDE. Don't
+# use them anywhere else.
+# _AUTOMOC4_KDE4_PRE_TARGET_HANDLING(<target_NAME> <SRCS_VAR>)
+# _AUTOMOC4_KDE4_POST_TARGET_HANDLING(<target_NAME>)

-# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
+# Copyright (c) 2008-2009, Alexander Neundorf, <neundorf@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+

 # check if we are inside KDESupport and automoc is enabled
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")


Disabled libclang-3.4 as it is bogus in Ubuntu.

--- cmake/FindLibClang.cmake
+++ cmake/FindLibClang.cmake
@@ -5,14 +5,14 @@
 find_path(CLANG_INCLUDE clang-c/Index.h
           HINTS
           ${CLANG_ROOT}/include
-          /usr/lib/llvm-3.4/include
+          # /usr/lib/llvm-3.4/include
           /usr/lib/llvm-3.3/include
           /usr/lib/llvm-3.2/include
           /usr/lib/llvm-3.1/include
+          # /opt/local/libexec/llvm-3.4/include
           /opt/local/libexec/llvm-3.3/include
           /opt/local/libexec/llvm-3.2/include
           /opt/local/libexec/llvm-3.1/include
-          /usr/lib/llvm-3.4/include
           NO_DEFAULT_PATH)
 if (NOT EXISTS ${CLANG_INCLUDE})
   find_path(CLANG_INCLUDE clang-c/Index.h)
@@ -21,11 +21,14 @@
 find_path(CLANG_COMPILATION_INCLUDE clang-c/CXCompilationDatabase.h
       HINTS
       ${CLANG_ROOT}/include
+      # /opt/local/libexec/llvm-3.4/include
       /opt/local/libexec/llvm-3.3/include
       /opt/local/libexec/llvm-3.2/include
       /opt/local/libexec/llvm-3.1/include
-      /opt/local/libexec/llvm-3.0/include
-      /usr/lib/llvm-3.4/include
+      # /usr/lib/llvm-3.4/include
+      /usr/lib/llvm-3.3/include
+      /usr/lib/llvm-3.2/include
+      /usr/lib/llvm-3.1/include
       NO_DEFAULT_PATH)
 if (NOT EXISTS ${CLANG_COMPILATION_INCLUDE})
   find_path(CLANG_COMPILATION_INCLUDE clang-c/CXCompilationDatabase.h)


fix for corrent modules dependencies

fix for corrent modules dependencies

--- cmake/OpenCVModule.cmake
+++ cmake/OpenCVModule.cmake
@@ -56,6 +56,8 @@
   if(HAVE_${mod})
     unset(HAVE_${mod} CACHE)
   endif()
+  unset(OPENCV_MODULE_${mod}_DEPS CACHE)
+  unset(OPENCV_MODULE_${mod}_DEPS_EXT CACHE)
   unset(OPENCV_MODULE_${mod}_REQ_DEPS CACHE)
   unset(OPENCV_MODULE_${mod}_OPT_DEPS CACHE)
   unset(OPENCV_MODULE_${mod}_PRIVATE_REQ_DEPS CACHE)


Remove unnecessary workaround

Remove unnecessary workaround

This is not necessary anymore for all the g++/libstdc++ versions we
support.

--- cmake/alpakaCommon.cmake
+++ cmake/alpakaCommon.cmake
@@ -358,14 +358,6 @@
                     target_compile_options(alpaka INTERFACE "-save-temps")
                 endif()

-                # When libstdc++ is used and -std=gnu++XX is set, we get the following compile error:
-                # /usr/lib/gcc/x86_64-linux-gnu/5.5.0/../../../../include/c++/5.5.0/type_traits:311:39: error: __float128 is not supported on this target struct __is_floating_point_helper<__float128>
-                # Clang doesn't support the __float128 type (at least when building CUDA device code)
-                # * Due to the minimum requirement to compile with C++14 and because extensions are enabled by default by CMake, it adds -std=gnu++14 instead of -std=c++14 to the command line.
-                #   Due to alpaka being an INTERFACE library (header-only) we are not allowed to set CXX_EXTENSIONS to OFF and transitively disable extensions for inherited targets.
-                # * Defining __float128 on the command line is the least invasive workaround found here: https://bugs.llvm.org/show_bug.cgi?id=13530#c6
-                target_compile_definitions(alpaka INTERFACE "__float128=void")
-
                 # CMake 3.15 does not provide the `--std=c++*` argument to clang anymore.
                 # It is not necessary for basic c++ compilation because clangs default is already higher, but CUDA code compiled with -x cuda still defaults to c++98.
                 if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15.0")


fixing fife appveyor build (updated fifechan)

--- cmake/get-fifechan.cmake
+++ cmake/get-fifechan.cmake
@@ -35,8 +35,8 @@
       PREFIX              ${DEPENDENCY_EXTRACT_DIR}
       DOWNLOAD_DIR        ${DEPENDENCY_DOWNLOAD_DIR}
       #URL                 https://github.com/fifengine/fifechan/releases/tag/${FIFECHAN_VERSION}/fifechan-v${FIFECHAN_VERSION}-VC14.zip
-      URL                 https://ci.appveyor.com/api/buildjobs/k6gfl3mdxnkhy9mn/artifacts/fifechan-shared-0.1.4-VC14-x86.zip
-      URL_MD5             4925a3d07994b1e360e034ed0475dc37
+      URL                 https://ci.appveyor.com/api/buildjobs/ut5f5r7r7vdo9jvs/artifacts/fifechan-shared-VC14-x86.zip
+      URL_MD5             4922f113510f61b81288c9dba1538a44
       CONFIGURE_COMMAND   ""
       BUILD_COMMAND       ""
       INSTALL_COMMAND


CMake: enable c++17 if available

CMake: enable c++17 if available

--- cmake/globalconfig.cmake
+++ cmake/globalconfig.cmake
@@ -49,8 +49,15 @@
     endif()
 else()
     include(CheckCXXCompilerFlag)
-    CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX14)
-    if(COMPILER_SUPPORTS_CXX14)
+    CHECK_CXX_COMPILER_FLAG("-std=c++14" compiler_supports_cxx14)
+    CHECK_CXX_COMPILER_FLAG("-std=c++17" compiler_supports_cxx17)
+    if(compiler_supports_cxx17)
+        message(STATUS "C++17 enabled")
+        set(CMAKE_CXX_STANDARD 17)
+        set(CMAKE_CXX_STANDARD_REQUIRED ON)
+        #set(CMAKE_CXX_EXTENSIONS OFF)
+    elseif(compiler_supports_cxx14)
+        message(STATUS "C++14 enabled")
         set(CMAKE_CXX_STANDARD 14)
         set(CMAKE_CXX_STANDARD_REQUIRED ON)
         set(CMAKE_CXX_EXTENSIONS OFF)


added rostime to target_link_libraries

added rostime to target_link_libraries

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

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -3,7 +3,7 @@

 macro(link_ros_libs _target)
     if(USE_ROS)
-        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole)
+        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole rostime)
     endif(USE_ROS)
 endmacro(link_ros_libs)


BUG: Remove dashboard common script data related to modular ITK dashboard.

This causes errors when CMake configures with a different source tree with a
Superbuild dashboard submission.

Change-Id: Iccf800a15fbc402f8f714628f3579ade152926a0

--- Utilities/Dashboard/itkexamples_common.cmake
+++ Utilities/Dashboard/itkexamples_common.cmake
@@ -411,79 +411,6 @@
       ctest_submit(PARTS Update Notes Configure)
     endif()

-    #include("${CTEST_BINARY_DIRECTORY}/${main_project_name}.SubProjects.cmake")
-    #if(NOT dashboard_no_submit)
-      #ctest_submit(FILES "${CTEST_BINARY_DIRECTORY}/${main_project_name}.Project.xml")
-    #endif()
-
-    set(disable_last_subproj "")
-    foreach(subproj ${itk_subprojects})
-      safe_message("Configure/build/test subproject [${subproj}]...")
-      set_property(GLOBAL PROPERTY SubProject ${subproj})
-      set_property(GLOBAL PROPERTY Label ${subproj})
-
-      set(options
-        ${disable_last_subproj}
-        )
-      set(disable_last_subproj -DModule_${subproj}:BOOL=OFF)
-      ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS "${options}")
-
-      if(NOT dashboard_no_submit)
-        ctest_submit(PARTS Configure)
-      endif()
-
-      if(COMMAND dashboard_hook_build)
-        dashboard_hook_build()
-      endif()
-      ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" TARGET "${subproj}-all" APPEND)
-      if(NOT dashboard_no_submit)
-        ctest_submit(PARTS Build)
-      endif()
-
-      if(COMMAND dashboard_hook_test)
-        dashboard_hook_test()
-      endif()
-      if(dashboard_superbuild)
-        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}/ITKExamples-build" INCLUDE_LABEL "^${subproj}$" ${CTEST_TEST_ARGS})
-      else()
-        ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "^${subproj}$" ${CTEST_TEST_ARGS})
-      endif()
-      set(safe_message_skip 1) # Block further messages
-      if(NOT dashboard_no_submit)
-        ctest_submit(PARTS Test)
-      endif()
-
-      if(dashboard_do_coverage)
-        if(COMMAND dashboard_hook_coverage)
-          dashboard_hook_coverage()
-        endif()
-        ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}" LABELS "${subproj}")
-        if(NOT dashboard_no_submit)
-          ctest_submit(PARTS Coverage)
-        endif()
-      endif()
-
-      if(dashboard_do_memcheck)
-        if(COMMAND dashboard_hook_memcheck)
-          dashboard_hook_memcheck()
-        endif()
-        ctest_memcheck()
-        if(NOT dashboard_no_submit)
-          ctest_submit(PARTS MemCheck)
-        endif()
-      endif()
-    endforeach()
-
-    # Final configure needs ITK_BUILD_ALL_MODULES ON to build everything.
-    set_property(GLOBAL PROPERTY SubProject ${main_project_name})
-    set_property(GLOBAL PROPERTY Label ${main_project_name})
-
-    safe_message("Final configure top level project...")
-    set(options
-      ${disable_last_subproj}
-      )
-    ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}" OPTIONS "${options}")
-
     if(COMMAND dashboard_hook_build)
       dashboard_hook_build()
     endif()


add packaging for linux:

add packaging for linux:

--- superbuild/Projects/unix/nuclearRGG.bundle.cmake
+++ superbuild/Projects/unix/nuclearRGG.bundle.cmake
@@ -6,17 +6,40 @@
 include(nuclearRGG.bundle.common)
 include(CPack)

+#install(DIRECTORY "@install_location@/lib"
+#  DESTINATION "lib"
+#  USE_SOURCE_PERMISSIONS
+#  COMPONENT superbuild)
+
+install(PROGRAMS ${install_location}/lib/RGGNuclear DESTINATION "lib")
+
+
+install(CODE
+      "execute_process(COMMAND
+      ${CMAKE_COMMAND}
+        -Dexecutable:PATH=${install_location}/lib/RGGNuclear
+        -Ddependencies_root:PATH=${install_location}
+        -Dpv_libraries_root:PATH=${install_location}/lib
+        -Dcmb_libraries_root:PATH=${install_location}/lib
+        -Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib
+        -P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)"
+    COMPONENT superbuild)
+
+install(PROGRAMS ${install_location}/bin/RGGNuclear DESTINATION "bin")
+
 #we have to install everything in bin that also wasn't in lib. The reason for this is that
 # all the paraview application in bin are just forward shells
 # install executables from bin that aren't in the programs_to install
-install(DIRECTORY
-    "@install_location@/bin/"
-    DESTINATION "bin"
-    USE_SOURCE_PERMISSIONS
-    COMPONENT superbuild
-    FILES_MATCHING
-    REGEX "RGG.*"
-    PATTERN "CMBNuclear")
+#install(DIRECTORY
+#    "@install_location@/bin/"
+#    DESTINATION "bin"
+#    USE_SOURCE_PERMISSIONS
+#    COMPONENT superbuild
+#    FILES_MATCHING
+#    REGEX "RGG.*"
+#    PATTERN "RGGNuclear")
+
+

 #install qt
 if (qt_ENABLED AND NOT USE_SYSTEM_qt)


Minor correction for correct Qt 5 detection in CONFIG mode

--- adm_local/cmake_files/FindSalomeQt5.cmake
+++ adm_local/cmake_files/FindSalomeQt5.cmake
@@ -45,7 +45,7 @@
 ENDFOREACH()

 FIND_PACKAGE(Qt5LinguistTools)
-GET_TARGET_PROPERTY(QT_LRELEASE_EXECUTABLE ${Qt5_LRELEASE_EXECUTABLE} LOCATION)
+GET_TARGET_PROPERTY(QT_LRELEASE_EXECUTABLE Qt5::lrelease LOCATION)
 MARK_AS_ADVANCED(QT_LRELEASE_EXECUTABLE)

 GET_FILENAME_COMPONENT(QT_BINARY_DIR ${QT_LRELEASE_EXECUTABLE} DIRECTORY)
@@ -65,7 +65,8 @@
   SALOME_ACCUMULATE_ENVIRONMENT(PATH ${LINGUIST_PATH})
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${Qt5Core_LIBRARIES})
   SET(QT_VERSION "${Qt5Core_VERSION}")
-  SET(Qt5_DIR ${Qt5Core_DIR})
+  GET_FILENAME_COMPONENT(Qt5_DIR ${Qt5Core_DIR} PATH)
+  FILE(TO_NATIVE_PATH "${Qt5_DIR}/Qt5" Qt5_DIR)
   SET(SalomeQt5_COMPONENTS ${Qt5_FIND_COMPONENTS})
   MESSAGE(STATUS "Qt version is ${QT_VERSION}")
 ENDIF()


change dpcpp fp-mode to precise (same as clang's default)

--- common/cmake/clang.cmake
+++ common/cmake/clang.cmake
@@ -63,6 +63,11 @@

   INCLUDE(msvc_post)

+  IF(${CMAKE_CXX_COMPILER} MATCHES ".*icx")
+    # workaround for file encoding problems of kernels/embree.rc found here https://gitlab.kitware.com/cmake/cmake/-/issues/18311
+    set(CMAKE_NINJA_CMCLDEPS_RC OFF)
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise")        # dpcpp has fp-model fast as default
+  ENDIF()
 ELSE()

   OPTION(EMBREE_IGNORE_CMAKE_CXX_FLAGS "When enabled Embree ignores default CMAKE_CXX_FLAGS." ON)
@@ -107,6 +112,7 @@

   IF(${CMAKE_CXX_COMPILER} MATCHES ".*icpx")
     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel")             # links intel runtime statically
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffp-model=precise")        # dpcpp has fp-model fast as default
   ENDIF()

   SET(CMAKE_CXX_FLAGS_DEBUG "")


added: GLM_ENABLE_EXPERIMENTAL

added: GLM_ENABLE_EXPERIMENTAL

--- share/hugh/cmake/CMakeAddons_SetupVariables.cmake
+++ share/hugh/cmake/CMakeAddons_SetupVariables.cmake
@@ -72,6 +72,7 @@
 endif()

 # GLM
+add_definitions(-DGLM_ENABLE_EXPERIMENTAL)
 # add_definitions(-DGLM_FORCE_CXX11)
 # add_definitions(-DGLM_FORCE_EXPLICIT_CTOR)
 add_definitions(-DGLM_FORCE_INLINE)


Added support to Xcode

Added support to Xcode

--- runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake
+++ runtime/Cpp/cmake/ExternalAntlr4Cpp.cmake
@@ -13,6 +13,8 @@

 if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
   set(ANTLR4_OUTPUT_DIR ${ANTLR4_ROOT}/runtime/Cpp/dist/$(Configuration))
+elseif(${CMAKE_GENERATOR} MATCHES "Xcode.*")
+  set(ANTLR4_OUTPUT_DIR ${ANTLR4_ROOT}/runtime/Cpp/dist/$(CONFIGURATION))
 else()
   set(ANTLR4_OUTPUT_DIR ${ANTLR4_ROOT}/runtime/Cpp/dist)
 endif()
@@ -55,6 +57,12 @@
       ${CMAKE_COMMAND}
           --build .
           --config $(Configuration)
+          --target)
+elseif(${CMAKE_GENERATOR} MATCHES "Xcode.*")
+  set(ANTLR4_BUILD_COMMAND
+      ${CMAKE_COMMAND}
+          --build .
+          --config $(CONFIGURATION)
           --target)
 else()
   set(ANTLR4_BUILD_COMMAND


SALOME_GENERATE_TESTS_ENVIRONMENT script: process correctly ';' separator in env variables on Linux

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -832,7 +832,8 @@
        SET(_env "${_item}=$ENV{${_item}};${_env_${_item}}${sep}${_env}")
      ENDIF()
    ELSE()
-     SET(_env "${_item}=$ENV{${_item}}:${_env_${_item}}${sep}${_env}")
+     STRING(REPLACE ";" ":" _iii "$ENV{${_item}}")
+     SET(_env "${_item}=${_iii}:${_env_${_item}}${sep}${_env}")
    ENDIF()
  ENDFOREACH()


Hack to get CMake to behave.

Hack to get CMake to behave.

CMake is not a general purpose data processing language they say.
So I need a hack for CMake not balking at unmatched [ ]

https://public.kitware.com/Bug/view.php?id=15369

--- cmake/CoverallsGenerateGcov.cmake
+++ cmake/CoverallsGenerateGcov.cmake
@@ -260,7 +260,16 @@
 	file(RELATIVE_PATH GCOV_SRC_REL_PATH "${PROJECT_ROOT}" "${GCOV_SRC_PATH}")

 	# Loads the gcov file as a list of lines.
-	file(STRINGS ${GCOV_FILE} GCOV_LINES)
+	# (We first open the file and replace all occurences of [] with _
+	#  because CMake will fail to parse a line containing unmatched brackets...)
+	# https://public.kitware.com/Bug/view.php?id=15369
+	file(READ ${GCOV_FILE} GCOV_CONTENTS)
+	string(REPLACE "[" "_" GCOV_CONTENTS "${GCOV_CONTENTS}")
+	string(REPLACE "]" "_" GCOV_CONTENTS "${GCOV_CONTENTS}")
+	file(WRITE ${GCOV_FILE}_tmp "${GCOV_CONTENTS}")
+
+	file(STRINGS ${GCOV_FILE}_tmp GCOV_LINES)
+	list(LENGTH GCOV_LINES LINE_COUNT)

 	# Instead of trying to parse the source from the
 	# gcov file, simply read the file contents from the source file.
@@ -325,6 +334,8 @@
 		math(EXPR GCOV_LINE_COUNT "${GCOV_LINE_COUNT}+1")
 	endforeach()

+	message("${GCOV_LINE_COUNT} of ${LINE_COUNT} lines read!")
+
 	# Advanced way of removing the trailing comma in the JSON array.
 	# "[1, 2, 3, " -> "[1, 2, 3"
 	string(REGEX REPLACE ",[ ]*$" "" GCOV_FILE_COVERAGE ${GCOV_FILE_COVERAGE})


Backport Conan fixes.

Backport Conan fixes.

See: https://github.com/conan-io/conan-center-index/commit/28e84b9c5f3831e3a00fd7686eeeda8c77832b7e

--- cmake/LIEFCompilerDetection.cmake
+++ cmake/LIEFCompilerDetection.cmake
@@ -12,11 +12,19 @@
 endif()

 if (cxx_std_14 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
-  set(LIEF_SUPPORT_CXX14 1)
+  if (${MSVC} AND ${MSVC_TOOLSET_VERSION} GREATER_EQUAL 141)
+    set(LIEF_SUPPORT_CXX14 1)
+  elseif(NOT ${MSVC})
+    set(LIEF_SUPPORT_CXX14 1)
+  endif()
 endif()

 if (cxx_std_17 IN_LIST CMAKE_CXX_COMPILE_FEATURES)
-  set(LIEF_SUPPORT_CXX17 1)
+  if (${MSVC} AND ${MSVC_TOOLSET_VERSION} GREATER_EQUAL 142)
+    set(LIEF_SUPPORT_CXX17 1)
+  elseif(NOT ${MSVC})
+    set(LIEF_SUPPORT_CXX17 1)
+  endif()
 endif()

 configure_file(


use auto-indent from IDE

use auto-indent from IDE

--- cmake/avr-arduino-toolchain.cmake
+++ cmake/avr-arduino-toolchain.cmake
@@ -22,39 +22,39 @@
 cmake_minimum_required(VERSION 3.0)

 # find compiler and toolchain programs
-find_program(AVRCPP         avr-g++)
-find_program(AVRC           avr-gcc)
-find_program(AVRSTRIP       avr-strip)
-find_program(OBJCOPY        avr-objcopy)
-find_program(OBJDUMP        avr-objdump)
-find_program(AVRSIZE        avr-size)
-find_program(AVRDUDE        avrdude)
-find_program(SCREEN         screen)
+find_program(AVRCPP avr-g++)
+find_program(AVRC avr-gcc)
+find_program(AVRSTRIP avr-strip)
+find_program(OBJCOPY avr-objcopy)
+find_program(OBJDUMP avr-objdump)
+find_program(AVRSIZE avr-size)
+find_program(AVRDUDE avrdude)
+find_program(SCREEN screen)

 # toolchain settings
-set(CMAKE_SYSTEM_NAME       Generic)
-set(CMAKE_CXX_COMPILER      ${AVRCPP})
-set(CMAKE_C_COMPILER        ${AVRC})
-set(CMAKE_ASM_COMPILER      ${AVRC})
+set(CMAKE_SYSTEM_NAME Generic)
+set(CMAKE_CXX_COMPILER ${AVRCPP})
+set(CMAKE_C_COMPILER ${AVRC})
+set(CMAKE_ASM_COMPILER ${AVRC})

 # Important project paths
-set(BASE_PATH               "${${PROJECT_NAME}_SOURCE_DIR}")
-set(SRC_PATH                "${BASE_PATH}/src")
-set(LIB_PATH                "${BASE_PATH}/lib")
+set(BASE_PATH "${${PROJECT_NAME}_SOURCE_DIR}")
+set(SRC_PATH "${BASE_PATH}/src")
+set(LIB_PATH "${BASE_PATH}/lib")

 # necessary settings for the chip we use
 set(MCU atmega328p CACHE STRING "CPU type")
-set(F_CPU                   16000000                CACHE INTEGER "CPU frequency")
-set(BAUD                    115200                  CACHE INTEGER "UART baud rate")
+set(F_CPU 16000000 CACHE INTEGER "CPU frequency")
+set(BAUD 115200 CACHE INTEGER "UART baud rate")
 set(PROGRAMMER arduino CACHE STRING "programmer type")
-set(MONITOR                 ${SCREEN}               CACHE STRING  "serial monitor program")
+set(MONITOR ${SCREEN} CACHE STRING "serial monitor program")
 set(MONITOR_ARGS ${SERIAL_DEV} ${BAUD} CACHE STRING "serial monitor arguments")

-set(COMPILER_FLAGS          "-Os -Wall -Wno-unknown-pragmas -Wextra -MMD -mmcu=${MCU} -DF_CPU=${F_CPU}" CACHE STRING "")
-set(CMAKE_C_FLAGS           "${COMPILER_FLAGS} -std=gnu99 -mcall-prologues -ffunction-sections -fdata-sections" CACHE STRING "")
-set(CMAKE_CXX_FLAGS         "${COMPILER_FLAGS} -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics" CACHE STRING "")
-set(CMAKE_ASM_FLAGS         "-x assembler-with-cpp ${COMPILER_FLAGS} " CACHE STRING "")
-set(CMAKE_EXE_LINKER_FLAGS  "-Wl,--gc-sections ${EXTRA_LIBS}" CACHE STRING "")
+set(COMPILER_FLAGS "-Os -Wall -Wno-unknown-pragmas -Wextra -MMD -mmcu=${MCU} -DF_CPU=${F_CPU}" CACHE STRING "")
+set(CMAKE_C_FLAGS "${COMPILER_FLAGS} -std=gnu99 -mcall-prologues -ffunction-sections -fdata-sections" CACHE STRING "")
+set(CMAKE_CXX_FLAGS "${COMPILER_FLAGS} -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics" CACHE STRING "")
+set(CMAKE_ASM_FLAGS "-x assembler-with-cpp ${COMPILER_FLAGS} " CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS "-Wl,--gc-sections ${EXTRA_LIBS}" CACHE STRING "")

 # some definitions that are common
 add_definitions(-DMCU=${MCU})
@@ -69,12 +69,12 @@

     # generate the .hex file
     add_custom_command(
-        OUTPUT ${NAME}.hex
-        COMMAND ${AVRSTRIP} "${NAME}.elf"
-        COMMAND ${OBJCOPY} -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "${NAME}.elf" "${NAME}.eep"
-        COMMAND ${OBJCOPY} -O ihex -R .eeprom "${NAME}.elf" "${NAME}.hex"
-        COMMAND ${AVRSIZE} --mcu=${MCU} -C --format=avr "${NAME}.elf"
-        DEPENDS ${NAME})
+            OUTPUT ${NAME}.hex
+            COMMAND ${AVRSTRIP} "${NAME}.elf"
+            COMMAND ${OBJCOPY} -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "${NAME}.elf" "${NAME}.eep"
+            COMMAND ${OBJCOPY} -O ihex -R .eeprom "${NAME}.elf" "${NAME}.hex"
+            COMMAND ${AVRSIZE} --mcu=${MCU} -C --format=avr "${NAME}.elf"
+            DEPENDS ${NAME})
     add_custom_target(${NAME}-strip ALL DEPENDS ${NAME}.hex)

     if (PROGRAMMER STREQUAL "usbasp")
@@ -85,39 +85,39 @@

     # flash the produces binary
     add_custom_target(
-        ${NAME}-flash
+            ${NAME}-flash
             COMMAND ${AVRDUDE} ${AVRDUDE_ARGS} -U flash:w:${NAME}.hex
-        DEPENDS ${NAME}.hex )
+            DEPENDS ${NAME}.hex)
     add_custom_target(
-        ${NAME}-monitor
-        COMMAND ${MONITOR} ${MONITOR_ARGS})
+            ${NAME}-monitor
+            COMMAND ${MONITOR} ${MONITOR_ARGS})
 endfunction(add_executable_avr)

 # add all the libraries as possible library dependencies
 function(add_libraries LIB_PATH)
     set(PROJECT_LIBS)
     file(GLOB LIB_DIRS "${LIB_PATH}/*/CMakeLists.txt")
-    foreach(cmakedir ${LIB_DIRS})
+    foreach (cmakedir ${LIB_DIRS})
         get_filename_component(subdir ${cmakedir} PATH)
-        if(IS_DIRECTORY ${subdir})
+        if (IS_DIRECTORY ${subdir})
             get_filename_component(target ${subdir} NAME)
             message(STATUS "Adding ubirch avr library: ${target}")
             add_subdirectory(${subdir})
-        endif()
-    endforeach()
+        endif ()
+    endforeach ()
 endfunction()

 # add targets automatically from the src directory
 function(add_sources SRC_PATH)
     file(GLOB SRC_DIRS "${SRC_PATH}/*/CMakeLists.txt")
-    foreach(cmakedir ${SRC_DIRS})
+    foreach (cmakedir ${SRC_DIRS})
         get_filename_component(subdir ${cmakedir} PATH)
-        if(IS_DIRECTORY ${subdir})
+        if (IS_DIRECTORY ${subdir})
             get_filename_component(target ${subdir} NAME)
             message(STATUS "Found ubirch avr target: ${target}")
             add_subdirectory(${subdir})
-        endif()
-    endforeach()
+        endif ()
+    endforeach ()
 endfunction()

@@ -125,17 +125,17 @@
 # ARDUINO SKETCH FUNCTIONALITY
 # ====================================================================================================================
 # set the arduino sdk path from an environment variable if given
-if(DEFINED ENV{ARDUINO_SDK_PATH})
-    set (ARDUINO_SDK_PATH "$ENV{ARDUINO_SDK_PATH}" CACHE PATH "Arduino SDK Path" FORCE)
-endif()
+if (DEFINED ENV{ARDUINO_SDK_PATH})
+    set(ARDUINO_SDK_PATH "$ENV{ARDUINO_SDK_PATH}" CACHE PATH "Arduino SDK Path" FORCE)
+endif ()

 set(ARDUINO_CORE_LIBS "" CACHE INTERNAL "arduino core libraries")
 function(setup_arduino_core)
-    if(DEFINED ARDUINO_SDK_PATH AND IS_DIRECTORY ${ARDUINO_SDK_PATH} AND NOT(TARGET arduino-core))
+    if (DEFINED ARDUINO_SDK_PATH AND IS_DIRECTORY ${ARDUINO_SDK_PATH} AND NOT(TARGET arduino-core))
         # set the paths
-        set(ARDUINO_CORES_PATH      ${ARDUINO_SDK_PATH}/hardware/arduino/avr/cores/arduino CACHE STRING "")
-        set(ARDUINO_VARIANTS_PATH   ${ARDUINO_SDK_PATH}/hardware/arduino/avr/variants/standard CACHE STRING "")
-        set(ARDUINO_LIBRARIES_PATH  ${ARDUINO_SDK_PATH}/hardware/arduino/avr/libraries CACHE STRING "")
+        set(ARDUINO_CORES_PATH ${ARDUINO_SDK_PATH}/hardware/arduino/avr/cores/arduino CACHE STRING "")
+        set(ARDUINO_VARIANTS_PATH ${ARDUINO_SDK_PATH}/hardware/arduino/avr/variants/standard CACHE STRING "")
+        set(ARDUINO_LIBRARIES_PATH ${ARDUINO_SDK_PATH}/hardware/arduino/avr/libraries CACHE STRING "")

         # find arduino-core sources
         file(GLOB_RECURSE CORE_SOURCES ${ARDUINO_CORES_PATH}/*.S ${ARDUINO_CORES_PATH}/*.c ${ARDUINO_CORES_PATH}/*.cpp)
@@ -149,102 +149,102 @@

         # configure all the additional libraries in the core
         file(GLOB CORE_DIRS ${ARDUINO_LIBRARIES_PATH}/*)
-        foreach(libdir ${CORE_DIRS})
+        foreach (libdir ${CORE_DIRS})
             get_filename_component(libname ${libdir} NAME)
-            if(IS_DIRECTORY ${libdir})
-                file(GLOB_RECURSE sources ${libdir}/*.cpp ${libdir}/*.S ${libdir}/*.c )
+            if (IS_DIRECTORY ${libdir})
+                file(GLOB_RECURSE sources ${libdir}/*.cpp ${libdir}/*.S ${libdir}/*.c)
                 string(REGEX REPLACE "examples/.*" "" sources "${sources}")
-                if(sources)
-                    if(NOT TARGET ${libname})
+                if (sources)
+                    if (NOT TARGET ${libname})
                         message(STATUS "Adding Arduino Core library: ${libname}")
                         add_library(${libname} ${sources})
-                    endif()
+                    endif ()
                     target_link_libraries(${libname} arduino-core)
-                    foreach(src ${sources})
+                    foreach (src ${sources})
                         get_filename_component(dir ${src} PATH)
                         target_include_directories(${libname} PUBLIC ${dir})
-                    endforeach()
+                    endforeach ()
                     list(APPEND ARDUINO_CORE_LIBS ${libname})
                     set(ARDUINO_CORE_LIBS ${ARDUINO_CORE_LIBS} CACHE INTERNAL "arduino core libraries")
                 else()
                     include_directories(SYSTEM ${libdir})
-                endif()
-            endif()
-        endforeach()
+                endif ()
+            endif ()
+        endforeach ()

         # add some of the default definitions (TODO: identify from Arduino IDE)
         add_definitions(-DARDUINO=10605)
         add_definitions(-DARDUINO_AVR_UNO)
         add_definitions(-DARDUINO_ARCH_AVR)
-     endif()
+    endif ()
 endfunction()

 function(add_sketches SKETCHES_PATH)
     setup_arduino_core()
-    if(TARGET arduino-core)
+    if (TARGET arduino-core)
         # finally add all the sketches
         file(GLOB SRC_DIRS "${SKETCHES_PATH}/*/CMakeLists.txt")
-        foreach(cmakedir ${SRC_DIRS})
+        foreach (cmakedir ${SRC_DIRS})
             get_filename_component(subdir ${cmakedir} PATH)
-            if(IS_DIRECTORY ${subdir})
+            if (IS_DIRECTORY ${subdir})
                 get_filename_component(target ${subdir} NAME)
                 message(STATUS "Found Arduino sketch: ${target}")
                 add_subdirectory(${subdir})
-            endif()
-        endforeach()
+            endif ()
+        endforeach ()
     else()
         message(WARNING "No Arduino SDK found at '${ARDUINO_SDK_PATH}', can't compile sketches!")
-    endif()
+    endif ()
 endfunction()

 set(SKETCH_LIBS "" CACHE INTERNAL "arduino sketch libraries")
 # add a sketch dependency by giving the target and a git url
 function(target_sketch_library TARGET NAME URL)
     setup_arduino_core()
-    if(TARGET arduino-core AND NOT TARGET ${NAME})
+    if (TARGET arduino-core AND NOT TARGET ${NAME})
         # try to install dependent libraries
         find_package(Git)
-        if(GIT_FOUND)
+        if (GIT_FOUND)
             # clone dependency into libraries
             get_filename_component(MYLIBS "${CMAKE_CURRENT_SOURCE_DIR}/../libraries" REALPATH)
-            if(NOT EXISTS ${MYLIBS})
+            if (NOT EXISTS ${MYLIBS})
                 message(STATUS "creating library directory: ${MYLIBS}")
                 file(MAKE_DIRECTORY ${MYLIBS})
-            endif()
-            if(NOT EXISTS ${MYLIBS}/${NAME})
+            endif ()
+            if (NOT EXISTS ${MYLIBS}/${NAME})
                 message(STATUS "Installing ${NAME} (${URL})")
                 execute_process(
-                    COMMAND ${GIT_EXECUTABLE} clone "${URL}" "${NAME}"
-                    WORKING_DIRECTORY ${MYLIBS})
-            endif()
+                        COMMAND ${GIT_EXECUTABLE} clone "${URL}" "${NAME}"
+                        WORKING_DIRECTORY ${MYLIBS})
+            endif ()

             # now add a library target
             file(GLOB_RECURSE libsources FOLLOW_SYMLINKS ${MYLIBS}/${NAME}/*.S ${MYLIBS}/${NAME}/*.c ${MYLIBS}/${NAME}/*.cpp)
             # go through list of sources and remove the examples
-            foreach(file ${libsources})
-               STRING(REGEX MATCH "/examples/" example ${file})
-               if(NOT example)
-                 list(APPEND sources ${file})
-               endif()
-            endforeach()
-            if(sources)
+            foreach (file ${libsources})
+                STRING(REGEX MATCH "/examples/" example ${file})
+                if (NOT example)
+                    list(APPEND sources ${file})
+                endif ()
+            endforeach ()
+            if (sources)
                 message(STATUS "Adding external library: ${NAME}")
                 add_library(${NAME} ${sources})
                 target_link_libraries(${NAME} ${ARDUINO_CORE_LIBS} ${SKETCH_LIBS})
                 list(APPEND SKETCH_LIBS ${NAME})
                 set(SKETCH_LIBS ${SKETCH_LIBS} CACHE INTERNAL "arduino sketch libraries")
-                foreach(src ${sources})
+                foreach (src ${sources})
                     get_filename_component(dir ${src} PATH)
                     list(APPEND includes ${dir})
-                endforeach()
+                endforeach ()
                 list(REMOVE_DUPLICATES includes)
                 target_include_directories(${NAME} PUBLIC ${includes})
             else()
                 message(FATAL_ERROR "Could not find sources in library ${NAME}!")
-            endif()
+            endif ()
         else()
             message(FATAL_ERROR "Missing git, please install and try again!")
-        endif()
-    endif()
+        endif ()
+    endif ()
     target_link_libraries(${TARGET} ${NAME})
 endfunction(target_sketch_library)


Export C++ standard via COMPILE_FEATURES target property

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -631,10 +631,12 @@
     endif()
     #---create a shared library with the .def file------------------------
     add_library(${library} ${_all} SHARED ${lib_srcs})
+    target_compile_features(${library} INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
     target_link_libraries(${library} PUBLIC ${ARG_LIBRARIES} ${ARG_DEPENDENCIES})
     set_target_properties(${library} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
   else()
     add_library( ${library} ${_all} ${ARG_TYPE} ${lib_srcs})
+    target_compile_features(${library} INTERFACE cxx_std_${CMAKE_CXX_STANDARD})
     if(ARG_TYPE STREQUAL SHARED)
       set_target_properties(${library} PROPERTIES  ${ROOT_LIBRARY_PROPERTIES} )
     endif()


CMake: minor change: Visual Studio solutions now show .h files grouped by internal vs. public headers

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -43,9 +43,9 @@
 		"${name}"
 		"${name}"
 		"${name}"
-		"${name}"
-		"${name}"
-		"${name}"
+		"${name} Internal Headers"
+		"${name} Public Headers"
+		"${name} Public Headers"
 		)
 	# Only add these ones for "normal" libraries:
 	IF (NOT ${headers_only})
@@ -113,7 +113,7 @@
 	set(all_${name}_srcs
 		${${name}_srcs}
 		"${CMAKE_SOURCE_DIR}/libs/${name}/include/mrpt/${name}.h")
-
+
 	IF (NOT ${headers_only})

 		# A libray target:


Disable more curl build options that we don't want

x-ref: https://github.com/TileDB-Inc/TileDB/pull/1674

--- cmake/Modules/FindCurl_EP.cmake
+++ cmake/Modules/FindCurl_EP.cmake
@@ -129,16 +129,33 @@
       CONFIGURE_COMMAND
         ${CMAKE_COMMAND} -E env PKG_CONFIG_PATH=${SSL_PKG_CONFIG_PATH} ${TILEDB_EP_BASE}/src/ep_curl/configure
           --prefix=${TILEDB_EP_INSTALL_PREFIX}
+          --enable-http
           --enable-optimize
           --enable-shared=no
           --with-pic=yes
+          --without-brotli
+          --without-bearssl
+          --without-cyassl
+          --without-wolfssl
+          --without-polarssl
+          --without-mbedtls
+          --without-gnutls
+          --without-gssapi
+          --without-idn2
+          --without-libmetalink
+          --without-libssh2
+          --without-librtmp
           --without-nghttp2
+          --without-zstd
+          --disable-ares
           --disable-dict
           --disable-file
           --disable-ftp
           --disable-gopher
           --disable-imap
+          --disable-mqtt
           --disable-ldap
+          --disable-ldaps
           --disable-pop3
           --disable-rtmp
           --disable-rtsp


Added extra sanity check, to ensure that the specified board ID exists

--- cmake/modules/FindArduino.cmake
+++ cmake/modules/FindArduino.cmake
@@ -250,6 +250,8 @@
         set(CMAKE_EXE_LINKER_FLAGS    "${CMAKE_EXE_LINKER_FLAGS}    -mmcu=${${BOARD_ID}.build.mcu}" PARENT_SCOPE)
         set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mmcu=${${BOARD_ID}.build.mcu}" PARENT_SCOPE)
         set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -mmcu=${${BOARD_ID}.build.mcu}" PARENT_SCOPE)
+    else()
+        message(FATAL_ERROR "Invalid Arduino board ID (${BOARD_ID}), aborting.")
     endif()
 endmacro()


[CMake][LLVM] Remove duplicated library mask. Broken clang linking against clangShared

Summary:
The `LLVM${c}Info` mask is listed twice in LLVM-Config.cmake. This results in the libraries such as LLVMARMInfo, LLVMAArch4Info, etc appearing twice in `extract_symbols.py` command line while building `clangShared`. `Extract_symbols.py` does not work well in such a case and completely ignores the symbols from the duplicated libraries. Thus, the LLVM(...)Info symbols do not get exported from `clangShared` and linking clang against it fails with unresolved dependencies.

Seems to be a mere copy-paste mistake.

Reviewers: beanz, chapuni

Reviewed By: chapuni

Subscribers: chapuni, aemerson, mgorny, kristof.beyls, llvm-commits, asl

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

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

--- cmake/modules/LLVM-Config.cmake
+++ cmake/modules/LLVM-Config.cmake
@@ -175,17 +175,14 @@
           message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
         endif()
       endif()
+      if( TARGET LLVM${c}AsmParser )
+        list(APPEND expanded_components "LLVM${c}AsmParser")
+      endif()
       if( TARGET LLVM${c}AsmPrinter )
         list(APPEND expanded_components "LLVM${c}AsmPrinter")
       endif()
-      if( TARGET LLVM${c}AsmParser )
-        list(APPEND expanded_components "LLVM${c}AsmParser")
-      endif()
       if( TARGET LLVM${c}Desc )
         list(APPEND expanded_components "LLVM${c}Desc")
-      endif()
-      if( TARGET LLVM${c}Info )
-        list(APPEND expanded_components "LLVM${c}Info")
       endif()
       if( TARGET LLVM${c}Disassembler )
         list(APPEND expanded_components "LLVM${c}Disassembler")


Un-break regular make check again :O

Un-break regular make check again :O

--- cmake/modules/TpQt4Macros.cmake
+++ cmake/modules/TpQt4Macros.cmake
@@ -335,7 +335,7 @@
     add_executable(test-${_name} ${_name}.cpp ${CMAKE_CURRENT_BINARY_DIR}/_gen/${_name}.cpp.moc.hpp)
     target_link_libraries(test-${_name} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} telepathy-qt4 tp-qt4-tests ${ARGN})
     set(with_session_bus ${CMAKE_CURRENT_BINARY_DIR}/runDbusTest.sh)
-    add_test(${_fancyName} ${with_session_bus} ${CMAKE_CURRENT_BINARY_DIR}/test-${_name})
+    add_test(${_fancyName} ${SH} ${with_session_bus} ${CMAKE_CURRENT_BINARY_DIR}/test-${_name})
     list(APPEND _telepathy_qt4_test_cases test-${_name})

     # Valgrind and Callgrind targets


Use correct architecture dependent hadoop lib path
USE ARCH64BIT cmake var to generate correct hadoop lib path, based on
uris used by hadoop: Linux-amd64-64 or Linux-i386-32.

Signed-off-by: Rodrigo Pastrana <23d0df47a1dca597d91ee84274673a34cb30a7c2@lexisnexis.com>

--- cmake_modules/FindLIBHDFS.cmake
+++ cmake_modules/FindLIBHDFS.cmake
@@ -33,9 +33,9 @@
   IF (NOT ${EXTERNALS_DIRECTORY} STREQUAL "")
     IF (UNIX)
       IF (${ARCH64BIT} EQUAL 1)
-        SET (osdir "linux64_gcc4.1.1")
+        SET (osdir "Linux-amd64-64")
       ELSE()
-        SET (osdir "linux32_gcc4.1.1")
+        SET (osdir "Linux-i386-32")
       ENDIF()
     ELSEIF(WIN32)
       SET (osdir "lib")
@@ -51,7 +51,23 @@
   if (USE_NATIVE_LIBRARIES)
     # if we didn't find in externals, look in system include path
     FIND_PATH (LIBHDFS_INCLUDE_DIR NAMES hdfs.h PATHS "${HADOOP_PATH}/src/c++/libhdfs" )
-    FIND_LIBRARY (LIBHDFS_LIBRARIES NAMES ${libhdfs_libs} PATHS "${HADOOP_PATH}/c++/Linux-amd64-64/lib" )
+
+    IF (UNIX)
+      IF (${ARCH64BIT} EQUAL 1)
+        SET (hdosdir "Linux-amd64-64")
+      ELSE()
+        SET (hdosdir "Linux-i386-32")
+      ENDIF()
+    ELSEIF(WIN32)
+      SET (hdosdir "lib")
+    ELSE()
+      SET (hdosdir "unknown")
+    ENDIF()
+
+    IF (NOT ("${hdosdir}" STREQUAL "unknown"))
+     FIND_LIBRARY (LIBHDFS_LIBRARIES NAMES ${libhdfs_libs} PATHS "${HADOOP_PATH}/c++/${hdosdir}/lib" )
+    ENDIF()
+
   endif()

   include(FindPackageHandleStandardArgs)


ExternalProject Eigen: 3.3.4->3.3.7

ExternalProject Eigen: 3.3.4->3.3.7

--- cmakemodules/script_eigen.cmake
+++ cmakemodules/script_eigen.cmake
@@ -15,8 +15,8 @@
 	include(ExternalProject)
 	# download Eigen from bitbucket
 	ExternalProject_Add(EP_eigen3
-	  URL               "https://bitbucket.org/eigen/eigen/get/3.3.4.tar.bz2"
-	  URL_MD5           "a7aab9f758249b86c93221ad417fbe18"
+	  URL               "https://bitbucket.org/eigen/eigen/get/3.3.7.tar.bz2"
+	  URL_MD5           "05b1f7511c93980c385ebe11bd3c93fa"
 	  SOURCE_DIR        "${MRPT_BINARY_DIR}/otherlibs/eigen3/"
 	  CONFIGURE_COMMAND ""
 	  BUILD_COMMAND     ""


COMP: copy patched files when using msvc compiler

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -1,83 +1,83 @@
-set(proj OSSIM)
-
-if(NOT __EXTERNAL_${proj}__)
-set(__EXTERNAL_${proj}__ 1)
-
-message(STATUS "Setup Ossim...")
-
-# OSGeo4W provides an "ossim" package : use it otherwise if it is installed and not used by OTB
-# we get conflicts (because OSGeo4W include dir is included for other dependencies
-#if(WIN32)
-#  set(DEFAULT_USE_SYSTEM_OSSIM  ON)
-#endif()
-
-if(USE_SYSTEM_OSSIM)
-  find_package ( Ossim )
-  message(STATUS "  Using OSSIM system version")
-else()
-  SETUP_SUPERBUILD(PROJECT ${proj})
-  message(STATUS "  Using OSSIM SuperBuild version")
-
-  # declare dependencies
-  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE)
-
-  INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
-  # set proj back to its original value
-  set(proj OSSIM)
-
-  ADD_SUPERBUILD_CMAKE_VAR(TIFF_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(TIFF_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(GEOS_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(GEOS_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(JPEG_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_LIBRARY)
-  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_INCLUDE_DIR)
-  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_LIBRARY)
-
-  set(OSSIM_CXX_FLAGS  -D__STDC_CONSTANT_MACROS)
-
-  if(MSVC)
-    set(OSSIM_CXX_FLAGS /EHsc)
-  endif()
-
-  # archive version
-  ExternalProject_Add(${proj}
-    PREFIX ${proj}
-    URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
-    URL_MD5 f77d574ab2817bcc36633f77824facb5
-    BINARY_DIR ${OSSIM_SB_BUILD_DIR}
-    INSTALL_DIR ${SB_INSTALL_PREFIX}
-    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
-    CMAKE_CACHE_ARGS
-    -DProject_WC_REVISION:STRING=23537
-    -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
-    -DCMAKE_BUILD_TYPE:STRING=Release
-    -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
-    -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
-    -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
-    -DBUILD_OSSIM_APPS:BOOL=OFF
-    -DBUILD_OSSIM_TEST_APPS:BOOL=OFF
-    -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
-    -DBUILD_WMS:BOOL=OFF
-    -DINSTALL_ARCHIVE_DIR:STRING=lib
-    -DINSTALL_LIBRARY_DIR:STRING=lib
-    -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
-    ${OSSIM_SB_CONFIG}
-    DEPENDS ${${proj}_DEPENDENCIES}
-    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
-    )
-
-  set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
-  if(WIN32)
-    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/ossim.lib)
-  elseif(UNIX)
-    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libossim${CMAKE_SHARED_LIBRARY_SUFFIX})
-  endif()
-
-endif()
-
-endif()
+set(proj OSSIM)
+
+if(NOT __EXTERNAL_${proj}__)
+set(__EXTERNAL_${proj}__ 1)
+
+message(STATUS "Setup Ossim...")
+
+# OSGeo4W provides an "ossim" package : use it otherwise if it is installed and not used by OTB
+# we get conflicts (because OSGeo4W include dir is included for other dependencies
+#if(WIN32)
+#  set(DEFAULT_USE_SYSTEM_OSSIM  ON)
+#endif()
+
+if(USE_SYSTEM_OSSIM)
+  find_package ( Ossim )
+  message(STATUS "  Using OSSIM system version")
+else()
+  SETUP_SUPERBUILD(PROJECT ${proj})
+  message(STATUS "  Using OSSIM SuperBuild version")
+
+  # declare dependencies
+  ADDTO_DEPENDENCIES_IF_NOT_SYSTEM(${proj} TIFF GEOTIFF GEOS JPEG OPENTHREADS FREETYPE)
+
+  INCLUDE_SUPERBUILD_DEPENDENCIES(${${proj}_DEPENDENCIES})
+  # set proj back to its original value
+  set(proj OSSIM)
+
+  ADD_SUPERBUILD_CMAKE_VAR(TIFF_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(TIFF_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(GEOTIFF_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(GEOS_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(GEOS_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(JPEG_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(JPEG_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(OPENTHREADS_LIBRARY)
+  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_INCLUDE_DIR)
+  ADD_SUPERBUILD_CMAKE_VAR(FREETYPE_LIBRARY)
+
+  set(OSSIM_CXX_FLAGS  -D__STDC_CONSTANT_MACROS)
+
+  if(MSVC)
+    set(OSSIM_CXX_FLAGS /EHsc)
+  endif()
+
+  # archive version
+  ExternalProject_Add(${proj}
+    PREFIX ${proj}
+    URL "https://www.orfeo-toolbox.org/packages/ossim-minimal-r23537.tar.gz"
+    URL_MD5 f77d574ab2817bcc36633f77824facb5
+    BINARY_DIR ${OSSIM_SB_BUILD_DIR}
+    INSTALL_DIR ${SB_INSTALL_PREFIX}
+    DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
+    CMAKE_CACHE_ARGS
+    -DProject_WC_REVISION:STRING=23537
+    -DCMAKE_INSTALL_PREFIX:STRING=${SB_INSTALL_PREFIX}
+    -DCMAKE_BUILD_TYPE:STRING=Release
+    -DCMAKE_CXX_FLAGS:STRING=${OSSIM_CXX_FLAGS}
+    -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
+    -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
+    -DBUILD_OSSIM_APPS:BOOL=OFF
+    -DBUILD_OSSIM_TEST_APPS:BOOL=OFF
+    -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
+    -DBUILD_WMS:BOOL=OFF
+    -DINSTALL_ARCHIVE_DIR:STRING=lib
+    -DINSTALL_LIBRARY_DIR:STRING=lib
+    -DCMAKE_PREFIX_PATH:STRING=${SB_INSTALL_PREFIX};${CMAKE_PREFIX_PATH}
+    ${OSSIM_SB_CONFIG}
+    DEPENDS ${${proj}_DEPENDENCIES}
+    CMAKE_COMMAND ${SB_CMAKE_COMMAND}
+    )
+
+  set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
+  if(WIN32)
+    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/ossim.lib)
+  elseif(UNIX)
+    set(_SB_${proj}_LIBRARY ${SB_INSTALL_PREFIX}/lib/libossim${CMAKE_SHARED_LIBRARY_SUFFIX})
+  endif()
+
+endif()
+
+endif()


SuperBuild: extra steps needed for msvc

SuperBuild: extra steps needed for msvc

--- SuperBuild/CMake/External_ossim.cmake
+++ SuperBuild/CMake/External_ossim.cmake
@@ -61,6 +61,7 @@
     -DBUILD_OSSIM_MPI_SUPPORT:BOOL=OFF
     -DBUILD_OSSIM_FREETYPE_SUPPORT:BOOL=ON
     -DBUILD_OSSIM_APPS:BOOL=OFF
+    -DBUILD_OSSIM_TESTS:BOOL=OFF
     -DBUILD_OSSIM_FRAMEWORKS:BOOL=OFF
     -DINSTALL_ARCHIVE_DIR:STRING=lib
     -DINSTALL_LIBRARY_DIR:STRING=lib
@@ -70,6 +71,18 @@
     CMAKE_COMMAND ${SB_CMAKE_COMMAND}
     )

+  if(MSVC)
+    ExternalProject_Add_Step(${proj} patch_ossim_src
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_SOURCE_DIR}/patches/ossim/src ${OSSIM_SB_SRC}/src
+      DEPENDEES patch_ossim_include
+      DEPENDERS configure )
+    ExternalProject_Add_Step(${proj} patch_ossim_include
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_SOURCE_DIR}/patches/ossim/include ${OSSIM_SB_SRC}/include
+      DEPENDEES patch
+      DEPENDERS patch_ossim_src )
+  endif()

   set(_SB_${proj}_INCLUDE_DIR ${SB_INSTALL_PREFIX}/include)
   if(WIN32)


Fixed issue where tokudb xz used lib64 in some cases, which caused a link failure

--- storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake
+++ storage/tokudb/ft-index/cmake_modules/TokuThirdParty.cmake
@@ -34,6 +34,7 @@
     CONFIGURE_COMMAND
         "<SOURCE_DIR>/configure" ${xz_configure_opts}
         "--prefix=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz"
+        "--libdir=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/xz/lib"
     BUILD_COMMAND
         ${SUBMAKE_COMMAND} -C src/liblzma
     INSTALL_COMMAND


FIX (#2013): commenting out the Qt resources file in the files.cmake template, because it is initially empty.

--- CMake/Qt4FunctionalityTemplate/filesTemplate.cmake
+++ CMake/Qt4FunctionalityTemplate/filesTemplate.cmake
@@ -22,7 +22,8 @@
 )

 SET(RES_FILES
-  @PLUGIN_RES_FILES@
+# uncomment the following line if you want to use Qt resources
+#  @PLUGIN_RES_FILES@
 )

 @SET_MANIFEST_SRC@


select which opencv modules to add

select which opencv modules to add

--- cmake/DetectOpenCV.cmake
+++ cmake/DetectOpenCV.cmake
@@ -44,10 +44,24 @@
         #set(CMAKE_MODULE_LINKER_FLAGS "${OpenCV_LDFLAGS} ${CMAKE_MODULE_LINKER_FLAGS}")

         # loop over opencv ldflags and add libs missing in OpenCV_LIBS
+        set(__OpenCV_LIBS_MISSING "")
         foreach(__LDFLAGS_ITEM ${OpenCV_LDFLAGS})
             if(__LDFLAGS_ITEM MATCHES "(.so$)|(.a$)" AND NOT __LDFLAGS_ITEM MATCHES "^-l")
-                list(APPEND OpenCV_LIBS ${__LDFLAGS_ITEM})
+                list(APPEND __OpenCV_LIBS_MISSING ${__LDFLAGS_ITEM})
             endif()
+        endforeach()
+
+            message(STATUS "__OpenCV_LIBS_MISSING=${__OpenCV_LIBS_MISSING}")
+        foreach(__OpenCV_LIBS_MISSING_ITEM ${__OpenCV_LIBS_MISSING})
+
+            convert_to_lib_name(__OpenCV_LIBS_MISSING_ITEM_MODULE ${__OpenCV_LIBS_MISSING_ITEM})
+
+            message(STATUS "__OpenCV_LIBS_MISSING_ITEM_MODULE=${__OpenCV_LIBS_MISSING_ITEM_MODULE}")
+            list(FIND OpenCV_REQUIRED_MODULES ${__OpenCV_LIBS_MISSING_ITEM_MODULE} __MODULE_FOUND)
+            if(NOT ${__MODULE_FOUND} EQUAL -1)
+
+                list(APPEND OpenCV_LIBS ${__OpenCV_LIBS_MISSING_ITEM})
+            endif(${__MODULE_FOUND} EQUAL -1)
         endforeach()

         list(APPEND OpenCV_LIBS ${OpenCV_LIBRARIES})


improve compiler name and version detection

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -271,6 +271,9 @@

   set_property(GLOBAL PROPERTY EIGEN_FAILTEST_FAILURE_COUNT "0")
   set_property(GLOBAL PROPERTY EIGEN_FAILTEST_COUNT "0")
+
+  # uncomment anytime you change the ei_get_compilerver_from_cxx_version_string macro
+  # ei_test_get_compilerver_from_cxx_version_string()
 endmacro(ei_init_testing)

 macro(ei_set_sitename)
@@ -303,28 +306,63 @@
     endif()
   else()
     # on all other system we rely on ${CMAKE_CXX_COMPILER}
-    # supporting a "--version" flag
-    exec_program( ${CMAKE_CXX_COMPILER}
-                  ARGS --version
-                  OUTPUT_VARIABLE eigen_cxx_compiler_version_raw
-                )
-    # first extract the compiler name which is the first word
-    string( REGEX REPLACE ".*(llvm\\-g\\+\\+|g\\+\\+|icpc|clang).*" "\\1"
-            eigen_cxx_compiler_name ${eigen_cxx_compiler_version_raw})
-
-    if(eigen_cxx_compiler_name MATCHES ".*g\\+\\+.*")
-      string( REGEX REPLACE ".* ([0-9])\\.([0-9])\\.([0-9]).*" "\\1.\\2.\\3"
-              eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
-    elseif(eigen_cxx_compiler_name MATCHES "icpc|clang")
-      string( REGEX REPLACE ".* ([0-9]+\\.[0-9]+\\.[0-9]+|[0-9]+\\.[0-9]+).*" "\\1"
-              eigen_cxx_compiler_version ${eigen_cxx_compiler_version_raw})
-    else()
-      set(eigen_cxx_compiler_version "_")
-    endif()
-
-    set(${VAR} "${eigen_cxx_compiler_name}-${eigen_cxx_compiler_version}")
+    # supporting a "--version" flag
+    execute_process(COMMAND ${CMAKE_CXX_COMPILER} --version
+                    COMMAND head -n 1
+                    OUTPUT_VARIABLE eigen_cxx_compiler_version_string OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+    ei_get_compilerver_from_cxx_version_string(${eigen_cxx_compiler_version_string} CNAME CVER)
+
+    set(${VAR} "${CNAME}-${CVER}")
   endif()
 endmacro(ei_get_compilerver)
+
+# Extract compiler name and version from a raw version string
+# WARNING: if you edit thid macro, then please test it by  uncommenting
+# the testing macro call in ei_init_testing() of the EigenTesting.cmake file.
+# See also the ei_test_get_compilerver_from_cxx_version_string macro at the end of the file
+macro(ei_get_compilerver_from_cxx_version_string VERSTRING CNAME CVER)
+  # extract possible compiler names
+  string(REGEX MATCH "g\\+\\+"      ei_has_gpp    ${VERSTRING})
+  string(REGEX MATCH "llvm|LLVM"    ei_has_llvm   ${VERSTRING})
+  string(REGEX MATCH "gcc|GCC"      ei_has_gcc    ${VERSTRING})
+  string(REGEX MATCH "icpc|ICC"     ei_has_icpc   ${VERSTRING})
+  string(REGEX MATCH "clang|CLANG"  ei_has_clang  ${VERSTRING})
+
+  # combine them
+  if((ei_has_llvm) AND (ei_has_gpp OR ei_has_gcc))
+    set(${CNAME} "llvm-g++")
+  elseif((ei_has_llvm) AND (ei_has_clang))
+    set(${CNAME} "llvm-clang++")
+  elseif(ei_has_icpc)
+    set(${CNAME} "icpc")
+  elseif(ei_has_gpp OR ei_has_gcc)
+    set(${CNAME} "g++")
+  else()
+    set(${CNAME} "_")
+  endif()
+
+  # extract possible version numbers
+  # first try to extract 3 isolated numbers:
+  string(REGEX MATCH " [0-9]+\\.[0-9]+\\.[0-9]+" eicver ${VERSTRING})
+  if(NOT eicver)
+    # try to extract 2 isolated ones:
+    string(REGEX MATCH " [0-9]+\\.[0-9]+" eicver ${VERSTRING})
+    if(NOT eicver)
+      # try to extract 3:
+      string(REGEX MATCH "[^0-9][0-9]+\\.[0-9]+\\.[0-9]+" eicver ${VERSTRING})
+      if(NOT eicver)
+        # try to extract 2:
+        string(REGEX MATCH "[^0-9][0-9]+\\.[0-9]+" eicver ${VERSTRING})
+      else()
+        set(eicver " _")
+      endif()
+    endif()
+  endif()
+
+  string(REGEX REPLACE ".(.*)" "\\1" ${CVER} ${eicver})
+
+endmacro(ei_get_compilerver_from_cxx_version_string)

 macro(ei_get_cxxflags VAR)
   set(${VAR} "")
@@ -402,3 +440,31 @@
     set(${VAR} 1)
   endif()
 endmacro(ei_is_64bit_env)
+
+
+# helper macro for testing ei_get_compilerver_from_cxx_version_string
+# STR: raw version string
+# REFNAME: expected compiler name
+# REFVER: expected compiler version
+macro(ei_test1_get_compilerver_from_cxx_version_string STR REFNAME REFVER)
+  ei_get_compilerver_from_cxx_version_string(${STR} CNAME CVER)
+  if((NOT ${REFNAME} STREQUAL ${CNAME}) OR (NOT ${REFVER} STREQUAL ${CVER}))
+    message("STATUS ei_get_compilerver_from_cxx_version_string error:")
+    message("Expected \"${REFNAME}-${REFVER}\", got \"${CNAME}-${CVER}\"")
+  endif()
+endmacro(ei_test1_get_compilerver_from_cxx_version_string)
+
+# macro for testing ei_get_compilerver_from_cxx_version_string
+# feel free to add more version strings
+macro(ei_test_get_compilerver_from_cxx_version_string)
+  ei_test1_get_compilerver_from_cxx_version_string("g++ (SUSE Linux) 4.5.3 20110428 [gcc-4_5-branch revision 173117]" "g++" "4.5.3")
+  ei_test1_get_compilerver_from_cxx_version_string("c++ (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)" "g++" "4.5.1")
+  ei_test1_get_compilerver_from_cxx_version_string("icpc (ICC) 11.0 20081105" "icpc" "11.0")
+  ei_test1_get_compilerver_from_cxx_version_string("g++-3.4 (GCC) 3.4.6" "g++" "3.4.6")
+  ei_test1_get_compilerver_from_cxx_version_string("SUSE Linux clang version 3.0 (branches/release_30 145598) (based on LLVM 3.0)" "llvm-clang++" "3.0")
+  ei_test1_get_compilerver_from_cxx_version_string("icpc (ICC) 12.0.5 20110719" "icpc" "12.0.5")
+  ei_test1_get_compilerver_from_cxx_version_string("Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn)" "llvm-clang++" "2.1")
+  ei_test1_get_compilerver_from_cxx_version_string("i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)" "llvm-g++" "4.2.1")
+  ei_test1_get_compilerver_from_cxx_version_string("g++-mp-4.4 (GCC) 4.4.6" "g++" "4.4.6")
+  ei_test1_get_compilerver_from_cxx_version_string("g++-mp-4.4 (GCC) 2011" "g++" "4.4")
+endmacro(ei_test_get_compilerver_from_cxx_version_string)


Revert 834172 so that automoc4 is found at the correct place.

svn path=/trunk/kdesupport/phonon/; revision=834451

--- cmake/FindAutomoc4.cmake
+++ cmake/FindAutomoc4.cmake
@@ -20,7 +20,7 @@
 # check if we are inside KDESupport and automoc is enabled
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project as part of kdesupport
-   set(AUTOMOC4_CONFIG_FILE "${KDESupport_BINARY_DIR}/automoc/Automoc4Config.cmake")
+   set(AUTOMOC4_CONFIG_FILE "${KDESupport_SOURCE_DIR}/automoc/Automoc4Config.cmake")
 else("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
    # when building this project outside kdesupport


upgrade folly to v2017.06.26.01

upgrade folly to v2017.06.26.01

--- cmake/InstallFolly.cmake
+++ cmake/InstallFolly.cmake
@@ -1,7 +1,7 @@
 if (NOT FOLLY_FOUND OR USE_BUNDLED_FOLLY)
     if (NOT FOLLY_VERSION OR USE_BUNDLED_FOLLY)
-        set (FOLLY_VERSION              2017.03.13.00)
-        set (FOLLY_URL_MD5              3ba9d455edcf6e930b6f43e93e9f99f7)
+        set (FOLLY_VERSION              2017.06.26.01)
+        set (FOLLY_URL_MD5              cf7a05081adb16913b5d7039ac62d46b)
     endif()

     ExternalProject_Add(Folly


fix install directory

fix install directory

--- cmake/packages/rpm.cmake
+++ cmake/packages/rpm.cmake
@@ -40,7 +40,7 @@
   install(
     FILES ${PROJECT_BINARY_DIR}/arangod.sysv
     PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-    DESTINATION etc/logrotate.d/
+    DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/logrotate.d
     RENAME ${SERVICE_NAME})
 else()
   message("SYSTEMD_FOUND ${SYSTEMD_FOUND}")


added rosconsole and roscpp_serialization

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

--- cmake/pcl_find_ros.cmake
+++ cmake/pcl_find_ros.cmake
@@ -3,7 +3,7 @@

 macro(link_ros_libs _target)
     if(USE_ROS)
-        target_link_libraries(${_target} sensor_msgs)
+        target_link_libraries(${_target} sensor_msgs roscpp_serialization rosconsole)
     endif(USE_ROS)
 endmacro(link_ros_libs)


Remove not necessary path

Remove not necessary path

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

--- cmake/FindLog4cxx.cmake
+++ cmake/FindLog4cxx.cmake
@@ -6,7 +6,7 @@
 # LOG4CXX_LIBRARIES - liblog4cxx library

 FIND_PATH(LOG4CXX_INCLUDE_DIR logger.h PATHS /usr/include/log4cxx /usr/local/include/log4cxx )
-FIND_LIBRARY(LOG4CXX_LIBRARIES NAMES log4cxx PATHS /usr/lib /usr/local/lib )
+FIND_LIBRARY(LOG4CXX_LIBRARIES NAMES log4cxx )

 IF(LOG4CXX_INCLUDE_DIR AND LOG4CXX_LIBRARIES)
   SET(Log4cxx_FOUND 1)


shorter solution for dylib/so problem

shorter solution for dylib/so problem

--- cmake/custom/test.cmake
+++ cmake/custom/test.cmake
@@ -11,9 +11,9 @@
 # workaround:
 # different dynamic lib suffix on mac
 if(APPLE)
-    set(_numgrid_lib ${PROJECT_BINARY_DIR}/external/numgrid-build/lib/libnumgrid.dylib)
+    set(_dyn_lib_suffix dylib)
 else()
-    set(_numgrid_lib ${PROJECT_BINARY_DIR}/external/numgrid-build/lib/libnumgrid.so)
+    set(_dyn_lib_suffix so)
 endif()

 target_link_libraries(
@@ -22,6 +22,7 @@
     xcint
     ${PROJECT_BINARY_DIR}/external/xcfun-build/libxcfun.a
     ${_numgrid_lib}
+    ${PROJECT_BINARY_DIR}/external/numgrid-build/lib/libnumgrid.${_dyn_lib_suffix}
     ${MATH_LIBS}
     pthread
     )


ENH: Bump ITKUltrasound to 2016-09-28

ENH: Bump ITKUltrasound to 2016-09-28

--- SuperBuild/External_ITKUltrasound.cmake
+++ SuperBuild/External_ITKUltrasound.cmake
@@ -8,7 +8,7 @@
 ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

 # disable-wrapping 2016-08-09
-set(${proj}_GIT_TAG 0cb92288333a9779da57511f779d0bde5ca35275)
+set(${proj}_GIT_TAG 56e5ea3decd64d93665413001d6e1f0a460d243d)
 ExternalProject_Add(${proj}
   ${${proj}_EP_ARGS}
   GIT_REPOSITORY ${git_protocol}://github.com/thewtex/ITKUltrasound.git


Update CHIBIOS_STM32F0xx_GCC_options.cmake

- remove wrong duplicate specs for linker

--- CMake/Modules/CHIBIOS_STM32F0xx_GCC_options.cmake
+++ CMake/Modules/CHIBIOS_STM32F0xx_GCC_options.cmake
@@ -11,6 +11,6 @@
 set(CMAKE_CXX_FLAGS "-mthumb -fno-builtin -mcpu=cortex-m0 -Wall -std=c++11 -w -ffunction-sections -fshort-wchar -falign-functions=16 -fdata-sections -fsingle-precision-constant -fomit-frame-pointer -mlong-calls -fdollars-in-identifiers -mabi=aapcs -fno-exceptions -fno-unroll-loops -mstructure-size-boundary=8 -ftree-vectorize -fcheck-new -fno-rtti -fno-use-cxa-atexit -fno-threadsafe-statics -specs=nano.specs" CACHE INTERNAL "cxx compiler flags")
 set(CMAKE_ASM_FLAGS "-c -mthumb -mcpu=cortex-m0 -g -Wa,--no-warn -x assembler-with-cpp " CACHE INTERNAL "asm compiler flags")

-set(CMAKE_EXE_LINKER_FLAGS " -Wl,-gc-sections -Wl,--no-wchar-size-warning -mthumb -mcpu=cortex-m0 -mabi=aapcs" CACHE INTERNAL "executable linker flags")
-set(CMAKE_MODULE_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs -specs=nano.specs " CACHE INTERNAL "module linker flags")
-set(CMAKE_SHARED_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs -specs=nano.specs " CACHE INTERNAL "shared linker flags")
+set(CMAKE_EXE_LINKER_FLAGS " -Wl,-gc-sections -Wl,--no-wchar-size-warning -mthumb -mcpu=cortex-m0 -mabi=aapcs " CACHE INTERNAL "executable linker flags")
+set(CMAKE_MODULE_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs " CACHE INTERNAL "module linker flags")
+set(CMAKE_SHARED_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs " CACHE INTERNAL "shared linker flags")


cmake: clang: Disable deprecated non-prototype warning

Clang 15 added a new warning type `-Wdeprecated-non-prototype` that
warns about the functions without prototypes, which have been
deprecated since the C89 and will not work in the upcoming C2x.

This commit disables the warning because Zephyr deliberately makes use
of the functions without prototypes to allow the use of a "generic"
function pointer (notoriously in the cbprintf implementation) and
Zephyr will not move to the C2x in the foreseeable future.

Signed-off-by: Stephanos Ioannidis <dc76e9f0c0006e8f919e0c515c66dbba3982f785@stephanos.io>

--- cmake/compiler/clang/compiler_flags.cmake
+++ cmake/compiler/clang/compiler_flags.cmake
@@ -29,6 +29,7 @@
                             -Wno-main
                             -Wno-unused-but-set-variable
                             -Wno-typedef-redefinition
+                            -Wno-deprecated-non-prototype
 )

 check_set_compiler_property(APPEND PROPERTY warning_base -Wno-pointer-sign)


switch to O3

switch to O3

--- compilers/GNU.CXX.cmake
+++ compilers/GNU.CXX.cmake
@@ -1,7 +1,7 @@
 if(NOT DEFINED ENV{CXXFLAGS})
     if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
-        set(CMAKE_CXX_FLAGS_RELEASE "-Ofast")
+        set(CMAKE_CXX_FLAGS_RELEASE "-O3")
         set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
     endif()
 endif()