Use the new LLVM cmake paths

Use the new LLVM cmake paths

Update the paths that we look in for the cmake modules from LLVM which changed
recently on SVN trunk.  Check the old paths first, and if that fails, check the
new path.  This permits building against either layout.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -147,11 +147,21 @@
   find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" "${${product}_NATIVE_LLVM_TOOLS_PATH}"
     NO_DEFAULT_PATH)

-  set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/share/llvm/cmake")
-  list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
-
-  set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
-  if(NOT EXISTS ${LLVMCONFIG_FILE})
+  set(LLVM_CMAKE_PATHS
+      "${LLVM_BINARY_DIR}/share/llvm/cmake"
+      "${LLVM_BINARY_DIR}/lib/cmake/llvm")
+
+  set(LLVMCONFIG_FILE)
+  foreach(CMAKE_PATH ${LLVM_CMAKE_PATHS})
+    list(APPEND CMAKE_MODULE_PATH "${CMAKE_PATH}")
+
+    if(EXISTS "${CMAKE_PATH}/LLVMConfig.cmake")
+      set(LLVMCONFIG_FILE "${CMAKE_PATH}/LLVMConfig.cmake")
+      break()
+    endif()
+  endforeach()
+
+  if(${LLVMCONFIG_FILE} STREQUAL "")
     message(FATAL_ERROR "Not found: ${LLVMCONFIG_FILE}")
   endif()


cmake: toolchain: zephyr-0.9.5: Fix setting of TOOLCHAIN_HAS_NEWLIB

There was an oversight and the Zephyr SDK 0.9.5 toolchain should report
itself as supporting newlib.

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

--- cmake/toolchain/zephyr/0.9.5/generic.cmake
+++ cmake/toolchain/zephyr/0.9.5/generic.cmake
@@ -5,3 +5,4 @@

 set(CROSS_COMPILE ${TOOLCHAIN_HOME}/usr/bin/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_TARGET}-)
 set(SYSROOT_DIR ${ZEPHYR_SDK_INSTALL_DIR}/sysroots/${SYSROOT_TARGET}/usr)
+set(TOOLCHAIN_HAS_NEWLIB ON CACHE BOOL "True if toolchain supports newlib")


CMake: Bugfix: Use Trilinos third party header locations

Also append Trilinos_TPL_INCLUDE_DIRS to TRILINOS_INCLUDE_DIRS

--- cmake/modules/FindTRILINOS.cmake
+++ cmake/modules/FindTRILINOS.cmake
@@ -1,6 +1,6 @@
 ## ---------------------------------------------------------------------
 ##
-## Copyright (C) 2012 - 2014 by the deal.II authors
+## Copyright (C) 2012 - 2015 by the deal.II authors
 ##
 ## This file is part of the deal.II library.
 ##
@@ -183,9 +183,9 @@
     REQUIRED ${_libraries} Trilinos_TPL_LIBRARIES
     OPTIONAL MPI_CXX_LIBRARIES
   INCLUDE_DIRS
-    REQUIRED Trilinos_INCLUDE_DIRS
+    REQUIRED Trilinos_INCLUDE_DIRS Trilinos_TPL_INCLUDE_DIRS
   USER_INCLUDE_DIRS
-    REQUIRED Trilinos_INCLUDE_DIRS
+    REQUIRED Trilinos_INCLUDE_DIRS Trilinos_TPL_INCLUDE_DIRS
   CLEAR
     TRILINOS_CONFIG_DIR EPETRA_CONFIG_H SACADO_CMATH_HPP ${_libraries}
     TRILINOS_SUPPORTS_CPP11 TRILINOS_HAS_C99_TR1_WORKAROUND


Delete spdlogConfigVersion.cmake

Delete spdlogConfigVersion.cmake

--- cygwin/spdlogConfigVersion.cmake
+++ cygwin/spdlogConfigVersion.cmake
@@ -1,46 +0,0 @@
-# This is a basic version file for the Config-mode of find_package().
-# It is used by write_basic_package_version_file() as input file for configure_file()
-# to create a version-file which can be installed along a config.cmake file.
-#
-# The created file sets PACKAGE_VERSION_EXACT if the current version string and
-# the requested version string are exactly the same and it sets
-# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
-# but only if the requested major version is the same as the current one.
-# The variable CVF_VERSION must be set before calling configure_file().
-
-
-set(PACKAGE_VERSION "1.4.0")
-
-if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
-  set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
-
-  if("1.4.0" MATCHES "^([0-9]+)\\.")
-    set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
-  else()
-    set(CVF_VERSION_MAJOR "1.4.0")
-  endif()
-
-  if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
-    set(PACKAGE_VERSION_COMPATIBLE TRUE)
-  else()
-    set(PACKAGE_VERSION_COMPATIBLE FALSE)
-  endif()
-
-  if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
-      set(PACKAGE_VERSION_EXACT TRUE)
-  endif()
-endif()
-
-
-# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
-   return()
-endif()
-
-# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
-if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
-  math(EXPR installedBits "8 * 8")
-  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
-  set(PACKAGE_VERSION_UNSUITABLE TRUE)
-endif()


build: correct dependency tracking

build: correct dependency tracking

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -97,6 +97,7 @@
                          ${doc}
                        DEPENDS
                          ${source}
+                         ${AST_DEPENDS}
                        COMMAND
                          ${CMAKE_SWIFT_COMPILER} -frontend ${flags} -emit-module-path ${mod} -emit-module-doc-path ${doc} -o ${obj} -c ${all_sources})

@@ -119,6 +120,7 @@
                        DEPENDS
                          ${mods}
                          ${docs}
+                         ${AST_DEPENDS}
                        COMMAND
                          ${CMAKE_SWIFT_COMPILER} -frontend ${flags} -sil-merge-partial-modules -emit-module ${mods} -o ${module} -emit-module-doc-path ${documentation})
   endif()
@@ -131,6 +133,7 @@
                          ${AST_OUTPUT}
                        DEPENDS
                          ${objs}
+                         ${AST_DEPENDS}
                        COMMAND
                          ${CMAKE_SWIFT_COMPILER} ${emit_library} ${link_flags} -o ${AST_OUTPUT} ${objs}
                        COMMAND


updated for rosunit paths

updated for rosunit paths

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -123,7 +123,7 @@
 # helper function to register check that results were generated (#580)
 macro(_rosbuild_check_rostest_xml_result test_name test_file)
   add_custom_target(${test_name}_result
-                    COMMAND ${rosunit_path}/bin/rostest-check-results ${test_file}
+                    COMMAND ${rosunit_path}/scripts/check_test_ran.py ${test_file}
 		    VERBATIM)
   # Redeclaration of target is to workaround bug in 2.4.6
   if(CMAKE_MINOR_VERSION LESS 6)
@@ -185,7 +185,7 @@
 # arguments as cmake doesn't know the name of the output file
 macro(_rosbuild_check_rostest_result test_name test_pkg test_file)
   add_custom_target(${test_name}_result
-                    COMMAND ${rosunit_path}/bin/rostest-check-results --rostest ${test_pkg} ${test_file}
+                    COMMAND ${rosunit_path}/scripts/check_test_ran.py --rostest ${test_pkg} ${test_file}
                     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
 		    VERBATIM)
   # Redeclaration of target is to workaround bug in 2.4.6


Prevent configuration error if !OGRE_BUILD_PLUGIN_CG and ${Cg_BINARY_DBG} is empty

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -223,22 +223,24 @@
 		endif()
 	endif()

-    if (OGRE_BUILD_PLUGIN_CG AND EXISTS ${Cg_BINARY_DBG} AND EXISTS ${Cg_BINARY_REL})
-      # if MinGW or NMake, the release/debug cg.dll's would conflict, so just pick one
-      if (MINGW OR (CMAKE_GENERATOR STREQUAL "NMake Makefiles"))
-        if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-          file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
+    if (OGRE_BUILD_PLUGIN_CG)
+      if (EXISTS ${Cg_BINARY_DBG} AND EXISTS ${Cg_BINARY_REL})
+        # if MinGW or NMake, the release/debug cg.dll's would conflict, so just pick one
+        if (MINGW OR (CMAKE_GENERATOR STREQUAL "NMake Makefiles"))
+          if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+            file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
+          else ()
+            file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
+      			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
+      			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
+          endif ()
         else ()
-          file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
-    			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
-    			file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
+            file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
+      		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
+      		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
+      		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
         endif ()
-      else ()
-            file(COPY ${Cg_BINARY_DBG} DESTINATION ${OGRE_BINARY_DIR}/bin/debug)
-    		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/release)
-    		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/relwithdebinfo)
-    		file(COPY ${Cg_BINARY_REL} DESTINATION ${OGRE_BINARY_DIR}/bin/minsizerel)
-      endif ()
+      endif()
     endif()

     if (OGRE_BUILD_RENDERSYSTEM_GLES)


test: Remove xml output files before running castxml

Ensure that test output is produced by castxml and not left from a
previous test run.


extend ctest script for SSSE3 and above

extend ctest script for SSSE3 and above

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -209,6 +209,12 @@
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE3)
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSSE3)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE4_1)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON -DEIGEN_TEST_SSE4_1=ON")
+  elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES SSE4_2)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_SSE2=ON -DEIGEN_TEST_SSE3=ON -DEIGEN_TEST_SSSE3=ON -DEIGEN_TEST_SSE4_1=ON -DEIGEN_TEST_SSE4_2=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES Altivec)
     set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -DEIGEN_TEST_ALTIVEC=ON")
   elseif(EIGEN_EXPLICIT_VECTORIZATION MATCHES novec)


CMake: adding sofa_add_application macro

Former-commit-id: d85218f309a3981d6a033e27e48848e9823cf315

--- SofaFramework/SofaMacros.cmake
+++ SofaFramework/SofaMacros.cmake
@@ -162,9 +162,19 @@

 macro(sofa_add_plugin directory plugin_name)
     string(TOUPPER PLUGIN_${plugin_name} plugin_option)
-    option(${plugin_option} "Build the ${plugin} plugin." OFF)
+    option(${plugin_option} "Build the ${plugin_name} plugin." OFF)
     if(${plugin_option})
         add_subdirectory(${directory} ${plugin_name})
         set_target_properties(${plugin_name} PROPERTIES FOLDER "Plugins") # IDE folder
     endif()
 endmacro()
+
+
+macro(sofa_add_application directory app_name)
+    string(TOUPPER APPLICATION_${app_name} application_option)
+    option(${application_option} "Build the ${app_name} application." OFF)
+    if(${application_option})
+        add_subdirectory(${directory} ${CMAKE_CURRENT_BINARY_DIR}/${app_name})
+        list(APPEND SOFAGUI_TARGETS ${app_name})
+    endif()
+endmacro()


Added -pthread flag to CXX_FLAGS for non clang builds

--- config/config.cmake
+++ config/config.cmake
@@ -58,6 +58,7 @@
     SET(LIBS ${LIBS} "dl pthread")
   ELSE(CLANG)
     SET(LIBS ${LIBS} "dl")
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
   ENDIF(CLANG)
 ENDIF(WIN32)


ENH: Including ITK patch for double fixed parameters.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -154,8 +154,8 @@
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
   set(${proj}_REPOSITORY "https://github.com/InsightSoftwareConsortium/ITK.git")
-  set(${proj}_GIT_TAG 8dcc50abc770199638f0cec8fa8429b41e261039)
-  set(ITK_VERSION_ID ITK-4.8) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID
+  set(${proj}_GIT_TAG 5538e605e730f054d40fee78c258fbaf959fbc92)
+  set(ITK_VERSION_ID ITK-4.9) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}


modules: updated FindImGui.cmake.

modules: updated FindImGui.cmake.

--- modules/FindImGui.cmake
+++ modules/FindImGui.cmake
@@ -69,8 +69,10 @@
 # Vcpkg distributes imgui as a library with a config file, so try that first --
 # but only if IMGUI_DIR wasn't explicitly passed, in which case we'll look
 # there instead
-find_package(imgui CONFIG QUIET)
-if(imgui_FOUND AND NOT IMGUI_DIR)
+if(NOT IMGUI_DIR AND NOT TARGET imgui::imgui)
+    find_package(imgui CONFIG QUIET)
+endif()
+if(NOT IMGUI_DIR AND TARGET imgui::imgui)
     if(NOT TARGET ImGui::ImGui)
         add_library(ImGui::ImGui INTERFACE IMPORTED)
         # TODO: remove once 1.71 is obsolete
@@ -92,7 +94,9 @@
     # Disable the find root path here, it overrides the
     # CMAKE_FIND_ROOT_PATH_MODE_INCLUDE setting potentially set in
     # toolchains.
-    find_path(ImGui_INCLUDE_DIR NAMES imgui.h HINTS ${IMGUI_DIR}
+    find_path(ImGui_INCLUDE_DIR NAMES imgui.h
+        HINTS ${IMGUI_DIR}
+        PATH_SUFFIXES MagnumExternal/ImGui
         NO_CMAKE_FIND_ROOT_PATH)
     mark_as_advanced(ImGui_INCLUDE_DIR)


cmake: Fix required flag check.

cmake: Fix required flag check.

It always passed after first test due to lack of CACHE in unset()
call. Also:

- Fix flag name in error message.
- Use actual flag instead of hard coded -std=c++11

Change-Id: I29c0dc4fd0f5ce97f658919a5739e15831a00281

--- build/cxx_flags.cmake
+++ build/cxx_flags.cmake
@@ -42,14 +42,14 @@
   string(FIND "${CMAKE_CXX_FLAGS}" "${cxx_flag}" CXX_FLAG_FOUND)

   if (${CXX_FLAG_FOUND} EQUAL -1)
-    unset(LIBWEBM_HAVE_CXX_FLAG)
+    unset(LIBWEBM_HAVE_CXX_FLAG CACHE)
     message("Checking CXX compiler flag support for: " ${cxx_flag})
     check_cxx_compiler_flag("${cxx_flag}" LIBWEBM_HAVE_CXX_FLAG)
     if (NOT LIBWEBM_HAVE_CXX_FLAG)
       message(FATAL_ERROR
-              "${PROJECT_NAME} requires support for CXX flag: ${flag}.")
+              "${PROJECT_NAME} requires support for CXX flag: ${cxx_flag}.")
     endif ()
-    set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}" CACHE STRING "" FORCE)
+    set(CMAKE_CXX_FLAGS "${cxx_flag} ${CMAKE_CXX_FLAGS}" CACHE STRING "" FORCE)
   endif ()
 endfunction ()


remove dhcpisocpp from LIBRARIES since we can only link against one (currently dhcpsacpp) (fix ros2/rclcpp#4)

--- opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
+++ opensplice_cmake_module/cmake/Modules/FindOpenSplice.cmake
@@ -63,7 +63,8 @@
     "ddsutil"
     "durability"
     "spliced"
-    "dcpsisocpp"
+    # we can't link against both sacpp and isocpp at the same time
+    #"dcpsisocpp"
     "dcpssacpp")
   if(NOT WIN32)
     list(APPEND OpenSplice_LIBRARIES "pthread" "dl")
@@ -79,7 +80,14 @@
     message(STATUS "Found PrismTech OpenSplice: ${opensplice_DIR}")
     set(OpenSplice_HOME "${OPENSPLICE_PREFIX}")
     set(OpenSplice_INCLUDE_DIRS ${OPENSPLICE_INCLUDE_DIRS})
-    set(OpenSplice_LIBRARIES ${OPENSPLICE_LIBRARIES})
+    set(OpenSplice_LIBRARIES "")
+    foreach(_lib ${OPENSPLICE_LIBRARIES})
+      get_filename_component(_name "${_lib}" NAME_WE)
+      # we can't link against both sacpp and isocpp at the same time
+      if(NOT "${_name}" STREQUAL "libdcpsisocpp" AND NOT "${_name}" STREQUAL "dcpsisocpp")
+        list(APPEND OpenSplice_LIBRARIES "${_lib}")
+      endif()
+    endforeach()
     set(OpenSplice_LIBRARY_DIRS "")
     set(OpenSplice_DEFINITIONS ${OPENSPLICE_DEFINITIONS})
     set(OpenSplice_IDLPP "${OPENSPLICE_IDLPP}")


[doc] fixes

[doc] fixes

--- cmake/BoostTestHelper.cmake
+++ cmake/BoostTestHelper.cmake
@@ -1,5 +1,5 @@
 #
-# Create a executable test from a source file. The associate executable has the same
+# Create an executable test from a source file. The associate executable has the same
 # name as the source file.
 #
 # Usage:
@@ -14,6 +14,11 @@
 # PREFIX is an optional string to append to the name of the test (e.g. the module name)
 #     For example if foo.cpp is passed as source, and "bar" as PREFIX the executable
 #     will be named named "bar_foo". Without PREFIX it will be just "foo"
+#
+# The function parses each test file and extract the BOOST_AUTO_TEST_SUITEs so
+# that each suite is run and visualised as a separated test. This means that no
+# BOOST_AUTO_TEST_CASE must be left outside the suite or it will not be run during make test
+#
 function(add_boost_test)

     set(options OPTIONS)


Remove the special rpath for Apple

Remove the special rpath for Apple

This was causing issues with packaging, and will need some work if it is
even necessary with our packaging process.

Change-Id: I6a90184872a18dc588927d30186a50cf7ab7b71d

--- cmake/InstallLocation.cmake
+++ cmake/InstallLocation.cmake
@@ -26,9 +26,6 @@
 # Set up RPATH for the project too.
 option(ENABLE_RPATH "Enable rpath support on Linux and Mac" ON)
 if(UNIX AND ENABLE_RPATH)
-  if(APPLE)
-    set(CMAKE_INSTALL_NAME_DIR "@executable_path/../${INSTALL_LIBRARY_DIR}")
-  endif()
   set(CMAKE_SKIP_BUILD_RPATH FALSE)
   set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
   set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)


add include-what-you-use

add include-what-you-use

--- cmake/StaticAnalyzers.cmake
+++ cmake/StaticAnalyzers.cmake
@@ -1,5 +1,7 @@
 option(ENABLE_CPPCHECK "Enable static analysis with cppcheck" OFF)
 option(ENABLE_CLANG_TIDY "Enable static analysis with clang-tidy" OFF)
+option(ENABLE_INCLUDE_WHAT_YOU_USE "Enable static analysis with include-what-you-use" OFF)
+
 if(ENABLE_CPPCHECK)
   find_program(CPPCHECK cppcheck)
   if(CPPCHECK)
@@ -19,4 +21,11 @@
   endif()
 endif()

-
+if(ENABLE_INCLUDE_WHAT_YOU_USE)
+  find_program(INCLUDEWHATYOUUSE include-what-you-use)
+  if(INCLUDEWHATYOUUSE)
+    set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE ${INCLUDEWHATYOUUSE})
+  else()
+    message(SEND_ERROR "include-what-you-use requested but executable not found")
+  endif()
+endif()


[CMake] Fix build on MSVC in r246156.

[CMake] Fix build on MSVC in r246156.

add_windows_version_resource_file() affects ALL_FILES. OBJLIB shouldn't have *.obj as SOURCES.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -563,7 +563,6 @@

 macro(add_llvm_executable name)
   llvm_process_sources( ALL_FILES ${ARGN} )
-  add_windows_version_resource_file(ALL_FILES ${ALL_FILES})

   # Generate objlib
   if(LLVM_ENABLE_OBJLIB)
@@ -577,6 +576,8 @@

     set_target_properties(${obj_name} PROPERTIES FOLDER "Object Libraries")
   endif()
+
+  add_windows_version_resource_file(ALL_FILES ${ALL_FILES})

   if( EXCLUDE_FROM_ALL )
     add_executable(${name} EXCLUDE_FROM_ALL ${ALL_FILES})


Fix the MSVC build again.

Fix the MSVC build again.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -17,7 +17,7 @@
   # generation is triggered by the main LLVM target library. Necessary
   # for parallel builds:
   if( CURRENT_LLVM_TARGET )
-    add_dependencies(${name} LLVM${CURRENT_LLVM_TARGET})
+    add_dependencies(${name} ${CURRENT_LLVM_TARGET})
   endif()
 endmacro(add_llvm_library name)


qi_generate_src: fix when using relative sources

Fixes #17797

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

--- cmake/qibuild/codegen.cmake
+++ cmake/qibuild/codegen.cmake
@@ -29,7 +29,9 @@
     set_source_files_properties(${_out_file}
         PROPERTIES GENERATED TRUE)
     get_filename_component(_out_dir ${_out_file} PATH)
-    file(MAKE_DIRECTORY ${_out_dir})
+    if(_out_dir)
+      file(MAKE_DIRECTORY ${_out_dir})
+    endif()
   endforeach()
   set(_comment "Generating ${out} ....")
   if(ARG_COMMENT)


Added PLAT_ definitions

Added PLAT_ definitions

--- cmake_modules/Findbta.cmake
+++ cmake_modules/Findbta.cmake
@@ -25,10 +25,12 @@
   if (CMAKE_CL_64)
       set(ARCH_DIR "x64")
   endif()
+  add_definitions(-DPLAT_WINDOWS)
 elseif (UNIX)
     if (CMAKE_SIZEOF_VOID_P EQUAL 8)
         set(ARCH_DIR "x64")
    endif()
+   add_definitions(-DPLAT_LINUX)
 endif()

 message( ARCH_DIR:  ${ARCH_DIR} )


Workaround "Segmentation fault" when built with gcc 4.7 from NDK r8d

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -981,7 +981,13 @@
   set( ANDROID_EXCEPTIONS       ON )
   set( ANDROID_RTTI             ON )
   if( EXISTS "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
-   set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
+   if( ARMEABI_V7A AND ANDROID_COMPILER_VERSION VERSION_EQUAL "4.7" AND ANDROID_NDK_RELEASE STREQUAL "r8d" )
+    # gnustl binary for 4.7 compiler is buggy :(
+    # TODO: look for right fix
+    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/4.6" )
+   else()
+    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/${ANDROID_COMPILER_VERSION}" )
+   endif()
   else()
    set( __libstl                "${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++" )
   endif()


ImportedProjectUtils: Quote variable derefs in nested cmake files

--- ImportedProjectUtils.cmake
+++ ImportedProjectUtils.cmake
@@ -341,24 +341,24 @@

     set (METAPROJECT_CMAKELISTS
          "include (ExternalProject)\n"
-         "externalproject_add (${PROJECT_NAME}\n"
+         "externalproject_add (\"${PROJECT_NAME}\"\n"
          "                     ${CREATE_METAPROJECT_OPTIONS}\n"
-         "                     PREFIX ${EXTERNAL_PROJECT_ROOT}\n"
+         "                     PREFIX \"${EXTERNAL_PROJECT_ROOT}\"\n"
          "                     BINARY_DIR\n"
-         "                     ${BINARY_DIR}"
+         "                     \"${BINARY_DIR}\"\n"
          "                     STAMP_DIR\n"
-         "                     ${METAPROJECT_STAMP_DIR}\n"
+         "                     \"${METAPROJECT_STAMP_DIR}\"\n"
          "                     BUILD_COMMAND \"\"\n"
          "                     INSTALL_COMMAND \"\"\n"
          "                     CMAKE_ARGS\n"
-         "                     -C${INITIAL_CACHE}\n"
+         "                     \"-C${INITIAL_CACHE}\"\n"
          "                     CMAKE_GENERATOR\n"
-         "                     ${GENERATOR})\n")
+         "                     \"${GENERATOR}\")\n")

     if (GENERATE_EXPORTS)

         # File that we will be appending to
-        set (APPEND_TO_FILE "${SOURCE_DIR}/CMakeLists.txt")
+        set (APPEND_TO "${SOURCE_DIR}/CMakeLists.txt")

         # Make a list of targets to be exported
         foreach (VARIABLE ${CREATE_METAPROJECT_TARGETS})
@@ -372,15 +372,15 @@

         # A script which will append an export () command to a file
         set (METAPROJECT_APPEND_EXPORT_SCRIPT_CONTENTS
-             "file (APPEND ${APPEND_TO_FILE}\n"
+             "file (APPEND \"${APPEND_TO}\"\n"
              "      \"\\nexport (TARGETS ${EXPORTED}\\n\"\n"
-             "      \"           FILE ${EXPORTS}.cmake)\\n\")\n")
+             "      \"           FILE \"${EXPORTS}.cmake\")\\n\")\n")
         string (REPLACE ";" ""
                 METAPROJECT_APPEND_EXPORT_SCRIPT_CONTENTS
                 "${METAPROJECT_APPEND_EXPORT_SCRIPT_CONTENTS}")
-        set (METAPROJECT_APPEND_EXPORTS_SCRIPT
+        set (METAPROJECT_APPEND_EXPORTS
              "${METAPROJECT}/AppendExportTargets.cmake")
-        file (WRITE ${METAPROJECT_APPEND_EXPORTS_SCRIPT}
+        file (WRITE ${METAPROJECT_APPEND_EXPORTS}
               "${METAPROJECT_APPEND_EXPORT_SCRIPT_CONTENTS}")

         # Add a new step to the meta-project to append an exports
@@ -388,17 +388,17 @@
         # run before the configure steps
         set (METAPROJECT_CMAKELISTS
              "${METAPROJECT_CMAKELISTS}\n"
-             "externalproject_add_Step (${PROJECT_NAME}\n"
+             "externalproject_add_Step (\"${PROJECT_NAME}\"\n"
              "                          append_exports\n"
              "                          COMMENT\n"
              "                          \"Adding exports to ${PROJECT_NAME}\"\n"
              "                          DEPENDEES download patch\n"
              "                          DEPENDERS configure\n"
              "                          COMMAND\n"
-             "                          ${CMAKE_COMMAND}\n"
-             "                          -DAPPEND_TO_FILE=${APPEND_TO_FILE}\n"
+             "                          \"${CMAKE_COMMAND}\"\n"
+             "                          \"-DAPPEND_TO_FILE=${APPEND_TO}\"\n"
              "                          -P\n"
-             "                          ${METAPROJECT_APPEND_EXPORTS_SCRIPT}\n"
+             "                          \"${METAPROJECT_APPEND_EXPORTS}\"\n"
              "                          LOG)\n")

     endif ()


Use the ADD_BALL_DEFINITIONS macro for -pedantic

This adds the -pedantic flag to the BALL_DEFINITIONS
variable.

--- cmake/BALLCompilerSpecific.cmake
+++ cmake/BALLCompilerSpecific.cmake
@@ -66,7 +66,7 @@
 	ADD_DEFINITIONS(-Wall -Wextra -Wno-long-long)

 	IF(USE_PEDANTIC)
-		ADD_DEFINITIONS(-pedantic)
+		ADD_BALL_DEFINITIONS("-pedantic")
 	ENDIF()

 	## Recommended setting for eclipse, see http://www.cmake.org/Wiki/CMake:Eclipse


Changing setting to CSV for easier submission results into database

--- cmake/modules/AddRootBench.cmake
+++ cmake/modules/AddRootBench.cmake
@@ -18,8 +18,8 @@
   #  COMMAND ${benchmark}
   #  WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}
   #  LABELS "benchmark")
-  add_test(NAME rootbench-${benchmark} COMMAND ${benchmark} --benchmark_out_format=json --benchmark_out=rootbench-${benchmark}.json --benchmark_color=false)
-  set_tests_properties(rootbench-${benchmark} PROPERTIES TIMEOUT 180)
+  add_test(NAME rootbench-${benchmark} COMMAND ${benchmark} --benchmark_out_format=csv --benchmark_out=rootbench-${benchmark}.csv --benchmark_color=false)
+  set_tests_properties(rootbench-${benchmark} PROPERTIES TIMEOUT 300)
 endfunction(RB_ADD_GBENCHMARK)

 #----------------------------------------------------------------------------


[CMake] Add custom target to create build directory

CMake does a poor job in tracking dependencies on files and directories
directly. Create custom target similar to the configuration step.
On my system, this avoids the reconfiguration on each build.

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

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -16,12 +16,15 @@
     COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_${target_name}_BUILD}
     COMMENT "Creating ${LLVM_${target_name}_BUILD}...")

+  add_custom_target(CREATE_LLVM_${target_name}
+                    DEPENDS ${LLVM_${target_name}_BUILD})
+
   add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
         -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
     WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
-    DEPENDS ${LLVM_${target_name}_BUILD}
+    DEPENDS CREATE_LLVM_${target_name}
     COMMENT "Configuring ${target_name} LLVM...")

   add_custom_target(CONFIGURE_LLVM_${target_name}


build: allow passing Swift specific link flags

This mirrors the `CMAKE_SWIFT_FLAGS` allowing control over the flags
passed to the linker.  This is needed until the libraries are built
with a newer CMake which supports Swift properly.  This enables
cross-compiling libdispatch for Android on Windows.

--- cmake/modules/SwiftSupport.cmake
+++ cmake/modules/SwiftSupport.cmake
@@ -41,7 +41,7 @@
   cmake_parse_arguments(AST "${options}" "${single_value_options}" "${multiple_value_options}" ${ARGN})

   set(compile_flags ${CMAKE_SWIFT_FLAGS})
-  set(link_flags)
+  set(link_flags ${CMAKE_SWIFT_LINK_FLAGS})

   list(APPEND compile_flags -incremental)
   ProcessorCount(CPU_COUNT)


Disable -dev tk until it works again.

Disable -dev tk until it works again.

svn path=/trunk/; revision=10778

--- cmake/modules/drivers-init.cmake
+++ cmake/modules/drivers-init.cmake
@@ -219,8 +219,9 @@
   #"tek4107f:tek:OFF:F:OFF"
   #"versaterm:tek:OFF:I:OFF"
   #"vlt:tek:OFF:I:OFF"
-  #"xterm:tek:OFF:I:OFF"
-  "tk:tk:ON:I:OFF"
+  #"xterm:tek:OFF:I:OFF"
+  # Temporarily turn off -dev tk by default until it works again.
+  "tk:tk:OFF:I:OFF"
   "tkwin:tkwin:ON:E:OFF"
   "wingcc:wingcc:ON:I:OFF"
   "wxwidgets:wxwidgets:ON:I:OFF"


Try to find FlexLexer.h associated with the flex binary being used.  Approved: David Graf, Chris Hillery

--- cmake_modules/CMakeUseFlex.cmake
+++ cmake_modules/CMakeUseFlex.cmake
@@ -29,7 +29,6 @@

 IF(NOT FLEX_EXECUTABLE)
   MESSAGE(STATUS "Looking for flex")
-  FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h)
   FIND_PROGRAM(FLEX_EXECUTABLE flex)
   IF(FLEX_EXECUTABLE)
     EXEC_PROGRAM(
@@ -40,15 +39,22 @@
     # Extract major and minor versions
     STRING (REGEX REPLACE "[^0-9]*([0-9]+)..*" "\\1" FLEX_MAJOR_VERSION_TMP ${FLEX_VERSION})
     STRING (REGEX REPLACE "[^0-9]*[0-9]+\\.([0-9]+).*" "\\1" FLEX_MINOR_VERSION_TMP ${FLEX_VERSION})
-	STRING (REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+[a-z]*).*" "\\1" FLEX_REVISION_VERSION_TMP ${FLEX_VERSION})
+    STRING (REGEX REPLACE "[^0-9]*[0-9]+\\.[0-9]+\\.([0-9]+[a-z]*).*" "\\1" FLEX_REVISION_VERSION_TMP ${FLEX_VERSION})
     MESSAGE(STATUS "Found flex -- ${FLEX_EXECUTABLE}, version: " ${FLEX_MAJOR_VERSION_TMP} "." ${FLEX_MINOR_VERSION_TMP} "." ${FLEX_REVISION_VERSION_TMP})
     SET (FLEX_MAJOR_VERSION ${FLEX_MAJOR_VERSION_TMP} CACHE STRING "The flex major version" FORCE)
     SET (FLEX_MINOR_VERSION ${FLEX_MINOR_VERSION_TMP} CACHE STRING "The flex minor version" FORCE)
-	SET (FLEX_REVISION_VERSION ${FLEX_REVISION_VERSION_TMP} CACHE STRING "The flex revision version" FORCE)
+    SET (FLEX_REVISION_VERSION ${FLEX_REVISION_VERSION_TMP} CACHE STRING "The flex revision version" FORCE)
+
+    # Find the FlexLexer.h header. Try our best to find the one associated
+    # with the flex binary we're actually using.
+    GET_FILENAME_COMPONENT(_flex_path "${FLEX_EXECUTABLE}" PATH)
+    GET_FILENAME_COMPONENT(_flex_hint "${_flex_path}/../include" ABSOLUTE)
+    FIND_PATH(FLEX_INCLUDE_DIR FlexLexer.h HINTS "${_flex_hint}")
+
   ELSE (FLEX_EXECUTABLE)
     SET (FLEX_MAJOR_VERSION "0")
     SET (FLEX_MINOR_VERSION "0")
-	  SET (FLEX_REVISION_VERSION "0")
+    SET (FLEX_REVISION_VERSION "0")
   ENDIF(FLEX_EXECUTABLE)
   SET (FLEX_VERSION_FULL ${FLEX_MAJOR_VERSION}.${FLEX_MINOR_VERSION}.${FLEX_REVISION_VERSION} CACHE STRING "The Flex version" FORCE)
 ENDIF(NOT FLEX_EXECUTABLE)
@@ -74,7 +80,7 @@
       COMMAND "${CMAKE_COMMAND}"
       ARGS -E copy_if_different
          "${FLEX_INCLUDE_DIR}/FlexLexer.h"
-	 "${FLEXLEXERH}")
+         "${FLEXLEXERH}")
     SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}/${PATH}/${PREFIX}.cpp")
     ADD_CUSTOM_COMMAND(
       OUTPUT "${OUTFILE}"


Use ARGV0 variable in InvokePython.cmake.

--- cmake_modules/InvokePython.cmake
+++ cmake_modules/InvokePython.cmake
@@ -1,10 +1,12 @@
 # Invokes python on a given string with script name followed by args.

-function( INVOKEPYTHON ARGS )
+function( INVOKEPYTHON )
+    message( STATUS "INVOKEPYTHON [${ARGV}]" )
+
     # @TODO This was a pain to get to work and likely not the best solution...
     set (python_cmd "python")
-    message(STATUS "Invoking ${python_cmd} ${ARGS}:" )
-    execute_process(COMMAND ${python_cmd} ${ARGS}
+    message(STATUS "Invoking ${python_cmd} ${ARGV0}:" )
+    execute_process(COMMAND ${python_cmd} ${ARGV0}
         WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
         RESULT_VARIABLE python_result
         OUTPUT_VARIABLE python_output)


remove now-unused file

remove now-unused file

--- test/SCOREC_tribits_exes.cmake
+++ test/SCOREC_tribits_exes.cmake
@@ -1,10 +0,0 @@
-include(TribitsSubPackageMacros)
-tribits_subpackage(exe)
-
-tribits_add_executable(
-  convert
-  SOURCES convert.cc
-  INSTALLABLE
-)
-
-tribits_subpackage_postprocess()


Audio: Eliminate the FindOggVorbis cmake find file.

CCMAIL: f92fe4c0c81dbf990778df2217f519c7756e932f@ubuntu.com

--- audio/cmake/FindOggVorbis.cmake
+++ audio/cmake/FindOggVorbis.cmake
@@ -1,89 +0,0 @@
-# - Try to find the OggVorbis libraries
-# Once done this will define
-#
-#  OGGVORBIS_FOUND - system has OggVorbis
-#  OGGVORBIS_VERSION - set either to 1 or 2
-#  OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory
-#  OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis
-#  OGG_LIBRARY         - The Ogg library
-#  VORBIS_LIBRARY      - The Vorbis library
-#  VORBISFILE_LIBRARY  - The VorbisFile library
-#  VORBISENC_LIBRARY   - The VorbisEnc library
-
-# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
-
-
-include (CheckLibraryExists)
-
-find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
-find_path(OGG_INCLUDE_DIR ogg/ogg.h)
-
-find_library(OGG_LIBRARY NAMES ogg)
-find_library(VORBIS_LIBRARY NAMES vorbis)
-find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
-find_library(VORBISENC_LIBRARY NAMES vorbisenc)
-
-mark_as_advanced(VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR
-                 OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)
-
-
-if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
-   set(OGGVORBIS_FOUND TRUE)
-
-   set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
-
-   set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
-   set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
-   check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
-   set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
-
-   if (HAVE_LIBVORBISENC2)
-      set (OGGVORBIS_VERSION 2)
-   else (HAVE_LIBVORBISENC2)
-      set (OGGVORBIS_VERSION 1)
-   endif (HAVE_LIBVORBISENC2)
-
-else (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
-   set (OGGVORBIS_VERSION)
-   set(OGGVORBIS_FOUND FALSE)
-endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
-
-
-if (OGGVORBIS_FOUND)
-   if (NOT OggVorbis_FIND_QUIETLY)
-      message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")
-   endif (NOT OggVorbis_FIND_QUIETLY)
-else (OGGVORBIS_FOUND)
-   if (OggVorbis_FIND_REQUIRED)
-      message(FATAL_ERROR "Could NOT find OggVorbis libraries")
-   endif (OggVorbis_FIND_REQUIRED)
-   if (NOT OggVorbis_FIND_QUITELY)
-      message(STATUS "Could NOT find OggVorbis libraries")
-   endif (NOT OggVorbis_FIND_QUITELY)
-endif (OGGVORBIS_FOUND)
-
-#check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
-#check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
-#check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS)
-#check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
-#check_library_exists(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC)
-#check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
-
-#if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
-#    message(STATUS "Ogg/Vorbis found")
-#    set (VORBIS_LIBS "-lvorbis -logg")
-#    set (VORBISFILE_LIBS "-lvorbisfile")
-#    set (VORBISENC_LIBS "-lvorbisenc")
-#    set (OGGVORBIS_FOUND TRUE)
-#    if (HAVE_LIBVORBISENC2)
-#        set (HAVE_VORBIS 2)
-#    else (HAVE_LIBVORBISENC2)
-#        set (HAVE_VORBIS 1)
-#    endif (HAVE_LIBVORBISENC2)
-#else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
-#    message(STATUS "Ogg/Vorbis not found")
-#endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
-


[FIX] Remove code generation flags

[FIX] Remove code generation flags

* `-fstrict-aliasing` should not be added to CXXFLAGS unconditionally,
  as it is already implied by -O2 and -O3. When compiling -O0, no
  code generation affecting flags should be added to the compile line.
  See also:
    https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Optimize-Options.html#index-O2-707

* `-Wstrict-aliasing` is completely unnecessary, as it is implied by -Wall.
  See also:
    https://gcc.gnu.org/onlinedocs/gcc-6.3.0/gcc/Warning-Options.html#index-Wall-304

--- util/cmake/SeqAnBuildSystem.cmake
+++ util/cmake/SeqAnBuildSystem.cmake
@@ -200,7 +200,7 @@
         # TODO(h-2): raise this to W4
         set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} /W3")
     else()
-        set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -W -Wall -pedantic -fstrict-aliasing -Wstrict-aliasing")
+        set (SEQAN_CXX_FLAGS "${SEQAN_CXX_FLAGS} -W -Wall -pedantic")
         set (SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)

         # disable some warnings on ICC


For macos and freebsd, try to find gtar and use it

--- build/cmake/macros/TarGz.cmake
+++ build/cmake/macros/TarGz.cmake
@@ -1,9 +1,21 @@
 if (NOT WINDOWS)
+    # BSD has both BSD tar, named "tar", and GNU tar, named "gtar" in ports...
+    if (not BSD_UNIX)
+	set( TAR_COMMAND tar)
+    else()
+	# but old batlab has gnu tar named "tar" in the path first, and no gtar
+	FIND_PROGRAM(TAR_COMMAND "gtar")
+	if (NOT TAR_COMMAND)
+		# Could not find gtar, use "tar" and hope for the best
+		set( TAR_COMMAND tar)
+	endif()
+    endif()
+
     add_custom_command(
         OUTPUT ${CPACK_PACKAGE_FILE_NAME}.tar.gz
         COMMAND mv ARGS ${CMAKE_INSTALL_PREFIX} ${CPACK_PACKAGE_FILE_NAME}
-        COMMAND tar ARGS czf ${CPACK_PACKAGE_FILE_NAME}.tar.gz --owner=0 --group=0 --numeric-owner ${CPACK_PACKAGE_FILE_NAME}
+        COMMAND ${TAR_COMMAND} ARGS czf ${CPACK_PACKAGE_FILE_NAME}.tar.gz --owner=0 --group=0 --numeric-owner ${CPACK_PACKAGE_FILE_NAME}
         COMMAND mv ARGS ${CPACK_PACKAGE_FILE_NAME} ${CMAKE_INSTALL_PREFIX}
     )
     add_custom_target(targz DEPENDS ${CPACK_PACKAGE_FILE_NAME}.tar.gz)
-endif()+endif()


Update ios.toolchain.cmake

Update ios.toolchain.cmake

Added CMAKE_CXX_FLAGS_DEBUG with debug settings

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -104,6 +104,9 @@
 set(CMAKE_HAVE_THREADS_LIBRARY 1)
 set(CMAKE_USE_WIN32_THREADS_INIT 0)
 set(CMAKE_USE_PTHREADS_INIT 1)
+
+# Cache what generator is used
+set(USED_CMAKE_GENERATOR "${CMAKE_GENERATOR}" CACHE STRING "Expose CMAKE_GENERATOR" FORCE)

 # Get the Xcode version being used.
 execute_process(COMMAND xcodebuild -version
@@ -409,6 +412,7 @@
 # Hidden visibilty is required for C++ on iOS.
 set(CMAKE_CXX_FLAGS
 "${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} ${VISIBILITY} -fvisibility-inlines-hidden -fobjc-abi-version=2 ${FOBJC_ARC} ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 -g ${BITCODE} ${CMAKE_CXX_FLAGS_DEBUG}")
 set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS} -DNDEBUG -Os -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_MINSIZEREL}")
 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -DNDEBUG -O2 -g -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} -DNDEBUG -O3 -ffast-math ${BITCODE} ${CMAKE_CXX_FLAGS_RELEASE}")
@@ -421,6 +425,7 @@
 list(APPEND VARS_TO_FORCE_IN_CACHE
   CMAKE_C_FLAGS
   CMAKE_CXX_FLAGS
+  CMAKE_CXX_FLAGS_DEBUG
   CMAKE_CXX_FLAGS_RELWITHDEBINFO
   CMAKE_CXX_FLAGS_MINSIZEREL
   CMAKE_CXX_FLAGS_RELEASE


set up boost static library usage as default

--- cmake/FindBoost.cmake
+++ cmake/FindBoost.cmake
@@ -66,7 +66,9 @@
     boost-1_33
   )

+  SET(BOOST_PREFIX "")
   if (WIN32)
+    SET(BOOST_PREFIX "lib")
     # In windows, automatic linking is performed, so you do not have to specify the libraries.
     # If you are linking to a dynamic runtime, then you can choose to link to either a static or a
     # dynamic Boost library, the default is to do a static link.  You can alter this for a specific
@@ -186,7 +188,7 @@
     if (NOT BOOST_DATE_TIME_LIBRARY)
       find_library(BOOST_DATE_TIME_LIBRARY
         NAMES
-          boost_date_time${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_date_time${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -206,7 +208,7 @@
     if (NOT BOOST_FILESYSTEM_LIBRARY)
       find_library(BOOST_FILESYSTEM_LIBRARY
         NAMES
-          boost_filesystem${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_filesystem${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -215,7 +217,7 @@
     if (NOT BOOST_IOSTREAMS_LIBRARY)
       find_library(BOOST_IOSTREAMS_LIBRARY
         NAMES
-          boost_iostreams${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_iostreams${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -224,7 +226,7 @@
     if (NOT BOOST_PRG_EXEC_MONITOR_LIBRARY)
       find_library(BOOST_PRG_EXEC_MONITOR_LIBRARY
         NAMES
-          boost_prg_exec_monitor${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_prg_exec_monitor${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -233,7 +235,7 @@
     if (NOT BOOST_PROGRAM_OPTIONS_LIBRARY)
       find_library(BOOST_PROGRAM_OPTIONS_LIBRARY
         NAMES
-          boost_program_options${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_program_options${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -242,7 +244,7 @@
     if (NOT BOOST_PYTHON_LIBRARY)
       find_library(BOOST_PYTHON_LIBRARY
         NAMES
-          boost_python${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_python${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -251,7 +253,7 @@
     if (NOT BOOST_REGEX_LIBRARY)
       find_library(BOOST_REGEX_LIBRARY
         NAMES
-          boost_regex${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_regex${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -260,7 +262,7 @@
     if (NOT BOOST_SERIALIZATION_LIBRARY)
       find_library(BOOST_SERIALIZATION_LIBRARY
         NAMES
-          boost_serialization${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_serialization${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -269,21 +271,16 @@
     if (NOT BOOST_SIGNALS_LIBRARY)
       find_library(BOOST_SIGNALS_LIBRARY
         NAMES
-          boost_signals${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_signals${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
     endif (NOT BOOST_SIGNALS_LIBRARY)

     if (NOT BOOST_TEST_EXEC_MONITOR_LIBRARY)
-      if (WIN32)
-        set (_name libboost_test_exec_monitor${TMP_BOOST_LIBRARIES_SUFFIX})
-      else (WIN32)
-        set (_name boost_test_exec_monitor${TMP_BOOST_LIBRARIES_SUFFIX})
-      endif (WIN32)
       find_library(BOOST_TEST_EXEC_MONITOR_LIBRARY
         NAMES
-          ${_name}
+	  ${BOOST_PREFIX}boost_test_exec_monitor${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -292,23 +289,17 @@
     if (NOT BOOST_THREAD_LIBRARY)
       find_library(BOOST_THREAD_LIBRARY
         NAMES
-          boost_thread${TMP_BOOST_LIBRARIES_SUFFIX}
-          boost_thread-mt
+          ${BOOST_PREFIX}boost_thread${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_thread-mt
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
     endif (NOT BOOST_THREAD_LIBRARY)

     if (NOT BOOST_UNIT_TEST_FRAMEWORK_LIBRARY)
-      set (_boost_unit_test_lib_name "")
-      if (WIN32)
-        set (_boost_unit_test_lib_name libboost_unit_test_framework${TMP_BOOST_LIBRARIES_SUFFIX})
-      else (WIN32)
-        set (_boost_unit_test_lib_name boost_unit_test_framework${TMP_BOOST_LIBRARIES_SUFFIX})
-      endif (WIN32)
       find_library(BOOST_UNIT_TEST_FRAMEWORK_LIBRARY
         NAMES
-          ${_boost_unit_test_lib_name}
+          ${BOOST_PREFIX}boost_unit_test_framework${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )
@@ -317,7 +308,7 @@
     if (NOT BOOST_WSERIALIZATION_LIBRARY)
       find_library(BOOST_WSERIALIZATION_LIBRARY
         NAMES
-          boost_wserialization${TMP_BOOST_LIBRARIES_SUFFIX}
+          ${BOOST_PREFIX}boost_wserialization${TMP_BOOST_LIBRARIES_SUFFIX}
         PATHS
           ${BOOST_LIBRARIES_SEARCH_DIRS}
       )


Fix detection of mpi4py in cmake.

Fix detection of mpi4py in cmake.

--- cmake/SetupTPLs.cmake
+++ cmake/SetupTPLs.cmake
@@ -31,16 +31,18 @@
     find_package(PythonInterp REQUIRED)
     find_package(PythonLibs REQUIRED)
     execute_process(
-        COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
-        OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
-        OUTPUT_STRIP_TRAILING_WHITESPACE
-        )
-    message("PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}")
-    find_path(MPI4PY_INCLUDE_DIR mpi4py/mpi4py.h
-        PATHS ${PYTHON_SITE_PACKAGES}/mpi4py/include
-        NO_DEFAULT_PATH
+        COMMAND ${PYTHON_EXECUTABLE} -c "from mpi4py import get_include; print(get_include())"
+        OUTPUT_VARIABLE MPI4PY_INCLUDE_DIR
     )
-    message("MPI4PY_INCLUDE_DIR=${MPI4PY_INCLUDE_DIR}")
+    find_path(MPI4PY_INCLUDE_DIR mpi4py/mpi4py.h
+        PATH ${MPI4PY_INCLUDE_DIR}
+        NO_DEFAULT
+    )
+    if(MPI4PY_INCLUDE_DIR)
+        message("MPI4PY_INCLUDE_DIR=${MPI4PY_INCLUDE_DIR}")
+    else()
+        message(FATAL_ERROR "mpi4py not found.")
+    endif()
 endif()

 #### deal.II #################################################################


[asan] Enable AArch64 build of ASan runtime and tests.

git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@239322 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -247,7 +247,7 @@
 filter_available_targets(UBSAN_COMMON_SUPPORTED_ARCH
   ${SANITIZER_COMMON_SUPPORTED_ARCH})
 filter_available_targets(ASAN_SUPPORTED_ARCH
-  x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel mips64 mips64el)
+  x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mipsel mips64 mips64el)
 filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(LSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)
 filter_available_targets(MSAN_SUPPORTED_ARCH x86_64 mips64 mips64el)


Forced doxygen version 1.8.0 due to markdown support

--- cmake/createDoc.cmake
+++ cmake/createDoc.cmake
@@ -1,4 +1,4 @@
-find_package(Doxygen)
+find_package(Doxygen 1.8.0)
 if(DOXYGEN_FOUND AND PYTHONINTERP_FOUND)

     file(GLOB_RECURSE DOC_MD_SRC  "${PROJECT_SOURCE_DIR}/doc/*.md")


cmake: add the gcc -mcpu parameter value for the Cortex-A9 CPU

Add the -mcpu=cortex-a9 option as part of the basic aarch32 Cortex-A
CPU support.

Signed-off-by: Immo Birnbaum <9d53277017f7b972042afc81794f782b84cac388@weidmueller.com>

--- cmake/gcc-m-cpu.cmake
+++ cmake/gcc-m-cpu.cmake
@@ -40,6 +40,8 @@
     set(GCC_M_CPU cortex-r5)
   elseif(CONFIG_CPU_CORTEX_R7)
     set(GCC_M_CPU cortex-r7)
+  elseif(CONFIG_CPU_CORTEX_A9)
+    set(GCC_M_CPU cortex-a9)
   else()
     message(FATAL_ERROR "Expected CONFIG_CPU_CORTEX_x to be defined")
   endif()


display the list of modules when the sorted and original lists do not match

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

--- cmake/pcl_utils.cmake
+++ cmake/pcl_utils.cmake
@@ -374,6 +374,8 @@
   list(LENGTH ${_to_sort_relative} to_sort_list_length)

   if(NOT (list_length EQUAL sorted_list_length))
+    message(STATUS "Original list: ${${_list}}")
+    message(STATUS "Sorted list: ${${_sorted_list}}")
     message(FATAL_ERROR "size mismatch between ${_sorted_list} (length ${sorted_list_length}) and ${_list} (length ${list_length})")
   endif(NOT (list_length EQUAL sorted_list_length))


better comment

better comment

--- cmake/stm32_gcc.cmake
+++ cmake/stm32_gcc.cmake
@@ -14,5 +14,5 @@
 set(CMAKE_EXECUTABLE_SUFFIX_CXX .elf)
 set(CMAKE_EXECUTABLE_SUFFIX_ASM .elf)

-# See: https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html
+# This should be safe to set for a bare-metal cross-compiler
 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)


ENH: Update Remote Module IsotropicWavelets

```
git shortlog --no-merges  02e14fce0..99d527a4

Pablo Hernandez-Cerdan (11):
      ENH: Add example for riesz phase analysis
      BUG: Fix dimension in riesz Phase analysis example
      PERF: Add DynamicThreaded to RieszBankGenerator
      PERF: Add DynamicThreaded to WaveletBankGenerator
      ENH: Bump itk required version for python in setup.py
      ENH: Travis: Do not restrict the python wheels for OSx
      COMP: Increase epsilon in numerical comparisson in Utilities
      COMP: Generate packages for python 2.7 and 3.7
      ENH: Add multiplyWith methods to RieszRotationMatrix
      Set up CI with Azure Pipelines
      BUG: Fix wrong expected result on test of RieszRotationMatrix
```

--- Modules/Remote/IsotropicWavelets.remote.cmake
+++ Modules/Remote/IsotropicWavelets.remote.cmake
@@ -9,5 +9,5 @@
 "
   # Upstream repository was transfered from phcerdan to InsightSoftwareConsortium
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIsotropicWavelets.git
-  GIT_TAG 02e14fce040e976e31d14975eba2386cf6e38b89
+  GIT_TAG 99d527a46085af6933aac608a3934912829232df
 )


Update Flatbuffers to include CPack fix

Update Flatbuffers to include CPack fix

Flatbuffers had a problem with CPack, which has been fixed with the indicated commit. This does update flatbuffers to the latest, so there are potentially other changes being included, but the tests all seem to be passing without issue.

PiperOrigin-RevId: 301444797

--- cmake/external/flatbuffers.cmake
+++ cmake/external/flatbuffers.cmake
@@ -18,7 +18,7 @@
   return()
 endif()

-set(version c957550511689e1052059fc2cf2e43a06a24a05b)
+set(version 97ffc590e336b800d346bdf2f4876394bb353f97)

 ExternalProject_Add(
   flatbuffers


Fix conditional controlling set of C++11 flags.

"IF" statement was erroneously always evaluating to false, so that
C++11 flags were being turned off. This caused compilation to fail
on modern Mac OS X with clang.

--- cmake_modules/IMPFindC++11.cmake
+++ cmake_modules/IMPFindC++11.cmake
@@ -1,16 +1,16 @@
 if(NOT DEFINED IMP_CXX11)
 set(IMP_CXX11 1 CACHE BOOL "Whether to use C++11 if possible")
 endif()
+
+# Put flags in a cmake variable so we can set them before running compiler
+# checks (elsewhere in the build)
+set(IMP_CXX11_FLAGS "" CACHE INTERNAL "Flags to enable C++11 support" FORCE)

 if(IMP_CXX11)
 if (APPLE)
   execute_process(COMMAND uname -v OUTPUT_VARIABLE DARWIN_VERSION)
   string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
 endif()
-
-# Put flags in a cmake variable so we can set them before running compiler
-# checks (elsewhere in the build)
-set(IMP_CXX11_FLAGS "" CACHE INTERNAL "Flags to enable C++11 support" FORCE)

 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
 execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE
@@ -41,6 +41,6 @@
 endif()
 endif()

-if(DEFINED ${IMP_CXX11_FLAGS})
+if(IMP_CXX11_FLAGS)
   add_definitions(${IMP_CXX11_FLAGS})
 endif()


fix gtest download to last known good version

--- cmakemodules/DownloadGTest.cmake
+++ cmakemodules/DownloadGTest.cmake
@@ -1,6 +1,7 @@
 ExternalProject_Add(
     gtest_external
     GIT_REPOSITORY https://github.com/google/googletest
+    GIT_TAG release-1.8.0
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
     UPDATE_COMMAND ""
 )


Added most of the fixes to make this work.

--- catkin.cmake
+++ catkin.cmake
@@ -1,15 +1,17 @@
 cmake_minimum_required(VERSION 2.8.3)

+# Set up the ROS Catkin package settings.
 find_package(catkin REQUIRED)
-catkin_package(
-    INCLUDE_DIRS include/
-    LIBRARIES ${PROJECT_NAME}
-    DEPENDS OpenCV Eigen yaml-cpp
-)
+find_package(OpenCV REQUIRED)
+find_package(Eigen REQUIRED)

+# Set up the ROS Catkin package settings.
+catkin_package()
+
+# CGAL requires that -frounding-math be set.
 add_definitions(-frounding-math)

-# Download the external Swatbotics repository
+# Download the external Swatbotics repository.
 include(ExternalProject)
 ExternalProject_Add(apriltags_swatbotics_EXTERNAL
     PREFIX ${PROJECT_SOURCE_DIR}/build/apriltags
@@ -18,26 +20,30 @@
     CMAKE_ARGS -DCMAKE_CXX_FLAGS=-frounding-math -DBUILD_SHARED_LIBS:BOOL=ON
 )

-# Recover project paths for additional settings
+# Recover project paths for additional settings.
 ExternalProject_Get_Property(apriltags_swatbotics_EXTERNAL
-  SOURCE_DIR BINARY_DIR INSTALL_DIR )
+  SOURCE_DIR BINARY_DIR INSTALL_DIR)
+set(apriltags_swatbotics_INCLUDE_DIRS
+  "${SOURCE_DIR}/include"
+  CACHE INTERNAL "" FORCE
+)

-# Tell cmake that the external project generated a library so we
-# can add dependencies here instead of later
+# Tell CMake that the external project generated a library so we
+# can add dependencies here instead of later.
 add_library(apriltags_swatbotics UNKNOWN IMPORTED)
 set_property(TARGET apriltags_swatbotics
   PROPERTY IMPORTED_LOCATION
-  ${BINARY_DIR}/libapriltags.so
-  )
+  ${BINARY_DIR}/libapriltags.so)
 add_dependencies(apriltags_swatbotics apriltags_swatbotics_EXTERNAL)
-include_directories(${SOURCE_DIR})
+

 include_directories(
     include/${PROJECT_NAME}
-    ${Catkin_INCLUDE_DIRS})
+    ${catkin_INCLUDE_DIRS}
+    ${apriltags_swatbotics_INCLUDE_DIRS})

 add_executable(apriltags src/apriltags.cpp)
-target_link_libraries(apriltags ${Catkin_LIBRARIES})
+target_link_libraries(apriltags ${catkin_LIBRARIES})
 target_link_libraries(apriltags apriltags_swatbotics)

 install(TARGETS apriltags


updated libbot revision to incorporate param server bug fix

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -1,6 +1,6 @@

 set(libbot-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/libbot-drc)
-set(libbot-drc_revision 8298)
+set(libbot-drc_revision 8322)
 set(libbot-drc_depends)

 set(Eigen_pod_url https://svn.csail.mit.edu/Eigen_pod)


cmake-find-aravis: fix pkg cfg include dirs

--- cmake/modules/FindAravis.cmake
+++ cmake/modules/FindAravis.cmake
@@ -20,7 +20,7 @@
 	arv.h
 	PATHS
 	${aravis_PKGCONF_INCLUDE_DIRS}
-	${aravis0_6_PKGCONF_INCLUDE_DIRS}
+	${aravis0_8_PKGCONF_INCLUDE_DIRS}
 	/usr/local/include
 	# /usr/local/include/aravis-0.4
 	/usr/local/include/aravis-0.8


CMake: Removed unnecessary messages from msvc_llvm_config macro.

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -9,9 +9,7 @@

 macro(msvc_llvm_config executable link_components)
   foreach(c ${link_components})
-    message(STATUS ${c})
     if( c STREQUAL "jit" )
-      message(STATUS "linking jit")
       set_target_properties(${executable}
 	PROPERTIES
 	LINK_FLAGS "/INCLUDE:_X86TargetMachineModule")


Get target properties added after call to ROOT_GENERATE_DICTIONARY()

When using variables, ROOT_GENERATE_DICTIONARY() can only inherit
compile definitions and includes from library targets already linked
against the main library target, since variables are evaluated at the
time ROOT_GENERATE_DICTIONARY() is called. In order to be able to
inherit compile definitions and includes added to the library target
after the call to ROOT_GENERATE_DICTIONARY(), we must use CMake
generator expressions to retrieve the target properties later to add
them to the rootcling command line.

Fixes: ROOT-8575

--- cmake/modules/RootMacros.cmake
+++ cmake/modules/RootMacros.cmake
@@ -479,14 +479,23 @@

   if(ARG_MODULE)
     set(MODULE_LIB_DEPENDENCY ${ARG_DEPENDENCIES})
+
+    # get target properties added after call to ROOT_GENERATE_DICTIONARY()
+    if(TARGET ${ARG_MODULE})
+      set(module_incs $<TARGET_PROPERTY:${ARG_MODULE},INCLUDE_DIRECTORIES>)
+      set(module_defs $<TARGET_PROPERTY:${ARG_MODULE},COMPILE_DEFINITIONS>)
+    endif()
   endif()

   #---call rootcint------------------------------------------
   add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name} ${cpp_module_file}
                      COMMAND ${command} -v2 -f  ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
-                                        ${definitions} ${includedirs} ${ARG_OPTIONS} ${headerfiles} ${_linkdef}
+                                        ${definitions} "$<$<BOOL:${module_defs}>:-D$<JOIN:${module_defs},;-D>>"
+                                        ${includedirs} "$<$<BOOL:${module_incs}>:-I$<JOIN:${module_incs},;-I>>"
+                                        ${ARG_OPTIONS} ${headerfiles} ${_linkdef}
                      IMPLICIT_DEPENDS ${_implicitdeps}
-                     DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP} ${MODULE_LIB_DEPENDENCY})
+                     DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP} ${MODULE_LIB_DEPENDENCY}
+                     COMMAND_EXPAND_LISTS)
   get_filename_component(dictname ${dictionary} NAME)

   if(ARG_NOTARGET)


ISSUE #278 - Fix AWSSDK typo

ISSUE #278 - Fix AWSSDK typo

--- cmake_modules/FindAWSSDK.cmake
+++ cmake_modules/FindAWSSDK.cmake
@@ -22,7 +22,7 @@
 	aws-cpp-sdk-core aws-cpp-sdk-s3 aws-cpp-sdk-kms aws-cpp-sdk-s3-encryption aws-cpp-sdk-transfer
 )

-if(DEFINED ENV{AWDSDK_ROOT})
+if(DEFINED ENV{AWSSDK_ROOT})
 	set(AWSSDK_ROOT $ENV{AWSSDK_ROOT})
 	message(STATUS "$AWSSDK_ROOT defined: ${AWSSDK_ROOT}")
 	find_path(AWSSDK_INCLUDE_DIR aws


Issue #43: Main fix to build Boost.Python on Windows.

--- CMake/ExternalProjects/Boost.cmake
+++ CMake/ExternalProjects/Boost.cmake
@@ -14,6 +14,7 @@

 set(MYPROJECT_USE_Boost 1)
 set(MYPROJECT_USE_Boost_LIBRARIES ${MYPROJECT_BOOST_LIBS})
+set(MYPROJECT_BUILD_PYTHON_BINDINGS OFF)

 #-----------------------------------------------------------------------------
 # Boost
@@ -27,7 +28,7 @@
   message(FATAL_ERROR "BOOST_ROOT variable is defined but corresponds to non-existing directory")
 endif()

-set(version "1_64_0")
+set(version "1_68_0")
 set(location "${NIFTK_EP_TARBALL_LOCATION}/boost_${version}.tar.gz")
 mpMacroDefineExternalProjectVariables(Boost ${version} ${location})
 set(proj_DEPENDENCIES )
@@ -36,7 +37,7 @@

 if(NOT DEFINED BOOST_ROOT AND NOT MYPROJECT_USE_SYSTEM_Boost)

-  set(_boost_version 1_64)
+  set(_boost_version 1_68)
   set(_boost_install_include_dir include/boost)
   if(WIN32)
     set(_boost_install_include_dir include/boost-${_boost_version}/boost)
@@ -53,6 +54,9 @@
     string(REPLACE ";" "," _boost_libs "${MYPROJECT_USE_Boost_LIBRARIES}")
     foreach(_boost_lib ${MYPROJECT_USE_Boost_LIBRARIES})
       list(APPEND _with_boost_libs --with-${_boost_lib})
+	  if("${_boost_lib}" STREQUAL "python" OR "${_boost_lib}" STREQUAL "python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}")
+	    set(MYPROJECT_BUILD_PYTHON_BINDINGS ON)
+	  endif()
     endforeach()
   endif()

@@ -122,13 +126,11 @@
     endif()
   endif()

-  if(BUILD_PYTHON_BINDINGS)
-    set(_python_exec "--with-python=${PYTHON_EXECUTABLE}")
+  if(MYPROJECT_BUILD_PYTHON_BINDINGS)
     set(_python_version "--with-python-version=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
-    get_filename_component(_python_lib_dir ${PYTHON_LIBRARY} DIRECTORY)
-    get_filename_component(_python_root_dir ${_python_lib_dir} DIRECTORY)
+    get_filename_component(_python_root_dir "${PYTHON_EXECUTABLE}" DIRECTORY)
     set(_python_root "--with-python-root=${_python_root_dir}")
-    message("Building boost::python with:${_python_exec};${_python_version};${_python_root}")
+    message("Building boost::python with:${_python_version};${_python_root}")
   endif()

   set(_boost_variant "$<$<CONFIG:Debug>:debug>$<$<CONFIG:Release>:release>")
@@ -188,9 +190,8 @@
     CONFIGURE_COMMAND "<SOURCE_DIR>/bootstrap${_shell_extension}"
       --with-toolset=${_boost_with_toolset}
       --with-libraries=${_boost_libs}
-      ${_python_exec}
       ${_python_version}
-      ${_python_root}
+      "${_python_root}"
       "--prefix=<INSTALL_DIR>"
     ${_boost_build_cmd}
     INSTALL_COMMAND ${_install_cmd}


change cmake library search path to look for MagickCore library before looking for older Magick library

--- CMakeModules/FindImageMagick.cmake
+++ CMakeModules/FindImageMagick.cmake
@@ -214,7 +214,7 @@
     list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
   elseif(component STREQUAL "MagickCore")
     FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
-      Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI
+      MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI Magick
       )
     list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickCore_LIBRARY)
   else()


Fix downloading GTest occuring too late in the build process on Windows.

--- googletest.cmake
+++ googletest.cmake
@@ -53,6 +53,7 @@
   "${GTEST_LIBRARY};${CMAKE_THREAD_LIBS_INIT}")

 add_dependencies(GTest googletest)
+add_dependencies(GTestMain googletest)

 ExternalProject_Get_Property(googletest source_dir)
 include_directories(${source_dir}/include)


Update FindOrcania so it has backward compatibility with older versions

--- cmake-modules/FindOrcania.cmake
+++ cmake-modules/FindOrcania.cmake
@@ -31,8 +31,6 @@
 # License along with this library.	If not, see <http://www.gnu.org/licenses/>.
 #=============================================================================

-# Sat Jan 27 15:57:36 -03 2018
-
 find_package(PkgConfig QUIET)
 pkg_check_modules(PC_ORCANIA QUIET liborcania)

@@ -44,14 +42,22 @@
         NAMES orcania liborcania
         HINTS ${PC_ORCANIA_LIBDIR} ${PC_ORCANIA_LIBRARY_DIRS})

+set(ORCANIA_VERSION_STRING 0.0.0)
 if (PC_ORCANIA_VERSION)
     set(ORCANIA_VERSION_STRING ${PC_ORCANIA_VERSION})
 elseif (ORCANIA_INCLUDE_DIR AND EXISTS "${ORCANIA_INCLUDE_DIR}/orcania.h")
     set(regex_orcania_version "^#define[ \t]+ORCANIA_VERSION[ \t]+([^\"]+).*")
-    file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania-cfg.h" orcania_version REGEX "${regex_orcania_version}")
+    file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania.h" orcania_version REGEX "${regex_orcania_version}")
     string(REGEX REPLACE "${regex_orcania_version}" "\\1" ORCANIA_VERSION_STRING "${orcania_version}")
     unset(regex_orcania_version)
     unset(orcania_version)
+    if (NOT ORCANIA_VERSION_STRING)
+       set(regex_orcania_version "^#define[ \t]+ORCANIA_VERSION[ \t]+([^\"]+).*")
+        file(STRINGS "${ORCANIA_INCLUDE_DIR}/orcania-cfg.h" orcania_version REGEX "${regex_orcania_version}")
+        string(REGEX REPLACE "${regex_orcania_version}" "\\1" ORCANIA_VERSION_STRING "${orcania_version}")
+        unset(regex_orcania_version)
+        unset(orcania_version)
+    endif ()
 endif ()

 include(FindPackageHandleStandardArgs)
@@ -63,4 +69,5 @@
     set(ORCANIA_LIBRARIES ${ORCANIA_LIBRARY})
     set(ORCANIA_INCLUDE_DIRS ${ORCANIA_INCLUDE_DIR})
 endif ()
+
 mark_as_advanced(ORCANIA_INCLUDE_DIR ORCANIA_LIBRARY)


LINK_FLAGS

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -56,6 +56,7 @@
     # Do the dependency: ADD_SUBDIRECTORY or FIND_PACKAGE
     # ===================================================
     #
+    STRING (TOUPPER ${packageDepend} _PACKAGEDEPEND)
     IF (ALL_IN_ONE)
       GET_FILENAME_COMPONENT(packageDependSourceDirAbsolute ${packageDependSourceDir} ABSOLUTE)
       MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Adding subdirectory ${packageDependSourceDirAbsolute}")
@@ -63,8 +64,7 @@
     ELSE ()
       MESSAGE(STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Looking for ${packageDepend}")
       FIND_PACKAGE (${packageDepend})
-      STRING (TOUPPER ${packageDepend} _FINDPACKAGE)
-      IF (NOT ${_FINDPACKAGE}_FOUND)
+      IF (NOT ${_PACKAGEDEPEND}_FOUND)
         MESSAGE (FATAL_ERROR "[${PROJECT_NAME}-DEPEND-STATUS] Find ${packageDepend} failed")
       ENDIF ()
     ENDIF ()
@@ -114,7 +114,7 @@
           #
           # Include dependency
           #
-          FOREACH (_include_directory ${${packageDepend}_INCLUDE_DIRS})
+          FOREACH (_include_directory ${${_PACKAGEDEPEND}_INCLUDE_DIRS})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_include_directory} include dependency to ${_target}")
             ENDIF ()
@@ -123,7 +123,7 @@
           #
           # Library dependency
           #
-          FOREACH (_library ${${packageDepend}_LIBRARIES})
+          FOREACH (_library ${${_PACKAGEDEPEND}_LIBRARIES})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_library} library dependency to ${_target}")
             ENDIF ()
@@ -132,7 +132,7 @@
           #
           # Compile definitions
           #
-          FOREACH (_flag ${${packageDepend}_C_FLAGS_SHARED})
+          FOREACH (_flag ${${_PACKAGEDEPEND}_C_FLAGS_SHARED})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} compile definition dependency to ${_target}")
             ENDIF ()
@@ -141,7 +141,7 @@
           #
           # Link flags
           #
-          FOREACH (_flag ${${packageDepend}_C_FLAGS_SHARED})
+          FOREACH (_flag ${${_PACKAGEDEPEND}_LINK_FLAGS})
             IF (MYPACKAGE_DEBUG)
               MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Adding ${_flag} link flag dependency to ${_target}")
             ENDIF ()
@@ -169,7 +169,7 @@
     ELSE ()
       STRING(REGEX REPLACE " " "\\\\ "  _dependLibraryRuntimeDirectory "${_dependLibraryRuntimeDirectory}")
     ENDIF ()
-    SET(${_FINDPACKAGE}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}")
+    SET(${_PACKAGEDEPEND}_RUNTIME_DIRECTORY "${_dependLibraryRuntimeDirectory}")
     IF ("${_test_path}" STREQUAL "")
       MESSAGE(STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Initializing TEST_PATH with PATH")
       SET (_test_path "$ENV{PATH}" )
@@ -179,9 +179,9 @@
     ELSE ()
       SET (SEP ":")
     ENDIF ()
-    SET (_test_path "${${_FINDPACKAGE}_RUNTIME_DIRECTORY}${SEP}${_test_path}")
+    SET (_test_path "${${_PACKAGEDEPEND}_RUNTIME_DIRECTORY}${SEP}${_test_path}")
     IF (MYPACKAGE_DEBUG)
-      MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Prepended ${${_FINDPACKAGE}_RUNTIME_DIRECTORY} to TEST_PATH")
+      MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-STATUS] Prepended ${${_PACKAGEDEPEND}_RUNTIME_DIRECTORY} to TEST_PATH")
     ENDIF ()
     SET_PROPERTY(GLOBAL PROPERTY MYPACKAGE_TEST_PATH "${_test_path}")
   ENDIF ()


Set the proguard generation target to the correct variable.

The Unity build logic assumes that the target to build the proguard file is in the format FIREBASE_CPP_<LIB>_PROGUARD, so use that name.

PiperOrigin-RevId: 280775456

--- cmake/firebase_cpp_gradle.cmake
+++ cmake/firebase_cpp_gradle.cmake
@@ -51,7 +51,7 @@
                       "${${proguard_var}}")

   add_custom_target(
-    "${LIBRARY_NAME}_cpp_proguard"
+    "${proguard_var}"
     DEPENDS ${${proguard_var}}
   )
 endfunction()


Compilation on macosx (CMake)

Compilation on macosx (CMake)

--- cmake/modules/ALICEMacros.cmake
+++ cmake/modules/ALICEMacros.cmake
@@ -135,6 +135,7 @@

 Message(STATUS "Setting up system dependent parameters for ${ALICE_TARGET}" )

+# macosx64
 If(ALICE_TARGET STREQUAL macosx64)

   Execute_process(
@@ -166,8 +167,7 @@

   If(CMAKE_Fortran_COMPILER MATCHES g95)
     Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95")
-    Execute_process(COMMAND svn info $ENV{ALICE_ROOT}
-      COMMAND g95 --print-search-dirs
+    Execute_process(COMMAND g95 --print-search-dirs
       OUTPUT_VARIABLE _out)
     String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
     Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
@@ -212,6 +212,7 @@

 Endif(ALICE_TARGET STREQUAL macosx64)

+# linuxx8664gcc
 If(ALICE_TARGET STREQUAL linuxx8664gcc)

@@ -226,8 +227,7 @@

   If(CMAKE_Fortran_COMPILER MATCHES g95)
     Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95")
-    Execute_process(COMMAND svn info $ENV{ALICE_ROOT}
-      COMMAND g95 --print-search-dirs
+    Execute_process(COMMAND g95 --print-search-dirs
       OUTPUT_VARIABLE _out)
     String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
     Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
@@ -254,6 +254,58 @@
   Set(LINK_FLAGS "${LINK_FLAGS}")

 Endif(ALICE_TARGET STREQUAL linuxx8664gcc)
+
+# macosx
+If(ALICE_TARGET STREQUAL macosx)
+
+  Execute_process(
+    COMMAND sw_vers -productVersion
+    OUTPUT_VARIABLE MACOSX
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\1" MACOSX_MAJOR "${MACOSX}")
+  String(REGEX REPLACE "^(.*)[.](.*)[.](.*)$" "\\2" MACOSX_MINOR "${MACOSX}")
+
+  Message(STATUS "Mac OS X ${MACOSX_MAJOR}.${MACOSX_MINOR}")
+
+  Find_Package(fink)
+
+  Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -flat_namespace -single_module -undefined dynamic_lookup -m32")
+
+  Set(CMAKE_Fortran_FLAGS "-fno-second-underscore -m32")
+
+  Set(CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC")
+
+  Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I${FINK_ROOT}/include")
+  Set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -m32 -Wall -W -fno-common -pipe -I${FINK_ROOT}/include")
+
+  If(CMAKE_Fortran_COMPILER MATCHES g95)
+    Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95 -single_module")
+    Execute_process(COMMAND g95 --print-search-dirs
+      OUTPUT_VARIABLE _out)
+    String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
+    Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
+  Else(CMAKE_Fortran_COMPILER MATCHES g95)
+    Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DFORTRAN_GFORTRAN")
+    Execute_process(
+      COMMAND gfortran -m32 -print-file-name=libgfortran.dylib
+      OUTPUT_VARIABLE FLIB
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
+    Execute_process(
+      COMMAND gfortran -m32 -print-file-name=libgfortranbegin.a
+      OUTPUT_VARIABLE FLIB
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
+  Endif(CMAKE_Fortran_COMPILER MATCHES g95)
+
+  Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
+
+  Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
+
+  Set(LINK_FLAGS "${LINK_FLAGS} -bind_at_load -single_module")
+
+Endif(ALICE_TARGET STREQUAL macosx)

 EndMacro (SetupSystem)

@@ -737,208 +789,6 @@
 # SYSLIBS      := -lcrypt -L/usr/X11R6/lib -lX11 $(LIBNOVER) -L/usr/local/lib \
 #                 -lXt -L$(shell which ifort | sed -e 's|bin/ifort|lib|') \
 #                 -lifcore -lifport
-# ../build/Makefile.linuxx8664gcc
-# # -*- mode: makefile -*-
-# # Makefile to build AliRoot for Linux
-#
-# # System dependent commands
-#
-# XARGS = xargs -r
-#
-# # The compilers
-# CXX           = g++
-# CC	      = gcc
-# CCMAJORV      = $(shell $(CC) -dumpversion | cut -d. -f1)
-# CCMINORV      = $(shell $(CC) -dumpversion | cut -d. -f2)
-# F77	      = $(shell root-config --f77)
-#
-# # Global optimisation
-# OPT           = -O0 -g
-# NOOPT         = -g
-#
-# CXXOPT        = $(OPT)
-# CXXNOOPT      = $(NOOPT)
-# COPT	      = $(OPT)
-# FOPT	      = $(OPT)
-#
-# # CERNLIB defines
-# CLIBDEFS      = -DCERNLIB_LXIA64 -DCERNLIB_BLDLIB -DCERNLIB_CZ
-# CLIBCXXOPTS   =
-# CLIBCOPT      =
-# CLIBFOPT      = $(CLIBDEFS)
-#
-# # Compiler flags
-# ifeq ($(CCMAJORV),2)
-# CXXFLAGS       = $(OPT) -W -Wall -fPIC -pipe -m64
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -fPIC -pipe -m64
-# else
-# ifeq ($(CCMAJORV),3)
-# CXXFLAGS       = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -m64
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
-# else
-# ifeq ($(CCMAJORV),4)
-# CXXFLAGS       = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux -m64
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -m64
-# else
-# CXXFLAGS       = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux -m64
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -m64
-# endif
-# endif
-# endif
-# CFLAGS	       = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi -m64
-# FFLAGS         = $(CLIBFOPT) $(FOPT) -fno-second-underscore -fPIC -fno-f2c -m64
-#
-# ifeq (g95,$(F77))
-# FFLAGS	      +=-DFORTRAN_G95
-# else
-# ifeq (gfortran,$(F77))
-# FFLAGS	      +=-DFORTRAN_GFORTRAN
-# else
-# FFLAGS	      +=
-# endif
-# endif
-#
-# # rmkdepend flags for building dependencies of FORTRAN files
-# DEPENDFFLAGS   = $(FFLAGS)
-#
-# # rootcint flags
-# CINTFLAGS     =
-#
-# LD            = g++
-# LDFLAGS       = $(OPT)
-#
-# SHLD	      = $(LD)
-# SOFLAGS       = $(OPT) -shared -Wl
-# SOEXT 	      = so
-#
-# #System libraries
-# LIBNOVER      = `find /lib64 -name 'libNoVersion*.so' | xargs --replace basename {} .so | sed -e 's/lib64/ -l/'`
-#
-# SYSLIBS      := -ldl -lcrypt -L/usr/X11R6/lib64 -lX11  $(LIBNOVER)
-#
-# ifeq (g95,$(F77))
-# SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
-# else
-# ifeq (gfortran,$(F77))
-# SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
-# SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
-# else
-# SHLIB         = -lg2c
-# SYSLIBS +=  -lg2c
-# endif
-# endif
-#
-# ALLD	      = ar
-# ALFLAGS       = cr
-# ALLIB         =
-# AEXT 	      = a
-#
-#
-#
-#
-#
-#
-#
-#
-#
-# ../build/Makefile.macosx
-# # -*- mode: makefile -*-
-# # Makefile for AliRoot for MacOS X with gcc
-#
-# XARGS = xargs
-#
-# # OS version
-# MACOSX_MAJOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 1))
-# MACOSX_MINOR := $(strip $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2))
-#
-# # fink directories
-# FINK_ROOT := $(shell which fink | sed -e 's?/bin/fink??')
-# ifeq (,$(FINK_ROOT))
-# # No fink, build will probably fail, but we try a guess
-# FINK_ROOT=/usr/local
-# endif
-#
-# # The compilers
-# CXX           = g++
-# CC	      = gcc
-# F77	      = $(shell root-config --f77)
-#
-# # Global optimisation
-# OPT           = -O -g
-# NOOPT         = -O0 -g
-#
-# CXXOPT        = $(OPT)
-# CXXNOOPT      = $(NOOPT)
-# COPT	      = $(OPT)
-# FOPT	      = $(OPT) -fno-second-underscore
-# ifeq (g95,$(F77))
-# FOPT	     += -fbounds-check
-# endif
-#
-# # CERNLIB defines
-# CLIBDEFS      = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -DCERNLIB_PPC
-# CLIBCXXOPTS   =
-# CLIBCOPT      =
-# CLIBFOPT      = $(CLIBDEFS)
-#
-# CXXSTF        =  -pipe -Wall -W -Wno-long-double -pipe -fbounds-check -fsigned-char -fno-common -fmessage-length=0 -Woverloaded-virtual -Weffc++ -Wconversion -Wshadow -fno-default-inline -fno-inline -I/usr/X11R6/include -I$(FINK_ROOT)/include
-#
-# # Compiler flags
-# CXXFLAGS      = $(CXXOPT) $(CXXSTF)
-#
-# CXXFLAGSNO    = $(CXXNOOPT) $(CXXSTF)
-#
-# CFLAGS	      = $(COPT) -Wall -W -fno-common -pipe -I$(FINK_ROOT)/include
-#
-# FFLAGS        = $(CLIBFOPT) $(FOPT)
-# ifeq (g95,$(F77))
-# FFLAGS        += -ftrace=full
-# FFLAGS        +=-DFORTRAN_G95
-# else
-# FFLAGS        +=-DFORTRAN_GFORTRAN
-# endif
-#
-# # rmkdepend flags for building dependencies of FORTRAN files
-# DEPENDFFLAGS  = $(FFLAGS)
-#
-# # rootcint flags
-# CINTFLAGS     =
-#
-# LD            = export MACOSX_DEPLOYMENT_TARGET=$(MACOSX_MAJOR).$(MACOSX_MINOR) ; \
-# 		unset LD_PREBIND ; \
-# 		g++
-# LDFLAGS       = $(OPT) $(DICTLOAD)
-#
-# SHLD	     := $(LD)
-# SOFLAGS      := -bundle -undefined dynamic_lookup
-# SHLIB        :=
-# SOEXT 	     := so
-#
-# DYLD	     := $(LD)
-# DYFLAGS       = -dynamiclib -undefined dynamic_lookup -single_module
-# DYLIB        :=
-# DYEXT        := dylib
-#
-# ALLD	      = ar
-# ALFLAGS       = cr
-# ALLIB         =
-# AEXT 	      = a
-#
-# DEPENDCXXFLAGS = $(CXXFLAGS) -I/usr/include/sys
-#
-# SYSLIBS      := -L/usr/X11R6/lib -lX11
-#
-# EXEFLAGS     := -bind_at_load
-#
-# #System libraries
-#
-# ifeq (g95,$(F77))
-# SYSLIBS += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
-# DYLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
-# else
-# SYSLIBS += -ldl $(shell $(F77) -print-file-name=libgfortran.dylib)
-# SYSLIBS += $(shell $(F77) -print-file-name=libgfortranbegin.a)
-# endif
 # ../build/Makefile.macosxicc
 # # -*- mode: makefile -*-
 # # Makefile for AliRoot for MacOS X with gcc


search also for Pythia8.

search also for Pythia8.

git-svn-id: acec3fd5b7ea1eb9e79d6329d318e8118ee2e14f@44235 27541ba8-7e3a-0410-8455-c3a389f83636

--- cmake/modules/FindPythia8.cmake
+++ cmake/modules/FindPythia8.cmake
@@ -17,7 +17,7 @@
   DOC "Specify the directory containing Pythia.h."
 )

-find_library(PYTHIA8_LIBRARY NAMES libPythia8 PATHS
+find_library(PYTHIA8_LIBRARY NAMES Pythia8 libPythia8 PATHS
   $ENV{PYTHIA8_DIR}/lib
   /opt/pythia8/lib
   /usr/local/lib


[BUILD] reverse 920d338ac1ef9d294a34249de33b02fafeed57e7 partially

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -134,8 +134,6 @@
 # Create the payload binary ZIP file.
 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
   set (SEQAN_PLATFORM "lnx")
-elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSd")
-  set (SEQAN_PLATFORM "lnx")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
   set (SEQAN_PLATFORM "win")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")


[NOP] cosmetic correction

[NOP] cosmetic correction

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -134,7 +134,7 @@
 # Create the payload binary ZIP file.
 if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
   set (SEQAN_PLATFORM "lnx")
-elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSd")
+elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
   set (SEQAN_PLATFORM "lnx")
 elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
   set (SEQAN_PLATFORM "win")


Patch 2651453: MACRO_DISPLAY_FEATURE_LOG should write dependency failure report as FATAL_ERROR, not STATUS to ensure it is displayed in ccmake

--- CMake/Utils/MacroLogFeature.cmake
+++ CMake/Utils/MacroLogFeature.cmake
@@ -88,7 +88,7 @@
    SET(_file ${CMAKE_BINARY_DIR}/MissingRequirements.txt)
    IF (EXISTS ${_file})
       FILE(READ ${_file} _requirements)
-      MESSAGE(STATUS "\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- Please install them before continuing this software installation.\n-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>\n-----------------------------------------------------------------------------\n${_requirements}-----------------------------------------------------------------------------")
+      MESSAGE(FATAL_ERROR "\n-----------------------------------------------------------------------------\n-- The following REQUIRED packages could NOT be located on your system.\n-- Please install them before continuing this software installation.\n-- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to dependencies>\n-----------------------------------------------------------------------------\n${_requirements}-----------------------------------------------------------------------------")
       FILE(REMOVE ${_file})
       MESSAGE(FATAL_ERROR "Exiting: Missing Requirements")
    ENDIF (EXISTS ${_file})


iox-#433 fix c&p mistake

iox-#433 fix c&p mistake

Signed-off-by: Dietrich Krönke <ea45bc0219d3b6c3a6b9cf3abdfa172e6bfa16ff@apex.ai>

--- iceoryx_meta/build_options.cmake
+++ iceoryx_meta/build_options.cmake
@@ -68,7 +68,7 @@
 message("          BINDING_C............................: " ${BINDING_C})
 message("          COVERAGE.............................: " ${COVERAGE})
 message("          SANITIZE.............................: " ${SANITIZE})
-message("          CLANG_TIDY...........................: " ${BINDING_C})
+message("          CLANG_TIDY...........................: " ${CLANG_TIDY})
 message("          ROUDI_ENVIRONMENT....................: " ${ROUDI_ENVIRONMENT})
 message("          CMAKE_EXPORT_COMPILE_COMMANDS........: " ${CMAKE_EXPORT_COMPILE_COMMANDS})
 message("          ONE_TO_MANY_ONLY ....................: " ${ONE_TO_MANY_ONLY})


follow ros_unit -> rosunit name change

follow ros_unit -> rosunit name change

--- core/rosbuild/private.cmake
+++ core/rosbuild/private.cmake
@@ -123,7 +123,7 @@
 # helper function to register check that results were generated (#580)
 macro(_rosbuild_check_rostest_xml_result test_name test_file)
   add_custom_target(${test_name}_result
-                    COMMAND ${ros_unit_path}/bin/rostest-check-results ${test_file}
+                    COMMAND ${rosunit_path}/bin/rostest-check-results ${test_file}
 		    VERBATIM)
   # Redeclaration of target is to workaround bug in 2.4.6
   if(CMAKE_MINOR_VERSION LESS 6)
@@ -185,7 +185,7 @@
 # arguments as cmake doesn't know the name of the output file
 macro(_rosbuild_check_rostest_result test_name test_pkg test_file)
   add_custom_target(${test_name}_result
-                    COMMAND ${ros_unit_path}/bin/rostest-check-results --rostest ${test_pkg} ${test_file}
+                    COMMAND ${rosunit_path}/bin/rostest-check-results --rostest ${test_pkg} ${test_file}
                     WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
 		    VERBATIM)
   # Redeclaration of target is to workaround bug in 2.4.6
@@ -289,7 +289,7 @@

   # Create target for this test
   add_custom_target(roslaunch_check_${_testname}
-                    COMMAND ${ros_unit_path}/bin/roslaunch-check.py ${file} ${ARGN}
+                    COMMAND ${rosunit_path}/bin/roslaunch-check.py ${file} ${ARGN}
                     DEPENDS ${file}
                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
                     VERBATIM)


Added Ubuntu 32 possible location for libbz2 library.

--- Prototype/CMake/FindLIBBZIP2.cmake
+++ Prototype/CMake/FindLIBBZIP2.cmake
@@ -9,6 +9,7 @@
   NAMES libbz2.so libbz2
   PATHS /lib/x86_64-linux-gnu/
         /usr/lib/x86_64-linux-gnu/
+        /usr/lib/i386-linux-gnu/
         /usr/lib/
         /usr/lib64/
         /usr/local/lib/ )


bump version to 0.5.3

bump version to 0.5.3

--- src/CPackConfig.cmake
+++ src/CPackConfig.cmake
@@ -4,7 +4,7 @@

 set(CPACK_PACKAGE_VERSION_MAJOR "0")
 set(CPACK_PACKAGE_VERSION_MINOR "5")
-set(CPACK_PACKAGE_VERSION_PATCH "2")
+set(CPACK_PACKAGE_VERSION_PATCH "3")
 set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "libes")


FIRE-6108 Better fix. Add missing if statment for standalone. Nicky and Techwolf agree this is a better fix.

--- indra/cmake/WebKitLibPlugin.cmake
+++ indra/cmake/WebKitLibPlugin.cmake
@@ -57,34 +57,33 @@
         debug ${ARCH_PREBUILT_DIRS_RELEASE}/libllqtwebkit.dylib
         )
 elseif (LINUX)
-    set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
+    # FIRE-6108, add missing if clause for standalone builds - TL
+    if (STANDALONE)
+      set(WEBKIT_PLUGIN_LIBRARIES ${LLQTWEBKIT_LIBRARY} ${QT_LIBRARIES} ${QT_PLUGIN_LIBRARIES})
+    else (STANDALONE)
+      set(WEBKIT_PLUGIN_LIBRARIES
+          llqtwebkit
+#          qico
+#          qpng
+#          qtiff
+#          qsvg
+#          QtSvg
+          QtWebKit
+          QtOpenGL
+          QtNetwork
+          QtGui
+          QtCore
+          qgif
+          qjpeg
+          jpeg
+          fontconfig
+          X11
+          Xrender
+          GL

-    if( STANDALONE )
-     link_directories (${QT_PLUGINS_DIR}/imageformats)
-    endif( STANDALONE )
-
-    set(WEBKIT_PLUGIN_LIBRARIES
-        llqtwebkit
-#        qico
-#        qpng
-#        qtiff
-#        qsvg
-#        QtSvg
-        QtWebKit
-        QtOpenGL
-        QtNetwork
-        QtGui
-        QtCore
-        qgif
-        qjpeg
-        jpeg
-        fontconfig
-        X11
-        Xrender
-        GL
-
-#        sqlite3
-#        Xi
-#        SM
-        )
+#          sqlite3
+#          Xi
+#          SM
+          )
+    endif (STANDALONE)
 endif (WINDOWS)


Small update to try and improve go builds

--- golang.cmake
+++ golang.cmake
@@ -39,6 +39,7 @@
   add_custom_target(${GO_EXECUTABLE_TARGET}  COMMAND GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build
     -o "${CMAKE_CURRENT_BINARY_DIR}/${GO_EXECUTABLE_NAME}"
     ${CMAKE_GO_FLAGS} ${GO_EXECUTABLE_SOURCE_FILES}
+    BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/${GO_EXECUTABLE_NAME}"
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

 endfunction()
@@ -71,6 +72,7 @@
   add_custom_target(${GO_LIBRARY_TARGET} COMMAND GOPATH=${GOPATH} ${CMAKE_Go_COMPILER} build ${BUILD_MODE}
     -o "${CMAKE_CURRENT_BINARY_DIR}/${GO_LIBRARY_NAME}"
     ${CMAKE_GO_FLAGS} ${GO_LIBRARY_SOURCE_FILES}
+    BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/${GO_LIBRARY_NAME}"
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

 endfunction()


check header file sys/stat.h

check header file sys/stat.h

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -9,6 +9,7 @@
 CHECK_INCLUDE_FILE(inttypes.h HAVE_INTTYPES_H)
 CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
 CHECK_INCLUDE_FILE(sys/types.h HAVE_SYS_TYPES_H)
+CHECK_INCLUDE_FILE(sys/stat.h HAVE_SYS_STAT_H)
 CHECK_INCLUDE_FILE(stddef.h HAVE_STDDEF_H)

 ##################################################
@@ -35,8 +36,6 @@
 SET(Boost_ADDITIONAL_VERSIONS 1.39 1.39.0 1.38 1.38.0 1.37 1.37.0)
 # find unit_test_framework in boost >= 1.35, it's optional and only
 # used in unit testcases
-FIND_PACKAGE(Boost 1.35.0 COMPONENTS unit_test_framework)
-# require header only libraries >= 1.35
 FIND_PACKAGE(Boost 1.35.0 REQUIRED)

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


Bump to 1.7.20

Bump to 1.7.20

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "19")
+SET(LIBREPO_PATCH "20")


add dummy doc target if doxygen isn't present

git-svn-id: 3ef4bb4dec2de51c42b9a36baf513ccf765ad251@104 e775cfb5-b74b-0410-aad5-5bebe4a96390

--- YAJLDoc.cmake
+++ YAJLDoc.cmake
@@ -19,4 +19,8 @@

 ELSE (doxygenPath)
   MESSAGE("!! doxygen not found, not generating documentation")
+  ADD_CUSTOM_TARGET(
+    doc
+    echo doxygen not installed, not generating documentation
+  )
 ENDIF (doxygenPath)


Build: allow building against macOS' system uuid.h

There is no libuuid to link against, as the implementation is included in libSystem.B.dylib

--- Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake
+++ Microsoft.WindowsAzure.Storage/cmake/Modules/FindUUID.cmake
@@ -63,6 +63,12 @@
       /usr/freeware/lib64
   )

+  if (APPLE)
+    if (NOT UUID_LIBRARY)
+      set(UUID_LIBRARY  "")
+    endif (NOT UUID_LIBRARY)
+  endif (APPLE)
+
   find_library(UUID_LIBRARY_DEBUG
     NAMES
       uuidd
@@ -88,9 +94,9 @@
   set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
   set(UUID_LIBRARIES ${UUID_LIBRARY})

-  if (UUID_INCLUDE_DIRS AND UUID_LIBRARIES)
+  if (UUID_INCLUDE_DIRS AND (APPLE OR UUID_LIBRARIES))
      set(UUID_FOUND TRUE)
-  endif (UUID_INCLUDE_DIRS AND UUID_LIBRARIES)
+  endif (UUID_INCLUDE_DIRS AND (APPLE OR UUID_LIBRARIES))

   if (UUID_FOUND)
     if (NOT UUID_FIND_QUIETLY)


update openssl builder

update openssl builder

--- 3rd_party/openssl/openssl.cmake
+++ 3rd_party/openssl/openssl.cmake
@@ -9,7 +9,8 @@

 set (3RD_PARTY_OPENSSL_PKG_DIR "${3RD_PARTY_OPENSSL_BASE_DIR}/pkg")

-set (3RD_PARTY_OPENSSL_DEFAULT_VERSION "1.1.1e")
+set (3RD_PARTY_OPENSSL_DEFAULT_VERSION "1.1.1f")
+set (3RD_PARTY_OPENSSL_GITHUB_TAG "OpenSSL_1_1_1f")
 set (3RD_PARTY_OPENSSL_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/prebuilt/${PROJECT_PREBUILT_PLATFORM_NAME}")
 # "no-hw"
 set (3RD_PARTY_OPENSSL_BUILD_OPTIONS "--prefix=${3RD_PARTY_OPENSSL_ROOT_DIR}" "--openssldir=${3RD_PARTY_OPENSSL_ROOT_DIR}/ssl"
@@ -88,15 +89,14 @@
     unset(OPENSSL_SSL_LIBRARIES CACHE)
     unset(OPENSSL_LIBRARIES CACHE)
     unset(OPENSSL_VERSION CACHE)
-    if (NOT EXISTS "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}")
-        if (NOT EXISTS "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}.tar.gz")
-            FindConfigurePackageDownloadFile("https://www.openssl.org/source/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}.tar.gz" "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}.tar.gz")
-        endif ()
-
-        execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}.tar.gz"
-            WORKING_DIRECTORY ${3RD_PARTY_OPENSSL_PKG_DIR}
-        )
-    endif ()
+
+    project_git_clone_3rd_party(
+        URL "https://github.com/openssl/openssl.git"
+        REPO_DIRECTORY "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}"
+        DEPTH 200
+        TAG ${3RD_PARTY_OPENSSL_GITHUB_TAG}
+        WORKING_DIRECTORY ${3RD_PARTY_OPENSSL_PKG_DIR}
+    )

     if (NOT EXISTS "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}")
         EchoWithColor(COLOR RED "-- Dependency: Build openssl failed")


Updated former mitdrc git URLs in externals

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -2,7 +2,7 @@
 set(lcm_pod_revision c43ae7d)
 set(lcm_pod_depends)

-set(libbot_url https://github.com/mitdrc/libbot.git)
+set(libbot_url https://github.com/openhumanoids/libbot.git)
 set(libbot_revision eb61f9bed5df654ffb0ce47ce44ca3d379a6e6e8)
 set(libbot_depends)

@@ -10,11 +10,11 @@
 set(Eigen_pod_revision 3ec6bbfcb41a9ea74921720d62f86863fdf96217)
 set(Eigen_pod_depends)

-set(opencv-pod_url https://github.com/mitdrc/opencv-pod.git)
+set(opencv-pod_url https://github.com/openhumanoids/opencv-pod.git)
 set(opencv-pod_revision 7f4c81676f887ee64da446f1ba61a3e5ed80f879)
 set(opencv-pod_depends Eigen_pod)

-set(flann-pod_url https://github.com/mitdrc/flann-pod.git)
+set(flann-pod_url https://github.com/openhumanoids/flann-pod.git)
 set(flann-pod_revision 9619e03a1d1f8b4b27d370810b9b2ccfe00adf58)
 set(flann-pod_depends)

@@ -28,27 +28,27 @@
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
   )

-set(octomap-pod_url https://github.com/mitdrc/octomap-pod.git)
+set(octomap-pod_url https://github.com/openhumanoids/octomap-pod.git)
 set(octomap-pod_revision 590b430dfe9f949118fdd618b620d82d84eb0162)
 set(octomap-pod_depends)

-set(occ-map_url https://github.com/mitdrc/occ-map.git)
+set(occ-map_url https://github.com/openhumanoids/occ-map.git)
 set(occ-map_revision 34ab71fa693216d2c0508f0f2680b9a68994f473)
 set(occ-map_depends libbot opencv-pod)

-set(common_utils_url https://github.com/mitdrc/common_utils.git)
+set(common_utils_url https://github.com/openhumanoids/common_utils.git)
 set(common_utils_revision 7fc252e3b1baf8ec6a19ee812ae114e8ee460dbd)
 set(common_utils_depends Eigen_pod libbot occ-map octomap-pod)

-set(frsm_url ssh://git@github.com/mitdrc/frsm.git)
+set(frsm_url ssh://git@github.com/openhumanoids/frsm.git)
 set(frsm_revision bbf1d83023ae35ecf595c93e46b8601206be9e9b)
 set(frsm_depends libbot)

-set(kinect_url https://github.com/mitdrc/kinect.git)
+set(kinect_url https://github.com/openhumanoids/kinect.git)
 set(kinect_revision 1b7c944c08ba4e3a488298d1cdbf6f8485fb015e)
 set(kinect_depends libbot)

-set(microstrain_url https://github.com/mitdrc/microstrain.git)
+set(microstrain_url https://github.com/openhumanoids/microstrain.git)
 set(microstrain_revision 93f4582491f0cfec1c658ed3fb84ae84a13bc6c2)
 set(microstrain_depends common_utils)

@@ -60,11 +60,11 @@
 set(fovis_revision ee2fe6593ed9e7e5ce2b2f6f1c64b627da119090)
 set(fovis_depends libbot kinect)

-set(estimate-pose_url https://github.com/mitdrc/estimate-pose.git)
+set(estimate-pose_url https://github.com/openhumanoids/estimate-pose.git)
 set(estimate-pose_revision e24a46af00c46116b76f69ff0f20923e60daa519)
 set(estimate-pose_depends fovis)

-set(vicon_url https://github.com/mitdrc/vicon.git)
+set(vicon_url https://github.com/openhumanoids/vicon.git)
 set(vicon_revision 867d2f1192ad37b2c37ad3d7611e40ef27ff349d)
 set(vicon_depends libbot)

@@ -85,7 +85,7 @@
 set(gurobi_environment_args GUROBI_DISTRO=${CMAKE_CURRENT_SOURCE_DIR}/cmake/gurobi5.6.2_linux64.tar.gz)
 set(gurobi_depends)

-set(iris_url ssh://git@github.com/mitdrc/iris-distro.git)
+set(iris_url ssh://git@github.com/openhumanoids/iris-distro.git)
 set(iris_revision 1499f62a582682d66a6ee14e04cf68dbbf625fdb)
 set(iris_depends)

@@ -97,7 +97,7 @@
 set(pypolyhedron_revision 1f110addf89398f62644830bf69a69930db8c4d0)
 set(pypolyhedron_depends)

-set(kinematics-utils_url ssh://git@github.com/mitdrc/kinematics-utils.git)
+set(kinematics-utils_url ssh://git@github.com/ipab-slmc/kinematics-utils.git)
 set(kinematics-utils_revision 062e36b056eaa0b5ddc38ed7c738999b9bb5831b)
 set(kinematics-utils_depends Eigen_pod)

@@ -111,7 +111,7 @@
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
   )

-set(multisense-lcm_url http://github.com/mitdrc/multisense-lcm.git)
+set(multisense-lcm_url http://github.com/openhumanoids/multisense-lcm.git)
 set(multisense-lcm_revision b05368f47219642fdebe06f93fe8193f740ed34f)
 set(multisense-lcm_depends libmultisense)


improved cmake hook system

improved cmake hook system

--- src/cmake/utils.cmake
+++ src/cmake/utils.cmake
@@ -29,6 +29,17 @@
 #
 MACRO(AZTH_SET_GLOBAL name val)
   set_property ( GLOBAL PROPERTY ${name} ${val})
+  # after set , create the variable for current scope
+  AZTH_GET_GLOBAL(${name})
+ENDMACRO()
+
+MACRO(AZTH_ADD_GLOBAL name val)
+  AZTH_GET_GLOBAL(${name})
+
+  set_property ( GLOBAL PROPERTY ${name}
+      ${val}
+      ${${name}}
+  )
   # after set , create the variable for current scope
   AZTH_GET_GLOBAL(${name})
 ENDMACRO()
@@ -99,7 +110,12 @@
     AZTH_SET_GLOBAL("AZTH_CORE_TGS" "${AZTH_CORE_TGS}")
 ENDMACRO()

+MACRO(ADD_HOOK hook_name value)
+  AZTH_ADD_GLOBAL(${hook_name} "${value}")
+ENDMACRO()
+
 MACRO(RUN_HOOK hook_name)
+  AZTH_GET_GLOBAL(${hook_name})
   message("Running cmake hook: ${hook_name}")
   if (${hook_name})
       set(HOOK_ARRAY ${${hook_name}})


Revert addition of libpath env (should be set by HC12_LIB_SEARCH_DIR)

--- toolchain/Platform/Freescale-chc12.cmake
+++ toolchain/Platform/Freescale-chc12.cmake
@@ -145,7 +145,7 @@
 #
 # C compiler.
 #
-SET (CMAKE_C_FLAGS_INIT 							"${CMAKE_C_FLAGS_INIT} -ViewHidden -Cc -NoEnv -NoBeep -WOutFileOn -WmsgNu=abcde -Env\"LIBPATH=$ENV{LIBPATH}\"")
+SET (CMAKE_C_FLAGS_INIT 							"${CMAKE_C_FLAGS_INIT} -ViewHidden -Cc -NoEnv -NoBeep -WOutFileOn -WmsgNu=abcde")
 SET (CMAKE_C_FLAGS_DEBUG_INIT 						"")
 SET (CMAKE_C_FLAGS_MINSIZEREL_INIT 					"")
 SET (CMAKE_C_FLAGS_RELEASE_INIT 					"")


Fix cmake statement in glbinding build script

--- CMakeModules/build_glbinding.cmake
+++ CMakeModules/build_glbinding.cmake
@@ -3,7 +3,7 @@
 SET(prefix ${PROJECT_BINARY_DIR}/third_party/glb)

 SET(LIB_POSTFIX "")
-IF (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+IF (${CMAKE_BUILD_TYPE} MATCHES DEBUG)
     SET(LIB_POSTFIX "d")
 ENDIF()


Support multiple repos per package

Support multiple repos per package

--- find.cmake
+++ find.cmake
@@ -27,13 +27,7 @@
         get_filename_component(_packageName ${_packageInfo} NAME)
         string(REPLACE ".meta" "" _packageName ${_packageName})
         vpm_trace("Mapping ${_packageName} to ${_name} repo")
-        # TODO: Read variant info (could defer until fetch to minimize processing)
-        #       By reading here, could allow different variants of same package to exist in different repos
-        if(DEFINED VPM_PACKAGE_${_packageName}_REPO)
-          message(WARNING "Failed to map ${_packageName} to ${_name} repo. Already mapped to ${VPM_PACKAGE_${_packageName}_REPO}")
-        else()
-          set(VPM_PACKAGE_${_packageName}_REPO ${_name})
-        endif()
+        list(APPEND VPM_PACKAGE_${_packageName}_REPOS ${_name})
       endforeach()
     else()
       message(WARNING "Multiple fetch commands, ignoring repo: ${_repo}")
@@ -59,27 +53,28 @@
     message(STATUS "Making directory ${_root}/${_name}")
     file(MAKE_DIRECTORY "${_root}/${_name}")
   endif()
-  if(NOT DEFINED VPM_PACKAGE_${_name}_REPO)
+  if(NOT DEFINED VPM_PACKAGE_${_name}_REPOS)
     message(FATAL_ERROR "No repository defined for ${_name}")
   endif()
-  set(_repo ${VPM_PACKAGE_${_name}_REPO})
-  set(_cmd ${VPM_REPO_${_repo}_FETCHCMD})
-  vpm_trace("Fetch cmd: ${_cmd}")
-  string(REPLACE "<name>" ${_name} _cmd ${_cmd})
-  string(REPLACE "<version>" ${_version} _cmd ${_cmd})
-  string(REPLACE "<variant>" "${_variant}" _cmd ${_cmd})
-  string(REPLACE "<dashvar>" "${_dashvar}" _cmd ${_cmd})
-  string(REPLACE "<slashvar>" "${_slashvar}" _cmd ${_cmd})
-  string(REPLACE "<destination>" ${_destination} _cmd ${_cmd})
-  message(STATUS "Downloading '${_name}' version '${_version}${_dashvar}' from '${_repo}' (${_cmd})")
-  string(REPLACE " " ";" _cmd ${_cmd})
-  execute_process(
-    COMMAND ${_cmd}
-    RESULT_VARIABLE _result)
-  if(${_result} EQUAL 0)
-    set(${_outDir} ${_destination} PARENT_SCOPE)
-    return()
-  endif()
+  foreach(_repo ${VPM_PACKAGE_${_name}_REPOS})
+    set(_cmd ${VPM_REPO_${_repo}_FETCHCMD})
+    vpm_trace("Fetch cmd: ${_cmd}")
+    string(REPLACE "<name>" ${_name} _cmd ${_cmd})
+    string(REPLACE "<version>" ${_version} _cmd ${_cmd})
+    string(REPLACE "<variant>" "${_variant}" _cmd ${_cmd})
+    string(REPLACE "<dashvar>" "${_dashvar}" _cmd ${_cmd})
+    string(REPLACE "<slashvar>" "${_slashvar}" _cmd ${_cmd})
+    string(REPLACE "<destination>" ${_destination} _cmd ${_cmd})
+    message(STATUS "Downloading '${_name}' version '${_version}${_dashvar}' from '${_repo}' (${_cmd})")
+    string(REPLACE " " ";" _cmd ${_cmd})
+    execute_process(
+      COMMAND ${_cmd}
+      RESULT_VARIABLE _result)
+    if(${_result} EQUAL 0)
+      set(${_outDir} ${_destination} PARENT_SCOPE)
+      return()
+    endif()
+  endforeach()
   message(FATAL_ERROR "Failed to download package '${_name}' version '${_version}${_dashvar}'")
 endfunction()