updated qwt find macro

updated qwt find macro

--- cmake/FindQwt5.cmake
+++ cmake/FindQwt5.cmake
@@ -1,106 +1,106 @@
 # Find the Qwt 5.x includes and library, either the version linked to Qt3 or the version linked to Qt4
 #
 # On Windows it makes these assumptions:
-#    - the Qwt DLL is where the other DLLs for Qt are (QT_DIR\bin) or in the path
-#    - the Qwt .h files are in QT_DIR\include\Qwt or in the path
-#    - the Qwt .lib is where the other LIBs for Qt are (QT_DIR\lib) or in the path
+# - the Qwt DLL is where the other DLLs for Qt are (QT_DIR\bin) or in the path
+# - the Qwt .h files are in QT_DIR\include\Qwt or in the path
+# - the Qwt .lib is where the other LIBs for Qt are (QT_DIR\lib) or in the path
 #
 # Qwt5_INCLUDE_DIR - where to find qwt.h if Qwt
 # Qwt5_Qt4_LIBRARY - The Qwt5 library linked against Qt4 (if it exists)
 # Qwt5_Qt3_LIBRARY - The Qwt5 library linked against Qt4 (if it exists)
-# Qwt5_Qt4_FOUND   - Qwt5 was found and uses Qt4
-# Qwt5_Qt3_FOUND   - Qwt5 was found and uses Qt3
-# Qwt5_FOUND       - Set to TRUE if Qwt5 was found (linked either to Qt3 or Qt4)
+# Qwt5_Qt4_FOUND - Qwt5 was found and uses Qt4
+# Qwt5_Qt3_FOUND - Qwt5 was found and uses Qt3
+# Qwt5_FOUND - Set to TRUE if Qwt5 was found (linked either to Qt3 or Qt4)

 # Copyright (c) 2007, Pau Garcia i Quiles, <pgquiles@elpauer.org>
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
 #
-# Redistribution and use is allowed according to the terms of the BSD license.
-# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+# 1. Redistributions of source code must retain the copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#

-# Condition is "(A OR B) AND C", CMake does not support parentheses but it evaluates left to right
 IF(Qwt5_Qt4_LIBRARY OR Qwt5_Qt3_LIBRARY AND Qwt5_INCLUDE_DIR)
     SET(Qwt5_FIND_QUIETLY TRUE)
 ENDIF(Qwt5_Qt4_LIBRARY OR Qwt5_Qt3_LIBRARY AND Qwt5_INCLUDE_DIR)

 IF(NOT QT4_FOUND)
-    FIND_PACKAGE( Qt4 REQUIRED QUIET)
+    FIND_PACKAGE( Qt4 REQUIRED QUIET )
 ENDIF(NOT QT4_FOUND)

 IF( QT4_FOUND )
+
     # Is Qwt5 installed? Look for header files
-    FIND_PATH(Qwt5_INCLUDE_DIR qwt.h
-              PATHS
-              ${QT_INCLUDE_DIR}
-              /usr/local/qwt/include
-              /usr/local/include
-              /usr/include/qwt
-              /usr/include
-              ${QWT_INCLUDES}
-              PATH_SUFFIXES
-              qwt
-              qwt5
-              qwt-qt4
-              qwt5-qt4
-              qwt-qt3
-              qwt5-qt3
-              include
-              qwt/include
-              qwt5/include
-              qwt-qt4/include
-              qwt5-qt4/include
-              qwt-qt3/include
-              qwt5-qt3/include
-              ENV PATH)
+    FIND_PATH( Qwt5_INCLUDE_DIR qwt.h
+    PATHS ${QT_INCLUDE_DIR} /usr/local/qwt/include /usr/local/include /usr/include/qwt /usr/include
+    PATH_SUFFIXES qwt qwt5 qwt-qt4 qwt5-qt4 qwt-qt3 qwt5-qt3 include qwt/include qwt5/include qwt-qt4/include qwt5-qt4/include qwt-qt3/include qwt5-qt3/include ENV PATH)

     # Find Qwt version
     IF( Qwt5_INCLUDE_DIR )
-        FILE( READ ${Qwt5_INCLUDE_DIR}/qwt_global.h QWT_GLOBAL_H )
-        STRING( REGEX MATCH "#define *QWT_VERSION *(0x05*)" QWT_IS_VERSION_5 ${QWT_GLOBAL_H})
+    FILE( READ ${Qwt5_INCLUDE_DIR}/qwt_global.h QWT_GLOBAL_H )
+    STRING( REGEX MATCH "#define *QWT_VERSION *(0x05*)" QWT_IS_VERSION_5 ${QWT_GLOBAL_H})

-        IF( QWT_IS_VERSION_5 )
-        STRING(REGEX REPLACE ".*#define[\\t\\ ]+QWT_VERSION_STR[\\t\\ ]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" "\\1" Qwt_VERSION "${QWT_GLOBAL_H}")
+    IF( QWT_IS_VERSION_5 )
+    STRING(REGEX REPLACE ".*#define[\\t\\ ]+QWT_VERSION_STR[\\t\\ ]+\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" "\\1" Qwt_VERSION "${QWT_GLOBAL_H}")

-        # Find Qwt5 library linked to Qt4
-        FIND_LIBRARY( Qwt5_Qt4_TENTATIVE_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt5 qwt
-            PATHS
-            /usr/local/qwt/lib
-            /usr/local/lib
-            /usr/lib
-            ${QT_LIBRARY_DIR}
-            ${QWT_LIBRARY_DIR}
-            )
-        IF( UNIX AND NOT CYGWIN)
-            IF( Qwt5_Qt4_TENTATIVE_LIBRARY )
-                EXECUTE_PROCESS( COMMAND "ldd" ${Qwt5_Qt4_TENTATIVE_LIBRARY} OUTPUT_VARIABLE Qwt_Qt4_LIBRARIES_LINKED_TO )
-                STRING( REGEX MATCH "QtCore" Qwt5_IS_LINKED_TO_Qt4 ${Qwt_Qt4_LIBRARIES_LINKED_TO})
-                IF( Qwt5_IS_LINKED_TO_Qt4 )
-                    SET( Qwt5_Qt4_LIBRARY ${Qwt5_Qt4_TENTATIVE_LIBRARY} )
-                    SET( Qwt5_Qt4_FOUND TRUE )
-                    IF (NOT Qwt5_FIND_QUIETLY)
-                        MESSAGE( STATUS "Found Qwt: ${Qwt5_Qt4_LIBRARY}" )
-                    ENDIF (NOT Qwt5_FIND_QUIETLY)
-                ENDIF( Qwt5_IS_LINKED_TO_Qt4 )
-            ENDIF( Qwt5_Qt4_TENTATIVE_LIBRARY )
-        ELSE( UNIX AND NOT CYGWIN)
-        # Assumes qwt.dll is in the Qt dir
-            SET( Qwt5_Qt4_LIBRARY ${Qwt5_Qt4_TENTATIVE_LIBRARY} )
-            SET( Qwt5_Qt4_FOUND TRUE )
-            IF (NOT Qwt5_FIND_QUIETLY)
-                MESSAGE( STATUS "Found Qwt version ${Qwt_VERSION} linked to Qt4" )
-            ENDIF (NOT Qwt5_FIND_QUIETLY)
-        ENDIF( UNIX AND NOT CYGWIN)
+    # Find Qwt5 library linked to Qt4
+    FIND_LIBRARY( Qwt5_Qt4_TENTATIVE_LIBRARY NAMES qwt5-qt4 qwt-qt4 qwt5 qwt PATHS /usr/local/qwt/lib /usr/local/lib /usr/lib ${QT_LIBRARY_DIR})
+    IF( UNIX AND NOT CYGWIN)
+    IF( Qwt5_Qt4_TENTATIVE_LIBRARY )
+    IF( NOT APPLE )
+    EXECUTE_PROCESS( COMMAND "ldd" ${Qwt5_Qt4_TENTATIVE_LIBRARY} OUTPUT_VARIABLE Qwt_Qt4_LIBRARIES_LINKED_TO )
+    ENDIF( NOT APPLE )
+    IF( APPLE )
+    EXECUTE_PROCESS( COMMAND "otool" "-L" ${Qwt5_Qt4_TENTATIVE_LIBRARY} OUTPUT_VARIABLE Qwt_Qt4_LIBRARIES_LINKED_TO )
+    ENDIF( APPLE )
+    STRING( REGEX MATCH "QtCore" Qwt5_IS_LINKED_TO_Qt4 ${Qwt_Qt4_LIBRARIES_LINKED_TO})
+    IF( Qwt5_IS_LINKED_TO_Qt4 )
+    SET( Qwt5_Qt4_LIBRARY ${Qwt5_Qt4_TENTATIVE_LIBRARY} )
+    SET( Qwt5_Qt4_FOUND TRUE )
+    IF (NOT Qwt5_FIND_QUIETLY)
+    MESSAGE( STATUS "Found Qwt: ${Qwt5_Qt4_LIBRARY}" )
+    ENDIF (NOT Qwt5_FIND_QUIETLY)
+    ENDIF( Qwt5_IS_LINKED_TO_Qt4 )
+    ENDIF( Qwt5_Qt4_TENTATIVE_LIBRARY )
+    ELSE( UNIX AND NOT CYGWIN)
+    # Assumes qwt.dll is in the Qt dir
+    SET( Qwt5_Qt4_LIBRARY ${Qwt5_Qt4_TENTATIVE_LIBRARY} )
+    SET( Qwt5_Qt4_FOUND TRUE )
+    IF (NOT Qwt5_FIND_QUIETLY)
+    MESSAGE( STATUS "Found Qwt version ${Qwt_VERSION} linked to Qt4" )
+    ENDIF (NOT Qwt5_FIND_QUIETLY)
+    ENDIF( UNIX AND NOT CYGWIN)

-        ENDIF( QWT_IS_VERSION_5 )

-        IF( Qwt5_Qt4_FOUND OR Qwt5_Qt3_FOUND )
-            SET( Qwt5_FOUND TRUE )
-        ENDIF( Qwt5_Qt4_FOUND OR Qwt5_Qt3_FOUND )
+    ENDIF( QWT_IS_VERSION_5 )

-        MARK_AS_ADVANCED( Qwt5_INCLUDE_DIR Qwt5_Qt4_LIBRARY Qwt5_Qt3_LIBRARY )
+    IF( Qwt5_Qt4_FOUND OR Qwt5_Qt3_FOUND )
+    SET( Qwt5_FOUND TRUE )
+    ENDIF( Qwt5_Qt4_FOUND OR Qwt5_Qt3_FOUND )
+
+    MARK_AS_ADVANCED( Qwt5_INCLUDE_DIR Qwt5_Qt4_LIBRARY Qwt5_Qt3_LIBRARY )
     ENDIF( Qwt5_INCLUDE_DIR )

-       IF (NOT Qwt5_FOUND AND Qwt5_FIND_REQUIRED)
-              MESSAGE(FATAL_ERROR "Could not find Qwt 5.x")
-       ENDIF (NOT Qwt5_FOUND AND Qwt5_FIND_REQUIRED)
+    IF (NOT Qwt5_FOUND AND Qwt5_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "Could not find Qwt 5.x")
+    ENDIF (NOT Qwt5_FOUND AND Qwt5_FIND_REQUIRED)

 ENDIF( QT4_FOUND )


Installing libRootExtra.a

Installing libRootExtra.a

--- cmake/FindROOT.cmake
+++ cmake/FindROOT.cmake
@@ -326,6 +326,9 @@
                 set_target_properties(RootExtra PROPERTIES COMPILE_FLAGS "${LIBXML2_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR}")
                 set_target_properties(RootExtra PROPERTIES LINKER_LANGUAGE CXX)
                 target_link_libraries(RootExtra ${ROOT_LIBDIR}/libfreetype.a ${ROOT_LIBDIR}/libpcre.a ${ROOT_LIBDIR}/liblzma.a ${LIBXML2_LIBRARIES} ${OPENSSL_LIBRARIES})
+		install(TARGETS RootExtra
+		  ARCHIVE DESTINATION lib
+		  LIBRARY DESTINATION lib)
             else()
                 message(FATAL_ERROR "OpenSSL not found. Coould not generate the static RootExtra. Please install Openssl")
             endif()


warn about clang 3.0

warn about clang 3.0

--- cmake/VcMacros.cmake
+++ cmake/VcMacros.cmake
@@ -307,6 +307,9 @@
       set(Vc_XOP_INTRINSICS_BROKEN true)
    elseif(Vc_COMPILER_IS_CLANG)
       # for now I don't know of any arguments I want to pass. -march and stuff is tried by OptimizeForArchitecture...
+      if(Vc_CLANG_VERSION VERSION_EQUAL "3.0")
+         UserWarning("Clang 3.0 has serious issues to compile Vc code and will most likely crash when trying to do so.\nPlease update to a recent clang version.")
+      endif()

       # disable these warnings because clang shows them for function overloads that were discarded via SFINAE
       vc_add_compiler_flag(Vc_DEFINITIONS "-Wno-local-type-template-args")


fix some info.plist related  Xcode build system warnings

--- cmake/fips_osx.cmake
+++ cmake/fips_osx.cmake
@@ -121,7 +121,8 @@
                 "    <key>CFBundleVersion</key>\n"
                 "    <string>1</string>\n"
                 "    <key>LSMinimumSystemVersion</key>\n"
-                "    <string>\${MACOSX_DEPLOYMENT_TARGET}</string>\n"
+                # NOT A BUG:
+                "    <string>\$(MACOSX_DEPLOYMENT_TARGET)</string>\n"
                 "    <key>NSHighResolutionCapable</key>\n"
                 "    <true/>\n"
                 "    <key>NSAppTransportSecurity</key>\n"
@@ -150,16 +151,19 @@
                 set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${FIPS_IOS_TEAMID})
             endif()
         endif()
-        set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "fips.${target}")
         set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_ICON_FILE "Icon.png")
         if (FIPS_MACOS)
             set_target_properties(${target} PROPERTIES XCODE_SCHEME_WORKING_DIRECTORY "${FIPS_PROJECT_DEPLOY_DIR}")
         endif()
         if (${CMAKE_GENERATOR} STREQUAL "Xcode")
+            set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER \${PRODUCT_NAME})
+            set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER \${PRODUCT_NAME})
             set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_EXECUTABLE_NAME \${EXECUTABLE_NAME})
             set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_PRODUCT_NAME \${PRODUCT_NAME})
             set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME \${PRODUCT_NAME})
         else()
+            set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "${target}")
+            set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_GUI_IDENTIFIER "${target}")
             set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_PRODUCT_NAME "${target}")
             set_target_properties(${target} PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "${target}")
         endif()


Remove command that copies not nonexistent testdata directory (#1350)

--- cmake/unittest.cmake
+++ cmake/unittest.cmake
@@ -86,11 +86,3 @@
 endfunction(AddTest)

 addtest(TARGET ${UT_NAME} SOURCES ${${UT_NAME}_src} LIBS ${${UT_NAME}_libs})
-
-set(TEST_DATA_SRC ${ONNX_ROOT}/onnx/test/cpp/testdata)
-set(TEST_DATA_DES $<TARGET_FILE_DIR:${UT_NAME}>/testdata)
-
-# Copy test data from source to destination.
-add_custom_command(TARGET ${UT_NAME} POST_BUILD
-                   COMMAND ${CMAKE_COMMAND} -E copy_directory ${TEST_DATA_SRC}
-                           ${TEST_DATA_DES})


Enable PRE_TEST test discovery

Enable PRE_TEST test discovery

Previously the test binaries have been called during build time to
enumerate all the included tests. This call is now deferred to just
before starting the tests.

The previous way made problems with test binaries like
OrbitQtTests.exe which need extra libraries like Qt5Core.dll.
Qt libraries are copied to the binary directory as part of the build
which means we can't be sure that these are available when executing
the test binary for lisitng. It has been working so far due to pure
luck, but it breaks when a race condition.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -18,7 +18,8 @@

   gtest_discover_tests(${TEST_TARGET}
     XML_OUTPUT_DIR "${TESTRESULTS_DIRECTORY}"
-    PROPERTIES ${ARGS_PROPERTIES})
+    PROPERTIES ${ARGS_PROPERTIES}
+    DISCOVERY_MODE PRE_TEST)
 endfunction()

 if(NOT TARGET GTest::GTest)


Rewrite of FindMKL.cmake: find include directory

--- modules/FindMKL.cmake
+++ modules/FindMKL.cmake
@@ -1,31 +1,232 @@
-# - Try to find MKL
-# Once done this will define
-#  MKL_FOUND - System has MKL
-#  MKL_INCLUDE_DIRS - The mkl include directories
-#  MKL_LIBRARIES - The libraries needed to use mkl
-if(NOT MKL_FOUND)
-
-  if(EXISTS $ENV{MKL_PATH})
-    set(HINT_DIRS ${MKL_DIRECTORY} $ENV{MKL_PATH}/include)
-  endif(EXISTS $ENV{MKL_PATH})
-  find_path(MKL_INCLUDE_DIRS NAMES mkl_dfti.h HINTS ${HINT_DIRS} ${MKL_INCLUDE_DIRS})
-
-  if(DEFINED ENV{MKL_LINK_LINE})
-    set(MKL_LIBRARIES "$ENV{MKL_LINK_LINE}")
-  elseif(NOT "$ENV{BLASDIR}" STREQUAL "" AND NOT "$ENV{BLASLIB}" STREQUAL "")
-    set(MKL_LIBRARIES "-L$ENV{BLASDIR} -l$ENV{BLASLIB}")
-  endif()
-
-  include(FindPackageHandleStandardArgs)
-
-  find_package(Threads REQUIRED)
-  set(MKL_LIBRARIES "${MKL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}")
-  # handle the QUIETLY and REQUIRED arguments and set FFTW3_FOUND to TRUE
-  # if all listed variables are TRUE
-  find_package_handle_standard_args(MKL  DEFAULT_MSG MKL_LIBRARIES MKL_INCLUDE_DIRS)
-
-  mark_as_advanced(MKL_INCLUDE_DIRS MKL_LIBRARIES)
-  set(MKL_SINGLE_FOUND TRUE)
-  set(MKL_DOUBLE_FOUND TRUE)
-  set(MKL_LONGDOUBLE_FOUND FALSE)
-endif(NOT MKL_FOUND)
+#.rst:
+# FindMKL
+# ---------
+#
+# Find Intel Math Kernel Library include dirs and libraries
+#
+# Use this module by invoking find_package with the form::
+#
+#   find_package(MKL
+#     [version] [EXACT]      # Minimum or EXACT version e.g. 11.3.2,
+#     [REQUIRED]             # Fail with error if MKL is not found
+#     [COMPONENTS <libs>...] # Cluster libraries by their canonical name e.g.
+#     )                      # "ScaLAPACK" for "libmkl_scalapack_{i}lp64.{a,so}"
+#
+# This module finds headers and requested cluster libraries.  Results are
+# reported in variables::
+#
+#   MKL_FOUND            - True if headers and requested libraries were found
+#   MKL_DEFINITIONS      - MKL compiler definitions
+#   MKL_INCLUDE_DIRS     - MKL include directories
+#   MKL_LIBRARIES        - MKL libraries to be linked
+#   MKL_<C>_FOUND        - True if cluster library <C> was found (<C> is
+#                          upper-case)
+#   MKL_<C>_LIBRARY      - Libraries to link for cluster library <C> (may
+#                          include target_link_libraries debug/optimized
+#                          keywords)
+#   MKL_VERSION          - INTEL_MKL_VERSION value from mkl.h
+#   MKL_MAJOR_VERSION    - MKL major version number (X in X.y.z)
+#   MKL_MINOR_VERSION    - MKL minor version number (Y in x.Y.z)
+#   MKL_PATCH_VERSION    - MKL patch version number (Z in x.y.Z)
+#
+# This module reads hints about search locations from variables::
+#
+#   MKL_ROOT             - Preferred installation prefix
+#    (or MKLROOT)
+#   MKL_INCLUDEDIR       - Preferred include directory e.g. <prefix>/include
+#   MKL_LIBRARYDIR       - Preferred library directory e.g. <prefix>/lib
+#   MKL_ADDITIONAL_VERSIONS -
+#
+# and saves search results persistently in CMake cache entries::
+#
+#   MKL_INCLUDE_DIR         - Directory containing MKL headers
+#   MKL_LIBRARY_DIR         - Directory containing MKL libraries
+#   MKL_<C>_LIBRARY         - Component <C> library
+
+# This module first searches for mkl.h using the above hint variables (excluding
+# MKL_LIBRARYDIR) and saves the result in MKL_INCLUDE_DIR.  Then it searches for
+# appropriate interface libraries for the current architecture using dynamic or
+# static linking.  Finally it searches for requested cluster libraries using
+# the above hints (excluding MKL_INCLUDEDIR and MKL_ADDITIONAL_VERSIONS), "lib"
+# directories near MKL_INCLUDE_DIR, and the library name configuration settings
+# below.  It saves the library directories in MKL_LIBRARY_DIR and individual
+# library locations in MKL_<C>_LIBRARY.
+# When one changes settings used by previous searches in the same build
+# tree (excluding environment variables) this module discards previous
+# search results affected by the changes and searches again.
+#
+# MKL libraries come in many variants encoded in their file name.
+# Users or projects may tell this module which variant to find by
+# setting variables::
+#
+#   MKL_USE_STATIC_LIBS      - Set to ON to force the use of static libraries.
+#                              Default is OFF.
+#   MKL_XEON_PHI_USAGE_MODEL - Set to "none", "native", "automatic" or
+#                              "compiler" to select how the MKL is to use any
+#                              Xeon Phi coprocessors found.  Default is "none".
+#   MKL_THREADING            - Set to "Sequential", "OpenMP" or "TBB"  to select
+#                              threading library.  Default is "OpenMP".
+#   MKL_OPENMP               - Set to "Intel", "GNU" or "PGI" to use vendor
+#                              OpenMP library.  This setting only has an effect
+#                              when MPI_THREADING is"OpenMP".  Default is
+#                              "Intel".
+#   MKL_MESSAGE_PASSING      - Set to "Intel", "MPICH", "MPICH2", "OpenMPI" or
+#                              "SGI" to use a specific MPI library.  This
+#                              setting only has an effect when COMPONENTS is
+#                              non-empty.  Default is "Intel".
+#
+# Some combinations of the variants above do not exist (e.g. Using GNU compilers
+# with PGI OpenMP and SGI Message Passing).  In order to support future versions
+# of MKL these combinations are not checked for in CMake and will result in a
+# generic "library not found" error.
+#
+# Example to find MKL headers only::
+#
+#   find_package(MKL 11.3.2)
+#   if(MKL_FOUND)
+#     include_directories(${MKL_INCLUDE_DIRS})
+#     add_executable(foo foo.cc)
+#   endif()
+#
+#
+# Example to find MKL headers and some *static* libraries::
+#
+#   set(MKL_USE_STATIC_LIBS        ON) # only find static libs
+#   find_package(MKL 11.3.2 COMPONENTS CDFT ScaLAPACK ...)
+#   if(MKL_FOUND)
+#     include_directories(${MKL_INCLUDE_DIRS})
+#     link_directories(${MKL_LIBRARY_DIRS})
+#     add_executable(foo foo.cc)
+#     target_link_libraries(foo ${MKL_LIBRARIES})
+#   endif()
+#
+
+# Set defaults
+if (NOT DEFINED MKL_USE_STATIC_LIBS)
+  set(MKL_USE_STATIC_LIBS OFF)
+endif()
+if (NOT DEFINED MKL_XEON_PHI_USAGE_MODEL)
+  set(MKL_XEON_PHI_USAGE_MODEL none)
+endif()
+if (NOT DEFINED MKL_THREADING)
+  set(MKL_THREADING OpenMP)
+endif()
+if (NOT DEFINED MKL_OPENMP)
+  set(MKL_OPENMP Intel)
+endif()
+if (NOT DEFINED MKL_MESSAGE_PASSING)
+  set(MKL_MESSAGE_PASSING Intel)
+endif()
+
+# Detect changes in used variables.
+# Compares the current variable value with the last one.
+# In short form:
+# v != v_LAST                      -> CHANGED = 1
+# v is defined, v_LAST not         -> CHANGED = 1
+# v is not defined, but v_LAST is  -> CHANGED = 1
+# otherwise                        -> CHANGED = 0
+# CHANGED is returned in variable named ${changed_var}
+macro(_MKL_CHANGE_DETECT changed_var)
+  set(${changed_var} 0)
+  foreach(v ${ARGN})
+    if(DEFINED _MKL_COMPONENTS_SEARCHED)
+      if(${v})
+        if(_${v}_LAST)
+          string(COMPARE NOTEQUAL "${${v}}" "${_${v}_LAST}" _${v}_CHANGED)
+        else()
+          set(_${v}_CHANGED 1)
+        endif()
+      elseif(_${v}_LAST)
+        set(_${v}_CHANGED 1)
+      endif()
+      if(_${v}_CHANGED)
+        set(${changed_var} 1)
+      endif()
+    else()
+      set(_${v}_CHANGED 0)
+    endif()
+  endforeach()
+endmacro()
+
+# Collect environment variable inputs as hints.  Do not consider changes.
+foreach(v MKLROOT MKL_ROOT MKL_INCLUDEDIR MKL_LIBRARYDIR)
+  set(_env $ENV{${v}})
+  if(_env)
+    file(TO_CMAKE_PATH "${_env}" _ENV_${v})
+  else()
+    set(_ENV_${v} "")
+  endif()
+endforeach()
+if(NOT _ENV_MKL_ROOT AND _ENV_MKLROOT)
+  set(_ENV_MKL_ROOT "${_ENV_MKLROOT}")
+endif()
+
+# Collect inputs and cached results.  Detect changes since the last run.
+if(NOT MKL_ROOT AND MKLROOT)
+  set(MKL_ROOT "${MKLROOT}")
+endif()
+set(_MKL_VARS_DIR
+  MKL_ROOT
+  MKL_NO_SYSTEM_PATHS
+  )
+
+# ------------------------------------------------------------------------
+#  Search for MKL include DIR
+# ------------------------------------------------------------------------
+
+set(_MKL_VARS_INC MKL_INCLUDEDIR MKL_INCLUDE_DIR MKL_ADDITIONAL_VERSIONS)
+_MKL_CHANGE_DETECT(_MKL_CHANGE_INCDIR ${_MKL_VARS_DIR} ${_MKL_VARS_INC})
+# Clear MKL_INCLUDE_DIR if it did not change but other input affecting the
+# location did.  We will find a new one based on the new inputs.
+if(_MKL_CHANGE_INCDIR AND NOT _MKL_INCLUDE_DIR_CHANGED)
+  unset(MKL_INCLUDE_DIR CACHE)
+endif()
+
+if(NOT MKL_INCLUDE_DIR)
+  set(_MKL_INCLUDE_SEARCH_DIRS "")
+  if(MKL_INCLUDEDIR)
+    list(APPEND _MKL_INCLUDE_SEARCH_DIRS ${MKL_INCLUDEDIR})
+  elseif(_ENV_MKL_INCLUDEDIR)
+    list(APPEND _MKL_INCLUDE_SEARCH_DIRS ${_ENV_MKL_INCLUDEDIR})
+  endif()
+
+  if(MKL_ROOT)
+    list(APPEND _MKL_INCLUDE_SEARCH_DIRS ${MKL_ROOT}/include ${MKL_ROOT})
+  elseif(_ENV_MKL_ROOT)
+    list(APPEND _MKL_INCLUDE_SEARCH_DIRS ${_ENV_MKL_ROOT}/include ${_ENV_MKL_ROOT})
+  endif()
+
+  if(MKL_NO_SYSTEM_PATHS)
+    list(APPEND _MKL_INCLUDE_SEARCH_DIRS NO_CMAKE_SYSTEM_PATH)
+  else()
+    list(APPEND _MKL_INCLUDE_SEARCH_DIRS PATHS
+      "C:/Program Files (x86)/IntelSWTools"
+      /opt/intel
+      )
+  endif()
+
+  # Create a list of directories to search.
+  # MKL comes bundled with Intel Composer/Parallel Studio and has a different
+  # version to that of the package it comes bundled with (e.g. Composer XE
+  # 2016.1.111 bundles MKL 11.3.2)
+  # TODO: Prepend new versions to this as they are released (they must remain
+  # sorted in descending order).
+  set(_MKL_PACKAGE_KNOWN_VERSIONS ${MKL_PACKAGE_ADDITIONAL_VERSIONS}
+      "2016.1.111" "2016.0.109" "2015.2.164")
+  foreach(v ${_MKL_PACKAGE_KNOWN_VERSIONS})
+    if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+      list(APPEND _MKL_PATH_SUFFIXES "compilers_and_libraries_${v}/windows/mkl/include")
+    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+      list(APPEND _MKL_PATH_SUFFIXES "compilers_and_libraries_${v}/mac/mkl/include")
+    elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+      list(APPEND _MKL_PATH_SUFFIXES "compilers_and_libraries_${v}/linux/mkl/include")
+    endif()
+    list(APPEND _MKL_PATH_SUFFIXES "composer_xe_${v}/mkl/include")
+  endforeach()
+
+  find_path(MKL_INCLUDE_DIR
+    NAMES         mkl.h
+    HINTS         ${_MKL_INCLUDE_SEARCH_DIRS}
+    PATH_SUFFIXES ${_MKL_PATH_SUFFIXES}
+  )
+endif()


Fix rebasing error: PYTHON_EXECUTABLE was changed to Python_EXECUTABLE

--- cmake/BioDynaMo.cmake
+++ cmake/BioDynaMo.cmake
@@ -121,7 +121,7 @@
       set(BDM_OUT_OF_SRC_ARG "--out-of-source")
     endif()
     add_custom_command(OUTPUT "${BDM_DICT_FILE}"
-                       COMMAND ${PYTHON_EXECUTABLE} ${BDM_DICT_BIN_PATH}/bdm-dictionary ${BDM_OUT_OF_SRC_ARG} --output ${BDM_DICT_FILE} --include-dirs ${INCLUDE_DIRS} --headers ${ARG_HEADERS}
+                       COMMAND ${Python_EXECUTABLE} ${BDM_DICT_BIN_PATH}/bdm-dictionary ${BDM_OUT_OF_SRC_ARG} --output ${BDM_DICT_FILE} --include-dirs ${INCLUDE_DIRS} --headers ${ARG_HEADERS}
                        DEPENDS ${ARG_HEADERS} ${BDM_DICT_BIN_PATH}/bdm-dictionary)
     # generate shared library
     add_library(${TARGET} SHARED ${ARG_SOURCES} ${DICT_FILE}.cc ${BDM_DICT_FILE})


Suppress soem useless output

Suppress soem useless output

--- cmake/ClangTidy.cmake
+++ cmake/ClangTidy.cmake
@@ -114,7 +114,7 @@
     foreach(SOURCE ${SOURCES})
         string(MAKE_C_IDENTIFIER "${SOURCE}" tidy_file)
         add_custom_target(tidy-${TARGET}-${tidy_file}
-            COMMAND ${CLANG_TIDY_COMMAND} ${SOURCE}
+            COMMAND ${CLANG_TIDY_COMMAND} -quiet ${SOURCE}
             WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
             COMMENT "clang-tidy: Running clang-tidy on target ${SOURCE}..."
         )


Remove cap-data from the TPLs

Remove cap-data from the TPLs

--- cmake/SetupTPLs.cmake
+++ cmake/SetupTPLs.cmake
@@ -1,11 +1,3 @@
-#### cap-data ################################################################
-if(NOT DEFINED CAP_DATA_DIR)
-    message(FATAL_ERROR "\n"
-        "You must pass a flag -DCAP_DATA_DIR=/path/to/dir/with/meshes\n"
-        "to cmake.\n"
-        )
-endif()
-
 #### Message Passing Interface (MPI) #########################################
 find_package(MPI REQUIRED)


r9597/sofa : Cmake: added "add_definitions()" to AddCompilerDefinitions()

Former-commit-id: 93fbe8713ca37a47fc384cfc716043a7258740f6

--- cmake/functions.cmake
+++ cmake/functions.cmake
@@ -426,6 +426,7 @@

 # AddCompilerDefinitions(compiler_definition0 [compiler_definition1 [...]])
 function(AddCompilerDefinitions)
+	add_definitions("-D${ARGV}")
 	set(COMPILER_DEFINES ${COMPILER_DEFINES} ${ARGV} PARENT_SCOPE)
 endfunction()


small fix

small fix

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@4908 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsLibrary.cmake
+++ cmake/gsLibrary.cmake
@@ -83,10 +83,10 @@
     find_program( patch_cmd "patch" REQUIRED )
     add_definitions( -DFORTRAN_INTEGER_TYPE=int -DHAVE_CMATH -DHAVE_CSTDIO)
     target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_IpOpt} dl )
-    #target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Blas} )
-    #target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Lapack} )
-    #target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Mumps} )
-    #target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Metis} )
+    target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Blas} )
+    target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Lapack} )
+    target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Mumps} )
+    target_link_libraries(${PROJECT_NAME} ${IpOpt_LIB_Metis} )
   endif()

   IF (GISMO_EXTRA_DEBUG AND DBGHELP_FOUND)


exclude global_tests from CPACK_COMPONENTS_ALL

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -54,11 +54,15 @@
 macro(PCL_CPACK_MAKE_COMPS_OPTS _var _current)
     set(_comps_list)
     foreach(_ss ${PCL_SUBSYSTEMS})
-        PCL_GET_SUBSYS_STATUS(_status ${_ss})
-        if(_status)
-            set(_comps_list "${_comps_list} ${_ss}")
-            PCL_CPACK_ADD_COMP_INFO(${_var} ${_ss})
-        endif(_status)
+        if("${_ss}" STREQUAL "global_tests")
+            # we don't install global_tests
+        else("${_ss}" STREQUAL "global_tests")
+            PCL_GET_SUBSYS_STATUS(_status ${_ss})
+            if(_status)
+                set(_comps_list "${_comps_list} ${_ss}")
+                PCL_CPACK_ADD_COMP_INFO(${_var} ${_ss})
+            endif(_status)
+        endif("${_ss}" STREQUAL "global_tests")
     endforeach(_ss)
     set(${_var} "${${_var}}\nset(CPACK_COMPONENTS_ALL${_comps_list})\n")
 endmacro(PCL_CPACK_MAKE_COMPS_OPTS)


Fix MSVC build linker flags for sanitizer builds

--- cmake/sanitizer.cmake
+++ cmake/sanitizer.cmake
@@ -16,6 +16,7 @@
 endif()
 set(CMAKE_C_FLAGS_THREADSAN "${CMAKE_C_FLAGS_DEBUG} ${THREAD_SAN_FLAGS}" CACHE INTERNAL "Flags used by the C compiler during thread sanitizer builds." FORCE)
 set(CMAKE_CXX_FLAGS_THREADSAN "${CMAKE_CXX_FLAGS_DEBUG} ${THREAD_SAN_FLAGS}" CACHE INTERNAL "Flags used by the C++ compiler during thread sanitizer builds." FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_THREADSAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" "Flags used for the linker during thread sanitizer builds" FORCE)

 # Address sanitizer
 set(ADDR_SAN_FLAGS "-fsanitize=address")
@@ -29,6 +30,7 @@
 endif()
 set(CMAKE_C_FLAGS_ADDRSAN "${CMAKE_C_FLAGS_DEBUG} ${ADDR_SAN_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls" CACHE INTERNAL "Flags used by the C compiler during address sanitizer builds." FORCE)
 set(CMAKE_CXX_FLAGS_ADDRSAN "${CMAKE_CXX_FLAGS_DEBUG} ${ADDR_SAN_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls" CACHE INTERNAL "Flags used by the C++ compiler during address sanitizer builds." FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_ADDRSAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" "Flags used for the linker during address sanitizer builds" FORCE)

 # Leak sanitizer
 set(LEAK_SAN_FLAGS "-fsanitize=leak")
@@ -39,6 +41,7 @@
 endif()
 set(CMAKE_C_FLAGS_LEAKSAN "${CMAKE_C_FLAGS_DEBUG} ${LEAK_SAN_FLAGS} -fno-omit-frame-pointer" CACHE INTERNAL "Flags used by the C compiler during leak sanitizer builds." FORCE)
 set(CMAKE_CXX_FLAGS_LEAKSAN "${CMAKE_CXX_FLAGS_DEBUG} ${LEAK_SAN_FLAGS} -fno-omit-frame-pointer" CACHE INTERNAL "Flags used by the C++ compiler during leak sanitizer builds." FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_LEAKSAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" "Flags used for the linker during leak sanitizer builds" FORCE)

 # Undefined behavior sanitizer
 set(UDEF_SAN_FLAGS "-fsanitize=undefined")
@@ -49,6 +52,7 @@
 endif()
 set(CMAKE_C_FLAGS_UDEFSAN "${CMAKE_C_FLAGS_DEBUG} ${UDEF_SAN_FLAGS}" CACHE INTERNAL "Flags used by the C compiler during undefined behaviour sanitizer builds." FORCE)
 set(CMAKE_CXX_FLAGS_UDEFSAN "${CMAKE_CXX_FLAGS_DEBUG} ${UDEF_SAN_FLAGS}" CACHE INTERNAL "Flags used by the C++ compiler during undefined behaviour sanitizer builds." FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_UDEFSAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" "Flags used for the linker during undefined behaviour sanitizer builds" FORCE)

 # All sanitizer (without thread sanitizer)
 if(NOT ALL_SAN_FLAGS STREQUAL "")
@@ -63,3 +67,4 @@

 set(CMAKE_C_FLAGS_ALLSAN "${CMAKE_C_FLAGS_DEBUG} ${ALL_SAN_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls" CACHE INTERNAL "Flags used by the C compiler during most possible sanitizer builds." FORCE)
 set(CMAKE_CXX_FLAGS_ALLSAN "${CMAKE_CXX_FLAGS_DEBUG} ${ALL_SAN_FLAGS} -fno-omit-frame-pointer -fno-optimize-sibling-calls" CACHE INTERNAL "Flags used by the C++ compiler during most possible sanitizer builds." FORCE)
+set(CMAKE_SHARED_LINKER_FLAGS_ALLSAN "${CMAKE_SHARED_LINKER_FLAGS_DEBUG}" "Flags used for the linker during most possible sanitizer builds" FORCE)


[cmake] Fix uninitialized variable (#6091)

This was dropped accidentally in previous changes.

--- build_tools/cmake/iree_mlir_benchmark_suite.cmake
+++ build_tools/cmake/iree_mlir_benchmark_suite.cmake
@@ -91,6 +91,7 @@
   iree_check_lists_have_same_size(_RULE_MODULE_NAMES _RULE_FUNCTION_INPUTS)

   # Loop over all modules and their sources to create targets.
+  list(LENGTH _RULE_MODULE_NAMES _MODULE_NAMES_COUNT)
   math(EXPR _MAX_INDEX "${_MODULE_NAMES_COUNT} - 1")
   foreach(_INDEX RANGE 0 "${_MAX_INDEX}")
     # Generate all benchmarks to the root build directory. This helps for


[ROCm] fix hip test to update LD_LIBRARY_PATH, test=develop (#40153)

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -651,6 +651,7 @@
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cpu_deterministic=true)
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_init_allocated_mem=true)
     set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT FLAGS_cudnn_deterministic=true)
+    set_property(TEST ${TARGET_NAME} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/python/paddle/libs:$LD_LIBRARY_PATH")
   endif()
 endfunction(hip_test)


Add the property to set the host file instead of relying on cotire to auto-pick the first file from SOURCES

--- cmake/cotire.cmake
+++ cmake/cotire.cmake
@@ -3028,11 +3028,21 @@
 		if (_targetUsePCH)
 			cotire_make_pch_file_path(${_language} ${_target} _pchFile)
 			if (_pchFile)
-				# first file in _sourceFiles is passed as the host file
+				# check for user provided host file
+				get_property(_hostFile TARGET ${_target} PROPERTY COTIRE_${_language}_HOST_FILE_INIT)
+				if (_hostFile)
+					# Make sure _sourceFiles contains _hostFile and remove it
+					list(FIND _sourceFiles ${_hostFile} _hostFileIndex)
+					if (_hostFileIndex EQUAL -1)
+						message(FATAL_ERROR "cotire: Provided host file ${_hostFile} is not a source file of the target ${_target}")
+					endif()
+					list(REMOVE_AT _sourceFiles ${_hostFileIndex})
+				endif()
+				# first file in _sourceFiles is passed as the host file if _hostFile is not defined
 				cotire_setup_pch_file_compilation(
-					${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
+					${_language} ${_target} "${_targetConfigScript}" "${_prefixFile}" "${_pchFile}" ${_hostFile} ${_sourceFiles})
 				cotire_setup_pch_file_inclusion(
-					${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_sourceFiles})
+					${_language} ${_target} ${_wholeTarget} "${_prefixFile}" "${_pchFile}" ${_hostFile} ${_sourceFiles})
 			endif()
 		elseif (_prefixHeaderFiles)
 			# user provided prefix header must be included unconditionally
@@ -4084,6 +4094,16 @@
 	)

 	define_property(
+		TARGET PROPERTY "COTIRE_<LANG>_HOST_FILE_INIT"
+		BRIEF_DOCS "User provided host file to be used instead of the automatically selected one."
+		FULL_DOCS
+			"If set, cotire will use the given source file as the host file to generate the precompiled header."
+			"If not set, cotire will use the first target source file as the host file to generate the precompiled header."
+			"The property can be set to a user provided host file (e.g., stdafx.cpp)."
+			"Defaults to empty."
+	)
+
+	define_property(
 		TARGET PROPERTY "COTIRE_UNITY_LINK_LIBRARIES_INIT" INHERITED
 		BRIEF_DOCS "Define strategy for setting up unity target's link libraries."
 		FULL_DOCS


prevent physfs from building tests (#43)

--- cmake/physfs.cmake
+++ cmake/physfs.cmake
@@ -13,6 +13,7 @@
     CMAKE_ARGS
     "-DPHYSFS_INTERNAL_ZLIB=TRUE"
     "-DPHYSFS_BUILD_STATIC=TRUE" "-DPHYSFS_BUILD_SHARED=FALSE"
+    "-DPHYSFS_BUILD_TEST=FALSE"
     "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=<BINARY_DIR>"
     "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=<BINARY_DIR>"
     "-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE=<BINARY_DIR>"


search python module, and install it if needed

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -140,58 +140,55 @@
 	COMMAND ${CMAKE_COMMAND} -E echo ")" >> setup.py
 	VERBATIM)

+function(search_python_module MODULE_NAME)
+	execute_process(
+		COMMAND ${PYTHON_EXECUTABLE} -c "import ${MODULE_NAME}; print(${MODULE_NAME}.__version__)"
+		RESULT_VARIABLE _RESULT
+		OUTPUT_VARIABLE MODULE_VERSION
+		ERROR_QUIET
+		OUTPUT_STRIP_TRAILING_WHITESPACE
+		)
+	if(${_RESULT} STREQUAL "0")
+		message(STATUS "Found python module: ${MODULE_NAME} (found version \"${MODULE_VERSION}\")")
+	else()
+		message(WARNING "Can't find python module \"${MODULE_NAME}\", install it using pip...")
+		execute_process(
+			COMMAND ${PYTHON_EXECUTABLE} -m pip install ${MODULE_NAME}
+			OUTPUT_STRIP_TRAILING_WHITESPACE
+			)
+	endif()
+endfunction()
+
 # Look for python module wheel
-execute_process(
-	COMMAND ${PYTHON_EXECUTABLE} "-c" "import wheel"
-	RESULT_VARIABLE _RESULT
-	ERROR_QUIET
-	OUTPUT_STRIP_TRAILING_WHITESPACE
-	)
-set(BDIST_WHEEL "")
-if(${_RESULT} STREQUAL "0")
-	message(STATUS "Found python module: wheel")
-	set(BDIST_WHEEL "bdist_wheel")
-else()
-	message(WARNING "Can't find python module: wheel")
-endif()
+search_python_module(wheel)

 # Main Target
 add_custom_target(bdist ALL
 	DEPENDS setup.py Py${PROJECT_NAME}_proto
 	COMMAND ${CMAKE_COMMAND} -E remove_directory dist
-	COMMAND ${PYTHON_EXECUTABLE} setup.py bdist ${BDIST_WHEEL}
+	COMMAND ${PYTHON_EXECUTABLE} setup.py bdist bdist_wheel
 	)

 # Test
 if(BUILD_TESTING)
 	# Look for python module virtualenv
-	execute_process(
-		COMMAND ${PYTHON_EXECUTABLE} "-c" "import virtualenv"
-		RESULT_VARIABLE _RESULT
-		ERROR_QUIET
-		OUTPUT_STRIP_TRAILING_WHITESPACE
-		)
-	if(${_RESULT} STREQUAL "0")
-		message(STATUS "Found python module: virtualenv")
-		# Testing using a vitual environment
-		set(VENV_EXECUTABLE ${PYTHON_EXECUTABLE} -m virtualenv)
-		set(VENV_DIR ${CMAKE_BINARY_DIR}/venv)
-		if(WIN32)
-			set(VENV_BIN_DIR "${VENV_DIR}\\Scripts")
-		else()
-			set(VENV_BIN_DIR ${VENV_DIR}/bin)
-		endif()
-		# make a virtualenv to install our python package in it
-		add_custom_command(TARGET bdist POST_BUILD
-			COMMAND ${VENV_EXECUTABLE} -p ${PYTHON_EXECUTABLE} ${VENV_DIR}
-			COMMAND ${VENV_BIN_DIR}/python setup.py install
-			COMMAND ${CMAKE_COMMAND} -E copy
-			${CMAKE_CURRENT_SOURCE_DIR}/test.py.in
-			${VENV_DIR}/test.py
-			WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-		# run the tests within the virtualenv
-		add_test(pytest_venv ${VENV_BIN_DIR}/python ${VENV_DIR}/test.py)
+	search_python_module(virtualenv)
+	# Testing using a vitual environment
+	set(VENV_EXECUTABLE ${PYTHON_EXECUTABLE} -m virtualenv)
+	set(VENV_DIR ${CMAKE_BINARY_DIR}/venv)
+	if(WIN32)
+		set(VENV_BIN_DIR "${VENV_DIR}\\Scripts")
 	else()
-		message(WARNING "Can't find python module: virtualenv")
+		set(VENV_BIN_DIR ${VENV_DIR}/bin)
 	endif()
+	# make a virtualenv to install our python package in it
+	add_custom_command(TARGET bdist POST_BUILD
+		COMMAND ${VENV_EXECUTABLE} -p ${PYTHON_EXECUTABLE} ${VENV_DIR}
+		COMMAND ${VENV_BIN_DIR}/python setup.py install
+		COMMAND ${CMAKE_COMMAND} -E copy
+		${CMAKE_CURRENT_SOURCE_DIR}/test.py.in
+		${VENV_DIR}/test.py
+		WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+	# run the tests within the virtualenv
+	add_test(pytest_venv ${VENV_BIN_DIR}/python ${VENV_DIR}/test.py)
 endif()


Remove unnecessary -O3 complier flag

Remove unnecessary -O3 complier flag

--- cmake/check.cmake
+++ cmake/check.cmake
@@ -150,6 +150,6 @@

 if (CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
 	set (COMPILER_IS_GCC 1)
-	set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wall -Wextra" CACHE STRING "" FORCE)
-	set (CMAKE_CXX__FLAGS "${CMAKE_CXX_FLAGS} -O3 -Wall -Wextra" CACHE STRING "" FORCE)
+	set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra" CACHE STRING "" FORCE)
+	set (CMAKE_CXX__FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" CACHE STRING "" FORCE)
 endif ()


refine (#28366)

refine (#28366)

--- cmake/cupti.cmake
+++ cmake/cupti.cmake
@@ -8,6 +8,7 @@
         PATHS ${CUPTI_ROOT} ${CUPTI_ROOT}/include
         $ENV{CUPTI_ROOT} $ENV{CUPTI_ROOT}/include
         ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI/include
+        ${CUDA_TOOLKIT_ROOT_DIR}/targets/x86_64-linux/include
         NO_DEFAULT_PATH
         )

@@ -27,6 +28,7 @@
         $ENV{CUPTI_ROOT}/lib64
         $ENV{CUPTI_ROOT}/lib
         /usr/lib
+        ${CUDA_TOOLKIT_ROOT_DIR}/targets/x86_64-linux/lib64
         ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI/lib64)
 find_library(CUPTI_LIBRARY NAMES libcupti.so libcupti.dylib # libcupti_static.a
        PATHS ${CUPTI_CHECK_LIBRARY_DIRS} ${CUPTI_INCLUDE_DIR} ${__libpath_hist}


Minor CMake coding style change of version_numbers function.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -2,33 +2,33 @@

 # ----------------------------------------------------------------------------
 ## Extract version numbers from version string.
-function (version_numbers VERSION MAJOR MINOR PATCH)
-  if (VERSION MATCHES "([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?(rc[1-9][0-9]*|[a-z]+)?")
+function (version_numbers version major minor patch)
+  if (version MATCHES "([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?(rc[1-9][0-9]*|[a-z]+)?")
     if (CMAKE_MATCH_1)
-      set (VERSION_MAJOR ${CMAKE_MATCH_1})
+      set (_major ${CMAKE_MATCH_1})
     else ()
-      set (VERSION_MAJOR 0)
+      set (_major 0)
     endif ()
     if (CMAKE_MATCH_2)
-      set (VERSION_MINOR ${CMAKE_MATCH_2})
-      string (REGEX REPLACE "^\\." "" VERSION_MINOR "${VERSION_MINOR}")
+      set (_minor ${CMAKE_MATCH_2})
+      string (REGEX REPLACE "^\\." "" _minor "${_minor}")
     else ()
-      set (VERSION_MINOR 0)
+      set (_minor 0)
     endif ()
     if (CMAKE_MATCH_3)
-      set (VERSION_PATCH ${CMAKE_MATCH_3})
-      string (REGEX REPLACE "^\\." "" VERSION_PATCH "${VERSION_PATCH}")
+      set (_patch ${CMAKE_MATCH_3})
+      string (REGEX REPLACE "^\\." "" _patch "${_patch}")
     else ()
-      set (VERSION_PATCH 0)
+      set (_patch 0)
     endif ()
   else ()
-    set (VERSION_MAJOR 0)
-    set (VERSION_MINOR 0)
-    set (VERSION_PATCH 0)
+    set (_major 0)
+    set (_minor 0)
+    set (_patch 0)
   endif ()
-  set ("${MAJOR}" "${VERSION_MAJOR}" PARENT_SCOPE)
-  set ("${MINOR}" "${VERSION_MINOR}" PARENT_SCOPE)
-  set ("${PATCH}" "${VERSION_PATCH}" PARENT_SCOPE)
+  set ("${major}" "${_major}" PARENT_SCOPE)
+  set ("${minor}" "${_minor}" PARENT_SCOPE)
+  set ("${patch}" "${_patch}" PARENT_SCOPE)
 endfunction ()

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


Testing: Gracefully handle failing to find git for test data download (#3212)

Fixes #3208

--- src/cmake/testing.cmake
+++ src/cmake/testing.cmake
@@ -343,10 +343,14 @@
             if (NOT _ogtd_BRANCH)
                 set (_ogtd_BRANCH master)
             endif ()
-            find_package (Git REQUIRED)
-            execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth 1
-                                    ${_ogtd_REPO} -b ${_ogtd_BRANCH}
-                                    ${CMAKE_BINARY_DIR}/testsuite/${name})
+            find_package (Git)
+            if (Git_FOUND AND GIT_EXECUTABLE)
+                execute_process(COMMAND ${GIT_EXECUTABLE} clone --depth 1
+                                        ${_ogtd_REPO} -b ${_ogtd_BRANCH}
+                                        ${CMAKE_BINARY_DIR}/testsuite/${name})
+            else ()
+                message (WARNING "Could not find Git executable, could not download test data from ${_ogtd_REPO}")
+            endif ()
         endif ()
     else ()
         message (STATUS "Missing test data ${name}")


Bugfix

Bugfix

git-svn-id: fbbf69ba8011aca0e74e1c67904b11cccbdbe66b@27152 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/checks/check_for_cxx_features.cmake
+++ deal.II/cmake/checks/check_for_cxx_features.cmake
@@ -26,23 +26,23 @@
 #
 # See if there is a compiler flag to enable C++11 features
 #
-FOREACH(test_flag
-    "-std=c++11"
-    "-std=c++0x"
-    )
-
-  CHECK_CXX_COMPILER_FLAG("${test_flag}" DEAL_II_HAVE_CXX11_FLAG)
-
-  IF(DEAL_II_HAVE_CXX11_FLAG)
-    # We have found a CXX11_FLAG that the compiler understands
-    SET(DEAL_II_CXX11_FLAG "${test_flag}")
-    BREAK()
-  ELSE()
-    # Remove test result from cache and try the next flag in the list
-    UNSET(DEAL_II_HAVE_CXX11_FLAG CACHE)
-  ENDIF()
-
-ENDFOREACH()
+IF(NOT DEFINED DEAL_II_HAVE_CXX11_FLAG)
+  FOREACH(test_flag
+      "-std=c++11"
+      "-std=c++0x"
+      )
+    CHECK_CXX_COMPILER_FLAG("${test_flag}" DEAL_II_HAVE_CXX11_FLAG)
+
+    IF(DEAL_II_HAVE_CXX11_FLAG)
+      # We have found a CXX11_FLAG that the compiler understands
+      SET(DEAL_II_CXX11_FLAG "${test_flag}")
+      BREAK()
+    ELSE()
+      # Remove test result from cache and try the next flag in the list
+      UNSET(DEAL_II_HAVE_CXX11_FLAG CACHE)
+    ENDIF()
+  ENDFOREACH()
+ENDIF()

 IF(DEAL_II_HAVE_CXX11_FLAG)


Clean ruby builds versions and bundler versions during upgrades.

--- build/cmake/ruby.cmake
+++ build/cmake/ruby.cmake
@@ -3,7 +3,8 @@
   ruby
   URL https://cache.ruby-lang.org/pub/ruby/2.2/ruby-${RUBY_VERSION}.tar.bz2
   URL_HASH SHA256=${RUBY_HASH}
-  CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${INSTALL_PREFIX_EMBEDDED} --enable-load-relative --disable-install-doc
+  CONFIGURE_COMMAND rm -rf <BINARY_DIR> && mkdir -p <BINARY_DIR> # Clean across version upgrades
+    COMMAND <SOURCE_DIR>/configure --prefix=${INSTALL_PREFIX_EMBEDDED} --enable-load-relative --disable-install-doc
   INSTALL_COMMAND make install DESTDIR=${STAGE_DIR}
 )

@@ -13,5 +14,6 @@
   DOWNLOAD_COMMAND cd <SOURCE_DIR> && curl -OL https://rubygems.org/downloads/bundler-${BUNDLER_VERSION}.gem
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
-  INSTALL_COMMAND env PATH=${STAGE_EMBEDDED_DIR}/bin:$ENV{PATH} gem install <SOURCE_DIR>/bundler-${BUNDLER_VERSION}.gem --no-rdoc --no-ri --env-shebang --local
+  INSTALL_COMMAND env PATH=${STAGE_EMBEDDED_DIR}/bin:$ENV{PATH} gem uninstall bundler --all --executables
+    COMMAND env PATH=${STAGE_EMBEDDED_DIR}/bin:$ENV{PATH} gem install <SOURCE_DIR>/bundler-${BUNDLER_VERSION}.gem --no-rdoc --no-ri --env-shebang --local
 )


Fix cpp/cmake/FindqpOASES.cmake

Fix cpp/cmake/FindqpOASES.cmake

--- cpp/cmake/FindqpOASES.cmake
+++ cpp/cmake/FindqpOASES.cmake
@@ -30,7 +30,7 @@
   PATHS ${qpOASES_PREFIX} ${qpOASES_PREFIX}/include
   )
 FIND_LIBRARY(qpOASES_LIBRARY
-  NAMES libqpOASES.so
+  NAMES qpOASES
   PATHS ${qpOASES_PREFIX} ${qpOASES_PREFIX}/lib
   )


CMAKE_INSTALL_LIBDIR instead of LIBDIR

CMAKE_INSTALL_LIBDIR instead of LIBDIR

--- libcmime.pc.cmake
+++ libcmime.pc.cmake
@@ -1,10 +1,10 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${exec_prefix}/@LIBDIR@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
 includedir=${prefix}/include

 Name: libcmime
 Version: @CMIME_VERSION@
 Description: Lightweight library for parsing and createion of mime messages
 Libs: -L${libdir} -lcmime
-Cflags: -I${includedir}+Cflags: -I${includedir}


Fixed cmake installation of sip module

Fixed cmake installation of sip module

--- cmake/BALLMacros.cmake
+++ cmake/BALLMacros.cmake
@@ -217,10 +217,17 @@
 			GET_FILENAME_COMPONENT(LIBNAME "${LIB}" NAME_WE)
 			SET(DLLPATH "DLLPATH-NOTFOUND" CACHE STRING "" FORCE)
 			FIND_FILE(DLLPATH
-				NAMES  "${LIBNAME}.dll ${LIBNAME}.pyd"
+				NAMES  "${LIBNAME}.dll"
 				PATHS "${LIBPATH}"
 				PATH_SUFFIXES ../bin ../dlls
 			)
+			IF (NOT DLLPATH)
+				FIND_FILE(DLLPATH
+					NAMES  "${LIBNAME}.pyd"
+					PATHS "${LIBPATH}"
+					PATH_SUFFIXES ../bin ../dlls
+				)
+			ENDIF()
 			IF (DLLPATH)
 				IF (NEXT_LIB_IS_OPT)
 					LIST(APPEND ${RESULT_OPTIMZED} "${DLLPATH}")


check version number using newer cmake functionality, instead of kde macro

--- cmake/FindEigen2.cmake
+++ cmake/FindEigen2.cmake
@@ -8,8 +8,6 @@
 # Copyright (c) 2006, 2007 Montel Laurent, <montel@kde.org>
 # Copyright (c) 2008, 2009 Gael Guennebaud, <g.gael@free.fr>
 # Redistribution and use is allowed according to the terms of the BSD license.
-
-include(MacroEnsureVersion)

 if(NOT EIGEN2_MIN_VERSION)
   if(NOT Eigen2_FIND_VERSION_MAJOR)
@@ -36,7 +34,11 @@
   set(EIGEN2_MINOR_VERSION "${CMAKE_MATCH_1}")

   set(EIGEN2_VERSION ${EIGEN2_WORLD_VERSION}.${EIGEN2_MAJOR_VERSION}.${EIGEN2_MINOR_VERSION})
-  MACRO_ENSURE_VERSION( ${EIGEN2_MIN_VERSION} ${EIGEN2_VERSION} EIGEN2_VERSION_OK)
+  if(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+    set(EIGEN2_VERSION_OK FALSE)
+  else(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})
+    set(EIGEN2_VERSION_OK TRUE)
+  endif(${EIGEN2_VERSION} VERSION_LESS ${EIGEN2_MIN_VERSION})

   if(NOT EIGEN2_VERSION_OK)


Add missing cmake include for FindPackageHandleStandardArgs

--- cmake/FindGRPC++.cmake
+++ cmake/FindGRPC++.cmake
@@ -68,6 +68,7 @@
   PATHS ${GRPC_ROOT}/bin)
 mark_as_advanced(GRPCXX_PLUGIN_EXECUTABLE)

+include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(GRPC++ DEFAULT_MSG
   GRPC_INCLUDE_DIR GPR_LIBRARY GRPC_LIBRARY GRPCXX_LIBRARY GRPCXX_PLUGIN_EXECUTABLE)


cmake: disable support for clang until C++1z is covered in release

It's template argument deduction for class templates that wee need.

--- cmake/build/core.cmake
+++ cmake/build/core.cmake
@@ -27,17 +27,18 @@
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g2")

-# Check compiler
-# TODO: update the required compiler versions.
+# Check compiler support
 if(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
-  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4.0")
-    message_colored(FATAL_ERROR "Compiler not supported (Requires clang-3.4+ or gcc-5.1+)" 31)
-  else()
-    message_colored(STATUS "Using supported compiler ${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}" 32)
-  endif()
+  message_colored(FATAL_ERROR "Clang isn't supported yet; see <https://bugs.archlinux.org/index.php?do=details&task_id=54276>" 31)
+
+  #if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4.0")
+  #  message_colored(FATAL_ERROR "Compiler not supported (Requires clang-3.4+ or gcc-5.1+)" 31)
+  #else()
+  #  message_colored(STATUS "Using supported compiler ${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}" 32)
+  #endif()
 elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
-  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.1.0")
-    message_colored(FATAL_ERROR "Compiler not supported (Requires clang-3.4+ or gcc-5.1+)" 31)
+  if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.1.1")
+    message_colored(FATAL_ERROR "Compiler not supported (Requires gcc-7.1.1+)" 31)
   else()
     message_colored(STATUS "Using supported compiler ${CMAKE_CXX_COMPILER_ID}-${CMAKE_CXX_COMPILER_VERSION}" 32)
   endif()


modified gtest integration marking external gtest targets EXCLUDE_FROM_ALL to only trigger them when gtests are built (fixes #137)

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -80,6 +80,8 @@
       # add CMakeLists.txt from gtest dir
       set(_CATKIN_GTEST_BINARY_DIR ${CMAKE_BINARY_DIR}/gtest)
       add_subdirectory(${_CATKIN_GTEST_BASE_DIR} ${_CATKIN_GTEST_BINARY_DIR})
+      # mark gtest targets with EXCLUDE_FROM_ALL to only build when tests are built which depend on them
+      set_target_properties(gtest gtest_main PROPERTIES EXCLUDE_FROM_ALL 1)
       get_filename_component(_CATKIN_GTEST_INCLUDE_DIR ${_CATKIN_GTEST_INCLUDE} PATH)
       # set from-source variables
       set(GTEST_FROM_SOURCE_FOUND TRUE CACHE INTERNAL "")


Pick up our libraries on Darwin.

Pick up our libraries on Darwin.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -155,7 +155,7 @@

 if (DARWIN)
   add_definitions(-DLL_DARWIN=1)
-  set(CMAKE_LD_FLAGS "-headerpad_max_install_names")
+  set(CMAKE_LD_FLAGS "-headerpad_max_install_names -search_paths_first")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-branch")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-branch")
 endif (DARWIN)


Remove -mlong-branch flag from darwin builds. Since we don't support ppc, this isn't really an issue and causes build failures on newer compilers.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -236,7 +236,7 @@
   add_definitions(-DLL_DARWIN=1)
   set(CMAKE_CXX_LINK_FLAGS "-Wl,-no_compact_unwind -Wl,-headerpad_max_install_names,-search_paths_first")
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS}")
-  set(DARWIN_extra_cstar_flags "-mlong-branch -g")
+  set(DARWIN_extra_cstar_flags "-g")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags}")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  ${DARWIN_extra_cstar_flags}")
   # NOTE: it's critical that the optimization flag is put in front.


add -DFMT_HEADER_ONLY

add -DFMT_HEADER_ONLY

--- src/common.cmake
+++ src/common.cmake
@@ -14,6 +14,8 @@
 add_compile_options(-fobjc-arc)
 add_compile_options(-fmodules)

+add_definitions(-DFMT_HEADER_ONLY)
+
 # Version

 file(READ ${CMAKE_CURRENT_LIST_DIR}/../version KARABINER_VERSION)


Remove PY2_ONLY CTest flag

Remove PY2_ONLY CTest flag

--- tests/PythonTests.cmake
+++ tests/PythonTests.cmake
@@ -52,16 +52,11 @@
 function(add_python_test case)
   set(name "server_${case}")

-  set(_options BIND_SERVER PY2_ONLY RUN_SERIAL)
+  set(_options BIND_SERVER RUN_SERIAL)
   set(_args DBNAME PLUGIN SUBMODULE PACKAGE)
   set(_multival_args RESOURCE_LOCKS TIMEOUT EXTERNAL_DATA REQUIRED_FILES COVERAGE_PATHS
                      ENVIRONMENT SETUP_DATABASE)
   cmake_parse_arguments(fn "${_options}" "${_args}" "${_multival_args}" ${ARGN})
-
-  if(fn_PY2_ONLY AND PYTHON_VERSION MATCHES "^3")
-    message(STATUS " !!! Not adding test ${name}, cannot run in python version ${PYTHON_VERSION}.")
-    return()
-  endif()

   if(fn_PLUGIN)
     set(name "server_${fn_PLUGIN}.${case}")


GSL cblas still finds it way via TOOLS, removed that part

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -41,14 +41,6 @@

 set(VOTCA_TOOLS_LIBRARIES "${VOTCA_TOOLS_LIBRARY}" )

-find_path(VOTCA_TOOLS_HAS_GSL votca/tools/votca_gsl_boost_ublas_matrix_prod.h HINTS ${VOTCA_TOOLS_INCLUDE_DIR} ${PC_VOTCA_TOOLS_INCLUDE_DIRS})
-if (VOTCA_TOOLS_HAS_GSL)
-  #due to include <gsl.h> in votca_gsl_boost_ublas_matrix_prod.h
-  find_package(GSL REQUIRED)
-  set(VOTCA_TOOLS_INCLUDE_DIRS "${VOTCA_TOOLS_INCLUDE_DIR};${GSL_INCLUDE_DIR}")
-  set(VOTCA_TOOLS_LIBRARIES "${VOTCA_TOOLS_LIBRARIES};${GSL_LIBRARIES}" )
-endif (VOTCA_TOOLS_HAS_GSL)
-
 include(FindPackageHandleStandardArgs)
 # handle the QUIETLY and REQUIRED arguments and set VOTCA_TOOLS_FOUND to TRUE
 # if all listed variables are TRUE


disabled -Wno-class-memaccess warnings for GCC

--- common/cmake/gnu.cmake
+++ common/cmake/gnu.cmake
@@ -22,6 +22,7 @@
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")                       # enables most warnings
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security")  # enables string format vulnerability warnings
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-class-memaccess")        # disables clearing an object of type ‘XXX’ with no trivial copy-assignment; use assignment or value-initialization instead
 IF (NOT APPLE)
   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")                       # enables support for more secure position independent execution
 ENDIF()


Removed DL_LIB and UTIL_LIB from CMake file.

--- CMake/hoomd/HOOMDCommonLibsSetup.cmake
+++ CMake/hoomd/HOOMDCommonLibsSetup.cmake
@@ -4,18 +4,6 @@

 ################################
 ## Define common libraries used by every target in HOOMD
-
-## An update to to CentOS5's python broke linking of the hoomd exe. According
-## to an ancient post online, adding -lutil fixed this in python 2.2
-set(ADDITIONAL_LIBS "")
-if (UNIX AND NOT APPLE)
-    find_library(UTIL_LIB util /usr/lib)
-    find_library(DL_LIB dl /usr/lib)
-    set(ADDITIONAL_LIBS ${UTIL_LIB} ${DL_LIB})
-    if (DL_LIB AND UTIL_LIB)
-    mark_as_advanced(UTIL_LIB DL_LIB)
-    endif (DL_LIB AND UTIL_LIB)
-endif (UNIX AND NOT APPLE)

 option(ENABLE_TBB "Enable support for Threading Building Blocks (TBB)" off)


Add multiarch paths

Add multiarch paths

--- CMakeModules/FindFFMPEG.cmake
+++ CMakeModules/FindFFMPEG.cmake
@@ -7,50 +7,50 @@
 # Find header files
 FIND_PATH(
   AVCODEC_INCLUDE_DIR libavcodec/avcodec.h
-  /usr/include /usr/local/include /opt/local/include
+  /usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
 )
 FIND_PATH(
   AVFORMAT_INCLUDE_DIR libavformat/avformat.h
-  /usr/include /usr/local/include /opt/local/include
+  /usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
 )
 FIND_PATH(
   AVDEVICE_INCLUDE_DIR libavdevice/avdevice.h
-  /usr/include /usr/local/include /opt/local/include
+  /usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
 )
 FIND_PATH(
   AVUTIL_INCLUDE_DIR libavutil/avutil.h
-  /usr/include /usr/local/include /opt/local/include
+  /usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
 )
 FIND_PATH(
   SWSCALE_INCLUDE_DIR libswscale/swscale.h
-  /usr/include /usr/local/include /opt/local/include
+  /usr/include /usr/local/include /opt/local/include /usr/include/x86_64-linux-gnu
 )

 # Find Library files
 FIND_LIBRARY(
   AVCODEC_LIBRARY
   NAMES avcodec
-  PATH /usr/lib /usr/local/lib /opt/local/lib
+  PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
 )
 FIND_LIBRARY(
   AVFORMAT_LIBRARY
   NAMES avformat
-  PATH /usr/lib /usr/local/lib /opt/local/lib
+  PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
 )
 FIND_LIBRARY(
   AVDEVICE_LIBRARY
   NAMES avdevice
-  PATH /usr/lib /usr/local/lib /opt/local/lib
+  PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
 )
 FIND_LIBRARY(
   AVUTIL_LIBRARY
   NAMES avutil
-  PATH /usr/lib /usr/local/lib /opt/local/lib
+  PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
 )
 FIND_LIBRARY(
   SWSCALE_LIBRARY
   NAMES swscale
-  PATH /usr/lib /usr/local/lib /opt/local/lib
+  PATH /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu
 )

 IF( EXISTS "${AVUTIL_INCLUDE_DIR}/libavutil/pixdesc.h" )


Upgrade Go to 1.1.2

Upgrade Go to 1.1.2

--- golang.cmake
+++ golang.cmake
@@ -11,9 +11,9 @@
 include (BuildSupport)

 external_source (golang
-    1.1
-    go1.1.src.tar.gz
-    4933f6a2f3ec1ffb01b42fd88de03851
+    1.1.2
+    go1.1.2.src.tar.gz
+    705feb2246c8ddaf820d7e171f1430c5
     http://go.googlecode.com/files)

 message ("Installing ${golang_NAME} into build area: ${BUILDEM_DIR} ...")


Revert to go 1.4.2 until build system worked out

--- golang.cmake
+++ golang.cmake
@@ -11,10 +11,10 @@
 include (BuildSupport)

 external_source (golang
-    1.5.0
-    go1.5beta1.tar.gz
-    7ee7ccb6c6771b3df9b00a42dfb04345
-    https://github.com/golang/go/archive)
+    1.4.2
+    go1.4.2.src.tar.gz
+    907f85c8fa765d31f7f955836fec4049
+    https://storage.googleapis.com/golang)

 message ("Installing ${golang_NAME} into build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${golang_NAME}


Disable strict path checking in tomviz configure step

Tomviz by default checks if ParaView and ITK are compiled against the
same python.  Since the superbuild uses a pre-built ITK, the paths for
ITK will be different from the path to python in the superbuild and this
will fail.  This commit disables these checks for the superbuild as the
bundled ITK causes false positives on these checks and makes the build
fail.

--- projects/tomviz.cmake
+++ projects/tomviz.cmake
@@ -25,6 +25,7 @@
     -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
     -Dtomviz_data_DIR:PATH=${tomviz_data}
     -DTOMVIZ_DOWNLOAD_WEB:BOOL=ON
+    -DSKIP_PARAVIEW_ITK_PYTHON_CHECKS:BOOL=ON
     ${tomviz_extra_cmake_args}

   ENABLED_DEFAULT ON


Revert "Discover and fixup all executables before verifying the bundle on macOS"

This reverts commit 343d9f435f577543e8c1527d4d7886909659d1cd.

--- CMake/BundleUtilities.cmake
+++ CMake/BundleUtilities.cmake
@@ -883,7 +883,7 @@
       message(FATAL_ERROR "Command failed:\n ${msg}")
     endif()
   endif()
-
+
 endfunction()

@@ -969,22 +969,6 @@
     message("fixup_bundle: cleaning up...")
     clear_bundle_keys(keys)

-    # START OF T26976
-    # Discover and fix remaining executables (e.g. Python exec in Resources
-    # folder of Python.framework).
-    #
-    if(APPLE)
-      get_bundle_all_executables("${bundle}" file_list)
-      list(REMOVE_ITEM file_list "${app}" ${CFG_IGNORE_ITEM})
-      list(LENGTH file_list num_executables)
-      if(${num_executables} GREATER 0)
-        list(GET file_list 0 f)
-        message("fixup_bundle: fixing newly discovered executables ${f}...")
-        fixup_bundle("${f}" "" "${dirs}" IGNORE_ITEM ${CFG_IGNORE_ITEM} ${app})
-      endif()
-    endif()
-    # END OF T26976
-
     message("fixup_bundle: verifying...")
     verify_app("${app}" IGNORE_ITEM "${CFG_IGNORE_ITEM}")
   else()


Bug: Fix incorrect exception path being checked

The Package name is being passed to the ReportXINDEXResult functions have
underscores instead of spaces. If the underscores are not replaced, the
exceptions for the file will not be found. As is, the exception file for
the first error encountered will not be found due to the incorrect package
name.

Change the location of the replace command
to not just be after an exception was not found.  Instead place it just
before the foreach that searches the output.

OSEHRA-Id: http://issues.osehra.org/browse/OAT-73
Change-Id: Idb22f4a507edee3ebc84bd4aea0e483cbb83ad7c

--- CMake/CommonFunctions.cmake
+++ CMake/CommonFunctions.cmake
@@ -25,6 +25,7 @@
    if(ARGC GREATER 6)
      set(source_flag TRUE)
    endif()
+   string(REPLACE "_" " " PACKAGE_NAME ${PACKAGE_NAME})
    foreach (line ${OUTPUT})
       # the XINDEX will always check the integrity of the routine using checksum
       if(line MATCHES "^[A-Z0-9][^ ]+ +\\* \\* .*[cC]hecksum:.*")
@@ -49,7 +50,6 @@
           if(tag AND GREP_EXEC AND source_flag)
             string(REGEX MATCH "\\+[0-9]+" position ${line})
             string(STRIP ${tag} tag)
-            string(REPLACE "_" " " PACKAGE_NAME ${PACKAGE_NAME})
             execute_process(COMMAND ${GREP_EXEC} -n -h ^${tag}
                             "${ARGV6}/Packages/${PACKAGE_NAME}/Routines/${routine_name}.m"
                             OUTPUT_VARIABLE linematch)


updated messages

updated messages

--- cmake_compiler_settings/cmake/gcc_flags.cmake
+++ cmake_compiler_settings/cmake/gcc_flags.cmake
@@ -58,7 +58,7 @@
 # formatting
 add_compile_options(-Wformat=2 -Werror=format -Werror=format-security -Werror=format-extra-args)

-#exception safety
+# exception safety
 add_compile_options(-Werror=terminate)

 # operations on booleans
@@ -83,7 +83,7 @@

 option(EFFCXX "Enable Effective C++ Warnings (very noisy on correct c++11 code)"  OFF)
 if(EFFCXX)
-	message(" ===== Adding Effective C++ Warnings")
+	message(" ===== Enabled Effective C++ Warnings =====")
 	add_compile_options(-Weffc++)
 endif()

@@ -97,21 +97,21 @@
 # additional debug informations
 option(DEBUG_ITERATORS "Additional debug information" OFF)
 if(DEBUG_ITERATORS)
+    message(" ===== Enabled additional debug information for iterators =====")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC")
 endif()

-
 ##################################################################
 # sanitizers (checks made at runtime)
-# You can choose only one
+# You can choose only one(!)
 set(SanitizerValues "NONE;SANADD;SANUNDEF;SANTHREAD" CACHE STRING
 	"List of possible values for the sanitizers")
 set(SanValue "SANUNDEF" CACHE STRING
 	"SanValue chosen by the user at CMake configure time")
 set_property(CACHE SanValue PROPERTY STRINGS ${SanitizerValues})

-# not using add_compile_options since since needs flag also for linking
+# not using add_compile_options since since flag is also used by the linker
 if("${SanValue}" STREQUAL "SANADD")
 	message(" ===== Enable sanitizer for addresses ===== ")
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
@@ -132,17 +132,18 @@
 ##################################################################
 # mitigations
 # abort and provide some useful message instead of ignoring errors, crash at another random place or leave some vulnerability open
-option(FORTIFY "Enable fortify sources (already enabled in release mode)" OFF)
+option(FORTIFY "Enable fortify sources (already enabled for release target, also enables optimizations)" OFF)
 if(FORTIFY)
-	message(" ===== Enable fortify sources (always enabled in release mode) ===== ")
+	message(" ===== Enable fortify sources (always enabled for release target, also enables optimizations) ===== ")
 	add_definitions(-D_FORTIFY_SOURCE=2 -O2)
 endif()
-# add check if compiling with -O1, in that case we should use -D_FORTIFY_SOURCE=1...
+# FIXME: add check if compiling with -O1, in that case we should use -D_FORTIFY_SOURCE=1...
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D_FORTIFY_SOURCE=2") # =1 when using -O1..

-# not using add_compile_options since since needs flag also for linking
+# not using add_compile_options since since flag is also used by the linker
 option(RELRO "Enable full relro" OFF)
 if(RELRO)
+    message(" ===== Enabled full relro =====")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,relro,-z,now")
 else()
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,relro")
@@ -150,6 +151,7 @@

 option(STACK_PROTECTOR "Enable stack protector on all functions")
 if(STACK_PROTECTOR)
+    message(" ===== Enabling full stack protector =====")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all")
 else()
     if(CMAKE_CXX_COMPILER_VERSION GREATER_EQUAL 5)


OSX bundle: Change ParaView Plugin location pointer

We need to point to the ParaView Plugins/ directory for fixup_bundle to
correctly include Plugins .dylib in VeloView.app

--- Superbuild/Projects/apple/veloview.bundle.cmake
+++ Superbuild/Projects/apple/veloview.bundle.cmake
@@ -17,6 +17,6 @@
                \"\${CMAKE_INSTALL_PREFIX}/VeloView.app\"
                \"${install_location}/lib\"
                \"${SuperBuild_BINARY_DIR}/paraview/src/paraview-build/lib\"
-               \"${install_location}/plugins\")
+               \"${install_location}/Applications/paraview.app/Contents/Plugins\")
    "
    COMPONENT superbuild)


RemoteModule: Mosaic update git tag

RemoteModule: Mosaic update 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 279687c24f00fc75a009341f5cfe7cc691d657f6
+  GIT_TAG 5b180a274b731bfd366f731cb829797e6d1ec756
 )


Do the png fix for all platforms

Do the png fix for all platforms

--- deps/PNG/PNG.cmake
+++ deps/PNG/PNG.cmake
@@ -1,7 +1,3 @@
-set(_prefix_line "")
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    set(_prefix_line "-DPNG_PREFIX=prusaslicer_")
-endif()

 prusaslicer_add_cmake_project(PNG
     GIT_REPOSITORY https://github.com/glennrp/libpng.git
@@ -10,7 +6,7 @@
     CMAKE_ARGS
         -DPNG_SHARED=OFF
         -DPNG_STATIC=ON
-        ${_prefix_line}
+        -DPNG_PREFIX=prusaslicer_
         -DPNG_TESTS=OFF
 )


SVN_SILENT made messages (.desktop file)

--- vlc/vlc.desktop.cmake
+++ vlc/vlc.desktop.cmake
@@ -10,21 +10,5 @@
 InitialPreference=10

 Name=VLC
-Name[x-test]=xxVLCxx

 Comment=Phonon VLC backend
-Comment[el]=Σύστημα υποστήριξης Phonon του VLC
-Comment[et]=Phononi VLC taustaprogramm
-Comment[fr]=Système de gestion VLC pour Phonon
-Comment[ga]=Inneall VLC Phonon
-Comment[gl]=Infraestrutura de VLC para Phonon
-Comment[km]=កម្មវិធីខាងក្រោយរបស់ Phonon VLC
-Comment[nb]=Phonon VLC-motor
-Comment[nds]=Phonon-Hülpprogramm VLC
-Comment[nl]=VLC-backend (Phonon)
-Comment[pt]=Infra-estrutura do VLC para o Phonon
-Comment[pt_BR]=Infraestrutura Phonon VLC
-Comment[sv]=Phonon VLC-gränssnitt
-Comment[tr]=Phonon VLC arka ucu
-Comment[uk]=Сервер VLC Phonon
-Comment[x-test]=xxPhonon VLC backendxx


Bugfix: Unset a cached variable if package is unsuitable

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

--- deal.II/cmake/configure/configure_2_petsc.cmake
+++ deal.II/cmake/configure/configure_2_petsc.cmake
@@ -98,6 +98,7 @@
       UNSET(PETSC_INCLUDE_DIR_ARCH CACHE)
       UNSET(PETSC_INCLUDE_DIR_COMMON CACHE)
       UNSET(PETSC_LIBRARY CACHE)
+      UNSET(PETSC_PETSCVARIABLES CACHE)
       SET(PETSC_DIR "" CACHE PATH
         "An optional hint to a PETSc directory"
         )


Do not use /fp:fast when building a 64 bit Windows binary. MSVC will use SSE2 for math operations when building 64 bit. And that will lead to all kind of 'interesting' results.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -92,7 +92,7 @@
         /Oy-
         /Zc:wchar_t-
         /arch:AVX
-        /fp:fast
+#        /fp:fast
         )
   else (USE_AVX_OPTIMIZATION)
     add_definitions(
@@ -109,7 +109,7 @@
         /Oy-
         /Zc:wchar_t-
         /arch:SSE2
-        /fp:fast
+#        /fp:fast
         )
   endif (USE_AVX_OPTIMIZATION)
 # </FS:Ansariel> [AVX Optimization]
@@ -122,6 +122,13 @@
   # configure win32 API for windows XP+ compatibility
   set(WINVER "0x0501" CACHE STRING "Win32 API Target version (see http://msdn.microsoft.com/en-us/library/aa383745%28v=VS.85%29.aspx)")
   add_definitions("/DWINVER=${WINVER}" "/D_WIN32_WINNT=${WINVER}")
+
+  if( ND_BUILD64BIT_ARCH )
+   add_definitions("/wd4267 /DND_BUILD64BIT_ARCH" )
+  else( ND_BUILD64BIT_ARCH )
+   add_definitions("/fp:fast" )
+  endif( ND_BUILD64BIT_ARCH )
+
 endif (WINDOWS)


* man: add add_man_install cmake macro;

* man: add add_man_install cmake macro;

--- man/journal-man.cmake
+++ man/journal-man.cmake
@@ -15,5 +15,9 @@
 		ARGS -o ${name}.${section} ${XSLTPROC_OPT} ${CMAKE_SOURCE_DIR}/man/custom-man.xsl ${CMAKE_SOURCE_DIR}/man/${name}.xml
 		COMMENT "  XSLT\t${name}.${section}" VERBATIM)
 		list(APPEND ${var} ${name}.${section})
+	add_man_install(${name} ${section})
+endmacro(add_man)
+
+macro(add_man_install name section)
 	install(FILES ${PROJECT_BINARY_DIR}/${name}.${section} DESTINATION share/man/man${section})
-endmacro(add_man)
+endmacro(add_man_install)


Fixed a few areas where the Android changes broke the other compile targets.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -121,19 +121,21 @@
     #    message("${PROJECT_NAME} require ${library_name}")
     find_package(${library_name} REQUIRED)

-    if (IOS OR ANDROID)
-      target_link_libraries(${CURRENT_TARGET}
-        $<TARGET_FILE:${library_name}>
+    if (TARGET ${library_name})
+      if (IOS)
+        target_link_libraries(${CURRENT_TARGET}
+          $<TARGET_FILE:${library_name}>
+          )
+      else ()
+        target_link_libraries(${CURRENT_TARGET}
+          $<TARGET_LINKER_FILE:${library_name}>
+          )
+      endif ()
+
+      add_dependencies(${CURRENT_TARGET}
+        ${library_name}
         )
-    else ()
-      target_link_libraries(${CURRENT_TARGET}
-        $<TARGET_LINKER_FILE:${library_name}>
-        )
-    endif ()
-
-    add_dependencies(${CURRENT_TARGET}
-      ${library_name}
-      )
+    endif ()
   endforeach ()
 endmacro()


Also check transitive external project dependencies.

--- CMake/mitkFunctionAddExternalProject.cmake
+++ CMake/mitkFunctionAddExternalProject.cmake
@@ -54,8 +54,22 @@
   endif()

   if(_on)
+    # Get all transitive dependencies
+    set(_depends_all)
+    set(_depends_cur ${EP_DEPENDS})
+    set(_depends_new ${EP_DEPENDS})
+    while(NOT "${_depends_all}" STREQUAL "${_depends_cur}")
+      list(APPEND _depends_all ${_depends_new})
+      set(_depends_new_tmp )
+      foreach(dep ${_depends_new})
+        get_property(_dep_dep GLOBAL PROPERTY MITK_${dep}_DEPENDS)
+        list(APPEND _depends_new_tmp ${_dep_dep})
+      endforeach()
+      set(_depends_new ${_depends_new_tmp})
+      list(APPEND _depends_cur ${_depends_new})
+    endwhile()
     # Force dependencies to ON
-    foreach(dep ${EP_DEPENDS})
+    foreach(dep ${_depends_all})
       if(NOT MITK_USE_${dep})
         get_property(_depends_doc CACHE MITK_USE_${dep} PROPERTY HELPSTRING)
         get_property(_depends_type CACHE MITK_USE_${dep} PROPERTY TYPE)
@@ -83,4 +97,5 @@
   endif()
   set_property(GLOBAL PROPERTY MITK_${EP_NAME}_PACKAGE ${EP_PACKAGE})
   set_property(GLOBAL PROPERTY MITK_${EP_NAME}_COMPONENTS "${EP_COMPONENTS}")
+  set_property(GLOBAL PROPERTY MITK_${EP_NAME}_DEPENDS "${EP_DEPENDS}")
 endfunction()


Add new search path for OpenGL libraries on Ubuntu 11.10

--HG--
branch : v1-8

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -50,6 +50,8 @@
 # Set hardcoded path guesses for various platforms
 if (UNIX AND NOT OGRE_BUILD_PLATFORM_TEGRA2)
   set(OGRE_DEP_SEARCH_PATH ${OGRE_DEP_SEARCH_PATH} /usr/local)
+  # Ubuntu 11.10 has an inconvenient path to OpenGL libraries
+  set(OGRE_DEP_SEARCH_PATH ${OGRE_DEP_SEARCH_PATH} /usr/lib/${CMAKE_SYSTEM_PROCESSOR}-linux-gnu)
 endif ()

 if(OGRE_BUILD_PLATFORM_TEGRA2)


Fix bug 297: Incorrect use of Boost_USE_STATIC_LIBS causes boost library search to fail when trying to switch to Boost dynamic libs

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -135,7 +135,11 @@
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
 	# Try again with the other type of libs
-	set(Boost_USE_STATIC_LIBS NOT ${Boost_USE_STATIC_LIBS})
+	if(Boost_USE_STATIC_LIBS)
+		set(Boost_USE_STATIC_LIBS)
+	else()
+		set(Boost_USE_STATIC_LIBS ON)
+	endif()
 	find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 endif()
 find_package(Boost QUIET)


Fixed an error where older Boost versions were no longer found properly.

--HG--
branch : v1-8

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -128,7 +128,7 @@
 set(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
 # Components that need linking (NB does not include header-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
-find_package(Boost QUIET)
+find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
         if(Boost_USE_STATIC_LIBS)
                 set(Boost_USE_STATIC_LIBS OFF)


Python: allow using python3 on Ubuntu 14.04

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -339,6 +339,7 @@
 macro_log_feature(OPENEXR_FOUND "OpenEXR" "Load High dynamic range images" "http://www.openexr.com/" FALSE "" "")

 # Python
+set(Python_ADDITIONAL_VERSIONS 3.4) # allows using python3 on Ubuntu 14.04
 find_package(PythonInterp)
 find_package(PythonLibs)
 macro_log_feature(PYTHONLIBS_FOUND "Python" "Language bindings to use OGRE from Python" "http://www.python.org/" FALSE "" "")