Update cmake to run eslint

Update cmake to run eslint

--- plugin.cmake
+++ plugin.cmake
@@ -51,16 +51,14 @@
 add_python_style_test(pep8_style_minerva_jobs
                       "${PROJECT_SOURCE_DIR}/plugins/minerva/server/jobs")

-add_javascript_style_test(
-    minerva "${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js"
-    JSHINT_EXTRA_CONFIGS ${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js/.jshintrc
-    JSSTYLE_EXTRA_CONFIGS ${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js/.jscsrc
+add_eslint_test(
+  minerva "${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js"
+  ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/minerva/.eslintrc.js"
 )

-add_javascript_style_test(
-    minerva-gruntfile "${PROJECT_SOURCE_DIR}/plugins/minerva/Gruntfile.js"
-    JSHINT_EXTRA_CONFIGS ${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js/.jshintrc
-    JSSTYLE_EXTRA_CONFIGS ${PROJECT_SOURCE_DIR}/plugins/minerva/web_external/js/.jscsrc
+add_eslint_test(
+  minerva-gruntfile "${PROJECT_SOURCE_DIR}/plugins/minerva/Gruntfile.js"
+  ESLINT_CONFIG_FILE "${PROJECT_SOURCE_DIR}/plugins/minerva/.eslintrc.js"
 )

 add_web_client_test(


psutil: Download with http, not https

psutil: Download with http, not https

--- psutil.cmake
+++ psutil.cmake
@@ -16,7 +16,7 @@
 	2.1.1
 	psutil-2.1.1.tar.gz
 	72a6b15d589fab11f6ca245b775bc3c6
-	https://pypi.python.org/packages/source/p/psutil
+	http://pypi.python.org/packages/source/p/psutil
 	FORCE
 )


ilastik.cmake: test step depends on the install_test step

--- ilastik.cmake
+++ ilastik.cmake
@@ -102,6 +102,7 @@

 ExternalProject_add_step(${ilastik_NAME}  install_test
     DEPENDEES   install_launch
+    DEPENDERS   test
     COMMAND     ${BUILDEM_ENV_STRING} ${TEMPLATE_EXE}
         --exe
         ${TEMPLATE_DIR}/ilastik_script.template


cucumber-testing: Removed logging.

cucumber-testing: Removed logging.

--- cmake/cucumber-testing.cmake
+++ cmake/cucumber-testing.cmake
@@ -1,7 +1,7 @@
 find_program(CUCUMBER cucumber)

 if(NOT CUCUMBER)
-    message(WARNING "- Cucumber not found, skipping acceptance tests.")
+    message("TESTING - Cucumber not found, skipping acceptance tests.")
     set(SKIP true)
 endif()


[lto][cmake] Do not access SWIFT_TOOLS_ENABLE_LTO directly in _add_variant_{c_compile,variant_link}_flags. Pass it in as an arg instead.

This will allow control on the outside of these calls on whether or not LTO is
enabled. This is necessary for turning off LTO on target libraries.

rdar://24717107

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -117,7 +117,7 @@
 endfunction()

 function(_add_variant_c_compile_flags)
-  set(oneValueArgs SDK ARCH BUILD_TYPE ENABLE_ASSERTIONS ANALYZE_CODE_COVERAGE DEPLOYMENT_VERSION_IOS RESULT_VAR_NAME)
+  set(oneValueArgs SDK ARCH BUILD_TYPE ENABLE_ASSERTIONS ANALYZE_CODE_COVERAGE DEPLOYMENT_VERSION_IOS RESULT_VAR_NAME ENABLE_LTO)
   cmake_parse_arguments(CFLAGS
     ""
     "${oneValueArgs}"
@@ -131,7 +131,7 @@
     ARCH "${CFLAGS_ARCH}"
     BUILD_TYPE "${CFLAGS_BUILD_TYPE}"
     ENABLE_ASSERTIONS "${CFLAGS_ENABLE_ASSERTIONS}"
-    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
+    ENABLE_LTO "${CFLAGS_ENABLE_LTO}"
     ANALYZE_CODE_COVERAGE FALSE
     DEPLOYMENT_VERSION_IOS "${CFLAGS_DEPLOYMENT_VERSION_IOS}"
     RESULT_VAR_NAME result)
@@ -214,7 +214,7 @@
 endfunction()

 function(_add_variant_link_flags)
-  set(oneValueArgs SDK ARCH BUILD_TYPE ENABLE_ASSERTIONS ANALYZE_CODE_COVERAGE DEPLOYMENT_VERSION_IOS RESULT_VAR_NAME)
+  set(oneValueArgs SDK ARCH BUILD_TYPE ENABLE_ASSERTIONS ANALYZE_CODE_COVERAGE DEPLOYMENT_VERSION_IOS RESULT_VAR_NAME ENABLE_LTO)
   cmake_parse_arguments(LFLAGS
     ""
     "${oneValueArgs}"
@@ -236,7 +236,7 @@
     ARCH "${LFLAGS_ARCH}"
     BUILD_TYPE "${LFLAGS_BUILD_TYPE}"
     ENABLE_ASSERTIONS "${LFLAGS_ENABLE_ASSERTIONS}"
-    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
+    ENABLE_LTO "${LFLAGS_ENABLE_LTO}"
     ANALYZE_CODE_COVERAGE "${LFLAGS_ANALYZE_CODE_COVERAGE}"
     DEPLOYMENT_VERSION_IOS "${LFLAGS_DEPLOYMENT_VERSION_IOS}"
     RESULT_VAR_NAME result)
@@ -803,6 +803,7 @@
     BUILD_TYPE "${build_type}"
     ENABLE_ASSERTIONS "${enable_assertions}"
     ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
+    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
     DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS}"
     RESULT_VAR_NAME c_compile_flags
     )
@@ -812,6 +813,7 @@
     BUILD_TYPE "${build_type}"
     ENABLE_ASSERTIONS "${enable_assertions}"
     ANALYZE_CODE_COVERAGE "${analyze_code_coverage}"
+    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
     DEPLOYMENT_VERSION_IOS "${SWIFTLIB_DEPLOYMENT_VERSION_IOS}"
     RESULT_VAR_NAME link_flags
       )
@@ -1415,6 +1417,7 @@
     ARCH "${SWIFTEXE_SINGLE_ARCHITECTURE}"
     BUILD_TYPE "${CMAKE_BUILD_TYPE}"
     ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS}"
+    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
     ANALYZE_CODE_COVERAGE "${SWIFT_ANALYZE_CODE_COVERAGE}"
     RESULT_VAR_NAME c_compile_flags)
   _add_variant_link_flags(
@@ -1422,6 +1425,7 @@
     ARCH "${SWIFTEXE_SINGLE_ARCHITECTURE}"
     BUILD_TYPE "${CMAKE_BUILD_TYPE}"
     ENABLE_ASSERTIONS "${LLVM_ENABLE_ASSERTIONS}"
+    ENABLE_LTO "${SWIFT_TOOLS_ENABLE_LTO}"
     ANALYZE_CODE_COVERAGE "${SWIFT_ANALYZE_CODE_COVERAGE}"
     RESULT_VAR_NAME link_flags)


Add inclusion guards to looked-up packages

Makes multiple inclusions easier.


cleanup

cleanup

--- include.cmake
+++ include.cmake
@@ -82,6 +82,7 @@
 # GAMS_BUILD is GAMS distrib build switch
 if("$ENV{GAMS_BUILD}" STREQUAL "")
     include_directories(${GAMS_DISTRIB_C_API})
+    include_directories(${GAMS_DISTRIB_CPP_API})

     set(SOURCE ${SOURCE} ${GAMS_DISTRIB_C_API}/gclgms.c
                          ${GAMS_DISTRIB_C_API}/gmdcc.c
@@ -91,14 +92,10 @@
                          ${GAMS_DISTRIB_C_API}/gmomcc.c
                          ${GAMS_DISTRIB_C_API}/optcc.c)

-    if(${USE_GAMS_DISTRIB_CPP_API_SRC})
-        set(HEADER ${HEADER} ${GAMS_DISTRIB_CPP_API}/gamsoptionsimpl.h
-                             ${GAMS_DISTRIB_CPP_API}/gamsoptions.h
-                             PARENT_SCOPE)
-        set(SOURCE ${SOURCE} ${GAMS_DISTRIB_CPP_API}/gamsoptions.cpp
-                             ${GAMS_DISTRIB_CPP_API}/gamsoptionsimpl.cpp
-                             PARENT_SCOPE)
-    endif()
+    set(SOURCE ${SOURCE} ${GAMS_DISTRIB_CPP_API}/gamsoptionsimpl.cpp
+                         ${GAMS_DISTRIB_CPP_API}/gamsoptions.cpp)
+    set(HEADER ${HEADER} ${GAMS_DISTRIB_CPP_API}/gamsoptionsimpl.h
+                         ${GAMS_DISTRIB_CPP_API}/gamsoptions.h)
 else()
     set(GSYS_ENV $ENV{GSYS})

@@ -126,13 +123,8 @@
                          ${GPRODUCTS_ENV}/apiwrap/joat/gmomcc.c
                          ${GPRODUCTS_ENV}/apiwrap/optobj/optcc.c)

-    if (${USE_GAMS_DISTRIB_CPP_API_SRC})
         include_directories(${GPRODUCTS_ENV}/apiexamples/C++/api)
         set(SOURCE ${SOURCE} ${GPRODUCTS_ENV}/apiexamples/C++/api/gamsoptions.cpp
                              ${GPRODUCTS_ENV}/apiexamples/C++/api/gamsoptionsimpl.cpp)
-    endif()
 endif()

-include_directories(${GAMS_DISTRIB_CPP_API})
-set(SOURCE ${SOURCE} ${GAMS_DISTRIB_CPP_API}/gamsoptionsimpl.cpp ${GAMS_DISTRIB_CPP_API}/gamsoptions.cpp)
-set(HEADER ${HEADER} ${GAMS_DISTRIB_CPP_API}/gamsoptionsimpl.h ${GAMS_DISTRIB_CPP_API}/gamsoptions.h)


Disable saved_model_test from cmake builds. (#6236)

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -126,8 +126,9 @@
   set(tf_test_src_py_exclude
     # generally not working
     "${tensorflow_source_dir}/tensorflow/python/kernel_tests/__init__.py"
-	"${tensorflow_source_dir}/tensorflow/python/kernel_tests/benchmark_test.py"
+    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/benchmark_test.py"
     "${tensorflow_source_dir}/tensorflow/python/kernel_tests/resource_variable_ops_test.py"
+    "${tensorflow_source_dir}/tensorflow/python/saved_model/saved_model_test.py"
   )
   if (WIN32)
     set(tf_test_src_py_exclude


Disable broken tensorboard test in windows cmake build. Change: 146552777

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -166,6 +166,8 @@
       # Broken TensorBoard tests due to different paths in windows
       "${tensorflow_source_dir}/tensorflow/tensorboard/backend/application_test.py"
       "${tensorflow_source_dir}/tensorflow/tensorboard/lib/python/http_util_test.py"
+      # Broken tensorboard test due to cmake issues.
+      "${tensorflow_source_dir}/tensorflow/tensorboard/plugins/debugger/plugin_test.py"
       # tensor_forest tests (also note that we exclude the hybrid tests for now)
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/count_extremely_random_stats_op_test.py"  # Results in wrong order.
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/sample_inputs_op_test.py"  # Results in wrong order.


COMP: In ctkDashboardDriverScript, use read-only github address.

That avoid the 'publickey' error message

--- CMake/ctkDashboardDriverScript.cmake
+++ CMake/ctkDashboardDriverScript.cmake
@@ -92,7 +92,7 @@
 endif()

 if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
-  set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone git@github.com:pieper/CTK.git ${CTEST_SOURCE_DIRECTORY}")
+  set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone http://github.com/pieper/CTK.git ${CTEST_SOURCE_DIRECTORY}")
 endif()

 set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")


Old CMake Uppercase Expression Fix

Old CMake Uppercase Expression Fix

"defined" is changed to "DEFINED" because older cmake version (less than 3)
are case sensitive.

Change-Id: Iee95ab07cbdb35416837698d689359039d988b90

--- CMake/sitkGenerateFilterSource.cmake
+++ CMake/sitkGenerateFilterSource.cmake
@@ -7,7 +7,7 @@
   find_package( LuaInterp REQUIRED 5.1 )
   set( SITK_LUA_EXECUTABLE ${LUA_EXECUTABLE} CACHE PATH "Lua executable used for code generation." )

-  if (defined SAVE_LUA_EXECUTABLE)
+  if (DEFINED SAVE_LUA_EXECUTABLE)
     set( LUA_EXECUTABLE ${SAVE_LUA_EXECUTABLE} CACHE )
   else()
     unset( LUA_EXECUTABLE CACHE )


Do not use Sagase to configure Ogre. Direct3D9 rendersystem includes/lib is now mandatory.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -147,10 +147,11 @@
     	  set (OGRE_INCLUDE_DIRS ${OGRE_LIBRARY}/Headers)
     	  set (OGRE_LIBRARIES ${OGRE_LIBRARY})
         else ()
-            sagase_configure_package (OGRE
-            NAMES Ogre OgreSDK ogre OGRE
-            COMPONENTS Ogre ogre OGRE OgreMain
-            PREFIXES ${ENV_OGRE_HOME} ${ENV_NAALI_DEP_PATH})
+            # Windows only, Ogre from deps SVN. D3D9 includes are now mandatory
+            add_definitions(-DUSE_D3D9_SUBSURFACE_BLIT)
+            include_directories(${ENV_NAALI_DEP_PATH}/Ogre/include)
+            include_directories(${ENV_NAALI_DEP_PATH}/Ogre/include/RenderSystems/Direct3D9)
+            link_directories(${ENV_NAALI_DEP_PATH}/Ogre/lib)
         endif ()

         sagase_configure_report (OGRE)


Set new Boost ConfigurePackages.cmake.

Set new Boost ConfigurePackages.cmake.

--- CMakeModules/ConfigurePackages.cmake
+++ CMakeModules/ConfigurePackages.cmake
@@ -7,16 +7,16 @@

 macro (configure_boost)
     if (MSVC)
-	    set(Boost_USE_MULTITHREADED ON) # test by mattiku
-        set (Boost_USE_STATIC_LIBS ON)
+	    set(Boost_USE_MULTITHREADED TRUE)
+        set(Boost_USE_STATIC_LIBS TRUE)
     else ()
-        set (Boost_USE_STATIC_LIBS OFF)
+        set(Boost_USE_STATIC_LIBS FALSE)
     endif ()

     if (APPLE)
-            set (BOOST_COMPONENTS boost_date_time boost_filesystem boost_system boost_thread boost_program_options boost_unit_test_framework)
+            set (BOOST_COMPONENTS boost_date_time boost_filesystem boost_system boost_thread boost_regex boost_program_options)
     else ()
-            set (BOOST_COMPONENTS date_time filesystem system thread program_options unit_test_framework)
+            set (BOOST_COMPONENTS date_time filesystem system thread regex program_options)
     endif ()

     sagase_configure_package (BOOST


Set c standard in cmake-init

Set c standard in cmake-init

--- cmake/CompileOptions.cmake
+++ cmake/CompileOptions.cmake
@@ -22,6 +22,7 @@
 set(DEFAULT_PROJECT_OPTIONS
     DEBUG_POSTFIX             "d"
     CXX_STANDARD              11 # Not available before CMake 3.1; see below for manual command line argument addition
+    C_STANDARD                11
     LINKER_LANGUAGE           "CXX"
     POSITION_INDEPENDENT_CODE ON
     CXX_VISIBILITY_PRESET     "hidden"


Linking to correct CUB path instead of the symbolic link.

--- cmake/FetchThrustCUB.cmake
+++ cmake/FetchThrustCUB.cmake
@@ -19,4 +19,5 @@
   )
 endif()
 set(THRUST_INCLUDE_DIR "${thrust_SOURCE_DIR}")
-set(CUB_INCLUDE_DIR "${thrust_SOURCE_DIR}/cub")
+# Windows doesn't support symblink, so make sure we link to the real library.
+set(CUB_INCLUDE_DIR "${thrust_SOURCE_DIR}/dependencies/cub")


Squashed '3rdparty/github/cmake-utils/' changes from 6cdd3328..890b1bb5

890b1bb5 Added missing GET_DIRECTORY_PROPERTY

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 890b1bb507015f2912cf6b8691f9e746b92ea33e

--- cmake/MyPackageStart.cmake
+++ cmake/MyPackageStart.cmake
@@ -114,6 +114,7 @@
   #
   # Regardless of compiler, we always set the following historical macros
   #
+  GET_DIRECTORY_PROPERTY (_DirDefs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS)
   FOREACH (_definition _REENTRANT _THREAD_SAFE)
     LIST (FIND _DirDefs ${_definition} _index)
     IF (${_index} GREATER -1)


Add options for x86_64

Add options for x86_64

git-svn-id: bd2008fbba0f7d30fd6598b54f2cd88503fdd2e4@79 95f4ed2b-212e-0410-8b90-d31948207fce

--- cmake/OptimalOptions.cmake
+++ cmake/OptimalOptions.cmake
@@ -14,6 +14,11 @@
 		#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=pentium4")
 	ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "i686")

+	IF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
+		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=athlon64")
+		#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=athlon64 -msse3")
+	ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "x86_64")
+
 	IF(NV_SYSTEM_PROCESSOR STREQUAL "powerpc")
 		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=powerpc -maltivec -mabi=altivec -mpowerpc-gfxopt")


First cut at -DINSTALL_LAYOUT=DEB support.

--- cmake/install_layout.cmake
+++ cmake/install_layout.cmake
@@ -24,6 +24,9 @@
 #
 #  RPM
 #    Build as per default RPM layout, with prefix=/usr
+#
+#  DEB
+#    Build as per STANDALONE, prefix=/opt/mysql-$major.$minor
 #
 #  SVR4
 #    Solaris package layout suitable for pkg* tools, prefix=/opt/mysql/mysql
@@ -69,6 +72,10 @@
 IF(UNIX)
   IF(INSTALL_LAYOUT MATCHES "RPM")
     SET(default_prefix "/usr")
+  ELSEIF(INSTALL_LAYOUT MATCHES "DEB")
+    SET(default_prefix "/opt/${MYSQL_BASE_VERSION}")
+    # This is required to avoid "cpack -GDEB" default of prefix=/usr
+    SET(CPACK_SET_DESTDIR ON)
   ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
     SET(default_prefix "/opt/mysql/mysql")
   ELSE()
@@ -121,6 +128,23 @@
 SET(INSTALL_SUPPORTFILESDIR_RPM "share/mysql")
 SET(INSTALL_MYSQLDATADIR_RPM "var")

+# DEB layout
+SET(INSTALL_BINDIR_DEB "bin")
+SET(INSTALL_SBINDIR_DEB "bin")
+SET(INSTALL_LIBDIR_DEB "lib")
+SET(INSTALL_INCLUDEDIR_DEB "include")
+SET(INSTALL_PLUGINDIR_DEB "lib/plugin")
+SET(INSTALL_DOCDIR_DEB "docs")
+SET(INSTALL_MANDIR_DEB "man")
+SET(INSTALL_MYSQLSHAREDIR_DEB "share")
+SET(INSTALL_SHAREDIR_DEB "share")
+SET(INSTALL_SCRIPTDIR_DEB "scripts")
+SET(INSTALL_MYSQLTESTDIR_DEB "mysql-test")
+SET(INSTALL_SQLBENCHROOTDIR_DEB ".")
+SET(INSTALL_DOCREADMEDIR_DEB ".")
+SET(INSTALL_SUPPORTFILESDIR_DEB "support-files")
+SET(INSTALL_MYSQLDATADIR_DEB "data")
+
 # SVR4 layout
 SET(INSTALL_BINDIR_SVR4 "bin")
 SET(INSTALL_SBINDIR_SVR4 "bin")


modified nosetests to accept individual files

--- cmake/test/nosetests.cmake
+++ cmake/test/nosetests.cmake
@@ -8,9 +8,9 @@
 #   `` make run_tests_${PROJECT_NAME}_nosetests_${dir}``
 #   (where slashes in the ``dir`` are replaced with underscores)
 #
-# :param dir: a relative or absolute directory to search for
-#   nosetests in
-# :type dir: string
+# :param path: a relative or absolute directory to search for
+#   nosetests in or a relative or absolute file containing tests
+# :type path: string
 # :param WORKING_DIRECTORY: the working directory when executing the
 #   tests
 # :type WORKING_DIRECTORY: string
@@ -20,9 +20,9 @@
 #
 # @public
 #
-function(catkin_add_nosetests dir)
+function(catkin_add_nosetests path)
   if(NOT NOSETESTS)
-    message(STATUS "skipping nosetests(${dir}) in project '${PROJECT_NAME}'")
+    message(STATUS "skipping nosetests(${path}) in project '${PROJECT_NAME}'")
     return()
   endif()

@@ -35,15 +35,15 @@
   endif()

   # check that the directory exists
-  set(_dir_name _dir_name-NOTFOUND)
-  if(IS_ABSOLUTE ${dir})
-    set(_dir_name ${dir})
+  set(_path_name _path_name-NOTFOUND)
+  if(IS_ABSOLUTE ${path})
+    set(_path_name ${path})
   else()
-    find_file(_dir_name ${dir}
+    find_file(_path_name ${path}
       PATHS ${CMAKE_CURRENT_SOURCE_DIR}
       NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
-    if(NOT _dir_name)
-      message(FATAL_ERROR "Can't find nosetests dir '${dir}'")
+    if(NOT _path_name)
+      message(FATAL_ERROR "Can't find nosetests path '${path}'")
     endif()
   endif()

@@ -52,10 +52,15 @@
     set(_covarg " --with-coverage")
   endif()

-  set(output_dir_name ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
-  string(REPLACE "/" "." output_file_name ${dir})
-  set(cmd "${CMAKE_COMMAND} -E make_directory ${output_dir_name}")
-  set(cmd ${cmd} "${NOSETESTS} --process-timeout=${_nose_TIMEOUT} --where=${_dir_name} --with-xunit --xunit-file=${output_dir_name}/nosetests-${output_file_name}.xml${_covarg}")
+  set(output_path ${CATKIN_TEST_RESULTS_DIR}/${PROJECT_NAME})
+  string(REPLACE "/" "." output_file_name ${path})
+  set(cmd "${CMAKE_COMMAND} -E make_directory ${output_path}")
+  if(IS_DIRECTORY ${_path_name})
+    set(tests "--where=${_path_name}")
+  else()
+    set(tests "${_path_name}")
+  endif()
+  set(cmd ${cmd} "${NOSETESTS} --process-timeout=${_nose_TIMEOUT} ${tests} --with-xunit --xunit-file=${output_path}/nosetests-${output_file_name}.xml${_covarg}")
   catkin_run_tests_target("nosetests" ${output_file_name} "nosetests-${output_file_name}.xml" COMMAND ${cmd} WORKING_DIRECTORY ${_nose_WORKING_DIRECTORY})
 endfunction()


COMP: backport find shark script from develop

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -41,9 +41,11 @@

 endif() #if(Shark_DIR)

-find_path( SHARK_INCLUDE_DIR shark/Core/Shark.h
+find_path( SHARK_INCLUDE_DIR
+  NAMES shark/Core/Shark.h
   PATHS "${SHARK_SEARCH_PATH}"
-  PATH_SUFFIXES include include/shark shark)
+  PATH_SUFFIXES include include/shark shark
+  )

 find_library( SHARK_LIBRARY
   NAMES shark shark_debug
@@ -51,22 +53,37 @@
   PATH_SUFFIXES lib
   )

-mark_as_advanced( SHARK_INCLUDE_DIR
-                  SHARK_LIBRARY )
-find_package(
-	Boost 1.48.0 REQUIRED QUIET COMPONENTS
+mark_as_advanced( SHARK_INCLUDE_DIR  SHARK_LIBRARY )
+
+find_package( Boost 1.48.0 REQUIRED QUIET COMPONENTS
 	system date_time filesystem
 	program_options serialization thread
 	unit_test_framework
-)
+	)

 if(NOT Boost_FOUND)
   message(FATAL_ERROR "Please make sure Boost 1.48.0 is installed on your system")
 endif()

+if(NOT SHARK_LIBRARY)
+  message(FATAL_ERROR "Cannot find SHARK_LIBRARY. set it with cmake -DSHARK_LIBRARY=")
+  return()
+endif()
+
+if(NOT SHARK_INCLUDE_DIR)
+  message(FATAL_ERROR "Cannot find SHARK_INCLUDE_DIR. Set it with cmake -DSHARK_INCLUDE_DIR=")
+  return()
+endif()
+
+get_filename_component(SHARK_INSTALLDIR ${SHARK_LIBRARY} PATH)
+get_filename_component(SHARK_INSTALLDIR ${SHARK_INSTALLDIR} PATH)
+
 if(NOT SHARK_CONFIG_FILE)
-  find_file(SHARK_CONFIG_FILE SharkConfig.cmake PATH_SUFFIXES lib/cmake/Shark share/Shark)
+  find_file(SHARK_CONFIG_FILE SharkConfig.cmake
+    PATHS ${SHARK_INSTALLDIR}
+    PATH_SUFFIXES lib/cmake/Shark share/Shark cmake/Shark)
 endif()
+
 if(SHARK_CONFIG_FILE)
   file(STRINGS "${SHARK_CONFIG_FILE}" SHARK_CONFIG_FILE_CONTENTS)
   string(REGEX REPLACE
@@ -81,13 +98,42 @@

   set(SHARK_VERSION_STRING
   "${SHARK_VERSION_MAJOR}.${SHARK_VERSION_MINOR}.${SHARK_VERSION_PATCH}")
-
 endif()

+set(SHARK_USE_OPENMP_matched)
+#define SHARK_USE_OPENMP
+file(STRINGS "${SHARK_INCLUDE_DIR}/shark/Core/Shark.h" SHARK_H_CONTENTS)
+string(REGEX MATCH
+  "#define.SHARK_USE_OPENMP"
+  SHARK_USE_OPENMP_matched "${SHARK_H_CONTENTS}")
+
+#this variable is added in cache but not used now
+# you can use it to see if shark installation has openMP
+# later if needed in other places..
+set(SHARK_USE_OPENMP FALSE CACHE BOOL "shark is built with OpenMP")
+if(SHARK_USE_OPENMP_matched)
+  set(SHARK_USE_OPENMP TRUE CACHE BOOL "shark is built with OpenMP" FORCE)
+endif()
+
+if(SHARK_USE_OPENMP)
+  message(STATUS "Shark is built with OpenMP: SHARK_USE_OPENMP = TRUE")
+  find_package(OpenMP REQUIRED QUIET)
+  if(OPENMP_FOUND)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
+  else()
+    message(FATAL_ERROR "Your shark libraries are compiled with it OpenMP")
+    set(SHARK_FOUND FALSE)
+  endif()
+else()
+  message(STATUS "Shark is built without OpenMP: SHARK_USE_OPENMP = FALSE")
+endif()
 INCLUDE(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Shark
-                                  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
-                                  VERSION_VAR SHARK_VERSION_STRING)
+  REQUIRED_VARS SHARK_LIBRARY SHARK_INCLUDE_DIR
+  VERSION_VAR SHARK_VERSION_STRING)
+
 if(SHARK_FOUND)
   set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${Boost_INCLUDE_DIR} )
   set(SHARK_LIBRARIES ${SHARK_LIBRARY} ${Boost_LIBRARIES} )


fbcode_builder: fix a minor bug in THRIFT_INCLUDE_DIR argument parsing

Summary:
Fix a minor bug in the argument parsing for `add_fbthrift_cpp_library()`:
only a single value should be supplied for the `THRIFT_INCLUDE_DIR` argument.
This parameter should not accept a list of arguments.

Reviewed By: strager

Differential Revision: D17125810

fbshipit-source-id: 31f354e4d6299d3626a94f3b4b5ff8c58bb0cf7b

--- build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
+++ build/fbcode_builder/CMake/FBThriftCppLibrary.cmake
@@ -22,8 +22,8 @@
 #   desired.
 function(add_fbthrift_cpp_library LIB_NAME THRIFT_FILE)
   # Parse the arguments
-  set(one_value_args INCLUDE_DIR)
-  set(multi_value_args SERVICES DEPENDS OPTIONS THRIFT_INCLUDE_DIR)
+  set(one_value_args INCLUDE_DIR THRIFT_INCLUDE_DIR)
+  set(multi_value_args SERVICES DEPENDS OPTIONS)
   fb_cmake_parse_args(
     ARG "" "${one_value_args}" "${multi_value_args}" "${ARGN}"
   )


Mac: QtGraphicalEffects module added

Mac: QtGraphicalEffects module added

--- src/Mac/projectDef.cmake
+++ src/Mac/projectDef.cmake
@@ -79,9 +79,20 @@
         ${QTDIR}/qml/QtQuick/Layouts/plugins.qmltypes
         )

+    file( GLOB QML_QTGRAPHICALEFFECTS
+        ${QTDIR}/qml/QtGraphicalEffects/qmldir
+        ${QTDIR}/qml/QtGraphicalEffects/[^.]*.qml
+        )
+
+    file( GLOB QML_QTGRAPHICALEFFECTS_PRIVATE
+        ${QTDIR}/qml/QtGraphicalEffects/private/[^.]*.qml
+        )
+
     set( QML_MODULES
         ${QML_QTQUICK2}
         ${QML_QTQUICK_LAYOUTS}
+        ${QML_QTGRAPHICALEFFECTS}
+        ${QML_QTGRAPHICALEFFECTS_PRIVATE}
         )

     source_group( QmlModules FILES ${QML_MODULES} )
@@ -96,6 +107,18 @@
         ${QML_QTQUICK_LAYOUTS}
         PROPERTIES
         MACOSX_PACKAGE_LOCATION MacOS/qml/QtQuick/Layouts
+        )
+
+    set_source_files_properties(
+        ${QML_QTGRAPHICALEFFECTS}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtGraphicalEffects
+        )
+
+    set_source_files_properties(
+        ${QML_QTGRAPHICALEFFECTS_PRIVATE}
+        PROPERTIES
+        MACOSX_PACKAGE_LOCATION MacOS/qml/QtGraphicalEffects/private
         )
 endif( QT_STATIC )


Attempts another fix for Brett's build.

Attempts another fix for Brett's build.

--- CMake/FindCEGUI.cmake
+++ CMake/FindCEGUI.cmake
@@ -46,7 +46,6 @@
         /LIBRARIES/Frameworks
         /usr/local/lib
         /usr/lib
-        /usr/lib/CEGUI
         /usr/local/lib/CEGUI
         /usr/lib/cegui-0.7.1
         /sw/lib


dynamically choosing winusb lib architecture

--- CMake/Findlibtm.cmake
+++ CMake/Findlibtm.cmake
@@ -8,7 +8,7 @@
 if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 	set(TARGET_ARCH x64)
 else()
-	set(TARGET_ARCH x86)
+	set(TARGET_ARCH win32)
 endif()
 #add windows/linux SUFFIX for libraries
 if(WIN32)
@@ -79,8 +79,8 @@
   	target_include_directories(libtm INTERFACE ${LIBTM_INCLUDE_DIR})
   	target_link_libraries(libtm INTERFACE optimized ${LIBTM_LIBRARY} ${INFRA_LIBRARY} debug ${LIBTM_LIBRARY_DEBUG} ${INFRA_LIBRARY_DEBUG})
 	if (WIN32)
-		# Force-link to libusb on Windows (TODO: Check how to choose x64 vs Win32)
-		target_link_libraries(libtm INTERFACE ${LIBTM_DIR}/../3rdparty/win/libusb/bin/win32/libusb-1.0.lib)
+		# Force-link to libusb on Windows
+		target_link_libraries(libtm INTERFACE ${LIBTM_DIR}/../3rdparty/win/libusb/bin/${TARGET_ARCH}/libusb-1.0.lib)
 	endif()
 	mark_as_advanced(LIBTM_DIR LIBTM_LIBRARY LIBTM_INCLUDE_DIR)
 endif()


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   30)
+SET(KWSYS_DATE_STAMP_DAY   31)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 08)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   24)
+SET(KWSYS_DATE_STAMP_DAY   25)


Fixed tinyxml dependency

Fixed tinyxml dependency

--- CMakeModules/KrisLibraryDependencies.cmake
+++ CMakeModules/KrisLibraryDependencies.cmake
@@ -82,7 +82,7 @@
   MESSAGE("TinyXML library found")
   SET(KRISLIBRARY_DEFINITIONS ${KRISLIBRARY_DEFINITIONS} -DHAVE_TINYXML=1 -DTIXML_USE_STL)
   SET(KRISLIBRARY_INCLUDE_DIRS ${KRISLIBRARY_INCLUDE_DIRS} ${TINYXML_INCLUDE_DIR})
-  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${TINYXML_LIBRARY})
+  SET(KRISLIBRARY_LIBRARIES ${KRISLIBRARY_LIBRARIES} ${TINYXML_LIBRARIES})
 ELSE(TINYXML_FOUND)
   MESSAGE("TinyXML library not found, setting HAVE_TINYXML=0")
 ENDIF(TINYXML_FOUND)


#1303 - NiftyLink: Updated the OpenIGTLink version tag to the
latest: 74a8daccb1

git-svn-id: f70d4c833b20674991d6651a5f592bbdbe6b47b2@8496 30ced1d1-d8fb-0310-b896-84269ee58dd6

--- CMake/CMakeExternals/OPENIGTLINK.cmake
+++ CMake/CMakeExternals/OPENIGTLINK.cmake
@@ -35,7 +35,7 @@
 IF(NOT DEFINED OpenIGTLink_DIR)

     #1273 - OpenIGTLink version update due to bugfixes.
-    SET(revision_tag c34d51ec59)
+    SET(revision_tag 74a8daccb1)
     IF(${proj}_REVISION_TAG)
         SET(revision_tag ${${proj}_REVISION_TAG})
     ENDIF()


cmake: Disable NO_SYMBOL_CHECK by default, until vlc/cmake is working properly.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -33,7 +33,7 @@
 OPTION( ENABLE_VLM             "Enable vlm" ON )
 OPTION( ENABLE_DYNAMIC_PLUGINS "Enable dynamic plugin" ON )
 OPTION( UPDATE_CHECK           "Enable automatic new version checking" OFF )
-OPTION( ENABLE_NO_SYMBOL_CHECK "Don't check symbols of modules against libvlc. (Enabling this option speeds up compilation)" ON )
+OPTION( ENABLE_NO_SYMBOL_CHECK "Don't check symbols of modules against libvlc. (Enabling this option speeds up compilation)" OFF )

 IF (NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE "Debug" CACHE STRING  "build type determining compiler flags" FORCE )


add it-api log options to logtrace config file

--- CMake/logtrace.cmake
+++ CMake/logtrace.cmake
@@ -118,3 +118,29 @@
 # -DSKV_CLIENT_INSERT_TRACE=1
 # -DSKV_CLIENT_PROCESS_CONN_TRACE=1
 )
+
+set(SKV_IT_API_LOGGING
+# enable extensive logging
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_VERBS=1
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_SOCKETS=1
+
+# enable evd thread logging
+#IT_API_CONFIG+=-DIT_API_O_VERBS_THREAD_LOG=1
+
+# enable connection-related logging only (incomplete coverage)
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_VERBS_CONNECT=1
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_SOCKETS_CONNECT=1
+
+# enable logging for memory registration (incomplete coverage)
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_VERBS_MEMREG=1
+
+# enable logging for rdma write ops (incomplete coverage)
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_VERBS_WRITE=1
+
+# enable logging for types
+#IT_API_CONFIG+=-DIT_API_O_VERBS_TYPES_LOG=1
+
+#IT_API_CONFIG+=-DFXLOG_IT_API_O_VERBS_QUEUE_LENGTHS_LOG=1
+#IT_API_CONFIG+=-DTHREAD_SAFE_QUEUE_FXLOG=1
+#IT_API_CONFIG+=-DTHREAD_SAFE_QUEUE_INIT_FXLOG=1
+)


Switch to github.com/RobotLocomotion/bullet-pod

This repo includes the patches to the Bullet GJK tolerances that Drake needs
for collision detection.

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -59,8 +59,8 @@
 set(microstrain_comm_revision 853)
 set(microstrain_comm_depends common_utils)

-set(bullet_url https://svn.csail.mit.edu/drc/trunk/software/externals/bullet)
-set(bullet_revision 8298)
+set(bullet_url https://github.com/RobotLocomotion/bullet-pod.git)
+set(bullet_revision 029b5258ae08932d2a7edbf1d8de72d316042b8b)
 set(bullet_depends)

 set(fovis-git_url https://svn.csail.mit.edu/drc/trunk/software/externals/fovis-git)
@@ -123,7 +123,6 @@
   velodyne
   kinect
   microstrain_comm
-  bullet
   fovis-git
   estimate-pose
   vicon
@@ -136,6 +135,11 @@
   gurobi
   flycapture
   )
+
+set(git-externals
+  bullet
+  )
+

 set(svn_credentials)
 if(DRC_SVN_PASSWORD)
@@ -156,8 +160,25 @@
     )
 endmacro()

+macro(add_git_external proj)
+  ExternalProject_Add(${proj}
+    GIT_REPOSITORY ${${proj}_url}
+    GIT_TAG ${${proj}_revision}
+    DEPENDS ${${proj}_depends}
+    CONFIGURE_COMMAND ""
+    INSTALL_COMMAND ""
+    BUILD_COMMAND $(MAKE) BUILD_PREFIX=${CMAKE_INSTALL_PREFIX} BUILD_TYPE=${CMAKE_BUILD_TYPE}
+    BUILD_IN_SOURCE 1
+    SOURCE_DIR ${DRCExternals_SOURCE_DIR}/${proj}
+    )
+endmacro()
+
 foreach(external ${externals})
   add_svn_external(${external})
+endforeach()
+
+foreach(git-external ${git-externals})
+  add_git_external(${git-external})
 endforeach()


Switch OctoMap back to mainline devel revision after merging Pat's fix

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -57,8 +57,8 @@
     )
 endif()

-set(octomap_url https://github.com/patmarion/octomap.git)
-set(octomap_revision 57d2db5e5024fd2697f98177d6902f23dc27968e)
+set(octomap_url https://github.com/OctoMap/octomap.git)
+set(octomap_revision 5b11e4c6bfd6dba54dd5bd1eea63354b6e18d835)
 set(octomap_depends)
 set(octomap_external_args
   CMAKE_CACHE_ARGS


Revert "Don't build atlas-driver on Mac"

This reverts commit 41a98f232713d821b694fcb56acff51c3fdd0c16.

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -291,12 +291,6 @@
     flycapture
     )

-  if(APPLE)
-    list(REMOVE_ITEM externals
-      atlas-driver
-    )
-  endif()
-
 endif()


Fix deprecated LOCATION property warning for cmake 3.0, use $<TARGET_FILE> generator expression instead

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -50,10 +50,6 @@
   endif()
   target_link_libraries(${NAME} ${TEST_LIBRARIES})

-  get_target_property(EXECUTABLE ${NAME} LOCATION)
-  string(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
-         EXECUTABLE "${EXECUTABLE}")
-
   # Per target test command customisation with
   # ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS
   set(RUN_PREFIX ${TEST_PREFIX})
@@ -64,8 +60,15 @@
   if (${NAME}_TEST_ARGS)
     set(RUN_ARGS ${${NAME}_TEST_ARGS})
   endif()
-
-  add_test(${NAME} ${RUN_PREFIX} ${EXECUTABLE} ${RUN_ARGS})
+
+  if(CMAKE_VERSION VERSION_LESS 2.8)
+    get_target_property(EXECUTABLE ${NAME} LOCATION)
+    string(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
+           EXECUTABLE "${EXECUTABLE}")
+    add_test(${NAME} ${RUN_PREFIX} ${EXECUTABLE} ${RUN_ARGS})
+  else(CMAKE_VERSION VERSION_LESS 2.8)
+    add_test(NAME ${NAME} COMMAND ${RUN_PREFIX} $<TARGET_FILE:${NAME}> ${RUN_ARGS})
+  endif(CMAKE_VERSION VERSION_LESS 2.8)

   # Add test labels
   set(TEST_LABELS ${TEST_LABEL} ${${NAME}_TEST_LABEL})


STYLE: Update GIT_TAG BRAINSTools

STYLE: Update GIT_TAG BRAINSTools

--- SuperBuild/External_BRAINSTools.cmake
+++ SuperBuild/External_BRAINSTools.cmake
@@ -167,7 +167,7 @@

   ### --- End Project specific additions
   set(${proj}_REPOSITORY "${git_protocol}://github.com/BRAINSia/BRAINSTools.git")
-  set(${proj}_GIT_TAG b5e27412868ec9834814318fac3b04e3de95b451 )
+  set(${proj}_GIT_TAG 98fe1ad2b9297e444d662d09dc83a9409fcf520a )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Added rosbuild_check_for_sse

Added rosbuild_check_for_sse

--- core/rosbuild/public.cmake
+++ core/rosbuild/public.cmake
@@ -1041,3 +1041,87 @@
   endif(APPLE)
 endmacro(rosbuild_add_swigpy_library)

+macro(rosbuild_check_for_sse)
+  # check for SSE extensions
+  include(CheckCXXSourceRuns)
+  if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
+   set(SSE_FLAGS)
+
+   set(CMAKE_REQUIRED_FLAGS "-msse3")
+   check_cxx_source_runs("
+    #include <pmmintrin.h>
+
+    int main()
+    {
+       __m128d a, b;
+       double vals[2] = {0};
+       a = _mm_loadu_pd(vals);
+       b = _mm_hadd_pd(a,a);
+       _mm_storeu_pd(vals, b);
+       return 0;
+    }"
+    HAS_SSE3_EXTENSIONS)
+
+   set(CMAKE_REQUIRED_FLAGS "-msse2")
+   check_cxx_source_runs("
+    #include <emmintrin.h>
+
+    int main()
+    {
+        __m128d a, b;
+        double vals[2] = {0};
+        a = _mm_loadu_pd(vals);
+        b = _mm_add_pd(a,a);
+        _mm_storeu_pd(vals,b);
+        return 0;
+     }"
+     HAS_SSE2_EXTENSIONS)
+
+   set(CMAKE_REQUIRED_FLAGS "-msse")
+   check_cxx_source_runs("
+    #include <xmmintrin.h>
+    int main()
+    {
+        __m128 a, b;
+        float vals[4] = {0};
+        a = _mm_loadu_ps(vals);
+        b = a;
+        b = _mm_add_ps(a,b);
+        _mm_storeu_ps(vals,b);
+        return 0;
+    }"
+    HAS_SSE_EXTENSIONS)
+
+   set(CMAKE_REQUIRED_FLAGS)
+
+   if(HAS_SSE3_EXTENSIONS)
+    set(SSE_FLAGS "-msse3 -mfpmath=sse")
+    message(STATUS "[rosbuild] Found SSE3 extensions, using flags: ${SSE_FLAGS}")
+   elseif(HAS_SSE2_EXTENSIONS)
+    set(SSE_FLAGS "-msse2 -mfpmath=sse")
+    message(STATUS "[rosbuild] Found SSE2 extensions, using flags: ${SSE_FLAGS}")
+   elseif(HAS_SSE_EXTENSIONS)
+    set(SSE_FLAGS "-msse -mfpmath=sse")
+    message(STATUS "[rosbuild] Found SSE extensions, using flags: ${SSE_FLAGS}")
+   endif()
+  elseif(MSVC)
+   check_cxx_source_runs("
+    #include <emmintrin.h>
+
+    int main()
+    {
+        __m128d a, b;
+        double vals[2] = {0};
+        a = _mm_loadu_pd(vals);
+        b = _mm_add_pd(a,a);
+        _mm_storeu_pd(vals,b);
+        return 0;
+     }"
+     HAS_SSE2_EXTENSIONS)
+   if( HAS_SSE2_EXTENSIONS )
+    message(STATUS "[rosbuild] Found SSE2 extensions")
+    set(SSE_FLAGS "/arch:SSE2 /fp:fast -D__SSE__ -D__SSE2__" )
+   endif()
+  endif()
+endmacro(rosbuild_check_for_sse)
+


Must set the OGRE_MEDIA_DIR_* to an absolute path for build folder versions

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -142,6 +142,8 @@

 # CREATE CONFIG FILES - BUILD DIR VERSIONS
+set(OGRE_MEDIA_DIR_REL "${OGRE_SOURCE_DIR}/Samples/media")
+set(OGRE_MEDIA_DIR_DBG "${OGRE_SOURCE_DIR}/Samples/media")
 if (WIN32)
   set(OGRE_PLUGIN_DIR_REL ".")
   set(OGRE_PLUGIN_DIR_DBG ".")


Install .cfg files when OGRE_INSTALL_SAMPLES_SOURCE is specified even if OGRE_INSTALL_SAMPLES (binaries) is false
Needed for SDK

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -88,7 +88,7 @@
 configure_file(${OGRE_TEMPLATES_DIR}/samples.cfg.in ${OGRE_BINARY_DIR}/inst/bin/release/samples.cfg)

 # install resource files
-if (OGRE_INSTALL_SAMPLES OR OGRE_INSTALL_TOOLS)
+if (OGRE_INSTALL_SAMPLES OR OGRE_INSTALL_SAMPLES_SOURCE OR OGRE_INSTALL_TOOLS)
   install(FILES
     ${OGRE_BINARY_DIR}/inst/bin/debug/resources.cfg
     ${OGRE_BINARY_DIR}/inst/bin/debug/plugins.cfg
@@ -111,7 +111,7 @@
 	DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
   )
 endif ()
-if (OGRE_INSTALL_SAMPLES)
+if (OGRE_INSTALL_SAMPLES OR OGRE_INSTALL_SAMPLES_SOURCE)
   install(FILES
 	${OGRE_BINARY_DIR}/inst/bin/debug/samples.cfg
     ${OGRE_BINARY_DIR}/inst/bin/debug/media.cfg


Fix typo in Valgrind options.

Fix typo in Valgrind options.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -48,7 +48,7 @@
 			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX}
 				--leak-check=full --show-reachable=yes)
 		else()
-			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX} --leak-check=none)
+			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX} --leak-check=no)
 		endif()
 	endif(SURGSIM_TESTS_RUN_WITH_VALGRIND)
 endif(NOT WIN32)


Adding in LABELS for the vtk_tests macro.

Change-Id: I8fc7e426b3114a0773c4a2784adbf699f47d0986

--- CMake/vtkTestingMacros.cmake
+++ CMake/vtkTestingMacros.cmake
@@ -19,6 +19,15 @@
       list(GET argv ${iplus1} DATADIR)
       set (i ${iplus1})
       math(EXPR iplus1 "${i}+1")
+    elseif(${ARG} STREQUAL "LABELS" AND ${iplus1} LESS ${ARGC})
+      # everything after LABELS gets added as a label
+      set(LABELS)
+      while (${iplus1} LESS ${ARGC})
+        list(GET argv ${iplus1} LABEL)
+        list(APPEND LABELS ${LABEL})
+        set(i ${iplus1})
+        math(EXPR iplus1 "${i}+1")
+      endwhile()
     else()
       list(APPEND MYARGV ${ARG})
     endif()
@@ -31,7 +40,7 @@

 # -----------------------------------------------------------------------------
-# vtk_tests(cxxfiles [BASELINEDIR baseline_directory] [DATADIR data_directory])
+# vtk_tests(cxxfiles [BASELINEDIR baseline_directory] [DATADIR data_directory] [LABELS test_labels])
 #
 # Takes a list of cxx files which will be driven by the modules
 # test driver. This helps reduce a lot of boiler place code in each module
@@ -42,6 +51,10 @@
 # DATADIR a data directory to look for input data to the tests in. If not
 # specified the test is assumed to not require input data.
 # Ex. ${VTK_DATA_ROOT} or ${VTK_LARGE_DATA_ROOT}
+#
+# LABELS labels to be added to the tests. Note that the
+# [LABELS test_labels] must be at the end of the macro call since all strings
+# after LABELS will be added as labels to the tests
 macro(vtk_tests)

   parse_optional_arguments(${ARGV})
@@ -67,6 +80,9 @@
       add_test(NAME ${vtk-module}Cxx-${TName}
         COMMAND ${vtk-module}CxxTests ${TName}
         ${${TName}_ARGS})
+    endif()
+    if(LABELS)
+      set_tests_properties(${vtk-module}Cxx-${TName} PROPERTIES LABELS "${LABELS}")
     endif()
   endforeach()
 endmacro(vtk_tests)


Remove debug display

Remove debug display

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -92,17 +92,14 @@

       if( DTIAtlasBuilder_BUILD_SLICER_EXTENSION ) # check if variable if defined, and not differ if ON or OFF

-message("Proj=${Proj} (CLI=${CLI})")
         if(${CLI}) # Install in Extensions/DTIAtlaBuilder/lib/Slicer4.X/cli_module
           foreach( tool ${Tools} )
               install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${Proj}-build/bin/${tool} DESTINATION ${INSTALL_DIR})
           endforeach()
-message("installed in ${INSTALL_DIR}")
         else(${CLI}) # Install in Extensions/DTIAtlaBuilder/bin
           foreach( tool ${Tools} )
               install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${Proj}-build/bin/${tool} DESTINATION ${NOCLI_INSTALL_DIR})
           endforeach()
-message("installed in ${NOCLI_INSTALL_DIR}")
         endif(${CLI})

       else( DTIAtlasBuilder_BUILD_SLICER_EXTENSION )


Disable -Wdeprecated-declarations in cmake builds

Summary:
[Folly] Disable `-Wdeprecated-declarations` in cmake builds.

To hide deprecation spam in unit-tests for uses of deprecated declarations which cannot yet be removed.

Reviewed By: Orvid

Differential Revision: D10287167

fbshipit-source-id: 2dddd9f69ca1dcced61e4a2d6cd16bad54b2a2ad

--- CMake/FollyCompilerUnix.cmake
+++ CMake/FollyCompilerUnix.cmake
@@ -19,8 +19,7 @@
       -Werror
       -Wall
       -Wno-deprecated
-      -Wdeprecated-declarations
-      -Wno-error=deprecated-declarations
+      -Wno-deprecated-declarations
       -Wno-sign-compare
       -Wno-unused
       -Wunused-label


BUG: Change CMAKE_SOURCE_DIR to CMAKE_CURRENT_SOURCE_DIR

This commit replaces the CMAKE_SOURCE_DIR variable by
CMAKE_CURRENT_SOURCE_DIR so it points to the CMakeLists.txt
that calls the ITKModuleExternal.cmake script. It ensures
to refer the module directory where wrapping, test and include
directories are contained.

--- CMake/ITKModuleExternal.cmake
+++ CMake/ITKModuleExternal.cmake
@@ -62,7 +62,7 @@
 set(ITK_MODULES_DIR "${ITK_DIR}/${ITK_INSTALL_PACKAGE_DIR}/Modules")

 include(ITKExternalData)
-if(EXISTS ${CMAKE_SOURCE_DIR}/test/CMakeLists.txt)
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt)
   include(CTest)
   include(ITKModuleTest)
   if(NOT DEFINED ITK_USE_KWSTYLE)
@@ -86,13 +86,13 @@
 set(${itk-module}_TARGETS_FILE_BUILD "${${itk-module}-targets-build}")
 itk_module_impl()

-if(EXISTS ${CMAKE_SOURCE_DIR}/src/CMakeLists.txt AND NOT ${itk-module}_NO_SRC AND "${${itk-module}-targets}")
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/CMakeLists.txt AND NOT ${itk-module}_NO_SRC AND "${${itk-module}-targets}")
   install(EXPORT ${${itk-module}-targets} DESTINATION "${ITK_INSTALL_PACKAGE_DIR}/Modules"
           COMPONENT Development)
 endif()

 set(ITK_TEST_OUTPUT_DIR "${CMAKE_BINARY_DIR}/Testing/Temporary")
-if(EXISTS "${CMAKE_SOURCE_DIR}/test/CMakeLists.txt")
+if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
   add_subdirectory(test)
 endif()

@@ -113,7 +113,7 @@
   ITK_WRAP_TCL
   ITK_WRAP_EXPLICIT
   )
-if(ITK_WRAPPING AND EXISTS "${CMAKE_SOURCE_DIR}/wrapping/CMakeLists.txt")
+if(ITK_WRAPPING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/wrapping/CMakeLists.txt")
   set(EXTERNAL_WRAP_ITK_PROJECT ON)
   set(WRAP_ITK_CMAKE_DIR "${ITK_CMAKE_DIR}/../Wrapping")
   include("${WRAP_ITK_CMAKE_DIR}/TypedefMacros.cmake")


iOS: Fix FindOGRE.cmake to detect libs again

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -120,8 +120,13 @@
   foreach(dir ${OGRE_PREFIX_BUILD})
     set(OGRE_INC_SEARCH_PATH ${dir}/include ${OGRE_INC_SEARCH_PATH})
     set(OGRE_LIB_SEARCH_PATH ${dir}/lib ${OGRE_LIB_SEARCH_PATH})
+
+    if (OGRE_BUILD_PLATFORM_APPLE_IOS)
+        set(OGRE_LIB_SEARCH_PATH ${dir}/lib/iphoneos ${dir}/lib/iphonesimulator ${OGRE_LIB_SEARCH_PATH})
+    endif()
+
     set(OGRE_BIN_SEARCH_PATH ${dir}/bin ${OGRE_BIN_SEARCH_PATH})
-	set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
+    set(OGRE_BIN_SEARCH_PATH ${dir}/Samples/Common/bin ${OGRE_BIN_SEARCH_PATH})
   endforeach(dir)

   if (OGRE_PREFIX_DEPENDENCIES_DIR)


Revert rendering test data.

Revert rendering test data.

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag 8b1f9bd8) # first 8 characters of hash-tag
+  set(revision_tag 826b368f) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


Revert rendering test data.

Revert rendering test data.

# Conflicts:
#	CMakeExternals/MITKData.cmake

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -12,7 +12,7 @@
 set(MITK-Data_DEPENDS ${proj})

 if(BUILD_TESTING)
-  set(revision_tag 8b1f9bd8) # first 8 characters of hash-tag
+  set(revision_tag 826b368f) # first 8 characters of hash-tag
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


DevPack: minor update

DevPack: minor update

--- src/cmake/devpack.cmake
+++ src/cmake/devpack.cmake
@@ -15,16 +15,16 @@

 # Where is unzip ?
 set(DevPackSourceZIP)
-if(WIN32 AND NOT CMAKE_CROSSCOMPILING)
+if (WIN32 AND NOT CMAKE_CROSSCOMPILING)
 	Find_Program(DevPackSourceZIP NAMES "unzip.exe" PATHS "${CMAKE_CURRENT_SOURCE_DIR}/../bin")
 else()
 	Find_Program(DevPackSourceZIP NAMES "unzip")
 endif()
 String(COMPARE EQUAL "${DevPackSourceZIP}" "DevPackSourceZIP-NOTFOUND" DevPackUnzipHasNotBeenFound)
-if(DevPackUnzipHasNotBeenFound)
+if (DevPackUnzipHasNotBeenFound)
 	Message(FATAL_ERROR "The program 'unzip' has not been found. It is required to ")
 endif()
-if(WIN32)
+if (WIN32)
 	YMESSAGE("unzip: ${DevPackSourceZIP}")
 endif()

@@ -37,24 +37,24 @@

-if(CMAKE_COMPILER_IS_GNUCXX)
+if (CMAKE_COMPILER_IS_GNUCXX)
 	set(DEVPACK_COMPILER "g++")
 endif()
 # Trying to find out the operating system
-if(WIN32)
+if (WIN32)
 	set(DEVPACK_OS   "windows")
 	set(DEVPACK_ARCH "i386")
-	if(MINGW)
+	if (MINGW)
 		set(DEVPACK_COMPILER "mingw")
 	else()
 		set(DEVPACK_COMPILER "msvc")
-		if(MSVC70)
+		if (MSVC70)
 			set(DEVPACK_COMPILER "vs7")
 		endif()
-		if(MSVC80)
+		if (MSVC80)
 			set(DEVPACK_COMPILER "vs8")
 		endif()
-		if(MSVC90)
+		if (MSVC90)
 			set(DEVPACK_COMPILER "vs9")
 		endif()
 	endif()
@@ -63,34 +63,34 @@
 	string(TOLOWER "${UNAME_P}" UNAME_P)
 	string(COMPARE EQUAL "${UNAME_P}" "i386" IsI386)
 	string(COMPARE EQUAL "${UNAME_P}" "powerpc" IsPPC)
-	if(IsI386)
+	if (IsI386)
 		set(DEVPACK_ARCH "i386")
 	endif()
-	if(IsPPC)
+	if (IsPPC)
 		set(DEVPACK_ARCH "ppc")
 	endif()
 endif()

-if(NOT DEVPACK_OS)
+if (NOT DEVPACK_OS)
 	String(TOLOWER "${CMAKE_SYSTEM_NAME}" DevPackSystemName)
 	String(COMPARE EQUAL "${DevPackSystemName}" "linux" IsLinux)
-	if(IsLinux)
+	if (IsLinux)
 		set(DEVPACK_OS "linux")
 	endif()
 	String(COMPARE EQUAL "${DevPackSystemName}" "windows" IsWindows)
-	if(IsWindows)
+	if (IsWindows)
 		set(DEVPACK_OS "windows")
 	endif()
 	String(COMPARE EQUAL "${DevPackSystemName}" "freebsd" IsFreeBSD)
-	if(IsFreeBSD)
+	if (IsFreeBSD)
 		set(DEVPACK_OS "freebsd")
 	endif()
 	String(COMPARE EQUAL "${DevPackSystemName}" "darwin" IsDarwin)
-	if(IsDarwin)
+	if (IsDarwin)
 		set(DEVPACK_OS "macos")
 	endif()
 endif()
-if(NOT DEVPACK_ARCH)
+if (NOT DEVPACK_ARCH)
 	set(DEVPACK_ARCH "i386")
 endif()

@@ -100,7 +100,7 @@
 macro(DEVPACK_LIST_CONTAINS var value)
 	set(${var})
 	foreach(value2 ${ARGN})
-		if("${value}" STREQUAL "${value2}")
+		if ("${value}" STREQUAL "${value2}")
 			set(${var} TRUE)
 		endif()
 	endforeach()
@@ -126,16 +126,16 @@
 	# Trying to find the appropriate file
 	File(GLOB FilesFound RELATIVE "${DevPackFolder}" "${DevPackFolder}/${DevPackPrefix}-*")
 	DEVPACK_LIST_CONTAINS(Contains "${DevPackPrefix}-${DevPackShortFilename}" ${FilesFound})
-	if(Contains)
+	if (Contains)
 		file(STRINGS "${DevPackFileInfo}" DevPackInfo)
 		list(FIND "${DevPackInfo}" "1" DevPackReady)
 		DEVPACK_LIST_CONTAINS(DevPackReady "1" ${DevPackInfo})
-		if(NOT DevPackReady)
+		if (NOT DevPackReady)
 			DEVPACK_LIST_CONTAINS(DevPackReady "ok" ${DevPackInfo})
 		endif()
 	endif()

-	if(DevPackReady)
+	if (DevPackReady)
 		set(${var} TRUE)
 	endif()

@@ -159,7 +159,7 @@
 	# Trying to find the appropriate file
 	file(GLOB FilesFound RELATIVE "${DevPackReceiptsFolder}" "${DevPackReceiptsFolder}/${DevPackShortFilename}.zip")
 	DEVPACK_LIST_CONTAINS(Contains "${DevPackShortFilename}.zip" ${FilesFound})
-	if(Contains)
+	if (Contains)
 		set(${var} TRUE)
 	endif()

@@ -190,35 +190,53 @@
 	DEVPACK_IS_INSTALLED(DevPackReady "${dpname}" "${dpversion}" "${dprelease}" "${dpos}" "${dparch}"
 		"${dpcompiler}" "${dptarget}")

-	if(NOT DevPackReady)
+	if (NOT DevPackReady)

 		YMESSAGE("   ${DevPackTitle}: Missing")
 		file(MAKE_DIRECTORY "${DevPackReceiptsFolder}")
 		file(MAKE_DIRECTORY "${DevPackFolder}")
-		set(DevPackReceiptReady FALSE)
+		set(DevPackReceiptReady false)
+		set(DevPackHasBeenDownloaded  false)

 		DEVPACK_IS_IN_RECEIPTS(DevPackReceiptReady "${dpname}" "${dpversion}" "${dprelease}" "${dpos}" "${dparch}"
 			"${dpcompiler}" "${dptarget}")
-		if(NOT DevPackReceiptReady)
+		if (NOT DevPackReceiptReady)
 			YMESSAGE("    . Downloading ${DevPackURL}")
+			set(DevPackHasBeenDownloaded  true)
 			# Download the Pack
+
+			file(DOWNLOAD "http://www.gdfslsdflsdffsdfoogle.com" "${DevPackReceiptsFolder}/${DevPackShortFilename}.zip"
+				STATUS DevPackDwnlStatus)
+			message(STATUS "${DevPackDwnlStatus}")
+			if (NOT "${DevPackDwnlStatus}")
+				message(STATUS "OK")
+			else()
+				message(STATUS "FAILED")
+			endif()
+
 			file(DOWNLOAD "${DevPackURL}" "${DevPackReceiptsFolder}/${DevPackShortFilename}.zip"
-					STATUS DevPackDwnlStatus)
-			DEVPACK_IS_IN_RECEIPTS(DevPackReceiptReady "${dpname}" "${dpversion}" "${dprelease}" "${dpos}"
-				"${dparch}" "${dpcompiler}" "${dptarget}")
-			if(NOT DevPackReceiptReady)
+				STATUS DevPackDwnlStatus)
+			message(STATUS "${DevPackDwnlStatus}")
+			if ("${DevPackDwnlStatus}")
+				DEVPACK_IS_IN_RECEIPTS(DevPackReceiptReady "${dpname}" "${dpversion}" "${dprelease}" "${dpos}"
+					"${dparch}" "${dpcompiler}" "${dptarget}")
+			else()
+				set(DevPackReceiptReady false)
+			endif()
+			if (NOT DevPackReceiptReady)
 				YMESSAGE("    . !! The download has failed")
-			endif(NOT DevPackReceiptReady)
-		endif(NOT DevPackReceiptReady)
-
-		if(DevPackReceiptReady)
+				file(REMOVE "${DevPackReceiptsFolder}/${DevPackShortFilename}.zip")
+			endif()
+		endif()
+
+		if (DevPackReceiptReady)
 			# Execute `unzip`
 			YMESSAGE("    . Extracting the receipt file")
 			execute_process(COMMAND "${DevPackSourceZIP}"
-					-u "${DevPackReceiptsFolder}/${DevPackShortFilename}.zip"
-					-d "${DevPackFolder}"
-					WORKING_DIRECTORY "${DevPackFolder}" OUTPUT_QUIET)
-		endif(DevPackReceiptReady)
+				-u "${DevPackReceiptsFolder}/${DevPackShortFilename}.zip"
+				-d "${DevPackFolder}"
+				WORKING_DIRECTORY "${DevPackFolder}" OUTPUT_QUIET)
+		endif()

 		DEVPACK_IS_INSTALLED(DevPackReady "${dpname}" "${dpversion}" "${dprelease}" "${dpos}" "${dparch}"
 			"${dpcompiler}" "${dptarget}")
@@ -227,7 +245,7 @@
 		YMESSAGE("   ${DevPackTitle}")
 	endif()

-	if(NOT DevPackReady)
+	if (NOT DevPackReady)
 		YMESSAGE("")
 		YMESSAGE("[!!] The installation of the DevPack `${dpname}` has failed.")
 		YMESSAGE("     You can download the DevPack from this url :")


prefer x86 build on windows

prefer x86 build on windows

--- tachyon/cmake/FindSDL2.cmake
+++ tachyon/cmake/FindSDL2.cmake
@@ -88,7 +88,7 @@
 	NAMES SDL2
 	HINTS
 	$ENV{SDL2DIR}
-	PATH_SUFFIXES lib64 lib lib/x64 lib/x86
+	PATH_SUFFIXES lib64 lib lib/x86 lib/x64
 	PATHS ${SDL2_SEARCH_PATHS}
 )

@@ -102,7 +102,7 @@
 			NAMES SDL2main
 			HINTS
 			$ENV{SDL2DIR}
-			PATH_SUFFIXES lib64 lib lib/x64 lib/x86
+			PATH_SUFFIXES lib64 lib lib/x86 lib/x64
 			PATHS ${SDL2_SEARCH_PATHS}
 		)
 	ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")


ENH: use OTBBoostAdapters instead of OTBBoost

--- Modules/Core/Metadata/otb-module.cmake
+++ Modules/Core/Metadata/otb-module.cmake
@@ -5,7 +5,7 @@
 otb_module(OTBMetadata
   DEPENDS
     OTBObjectList
-    OTBBoost
+    OTBBoostAdapters
     OTBITK
     OTBOSSIMAdapters
     OTBCommon


Update Mosaic Remote Module GIT_TAG

Update Mosaic Remote Module GIT_TAG

--- Modules/Remote/Mosaic.remote.cmake
+++ Modules/Remote/Mosaic.remote.cmake
@@ -5,5 +5,5 @@
 https://github.com/remicres/otb-mosaic
 "
   GIT_REPOSITORY https://github.com/remicres/otb-mosaic.git
-  GIT_TAG 64cb06798fb237e10f929c1adaab37441e09fbc3
+  GIT_TAG 9a8cdd63ed3bba500bb4ea3867abc38bce8be562
 )


- Console: added mising fix on yafray_config.h template

--- CMakeConfig/templates/yafray_config.h.cmake
+++ CMakeConfig/templates/yafray_config.h.cmake
@@ -2,7 +2,7 @@
 #ifndef Y_CONFIG_H
 #define Y_CONFIG_H
 #include "yafray_constants.h"
-#include <utilities/color_console.h>
+#include <yafraycore/color_console.h>

 #define MIN_RAYDIST 0.00005
 #define YAF_SHADOW_BIAS 0.0005


BUG: Remove unused variables from Qt5 external cmake and find_packate


another fix for CMake empty vars

another fix for CMake empty vars

--- src/version.cmake
+++ src/version.cmake
@@ -40,13 +40,15 @@
 else()
 	message(STATUS "You are currently on commit ${COMMIT}")

-	# Give our output variable a default value, because CMake likes to choke on empty variables
-	set(TAGGEDCOMMITOUT "a")
 	# Get all the tags
 	execute_process(COMMAND "${GIT}" show-ref --tags -d --abbrev RESULT_VARIABLE RET OUTPUT_VARIABLE TAGGEDCOMMITOUT OUTPUT_STRIP_TRAILING_WHITESPACE)

 	# Make sure we actually got some tags
-	string(LENGTH ${TAGGEDCOMMITOUT} TLEN)
+	if(TAGGEDCOMMITOUT)
+		string(LENGTH ${TAGGEDCOMMITOUT} TLEN)
+	else()
+		set(TLEN 1)
+	endif()

 	if(RET OR TLEN LESS 5)
 	    message(WARNING "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive.")


ManageVariable: refactored

ManageVariable: refactored

--- Modules/ManageVariable.cmake
+++ Modules/ManageVariable.cmake
@@ -1,70 +1,93 @@
 # - Get or set variables from various sources.
 #
-# Includes:
-#   ManageString
-#   ManageFile
-#
-# Included by:
-#   ManageVersion
-#   PackRPM
+# Included Modules:
+#   - ManageFile
+#   - ManageString
 #
 # Defines following functions:
-#   SETTING_STRING_GET_VARIABLE(var value str
-#     [NOUNQUOTE] [NOREPLACE] [setting_sign]
-#     )
-#     - Get a variable and a value from a setting in string format.
-#       i.e.  VAR=Value
-#       pattern. '#' is used for comment.
-#       * Parameters:
-#         + var: Variable name extracted from str.
+#   SETTING_STRING_GET_VARIABLE(<key> <value> <str>
+#       [NOUNQUOTE] [NOREPLACE] [<setting_sign>]
+#     )
+#     - Split a setting string (e.g. VAR=value) to key and value.
+#         Note that if the first non-blank character is "#", then the
+#         string is deemed as a comment thus will be skipped.
+#       * Parameters:
+#         + key: Key extracted from str.
 #         + value: Value extracted from str
 #         + str: String to be extracted variable and value from.
 #         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
 #         + NOREPLACE (Optional) Without this parameter, this macro replaces
 #           previous defined variables, use NOREPLACE to prevent this.
 #         + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons.
-#         + setting_sign: (Optional) The symbol that separate attribute name and its value.
+#         + setting_sign: (Optional) The symbol that separate key name and its value.
 #           Default value: "="
 #
 # Defines following macros:
 #   CMAKE_FEDORA_CONF_GET_ALL_VARIABLES()
 #     - Get all variables from cmake-fedora.conf
 #
-#   COMMAND_OUTPUT_TO_VARIABLE(var cmd)
-#     - Store command output to a variable, without new line characters (\n and \r).
-#       This macro is suitable for command that output one line result.
-#       Note that the var will be set to ${var_name}-NOVALUE if cmd does not have
-#       any output.
-#       * Parameters:
-#         var: A variable that stores the result.
-#         cmd: A command.
-#
-#   SETTING_FILE_GET_VARIABLES_PATTERN(var attr_pattern setting_file
+#   SETTING_FILE_GET_VARIABLES_PATTERN(<var> <key_pattern> <setting_file>
+#       [NOUNQUOTE] [NOREPLACE]
+#       [NOESCAPE_SEMICOLON] [<setting_sign>]
+#     )
+#     - Get variable values from a setting file if their names matches given
+#         pattern. Note that if the first non-blank character is "#", then the
+#         string is deemed as a comment thus will be skipped.
+#       * Parameters:
+#         + var: If specified, the value of setting string will be assign to the var;
+#             otherwise using matched key name as variable name.
+#         + key_pattern: Regex pattern of match the key name.
+#         + setting_file: Setting filename.
+#         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
+#         + NOREPLACE (Optional) Without this parameter, this macro replaces
+#           previous defined variables, use NOREPLACE to prevent this.
+#         + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons.
+#         + setting_sign: (Optional) The symbol that separate key name and its value.
+#           Default value: "="
+#
+#   SETTING_FILE_GET_ALL_VARIABLES(<setting_file> [NOUNQUOTE] [NOREPLACE]
+#       [NOESCAPE_SEMICOLON] [<setting_sign>]
+#     )
+#     - Get all variable values from a setting file.
+#         It is equivalent to:
+#         SETTING_FILE_GET_VARIABLES_PATTERN("" "[A-Za-z_][A-Za-z0-9_]*"
+#           "${setting_file}" ${ARGN})
+#         Note that if the first non-blank character is "#", then the
+#           string is deemed as a comment thus will be skipped.
+#       * Parameters:
+#         + setting_file: Setting filename.
+#         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
+#         + NOREPLACE (Optional) Without this parameter, this macro replaces
+#           previous defined variables, use NOREPLACE to prevent this.
+#         + NOESCAPE_SEMICOLON: (Optional) Do not escape semicolons.
+#         + setting_sign: (Optional) The symbol that separate key and value.
+#           Default value: "="
+#
+#   SETTING_FILE_GET_VARIABLE(<var> <key_name> <setting_file>
 #     [NOUNQUOTE] [NOREPLACE]
-#     [NOESCAPE_SEMICOLON] [setting_sign]
-#     )
-#     - Get variable values from a setting file if their names matches given
-#       pattern. '#' is used for comment.
-#       * Parameters:
-#         + var: Variable to store the attribute value.
-#           Set to "" to set attribute under matched variable name.
-#         + attr_pattern: Regex pattern of variable name.
+#     [NOESCAPE_SEMICOLON] [<setting_sign>]
+#     )
+#     - Get the value of a key from a setting file.
+#       It is equivalent to:
+#	SETTING_FILE_GET_VARIABLES_PATTERN(${var} "${key_name}"
+#	    "${setting_file}" ${ARGN})
+#      '#' is used to comment out setting.
+#       * Parameters:
+#         + var: Variable to store the value.
+#         + key_name: Name of the key.
 #         + setting_file: Setting filename.
 #         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
 #         + NOREPLACE (Optional) Without this parameter, this macro replaces
 #           previous defined variables, use NOREPLACE to prevent this.
 #         + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons.
-#         + setting_sign: (Optional) The symbol that separate attribute name and its value.
-#           Default value: "="
-#
-#   SETTING_FILE_GET_ALL_VARIABLES(setting_file [NOUNQUOTE] [NOREPLACE]
-#     [NOESCAPE_SEMICOLON] [setting_sign]
-#     )
-#     - Get all variable values from a setting file.
-#       It is equivalent to:
-#       SETTING_FILE_GET_VARIABLES_PATTERN("" "[A-Za-z_][A-Za-z0-9_]*"
-#        "${setting_file}" ${ARGN})
-#      '#' is used to comment out setting.
+#         + setting_sign: (Optional) The symbol that separate key and value.
+#           Default value: "="
+#
+#   SETTING_FILE_GET_ALL_VARIABLES(<setting_file> [NOUNQUOTE] [NOREPLACE]
+#     [NOESCAPE_SEMICOLON] [<setting_sign>]
+#     )
+#     - Get all key values from a setting file.
+#       '#' is used to comment out setting.
 #       * Parameters:
 #         + setting_file: Setting filename.
 #         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
@@ -74,93 +97,46 @@
 #         + setting_sign: (Optional) The symbol that separate attribute name and its value.
 #           Default value: "="
 #
-#   SETTING_FILE_GET_VARIABLE(var attr_name setting_file
-#     [NOUNQUOTE] [NOREPLACE]
-#     [NOESCAPE_SEMICOLON] [setting_sign]
-#     )
-#     - Get a variable value from a setting file.
-#       It is equivalent to:
-#	SETTING_FILE_GET_VARIABLES_PATTERN(${var} "${attr_name}"
-#	    "${setting_file}" ${ARGN})
-#      '#' is used to comment out setting.
-#       * Parameters:
-#         + var: Variable to store the attribute value.
-#         + attr_name: Name of the variable.
-#         + setting_file: Setting filename.
-#         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
-#         + NOREPLACE (Optional) Without this parameter, this macro replaces
-#           previous defined variables, use NOREPLACE to prevent this.
-#         + NOESCAPE_SEMICOLON: (Optional) do not escape semicolons.
-#         + setting_sign: (Optional) The symbol that separate attribute name and its value.
-#           Default value: "="
-#
-#   SETTING_FILE_GET_ALL_VARIABLES(setting_file [NOUNQUOTE] [NOREPLACE]
-#     [NOESCAPE_SEMICOLON] [setting_sign]
-#     )
-#     - Get all attribute values from a setting file.
-#       '#' is used to comment out setting.
-#       * Parameters:
-#         + setting_file: Setting filename.
-#         + NOUNQUOTE: (Optional) do not remove the double quote mark around the string.
-#         + NOREPLACE (Optional) Without this parameter, this macro replaces
-#           previous defined variables, use NOREPLACE to prevent this.
-#         + NOESCAPE_SEMICOLON: (Optional) Do not escape semicolons.
-#         + setting_sign: (Optional) The symbol that separate attribute name and its value.
-#           Default value: "="
-#
-#   GET_ENV(var default_value [env]
-#      [[CACHE type docstring [FORCE]] | PARENT_SCOPE]
+#   GET_ENV(<var> <default_value> [<env>]
+#      [[CACHE <type> <docstring> [FORCE]] | PARENT_SCOPE]
 #     )
 #     - Get the value of a environment variable, or use default
-#       if the environment variable does not exist or is empty.
-#       * Parameters:
-#         var: Variable to be set
-#         default_value: Default value of the var
-#         env: (Optional) The name of environment variable. Only need if different from var.
-#         CACHE ... : Arguments for SET
-#         PARENT_SCOPE: Arguments for SET
-#
-#   SET_VAR(var untrimmed_value)
-#     - Trim an set the value to a variable.
-#       * Parameters:
-#         var: Variable to be set
-#         untrimmed_value: Untrimmed values that may have space, \t, \n, \r in the front or back of the string.
-#
-#   VARIABLE_PARSE_ARGN(var validOptions [arguments ])
+#       if the environment variable does not exist or empty.
+#       * Parameters:
+#         + var: Variable to be set
+#         + default_value: Default value of the var
+#         + env: (Optional) The name of environment variable. Only need if different from var.
+#         + CACHE ... : Arguments for SET
+#         + PARENT_SCOPE: Arguments for SET
+#
+#   SET_VAR(<var> <untrimmed_value>)
+#     - Trim and set the value to a variable.
+#       * Parameters:
+#         + var: Variable to be set
+#         + untrimmed_value: Untrimmed values that may have space, \t, \n, \r in the front or back of the string.
+#
+#   VARIABLE_PARSE_ARGN(<var> <valid_option_list> [arguments ...])
 #     - Parse the arguments and put the result in var and var_<optName>
 #       * Parameters:
-#         var: Main variable name.
-#         validOptions: List name of valid options.
-#         arguments: (Optional) variable to be parsed.
-#
-#   VARIABLE_TO_ARGN(var prefix validOptions)
+#         + var: Main variable name.
+#         + valid_option_list: List name of valid options.
+#         + arguments ...: (Optional) variable to be parsed.
+#
+#   VARIABLE_TO_ARGN(<var> <prefix> <valid_option_list>)
 #     - Merge the variable and options to the form of ARGN.
-#       Like the reverse of VARIABLE_PARSE_ARGN
-#       * Parameters:
-#         var: Variable that holds result.
-#         prefix: Main variable name that to be processed.
-#         validOptions: List name of valid options.
+#         Like the reverse of VARIABLE_PARSE_ARGN
+#       * Parameters:
+#         + var: Variable that holds result.
+#         + prefix: Main variable name that to be processed.
+#         + valid_option_list: List name of valid options.
 #

 IF(DEFINED _MANAGE_VARIABLE_CMAKE_)
     RETURN()
 ENDIF(DEFINED _MANAGE_VARIABLE_CMAKE_)
 SET(_MANAGE_VARIABLE_CMAKE_ "DEFINED")
+INCLUDE(ManageFile)
 INCLUDE(ManageString)
-INCLUDE(ManageFile)
-
-MACRO(COMMAND_OUTPUT_TO_VARIABLE var cmd)
-    EXECUTE_PROCESS(
-	COMMAND ${cmd} ${ARGN}
-	OUTPUT_VARIABLE _cmd_output
-	OUTPUT_STRIP_TRAILING_WHITESPACE
-	)
-    IF(_cmd_output)
-	SET(${var} ${_cmd_output})
-    ELSE(_cmd_output)
-	SET(var "${var}-NOVALUE")
-    ENDIF(_cmd_output)
-ENDMACRO(COMMAND_OUTPUT_TO_VARIABLE var cmd)

 # This macro is meant to be internal.
 MACRO(_MANAGE_VARIABLE_SET var value)
@@ -240,7 +216,7 @@
     SET(${var} "${_ret}")
 ENDMACRO(FILE_READ_ESCAPE var filename)

-MACRO(SETTING_FILE_GET_VARIABLES_PATTERN var attr_pattern setting_file)
+MACRO(SETTING_FILE_GET_VARIABLES_PATTERN var key_pattern setting_file)
     IF("${setting_file}" STREQUAL "")
 	M_MSG(${M_FATAL} "SETTING_FILE_GET_VARIABLES_PATTERN: setting_file ${setting_file} is empty")
     ENDIF("${setting_file}" STREQUAL "")
@@ -263,7 +239,7 @@
 	ENDIF(${_arg} STREQUAL "NOUNQUOTE")
     ENDFOREACH(_arg)

-    # Escape everything to be safe.
+    ## Escape everything to be safe.
     FILE_READ_ESCAPE(_lines "${setting_file}")

     #STRING_SPLIT(_lines "\n" "${_txt_content}")
@@ -273,53 +249,50 @@
     FOREACH(_line ${_lines})
 	#MESSAGE("_line=|${_line}|")
 	IF(NOT _line MATCHES "^[ \\t]*#H")
-	    # Not a comment line.
+	    ## Not a comment line.
 	    IF(_join_next EQUAL 1)
 		SET(_actual_line "${_actual_line}${_line}" )
-	    ELSE(_join_next EQUAL 1)
+	    ELSE()
 		SET(_actual_line "${_line}")
-	    ENDIF(_join_next EQUAL 1)
+	    ENDIF()
 	    #MESSAGE("_actual_line=|${_actual_line}|")

 	    IF(_actual_line MATCHES "#B$")
-		#Join the lines that end with \\
+		## Join the lines that end with \\
 		SET(_join_next 1)
 		STRING(REGEX REPLACE "#B$" "" _actual_line "${_actual_line}")
-	    ELSE(_actual_line MATCHES "#B$")
+	    ELSE()
 		SET(_join_next 0)
-		IF(_actual_line MATCHES "[ \\t]*${attr_pattern}[ \\t]*${setting_sign}")
+		IF(_actual_line MATCHES "[ \\t]*${key_pattern}[ \\t]*${setting_sign}")
 		    #MESSAGE("*** matched_line=|${_actual_line}|")
 		    SETTING_STRING_GET_VARIABLE(_attr _value
 			"${_actual_line}" ${setting_sign} ${_noUnQuoted} )
 		    #MESSAGE("*** _attr=${_attr} _value=${_value}")
 		    IF(_noReplace STREQUAL "" OR NOT DEFINED ${_attr})
-			# Unencoding
+			## Unencoding
 			_STRING_UNESCAPE(_value "${_value}" ${_noEscapeSemicolon} ESCAPE_VARIABLE)
 			IF(_escapeVariable STREQUAL "")
-			    # Variable should not be escaped
-			    # i.e. need substitution
+			    ## If "ESCAPE_VARIABLE" is not defined.
+			    ## then substitute the variable
 			    _MANAGE_VARIABLE_SET(_value "${_value}")
-			ENDIF(_escapeVariable STREQUAL "")
+			ENDIF()
 			IF("${var}" STREQUAL "")
 			    SET(${_attr} "${_value}")
-			ELSE("${var}" STREQUAL "")
+			ELSE()
 			    SET(${var} "${_value}")
-			ENDIF("${var}" STREQUAL "")
-		    ENDIF(_noReplace STREQUAL "" OR NOT DEFINED ${_attr})
-		ENDIF(_actual_line MATCHES "[ \\t]*${attr_pattern}[ \\t]*${setting_sign}")
-
+			ENDIF()
+		    ENDIF()
+		ENDIF()
 	    ENDIF(_actual_line MATCHES "#B$")
-
 	ENDIF(NOT _line MATCHES "^[ \\t]*#H")
     ENDFOREACH(_line ${_lines})
     #SET(${var} "${_value}")
-
-ENDMACRO(SETTING_FILE_GET_VARIABLES_PATTERN var attr_pattern setting_file)
-
-MACRO(SETTING_FILE_GET_VARIABLE var attr_name setting_file)
-    SETTING_FILE_GET_VARIABLES_PATTERN(${var} "${attr_name}"
+ENDMACRO(SETTING_FILE_GET_VARIABLES_PATTERN var key_pattern setting_file)
+
+MACRO(SETTING_FILE_GET_VARIABLE var key_name setting_file)
+    SETTING_FILE_GET_VARIABLES_PATTERN(${var} "${key_name}"
 	"${setting_file}" ${ARGN})
-ENDMACRO(SETTING_FILE_GET_VARIABLE var attr_name setting_file)
+ENDMACRO(SETTING_FILE_GET_VARIABLE var key_name setting_file)

 MACRO(SETTING_FILE_GET_ALL_VARIABLES setting_file)
     SETTING_FILE_GET_VARIABLES_PATTERN("" "[A-Za-z_][A-Za-z0-9_.]*"
@@ -373,18 +346,18 @@
     #MESSAGE("***SET_VAR: ${var}=|${value}|")
 ENDMACRO(SET_VAR var untrimmedValue)

-MACRO(VARIABLE_PARSE_ARGN var validOptions)
+MACRO(VARIABLE_PARSE_ARGN var valid_option_list)
     SET(_optName "")	## Last _optName
     SET(_listName ${var})

     ## Unset all, otherwise ghost from previous running exists.
     UNSET(${var})
-    FOREACH(_o ${${validOptions}})
+    FOREACH(_o ${${valid_option_list}})
 	UNSET(${var}_${_o})
-    ENDFOREACH(_o ${validOptions})
-
-    FOREACH(_arg ${ARGN})
-	LIST(FIND ${validOptions} "${_arg}" _optIndex)
+    ENDFOREACH(_o ${valid_option_list})
+
+    FOREACH(_arg ${ARGN})
+	LIST(FIND ${valid_option_list} "${_arg}" _optIndex)
 	IF(_optIndex EQUAL -1)
 	    ## Not an option name. Append to existing options
 	    LIST(APPEND ${_listName} "${_arg}")
@@ -404,14 +377,14 @@
 	    ENDIF(DEFINED ${var}_${_arg})
 	ENDIF(_optIndex EQUAL -1)
     ENDFOREACH(_arg ${ARGN})
-ENDMACRO(VARIABLE_PARSE_ARGN var validOptions)
-
-MACRO(VARIABLE_TO_ARGN var prefix validOptions)
+ENDMACRO(VARIABLE_PARSE_ARGN var valid_option_list)
+
+MACRO(VARIABLE_TO_ARGN var prefix valid_option_list)
     SET(${var} "${${prefix}}")
-    FOREACH(_o ${${validOptions}})
+    FOREACH(_o ${${valid_option_list}})
 	IF(DEFINED ${prefix}_${_o})
 	    LIST(APPEND ${var} "${_o}" "${${prefix}_${_o}}")
 	ENDIF(DEFINED ${prefix}_${_o})
-    ENDFOREACH(_o ${${validOptions}})
-ENDMACRO(VARIABLE_TO_ARGN var prefix validOptions)
-
+    ENDFOREACH(_o ${${valid_option_list}})
+ENDMACRO(VARIABLE_TO_ARGN var prefix valid_option_list)
+


禁用掉VC字符集warning

禁用掉VC字符集warning

--- project/cmake/CompilerOption.cmake
+++ project/cmake/CompilerOption.cmake
@@ -153,7 +153,7 @@
             message(STATUS "AppleClang use stdlib=default(libstdc++)")
         endif()
     elseif(MSVC)
-        list(APPEND COMPILER_STRICT_CFLAGS /W4 /wd"4100" /wd"4125" /WX)
+        list(APPEND COMPILER_STRICT_CFLAGS /W4 /wd"4100" /wd"4125" /wd"4566" /WX)
         add_definitions(/MP /EHsc)
         if (MSVC_VERSION GREATER_EQUAL 1910)
             add_definitions(/std:c++17)


Split off 7.12.70

Split off 7.12.70

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 12 )
-set ( HPCC_POINT 69 )
+set ( HPCC_POINT 71 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.36

Split off 7.12.36

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 12 )
-set ( HPCC_POINT 35 )
+set ( HPCC_POINT 37 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[axl] release 5.5.6

[axl] release 5.5.6

[graco] release 1.2.1
[jancy] release 1.7.1

--- version.cmake
+++ version.cmake
@@ -2,7 +2,7 @@

 set (JANCY_VERSION_MAJOR     1)
 set (JANCY_VERSION_MINOR     7)
-set (JANCY_VERSION_REVISION  0)
+set (JANCY_VERSION_REVISION  1)
 set (JANCY_VERSION_TAG)

 set (JANCY_VERSION_FILE_SUFFIX "${JANCY_VERSION_MAJOR}.${JANCY_VERSION_MINOR}.${JANCY_VERSION_REVISION}")


Nagios Monitoring 7.10.6-rc1 Release Candidate 1

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 10 )
-set ( HPCC_POINT 5 )
-set ( HPCC_MATURITY "closedown" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_POINT 6 )
+set ( HPCC_MATURITY "rc" )
+set ( HPCC_SEQUENCE 1 )
 ###


CMake build: Use ${CMAKE_STATIC_LIBRARY_SUFFIX} to look for .lib on Windows.

--- examples/cmake/FindLibtorrentRasterbar.cmake
+++ examples/cmake/FindLibtorrentRasterbar.cmake
@@ -19,7 +19,7 @@

 if(LibtorrentRasterbar_USE_STATIC_LIBS)
     set(LibtorrentRasterbar_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-    set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
 endif()

 if(PC_LIBTORRENT_RASTERBAR_FOUND)


Update Superbuild ITK version to 4.13.1

Update Superbuild ITK version to 4.13.1

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -52,7 +52,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(ITK_GIT_TAG "090984d7fe80d911c61f0213ffc1da208ca1d0b9" CACHE STRING "Tag in ITK git repo")
+set(ITK_GIT_TAG "v4.13.1" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


WIP: Updated to vtk 6.2

WIP: Updated to vtk 6.2

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -160,7 +160,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY https://github.com/Kitware/VTK.git)
-  set(${proj}_GIT_TAG v6.1.0 )
+  set(${proj}_GIT_TAG 836c511abf0b8d97599b25f9b26658b8636ed8d7 )
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -194,7 +194,7 @@
 #    -P ${VTKPatchScript}
 #    )

-  set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-6.1)
+  set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/vtk-6.2)
 else()
   if(${USE_SYSTEM_${extProjName}})
     find_package(${extProjName} ${${extProjName}_REQUIRED_VERSION} REQUIRED)


SuperBuild: geos: build either static or shared

--- SuperBuild/CMake/External_geos.cmake
+++ SuperBuild/CMake/External_geos.cmake
@@ -33,6 +33,9 @@
    CMAKE_CACHE_ARGS
    ${SB_CMAKE_CACHE_ARGS}
    -DGEOS_ENABLE_TESTS:BOOL=OFF
+   -DGEOS_ENABLE_MACOSX_FRAMEWORK:BOOL=OFF
+   -DGEOS_BUILD_STATIC:BOOL=${BUILD_SHARED_LIBS}
+   -DGEOS_BUILD_SHARED:BOOL=${BUILD_SHARED_LIBS}
    CMAKE_COMMAND ${GEOS_CMAKE_COMMAND}
    LOG_DOWNLOAD 1
    LOG_CONFIGURE 1


Fix Symlink.

Fix Symlink.

	* build-aux/cmake/modules/Symlink.cmake: here.

Signed-off-by: Vincent Ordy <d26676a94649632b1c477e78d16c5a762a0d6fbf@gostai.com>

--- build-aux/cmake/modules/Symlink.cmake
+++ build-aux/cmake/modules/Symlink.cmake
@@ -10,34 +10,65 @@
 ## For comments, bug reports and feedback: http://www.urbiforge.com
 ##

-## Create a symlink of TARGET in DIRECTORY.
+## Create a symlink of OLD in NEW.
 ## For Windows, copy instead of symlinking.

 if(NOT COMMAND SYMLINK)

-  function(SYMLINK TARGET DIRECTORY)
-    if(IS_DIRECTORY ${TARGET})
-      set(TARGET "${TARGET}/")
-    endif(IS_DIRECTORY ${TARGET})
-    string(REGEX REPLACE "/+$" "" DIRECTORY ${DIRECTORY})
+  function(SYMLINK OLD NEW)
+    ## Prepare
+    ## -------
+    ## cmake create_symlink does not support syntax "à la"
+    ## `ln [-fs] source_file ... target_dir',
+    ## so we emulate it.
+
+    if(IS_DIRECTORY ${OLD})
+      string(REGEX REPLACE "/+$" "" OLD ${OLD})
+      set(OLD "${OLD}/")
+    endif(IS_DIRECTORY ${OLD})
+    if(NEW MATCHES "/$")
+      if(IS_DIRECTORY ${OLD})
+        string(REGEX MATCH "/[^/]+/$" FILENAME ${OLD})
+      else(IS_DIRECTORY ${OLD})
+        string(REGEX MATCH "/[^/]+$" FILENAME ${OLD})
+      endif(IS_DIRECTORY ${OLD})
+      if(FILENAME STREQUAL "")
+        message(SEND_ERROR "Failed to extract filename from ${OLD}")
+      endif(FILENAME STREQUAL "")
+      string(REPLACE "/" "" FILENAME ${FILENAME})
+      set(NEW "${NEW}/${FILENAME}")
+    endif(NEW MATCHES "/$")
+    if(EXISTS ${NEW})
+      message("-- Skipping symlink `${OLD}' to `${NEW}': ${NEW} already exists")
+      return()
+    endif(EXISTS ${NEW})
+    message("-- *** Symlinking `${OLD}' to `${NEW}'")
+
+    ## Do
     if(UNIX)
       execute_process(COMMAND ${CMAKE_COMMAND}
         -E create_symlink
-        "${TARGET}" "${DIRECTORY}"
+        "${OLD}" "${NEW}"
         )
     else(UNIX)
-      if(IS_DIRECTORY ${TARGET})
+      if(IS_DIRECTORY ${OLD})
         execute_process(COMMAND ${CMAKE_COMMAND}
           -E copy_directory
-          "${TARGET}" "${DIRECTORY}"
+          "${OLD}" "${NEW}"
           )
       else(IS_DIRECTORY)
         execute_process(COMMAND ${CMAKE_COMMAND}
           -E copy
-          "${TARGET}" "${DIRECTORY}"
+          "${OLD}" "${NEW}"
           )
       endif(IS_DIRECTORY)
     endif(UNIX)
+
+    ## Check
+    if(NOT EXISTS ${NEW})
+      message(SEND_ERROR "!!! Symlink creating failed!")
+    endif(NOT EXISTS ${NEW})
+
   endfunction(SYMLINK)

 endif(NOT COMMAND SYMLINK)


Last mod post nleroy's packaging changes.

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -151,7 +151,7 @@
 	set( C_SBIN bin )
 	set( C_ETC etc )

-	set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CONDOR_PACKAGE_NAME}")
+	set (CPACK_PACKAGE_INSTALL_DIRECTORY "${CONDOR_VERSION}")
 	set (CPACK_PACKAGE_FILE_NAME "${CONDOR_VERSION}")
 	set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CONDOR_VERSION}")


[cmake] Also provide absolute paths for shared libraries/executables in addition to static libraries.

Eliminates a warning when building lldb.

It looks like lldb is still able to find the right library. But doing it this
way is guaranteed to be correct (eliminating future bugs is good).

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -40,6 +40,15 @@
   set(${outvar} "${path}" PARENT_SCOPE)
 endfunction()

+function(get_imported_library_prefix outvar target prefix)
+  string(FIND "${target}" "${prefix}" ALREADY_HAS_PREFIX)
+  if (ALREADY_HAS_PREFIX)
+    set(${outvar} "" PARENT_SCOPE)
+  else()
+    set(${outvar} "${prefix}" PARENT_SCOPE)
+  endif()
+endfunction()
+
 # What this function does is go through each of the passed in imported targets
 # from LLVM/Clang and changes them to use the appropriate fully expanded paths.
 #
@@ -52,14 +61,29 @@

     get_target_property(TARGET_TYPE ${t} TYPE)

-    # We only want to do this for static libraries for now.
-    if (NOT ${TARGET_TYPE} STREQUAL "STATIC_LIBRARY")
+    if (NOT "${TARGET_TYPE}" STREQUAL "STATIC_LIBRARY" AND
+        NOT "${TARGET_TYPE}" STREQUAL "SHARED_LIBRARY" AND
+        NOT "${TARGET_TYPE}" STREQUAL "EXECUTABLE")
+      message(FATAL_ERROR "Unsupported imported target type ${TARGET_TYPE}")
+    endif()
+
+    # Ok, so at this point, we know that we have an executable, static library,
+    # or shared library.
+    #
+    # First we handle the executables.
+    if ("${TARGET_TYPE}" STREQUAL "EXECUTABLE")
+      set_target_properties(${t} PROPERTIES
+        IMPORTED_LOCATION_DEBUG "${LLVM_BINARY_OUTPUT_INTDIR}/${t}"
+        IMPORTED_LOCATION_RELEASE "${LLVM_BINARY_OUTPUT_INTDIR}/${t}")
       continue()
     endif()

+    # Otherwise, we have libraries. Since libclang has an extra lib prefix in
+    # its target name, we have to handle it specially.
+    get_imported_library_prefix(PREFIX "${t}" "${CMAKE_${TARGET_TYPE}_PREFIX}")
     set_target_properties(${t} PROPERTIES
-      IMPORTED_LOCATION_DEBUG "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${t}.a"
-      IMPORTED_LOCATION_RELEASE "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${t}.a")
+      IMPORTED_LOCATION_DEBUG "${LLVM_LIBRARY_OUTPUT_INTDIR}/${PREFIX}${t}.${CMAKE_${TARGET_TYPE}_SUFFIX}"
+      IMPORTED_LOCATION_RELEASE "${LLVM_LIBRARY_OUTPUT_INTDIR}/${PREFIX}${t}.${CMAKE_${TARGET_TYPE}_SUFFIX}")
   endforeach()
 endfunction()

@@ -119,6 +143,7 @@
   # against a matching LLVM build configuration.  However, we usually want to be
   # flexible and allow linking a debug Swift against optimized LLVM.
   set(LLVM_RUNTIME_OUTPUT_INTDIR "${LLVM_BINARY_DIR}")
+  set(LLVM_BINARY_OUTPUT_INTDIR "${LLVM_TOOLS_BINARY_DIR}")
   set(LLVM_LIBRARY_OUTPUT_INTDIR "${LLVM_LIBRARY_DIR}")

   if (XCODE)


Test environment should not take plugins enabled value from cfg file

This was breaking some tests in development environments where plugins
were enabled.

--- tests/PythonTests.cmake
+++ tests/PythonTests.cmake
@@ -64,6 +64,10 @@
     set_property(TEST ${name} PROPERTY ENVIRONMENT
       "ROMANESCO_PLUGINS_ENABLED=${fn_PLUGINS_ENABLED}"
     )
+  else()
+    set_property(TEST ${name} PROPERTY ENVIRONMENT
+      "ROMANESCO_PLUGINS_ENABLED="
+    )
   endif()
 endfunction()


Fixing coverage

Fixing coverage

--- tests/PythonTests.cmake
+++ tests/PythonTests.cmake
@@ -38,7 +38,7 @@
       NAME ${name}
       WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
       COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append "--rcfile=${py_coverage_rc}"
-              "--source=romanesco" -m unittest -v ${module}
+              "--source=romanesco,gaia" -m unittest -v ${module}
     )
   else()
     add_test(
@@ -59,15 +59,15 @@
   if(PYTHON_COVERAGE)
     add_test(
       NAME ${name}
-      WORKING_DIRECTORY "${py_testdir}"
-      COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append
-              docstring_test.py -v ${module}
+      WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
+      COMMAND "${PYTHON_COVERAGE_EXECUTABLE}" run -p --append "--rcfile=${py_coverage_rc}"
+              "--source=romanesco,gaia" "${py_testdir}/docstring_test.py" -v ${module}
     )
   else()
     add_test(
       NAME ${name}
-      WORKING_DIRECTORY "${py_testdir}"
-      COMMAND "${PYTHON_EXECUTABLE}" docstring_test.py -v ${module}
+      WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
+      COMMAND "${PYTHON_EXECUTABLE}" "${py_testdir}/docstring_test.py" -v ${module}
     )
   endif()
   if(PYTHON_COVERAGE)


COMP: Simplify submodule loading logic

COMP: Simplify submodule loading logic

Simplify the ordered loading of submodules.
Cleanup local variables names and scope.

--- Wrapping/TypedefMacros.cmake
+++ Wrapping/TypedefMacros.cmake
@@ -350,47 +350,32 @@
 ################################################################################

 macro(itk_auto_load_submodules)
+  # Global vars used: WRAPPER_LIBRARY_SOURCE_DIR
+  # Global vars modified: WRAPPER_SUBMODULE_ORDER

   # Include the *.wrap files in WRAPPER_LIBRARY_SOURCE_DIR. This causes
   # corresponding wrap_*.cxx files to be generated WRAPPER_LIBRARY_OUTPUT_DIR,
   # and added to the WRAPPER_LIBRARY_SWIG_INPUTS list.
   # In addition, this causes the other required wrap_*.cxx files for the entire
   # library and each wrapper language to be created.
-  # Finally, this macro causes the language support files for the templates and
+  # This macro causes the language support files for the templates and
   # library here defined to be created.

-  # Next, include modules already in WRAPPER_SUBMODULE_ORDER, because those are
-  # guaranteed to be processed first.
-  foreach(module ${WRAPPER_SUBMODULE_ORDER})
-    itk_load_submodule("${module}")
-  endforeach()
-
   # Now search for other *.wrap files to include
-  file(GLOB wrap_cmake_files "${WRAPPER_LIBRARY_SOURCE_DIR}/*.wrap")
+  file(GLOB _wrap_cmake_files "${WRAPPER_LIBRARY_SOURCE_DIR}/*.wrap")
   # sort the list of files so we are sure to always get the same order on all system
   # and for all builds. That's important for several reasons:
   # - the order is important for the order of creation of python template
   # - the typemaps files are always the same, and the rebuild can be avoided
-  list(SORT wrap_cmake_files)
-  foreach(_file ${wrap_cmake_files})
+  list(SORT _wrap_cmake_files)
+  foreach(_file ${_wrap_cmake_files})
     # get the module name from module.wrap
-    get_filename_component(module "${_file}" NAME_WE)
-
-    # if the module is already in the list, it means that it is already included
-    # ... and do not include excluded modules
-    set(will_include 1)
-    foreach(already_included ${WRAPPER_SUBMODULE_ORDER})
-      if("${already_included}" STREQUAL "${module}")
-        set(will_include 0)
-      endif()
-    endforeach()
-
-    if(${will_include})
-      # Add the module name to the list. WRITE_MODULE_FILES uses this list
-      # to create the master library wrapper file.
-      list(APPEND WRAPPER_SUBMODULE_ORDER "${module}")
-      itk_load_submodule("${module}")
-    endif()
+    get_filename_component(_module "${_file}" NAME_WE)
+    list(APPEND WRAPPER_SUBMODULE_ORDER "${_module}")
+  endforeach()
+  list(REMOVE_DUPLICATES WRAPPER_SUBMODULE_ORDER)
+  foreach(_module ${WRAPPER_SUBMODULE_ORDER})
+    itk_load_submodule("${_module}")
   endforeach()
 endmacro()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   25)
+SET(KWSYS_DATE_STAMP_DAY   26)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   10)
+SET(KWSYS_DATE_STAMP_DAY   11)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   25)
+SET(KWSYS_DATE_STAMP_DAY   26)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   29)
+SET(KWSYS_DATE_STAMP_DAY   30)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   16)
+SET(KWSYS_DATE_STAMP_DAY   17)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   11)
+SET(KWSYS_DATE_STAMP_DAY   12)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   17)
+SET(KWSYS_DATE_STAMP_DAY   18)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   09)
+SET(KWSYS_DATE_STAMP_DAY   10)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   28)
+SET(KWSYS_DATE_STAMP_DAY   29)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 06)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


CMake: fix msvc builds

CMake: fix msvc builds

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -20,8 +20,6 @@
 # THE SOFTWARE.
 #

-option(URHO3D_ENABLE_ALL "Enables all optional subsystems by default" OFF)
-
 # Source environment
 if ("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
     execute_process(COMMAND cmd /c set OUTPUT_VARIABLE ENVIRONMENT)
@@ -38,6 +36,8 @@
         endif ()
     endif ()
 endforeach()
+
+option(URHO3D_ENABLE_ALL "Enables all optional subsystems by default" OFF)

 # Determine library type
 string(TOUPPER "${BUILD_SHARED_LIBS}" BUILD_SHARED_LIBS)


Fix small typo in findpkg_framework macro (${fwk} instead of {fwk})

--- CMake/Utils/FindPkgMacros.cmake
+++ CMake/Utils/FindPkgMacros.cmake
@@ -107,7 +107,7 @@
     FOREACH(dir ${${fwk}_FRAMEWORK_PATH})
       SET(fwkpath ${dir}/${fwk}.framework)
       IF(EXISTS ${fwkpath})
-        SET(${fwk}_FRAMEWORK_INCLUDES ${{fwk}_FRAMEWORK_INCLUDES}
+        SET(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES}
           ${fwkpath}/Headers ${fwkpath}/PrivateHeaders)
         if (NOT ${fwk}_LIBRARY_FWK)
           SET(${fwk}_LIBRARY_FWK "-framework ${fwk}" CACHE STRING "${fwk} library")


FIX: PluginDependencies: Fix dynamic export header generation

--- CMake/ctkMacroBuildPlugin.cmake
+++ CMake/ctkMacroBuildPlugin.cmake
@@ -113,7 +113,7 @@
     )

   SET(MY_LIBRARY_EXPORT_DIRECTIVE ${MY_EXPORT_DIRECTIVE})
-  SET(MY_EXPORT_HEADER_PREFIX ${MY_NAME})
+  SET(MY_EXPORT_HEADER_PREFIX "${lib_name}_")
   SET(MY_LIBNAME ${lib_name})

   CONFIGURE_FILE(


Upgrade MatchPoint to an ITK v5.1 compatible version

--- CMakeExternals/MatchPoint.cmake
+++ CMakeExternals/MatchPoint.cmake
@@ -26,8 +26,8 @@
       set(download_step SOURCE_DIR ${MatchPoint_SOURCE_DIR})
     else()
       set(download_step
-          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev_f2a64255.tar.gz
-          URL_MD5 4407836f85e6382e65c9d3a4bd79c370
+          URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/MatchPoint_rev_f7699d1e.tar.gz
+          URL_MD5 8a24fbdccd6f18f158f49a0ad4fa3faa
          )
     endif()


Proper dependency check for clang in compiler_rt.

 - Not having a dependency does not work in standalone build, as Clang does not exist.
 - if (TARGET clang) check is useless, as it is order-dependent,
   and Clang may not be registered yet.

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

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

--- cmake/Modules/CompilerRTCompile.cmake
+++ cmake/Modules/CompilerRTCompile.cmake
@@ -136,7 +136,7 @@
       COMMAND bash -c "${CMD}"
       COMMENT "Checking that just-built clang can find C++ headers..."
       VERBATIM)
-    if (TARGET clang)
+    if (NOT COMPILER_RT_STANDALONE_BUILD)
       ADD_DEPENDENCIES(CompilerRTUnitTestCheckCxx clang)
     endif()
   endif()


Revert "build: reserve `--color-diagnostics` for lld"

This reverts SVN r330158.

Seems that there was a change to linker flags handling in SVN r316972.
That would alter the behaviour to correct the linker flag handling in
CMake (requiring CMake 3.4.3+).  Since that is already the minimum
version required for LLVM, hard coding the knowledge of the linker is
not required, which is a strictly better solution.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -728,7 +728,7 @@
 endif()

 # lld doesn't print colored diagnostics when invoked from Ninja
-if (UNIX AND CMAKE_LINKER MATCHES lld AND CMAKE_GENERATOR STREQUAL "Ninja")
+if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
   include(CheckLinkerFlag)
   check_linker_flag("-Wl,--color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS)
   append_if(LINKER_SUPPORTS_COLOR_DIAGNOSTICS "-Wl,--color-diagnostics"


The fortran compiler may not exists

The fortran compiler may not exists

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -381,7 +381,7 @@
 set(configoptions ${ROOT_CONFIGARGS})
 get_filename_component(altcc ${CMAKE_C_COMPILER} NAME)
 get_filename_component(altcxx ${CMAKE_CXX_COMPILER} NAME)
-get_filename_component(altf77 ${CMAKE_Fortran_COMPILER} NAME)
+get_filename_component(altf77 "${CMAKE_Fortran_COMPILER}" NAME)
 get_filename_component(altld ${CMAKE_CXX_COMPILER} NAME)

 set(pythonvers ${PYTHON_VERSION})


Remove duplicate

Remove duplicate

--- Modules/ManageTranslation.cmake
+++ Modules/ManageTranslation.cmake
@@ -137,8 +137,6 @@
 	    # Default values
 	    IF(_opt_POTFILE)
 		GET_FILENAME_COMPONENT(_opt_POTFILE "${_opt_POTFILE}" ABSOLUTE)
-		SET(_opt_POTFILE
-		    "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pot")
 	    ELSE(_opt_POTFILE)
 		SET(_opt_POTFILE
 		    "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pot")


Removed unneccessary inclusion of mitkToFCameraPMDPlayerController.cpp

--- Modules/ToFHardware/files.cmake
+++ Modules/ToFHardware/files.cmake
@@ -24,7 +24,6 @@
   mitkToFCameraPMDMITKPlayerController.cpp
   mitkToFCameraPMDCamCubeController.cpp
   mitkToFCameraPMDController.cpp
-  mitkToFCameraPMDPlayerController.cpp
 )
 IF(WIN32)
   IF(CMAKE_CL_64)


Fix unified builds.

Fix unified builds.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -203,6 +203,7 @@
   set(${product}_NATIVE_LLVM_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
   set(${product}_NATIVE_CLANG_TOOLS_PATH "${CMAKE_BINARY_DIR}/bin")
   set(LLVM_PACKAGE_VERSION ${PACKAGE_VERSION})
+  set(SWIFT_TABLEGEN_EXE llvm-tblgen)

   # If cmark was checked out into tools/cmark, expect to build it as
   # part of the unified build.
@@ -227,6 +228,8 @@
       "${CLANG_MAIN_INCLUDE_DIR}"
       "${CMARK_MAIN_INCLUDE_DIR}"
       "${CMARK_BUILD_INCLUDE_DIR}")
+
+  include(AddSwiftTableGen) # This imports TableGen from LLVM.

   check_cxx_compiler_flag("-Werror -Wnested-anon-types" CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)
   if(CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG)


set preprocessor defines for boost system to be header only

We get linking problems with boost system if the C++ versions
don't match (i.e. the one used to compile boost, and the current one),
specifically with boost::system::detail::generic_category_instance

Setting these preprocessor variables forces Boost to use inline variables, as opposed to
the instantiated variables in the library

Fixes https://github.com/SyneRBI/SIRF-SuperBuild/issues/161

--- SuperBuild/External_Boost.cmake
+++ SuperBuild/External_Boost.cmake
@@ -108,6 +108,14 @@
   )
 endif()

+# Avoid linking problems with boost system, specifically
+# boost::system::detail::generic_category_instance
+# by forcing Boost to use an inline variable, as opposed to
+# the instantiated variable in the library
+# See https://github.com/SyneRBI/SIRF-SuperBuild/issues/161
+set(Boost_CMAKE_ARGS ${Boost_CMAKE_ARGS}
+        -DCMAKE_CXX_FLAGS:STRING=-DBOOST_ERROR_CODE_HEADER_ONLY\ -DBOOST_SYSTEM_NO_DEPRECATED)
+
 mark_as_superbuild(
   VARS
     ${externalProjName}_DIR:PATH


BUG: replace build all modules with build default modules for itkv4

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -111,10 +111,9 @@
       -DITK_LEGACY_REMOVE:BOOL=OFF
       -DITK_FUTURE_LEGACY_REMOVE:=BOOL=ON
       -DITKV3_COMPATIBILITY:BOOL=ON
-      -DITK_BUILD_ALL_MODULES:BOOL=ON
+      -DITK_BUILD_DEFAULT_MODULES:BOOL=ON
       -DITK_USE_REVIEW:BOOL=ON
       #-DITK_INSTALL_NO_DEVELOPMENT:BOOL=ON
-      -DTK_BUILD_DEFAULT_MODULES:BOOL=ON
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DITK_WRAPPING:BOOL=OFF #${BUILD_SHARED_LIBS} ## HACK:  QUICK CHANGE
       -DModule_MGHIO:BOOL=ON


ENH:  Updating ITK superbuild version.

ENH:  Updating ITK superbuild version.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -79,7 +79,7 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 876592d4d2df55f4bd4d0e0a6cf8d4972871f45f) #2012-10-23 Revert LabelImageGaussian Concept Checking.
+  set(${proj}_GIT_TAG 7f559c91124dad8336542c2d0ff4cba0aaf50016) #2012-11-26 Multi-metric patch.
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


Fix for linux

Fix for linux

--- Superbuild/PythonExternal.cmake
+++ Superbuild/PythonExternal.cmake
@@ -154,7 +154,7 @@
     SET(SCI_PYTHON_FRAMEWORK_ARCHIVE ${INSTALL_DIR}/${python_FRAMEWORK_ARCHIVE})
   ELSE()
     SET(SCI_PYTHON_ROOT_DIR ${INSTALL_DIR})
-    SET(SCI_PYTHON_INCLUDE ${INSTALL_DIR}/include/${SCI_PYTHON_NAME}${ABIFLAGS})
+    SET(SCI_PYTHON_INCLUDE ${INSTALL_DIR}/include/${SCI_PYTHON_NAME}${SCI_PYTHON_VERSION_SHORT})
     SET(SCI_PYTHON_LIBRARY_DIR ${SCI_PYTHON_ROOT_DIR}/lib)
     SET(SCI_PYTHON_LINK_LIBRARY_DIRS ${SCI_PYTHON_LIBRARY_DIR})
     IF(SCIRUN_BITS MATCHES 64)


[CI] no python => no xml

[CI] no python => no xml

--- CI/no_python.cmake
+++ CI/no_python.cmake
@@ -1,5 +1,6 @@
 include(CI/default.cmake)
 set(WITH_PYTHON_WRAPPER OFF CACHE BOOL "Python" FORCE)
+set(WITH_XML OFF CACHE BOOL "Xml" FORCE)
 foreach(component "numerics;kernel;control;mechanics;io")
   set(WITH_${component}_PYTHON_WRAPPER OFF CACHE BOOL "Python" FORCE)
 endforeach()


for gcc we cannot use the linker flag "-static" only with mingw

--- CMake/config.cmake
+++ CMake/config.cmake
@@ -81,9 +81,15 @@
   if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.0.0")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
   endif()
+
+  if(MINGW)
+    set(GNU_STATIC_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
+  else()
+    set(GNU_STATIC_LINKER_FLAGS "-static-libgcc -static-libstdc++")
+  endif()
 endif()

-set(GNU_STATIC_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
+

 # RelWithDepInfo should have the same option like the Release build
 # but of course with Debug informations


Correct the CMAKE_THIRD_PARTY_DIR variable

The variable allows for a location for built third party libraries to be
placed

--- FindLibCheck.cmake
+++ FindLibCheck.cmake
@@ -83,8 +83,8 @@
   endif()

   # The user can specify an output location
-  if(CMAKE_ENABLE_THIRD_PARTY_DIR)
-    set(THIRD_PARTY_DIR "${CMAKE_ENABLE_THIRD_PARTY_DIR}")
+  if(CMAKE_THIRD_PARTY_DIR)
+    set(THIRD_PARTY_DIR "${CMAKE_THIRD_PARTY_DIR}")
   else()
     set(THIRD_PARTY_DIR third-party)
   endif()


changing find liblo for Linux

changing find liblo for Linux

--- cmake/Modules/FindLIBLO.cmake
+++ cmake/Modules/FindLIBLO.cmake
@@ -1,11 +1,16 @@
-# Try to find the STK library.
+# Try to find the Liblo library.
 # Once done this will define:
 #  LIBLO_FOUND - System has the OSC library.
 #  LIBLO_INCLUDE_DIRS - The OSC include directories.
 #  LIBLO_LIBRARIES - The libraries needed to use the OSC library.

 find_path(LIBLO_INCLUDE_DIR lo.h PATH_SUFFIXES lo)
+
+if(LINUX)
+find_library(LIBLO_LIBRARY NAMES lo)
+else()
 find_library(LIBLO_LIBRARY NAMES liblo.a lo)
+endif()

 set(LIBLO_INCLUDE_DIRS ${LIBLO_INCLUDE_DIR})
 set(LIBLO_LIBRARIES ${LIBLO_LIBRARY} )