Remove dead file.

Remove dead file.

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@249080 91177308-0d34-0410-b5e6-96231b3b80d8

--- tools/lld/install_symlink.cmake
+++ tools/lld/install_symlink.cmake
@@ -1,24 +0,0 @@
-# We need to execute this script at installation time because the
-# DESTDIR environment variable may be unset at configuration time.
-# See PR8397.
-if(UNIX)
-  set(LINK_OR_COPY create_symlink)
-  set(DESTDIR $ENV{DESTDIR})
-else()
-  set(LINK_OR_COPY copy)
-endif()
-
-# CMAKE_EXECUTABLE_SUFFIX is undefined on cmake scripts. See PR9286.
-if(WIN32)
-  set(EXECUTABLE_SUFFIX ".exe")
-else()
-  set(EXECUTABLE_SUFFIX "")
-endif()
-
-set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/bin/")
-
-message("Creating lld-link")
-
-execute_process(
-  COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "lld${EXECUTABLE_SUFFIX}" "lld-link${EXECUTABLE_SUFFIX}"
-  WORKING_DIRECTORY "${bindir}")


ARROW-15830: [C++] Ensure target directory exists before running Substrait generation

Closes #12548 from pitrou/ARROW-15830-ubuntu-cpp-bundled

Authored-by: Antoine Pitrou <9359a4d812173b65a3a0094cd86363e79731a3c2@python.org>
Signed-off-by: Sutou Kouhei <73218711cdd5d5c30ac66da3cc4d9d9204caf34b@clear-code.com>

--- cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1651,6 +1651,7 @@
   set(SUBSTRAIT_LOCAL_DIR ${SOURCE_DIR})

   set(SUBSTRAIT_CPP_DIR "${CMAKE_CURRENT_BINARY_DIR}/substrait_ep-generated")
+  file(MAKE_DIRECTORY ${SUBSTRAIT_CPP_DIR})

   set(SUBSTRAIT_SUPPRESSED_WARNINGS)
   if(MSVC)


Disable null prefix on certain FreeCAD* targets

--- cMake/FreeCadMacros.cmake
+++ cMake/FreeCadMacros.cmake
@@ -223,7 +223,9 @@
     if(WIN32)
         set_target_properties(${ProjectName} PROPERTIES DEBUG_OUTPUT_NAME ${OutputName}_d)
     else(WIN32)
-        set_target_properties(${ProjectName} PROPERTIES PREFIX "")
+        if(NOT ${ProjectName} MATCHES "^FreeCAD(App|Base|Gui|Main|MainCmd)$")
+            set_target_properties(${ProjectName} PROPERTIES PREFIX "")
+        endif(NOT ${ProjectName} MATCHES "^FreeCAD(App|Base|Gui|Main|MainCmd)$")

         if(${ARGC} STREQUAL 4)
             set_target_properties(${ProjectName} PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}${ARGV3})


PKG: fix install qt.conf in wrong if condition

--- SuperBuild/Packaging/PackageHelper.cmake
+++ SuperBuild/Packaging/PackageHelper.cmake
@@ -158,15 +158,6 @@
       ${CMAKE_BINARY_DIR}/make_symlinks
       DESTINATION ${PKG_STAGE_DIR}
       )
-
-    #We need qt.conf on windows and linux. macx is still to be tested.
-    #So just not add this without testing
-    if(NOT APPLE)
-      install(PROGRAMS
-        ${PACKAGE_SUPPORT_FILES_DIR}/qt.conf
-        DESTINATION ${PKG_STAGE_DIR}/bin
-        )
-    endif()

   ########### install patchelf( linux only) ##################
     if(NOT APPLE)
@@ -177,6 +168,15 @@

   if(PKG_GENERATE_XDK)
     func_install_xdk_files()
+  endif()
+
+  # We need qt.conf on windows and linux. macx is still to be tested.
+  # So just not add this without testing
+  if(NOT APPLE)
+    install(PROGRAMS
+      ${PACKAGE_SUPPORT_FILES_DIR}/qt.conf
+      DESTINATION ${PKG_STAGE_DIR}/bin
+      )
   endif()

   install(FILES


version check

version check

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -154,3 +154,11 @@
   ENDIF (JAVA_AWT_INCLUDE_PATH)
 ENDIF (VTK_WRAP_JAVA)

+# for cmake version 1.1 and later
+IF (CMAKE_MAJOR_VERSION MATCHES [1-9][0-9]*)
+  IF (CMAKE_MINOR_VERSION MATCHES [1-9][0-9]*)
+    SET(VTK_MAKE_INSTANTIATOR 1)
+  ENDIF (CMAKE_MINOR_VERSION MATCHES [1-9][0-9]*)
+ENDIF (CMAKE_MAJOR_VERSION MATCHES [1-9][0-9]*)
+
+


find gstreamer headers in the default location CCMAIL: cbro@semperpax.com CCMAIL: andriusmao@gmail.com

find gstreamer headers in the default location
CCMAIL: 0c2851a4f8ab4aa5606e69c0757771dd13dbe686@semperpax.com
CCMAIL: 2f097127025817f451e61f96cd8639181dbdabdd@gmail.com

--- cmake/FindGStreamer.cmake
+++ cmake/FindGStreamer.cmake
@@ -33,6 +33,7 @@
 FIND_PATH(GSTREAMER_INCLUDE_DIR gst/gst.h
    PATHS
    ${PKG_GSTREAMER_INCLUDE_DIRS}
+   PATH_SUFFIXES gstreamer-0.10
    )

 FIND_LIBRARY(GSTREAMER_LIBRARIES NAMES gstreamer-0.10


rm obsolete option

rm obsolete option

--- cmake/custom/custom.cmake
+++ cmake/custom/custom.cmake
@@ -1,13 +1,5 @@
 include(ExternalProject)

-
-# FIXME
-option(ENABLE_FORTRAN_INTERFACE "Build Fortran interface" OFF)
-if(ENABLE_FORTRAN_INTERFACE)
-    enable_language(C CXX Fortran)
-else()
-    enable_language(C CXX)
-endif()

 # XCFun code
 set(ExternalProjectCMakeArgs


Use standard package handling, search in both system and local paths for clBLAS, add CLBLAS_ROOT_DIR hint.

--- common/FindCLBLAS.cmake
+++ common/FindCLBLAS.cmake
@@ -1,57 +1,95 @@
-# Downloads and builds the clBLAS library from github.com
-# Defines the following variables
-# * CLBLAS_PACKAGE_DIR     The install location of the clBLAS library
-# * CLBLAS_INCLUDE_DIR     Location of the clBLAS headers
-# * CLBLAS_LIBRARY_DIR     Location of the clBlas libraries
-# * CLBLAS_LIBRARY         List of libraries
+# - Find clBLAS, AMD's OpenCL BLAS library

-# Look a directory above for the clBlas folder
-FIND_PATH(          CLBLAS_SOURCE_DIR
+# This script defines the standard variables
+#  CLBLAS_FOUND           - Whether or not clBLAS was located
+#  CLBLAS_INCLUDE_DIRS    - All include directories for clBLAS headers
+#  CLBLAS_LIBRARIES       - All libraries for clBLAS
+#
+# This script also creates a few non-standard variables that may be useful
+# in your project:
+#
+#  CLBLAS_SOURCE_DIR      - The location of the clBLAS src directory, if found.
+#  CLBLAS_PACKAGE_DIR     - The location of the clBLAS package directory, if found.
+#
+# If your clBLAS installation is not in a standard installation directory, you
+# may provide a hint to where it may be found. Simply set the value CLBLAS_ROOT
+# to the directory containing 'include/clBLAS.h" prior to calling this script.
+#
+#=============================================================================
+# Copyright 2014 Brian Kloppenborg
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#=============================================================================
+
+# Find packages on which clBLAS depends
+find_package(OpenCL REQUIRED)
+
+# Set the CLBLAS_ROOT_DIR relative to the current directory.
+IF(NOT DEFINED ${CLBLAS_ROOT_DIR})
+    LIST(APPEND CLBLAS_ROOT_DIR ${CMAKE_SOURCE_DIR}/.. ${CMAKE_SOURCE_DIR}/../..)
+ENDIF()
+
+FIND_PATH(CLBLAS_SOURCE_DIR
     NAMES           src/clBlas.h src/clAmdBlas.h
     PATH_SUFFIXES   clblas clBLAS clBlas CLBLAS
     DOC             "Location of the clBLAS source directory"
-    PATHS           ${CMAKE_SOURCE_DIR}/..
-                    ${CMAKE_SOURCE_DIR}/../..)
-
-FIND_PATH( CLBLAS_PACKAGE_DIR
-    NAMES   lib64 include bin
-    DOC     "Location of the clBLAS install directory."
-    PATHS   ${CLBLAS_SOURCE_DIR}/build/package
+    HINTS           ${CLBLAS_ROOT_DIR}
     NO_DEFAULT_PATH)

-FIND_PATH( CLBLAS_INCLUDE_DIR
+FIND_PATH(CLBLAS_PACKAGE_DIR
+    NAMES           bin include lib64
+    PATH_SUFFIXES   build/package
+    DOC             "Location of the clBLAS install/package directory."
+    HINTS           ${CLBLAS_SOURCE_DIR}
+    NO_DEFAULT_PATH)
+
+FIND_PATH(_CLBLAS_INCLUDE_DIR
     NAMES   clBLAS.h
     DOC     "Location of the clBLAS include directory."
-    PATHS   ${CLBLAS_PACKAGE_DIR}/include
+    HINTS   ${CLBLAS_PACKAGE_DIR}/include
             ${CLBLAS_PACKAGE_DIR}/package/include)
-
-FIND_PATH( CLBLAS_LIBRARY_DIR
+
+FIND_PATH(CLBLAS_LIBRARY_DIR
     NAMES   libclBLAS${CMAKE_SHARED_LIBRARY_SUFFIX}
     DOC     "Location of the clBLAS library"
-    PATHS   ${CLBLAS_PACKAGE_DIR}/lib64
+    HINTS   ${CLBLAS_PACKAGE_DIR}/lib64
             ${CLBLAS_PACKAGE_DIR}/package/lib64
 			${CLBLAS_PACKAGE_DIR}/lib64/import
 			${CLBLAS_PACKAGE_DIR}/package/lib64/import)

-FIND_LIBRARY(CLBLAS_LIBRARIES
+FIND_LIBRARY(_CLBLAS_LIBRARY
     NAMES   clBLAS
     DOC     "Library files"
-    PATHS   ${CLBLAS_PACKAGE_DIR}/lib64
+    HINTS   ${CLBLAS_PACKAGE_DIR}/lib64
             ${CLBLAS_PACKAGE_DIR}/package/lib64
 			${CLBLAS_PACKAGE_DIR}/lib64/import
 			${CLBLAS_PACKAGE_DIR}/package/lib64/import)

-IF(CLBLAS_INCLUDE_DIR AND CLBLAS_LIBRARIES AND CLBLAS_LIBRARY_DIR)
-    SET( CLBLAS_FOUND ON CACHE BOOL "CLBLAS Found" )
-ELSE()
-    SET( CLBLAS_FOUND OFF CACHE BOOL "CLBLAS Found" )
-ENDIF()
+# Set up the includes and library directories
+SET(CLBLAS_LIBRARY ${_CLBLAS_LIBRARY})
+SET(CLBLAS_INCLUDE_DIRS ${_CLBLAS_INCLUDE_DIR} ${OPENCL_CL_INCLUDE_DIRS})
+SET(CLBLAS_LIBRARIES ${_CLBLAS_LIBRARY} ${OPENCL_LIBRARIES})
+SET(CLBLAS_SOURCE_DIR ${CLBLAS_SOURCE_DIR}
+    CACHE PATH "Path for clBLAS source, if found")
+SET(CLBLAS_PACKAGE_DIR ${CLBLAS_PACKAGE_DIR}
+    CACHE PATH "Path for clBLAS's packaging directory, if found")
+SET(CLBLAS_LIBRARY_DIR ${CLBLAS_LIBRARY_DIR}
+    CACHE PATH "Path for clBLAS's packaging library directory, if found")

-
-MARK_AS_ADVANCED(
-    CLBLAS_FOUND
-    CLBLAS_PACKAGE_DIR
-    CLBLAS_INCLUDE_DIR
-    CLBLAS_LIBRARY_DIR
-    CLBLAS_LIBRARIES
-	)
+# handle the QUIETLY and REQUIRED arguments and set CLBLAS_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE (FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLBLAS DEFAULT_MSG CLBLAS_LIBRARY
+    CLBLAS_INCLUDE_DIRS CLBLAS_LIBRARIES)
+MARK_AS_ADVANCED(CLBLAS_FOUND CLBLAS_PACKAGE_DIR CLBLAS_INCLUDE_DIRS
+    CLBLAS_LIBRARY_DIR CLBLAS_LIBRARIES)


cmake 2.8.10 has slight changes to the internal API

--- cmake/CMakeDetermineCSharpCompiler.cmake
+++ cmake/CMakeDetermineCSharpCompiler.cmake
@@ -92,7 +92,11 @@
 endif (CMAKE_CSharp_COMPILER)

 # configure variables set in this file for fast reload later on
+if(NOT CMAKE_PLATFORM_INFO_DIR) # pre-2.8.10
+  set(CMAKE_PLATFORM_INFO_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
+endif()
+
 configure_file(${CMAKE_SOURCE_DIR}/cmake/CMakeCSharpCompiler.cmake.in
-  ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeCSharpCompiler.cmake IMMEDIATE @ONLY)
+  ${CMAKE_PLATFORM_INFO_DIR}/CMakeCSharpCompiler.cmake IMMEDIATE @ONLY)
 set(CMAKE_CSharp_COMPILER_ENV_VAR "CSC")


- Fixes for linking options on NaCL

- Fixes for linking options on NaCL

--- cmake/Find/FindStandardLibs.cmake
+++ cmake/Find/FindStandardLibs.cmake
@@ -32,7 +32,9 @@
         list ( APPEND CORE_EXTRA_LIBRARIES ${LIBUNWIND_LIBRARIES} )
     endif()

-    list ( APPEND CORE_EXTRA_LIBRARIES X11 )
+    if(NOT NACL AND NOT EMSCRIPTEN)
+        list ( APPEND CORE_EXTRA_LIBRARIES X11 )
+    endif()

     if(COFFEE_BUILD_GLES)
         list ( APPEND CORE_EXTRA_LIBRARIES EGL )


build: disable psabi warning with GCC 7.0 and ARM

--- cmake/OpenCVCompilerOptions.cmake
+++ cmake/OpenCVCompilerOptions.cmake
@@ -134,7 +134,7 @@
   add_extra_compiler_option(-Wshadow)
   add_extra_compiler_option(-Wsign-promo)
   add_extra_compiler_option(-Wuninitialized)
-  if(CV_GCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0))
+  if(CV_GCC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0 OR ARM))
     add_extra_compiler_option(-Wno-psabi)
   endif()
   if(HAVE_CXX11)


provided by kdelibs

provided by kdelibs

svn path=/trunk/KDE/kdepim/; revision=660194

--- cmake/modules/FindKMetaData.cmake
+++ cmake/modules/FindKMetaData.cmake
@@ -1,46 +0,0 @@
-# Once done this will define
-#
-#  KMETADATA_FOUND - system has KMetaData
-#  KMETADATA_INCLUDE_DIR - the KMetaData include directory
-#  KMETADATA_LIBRARIES - Link these to use KMetaData
-#  KMETADATA_DEFINITIONS - Compiler switches required for using KMetaData
-#
-
-FIND_PATH(KMETADATA_INCLUDE_DIR
-  NAMES
-  kmetadata/kmetadata.h
-  PATHS
-  /usr/include
-  /usr/local/include
-  ${KDE4_INCLUDE_DIR}
-  ${INCLUDE_INSTALL_DIR}
-)
-
-FIND_LIBRARY(KMETADATA_LIBRARIES
-  NAMES
-  kmetadata
-  PATHS
-  /usr/lib
-  /usr/local/lib
-  ${KDE4_LIB_DIR}
-  ${LIB_INSTALL_DIR}
-)
-
-if(KMETADATA_INCLUDE_DIR AND KMETADATA_LIBRARIES)
-  set(KMetaData_FOUND TRUE)
-endif(KMETADATA_INCLUDE_DIR AND KMETADATA_LIBRARIES)
-
-if(KMetaData_FOUND)
-  if(NOT KMetaData_FIND_QUIETLY)
-    message(STATUS "Found KMetaData: ${KMETADATA_LIBRARIES}")
-  endif(NOT KMetaData_FIND_QUIETLY)
-else(KMetaData_FOUND)
-  if(KMetaData_FIND_REQUIRED)
-    if(NOT KMETADATA_INCLUDE_DIR)
-      message(FATAL_ERROR "Could not find KMetaData includes.")
-    endif(NOT KMETADATA_INCLUDE_DIR)
-    if(NOT KMETADATA_LIBRARIES)
-      message(FATAL_ERROR "Could not find KMetaData library.")
-    endif(NOT KMETADATA_LIBRARIES)
-  endif(KMetaData_FIND_REQUIRED)
-endif(KMetaData_FOUND)


[cxxmodules] Fix absolute paths for v7 headers in modulemap

Our CMake code for making path to headers relative is broken
for the v7 headers (as they don't have the 'CURRENT_SOURCE/inc'
prefix we check for). This caused that we have absolute paths for
those headers in the modulemap we ship with ROOT. As the paths
are only valid on the same system in the specific build folder,
they prevent anyone from successfully building any ROOT module
with this modulemap.

This patch adds the additional check for v7 headers and also
adds a fallback where we always remove the current source dir
from the paths (which is necessary for all the tests which
don't follow any directory structure).

Also adds a sanity check that should prevent this error in the
future by checking that paths are not absolute before we write
them to the modulemap.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -262,6 +262,8 @@
     endif()
   endforeach()
   string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/inc/" ""  headerfiles "${headerfiles}")
+  string(REPLACE "${CMAKE_CURRENT_SOURCE_DIR}/v7/inc/" ""  headerfiles "${headerfiles}")
+
   # Replace the non-standard folder layout of Core.
   if (ARG_STAGE1 AND ARG_MODULE STREQUAL "Core")
     # FIXME: Glob these folders.
@@ -270,6 +272,22 @@
                      rootcling_stage1 textinput thread unix winnt zip)
     foreach(core_folder ${core_folders})
       string(REPLACE "${CMAKE_SOURCE_DIR}/core/${core_folder}/inc/" ""  headerfiles "${headerfiles}")
+    endforeach()
+  endif()
+
+  # Check that each path here is relative so that it no longer points to the build folder.
+  # If we don't do this, then for example the modulemap might contain absolute paths to the
+  # build folder which would break module compilation.
+  if(PROJECT_NAME STREQUAL ROOT)
+    foreach(hf ${headerfiles})
+      string(REPLACE "${PROJECT_SOURCE_DIR}" "" hfrel "${hf}")
+      # Test folders don't follow this pattern and need absolute paths,
+      # so we don't run our sanity check on them.
+      if(NOT "${hfrel}" MATCHES "/test/")
+        if(IS_ABSOLUTE "${hf}")
+          message(SEND_ERROR "Header path '${hf}' ${hfrel} is not relative!")
+        endif()
+      endif()
     endforeach()
   endif()


Bump cmake requirement to 3.14

Bump cmake requirement to 3.14

While cmake 3.12 does contain the new Python logic,
it doesn't support searching for NumPy (this was
introduced in 3.14). Continue using the old logic
for cmake 3.12 and 3.13.

--- cmake_modules/IMPFindPython.cmake
+++ cmake_modules/IMPFindPython.cmake
@@ -1,8 +1,8 @@
 # Like cmake's FindPython but allows the user to override; should also
 # work (to some degree) with older cmake
 function(imp_find_python)
-  if (${CMAKE_VERSION} VERSION_LESS "3.12.0")
-    message(WARNING "Using old Python detection logic. Recommended to upgrade to cmake 3.12.0 or later")
+  if (${CMAKE_VERSION} VERSION_LESS "3.14.0")
+    message(WARNING "Using old Python detection logic. Recommended to upgrade to cmake 3.14.0 or later")
     if(NOT DEFINED PYTHON_INCLUDE_DIRS)
       execute_process(COMMAND python -c "import sys; print(sys.executable)"
                       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}


Fix test for ability to use std::regex (#1644)

1. Wasn't setting the C++ standard flags properly for the test, so it failed
on some platforms and didn't use std::regex when it could.

2. Revised test -- the prior C++ did not properly discriminate between
what was implemented vs unimplemented on the broken gcc 4.8 (at least
some subsets of regex_match work, but regex_replace does not, until
it was all fully implemented in gcc 4.9).

--- src/cmake/compiler.cmake
+++ src/cmake/compiler.cmake
@@ -161,14 +161,16 @@
     endif ()
 endif ()

+set (CSTD_FLAGS "")
 if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_INTEL)
     if (USE_CPP VERSION_GREATER 11)
         message (STATUS "Building for C++14")
-        add_definitions ("-std=c++14")
+        set (CSTD_FLAGS "-std=c++14")
     else ()
         message (STATUS "Building for C++11")
-        add_definitions ("-std=c++11")
-    endif ()
+        set (CSTD_FLAGS "-std=c++11")
+    endif ()
+    add_definitions (${CSTD_FLAGS})
     if (CMAKE_COMPILER_IS_CLANG)
         # C++ >= 11 doesn't like 'register' keyword, which is in Qt headers
         add_definitions ("-Wno-deprecated-register")
@@ -221,10 +223,13 @@
 include (CMakePushCheckState)
 include (CheckCXXSourceRuns)

+cmake_push_check_state ()
+set (CMAKE_REQUIRED_DEFINITIONS ${CSTD_FLAGS})
 check_cxx_source_runs("
       #include <regex>
       int main() {
-          return std::regex_match(\"abc\", std::regex(\"(a)(.*)\")) ? 0 : 1;
+          std::string r = std::regex_replace(std::string(\"abc\"), std::regex(\"b\"), \" \");
+          return r == \"a c\" ? 0 : -1;
       }"
       USE_STD_REGEX)
 if (USE_STD_REGEX)
@@ -232,7 +237,7 @@
 else ()
     add_definitions (-DUSE_BOOST_REGEX)
 endif ()
-
+cmake_pop_check_state ()

 # Code coverage options
 if (CODECOV AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG))


Make the test cmake creating the output directory depending on the build type &  Set the project output directory to this directory (very useful for debugging under VS)

--- CMake/Wk/WkTest.cmake
+++ CMake/Wk/WkTest.cmake
@@ -12,22 +12,37 @@

 	IF(${project_name}_ENABLE_TESTS)
 		ENABLE_TESTING()
-
+
 		FILE(GLOB testsource RELATIVE ${PROJECT_SOURCE_DIR} test/${test_name}.c test/${test_name}.cc test/${test_name}.cpp )
 		#MESSAGE ( STATUS "Detected ${test_name} Source : ${testsource}" )

 		#To make sure the source file exists
 		IF (testsource)
+			#Create output directories
+			IF ( NOT EXISTS ${PROJECT_BINARY_DIR}/test )
+				FILE ( MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test )
+			ENDIF ( NOT EXISTS ${PROJECT_BINARY_DIR}/test )
+
+			IF ( NOT EXISTS ${PROJECT_BINARY_DIR}/test/${CMAKE_BUILD_TYPE} )
+				FILE ( MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test/${CMAKE_BUILD_TYPE} )
+			ENDIF ( NOT EXISTS ${PROJECT_BINARY_DIR}/test/${CMAKE_BUILD_TYPE} )
+
+			#Set where main library & test executables should be founded (useful for debuging under VS)
+			SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test)
+			#SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
+
+			#build
 			ADD_EXECUTABLE(${test_name} ${testsource})
 			TARGET_LINK_LIBRARIES(${test_name} ${project_name})
 			ADD_DEPENDENCIES(${test_name} ${project_name})
 			GET_TARGET_PROPERTY(${test_name}_LOCATION ${test_name} LOCATION)
-			# moving test target to test subdir
-			IF ( NOT EXISTS ${PROJECT_BINARY_DIR}/test )
-				FILE ( MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test )
-			ENDIF ( NOT EXISTS ${PROJECT_BINARY_DIR}/test )
-			ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${${test_name}_LOCATION} ${PROJECT_BINARY_DIR}/test/)
-			ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E remove ${${test_name}_LOCATION} )
+
+			#move test target to test subdir with build type management
+			#ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E copy ${${test_name}_LOCATION} ${PROJECT_BINARY_DIR}/test/
+			#										COMMENT "Copying File ${test_name} From ${${test_name}_LOCATION} To ${PROJECT_BINARY_DIR}/test/" )
+
+			#ADD_CUSTOM_COMMAND( TARGET ${test_name} POST_BUILD COMMAND ${CMAKE_COMMAND} ARGS -E remove ${${test_name}_LOCATION}
+			#										COMMENT "Removing File ${test_name} From ${${test_name}_LOCATION}" )

 			#if test arguments
 			IF ( ${ARGC} GREATER 2 )


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -7,6 +7,8 @@
 set(CTEST_CMAKE_GENERATOR "${JENKINS_GENERATOR}")
 set(CTEST_BUILD_OPTIONS "${JENKINS_BUILD_OPTIONS}")
 set(CTEST_BUILD_CONFIGURATION "${JENKINS_BUILD_CONFIGURATION}")
+
+set(MEMORYCHECK_COMMAND_OPTIONS "--xml=yes --xml-file=memorycheck_test.xml")

 set(CTEST_COVERAGE_CXX_FLAGS "-DCMAKE_CXX_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
 set(CTEST_COVERAGE_EXE_LD_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=-fprofile-arcs -ftest-coverage")
@@ -35,7 +37,7 @@
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
 set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})

-ctest_start("${JENKINS_DASHBOARD}" ${QUIET_})
+ctest_start("${JENKINS_DASHBOARD}" ${QUIET_})n/MEM
 ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE ${QUIET_})
 ctest_build(RETURN_VALUE BUILDING_RET_VALUE ${QUIET_})
 ctest_test(${QUIET_})


Increase timeout for automagic download of Eigen.

--- Dependencies.cmake
+++ Dependencies.cmake
@@ -55,7 +55,7 @@
         PREFIX ${EXTERNAL_PATH}/Eigen
         #--Download step--------------
         URL https://bitbucket.org/eigen/eigen/get/3.2.9.zip
-        TIMEOUT 30
+        TIMEOUT 60
         #--Update/Patch step----------
         UPDATE_COMMAND ""
         PATCH_COMMAND ""


update FindTBB.cmake to official version by Intel oneAPI, fixes #26

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -1,303 +1,89 @@
-# The MIT License (MIT)
+# Copyright (c) 2020-2021 Intel Corporation
 #
-# Copyright (c) 2015 Justus Calvin
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in all
-# copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# FindTBB
-# -------
+#     http://www.apache.org/licenses/LICENSE-2.0
 #
-# Find TBB include directories and libraries.
-#
-# Usage:
-#
-#  find_package(TBB [major[.minor]] [EXACT]
-#               [QUIET] [REQUIRED]
-#               [[COMPONENTS] [components...]]
-#               [OPTIONAL_COMPONENTS components...])
-#
-# where the allowed components are tbbmalloc and tbb_preview. Users may modify
-# the behavior of this module with the following variables:
-#
-# * TBB_ROOT_DIR          - The base directory the of TBB installation.
-# * TBB_INCLUDE_DIR       - The directory that contains the TBB headers files.
-# * TBB_LIBRARY           - The directory that contains the TBB library files.
-# * TBB_<library>_LIBRARY - The path of the TBB the corresponding TBB library.
-#                           These libraries, if specified, override the
-#                           corresponding library search results, where <library>
-#                           may be tbb, tbb_debug, tbbmalloc, tbbmalloc_debug,
-#                           tbb_preview, or tbb_preview_debug.
-# * TBB_USE_DEBUG_BUILD   - The debug version of tbb libraries, if present, will
-#                           be used instead of the release version.
-#
-# Users may modify the behavior of this module with the following environment
-# variables:
-#
-# * TBB_INSTALL_DIR
-# * TBBROOT
-# * LIBRARY_PATH
-#
-# This module will set the following variables:
-#
-# * TBB_FOUND             - Set to false, or undefined, if we haven’t found, or
-#                           don’t want to use TBB.
-# * TBB_<component>_FOUND - If False, optional <component> part of TBB sytem is
-#                           not available.
-# * TBB_VERSION           - The full version string
-# * TBB_VERSION_MAJOR     - The major version
-# * TBB_VERSION_MINOR     - The minor version
-# * TBB_INTERFACE_VERSION - The interface version number defined in
-#                           tbb/tbb_stddef.h.
-# * TBB_<library>_LIBRARY_RELEASE - The path of the TBB release version of
-#                           <library>, where <library> may be tbb, tbb_debug,
-#                           tbbmalloc, tbbmalloc_debug, tbb_preview, or
-#                           tbb_preview_debug.
-# * TBB_<library>_LIBRARY_DEGUG - The path of the TBB release version of
-#                           <library>, where <library> may be tbb, tbb_debug,
-#                           tbbmalloc, tbbmalloc_debug, tbb_preview, or
-#                           tbb_preview_debug.
-#
-# The following varibles should be used to build and link with TBB:
-#
-# * TBB_INCLUDE_DIRS        - The include directory for TBB.
-# * TBB_LIBRARIES           - The libraries to link against to use TBB.
-# * TBB_LIBRARIES_RELEASE   - The release libraries to link against to use TBB.
-# * TBB_LIBRARIES_DEBUG     - The debug libraries to link against to use TBB.
-# * TBB_DEFINITIONS         - Definitions to use when compiling code that uses
-#                             TBB.
-# * TBB_DEFINITIONS_RELEASE - Definitions to use when compiling release code that
-#                             uses TBB.
-# * TBB_DEFINITIONS_DEBUG   - Definitions to use when compiling debug code that
-#                             uses TBB.
-#
-# This module will also create the "tbb" target that may be used when building
-# executables and libraries.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.

 include(FindPackageHandleStandardArgs)

-if(NOT TBB_FOUND)
+# Firstly search for TBB in config mode (i.e. search for TBBConfig.cmake).
+find_package(TBB QUIET CONFIG)
+if (TBB_FOUND)
+    find_package_handle_standard_args(TBB CONFIG_MODE)
+    return()
+endif ()

-  ##################################
-  # Check the build type
-  ##################################
-
-  if(NOT DEFINED TBB_USE_DEBUG_BUILD)
-    if(CMAKE_BUILD_TYPE MATCHES "(Debug|DEBUG|debug|RelWithDebInfo|RELWITHDEBINFO|relwithdebinfo)")
-      set(TBB_BUILD_TYPE DEBUG)
-    else()
-      set(TBB_BUILD_TYPE RELEASE)
-    endif()
-  elseif(TBB_USE_DEBUG_BUILD)
-    set(TBB_BUILD_TYPE DEBUG)
-  else()
-    set(TBB_BUILD_TYPE RELEASE)
-  endif()
-
-  ##################################
-  # Set the TBB search directories
-  ##################################
-
-  # Define search paths based on user input and environment variables
-  set(TBB_SEARCH_DIR ${TBB_ROOT_DIR} $ENV{TBB_INSTALL_DIR} $ENV{TBBROOT})
-
-  # Define the search directories based on the current platform
-  if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
-    set(TBB_DEFAULT_SEARCH_DIR "C:/Program Files/Intel/TBB"
-                               "C:/Program Files (x86)/Intel/TBB")
+if (NOT TBB_FIND_COMPONENTS)
+    set(TBB_FIND_COMPONENTS tbb tbbmalloc)
+    foreach (_tbb_component ${TBB_FIND_COMPONENTS})
+        set(TBB_FIND_REQUIRED_${_tbb_component} 1)
+    endforeach ()
+endif ()

-    # Set the target architecture
-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
-      set(TBB_ARCHITECTURE "intel64")
-    else()
-      set(TBB_ARCHITECTURE "ia32")
-    endif()
+if (WIN32)
+    list(APPEND ADDITIONAL_LIB_DIRS ENV PATH ENV LIB)
+    list(APPEND ADDITIONAL_INCLUDE_DIRS ENV INCLUDE ENV CPATH)
+else ()
+    list(APPEND ADDITIONAL_LIB_DIRS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH ENV DYLD_LIBRARY_PATH)
+    list(APPEND ADDITIONAL_INCLUDE_DIRS ENV CPATH ENV C_INCLUDE_PATH ENV CPLUS_INCLUDE_PATH ENV INCLUDE_PATH)
+endif ()

-    # Set the TBB search library path search suffix based on the version of VC
-    if(WINDOWS_STORE)
-      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11_ui")
-    elseif(MSVC14)
-      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc14")
-    elseif(MSVC12)
-      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc12")
-    elseif(MSVC11)
-      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc11")
-    elseif(MSVC10)
-      set(TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc10")
-    endif()
+find_path(_tbb_include_dir NAMES tbb/tbb.h PATHS ${ADDITIONAL_INCLUDE_DIRS})

-    # Add the library path search suffix for the VC independent version of TBB
-    list(APPEND TBB_LIB_PATH_SUFFIX "lib/${TBB_ARCHITECTURE}/vc_mt")
+if (_tbb_include_dir)
+    # TODO: consider TBB_VERSION handling
+    set(_TBB_BUILD_MODES RELEASE DEBUG)
+    set(_TBB_DEBUG_SUFFIX _debug)

-  elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
-    # OS X
-    set(TBB_DEFAULT_SEARCH_DIR "/opt/intel/tbb")
-
-    # TODO: Check to see which C++ library is being used by the compiler.
-    if(NOT ${CMAKE_SYSTEM_VERSION} VERSION_LESS 13.0)
-      # The default C++ library on OS X 10.9 and later is libc++
-      set(TBB_LIB_PATH_SUFFIX "lib/libc++" "lib")
-    else()
-      set(TBB_LIB_PATH_SUFFIX "lib")
-    endif()
-  elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    # Linux
-    set(TBB_DEFAULT_SEARCH_DIR "/opt/intel/tbb")
-
-    # TODO: Check compiler version to see the suffix should be <arch>/gcc4.1 or
-    #       <arch>/gcc4.1. For now, assume that the compiler is more recent than
-    #       gcc 4.4.x or later.
-    if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
-      set(TBB_LIB_PATH_SUFFIX "lib/intel64/gcc4.4")
-    elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
-      set(TBB_LIB_PATH_SUFFIX "lib/ia32/gcc4.4")
-    endif()
-  endif()
-
-  ##################################
-  # Find the TBB include dir
-  ##################################
-
-  find_path(TBB_INCLUDE_DIRS tbb/tbb.h
-      HINTS ${TBB_INCLUDE_DIR} ${TBB_SEARCH_DIR}
-      PATHS ${TBB_DEFAULT_SEARCH_DIR}
-      PATH_SUFFIXES include)
+    foreach (_tbb_component ${TBB_FIND_COMPONENTS})
+        if (NOT TARGET TBB::${_tbb_component})
+            add_library(TBB::${_tbb_component} SHARED IMPORTED)
+            set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_tbb_include_dir})

-  ##################################
-  # Set version strings
-  ##################################
+            foreach (_TBB_BUILD_MODE ${_TBB_BUILD_MODES})
+                set(_tbb_component_lib_name ${_tbb_component}${_TBB_${_TBB_BUILD_MODE}_SUFFIX})
+                if (WIN32)
+                    find_library(${_tbb_component_lib_name}_lib ${_tbb_component_lib_name} PATHS ${ADDITIONAL_LIB_DIRS})
+                    find_file(${_tbb_component_lib_name}_dll ${_tbb_component_lib_name}.dll PATHS ${ADDITIONAL_LIB_DIRS})

-  if(TBB_INCLUDE_DIRS)
-    file(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _tbb_version_file)
-    string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1"
-        TBB_VERSION_MAJOR "${_tbb_version_file}")
-    string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1"
-        TBB_VERSION_MINOR "${_tbb_version_file}")
-    string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1"
-        TBB_INTERFACE_VERSION "${_tbb_version_file}")
-    set(TBB_VERSION "${TBB_VERSION_MAJOR}.${TBB_VERSION_MINOR}")
-  endif()
+                    set_target_properties(TBB::${_tbb_component} PROPERTIES
+                            IMPORTED_LOCATION_${_TBB_BUILD_MODE} "${${_tbb_component_lib_name}_dll}"
+                            IMPORTED_IMPLIB_${_TBB_BUILD_MODE} "${${_tbb_component_lib_name}_lib}"
+                            )
+                else ()
+                    find_library(${_tbb_component_lib_name}_so ${_tbb_component_lib_name} PATHS ${ADDITIONAL_LIB_DIRS})

-  ##################################
-  # Find TBB components
-  ##################################
+                    set_target_properties(TBB::${_tbb_component} PROPERTIES
+                            IMPORTED_LOCATION_${_TBB_BUILD_MODE} "${${_tbb_component_lib_name}_so}"
+                            )
+                endif ()
+                if (${_tbb_component_lib_name}_lib AND ${_tbb_component_lib_name}_dll OR ${_tbb_component_lib_name}_so)
+                    set_property(TARGET TBB::${_tbb_component} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${_TBB_BUILD_MODE})
+                    list(APPEND TBB_IMPORTED_TARGETS TBB::${_tbb_component})
+                    set(TBB_${_tbb_component}_FOUND 1)
+                endif ()
+                unset(${_tbb_component_lib_name}_lib CACHE)
+                unset(${_tbb_component_lib_name}_dll CACHE)
+                unset(${_tbb_component_lib_name}_so CACHE)
+                unset(_tbb_component_lib_name)
+            endforeach ()
+        endif ()
+    endforeach ()
+    unset(_TBB_BUILD_MODESS)
+    unset(_TBB_DEBUG_SUFFIX)
+endif ()
+unset(_tbb_include_dir CACHE)

-  if(TBB_VERSION VERSION_LESS 4.3)
-    set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc tbb)
-  else()
-    set(TBB_SEARCH_COMPOMPONENTS tbb_preview tbbmalloc_proxy tbbmalloc tbb)
-  endif()
+list(REMOVE_DUPLICATES TBB_IMPORTED_TARGETS)

-  # Find each component
-  foreach(_comp ${TBB_SEARCH_COMPOMPONENTS})
-    if(";${TBB_FIND_COMPONENTS};tbb;" MATCHES ";${_comp};")
-
-      # Search for the libraries
-      find_library(TBB_${_comp}_LIBRARY_RELEASE ${_comp}
-          HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
-          PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-          PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})
-
-      find_library(TBB_${_comp}_LIBRARY_DEBUG ${_comp}_debug
-          HINTS ${TBB_LIBRARY} ${TBB_SEARCH_DIR}
-          PATHS ${TBB_DEFAULT_SEARCH_DIR} ENV LIBRARY_PATH
-          PATH_SUFFIXES ${TBB_LIB_PATH_SUFFIX})
-
-      if(TBB_${_comp}_LIBRARY_DEBUG)
-        list(APPEND TBB_LIBRARIES_DEBUG "${TBB_${_comp}_LIBRARY_DEBUG}")
-      endif()
-      if(TBB_${_comp}_LIBRARY_RELEASE)
-        list(APPEND TBB_LIBRARIES_RELEASE "${TBB_${_comp}_LIBRARY_RELEASE}")
-      endif()
-      if(TBB_${_comp}_LIBRARY_${TBB_BUILD_TYPE} AND NOT TBB_${_comp}_LIBRARY)
-        set(TBB_${_comp}_LIBRARY "${TBB_${_comp}_LIBRARY_${TBB_BUILD_TYPE}}")
-      endif()
-
-      if(TBB_${_comp}_LIBRARY AND EXISTS "${TBB_${_comp}_LIBRARY}")
-        set(TBB_${_comp}_FOUND TRUE)
-      else()
-        set(TBB_${_comp}_FOUND FALSE)
-      endif()
-
-      # Mark internal variables as advanced
-      mark_as_advanced(TBB_${_comp}_LIBRARY_RELEASE)
-      mark_as_advanced(TBB_${_comp}_LIBRARY_DEBUG)
-      mark_as_advanced(TBB_${_comp}_LIBRARY)
-
-    endif()
-  endforeach()
-
-  ##################################
-  # Set compile flags and libraries
-  ##################################
-
-  set(TBB_DEFINITIONS_RELEASE "")
-  set(TBB_DEFINITIONS_DEBUG "-DTBB_USE_DEBUG=1")
-
-  if(TBB_LIBRARIES_${TBB_BUILD_TYPE})
-    set(TBB_DEFINITIONS "${TBB_DEFINITIONS_${TBB_BUILD_TYPE}}")
-    set(TBB_LIBRARIES "${TBB_LIBRARIES_${TBB_BUILD_TYPE}}")
-  elseif(TBB_LIBRARIES_RELEASE)
-    set(TBB_DEFINITIONS "${TBB_DEFINITIONS_RELEASE}")
-    set(TBB_LIBRARIES "${TBB_LIBRARIES_RELEASE}")
-  elseif(TBB_LIBRARIES_DEBUG)
-    set(TBB_DEFINITIONS "${TBB_DEFINITIONS_DEBUG}")
-    set(TBB_LIBRARIES "${TBB_LIBRARIES_DEBUG}")
-  endif()
-
-  find_package_handle_standard_args(TBB
-      REQUIRED_VARS TBB_INCLUDE_DIRS TBB_LIBRARIES
-      HANDLE_COMPONENTS
-      VERSION_VAR TBB_VERSION)
-
-  ##################################
-  # Create targets
-  ##################################
-
-  if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND)
-    add_library(tbb SHARED IMPORTED)
-    set_target_properties(tbb PROPERTIES
-          INTERFACE_INCLUDE_DIRECTORIES  ${TBB_INCLUDE_DIRS}
-          IMPORTED_LOCATION              ${TBB_LIBRARIES})
-    if(TBB_LIBRARIES_RELEASE AND TBB_LIBRARIES_DEBUG)
-      set_target_properties(tbb PROPERTIES
-          INTERFACE_COMPILE_DEFINITIONS "$<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:TBB_USE_DEBUG=1>"
-          IMPORTED_LOCATION_DEBUG          ${TBB_LIBRARIES_DEBUG}
-          IMPORTED_LOCATION_RELWITHDEBINFO ${TBB_LIBRARIES_DEBUG}
-          IMPORTED_LOCATION_RELEASE        ${TBB_LIBRARIES_RELEASE}
-          IMPORTED_LOCATION_MINSIZEREL     ${TBB_LIBRARIES_RELEASE}
-          )
-    elseif(TBB_LIBRARIES_RELEASE)
-      set_target_properties(tbb PROPERTIES IMPORTED_LOCATION ${TBB_LIBRARIES_RELEASE})
-    else()
-      set_target_properties(tbb PROPERTIES
-          INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS_DEBUG}"
-          IMPORTED_LOCATION              ${TBB_LIBRARIES_DEBUG}
-          )
-    endif()
-  endif()
-
-  mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES)
-
-  unset(TBB_ARCHITECTURE)
-  unset(TBB_BUILD_TYPE)
-  unset(TBB_LIB_PATH_SUFFIX)
-  unset(TBB_DEFAULT_SEARCH_DIR)
-
-endif()
+find_package_handle_standard_args(TBB
+        REQUIRED_VARS TBB_IMPORTED_TARGETS
+        HANDLE_COMPONENTS)


CMake profile: fix alignment

CMake profile: fix alignment

--- cmake/profile.cmake
+++ cmake/profile.cmake
@@ -17,13 +17,13 @@

 get_property(multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
 if(multi_config)
-  # multi configuration generators do not support build type, providing a list only
-  set(CMAKE_CONFIGURATION_TYPES "${MBED_BUILD_TYPES}" CACHE STRING "List of supported build types" FORCE)
+    # multi configuration generators do not support build type, providing a list only
+    set(CMAKE_CONFIGURATION_TYPES "${MBED_BUILD_TYPES}" CACHE STRING "List of supported build types" FORCE)
 else()
-  # Set the possible values of build type for cmake-gui
-  set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${MBED_BUILD_TYPES}")
-  if(NOT LOWERCASE_CMAKE_BUILD_TYPE IN_LIST LOWERCASE_MBED_BUILD_TYPES)
-    message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${MBED_BUILD_TYPES}")
+    # Set the possible values of build type for cmake-gui
+    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "${MBED_BUILD_TYPES}")
+    if(NOT LOWERCASE_CMAKE_BUILD_TYPE IN_LIST LOWERCASE_MBED_BUILD_TYPES)
+        message(FATAL_ERROR "Invalid build type '${CMAKE_BUILD_TYPE}'. Possible values:\n ${MBED_BUILD_TYPES}")
   endif()
 endif()


Don't attempt to dlopen static libraries in tests

--- cmake/targets.cmake
+++ cmake/targets.cmake
@@ -114,16 +114,16 @@
     APPEND
     FILE    "${vistk_export_file}")

-  set(vistk_libraries
-    ${vistk_libraries}
-    ${name}
-    CACHE INTERNAL "Libraries built as part of vistk")
-
   get_target_property(target_type
     ${name} TYPE)

   if (target_type STREQUAL "STATIC_LIBRARY")
     vistk_compile_pic(${name})
+  else ()
+    set(vistk_libraries
+      ${vistk_libraries}
+      ${name}
+      CACHE INTERNAL "Libraries built as part of vistk")
   endif ()

   vistk_install(


COMP: VC10: header tests actually need some symbols

--- CMake/OTBModuleHeaderTest.cmake
+++ CMake/OTBModuleHeaderTest.cmake
@@ -90,6 +90,8 @@
         # OTBBoostAdapters depends only on OTBBoost,
         # and OTBBoost_LIBRARIES can be empty, so check for it
         add_dependencies(${_test_name} ${${_name}_LIBRARIES})
+        # this target_link should be needed only on WIN32
+        target_link_libraries(${_test_name} ${${_name}_LIBRARIES})
       endif()
       add_dependencies(${_name}-all ${_test_name})
       math( EXPR _test_num "${_test_num} + 1" )


Do not pass unneeded language arguments on the command line

Only pass language CMake variable to the SimpleITK sub-superbuild
project when the language is enabled.

Conflicts:
	CMake/sitkLanguageOptions.cmake

Change-Id: I8c46f920d5ae3423912e5b78d4263a6907b09654

--- CMake/sitkLanguageOptions.cmake
+++ CMake/sitkLanguageOptions.cmake
@@ -47,22 +47,27 @@
 else()
   set( WRAP_PYTHON_DEFAULT OFF )
 endif()
-list( APPEND SITK_LANGUAGES_VARS
-  PYTHON_DEBUG_LIBRARY
-  PYTHON_EXECUTABLE
-  PYTHON_LIBRARY
-  PYTHON_INCLUDE_DIR
-#  PYTHON_INCLUDE_PATH ( deprecated )
-   )
+
+option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
+
+if ( WRAP_PYTHON )
+  list( APPEND SITK_LANGUAGES_VARS
+    PYTHON_DEBUG_LIBRARY
+    PYTHON_EXECUTABLE
+    PYTHON_LIBRARY
+    PYTHON_INCLUDE_DIR
+    #  PYTHON_INCLUDE_PATH ( deprecated )
+    )
 # Debian "jessie" has this additional variable required to match
 # python versions.
-if(PYTHON_INCLUDE_DIR2)
-  list( APPEND SITK_LANGUAGES_VARS
-    PYTHON_INCLUDE_DIR2
-    )
-endif()
-option( WRAP_PYTHON "Wrap Python" ${WRAP_PYTHON_DEFAULT} )
+  if(PYTHON_INCLUDE_DIR2)
+    list( APPEND SITK_LANGUAGES_VARS
+      PYTHON_INCLUDE_DIR2
+      )
+  endif()
+endif ()
 check_PIC_flag ( Python )
+

 if (DEFINED  WRAP_JAVA AND WRAP_JAVA)
   set(_QUIET "REQUIRED")
@@ -77,29 +82,32 @@
 else ( ${JAVA_FOUND} AND ${JNI_FOUND} )
   set( WRAP_JAVA_DEFAULT OFF )
 endif ( ${JAVA_FOUND} AND ${JNI_FOUND} )
-list( APPEND SITK_LANGUAGES_VARS
-  Java_JAVA_EXECUTABLE
-  Java_JAVAC_EXECUTABLE
-  Java_JAR_EXECUTABLE
-  Java_VERSION_STRING
-  Java_VERSION_MAJOR
-  Java_VERSION_MINOR
-  Java_VERSION_PATCH
-  Java_VERSION_TWEAK
-  Java_VERSION
-  Java_INCLUDE_DIRS
-  Java_LIBRARIES
-  JNI_INCLUDE_DIRS
-  JNI_LIBRARIES
-  JAVA_AWT_LIBRARY
-  JAVA_JVM_LIBRARY
-  JAVA_INCLUDE_PATH
-  JAVA_INCLUDE_PATH2
-  JAVA_AWT_INCLUDE_PATH
-
-  )
+
 option ( WRAP_JAVA "Wrap Java" ${WRAP_JAVA_DEFAULT} )
 check_PIC_flag ( Java )
+
+if ( WRAP_JAVA )
+  list( APPEND SITK_LANGUAGES_VARS
+    Java_JAVA_EXECUTABLE
+    Java_JAVAC_EXECUTABLE
+    Java_JAR_EXECUTABLE
+    Java_VERSION_STRING
+    Java_VERSION_MAJOR
+    Java_VERSION_MINOR
+    Java_VERSION_PATCH
+    Java_VERSION_TWEAK
+    Java_VERSION
+    Java_INCLUDE_DIRS
+    Java_LIBRARIES
+    JNI_INCLUDE_DIRS
+    JNI_LIBRARIES
+    JAVA_AWT_LIBRARY
+    JAVA_JVM_LIBRARY
+    JAVA_INCLUDE_PATH
+    JAVA_INCLUDE_PATH2
+    JAVA_AWT_INCLUDE_PATH
+    )
+endif()

 if (DEFINED  WRAP_TCL AND WRAP_TCL)
@@ -114,14 +122,20 @@
 else ( ${TCL_FOUND} )
   set ( WRAP_TCL_DEFAULT OFF )
 endif ( ${TCL_FOUND} )
-list( APPEND SITK_LANGUAGES_VARS
-  TCL_LIBRARY
-  TCL_INCLUDE_PATH
-  TCL_TCLSH
-  TK_LIBRARY
-  TK_INCLUDE_PATH
-  TK_WISH )
+
 option ( WRAP_TCL "Wrap Tcl" ${WRAP_TCL_DEFAULT} )
+
+if ( WRAP_TCL )
+  list( APPEND SITK_LANGUAGES_VARS
+    TCL_LIBRARY
+    TCL_INCLUDE_PATH
+    TCL_TCLSH
+    TK_LIBRARY
+    TK_INCLUDE_PATH
+    TK_WISH
+    )
+endif()
+

 find_package ( Ruby QUIET )
 if ( ${RUBY_FOUND} )
@@ -129,16 +143,20 @@
 else ( ${RUBY_FOUND} )
   set ( WRAP_RUBY_DEFAULT OFF )
 endif ( ${RUBY_FOUND} )
-check_PIC_flag ( Ruby )
-list( APPEND SITK_LANGUAGES_VARS
-  RUBY_EXECUTABLE
-  RUBY_INCLUDE_DIRS
-  RUBY_LIBRARY
-  RUBY_VERSION
-  RUBY_FOUND
-  RUBY_INCLUDE_PATH )
+
 option ( WRAP_RUBY "Wrap Ruby" ${WRAP_RUBY_DEFAULT} )
 check_PIC_flag ( Ruby )
+
+if ( WRAP_RUBY )
+  list( APPEND SITK_LANGUAGES_VARS
+    RUBY_EXECUTABLE
+    RUBY_INCLUDE_DIRS
+    RUBY_LIBRARY
+    RUBY_VERSION
+    RUBY_FOUND
+    RUBY_INCLUDE_PATH
+    )
+endif()

 if (DEFINED  WRAP_CSHARP AND WRAP_CSHARP)
@@ -153,12 +171,17 @@
 else ()
   set ( WRAP_CSHARP_DEFAULT OFF )
 endif ()
-list( APPEND SITK_LANGUAGES_VARS
-  CSHARP_COMPILER
-  CSHARP_INTERPRETER
-  CSHARP_PLATFORM
-)
+
 option ( WRAP_CSHARP "Wrap C#" ${WRAP_CSHARP_DEFAULT} )
+
+if ( WRAP_CSHARP )
+  list( APPEND SITK_LANGUAGES_VARS
+    CSHARP_COMPILER
+    CSHARP_INTERPRETER
+    CSHARP_PLATFORM
+    )
+endif()
+

 if (DEFINED  WRAP_R AND WRAP_R)
   set(_QUIET "REQUIRED")
@@ -173,14 +196,17 @@
   set ( WRAP_R_DEFAULT OFF )
 endif( )

-
-list( APPEND SITK_LANGUAGES_VARS
- R_INCLUDE_DIR
- R_LIBRARIES
- R_LIBRARY_BASE
- R_COMMAND
- RSCRIPT_EXECUTABLE )
 option ( WRAP_R "Wrap R" ${WRAP_R_DEFAULT} )
+
+if ( WRAP_R )
+  list( APPEND SITK_LANGUAGES_VARS
+    R_INCLUDE_DIR
+    R_LIBRARIES
+    R_LIBRARY_BASE
+    R_COMMAND
+    RSCRIPT_EXECUTABLE )
+endif()
+

 if( WIN32 )
   mark_as_advanced( WRAP_R )


Revert "COMP: Change option -libdir into -prefix in CMakeExternals/QtMoblity.cmake"

It resumes -libdir argument works fine ...

This reverts commit bd6aa021a9bef71185dccf6bacca54dd7ef36e34.

--- CMakeExternals/QtMobility.cmake
+++ CMakeExternals/QtMobility.cmake
@@ -42,10 +42,11 @@
   SET(qtmobility_install_cmd)
   IF(UNIX OR MINGW)
     SET(qtmobility_make_cmd make)
-	  IF(MINGW AND NOT MSYS)
-	    SET(qtmobility_make_cmd mingw32-make)
-	  ENDIF()
-    SET(qtmobility_config_args -${qtmobility_build_type} -prefix ${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY} -no-docs -modules ${qtmobility_modules})
+	IF(MINGW AND NOT MSYS)
+	  SET(qtmobility_make_cmd mingw32-make)
+	ENDIF()
+
+    SET(qtmobility_config_args -${qtmobility_build_type} -libdir ${CTK_CMAKE_LIBRARY_OUTPUT_DIRECTORY} -no-docs -modules ${qtmobility_modules})
     SET(qtmobility_install_cmd ${qtmobility_make_cmd} install)
   ELSEIF(WIN32)
     SET(qtmobility_make_cmd nmake)


Fixed MingW build's handling of debug d postfix.

--- CMakeModules/OsgMacroUtils.cmake
+++ CMakeModules/OsgMacroUtils.cmake
@@ -282,12 +282,7 @@
         ADD_LIBRARY(${TARGET_TARGETNAME} STATIC ${TARGET_SRC} ${TARGET_H})
     ENDIF(DYNAMIC_OPENSCENEGRAPH)

-    #not sure if needed, but for plugins only Msvc need the d suffix
-    IF(NOT MSVC)
-        IF(NOT UNIX)
-            SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES DEBUG_POSTFIX "")
-        ENDIF(NOT UNIX)
-    ELSE(NOT MSVC)
+    IF(MSVC)
         IF(NOT CMAKE24)
             SET_OUTPUT_DIR_PROPERTY_260(${TARGET_TARGETNAME} "${OSG_PLUGINS}")        # Sets the ouput to be /osgPlugin-X.X.X ; also ensures the /Debug /Release are removed
         ELSE(NOT CMAKE24)
@@ -316,7 +311,7 @@
             ENDIF(OSG_MSVC_VERSIONED_DLL)

         ENDIF(NOT CMAKE24)
-    ENDIF(NOT MSVC)
+    ENDIF(MSVC)

     SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES PROJECT_LABEL "${TARGET_LABEL}")
     SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES FOLDER "Plugins")


COMP: Superbuild / ExternalProject - Removed git.cmd and eg.cmd from the possible git program

If 'git.cmd' are 'eg.cmd' are used, execute_process fails and outputs
the following error:
  'chcp' is not recognized as an internal or external command,
  operable program or batch file

--- CMake/ExternalProject.cmake
+++ CMake/ExternalProject.cmake
@@ -771,8 +771,10 @@
     list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
   elseif(git_repository)
     #find_package(Git)
+    # If 'git.cmd' are 'eg.cmd' are used, execute_process fails and outputs the following error:
+    #  'chcp' is not recognized as an internal or external command, operable program or batch file
     find_program(git_EXECUTABLE
-      NAMES git.cmd git eg.cmd eg
+      NAMES git eg
       PATHS
        "C:/Program Files/Git/bin"
        "C:/Program Files (x86)/Git/bin"


Adapting properties of mitkPackageTest

Adapting properties of mitkPackageTest

* timeout increased to 3600
* added label MITK-Plugins

--- CMake/mitkPackageTest.cmake
+++ CMake/mitkPackageTest.cmake
@@ -9,15 +9,15 @@
                COMMAND ${CMAKE_COMMANDS} --build ${MITK_BINARY_DIR} --config Release --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
-                          TIMEOUT 1800
-                          LABELS "MITK")
+                          TIMEOUT 3600
+                          LABELS "MITK;MITK-Plugins")
     elseif(CMAKE_BUILD_TYPE)
       add_test( NAME mitkPackageTest
                 COMMAND ${CMAKE_COMMAND} --build ${MITK_BINARY_DIR} --config ${CMAKE_BUILD_TYPE} --target package)

       set_tests_properties( mitkPackageTest PROPERTIES
-                          TIMEOUT 1800
-                          LABELS "MITK")
+                          TIMEOUT 3600
+                          LABELS "MITK;MITK-Plugins")
     endif()

   endif() # NOT MITK_FAST_TESTING


Issue #53: Simplify OpenMP, make optional, make obvious when found/not found.

--- CMake/mpIncludeOpenMP.cmake
+++ CMake/mpIncludeOpenMP.cmake
@@ -13,38 +13,31 @@
 #============================================================================*/

 if(MYPROJECT_USE_OPENMP)
-  # Borrowed from PCL-1.8
-  if((NOT APPLE) OR (NOT CMAKE_COMPILER_IS_GNUCXX) OR (GCC_VERSION VERSION_GREATER 4.2.1) OR (CMAKE_COMPILER_IS_CLANG))
-    find_package(OpenMP)
-    if(OpenMP_FOUND)
-      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
-      if(MSVC)
-        if(MSVC_VERSION EQUAL 1500)
-          set(OPENMP_DLL VCOMP90)
-        elseif(MSVC_VERSION EQUAL 1600)
-          set(OPENMP_DLL VCOMP100)
-        elseif(MSVC_VERSION EQUAL 1700)
-          set(OPENMP_DLL VCOMP110)
-        elseif(MSVC_VERSION EQUAL 1800)
-          set(OPENMP_DLL VCOMP120)
-        elseif(MSVC_VERSION EQUAL 1900)
-          set(OPENMP_DLL VCOMP140)
-        elseif(MSVC_VERSION EQUAL 1910)
-          set(OPENMP_DLL VCOMP140)
-        endif()
-        if(OPENMP_DLL)
-          set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
-          set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
-        else(OPENMP_DLL)
-          message(WARNING "Delay loading flag for OpenMP DLL is invalid.")
-        endif(OPENMP_DLL)
-      endif(MSVC)
-    endif()
-  else()
-    message(FATAL_ERROR "You requested OpenMP, but your compiler does not support it. Please turn MYPROJECT_USE_OPENMP off.")
-  endif()
-  if(NOT OpenMP_FOUND)
-    message(FATAL_ERROR "You requested OpenMP, but it was not found. Please turn MYPROJECT_USE_OPENMP off.")
+  # Borrowed from PCL-1.8, and modified
+  find_package(OpenMP)
+  if(OpenMP_FOUND)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+    if(MSVC)
+      if(MSVC_VERSION EQUAL 1500)
+        set(OPENMP_DLL VCOMP90)
+      elseif(MSVC_VERSION EQUAL 1600)
+        set(OPENMP_DLL VCOMP100)
+      elseif(MSVC_VERSION EQUAL 1700)
+        set(OPENMP_DLL VCOMP110)
+      elseif(MSVC_VERSION EQUAL 1800)
+        set(OPENMP_DLL VCOMP120)
+      elseif(MSVC_VERSION EQUAL 1900)
+        set(OPENMP_DLL VCOMP140)
+      elseif(MSVC_VERSION EQUAL 1910)
+        set(OPENMP_DLL VCOMP140)
+      endif()
+      if(OPENMP_DLL)
+        set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DELAYLOAD:${OPENMP_DLL}D.dll")
+        set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DELAYLOAD:${OPENMP_DLL}.dll")
+      else(OPENMP_DLL)
+        message(WARNING "Delay loading flag for OpenMP DLL is invalid.")
+      endif(OPENMP_DLL)
+    endif(MSVC)
   endif()
 endif()


cmake improve

cmake improve

--- Embedded/cmake/msp430.cmake
+++ Embedded/cmake/msp430.cmake
@@ -24,6 +24,7 @@
 find_program(MSP430_OBJCOPY msp430-objcopy)
 find_program(MSP430_SIZE_TOOL msp430-size)
 find_program(MSP430_OBJDUMP msp430-objdump)
+find_program(MSPDEBUG mspdebug)

 # Compiler & Linker Settings
 include(CMakeForceCompiler)
@@ -45,7 +46,7 @@
   message(STATUS "MCU defined as '${MCU}'")
 endif()

-#-c  -MMD
+
 set(CMAKE_CXX_FLAGS " -Wall -c -mmcu=${MCU} -Os -g -ffunction-sections -fdata-sections" CACHE STRING "C++ Flags")
 set(CMAKE_CXX_LINK_FLAGS "-0s, -Wl,-gc-sections" CACHE STRING "Linker Flags")


COMP: deactivate mitkTrackingDeviceSourceTest

--- Modules/IGT/Testing/files.cmake
+++ Modules/IGT/Testing/files.cmake
@@ -16,7 +16,7 @@
    mitkNDIProtocolTest.cpp
    mitkNDITrackingDeviceTest.cpp
    mitkTimeStampTest.cpp
-   mitkTrackingDeviceSourceTest.cpp
+   #mitkTrackingDeviceSourceTest.cpp
    mitkTrackingVolumeTest.cpp
    mitkTrackingDeviceTest.cpp
    mitkTrackingToolTest.cpp


ENH: use RTK v2.1.0 (remote module)

ENH: use RTK v2.1.0 (remote module)

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


Windows python debug (#73)

Windows python debug (#73)

* add python interpreter to nose test parameters

* update doc

* rename interpreter to executable and add doc

--- ament_cmake_nose/cmake/ament_add_nose_test.cmake
+++ ament_cmake_nose/cmake/ament_add_nose_test.cmake
@@ -23,6 +23,9 @@
 # :param path: the path to a file or folder where ``nosetests``
 #   should be invoked on
 # :type path: string
+# :param PYTHON_EXECUTABLE: absolute path to the executable used to run the test,
+#   default to the CMake variable with the same name returned by FindPythonInterp
+# :type PYTHON_EXECUTABLE: string
 # :param TIMEOUT: the test timeout in seconds,
 #   default defined by ``ament_add_test()``
 # :type TIMEOUT: integer
@@ -50,7 +53,7 @@
 function(_ament_add_nose_test testname path)
   cmake_parse_arguments(ARG
     ""
-    "TIMEOUT;WORKING_DIRECTORY"
+    "PYTHON_EXECUTABLE;TIMEOUT;WORKING_DIRECTORY"
     "APPEND_ENV;APPEND_LIBRARY_DIRS;ENV"
     ${ARGN})
   if(ARG_UNPARSED_ARGUMENTS)
@@ -67,6 +70,9 @@
     message(FATAL_ERROR
       "ament_add_nose_test() the path '${path}' does not exist")
   endif()
+  if(NOT ARG_PYTHON_EXECUTABLE)
+    set(ARG_PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}")
+  endif()

   set(result_file "${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${testname}.xunit.xml")
   # Invoke ${NOSETESTS} explicitly with the ${PYTHON_EXECUTABLE} because on
@@ -79,7 +85,7 @@
   # ${NOSETESTS} executable references.
   # See: https://github.com/ament/ament_cmake/pull/70
   set(cmd
-    "${PYTHON_EXECUTABLE}" "${NOSETESTS}" "${path}" "--with-xunit"
+    "${ARG_PYTHON_EXECUTABLE}" "${NOSETESTS}" "${path}" "--with-xunit"
     "--xunit-file=${result_file}")
   if(NOT "${NOSETESTS_VERSION}" VERSION_LESS "1.3.5")
     list(APPEND cmd "--xunit-testsuite-name=${PROJECT_NAME}.nosetests")


Rename CheckLibcxxAtomic.cmake variable result names so they don't clash with LLVM

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@260531 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/CheckLibcxxAtomic.cmake
+++ cmake/Modules/CheckLibcxxAtomic.cmake
@@ -31,8 +31,8 @@
   check_library_exists(atomic __atomic_fetch_add_8 "" LIBCXX_HAS_ATOMIC_LIB)
   if(LIBCXX_HAS_ATOMIC_LIB)
     list(APPEND CMAKE_REQUIRED_LIBRARIES "atomic")
-    check_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB)
-    if (NOT HAVE_CXX_ATOMICS_WITH_LIB)
+    check_cxx_atomics(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
+    if (NOT LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB)
       message(FATAL_ERROR "Host compiler must support std::atomic!")
     endif()
   else()


More common sizes

More common sizes

--- cmake/MyPackageCheckCommonSizes.cmake
+++ cmake/MyPackageCheckCommonSizes.cmake
@@ -4,5 +4,59 @@
   CHECK_TYPE_SIZE("int" SIZEOF_INT)
   CHECK_TYPE_SIZE("long" SIZEOF_LONG)
   CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
+  CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT)
+  CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT)
+  CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG)
+  CHECK_TYPE_SIZE("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
   CHECK_TYPE_SIZE("size_t" SIZEOF_SIZE_T)
+  #
+  # Special types
+  #
+  FOREACH (_sign "" "u")
+    FOREACH (_size 8 16 32 64)
+      SET (_MYTYPE    MYPACKAGE_${_sign}INT${_size})
+      SET (_MYTYPEDEF MYPACKAGE_${_sign}INT${_size}_TYPEDEF)
+
+      SET (HAVE_${_MYTYPE} FALSE)
+      SET (${_MYTYPE} "")
+      SET (${_MYTYPEDEF} "")
+
+      SET (_found_type FALSE)
+      FOREACH (_underscore "" "_" "__")
+        SET (_type ${_underscore}${_sign}int${_size}_t)
+        STRING (TOUPPER ${_type} _TYPE)
+        CHECK_TYPE_SIZE (${_type} ${_TYPE})
+        IF (HAVE_${_TYPE})
+          SET (HAVE_${_MYTYPE} TRUE)
+          SET (${_MYTYPE} ${${_TYPE}})
+          SET (${_MYTYPEDEF} ${_type})
+          BREAK ()
+        ENDIF ()
+      ENDFOREACH ()
+      IF (NOT HAVE_${_MYTYPE})
+        #
+        # Try with C types
+        #
+        FOREACH (_c "short" "int" "long" "long long")
+          IF ("${_sign}" STREQUAL "u")
+            SET (_c "unsigned ${_c}")
+          ENDIF ()
+          STRING (TOUPPER ${_c} _C)
+          STRING (REPLACE " " "_" _C "${_C}")
+          IF (HAVE_SIZEOF_${_C})
+            IF (${SIZEOF_${_C}} EQUAL ${_size})
+              SET (HAVE_${_MYTYPE} TRUE)
+              SET (${_MYTYPE} ${${_TYPE}})
+              SET (${_MYTYPEDEF} ${_c})
+              BREAK ()
+            ENDIF ()
+          ENDIF ()
+        ENDFOREACH ()
+      ENDIF ()
+      MARK_AS_ADVANCED (
+        HAVE_${_MYTYPE}
+        ${_MYTYPE}
+        ${_MYTYPEDEF})
+    ENDFOREACH ()
+  ENDFOREACH ()
 ENDMACRO()


[CMake] Temporarily remove the LLVM_ENABLE_IDE option

All uses of this option have been removed, and the intent is to change the purpose and default value of this option. To prevent it from having impacts on users, this patch temporarily removes the option and purges it from CMake caches. In a few days, once this has propagated to contributors I will re-introduce the option with the new default value.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -868,12 +868,16 @@
   set(LLVM_ENABLE_PLUGINS ON)
 endif()

-set(LLVM_ENABLE_IDE_default OFF)
-if (XCODE OR MSVC_IDE OR CMAKE_EXTRA_GENERATOR)
-  set(LLVM_ENABLE_IDE_default ON)
-endif()
-option(LLVM_ENABLE_IDE "Generate targets and process sources for use with an IDE"
-    ${LLVM_ENABLE_IDE_default})
+# Remove LLVM_ENABLE_IDE from the CMake cache. This is a temporary change to
+# allow CMake caches to be cleaned up so that we can change the default for this
+# option and how it is used.
+unset(LLVM_ENABLE_IDE CACHE)
+#set(LLVM_ENABLE_IDE_default OFF)
+#if (XCODE OR MSVC_IDE OR CMAKE_EXTRA_GENERATOR)
+#  set(LLVM_ENABLE_IDE_default ON)
+#endif()
+#option(LLVM_ENABLE_IDE "Generate targets and process sources for use with an IDE"
+#    ${LLVM_ENABLE_IDE_default})

 function(get_compile_definitions)
   get_directory_property(top_dir_definitions DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS)


Fix ROOT-7727 - CMake: include/compiledata.h has empty CXXOPT and CXXDEBUG

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -542,9 +542,10 @@
   # We cannot use the compiledata.sh script for windows
   configure_file(${CMAKE_SOURCE_DIR}/cmake/scripts/compiledata.win32.in include/compiledata.h NEWLINE_STYLE UNIX)
 else()
-  execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build/unix/compiledata.sh include/compiledata.h "${CXX}" ""
-       "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}"
-        "${CMAKE_CXX_FLAGS}" "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_FLAGS}" "${LibSuffix}" "${SYSLIBS}"
+  execute_process(COMMAND ${CMAKE_SOURCE_DIR}/build/unix/compiledata.sh include/compiledata.h "${CXX}"
+        "${CMAKE_CXX_FLAGS_RELEASE}" "${CMAKE_CXX_FLAGS_DEBUG}" "${CMAKE_CXX_FLAGS}"
+        "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}" "${CMAKE_EXE_FLAGS}"
+        "${LibSuffix}" "${SYSLIBS}"
         "${libdir}" "-lCore" "-lRint" "${incdir}" "" "" "${ROOT_ARCHITECTURE}" "" "${explicitlink}" )
 endif()


build: fix the variable name

build: fix the variable name

The parameter name was not changed, resulting in the string conversion
not working properly for the Windows builds.

--- cmake/modules/SwiftConfigureSDK.cmake
+++ cmake/modules/SwiftConfigureSDK.cmake
@@ -258,7 +258,7 @@
   _report_sdk("${prefix}")
 endmacro()

-macro(configure_sdk_windows sdk_name environment architectures)
+macro(configure_sdk_windows name environment architectures)
   # Note: this has to be implemented as a macro because it sets global
   # variables.


fix CMake builds (again)

fix CMake builds (again)

--- HalideGenerator.cmake
+++ HalideGenerator.cmake
@@ -209,11 +209,15 @@

   halide_generator_genfiles_dir(${args_STUB_GENERATOR_TARGET} GENFILES_DIR)

-  set(STUB_HDR "${GENFILES_DIR}/${args_STUB_GENERATOR_TARGET}.stub.h")
+  # STUBNAME_BASE = strip_suffix(STUB_GENERATOR_TARGET, ".generator")
+  string(REGEX REPLACE "\\.generator*$" "" STUBNAME_BASE ${args_STUB_GENERATOR_TARGET})
+
+  set(STUB_HDR "${GENFILES_DIR}/${STUBNAME_BASE}.stub.h")

   set(GENERATOR_EXEC_ARGS "-o" "${GENFILES_DIR}" "-e" "cpp_stub")
   if (NOT ${args_STUB_GENERATOR_NAME} STREQUAL "")
     list(APPEND GENERATOR_EXEC_ARGS "-g" "${args_STUB_GENERATOR_NAME}")
+    list(APPEND GENERATOR_EXEC_ARGS "-n" "${STUBNAME_BASE}")
   endif()

   set(STUBGEN "${args_STUB_GENERATOR_TARGET}.exec_stub_generator")


Updating ITK version in Superbuild to 4.2rc02

--- SuperBuild/External_ITKv4.cmake
+++ SuperBuild/External_ITKv4.cmake
@@ -16,7 +16,7 @@

 # NOTE: it is very important to update the ITK_DIR path with the
 # current version of ITK
-set(ITK_TAG_COMMAND GIT_TAG v4.2rc01 )
+set(ITK_TAG_COMMAND GIT_TAG v4.2rc02 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


CMake: fix RapidJSON package search

CMake: fix RapidJSON package search

--- CMakeModules/FindRapidJSON.cmake
+++ CMakeModules/FindRapidJSON.cmake
@@ -51,6 +51,7 @@
   ##____________________________________________________________________________
   ## Actions taken when all components have been found

+  include (FindPackageHandleStandardArgs)
   find_package_handle_standard_args (RAPIDJSON DEFAULT_MSG RAPIDJSON_INCLUDES)

   if (RAPIDJSON_FOUND)


ADD: ComputeRegionSignatures added to TubeTKModules

--- Applications/TubeTKModules.cmake
+++ Applications/TubeTKModules.cmake
@@ -63,6 +63,7 @@
 if( TubeTK_USE_BOOST )
   set( TubeTK_${proj}_Boost_MODULES
     ComputeImageQuantiles
+    ComputeRegionSignatures
     TransferLabelsToRegions
     TubeGraphKernel )
 endif( TubeTK_USE_BOOST )


Add option to skip setting RPATH

Add option to skip setting RPATH

OMPL installs to /usr/lib by default and some projects integrating
OMPL trigger a QA check suggesting that the set RPATH is useless.
For example Yocto gives this warning:

    QA Issue: ompl: /work/corei7-64-refkit-linux/ompl/1.1.0-r0/packages-split/ompl/usr/lib/libompl.so.1.1.0 contains probably-redundant RPATH /usr/lib [useless-rpaths]

Add the option OMPL_SKIP_RPATH that helps to skip setting RPATH
for the library. By default the option is OFF.

--- CMakeModules/CompilerSettings.cmake
+++ CMakeModules/CompilerSettings.cmake
@@ -52,11 +52,14 @@
     add_definitions(-fPIC)
 endif((CMAKE_COMPILER_IS_GNUCXX OR IS_ICPC) AND NOT MINGW)

-# Set rpath http://www.paraview.org/Wiki/CMake_RPATH_handling
-set(CMAKE_SKIP_BUILD_RPATH FALSE)
-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+option(OMPL_SKIP_RPATH "Don't set RPATH to the OMPL library" OFF)
+if(NOT OMPL_SKIP_RPATH)
+    # Set rpath http://www.paraview.org/Wiki/CMake_RPATH_handling
+    set(CMAKE_SKIP_BUILD_RPATH FALSE)
+    set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+    set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+    set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif()

 # no prefix needed for python modules
 set(CMAKE_SHARED_MODULE_PREFIX "")


Flesh out documentation of CheckCXX11Features module

--- Modules/CheckCXX11Features.cmake
+++ Modules/CheckCXX11Features.cmake
@@ -1,6 +1,14 @@
 # - Check which parts of the C++11 standard the compiler supports
 #
-# When found it will set the following variables
+# When included in a project via include(), checks are run on the current
+# C++ compiler to:
+#
+#  - Determine the flags needed to enable C++11 support
+#  - Determine availability of C++11 features via Compile/Run/Fail tests
+#
+# If the project is being cross-compiled, only compile tests are performed.
+# After the checks are performed, the following variables are set in the
+# CMake cache:
 #
 #  CXX11_COMPILER_FLAGS         - the compiler flags needed to get C++11 features
 #
@@ -130,7 +138,7 @@
       else()
         set(${RESULT_VAR} FALSE)
       endif()
-
+
       if(${RESULT_VAR} AND EXISTS ${_SRCFILE_FAIL})
         try_run(_RUN_RESULT_VAR _COMPILE_RESULT_VAR
           "${_bindir}_fail" "${_SRCFILE_FAIL}"


remove warn/errors from icpc comp

remove warn/errors from icpc comp

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@1983 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/SiconosProject.cmake
+++ Numerics/cmake/SiconosProject.cmake
@@ -55,7 +55,7 @@
   OPTION(WITH_SVN "Consider SVN is online" OFF)
   OPTION(WITH_DEFAULT_BUILD_TYPE "Use a default build type (Release)" ON)
   OPTION(WITH_DOCUMENTATION "Build doxygen documentation with 'make doc'" OFF)
-  OPTION(WITH_TESTING "Enable 'make test' target" OFF)
+  OPTION(WITH_TESTING "Enable 'make test' target" ON)

   # Build type
@@ -94,15 +94,15 @@
     CHECK_C_COMPILER_FLAG("-Wall" C_HAVE_WALL)
   ENDIF(CMAKE_C_COMPILER)

-  IF(CMAKE_CXX_COMPILER)
-    INCLUDE(TestCXXAcceptsFlag)
-    CHECK_CXX_ACCEPTS_FLAG(-ffriend-injection CXX_HAVE_FRIEND_INJECTION)
-  ENDIF(CMAKE_CXX_COMPILER)
-
-  IF(CMAKE_Fortran_COMPILER)
-    INCLUDE(fortran)
-    INCLUDE(FortranLibraries)
-  ENDIF(CMAKE_Fortran_COMPILER)
+ # IF(CMAKE_CXX_COMPILER)
+ #   INCLUDE(TestCXXAcceptsFlag)
+#    CHECK_CXX_ACCEPTS_FLAG(-ffriend-injection CXX_HAVE_FRIEND_INJECTION)
+ # ENDIF(CMAKE_CXX_COMPILER)
+
+# IF(CMAKE_Fortran_COMPILER)
+#    INCLUDE(fortran)
+#    INCLUDE(FortranLibraries)
+#  ENDIF(CMAKE_Fortran_COMPILER)

   # Some http://pipol.inria.fr configurations


ENH: CI: PKG reverted d22ec9041dfef08744b3a151c63183796b8a1959 (disabling of package testing).

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -99,14 +99,14 @@
 endif()

-# ctest_test(
-#   PARALLEL_LEVEL 1
-#   RETURN_VALUE _test_rv
-#   CAPTURE_CMAKE_ERROR _test_error
-#   )
+ctest_test(
+  PARALLEL_LEVEL 1
+  RETURN_VALUE _test_rv
+  CAPTURE_CMAKE_ERROR _test_error
+  )

-# if( NOT _test_rv EQUAL 0 )
-#   message( SEND_ERROR "An error occurs during ctest_test.")
-# endif()
+if( NOT _test_rv EQUAL 0 )
+  message( SEND_ERROR "An error occurs during ctest_test.")
+endif()

 ctest_submit()


COMP: improve cmake detection of libsvm

COMP: improve cmake detection of libsvm

--- CMake/FindLibSVM.cmake
+++ CMake/FindLibSVM.cmake
@@ -19,21 +19,21 @@
 #=============================================================================
 # Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
 # All rights reserved.
-#
+#
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions are met:
-#
+#
 #   * Redistributions of source code must retain the above copyright notice,
 #     this list of conditions and the following disclaimer.
-#
+#
 #   * Redistributions in binary form must reproduce the above copyright notice,
 #     this list of conditions and the following disclaimer in the documentation
 #     and/or other materials provided with the distribution.
-#
+#
 #   * Neither the names of Kitware, Inc., the Insight Software Consortium, nor
 #     the names of their contributors may be used to endorse or promote products
 #     derived from this software without specific prior written permission.
-#
+#
 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -51,8 +51,6 @@
 find_path ( LIBSVM_INCLUDE_DIR
   NAMES
     svm.h
-  PATHS
-    ${LIBSVM_ROOT_DIR}/include
   PATH_SUFFIXES
     libsvm
     libsvm-2.0/libsvm
@@ -96,9 +94,8 @@
 # set LIBSVM_LIBRARY
 find_library ( LIBSVM_LIBRARY
   NAMES
-    svm
-  PATHS
-    ${LIBSVM_ROOT_DIR}/lib
+  svm
+  libsvm
   DOC
     "LibSVM library location"
 )


Brings in Python and QVTKOpenGLWidget fixes

These are needed to move to Python 3, and to resolve some Qt5 issues
with rendering.

--- versions.cmake
+++ versions.cmake
@@ -92,7 +92,7 @@
   set(_paraview_revision "master")
 else()
   # Test the revision with OpenGL2 rendering before updating, update often!
-  set(_paraview_revision "2c456b625fac50db82f5414edf6d4086ba272276")
+  set(_paraview_revision "4a120bdae2e15fef46370711e223145bdf915e8c")
 endif()
 add_revision(paraview
   GIT_REPOSITORY "https://gitlab.kitware.com/paraview/paraview.git"


de-screamify ispc.cmake

de-screamify ispc.cmake

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -15,179 +15,179 @@
 ## ======================================================================== ##

 # ISPC versions to look for, in decending order (newest first)
-SET(ISPC_VERSION_WORKING "1.10.0" "1.9.2" "1.9.1")
-LIST(GET ISPC_VERSION_WORKING -1 ISPC_VERSION_REQUIRED)
-
-IF (NOT ISPC_EXECUTABLE)
+set(ISPC_VERSION_WORKING "1.10.0" "1.9.2" "1.9.1")
+list(GET ISPC_VERSION_WORKING -1 ISPC_VERSION_REQUIRED)
+
+if (NOT ISPC_EXECUTABLE)
   # try sibling folder as hint for path of ISPC
-  IF (APPLE)
-    SET(ISPC_DIR_SUFFIX "osx" "Darwin")
-  ELSEIF(WIN32)
-    SET(ISPC_DIR_SUFFIX "windows" "win32")
-    IF (MSVC_VERSION LESS 1900)
-      MESSAGE(WARNING "MSVC 12 2013 is not supported anymore.")
-    ELSE()
-      LIST(APPEND ISPC_DIR_SUFFIX "windows-vs2015")
-    ENDIF()
-  ELSE()
-    SET(ISPC_DIR_SUFFIX "linux" "Linux")
-  ENDIF()
-  FOREACH(v "" "v")
-   FOREACH(ver ${ISPC_VERSION_WORKING})
-    FOREACH(suffix ${ISPC_DIR_SUFFIX})
-     FOREACH(d "" "/bin")
-      LIST(APPEND ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-${v}${ver}-${suffix}${d})
-     ENDFOREACH()
-    ENDFOREACH()
-   ENDFOREACH()
-  ENDFOREACH()
-
-  FIND_PROGRAM(ISPC_EXECUTABLE ispc HINTS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")
-  IF (NOT ISPC_EXECUTABLE)
-    MESSAGE("********************************************")
-    MESSAGE("Could not find ISPC (looked in PATH and ${ISPC_DIR_HINT})")
-    MESSAGE("")
-    MESSAGE("This version of OSPRay expects you to have a binary install of ISPC minimum version ${ISPC_VERSION_REQUIRED}, and expects it to be found in 'PATH' or in the sibling directory to where the OSPRay source are located. Please go to https://ispc.github.io/downloads.html, select the binary release for your particular platform, and unpack it to ${PROJECT_SOURCE_DIR}/../")
-    MESSAGE("")
-    MESSAGE("If you insist on using your own custom install of ISPC, please make sure that the 'ISPC_EXECUTABLE' variable is properly set in CMake.")
-    MESSAGE("********************************************")
-    MESSAGE(FATAL_ERROR "Could not find ISPC. Exiting.")
-  ELSE()
-    MESSAGE(STATUS "Found Intel SPMD Compiler (ISPC): ${ISPC_EXECUTABLE}")
-  ENDIF()
-ENDIF()
-
-IF(NOT ISPC_VERSION)
-  EXECUTE_PROCESS(COMMAND ${ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
-  STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl|rc[0-9])? " DUMMY "${ISPC_OUTPUT}")
-  SET(ISPC_VERSION ${CMAKE_MATCH_1})
-
-  IF (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED)
-    MESSAGE(FATAL_ERROR "Need at least version ${ISPC_VERSION_REQUIRED} of Intel SPMD Compiler (ISPC).")
-  ENDIF()
-
-  SET(ISPC_VERSION ${ISPC_VERSION} CACHE STRING "ISPC Version")
-  MARK_AS_ADVANCED(ISPC_VERSION)
-  MARK_AS_ADVANCED(ISPC_EXECUTABLE)
-ENDIF()
-
-SET(OSPRAY_ISPC_ADDRESSING 32 CACHE STRING "32 vs 64 bit addressing in ispc")
-SET_PROPERTY(CACHE OSPRAY_ISPC_ADDRESSING PROPERTY STRINGS 32 64)
-MARK_AS_ADVANCED(OSPRAY_ISPC_ADDRESSING)
-
-IF (NOT (OSPRAY_ISPC_ADDRESSING STREQUAL "32" OR
+  if (APPLE)
+    set(ISPC_DIR_SUFFIX "osx" "Darwin")
+  elseif(WIN32)
+    set(ISPC_DIR_SUFFIX "windows" "win32")
+    if (MSVC_VERSION LESS 1900)
+      message(WARNING "MSVC 12 2013 is not supported anymore.")
+    else()
+      list(APPEND ISPC_DIR_SUFFIX "windows-vs2015")
+    endif()
+  else()
+    set(ISPC_DIR_SUFFIX "linux" "Linux")
+  endif()
+  foreach(v "" "v")
+   foreach(ver ${ISPC_VERSION_WORKING})
+    foreach(suffix ${ISPC_DIR_SUFFIX})
+     foreach(d "" "/bin")
+      list(APPEND ISPC_DIR_HINT ${PROJECT_SOURCE_DIR}/../ispc-${v}${ver}-${suffix}${d})
+     endforeach()
+    endforeach()
+   endforeach()
+  endforeach()
+
+  find_program(ISPC_EXECUTABLE ispc HINTS ${ISPC_DIR_HINT} DOC "Path to the ISPC executable.")
+  if (NOT ISPC_EXECUTABLE)
+    message("********************************************")
+    message("Could not find ISPC (looked in PATH and ${ISPC_DIR_HINT})")
+    message("")
+    message("This version of OSPRay expects you to have a binary install of ISPC minimum version ${ISPC_VERSION_REQUIRED}, and expects it to be found in 'PATH' or in the sibling directory to where the OSPRay source are located. Please go to https://ispc.github.io/downloads.html, select the binary release for your particular platform, and unpack it to ${PROJECT_SOURCE_DIR}/../")
+    message("")
+    message("If you insist on using your own custom install of ISPC, please make sure that the 'ISPC_EXECUTABLE' variable is properly set in CMake.")
+    message("********************************************")
+    message(FATAL_ERROR "Could not find ISPC. Exiting.")
+  else()
+    message(STATUS "Found Intel SPMD Compiler (ISPC): ${ISPC_EXECUTABLE}")
+  endif()
+endif()
+
+if(NOT ISPC_VERSION)
+  execute_process(COMMAND ${ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
+  string(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl|rc[0-9])? " DUMMY "${ISPC_OUTPUT}")
+  set(ISPC_VERSION ${CMAKE_MATCH_1})
+
+  if (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED)
+    message(FATAL_ERROR "Need at least version ${ISPC_VERSION_REQUIRED} of Intel SPMD Compiler (ISPC).")
+  endif()
+
+  set(ISPC_VERSION ${ISPC_VERSION} CACHE STRING "ISPC Version")
+  mark_as_advanced(ISPC_VERSION)
+  mark_as_advanced(ISPC_EXECUTABLE)
+endif()
+
+set(OSPRAY_ISPC_ADDRESSING 32 CACHE STRING "32 vs 64 bit addressing in ispc")
+set_property(CACHE OSPRAY_ISPC_ADDRESSING PROPERTY STRINGS 32 64)
+mark_as_advanced(OSPRAY_ISPC_ADDRESSING)
+
+if (NOT (OSPRAY_ISPC_ADDRESSING STREQUAL "32" OR
          OSPRAY_ISPC_ADDRESSING STREQUAL "64"))
-  MESSAGE(FATAL_ERROR "OSPRAY_ISPC_ADDRESSSING must be set to either '32' or '64'!")
-ENDIF()
-
-GET_FILENAME_COMPONENT(ISPC_DIR ${ISPC_EXECUTABLE} PATH)
-
-
-# ##################################################################
-# add macro INCLUDE_DIRECTORIES_ISPC() that allows to specify search
+  message(FATAL_ERROR "OSPRAY_ISPC_ADDRESSSING must be set to either '32' or '64'!")
+endif()
+
+get_filename_component(ISPC_DIR ${ISPC_EXECUTABLE} PATH)
+
+
+# ##################################################################
+# add macro include_directories_ISPC() that allows to specify search
 # paths for ISPC sources
 # ##################################################################
-SET(ISPC_INCLUDE_DIR "")
-MACRO (INCLUDE_DIRECTORIES_ISPC)
-  SET(ISPC_INCLUDE_DIR ${ISPC_INCLUDE_DIR} ${ARGN})
-ENDMACRO ()
+set(ISPC_INCLUDE_DIR "")
+macro (include_directories_ISPC)
+  set(ISPC_INCLUDE_DIR ${ISPC_INCLUDE_DIR} ${ARGN})
+endmacro ()

 # ##################################################################
 # add macro ADD_DEFINITIONS_ISPC() that allows to specify
 # ISPC pre-processor definitions
 # ##################################################################
-SET(ISPC_DEFINITIONS "")
-MACRO (ADD_DEFINITIONS_ISPC)
-  SET(ISPC_DEFINITIONS ${ISPC_DEFINITIONS} ${ARGN})
-ENDMACRO ()
-
-MACRO (OSPRAY_ISPC_COMPILE)
-  SET(ISPC_ADDITIONAL_ARGS "")
-  SET(ISPC_TARGETS ${OSPRAY_ISPC_TARGET_LIST})
-
-  SET(ISPC_TARGET_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})
-  STRING(REPLACE ";" "," ISPC_TARGET_ARGS "${ISPC_TARGETS}")
-
-  IF (CMAKE_SIZEOF_VOID_P EQUAL 8)
-    SET(ISPC_ARCHITECTURE "x86-64")
-  ELSE()
-    SET(ISPC_ARCHITECTURE "x86")
-  ENDIF()
-
-  SET(ISPC_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
-  INCLUDE_DIRECTORIES(${ISPC_TARGET_DIR})
-
-  IF(ISPC_INCLUDE_DIR)
-    STRING(REPLACE ";" ";-I;" ISPC_INCLUDE_DIR_PARMS "${ISPC_INCLUDE_DIR}")
-    SET(ISPC_INCLUDE_DIR_PARMS "-I" ${ISPC_INCLUDE_DIR_PARMS})
-  ENDIF()
+set(ISPC_DEFINITIONS "")
+macro (ADD_DEFINITIONS_ISPC)
+  set(ISPC_DEFINITIONS ${ISPC_DEFINITIONS} ${ARGN})
+endmacro ()
+
+macro (OSPRAY_ISPC_COMPILE)
+  set(ISPC_ADDITIONAL_ARGS "")
+  set(ISPC_TARGETS ${OSPRAY_ISPC_TARGET_LIST})
+
+  set(ISPC_TARGET_EXT ${CMAKE_CXX_OUTPUT_EXTENSION})
+  string(REPLACE ";" "," ISPC_TARGET_ARGS "${ISPC_TARGETS}")
+
+  if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+    set(ISPC_ARCHITECTURE "x86-64")
+  else()
+    set(ISPC_ARCHITECTURE "x86")
+  endif()
+
+  set(ISPC_TARGET_DIR ${CMAKE_CURRENT_BINARY_DIR})
+  include_directories(${ISPC_TARGET_DIR})
+
+  if(ISPC_INCLUDE_DIR)
+    string(REPLACE ";" ";-I;" ISPC_INCLUDE_DIR_PARMS "${ISPC_INCLUDE_DIR}")
+    set(ISPC_INCLUDE_DIR_PARMS "-I" ${ISPC_INCLUDE_DIR_PARMS})
+  endif()

   #CAUTION: -O0/1 -g with ispc seg faults
-  SET(ISPC_FLAGS_DEBUG "-g" CACHE STRING "ISPC Debug flags")
-  MARK_AS_ADVANCED(ISPC_FLAGS_DEBUG)
-  SET(ISPC_FLAGS_RELEASE "-O3" CACHE STRING "ISPC Release flags")
-  MARK_AS_ADVANCED(ISPC_FLAGS_RELEASE)
-  SET(ISPC_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "ISPC Release with Debug symbols flags")
-  MARK_AS_ADVANCED(ISPC_FLAGS_RELWITHDEBINFO)
-  IF (WIN32 OR "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
-    SET(ISPC_OPT_FLAGS ${ISPC_FLAGS_RELEASE})
-  ELSEIF ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
-    SET(ISPC_OPT_FLAGS ${ISPC_FLAGS_DEBUG})
-  ELSE()
-    SET(ISPC_OPT_FLAGS ${ISPC_FLAGS_RELWITHDEBINFO})
-  ENDIF()
+  set(ISPC_FLAGS_DEBUG "-g" CACHE STRING "ISPC Debug flags")
+  mark_as_advanced(ISPC_FLAGS_DEBUG)
+  set(ISPC_FLAGS_RELEASE "-O3" CACHE STRING "ISPC Release flags")
+  mark_as_advanced(ISPC_FLAGS_RELEASE)
+  set(ISPC_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "ISPC Release with Debug symbols flags")
+  mark_as_advanced(ISPC_FLAGS_RELWITHDEBINFO)
+  if (WIN32 OR "${CMAKE_BUILD_TYPE}" STREQUAL "Release")
+    set(ISPC_OPT_FLAGS ${ISPC_FLAGS_RELEASE})
+  elseif ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
+    set(ISPC_OPT_FLAGS ${ISPC_FLAGS_DEBUG})
+  else()
+    set(ISPC_OPT_FLAGS ${ISPC_FLAGS_RELWITHDEBINFO})
+  endif()

   # turn space sparated list into ';' separated list
-  STRING(REPLACE " " ";" ISPC_OPT_FLAGS "${ISPC_OPT_FLAGS}")
-
-  IF (NOT WIN32)
-    SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --pic)
-  ENDIF()
-
-  IF (NOT OSPRAY_DEBUG_BUILD)
-    SET(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --opt=disable-assertions)
-  ENDIF()
-
-  SET(ISPC_OBJECTS "")
-
-  FOREACH(src ${ARGN})
-    GET_FILENAME_COMPONENT(fname ${src} NAME_WE)
-    GET_FILENAME_COMPONENT(dir ${src} PATH)
-
-    SET(input ${src})
-    IF ("${dir}" MATCHES "^/") # absolute unix-style path to input
-      SET(outdir "${ISPC_TARGET_DIR}/rebased${dir}")
-    ELSEIF ("${dir}" MATCHES "^[A-Z]:") # absolute DOS-style path to input
-      STRING(REGEX REPLACE "^[A-Z]:" "${ISPC_TARGET_DIR}/rebased/" outdir "${dir}")
-    ELSE() # relative path to input
-      SET(outdir "${ISPC_TARGET_DIR}/local_${OSPRAY_ISPC_TARGET_NAME}_${dir}")
-      SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
-    ENDIF()
-
-    SET(deps "")
-    IF (EXISTS ${outdir}/${fname}.dev.idep)
-      FILE(READ ${outdir}/${fname}.dev.idep contents)
-      STRING(REPLACE " " ";"     contents "${contents}")
-      STRING(REPLACE ";" "\\\\;" contents "${contents}")
-      STRING(REPLACE "\n" ";"    contents "${contents}")
-      FOREACH(dep ${contents})
-        IF (EXISTS ${dep})
-          SET(deps ${deps} ${dep})
-        ENDIF (EXISTS ${dep})
-      ENDFOREACH(dep ${contents})
-    ENDIF ()
-
-    SET(results "${outdir}/${fname}.dev${ISPC_TARGET_EXT}")
+  string(REPLACE " " ";" ISPC_OPT_FLAGS "${ISPC_OPT_FLAGS}")
+
+  if (NOT WIN32)
+    set(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --pic)
+  endif()
+
+  if (NOT OSPRAY_DEBUG_BUILD)
+    set(ISPC_ADDITIONAL_ARGS ${ISPC_ADDITIONAL_ARGS} --opt=disable-assertions)
+  endif()
+
+  set(ISPC_OBJECTS "")
+
+  foreach(src ${ARGN})
+    get_filename_component(fname ${src} NAME_WE)
+    get_filename_component(dir ${src} PATH)
+
+    set(input ${src})
+    if ("${dir}" MATCHES "^/") # absolute unix-style path to input
+      set(outdir "${ISPC_TARGET_DIR}/rebased${dir}")
+    elseif ("${dir}" MATCHES "^[A-Z]:") # absolute DOS-style path to input
+      string(REGEX REPLACE "^[A-Z]:" "${ISPC_TARGET_DIR}/rebased/" outdir "${dir}")
+    else() # relative path to input
+      set(outdir "${ISPC_TARGET_DIR}/local_${OSPRAY_ISPC_TARGET_NAME}_${dir}")
+      set(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
+    endif()
+
+    set(deps "")
+    if (EXISTS ${outdir}/${fname}.dev.idep)
+      file(READ ${outdir}/${fname}.dev.idep contents)
+      string(REPLACE " " ";"     contents "${contents}")
+      string(REPLACE ";" "\\\\;" contents "${contents}")
+      string(REPLACE "\n" ";"    contents "${contents}")
+      foreach(dep ${contents})
+        if (EXISTS ${dep})
+          set(deps ${deps} ${dep})
+        endif (EXISTS ${dep})
+      endforeach(dep ${contents})
+    endif ()
+
+    set(results "${outdir}/${fname}.dev${ISPC_TARGET_EXT}")
     # if we have multiple targets add additional object files
-    LIST(LENGTH ISPC_TARGETS NUM_TARGETS)
-    IF (NUM_TARGETS GREATER 1)
-      FOREACH(target ${ISPC_TARGETS})
-        STRING(REPLACE "-i32x16" "" target ${target}) # strip avx512(knl|skx)-i32x16
-        SET(results ${results} "${outdir}/${fname}.dev_${target}${ISPC_TARGET_EXT}")
-      ENDFOREACH()
-    ENDIF()
-
-    ADD_CUSTOM_COMMAND(
+    list(LENGTH ISPC_TARGETS NUM_TARGETS)
+    if (NUM_TARGETS GREATER 1)
+      foreach(target ${ISPC_TARGETS})
+        string(REPLACE "-i32x16" "" target ${target}) # strip avx512(knl|skx)-i32x16
+        set(results ${results} "${outdir}/${fname}.dev_${target}${ISPC_TARGET_EXT}")
+      endforeach()
+    endif()
+
+    add_custom_command(
       OUTPUT ${results} ${ISPC_TARGET_DIR}/${fname}_ispc.h
       COMMAND ${CMAKE_COMMAND} -E make_directory ${outdir}
       COMMAND ${ISPC_EXECUTABLE}
@@ -209,6 +209,6 @@
       COMMENT "Building ISPC object ${outdir}/${fname}.dev${ISPC_TARGET_EXT}"
     )

-    SET(ISPC_OBJECTS ${ISPC_OBJECTS} ${results})
-  ENDFOREACH()
-ENDMACRO()
+    set(ISPC_OBJECTS ${ISPC_OBJECTS} ${results})
+  endforeach()
+endmacro()


Make ament_python_install_package() install console_scripts (#328)

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


ENH: Build tools are now in the build tree and not in the Slicer build tree

Addition of CMake variables:
 RUNTIME_OUTPUT_DIRECTORY
 LIBRARY_OUTPUT_DIRECTORY
 ARCHIVE_OUTPUT_DIRECTORY

that are given to SEMMacroBuildCLI()

--- FiberViewerLight.cmake
+++ FiberViewerLight.cmake
@@ -7,6 +7,8 @@

 if( NOT RUNTIME_OUTPUT_DIRECTORY )
   set( RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
+  set( LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
+  set( ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/static)
 endif()

 FIND_PACKAGE(VTK REQUIRED)
@@ -96,6 +98,8 @@
   EXECUTABLE_ONLY
   ADDITIONAL_SRCS ${FVLight_source} ${FVLight_header} ${MOC_FILES}
   RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_OUTPUT_DIRECTORY}
+  LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY}
+  ARCHIVE_OUTPUT_DIRECTORY ${ARCHIVE_OUTPUT_DIRECTORY}
   TARGET_LIBRARIES ${FVL_LIBRARIES}
   LINK_DIRECTORIES ${VTK_LIBRARY_DIRS}
   INCLUDE_DIRECTORIES ${QT_INCLUDE_DIR} ${FiberViewerLight_BINARY_DIR} ${FiberViewerLight_SOURCE_DIR} ${QWT_INCLUDE_DIR} ${VTK_INCLUDE_DIRS}


Use GREATER, not GREATER_EQUAL

Use GREATER, not GREATER_EQUAL

CMake 3.0 and older do not support GREATER_EQUAL.

--- CMake/hoomd/HOOMDCUDASetup.cmake
+++ CMake/hoomd/HOOMDCUDASetup.cmake
@@ -63,7 +63,7 @@
         message(SEND_ERROR "SM1x builds are not supported")
     endif ()

-    if (_cuda_max_arch GREATER_EQUAL 70)
+    if (_cuda_max_arch GREATER 69)
         message(SEND_ERROR "HOOMD does not support SM7x builds")
     endif ()


Allow unpacking a rootfs tarball

Allow unpacking a rootfs tarball

--- Buildroot.cmake
+++ Buildroot.cmake
@@ -173,7 +173,7 @@
 function(buildroot_target name)
     set(one_value_keywords
             CONFIG OUTPUT SOURCE_DIR TOOLCHAIN
-            ARTIFACT_OUTPUT ARTIFACT_PREBUILT
+            ARTIFACT_OUTPUT ARTIFACT_PREBUILT ARTIFACT_PREBUILT_UNPACK_TO ARTIFACT_PREBUILT_UNPACK_ARGS
             DEVICE_TREE_ARTIFACT_OUTPUT DEVICE_TREE_ARTIFACT_PREBUILT
             HOST_TOOLS_ARTIFACT_OUTPUT HOST_TOOLS_ARTIFACT_PREBUILT
             )
@@ -238,14 +238,22 @@
     if(artifact_prebuilt
        AND (device_tree_artifact_prebuilt OR NOT BR_DEVICE_TREE_ARTIFACT_PREBUILT)
        AND (host_tools_artifact_prebuilt OR NOT BR_HOST_TOOLS_ARTIFACT_PREBUILT))
-        _buildroot_use_prebuilt_file(
-            ${name} ${artifact_prebuilt} ${main_output})
+        if(BR_ARTIFACT_PREBUILT_UNPACK_TO)
+          _buildroot_use_prebuilt_directory(
+              ${name} ${artifact_prebuilt}
+              ${main_output} "${build_dir}/${BR_ARTIFACT_PREBUILT_UNPACK_TO}" ""
+              "" "${BR_ARTIFACT_PREBUILT_UNPACK_ARGS}")
+          list(APPEND all_outputs ${main_output})
+        else()
+          _buildroot_use_prebuilt_file(
+              ${name} ${artifact_prebuilt} ${main_output})
+        endif()

         if(device_tree_artifact_prebuilt)
             _buildroot_use_prebuilt_directory(
                 "${name} device trees" ${device_tree_artifact_prebuilt}
-                ${device_tree_output} ${build_dir} "${device_tree_check_files}"
-                "")
+                ${device_tree_output} "" "${device_tree_check_files}"
+                "" "")
             list(APPEND all_outputs ${device_tree_output})
         elseif(BR_DEVICE_TREE_ARTIFACT_PREBUILT)
             message(FATAL_ERROR
@@ -256,8 +264,8 @@
         if(host_tools_artifact_prebuilt)
             _buildroot_use_prebuilt_directory(
                 "${name} host tools" ${host_tools_artifact_prebuilt}
-                ${host_tools_output} ${build_dir} "${host_tools_check_files}"
-                "${toolchain_depends}"
+                ${host_tools_output} "" "${host_tools_check_files}"
+                "${toolchain_depends}" ""
                 )
             list(APPEND all_outputs ${host_tools_output})

@@ -370,7 +378,7 @@

     if(artifact_prebuilt)
         _buildroot_use_prebuilt_directory(
-            ${name} ${artifact_prebuilt} ${toolchain_output} ${build_dir} ${check_files} "")
+            ${name} ${artifact_prebuilt} ${toolchain_output} "" ${check_files} "" "")
     else()
         # Config preparation. This uses scripts/config from the Linux source tree.
         _buildroot_prepare_config(${source_dir} ${build_dir} ${BR_TOOLCHAIN_CONFIG} ${config_commands})
@@ -586,7 +594,7 @@
         )
 endfunction()

-function(_buildroot_use_prebuilt_directory name prebuilt_file output_file output_dir check_files extra_depends)
+function(_buildroot_use_prebuilt_directory name prebuilt_file output_file unpack_dir check_files extra_depends unpack_args)
     if(NOT IS_ABSOLUTE ${output_file})
         set(output_file ${CMAKE_CURRENT_BINARY_DIR}/${output_file})
     endif()
@@ -594,11 +602,17 @@
     get_filename_component(output_dir ${output_file} DIRECTORY)
     file(MAKE_DIRECTORY ${output_dir})

+    if(unpack_dir)
+      file(MAKE_DIRECTORY ${unpack_dir})
+    else()
+      set(unpack_dir ${output_dir})
+    endif()
+
     add_custom_command(
         COMMAND
             cmake -E create_symlink ${prebuilt_file} ${output_file}
         COMMAND
-            tar --extract --directory=${output_dir} --file ${output_file}
+            tar --extract --directory=${unpack_dir} --file ${output_file} ${unpack_args}
         COMMAND
             ${BUILDROOT_CHECK_TARGET_CREATED_FILES} "${name}" ${output_file} ${check_files}
         OUTPUT ${output_file} ${check_files}


FIX (#5912): Quote paths in cache variables

--- BlueBerry/CMake/MacroCollectPlugins.cmake
+++ BlueBerry/CMake/MacroCollectPlugins.cmake
@@ -96,12 +96,12 @@
 SET(PLUGINS_SOURCE_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

 IF(_COLLECT_CACHE_PLUGIN_SOURCE_DIRS)
-  SET(${_COLLECT_CACHE_PLUGIN_SOURCE_DIRS} ${${_COLLECT_CACHE_PLUGIN_SOURCE_DIRS}} "${PLUGINS_SOURCE_BASE_DIR}"
+  SET(${_COLLECT_CACHE_PLUGIN_SOURCE_DIRS} ${${_COLLECT_CACHE_PLUGIN_SOURCE_DIRS}} "\"${PLUGINS_SOURCE_BASE_DIR}\""
       CACHE INTERNAL "List of base plugin source directories" FORCE)
 ENDIF(_COLLECT_CACHE_PLUGIN_SOURCE_DIRS)

 IF(_COLLECT_CACHE_PLUGIN_OUTPUT_DIRS)
-  SET(${_COLLECT_CACHE_PLUGIN_OUTPUT_DIRS} ${${_COLLECT_CACHE_PLUGIN_OUTPUT_DIRS}} "${_COLLECT_OUTPUT_DIR}"
+  SET(${_COLLECT_CACHE_PLUGIN_OUTPUT_DIRS} ${${_COLLECT_CACHE_PLUGIN_OUTPUT_DIRS}} "\"${_COLLECT_OUTPUT_DIR}\""
       CACHE INTERNAL "List of base plugin output directories" FORCE)
 ENDIF(_COLLECT_CACHE_PLUGIN_OUTPUT_DIRS)


added environment variable TREEJUCE_PREFIX to search prefix

--- FindTREEJUCE.cmake
+++ FindTREEJUCE.cmake
@@ -16,6 +16,7 @@
         ${TREEJUCE_SEARCH_PREFIX_BIN}
         ${TREEJUCE_SEARCH_PREFIX}/${CMAKE_INSTALL_BINDIR}
         ${TREEJUCE_SEARCH_PREFIX}/bin
+        $ENV{TREEJUCE_PREFIX}/bin
 )

 function(TREEJUCE_WRAP_RESOURCE input_dir class_name)
@@ -37,6 +38,7 @@
         ${TREEJUCE_SEARCH_PREFIX_INC}
         ${TREEJUCE_SEARCH_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}
         ${TREEJUCE_SEARCH_PREFIX}/include
+        $ENV{TREEJUCE_PREFIX}/include
 )

 #
@@ -63,6 +65,7 @@
             ${TREEJUCE_SEARCH_PREFIX_LIB}
             ${TREEJUCE_SEARCH_PREFIX}/${CMAKE_INSTALL_LIBDIR}
             ${TREEJUCE_SEARCH_PREFIX}/lib
+            $ENV{TREEJUCE_PREFIX}/lib
     )
     set_property(CACHE treejuce_main_lib
         PROPERTY


Fixed mistakes in last change.

Fixed mistakes in last change.

--- Tests/VisualTests/PostTest.cmake
+++ Tests/VisualTests/PostTest.cmake
@@ -8,9 +8,10 @@

 if (UNIX)
   # escape spaces
-  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
+  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOME}")
 elseif (WIN32)
-  string(REPLACE "\\" "/" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
+  # make sure we've got backslashes
+  string(REPLACE "/" "\\" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 # other platforms?
 endif ()

@@ -18,6 +19,6 @@
 if (UNIX)
   exec_program("rm ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
 elseif (WIN32)
-  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\TestResults_*RenderingSubsystem.txt\"")
+  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\\TestResults_*RenderingSubsystem.txt\"")
 # other platforms?
 endif ()


Changed method of cleaning up output files to work with Windows.

--- Tests/VisualTests/PostTest.cmake
+++ Tests/VisualTests/PostTest.cmake
@@ -7,10 +7,17 @@
 #-------------------------------------------------------------------

 if (UNIX)
-  set(USER_HOME_DIRECTORY $ENV{HOME})
+  # escape spaces
+  string(REPLACE " " "\ " USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 elseif (WIN32)
   string(REPLACE "\\" "/" USER_HOME_DIRECTORY "$ENV{HOMEDRIVE}$ENV{HOMEPATH}")
 # other platforms?
 endif ()

-exec_program("cmake -E remove ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
+# Use platform-specific utils, since 'cmake -E remove' didn't seem to handle wildcards in Windows
+if (UNIX)
+  exec_program("rm ${USER_HOME_DIRECTORY}/TestResults_*RenderingSubsystem.txt")
+elseif (WIN32)
+  exec_program("cmd /c del \"${USER_HOME_DIRECTORY}\TestResults_*RenderingSubsystem.txt\"")
+# other platforms?
+endif ()


use floating point fftw

use floating point fftw

--- cmake/FindFFTW.cmake
+++ cmake/FindFFTW.cmake
@@ -12,7 +12,7 @@

 find_path (FFTW_INCLUDES fftw3.h)

-find_library (FFTW_LIBRARIES NAMES fftw3)
+find_library (FFTW_LIBRARIES NAMES fftw3f)

 # handle the QUIETLY and REQUIRED arguments and set FFTW_FOUND to TRUE if
 # all listed variables are TRUE