new boost.cmake file to fix problems on OSX

--- cmake/boost.cmake
+++ cmake/boost.cmake
@@ -1,7 +1,38 @@
 set(Boost_USE_MULTITHREADED ON)
-set(BOOST_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/strus")
-set(BOOST_LIBRARYDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus")

+# Some libraries need in different version in a multithreaded context on OSX and Windows. The multithreaded version has a defined name suffix.
+# Define a gloval variable for the suffix to use in such a case:
+if( APPLE OR WIN32 )
+set( MT_SUFFIX  "-mt" )
+else( APPLE OR WIN32 )
+set( MT_SUFFIX  "" )
+endif( APPLE OR WIN32 )
+
+# Initialize lists of components and libraries
+set( Boost_LIBRARIES  "" )
+set( Boost_COMPONENTS  "" )
+
+# Function to declare a library to use and its corresponding component name for finding it in case of a boost library:
+FUNCTION( boost_library  compname  _suffix )
+if( "${compname}" MATCHES  "boost_(.+)" )
+set( Boost_COMPONENTS ${Boost_COMPONENTS} "${CMAKE_MATCH_1}${_suffix}" PARENT_SCOPE )
+endif( "${compname}" MATCHES  "boost_(.+)" )
+set( Boost_LIBRARIES  ${Boost_LIBRARIES}  "${compname}${_suffix}"  PARENT_SCOPE )
+ENDFUNCTION( boost_library compname )
+
+# Declare components:
+boost_library( boost_thread  "${MT_SUFFIX}" )
+boost_library( pthread "" )
+boost_library( boost_chrono  "${MT_SUFFIX}" )
+boost_library( boost_system  "" )
+boost_library( boost_date_time  "" )
+boost_library( boost_atomic  "${MT_SUFFIX}" )
+if( NOT HAS_CXX11_REGEX )
+message( STATUS "Has C++ std::regex, don't use boost regex" )
+boost_library( boost_regex  "" )
+endif( NOT HAS_CXX11_REGEX )
+
+# Declare or try lookup the installation path of boost:
 if( BOOST_ROOT )
 MESSAGE( STATUS "Boost root set: '${BOOST_ROOT}' " )
 set( BOOST_INSTALL_PATH ${BOOST_ROOT} )
@@ -24,22 +55,10 @@
 MESSAGE( STATUS "Boost installation path: '${BOOST_INSTALL_PATH}' " )
 set( Boost_LIBRARY_DIRS "${BOOST_INSTALL_PATH}/lib" )
 set( Boost_INCLUDE_DIRS "${BOOST_INSTALL_PATH}/include" )
-if (APPLE)
-if (HAS_CXX11_REGEX)
-set( Boost_LIBRARIES boost_thread-mt boost_chrono-mt boost_system-mt boost_date_time-mt boost_atomic-mt )
-else (HAS_CXX11_REGEX)
-set( Boost_LIBRARIES boost_thread-mt boost_chrono-mt boost_system-mt boost_date_time-mt boost_atomic-mt boost_regex-mt )
-endif (HAS_CXX11_REGEX)
-else( APPLE)
-if (HAS_CXX11_REGEX)
-set( Boost_LIBRARIES boost_thread pthread boost_chrono boost_system boost_date_time boost_atomic )
-else (HAS_CXX11_REGEX)
-set( Boost_LIBRARIES boost_thread pthread boost_chrono boost_system boost_date_time boost_atomic boost_regex )
-endif (HAS_CXX11_REGEX)
-endif( APPLE)

 else( BOOST_INSTALL_PATH )

+# If no boost installation path declared then use the cmake standard module for boost to find the package and to resolve the paths:
 if( BOOST_ROOT )
 MESSAGE( STATUS "Search for Boost in BOOST_ROOT=${BOOST_ROOT}" )
 find_package( Boost 1.57.0 COMPONENTS atomic QUIET HINTS "${BOOST_ROOT}" )
@@ -47,45 +66,19 @@
 MESSAGE( STATUS "Search for Boost ..." )
 find_package( Boost 1.57.0 COMPONENTS atomic QUIET)
 endif( BOOST_ROOT )
+
 if( Boost_ATOMIC_FOUND )
-	if( APPLE OR WIN32 )
-		if( HAS_CXX11_REGEX )
-			message( STATUS "Has C++ std::regex, don't use boost regex" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread-mt system date_time atomic-mt )
-		else ( HAS_CXX11_REGEX )
-			message( STATUS "No C++ std::regex, use boost regex instead" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread-mt system date_time atomic-mt regex )
-		endif( HAS_CXX11_REGEX )
-	else( APPLE OR WIN32 )
-		if( HAS_CXX11_REGEX )
-			message( STATUS "Has C++ std::regex, don't use boost regex" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread system date_time atomic )
-		else ( HAS_CXX11_REGEX )
-			message( STATUS "No C++ std::regex, use boost regex instead" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread system date_time atomic regex )
-		endif( HAS_CXX11_REGEX )
-	endif( APPLE OR WIN32 )
+        MESSAGE( STATUS "Found boost installation, search now for required packages ..." )
+	find_package( Boost 1.57.0 REQUIRED COMPONENTS ${Boost_COMPONENTS} )
 else( Boost_ATOMIC_FOUND )
-	if( APPLE OR WIN32 )
-		if( HAS_CXX11_REGEX )
-			message( STATUS "Has C++ std::regex, don't use boost regex" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread-mt system date_time )
-		else ( HAS_CXX11_REGEX )
-			message( STATUS "No C++ std::regex, use boost regex instead" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread-mt system date_time regex )
-		endif( HAS_CXX11_REGEX )
-	else( APPLE OR WIN32 )
-		if( HAS_CXX11_REGEX )
-			message( STATUS "Has C++ std::regex, don't use boost regex" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread system date_time )
-		else ( HAS_CXX11_REGEX )
-			message( STATUS "No C++ std::regex, use boost regex instead" )
-			find_package( Boost 1.57.0 REQUIRED COMPONENTS thread system date_time regex )
-		endif( HAS_CXX11_REGEX )
-	endif( APPLE OR WIN32 )
+        MESSAGE( WARNING "No boost installation found !" )
 endif( Boost_ATOMIC_FOUND )
+
 endif( BOOST_INSTALL_PATH )

+# Report initializations for using boost:
+MESSAGE( STATUS "Boost components: ${Boost_COMPONENTS}" )
 MESSAGE( STATUS "Boost includes: ${Boost_INCLUDE_DIRS}" )
 MESSAGE( STATUS "Boost library directories: ${Boost_LIBRARY_DIRS}" )
 MESSAGE( STATUS "Boost libraries: ${Boost_LIBRARIES}" )
+


Add add_nosetests(), and do general test cleanup.  Next is add_rostest().

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -12,12 +12,9 @@
   set(rosunit_path ${CMAKE_SOURCE_DIR}/ros/tools/rosunit)

   if(NOT TARGET clean-test-results)
-    # Clean out previous test results before running tests.  Use bash
-    # conditional to ignore failures (most often happens when a stale NFS
-    # handle lingers in the test results directory), because CMake doesn't
-    # seem to be able to do it.
+    # Clean out previous test results before running tests.
     add_custom_target(clean-test-results
-      COMMAND /bin/rm -rf ${CMAKE_BINARY_DIR}/test_results
+      COMMAND cmake -E remove_directory ${CMAKE_BINARY_DIR}/test_results
       )

     # Make the tests target depend on clean-test-results, which will ensure
@@ -38,6 +35,7 @@
     # Write out the directory that we'll use as CWD later when running
     # tests
     file(APPEND ${cachefile} "${PROJECT_SOURCE_DIR}\n")
+    set(${PROJECT_NAME}_CACHE TRUE)
     set(${PROJECT_NAME}_CACHE TRUE PARENT_SCOPE)
     # One test target per project
     add_custom_target(${PROJECT_NAME}_run_tests
@@ -55,39 +53,53 @@
 endmacro()

 function(add_pyunit file)
+  # Check that we can find rosunit
+  find_program(rosunit_exe rosunit)
+  if(NOT rosunit_exe)
+    message(FATAL_ERROR "Can't find rosunit executable")
+  endif()
+
   # Look for optional TIMEOUT argument, #2645
   parse_arguments(_pyunit "TIMEOUT" "" ${ARGN})
   if(NOT _pyunit_TIMEOUT)
     set(_pyunit_TIMEOUT 60.0)
-  endif(NOT _pyunit_TIMEOUT)
+  endif()

   # Check that the file exists, #1621
   set(_file_name _file_name-NOTFOUND)
-  find_file(_file_name ${file} ${PROJECT_SOURCE_DIR})
+  find_file(_file_name ${file}
+            PATHS ${CMAKE_CURRENT_SOURCE_DIR}
+            NO_DEFAULT_PATH)
   if(NOT _file_name)
     message(FATAL_ERROR "Can't find pyunit file \"${file}\"")
-  endif(NOT _file_name)
+  endif()

   # We look for ROS_TEST_COVERAGE=1
   # to indicate that coverage reports are being requested.
   if("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")
     set(_covarg "--cov")
-  else("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")
+  else()
     set(_covarg)
-  endif("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")
+  endif()

   # Create a legal test name, in case the target name has slashes in it
   string(REPLACE "/" "_" _testname ${file})
   # We use rostest to call the executable to get process control, #1629
-  append_test_to_cache(catkin-tests "${rosunit_path}/scripts/rosunit --name=${_testname} --time-limit=${_pyunit_TIMEOUT} --package=${PROJECT_NAME} -- ${_file_name} ${_covarg}")
-endfunction(add_pyunit)
+  append_test_to_cache(catkin-tests "${rosunit_exe} --name=${_testname} --time-limit=${_pyunit_TIMEOUT} --package=${PROJECT_NAME} -- ${_file_name} ${_covarg}")
+endfunction()

 function(add_gtest exe)
+  # Check that we can find rosunit
+  find_program(rosunit_exe rosunit)
+  if(NOT rosunit_exe)
+    message(FATAL_ERROR "Can't find rosunit executable")
+  endif()
+
   # Look for optional TIMEOUT argument, #2645
   parse_arguments(_gtest "TIMEOUT" "" ${ARGN})
   if(NOT _gtest_TIMEOUT)
     set(_gtest_TIMEOUT 60.0)
-  endif(NOT _gtest_TIMEOUT)
+  endif()

   # Create the program, with basic + gtest build flags
   find_package(GTest REQUIRED)
@@ -102,5 +114,35 @@
   string(REPLACE "/" "_" _testname ${exe})
   get_target_property(_exe_path ${exe} RUNTIME_OUTPUT_DIRECTORY)
   # We use rosunit to call the executable to get process control, #1629, #3112
-  append_test_to_cache(catkin-tests "${rosunit_path}/scripts/rosunit --name=${_testname} --time-limit=${_gtest_TIMEOUT} --package=${PROJECT_NAME} ${_exe_path}/${exe}")
+  append_test_to_cache(catkin-tests "${rosunit_exe} --name=${_testname} --time-limit=${_gtest_TIMEOUT} --package=${PROJECT_NAME} ${_exe_path}/${exe}")
 endfunction()
+
+function(add_nosetests dir)
+  # Check that nosetests is installed.
+  find_program(nosetests_path nosetests)
+  if(NOT nosetests_path)
+    message(FATAL_ERROR "Can't find nosetests executable")
+  endif()
+
+  # Check that the directory exists
+  set(_dir_name _dir_name-NOTFOUND)
+  find_file(_dir_name ${dir}
+            PATHS ${CMAKE_CURRENT_SOURCE_DIR}
+            NO_DEFAULT_PATH)
+  if(NOT _dir_name)
+    message(FATAL_ERROR "Can't find nosetests dir \"${dir}\"")
+  endif()
+
+  # We look for ROS_TEST_COVERAGE=1
+  # to indicate that coverage reports are being requested.
+  if("$ENV{ROS_TEST_COVERAGE}" STREQUAL "1")
+    set(_covarg "--with-coverage")
+  else()
+    set(_covarg)
+  endif()
+
+  set(output_dir_name ${CMAKE_BINARY_DIR}/test_results/${PROJECT_NAME})
+  append_test_to_cache(catkin-tests "cmake -E make_directory ${output_dir_name}")
+  string(REPLACE "/" "." output_file_name ${dir})
+  append_test_to_cache(catkin-tests "${nosetests_path} --where=${_dir_name} --with-xunit --xunit-file=${output_dir_name}/${output_file_name}.xml ${_covarg}")
+endfunction()


[numerics] remove convexQP_ADMM_reduced fro a while

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -1131,7 +1131,6 @@
  BEGIN_TEST(src/QP/test)
  NEW_TEST(ConvexQP_test0 ConvexQP_test.c)
  NEW_TEST(ConvexQP_PG ConvexQP_test1.c)
- NEW_TEST(ConvexQP_ADMM_reduced ConvexQP_test2.c)
  NEW_TEST(ConvexQP_ADDM ConvexQP_test3.c)
  NEW_TEST(ConvexQP_ADDM_ACCELERATION ConvexQP_test4.c)
  NEW_TEST(ConvexQP_ADDM_ACCELERATION_AND_RESTART ConvexQP_test5.c)
@@ -1140,6 +1139,14 @@
  NEW_TEST(ConvexQP_ADMM_ACCELERATION_FC3D ConvexQP_testFC3D4.c)
  NEW_TEST(ConvexQP_ADMM_ACCELERATION_AND_RESTART_FC3D ConvexQP_testFC3D5.c)
  END_TEST()
+
+ # NEW_TEST(ConvexQP_ADMM_reduced ConvexQP_test2.c)
+
+ # IF(WITH_MUMPS)
+ #   SET(ConvexQP_ADMM_reduced_PROPERTIES WILL_FAIL TRUE)
+ # ENDIF(WITH_MUMPS)
+
+
   BEGIN_TEST(src/AVI/test)

   IF(HAS_ONE_LP_SOLVER)


intel aerofc-v1 disable sih module to save flash

--- boards/intel/aerofc-v1/default.cmake
+++ boards/intel/aerofc-v1/default.cmake
@@ -51,7 +51,7 @@
 		mc_pos_control
 		navigator
 		sensors
-		sih
+		#sih
 		vmount
 		#vtol_att_control
 		#airspeed_selector


Fix logic errors in Intel version checking

A branched conditional on the Intel version resulted in incorrect lists
of compile features being created as only a single branch was followed.

Use individual conditionals on version to ensure each is checked and
applied if required.

--- cmake/IntelCompileFeatures.cmake
+++ cmake/IntelCompileFeatures.cmake
@@ -14,7 +14,7 @@
   set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
   set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")

-  if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
+  if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0))
     set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++11")
     set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")

@@ -27,7 +27,7 @@
   # way as CMake does (using compile time checks on compiler version
   # etc - may also allow checks on GCC version in use), but for now
   # *assume* that the underlying library will support.
-  if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0)
+  if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.0))
     set(CMAKE_CXX14_COMPILE_FEATURES
       cxx_contextual_conversions
       cxx_generic_lambdas
@@ -35,7 +35,9 @@
       cxx_attribute_deprecated
       cxx_digit_separators
       )
-  elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
+  endif()
+
+  if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0))
     set(CMAKE_CXX14_COMPILE_FEATURES
       ${CMAKE_CXX14_COMPILE_FEATURES}
       cxx_binary_literals
@@ -98,10 +100,10 @@
         cxx_thread_local # Linux/OSX only
         )
     endif()
-  else()
-    # always available?
-    set(CMAKE_CXX98_COMPILE_FEATURES cxx_template_template_parameters)
   endif()
+
+  # always available?
+  set(CMAKE_CXX98_COMPILE_FEATURES cxx_template_template_parameters)

   set(CMAKE_CXX_COMPILE_FEATURES
     ${CMAKE_CXX98_COMPILE_FEATURES}


Set emscripten optimization flag to Oz (most aggressive optimize-for-size setting)

--- cmake/emscripten.toolchain.cmake
+++ cmake/emscripten.toolchain.cmake
@@ -111,23 +111,23 @@

 # c++ compiler flags
 set(CMAKE_CXX_FLAGS "${ORYOL_PLATFORM_DEFINES} -std=c++11 -stdlib=libc++ ${ORYOL_EMSC_EXCEPTION_FLAGS} -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wno-multichar -Wextra -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
-set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")
+set(CMAKE_CXX_FLAGS_RELEASE "-Oz -DNDEBUG")
+set(CMAKE_CXX_FLAGS_DEBUG "-Oz -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")

 # c compiler flags
 set(CMAKE_C_FLAGS "${ORYOL_PLATFORM_DEFINES} -fstrict-aliasing -Wall -Wno-warn-absolute-paths -Wextra -Wno-multichar -Wno-unused-parameter -Wno-unknown-pragmas -Wno-ignored-qualifiers -Wno-long-long -Wno-overloaded-virtual -Wno-deprecated-writable-strings -Wno-unused-volatile-lvalue")
-set(CMAKE_C_FLAGS_RELEASE "-O2 -DNDEBUG")
-set(CMAKE_C_FLAGS_DEBUG "-O2 -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")
+set(CMAKE_C_FLAGS_RELEASE "-Oz -DNDEBUG")
+set(CMAKE_C_FLAGS_DEBUG "-Oz -g -D_DEBUG_ -D_DEBUG -DORYOL_DEBUG=1")

 # linker flags
 set(CMAKE_EXE_LINKER_FLAGS "--memory-init-file ${EMSCRIPTEN_USE_MEMORY_INIT_FILE} -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING}")
-set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")
+set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Oz --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "-Oz -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")

 # dynamic lib linker flags
 set(CMAKE_SHARED_LINKER_FLAGS "-shared --memory-init-file 0 -s WARN_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING}")
-set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-O2 --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
-set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-O2 -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")
+set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "-Oz --llvm-lto ${EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
+set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-Oz -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")

 # update cache variables for cmake gui
 set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Config Type" FORCE)


[cmake] Pass CMAKE_MAKE_PROGRAM to native configure

If the make program isn't in the path, the native configure will fail.
Pass CMAKE_MAKE_PROGRAM to the native configure explicitly to remedy
this, similar to what's already done for external project configuration.
Explicitly set CMAKE_MAKE_PROGRAM before the user flags so that they can
override it for the native build if they desire (though I can't fathom
why that would be useful).

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -45,6 +45,7 @@

   add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
+        -DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}"
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
         -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
         -DLLVM_TARGETS_TO_BUILD="${targets_to_build_arg}"


[cmake] Make setting of CMAKE_C(XX)_COMPILER flags overridable for cross-builds

Summary:
r319898 made it possible to override these variables via the
CROSS_TOOLCHAIN_FLAGS setting, but this only worked if one explicitly
specifies these variables there. If, instead, one uses
CROSS_TOOLCHAIN_FLAGS to specify a toolchain file (as our internal
builds do, to point cmake to a checked-in toolchain), the
CMAKE_C(XX)_COMPILER flags would still win over the ones specified by
the toolchain file.

To fix is to make the mere presence of these flags overridable. I do
this by putting them as a default value for the CROSS_TOOLCHAIN_FLAGS
setting, so they can be overridden at cmake configuration time.

Reviewers: hintonda, beanz

Subscribers: bogner, llvm-commits, mgorny

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

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -7,10 +7,16 @@
   endif(NOT DEFINED LLVM_${target_name}_BUILD)

   if (EXISTS ${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake)
-    set(CROSS_TOOLCHAIN_FLAGS_${target_name}
-        -DCMAKE_TOOLCHAIN_FILE=\"${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake\"
-        CACHE STRING "Toolchain file for ${target_name}")
+    set(CROSS_TOOLCHAIN_FLAGS_INIT
+      -DCMAKE_TOOLCHAIN_FILE=\"${LLVM_MAIN_SRC_DIR}/cmake/platforms/${toolchain}.cmake\")
+  else()
+    set(CROSS_TOOLCHAIN_FLAGS_INIT
+      -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
+      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
+      )
   endif()
+  set(CROSS_TOOLCHAIN_FLAGS_${target_name} ${CROSS_TOOLCHAIN_FLAGS_INIT}
+    CACHE STRING "Toolchain configuration for ${target_name}")

   if (buildtype)
     set(build_type_flags "-DCMAKE_BUILD_TYPE=${buildtype}")
@@ -32,8 +38,6 @@

   add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
-        -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-        -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
         ${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
         -DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
         -DLLVM_TARGETS_TO_BUILD=Native


[cmake] libvdwxc, use consistent EB env variable names

an easybuild module is missing at the moment.

--- cmake/modules/FindLibVDWXC.cmake
+++ cmake/modules/FindLibVDWXC.cmake
@@ -11,7 +11,7 @@
   NAMES vdwxc.h vdwxc_mpi.h
   PATH_SUFFIXES include inc
   HINTS
-  ENV EBROOTVDWXCLIB
+  ENV EBROOTLIBVDWXC
   ENV VDWXC_DIR
   ENV LIBVDWXCROOT
   ${_LIBVDWXC_INCLUDE_DIRS}
@@ -21,9 +21,9 @@
   NAMES vdwxc
   PATH_SUFFIXES lib
   HINTS
-  ENV EBROOTVDWXC
+  ENV EBROOTLIBVDWXC
   ENV VDWXC_DIR
-  ENV VDWXCROOT
+  ENV LIBVDWXCROOT
   ${_LIBVDWXC_LIBRARY_DIRS}
   DOC "vdwxc libraries list")


tweaks so that this works inside and outside of kitchens

--- cmake/boost.cmake
+++ cmake/boost.cmake
@@ -50,5 +50,8 @@
 endif()

 configure_file(${ecto_SOURCE_DIR}/cmake/boost-config.hpp.in ${ecto_BINARY_DIR}/include/ecto/boost-config.hpp)
+if(ecto_kitchen_BINARY_DIR)
+  configure_file(${ecto_SOURCE_DIR}/cmake/boost-config.hpp.in
+    ${ecto_kitchen_BINARY_DIR}/include/ecto/boost-config.hpp)
+endif()

-


fix build error on Sunway, test=develop (#43071)

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -52,6 +52,7 @@
   set(OPENBLAS_INCLUDE_SEARCH_PATHS
           ${OPENBLAS_ROOT}/include
           /usr/include
+          /usr/include/lapacke
           /usr/include/openblas
           /usr/local/opt/openblas/include)
   set(OPENBLAS_LIB_SEARCH_PATHS
@@ -75,7 +76,7 @@
     string(REGEX MATCH "OpenBLAS ([0-9]+\.[0-9]+\.[0-9]+)" tmp ${config_file})
     string(REGEX MATCH "([0-9]+\.[0-9]+\.[0-9]+)" ver ${tmp})

-    if (${ver} VERSION_GREATER_EQUAL "0.3.7")
+    if (${ver} VERSION_GREATER_EQUAL "0.3.5")
       set(CBLAS_PROVIDER OPENBLAS)
       set(CBLAS_INC_DIR ${OPENBLAS_INC_DIR} ${OPENBLAS_LAPACKE_INC_DIR})
       set(CBLAS_LIBRARIES ${OPENBLAS_LIB})


added warning in cmake if libdl not found

--- cmake/libdl.cmake
+++ cmake/libdl.cmake
@@ -1 +1,6 @@
-find_library(LIBDL_LIBRARY dl)
+find_library( LIBDL_LIBRARY dl)
+if( LIBDL_LIBRARY  AND NOT LIBDL_LIBRARY STREQUAL "LIBDL_LIBRARY-NOTFOUND" )
+message( STATUS "Library dl found at '${LIBDL_LIBRARY}' " )
+else( LIBDL_LIBRARY  AND NOT LIBDL_LIBRARY STREQUAL "LIBDL_LIBRARY-NOTFOUND" )
+message( WARNING "Library dl not found" )
+endif( LIBDL_LIBRARY  AND NOT LIBDL_LIBRARY STREQUAL "LIBDL_LIBRARY-NOTFOUND" )


Fix regex to match kernels suffixed with cpuname too

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -313,10 +313,10 @@
       list(APPEND SRC_LIST_OUT ${new_source_file})
       message (STATUS ${new_source_file})
       if (DEFINED HAVE_FMA3)
-        if ( ${new_source_file} MATCHES "(s|d?)rot_k.c")
+        if ( ${new_source_file} MATCHES "(s|d?)rot_k.*c")
 		set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
         endif ()
-        if ( ${new_source_file} MATCHES "dgemv_t_k.c")
+        if ( ${new_source_file} MATCHES "dgemv_t_k.*c")
 		set_source_files_properties(${new_source_file} PROPERTIES COMPILE_OPTIONS "-mfma")
         endif ()
       endif ()


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -547,6 +547,7 @@
 	cmaki_find_package(python)
 	cmaki_find_package(boost-python)
 	cmaki_parse_parameters(${ARGV})
+	cmaki_install_file(${_SOURCES})
 	add_test(	NAME ${_MAIN_NAME}_test
 			COMMAND ./bin/python3 ${_SOURCES}
 			WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -142,18 +142,13 @@
 		set(package_uncompressed_file "${CMAKE_PREFIX_PATH}/${PACKAGE}.tmp")
 		set(package_cmake_filename "${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}-cmake.tar.gz")
 		set(http_package_cmake_filename "${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename}")
-		set(package_filename "${PACKAGE}-${VERSION}-${CMAKI_PLATFORM}.tar.gz")
-		set(http_package_filename "${CMAKI_REPOSITORY}/download.php?file=${package_cmake_filename}")
-		set(package_compessed "${depends_dir}/${package_filename}")
 		# 4. descargo el fichero que se supone tienes los ficheros cmake
 		if(NOT "${NO_USE_CACHE_REMOTE}")
 			cmaki_download_file("${http_package_cmake_filename}" "${package_uncompressed_file}")
 			set(COPY_SUCCESFUL1 "${COPY_SUCCESFUL}")
-			cmaki_download_file("${http_package_filename}" "${package_compessed}")
-			set(COPY_SUCCESFUL2 "${COPY_SUCCESFUL}")
 		endif()
 		# Si no puede descargar el artefacto ya hecho (es que necesito compilarlo y subirlo)
-		if(NOT "${COPY_SUCCESFUL1}" OR NOT "${COPY_SUCCESFUL2}" OR "${NO_USE_CACHE_REMOTE}")
+		if(NOT "${COPY_SUCCESFUL1}" OR "${NO_USE_CACHE_REMOTE}")

 			file(REMOVE_RECURSE "${depends_bin_package}")
 			file(REMOVE_RECURSE "${depends_package}")


cmake_prefix_path is a list

cmake_prefix_path is a list

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -6,11 +6,12 @@
 	set(DEPENDS_PATH ${CMAKI_PATH}/../../artifacts)
 ENDIF()

-IF(NOT DEFINED CMAKE_PREFIX_PATH)
-	set(CMAKE_PREFIX_PATH ${DEPENDS_PATH}/cmaki_find_package)
-ELSE()
-	LIST(APPEND CMAKE_PREFIX_PATH ${DEPENDS_PATH}/cmaki_find_package)
-ENDIF()
+set(CMAKE_PREFIX_PATH ${DEPENDS_PATH}/cmaki_find_package)
+# IF(NOT DEFINED CMAKE_PREFIX_PATH)
+# 	set(CMAKE_PREFIX_PATH ${DEPENDS_PATH}/cmaki_find_package)
+# ELSE()
+# 	LIST(APPEND CMAKE_PREFIX_PATH ${DEPENDS_PATH}/cmaki_find_package)
+# ENDIF()

 IF(NOT DEFINED ARTIFACTS_PATH)
 	set(ARTIFACTS_PATH ${CMAKI_PATH}/../cmaki_generator)


[ONNX] Upgrade libonnx to version 1.3 (#1530)

* onnxifi: upgrade libonnx

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

* onnx: upgrade libonnx to version 1.3

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


remove ssmlm

remove ssmlm

--- src/na/CMake/FindSSM.cmake
+++ src/na/CMake/FindSSM.cmake
@@ -25,16 +25,13 @@
 set(SSM_INCLUDE_DIR ${SSM_INCLUDE_DIR} ${INC_SSM_H} ${INC_SSM_DUMB_H})
 #message(${SSM_INCLUDE_DIR})

-FIND_LIBRARY( SSM_LIBRARY NAMES ssmlm
-  PATHS /usr/local/lib /usr/lib
-)
 FIND_LIBRARY( SSM_LIBRARY_SSMPTCP NAMES ssmptcp
   PATHS /usr/local/lib /usr/lib
 )
 FIND_LIBRARY( SSM_LIBRARY_SSM NAMES ssm
   PATHS /usr/local/lib /usr/lib
 )
-set(SSM_LIBRARY ${SSM_LIBRARY} ${SSM_LIBRARY_SSMPTCP} ${SSM_LIBRARY_SSM})
+set(SSM_LIBRARY ${SSM_LIBRARY_SSMPTCP} ${SSM_LIBRARY_SSM})
 #message(${SSM_LIBRARY})


Fix typo.

Fix typo.

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

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

--- build-aux/cmake/modules/FindQScintilla2.cmake
+++ build-aux/cmake/modules/FindQScintilla2.cmake
@@ -30,7 +30,7 @@
     PATHS ${QT_LIBRARY_DIR} ${QSCINTILLA2_ROOT_DIR}/lib)
   if(QSCINTILLA2_LIBRARY)
     message(STATUS "Found qscintilla2 library: ${QSCINTILLA2_LIBRARY}")
-    set(QSINTILLA2_FOUND TRUE)
+    set(QSCINTILLA2_FOUND TRUE)
   else(QSCINTILLA2_LIBRARY)
     message(FATAL_ERROR "no qscintilla2 library found "
       "(setting -DQSCINTILLA2_ROOT_DIR=/path/to/qscintilla2 may solve this "
@@ -51,7 +51,7 @@
       message(FATAL_ERROR "no qscintilla2 headers found "
 	"(setting -DQSCINTILLA2_ROOT_DIR=/path/to/qscintilla2 may solve this "
 	"problem).")
-      set(QSINTILLA2_FOUND FALSE)
+      set(QSCINTILLA2_FOUND FALSE)
     endif(QSCINTILLA2_INCLUDE_DIR)
   endif(NOT QSCINTILLA2_INCLUDE_DIR)
 endif(QSCINTILLA2_FOUND)


Do not make builtin_vdt on by default

Do not make builtin_vdt on by default

--- cmake/modules/RootBuildOptions.cmake
+++ cmake/modules/RootBuildOptions.cmake
@@ -83,7 +83,7 @@
 ROOT_BUILD_OPTION(builtin_xrootd OFF "Build the XROOTD internally (downloading tarfile from the Web)")
 ROOT_BUILD_OPTION(builtin_llvm ON "Build the LLVM internally")
 ROOT_BUILD_OPTION(builtin_tbb OFF "Build the TBB internally")
-ROOT_BUILD_OPTION(builtin_vdt ON "Build the VDT package internally")
+ROOT_BUILD_OPTION(builtin_vdt OFF "Build the VDT package internally")
 ROOT_BUILD_OPTION(builtin_vc OFF "Build the Vc package internally")
 ROOT_BUILD_OPTION(cxx11 ON "Build using C++11 compatible mode, requires gcc > 4.7.x or clang")
 ROOT_BUILD_OPTION(cxx14 OFF "Build using C++14 compatible mode, requires gcc > 4.9.x or clang")


update OpenNI packages urls for the all-in-one installer

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

--- cmake/pcl_all_in_one_installer.cmake
+++ cmake/pcl_all_in_one_installer.cmake
@@ -24,17 +24,17 @@

     if(CMAKE_CL_64)
         set(OPENNI_PACKAGE "OpenNI-Win64-1.3.2-Dev.msi")
-        set(OPENNI_URL "http://dev.pointclouds.org/attachments/download/360/${OPENNI_PACKAGE}")
+        set(OPENNI_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_PACKAGE}")
         set(OPENNI_MD5 e54b5ede27b293c579c42dcede33b289)
         set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource64-5.0.3.msi")
-        set(OPENNI_SENSOR_URL "http://dev.pointclouds.org/attachments/download/359/${OPENNI_SENSOR_PACKAGE}")
+        set(OPENNI_SENSOR_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
         set(OPENNI_SENSOR_MD5 cbf4ce02d5ef430dca17833d5588e060)
     else(CMAKE_CL_64)
         set(OPENNI_PACKAGE "OpenNI-Win32-1.3.2-Dev.msi")
-        set(OPENNI_URL "http://dev.pointclouds.org/attachments/download/361/${OPENNI_PACKAGE}")
+        set(OPENNI_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_PACKAGE}")
         set(OPENNI_MD5 0b7118a0581abef411b58530d4039cf0)
         set(OPENNI_SENSOR_PACKAGE "Sensor-Win-OpenSource32-5.0.3.msi")
-        set(OPENNI_SENSOR_URL "http://dev.pointclouds.org/attachments/download/358/${OPENNI_SENSOR_PACKAGE}")
+        set(OPENNI_SENSOR_URL "http://www.pointclouds.org/assets/files/dependencies/${OPENNI_SENSOR_PACKAGE}")
         set(OPENNI_SENSOR_MD5 8bf14b2e813859f868fc316acb2d08fa)
     endif(CMAKE_CL_64)


ordered interface include dirs and use privately to ensure workspace order (#260)

Signed-off-by: Dirk Thomas <19795c8185177e940eedd30ceb2b716a54a3d5dc@users.noreply.github.com>

--- ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
+++ ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake
@@ -116,6 +116,19 @@
     if(NOT ARG_INTERFACE)
       target_compile_definitions(${target}
         ${required_keyword} ${definitions})
+      # the interface include dirs must be ordered
+      set(interface_include_dirs)
+      foreach(interface ${interfaces})
+        get_target_property(_include_dirs ${interface} INTERFACE_INCLUDE_DIRECTORIES)
+        if(_include_dirs)
+          list_append_unique(interface_include_dirs ${_include_dirs})
+        endif()
+      endforeach()
+      ament_include_directories_order(ordered_interface_include_dirs ${interface_include_dirs})
+      # the interface include dirs are used privately to ensure proper order
+      # and the interfaces cover the public case
+      target_include_directories(${target}
+        PRIVATE ${ordered_interface_include_dirs})
     endif()
     ament_include_directories_order(ordered_include_dirs ${include_dirs})
     target_link_libraries(${target}


Add mariadb include dir after a rename in Ubuntu 16.04

--- cmake/Modules/FindMySQL.cmake
+++ cmake/Modules/FindMySQL.cmake
@@ -13,6 +13,8 @@
 FIND_PATH(MYSQL_INCLUDE_DIR mysql.h
   /usr/local/include/mysql
   /usr/include/mysql
+  /usr/include/mariadb
+  /usr/local/include/mariadb
 )

 SET(MYSQL_NAMES mysqlclient mysqlclient_r mariadbclient mariadbclient_r)


Reduce parallelism for reliability

Reduce parallelism for reliability

--- cmake/circle_continuous.cmake
+++ cmake/circle_continuous.cmake
@@ -22,12 +22,12 @@

 if(test_group STREQUAL python)
   ctest_test(
-    PARALLEL_LEVEL 16 RETURN_VALUE res
+    PARALLEL_LEVEL 4 RETURN_VALUE res
     INCLUDE_LABEL girder_python
   )
 elseif(test_group STREQUAL browser)
   ctest_test(
-    PARALLEL_LEVEL 16 RETURN_VALUE res
+    PARALLEL_LEVEL 4 RETURN_VALUE res
     EXCLUDE_LABEL girder_python
   )
   file(RENAME "${CTEST_BINARY_DIRECTORY}/coverage/js_coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")


CMake: renamed CLANG_FORMAT_VERSION_NEEDED to CLANG_FORMAT_VERSION_MINIMUM.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -121,14 +121,14 @@
 endif()

 if(CLANG_FORMAT_EXE AND GIT_EXE)
-  set(CLANG_FORMAT_VERSION_NEEDED 11)
+  set(CLANG_FORMAT_VERSION_MINIMUM 11)
   execute_process(COMMAND ${CLANG_FORMAT_EXE} -version
                   OUTPUT_VARIABLE CLANG_FORMAT_VERSION
                   ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
   string(REGEX REPLACE "clang-format version ([.0-9]+).*" "\\1" CLANG_FORMAT_VERSION "${CLANG_FORMAT_VERSION}")

-  if(CLANG_FORMAT_VERSION VERSION_LESS CLANG_FORMAT_VERSION_NEEDED)
-    message(STATUS "ClangFormat ${CLANG_FORMAT_VERSION} was found, but version ${CLANG_FORMAT_VERSION_NEEDED}+ is needed to run the ClangFormat test")
+  if(CLANG_FORMAT_VERSION VERSION_LESS CLANG_FORMAT_VERSION_MINIMUM)
+    message(STATUS "ClangFormat ${CLANG_FORMAT_VERSION} was found, but version ${CLANG_FORMAT_VERSION_MINIMUM}+ is needed to run the ClangFormat test")
   else()
     set(CLANG_FORMAT_TESTING_AVAILABLE TRUE CACHE INTERNAL "Executables required to run the ClangFormat test are available.")
   endif()


Some library defs are private

Some library defs are private

--- cmake/MyPackageLibrary.cmake
+++ cmake/MyPackageLibrary.cmake
@@ -49,7 +49,7 @@
   STRING (TOUPPER ${PROJECT_NAME} _PROJECTNAME)
   IF ((NOT CMAKE_BUILD_TYPE MATCHES Debug) AND (NOT CMAKE_BUILD_TYPE MATCHES RelWithDebInfo))
     FOREACH (_target ${PROJECT_NAME} ${PROJECT_NAME}_static)
-      TARGET_COMPILE_DEFINITIONS(${_target} PUBLIC -D${_PROJECTNAME}_NTRACE)
+      TARGET_COMPILE_DEFINITIONS(${_target} PRIVATE -D${_PROJECTNAME}_NTRACE)
     ENDFOREACH ()
   ENDIF ()
   #
@@ -61,10 +61,10 @@
   SET (${_PROJECTNAME}_VERSION "${${_PROJECTNAME}_VERSION_MAJOR}.${${_PROJECTNAME}_VERSION_MINOR}.${${_PROJECTNAME}_VERSION_PATCH}")
   FOREACH (_target ${PROJECT_NAME} ${PROJECT_NAME}_static)
     TARGET_COMPILE_DEFINITIONS(${_target}
-      PUBLIC -D${_PROJECTNAME}_VERSION_MAJOR=${versionMajor}
-      PUBLIC -D${_PROJECTNAME}_VERSION_MINOR=${versionMinor}
-      PUBLIC -D${_PROJECTNAME}_VERSION_PATCH=${versionPatch}
-      PUBLIC -D${_PROJECTNAME}_VERSION="${${_PROJECTNAME}_VERSION}"
+      PRIVATE -D${_PROJECTNAME}_VERSION_MAJOR=${versionMajor}
+      PRIVATE -D${_PROJECTNAME}_VERSION_MINOR=${versionMinor}
+      PRIVATE -D${_PROJECTNAME}_VERSION_PATCH=${versionPatch}
+      PRIVATE -D${_PROJECTNAME}_VERSION="${${_PROJECTNAME}_VERSION}"
       )
   ENDFOREACH ()
   #


Quote list argument

Quote list argument

--- cmake/PrecompileHeader.cmake
+++ cmake/PrecompileHeader.cmake
@@ -60,7 +60,7 @@
             /Zm170
         )

-        __filter_source_files_pch(${_target} ${arg_EXCLUDE} source_files)
+        __filter_source_files_pch(${_target} "${arg_EXCLUDE}" source_files)
         foreach(source_file IN ITEMS ${source_files})
             set_property(SOURCE ${source_file}
                 APPEND_STRING PROPERTY COMPILE_OPTIONS ${source_file_flags}
@@ -130,7 +130,7 @@
         add_dependencies(${_target}.pch-symlink ${_target}.pch)

         # Finally, append proper compile flags for each not-excluded source file
-        __filter_source_files_pch(${_target} ${arg_EXCLUDE} source_files)
+        __filter_source_files_pch(${_target} "${arg_EXCLUDE}" source_files)
         foreach(source_file IN ITEMS ${source_files})
             set_property(SOURCE ${source_file}
                 APPEND_STRING PROPERTY COMPILE_OPTIONS "-include;${host_file_native};-Winvalid-pch"


MKL dlls do not have a lib prefix [skip ci] this way we are going to detect correctly both on UNIX and Windows systems MKL correctly

--- cmake/ShogunFindLAPACK.cmake
+++ cmake/ShogunFindLAPACK.cmake
@@ -24,7 +24,7 @@
         LIST(APPEND LAPACK_LIBRARIES ${LAPACKE_LIBRARY})
       endif()
     endif()
-  ELSEIF("${LAPACK_LIBRARIES}" MATCHES ".*/libmkl_.*")
+  ELSEIF("${LAPACK_LIBRARIES}" MATCHES ".*/.*mkl_.*")
     # in case MKL is available enable Eigen to use it.
     # for more fine grained control and details see:
     # https://eigen.tuxfamily.org/dox/TopicUsingIntelMKL.html


cmake: unbreak the usecase of cross-compiling the compiler while
disabling the standard library

In almost all cases, CMake will happily operate on undefined variables,
treating them as empty, but for some reason list(REMOVE_ITEM) is an
exception.

Swift SVN r25835

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1195,7 +1195,8 @@
     list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
   endif()

-  if(NOT "${SWIFT_BUILD_STDLIB}")
+  if((NOT "${SWIFT_BUILD_STDLIB}") AND
+     (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS}" STREQUAL ""))
     list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
         Core SwiftUnstable)
   endif()


default ld.gold on FreeBSD for as long as the ld linker problem exists on {linux,freebsd}

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -982,6 +982,9 @@

   if(SWIFT_ENABLE_GOLD_LINKER AND
      "${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
+    list(APPEND link_flags "-fuse-ld=gold")
+  endif()
+  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "FREEBSD")
     list(APPEND link_flags "-fuse-ld=gold")
   endif()
   if(SWIFT_ENABLE_LLD_LINKER OR


[AddSwift.cmake] Unbreak non-assertions build

Fails to build with "error: macro name must be an identifier" due to trying to pass `-D-DNDEBUG` as compiler argument.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -254,7 +254,7 @@
   if(LLVM_ENABLE_ASSERTIONS)
     target_compile_options(${target} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-UNDEBUG>)
   else()
-    target_compile_definitions(${target} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:-DNDEBUG>)
+    target_compile_definitions(${target} PRIVATE $<$<COMPILE_LANGUAGE:C,CXX,OBJC,OBJCXX>:NDEBUG>)
   endif()

   if(SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS)


build: remove `MACCATALYST_BUILD_FLAVOR` from `_add_swift_host_library_single`

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -693,7 +693,6 @@
 #     [IS_STDLIB_CORE]
 #     [IS_SDK_OVERLAY]
 #     INSTALL_IN_COMPONENT comp
-#     MACCATALYST_BUILD_FLAVOR flavor
 #     source1 [source2 source3 ...])
 #
 # target
@@ -758,9 +757,6 @@
 #
 # INSTALL_IN_COMPONENT comp
 #   The Swift installation component that this library belongs to.
-#
-# MACCATALYST_BUILD_FLAVOR
-#   Possible values are 'ios-like', 'macos-like', 'zippered', 'unzippered-twin'
 #
 # source1 ...
 #   Sources to add into this library
@@ -785,8 +781,7 @@
         INSTALL_IN_COMPONENT
         DARWIN_INSTALL_NAME_DIR
         SDK
-        DEPLOYMENT_VERSION_MACCATALYST
-        MACCATALYST_BUILD_FLAVOR)
+        DEPLOYMENT_VERSION_MACCATALYST)
   set(SWIFTLIB_SINGLE_multiple_parameter_options
         C_COMPILE_FLAGS
         DEPENDS
@@ -809,10 +804,6 @@
                         "${SWIFTLIB_SINGLE_multiple_parameter_options}"
                         ${ARGN})

-  # Determine macCatalyst build flavor
-  get_maccatalyst_build_flavor(maccatalyst_build_flavor
-    "${SWIFTLIB_SINGLE_SDK}" "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}")
-
   set(SWIFTLIB_SINGLE_SOURCES ${SWIFTLIB_SINGLE_UNPARSED_ARGUMENTS})

   translate_flags(SWIFTLIB_SINGLE "${SWIFTLIB_SINGLE_options}")
@@ -832,12 +823,6 @@
   # Determine the subdirectory where this library will be installed.
   set(SWIFTLIB_SINGLE_SUBDIR
       "${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}/${SWIFTLIB_SINGLE_ARCHITECTURE}")
-
-  # macCatalyst ios-like builds are installed in the maccatalyst/x86_64 directory
-  if(maccatalyst_build_flavor STREQUAL "ios-like")
-    set(SWIFTLIB_SINGLE_SUBDIR
-        "${SWIFT_SDK_MACCATALYST_LIB_SUBDIR}/${SWIFTLIB_SINGLE_ARCHITECTURE}")
-  endif()

   # Include LLVM Bitcode slices for iOS, Watch OS, and Apple TV OS device libraries.
   set(embed_bitcode_arg)
@@ -938,16 +923,12 @@
       ${SWIFTLIB_SINGLE_IS_STDLIB_CORE_keyword}
       ${SWIFTLIB_SINGLE_IS_SDK_OVERLAY_keyword}
       ${embed_bitcode_arg}
-      INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}"
-      MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}")
+      INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}")
   add_swift_source_group("${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}")

   # If there were any swift sources, then a .swiftmodule may have been created.
   # If that is the case, then add a target which is an alias of the module files.
   set(VARIANT_SUFFIX "-${SWIFT_SDK_${SWIFTLIB_SINGLE_SDK}_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}")
-  if(maccatalyst_build_flavor STREQUAL "ios-like")
-    set(VARIANT_SUFFIX "-${SWIFT_SDK_MACCATALYST_LIB_SUBDIR}-${SWIFTLIB_SINGLE_ARCHITECTURE}")
-  endif()

   if(NOT "${SWIFTLIB_SINGLE_MODULE_TARGETS}" STREQUAL "" AND NOT "${swift_module_dependency_target}" STREQUAL "")
     foreach(module_target ${SWIFTLIB_SINGLE_MODULE_TARGETS})
@@ -1102,13 +1083,6 @@

     if(SWIFTLIB_SINGLE_IS_STDLIB)
       set(install_name_dir "${SWIFT_DARWIN_STDLIB_INSTALL_NAME_DIR}")
-
-      # iOS-like overlays are installed in a separate directory so that
-      # unzippered twins do not conflict.
-      if(maccatalyst_build_flavor STREQUAL "ios-like"
-          AND DEFINED SWIFT_DARWIN_MACCATALYST_STDLIB_INSTALL_NAME_DIR)
-        set(install_name_dir "${SWIFT_DARWIN_MACCATALYST_STDLIB_INSTALL_NAME_DIR}")
-      endif()
     endif()

     # Always use @rpath for XCTest
@@ -1310,7 +1284,6 @@
     DEPLOYMENT_VERSION_TVOS "${SWIFTLIB_DEPLOYMENT_VERSION_TVOS}"
     DEPLOYMENT_VERSION_WATCHOS "${SWIFTLIB_DEPLOYMENT_VERSION_WATCHOS}"
     RESULT_VAR_NAME c_compile_flags
-    MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}"
     )

   if(SWIFTLIB_IS_STDLIB)
@@ -1342,7 +1315,6 @@
     RESULT_VAR_NAME link_flags
     LINK_LIBRARIES_VAR_NAME link_libraries
     LIBRARY_SEARCH_DIRECTORIES_VAR_NAME library_search_directories
-    MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}"
       )

   # Configure plist creation for OS X.


Adds Link Time Optimization

Adds Link Time Optimization

It also adds the --no-undefined linker flag.
This is a port of  Hong Jen Yee (PCMan) work on LXQtCompilerSettings.

--- cmake/compiler_settings.cmake
+++ cmake/compiler_settings.cmake
@@ -1,5 +1,6 @@
 #=============================================================================
 # Copyright 2015 Luís Pereira <luis.artur.pereira@gmail.com>
+# Copyright 2013 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
@@ -103,3 +104,53 @@
     -DQT_NO_URL_CAST_FROM_STRING
     -DQT_NO_CAST_FROM_BYTEARRAY
 )
+
+#-----------------------------------------------------------------------------
+# Linker flags
+# Do not allow undefined symbols
+#-----------------------------------------------------------------------------
+if (CMAKE_COMPILER_IS_GNUCXX OR QTXDG_COMPILER_IS_CLANGCXX)
+    # -Bsymbolic-functions: replace dynamic symbols used internally in
+    #                       shared libs with direct addresses.
+    set(SYMBOLIC_FLAGS
+        "-Wl,-Bsymbolic-functions -Wl,-Bsymbolic"
+    )
+    set(CMAKE_SHARED_LINKER_FLAGS
+        "-Wl,--no-undefined ${SYMBOLIC_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}"
+    )
+    set(CMAKE_MODULE_LINKER_FLAGS
+        "-Wl,--no-undefined ${SYMBOLIC_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}"
+    )
+    set(CMAKE_EXE_LINKER_FLAGS
+        "${SYMBOLIC_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}"
+    )
+
+endif()
+
+#-----------------------------------------------------------------------------
+# Turn on more aggrassive optimizations not supported by CMake
+# References: https://wiki.qt.io/Performance_Tip_Startup_Time
+#-----------------------------------------------------------------------------
+if (CMAKE_COMPILER_IS_GNUCXX OR QTXDG_COMPILER_IS_CLANGCXX)
+    # -flto: use link-time optimizations to generate more efficient code
+    if (CMAKE_COMPILER_IS_GNUCXX)
+        set(LTO_FLAGS "-flto -fuse-linker-plugin")
+        # When building static libraries with LTO in gcc >= 4.9,
+        # "gcc-ar" and "gcc-ranlib" should be used instead of "ar" and "ranlib".
+        # references:
+        #   https://gcc.gnu.org/gcc-4.9/changes.html
+        #   http://hubicka.blogspot.tw/2014/04/linktime-optimization-in-gcc-2-firefox.html
+        #   https://github.com/monero-project/monero/pull/1065/commits/1855213c8fb8f8727f4107716aab8e7ba826462b
+        if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")  # gcc >= 4.9
+            set(CMAKE_AR "gcc-ar")
+            set(CMAKE_RANLIB "gcc-ranlib")
+        endif()
+    elseif (QTXDG_COMPILER_IS_CLANGCXX)
+        # The link-time optimization of clang++/llvm seems to be too aggrassive.
+        # After testing, it breaks the signal/slots of QObject sometimes.
+        # So disable it for now until there is a solution.
+        # set(LTO_FLAGS "-flto")
+    endif()
+    # apply these options to "Release" build type only
+    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${LTO_FLAGS}")
+endif()


[cmake] fixes weird mpi behaviour in tests

--- cmake/modules/DuneUtils.cmake
+++ cmake/modules/DuneUtils.cmake
@@ -126,8 +126,15 @@

 macro(END_TESTCASES)
     IF(NOT CMAKE_WITH_AUTOTOOLS)
-        add_directory_test_target(_test_target)
-        add_dependencies(${_test_target} ${testnames})
+      add_directory_test_target(_test_target)
+      add_dependencies(${_test_target} ${testnames})
+      foreach( test ${testnames} )
+        add_dune_mpi_flags(${test})
+        add_dune_alugrid_flags(${test})
+        if(COMMAND add_dune_tbb_flags)
+          add_dune_tbb_flags(${test})
+        endif()
+      endforeach( test ${testnames} )
     ENDIF(NOT CMAKE_WITH_AUTOTOOLS)
 	add_custom_target(test_binaries DEPENDS ${testnames})
 	add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}


wxwidgets.so contains symbols that must be resolved by the agg
libraries and freetype library.  So revert back to revision 12065
because Orion's overlinking fixup patch was too aggressive at removing
linking information in this case.

svn path=/trunk/; revision=12193

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -91,12 +91,22 @@
 	wxwidgets_COMPILE_FLAGS
 	"${wxwidgets_COMPILE_FLAGS} -I${AGG_INCLUDE_DIRS}"
 	)
+      set(
+	wxwidgets_LINK_FLAGS
+	${wxwidgets_LINK_FLAGS}
+	${AGG_LIBRARIES}
+	)
     else(HAVE_AGG)
       message(STATUS "WARNING: wxwidgets driver and bindings components depending on AGG library have been dropped.")
     endif(HAVE_AGG)
     set(
       wxwidgets_COMPILE_FLAGS
       "${wxwidgets_COMPILE_FLAGS} -I${FREETYPE_INCLUDE_DIR}"
+      )
+    set(
+      wxwidgets_LINK_FLAGS
+      ${wxwidgets_LINK_FLAGS}
+      ${FREETYPE_LIBRARIES}
       )
   endif(WITH_FREETYPE)
   set(DRIVERS_LINK_FLAGS


Switch from sysconfig.PREFIX to sys.prefix

--- FindPythonLibsNew.cmake
+++ FindPythonLibsNew.cmake
@@ -69,7 +69,7 @@
 execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
     "from distutils import sysconfig as s;import sys;import struct;
 print('.'.join(str(v) for v in sys.version_info));
-print(s.PREFIX);
+print(sys.prefix);
 print(s.get_python_inc(plat_specific=True));
 print(s.get_python_lib(plat_specific=True));
 print(s.get_config_var('SO'));


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -412,7 +412,7 @@
 	common_linking(${_EXECUTABLE_NAME})
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(    TARGETS ${_EXECUTABLE_NAME}
-					DESTINATION ${BUILD_TYPE}
+					DESTINATION ${BUILD_TYPE}/${_SUFFIX_INSTALL}
 					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()
 	generate_vcxproj_user(${_EXECUTABLE_NAME})
@@ -443,7 +443,7 @@
 	common_linking(${_LIBRARY_NAME})
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(	TARGETS ${_LIBRARY_NAME}
-					DESTINATION ${BUILD_TYPE}
+					DESTINATION ${BUILD_TYPE}/${_SUFFIX_INSTALL}
 					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()

@@ -474,7 +474,7 @@
 	common_linking(${_LIBRARY_NAME})
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(	TARGETS ${_LIBRARY_NAME}
-					DESTINATION ${BUILD_TYPE}
+					DESTINATION ${BUILD_TYPE}/${_SUFFIX_INSTALL}
 					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()

@@ -502,7 +502,7 @@
 	common_linking(${_TEST_NAME}_exe)
 	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
 		INSTALL(    TARGETS ${_TEST_NAME}_exe
-					DESTINATION ${BUILD_TYPE}
+					DESTINATION ${BUILD_TYPE}/${_SUFFIX_INSTALL}
 					CONFIGURATIONS ${BUILD_TYPE})
 	endforeach()
 	add_test(
@@ -519,14 +519,37 @@
 endmacro()

 macro(cmaki_python_library)
-	cmaki2_library(${ARGV}) # INSTALL lib/python3.5/lib-dynload
-	set(PARAMETERS ${ARGV})
-	list(GET PARAMETERS 0 TARGET_NAME)
-	set_target_properties(${TARGET_NAME} PROPERTIES PREFIX "")
-	foreach(BUILD_TYPE ${CMAKE_BUILD_TYPE})
-		install(    TARGETS ${TARGET_NAME}
-					DESTINATION ${BUILD_TYPE}/lib/python3.5/lib-dynload
-					CONFIGURATIONS ${BUILD_TYPE})
-	endforeach()
-endmacro()
-
+	cmaki_find_package(python)
+	cmaki_find_package(boost-python)
+	cmaki2_library(${ARGV} PTHREADS INSTALL lib/python3.5/lib-dynload)
+	cmaki_parse_parameters(${ARGV})
+	set_target_properties(${_MAIN_NAME} PROPERTIES PREFIX "")
+endmacro()
+
+macro(cmaki_python_gtest)
+	cmaki_find_package(python)
+	cmaki_find_package(boost-python)
+	cmaki2_gtest(${ARGV} PTHREADS)
+	cmaki_parse_parameters(${ARGV})
+	set_tests_properties(${_MAIN_NAME}_exe PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE}")
+endmacro()
+
+macro(cmaki_python_test)
+	cmaki_find_package(python)
+	cmaki_find_package(boost-python)
+	cmaki_parse_parameters(${ARGV})
+	cmaki_install_file(${_SOURCES})
+	enable_testing()
+	add_test(	NAME ${_MAIN_NAME}_test
+			COMMAND ./bin/python3 ${_SOURCES}
+			WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE})
+	set_tests_properties(${_MAIN_NAME}_test PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_BUILD_TYPE}")
+endmacro()
+
+macro(cmaki_install_python)
+	cmaki_find_package(python)
+	cmaki_find_package(boost-python)
+	get_filename_component(PYTHON3_DIR ${PYTHON3_EXECUTABLE} DIRECTORY)
+	get_filename_component(PYTHON3_PARENT_DIR ${PYTHON3_DIR} DIRECTORY)
+	cmaki_install_inside_dir(${PYTHON3_PARENT_DIR})
+endmacro()


add VAD_Ceres

add VAD_Ceres

--- external/vigra_cmake/VAD_Ceres.cmake
+++ external/vigra_cmake/VAD_Ceres.cmake
@@ -24,7 +24,7 @@
   list(APPEND CMAKE_MODULE_PATH "${VAD_EXTERNAL_ROOT}/Ceres/cmake")

   #prerequisits
-  find_package(Eigen REQUIRED)
+  vigra_add_dep(Eigen REQUIRED LIVE)

   git_clone(Ceres)

@@ -32,20 +32,29 @@
   file(READ "${VAD_EXTERNAL_ROOT}/Ceres/CMakeLists.txt" FILECONTENT)
   string(REPLACE "CMAKE_SOURCE_DIR" "CMAKE_CURRENT_LIST_DIR" FILECONTENT ${FILECONTENT})
   string(REPLACE "CMAKE_BINARY_DIR" "CMAKE_CURRENT_BINARY_DIR" FILECONTENT ${FILECONTENT})
+  string(REPLACE "add_custom_target(uninstall\n" "add_custom_target(uninstall-ceres\n" FILECONTENT ${FILECONTENT})
   file(WRITE "${VAD_EXTERNAL_ROOT}/Ceres/CMakeLists.txt" ${FILECONTENT})

-  message("output: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+  #patch (HACK) logging.h
+  file(READ "${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog/glog/logging.h" FILECONTENT)
+  string(REPLACE "// Log severity level constants."
+        "#undef ERROR\n#define MAX_LOG_LEVEL -1" FILECONTENT "${FILECONTENT}")
+  file(WRITE "${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog/glog/logging.h" "${FILECONTENT}")
+
+  set(EIGENSPARSE ON) #use Eigen (no additional deps required - but suitesparse should be faster!)
+  set(MINIGLOG ON) #use miniglog
+  set(EIGENSPARSE ON)
+  set(BUILD_TESTING OFF)

   # TODO default seems to point to checkout out dir in source?!?
   add_subdirectory("${VAD_EXTERNAL_ROOT}/Ceres" "${CMAKE_BINARY_DIR}/external/Ceres")

-  if(NOT TARGET ceres)
-    message(ERROR "ceres found but no target \"ceres\"!")
-  endif()
-
   add_library(CERES::CERES INTERFACE IMPORTED)

-  set_target_properties(CERES::CERES PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${VAD_EXTERNAL_ROOT}/Ceres/include;${VAD_EXTERNAL_ROOT}/Ceres/config;${EIGEN_INCLUDE_DIRS}")
+
+  get_target_property(_CERES_INC ceres INTERFACE_INCLUDE_DIRECTORIES)
+
+  set_target_properties(CERES::CERES PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CERES_INCLUDE_DIRS};${VAD_EXTERNAL_ROOT}/Ceres/include;${VAD_EXTERNAL_ROOT}/Ceres/config;${VAD_EXTERNAL_ROOT}/Ceres/internal/ceres/miniglog;${EIGEN_INCLUDE_DIRS}")
   set_target_properties(CERES::CERES PROPERTIES INTERFACE_LINK_LIBRARIES ceres)

 endfunction()


Graph Control 4.0.0-rc2 Release Candidate 2

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

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


Split off 7.8.32

Split off 7.8.32

Signed-off-by: Gavin Halliday <2edfa8aca9fb78974188e5b35be8b52d4e4967ae@lexisnexis.com>

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


Bumping version number

Bumping version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.2.7)
+set(autowiring_VERSION 0.2.8)


Set version to 1.9.0 (#67)

Set version to 1.9.0 (#67)

--- version.cmake
+++ version.cmake
@@ -1,4 +1,4 @@
 # Copyright (C) 2017 Prism Skylabs
 set(ConnectSDK_VERSION_MAJOR 1)
-set(ConnectSDK_VERSION_MINOR 8)
+set(ConnectSDK_VERSION_MINOR 9)
 set(ConnectSDK_VERSION_REVISION 0)


Split off 7.10.38

Split off 7.10.38

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

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


Nagios Monitoring 5.2.0-rc2 Release Candidate 2

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

--- version.cmake
+++ version.cmake
@@ -6,5 +6,5 @@
 set ( HPCC_MINOR 2 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 1 )
+set ( HPCC_SEQUENCE 2 )
 ###


Split of closedown-4.0.x branch

Split of closedown-4.0.x branch

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

--- version.cmake
+++ version.cmake
@@ -2,10 +2,10 @@
 ## Version Information
 ###
 set ( HPCC_PROJECT "community" )
-set ( HPCC_MAJOR 3 )
-set ( HPCC_MINOR 11 )
+set ( HPCC_MAJOR 4 )
+set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


update libmultisense mercurial tag

update libmultisense mercurial tag

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -138,7 +138,7 @@
 set(kinematics-utils_depends Eigen_pod)

 set(libmultisense_url https://bitbucket.org/crl/libmultisense)
-set(libmultisense_hg_tag efb8099)
+set(libmultisense_hg_tag a57026c)
 set(libmultisense_depends opencv-drc)
 set(libmultisense_external_args
   CMAKE_CACHE_ARGS


moving up revision tag to tip

moving up revision tag to tip

rolls in minor change to remov hard coded values i added
and a change from someone in RRG to surround regions, shouldnt effect us

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -28,7 +28,7 @@
 set(occ-map_depends libbot-drc opencv-drc)

 set(common_utils_url https://svn.csail.mit.edu/common_utils)
-set(common_utils_revision 287)
+set(common_utils_revision 289)
 set(common_utils_depends Eigen_pod libbot-drc occ-map octomap-drc)

 set(scanmatch_url https://svn.csail.mit.edu/scanmatch/trunk)


fix(cmake): fix build on macOS with AppleClang

--- cmake/Modules/TargetSIMDInstructionSet.cmake
+++ cmake/Modules/TargetSIMDInstructionSet.cmake
@@ -14,7 +14,7 @@
 ########################################################################
 # compiler flags definition
 macro(define_SIMD_compile_flags)
-    if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
+    if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang" OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
         # x86
         set(COMPILE_FLAGS_SSSE3 "-mssse3")
         set(COMPILE_FLAGS_SSE41 "-msse4.1")


Add checks of math.h and float.h

Add checks of math.h and float.h

--- cmake/MyPackageCheckCommonIncludeFiles.cmake
+++ cmake/MyPackageCheckCommonIncludeFiles.cmake
@@ -16,4 +16,6 @@
   CHECK_INCLUDE_FILE ("io.h"           HAVE_IO_H)
   CHECK_INCLUDE_FILE ("time.h"         HAVE_TIME_H)
   CHECK_INCLUDE_FILE ("fcntl.h"        HAVE_FCNTL_H)
+  CHECK_INCLUDE_FILE ("math.h"         HAVE_MATH_H)
+  CHECK_INCLUDE_FILE ("float.h"        HAVE_FLOAT_H)
 ENDMACRO()


cmake: Generate files that depend on dev version of kurento-module-creator

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -2,7 +2,7 @@

 include (GenericFind)

-generic_find(LIBNAME KurentoModuleCreator VERSION ^6.17.0 REQUIRED)
+generic_find(LIBNAME KurentoModuleCreator VERSION ^6.18.0-dev REQUIRED)

 include (GNUInstallDirs)
 include (KurentoGitHelpers)


[CMake] Generate `gen_audio_ops.py`. (#14216)

Fixes #14004.

--- tensorflow/contrib/cmake/tf_python.cmake
+++ tensorflow/contrib/cmake/tf_python.cmake
@@ -728,6 +728,7 @@
         ${GENERATE_PYTHON_OP_LIB_DESTINATION} PARENT_SCOPE)
 endfunction()

+GENERATE_PYTHON_OP_LIB("audio_ops")
 GENERATE_PYTHON_OP_LIB("array_ops")
 GENERATE_PYTHON_OP_LIB("bitwise_ops")
 GENERATE_PYTHON_OP_LIB("math_ops")


Small BDM_LOCAL_LFS improvements

Small BDM_LOCAL_LFS improvements

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -395,8 +395,8 @@
 # environment variable is exported, and set to a directory containing tar files that
 # would have otherwise been downloaded. Directory structure and filenames of the LFS
 # must precisely match its online counterpart.
-# Example: lfs.com/biodynamo-lfs/file.tar.gz => ~/Downloads/bdm/biodynamo-lfs/file.tar.gz
-# where BDM_LOCAL_LFS=~/Downloads/bdm/
+# Example: lfs.com/biodynamo-lfs/file.tar.gz => ~/Downloads/bdm-local-lfs/file.tar.gz
+# where BDM_LOCAL_LFS=~/Downloads/bdm-local-lfs
 #
 #   URL: URL from which we will download the file
 #   DEST: destination where the contents of the tar file will be extracted to
@@ -413,12 +413,14 @@
                     COMMAND sed "s|\\(.*://[^/]*/\\)\\(.*\\)|\\1;\\2|g"
                     OUTPUT_VARIABLE URL_COMPONENTS
                     OUTPUT_STRIP_TRAILING_WHITESPACE)
-    list(GET URL_COMPONENTS 1 LFS_FILEPATH)
+    list(GET URL_COMPONENTS 1 URL_FILEPATH)
+    string(REPLACE "biodynamo-lfs" "" LFS_FILEPATH ${URL_FILEPATH})
     set(LOCAL_TAR_FILE "$ENV{BDM_LOCAL_LFS}${LFS_FILEPATH}")
     if(EXISTS "${LOCAL_TAR_FILE}")
       file(COPY ${LOCAL_TAR_FILE} DESTINATION ${DEST_PARENT})
     else()
-      message(FATAL_ERROR "\nERROR: We were unable find '${LFS_FILEPATH}' in BDM_LOCAL_LFS='$ENV{BDM_LOCAL_LFS}'\n")
+      message(FATAL_ERROR "\nERROR: We were unable find file '${LOCAL_TAR_FILE}'.\n\
+Unset the environment variable BDM_LOCAL_LFS to download the file.")
     endif()
   else()
     # Download the file


fix typo

fix typo

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -99,10 +99,10 @@

 # setup LTO
 function(setup_lto)
-        set(CMAKE_REQUIRE_FLAGS "-flto")
+        set(CMAKE_REQUIRED_FLAGS "-flto")
         CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_LTO)

-        set(CMAKE_REQUIRE_FLAGS "-fno-fat-lto-objects")
+        set(CMAKE_REQUIRED_FLAGS "-fno-fat-lto-objects")
         CHECK_CXX_SOURCE_COMPILES("${TEST_PROGRAM}" COMPILER_SUPPORTS_NO_FAT_LTO_OBJECTS)

         if(COMPILER_SUPPORTS_LTO)


Incorrect naming for output var for git in utils

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -21,7 +21,7 @@
             OUTPUT_VARIABLE VERSION_FULL
             ERROR_QUIET)

-        IF(NOT OUTPUT_VAR_)
+        IF(NOT _OUTPUT_VAR)
             EXECUTE_PROCESS(COMMAND
                 ${GIT_EXECUTABLE}
                 "log" "--oneline"
@@ -39,9 +39,9 @@
             SET(${VERSION_MAJOR_} "${_VERSION_MAJOR}" PARENT_SCOPE)
             SET(${VERSION_MINOR_} "${_VERSION_MINOR}" PARENT_SCOPE)
             SET(${VERSION_PATCH_} "${_VERSION_PATCH}" PARENT_SCOPE)
-            SET(${OUTPUT_VAR} "${_OUTPUT_VAR}" PARENT_SCOPE)
         ENDIF()
     ENDIF()
+    SET(${OUTPUT_VAR} "${_OUTPUT_VAR}" PARENT_SCOPE)
 ENDFUNCTION()

 FUNCTION(SET_VERSION VERSION)


Add variable name prefix

Add variable name prefix

--- library/cmake/Modules/FindPHP.cmake
+++ library/cmake/Modules/FindPHP.cmake
@@ -101,7 +101,7 @@
 	PHP_VERSION_STRING
 )

-set(DEVELOPMENT_COMPONENT_ACCPETED TRUE)
+set(PHP_DEVELOPMENT_COMPONENT_ACCPETED TRUE)
 if(PHP_USE_DEVELOPMENT_COMPONENT)
 	FIND_PATH(zend_path
 		NAMES "zend.h"
@@ -110,7 +110,7 @@
 	if(zend_path)
 		set(PHP_DEVELOPMENT_COMPONENT_FOUND TRUE)
 	else()
-		set(DEVELOPMENT_COMPONENT_ACCPETED FALSE)
+		set(PHP_DEVELOPMENT_COMPONENT_ACCPETED FALSE)
 	endif()
 endif()

@@ -125,5 +125,5 @@
 	PHP_INCLUDE_DIRS
 	PHP_VERSION_NUMBER
 	PHP_VERSION_STRING
-	DEVELOPMENT_COMPONENT_ACCPETED
+	PHP_DEVELOPMENT_COMPONENT_ACCPETED
 )


Squashed 'cmake/yacma/' changes from 9330fda..0e208c5

0e208c5 A few more changes.
2d28dea Small change.
bc10a6f Make PyGMO compile again.

git-subtree-dir: cmake/yacma
git-subtree-split: 0e208c595888f8e6bc958c12fab54ab6b0ef0889

--- YACMAPythonSetup.cmake
+++ YACMAPythonSetup.cmake
@@ -13,58 +13,68 @@
 message(STATUS "Python include dirs: ${PYTHON_INCLUDE_DIRS}")
 message(STATUS "Python library version: " ${PYTHONLIBS_VERSION_STRING})

-# Include the Python header dirs.
-include_directories(${PYTHON_INCLUDE_DIRS})
+# Setup the imported target for the compilation of Python modules.
+add_library(YACMA::PythonModule UNKNOWN IMPORTED)
+set_target_properties(YACMA::PythonModule PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${PYTHON_INCLUDE_DIRS}"
+  IMPORTED_LOCATION "${PYTHON_LIBRARIES}" IMPORTED_LINK_INTERFACE_LANGUAGES "C")

 # This flag is used to signal the need to override the default extension of the Python modules
 # depending on the architecture. Under Windows, for instance, CMake produces shared objects as
 # .dll files, but Python from 2.5 onwards requires .pyd files (hence the need to override).
-set(YACMA_PY_MODULE_EXTENSION "")
+set(_YACMA_PY_MODULE_EXTENSION "")

-# Determine the installation path for Python modules.
-if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+# Platform-specific setup.
+if(UNIX)
+  if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     message(STATUS "OS X platform detected.")
     # Apparently on OS X Python expects the .so extension for compiled modules.
 	  message(STATUS "Output extension for compiled modules will be '.so'.")
-    set(YACMA_PY_MODULE_EXTENSION "so")
-    # We must establish if the installation dir for Python modules is named 'site-packages' (as usual)
-    # or 'dist-packages' (apparently Ubuntu 9.04 or maybe Python 2.6, it's not clear).
+    set(_YACMA_PY_MODULE_EXTENSION "so")
+  else()
+    message(STATUS "Generic UNIX platform detected.")
+  endif()
+  if(NOT YACMA_PYTHON_MODULES_INSTALL_PATH)
+    # NOTE: here we use this contraption (instead of the simple method below for Win32) because like this we can
+    # support installation into the CMake prefix (e.g., in the user's home dir).
     execute_process(COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/yacma_python_packages_dir.py"
-        OUTPUT_VARIABLE _YACMA_PY_PACKAGES_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+      OUTPUT_VARIABLE _YACMA_PY_PACKAGES_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
     message(STATUS "Python packages dir is: ${_YACMA_PY_PACKAGES_DIR}")
-    set(YACMA_PYTHON_MODULES_INSTALL_PATH "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${_YACMA_PY_PACKAGES_DIR}")
-elseif(UNIX)
-    message(STATUS "Generic UNIX platform detected.")
-    # We must establish if the installation dir for Python modules is named 'site-packages' (as usual)
-    # or 'dist-packages' (apparently Ubuntu 9.04 or maybe Python 2.6, it's not clear).
-    execute_process(COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/yacma_python_packages_dir.py"
-        OUTPUT_VARIABLE _YACMA_PY_PACKAGES_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
-    message(STATUS "Python packages dir is: ${_YACMA_PY_PACKAGES_DIR}")
-    set(YACMA_PYTHON_MODULES_INSTALL_PATH "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${_YACMA_PY_PACKAGES_DIR}")
+    set(YACMA_PYTHON_MODULES_INSTALL_PATH "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${_YACMA_PY_PACKAGES_DIR}" CACHE PATH "Install path for Python modules.")
+    mark_as_advanced(YACMA_PYTHON_MODULES_INSTALL_PATH)
+  endif()
 elseif(WIN32)
-    message(STATUS "Windows platform detected.")
-    message(STATUS "Output extension for compiled modules will be '.pyd'.")
-    set(YACMA_PY_MODULE_EXTENSION "pyd")
+  message(STATUS "Windows platform detected.")
+  message(STATUS "Output extension for compiled modules will be '.pyd'.")
+  set(_YACMA_PY_MODULE_EXTENSION "pyd")
+  if(NOT YACMA_PYTHON_MODULES_INSTALL_PATH)
+    # On Windows, we will install directly into the install path of the Python interpreter.
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
-        OUTPUT_VARIABLE YACMA_PYTHON_MODULES_INSTALL_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
+      OUTPUT_VARIABLE _YACMA_PYTHON_MODULES_INSTALL_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
+    set(YACMA_PYTHON_MODULES_INSTALL_PATH "${_YACMA_PYTHON_MODULES_INSTALL_PATH}" CACHE PATH "Install path for Python modules.")
+    mark_as_advanced(YACMA_PYTHON_MODULES_INSTALL_PATH)
+  endif()
+else()
+  message(FATAL_ERROR "Platform not supported.")
 endif()

+# Check the install path was actually detected.
 if("${YACMA_PYTHON_MODULES_INSTALL_PATH}" STREQUAL "")
   message(FATAL_ERROR "Python module install path not detected correctly.")
 endif()

-message(STATUS "Python modules install path: " "${YACMA_PYTHON_MODULES_INSTALL_PATH}")
+message(STATUS "Python modules install path: ${YACMA_PYTHON_MODULES_INSTALL_PATH}")

-macro(YACMA_PYTHON_MODULE name)
-    message(STATUS "Setting up the compilation of the Python module \"${name}\".")
+function(YACMA_PYTHON_MODULE name)
+    message(STATUS "Setting up the compilation of the Python module '${name}'.")
     # A Python module is a shared library.
+    # TODO can this become a MODULE?
     add_library("${name}" SHARED ${ARGN})
     # Any "lib" prefix normally added by CMake must be removed.
     set_target_properties("${name}" PROPERTIES PREFIX "")
-    if(NOT ${YACMA_PY_MODULE_EXTENSION} STREQUAL "")
+    if(NOT ${_YACMA_PY_MODULE_EXTENSION} STREQUAL "")
         # If needed, set a custom extension for the module.
-        message(STATUS "Setting up custom extension \"${YACMA_PY_MODULE_EXTENSION}\" for the Python module \"${name}\".")
-        set_target_properties("${name}" PROPERTIES SUFFIX ".${YACMA_PY_MODULE_EXTENSION}")
+        message(STATUS "Setting up custom extension '${_YACMA_PY_MODULE_EXTENSION}' for the Python module '${name}'.")
+        set_target_properties("${name}" PROPERTIES SUFFIX ".${_YACMA_PY_MODULE_EXTENSION}")
     endif()
     # We need extra flags to be set when compiling Python modules, at least
     # with clang and gcc. See:
@@ -73,20 +83,28 @@
     # NOTE: not sure here how we should set flags up for MSVC or clang on windows, need
     # to check in the future.
     if(YACMA_COMPILER_IS_GNUCXX OR YACMA_COMPILER_IS_CLANGXX)
-        message(STATUS "Setting up extra compiler flag \"-fwrapv\" for the Python module \"${name}\".")
+        message(STATUS "Setting up extra compiler flag '-fwrapv' for the Python module '${name}'.")
         set_target_properties("${name}" PROPERTIES COMPILE_FLAGS "-fwrapv")
         set_target_properties("${name}" PROPERTIES LINK_FLAGS "-fwrapv")
         if(${PYTHON_VERSION_MAJOR} LESS 3)
-            message(STATUS "Python < 3 detected, setting up extra compiler flag \"-fno-strict-aliasing\" for the Python module \"${name}\".")
+            message(STATUS "Python < 3 detected, setting up extra compiler flag '-fno-strict-aliasing' for the Python module '${name}'.")
             set_target_properties("${name}" PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing")
             set_target_properties("${name}" PROPERTIES LINK_FLAGS "-fno-strict-aliasing")
         endif()
     endif()
-endmacro()
+    target_link_libraries("${name}" PRIVATE YACMA::PythonModule)
+endfunction()

-# Look if NumPy is avaiable.
-execute_process(COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/yacma_numpy_includes_dir.py"
-    OUTPUT_VARIABLE YACMA_NUMPY_INCLUDES_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+# Look for the NumPy headers.
+if(NOT YACMA_NUMPY_INCLUDES_DIR)
+  # Look if NumPy is avaiable.
+  execute_process(COMMAND ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/yacma_numpy_includes_dir.py"
+    OUTPUT_VARIABLE _YACMA_NUMPY_INCLUDES_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(_YACMA_NUMPY_INCLUDES_DIR)
+    set(YACMA_NUMPY_INCLUDES_DIR "${_YACMA_NUMPY_INCLUDES_DIR}" CACHE PATH "Path to the include files for NumPy.")
+    mark_as_advanced(YACMA_NUMPY_INCLUDES_DIR)
+  endif()
+endif()
 if(YACMA_NUMPY_INCLUDES_DIR)
     message(STATUS "NumPy includes dir: ${YACMA_NUMPY_INCLUDES_DIR}")
 else()


Disable additional paraview plugins

Disable additional paraview plugins

--- Projects/paraview.cmake
+++ Projects/paraview.cmake
@@ -9,6 +9,7 @@
     -DPARAVIEW_BUILD_PLUGIN_AdiosReader:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_AnalyzeNIfTIIO:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_ArrowGlyph:BOOL=FALSE
+    -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_EyeDomeLighting:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_ForceTime:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_GMVReader:BOOL=FALSE
@@ -20,6 +21,7 @@
     -DPARAVIEW_BUILD_PLUGIN_PacMan:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_PointSprite:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_PrismPlugin:BOOL=FALSE
+    -DPARAVIEW_BUILD_PLUGIN_pvblot:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_QuadView:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=FALSE
     -DPARAVIEW_BUILD_PLUGIN_SciberQuestToolKit:BOOL=FALSE


modified pgmlink.cmake

modified pgmlink.cmake

--- pgmlink.cmake
+++ pgmlink.cmake
@@ -18,8 +18,17 @@
 include (opengm)
 include (dlib)

+if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+    # need other branch on macos
+    set(GIT_BRANCH "mac_os")
+    set(TEST_STRING "")
+else (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+     set(GIT_BRANCH "master")
+     set(TEST_STRING "${BUILDEM_ENV_STRING} make test")
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+
 external_git_repo (pgmlink
-    HEAD
+    ${GIT_BRANCH}
     https://github.com/ilastik/pgmlink)

@@ -43,7 +52,7 @@

     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
-    TEST_COMMAND        ${BUILDEM_ENV_STRING} make test
+    TEST_COMMAND        ${TEST_STRING}
 )

 set_target_properties(${pgmlink_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)


GREATER_EQUAL only available since CMake v3.7

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -24,10 +24,10 @@
     SET(ISPC_DIR_SUFFIX "osx")
   ELSEIF(WIN32)
     SET(ISPC_DIR_SUFFIX "windows")
-    IF (MSVC_VERSION GREATER_EQUAL 1900)
+    IF (MSVC_VERSION LESS 1900)
+      LIST(APPEND ISPC_DIR_SUFFIX "windows-vs2013")
+    ELSE()
       LIST(APPEND ISPC_DIR_SUFFIX "windows-vs2015")
-    ELSE()
-      LIST(APPEND ISPC_DIR_SUFFIX "windows-vs2013")
     ENDIF()
   ELSE()
     SET(ISPC_DIR_SUFFIX "linux")


[FIX] Fixing CTD creation, should work again.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13673 e6417c60-b987-48fd-844e-b20f0fcc1017

--- util/cmake/SeqAnCtdSetup.cmake
+++ util/cmake/SeqAnCtdSetup.cmake
@@ -74,7 +74,7 @@

 # We will create the contents of the payload directory temporarily within the
 # output directory.
-set (PAYLOAD_TMP_PATH ${WORKFLOW_PLUGIN_DIR}/payload.tmp)
+set (PAYLOAD_TMP_PATH ${CMAKE_BINARY_DIR}/CMakeFiles/payload.tmp)
 set (PAYLOAD_TMP_BIN_PATH ${PAYLOAD_TMP_PATH}/bin)

 # ============================================================================
@@ -90,7 +90,7 @@
                     DEPENDS ${WORKFLOW_PLUGIN_DIR})
 # Create directory: workflow_plugin_dir/descriptors
 add_custom_command (OUTPUT ${CTD_PATH}
-                    COMMAND ${CMAKE_COMMAND} -E make_directory ${WORKFLOW_PLUGIN_DIR}
+                    COMMAND ${CMAKE_COMMAND} -E make_directory ${CTD_PATH}
                     DEPENDS ${WORKFLOW_PLUGIN_DIR})
 # Create directory: workflow_plugin_dir/payload
 add_custom_command (OUTPUT ${PAYLOAD_PATH}
@@ -183,6 +183,31 @@
 endforeach ()

 # ============================================================================
+# Eclipse Plugin Files.
+# ============================================================================
+
+# If possible, get latest change date from SeqAn SVN.
+find_package(Subversion)
+if (Subversion_FOUND)
+  file (TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}" _SEQAN_SOURCE_DIR)
+  Subversion_WC_INFO (${_SEQAN_SOURCE_DIR} SEQAN)
+  string(REGEX REPLACE "^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+).*"
+    "\\1\\2\\3\\4\\5" SEQAN_LAST_CHANGE_DATE "${SEQAN_WC_LAST_CHANGED_DATE}")
+  set (CF_SEQAN_VERSION ${SEQAN_VERSION_STRING}.${SEQAN_LAST_CHANGE_DATE})
+else ()
+  set (CF_SEQAN_VERSION "${SEQAN_VERSION_STRING}")
+endif ()
+
+# plugin.properties
+add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/plugin.properties
+                    COMMAND ${CMAKE_COMMAND} "-DSEQAN_SOURCE_DIR=${CMAKE_SOURCE_DIR}"
+                                             "-DWORKFLOW_PLUGIN_DIR=${WORKFLOW_PLUGIN_DIR}"
+                                             "-DCF_SEQAN_VERSION=${CF_SEQAN_VERSION}"
+                                             -P "${CMAKE_SOURCE_DIR}/util/cmake/ctd/configure_profile_properties.cmake"
+                    DEPENDS ${WORKFLOW_PLUGIN_DIR}
+                            ${CMAKE_SOURCE_DIR}/util/cmake/ctd/plugin.properties.in)
+
+# ============================================================================
 # Static Files.
 # ============================================================================

@@ -199,7 +224,7 @@
 # Icon files.
 foreach (_FILE category.png splash.png)
   add_custom_command (OUTPUT ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE}
-                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${FILE}
+                      COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${_FILE}
                                                        ${WORKFLOW_PLUGIN_DIR}/icons/${_FILE}
                       DEPENDS ${WORKFLOW_PLUGIN_DIR}/icons
                               ${CMAKE_SOURCE_DIR}/util/cmake/ctd/icons/${FILE})
@@ -214,5 +239,6 @@
                    DEPENDS ${DESCRIPTOR_FILES}
                            ${STATIC_FILES}
                            ${ICON_FILES}
+                           ${WORKFLOW_PLUGIN_DIR}/plugin.properties
                            ${_ZIP_PATH}/${_ZIP_NAME})


Updated the FindODA.cmake file to include BIM components.

--- cmake_modules/FindODA.cmake
+++ cmake_modules/FindODA.cmake
@@ -19,7 +19,7 @@
 #ODA_LIBRARIES will point to the libraries

 set(ODA_LIB_NAMES
-	TD_ExamplesCommon TG_ExamplesCommon TG_Db TD_DbRoot TD_Gs TD_Gi TD_Ge TD_Root TD_Alloc)
+	TD_ExamplesCommon TG_ExamplesCommon TB_ExamplesCommon TG_Db TD_DbRoot TD_Gs TD_Gi TD_Ge TD_Root TD_Alloc TB_Loader TB_Database TB_Base TB_ModelerGeometry TD_Br TD_TfCore Secur32 TB_Main TB_MEP TB_Analytical TB_Architecture TB_StairsRamp TB_Geometry)

 if(DEFINED ENV{ODA_LIB_DIR})
@@ -42,6 +42,12 @@
 			${ODA_ROOT}/Dgn/Examples/Common
 			${ODA_ROOT}/Dgn/Extensions/ExServices
 			${ODA_ROOT}/Kernel/Extensions/ExServices
+			${ODA_ROOT}/Bim/Include
+			${ODA_ROOT}/Bim/Extensions
+			${ODA_ROOT}/Bim/Extensions/ExServices
+			${ODA_ROOT}/Bim/Examples/Common
+			${ODA_ROOT}/Bim/Examples
+			${ODA_ROOT}/Prc/Include
 	)

 	foreach(libName ${ODA_LIB_NAMES})


Removed unnecessary IS_IOS flag, also defined in support/iOS.cmake

--- Googlify.cmake
+++ Googlify.cmake
@@ -8,10 +8,6 @@

 option(IOS_BUILD "Build for iOS" OFF)
 option(IOS_SIMULATOR_BUILD "Build for iOS simulator" OFF)
-
-if (IOS_BUILD OR IOS_SIMULATOR_BUILD)
-  set(IOS TRUE)
-endif ()

 if (${IOS_BUILD})
   set(IOS_PLATFORM "OS")


Pass more cmake flags down to external projects

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -39,10 +39,16 @@
   "-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}"
   "-DBUILD_DOCUMENTATION:BOOL=OFF"
   "-DENABLE_TESTING:BOOL=OFF"
+  "-DCMAKE_C_COMPILER_LAUNCHER:FILEPATH=${CMAKE_C_COMPILER_LAUNCHER}"
+  "-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}"
+  "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
+  "-DCMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=${CMAKE_CXX_COMPILER_LAUNCHER}"
+  "-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}"
+  "-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}"
   "-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}"
-  "-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}"
-  "-DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}"
-  "-DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}"
+  "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}"
+  "-DCMAKE_SHARED_LINKER_FLAGS:STRING=${CMAKE_SHARED_LINKER_FLAGS}"
+  "-DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}"
   )

 # Find required external dependencies


CMake: The try-compile test that used to find out if clang uses libc++ now stopped working on Mac OS X, so this updates it a bit. Also adds -stdlib=.. to LLVM C/LD flags.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -425,18 +425,18 @@
   if(NOT DEFINED ${CACHE_VAR_NAME})
     set(CLANGXX_WORKS 0)

-    custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL)
+    custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream> \n  #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL)

     if(NOT _STATUS_FAIL)
       set(CLANGXX_STDLIB "")
       set(CLANGXX_WORKS 1)
     else()
-      custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libstdc++")
+      custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream> \n  #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libstdc++")
       if (NOT _STATUS_FAIL)
         set(CLANGXX_STDLIB "-stdlib=libstdc++")
         set(CLANGXX_WORKS 1)
       else()
-        custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libc++")
+        custom_try_compile_clangxx("namespace std { class type_info; } \n  #include <iostream> \n  #include <type_traits>" "std::cout << \"Hello clang++ world!\" << std::endl;" _STATUS_FAIL "-stdlib=libc++")
         if(NOT _STATUS_FAIL)
           set(CLANGXX_STDLIB "-stdlib=libc++")
           set(CLANGXX_WORKS 1)
@@ -451,6 +451,11 @@

   set(CLANGXX_WORKS 0)

+endif()
+
+if(CLANGXX_STDLIB AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
+  set(LLVM_CXXFLAGS "${CLANGXX_STDLIB} ${LLVM_CXXFLAGS}")
+  set(LLVM_LDFLAGS "${CLANGXX_STDLIB} ${LLVM_LDFLAGS}")
 endif()

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


[noetic] Error message python-empy -> python3-empy (#1095)

In Noetic the rosdep key (and debian package name) to use is `python3-empy`.

--- cmake/empy.cmake
+++ cmake/empy.cmake
@@ -27,7 +27,7 @@
     # On OSX, there's an em.py, but not an executable empy script
     find_python_module(em)
     if(NOT PY_EM)
-      message(FATAL_ERROR "Unable to find either executable 'empy' or Python module 'em'... try installing the package 'python-empy'")
+      message(FATAL_ERROR "Unable to find either executable 'empy' or Python module 'em'... try installing the package 'python3-empy'")
     endif()
     # ensure to use cmake-style path separators on Windows
     file(TO_CMAKE_PATH "${PY_EM}" EMPY_SCRIPT)


ENH: Move AtlasWerks to new Iowa git repository

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -365,8 +365,10 @@
 # ===== AtlasWerks ================================================================
 # code for external tools from http://github.com/Chaircrusher/AtlasWerksBuilder/blob/master/CMakeLists.txt
 set( SourceCodeArgs
-  URL "http://www.sci.utah.edu/releases/atlaswerks_v0.1.4/AtlasWerks_0.1.4_Linux.tgz"
-  URL_MD5 05fc867564e3340d0d448dd0daab578a
+#  URL "http://www.sci.utah.edu/releases/atlaswerks_v0.1.4/AtlasWerks_0.1.4_Linux.tgz"
+#  URL_MD5 05fc867564e3340d0d448dd0daab578a
+  GIT_REPOSITORY "${git_protocol}://github.com/BRAINSia/AtlasWerks.git"
+  GIT_TAG "ecd6891216ccbc7ccf3fdb589182ae503189a960" # 02-01-2013 fix bug with clang mac build
   )
 set( CMAKE_ExtraARGS
   -DITK_DIR:PATH=${ITK_DIR}


Updated FindOGRE.cmake to properly set OGRE_${COMPONENT}_BINARY variables with paths to the corresponding DLLs

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -333,47 +333,51 @@
 endif()

+#########################################################
+# Find Ogre components
+#########################################################
+
+set(OGRE_COMPONENT_SEARCH_PATH_REL
+  ${OGRE_LIBRARY_DIR_REL}/..
+  ${OGRE_LIBRARY_DIR_REL}/../..
+  ${OGRE_BIN_SEARCH_PATH}
+)
+set(OGRE_COMPONENT_SEARCH_PATH_DBG
+  ${OGRE_LIBRARY_DIR_DBG}/..
+  ${OGRE_LIBRARY_DIR_DBG}/../..
+  ${OGRE_BIN_SEARCH_PATH}
+)
+
+macro(ogre_find_component COMPONENT HEADER)
+  findpkg_begin(OGRE_${COMPONENT})
+  find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${COMPONENT} OGRE/${COMPONENT} Components/${COMPONENT}/include)
+  set(OGRE_${COMPONENT}_LIBRARY_NAMES "Ogre${COMPONENT}${OGRE_LIB_SUFFIX}")
+  get_debug_names(OGRE_${COMPONENT}_LIBRARY_NAMES)
+  find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
+  find_library(OGRE_${COMPONENT}_LIBRARY_DBG NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
+  make_library_set(OGRE_${COMPONENT}_LIBRARY)
+  findpkg_finish(OGRE_${COMPONENT})
+  if (OGRE_${COMPONENT}_FOUND)
+    # find binaries
+    if (NOT OGRE_STATIC)
+	  if (WIN32)
+	    find_file(OGRE_${COMPONENT}_BINARY_REL NAMES "Ogre${COMPONENT}.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_REL} PATH_SUFFIXES "" bin bin/release bin/relwithdebinfo bin/minsizerel release)
+	    find_file(OGRE_${COMPONENT}_BINARY_DBG NAMES "Ogre${COMPONENT}_d.dll" HINTS ${OGRE_COMPONENT_SEARCH_PATH_DBG} PATH_SUFFIXES "" bin bin/debug debug)
+	  endif()
+	  mark_as_advanced(OGRE_${COMPONENT}_BINARY_REL OGRE_${COMPONENT}_BINARY_DBG)
+    endif()
+  endif()
+endmacro()

 # look for Paging component
-findpkg_begin(OGRE_Paging)
-find_path(OGRE_Paging_INCLUDE_DIR NAMES OgrePaging.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Paging OGRE/Paging Components/Paging/include)
-set(OGRE_Paging_LIBRARY_NAMES "OgrePaging${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Paging_LIBRARY_NAMES)
-find_library(OGRE_Paging_LIBRARY_REL NAMES ${OGRE_Paging_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Paging_LIBRARY_DBG NAMES ${OGRE_Paging_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-set(OGRE_Paging_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
-make_library_set(OGRE_Paging_LIBRARY)
-findpkg_finish(OGRE_Paging)
-
+ogre_find_component(Paging OgrePaging.h)
 # look for Terrain component
-findpkg_begin(OGRE_Terrain)
-find_path(OGRE_Terrain_INCLUDE_DIR NAMES OgreTerrain.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Terrain OGRE/Terrain Components/Terrain/include)
-set(OGRE_Terrain_LIBRARY_NAMES "OgreTerrain${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Terrain_LIBRARY_NAMES)
-find_library(OGRE_Terrain_LIBRARY_REL NAMES ${OGRE_Terrain_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Terrain_LIBRARY_DBG NAMES ${OGRE_Terrain_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_Terrain_LIBRARY)
-findpkg_finish(OGRE_Terrain)
-
+ogre_find_component(Terrain OgreTerrain.h)
 # look for Property component
-findpkg_begin(OGRE_Property)
-find_path(OGRE_Property_INCLUDE_DIR NAMES OgreProperty.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES Property OGRE/Property Components/Property/include)
-set(OGRE_Property_LIBRARY_NAMES "OgreProperty${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_Property_LIBRARY_NAMES)
-find_library(OGRE_Property_LIBRARY_REL NAMES ${OGRE_Property_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_Property_LIBRARY_DBG NAMES ${OGRE_Property_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_Property_LIBRARY)
-findpkg_finish(OGRE_Property)
-
+ogre_find_component(Property OgreProperty.h)
 # look for RTShaderSystem component
-findpkg_begin(OGRE_RTShaderSystem)
-find_path(OGRE_RTShaderSystem_INCLUDE_DIR NAMES OgreRTShaderSystem.h HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES RTShaderSystem OGRE/RTShaderSystem Components/RTShaderSystem/include)
-set(OGRE_RTShaderSystem_LIBRARY_NAMES "OgreRTShaderSystem${OGRE_LIB_SUFFIX}")
-get_debug_names(OGRE_RTShaderSystem_LIBRARY_NAMES)
-find_library(OGRE_RTShaderSystem_LIBRARY_REL NAMES ${OGRE_RTShaderSystem_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "release" "relwithdebinfo" "minsizerel")
-find_library(OGRE_RTShaderSystem_LIBRARY_DBG NAMES ${OGRE_RTShaderSystem_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "debug")
-make_library_set(OGRE_RTShaderSystem_LIBRARY)
-findpkg_finish(OGRE_RTShaderSystem)
+ogre_find_component(RTShaderSystem OgreRTShaderSystem.h)
+

 #########################################################
 # Find Ogre plugins


Mac: link objc library on Mac build

Mac: link objc library on Mac build

--- CMakeModules/FindDC1394.cmake
+++ CMakeModules/FindDC1394.cmake
@@ -20,10 +20,11 @@
   add_library(libusb STATIC IMPORTED)
   set_property(TARGET libusb PROPERTY IMPORTED_LOCATION /usr/local/lib/libusb-1.0.a)

-  SET(DC1394_LIBRARIES
+  SET(DC1394_LIBRARIES
         dc1394
         libusb
+         -lobjc
         ${IOKIT_LIBRARY} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY})

   set(DC1394_INCLUDE_DIRS ${DC1394_INCLUDE_DIR}/.. )
-ENDIF(APPLE)+ENDIF(APPLE)


add in md5 for file verification

add in md5 for file verification

--- cmake/BuildBoost.cmake
+++ cmake/BuildBoost.cmake
@@ -27,6 +27,7 @@
     BUILD_BYPRODUCTS ${Boost_LIBRARIES}
     ARGS
         URL ${BOOST_URL}
+        URL_MD5 "564efc7a6c7fb746fc06d7da24fa0c74"
         SOURCE_DIR ${BOOST_SRC}
         BINARY_DIR ${BOOST_SRC}
         CONFIGURE_COMMAND "./bootstrap.sh"


pcre2 debug libraries on win [ci skip]

pcre2 debug libraries on win [ci skip]

--- cmake/BuildPCRE2.cmake
+++ cmake/BuildPCRE2.cmake
@@ -42,10 +42,10 @@
   PREFIX "${CMAKE_CURRENT_BINARY_DIR}/pcre2"
   CMAKE_ARGS ${_PCRE2_CMAKE_ARGS}
   CMAKE_CACHE_ARGS ${_CMAKE_CACHE_ARGS}
-  INSTALL_COMMAND "${CMAKE_MAKE_PROGRAM}" install "DESTDIR="
+  # INSTALL_COMMAND "${CMAKE_MAKE_PROGRAM}" install "DESTDIR="
   )
 SET (PCRE2_INCLUDE_DIR "${3RDPARTY_OUTPUT_PATH}/include")
-IF (WIN32 AND (CMAKE_BUILD_TYPE STREQUAL Debug))
+IF (WIN32 AND ((CMAKE_BUILD_TYPE STREQUAL Debug) OR (CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo)))
   SET (PCRE2_LINK_FLAGS  "${3RDPARTY_OUTPUT_PATH}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pcre2-8d${CMAKE_STATIC_LIBRARY_SUFFIX}")
 ELSE ()
   SET (PCRE2_LINK_FLAGS  "${3RDPARTY_OUTPUT_PATH}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pcre2-8${CMAKE_STATIC_LIBRARY_SUFFIX}")


Update build script to support more distros

--- cmake/FindLuaJIT.cmake
+++ cmake/FindLuaJIT.cmake
@@ -11,7 +11,7 @@
 find_path(LUA_INCLUDE_DIR luajit.h
   HINTS
     ENV LUA_DIR
-  PATH_SUFFIXES include/luajit-2.0 include/luajit-2.1 include
+  PATH_SUFFIXES include/luajit-2.0 include/luajit-2.1 include/luajit-5_1-2.1 include
   PATHS
   ~/Library/Frameworks
   /Library/Frameworks


Separate detection of scotch and ptscotch

Closes #188

--- cmake/FindScotch.cmake
+++ cmake/FindScotch.cmake
@@ -7,19 +7,39 @@
         PATH_SUFFIXES scotch
         )

-
     find_library(SCOTCH_LIBRARY       scotch      PATHS $ENV{SCOTCHDIR})
-    find_library(PTSCOTCH_LIBRARY     ptscotch    PATHS $ENV{SCOTCHDIR})
     find_library(SCOTCHERR_LIBRARY    scotcherr   PATHS $ENV{SCOTCHDIR})
-    find_library(PTSCOTCHERR_LIBRARY  ptscotcherr PATHS $ENV{SCOTCHDIR})
+endif()

+if (NOT (PTScotch_INCLUDES AND PTScotch_LIBRARIES))
+    find_path(PTScotch_INCLUDES
+        NAMES ptscotch.h
+        PATHS $ENV{PTSCOTCHDIR}
+        PATH_SUFFIXES scotch ptscotch
+        )
+
+    find_library(PTSCOTCH_LIBRARY     ptscotch    PATHS $ENV{PTSCOTCHDIR})
+    find_library(PTSCOTCHERR_LIBRARY  ptscotcherr PATHS $ENV{PTSCOTCHDIR})
+endif()
+
+if (Scotch_INCLUDES AND SCOTCH_LIBRARY AND SCOTCHERR_LIBRARY AND
+        PTScotch_INCLUDES AND PTSCOTCH_LIBRARY AND PTSCOTCHERR_LIBRARY)
     set(Scotch_LIBRARIES
-        "${SCOTCH_LIBRARY};${PTSCOTCH_LIBRARY};${SCOTCHERR_LIBRARY};${PTSCOTCHERR_LIBRARY}"
+        "${SCOTCH_LIBRARY};${SCOTCHERR_LIBRARY};${PTSCOTCH_LIBRARY};${PTSCOTCHERR_LIBRARY}"
         )
 endif()

 include(FindPackageHandleStandardArgs)
+
 find_package_handle_standard_args(
-    Scotch DEFAULT_MSG Scotch_INCLUDES Scotch_LIBRARIES)
+    Scotch DEFAULT_MSG
+    Scotch_INCLUDES PTScotch_INCLUDES
+    Scotch_LIBRARIES PTScotch_LIBRARIES
+    )

-mark_as_advanced(Scotch_INCLUDES Scotch_LIBRARIES)
+mark_as_advanced(
+    Scotch_INCLUDES
+    Scotch_LIBRARIES
+    PTScotch_INCLUDES
+    PTScotch_LIBRARIES
+    )


cmake: Use FindPackageHandleStandardArgs module for WinDbg.

--- cmake/FindWinDbg.cmake
+++ cmake/FindWinDbg.cmake
@@ -3,7 +3,7 @@
 #   WINDBG_DIR               : full path to Windbg root dir
 #

-include (FindPackageMessage)
+include (FindPackageHandleStandardArgs)

 if (WIN32)
     find_path (WINDBG_DIR
@@ -21,8 +21,4 @@
     mark_as_advanced (WINDBG_DIR)
 endif (WIN32)

-if (WINDBG_DIR)
-    set (WINDBG_FOUND 1)
-    find_package_message (WINDBG "Found WinDbg: ${WINDBG_DIR}" "[${WINDBG_DIR}]")
-endif ()
-mark_as_advanced (WINDBG_FOUND)
+find_package_handle_standard_args (WinDbg DEFAULT_MSG WINDBG_DIR)


Deal properly with the case where the Qt4 development environment is not
found.

svn path=/trunk/; revision=10349

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -81,6 +81,11 @@
     set(qt_LINK_FLAGS)
     set(qt_RPATH ${QT_LIBRARY_DIR})
     #message("qt_LIBRARY_DIR = ${qt_LIBRARY_DIR}")
+  else(QT4_FOUND)
+    message(STATUS "WARNING: Qt4 development environment not found so "
+      "disabling all qt devices."
+      )
+    set(ANY_QT_DEVICE OFF)
   endif(QT4_FOUND)
 endif(ANY_QT_DEVICE)


r9164/sofa : FIX: SofaHelper compilation on Windows

Former-commit-id: aa9ca1de12f78f5f40ef71752189dacf86b708fe

--- cmake/pre-config.cmake
+++ cmake/pre-config.cmake
@@ -24,13 +24,13 @@
 if(WIN32)
 	set(OPENGL_LIBRARIES "opengl32")
 	set(GLEW_LIBRARIES "glew32")
-        set(GLUT_LIBRARIES "glut32")
-        set(PNG_LIBRARIES "png")
+	set(GLUT_LIBRARIES "glut32")
+	set(PNG_LIBRARIES "libpng")
 else()
 	find_library(OPENGL_LIBRARIES "opengl")
 	find_library(GLEW_LIBRARIES "glew")
 	find_library(GLUT_LIBRARIES "glut")
-        find_library(PNG_LIBRARIES "png")
+	find_library(PNG_LIBRARIES "png")
 endif()
 set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} CACHE INTERNAL "OpenGL Library")
 set(GLEW_LIBRARIES ${GLEW_LIBRARIES} CACHE INTERNAL "GLEW Library")


fix logic when only gtest is present (#919)

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -266,7 +266,7 @@
                              "${_gmock_source_paths}" _gmock_found
                              _gmock_base_dir _gmock_include_dir _gmock_lib_dir
                              _gmock_libs _gmock_main_libs)
-  if(gmock_found)
+  if(_gmock_found)
     set(${gmock_found} ${_gmock_found} PARENT_SCOPE)
     set(${gmock_base_dir} ${_gmock_base_dir} PARENT_SCOPE)
     set(${gmock_include_dir} ${_gmock_include_dir} PARENT_SCOPE)


Revert "don't export the the hl lib unless we build it"

This reverts commit 3fbab3ca260215a68a66f0e9d043f80ab6c9542c.

--- CMake/vtkHDF5Library.cmake
+++ CMake/vtkHDF5Library.cmake
@@ -11,10 +11,7 @@
   SET(HDF5_EXPORTED_TARGETS ${VTK_INSTALL_EXPORT_NAME})

   IF(NOT VTK_INSTALL_NO_LIBRARIES)
-    SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5)
-    IF(HDF5_BUILD_HL_LIB)
-       SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5_hl)
-    ENDIF(HDF5_BUILD_HL_LIB)
+    SET_PROPERTY(GLOBAL APPEND PROPERTY VTK_TARGETS vtkhdf5 vtkhdf5_hl)
   ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)

   # Silence HDF5's warnings. We'll let them get fixed upstream


Add the auto init compile definitions for Tcl

These are necessary in order to initialize the object factories etc when
using Tcl, and follow the same pattern used in Python and Java.

Change-Id: Id79cd0ada11fb8b110ada4db1893e66f075a0acc

--- CMake/vtkTclWrapping.cmake
+++ CMake/vtkTclWrapping.cmake
@@ -61,6 +61,10 @@
   endif()
   vtk_wrap_tcl3(${tcl_module}TCL Tcl_SRCS "${module_srcs}" "")
   vtk_add_library(${tcl_module}TCL ${Tcl_SRCS} ${extra_srcs})
+  if(VTK_MODULE_${module_name}_IMPLEMENTS)
+    set_property(TARGET ${module_name}TCL PROPERTY COMPILE_DEFINITIONS
+      "${module_name}_AUTOINIT=1(${module_name})")
+  endif()
   target_link_libraries(${tcl_module}TCL ${module_name}
     ${extra_links} ${VTK_TCL_LIBRARIES})
 endfunction()


[FIX] make static builds work on freebsd

--- util/cmake/FindSeqAn.cmake
+++ util/cmake/FindSeqAn.cmake
@@ -288,7 +288,7 @@
 if (_SEQAN_HAVE_EXECINFO)
   set(SEQAN_DEFINITIONS ${SEQAN_DEFINITIONS} "-DSEQAN_HAS_EXECINFO=1")
   if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
-    set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} execinfo)
+    set (SEQAN_LIBRARIES ${SEQAN_LIBRARIES} execinfo elf)
   endif (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
 endif (_SEQAN_HAVE_EXECINFO)


CentOS 8 has llvm 11.

CentOS 8 has llvm 11.

--- default_build_settings.cmake
+++ default_build_settings.cmake
@@ -31,11 +31,7 @@
 function(setup_vespa_default_build_settings_centos_8)
   message("-- Setting up default build settings for centos 8")
   set(DEFAULT_EXTRA_INCLUDE_DIRECTORY "${VESPA_DEPS}/include" "/usr/include/openblas" PARENT_SCOPE)
-  if (VESPA_OS_DISTRO_NAME STREQUAL "CentOS Stream")
-    set(DEFAULT_VESPA_LLVM_VERSION "11" PARENT_SCOPE)
-  else()
-    set(DEFAULT_VESPA_LLVM_VERSION "10" PARENT_SCOPE)
-  endif()
+  set(DEFAULT_VESPA_LLVM_VERSION "11" PARENT_SCOPE)
 endfunction()

 function(setup_vespa_default_build_settings_darwin)


added miniapps to dashboard

added miniapps to dashboard

--- CMake/MITKDashboardSetup.cmake
+++ CMake/MITKDashboardSetup.cmake
@@ -107,6 +107,14 @@
   set(MITK_BUILD_EXAMPLES TRUE)
 endif()

+if(NOT BUILD_DiffusionCoreMiniApps)
+  set(BUILD_DiffusionCoreMiniApps TRUE)
+endif()
+
+if(NOT BUILD_FiberTrackingMiniApps)
+  set(BUILD_FiberTrackingMiniApps TRUE)
+endif()
+
 set(INITIAL_CMAKECACHE_OPTIONS "
 BLUEBERRY_BUILD_ALL_PLUGINS:BOOL=${MITK_BUILD_ALL_PLUGINS}
 MITK_BUILD_ALL_PLUGINS:BOOL=${MITK_BUILD_ALL_PLUGINS}


fixed cmake regression

fixed cmake regression

--- CMakeModules/FindCOLLADA.cmake
+++ CMakeModules/FindCOLLADA.cmake
@@ -29,7 +29,7 @@
 ELSEIF(MINGW)
     SET(COLLADA_BUILDNAME "mingw")
     SET(COLLADA_BOOST_BUILDNAME ${COLLADA_BUILDNAME})
-ELSEIF(MSVC_VERSION GREATER_EQUAL 1900 )
+ELSEIF((MSVC_VERSION GREATER 1900) OR (MSVC_VERSION EQUAL 1900))
     SET(COLLADA_BUILDNAME "vc14")
     SET(COLLADA_BOOST_BUILDNAME "vc140")
 ELSEIF(MSVC_VERSION EQUAL 1800)


BUILD: Fixing build issues for older cmake versions

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -2,22 +2,21 @@

 SET(prefix ${CMAKE_BINARY_DIR}/third_party/forge)

+# FIXME: Cannot use $<CONFIG> generator expression here because add_custom_command
+#        does not yet support it for the OUTPUT argument, see also:
+#        - Old "duplicate":   https://cmake.org/Bug/view.php?id=12877
+#        - Old issue tracker: https://cmake.org/Bug/view.php?id=13840
+#        - New issue tracker: https://gitlab.kitware.com/cmake/cmake/issues/13840
+#        In the meantime, use CMAKE_BUILD_TYPE if set by user, assuming that it
+#        is the primary build configuration used. Otherwise, default to Release.
+IF(CMAKE_BUILD_TYPE)
+    SET(forge_lib_config ${CMAKE_BUILD_TYPE})
+ELSE()
+    SET(forge_lib_config Release)
+ENDIF()
 IF(CMAKE_GENERATOR MATCHES "Xcode") # TODO: Also for "Visual Studio"?
-    # FIXME: Cannot use $<CONFIG> generator expression here because add_custom_command
-    #        does not yet support it for the OUTPUT argument, see also:
-    #        - Old "duplicate":   https://cmake.org/Bug/view.php?id=12877
-    #        - Old issue tracker: https://cmake.org/Bug/view.php?id=13840
-    #        - New issue tracker: https://gitlab.kitware.com/cmake/cmake/issues/13840
-    #        In the meantime, use CMAKE_BUILD_TYPE if set by user, assuming that it
-    #        is the primary build configuration used. Otherwise, default to Release.
-    IF(CMAKE_BUILD_TYPE)
-        SET(forge_lib_config ${CMAKE_BUILD_TYPE})
-    ELSE()
-        SET(forge_lib_config Release)
-    ENDIF()
     SET(forge_lib_infix "/${forge_lib_config}")
 ELSE()
-    SET(forge_lib_config "$<CONFIG>")
     SET(forge_lib_infix)
 ENDIF()
 IF(WIN32)


Need to include some more boost headers for boost 1.50+

--HG--
branch : v1-8

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -180,7 +180,6 @@
       PATTERN "asio" EXCLUDE
       PATTERN "assign" EXCLUDE
       PATTERN "bimap" EXCLUDE
-      PATTERN "chrono" EXCLUDE
       PATTERN "circular_buffer" EXCLUDE
       PATTERN "compatibility" EXCLUDE
       PATTERN "concept_check" EXCLUDE
@@ -189,7 +188,6 @@
       PATTERN "filesystem" EXCLUDE
       PATTERN "flyweight" EXCLUDE
       PATTERN "format" EXCLUDE
-      PATTERN "functional" EXCLUDE
       PATTERN "fusion" EXCLUDE
       PATTERN "geometry" EXCLUDE
       PATTERN "gil" EXCLUDE
@@ -214,18 +212,15 @@
       PATTERN "ptr_container" EXCLUDE
       PATTERN "python" EXCLUDE
       PATTERN "random" EXCLUDE
-      PATTERN "ratio" EXCLUDE
       PATTERN "regex" EXCLUDE
       PATTERN "serialization" EXCLUDE
       PATTERN "signals" EXCLUDE
       PATTERN "signals2" EXCLUDE
       PATTERN "spirit" EXCLUDE
       PATTERN "statechart" EXCLUDE
-      PATTERN "system" EXCLUDE
       PATTERN "test" EXCLUDE
       PATTERN "timer" EXCLUDE
       PATTERN "tr1" EXCLUDE
-      PATTERN "typeof" EXCLUDE
       PATTERN "units" EXCLUDE
       PATTERN "unordered" EXCLUDE
       PATTERN "uuid" EXCLUDE


CMake: Enable monolithic header for C# builds because wrapper uses that.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -141,6 +141,7 @@
     set (URHO3D_MINIDUMPS OFF)
 endif ()
 if (URHO3D_CSHARP)
+    set (URHO3D_MONOLITHIC_HEADER ON)   # Used by wrapper code
     if (WIN32)
         option(URHO3D_WITH_MONO "Use Mono runtime" OFF)
     else ()