fix string breaks

fix string breaks

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -568,15 +568,8 @@

 macro(OptimizeForArchitecture)
    if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|AMD64)")
-      set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. \
-Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used. \
-Setting the value to \"auto\" will try to optimize for the architecture where cmake is called. \
-Other supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \
-\"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \
-\"haswell\", \"broadwell\", \"skylake\", \"skylake-xeon\", \"kaby-lake\", \"cannonlake\", \"silvermont\", \
-\"goldmont\", \"knl\" (Knights Landing), \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \
-\"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\", \
-\"AMD 14h\", \"AMD 16h\", \"zen\".")
+      #G+Smo
+      set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used. Setting the value to \"auto\" will try to optimize for the architecture where cmake is called. Other supported values are: \"none\", \"generic\", \"core\", \"merom\" (65nm Core2), \"penryn\" (45nm Core2), \"nehalem\", \"westmere\", \"sandy-bridge\", \"ivy-bridge\", \"haswell\", \"broadwell\", \"skylake\", \"skylake-xeon\", \"kaby-lake\", \"cannonlake\", \"silvermont\", \"goldmont\", \"knl\" (Knights Landing), \"atom\", \"k8\", \"k8-sse3\", \"barcelona\", \"istanbul\", \"magny-cours\", \"bulldozer\", \"interlagos\", \"piledriver\", \"AMD 14h\", \"AMD 16h\", \"zen\"." )
    elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(arm|aarch32|aarch64)")
       set(TARGET_ARCHITECTURE "auto" CACHE STRING "CPU architecture to optimize for. \
 Using an incorrect setting here can result in crashes of the resulting binary because of invalid instructions used. \


autodetection of CPU on Windows

autodetection of CPU on Windows

--- cmake/OptimizeForArchitecture.cmake
+++ cmake/OptimizeForArchitecture.cmake
@@ -30,6 +30,11 @@
          exec_program("/usr/sbin/sysctl -n machdep.cpu.vendor" OUTPUT_VARIABLE _vendor_id)
          exec_program("/usr/sbin/sysctl -n machdep.cpu.model"  OUTPUT_VARIABLE _cpu_model)
          exec_program("/usr/sbin/sysctl -n machdep.cpu.family" OUTPUT_VARIABLE _cpu_family)
+      elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
+         get_filename_component(_vendor_id "[HKEY_LOCAL_MACHINE\\Hardware\\Description\\System\\CentralProcessor\\0;VendorIdentifier]" NAME CACHE)
+         get_filename_component(_cpu_id "[HKEY_LOCAL_MACHINE\\Hardware\\Description\\System\\CentralProcessor\\0;Identifier]" NAME CACHE)
+         string(REGEX REPLACE ".* Family ([0-9]+) .*" "\\1" _cpu_family "${_cpu_id}")
+         string(REGEX REPLACE ".* Model ([0-9]+) .*" "\\1" _cpu_model "${_cpu_id}")
       endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
       if(_vendor_id STREQUAL "GenuineIntel")
          if(_cpu_family EQUAL 6)


trying to disable testing in imported modules

--- cmake/mtao_fetch_dependencies.cmake
+++ cmake/mtao_fetch_dependencies.cmake
@@ -8,7 +8,7 @@
         GIT_TAG ${GIT_TAG}
         )
     if(ADD_SUBDIR)
-        set(BUILD_TESTING)
+        set(BUILD_TESTING OFF)
         if(${CMAKE_VERSION} VERSION_LESS 3.14)
             FetchContent_Populate(${REPO_NAME})
             add_subdirectory(${${REPO_NAME}_SOURCE_DIR} ${${REPO_NAME}_BINARY_DIR})


Split off 8.4.52

Split off 8.4.52

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

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


Split off 7.12.40

Split off 7.12.40

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 39 )
+set ( HPCC_POINT 41 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Bump GAPID version to v0.9.5

Bump GAPID version to v0.9.5

--- version.cmake
+++ version.cmake
@@ -16,7 +16,7 @@
 # Increment these numbers immediately after releasing a new version.
 set(GAPID_VERSION_MAJOR 0)
 set(GAPID_VERSION_MINOR 9)
-set(GAPID_VERSION_POINT 4)
+set(GAPID_VERSION_POINT 5)

 if (NOT DEFINED GAPID_BUILD_NUMBER)
     set(GAPID_BUILD_NUMBER 0)


Graph Control 4.0.0-4

Graph Control 4.0.0-4

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

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


Also support "git-svn" in run_testsuite.cmake

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@31488 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/scripts/run_testsuite.cmake
+++ deal.II/cmake/scripts/run_testsuite.cmake
@@ -227,8 +227,13 @@
 #

 FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname)
-EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
-SET(CTEST_SITE "${_hostname}")
+IF(NOT "${HOSTNAME_COMMAND}" MATCHES "-NOTFOUND")
+  EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
+  SET(CTEST_SITE "${_hostname}")
+ELSE()
+  # Well, no hostname available. What about:
+  SET(CTEST_SITE "BobMorane")
+ENDIF()

 MESSAGE("-- CTEST_SITE:             ${CTEST_SITE}")

@@ -308,33 +313,60 @@
 ENDIF()

 #
-# Append subversion branch to CTEST_BUILD_NAME:
-#
+# Query subversion information:
+#
+
+# First try native subversion:
 FIND_PACKAGE(Subversion QUIET)
-EXECUTE_PROCESS(
-  COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
-  OUTPUT_QUIET ERROR_QUIET
-  RESULT_VARIABLE _result
-  )
+SET(_result 1)
+IF(SUBVERSION_FOUND)
+  EXECUTE_PROCESS(
+    COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
+    OUTPUT_QUIET ERROR_QUIET
+    RESULT_VARIABLE _result
+    )
+ENDIF()
+
 IF(${_result} EQUAL 0)
   Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
+
+ELSE()
+
+  # Umm, no valid subversion info was found, try again with git-svn:
+  FIND_PACKAGE(Git QUIET)
+  IF(GIT_FOUND)
+    EXECUTE_PROCESS(
+      COMMAND ${GIT_EXECUTABLE} svn info
+      WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
+      OUTPUT_VARIABLE _svn_WC_INFO
+      RESULT_VARIABLE _result
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      )
+
+    IF(${_result} EQUAL 0)
+      STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
+        "\\2" _svn_WC_URL "${_svn_WC_INFO}")
+      STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
+        "\\2" _svn_WC_ROOT "${_svn_WC_INFO}")
+      STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
+        "\\2" _svn_WC_REVISION "${_svn_WC_INFO}")
+      STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
+        "\\2" _svn_WC_LAST_CHANGED_DATE "${_svn_WC_INFO}")
+    ELSE()
+      SET(_svn_WC_INFO)
+    ENDIF()
+  ENDIF()
+ENDIF()
+
+# If we have a valid (git) svn info use it:
+IF(${_result} EQUAL 0)
+
   STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
   STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
   STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
+
   SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}")
 ENDIF()
-
-#
-# Append config file name to CTEST_BUILD_NAME:
-#
-
-IF(NOT "${CONFIG_FILE}" STREQUAL "")
-  GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE)
-  STRING(REGEX REPLACE "#.*$" "" _conf ${_conf})
-  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_conf}")
-ENDIF()
-
-MESSAGE("-- CTEST_BUILD_NAME:       ${CTEST_BUILD_NAME}")

 #
 # We require valid svn information for build tests:
@@ -346,7 +378,7 @@
 TRACK was set to \"Build Tests\" which requires the source directory to be
 under Subversion version control.
 "
-    )
+  )
 ENDIF()

 #
@@ -373,6 +405,18 @@
 ###"
     )
 ENDIF()
+
+#
+# Append config file name to CTEST_BUILD_NAME:
+#
+
+IF(NOT "${CONFIG_FILE}" STREQUAL "")
+  GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE)
+  STRING(REGEX REPLACE "#.*$" "" _conf ${_conf})
+  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_conf}")
+ENDIF()
+
+MESSAGE("-- CTEST_BUILD_NAME:       ${CTEST_BUILD_NAME}")

 #
 # Declare files that should be submitted as notes:
@@ -388,6 +432,7 @@
 #
 # Setup coverage:
 #
+
 IF(COVERAGE)
   IF(NOT TRACK MATCHES "Experimental")
     MESSAGE(FATAL_ERROR "
@@ -398,7 +443,6 @@
   ENDIF()

   FIND_PROGRAM(GCOV_COMMAND NAMES gcov)
-
   IF(GCOV_COMMAND MATCHES "-NOTFOUND")
     MESSAGE(FATAL_ERROR "
 Coverage enabled but could not find the gcov executable. Please install


Fix the error in FindCxxObfuscator cmake file.

--- cmake/Modules/FindCxxObfuscator.cmake
+++ cmake/Modules/FindCxxObfuscator.cmake
@@ -7,81 +7,80 @@
 #  CxxObfuscator_FOUND
 #  CxxObfuscator_COMPILER

-set (CXX_OBFUSCATOR_SEARCH_PATHS
+set (CxxObfuscator_SEARCH_PATHS
     "/usr/bin"
     "/usr/local/bin"
     "/Applications/Run\ C++\ Obfuscator.app/Contents/Resources/bin/"
-    "${CXX_OBFUSCATOR_ROOT}"
-    "${CXX_OBFUSCATOR_ROOT}/bin"
-    "$ENV{CXX_OBFUSCATOR_ROOT}"
-    "$ENV{CXX_OBFUSCATOR_ROOT}/bin")
+    "${CxxObfuscator_ROOT}"
+    "${CxxObfuscator_ROOT}/bin"
+    "$ENV{CxxObfuscator_ROOT}"
+    "$ENV{CxxObfuscator_ROOT}/bin")

-find_program (CXX_OBFUSCATOR_COMPILER
+find_program (CxxObfuscator_COMPILER
     NAMES "cxx-obfus"
-    PATHS ${CXX_OBFUSCATOR_SEARCH_PATHS})
+    PATHS ${CxxObfuscator_SEARCH_PATHS})

-set (LOOKED_FOR CXX_OBFUSCATOR_COMPILER)
+set (LOOKED_FOR CxxObfuscator_COMPILER)

 include (FindPackageHandleStandardArgs)
 find_package_handle_standard_args (CxxObfuscator DEFAULT_MSG ${LOOKED_FOR})

-if (CXX_OBFUSCATOR_FOUND)
+if (CxxObfuscator_FOUND)
     mark_as_advanced (${LOOKED_FOR})
-    message (STATUS "Found C++ Obfuscator (Compiler: ${CXX_OBFUSCATOR_COMPILER})")
+    message (STATUS "Found C++ Obfuscator (Compiler: ${CxxObfuscator_COMPILER})")
 endif ()
-

 # ----------------
 # Module function.
 # ----------------

-#! Generate obfuscated c/c++ source file.
-#
-# \param _obfus       [out] value name of result Obfuscated source files.
-# \param _sources     [in]  original source files.
-# \param _except_file [in]  file path of exception symbol list.
-function (obfus_generate_cpp _obfus _sources _except_file)
-    #message ("_obfus (${_obfus}): ${${_obfus}}")
-    #message ("_sources (${_sources}): ${${_sources}}")
+#/// Generate obfuscated c/c++ source file.
+#///
+#/// @param __obfus       [out] value name of result Obfuscated source files.
+#/// @param __sources     [in]  original source files.
+#/// @param __except_file [in]  file path of exception symbol list.
+function (obfus_generate_cpp __obfus __sources __except_file)
+    #message ("__obfus (${__obfus}): ${${__obfus}}")
+    #message ("__sources (${__sources}): ${${__sources}}")

-    set (${_obfus})
-    set (_flags)
+    set (${__obfus})
+    set (__flags)

-    get_filename_component (_absolute_except ${_except_file} ABSOLUTE)
+    get_filename_component (_absolute_except ${__except_file} ABSOLUTE)

     if (EXISTS ${_absolute_except})
-        list (APPEND _flags -x ${_absolute_except})
+        list (APPEND __flags -x ${_absolute_except})
     endif ()

-    foreach (_cursor ${_sources})
-        get_filename_component (_absolute  ${_cursor}   ABSOLUTE)
-        get_filename_component (_directory ${_absolute} DIRECTORY)
-        get_filename_component (_extension ${_absolute} EXT)
-        get_filename_component (_name_we   ${_absolute} NAME_WE)
+    foreach (__cursor ${__sources})
+        get_filename_component (__absolute  ${__cursor}   ABSOLUTE)
+        get_filename_component (__directory ${__absolute} DIRECTORY)
+        get_filename_component (__extension ${__absolute} EXT)
+        get_filename_component (__name_we   ${__absolute} NAME_WE)

-        string (REPLACE "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}" _bin_path ${_directory})
+        string (REPLACE "${PROJECT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}" __bin_path ${__directory})

-        set (_obfus_extension ".obfus${_extension}")
-        set (_cursor_of_obfus_path "${_bin_path}/${_name_we}${_obfus_extension}")
+        set (__obfus_extension ".obfus${__extension}")
+        set (__cursor_of_obfus_path "${__bin_path}/${__name_we}${__obfus_extension}")

-        get_filename_component (_cursor_of_output_dir ${_cursor_of_obfus_path} DIRECTORY)
+        get_filename_component (__cursor_of_output_dir ${__cursor_of_obfus_path} DIRECTORY)

-        if (NOT EXISTS ${_cursor_of_output_dir})
-            file (MAKE_DIRECTORY ${_cursor_of_output_dir})
+        if (NOT EXISTS ${__cursor_of_output_dir})
+            file (MAKE_DIRECTORY ${__cursor_of_output_dir})
         endif ()

         add_custom_command (
-            OUTPUT  ${_cursor_of_obfus_path}
-            COMMAND "${CXX_OBFUSCATOR_COMPILER}" ${_absolute} -o ${_cursor_of_obfus_path} ${_flags}
-            DEPENDS ${_absolute}
-            COMMENT "Running C++ Obfuscator compiler on ${_cursor}" VERBATIM)
+            OUTPUT  ${__cursor_of_obfus_path}
+            COMMAND "${CxxObfuscator_COMPILER}" ${__absolute} -o ${__cursor_of_obfus_path} ${__flags}
+            DEPENDS ${__absolute}
+            COMMENT "Running C++ Obfuscator compiler on ${__cursor}" VERBATIM)

-        list (APPEND ${_obfus} ${_cursor_of_obfus_path})
+        list (APPEND ${__obfus} ${__cursor_of_obfus_path})
     endforeach ()

-    set_source_files_properties (${${_obfus}} PROPERTIES GENERATED TRUE)
+    set_source_files_properties (${${__obfus}} PROPERTIES GENERATED TRUE)

     # result output.
-    set (${_obfus} ${${_obfus}} PARENT_SCOPE)
+    set (${__obfus} ${${__obfus}} PARENT_SCOPE)
 endfunction ()


update ilcsoft_default_cxx_flags.cmake from ilcutil

A.Sailer: improve checking of variables
removed the -+ signs from variables for the result variable. This variable is passed as a macro to the compilation test
and produces a warning otherwise. If using Werror this then fails

--- cmake/ilcsoft_default_cxx_flags.cmake
+++ cmake/ilcsoft_default_cxx_flags.cmake
@@ -4,24 +4,27 @@

 INCLUDE(CheckCXXCompilerFlag)

-SET(COMPILER_FLAGS -Wall -Wextra -Wshadow -Weffc++ -pedantic -Wno-long-long -Wuninitialized -fdiagnostics-color=auto )
+SET(COMPILER_FLAGS -Wall -Wextra -Wshadow -Weffc++ -pedantic -Wno-long-long -Wuninitialized )

-IF(("${CMAKE_CXX_COMPILER_ID}" EQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" EQUAL "Clang"))
-    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
-ENDIF()
-
-IF("${CMAKE_CXX_COMPILER_ID}" EQUAL "AppleClang")
-    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-undefined,error")
+IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" )
+ LIST( APPEND COMPILER_FLAGS -Wl,-no-undefined )
 ENDIF()

 MESSAGE( STATUS "FLAGS ${COMPILER_FLAGS}" )
 FOREACH( FLAG ${COMPILER_FLAGS} )
-  CHECK_CXX_COMPILER_FLAG( "${FLAG}" CXX_FLAG_WORKS_${FLAG} )
-  IF( ${CXX_FLAG_WORKS_${FLAG}} )
+
+  ## meed to replace the minus or plus signs from the variables, because it is passed
+  ## as a macro to g++ which causes a warning about no whitespace after macro
+  ## definition
+  STRING(REPLACE "-" "_" FLAG_WORD ${FLAG} )
+  STRING(REPLACE "+" "P" FLAG_WORD ${FLAG_WORD} )
+
+  CHECK_CXX_COMPILER_FLAG( "${FLAG}" CXX_FLAG_WORKS_${FLAG_WORD} )
+  IF( ${CXX_FLAG_WORKS_${FLAG_WORD}} )
     MESSAGE ( STATUS "Adding ${FLAG} to CXX_FLAGS" )
     ### We prepend the flag, so they are overwritten by whatever the user sets in his own configuration
-    SET ( CMAKE_CXX_FLAGS "${FLAG} ${CMAKE_CXX_FLAGS} ")
+    SET ( CMAKE_CXX_FLAGS "${FLAG} ${CMAKE_CXX_FLAGS}")
   ELSE()
     MESSAGE ( STATUS "NOT Adding ${FLAG} to CXX_FLAGS" )
   ENDIF()
@@ -30,12 +33,17 @@
 OPTION( USE_CXX11 "Use CXX Standard 2011" True )
 IF( USE_CXX11 )
   SET( FLAG "-std=c++11" )
-  CHECK_CXX_COMPILER_FLAG( ${FLAG} CXX_FLAG_WORKS_${FLAG} )
-  IF( ${CXX_FLAG_WORKS_${FLAG}} )
-    SET( CMAKE_CXX_FLAGS " ${FLAG} ${CMAKE_CXX_FLAGS}")
+  SET( FLAG_WORD "stdCXX11" )
+  CHECK_CXX_COMPILER_FLAG( ${FLAG} CXX_FLAG_WORKS_${FLAG_WORD} )
+  IF( ${CXX_FLAG_WORKS_${FLAG_WORD}} )
+    SET( CMAKE_CXX_FLAGS "${FLAG} ${CMAKE_CXX_FLAGS}")
   ELSE()
     MESSAGE( FATAL_ERROR "Cannot add ${FLAG} to CMAKE_CXX_FLAGS, but c++11 was requested, check your compiler" )
   ENDIF()
 ELSE()
   MESSAGE( STATUS "NOT building with CXX11 standard" )
 ENDIF()
+
+IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 )
+  SET( CMAKE_CXX_FLAGS "-fdiagnostics-color=auto ${CMAKE_CXX_FLAGS}" )
+ENDIF()


[cmake] Improve comment describing the C4245 warning. NFCI.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -523,7 +523,7 @@
       -wd4610 # Suppress '<class> can never be instantiated'
       -wd4510 # Suppress 'default constructor could not be generated'
       -wd4702 # Suppress 'unreachable code'
-      -wd4245 # Suppress 'signed/unsigned mismatch'
+      -wd4245 # Suppress ''conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch'
       -wd4706 # Suppress 'assignment within conditional expression'
       -wd4310 # Suppress 'cast truncates constant value'
       -wd4701 # Suppress 'potentially uninitialized local variable'


Fix 'osx-10-13-make-cxx14' build

Fix 'osx-10-13-make-cxx14' build

--- cmake/projects/dmlc-core/hunter.cmake
+++ cmake/projects/dmlc-core/hunter.cmake
@@ -69,6 +69,11 @@
   dmlc-core
   CMAKE_ARGS
   USE_OPENMP=OFF # since not all compilers support this
+
+  # '/usr/include' leaking into compilation will ruine everything
+  # - https://travis-ci.org/ingenue/hunter/jobs/510403904
+  # -- Found Backtrace: /usr/include
+  CMAKE_DISABLE_FIND_PACKAGE_Backtrace=ON
   )

 hunter_pick_scheme(DEFAULT url_sha1_cmake)


Package odb-mysql: enable cache

Package odb-mysql: enable cache

--- cmake/projects/odb-mysql/hunter.cmake
+++ cmake/projects/odb-mysql/hunter.cmake
@@ -4,6 +4,7 @@
 # !!! DO NOT PLACE HEADER GUARDS HERE !!!

 include(hunter_add_version)
+include(hunter_cacheable)
 include(hunter_configuration_types)
 include(hunter_pick_scheme)
 include(hunter_download)
@@ -21,5 +22,10 @@

 hunter_configuration_types(odb-mysql CONFIGURATION_TYPES Release)
 hunter_pick_scheme(DEFAULT url_sha1_odb-mysql_autotools)
-hunter_download(PACKAGE_NAME odb-mysql)
+hunter_cacheable(odb-mysql)
+hunter_download(PACKAGE_NAME odb-mysql
+    PACKAGE_UNRELOCATABLE_TEXT_FILES
+    "lib/libodb-mysql.la"
+    "lib/pkgconfig/libodb-mysql.pc"
+)


update dependencies list based on the new changes

--- dependencies.cmake
+++ dependencies.cmake
@@ -20,16 +20,11 @@
 #  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 #  THE SOFTWARE.

-
 SET ( AWK_FIND_REQUIRED FALSE )
 SET ( Boost_FIND_REQUIRED TRUE )
 SET ( Boost_USE_MULTITHREADED ON )
 SET ( Boost_USE_STATIC_LIBS OFF )
 SET ( Boost_USE_STATIC_RUNTIME OFF )
-SET ( CPPDB_FIND_REQUIRED TRUE )
-SET ( CPPDB_MYSQL_DRIVER_FIND_REQUIRED FALSE )
-SET ( CPPDB_PGSQL_DRIVER_FIND_REQUIRED FALSE )
-SET ( CPPDB_SQLITE3_DRIVER_FIND_REQUIRED TRUE )
 SET ( CRYPTOPP_FIND_REQUIRED TRUE )
 SET ( CURLPP_FIND_REQUIRED TRUE )
 SET ( CUT_FIND_REQUIRED FALSE )
@@ -58,12 +53,12 @@
 SET ( LIBSTATGRAB_FIND_REQUIRED TRUE )
 SET ( LIBZIP_FIND_REQUIRED TRUE )
 SET ( MAGICKPP_FIND_REQUIRED TRUE )
-SET ( MYSQL_FIND_REQUIRED FALSE )
 SET ( NPM_FIND_REQUIRED TRUE )
-SET ( PGSQL_FIND_REQUIRED FALSE )
+SET ( PERL_FIND_REQUIRED FALSE )
+SET ( PGSQL_FIND_REQUIRED TRUE )
+SET ( PQXX_FIND_REQUIRED TRUE )
 SET ( SED_FIND_REQUIRED FALSE )
 SET ( SODIUM_FIND_REQUIRED TRUE )
-SET ( SQLITE3_FIND_REQUIRED TRUE )
 SET ( Threads_FIND_REQUIRED TRUE )
 SET ( TR_FIND_REQUIRED FALSE )
 SET ( VMIME_FIND_REQUIRED TRUE )
@@ -85,7 +80,6 @@
 ### Boost ###
 FIND_PACKAGE (Boost 1.55.0
     COMPONENTS
-        #bzip2 date_time filesystem iostreams regex system thread zlib
         date_time filesystem iostreams random regex system thread
     )
 INCLUDE_DIRECTORIES ( SYSTEM ${Boost_INCLUDE_DIRS} )
@@ -93,11 +87,6 @@

 ### Common Unix Utilities ###
 FIND_PACKAGE ( CommonUnixUtilities )
-
-
-### CppDB ###
-FIND_PACKAGE ( CppDB )
-INCLUDE_DIRECTORIES ( SYSTEM ${CPPDB_INCLUDE_DIR} )

 ### Crypto++ ###
@@ -164,34 +153,23 @@
 ENDIF (  )

-### MySQL ###
-FIND_PACKAGE ( MySQL )
-IF ( MYSQL_FOUND )
-    INCLUDE_DIRECTORIES ( SYSTEM ${MYSQL_INCLUDE_DIR} )
-ENDIF (  )
-
-
 ### npm ###
 FIND_PACKAGE ( npm )

 ### pgSQL ###
 FIND_PACKAGE ( pgSQL )
-IF ( PGSQL_FOUND )
-    INCLUDE_DIRECTORIES ( SYSTEM ${PGSQL_INCLUDE_DIR} )
-ENDIF (  )
+INCLUDE_DIRECTORIES ( SYSTEM ${PGSQL_INCLUDE_DIR} )
+
+
+### pqxx ###
+FIND_PACKAGE ( pqxx )
+INCLUDE_DIRECTORIES ( SYSTEM ${PQXX_INCLUDE_DIR} )

 ### Sodium ###
 FIND_PACKAGE ( Sodium )
 INCLUDE_DIRECTORIES ( SYSTEM ${SODIUM_INCLUDE_DIR} )
-
-
-### SQLite 3 ###
-FIND_PACKAGE ( SQLite3 )
-IF ( SQLITE3_FOUND )
-    INCLUDE_DIRECTORIES ( SYSTEM ${SQLITE3_INCLUDE_DIR} )
-ENDIF (  )

 ### Threads ###
@@ -202,6 +180,7 @@
     ENDIF (  )
 ENDIF (  )

+
 ### VMime ###
 FIND_PACKAGE ( VMime )
 INCLUDE_DIRECTORIES ( SYSTEM ${VMIME_INCLUDE_DIR} )
@@ -210,17 +189,3 @@
 ### Wt ###
 FIND_PACKAGE ( Wt )
 INCLUDE_DIRECTORIES ( SYSTEM ${WT_INCLUDE_DIR} )
-
-
-### SQL Drivers Check ###
-IF ( NOT DEFINED MYSQL_FOUND
-        AND NOT DEFINED PGSQL_FOUND
-        AND NOT DEFINED SQLITE3_FOUND )
-    MESSAGE ( FATAL_ERROR "Could not find a suitable SQL driver." )
-ENDIF (  )
-
-IF ( NOT DEFINED CPPDB_MYSQL_DRIVER_FOUND
-        AND NOT DEFINED CPPDB_PGSQL_DRIVER_FOUND
-        AND NOT DEFINED CPPDB_SQLITE3_DRIVER_FOUND )
-    MESSAGE ( FATAL_ERROR "Could not find a suitable CppDB driver." )
-ENDIF (  )


Silence CMake message for CSharp targets

Change-Id: I632d995437710eb23da31a8b9b2129fd23857469

--- CMake/UseCSharp.cmake
+++ CMake/UseCSharp.cmake
@@ -98,7 +98,7 @@
   endif (WIN32)

   # Add custom target and command
-  MESSAGE( STATUS "Adding C# ${type} ${name}: '${CSHARP_COMPILER} /t:${type} /out:${name}.${output} /platform:${CSHARP_PLATFORM} ${CSHARP_SDK} ${refs} ${sources}'" )
+  # MESSAGE( STATUS "Adding C# ${type} ${name}: '${CSHARP_COMPILER} /t:${type} /out:${name}.${output} /platform:${CSHARP_PLATFORM} ${CSHARP_SDK} ${refs} ${sources}'" )
   add_custom_command(
     COMMENT "Compiling C# ${type} ${name}: '${CSHARP_COMPILER} /t:${type} /out:${name}.${output} /platform:${CSHARP_PLATFORM} ${CSHARP_SDK} ${refs} ${sources}'"
     OUTPUT ${CSHARP_BINARY_DIRECTORY}/${name}.${output}


cleaning up old comments

cleaning up old comments

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -61,11 +61,6 @@

 	WkPlatformCheck()
 	WkCompilerSetup(${ARGN})
-	#preparing and cleaning internal build variables
-	# We might not need that at all : simpler
-	#set( ${PROJECT_NAME}_INCLUDE_DIRS CACHE PATH " Includes directories for ${PROJECT_NAME} ")
-	#set( ${project_name_arg}_LIBRARIES CACHE FILEPATH " Libraries needed for ${project_name_arg} " )
-	#set( ${project_name_arg}_RUN_LIBRARIES CACHE FILEPATH " libraries needed to run ${project_name_arg} " )

 	#TODO
 	#Quick test to make sure we build in different directory
@@ -162,7 +157,6 @@
 #
 # Configure and Build process based on well-known hierarchy
 # You need include and src in your hierarchy at least for this to work correctly
-# You also need MergeLists.txt
 #

 #WkBuild( target_name EXECUTABLE | LIBRARY [ STATIC|SHARED|MODULE ]  )


Fixing Lonestar's toolchain file.

Fixing Lonestar's toolchain file.

--- cmake/toolchains/Lonestar-intel_11.1-mvapich2_1.6-mkl_10.3.cmake
+++ cmake/toolchains/Lonestar-intel_11.1-mvapich2_1.6-mkl_10.3.cmake
@@ -6,6 +6,14 @@
 # The MPI wrappers for the C and C++ compilers
 set(MPI_C_COMPILER   /opt/apps/intel11_1/mvapich2/1.6/bin/mpicc)
 set(MPI_CXX_COMPILER /opt/apps/intel11_1/mvapich2/1.6/bin/mpicxx)
+set(MPI_C_COMPILE_FLAGS "-Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath,/opt/apps/limic2/0.5.4//lib -L/opt/apps/limic2/0.5.4//lib")
+set(MPI_CXX_COMPILE_FLAGS "-Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath,/opt/apps/intel/11.1/lib/intel64 -Wl,-rpath,/opt/apps/limic2/0.5.4//lib -L/opt/apps/limic2/0.5.4//lib")
+set(MPI_C_INCLUDE_PATH   /opt/apps/intel11_1/mvapich2/1.6/include)
+set(MPI_CXX_INCLUDE_PATH /opt/apps/intel11_1/mvapich2/1.6/include)
+set(MPI_C_LINK_FLAGS "-L/opt/apps/intel11_1/mvapich2/1.6/lib -L/opt/apps/limic2/0.5.4//lib -L/opt/ofed/lib64/")
+set(MPI_CXX_LINK_FLAGS "-L/opt/apps/intel11_1/mvapich2/1.6/lib -L/opt/apps/limic2/0.5.4//lib -L/opt/ofed/lib64/")
+set(MPI_C_LIBRARIES "-limf -lmpich -lopa -llimic2 -lpthread -lrdmacm -libverbs -libumad -ldl -lrt")
+set(MPI_CXX_LIBRARIES "-limf -lmpichcxx -lmpich -lopa -llimic2 -lpthread -lrdmacm -libverbs -libumad -ldl -lrt")

 set(CXX_PURE_DEBUG_FLAGS "-g")
 set(CXX_PURE_RELEASE_FLAGS "-O3")
@@ -22,4 +30,3 @@
   set(MATH_LIBS "-L/opt/apps/intel/11.1/mkl/lib/em64t -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lguide -lpthread /opt/apps/intel/11.1/lib/intel64/libifcore.a /opt/apps/intel/11.1/lib/intel64/libsvml.a -lm")
 endif(CMAKE_BUILD_TYPE MATCHES PureDebug OR
       CMAKE_BUILD_TYPE MATCHES PureRelease)
-


[CMake] Prune CMAKE_CXX_FLAGS stuff in llvm_process_sources.

It is the final step to deprecate contextual CMAKE_CXX_FLAGS.

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

--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -58,24 +58,6 @@
     list(APPEND sources ${ARG_ADDITIONAL_HEADERS})
   endif()

-  # Set common compiler options:
-  if( NOT LLVM_REQUIRES_EH )
-    if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
-      add_definitions( -fno-exceptions )
-    elseif( MSVC )
-      llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/EHsc" "/EHs-c-")
-      add_definitions( /D_HAS_EXCEPTIONS=0 )
-    endif()
-  endif()
-  if( NOT LLVM_REQUIRES_RTTI )
-    if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
-      llvm_replace_compiler_option(CMAKE_CXX_FLAGS "-frtti" "-fno-rtti")
-    elseif( MSVC )
-      llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/GR" "/GR-")
-    endif()
-  endif()
-
-  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE )
   set( ${OUT_VAR} ${sources} PARENT_SCOPE )
 endfunction(llvm_process_sources)


[Build] Fixed the configuration of the STDAIR_SAMPLE_DIR variable.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -108,6 +108,11 @@
       set (${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
     endif ()
   endforeach (_path_type)
+
+  # Define STDAIR_SAMPLE_DIR if the project is STDAIR
+  if ("${PROJECT_NAME}" STREQUAL "stdair")
+    set (STDAIR_SAMPLE_DIR ${INSTALL_SAMPLE_DIR})
+  endif ("${PROJECT_NAME}" STREQUAL "stdair")

   ##
   # Basic documentation (i.e., AUTHORS, NEWS, README, INSTALL)
@@ -600,7 +605,8 @@
   set (pkgdatadir    ${datarootdir}/${PACKAGE})
   set (sampledir     ${STDAIR_SAMPLE_DIR})
   set (docdir        ${datarootdir}/doc/${PACKAGE}-${PACKAGE_VERSION})
-  set (htmldir       ${docdir})
+  set (htmldir       ${docdir}/html)
+  set (pdfdir        ${htmldir})
   set (mandir        ${datarootdir}/man)
   set (infodir       ${datarootdir}/info)
   set (pkgincludedir ${includedir}/stdair)
@@ -656,6 +662,8 @@
   if (EXISTS config.h.in)
     configure_file (config.h.in config.h @ONLY)
   endif (EXISTS config.h.in)
+
+  message ("DEBUG -- STDAIR_SAMPLE_DIR = ${STDAIR_SAMPLE_DIR}")

   # Specific module configuration header
   set (PROJ_PATH_CFG_SRC


ConfigureChecks: Stop checking for CMAKE_HAVE_THREADS_LIBRARY.

libssh is primarily interested in whether pthreads is present and can be
used. Checking for CMAKE_HAVE_THREADS_LIBRARY is not the same thing, as
there are cases where pthread exists but CMAKE_HAVE_THREADS_LIBRARY is not
set (for example, FreeBSD passes -DTHREADS_HAVE_PTHREAD_ARG=1 to CMake by
default as a way to skip the checks for -lpthread, -lpthreads and others and
tell the build system that -pthread is the one expected to be used).

Reviewed-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@cryptomilk.org>

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -169,11 +169,9 @@
     endif (GCRYPT_VERSION VERSION_GREATER "1.4.6")
 endif (GCRYPT_FOUND)

-if (CMAKE_HAVE_THREADS_LIBRARY)
-    if (CMAKE_USE_PTHREADS_INIT)
-        set(HAVE_PTHREAD 1)
-    endif (CMAKE_USE_PTHREADS_INIT)
-endif (CMAKE_HAVE_THREADS_LIBRARY)
+if (CMAKE_USE_PTHREADS_INIT)
+    set(HAVE_PTHREAD 1)
+endif (CMAKE_USE_PTHREADS_INIT)

 # OPTIONS
 check_c_source_compiles("


Pass current generator to tests

Pass current generator to tests

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -73,6 +73,7 @@
     file (MAKE_DIRECTORY ${TEST_WORKING_DIRECTORY_NAME})
     set (TEST_DRIVER_SCRIPT_CONTENTS
          "function (add_driver_command COMMAND_VAR OUTPUT_FILE ERROR_FILE)\n"
+         "    message (\"Running \" \${\${COMMAND_VAR}})\n"
          "    execute_process (COMMAND \${\${COMMAND_VAR}}\n"
          "                     RESULT_VARIABLE RESULT\n"
          "                     OUTPUT_VARIABLE OUTPUT\n"
@@ -158,8 +159,12 @@
         file (WRITE ${TEST_DIRECTORY_CONFIGURE_SCRIPT}
               ${TEST_DIRECTORY_CONFIGURE_SCRIPT_CONTENTS})

+        string (REPLACE " " "\\ " GENERATOR ${CMAKE_GENERATOR})
         set (CONFIGURE_COMMAND
-             ${CMAKE} .. -C${CACHE_FILE} -DCMAKE_VERBOSE_MAKEFILE=ON)
+             ${CMAKE} ..
+             -C${CACHE_FILE}
+             -DCMAKE_VERBOSE_MAKEFILE=ON
+             -G "${GENERATOR}")
         _add_driver_step (${DRIVER_SCRIPT} CONFIGURE
                           COMMAND ${CONFIGURE_COMMAND})


More fun with build systems.

More fun with build systems.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -5,6 +5,10 @@
 IF(WIN32)
     SET(CMAKE_EXE_LINKER_FLAGS "-static")
     SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+
+    # Also make it a Windows application on Release. So a console doesn't pop up every time.
+    SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wl,--subsystem,windows -mwindows")
+    SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -mwindows")
 ENDIF(WIN32)

 # Ignore depreciation warnings on OSX because GLUT is deprecated.


*nix fix

*nix fix

--- FindFBX.cmake
+++ FindFBX.cmake
@@ -16,7 +16,9 @@
     /Applications/Autodesk/FBXSDK20131
 )

-string(REGEX REPLACE "\\\\" "/" WIN_PROGRAM_FILES_X64_DIRECTORY $ENV{ProgramW6432})
+if(WIN32)
+    string(REGEX REPLACE "\\\\" "/" WIN_PROGRAM_FILES_X64_DIRECTORY $ENV{ProgramW6432})
+endif()

 set(FBX_WIN_LOCATIONS
     "${WIN_PROGRAM_FILES_X64_DIRECTORY}/Autodesk/FBX/FbxSdk/2013.1"


Remove encoder test for now

Remove encoder test for now

--- emdata.cmake
+++ emdata.cmake
@@ -16,6 +16,6 @@
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ""
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} -DBUILDEM_DIR=${BUILDEM_DIR} ${emdata_SRC_DIR}
-    TEST_COMMAND        ${BUILDEM_ENV_STRING} ${BUILDEM_BIN_DIR}/tests/test_encoder
+    TEST_COMMAND        ""
     INSTALL_COMMAND     ""
 )


Symlink setup.cfg and sources before building Python egg-info (#327)

Signed-off-by: Michel Hidalgo <2c7f9fd20fbeb41ce8894ec4653d66fa7f3b6e1a@ekumenlabs.com>

--- ament_cmake_python/cmake/ament_python_install_package.cmake
+++ ament_cmake_python/cmake/ament_python_install_package.cmake
@@ -93,24 +93,28 @@
     CONTENT "${setup_py_content}"
   )

+  set(egg_dependencies ament_cmake_python_symlink_${package_name})
+
+  add_custom_target(
+    ament_cmake_python_symlink_${package_name}
+    COMMAND ${CMAKE_COMMAND} -E create_symlink
+    "${ARG_PACKAGE_DIR}" "${build_dir}/${package_name}"
+  )
+
   if(ARG_SETUP_CFG)
     add_custom_target(
-      ament_cmake_python_symlink_${package_name}_setup ALL
+      ament_cmake_python_symlink_${package_name}_setup
       COMMAND ${CMAKE_COMMAND} -E create_symlink
         "${ARG_SETUP_CFG}" "${build_dir}/setup.cfg"
     )
+    list(APPEND egg_dependencies ament_cmake_python_symlink_${package_name}_setup)
   endif()
-
-  add_custom_target(
-    ament_cmake_python_symlink_${package_name} ALL
-    COMMAND ${CMAKE_COMMAND} -E create_symlink
-      "${ARG_PACKAGE_DIR}" "${build_dir}/${package_name}"
-  )

   add_custom_target(
     ament_cmake_python_build_${package_name}_egg ALL
     COMMAND ${PYTHON_EXECUTABLE} setup.py egg_info
     WORKING_DIRECTORY "${build_dir}"
+    DEPENDS ${egg_dependencies}
   )

   install(


Fix precondition_list_is_disjoint to actually test something.

--- cmake/modules/SwiftList.cmake
+++ cmake/modules/SwiftList.cmake
@@ -81,14 +81,16 @@
     MESSAGE "List ${l} has duplicate elements and thus is not a set. Contents: ${${l}}")
 endfunction()

-function(precondition_list_is_disjoint)
-  set(TOP)
-  foreach(l ${ARGN})
-    # First do a precondition check that TOP and l are disjoint.
-    list_intersect(TOP l TOP_L_INTERSECTION)
-    list(LENGTH TOP_L_INTERSECTION TOP_L_INTERSECTION_LENGTH)
-    precondition_binary_op(EQUAL ${TOP_L_INTERSECTION_LENGTH} 0)
-    # Then union l into TOP so that we can check the next list.
-    list_union(TOP l TOP)
+function(precondition_list_is_disjoint first)
+  set(RESULT "${${first}}")
+  set(REST ${ARGN})
+  foreach(l ${REST})
+    # First do a precondition check that RESULT and l are disjoint.
+    list_intersect("${RESULT}" "${${l}}" TMP_INTERSECTION)
+    list(LENGTH TMP_INTERSECTION TMP_INTERSECTION_LENGTH)
+    precondition_binary_op(EQUAL ${TMP_INTERSECTION_LENGTH} 0
+      MESSAGE "Found non-empty set intersection.")
+    # Then union l into RESULT so that we can check the next list.
+    list_union(RESULT "${${l}}" "${RESULT}")
   endforeach()
 endfunction()


[FIX] VS builds: Fixes issue to find correct contribs package.

--- util/cmake/SeqAnContribs.cmake
+++ util/cmake/SeqAnContribs.cmake
@@ -36,7 +36,7 @@

 if (WIN32)
   # For all contrib versions...
-  foreach (_SEQAN_CONTRIB_VERSION D20111031 D20130710 D20131121 D20160115)
+  foreach (_SEQAN_CONTRIB_VERSION D20160115)
     set (_SEQAN_CONTRIB_DIR "seqan-contrib-${_SEQAN_CONTRIB_VERSION}")

 	  # Determine architecture for the precompiled contribs.


removed implementation file from being compiled with the test driver

--- src/CMake/CyclusModuleMacros.cmake
+++ src/CMake/CyclusModuleMacros.cmake
@@ -31,7 +31,6 @@
   cyclus_init(${MODEL_PATH} ${_name})

   SET(${_type}TestSource ${${_type}TestSource}
-    ${CMAKE_CURRENT_SOURCE_DIR}/${_name}.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/${_name}Tests.cpp
     PARENT_SCOPE)
 endmacro()


Fix compilation on ARMv7.Fixes #2387.

Fix compilation on ARMv7.Fixes #2387.

--- SetFlags.cmake
+++ SetFlags.cmake
@@ -94,6 +94,10 @@
                 		OUTPUT_VARIABLE GCC_VERSION)
                 endif()

+		if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
+				set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" "-fomit-frame-pointer")
+		endif()
+
 		set(CMAKE_CXX_FLAGS          "${CMAKE_CXX_FLAGS}          -std=c++11")
 		set(CMAKE_CXX_FLAGS_DEBUG    "${CMAKE_CXX_FLAGS_DEBUG}    -std=c++11")
 		set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_COVERAGE} -std=c++11")


Revert #372, breaks FindTuvok in Livre

Revert #372, breaks FindTuvok in Livre

--- SubProject.cmake
+++ SubProject.cmake
@@ -134,11 +134,8 @@
     add_subdirectory("${__common_source_dir}/${path}"
                      "${CMAKE_BINARY_DIR}/${name}")
     if(NOT ${name}_SKIP_FIND)
-      # find subproject "package"
-      find_package(${name} REQUIRED QUIET
-        HINTS "${CMAKE_BINARY_DIR}/${name}"
-              "${CMAKE_BINARY_DIR}/${name}/lib/cmake/${name}"
-      )
+      # find subproject "package"
+      find_package(${name} REQUIRED QUIET)
       include_directories(${${NAME}_INCLUDE_DIRS})
     endif()
     set(${name}_IS_SUBPROJECT ON PARENT_SCOPE)


STYLE: Restructuring CMake code for Slicer extension tests

The CMake code that was used for the tests was in two places in the file "SuperBuild.cmake". Everything was reorganized and moved into one location.

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -33,14 +33,6 @@
   #VTK_VERSION_MAJOR is define but not a CACHE variable
   set( VTK_VERSION_MAJOR ${VTK_VERSION_MAJOR} CACHE STRING "Choose the expected VTK major version to build Slicer (5 or 6).")
   set( USE_SYSTEM_SlicerExecutionModel ON CACHE BOOL "Build using an externally defined version of SlicerExecutionModel" FORCE )
-  # For tests purposes
-  set(EXTENSION_CLIS CropDTI dtiaverage dtiestim dtiprocess fiberprocess fiberstats polydatamerge polydatatransform)
-  set(TESTS dtiaverageTest dtiestimTest dtiprocessTest TestHomemadeRoundFunction)
-  # Creation of imported targets for the tests
-  foreach(VAR ${EXTENSION_CLIS} ${TESTS} )
-    add_executable(${VAR} IMPORTED)
-    set_property(TARGET ${VAR} PROPERTY IMPORTED_LOCATION ${DTIProcess_INSTALL_DIRECTORY}/${INSTALL_RUNTIME_DESTINATION}/${VAR}${fileextension})
-  endforeach()
 endif()

 option(USE_SYSTEM_ITK "Build using an externally defined version of ITK" OFF)
@@ -179,13 +171,27 @@
 #-----------------------------------------------------------------------------

 if( DTIProcess_BUILD_SLICER_EXTENSION )
+  set(EXTENSION_CLIS CropDTI dtiaverage dtiestim dtiprocess fiberprocess fiberstats polydatamerge polydatatransform)
+  set(TESTS dtiaverageTest dtiestimTest dtiprocessTest TestHomemadeRoundFunction)
+  # Manual creation of imported targets for the tests
+  # It is not possible to import the targets directly using "include(DTIProcess-targets.cmake)" because
+  # that file is only created at compilation time and we need to know where the targets will be at configuration time.
+  foreach(VAR ${EXTENSION_CLIS} ${TESTS} )
+    add_executable(${VAR} IMPORTED)
+    set_property(TARGET ${VAR} PROPERTY IMPORTED_LOCATION ${DTIProcess_INSTALL_DIRECTORY}/${INSTALL_RUNTIME_DESTINATION}/${VAR}${fileextension})
+  endforeach()
   IF(BUILD_TESTING)
     include(CTest)
     ADD_SUBDIRECTORY(Testing)
   ENDIF(BUILD_TESTING)
+  # Packaging
   include(${Slicer_USE_FILE})
   foreach( VAR ${EXTENSION_CLIS})
-    install( PROGRAMS ${DTIProcess_INSTALL_DIRECTORY}/${INSTALL_RUNTIME_DESTINATION}/${VAR}${fileextension} DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION} )
+    # We have imported the inner-build targets manually.
+    # It is not possible to install imported target (CMake limitation), so instead we install
+    # the corresponding executable.
+    get_property(${VAR}PATH TARGET ${VAR} PROPERTY IMPORTED_LOCATION )
+    install( PROGRAMS ${${VAR}PATH} DESTINATION ${SlicerExecutionModel_DEFAULT_CLI_INSTALL_RUNTIME_DESTINATION} )
   endforeach()
   configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/ImportDTIProcessExtensionExecutables.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/ImportDTIProcessExtensionExecutables.cmake)
   set(CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${CMAKE_BINARY_DIR};${EXTENSION_NAME};ALL;/")


Create the configuration file for gadgetron

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -92,3 +92,5 @@
 set(CCPPETMR_INSTALL ${SUPERBUILD_INSTALL_DIR})
 configure_file(env_ccppetmr.sh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.sh)
 configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)
+#default gadgetron configuration
+configure_file(${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml.example ${CCPPETMR_INSTALL}/share/gadgetron/config/gadgetron.xml)


COMP: Ensure CMAKE_MACOSX_RPATH is passed to CTK inner-build

This commit fixes an issue introduced in 4c043cc (COMP: Initialize and
propagate CMAKE_MACOSX_RPATH to external projects)

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -50,6 +50,7 @@
     -DCMAKE_CXX_FLAGS_INIT:STRING=${CMAKE_CXX_FLAGS_INIT}
     -DCMAKE_C_FLAGS_INIT:STRING=${CMAKE_C_FLAGS_INIT}
     -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
+    -DCMAKE_MACOSX_RPATH:BOOL=${CMAKE_MACOSX_RPATH}
     ${ep_cxx_standard_arg}
   SOURCE_DIR ${CTK_SOURCE_DIR}
   BINARY_DIR ${CTK_BINARY_DIR}/CTK-build


fixed issue 1026: winthread fail on drheapstat

SVN-Revision: 1042

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -406,7 +406,7 @@
     # line, since %ANYLINE can insert a paren at the beginning of the line.
     # FIXME PR 470723: add Dr. Heapstat-specific tests
     if (NOT TOOL_DR_HEAPSTAT OR
-        NOT "${line}" MATCHES "^~~")
+        NOT "${line}" MATCHES "~~")
       strip_trailing_newline_regex(line "${line}")
       set(msg "stderr failed to match \"${line}\"")
       # try to find what was meant to match


Disable GLES2 renderer by default

Disable GLES2 renderer by default

It's not complete and doesn't work, so don't build it by default

--- framework/cmake/renderer.cmake
+++ framework/cmake/renderer.cmake
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8)

 option (BUILD_GL_3_0_RENDERER "Build an OpenGL 3.0 renderer backend" ON)
-option (BUILD_GLES_2_0_RENDERER "Build an OpenGL|ES 2.0 renderer backend" ON)
+option (BUILD_GLES_2_0_RENDERER "Build an OpenGL|ES 2.0 renderer backend" OFF)
 option (BUILD_ALLEGRO_RENDERER "Build an allegro renderer backend" OFF)

 set (RENDERERS "")


Updated FindGLEW.cmake from Magnum repository.

--- modules/FindGLEW.cmake
+++ modules/FindGLEW.cmake
@@ -13,8 +13,12 @@

 else()

-    # Static library
-    find_library(GLEW_LIBRARY GLEW)
+    # Library
+    if(NOT WIN32)
+        find_library(GLEW_LIBRARY GLEW)
+    else()
+        find_library(GLEW_LIBRARY glew32)
+    endif()

     # Include dir
     find_path(GLEW_INCLUDE_DIR


ctkMacroCompilePythonScript - Add NO_INSTALL_SUBDIR option

If specified, the last component of the directory to install
won't be included. This allow to circumvent the fact 'add_custom_command'
doesn't play nicely when filepath have 2 consecutive slashes.

--- CMake/ctkMacroCompilePythonScript.cmake
+++ CMake/ctkMacroCompilePythonScript.cmake
@@ -11,10 +11,10 @@
 MACRO(ctkMacroCompilePythonScript)
   ctkMacroParseArguments(MY
     "TARGET_NAME;SCRIPTS;RESOURCES;SOURCE_DIR;DESTINATION_DIR;INSTALL_DIR"
-    ""
+    "NO_INSTALL_SUBDIR"
     ${ARGN}
     )
-
+
   FIND_PACKAGE(PythonInterp REQUIRED)
   FIND_PACKAGE(PythonLibs REQUIRED)

@@ -27,11 +27,17 @@
       MESSAGE(FATAL_ERROR "${varname} is mandatory")
     ENDIF()
   ENDFOREACH()
-
+
   IF(NOT DEFINED MY_SOURCE_DIR)
     SET(MY_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
   ENDIF()
-
+
+  # Since 'add_custom_command' doesn't play nicely with path having multiple
+  # consecutive slashes. Let's make sure there are no trailing slashes.
+  get_filename_component(MY_SOURCE_DIR ${MY_SOURCE_DIR} REALPATH)
+  get_filename_component(MY_DESTINATION_DIR ${MY_DESTINATION_DIR} REALPATH)
+  get_filename_component(MY_INSTALL_DIR ${MY_INSTALL_DIR} REALPATH)
+
   SET(input_python_files)
   SET(copied_python_files)
   FOREACH(file ${MY_SCRIPTS})
@@ -48,7 +54,7 @@
       file(RELATIVE_PATH tgt_file ${CMAKE_CURRENT_BINARY_DIR} ${file})
       SET(tgt "${MY_DESTINATION_DIR}/${tgt_file}")
     ENDIF()
-
+
     LIST(APPEND input_python_files ${src})
     ADD_CUSTOM_COMMAND(DEPENDS ${src}
                         COMMAND ${CMAKE_COMMAND} -E copy ${src} ${tgt}
@@ -131,8 +137,13 @@
         )
   ENDIF()

+  set(MY_DIRECTORY_TO_INSTALL ${MY_DESTINATION_DIR})
+  if(MY_NO_INSTALL_SUBDIR)
+    set(MY_DIRECTORY_TO_INSTALL ${MY_DESTINATION_DIR}/)
+  endif()
+
   # Install python module / resources directory
-  INSTALL(DIRECTORY "${MY_DESTINATION_DIR}"
+  INSTALL(DIRECTORY "${MY_DIRECTORY_TO_INSTALL}"
     DESTINATION "${MY_INSTALL_DIR}" COMPONENT Runtime
     USE_SOURCE_PERMISSIONS)


cmake: find python in order specified by PATH environment variable.

CMake policy CMP0094 controls a lookup strategy used to find a Python
executable:

* CMP0094=OLD selects a Python executable with a higher version.
* CMP0094=NEW selects a Python executable found earlier in PATH.

NEW behavior is critical in presence of a Python virtual environment
established and activated, i.e. added to the PATH variable.

In case GoogleTest is embedded into a larger project, the result of
`find_package(Python)` affects the whole build, not only GoogleTest
component itself.

--- googletest/cmake/internal_utils.cmake
+++ googletest/cmake/internal_utils.cmake
@@ -244,6 +244,12 @@
     ${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
 endfunction()

+# CMP0094 policy enables finding a Python executable in the LOCATION order, as
+# specified by the PATH environment variable.
+if (POLICY CMP0094)
+  cmake_policy(SET CMP0094 NEW)
+endif()
+
 # Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
 if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
   find_package(PythonInterp)


Add the possibility to define a custom build-string suffix

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

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


Added the /bigobj flag in order to enable compilation with MSVC when EIGEN_SPLIT_LARGE_TESTS is not set.

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -27,6 +27,10 @@
   endif(EIGEN_NO_ASSERTION_CHECKING)

   ei_add_target_property(${targetname} COMPILE_FLAGS "-DEIGEN_TEST_FUNC=${testname}")
+
+  if(MSVC AND NOT EIGEN_SPLIT_LARGE_TESTS)
+    ei_add_target_property(${targetname} COMPILE_FLAGS "/bigobj")
+  endif()

   # let the user pass flags.
   if(${ARGC} GREATER 2)
@@ -51,7 +55,7 @@
       # notice: no double quotes around ${libs_to_link} here. It may be a list.
       target_link_libraries(${targetname} ${libs_to_link})
     endif()
-  endif()
+  endif()

   if(WIN32)
     if(CYGWIN)


added cygwin specific stuff

added cygwin specific stuff

--- cmake/EigenTesting.cmake
+++ cmake/EigenTesting.cmake
@@ -96,7 +96,11 @@
   endif(${ARGC} GREATER 2)

   if(WIN32)
-    add_test(${testname} "${targetname}")
+    if(CYGWIN)
+      add_test(${testname} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname}")
+    else(CYGWIN)
+      add_test(${testname} "${targetname}")
+    endif(CYGWIN)
   else(WIN32)
     add_test(${testname} "${Eigen_SOURCE_DIR}/test/runtest.sh" "${testname}")
   endif(WIN32)


SQME FindOpenBLAS

SQME FindOpenBLAS

--- cmake/FindOpenBLAS.cmake
+++ cmake/FindOpenBLAS.cmake
@@ -38,6 +38,7 @@
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #=============================================================================
 #
+set(OpenBLAS_HAS_PARALLEL_LIBRARIES FALSE)

 set(OpenBLAS_SEARCH_PATHS
   ${OpenBLAS_DIR}
@@ -88,7 +89,6 @@
    get_filename_component(OpenBLAS_LIB_DIR i${OpenBLAS_LIB} DIRECTORY)
 endif()
 ## Find the named parallel version of openblas
-set(OpenBLAS_HAS_PARALLEL_LIBRARIES OFF)
 set(OpenBLAS_SEARCH_VERSIONS ${OpenBLAS_VERSION_STRING} 0.2.19 0.2.18 0.2.17 0.2.16)
 list(REMOVE_DUPLICATES OpenBLAS_SEARCH_VERSIONS)
 foreach(checkVersion ${OpenBLAS_SEARCH_VERSIONS})
@@ -124,7 +124,7 @@
 # Checks 'REQUIRED', 'QUIET' and versions.
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(OpenBLAS FOUND_VAR OpenBLAS_FOUND
-  REQUIRED_VARS OpenBLAS_HAS_PARALLEL_LIBRARIES
+  REQUIRED_VARS
                 OpenBLAS_CBLAS_INCLUDE_DIR
                 OpenBLAS_LAPACKE_INCLUDE_DIR
                 OpenBLAS_LIB
@@ -134,7 +134,13 @@
 if (OpenBLAS_FOUND)
   set(OpenBLAS_INCLUDE_DIRS ${OpenBLAS_CBLAS_INCLUDE_DIR} ${OpenBLAS_CBLAS_INCLUDE_DIR})
   list(REMOVE_DUPLICATES OpenBLAS_INCLUDE_DIRS)
-  list(APPEND OpenBLAS_LIBRARIES ${OpenBLAS_LIB})
+  if("${CMAKE_C_COMPILER_ID}" MATCHES ".*Clang.*" OR
+     "${CMAKE_C_COMPILER_ID}" MATCHES ".*GNU.*" OR
+     "${CMAKE_C_COMPILER_ID}" MATCHES ".*Intel.*"
+      ) #NOT MSVC
+    set(MATH_LIB m)
+  endif()
+  list(APPEND OpenBLAS_LIBRARIES ${OpenBLAS_LIB} ${MATH_LIB})
   if(OpenBLAS_HAS_PARALLEL_LIBRARIES)
     list(APPEND OpenBLAS_PARALLEL_LIBRARIES ${OpenBLAS_PARALLEL_LIB})
   endif()
@@ -153,12 +159,12 @@
 )

 ## For debugging
-#message(STATUS "OpenBLAS_FOUND                  :${OpenBLAS_FOUND}:  - set to true if the library is found")
-#message(STATUS "OpenBLAS_INCLUDE_DIRS           :${OpenBLAS_INCLUDE_DIRS}: - list of required include directories")
-#message(STATUS "OpenBLAS_LIBRARIES              :${OpenBLAS_LIBRARIES}: - list of libraries to be linked")
-#message(STATUS "OpenBLAS_HAS_PARALLEL_LIBRARIES :${OpenBLAS_HAS_PARALLEL_LIBRARIES}: - determine if there are parallel libraries compiled")
-#message(STATUS "OpenBLAS_PARALLEL_LIBRARIES     :${OpenBLAS_PARALLEL_LIBRARIES}: - list of libraries for parallel implementations")
-#message(STATUS "OpenBLAS_VERSION_MAJOR          :${OpenBLAS_VERSION_MAJOR}: - major version number")
-#message(STATUS "OpenBLAS_VERSION_MINOR          :${OpenBLAS_VERSION_MINOR}: - minor version number")
-#message(STATUS "OpenBLAS_VERSION_PATCH          :${OpenBLAS_VERSION_PATCH}: - patch version number")
-#message(STATUS "OpenBLAS_VERSION_STRING         :${OpenBLAS_VERSION_STRING}: - version number as a string")
+message(STATUS "OpenBLAS_FOUND                  :${OpenBLAS_FOUND}:  - set to true if the library is found")
+message(STATUS "OpenBLAS_INCLUDE_DIRS           :${OpenBLAS_INCLUDE_DIRS}: - list of required include directories")
+message(STATUS "OpenBLAS_LIBRARIES              :${OpenBLAS_LIBRARIES}: - list of libraries to be linked")
+message(STATUS "OpenBLAS_HAS_PARALLEL_LIBRARIES :${OpenBLAS_HAS_PARALLEL_LIBRARIES}: - determine if there are parallel libraries compiled")
+message(STATUS "OpenBLAS_PARALLEL_LIBRARIES     :${OpenBLAS_PARALLEL_LIBRARIES}: - list of libraries for parallel implementations")
+message(STATUS "OpenBLAS_VERSION_MAJOR          :${OpenBLAS_VERSION_MAJOR}: - major version number")
+message(STATUS "OpenBLAS_VERSION_MINOR          :${OpenBLAS_VERSION_MINOR}: - minor version number")
+message(STATUS "OpenBLAS_VERSION_PATCH          :${OpenBLAS_VERSION_PATCH}: - patch version number")
+message(STATUS "OpenBLAS_VERSION_STRING         :${OpenBLAS_VERSION_STRING}: - version number as a string")


Updating the arrayfire_data repo URL

Updating the arrayfire_data repo URL

--- common/GetTestData.cmake
+++ common/GetTestData.cmake
@@ -4,7 +4,7 @@
 set_directory_properties(PROPERTIES EP_PREFIX ${CMAKE_BINARY_DIR}/data)

 ExternalProject_Add(arrayfire_data
-    GIT_REPOSITORY git@git.arrayfire.org:arrayfire/arrayfire-data.git
+    GIT_REPOSITORY git@github.com:arrayfire/arrayfire_data.git
     DOWNLOAD_DIR ${CMAKE_BINARY_DIRECTORY}
     CONFIGURE_COMMAND ""
     INSTALL_COMMAND ""


add glibcxx_debug flag to debug build for clang

--- common/cmake/clang.cmake
+++ common/cmake/clang.cmake
@@ -113,10 +113,11 @@
   ENDIF()

   SET(CMAKE_CXX_FLAGS_DEBUG "")
-  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")          # enable assertions
-  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG")  # configure TBB in debug mode
-  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")               # generate debug information
-  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")             # allow inlining of intrinsics
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")           # enable assertions
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DTBB_USE_DEBUG")   # configure TBB in debug mode
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g")                # generate debug information
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O2")               # allow inlining of intrinsics
+  SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")  # emit debug information for libstc++

   SET(CMAKE_CXX_FLAGS_RELEASE "")
   SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")     # disable assertions


use gold linker on supported android platforms

--- toolchains/android-studio.toolchain.cmake
+++ toolchains/android-studio.toolchain.cmake
@@ -49,6 +49,11 @@
 # Some settings from android.toolchain.cmake which are better than in default toolchain shipped with
 # Android Studio.

+# apparently gold is not supported on mips
+if( NOT ( ANDROID_ABI STREQUAL "mips" OR ANDROID_ABI STREQUAL "mips64" ) )
+    link_libraries( -fuse-ld=gold )
+endif()
+
 link_libraries( $<$<CONFIG:RELEASE>:-Wl,--gc-sections> )
 link_libraries( $<$<CONFIG:RELEASE>:-Wl,--icf=all>     ) # http://research.google.com/pubs/pub36912.html Safe ICF: Pointer Safe and Unwinding Aware Identical Code Folding in Gold


cmake: print message if build needs to default to boost::shared_ptr

--- cmake/Modules/LibPKMNCompilerCheck.cmake
+++ cmake/Modules/LibPKMNCompilerCheck.cmake
@@ -114,6 +114,7 @@

     IF(NOT HAVE_SHARED_PTR)
         ADD_DEFINITIONS(-DLIBPKMN_USE_BOOST_SHARED_PTR)
+        MESSAGE(STATUS "STL shared_ptr not found. Defaulting to boost::shared_ptr.")
     ENDIF(NOT HAVE_SHARED_PTR)
 ENDIF(NOT USE_BOOST_SHARED_PTR)


Need to include some more boost headers for boost 1.50+

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


Use modern CMake features in plugin build macro.

This allows external projects to use modern CMake features together
with CTK plug-ins being build with this macro.

--- CMake/ctkMacroBuildPlugin.cmake
+++ CMake/ctkMacroBuildPlugin.cmake
@@ -140,9 +140,11 @@
   # and external dependencies
   ctkFunctionGetIncludeDirs(my_includes ${lib_name})

-  include_directories(
-    ${my_includes}
-    )
+  if(CMAKE_VERSION VERSION_LESS 2.8.12)
+    include_directories(
+      ${my_includes}
+      )
+  endif()

   if(CTK_QT_VERSION VERSION_LESS "5")
     # Add Qt include dirs and defines
@@ -180,7 +182,7 @@
       # this is a workaround for Visual Studio. The relative include paths in the generated
       # moc files can get very long and can't be resolved by the MSVC compiler.
       foreach(moc_src ${MY_MOC_SRCS})
-        QT5_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} -DHAVE_QT5)
+        QT5_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} -DHAVE_QT5 TARGET ${lib_name})
       endforeach()
     endif()
     QT5_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
@@ -192,7 +194,7 @@
       # this is a workaround for Visual Studio. The relative include paths in the generated
       # moc files can get very long and can't be resolved by the MSVC compiler.
       foreach(moc_src ${MY_MOC_SRCS})
-        QT4_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src})
+        QT4_WRAP_CPP(MY_MOC_CPP ${moc_src} OPTIONS -f${moc_src} TARGET ${lib_name})
       endforeach()
     endif()
     QT4_WRAP_UI(MY_UI_CPP ${MY_UI_FORMS})
@@ -290,9 +292,36 @@
     ${_plugin_qm_files}
     )

+  if(NOT CMAKE_VERSION VERSION_LESS 2.8.12)
+    target_include_directories(${lib_name}
+      PUBLIC "$<BUILD_INTERFACE:${my_includes}>"
+             "$<INSTALL_INTERFACE:${CTK_INSTALL_PLUGIN_INCLUDE_DIR}/${Plugin-SymbolicName}>"
+      )
+    if(CTK_QT_VERSION VERSION_LESS "5")
+      # Add Qt include dirs to the target
+      target_include_directories(${lib_name} PUBLIC ${QT_INCLUDE_DIR})
+      foreach(module QT3SUPPORT QTOPENGL QTASSISTANT QTDESIGNER QTMOTIF QTNSPLUGIN
+               QAXSERVER QAXCONTAINER QTDECLARATIVE QTSCRIPT QTSVG QTUITOOLS QTHELP
+               QTWEBKIT PHONON QTSCRIPTTOOLS QTMULTIMEDIA QTXMLPATTERNS QTGUI QTTEST
+               QTDBUS QTXML QTSQL QTNETWORK QTCORE)
+        if (QT_USE_${module} OR QT_USE_${module}_DEPENDS)
+          if (QT_${module}_FOUND)
+            target_include_directories(${lib_name} PUBLIC ${QT_${module}_INCLUDE_DIR})
+          endif ()
+        endif ()
+      endforeach()
+    endif()
+  else()
+    find_package(Qt5LinguistTools REQUIRED)
+  endif()
+
   if(MY_TEST_PLUGIN AND CTK_QT_VERSION VERSION_GREATER "4")
     find_package(Qt5Test REQUIRED)
-    target_link_libraries(${lib_name} Qt5::Test)
+    if(CMAKE_VERSION VERSION_LESS 2.8.12)
+      target_link_libraries(${lib_name} Qt5::Test)
+    else()
+      target_link_libraries(${lib_name} PRIVATE Qt5::Test)
+    endif()
   endif()

   # Set the output directory for the plugin
@@ -354,7 +383,11 @@
     list(APPEND my_libs ssp) # add stack smash protection lib
   endif()

-  target_link_libraries(${lib_name} ${my_libs})
+  if(CMAKE_VERSION VERSION_LESS 2.8.12)
+    target_link_libraries(${lib_name} ${my_libs})
+  else()
+    target_link_libraries(${lib_name} PUBLIC ${my_libs})
+  endif()

   if(NOT MY_TEST_PLUGIN)
     set(${CMAKE_PROJECT_NAME}_PLUGIN_LIBRARIES ${${CMAKE_PROJECT_NAME}_PLUGIN_LIBRARIES} ${lib_name} CACHE INTERNAL "CTK plugins" FORCE)


make device linking a noop

make device linking a noop

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -47,10 +47,9 @@
         set(CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
             "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -fgpu-rdc <SOURCE> -o <OBJECT>")

-        set(CMAKE_CUDA_DEVICE_LINK_LIBRARY
-            "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <LANGUAGE_COMPILE_FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} -shared <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
-        set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE
-            "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <FLAGS> ${CMAKE_CUDA_COMPILE_OPTIONS_PIC} ${_CMAKE_CUDA_EXTRA_DEVICE_LINK_FLAGS} <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
+        # these are no-ops, as device linking is not supported with hcc
+        set(CMAKE_CUDA_DEVICE_LINK_LIBRARY "")
+        set(CMAKE_CUDA_DEVICE_LINK_EXECUTABLE "")

         if(CMAKE_GENERATOR STREQUAL "Ninja")
             # this is also ugly, but ninja/hipcc is only supported with a future cmake


Split off 7.6.54

Split off 7.6.54

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 6 )
-set ( HPCC_POINT 53 )
+set ( HPCC_POINT 55 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Split off 7.12.50

Split off 7.12.50

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


Split off 6.2.0

Split off 6.2.0

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 6 )

-set ( HPCC_MINOR 1 )
+set ( HPCC_MINOR 3 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "trunk" )
 set ( HPCC_SEQUENCE 0 )


[CMake] Use libc++ and compiler-rt for bootstrap Fuchsia Clang

We want to build the second stage compiler with libc++ and compiler-rt,
also include builtins and runtimes into extra bootstrap components to
ensure these get built.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@334445 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia.cmake
+++ cmake/caches/Fuchsia.cmake
@@ -20,6 +20,9 @@
 if(NOT APPLE)
   set(BOOTSTRAP_LLVM_ENABLE_LLD ON CACHE BOOL "")
 endif()
+
+set(CLANG_DEFAULT_CXX_STDLIB libc++ CACHE STRING "")
+set(CLANG_DEFAULT_RTLIB compiler-rt CACHE STRING "")

 if(APPLE)
   set(COMPILER_RT_ENABLE_IOS OFF CACHE BOOL "")
@@ -51,6 +54,10 @@

 # Setup the bootstrap build.
 set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
+set(CLANG_BOOTSTRAP_EXTRA_DEPS
+  builtins
+  runtimes
+  CACHE STRING "")
 set(CLANG_BOOTSTRAP_CMAKE_ARGS
   ${EXTRA_ARGS}
   -C ${CMAKE_CURRENT_LIST_DIR}/Fuchsia-stage2.cmake


change boost download url to speed up download

--- cmake/external/boost.cmake
+++ cmake/external/boost.cmake
@@ -24,7 +24,7 @@
 # So we use 1.41.0 here.
 set(BOOST_VER           "1.41.0")
 set(BOOST_TAR           "boost_1_41_0")
-set(BOOST_URL           "http://paddlepaddledeps.s3-website-us-west-1.amazonaws.com/${BOOST_TAR}.tar.gz")
+set(BOOST_URL           "http://paddlepaddledeps.bj.bcebos.com/${BOOST_TAR}.tar.gz")
 set(BOOST_SOURCES_DIR ${THIRD_PARTY_PATH}/boost)
 set(BOOST_DOWNLOAD_DIR  "${BOOST_SOURCES_DIR}/src/${BOOST_PROJECT}")
 set(BOOST_INCLUDE_DIR "${BOOST_DOWNLOAD_DIR}/${BOOST_TAR}" CACHE PATH "boost include directory." FORCE)


update mklml version

update mklml version

--- cmake/external/mklml.cmake
+++ cmake/external/mklml.cmake
@@ -29,7 +29,7 @@
 SET(MKLML_PROJECT       "extern_mklml")
 IF((NOT DEFINED MKLML_VER) OR (NOT DEFINED MKLML_URL))
   MESSAGE(STATUS "use pre defined download url")
-  SET(MKLML_VER "mklml_lnx_2018.0.3.20180406" CACHE STRING "" FORCE)
+  SET(MKLML_VER "mklml_lnx_2019.0.20180710" CACHE STRING "" FORCE)
   SET(MKLML_URL "http://paddlepaddledeps.cdn.bcebos.com/${MKLML_VER}.tgz" CACHE STRING "" FORCE)
 ENDIF()
 MESSAGE(STATUS "MKLML_VER: ${MKLML_VER}, MKLML_URL: ${MKLML_URL}")


Use CMAKE_CFG_INTDIR instead of different MSVC and Xcode specific  configuration names

--- cmake/install_macros.cmake
+++ cmake/install_macros.cmake
@@ -30,8 +30,7 @@
     STRING(REPLACE ".exe" ".pdb" pdb_location ${location})
     STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
     STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
-    STRING(REPLACE "$(OutDir)" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
-    STRING(REPLACE "$(ConfigurationName)" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
+    STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
     INSTALL(FILES ${pdb_location} DESTINATION ${INSTALL_LOCATION})
   ENDFOREACH()
   ENDIF()
@@ -62,7 +61,7 @@
     DEPENDS ${output})
   SET_TARGET_PROPERTIES(symlink_${linkbasename}${ext} PROPERTIES CLEAN_DIRECT_OUTPUT 1)
   # For Xcode, replace project config with install config
-  STRING(REPLACE "$(CONFIGURATION)" "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
+  STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
   INSTALL(FILES ${output} DESTINATION ${destination})
 ENDIF()
 ENDMACRO()


Split off 7.8.18

Split off 7.8.18

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 8 )
-set ( HPCC_POINT 17 )
+set ( HPCC_POINT 19 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Nagios Monitoring 6.4.0-rc1 Release Candidate 1 (retag)

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

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


Bump version to v1.0.5

Bump version to v1.0.5

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 1.0.4)
+set(autowiring_VERSION 1.0.5)


Default verbose should be warning

Default verbose should be warning

--- Modules/CmakeFedoraScript.cmake
+++ Modules/CmakeFedoraScript.cmake
@@ -3,80 +3,78 @@
 #

 MACRO(CMAKE_FEDORA_SCRIPT_PRINT_USAGE)
-    MESSAGE(
-"  cmake -Dcmd=configure_file
-        -DinputFile=<inputFile> -DoutputFile=<outputFile>
-	[-DatOnly=1]
-        [-Dcmake_fedora_module_dir=<dir>]
-	[-Descape_quotes=1]
-	[-DVAR=VAULE]
-        -P <CmakeModulePath>/CmakeFedoraScript.cmake
-    Copy a file to another location and modify its contents.
-    This is a wrapper of CONFIGURE_FILE command in cmake.
-
-    Note: Please pass the necessary variables via -Dvar=VALUE,
-      e.g. -DPROJECT_NAME=cmake-fedora
-    Options:
-      -DinputFile: input file
-      -DoutPutFile: output file
-      -DatOnly: Replace only the variables surround by '@', like @VAR@.
-        Same as passing '@ONLY' to CONFIGURE_FILE.
-      -Dcmake_fedora_module_dir:
-        Specify this if cmake and cmake-fedora failed to find
-        the location of CMake Fedora modules.
-      -Descape_quotes: Substituted quotes will be C-style escape.
-        Same as passing 'ESCAPE_QUOTES' to CONFIGURE_FILE.
-
+    MESSAGE("
+cmake -Dcmd=configure_file
+      -DinputFile=<inputFile> -DoutputFile=<outputFile>
+      [-DatOnly=1]
+      [-Dcmake_fedora_module_dir=<dir>]
+      [-Descape_quotes=1]
+      [\"-D<VAR>=<VAULE>\"]
+    -P <CmakeModulePath>/CmakeFedoraScript.cmake
+  Copy a file to another location and modify its contents.
+  This is a wrapper of CONFIGURE_FILE command in cmake.
+
+  Note: Please pass the necessary variables via -Dvar=VALUE,
+    e.g. -DPROJECT_NAME=cmake-fedora
+  Options:
+    -DinputFile: input file
+    -DoutPutFile: output file
+    -DatOnly: Replace only the variables surround by '@', like @VAR@.
+      Same as passing '@ONLY' to CONFIGURE_FILE.
+    -Dcmake_fedora_module_dir:
+      Specify this if cmake and cmake-fedora failed to find
+      the location of CMake Fedora modules.
+    -Descape_quotes: Substituted quotes will be C-style escape.
+      Same as passing 'ESCAPE_QUOTES' to CONFIGURE_FILE.

-  cmake -Dcmd=find_file|find_program \"-Dnames=<name1;name2>\"
-        [-Dcmake_fedora_module_dir=<dir>]
-        [-Dpaths=\"path1;path2\"]
-        [-Derror_msg=msg]
-        [-Dverbose_level=verboseLevel]
-        [-Dno_default_path=1]
-        -P <CmakeModulePath>/CmakeFedoraScript.cmake
-    Find a file or program with name1 or name2,
+cmake -Dcmd=find_file|find_program \"-Dnames=<name1;name2>\"
+      [-Dcmake_fedora_module_dir=<dir>]
+      [-Dpaths=\"<path1>;<path2>\"]
+      [-Derror_msg=<msg>]
+      [-Dverbose_level=<verboseLevel>]
+      [-Dno_default_path=1]
+    -P <CmakeModulePath>/CmakeFedoraScript.cmake
+  Find a file or program with name1 or name2,
     with proper error handling.
-    Options:
-      -Dcmake_fedora_module_dir:
-        Specify this if cmake and cmake-fedora failed to find
-        the location of CMake Fedora modules.
-      -Dpaths: Paths that files might be located.
-      -Derror_msg: Error message to be shown if not-found.
-      -Dverbose_level: Verbose level for not-found message.
-        1: Critical (The 'not found' message is shown as critical)
-        2: Error (The 'not found' message is shown as error)
-        3: Warning (The 'not found' message is shown as error)
-	4: Off (The 'not found' message is shown as off,
-	   that is, turn off certain functionality).
-        5: Info1
-	6: Info2
-	7: Info3
-	Default: Error
-      -Dno_default_path: CMake default paths will not be search.
-        Useful if you only want to search the file list in -Dpaths.
+  Options:
+    -Dcmake_fedora_module_dir:
+      Specify this if cmake and cmake-fedora failed to find
+      the location of CMake Fedora modules.
+    -Dpaths: Paths that files might be located.
+    -Derror_msg: Error message to be shown if not-found.
+    -Dverbose_level: Verbose level for not-found message.
+      1: Critical (The 'not found' message is shown as critical)
+      2: Error (The 'not found' message is shown as error)
+      3: Warning (The 'not found' message is shown as warning)
+      4: Off (The 'not found' message is shown as off,
+         that is, turn off certain functionality).
+      5: Info1
+      6: Info2
+      7: Info3
+      Default: 3 (Warning)
+    -Dno_default_path: CMake default paths will not be search.
+      Useful if you only want to search the file list in -Dpaths.

-  cmake -Dcmd=manage_file_cache \"-Drun=<command arg1 ...>\"
-        -Dcache_file=<cacheFileWithoutDirectory>
-        [-Dcmake_fedora_module_dir=<dir>]
-        [-Dexpiry_seconds=seconds]
-        [-Dcache_dir=dir]
-        -P <CmakeModulePath>/CmakeFedoraScript.cmake
-    Output from either cache file or run command.
-    Command is run when 1) cache expired or 2) no cache.
-    Cache will be update after run command.
-
-  cmake -Dcmd=get_cmake_cache_variable -Dvar=<varName>
-        -Dcmake_cache=<CMakeCache.txt>
-        [-Dcmake_fedora_module_dir=<dir>]
-        -P <CmakeModulePath>/CmakeFedoraScript.cmake
-    Get variable value from CMakeCache.txt
-
-  cmake -Dcmd=get_variable -Dvar=<varName>
-        [-Dcmake_fedora_module_dir=<dir>]
-        -P <CmakeModulePath>/CmakeFedoraScript.cmake
-    Get variable value from cmake-fedora.conf.
-
+cmake -Dcmd=manage_file_cache \"-Drun=<command arg1 ...>\"
+      -Dcache_file=<cacheFileWithoutDirectory>
+      [-Dcmake_fedora_module_dir=<dir>]
+      [-Dexpiry_seconds=seconds]
+      [-Dcache_dir=dir]
+    -P <CmakeModulePath>/CmakeFedoraScript.cmake
+  Output from either cache file or run command.
+  Command is run when 1) cache expired or 2) no cache.
+  Cache will be update after run command.
+
+cmake -Dcmd=get_cmake_cache_variable -Dvar=<varName>
+      -Dcmake_cache=<CMakeCache.txt>
+      [-Dcmake_fedora_module_dir=<dir>]
+    -P <CmakeModulePath>/CmakeFedoraScript.cmake
+  Get variable value from CMakeCache.txt
+
+cmake -Dcmd=get_variable -Dvar=<varName>
+      [-Dcmake_fedora_module_dir=<dir>]
+    -P <CmakeModulePath>/CmakeFedoraScript.cmake
+  Get variable value from cmake-fedora.conf.
 ")
 ENDMACRO(CMAKE_FEDORA_SCRIPT_PRINT_USAGE)

@@ -109,11 +107,9 @@
 	LIST(APPEND _args "ERROR_MSG" "${error_msg}")
     ENDIF()

-    SET(_verboseLevel "${M_ERROR}")
+    SET(_verboseLevel "${M_WARNING}")
     IF(DEFINED verbose_level)
 	SET(_verboseLevel "${verbose_level}")
-    ELSE()
-	SET(_verboseLevel "${M_ERROR}")
     ENDIF()
     LIST(APPEND _args "VERBOSE_LEVEL" "${_verboseLevel}")


ENH: Update RTK for future proofing.

ENH: Update RTK for future proofing.

Using explicit typecasts for future-proofing
enums.  RTK treats enum values as integers and
enumerations interchangeably for pushing onto
a stack of integers.  Using explicit static_casts
makes code future proof when enum class is used.

--- Modules/Remote/RTK.remote.cmake
+++ Modules/Remote/RTK.remote.cmake
@@ -2,5 +2,5 @@
 itk_fetch_module(RTK
     "Reconstruction Toolkit (RTK) http://www.openrtk.org/"
   GIT_REPOSITORY ${git_protocol}://github.com/SimonRit/RTK.git
-  GIT_TAG 3fc00efadef8324aba31f77390c3e562f9af5147
+  GIT_TAG f0451dafae314c142d2ead540b8fde5f1f8a51d8
 )


CMake: Adding ANN_DIR subdirs to the search hints

git-svn-id: 2c5c5254c2b0cdeda7f178246c2049dd59258ff6@77 f95d2973-9550-45a5-b795-f9f66c6b6f94

--- cmake/FindANN.cmake
+++ cmake/FindANN.cmake
@@ -5,6 +5,15 @@
 #  ANN_LIBRARIES, the libraries needed to use visglut.
 #  ANN_FOUND, If false, do not try to use visglut.
 #
+
+
+# setup of hint paths
+set(lib_search_hints )
+set(inc_search_hints )
+if (ANN_DIR)
+	set(lib_search_hints "${ANN_DIR}" "${ANN_DIR}/lib")
+	set(inc_search_hints "${ANN_DIR}" "${ANN_DIR}/include")
+endif()

 # setup of system search paths
@@ -15,12 +24,12 @@
 # perform the search
 find_library(ANN_LIBRARIES
 	NAMES libann.so
-	#HINTS ${lib_search_hints}
+	HINTS ${lib_search_hints}
 	PATHS ${lib_search_paths}
 	)
 find_path(ANN_INCLUDE_DIR
 	NAMES ANN/ANN.h
-	#HINTS ${inc_search_hints}
+	HINTS ${inc_search_hints}
 	PATHS ${inc_search_paths}
 	)


Rearrange paragraphs

Rearrange paragraphs

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -14,7 +14,9 @@
 #

-# generic.cmake defines CMakes functions that look like Bazel's building rules (https://bazel.build/).
+# generic.cmake defines CMakes functions that look like Bazel's
+# building rules (https://bazel.build/).
+#
 #
 # -------------------------------------------
 #     C++        CUDA C++       Go
@@ -24,11 +26,14 @@
 # cc_test       nv_test      go_test
 # -------------------------------------------
 #
-# To build a static library example.a from example.cc using the system compiler (like GCC):
+# To build a static library example.a from example.cc using the system
+#  compiler (like GCC):
 #
 #   cc_library(example SRCS example.cc)
 #
-# To build a static library example.a from multiple source files example{1,2,3}.cc:
+
+# To build a static library example.a from multiple source files
+# example{1,2,3}.cc:
 #
 #   cc_library(example SRCS example1.cc example2.cc example3.cc)
 #
@@ -36,7 +41,8 @@
 #
 #   cc_library(example SHARED SRCS example.cc)
 #
-# To build a library using Nvidia's NVCC from .cu file(s), use the nv_ prefixed version:
+# To build a library using Nvidia's NVCC from .cu file(s), use the nv_
+# prefixed version:
 #
 #   nv_library(example SRCS example.cu)
 #
@@ -48,15 +54,18 @@
 #
 #   cc_library(composed DEPS dependent1 dependent2 dependent3)
 #
-# To build an executable binary file from some source files and dependent libraries:
+# To build an executable binary file from some source files and
+# dependent libraries:
 #
 #   cc_binary(example SRCS main.cc something.cc DEPS example1 example2)
 #
-# To build an executable binary file using NVCC, use the nv_ prefixed version:
+# To build an executable binary file using NVCC, use the nv_ prefixed
+# version:
 #
 #   nv_binary(example SRCS main.cc something.cu DEPS example1 example2)
 #
-# To build a unit test binary, which is an executable binary with GoogleTest linked:
+# To build a unit test binary, which is an executable binary with
+# GoogleTest linked:
 #
 #   cc_test(example_test SRCS example_test.cc DEPS example)
 #
@@ -64,7 +73,9 @@
 #
 #   nv_test(example_test SRCS example_test.cu DEPS example)
 #
-# It is pretty often that executable and test binaries depend on pre-defined external libaries like glog and gflags defined in /cmake/external/*.cmake:
+# It is pretty often that executable and test binaries depend on
+# pre-defined external libaries like glog and gflags defined in
+# /cmake/external/*.cmake:
 #
 #   cc_test(example_test SRCS example_test.cc DEPS example glog gflags)


Bump LeapSerial version number

Bump LeapSerial version number

There have been breaking changes in the LeapSerial interface and includes, need to update the version number accordingly.

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapSerial_VERSION 0.3.3)
+set(LeapSerial_VERSION 0.4.0)


Split off 7.8.14

Split off 7.8.14

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 8 )
-set ( HPCC_POINT 13 )
+set ( HPCC_POINT 15 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


Add forwards-compatibility definitions

Add forwards-compatibility definitions


Correctly return bitstream location for bit.v rule

Signed-off-by: Andrew Butt <f0e550b392ccab9f366ecc80ae525c032211a45e@seas.upenn.edu>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -1014,6 +1014,9 @@
     set(OUT_FASM_MERGED ${OUT_LOCAL}/${TOP}.merged.fasm)
     set(OUT_BITSTREAM ${OUT_LOCAL}/${TOP}.${BITSTREAM_EXTENSION})

+    set_target_properties(${NAME} PROPERTIES
+      OUT_BITSTREAM ${OUT_BITSTREAM}
+    )
     set(BITSTREAM_DEPS ${ALL_OUT_FASM_DEPS} ${FASM_TO_BIT} ${FASM_TO_BIT_DEPS})

     set(OUT_FASM ${OUT_FASM_MERGED})
@@ -1768,6 +1771,7 @@
       OUT_LOCAL_REL ${OUT_LOCAL_REL}
     )

+    get_target_property(OUT_BITSTREAM ${NAME} OUT_BITSTREAM)
     get_target_property_required(NO_BIT_TO_V ${ARCH} NO_BIT_TO_V)
     if(NOT ${NO_BIT_TO_V})
         # Generate verilog from bitstream


Document further compiler settings options

--- Modules/CetCompilerSettings.cmake
+++ Modules/CetCompilerSettings.cmake
@@ -114,10 +114,20 @@
   DOC "Set warning diagnostic level"
   )

-# - Treat warnings as errors
+#.rst:
+# .. cmake:variable:: CET_COMPILER_WARNINGS_ARE_ERRORS
+#
+#  Option to turn compiler warnings into hard errors. ``ON`` by default.
+#
 option(CET_COMPILER_WARNINGS_ARE_ERRORS "treat all warnings as errors" ON)

-# - Allow override for deprecations
+#.rst:
+# .. cmake:variable:: CET_COMPILER_ALLOW_DEPRECATIONS
+#
+#   Option to ignore deprecation warnings. ``ON`` by default.
+#   It only has an effect if ``CET_COMPILER_WARNINGS_ARE_ERRORS`` is
+#   activated (this matches upstream `cetbuildtools` behaviour.
+#
 option(CET_COMPILER_ALLOW_DEPRECATIONS "ignore deprecation warnings" ON)

 mark_as_advanced(
@@ -184,8 +194,21 @@
 # For compatible compilers, the version and strictness of DWARF
 # debugging output may be controlled
 #
+# .. cmake:variable:: CET_COMPILER_DWARF_STRICT
+#
+#   Option to only emit DWARF debugging info at the level set by
+#   ``CET_COMPILER_DWARF_VERSION``. ``ON`` by default.
+#
+# .. todo::
+#
+#   Current flags are GCC dependent. Review them for Clang and Intel
+#
 option(CET_COMPILER_DWARF_STRICT "only emit DWARF debugging info at defined level" ON)
-# NB: this is a number, so again an enum option
+
+# .. cmake:variable:: CET_COMPILER_DWARF_VERSION
+#
+#   Version of DWARF standard that should be emitted. Defaults to 2.
+#
 enum_option(CET_COMPILER_DWARF_VERSION
   VALUES 2 3 4
   TYPE STRING
@@ -219,6 +242,11 @@
 # Linkers may have different default policies for symbol resolution.
 # CET prefer to fully resolved symbols.
 #
+# .. cmake:variable:: CET_COMPILER_NO_UNDEFINED_SYMBOLS
+#
+#   Option to control whether the linker must fully resolve symbols for
+#   shared libraries. ``ON`` by default.
+#
 option(CET_COMPILER_NO_UNDEFINED_SYMBOLS "required full symbol resolution for shared libs" ON)
 mark_as_advanced(CET_COMPILER_NO_UNDEFINED_SYMBOLS)

@@ -238,7 +266,18 @@
 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 #
 # Things like SSE/Vectorization...
-
+#
+# .. cmake:variable:: CET_COMPILER_ENABLE_SSE2
+#
+#   Enable specific optimizations for SSE2. ``OFF`` by default.
+#
+#   Note that this does not check that the system you are building
+#   for supports this instruction set.
+#
+# .. todo::
+#
+#   Review options here for further checks and/or arch-specific optimizations.
+#
 option(CET_COMPILER_ENABLE_SSE2 "enable SSE2 specific optimizations" OFF)
 mark_as_advanced(CET_COMPILER_ENABLE_SSE2)


CMake:[2/2] Removed `__WINDOWS__` flag definition from Stout config.

Review: https://reviews.apache.org/r/39097

--- 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ 3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -33,18 +33,10 @@

 # COMPILER CONFIGURATION.
 #########################
-if (WIN32)
-  # Used to #ifdef out (e.g.) some platform-specific parts of Stout. We choose
-  # to define a new flag rather than using an existing flag (e.g., `_WIN32`)
-  # because we want to give the build system fine-grained control over how what
-  # code is #ifdef'd out in the future, and using only flags defined by our
-  # build system to control this logic is the clearest and stablest way of
-  # doing this.
-  add_definitions(-D__WINDOWS__)
-elseif (APPLE)
+if (APPLE)
   # GTEST on OSX needs its own tr1 tuple.
   add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11)
-endif (WIN32)
+endif (APPLE)

 # DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.


Fix identification of clang compiler.

Fix identification of clang compiler.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -3,10 +3,10 @@
 include(CheckCCompilerFlag)

 set (COMPILER_IS_CLANG FALSE)
-if (CMAKE_CC_COMPILER_ID MATCHES "clang")
+if (${CMAKE_C_COMPILER_ID} MATCHES "Clang")
   set (COMPILER_IS_CLANG TRUE)
   message(CLANG)
-endif (CMAKE_CC_COMPILER_ID MATCHES "clang")
+endif (${CMAKE_C_COMPILER_ID} MATCHES "Clang")

 if (UNIX)
   if (CMAKE_COMPILER_IS_GNUCC OR COMPILER_IS_CLANG)


- correct portability detection problem with in_addr_t and getaddrinfo

git-svn-id: 59214148e3ac47647353bb066875245f1d63170f@8387 4525493e-7705-40b1-a816-d608a930855b

--- cmake/modules/PortabilityGNUCheck.cmake
+++ cmake/modules/PortabilityGNUCheck.cmake
@@ -55,9 +55,8 @@
 CHECK_INCLUDE_FILES(arpa/inet.h HAVE_ARPA_INET_H)
 CHECK_INCLUDE_FILES(netinet/in.h HAVE_NETINET_IN_H)
 CHECK_INCLUDE_FILES(netinet/tcp.h HAVE_NETINET_TCP_H)
-CHECK_SYMBOL_EXISTS(getaddrinfo "netdb.h" "sys/socket.h" "winsock2.h" "ws2tcpip.h" HAVE_GETADDRINFO_H)

-SET(CMAKE_EXTRA_INCLUDE_FILES "arpa/inet.h" "netdb.h" "winsock2.h" "sys/socket.h")
+SET(CMAKE_EXTRA_INCLUDE_FILES "arpa/inet.h")

 	CHECK_TYPE_SIZE(in_addr_t DEF_SIZEOF_IN_ADDR_T)
 	if(DEF_SIZEOF_IN_ADDR_T)
@@ -68,6 +67,9 @@
 	if(DEF_SIZEOF_SOCKLEN_T)
 	set(HAVE_SOCKLEN_T 1)
 	endif(DEF_SIZEOF_SOCKLEN_T)
+
+        CHECK_FUNCTION_EXISTS(getaddrinfo HAVE_GETADDRINFO_H)
+
 SET(CMAKE_EXTRA_INCLUDE_FILES)


ENH: Update ITK to latest rc 4.3 version.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -75,11 +75,13 @@
       -DITK_USE_REVIEW:BOOL=ON
       -DKWSYS_USE_MD5:BOOL=ON # Required by SlicerExecutionModel
       -DUSE_WRAP_ITK:BOOL=OFF ## HACK:  QUICK CHANGE
+      -DITK_USE_SYSTEM_DCMTK:BOOL=OFF
+      -DModule_ITKIODCMTK:BOOL=OFF
       ${FFTWF_FLAGS}
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 2823c65d64f92f4e3cef8bae078271b336c68a6f) #2012-11-29
+  set(${proj}_GIT_TAG 57011fe11b3106a9c03185c2af18c1ed197224c5) #2012-12-15
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- KTp/Logger/plugins/tplogger/ktploggerplugin_tplogger.desktop.cmake
+++ KTp/Logger/plugins/tplogger/ktploggerplugin_tplogger.desktop.cmake
@@ -2,7 +2,7 @@
 Name=Telepathy Logger plugin
 Name[bs]=Telepathy dnevnički dodatak
 Name[ca]=Connector de registre del Telepathy
-Name[ca@valencia]=Connector de registre del Telepathy
+Name[ca@valencia]=Connector de registre de Telepathy
 Name[cs]=Modul záznamů Telepathy
 Name[da]=Logger-plugin til Telepathy
 Name[de]=Telepathy-Protokollmodul
@@ -42,7 +42,7 @@
 Comment=Provides integration with Telepathy Logger
 Comment[bs]=Obavlja integraciju s Telepathy dnevnikom
 Comment[ca]=Aquest connector proporciona integració amb l'enregistrador del Telepathy
-Comment[ca@valencia]=Este connector proporciona integració amb l'enregistrador del Telepathy
+Comment[ca@valencia]=Este connector proporciona integració amb l'enregistrador de Telepathy
 Comment[cs]=Poskytuje integraci se zaznamenáváním Telepathy
 Comment[da]=Giver integration med Telepathy Logger
 Comment[de]=Stellt Integration mit Telepathy-Protokollen zur Verfügung


--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -39,6 +39,7 @@
 Name[sv]=Gstreamer
 Name[uk]=GStreamer
 Name[x-test]=xxGStreamerxx
+Name[zh_CN]=GStreamer

 Comment=Phonon GStreamer backend
 Comment[ca]=Dorsal GStreamer del Phonon
@@ -70,3 +71,4 @@
 Comment[sv]=Phonon Gstreamer-gränssnitt
 Comment[uk]=Модуль використання GStreamer у Phonon
 Comment[x-test]=xxPhonon GStreamer backendxx
+Comment[zh_CN]=Phonon GStreamer 后端