make core modules include paths -isystem to ignore generated warnings

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -7,10 +7,17 @@

 MACRO(INCLUDE_DIR)
 	FOREACH( ARG ${ARGN} )
-		INCLUDE_DIRECTORIES(${ARG})
+# 		INCLUDE_DIRECTORIES(${ARG})
 		LIST(APPEND MY_CXX_FLAGS "-I${ARGN}" )
     ENDFOREACH( ARG )
 ENDMACRO(INCLUDE_DIR)
+
+MACRO(INCLUDE_SYS_DIR)
+	FOREACH( ARG ${ARGN} )
+# 		INCLUDE_DIRECTORIES(${ARG})
+		LIST(APPEND MY_CXX_FLAGS "-isystem${ARGN}" )
+    ENDFOREACH( ARG )
+ENDMACRO(INCLUDE_SYS_DIR)

 MACRO( HEADERCHECK )
 	ADD_CUSTOM_TARGET( headercheck )
@@ -25,12 +32,21 @@

 MACRO( ADD_DUNE_MODULES )
 	FOREACH( MODULE ${ARGN} )
+		INCLUDE_SYS_DIR( ${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE} )
+		LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE}/${MODULE}/.libs )
+		FILE( GLOB_RECURSE tmp_header "${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE}/${MODULE}/*.hh" )
+		LIST( APPEND DUNE_HEADERS ${tmp_header} )
+	ENDFOREACH(MODULE)
+ENDMACRO( ADD_DUNE_MODULES )
+
+MACRO( ADD_MY_MODULES )
+	FOREACH( MODULE ${ARGN} )
 		INCLUDE_DIR( ${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE} )
 		LINK_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE}/${MODULE}/.libs )
 		FILE( GLOB_RECURSE tmp_header "${CMAKE_CURRENT_SOURCE_DIR}/../dune-${MODULE}/${MODULE}/*.hh" )
 		LIST( APPEND DUNE_HEADERS ${tmp_header} )
 	ENDFOREACH(MODULE)
-ENDMACRO( ADD_DUNE_MODULES )
+ENDMACRO( ADD_MY_MODULES )

 MACRO( ADD_DUNE_EXECUTABLE target sources headers libs )
 	ADD_EXECUTABLE(${target} ${sources} ${headers} ${DUNE_HEADERS} )


Remove hard-coded path in CMSIS_INCLUDE_DIR

The redundant line is removed.

--- cmake/FindCMSIS.cmake
+++ cmake/FindCMSIS.cmake
@@ -69,7 +69,6 @@
 SET(CMSIS_INCLUDE_DIRS
     ${CMSIS_DEVICE_INCLUDE_DIR}
     ${CMSIS_COMMON_INCLUDE_DIR}
-    ${STM32Cube_DIR}/Drivers/CMSIS/Device/ST/STM32F4xx/Include
 )

 FOREACH(SRC ${CMSIS_DEVICE_SOURCES})


Fix: oups, missed this one relative to bug #5

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

--- cmake/pcl_utils.cmake
+++ cmake/pcl_utils.cmake
@@ -167,7 +167,7 @@
         set(LIB_INSTALL_DIR "lib")
     endif(OS_IS_64BIT)
     set(INCLUDE_INSTALL_DIR
-        "include/${PROJECT_NAME_LOWER}-${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
+        "include/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}")
     set(BIN_INSTALL_DIR "bin")
     set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig")
 endmacro(SET_INSTALL_DIRS)


Fixed wrong qt5 debug library suffix

Fixed wrong qt5 debug library suffix

The deploy script assumed the debug suffix "_debug.dll" for
all qt5 plugins. These files don't exists. Instead the true
qt5 debug suffix is "d.dll". This lead to the install of the
release dlls which didn't work with debug versions of TiGL
Viewer.

--- cmake/DeployQt5.cmake
+++ cmake/DeployQt5.cmake
@@ -280,7 +280,7 @@
                 endif()
                 if(WIN32)
                     set(plugin_find_release_filename "${plugin}.dll")
-                    set(plugin_find_debug_filename "${plugin}_debug.dll")
+                    set(plugin_find_debug_filename "${plugin}d.dll")
                     file(GLOB_RECURSE pluginlist "${plugin_find_path}" "${plugin_find_path}/*/*.dll")
                 endif(WIN32)
                 foreach(found_plugin ${pluginlist})


Final conda version fix

Final conda version fix

--- cmake/FindCppyy.cmake
+++ cmake/FindCppyy.cmake
@@ -457,7 +457,8 @@
     #     CONFIGURE_DEPENDS
     #     "${PKG_SRC_DIR}/*.py")
     string(TOLOWER ${CMAKE_SYSTEM_NAME} SYSTEM_STR)
-    set(pkg_whl "${CMAKE_BINARY_DIR}/dist/${pkg}-${pkg_version}-py3-none-${SYSTEM_STR}_${CMAKE_SYSTEM_PROCESSOR}.whl")
+    string(REGEX REPLACE "^v" "" fixed_pkg_version ${pkg_version})
+    set(pkg_whl "${CMAKE_BINARY_DIR}/dist/${pkg}-${fixed_pkg_version}-py3-none-any.whl")
     add_custom_command(OUTPUT  ${pkg_whl}
                        COMMAND python setup.py bdist_wheel
                        DEPENDS ${SETUP_PY_FILE} ${lib_name} ${setup_cfg}


Fix DevIL find package call

Fix DevIL find package call

Add the headers path so it matches the expected called macros.
This is also in line with how every such call is done.

--- cmake/FindDevIL.cmake
+++ cmake/FindDevIL.cmake
@@ -24,7 +24,7 @@
 endif()

 cegui_find_package_handle_standard_args(IL IL_LIB IL_H_PATH)
-cegui_find_package_handle_standard_args(ILU ILU_LIB)
+cegui_find_package_handle_standard_args(ILU ILU_LIB IL_H_PATH)

 # set up output vars
 if (IL_FOUND AND ILU_FOUND)


Change CMake warning to simple message for old Metis versions

--- cmake/FindMetis.cmake
+++ cmake/FindMetis.cmake
@@ -26,7 +26,7 @@
   string(REGEX MATCH "define[ \t]+METIS_VER_SUBMINOR[ \t]+([0-9]+)" _metis_subminor_version_match "${_metis_version_header}")
   set(METIS_SUBMINOR_VERSION "${CMAKE_MATCH_1}")
   if(NOT METIS_MAJOR_VERSION)
-    message(WARNING "Could not determine Metis version. Assuming version 4.0.0")
+    message(STATUS "Could not determine Metis version. Assuming version 4.0.0")
     set(METIS_VERSION 4.0.0)
   else()
     set(METIS_VERSION ${METIS_MAJOR_VERSION}.${METIS_MINOR_VERSION}.${METIS_SUBMINOR_VERSION})


Use protobuf .cc files to compile tests

Use protobuf .cc files to compile tests

--HG--
branch : no_ign_msgs

--- cmake/TestUtils.cmake
+++ cmake/TestUtils.cmake
@@ -7,11 +7,12 @@
     if(USE_LOW_MEMORY_TESTS)
       add_definitions(-DUSE_LOW_MEMORY_TESTS=1)
     endif(USE_LOW_MEMORY_TESTS)
-    add_executable(${BINARY_NAME} ${GTEST_SOURCE_file})
+    add_executable(${BINARY_NAME} ${GTEST_SOURCE_file} ${PROTO_SRC})

     add_dependencies(${BINARY_NAME}
       ${PROJECT_NAME_LOWER}
       gtest gtest_main
+      protobuf_compilation
       )

     target_link_libraries(${BINARY_NAME}


cleaned up the dependency graph by manually removing documentation, tools, apps, global_tests

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@2367 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/dep_graph.cmake
+++ cmake/dep_graph.cmake
@@ -4,6 +4,10 @@
     set(_dot_file "${PROJECT_BINARY_DIR}/pcl.dot")
     file(WRITE ${_dot_file} "digraph pcl {\n")
     foreach(_ss ${PCL_SUBSYSTEMS})
+      if(NOT _ss STREQUAL "global_tests" AND
+         NOT _ss STREQUAL "apps" AND
+         NOT _ss STREQUAL "tools" AND
+         NOT _ss STREQUAL "documentation")
         PCL_GET_SUBSYS_STATUS(_status ${_ss})
         if(_status)
             file(APPEND ${_dot_file}
@@ -16,6 +20,7 @@
         foreach(_dep ${_deps})
             file(APPEND ${_dot_file} "  \"${_ss}\" -> \"${_dep}\";\n")
         endforeach(_dep)
+      endif()
     endforeach(_ss)

     file(APPEND ${_dot_file}


Fix rpm and deb package name format (#6468)

By using RPM-DEFAULT and DEB-DEFAULT as package names,
CPack leaves the naming of the packages to the underlying
packaging tools which will use the standard naming format.

--- cmake/packaging.cmake
+++ cmake/packaging.cmake
@@ -337,7 +337,7 @@
     elseif(CPACK_GENERATOR STREQUAL "DEB")
       set(CPACK_DEBIAN_OSQUERY_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
       set(CPACK_DEBIAN_PACKAGE_RELEASE "${OSQUERY_PACKAGE_RELEASE}")
-      set(CPACK_DEBIAN_OSQUERY_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${OSQUERY_PACKAGE_RELEASE}.amd64.deb")
+      set(CPACK_DEBIAN_OSQUERY_FILE_NAME "DEB-DEFAULT")
       set(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
       set(CPACK_DEBIAN_PACKAGE_SECTION "default")
       set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>=2.12), zlib1g")
@@ -347,7 +347,7 @@
       set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/package/linux/conffiles;${CMAKE_BINARY_DIR}/package/linux/postinst")
     elseif(CPACK_GENERATOR STREQUAL "RPM")
       set(CPACK_RPM_PACKAGE_RELEASE_DIST "${OSQUERY_PACKAGE_RELEASE}")
-      set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${OSQUERY_PACKAGE_RELEASE}.x86_64")
+      set(CPACK_PACKAGE_FILE_NAME "RPM-DEFAULT")
       set(CPACK_RPM_PACKAGE_DESCRIPTION "osquery is an operating system instrumentation toolchain.")
       set(CPACK_RPM_PACKAGE_GROUP "default")
       set(CPACK_RPM_PACKAGE_LICENSE "Apache 2.0 or GPL 2.0")


CMake: actual fix for compat with CMake v2.8.11

f5008ce6256eb321e33c08fc212f9afc8a87edae did not really fix it

--- cmake/CMakeALICE.cmake
+++ cmake/CMakeALICE.cmake
@@ -311,10 +311,10 @@
     # Prepare a distinct install command for each file, depending on its path
     foreach(_FILE ${_FILES})

-        if(CMAKE_VERSION VERSION_GREATER "2.8.11")
+        if(CMAKE_VERSION VERSION_LESS "2.8.12")
+            get_filename_component(_FILEPREFIX ${_FILE} PATH)
+        else()
             get_filename_component(_FILEPREFIX ${_FILE} DIRECTORY)
-        else()
-            get_filename_component(_FILEPREFIX ${_FILE} PATH)
         endif()
         #message(STATUS "[install_relative] ${_FILE} --> ${_FILEPREFIX}")


Fix the python finder a bit

Fix the python finder a bit

--- cmake/FindPython.cmake
+++ cmake/FindPython.cmake
@@ -81,21 +81,19 @@
   FIND_PROGRAM(PYTHON_EXECUTABLE NAMES ${_PYTHON_EXE_VERSIONS} python PATHS)
 ENDIF(WIN32)

-EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" "-c" "from sys import *; stdout.write(str(version_info[0])+'.'+str(version_info[1]))" OUTPUT_VARIABLE _PYTHON_VERSION)
-
+EXECUTE_PROCESS(COMMAND "${PYTHON_EXECUTABLE}" "-c" "from sys import *; stdout.write('%d.%d' %(version_info[0],version_info[1]))" OUTPUT_VARIABLE _PYTHON_VERSION)

 # Make sure our python version matches the requested version when we get a non-versioned executable name
 GET_FILENAME_COMPONENT(_PYTHON_EXENAME ${PYTHON_EXECUTABLE} NAME_WE)
 IF(Python_FIND_VERSION AND PYTHON_EXECUTABLE AND ${_PYTHON_EXENAME} STREQUAL "python")
-  STRING(SUBSTRING "${_PYTHON_VERSION}" 7 3 _PYTHON_VERSION)
   IF(Python_FIND_VERSION_EXACT)
     IF(NOT ${_PYTHON_VERSION} VERSION_EQUAL "${Python_FIND_VERSION_MAJOR}.${Python_FIND_VERSION_MINOR}")
       SET(PYTHON_EXECUTABLE PYTHON_EXECUTABLE-NOTFOUND)
     ENDIF(NOT ${_PYTHON_VERSION} VERSION_EQUAL "${Python_FIND_VERSION_MAJOR}.${Python_FIND_VERSION_MINOR}")
   ELSE(Python_FIND_VERSION_EXACT)
-    IF(NOT ${_PYTHON_VERSION} VERSION_LESS ${Python_FIND_VERSION})
+    IF(${_PYTHON_VERSION} VERSION_LESS ${Python_FIND_VERSION})
       SET(PYTHON_EXECUTABLE PYTHON_EXECUTABLE-NOTFOUND)
-    ENDIF(NOT ${_PYTHON_VERSION} VERSION_LESS ${Python_FIND_VERSION})
+    ENDIF(${_PYTHON_VERSION} VERSION_LESS ${Python_FIND_VERSION})
   ENDIF(Python_FIND_VERSION_EXACT)
 ENDIF(Python_FIND_VERSION AND PYTHON_EXECUTABLE AND ${_PYTHON_EXENAME} STREQUAL "python")


Lower minimum qt5 version requirements based on tests with Debian unstable.

svn path=/trunk/; revision=13061

--- cmake/modules/qt.cmake
+++ cmake/modules/qt.cmake
@@ -68,7 +68,7 @@
   option(PLPLOT_USE_QT5 "Experimental (and currently quite limited) option to try Qt5" OFF)

   if(PLPLOT_USE_QT5)
-    find_package(Qt5Core 5.2.1)
+    find_package(Qt5Core 5.2.0)
     if(Qt5Core_FOUND)
       message(STATUS "Attempting to use Qt5 so have set PLD_epsqt to OFF since Qt5 does not support PostScript")
       set(PLD_epsqt OFF CACHE BOOL "Enable Qt EPS device" FORCE)


Version check problem

Version check problem

--- cmake/nvcc-check.cmake
+++ cmake/nvcc-check.cmake
@@ -1,58 +1,57 @@
-######################################################################
-# Based on a script by James Shackleford in Plastimatch.org
-# Modified by Simon Rit
-#
-# Currently, nvcc works with gcc-4.3 and gcc-4.4 for CUDA 4.x
-#
-# This script:
-#   * Checks the version of default gcc
-#   * If CUDA 4.x, we look for gcc-4.4
-#   * If not found or CUDA<4, we look for gcc-4.3 on the system
-#   * If found we tell nvcc to use it
-#   * If not found, fatal error
-######################################################################
-
-# This function searches for gcc version x.y (arguments 2 and 3 of the macro)
-# Return the result in argument 1, empty if not found
-FUNCTION(FIND_GCC GCC_PATH GCC_MAJOR GCC_MINOR)
-
-  # Search for gcc-x.y
-  FIND_PROGRAM(EXACT_GCC "gcc-${GCC_MAJOR}.${GCC_MINOR}")
-  IF(EXACT_GCC)
-    SET(GCC_PATH "${EXACT_GCC}" PARENT_SCOPE)
-  ELSE(EXACT_GCC)
-    # gcc-x.y not found, check default gcc
-    FIND_PROGRAM(DEFAULT_GCC gcc)
-    EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
-
-    # Get major and minor revs
-    STRING(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" GCCVER_MAJOR "${GCCVER}")
-    STRING(REGEX REPLACE "[0-9]+.([0-9]+).[0-9]+" "\\1" GCCVER_MINOR "${GCCVER}")
-    STRING(REGEX REPLACE "[0-9]+.[0-9]+.([0-9]+)" "\\1" GCCVER_PATCH "${GCCVER}")
-
-    # Check that adequate
-    IF("${GCCVER_MAJOR}" MATCHES "${GCC_MAJOR}" AND "${GCCVER_MINOR}" MATCHES "${GCC_MINOR}")
-        SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
-    ENDIF(GCCVER_MAJOR MATCHES GCC_MAJOR AND GCCVER_MINOR MATCHES GCC_MINOR)
-  ENDIF(EXACT_GCC)
-
-ENDFUNCTION(FIND_GCC)
-
-# Main code dealing with each version of cuda
-IF(CUDA_FOUND AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
-  SET(GCC_PATH "")
-  IF(CUDA_VERSION_MAJOR MATCHES "4")
-    FIND_GCC(GCC_PATH "4" "4")
-  ENDIF(CUDA_VERSION_MAJOR MATCHES "4")
-  IF(NOT GCC_PATH OR CUDA_VERSION_MAJOR LESS "3")
-    FIND_GCC(GCC_PATH "4" "3")
-  ENDIF(NOT GCC_PATH OR CUDA_VERSION_MAJOR LESS "3")
-
-  IF(GCC_PATH)
-    MESSAGE(STATUS "nvcc-check: Found adequate gcc (${GCC_PATH})... telling nvcc to use it!")
-    SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC_PATH})
-  ELSE(GCC_PATH)
-    MESSAGE(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda (gcc-4.3 or gcc-4.4 for Cuda 4).\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
-  ENDIF(GCC_PATH)
-ENDIF(CUDA_FOUND AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
-
+######################################################################
+# Based on a script by James Shackleford in Plastimatch.org
+# Modified by Simon Rit
+#
+# Currently, nvcc works with gcc-4.3 and gcc-4.4 for CUDA 4.x
+#
+# This script:
+#   * Checks the version of default gcc
+#   * If CUDA 4.x, we look for gcc-4.4
+#   * If not found or CUDA<4, we look for gcc-4.3 on the system
+#   * If found we tell nvcc to use it
+#   * If not found, fatal error
+######################################################################
+
+# This function searches for gcc version x.y (arguments 2 and 3 of the macro)
+# Return the result in argument 1, empty if not found
+FUNCTION(FIND_GCC GCC_PATH GCC_MAJOR GCC_MINOR)
+
+  # Search for gcc-x.y
+  FIND_PROGRAM(EXACT_GCC "gcc-${GCC_MAJOR}.${GCC_MINOR}")
+  IF(EXACT_GCC)
+    SET(GCC_PATH "${EXACT_GCC}" PARENT_SCOPE)
+  ELSE(EXACT_GCC)
+    # gcc-x.y not found, check default gcc
+    FIND_PROGRAM(DEFAULT_GCC gcc)
+    EXEC_PROGRAM(${DEFAULT_GCC} ARGS "-dumpversion" OUTPUT_VARIABLE GCCVER)
+
+    # Get major and minor revs
+    STRING(REGEX REPLACE "([0-9]+).[0-9]+" "\\1" GCCVER_MAJOR "${GCCVER}")
+    STRING(REGEX REPLACE "[0-9]+.([0-9]+)" "\\1" GCCVER_MINOR "${GCCVER}")
+
+    # Check that adequate
+    IF("${GCCVER_MAJOR}" MATCHES "${GCC_MAJOR}" AND "${GCCVER_MINOR}" MATCHES "${GCC_MINOR}")
+        SET(GCC_PATH ${DEFAULT_GCC} PARENT_SCOPE)
+    ENDIF()
+  ENDIF(EXACT_GCC)
+
+ENDFUNCTION(FIND_GCC)
+
+# Main code dealing with each version of cuda
+IF(CUDA_FOUND AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+  SET(GCC_PATH "")
+  IF(CUDA_VERSION_MAJOR MATCHES "4")
+    FIND_GCC(GCC_PATH "4" "4")
+  ENDIF(CUDA_VERSION_MAJOR MATCHES "4")
+  IF(NOT GCC_PATH OR CUDA_VERSION_MAJOR LESS "3")
+    FIND_GCC(GCC_PATH "4" "3")
+  ENDIF(NOT GCC_PATH OR CUDA_VERSION_MAJOR LESS "3")
+
+  IF(GCC_PATH)
+    MESSAGE(STATUS "nvcc-check: Found adequate gcc (${GCC_PATH})... telling nvcc to use it!")
+    SET(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} --compiler-bindir=${GCC_PATH})
+  ELSE(GCC_PATH)
+    MESSAGE(FATAL_ERROR "nvcc-check: Please install adequate gcc for cuda (gcc-4.3 or gcc-4.4 for Cuda 4).\nNote that gcc-4.x can be installed side-by-side with your current version of gcc.\n")
+  ENDIF(GCC_PATH)
+ENDIF(CUDA_FOUND AND CMAKE_SYSTEM_NAME MATCHES "Linux" AND CMAKE_COMPILER_IS_GNUCC)
+


added error message when catkin_add_gtest() is called too early

--- cmake/test/gtest.cmake
+++ cmake/test/gtest.cmake
@@ -24,6 +24,10 @@
   if(NOT GTEST_FOUND AND NOT GTEST_FROM_SOURCE_FOUND)
     message(STATUS "skipping gtest '${target}' in project '${PROJECT_NAME}'")
     return()
+  endif()
+
+  if(NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
+    message(FATAL_ERROR "catkin_add_gtest() must be called after catkin_package() so that default output directories for the test binaries are defined")
   endif()

   # XXX look for optional TIMEOUT argument, #2645


Remove nested parenthesis, not supported on CMake 2.6 (only 2.8)


CMake: Restore quick feature selection using URHO3D_FEATURES cmake parameter and fix cmake warning due to BUILD_SHARED_LIBS option.

--- CMake/Modules/UrhoOptions.cmake
+++ CMake/Modules/UrhoOptions.cmake
@@ -61,7 +61,6 @@
 include(CMakeDependentOption)

 # Build properties
-option(BUILD_SHARED_LIBS                        "Build engine as shared library."       ON)
 option(URHO3D_ENABLE_ALL                        "Enable (almost) all engine features."  ON)
 option(URHO3D_STATIC_RUNTIME                    "Link to static runtime"               OFF)
 set   (URHO3D_SSE             SSE2 CACHE STRING "Enable SSE instructions")
@@ -140,3 +139,7 @@
         set (URHO3D_CSHARP OFF)
     endif ()
 endif ()
+
+foreach (feature ${URHO3D_FEATURES})
+    set (URHO3D_${feature} ON)
+endforeach()


Allow AWSSDK_ROOT_DIR override

Allow AWSSDK_ROOT_DIR override

--- cmake/Modules/FindAWSSDK_EP.cmake
+++ cmake/Modules/FindAWSSDK_EP.cmake
@@ -36,8 +36,11 @@
 # modules.
 set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "${TILEDB_EP_INSTALL_PREFIX}")

-# Try searching for the SDK in the EP prefix.
-set(AWSSDK_ROOT_DIR "${TILEDB_EP_INSTALL_PREFIX}")
+if(DEFINED ENV{AWSSDK_ROOT_DIR})
+  set(AWSSDK_ROOT_DIR $ENV{AWSSDK_ROOT_DIR})
+else()
+  set(AWSSDK_ROOT_DIR "${TILEDB_EP_INSTALL_PREFIX}")
+endif()

 # Check to see if the SDK is installed (which provides the find module).
 # This will either use the system-installed AWSSDK find module (if present),


[CMake][Fuchsia] Enable hermetic static libc++abi for Fuchsia

Similarly to libc++, we want to use hermetic static libc++abi.

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

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

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -119,12 +119,13 @@
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_COMPILER_RT ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_ENABLE_STATIC_UNWINDER ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXXABI_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_INSTALL_STATIC_LIBRARY OFF CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY OFF CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+    set(RUNTIMES_${target}-fuchsia_LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
-    set(RUNTIMES_${target}-fuchsia_LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "")
   endforeach()


Added fix for gcc and newer cmake

Added fix for gcc and newer cmake

--- cmake/modules/FindUsdCycles.cmake
+++ cmake/modules/FindUsdCycles.cmake
@@ -65,7 +65,7 @@

 include(FindPackageHandleStandardArgs)

-find_package_handle_standard_args(usdCycles
+find_package_handle_standard_args(UsdCycles
     REQUIRED_VARS
         USD_CYCLES_INCLUDE_DIRS
         USD_CYCLES_LIBRARY_DIR


Add current folder to the list of includes.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1083,7 +1083,7 @@
 #
 function(ROOT_ADD_GTEST test_suite)
   CMAKE_PARSE_ARGUMENTS(ARG "" "" "LIBRARIES" ${ARGN})
-  include_directories(${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})
+  include_directories(${CMAKE_CURRENT_BINARY_DIR} ${GTEST_INCLUDE_DIR} ${GMOCK_INCLUDE_DIR})

   set(source_files ${ARG_UNPARSED_ARGUMENTS})
   # Note we cannot use ROOT_EXECUTABLE without user-specified set of LIBRARIES to link with.


Fix linking of MLAS unit test lib on platforms where libatomic is required. (#5469)


Let's go for C++17 on VS2017

Let's go for C++17 on VS2017

--- CMake/msvc.cmake
+++ CMake/msvc.cmake
@@ -2,6 +2,13 @@
 SET_SOURCE_FILES_PROPERTIES(${NATVIS_FILE} LANGUAGE natvis)

 set(MSVC_RUNTIME "Dynamic" CACHE STRING "Set up MSVC Runtime (Dynamic/Static)")
+
+CHECK_CXX_COMPILER_FLAG("/std:c++17" COMPILER_SUPPORTS_CPP17)
+if(COMPILER_SUPPORTS_CPP17)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
+else(COMPILER_SUPPORTS_CPP17)
+  message(STATUS "The compiler ${CMAKE_CXX_COMPILER} doesn't support /std:c++17")
+endif(COMPILER_SUPPORTS_CPP17)

 if("${MSVC_RUNTIME}" STREQUAL "Static")
   set(CompilerFlags


Raise initial preference of gstreamer to 15, making it the preferred backend (for now anyway).

--- gstreamer/gstreamer.desktop.cmake
+++ gstreamer/gstreamer.desktop.cmake
@@ -7,7 +7,7 @@
 X-KDE-PhononBackendInfo-Version=@PHONON_GST_VERSION@
 X-KDE-PhononBackendInfo-Website=http://gstreamer.freedesktop.org/
 Icon=phonon-gstreamer
-InitialPreference=10
+InitialPreference=15

 Name=GStreamer
 Name[bg]=GStreamer


Improve to find system hwloc

Improve to find system hwloc

--- FindHWLOC.cmake
+++ FindHWLOC.cmake
@@ -1,13 +1,12 @@
 # Copyright (c) 2012 Marwan Abdellah <marwan.abdellah@epfl.ch>
+#                    Daniel Nachbaur <daniel.nachbaur@epfl.ch>

-# Use pkg-config to fetch the contents of the .pc file
-# After that, use the directories refer to the libraries and
+# Use pkg-config to fetch the contents of the .pc file
+# After that, use the directories refer to the libraries and
 # also the headers

 find_package(PkgConfig)

-# To point to the hwloc.pc in the installation directory
-# For details, http://www.mail-archive.com/cmake@cmake.org/msg14754.html
 if(HWLOC_ROOT)
   set(ENV{PKG_CONFIG_PATH} "${HWLOC_ROOT}/lib/pkgconfig")
 endif()
@@ -18,25 +17,37 @@
   set(_hwloc_output 1)
 endif()

-pkg_check_modules(HWLOC hwloc ${_hwloc_QUIET})
+if(HWLOC_FIND_VERSION)
+  if(HWLOC_FIND_VERSION_EXACT)
+    pkg_check_modules(HWLOC ${_hwloc_QUIET} hwloc=${HWLOC_FIND_VERSION})
+  else()
+    pkg_check_modules(HWLOC ${_hwloc_QUIET} hwloc>=${HWLOC_FIND_VERSION})
+  endif()
+else()
+  pkg_check_modules(HWLOC ${_hwloc_QUIET} hwloc)
+endif()

 if(HWLOC_FOUND)
   find_library(HWLOC_LIBRARY hwloc
-    PATHS ${HWLOC_ROOT} PATH_SUFFIXES lib NO_DEFAULT_PATH)
+    HINTS $ENV{HWLOC_ROOT} ${HWLOC_ROOT}
+    PATHS ${HWLOC__LIBRARY_DIRS}
+    PATH_SUFFIXES lib)
   set(HWLOC_LIBRARIES ${HWLOC_LIBRARY})

   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(HWLOC DEFAULT_MSG HWLOC_LIBRARIES
-    HWLOC_INCLUDE_DIRS)
+    HWLOC_INCLUDEDIR)

   if(${HWLOC_VERSION} VERSION_LESS 1.5.0)
     set(HWLOC_GL_FOUND)
-  else()
+  else()
     set(HWLOC_GL_FOUND 1)
   endif()
+
+  set(HWLOC_INCLUDE_DIRS ${HWLOC_INCLUDEDIR})

   if(HWLOC_FOUND AND _hwloc_output)
     message(STATUS
       "Found HWLOC ${HWLOC_VERSION} in ${HWLOC_INCLUDE_DIRS};${HWLOC_LIBRARIES}")
   endif()
-endif(HWLOC_FOUND)
+endif()


nxp_fmurt1062-v1:Track PX4 Sensor changes

--- boards/nxp/fmurt1062-v1/default.cmake
+++ boards/nxp/fmurt1062-v1/default.cmake
@@ -30,7 +30,9 @@
 		#imu/adis16497
 		#imu # all available imu drivers
 		imu/bosch/bmi055
-		imu/mpu6000
+		imu/invensense/icm20602
+		imu/invensense/icm20689
+		#imu/mpu6000 # legacy icm20602/icm20689 driver
 		irlock
 		lights/blinkm
 		lights/rgbled


map all case variants of the _CONAN_SETTING_BUILD_TYPE value to CamelCase equivalent before passing to conan install (#127)

--- conan.cmake
+++ conan.cmake
@@ -80,6 +80,18 @@
     else()
         message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")
     endif()
+
+    string(TOUPPER ${_CONAN_SETTING_BUILD_TYPE} _CONAN_SETTING_BUILD_TYPE_UPPER)
+    if (_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "DEBUG")
+        set(_CONAN_SETTING_BUILD_TYPE "Debug")
+    elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELEASE")
+        set(_CONAN_SETTING_BUILD_TYPE "Release")
+    elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELWITHDEBINFO")
+        set(_CONAN_SETTING_BUILD_TYPE "RelWithDebInfo")
+    elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "MINSIZEREL")
+        set(_CONAN_SETTING_BUILD_TYPE "MinSizeRel")
+    endif()
+
     if(ARGUMENTS_ARCH)
         set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH})
     endif()


Avoid configure crash looking for openmp on ci

Former-commit-id: b5abe7f619265b9a98e80372ef362be717ee4b28

--- cmake-modules/FindOpenMPLibrary.cmake
+++ cmake-modules/FindOpenMPLibrary.cmake
@@ -4,131 +4,98 @@
     # find_package(OpenMP) Will at least find the correct header?
     find_package(OpenMP)
     if (OpenMP_FOUND)
-      set(OpenMP_LIBRARIES  ${OpenMP_gomp_LIBRARY} ${OpenMP_omp_LIBRARY} ${OpenMP_iomp_LIBRARY})
-      set(OpenMP_FLAGS ${OpenMP_CXX_FLAGS})
+        set(OpenMP_LIBRARIES  ${OpenMP_gomp_LIBRARY} ${OpenMP_omp_LIBRARY} ${OpenMP_iomp_LIBRARY})
+        set(OpenMP_FLAGS ${OpenMP_CXX_FLAGS})

-      # Try to find the header omp.h
-      get_filename_component("OpenMP_ROOT" "${OpenMP_LIBRARIES}" DIRECTORY)
-      set(OpenMP_HEADER_PATHS  ${OpenMP_ROOT}/../../include ${OpenMP_ROOT}/../include ${OpenMP_ROOT}/include)
+        # Try to find the header omp.h
+        get_filename_component(OpenMP_ROOT "${OpenMP_LIBRARIES}" DIRECTORY)
+        find_path(OpenMP_INCLUDE_DIR
+              NAMES omp.h
+              HINTS ${OpenMP_ROOT}
+              PATHS ${omp_paths}
+              PATH_SUFFIXES
+                /../../include /../include include openmp)

-
-      find_path(OpenMP_INCLUDE_DIR NAMES omp.h PATHS ${OpenMP_HEADER_PATHS} ${omp_paths} PATH_SUFFIXES openmp include)
-      list(APPEND OpenMP_LIBRARIES  -lpthread -ldl)
-      message(STATUS "OpenMP libraries found: ${OpenMP_LIBRARIES}" )
-      if(BUILD_SHARED_LIBS)
-          check_omp_compiles("${OpenMP_FLAGS}" "${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
-      else()
-          check_omp_compiles("${OpenMP_FLAGS}" "-static;${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
-      endif()
+        if(OpenMP_LIBRARIES AND OpenMP_INCLUDE_DIR)
+            list(APPEND OpenMP_LIBRARIES  -lpthread -ldl)
+            message(STATUS "OpenMP libraries found: ${OpenMP_LIBRARIES}" )
+            if(BUILD_SHARED_LIBS)
+              check_omp_compiles("${OpenMP_FLAGS}" "${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
+            else()
+              check_omp_compiles("${OpenMP_FLAGS}" "-static;${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
+            endif()
+        endif()
     endif()

     if(NOT OMP_COMPILES)
-      message(STATUS "Checking for OpenMP in given paths: ${omp_paths}")
+        message(STATUS "Checking for OpenMP in given paths: ${omp_paths}")

-      unset(OpenMP_FOUND)
-      unset(OpenMP_FOUND CACHE)
-      unset(OpenMP_FLAGS)
-      unset(OpenMP_FLAGS CACHE)
-      unset(OpenMP_LIBRARIES)
-      unset(OpenMP_LIBRARIES CACHE)
-      unset(OpenMP_INCLUDE_DIR)
-      unset(OpenMP_INCLUDE_DIR CACHE)
+        unset(OpenMP_FOUND)
+        unset(OpenMP_FOUND CACHE)
+        unset(OpenMP_FLAGS)
+        unset(OpenMP_FLAGS CACHE)
+        unset(OpenMP_LIBRARIES)
+        unset(OpenMP_LIBRARIES CACHE)
+        unset(OpenMP_INCLUDE_DIR)
+        unset(OpenMP_INCLUDE_DIR CACHE)

-      find_library(OpenMP_LIBRARIES NAMES ${omp_names} PATHS ${omp_paths})
-      find_path(OpenMP_INCLUDE_DIR NAMES omp.h PATHS ${OpenMP_HEADER_PATHS} ${omp_paths} /usr/lib  /usr/lib/llvm-9/include /usr/include /usr/lib/llvm-8/include PATH_SUFFIXES openmp include)
-      if(NOT OpenMP_LIBRARIES)
-          unset(OpenMP_LIBRARIES)
-          unset(OpenMP_LIBRARIES CACHE)
-      endif()
-      if(NOT OpenMP_INCLUDE_DIR)
-          unset(OpenMP_INCLUDE_DIR)
-          unset(OpenMP_INCLUDE_DIR CACHE)
-      endif()
+        find_library(OpenMP_LIBRARIES NAMES ${omp_names} PATHS ${omp_paths} ${OpenMP_ROOT} )
+        find_path(OpenMP_INCLUDE_DIR NAMES omp.h
+            HINTS ${OpenMP_ROOT}
+            PATHS
+                ${omp_paths}
+                /usr/lib/llvm-9/include  /usr/lib/llvm-8/include /usr/lib/llvm-7/include  /usr/include
+                PATH_SUFFIXES
+                openmp /../../include /../include include )

-
-      list(APPEND OpenMP_LIBRARIES -lpthread -ldl)
-      set(OpenMP_DEFS "-D_OPENMP")
-      if(${BUILD_SHARED_LIBS})
-          check_omp_compiles("${OpenMP_DEFS}" "${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
-      else()
-          check_omp_compiles("${OpenMP_DEFS}" "-static;${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
-      endif()
+        if(OpenMP_LIBRARIES AND OpenMP_INCLUDE_DIR)
+            list(APPEND OpenMP_LIBRARIES -lpthread -ldl)
+            set(OpenMP_DEFS "-D_OPENMP")
+            if(${BUILD_SHARED_LIBS})
+                check_omp_compiles("${OpenMP_DEFS}" "${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
+            else()
+                check_omp_compiles("${OpenMP_DEFS}" "-static;${OpenMP_LIBRARIES}" "${OpenMP_INCLUDE_DIR}")
+            endif()
+        endif()
     endif()

     if(OMP_COMPILES)
-      set(OpenMP_FOUND        TRUE                    PARENT_SCOPE)
-      add_library(OpenMP INTERFACE IMPORTED)
-      target_link_libraries(OpenMP INTERFACE ${OpenMP_LIBRARIES})
-      target_compile_definitions(OpenMP INTERFACE ${OpenMP_DEFS})
-      target_include_directories(OpenMP INTERFACE ${OpenMP_INCLUDE_DIR})
-      message(STATUS "Found working OpenMP" )
+        set(OpenMP_FOUND        TRUE                    PARENT_SCOPE)
+        add_library(OpenMP INTERFACE IMPORTED)
+        target_link_libraries(OpenMP INTERFACE ${OpenMP_LIBRARIES})
+        target_compile_definitions(OpenMP INTERFACE ${OpenMP_DEFS})
+        target_include_directories(OpenMP INTERFACE ${OpenMP_INCLUDE_DIR})
+        message(STATUS "Found working OpenMP" )
     else()
-      message(STATUS "Could not compile simle OpenMP program." )
-      set(OMP_COMPILES FALSE PARENT_SCOPE)
+        message(STATUS "Could not compile simle OpenMP program." )
+        set(OMP_COMPILES FALSE PARENT_SCOPE)
     endif()
 endfunction()

 function(find_package_openmp)
-    if(ENABLE_MKL AND NOT MKLROOT)
-        if(DEFINED $ENV{MKLROOT})
-            set(MKLROOT $ENV{MKLROOT})
-        else()
-            set(MKLROOT  /opt/intel/mkl)
-            message(STATUS "MKLROOT is not defined. Setting default: ${MKLROOT}")
-        endif()
-    endif()
-
-    if (NOT CUSTOM_SUFFIX)
-        if(BUILD_SHARED_LIBS)
-            set(CUSTOM_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
-            set(CMAKE_FIND_LIBRARY_SUFFIXES ${CUSTOM_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES})
-        else()
-            set(CUSTOM_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
-            set(CMAKE_FIND_LIBRARY_SUFFIXES ${CUSTOM_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES})
-        endif()
-    endif()
-
-
-
-#    if (NOT TARGET Threads::Threads)
-        ### Adapt pthread for static/dynamic linking
-        ### This is to fix a bug with threads described here:
-        ### https://stackoverflow.com/questions/35116327/when-g-static-link-pthread-cause-segmentation-fault-why
-#        set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
-#        set(THREADS_PREFER_PTHREAD_FLAG FALSE)
-#        find_package(Threads)
-#        if(TARGET Threads::Threads AND NOT BUILD_SHARED_LIBS)
-#            set_target_properties(Threads::Threads PROPERTIES INTERFACE_LINK_LIBRARIES "-Wl,--whole-archive -lpthread -Wl,--no-whole-archive")
-#        endif()
-#    endif()
-
-
-
     set(OMP_LIBRARY_NAMES)
     set(OMP_LIBRARY_PATHS)
+
     if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND NOT BUILD_SHARED_LIBS)
         # Append possible locations for iomp5
-        list(APPEND OMP_LIBRARY_NAMES  libiomp5${CUSTOM_SUFFIX} libiomp${CUSTOM_SUFFIX})
+        list(APPEND OMP_LIBRARY_NAMES  libiomp5${CMAKE_STATIC_LIBRARY_SUFFIX} libiomp${CMAKE_STATIC_LIBRARY_SUFFIX})
         foreach(omp_name ${OMP_LIBRARY_NAMES})
             execute_process(COMMAND ${CMAKE_CXX_COMPILER} -print-file-name=${omp_name}
                     OUTPUT_VARIABLE OMP_LIB
-                    OUTPUT_STRIP_TRAILING_WHITESPACE
-                    )
+                    OUTPUT_STRIP_TRAILING_WHITESPACE)
             get_filename_component(OMP_PATH ${OMP_LIB} DIRECTORY)
             if(OMP_PATH)
                 list(APPEND OMP_LIBRARY_PATHS ${OMP_PATH})
-                message(STATUS "Inserting: ${OMP_PATH}")
             endif()
         endforeach()
         list(APPEND OMP_LIBRARY_PATHS
                 ${MKLROOT}/../intel/lib/intel64
+                $ENV{MKLROOT}/../intel/lib/intel64
                 $ENV{EBROOTIMKL}/../intel/lib/intel64
-                /opt/intel/lib/intel64
-                )
+                /opt/intel/lib/intel64)
     endif()
-
     find_package_openmp_internal("${OMP_LIBRARY_PATHS}" "${OMP_LIBRARY_NAMES}" "${BUILD_SHARED_LIBS}")
 endfunction()


Remove unnecessary file

Remove unnecessary file

--- cmake/GetGitRevisionDescription.cmake
+++ cmake/GetGitRevisionDescription.cmake
@@ -1,123 +0,0 @@
-# - Returns a version string from Git
-#
-# These functions force a re-configure on each git commit so that you can
-# trust the values of the variables in your build system.
-#
-#  get_git_head_revision(<refspecvar> <hashvar> [<additional arguments to git describe> ...])
-#
-# Returns the refspec and sha hash of the current head revision
-#
-#  git_describe(<var> [<additional arguments to git describe> ...])
-#
-# Returns the results of git describe on the source tree, and adjusting
-# the output so that it tests false if an error occurs.
-#
-#  git_get_exact_tag(<var> [<additional arguments to git describe> ...])
-#
-# Returns the results of git describe --exact-match on the source tree,
-# and adjusting the output so that it tests false if there was no exact
-# matching tag.
-#
-# Requires CMake 2.6 or newer (uses the 'function' command)
-#
-# Original Author:
-# 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
-# http://academic.cleardefinition.com
-# Iowa State University HCI Graduate Program/VRAC
-#
-# Copyright Iowa State University 2009-2010.
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-if(__get_git_revision_description)
-	return()
-endif()
-set(__get_git_revision_description YES)
-
-# We must run the following at "include" time, not at function call time,
-# to find the path to this module rather than the path to a calling list file
-get_filename_component(_gitdescmoddir ${CMAKE_CURRENT_LIST_FILE} PATH)
-
-function(get_git_head_revision _refspecvar _hashvar)
-	set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}")
-	set(GIT_DIR "${GIT_PARENT_DIR}/.git")
-	while(NOT EXISTS "${GIT_DIR}")	# .git dir not found, search parent directories
-		set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}")
-		get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH)
-		if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT)
-			# We have reached the root directory, we are not in git
-			set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
-			set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE)
-			return()
-		endif()
-		set(GIT_DIR "${GIT_PARENT_DIR}/.git")
-	endwhile()
-	set(GIT_DATA "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/git-data")
-	if(NOT EXISTS "${GIT_DATA}")
-		file(MAKE_DIRECTORY "${GIT_DATA}")
-	endif()
-
-	if(NOT EXISTS "${GIT_DIR}/HEAD")
-		return()
-	endif()
-	set(HEAD_FILE "${GIT_DATA}/HEAD")
-	configure_file("${GIT_DIR}/HEAD" "${HEAD_FILE}" COPYONLY)
-
-	configure_file("${_gitdescmoddir}/GetGitRevisionDescription.cmake.in"
-		"${GIT_DATA}/grabRef.cmake"
-		@ONLY)
-	include("${GIT_DATA}/grabRef.cmake")
-
-	set(${_refspecvar} "${HEAD_REF}" PARENT_SCOPE)
-	set(${_hashvar} "${HEAD_HASH}" PARENT_SCOPE)
-endfunction()
-
-function(git_describe _var)
-	if(NOT GIT_FOUND)
-		find_package(Git QUIET)
-	endif()
-	get_git_head_revision(refspec hash)
-	if(NOT GIT_FOUND)
-		set(${_var} "GIT-NOTFOUND" PARENT_SCOPE)
-		return()
-	endif()
-	if(NOT hash)
-		set(${_var} "HEAD-HASH-NOTFOUND" PARENT_SCOPE)
-		return()
-	endif()
-
-	# TODO sanitize
-	#if((${ARGN}" MATCHES "&&") OR
-	#	(ARGN MATCHES "||") OR
-	#	(ARGN MATCHES "\\;"))
-	#	message("Please report the following error to the project!")
-	#	message(FATAL_ERROR "Looks like someone's doing something nefarious with git_describe! Passed arguments ${ARGN}")
-	#endif()
-
-	#message(STATUS "Arguments to execute_process: ${ARGN}")
-
-	execute_process(COMMAND
-		"${GIT_EXECUTABLE}"
-		describe
-		${hash}
-		${ARGN}
-		WORKING_DIRECTORY
-		"${CMAKE_SOURCE_DIR}"
-		RESULT_VARIABLE
-		res
-		OUTPUT_VARIABLE
-		out
-		ERROR_QUIET
-		OUTPUT_STRIP_TRAILING_WHITESPACE)
-	if(NOT res EQUAL 0)
-		set(out "${out}-${res}-NOTFOUND")
-	endif()
-
-	set(${_var} "${out}" PARENT_SCOPE)
-endfunction()
-
-function(git_get_exact_tag _var)
-	git_describe(out --exact-match ${ARGN})
-	set(${_var} "${out}" PARENT_SCOPE)
-endfunction()


- Remove GLESv3 thingy

- Remove GLESv3 thingy

--- cmake/Packaging/AndroidApkBuild.cmake
+++ cmake/Packaging/AndroidApkBuild.cmake
@@ -98,12 +98,12 @@
         set ( ANDROID_DEBUGGABLE "false" )
     endif()

-    if(COFFEE_BUILD_GLEAM_RHI)
-        set ( ANDROID_ES30_REQ "true" )
-        set ( ANDROID_API_MIN_TARGET "17" )
-    else()
-        set ( ANDROID_API_MIN_TARGET "9" )
-    endif()
+#    if(COFFEE_BUILD_GLEAM_RHI)
+#        set ( ANDROID_ES30_REQ "true" )
+#        set ( ANDROID_API_MIN_TARGET "17" )
+#    else()
+#    endif()
+    set ( ANDROID_API_MIN_TARGET "9" )

     set ( ANDROID_REQUIRED_FEATURES
         "android.hardware.faketouch"


Handle LLVM_USE_SANITIZER=Address;Undefined (and the other way around)

Summary:
Handle LLVM_USE_SANITIZER=Address;Undefined to enable ASan and UBSan
If UBSan is compatible with more of the other sanitizers, maybe we should
deal with this in a better way where we allow combining UBSan with any of
the other sanitizers.

Reviewers: samsonov

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D7024

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -404,6 +404,11 @@
     elseif (LLVM_USE_SANITIZER STREQUAL "Thread")
       append_common_sanitizer_flags()
       append("-fsanitize=thread" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    elseif (LLVM_USE_SANITIZER STREQUAL "Address;Undefined" OR
+            LLVM_USE_SANITIZER STREQUAL "Undefined;Address")
+      append_common_sanitizer_flags()
+      append("-fsanitize=address,undefined -fno-sanitize=vptr,function -fno-sanitize-recover"
+              CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
     else()
       message(WARNING "Unsupported value of LLVM_USE_SANITIZER: ${LLVM_USE_SANITIZER}")
     endif()


We need to make sure the windsh poll time to be 1ms.

--- cmake/tinyunit_run_test_wrapper.cmake
+++ cmake/tinyunit_run_test_wrapper.cmake
@@ -63,7 +63,7 @@
   temp_name(TINYUNIT_TEST_VXWROKS_WINDSH_RUN_SCRIPT ".cmake.vxworks/windsh")
   file(WRITE ${TINYUNIT_TEST_VXWROKS_WINDSH_RUN_SCRIPT} "main()\nexit\n")

-  set(TINYUNIT_TEST_FINAL_CMD windsh target -q -s "${TINYUNIT_TEST_VXWROKS_WINDSH_RUN_SCRIPT}")
+  set(TINYUNIT_TEST_FINAL_CMD windsh target -poll 1 -q -s "${TINYUNIT_TEST_VXWROKS_WINDSH_RUN_SCRIPT}")
 endif ()

 message ("Running test ${TINYUNIT_TEST_FINAL_CMD}")


Port FindVMMLIB to FLP to enable version checking

--- FindVMMLIB.cmake
+++ FindVMMLIB.cmake
@@ -1,24 +1,13 @@
 # Copyright (c) 2012 Stefan Eilemann <eile@eyescale.ch>

-if(VMMLIB_FIND_REQUIRED)
-  set(_vmmlib_version_output_type FATAL_ERROR)
-  set(_vmmlib_output 1)
-else()
-  set(_vmmlib_version_output_type STATUS)
-  if(NOT VMMLIB_FIND_QUIETLY)
-    set(_vmmlib_output 1)
-  endif()
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/FindVMMLIB)
+include(FindLibraryPackage)
+include(FindPackageHandleStandardArgs)
+
+find_library_package(VMMLIB INCLUDE vmmlib)
+find_package_handle_standard_args(VMMLIB DEFAULT_MSG VMMLIB_INCLUDE_DIRS)
+
+if(VMMLIB_FOUND)
+  set(VMMLIB_DEB_DEPENDENCIES)
+  set(VMMLIB_DEB_BUILD_DEPENDENCIES "vmmlib1-dev")
 endif()
-
-find_path(VMMLIB_INCLUDE_DIRS vmmlib/vmmlib.hpp
-  $ENV{VMMLIB_ROOT}/include /usr/include /usr/local/include /opt/local/include)
-
-if(VMMLIB_INCLUDE_DIRS)
-  set(VMMLIB_FOUND 1)
-  set(VMMLIB_DEB_BUILD_DEPENDENCIES "vmmlib1-dev")
-  if(_vmmlib_output)
-    message(STATUS "Found vmmlib in ${VMMLIB_INCLUDE_DIRS}")
-  endif()
-elseif(_vmmlib_output)
-  message(${_vmmlib_version_output_type} "Could not find VMMLib")
-endif()


[cmake] fixed fasp

[cmake] fixed fasp

--- cmake/DuneUtils.cmake
+++ cmake/DuneUtils.cmake
@@ -240,10 +240,9 @@
 find_library(FASP_LIBRARY fasp "${CMAKE_CURRENT_SOURCE_DIR}/../local/lib/")
 if("${FASP_LIBRARY}" MATCHES "FASP_LIBRARY-NOTFOUND")
   message("--   library 'fasp' not found")
-  set(FASPLIB )
 else("${FASP_LIBRARY}" MATCHES "FASP_LIBRARY-NOTFOUND")
   message("--   found fasp library")
-  set(FASPLIB ${FASP_LIBRARY})
+  set(FASPLIB "${FASP_LIBRARY}")
 endif("${FASP_LIBRARY}" MATCHES "FASP_LIBRARY-NOTFOUND")
 message("-- checking for 'fasp' header")
 find_path(FASP_INCLUDE_DIR fasp.h HINTS "${CMAKE_CURRENT_SOURCE_DIR}/../local/include/" "${CMAKE_CURRENT_SOURCE_DIR}/../local/include/fasp/")


Fix the variable name for the TESTVAR

Fix the variable name for the TESTVAR

--- cmake/FindCEGUI.cmake
+++ cmake/FindCEGUI.cmake
@@ -180,7 +180,7 @@
             set(${var} "NOTFOUND" CACHE STRING "${var}-docstring" FORCE)
         endforeach(var)
     endif ()
-    set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "${testvar}-docstring" FORCE)
+    set(${TESTVAR}_INT_CHECK ${${TESTVAR}} CACHE INTERNAL "${TESTVAR}-docstring" FORCE)
 endmacro(clear_if_changed)

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


Find Epoxy under Android. Android doesn't support shared libraries not ending with ".so", so the library ABI version should be included in the library name (I've fixed Epoxy so that under Android it's built with a name like "libepoxy_0.so", where "0" is the ABI version).

--- cmake/FindEpoxy.cmake
+++ cmake/FindEpoxy.cmake
@@ -4,7 +4,7 @@
 include(FindPackageHandleStandardArgs)

 find_path(EPOXY_H_PATH NAMES epoxy/gl.h)
-find_library(EPOXY_LIB NAMES epoxy)
+find_library(EPOXY_LIB NAMES epoxy epoxy_0)
 mark_as_advanced(EPOXY_H_PATH EPOXY_LIB EPOXY_LIB_DBG)

 find_package_handle_standard_args(EPOXY DEFAULT_MSG EPOXY_LIB EPOXY_H_PATH)


fix gmake cmake module under linux

fix gmake cmake module under linux

Point gtest target to built library.

--- cmake/FindGTest.cmake
+++ cmake/FindGTest.cmake
@@ -6,6 +6,9 @@
     if(MSVC)
         set_property(TARGET gtest PROPERTY IMPORTED_IMPLIB
             "${CMAKE_BINARY_DIR}/gtest/src/gtest-project-build/${CMAKE_CFG_INTDIR}/gtest.lib")
+    else()
+        set_property(TARGET gtest PROPERTY IMPORTED_LOCATION
+            "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libgtest.so")
     endif()

     add_dependencies(gtest gtest-project)


Find python during find_package(jcppy)

Find python during find_package(jcppy)

--- cmake/FindJcppy.cmake
+++ cmake/FindJcppy.cmake
@@ -10,8 +10,10 @@
   DOC "Path to jcppy executable"
 )

+find_package(PythonInterp REQUIRED)
+
 if(JCPPY_EXECUTABLE)
-  execute_process(COMMAND ${JCPPY_EXECUTABLE} --version
+  execute_process(COMMAND ${PYTHON_EXECUTABLE} ${JCPPY_EXECUTABLE} --version
     ERROR_VARIABLE JCPPY_VERSION
     OUTPUT_VARIABLE JCPPY_VERSION
     OUTPUT_STRIP_TRAILING_WHITESPACE
@@ -90,8 +92,8 @@
     add_custom_command(
       OUTPUT "${JCPPY_OUTPUT_DIR}/${WE}.h"
              "${JCPPY_OUTPUT_DIR}/${WE}.cpp"
-      COMMAND ${JCPPY_EXECUTABLE}
-      ARGS ${INVOKE_ARGS} --output-dir ${JCPPY_OUTPUT_DIR} ${ABS}
+      COMMAND ${PYTHON_EXECUTABLE}
+      ARGS ${JCPPY_EXECUTABLE} ${INVOKE_ARGS} --output-dir ${JCPPY_OUTPUT_DIR} ${ABS}
       DEPENDS ${i}
       DEPENDS ${JCPPY_EXECUTABLE}
       COMMENT "Running jccpy generator on ${i}"


some fixes for usecyclus

some fixes for usecyclus

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -52,11 +52,16 @@

   # output directory
   SET(AGENT_PATH "cyclus/${lib_root}")
-  SET(
-    CMAKE_LIBRARY_OUTPUT_DIRECTORY
-    ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${AGENT_PATH}
-    )
-
+  IF(NOT "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" MATCHES
+         ".*${AGENT_PATH}$")
+    SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY
+      ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${AGENT_PATH})
+  ENDIF(NOT "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" MATCHES
+         ".*${AGENT_PATH}$")
+
+  MESSAGE("   !!  AGENT PATH ${AGENT_PATH}")
+  MESSAGE("   !!  CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+
   # get preprocessor script
   IF(NOT DEFINED CYCPP)
     SET(CYCPP "${CYCLUS_CORE_INCLUDE_DIRS}/../../bin/cycpp.py")
@@ -106,69 +111,8 @@
     EXECUTE_PROCESS(COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS})
   ENDIF(NOT EXISTS ${CCOUT})

-  SET("${lib_root}_CC" "${${lib_root}_CC}" "${CCOUT}" CACHE INTERNAL "Agent source" FORCE)
-ENDMACRO()
-
-MACRO(INSTALL_CYCLUS_STANDALONE lib_root src_root lib_dir)
-  # clear variables before starting
-  SET("${lib_root}_H" "" CACHE INTERNAL "Agent header" FORCE)
-  SET("${lib_root}_CC" "" CACHE INTERNAL "Agent source" FORCE)
-  SET("${lib_root}_LIB" "" CACHE INTERNAL "Agent library alias." FORCE)
-  SET("${lib_root}_Test_H" "" CACHE INTERNAL "Agent test headers" FORCE)
-  SET("${lib_root}_TEST_CC" "" CACHE INTERNAL "Agent test source" FORCE)
-  SET("${lib_root}_TEST_LIB" "" CACHE INTERNAL "Agent test library alias." FORCE)
-
-  # setup
-  USE_CYCLUS("${lib_root}" "${src_root}")
-
-  # add library
-  ADD_LIBRARY(${lib_root} ${CCOUT})
-  TARGET_LINK_LIBRARIES(${lib_root} dl ${LIBS})
-  SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${lib_root})
-  ADD_DEPENDENCIES(${lib_root} ${HIN} ${HOUT} ${CCIN} ${CCOUT})
-
-  IF(EXISTS "${HIN}")
-    ADD_CUSTOM_COMMAND(
-      OUTPUT ${CCOUT}
-      OUTPUT ${HOUT}
-      COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}
-      COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}
-      DEPENDS ${HIN}
-      DEPENDS ${CCIN}
-      DEPENDS ${CYCPP}
-      COMMENT "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}"
-      COMMENT "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}"
-      )
-  ELSE(EXISTS "${HIN}")
-    ADD_CUSTOM_COMMAND(
-      OUTPUT ${CCOUT}
-      COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}
-      DEPENDS ${CCIN}
-      DEPENDS ${CYCPP}
-      COMMENT "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}"
-      )
-  ENDIF(EXISTS "${HIN}")
-
-  # install library
-  install(
-    TARGETS ${lib_root}
-    LIBRARY DESTINATION lib/cyclus/${lib_dir}
-    COMPONENT ${lib_root}
-    )
-  SET(
-    "${lib_root}_LIB"
-    "${lib_root}"
-    CACHE INTERNAL "Agent library alias." FORCE
-    )
-
-  # install headers
-  IF(EXISTS "${HOUT}")
-    INSTALL(
-      FILES ${HOUT}
-      DESTINATION include/cyclus
-      COMPONENT ${lib_root}
-      )
-  ENDIF(EXISTS "${HOUT}")
+  SET("${lib_root}_CC" "${${lib_root}_CC}" "${CCOUT}"
+      CACHE INTERNAL "Agent source" FORCE)

   # add tests
   SET(CCTIN "${CMAKE_CURRENT_SOURCE_DIR}/${src_root}_tests.cc")
@@ -182,22 +126,19 @@
       MESSAGE(STATUS "Copying ${HTIN} to ${HTOUT}.")
       EXECUTE_PROCESS(COMMAND ${CMD} ${HTIN} ${HTOUT})
       ADD_CUSTOM_COMMAND(
-      	OUTPUT ${HTOUT}
-      	OUTPUT ${CCTOUT}
-	COMMAND ${CMD} ${HTIN} ${HTOUT}
-	COMMAND ${CMD} ${CCTIN} ${CCTOUT}
-	DEPENDS ${HIN}
-	DEPENDS ${CCIN}
-	DEPENDS ${HTIN}
-	DEPENDS ${CCTIN}
-	COMMENT "Copying ${HTIN} to ${HTOUT}."
-	COMMENT "Copying ${CCTIN} to ${CCTOUT}."
-	)
-      SET(
-    "${lib_root}_Test_H"
-    "${HTOUT}"
-    CACHE INTERNAL "Agent test headers" FORCE
-    )
+        OUTPUT ${HTOUT}
+        OUTPUT ${CCTOUT}
+        COMMAND ${CMD} ${HTIN} ${HTOUT}
+        COMMAND ${CMD} ${CCTIN} ${CCTOUT}
+        DEPENDS ${HIN}
+        DEPENDS ${CCIN}
+        DEPENDS ${HTIN}
+        DEPENDS ${CCTIN}
+        COMMENT "Copying ${HTIN} to ${HTOUT}."
+        COMMENT "Copying ${CCTIN} to ${CCTOUT}."
+        )
+      SET("${lib_root}_Test_H" "${${lib_root}_Test_H}" "${HTOUT}"
+          CACHE INTERNAL "Agent test headers" FORCE)
     ENDIF(EXISTS "${HTIN}")

     # install test impl
@@ -206,27 +147,82 @@
     ADD_CUSTOM_COMMAND(
       OUTPUT ${CCTOUT}
       COMMAND ${CMD} ${CCTIN} ${CCTOUT}
-      DEPENDS ${CCTIN}
+      DEPENDS ${CCTIN}
       DEPENDS ${CCIN}
       COMMENT "Copying ${CCTIN} to ${CCTOUT}."
       )
-    SET(
-      "${lib_root}_TEST_CC"
-      "${CCOUT}"
-      "${CCTOUT}"
-      CACHE INTERNAL "Agent test source" FORCE
-      )
-
-    ADD_LIBRARY(${lib_root}Tests ${${lib_root}_TEST_CC})
-    TARGET_LINK_LIBRARIES(${lib_root}Tests dl ${LIBS} ${CYCLUS_GTEST_LIBRARIES})
-    SET_TARGET_PROPERTIES(${lib_root}Tests PROPERTIES LINKER_LANGUAGE CXX)
-    SET(
-      "${lib_root}_TEST_LIB"
-      "${lib_root}Tests"
-      CACHE INTERNAL "Agent test library alias." FORCE
-      )
-
+    SET("${lib_root}_TEST_CC" "${${lib_root}_TEST_CC}" "${CCOUT}" "${CCTOUT}"
+        CACHE INTERNAL "Agent test source" FORCE)
   ENDIF(EXISTS "${CCTIN}")
+
+ENDMACRO()
+
+MACRO(INSTALL_CYCLUS_STANDALONE lib_root src_root lib_dir)
+  # clear variables before starting
+  SET("${lib_root}_H" "" CACHE INTERNAL "Agent header" FORCE)
+  SET("${lib_root}_CC" "" CACHE INTERNAL "Agent source" FORCE)
+  SET("${lib_root}_LIB" "" CACHE INTERNAL "Agent library alias." FORCE)
+  SET("${lib_root}_Test_H" "" CACHE INTERNAL "Agent test headers" FORCE)
+  SET("${lib_root}_TEST_CC" "" CACHE INTERNAL "Agent test source" FORCE)
+  SET("${lib_root}_TEST_LIB" "" CACHE INTERNAL "Agent test library alias." FORCE)
+
+  # setup
+  USE_CYCLUS("${lib_root}" "${src_root}")
+
+  # add library
+  ADD_LIBRARY(${lib_root} ${CCOUT})
+  TARGET_LINK_LIBRARIES(${lib_root} dl ${LIBS})
+  SET(CYCLUS_LIBRARIES ${CYCLUS_LIBRARIES} ${lib_root})
+  ADD_DEPENDENCIES(${lib_root} ${HIN} ${HOUT} ${CCIN} ${CCOUT})
+
+  IF(EXISTS "${HIN}")
+    ADD_CUSTOM_COMMAND(
+      OUTPUT ${CCOUT}
+      OUTPUT ${HOUT}
+      COMMAND ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}
+      COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}
+      DEPENDS ${HIN}
+      DEPENDS ${CCIN}
+      DEPENDS ${CYCPP}
+      COMMENT "Executing ${CYCPP} ${HIN} ${PREPROCESSOR} ${HFLAG} ${ORIG} ${INCL_ARGS}"
+      COMMENT "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}"
+      )
+  ELSE(EXISTS "${HIN}")
+    ADD_CUSTOM_COMMAND(
+      OUTPUT ${CCOUT}
+      COMMAND ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}
+      DEPENDS ${CCIN}
+      DEPENDS ${CYCPP}
+      COMMENT "Executing ${CYCPP} ${CCIN} ${PREPROCESSOR} ${CCFLAG} ${ORIG} ${INCL_ARGS}"
+      )
+  ENDIF(EXISTS "${HIN}")
+
+  # install library
+  install(TARGETS ${lib_root} LIBRARY DESTINATION lib/cyclus/${lib_dir}
+          COMPONENT ${lib_root})
+  SET("${lib_root}_LIB" "${lib_root}"
+      CACHE INTERNAL "Agent library alias." FORCE)
+
+  # install headers
+  IF(EXISTS "${HOUT}")
+    INSTALL(FILES ${HOUT} DESTINATION include/cyclus COMPONENT ${lib_root})
+  ENDIF(EXISTS "${HOUT}")
+
+  # install test header
+  IF(EXISTS "${HTOUT}")
+    INSTALL(FILES ${HTOUT} DESTINATION include/cyclus/${lib_dir} COMPONENT ${lib_root})
+  ENDIF(EXISTS "${HTOUT}")
+
+  # build & install test impl
+  IF(EXISTS "${CCTOUT}")
+    ADD_LIBRARY("${lib_root}_tests" ${${lib_root}_TEST_CC})
+    TARGET_LINK_LIBRARIES("${lib_root}_tests" dl ${LIBS} ${CYCLUS_GTEST_LIBRARIES})
+    SET_TARGET_PROPERTIES("${lib_root}_tests" PROPERTIES LINKER_LANGUAGE CXX)
+    SET("${lib_root}_TEST_LIB" "${lib_root}_tests"
+        CACHE INTERNAL "Agent test library alias." FORCE)
+    INSTALL(TARGETS ${lib_root}_tests LIBRARY DESTINATION lib/cyclus/${lib_dir}
+            COMPONENT ${lib_root})
+  ENDIF(EXISTS "${CCTOUT}")

   MESSAGE(STATUS "Finished construction of build files for agent: ${lib_root}")
 ENDMACRO()
@@ -239,7 +235,8 @@
   ADD_DEPENDENCIES(${lib_root} "${${lib_root}_H}" "${${lib_root}_CC}")

   # install library
-  install(TARGETS ${lib_root} LIBRARY DESTINATION lib/cyclus/${lib_dir} COMPONENT ${lib_root})
+  install(TARGETS ${lib_root} LIBRARY DESTINATION lib/cyclus/${lib_dir}
+          COMPONENT ${lib_root})
   SET("${lib_root}_LIB" "${lib_root}" CACHE INTERNAL "Agent library alias." FORCE)

   # install headers
@@ -247,6 +244,24 @@
   IF(EXISTS "${HOUT}")
     INSTALL(FILES ${HOUT} DESTINATION include/cyclus COMPONENT ${lib_root})
   ENDIF(EXISTS "${HOUT}")
+
+  # install test header
+  SET(HTOUT "${lib_root}_tests.h")
+  IF(EXISTS "${HTOUT}")
+    INSTALL(FILES ${HTOUT} DESTINATION include/cyclus/${lib_dir} COMPONENT ${lib_root})
+  ENDIF(EXISTS "${HTOUT}")
+
+  # build & install test impl
+  SET(HTOUT "${lib_root}_tests.cc")
+  IF(EXISTS "${CCTOUT}")
+    ADD_LIBRARY("${lib_root}_tests" ${${lib_root}_TEST_CC})
+    TARGET_LINK_LIBRARIES("${lib_root}_tests" dl ${LIBS} ${CYCLUS_GTEST_LIBRARIES})
+    SET_TARGET_PROPERTIES("${lib_root}_tests" PROPERTIES LINKER_LANGUAGE CXX)
+    SET("${lib_root}_TEST_LIB" "${lib_root}_tests"
+        CACHE INTERNAL "Agent test library alias." FORCE)
+    INSTALL(TARGETS ${lib_root}_tests LIBRARY DESTINATION lib/cyclus/${lib_dir}
+            COMPONENT ${lib_root})
+  ENDIF(EXISTS "${CCTOUT}")

   # clear variables before returning
   SET("${lib_root}_H" "" CACHE INTERNAL "Agent header" FORCE)


[compiler-rt] Disable building of profiling runtime when LLVM_USE_SANITIZER is set

Currently, when doing a ASanified build of LLVM (with Clang, compiler-rt and libcxx) via -DLLVM_USE_SANITIZER=Address and not using any other options, we already disable building of sanitizer runtimes (because they themselves can’t be sanitized) and also exclude the sanitizer tests. However, the same is not done for the profiling runtime, which will build fine, but then all the tests fail due to linking errors. Let’s disable the profiling runtime as well (when LLVM_USE_SANITIZER is set).

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -462,7 +462,7 @@
   set(COMPILER_RT_HAS_MSAN FALSE)
 endif()

-if (PROFILE_SUPPORTED_ARCH AND
+if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
     OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows")
   set(COMPILER_RT_HAS_PROFILE TRUE)
 else()


When run on a ppc64le based platform, the check-sanitizer build looks for
objects with the powerpc64le name. i.e. asan-powerpc64le.a
This change allows those objects to be built.

Differential Revision: http://reviews.llvm.org/D6043

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -134,6 +134,7 @@
     test_target_arch(i386 ${TARGET_32_BIT_CFLAGS})
   elseif("${LLVM_NATIVE_ARCH}" STREQUAL "PowerPC")
     test_target_arch(powerpc64 ${TARGET_64_BIT_CFLAGS})
+    test_target_arch(powerpc64le ${TARGET_64_BIT_CFLAGS})
   elseif("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
     if("${COMPILER_RT_TEST_TARGET_ARCH}" MATCHES "mipsel|mips64el")
       # regex for mipsel, mips64el
@@ -169,9 +170,9 @@

 # Arhcitectures supported by compiler-rt libraries.
 filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
-  x86_64 i386 i686 powerpc64 arm aarch64 mips mips64 mipsel mips64el)
+  x86_64 i386 i686 powerpc64 powerpc64le arm aarch64 mips mips64 mipsel mips64el)
 filter_available_targets(ASAN_SUPPORTED_ARCH
-  x86_64 i386 i686 powerpc64 arm mips mipsel)
+  x86_64 i386 i686 powerpc64 powerpc64le arm mips mipsel)
 filter_available_targets(DFSAN_SUPPORTED_ARCH x86_64)
 filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)
 # LSan common files should be available on all architectures supported


[CMake] Adding simulator supported runtimes should be done in the block that tests simulator capabilities.

Not sure why I put this in the iOS block originally, it shouldn't be there.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -398,6 +398,8 @@
       message(STATUS "iOS Simulator supported arches: ${DARWIN_iossim_ARCHS}")
       if(DARWIN_iossim_ARCHS)
         list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
+        list(APPEND BUILTIN_SUPPORTED_OS iossim)
+        list(APPEND PROFILE_SUPPORTED_OS iossim)
       endif()
       foreach(arch ${DARWIN_iossim_ARCHS})
         list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
@@ -426,8 +428,6 @@
         list(APPEND SANITIZER_COMMON_SUPPORTED_OS ios)
         list(APPEND BUILTIN_SUPPORTED_OS ios)
         list(APPEND PROFILE_SUPPORTED_OS ios)
-        list(APPEND BUILTIN_SUPPORTED_OS iossim)
-        list(APPEND PROFILE_SUPPORTED_OS iossim)
       endif()
       foreach(arch ${DARWIN_ios_ARCHS})
         list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})


search for deb only in linux, nsis only in windows, programmanager only in macos, rpm disabled

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -3,27 +3,36 @@
 ###############################################################################
 #find available package generators

-# RPM
-find_program(RPM_PROGRAM rpm)
-if(EXISTS ${RPM_PROGRAM})
-  list(APPEND CPACK_GENERATOR "RPM")
-endif(EXISTS ${RPM_PROGRAM})
+# RPM (disabled until RedHat/Fedora users/developers need this)
+#find_program(RPM_PROGRAM rpm)
+#if(EXISTS ${RPM_PROGRAM})
+#  list(APPEND CPACK_GENERATOR "RPM")
+#endif(EXISTS ${RPM_PROGRAM})
+
 # DEB
-find_program(DPKG_PROGRAM dpkg)
-if(EXISTS ${DPKG_PROGRAM})
-  list(APPEND CPACK_GENERATOR "DEB")
-endif(EXISTS ${DPKG_PROGRAM})
+if("${CMAKE_SYSTEM}" MATCHES "Linux")
+  find_program(DPKG_PROGRAM dpkg)
+  if(EXISTS ${DPKG_PROGRAM})
+    list(APPEND CPACK_GENERATOR "DEB")
+  endif(EXISTS ${DPKG_PROGRAM})
+endif()
+
 # NSIS
-find_program(NSIS_PROGRAM makensis MakeNSIS)
-if(EXISTS ${NSIS_PROGRAM})
-  list(APPEND CPACK_GENERATOR "NSIS")
-endif(EXISTS ${NSIS_PROGRAM})
+if(WIN32)
+  find_program(NSIS_PROGRAM makensis MakeNSIS)
+  if(EXISTS ${NSIS_PROGRAM})
+    list(APPEND CPACK_GENERATOR "NSIS")
+  endif(EXISTS ${NSIS_PROGRAM})
+endif()
+
 # dpkg
-find_program(PACKAGE_MAKER_PROGRAM PackageMaker
-	    HINTS /Developer/Applications/Utilities)
-if(EXISTS ${PACKAGE_MAKER_PROGRAM})
-  list(APPEND CPACK_GENERATOR "PackageMaker")
-endif(EXISTS ${PACKAGE_MAKER_PROGRAM})
+if(APPLE)
+  find_program(PACKAGE_MAKER_PROGRAM PackageMaker
+               HINTS /Developer/Applications/Utilities)
+  if(EXISTS ${PACKAGE_MAKER_PROGRAM})
+    list(APPEND CPACK_GENERATOR "PackageMaker")
+  endif(EXISTS ${PACKAGE_MAKER_PROGRAM})
+endif()

 include(InstallRequiredSystemLibraries)


Fix: oups, missed this one relative to bug #5

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@142 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_utils.cmake
+++ cmake/pcl_utils.cmake
@@ -167,7 +167,7 @@
         set(LIB_INSTALL_DIR "lib")
     endif(OS_IS_64BIT)
     set(INCLUDE_INSTALL_DIR
-        "include/${PROJECT_NAME_LOWER}-${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
+        "include/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}")
     set(BIN_INSTALL_DIR "bin")
     set(PKGCFG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig")
 endmacro(SET_INSTALL_DIRS)


fix cmake (>=3.0) warning on MacOS

fix cmake (>=3.0) warning on MacOS

closes #2251

git-svn-id: b66b41e514ff40863ef1aa95df2dbf63dd8d6be1@1140 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -115,13 +115,24 @@
       SKIP_BUILD_RPATH 0
     )
   elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)
-    set_target_properties (
-      ${target} PROPERTIES
-      #INSTALL_NAME_DIR "@executable_path/../lib/${CMAKE_PROJECT_NAME}"
-      INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_LIBDIR}"
-#      BUILD_WITH_INSTALL_RPATH 1
-      SKIP_BUILD_RPATH 0
-    )
+  if (NOT (CMAKE_MAJOR_VERSION  LESS 3) )
+      # save rpath
+      set_target_properties (
+        ${target} PROPERTIES
+        INSTALL_RPATH "@executable_path/../${ACG_PROJECT_LIBDIR}"
+        MACOSX_RPATH 1
+        #BUILD_WITH_INSTALL_RPATH 1
+        SKIP_BUILD_RPATH 0
+      )
+    else()
+      # save rpath via install name dir
+      set_target_properties (
+        ${target} PROPERTIES
+        INSTALL_NAME_DIR "@executable_path/../${ACG_PROJECT_LIBDIR}"
+        #BUILD_WITH_INSTALL_RPATH 1
+        SKIP_BUILD_RPATH 0
+      )
+    endif(NOT (CMAKE_MAJOR_VERSION  LESS 3))
   elseif (NOT APPLE)

     set_target_properties (


Fix atlas lapack detection on Fedora

Fix atlas lapack detection on Fedora

--- cmake/FindAtlas.cmake
+++ cmake/FindAtlas.cmake
@@ -13,6 +13,15 @@

 if(ATLAS_LAPACK)
   include(CheckLibraryExists)
+  set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS})
+  check_library_exists("${ATLAS_LAPACK}" clapack_dpotrf "" FOUND_CLAPACK)
+  if(NOT FOUND_CLAPACK)
+    unset(ATLAS_LAPACK CACHE)
+  endif()
+  unset(CMAKE_REQUIRED_LIBRARIES CACHE)
+else()
+  find_file(ATLAS_LAPACK liblapack.so.3 PATHS /usr/lib/atlas /usr/lib64/atlas)
+  find_library(ATLAS_LAPACK NAMES lapack)
   set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${ATLAS_CBLAS})
   check_library_exists("${ATLAS_LAPACK}" clapack_dpotrf "" FOUND_CLAPACK)
   if(NOT FOUND_CLAPACK)


Fix cmsis startup link for L4 series

Fix cmsis startup link for L4 series

--- cmake/FindCMSIS.cmake
+++ cmake/FindCMSIS.cmake
@@ -99,7 +99,10 @@

     LIST(APPEND CMSIS_COMMON_HEADERS core_cm4.h)
     SET(CMSIS_DEVICE_HEADERS stm32l4xx.h system_stm32l4xx.h)
-    SET(CMSIS_DEVICE_SOURCES system_stm32l4xx.c)
+    SET(CMSIS_DEVICE_SOURCES system_stm32l4xx.c)
+    IF(NOT CMSIS_STARTUP_SOURCE)
+        SET(CMSIS_STARTUP_SOURCE startup_stm32l${STM32_CHIP_TYPE_LOWER}.s)
+    ENDIF()
 ENDIF()

 IF(NOT CMSIS_STARTUP_SOURCE)


Fixed inclusion of imgui_tables.cpp source file

--- cmake/FindImGui.cmake
+++ cmake/FindImGui.cmake
@@ -26,7 +26,6 @@
 set(IMGUI_SOURCES
   ${IMGUI_INCLUDE_DIR}/imgui.cpp
   ${IMGUI_INCLUDE_DIR}/imgui_draw.cpp
-  ${IMGUI_INCLUDE_DIR}/imgui_tables.cpp
   ${IMGUI_INCLUDE_DIR}/imgui_widgets.cpp
   ${IMGUI_INCLUDE_DIR}/misc/cpp/imgui_stdlib.cpp
 )
@@ -49,6 +48,10 @@
 # Transform '#define IMGUI_VERSION "X.Y"' into 'X.Y'
 string(REGEX REPLACE ".*\"(.*)\".*" "\\1" IMGUI_VERSION "${IMGUI_VERSION}")

+if(${IMGUI_VERSION} VERSION_GREATER_EQUAL "1.80")
+  list(APPEND IMGUI_SOURCES ${IMGUI_INCLUDE_DIR}/imgui_tables.cpp)
+endif()
+
 # Check required version
 if(${IMGUI_VERSION} VERSION_LESS ${ImGui_FIND_VERSION})
   set(IMGUI_FOUND FALSE)


strip librealsense library on install

strip librealsense library on install

--- cmake/FixRPaths.cmake
+++ cmake/FixRPaths.cmake
@@ -1,5 +1,10 @@
 file(GLOB installedSOs "${CMAKE_INSTALL_PREFIX}/fast/lib/*.so*")
 foreach(SO ${installedSOs})
+    if(SO MATCHES "^.*librealsense.*$")
+    message("-- Setting runtime path of ${SO} and stripping..")
+    execute_process(COMMAND strip -s ${SO} COMMAND patchelf --set-rpath "$ORIGIN/../lib" ${SO})
+    else()
     message("-- Setting runtime path of ${SO}")
     execute_process(COMMAND patchelf --set-rpath "$ORIGIN/../lib" ${SO})
-endforeach()+    endif()
+endforeach()


Fix SDK version selection

Fix SDK version selection

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -2,7 +2,7 @@
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc)
 file(MAKE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build)
 message("Generating project files...")
-execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32
+execute_process(COMMAND ${CMAKE_COMMAND} ${CMAKE_CURRENT_SOURCE_DIR} -T v142 -A Win32 -D CMAKE_SYSTEM_VERSION=10.0.17763.0
   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/msvc/build
   RESULT_VARIABLE success
 )


r9544/sofa : REVERT cmake changes for freeglut on win32 from r9539 (unfortunately different than on linux...)

Former-commit-id: a43686100fa29ad171da21e0533d3309968f883f

--- cmake/externals.cmake
+++ cmake/externals.cmake
@@ -70,7 +70,7 @@
 	if(WIN32)
 		set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} "glu32")
 		if (SOFA-EXTERNAL_HAVE_FREEGLUT)
-			find_package(GLUT REQUIRED)
+			set(GLUT_LIBRARIES "freeglut")
 		else()
 			set(GLUT_LIBRARIES "glut32")
 		endif()


Remove all mentions of ZLIB. (#49)

Remove all mentions of ZLIB. (#49)

We do not actually use zlib anywhere anymore.

--- cmake/functions.cmake
+++ cmake/functions.cmake
@@ -32,7 +32,6 @@
     USES_PCL
     USES_ROS
     USES_YAMLCPP
-    USES_ZLIB
   )
   set(ONE_VALUE_ARG )
   set(MULTI_VALUE_ARGS SRCS HDRS DEPENDS)
@@ -86,12 +85,6 @@
     target_link_libraries("${NAME}" ${catkin_LIBRARIES})
     add_dependencies("${NAME}" ${catkin_EXPORTED_TARGETS}
   )
-  endif()
-
-  if(ARG_USES_ZLIB)
-    target_include_directories("${NAME}" SYSTEM ${VISIBILITY}
-      "${ZLIB_INCLUDE_DIRS}")
-    target_link_libraries("${NAME}" ${ZLIB_LIBRARIES})
   endif()

   if(ARG_USES_CARTOGRAPHER)


Fixed status bar hiding through plist file

--- cmake/oryol_osx.cmake
+++ cmake/oryol_osx.cmake
@@ -108,6 +108,8 @@
             "    <true/>\n"
             "    <key>UIStatusBarHidden</key>\n"
             "    <true/>\n"
+            "    <key>UIViewControllerBasedStatusBarAppearance</key>\n"
+            "    <false/>\n"
             "    <key>UIInterfaceOrientation</key>\n"
             "    <string>UIInterfaceOrientationLandscapeRight</string>\n"
             "    <key>UISupportedInterfaceOrientations</key>\n"


removing unnecessary include path

removing unnecessary include path

--- tools/cmake/UNIVERSALCommon.cmake
+++ tools/cmake/UNIVERSALCommon.cmake
@@ -23,7 +23,6 @@

 if(EXISTS ${UNIVERSAL_DIR}/include/universal/posit/posit.hpp)
   list(APPEND UNIVERSAL_INCLUDE_DIRS "${UNIVERSAL_DIR}/include")
-  list(APPEND UNIVERSAL_INCLUDE_DIRS "${UNIVERSAL_DIR}/include/universal/posit")
 else()
   message(STATUS "Couldn't find the posit include directory at ${UNIVERSAL_DIR}/include")
 endif(EXISTS ${UNIVERSAL_DIR}/include/universal/posit/posit.hpp)


BUG: cmake: Ensure git and svn executable are propagated

This problem was not revealed when Slicer extensions are
configured and built automatically by the Extensions build system setup
on the factory machines. In that case, variables like git and svn paths
are explicitly passed to the extension and added to the cache
using the "-D" cmake argument.

Instead, this commit fixes a problem occurring only when:

(1) svn or git is NOT in  the path

and

(2) extension is configured by only passing
    "-DSlicer_DIR:PATH=/path/to/Slicer-SuperBuild-Release/Slicer-build/"

In that case, because the values of Subversion_SVN_EXECUTABLE and
GIT_EXECUTABLE are retrieved in ExternalProjectDependency.cmake
in way that trigger https://gitlab.kitware.com/cmake/cmake/issues/15448

This commit explicitly pass then in SuperBuild.cmake despite the fact
they are already "mark_as_superbuild" in SlicerEnableExtensionTesting.cmake
used within SlicerConfig.cmake

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -68,6 +68,10 @@
     -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}
+    # XXX Workaround https://gitlab.kitware.com/cmake/cmake/issues/15448
+    #     and explicitly pass GIT_EXECUTABLE and Subversion_SVN_EXECUTABLE
+    -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE}
+    -DSubversion_SVN_EXECUTABLE:FILEPATH=${Subversion_SVN_EXECUTABLE}
   SOURCE_DIR ${DCMQI_SOURCE_DIR}
   BINARY_DIR ${DCMQI_BINARY_DIR}/${PROJECT_NAME_LC}-build
   PREFIX ${PROJECT_NAME_LC}-prefix


STYLE: Cleaned up unused CMake code

STYLE: Cleaned up unused CMake code

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -26,19 +26,8 @@
   set( BUILD_SHARED_LIBS OFF CACHE BOOL "Use shared libraries" FORCE)
   unsetForSlicer(NAMES CMAKE_MODULE_PATH CMAKE_C_COMPILER CMAKE_CXX_COMPILER DCMTK_DIR ITK_DIR SlicerExecutionModel_DIR VTK_DIR QT_QMAKE_EXECUTABLE ITK_VERSION_MAJOR CMAKE_CXX_FLAGS CMAKE_C_FLAGS Teem_DIR)
   find_package(Slicer REQUIRED)
-  set( ITKvar ITK_DIR SlicerExecutionModel_DIR  ITK_VERSION_MAJOR )
-  #if( ${ITK_VERSION_MAJOR} GREATER 3 AND ${ITK_VERSION_MINOR} GREATER 5 )#ITK_VERSION_MAJOR>3 because we need at least 4.x
-  #  set( KeepSlicerITK ${ITKvar} )
-  #  set( USE_SYSTEM_ITK ON CACHE BOOL "Use system ITK" FORCE )
-  #  set( USE_SYSTEM_SlicerExecutionModel ON CACHE BOOL "Use system SlicerExecutionModel" FORCE )
-  #  message(STATUS "ITK version used by Slicer is at least 4.5. No need to recompile ITK. Using ITK from Slicer")
-  #else()
-    #ITK and SlicerExecutionModel have to be rebuilt because ANTS needs ITK 4.6
-    set( RemoveSlicerITK ${ITKvar} )
-    message(STATUS "ITK version used by Slicer is less than 4.6. Recompiling ITK")
-  #endif()
-  unsetAllForSlicerBut( NAMES VTK_DIR QT_QMAKE_EXECUTABLE DCMTK_DIR Teem_DIR ${KeepSlicerITK} )
-  resetForSlicer(NAMES CMAKE_MODULE_PATH CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS CMAKE_C_FLAGS ${RemoveSlicerITK} )
+  unsetAllForSlicerBut( NAMES VTK_DIR QT_QMAKE_EXECUTABLE DCMTK_DIR Teem_DIR )
+  resetForSlicer(NAMES CMAKE_MODULE_PATH CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS CMAKE_C_FLAGS ITK_DIR SlicerExecutionModel_DIR  ITK_VERSION_MAJOR )
   if( APPLE )
     set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,@loader_path/../../../../../")
   endif()


ENH: updated to include bug fix for composite transform.

The ITKv4 code was updated to include a bug fix from Nick Tustison
regarding the improper inverse interpolator being used.

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -79,15 +79,17 @@
     )
   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG b5dd76061803301e4ec71883c6da201c9452e17a) #2012-10-18 Fix Inverse composit displacement field.
+  set(${proj}_GIT_TAG af8d6ee5f9fa46a916b8b46e03a0b10b38b23e80) #2012-10-18 Fix Inverse composit displacement field.
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
     SOURCE_DIR ${proj}
     BINARY_DIR ${proj}-build
-    ${cmakeversion_external_update}
+    "${cmakeversion_external_update}"
     CMAKE_GENERATOR ${gen}
     CMAKE_ARGS
+      -Wno-dev
+      --no-warn-unused-cli
       ${CMAKE_OSX_EXTERNAL_PROJECT_ARGS}
       ${COMMON_EXTERNAL_PROJECT_ARGS}
       -DBUILD_EXAMPLES:BOOL=OFF


fixing cmake universal package configuration

--- tools/cmake/UNIVERSALCommon.cmake
+++ tools/cmake/UNIVERSALCommon.cmake
@@ -21,11 +21,11 @@
   list(APPEND UNIVERSAL_CXX_DEFINITIONS "-DUNIVERSAL_ASSERT_FOR_THROW")
 endif()

-if(EXISTS ${UNIVERSAL_DIR}/posit/posit.hpp)
-	list(APPEND UNIVERSAL_INCLUDE_DIRS "${UNIVERSAL_DIR}/posit")
+if(EXISTS ${UNIVERSAL_DIR}/include/universal/posit/posit.hpp)
+	list(APPEND UNIVERSAL_INCLUDE_DIRS "${UNIVERSAL_DIR}/include/universal/posit")
 else()
 	list(APPEND UNIVERSAL_INCLUDE_DIRS "${UNIVERSAL_DIR}/../../include")
-endif(EXISTS ${UNIVERSAL_DIR}/posit/posit.hpp)
+endif(EXISTS ${UNIVERSAL_DIR}/include/universal/posit/posit.hpp)

 macro(unum_check_cxx_compiler_flag FLAG RESULT)
   # counts entirely on compiler's return code, maybe better to combine it with check_cxx_compiler_flag


Update example

Update example

--- cmake/Custom.cmake
+++ cmake/Custom.cmake
@@ -13,7 +13,7 @@
 # to group source files in folders (e.g. for MSVC solutions).
 #
 # Example:
-# source_group_by_path("${CMAKE_CURRENT_SOURCE_DIR}/src" "\\\\.h$|\\\\.hpp$|\\\\.cpp$|\\\\.c$|\\\\.ui$|\\\\.qrc$" "Source Files" ${sources})
+# source_group_by_path("${CMAKE_CURRENT_SOURCE_DIR}/src" "\\\\.h$|\\\\.inl$|\\\\.cpp$|\\\\.c$|\\\\.ui$|\\\\.qrc$" "Source Files" ${sources})
 function(source_group_by_path PARENT_PATH REGEX GROUP)

     foreach (FILENAME ${ARGN})


Add targets gtkdoc helper programs and inter-dependencies to custom targets

--- cmake/GtkDoc.cmake
+++ cmake/GtkDoc.cmake
@@ -14,18 +14,20 @@
     set (GTKDOC_FOUND TRUE)

     macro (gtkdoc_build module)
+        message("gtkdoc: module ${module}")
         # file (MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}")
         add_custom_target ("gtkdoc-scan_${module}" ALL
             ${GTKDOC_SCAN_BIN} --module=${module}
                 --source-dir="${CMAKE_SOURCE_DIR}/${module}"
-                --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
+                --output-dir="${CMAKE_CURRENT_BINARY_DIR}/${module}"
                 --rebuild-sections --rebuild-types
                 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

         add_custom_target ("gtkdoc-tmpl_${module}" ALL
             ${GTKDOC_MKTMPL_BIN} --module=${module}
             --output-dir="${CMAKE_CURRENT_BINARY_DIR}"
-            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}"
+            DEPENDS "gtkdoc-scan_${module}")

         add_custom_target ("gtkdoc-docbook_${module}" ALL
             ${GTKDOC_MKDB_BIN} --module=${module}
@@ -33,20 +35,16 @@
                 --source-suffixes=c,h --output-format=xml
                 --default-includes=${module}/${module}.h
                 --sgml-mode --main-sgml-file=${module}.sgml
-            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
-
-        add_dependencies ("gtkdoc-docbook_${module}"
-            "gtkdoc-tmpl_${module}"
-            "gtkdoc-scan_${module}")
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}"
+            DEPENDS "gtkdoc-tmpl_${module}")

         # Keep this target alone, otherwise build fails
         add_custom_target ("gtkdoc-html_${module}" ALL
             ${GTKDOC_MKHTML_BIN} ${module}
-            "${CMAKE_CURRENT_BINARY_DIR}/${module}.sgml"
-            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html")
+            "${CMAKE_CURRENT_BINARY_DIR}/${module}/${module}.sgml"
+            WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${module}/html"
+            DEPENDS "gtkdoc-docbook_${module}")

-        add_dependencies ("gtkdoc-html_${module}"
-            "gtkdoc-docbook_${module}")
     endmacro (gtkdoc_build module)

     macro (gtkdoc module)


Remove pointless cmake_minimum_required(VERSION ...) statement

--- cmake/Plugin.cmake
+++ cmake/Plugin.cmake
@@ -1,5 +1,3 @@
-cmake_minimum_required(VERSION 2.8.6)
-
 function(add_plugin name)
   add_library(${name} MODULE ${ARGN})


Make sure that we are using the compiler we support [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -1,6 +1,23 @@
 MACRO(INITIALISE_PROJECT)
 #    SET(CMAKE_VERBOSE_MAKEFILE ON)
     SET(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+    # Make sure that we are using the compiler we support
+
+    IF(WIN32)
+        IF(   NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"
+           OR NOT ${MSVC_VERSION} EQUAL 1600)
+            MESSAGE(FATAL_ERROR "OpenCOR can only be built using MSVC 2010 on Windows...")
+        ENDIF()
+    ELSEIF(APPLE)
+        IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+            MESSAGE(FATAL_ERROR "OpenCOR can only be built using Clang on OS X...")
+        ENDIF()
+    ELSE()
+        IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+            MESSAGE(FATAL_ERROR "OpenCOR can only be built using GCC on Linux...")
+        ENDIF()
+    ENDIF()

     # Make sure that we are building on a supported architecture
     # Note: normally, we would check the value of CMAKE_SIZEOF_VOID_P, but in


Custom target to build test groups

Custom target to build test groups

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -38,11 +38,13 @@
 endfunction()

 function(ADD_TEST_GROUP _group _source_list)
+  set(group_set "")
   foreach(_test ${_source_list})
     get_filename_component(_test "${_test}" NAME)
     get_filename_component(_project_name "${_test}" NAME_WE)

     add_executable(${_project_name} ${_test})
+    set(group_set ${group_set} ${_project_name})

     include_directories(${_project_name} "${_sycl_gtx_include_path}")
     include_directories(${_project_name} ${OpenCL_INCLUDE_DIRS})
@@ -58,4 +60,10 @@

     add_test(NAME ${_project_name} COMMAND ${_project_name})
   endforeach()
+
+  add_custom_target(${_group}_tests DEPENDS ${group_set})
+  if(MSVC)
+    set_target_properties(${_group}_tests
+                          PROPERTIES FOLDER "tests")
+  endif(MSVC)
 endfunction()


CMake: hide some Qt-related variables (useful when using ccmake) [ci skip].

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -85,13 +85,17 @@

     SET(REQUIRED_QT_MODULES
         Concurrent
+        Core
+        Gui
         Help
         ${MAC_EXTRAS}
         Network
         OpenGL
         PrintSupport
         Svg
+        UiPlugin
         UiTools
+        WebKit
         WebKitWidgets
         Widgets
         Xml
@@ -100,6 +104,8 @@

     FOREACH(REQUIRED_QT_MODULE ${REQUIRED_QT_MODULES})
         FIND_PACKAGE(Qt5${REQUIRED_QT_MODULE} REQUIRED)
+
+        SET(Qt5${REQUIRED_QT_MODULE}_DIR ${Qt5${REQUIRED_QT_MODULE}_DIR} CACHE INTERNAL "${Qt5${REQUIRED_QT_MODULE}_DIR}" FORCE)
     ENDFOREACH()

     IF(ENABLE_TESTS)


#4 Coverage investigation

#4 Coverage investigation

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -32,5 +32,5 @@
 endif()

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${additional_cxx_flags}")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${additional_cxx_flags_debug}")
-set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${additional_cxx_flags_release}")+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} ${additional_cxx_flags_debug}")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE} ${additional_cxx_flags_release}")


Update libzeug find script (closes #21)

Update libzeug find script (closes #21)

Copied from hpicgs/glow/glow-config.cmake

--- libzeug-config.cmake
+++ libzeug-config.cmake
@@ -1,4 +1,3 @@
-
 # LIBZEUG_FOUND
 # LIBZEUG_INCLUDE_DIR
 # LIBZEUG_SIGNAL_LIBRARY
@@ -62,12 +61,12 @@
 		DOC "The ${LIB_NAME} debug library")

 	if(${LIB_NAME_UPPER}_LIBRARY AND ${LIB_NAME_UPPER}_LIBRARY_DEBUG)
-		set(debug "debug")
-		set(optimized "optimized")
-	endif()
-
-	set(${LIB_NAME_UPPER}_LIBRARIES ${optimized} ${${LIB_NAME_UPPER}_LIBRARY} ${debug} ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
-
+                set(${LIB_NAME_UPPER}_LIBRARIES "optimized" ${${LIB_NAME_UPPER}_LIBRARY} "debug" ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+        elseif(${LIB_NAME_UPPER}_LIBRARY)
+                set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY})
+        elseif(${LIB_NAME_UPPER}_LIBRARY_DEBUG)
+                set(${LIB_NAME_UPPER}_LIBRARIES ${${LIB_NAME_UPPER}_LIBRARY_DEBUG})
+        endif()
 endmacro()

 find(signal ${LIB_PATHS})


Revert to settings used in ead80ae0bded1d674af70d4e9bc83c58efb1cca8

Signed-off-by: Dusty DeWeese <ecf426c960ed624a3b3143c1895d49c821531d9b@gmail.com>

--- xc/common/cmake/arch_define.cmake
+++ xc/common/cmake/arch_define.cmake
@@ -64,12 +64,12 @@

   # Notes on optimized flag settings:
   # These flags have been optimized for the ibex and baselitex designs.
+  # - place_delay_model: delta is ~5% faster than delta_override (default: delta)
   # - acc_fac: Lowering this to 0.7 slightly improves runtime 1-4% (default: 1)
-  # - astar_fac: Increasing this to 2 reduces runtime 2-15% (default: 1.2)
-  # - first_iter_pres_fac: Increasing this to 0.5 reduces runtime 3-4% (default: 0)
-  # - initial_pres_fac: Setting this to 2 reduces runtime 10-20% from the default,
+  # - astar_fac: Increasing this to 1.8 reduces runtime 2-15% (default: 1.2)
+  # - initial_pres_fac: Setting this to 2.828 reduces runtime 10-20% from the default,
   #   and about 3% faster than the previous value of 4 (default: 0.5)
-  # - pres_fac_mult: A lower value of 1.2 performs better given the other parameters by 15% (default: 1.3)
+  # - pres_fac_mult: A lower value of 1.2 performs better given the other parameters (default: 1.3)
   # Based on analysis performed on hydra.vtr.tools for the ibex, baselitex, and bram-n3 designs.
   # These changes did not have a measurable effect on QoR for these designs.
   # More details can be found in the report: https://colab.research.google.com/drive/1X91RGZnvlC7dBjJJUbS7JfqCbPCzJ3Xb
@@ -78,7 +78,7 @@
       --router_heap bucket \
       --clock_modeling route \
       --place_delta_delay_matrix_calculation_method dijkstra \
-      --place_delay_model delta_override \
+      --place_delay_model delta \
       --router_lookahead extended_map \
       --check_route quick \
       --strict_checks off \
@@ -89,9 +89,8 @@
       --base_cost_type delay_normalized_length_bounded \
       --bb_factor 10 \
       --acc_fac 0.7 \
-      --astar_fac 2 \
-      --first_iter_pres_fac 0.5 \
-      --initial_pres_fac 2 \
+      --astar_fac 1.8 \
+      --initial_pres_fac 2.828 \
       --pres_fac_mult 1.2 \
       --check_rr_graph off \
       --suppress_warnings \${OUT_NOISY_WARNINGS},sum_pin_class:check_unbuffered_edges:load_rr_indexed_data_T_values:check_rr_node:trans_per_R:check_route:set_rr_graph_tool_comment:calculate_average_switch"


fpta: subtree-pull libfptu upstream.

fpta: subtree-pull libfptu upstream.

Merge commit '4f27a926782cb5d9a224f4ac5fa56e521f50a9b0' into devel

--- externals/libfptu/cmake.fptu/testing.cmake
+++ externals/libfptu/cmake.fptu/testing.cmake
@@ -36,15 +36,15 @@

   find_path(gtest_root
     NAMES CMakeLists.txt
-    PATHS ${gtest_paths}
+    PATHS ${gtest_paths} "${CMAKE_BINARY_DIR}/googletest-src"
     PATH_SUFFIXES googletest/googletest gtest/googletest gtest
     NO_DEFAULT_PATH NO_CMAKE_PATH)

   if(gtest_root)
     message(STATUS "Found GoogleTest sources at ${gtest_root}")
   else()
-    # Download and unpack GoogleTest at configure time
-    configure_file(${CMAKE_SOURCE_DIR}/cmake.fptu/googletest-download.cmake.in googletest-download/CMakeLists.txt)
+    message(STATUS "Not found GoogleTest sources, downloading it...")
+    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake.fptu/googletest-download.cmake.in ${CMAKE_BINARY_DIR}/googletest-download/CMakeLists.txt)
     execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
       RESULT_VARIABLE result
       WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/googletest-download)


Restore cmake to use 10.6 hacked locally to 10.8 of which TC does not approve

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -104,8 +104,13 @@
     OUTPUT_VARIABLE XCODE_VERSION )

   # To support a different SDK update these Xcode settings:
-    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.8)
-  set(CMAKE_OSX_SYSROOT macosx10.8)
+  if (XCODE_VERSION GREATER 4.2)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
+  else (XCODE_VERSION GREATER 4.2)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+  endif (XCODE_VERSION GREATER 4.2)
+
+  set(CMAKE_OSX_SYSROOT macosx10.6)
   set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")

   set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)


From Eric Wing,
"These enhancements make it much easier to control which libraries get
found by FIND_ using environmental variables. The problem with the old
script was that CMake searches what it considers system paths first.
This makes it difficult to override in the case where you might have a
stable version in /usr/local, but are trying to build a bleeding edge
release in the non-standard location /bleeding-edge.

I went to the CMake mailing list hoping to find a good solution to
this. Unfortunately, there isn't one, and I have to do something
rather bone-headed in the Find module. Basically, I have to run FIND_
twice: once with default search paths turned off and my environmental
variables listed, and again with standard search paths reenabled. At
least it works.

I also added a few more environmental variables, specifically:
OPENTHREADS_INCLUDE_DIR
OPENTHREADS_LIBRARY_DIR

These two variables address the shortcoming of OPENTHREADS_DIR in the
case where the include path and library path don't share a common
parent.

Put all this together, and you can setup an automated shell script or
Microsoft .bat file to configure and build your application in an
automated step.

You still should be able to use the key CMake variables like
CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH to find things, but it will
occur after the environmental paths are searched. The reason for this
is that the OPENTHREADS_INCLUDE_DIR and OPENTHREADS_LIBRARY_DIR are
more specific. This prevents the accidental ordering problem where you
might use CMAKE_INCLUDE_PATH to find some other component like GLUT,
but didn't want to accidentally include an older version of
OpenThreads located in the same area.

As the ultimate override, you can still pass -DVAR=value arguments to
cmake and it will take these above all else. However, it's safer for
people to not use these in case we modify the script and change the
variable names.

Finally, I'm wondering if we can kill the ${CMAKE_INSTALL_PREFIX}
searches in the Find module. As I've said before, this is kind of a
hack and the variable wasn't really intended to be used in this way.
And I just got bitten by it in some bad corner cases. The problem is
that if you don't explicitly set the ${CMAKE_INSTALL_PREFIX}, CMake
sets a default value for it (such as /usr/local). The problem is that
/usr/local may not be the place you want searched. If you wait to set
the ${CMAKE_INSTALL_PREFIX} in the ccmake GUI, then FIND_ is already
run once on ${CMAKE_INSTALL_PREFIX=/usr/local. If you were planning to
change the value in the GUI, it's too late if you had a stuff in
/usr/local because FIND_ already found something and won't change the
value when you reconfigure since it is already set. You will have to
manually change the value yourself. Furthermore, as another problem
example, on the Mac, /Library/Frameworks is supposed to be searched
before /usr/local, but ${CMAKE_INSTALL_PREFIX} kept causing stuff in
/usr/local to be hit first which took me a really long time to
understand how this was happenning. The work around is that I must
push the ${CMAKE_INSTALL_PREFIX} search to the very end as not to
conflict with anything else. But I think it would be much better if we
removed it entirely.

And with so many different environmental variables at our disposal, I
don't think we need this one:

(Checked by CMake automatically:)
CMAKE_INCLUDE_PATH
CMAKE_SYSTEM_INCLUDE_PATH
CMAKE_LIBRARY_PATH
CMAKE_SYSTEM_LIBRARY_PATH
PATH
LIB

(Checked by us:)
OPENTHREADS_INCLUDE_DIR
OPENTHREADS_LIBRARY_DIR
OPENTHREADS_DIR
OSG_INCLUDE_DIR
OSG_LIBRARY_DIR
OSG_DIR
"

--- CMakeModules/FindOpenThreads.cmake
+++ CMakeModules/FindOpenThreads.cmake
@@ -20,70 +20,125 @@
 # Header files are presumed to be included like
 # #include <OpenThreads/Thread>

-# Try the user's environment request before anything else.
+# To make it easier for one-step automated configuration/builds,
+# we leverage environmental paths. This is preferable
+# to the -DVAR=value switches because it insulates the
+# users from changes we may make in this script.
+# It also offers a little more flexibility than setting
+# the CMAKE_*_PATH since we can target specific components.
+# However, the default CMake behavior will search system paths
+# before anything else. This is problematic in the cases
+# where you have an older (stable) version installed, but
+# are trying to build a newer version.
+# CMake doesn't offer a nice way to globally control this behavior
+# so we have to do a nasty "double FIND_" in this module.
+# The first FIND disables the CMAKE_ search paths and only checks
+# the environmental paths.
+# If nothing is found, then the second find will search the
+# standard install paths.
+# Explicit -DVAR=value arguments should still be able to override everything.

 FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
-  ${CMAKE_INSTALL_PREFIX}/include
+	$ENV{OPENTHREADS_INCLUDE_DIR}
 	$ENV{OPENTHREADS_DIR}/include
 	$ENV{OPENTHREADS_DIR}
+	$ENV{OSG_INCLUDE_DIR}
 	$ENV{OSG_DIR}/include
 	$ENV{OSG_DIR}
-	~/Library/Frameworks
-	/Library/Frameworks
-	/usr/local/include
-	/usr/include
-	/sw/include # Fink
-	/opt/local/include # DarwinPorts
-	/opt/csw/include # Blastwave
-	/opt/include
-	[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
+	NO_DEFAULT_PATH
 )
+
+IF(NOT OPENTHREADS_INCLUDE_DIR)
+	FIND_PATH(OPENTHREADS_INCLUDE_DIR OpenThreads/Thread
+		~/Library/Frameworks
+		/Library/Frameworks
+		/usr/local/include
+		/usr/include
+		/sw/include # Fink
+		/opt/local/include # DarwinPorts
+		/opt/csw/include # Blastwave
+		/opt/include
+		[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
+		${CMAKE_INSTALL_PREFIX}/include # hack: this should be last because it can interfere badly with other search paths in the case where you do not explicitly set this value and CMake invokes its default value which may not be what you want.
+	)
+ENDIF(NOT OPENTHREADS_INCLUDE_DIR)

 FIND_LIBRARY(OPENTHREADS_LIBRARY
-	NAMES OpenThreads  OpenThreadsWin32
+	NAMES OpenThreads OpenThreadsWin32
 	PATHS
-	${CMAKE_INSTALL_PREFIX}/lib
+	$ENV{OPENTHREADS_LIBRARY_DIR}
 	$ENV{OPENTHREADS_DIR}/lib64
 	$ENV{OPENTHREADS_DIR}/lib
 	$ENV{OPENTHREADS_DIR}
+	$ENV{OSG_LIBRARY_DIR}
 	$ENV{OSG_DIR}/lib64
 	$ENV{OSG_DIR}/lib
 	$ENV{OSG_DIR}
-	~/Library/Frameworks
-	/Library/Frameworks
-	/usr/local/lib64
-	/usr/local/lib
-	/usr/lib64
-	/usr/lib
-	/sw/lib
-	/opt/local/lib
-	/opt/csw/lib
-	/opt/lib
-	[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
+	NO_DEFAULT_PATH
 )
+
+IF(NOT OPENTHREADS_LIBRARY)
+	FIND_LIBRARY(OPENTHREADS_LIBRARY
+		NAMES OpenThreads OpenThreadsWin32
+		PATHS
+		~/Library/Frameworks
+		/Library/Frameworks
+		/usr/local/lib64
+		/usr/local/lib
+		/usr/lib64
+		/usr/lib
+		/sw/lib64
+		/sw/lib
+		/opt/local/lib64
+		/opt/local/lib
+		/opt/csw/lib64
+		/opt/csw/lib
+		/opt/lib64
+		/opt/lib
+		[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
+		${CMAKE_INSTALL_PREFIX}/lib64 # hack: this should be last because it can interfere badly with other search paths in the case where you do not explicitly set this value and CMake invokes its default value which may not be what you want.
+		${CMAKE_INSTALL_PREFIX}/lib # hack
+	)
+ENDIF(NOT OPENTHREADS_LIBRARY)
+
+
 FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
-	NAMES  OpenThreadsd  OpenThreadsWin32d
+	NAMES OpenThreadsd OpenThreadsWin32d
 	PATHS
-	${CMAKE_INSTALL_PREFIX}/lib
+	$ENV{OPENTHREADS_LIBRARY_DIR}
 	$ENV{OPENTHREADS_DIR}/lib64
 	$ENV{OPENTHREADS_DIR}/lib
 	$ENV{OPENTHREADS_DIR}
+	$ENV{OSG_LIBRARY_DIR}
 	$ENV{OSG_DIR}/lib64
 	$ENV{OSG_DIR}/lib
 	$ENV{OSG_DIR}
-	~/Library/Frameworks
-	/Library/Frameworks
-	/usr/local/lib64
-	/usr/local/lib
-	/usr/lib64
-	/usr/lib
-	/sw/lib
-	/opt/local/lib
-	/opt/csw/lib
-	/opt/lib
-	[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
+	NO_DEFAULT_PATH
 )
+
+IF(NOT OPENTHREADS_LIBRARY_DEBUG)
+	FIND_LIBRARY(OPENTHREADS_LIBRARY_DEBUG
+		NAMES OpenThreadsd OpenThreadsWin32d
+		PATHS
+		/usr/local/lib64
+		/usr/local/lib
+		/usr/lib64
+		/usr/lib
+		/sw/lib64
+		/sw/lib
+		/opt/local/lib64
+		/opt/local/lib
+		/opt/csw/lib64
+		/opt/csw/lib
+		/opt/lib64
+		/opt/lib
+		[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
+		${CMAKE_INSTALL_PREFIX}/lib64 # hack: this should be last because it can interfere badly with other search paths in the case where you do not explicitly set this value and CMake invokes its default value which may not be what you want.
+		${CMAKE_INSTALL_PREFIX}/lib # hack
+	)
+ENDIF(NOT OPENTHREADS_LIBRARY_DEBUG)
+

 IF(OPENTHREADS_LIBRARY)
   IF(NOT OPENTHREADS_LIBRARY_DEBUG)


FindVOTCA_TOOLS.cmake: update copyright

FindVOTCA_TOOLS.cmake: update copyright

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -6,7 +6,7 @@
 #  VOTCA_TOOLS_FOUND        - True if expat found.
 #  VOTCA_TOOLS_HAS_SQLITE3  - True if votca tools was build with sqlite3 support
 #
-# Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
+# Copyright 2009-2018 The VOTCA Development Team (http://www.votca.org)
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.


Changed flickr api key to Phoenix-Firestorm API

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -126,8 +126,8 @@
 set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")

 # Flickr API keys.
-set(FLICKR_API_KEY "ebc94a4d2651c33404b0fb8ee1b78958")
-set(FLICKR_API_SECRET "73efdfa10ebe7625")
+set(FLICKR_API_KEY "daaabff93a967e0f37fa18863bb43b29")
+set(FLICKR_API_SECRET "846f0958020b553e")

 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")


Switch off the warnings in the compilation of G__*

--- cmake/ALICE_CMake.cmake
+++ cmake/ALICE_CMake.cmake
@@ -390,6 +390,7 @@
   # Format neccesary arguments
   ALICE_Format(DINC "-I" "" "${DINC};${CMAKE_INCLUDE_EXPORT_DIRECTORY}")
   set_source_files_properties(${PDS} PROPERTIES GENERATED TRUE)
+  set_source_files_properties(${PDS} PROPERTIES COMPILE_FLAGS "-w")
   add_custom_command(OUTPUT  ${PDS}
                      COMMAND cd ${PROJECT_SOURCE_DIR} && ${ROOTCINT} -f ${CMAKE_CURRENT_BINARY_DIR}/${PDS} -c -D_MODULE=\\\"${MODULE}\\\" ${DEDEFINE} ${DCINTFLAGS} ${DINC} ${DCINTHDRS} ${DDH}
                      WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}


If we find jsoncpp the target way, hide the library way's variables to avoid confusion.

--- cmake/FindJsonCpp.cmake
+++ cmake/FindJsonCpp.cmake
@@ -220,6 +220,14 @@
 			set_target_properties(JsonCpp::JsonCppStatic PROPERTIES
 				INTERFACE_INCLUDE_DIRECTORIES "${JSONCPP_IMPORTED_INCLUDE_DIRS}"
 				INTERFACE_LINK_LIBRARIES "${JSONCPP_IMPORTED_LIBRARY_STATIC}")
+		endif()
+
+		# Hide the stuff we didn't, and no longer, need.
+		if(NOT JsonCpp_LIBRARY)
+			unset(JsonCpp_LIBRARY CACHE)
+		endif()
+		if(NOT JsonCpp_INCLUDE_DIR)
+			unset(JsonCpp_INCLUDE_DIR CACHE)
 		endif()
 	endif()