itk: Only build the minimal set of modules required by the iiboost workflow in ilastik.

--- itk.cmake
+++ itk.cmake
@@ -44,33 +44,38 @@
         -DBUILD_SHARED_LIBS:BOOL=ON
         -DCMAKE_CXX_FLAGS=-I${BUILDEM_DIR}/include
         -DCMAKE_C_FLAGS=-I${BUILDEM_DIR}/include
+        -DITK_BUILD_DEFAULT_MODULES=0
+        -DBUILD_EXAMPLES=0
+        -DITKGroup_Core=1
+        -DModule_ITKConvolution=1
+        -DModule_ITKEigen=1

-    # hdf5
-    -DITK_USE_SYSTEM_HDF5=ON
-    -DHDF5_C_LIBRARY=${BUILDEM_LIB_DIR}/libhdf5.so.1.8.9
-    -DHDF5_DIR=${BUILDEM_DIR}/share/cmake/hdf5
-    # libpng
-    -DITK_USE_SYSTEM_PNG=ON
-    -DPNG_PNG_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR} # PNG_PNG looks wrong, but that's what the variable is named.
-    -DPNG_LIBRARY=${BUILDEM_LIB_DIR}/libpng.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
-    # libjpeg
-    -DITK_USE_SYSTEM_JPEG=ON
-    -DJPEG_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR}
-    -DJPEG_LIBRARY=${BUILDEM_LIB_DIR}/libjpeg.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
-    # libtiff
-    -DITK_USE_SYSTEM_TIFF=ON
-    -DTIFF_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR}
-    -DTIFF_LIBRARY=${BUILDEM_LIB_DIR}/libtiff.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
-    # zlib
-    -DITK_USE_SYSTEM_ZLIB=ON
-    -DZLIB_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR}
-    -DZLIB_LIBRARY=${BUILDEM_LIB_DIR}/libz.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
+	# hdf5
+	-DITK_USE_SYSTEM_HDF5=ON
+	-DHDF5_C_LIBRARY=${BUILDEM_LIB_DIR}/libhdf5.so.1.8.9
+	-DHDF5_DIR=${BUILDEM_DIR}/share/cmake/hdf5
+	# libpng
+	-DITK_USE_SYSTEM_PNG=ON
+	-DPNG_PNG_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR} # PNG_PNG looks wrong, but that's what the variable is named.
+	-DPNG_LIBRARY=${BUILDEM_LIB_DIR}/libpng.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
+	# libjpeg
+	-DITK_USE_SYSTEM_JPEG=ON
+	-DJPEG_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR}
+	-DJPEG_LIBRARY=${BUILDEM_LIB_DIR}/libjpeg.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
+	# libtiff
+	-DITK_USE_SYSTEM_TIFF=ON
+	-DTIFF_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR}
+	-DTIFF_LIBRARY=${BUILDEM_LIB_DIR}/libtiff.${BUILDEM_PLATFORM_DYLIB_EXTENSION}
+	# zlib
+	-DITK_USE_SYSTEM_ZLIB=ON
+	-DZLIB_INCLUDE_DIR=${BUILDEM_INCLUDE_DIR}
+	-DZLIB_LIBRARY=${BUILDEM_LIB_DIR}/libz.${BUILDEM_PLATFORM_DYLIB_EXTENSION}

-	# We want itk to be built in parallel if possible.
-	# Therefore we use $(MAKE) instead of 'make', which somehow enables sub-make files to use the jobserver correctly.
-	# See: http://stackoverflow.com/questions/2942465/cmake-and-parallel-building-with-make-jn
-	# And: http://www.cmake.org/pipermail/cmake/2011-April/043720.html
+    # We want itk to be built in parallel if possible.
+    # Therefore we use $(MAKE) instead of 'make', which somehow enables sub-make files to use the jobserver correctly.
+    # See: http://stackoverflow.com/questions/2942465/cmake-and-parallel-building-with-make-jn
+    # And: http://www.cmake.org/pipermail/cmake/2011-April/043720.html
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
     #TEST_COMMAND        ${BUILDEM_ENV_STRING} $(MAKE) check
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE) install


Updated rocky linux linux name

Updated rocky linux linux name

--- cmake/EnumerateSystem.cmake
+++ cmake/EnumerateSystem.cmake
@@ -43,7 +43,7 @@
       # Rocky Linux case
       if(LINUX_ISSUE MATCHES "Rocky Linux")
         string(REGEX MATCH "release ([0-9]+)" ROCKY LINUX "${LINUX_ISSUE}")
-        set(LINUX_NAME "Rocky Linux")
+        set(LINUX_NAME "RockyLinux")
         set(LINUX_VER "${CMAKE_MATCH_1}")
         set(RPM_SYSTEM_NAME "rhel${CMAKE_MATCH_1}")
         set(SPECIFIC_SYSTEM_PREFERED_CPACK_GENERATOR "RPM")


Add missing packages to the Debian conflict list

And refactor the code to make sure that the dev and runtime package lists are
in sync.

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -115,15 +115,14 @@
   endif()
 endif()

-set(STD_OPENCV_LIBS opencv-data libopencv-calib3d2.4 libopencv-contrib2.4 libopencv-core2.4
-    libopencv-features2d2.4 libopencv-flann2.4 libopencv-gpu2.4 libopencv-imgproc2.4
-    libopencv-ml2.4 libopencv-ocl2.4 libopencv-stitching2.4 libopencv-ts2.4 libopencv-videostab2.4)
-
-set(STD_OPENCV_DEV libopencv-calib3d-dev libopencv-contrib-dev libopencv-core-dev
-    libopencv-dev libopencv-features2d-dev libopencv-flann-dev libopencv-gpu-dev
-    libopencv-highgui-dev libopencv-imgproc-dev libopencv-legacy-dev libopencv-ml-dev
-    libopencv-objdetect-dev libopencv-ocl-dev libopencv-photo-dev libopencv-stitching-dev
-    libopencv-superres-dev libopencv-ts-dev libopencv-video-dev libopencv-videostab-dev)
+set(STD_OPENCV_LIBS opencv-data)
+set(STD_OPENCV_DEV libopencv-dev)
+
+foreach(module calib3d contrib core features2d flann gpu highgui imgproc legacy
+               ml objdetect ocl photo stitching superres ts video videostab)
+  list(APPEND STD_OPENCV_LIBS "libopencv-${module}2.4")
+  list(APPEND STD_OPENCV_DEV "libopencv-${module}-dev")
+endforeach()

 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_CONFLICTS "${STD_OPENCV_LIBS}")
 string(REPLACE ";" ", " CPACK_COMPONENT_LIBS_PROVIDES "${STD_OPENCV_LIBS}")


[MLIR] Suppress warning from usage of C99 flexible array members on AppleClang. (#4204)

* Remove usage of C99 array.

* Try to fix ABI mismatch.

* Suppress warning on AppleClang.

* Revert back to using C99 flexible array member and suppress warning
instead as suggested by https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html

--- cmake/clang_4_0_flags.cmake
+++ cmake/clang_4_0_flags.cmake
@@ -35,6 +35,7 @@
     if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.1.0)
         #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-zero-as-null-pointer-constant")
     endif()
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c99-extensions")
 endif()

 # should remove these


fix order of options

fix order of options

--- cmake/megamol_options.cmake
+++ cmake/megamol_options.cmake
@@ -27,6 +27,13 @@
     "Unsupported compiler specified: '${CMAKE_CXX_COMPILER_ID}'")
 endif()

+# OpenGL
+option(ENABLE_GL "Enable GL support" ON)
+if (ENABLE_GL)
+  add_compile_definitions(WITH_GL)
+  find_package(OpenGL REQUIRED)
+endif()
+
 # CUDA
 option(ENABLE_CUDA "Enable CUDA support" OFF)
 if(ENABLE_CUDA)
@@ -34,6 +41,23 @@
   set(CMAKE_CUDA_ARCHITECTURES FALSE)
 endif()

+# MPI
+option(ENABLE_MPI "Enable MPI support" OFF)
+set(MPI_GUESS_LIBRARY_NAME "undef" CACHE STRING "Override MPI library name, e.g., MSMPI, MPICH2")
+if(ENABLE_MPI)
+  if(MPI_GUESS_LIBRARY_NAME STREQUAL "undef")
+    message(FATAL_ERROR "you must set MPI_GUESS_LIBRARY_NAME to ovveride automatic finding of unwanted MPI libraries (or empty for default)")
+  endif()
+  find_package(MPI REQUIRED)
+  if(MPI_C_FOUND)
+    target_compile_definitions(MPI::MPI_C INTERFACE "-DWITH_MPI")
+  endif()
+endif()
+
+# GLFW
+option(USE_GLFW "Use GLFW" ON)
+
+# Profiling
 if (ENABLE_GL)
   option(ENABLE_PROFILING "Enable profiling code" OFF)
   if (ENABLE_PROFILING)
@@ -57,29 +81,6 @@
   endif()
 endif()

-# GLFW
-option(USE_GLFW "Use GLFW" ON)
-
-# MPI
-option(ENABLE_MPI "Enable MPI support" OFF)
-set(MPI_GUESS_LIBRARY_NAME "undef" CACHE STRING "Override MPI library name, e.g., MSMPI, MPICH2")
-if(ENABLE_MPI)
-  if(MPI_GUESS_LIBRARY_NAME STREQUAL "undef")
-    message(FATAL_ERROR "you must set MPI_GUESS_LIBRARY_NAME to ovveride automatic finding of unwanted MPI libraries (or empty for default)")
-  endif()
-  find_package(MPI REQUIRED)
-  if(MPI_C_FOUND)
-    target_compile_definitions(MPI::MPI_C INTERFACE "-DWITH_MPI")
-  endif()
-endif()
-
-# OpenGL
-option(ENABLE_GL "Enable GL support" ON)
-if (ENABLE_GL)
-  add_compile_definitions(WITH_GL)
-  find_package(OpenGL REQUIRED)
-endif()
-
 # Threading (XXX: this is a bit wonky due to Ubuntu/clang)
 include(CheckFunctionExists)
 check_function_exists(pthread_create HAVE_PTHREAD)


CMake: Use pthread library when requested and available.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -34,6 +34,9 @@
       target_link_libraries(${name} imagehlp psapi)
     elseif( CMAKE_HOST_UNIX )
       target_link_libraries(${name} dl)
+      if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
+	target_link_libraries(${name} pthread)
+      endif()
     endif( MINGW )
   endif( MSVC )
 endmacro(add_llvm_executable name)


Revert r122395, "Fixes file extension for loadable modules on OS X."

In trunk, every users assume add_llvm_loadable_module as "loadable module" and no one sets neither SHARED, ... nor also MODULE!
Unfortunately, all loadable modules were linked as not "MODULE" but "SHARED".

If this change caused any regressions, I wish guys to fix it properly. ;)

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -217,14 +217,7 @@
     # Add empty "phony" target
     add_custom_target(${name})
   else()
-    llvm_process_sources( ALL_FILES ${ARGN} )
-    if (MODULE)
-      set(libkind MODULE)
-    else()
-      set(libkind SHARED)
-    endif()
-
-    add_library( ${name} ${libkind} ${ALL_FILES} )
+    add_library(${name} MODULE ${ALL_FILES})
     set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
     set_target_properties( ${name} PROPERTIES PREFIX "" )
     llvm_update_compile_flags(${name})


Doxygen.cmake: set_package_properties also for doxygen

--- cmake/modules/Doxygen.cmake
+++ cmake/modules/Doxygen.cmake
@@ -2,6 +2,11 @@
 file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/doc)

 find_package(Doxygen)
+set_package_properties(Doxygen PROPERTIES
+    DESCRIPTION "Documentation generator"
+    URL "http://doxygen.org"
+    PURPOSE "Needed to generate the API documentation")
+
 if(DOXYGEN_FOUND)
     find_program(QHELPGENERATOR_EXECUTABLE qhelpgenerator)
     mark_as_advanced(QHELPGENERATOR_EXECUTABLE)


cmake: move ZEPHYR_TOOLCHAIN_VARIANT export to common settings

Fixes: #43378

Move the exporting of ZEPHYR_TOOLCHAIN_VARIANT from the custom target to
the COMMON_KCONFIG_ENV_SETTINGS variable.
This ensures that the setting is exported both when running the initial
kconfiglib parsing but also on later menuconfig / guiconfig invocations.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/modules/kconfig.cmake
+++ cmake/modules/kconfig.cmake
@@ -116,6 +116,7 @@
   ARCH_DIR=${ARCH_DIR}
   BOARD_DIR=${BOARD_DIR}
   KCONFIG_BINARY_DIR=${KCONFIG_BINARY_DIR}
+  ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
   TOOLCHAIN_KCONFIG_DIR=${TOOLCHAIN_KCONFIG_DIR}
   TOOLCHAIN_HAS_NEWLIB=$<IF:$<BOOL:${TOOLCHAIN_HAS_NEWLIB}>,y,n>
   EDT_PICKLE=${EDT_PICKLE}
@@ -154,7 +155,6 @@
     ${kconfig_target}
     ${CMAKE_COMMAND} -E env
     ZEPHYR_BASE=${ZEPHYR_BASE}
-    ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
     ${COMMON_KCONFIG_ENV_SETTINGS}
     "SHIELD_AS_LIST=${SHIELD_AS_LIST_ESCAPED}"
     DTS_POST_CPP=${DTS_POST_CPP}


[INTERNAL] SeqAnSimdUtility: Force compiler to use avx512 instructions in try-compile

--- util/cmake/SeqAnSimdUtility.cmake
+++ util/cmake/SeqAnSimdUtility.cmake
@@ -185,18 +185,22 @@
 "#include <cstdint>
 #include <immintrin.h>
 #include <iostream>
+#include <random>

 int main() {
+  std::random_device r;
+  std::default_random_engine e(r());
+  std::uniform_int_distribution<int64_t> d(1, 10);
+
   alignas(64) uint64_t s[]{9,9,9,9,9,9,9,9};
   alignas(64) uint64_t t[]{0,0,0,0,0,0,0,0};

   // gcc 4.9 does not know _mm512_cmpgt_epu64_mask
-  volatile auto a = _mm512_setr_epi64(7,6,5,4,3,2,1,0);
+  volatile auto a = _mm512_setr_epi64(d(e),d(e),d(e),d(e),d(e),d(e),d(e),d(e));
   volatile auto m = _mm512_cmpgt_epu64_mask(a, _mm512_set1_epi64(4)); // m = a > 4
   volatile auto z = _mm512_mask_load_epi64(a, m, s); // (a > 4) ? s : a
   _mm512_store_epi64(t, z);

-  // (9, 9, 9, 4, 3, 2, 1, 0)
   std::cout << \"(\" << t[0] << \", \" << t[1] << \", \" << t[2] << \", \" << t[3] << \", ...)\" << std::endl;
   return 0;
 }")


Updates tryrun.cmake for ARM cross build (#5317)

--- cross/arm/tryrun.cmake
+++ cross/arm/tryrun.cmake
@@ -114,3 +114,18 @@
      0
      CACHE STRING "Result from TRY_RUN" FORCE)

+SET( HAVE_PROCFS_CTL_EXITCODE
+     1
+     CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( HAVE_PROCFS_MAPS_EXITCODE
+     1
+     CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( HAVE_PROCFS_STAT_EXITCODE
+     1
+     CACHE STRING "Result from TRY_RUN" FORCE)
+
+SET( HAVE_PROCFS_STATUS_EXITCODE
+     1
+     CACHE STRING "Result from TRY_RUN" FORCE)


fix copy-paste error

fix copy-paste error

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -85,7 +85,7 @@
       "-Wno-unused-variable"
     )
   endif()
-  if(NOT "${_opensplice_compile_flags} " STREQUAL " ")
+  if(NOT "${_connext_compile_flags} " STREQUAL " ")
     string(REPLACE ";" " " _connext_compile_flags "${_connext_compile_flags}")
     foreach(_gen_file ${_generated_external_msg_files})
       set_source_files_properties("${_gen_file}"


fix SKIP_INSTALL to affect generated files

--- rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
+++ rosidl_typesupport_connext_cpp/cmake/rosidl_typesupport_connext_cpp_generate_interfaces.cmake
@@ -205,25 +205,27 @@
   ${rosidl_generate_interfaces_TARGET}${_target_suffix}
 )

-if(NOT "${_generated_msg_files}${_generated_external_msg_files} " STREQUAL " ")
+if(NOT rosidl_generate_interfaces_SKIP_INSTALL)
+  if(NOT "${_generated_msg_files}${_generated_external_msg_files} " STREQUAL " ")
+    install(
+      FILES ${_generated_msg_files} ${_generated_external_msg_files}
+      DESTINATION "include/${PROJECT_NAME}/msg/dds_connext"
+    )
+  endif()
+  if(NOT "${_generated_srv_files} " STREQUAL " ")
+    install(
+      FILES ${_generated_srv_files}
+      DESTINATION "include/${PROJECT_NAME}/srv/dds_connext"
+    )
+  endif()
+
   install(
-    FILES ${_generated_msg_files} ${_generated_external_msg_files}
-    DESTINATION "include/${PROJECT_NAME}/msg/dds_connext"
+    TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
+    ARCHIVE DESTINATION lib
+    LIBRARY DESTINATION lib
+    RUNTIME DESTINATION bin
   )
 endif()
-if(NOT "${_generated_srv_files} " STREQUAL " ")
-  install(
-    FILES ${_generated_srv_files}
-    DESTINATION "include/${PROJECT_NAME}/srv/dds_connext"
-  )
-endif()
-
-install(
-  TARGETS ${rosidl_generate_interfaces_TARGET}${_target_suffix}
-  ARCHIVE DESTINATION lib
-  LIBRARY DESTINATION lib
-  RUNTIME DESTINATION bin
-)

 ament_export_libraries(${rosidl_generate_interfaces_TARGET}${_target_suffix} ${Connext_LIBRARIES})


Fix SQLiteCpp build on iOS versions < 11

--- platforms/ios/config.cmake
+++ platforms/ios/config.cmake
@@ -7,8 +7,12 @@
 set(CMAKE_OSX_SYSROOT "iphoneos")
 set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")
 set(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "9.3")
+execute_process(COMMAND xcrun --sdk iphoneos --show-sdk-version OUTPUT_VARIABLE IOS_SDK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)

 # Tell SQLiteCpp to not build its own copy of SQLite, we will use the system library instead.
+if (IOS_SDK_VERSION VERSION_LESS 11.0)
+  set(SQLITE_USE_LEGACY_STRUCT ON CACHE BOOL "")
+endif()
 set(SQLITECPP_INTERNAL_SQLITE OFF CACHE BOOL "")

 set(TANGRAM_FRAMEWORK_HEADERS


Revert changes in FindBuildUtils (#1292)

***NO_CI***

--- CMake/Modules/FindBuildUtils.cmake
+++ CMake/Modules/FindBuildUtils.cmake
@@ -46,7 +46,7 @@
                 COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${TARGET_SHORT}.elf> ${TARGET_BIN_FILE}

                 # copy target file to build folder (this is only usefull for debugging in VS Code because of path in launch.json)
-                #COMMAND ${CMAKE_OBJCOPY} $<TARGET_FILE:${TARGET_SHORT}.elf> ${PROJECT_SOURCE_DIR}/build/${TARGET_SHORT}.elf
+                COMMAND ${CMAKE_OBJCOPY} $<TARGET_FILE:${TARGET_SHORT}.elf> ${PROJECT_SOURCE_DIR}/build/${TARGET_SHORT}.elf

                 COMMENT "Generate nanoBooter HEX and BIN files for deployment")

@@ -59,7 +59,7 @@
                 COMMAND ${CMAKE_OBJCOPY} -Obinary $<TARGET_FILE:${TARGET_SHORT}.elf> ${TARGET_BIN_FILE}

                 # copy target file to build folder (this is only usefull for debugging in VS Code because of path in launch.json)
-                #COMMAND ${CMAKE_OBJCOPY} $<TARGET_FILE:${TARGET_SHORT}.elf> ${PROJECT_SOURCE_DIR}/build/${TARGET_SHORT}.elf
+                COMMAND ${CMAKE_OBJCOPY} $<TARGET_FILE:${TARGET_SHORT}.elf> ${PROJECT_SOURCE_DIR}/build/${TARGET_SHORT}.elf

                 # dump target image as source code listing
                 # ONLY when DEBUG info is available, this is on 'Debug' and 'RelWithDebInfo'


Correct minor typo error in the FindPulseAudio module. [ci skip]

--- CMake/Modules/FindPulseAudio.cmake
+++ CMake/Modules/FindPulseAudio.cmake
@@ -25,7 +25,6 @@
 #  PA_FOUND
 #  PA_INCLUDE_DIRS
 #  PA_LIBRARIES
-#  PA_VERSION
 #

 find_path (PA_INCLUDE_DIRS NAMES pulse/pulseaudio.h DOC "PulseAudio include directories")
@@ -36,9 +35,9 @@
 endif ()
 if (PA_FOUND)
     include (FindPackageMessage)
-    find_package_message (BCM_VC "Found PulseAudio: ${PA_LIBRARIES} ${PA_INCLUDE_DIRS}" "[${PA_LIBRARIES}][${PA_INCLUDE_DIRS}]")
+    find_package_message (PulseAudio "Found PulseAudio: ${PA_LIBRARIES} ${PA_INCLUDE_DIRS}" "[${PA_LIBRARIES}][${PA_INCLUDE_DIRS}]")
 elseif (PulseAudio_FIND_REQUIRED)
     message (FATAL_ERROR "Could not find PulseAudio")
 endif ()

-mark_as_advanced (PA_INCLUDE_DIRS PA_LIBRARIES PA_VERSION)
+mark_as_advanced (PA_INCLUDE_DIRS PA_LIBRARIES)


type-o in variable name

type-o in variable name

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1284 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Sagase.cmake
+++ CMakeModules/Sagase.cmake
@@ -51,7 +51,7 @@
     foreach (prefix ${path_prefixes})
         foreach (pkgname ${path_names})

-            foreach (inclname ${path_names})
+            foreach (inclname ${include_names})
                 set (includes ${includes}
                     ${prefix}/${pkgname}/${inclname}
                     ${prefix}/${inclname}/${pkgname})
@@ -183,10 +183,10 @@
         message (STATUS "trying brute-force search ")

         # take names to be directory names, and include "."
-        set (${PREFIX}_PATH_NAMES ${PKG_NAMES} ".")
+        set (PKG_NAMES ${PKG_NAMES} ".")

         # generate a combination of possible search paths
-        sagase_generate_paths (include_paths library_paths NAMES ${${PREFIX}_PATH_NAMES} PREFIXES ${PKG_PREFIXES})
+        sagase_generate_paths (include_paths library_paths NAMES ${PKG_NAMES} PREFIXES ${PKG_PREFIXES})

         # all C and C++ headers
         set (HEADER_POSTFIXES ".h" ".hpp" ".hh" ".hxx")
@@ -206,9 +206,9 @@
         foreach (component_ ${PKG_COMPONENTS})

             # get header path
-            foreach (pathname_ ${${PREFIX}_PATH_NAMES})
+            foreach (pkgname_ ${PKG_NAMES})
                 foreach (header_extension_ ${HEADER_POSTFIXES})
-                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pathname_}/${component_}${header_extension_} ${include_paths})
+                    find_path (${PREFIX}_${component_}_INCLUDE_DIR ${pkgname_}/${component_}${header_extension_} ${include_paths})

                     if (${PREFIX}_${component_}_INCLUDE_DIR)
                         set (${PREFIX}_INCLUDE_DIRS ${${PREFIX}_INCLUDE_DIRS} ${${PREFIX}_${component_}_INCLUDE_DIR})


Fix for no blosc

Fix for no blosc

--- rez_deps.cmake
+++ rez_deps.cmake
@@ -5,7 +5,9 @@
 file(TO_CMAKE_PATH $ENV{BOOST_INCLUDE_DIR} BOOST_INCLUDEDIR)
 file(TO_CMAKE_PATH $ENV{BOOST_INCLUDE_DIR} Boost_INCLUDE_DIR)

-file(TO_CMAKE_PATH $ENV{BLOSC_INCLUDE_DIR} BLOSC_INCLUDE_DIR)
+if(DEFINED ENV{BLOSC_INCLUDE_DIR})
+    file(TO_CMAKE_PATH $ENV{BLOSC_INCLUDE_DIR} BLOSC_INCLUDE_DIR)
+endif()

 file(TO_CMAKE_PATH $ENV{LIBJPEG_TURBO_LIBRARY_DIR} OPENJPEG_LIBRARY)
 file(TO_CMAKE_PATH $ENV{LIBJPEG_TURBO_INCLUDE_DIR} OPENJPEG_INCLUDE_DIR)


Use normalize build directory for openssl

--- 3rd_party/openssl/openssl.cmake
+++ 3rd_party/openssl/openssl.cmake
@@ -64,7 +64,7 @@
         message(FATAL_ERROR "Dependency: openssl is required")
     endif ()

-    set (3RD_PARTY_OPENSSL_BUILD_DIR "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}/build-obj-dir")
+    set (3RD_PARTY_OPENSSL_BUILD_DIR "${3RD_PARTY_OPENSSL_PKG_DIR}/openssl-${3RD_PARTY_OPENSSL_DEFAULT_VERSION}/build_jobs_${PROJECT_PREBUILT_PLATFORM_NAME}")
     if (NOT EXISTS ${3RD_PARTY_OPENSSL_BUILD_DIR})
         file(MAKE_DIRECTORY ${3RD_PARTY_OPENSSL_BUILD_DIR})
     endif()


Remove '#undef const' from config.h.cmake to sync with autoconf

This define was removed from config.h.in when Rafael removed our use of
libtool.

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -518,9 +518,6 @@
 /* Type of 1st arg on ELM Callback */
 #cmakedefine WIN32_ELMCB_PCSTR ${WIN32_ELMCB_PCSTR}

-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t


Let's try to look at all folders underneat EIGEN_ROOT

--- CMake/FindEigen.cmake
+++ CMake/FindEigen.cmake
@@ -89,12 +89,13 @@
   /opt/local/include
   /usr/include)
 # Additional suffixes to try appending to each search path.
-file(GLOB EIGEN_CANDIDATES ${EIGEN_ROOT}eigen*)
+file(GLOB EIGEN_CANDIDATES ${EIGEN_ROOT}*)
 LIST(APPEND EIGEN_CHECK_PATH_SUFFIXES
   eigen3 # Default root directory for Eigen.
   Eigen/include/eigen3 ) # Windows (for C:/Program Files prefix).
 MESSAGE(status ${EIGEN_ROOT})
 MESSAGE(status ${EIGEN_CANDIDATES})
+MESSAGE(status ${EIGEN_ROOT}eigen*)
 # Search supplied hint directories first if supplied.
 FIND_PATH(EIGEN_INCLUDE_DIR
   NAMES Eigen/Core


Modifications to allow more generic kubos-gcc upstream target.

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -20,3 +20,7 @@
 endmacro()

 gcc_load_toolchain("arm-none-eabi-")
+
+set(_C_FAMILY_FLAGS_INIT   "-std=c99 ${_C_FAMILY_FLAGS_INIT}")
+set(CMAKE_C_LINK_FLAGS   "--specs=nano.specs")
+set(CMAKE_CXX_LINK_FLAGS   "--specs=nano.specs")


[CMake] Mark runtime library link libraries as private

There's no need to expose these dependencies to consumers. This
matches the change made to other runtimes in D57456.

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

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -280,7 +280,7 @@
         OUTPUT_NAME ${output_name_${libname}})
     set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime")
     if(LIB_LINK_LIBS)
-      target_link_libraries(${libname} ${LIB_LINK_LIBS})
+      target_link_libraries(${libname} PRIVATE ${LIB_LINK_LIBS})
     endif()
     if(${type} STREQUAL "SHARED")
       if(COMMAND llvm_setup_rpath)


Revert "Updated the convert_files cmake file"

This reverts commit e3e2a13688e96c486cb150061b14b1a33cf96ca8.

--- cmake/Modules/convert_files.cmake
+++ cmake/Modules/convert_files.cmake
@@ -9,8 +9,7 @@
                      ${CMAKE_CURRENT_BINARY_DIR}/${dir})

   # Find imagemagick
-  find_package(ImageMagick COMPONENTS Magick++)
-  # find_package(ImageMagick COMPONENTS convert REQUIRED)
+  find_package(ImageMagick COMPONENTS convert REQUIRED)
   # Actually convert the image.
   add_custom_command(TARGET ${target} POST_BUILD COMMAND
                      ${ImageMagick_convert_EXECUTABLE}


Fix ROOT-9283: Do not create pyc files when running pyunit tests

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -1329,7 +1329,7 @@
       PYTHONPATH=${ROOTSYS}/lib:$ENV{PYTHONPATH})
   string(REGEX REPLACE "[_]" "-" good_name "${name}")
   ROOT_ADD_TEST(pyunittests-${good_name}
-                COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR} -p "*.py" -v
+                COMMAND ${PYTHON_EXECUTABLE} -B -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR} -p "*.py" -v
                 ENVIRONMENT ${ROOT_ENV})
 endfunction()

@@ -1345,7 +1345,7 @@
   get_filename_component(file_name ${file} NAME)
   get_filename_component(file_dir ${file} DIRECTORY)
   ROOT_ADD_TEST(pyunittests-${good_name}
-                COMMAND ${PYTHON_EXECUTABLE} -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR}/${file_dir} -p ${file_name} -v
+                COMMAND ${PYTHON_EXECUTABLE} -B -m unittest discover -s ${CMAKE_CURRENT_SOURCE_DIR}/${file_dir} -p ${file_name} -v
                 ENVIRONMENT ${ROOT_ENV})
 endfunction()


Correct appdata file location

Correct appdata file location

https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps

--- cmake_modules/PHD2Packaging.cmake
+++ cmake_modules/PHD2Packaging.cmake
@@ -74,7 +74,7 @@
   install(FILES ${phd_src_dir}/phd2.desktop
           DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/ )
   install(FILES ${phd_src_dir}/phd2.appdata.xml
-          DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata/ )
+          DESTINATION ${CMAKE_INSTALL_PREFIX}/share/metainfo/ )

   # Make Debian package
   set(CPACK_GENERATOR "DEB")


Fixed install path of dependency binaries in CMake script

--- CMake/InstallDependencies.cmake
+++ CMake/InstallDependencies.cmake
@@ -22,30 +22,30 @@
 option(OGRE_COPY_DEPENDENCIES "Copy dependency libs to the build directory" TRUE)

 macro(install_debug INPUT)
-  if (EXISTS ${OGRE_DEP_DIR}/lib/debug/${INPUT})
-    if (IS_DIRECTORY ${OGRE_DEP_DIR}/lib/debug/${INPUT})
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
+  if (EXISTS ${OGRE_DEP_DIR}/bin/debug/${INPUT})
+    if (IS_DIRECTORY ${OGRE_DEP_DIR}/bin/debug/${INPUT})
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
     else ()
-      install(FILES ${OGRE_DEP_DIR}/lib/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
+      install(FILES ${OGRE_DEP_DIR}/bin/debug/${INPUT} DESTINATION lib/debug CONFIGURATIONS Debug)
     endif ()
   else()
-    message(send_error "${OGRE_DEP_DIR}/lib/debug/${INPUT} did not exist, can't install!")
+    message(send_error "${OGRE_DEP_DIR}/bin/debug/${INPUT} did not exist, can't install!")
   endif ()
 endmacro()

 macro(install_release INPUT)
-  if (EXISTS ${OGRE_DEP_DIR}/lib/release/${INPUT})
-    if (IS_DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT})
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(DIRECTORY ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+  if (EXISTS ${OGRE_DEP_DIR}/bin/release/${INPUT})
+    if (IS_DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT})
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+      install(DIRECTORY ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
     else ()
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
-      install(FILES ${OGRE_DEP_DIR}/lib/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/release CONFIGURATIONS Release None "")
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/relwithdebinfo CONFIGURATIONS RelWithDebInfo)
+      install(FILES ${OGRE_DEP_DIR}/bin/release/${INPUT} DESTINATION lib/minsizerel CONFIGURATIONS MinSizeRel)
     endif ()
   else()
-    message(send_error "${OGRE_DEP_DIR}/lib/release/${INPUT} did not exist, can't install!")
+    message(send_error "${OGRE_DEP_DIR}/bin/release/${INPUT} did not exist, can't install!")
   endif ()
 endmacro()


CMake: Make BUILD_SHARED_LIBS visible in CMake GUI.

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

 # Build properties
+option(BUILD_SHARED_LIBS                        "Build engine as shared library."       ON)
 option(URHO3D_ENABLE_ALL                        "Enable (almost) all engine features."  ON)
 option(URHO3D_STATIC_RUNTIME                    "Link to static runtime"               OFF)
 set   (URHO3D_SSE             SSE2 CACHE STRING "Enable SSE instructions")


Work around missing cereal-config.cmake on ubuntu

--- CMake/hoomd/HOOMDMPISetup.cmake
+++ CMake/hoomd/HOOMDMPISetup.cmake
@@ -5,11 +5,13 @@
 if (ENABLE_MPI)
     # the package is needed
     find_package(MPI REQUIRED)
-    find_package(cereal CONFIG REQUIRED)
+    find_package(cereal CONFIG)
     if (cereal_FOUND)
         find_package_message(cereal "Found cereal: ${cereal_DIR}" "[${cereal_DIR}]")
+    else()
+        add_library(cereal INTERFACE IMPORTED)
+        find_package_message(cereal "Could not find cereal, assuming it is on a default path" "[${cereal_DIR}]")
     endif()
-

     mark_as_advanced(MPI_EXTRA_LIBRARY)
     mark_as_advanced(MPI_LIBRARY)


default arch='armv8-a' for arm64 platforms (M1 macs) (#1495)

Set option `-mcpu=aarch64` for target `aarch64-apple-darwin`

--- cmake/CompilerOptions.cmake
+++ cmake/CompilerOptions.cmake
@@ -172,7 +172,9 @@

         # Use -mcpu for all supported targets _except_ for x86, where it should be -march.

-        if(target_model MATCHES "x86|i[3456]86" OR target_model MATCHES "amd64" OR target_model MATCHES "aarch64")
+        if("${target}" MATCHES "aarch64-apple-darwin")
+            set(arch_opt "-mcpu=${arch}")
+        elseif(target_model MATCHES "x86|i[3456]86" OR target_model MATCHES "amd64" OR target_model MATCHES "aarch64")
             set(arch_opt "-march=${arch}")
         else()
             set(arch_opt "-mcpu=${arch}")


Add compiler warning

Add compiler warning

--- cmake/DevBaseCompiler.cmake
+++ cmake/DevBaseCompiler.cmake
@@ -63,10 +63,10 @@
     # -Wconversion
     # -Wsign-conversion
     set(CMAKE_C_FLAGS
-        "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -Wno-unused-parameter"
+        "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -Wno-unused-parameter -Wfloat-equal"
     )
     set(CMAKE_CXX_FLAGS
-        "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -ftemplate-backtrace-limit=0"
+        "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wcast-qual -Wwrite-strings -Werror=strict-aliasing -fno-strict-overflow -ftemplate-backtrace-limit=0 -Wfloat-equal"
     )

     # This results in an error on mingw/gcc 4.8/windows. Some warning about


Fix CMake syntax error in find script

Fix CMake syntax error in find script

--- cmake/Modules/FindACE.cmake
+++ cmake/Modules/FindACE.cmake
@@ -52,8 +52,6 @@
     set( ACE_INCLUDE_DIR  ${ACE_ROOT_DIR}  CACHE PATH "ACE include path" )
   else( EXISTS ${ACE_ROOT_DIR}/ace/ACE.h )
     set( ACE_INCLUDE_DIR  ${ACE_ROOT_DIR}/include  CACHE PATH "ACE include path" )
-  else( EXISTS ${ACE_ROOT_DIR}/include/ace/ACE.h )
-    set( ACE_INCLUDE_DIR  ${ACE_ROOT_DIR}/include  CACHE PATH "ACE include path" )
   endif( EXISTS ${ACE_ROOT_DIR}/ace/ACE.h )

   get_library_list(ACE ${ACE_LIBRARY_DIR} "d" "ACE")


Updating md5 to fixed metis library

Updating md5 to fixed metis library

--- cmake/ThirdPartyMetis.cmake
+++ cmake/ThirdPartyMetis.cmake
@@ -7,7 +7,7 @@
         modmetis-5.1.0
         PREFIX ${TPSRC}
         URL ${TPURL}/modmetis-5.1.0.tar.bz2
-        URL_MD5 "8f8313a768e4611d1748d10f88f3d702"
+        URL_MD5 "6c6816aea0f53db6c71b1d98ed4ad42b"
         DOWNLOAD_DIR ${TPSRC}
         CONFIGURE_COMMAND ${CMAKE_COMMAND}
             -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}


Another fix for old cmake: get_filename_component DIRECTORY -> PATH

--- cmake/fips_generators.cmake
+++ cmake/fips_generators.cmake
@@ -49,7 +49,7 @@
 macro(fips_add_generator group_name in_generator in_file out_src out_hdr)
     if (FipsAddFilesEnabled)
         get_filename_component(f_abs ${CurDir}${in_file} ABSOLUTE)
-        get_filename_component(f_dir ${f_abs} DIRECTORY)
+        get_filename_component(f_dir ${f_abs} PATH)
         if ("${in_generator}" STREQUAL "")
             # special case: input file is the generator script
             set(generator ${f_abs})


[CMake] Refactor add_llvm_tool_symlink for reuse

The old implementation of add_llvm_tool_symlink could fail in odd ways when building out of tree. This version solves that problem by not using the LLVM_* variables, and instead reaeding the target's properties.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1288,43 +1288,54 @@
   endif()
 endfunction()

-function(add_llvm_tool_symlink name dest)
-  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
+function(add_llvm_tool_symlink link_name target)
+  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "OUTPUT_DIR" "" ${ARGN})
+  if(NOT ARG_OUTPUT_DIR)
+    get_target_property(target_type ${target} TYPE)
+    if(${target_type} STREQUAL "STATIC_LIBRARY")
+      get_target_property(ARG_OUTPUT_DIR ${target} ARCHIVE_OUTPUT_DIRECTORY)
+    elseif(UNIX AND ${target_type} STREQUAL "SHARED_LIBRARY")
+      get_target_property(ARG_OUTPUT_DIR ${target} LIBRARY_OUTPUT_DIRECTORY)
+    else()
+      get_target_property(ARG_OUTPUT_DIR ${target} RUNTIME_OUTPUT_DIRECTORY)
+    endif()
+  endif()
+
   if(UNIX)
     set(LLVM_LINK_OR_COPY create_symlink)
-    set(dest_binary "${dest}${CMAKE_EXECUTABLE_SUFFIX}")
+    set(dest_binary "$<TARGET_FILE_NAME:${target}>")
   else()
     set(LLVM_LINK_OR_COPY copy)
-    set(dest_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/${dest}${CMAKE_EXECUTABLE_SUFFIX}")
-  endif()
-
-  set(output_path "${LLVM_RUNTIME_OUTPUT_INTDIR}/${name}${CMAKE_EXECUTABLE_SUFFIX}")
-
-  set(target_name ${name})
-  if(TARGET ${name})
-    set(target_name ${name}-link)
+    set(dest_binary "$<TARGET_FILE:${target}>")
+  endif()
+
+  set(output_path "${ARG_OUTPUT_DIR}/${link_name}${CMAKE_EXECUTABLE_SUFFIX}")
+
+  set(target_name ${link_name})
+  if(TARGET ${link_name})
+    set(target_name ${link_name}-link)
   endif()

   if(ARG_ALWAYS_GENERATE)
     set_property(DIRECTORY APPEND PROPERTY
       ADDITIONAL_MAKE_CLEAN_FILES ${dest_binary})
-    add_custom_command(TARGET ${dest} POST_BUILD
+    add_custom_command(TARGET ${target} POST_BUILD
       COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}")
   else()
     add_custom_command(OUTPUT ${output_path}
                      COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}"
-                     DEPENDS ${dest})
-    add_custom_target(${target_name} ALL DEPENDS ${output_path})
+                     DEPENDS ${target})
+    add_custom_target(${target_name} ALL DEPENDS ${target} ${output_path})
     set_target_properties(${target_name} PROPERTIES FOLDER Tools)

     # Make sure both the link and target are toolchain tools
-    if (${name} IN_LIST LLVM_TOOLCHAIN_TOOLS AND ${dest} IN_LIST LLVM_TOOLCHAIN_TOOLS)
+    if (${link_name} IN_LIST LLVM_TOOLCHAIN_TOOLS AND ${target} IN_LIST LLVM_TOOLCHAIN_TOOLS)
       set(TOOL_IS_TOOLCHAIN ON)
     endif()

     if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
-      llvm_install_symlink(${name} ${dest})
+      llvm_install_symlink(${link_name} ${target})
     endif()
   endif()
 endfunction()


update re2c to 1.2.1

update re2c to 1.2.1

--- cmake/modules/GetRE2C.cmake
+++ cmake/modules/GetRE2C.cmake
@@ -11,7 +11,7 @@
     download_project(
             PROJ                re2c
             GIT_REPOSITORY      https://github.com/skvadrik/re2c.git
-            GIT_TAG             1.2
+            GIT_TAG             1.2.1
             GIT_PROGRESS        1
     )


build: updated cloudtrail plugin to latest version.

Signed-off-by: Federico Di Pierro <6c3e26470d5343bb7a522873746c21bb7fcc0d20@gmail.com>

--- cmake/modules/plugins.cmake
+++ cmake/modules/plugins.cmake
@@ -17,8 +17,8 @@

 ExternalProject_Add(
   cloudtrail-plugin
-  URL "https://download.falco.org/plugins/stable/cloudtrail-0.2.1-${PLUGINS_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}.tar.gz"
-  URL_HASH "SHA256=7c2ffc5179baf5f624e766a108c7a1f5d6bd649df3ffdaa5497a836342d164b3"
+  URL "https://download.falco.org/plugins/stable/cloudtrail-0.2.2-${PLUGINS_SYSTEM_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}.tar.gz"
+  URL_HASH "SHA256=1628717e48b2ba1b9c78c9081e2ec23e4d88bb1a7b68b12cf8dff7f247b5b9b1"
   CONFIGURE_COMMAND ""
   BUILD_COMMAND ""
   INSTALL_COMMAND "")


fixes to find JNI

fixes to find JNI

--- cmake_modules/FindJNI.cmake
+++ cmake_modules/FindJNI.cmake
@@ -102,6 +102,7 @@
   ${_JAVA_HOME}/lib
   ${_JAVA_HOME}
   /usr/lib/jvm/java-6-openjdk/jre/lib
+  /usr/lib/jvm/java-6-openjdk-amd64/jre/lib
   /usr/lib/jvm/java-6-openjdk-i386/jre/lib
   /usr/lib/jvm/java-6-openjdk/jre/lib/{libarch}
   /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/{libarch}
@@ -142,6 +143,7 @@
   "[HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Development Kit\\${java_install_version};JavaHome]/include"
   ${_JAVA_HOME}/include
   /usr/lib/jvm/java-6-openjdk/jre/include
+  /usr/lib/jvm/java-6-openjdk-amd64/jre/include
   /usr/lib/jvm/java-6-openjdk-i386/jre/include
   /usr/include
   /usr/local/include


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -96,7 +96,7 @@
 Comment[sr@ijekavianlatin]=VLC kao pozadina Phonona
 Comment[sr@latin]=VLC kao pozadina Phonona
 Comment[sv]=Phonon VLC-gränssnitt
-Comment[tr]=Phonon VLC arkaucu
+Comment[tr]=Phonon VLC arka ucu
 Comment[ug]=Phonon VLC ئارقا ئۇچى
 Comment[uk]=Модуль VLC Phonon
 Comment[x-test]=xxPhonon VLC backendxx


COMP: Update ITKv4 version and use ANTs base repository as patch has been merged

--- SuperBuild/FindExternalTools.cmake
+++ SuperBuild/FindExternalTools.cmake
@@ -210,7 +210,7 @@
   # Download and compile ITKv4
   ExternalProject_Add(I4 # BRAINSStandAlone/SuperBuild/External_ITKv4.cmake # !! All args needed as they are # Name shorten from ITKv4 because Windows ITKv4 path limited to 50 chars
     GIT_REPOSITORY "${git_protocol}://itk.org/ITK.git"
-    GIT_TAG 3c03e162c7e287b81115e2175898482998b50a34 # master 01-31-13 4.4.0 : fixed extra itk namespaces # 555049f830d1c09f8d4d95904f429290467d39ab #2012-12-16 ITKv4.3.0
+    GIT_TAG 1866ef42887df677a6197ad11ed0ef6e9b239567 # 2013-04-03 (from Slicer) # 3c03e162c7e287b81115e2175898482998b50a34 # master 01-31-13 4.4.0 : fixed extra itk namespaces # 555049f830d1c09f8d4d95904f429290467d39ab #2012-12-16 ITKv4.3.0
     SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/I4 # Path shorten from ITKv4 because Windows SOURCE_DIR path limited to 50 chars
     BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/I4-b # Path shorten from ITKv4 because Windows SOURCE_DIR path limited to 50 chars
     CMAKE_GENERATOR ${gen}
@@ -468,14 +468,13 @@
 set( SourceCodeArgs
   # SVN_REPOSITORY "http://advants.svn.sourceforge.net/svnroot/advants/trunk"
   # SVN_REVISION -r 1685 # 12/13/2012
-#  GIT_REPOSITORY "${git_protocol}://github.com/stnava/ANTs.git"
-#  GIT_TAG "6cb624225fe99047b562acb1a0cb053dc98dbc50" # 2013-01-31 Move to new repository home
-  GIT_REPOSITORY "${git_protocol}://github.com/adrienkaiser/ANTs.git"
-  GIT_TAG "d8b155d80b2067940c1d66deb3af9303b35d8b4a" # 2013-04-11 Move to homemade fixed repository
+  GIT_REPOSITORY "${git_protocol}://github.com/stnava/ANTs.git"
+  GIT_TAG "49a8e5911cc5cbd180f15c63ee8c545ebd3828f9" # 2013-04-11 Prevent Boost from compiling libs # 6cb624225fe99047b562acb1a0cb053dc98dbc50 # 2013-01-31 Move to new repository home
   )
 set( CMAKE_ExtraARGS
   -DBUILD_TESTING:BOOL=OFF
   -DBUILD_SHARED_LIBS:BOOL=OFF
+  -DBUILD_EXTERNAL_APPLICATIONS:BOOL=OFF
   -DANTS_SUPERBUILD:BOOL=ON
   -DSuperBuild_ANTS_USE_GIT_PROTOCOL:BOOL=${USE_GIT_PROTOCOL}
   -DUSE_SYSTEM_ITK:BOOL=ON
@@ -484,8 +483,7 @@
   -DUSE_SYSTEM_SlicerExecutionModel:BOOL=ON
   -DSlicerExecutionModel_DIR:PATH=${SlicerExecutionModel_DIR}
   -DUSE_VTK:BOOL=OFF
-  -DVTK_DIR:PATH=${VTK_DIR}
-  DEPENDS ${ITK_DEPEND} ${VTK_DEPEND}
+  DEPENDS ${ITK_DEPEND}
   )
 set( Tools
   ANTS


Fixing author

Fixing author

--- Support/cmp/Modules/FindTiff.cmake
+++ Support/cmp/Modules/FindTiff.cmake
@@ -18,13 +18,25 @@
     SET (TIFF_INSTALL  $ENV{TIFF_INSTALL})
 endif()

+set (More_Tiff_Search_Dirs "")
+if (NOT APPLE AND NOT WIN32)
+
+if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" )
+    set (More_Tiff_Search_Dirs "64")
+endif()
+
+endif()
+
+
 # Look for the header file.
 SET(TIFF_INCLUDE_SEARCH_DIRS
   ${TIFF_INSTALL}/include
+  /usr/include
 )

 SET (TIFF_LIB_SEARCH_DIRS
   ${TIFF_INSTALL}/lib
+  /usr/lib${More_Tiff_Search_Dirs}
   )

 SET (TIFF_BIN_SEARCH_DIRS


[cmake] Fix FindLAPACK on another setup

[cmake] Fix FindLAPACK on another setup

--- Numerics/cmake/FindLAPACK.cmake
+++ Numerics/cmake/FindLAPACK.cmake
@@ -322,7 +322,6 @@
 	"")
       if (LAPACK_LIBRARIES)
 	set(WITH_LAPACK "generic" CACHE STRING "Blas implementation type [mkl/openblas/atlas/accelerate/generic]" FORCE)
-	set(LAPACKE_HEADER lapacke.h)
 	set(CLAPACK_HEADER clapack.h)
 	set(LAPACK_INCLUDE_SUFFIXES atlas) # For debian or ubuntu ...
       endif (LAPACK_LIBRARIES)


COMP: Allow compiler option fixed in gcc 4.1.0

GCC version 4.0.4 had a bug in the -frename-registers
option used by -funroll-loops.

As of GCC version 4.1.0 and greater, this optimiation
was fixed.

ITK should no longer prohibit this optimization.

GCC 4.0.4 documentation
  -frename-registers
  Attempt to avoid false dependencies in scheduled code by making use of registers
  left over after register allocation. This optimization will most benefit processors
  with lots of registers. Depending on the debug information format adopted by
  the target, however, it can make debugging impossible, since variables will no
  longer stay in a “home register”.
 *** Not enabled by default at any level because it has known bugs.

GCC 4.1.0 documentation
  -frename-registers
  Attempt to avoid false dependencies in scheduled code by making use of registers
  left over after register allocation. This optimization will most benefit processors
  with lots of registers. Depending on the debug information format adopted by
  the target, however, it can make debugging impossible, since variables will no
  longer stay in a “home register”.
 *** Enabled by default with ‘-funroll-loops’.

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -292,21 +292,6 @@
     set(ITK_REQUIRED_LINK_FLAGS "${ITK_REQUIRED_LINK_FLAGS} -mthreads")
   endif()

-
-  #-----------------------------------------------------------------------------
-  # The frename-registers option does not work due to a bug in the gnu compiler.
-  # It must be removed or data errors will be produced and incorrect results
-  # will be produced.  This is first documented in the gcc4 man page.
-  if(CMAKE_COMPILER_IS_GNUCXX)
-    set(ALL_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} ${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" )
-    separate_arguments(ALL_FLAGS)
-    foreach(COMP_OPTION ${ALL_FLAGS})
-      if("${COMP_OPTION}" STREQUAL "-frename-registers")
-        message(FATAL_ERROR "-frename-registers causes runtime bugs.  It must be removed from your compilation options.")
-      endif()
-    endforeach()
-  endif()
-
   #-----------------------------------------------------------------------------
   # Set the compiler-specific flag for disabling optimization.
   if(MSVC)


COMP: Increase gold linker requirement to GCC 4.9.0

Addresses errors with CentOS 7 that comes with GCC 4.8.5.

ITK-3243

Change-Id: I7beee3fb4071693f16442106e43e2037921d3ac2

--- CMake/ITKSetStandardCompilerFlags.cmake
+++ CMake/ITKSetStandardCompilerFlags.cmake
@@ -212,8 +212,8 @@
       set(CMAKE_REQUIRED_FLAGS "${_safe_cmake_required_flags}")
       if(have_gold)
         set(_use_gold_linker_default ON)
-        set(_gold_linker_failure_condition_0 "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.8.4")
-        set(_gold_linker_failure_condition_1  NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_EQUAL "4.8.4")
+        set(_gold_linker_failure_condition_0 "${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "4.9.0")
+        set(_gold_linker_failure_condition_1  NOT BUILD_SHARED_LIBS AND "${CMAKE_CXX_COMPILER_VERSION}" VERSION_EQUAL "4.9.0")
         if( (${_gold_linker_failure_condition_0}) OR (${_gold_linker_failure_condition_1}) )
           set(_use_gold_linker_default OFF)
         endif()


start version 3.3.1

start version 3.3.1

--- CMake/Mathematica/FindMathematica.cmake
+++ CMake/Mathematica/FindMathematica.cmake
@@ -34,7 +34,7 @@
 cmake_policy(POP)

 set (Mathematica_CMAKE_MODULE_DIR "${CMAKE_CURRENT_LIST_DIR}")
-set (Mathematica_CMAKE_MODULE_VERSION "3.3.0")
+set (Mathematica_CMAKE_MODULE_VERSION "3.3.1")

 # activate select policies
 if (POLICY CMP0025)


AddCompilerFlag needs to be more thorough for -stdlib=libc++

--- cmake/AddCompilerFlag.cmake
+++ cmake/AddCompilerFlag.cmake
@@ -50,6 +50,13 @@
       int main() { return 0; }")
       check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc} "${_code}")
       check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc} "${_code}")
+   elseif("${_flag}" STREQUAL "-stdlib=libc++")
+      # Compiling with libc++ not only requires a compiler that understands it, but also
+      # the libc++ headers itself
+      set(_code "#include <iostream>
+      int main() { return 0; }")
+      check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc} "${_code}")
+      check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc} "${_code}")
    else()
       check_c_compiler_flag("${_flag}" check_c_compiler_flag_${_flag_esc})
       check_cxx_compiler_flag("${_flag}" check_cxx_compiler_flag_${_flag_esc})


Changes FindFFI so that the dir /usr/local/opt/libffi has prefernce over /usr/lib for finding libffi.

The OSX build is giving some problems for the updated brew libffi.

--- cmake/Modules/FindFFI.cmake
+++ cmake/Modules/FindFFI.cmake
@@ -21,42 +21,16 @@
 #  FFI_FOUND - System has libffi
 #  FFI::lib - Imported target for the libffi

-# try using pkg-config if available
-find_package(PkgConfig QUIET)
-
-if (APPLE AND PkgConfig_FOUND)
-    #set brew location for pkg-config
-    set(ENV{PKG_CONFIG_PATH} "/usr/local/opt/libffi/lib/pkgconfig:$ENV{PKG_CONFIG_PATH}")
-
-    pkg_check_modules(PC_LIBFFI QUIET libffi>=3.2.1)
-
-    #use found LIBFFI pkg config info to search for the abs path fo the libffi lib.
-    #Note that the abs path info  is not present in the pkg-config results (only the -l and -L arguments)
-    find_library(FFI_ABS_LIB NAMES ffi
-        PATHS ${PC_LIBFFI_LIBRARY_DIRS} ${PC_LIBFFI_LIBDIR}
-        NO_DEFAULT_PATH
-        NO_PACKAGE_ROOT_PATH
-        NO_CMAKE_PATH
-        NO_CMAKE_SYSTEM_PATH
-    )
-
-    if (NOT FFI_ABS_LIB)
-        message(WARNING "Cannot find abs path of libffi based on pkgconfig results. Tried to find libffi @ '${PC_LIBFFI_LIBRARY_DIRS}' and '${PC_LIBFFI_LIBDIR}'")
-    else()
-        unset(FFI_ABS_LIB)
-    endif()
-endif()
-
-mark_as_advanced(GNUTLS_INCLUDE_DIR GNUTLS_LIBRARY)
-
 find_library(FFI_LIBRARY NAMES ffi libffi
-    PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
+    NO_DEFAULT_PATH
+    PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr/local/opt/libffi /opt/local /usr /usr/local
     PATH_SUFFIXES lib lib64 x86_64-linux-gnu lib/x86_64-linux-gnu
     HINTS ${PC_LIBFFI_LIBDIR} ${PC_LIBFFI_LIBRARY_DIRS}
 )

 find_path(FFI_INCLUDE_DIR ffi.h
-     PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr /usr/local /opt/local
+     NO_DEFAULT_PATH
+     PATHS $ENV{FFI_DIR} ${FFI_DIR} /usr/local/opt/libffi /opt/local /usr /usr/local
      PATH_SUFFIXES include include/ffi include/x86_64-linux-gnu x86_64-linux-gnu
      HINTS ${PC_LIBFFI_INCLUDEDIR} ${PC_LIBFFI_INCLUDE_DIRS}
 )


Remove gf library in MKL (#1976)

Remove gf library in MKL (#1976)

* Remove OpenGL code from benchmark

* Make it possible to print plot in the ipython notbook

* Create the blob if the blob is not specified in the init net

* Do not use gf library for MKL. Even after I install the entire MKL library it is still not found. After removing it, the MKL code can still run

--- cmake/Modules/FindMKL.cmake
+++ cmake/Modules/FindMKL.cmake
@@ -47,10 +47,10 @@
     if(WIN32)
       list(APPEND __mkl_libs intel_c)
     else()
-      list(APPEND __mkl_libs intel gf)
+      list(APPEND __mkl_libs intel)
     endif()
   else()
-    list(APPEND __mkl_libs intel_lp64 gf_lp64)
+    list(APPEND __mkl_libs intel_lp64)
   endif()

   if(MKL_MULTI_THREADED)


Added suuport for finding Intel TBB for Visual Studio 2013

--- cmake/OpenCVDetectTBB.cmake
+++ cmake/OpenCVDetectTBB.cmake
@@ -63,6 +63,8 @@
           set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc10")
         elseif(MSVC11)
           set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc11")
+        elseif(MSVC12)
+          set(_TBB_LIB_PATH "${_TBB_LIB_PATH}/vc12")
         endif()
         set(TBB_LIB_DIR "${_TBB_LIB_PATH}" CACHE PATH "Full path of TBB library directory")
         link_directories("${TBB_LIB_DIR}")


ProjectBinaryen: Update from hera

ProjectBinaryen: Update from hera

--- cmake/ProjectBinaryen.cmake
+++ cmake/ProjectBinaryen.cmake
@@ -1,3 +1,8 @@
+if(ProjectBinaryenIncluded)
+    return()
+endif()
+set(ProjectBinaryenIncluded TRUE)
+
 include(ExternalProject)

 if(MSVC)
@@ -18,7 +23,7 @@
     -DBUILD_STATIC_LIB=ON
     ${build_command}
     ${install_command}
-)
+    )

 ExternalProject_Get_Property(binaryen INSTALL_DIR BINARY_DIR SOURCE_DIR)
 add_library(binaryen::binaryen STATIC IMPORTED)
@@ -29,13 +34,17 @@
 set_target_properties(
     binaryen::binaryen
     PROPERTIES
-    IMPORTED_LOCATION ${binaryen_library}
+    IMPORTED_CONFIGURATIONS Release
+    IMPORTED_LOCATION_RELEASE ${binaryen_library}
     INTERFACE_INCLUDE_DIRECTORIES ${binaryen_include_dir}
     INTERFACE_LINK_LIBRARIES
-# Include also other static libs needed:
-"${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}wasm${CMAKE_STATIC_LIBRARY_SUFFIX};\
+    # Include also other static libs needed:
+    "${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}wasm${CMAKE_STATIC_LIBRARY_SUFFIX};\
 ${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}asmjs${CMAKE_STATIC_LIBRARY_SUFFIX};\
 ${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}passes${CMAKE_STATIC_LIBRARY_SUFFIX};\
+${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}cfg${CMAKE_STATIC_LIBRARY_SUFFIX};\
+${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}ir${CMAKE_STATIC_LIBRARY_SUFFIX};\
+${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}emscripten-optimizer${CMAKE_STATIC_LIBRARY_SUFFIX};\
 ${BINARY_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}support${CMAKE_STATIC_LIBRARY_SUFFIX}"
 )


[CMake] Cleanup version check for 2.8.12

Since we're always greater than 2.8.12, we don't need this check anymore.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -496,27 +496,18 @@
     get_property(lib_deps GLOBAL PROPERTY LLVMBUILD_LIB_DEPS_${name})
   endif()

-  if(CMAKE_VERSION VERSION_LESS 2.8.12)
-    # Link libs w/o keywords, assuming PUBLIC.
-    target_link_libraries(${name}
+  if(ARG_STATIC)
+    set(libtype INTERFACE)
+  else()
+    # We can use PRIVATE since SO knows its dependent libs.
+    set(libtype PRIVATE)
+  endif()
+
+  target_link_libraries(${name} ${libtype}
       ${ARG_LINK_LIBS}
       ${lib_deps}
       ${llvm_libs}
       )
-  elseif(ARG_STATIC)
-    target_link_libraries(${name} INTERFACE
-      ${ARG_LINK_LIBS}
-      ${lib_deps}
-      ${llvm_libs}
-      )
-  else()
-    # We can use PRIVATE since SO knows its dependent libs.
-    target_link_libraries(${name} PRIVATE
-      ${ARG_LINK_LIBS}
-      ${lib_deps}
-      ${llvm_libs}
-      )
-  endif()

   if(LLVM_COMMON_DEPENDS)
     add_dependencies(${name} ${LLVM_COMMON_DEPENDS})


Output ENABLE_qt and ENABLE_pyqt4 as part of summary.

svn path=/trunk/; revision=10059

--- cmake/modules/summary.cmake
+++ cmake/modules/summary.cmake
@@ -118,6 +118,7 @@
 ENABLE_gnome2:		${ENABLE_gnome2}		ENABLE_pygcw:		${ENABLE_pygcw}
 ENABLE_ada:		${ENABLE_ada}		ENABLE_d:		${ENABLE_d}
 ENABLE_ocaml:		${ENABLE_ocaml}		ENABLE_lua:		${ENABLE_lua}
+ENABLE_qt:		${ENABLE_qt}		ENABLE_pyqt4:		${ENABLE_pyqt4}
 ")
 message("${_output_results}")
 endmacro(summary)


COMP: fix for DiffusionImagingMBI module

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -137,9 +137,9 @@
 ENDMACRO(MITK_CREATE_MODULE_CONF)

 MACRO(_MITK_CREATE_MODULE_CONF)
-  IF(NOT MODULE_PROVIDES)
+  IF(NOT MODULE_PROVIDES AND NOT MODULE_HEADERS_ONLY)
     SET(MODULE_PROVIDES ${MODULE_NAME})
-  ENDIF(NOT MODULE_PROVIDES)
+  ENDIF(NOT MODULE_PROVIDES AND NOT MODULE_HEADERS_ONLY)
   SET(MODULE_INCLUDE_DIRS_ABSOLUTE "")
   FOREACH(dir ${MODULE_INCLUDE_DIRS})
     GET_FILENAME_COMPONENT(abs_dir ${dir} ABSOLUTE)
@@ -174,7 +174,7 @@
 #     [EXPORT_DEFINE <declspec macro name for dll exports>]

 MACRO(MITK_CREATE_MODULE MODULE_NAME_IN)
-  MACRO_PARSE_ARGUMENTS(MODULE "INCLUDE_DIRS;INTERNAL_INCLUDE_DIRS;DEPENDS;DEPENDS_INTERNAL;PROVIDES;PACKAGE_DEPENDS;EXPORT_DEFINE;ADDITIONAL_LIBS;GENERATED_CPP" "QT_MODULE;FORCE_STATIC" ${ARGN})
+  MACRO_PARSE_ARGUMENTS(MODULE "INCLUDE_DIRS;INTERNAL_INCLUDE_DIRS;DEPENDS;DEPENDS_INTERNAL;PROVIDES;PACKAGE_DEPENDS;EXPORT_DEFINE;ADDITIONAL_LIBS;GENERATED_CPP" "QT_MODULE;FORCE_STATIC;HEADERS_ONLY" ${ARGN})
   SET(MODULE_NAME ${MODULE_NAME_IN})

   # first of all we check for the dependencies
@@ -207,8 +207,6 @@
   INCLUDE_DIRECTORIES(. ${ALL_INCLUDE_DIRECTORIES})
   INCLUDE(files.cmake)

-  SET(BOOL_HEADERS_ONLY_MODULE 0)
-
   IF(NOT MODULE_QT_MODULE)
     ORGANIZE_SOURCES(SOURCE ${CPP_FILES}
                      HEADER	${H_FILES}
@@ -216,20 +214,17 @@
 					 DOC ${DOX_FILES}
 					 )

-    IF(NOT CPP_FILES AND NOT CPP_FILES_GENERATED AND NOT TOOL_CPPS)
-      SET(BOOL_HEADERS_ONLY_MODULE 1)
-    ENDIF()

     IF(MODULE_FORCE_STATIC)
       SET(_STATIC ${MITK_WIN32_FORCE_STATIC})
     ENDIF(MODULE_FORCE_STATIC)

-	IF(NOT BOOL_HEADERS_ONLY_MODULE)
+    IF(NOT MODULE_HEADERS_ONLY)
       ADD_LIBRARY(${MODULE_PROVIDES} ${_STATIC} ${CPP_FILES} ${H_FILES} ${CPP_FILES_GENERATED} ${GLOBBED__H_FILES} ${CORRESPONDING__H_FILES} ${TXX_FILES} ${DOX_FILES} ${UI_FILES} ${TOOL_CPPS})
       IF(ALL_LIBRARIES)
         TARGET_LINK_LIBRARIES(${MODULE_PROVIDES} ${ALL_LIBRARIES})
       ENDIF(ALL_LIBRARIES)
-	ENDIF()
+    ENDIF()

   ELSE(NOT MODULE_QT_MODULE)

@@ -254,13 +249,9 @@
 				   MOC ${Q${KITNAME}_GENERATED_MOC_CPP}
 				   GEN_UI ${Q${KITNAME}_GENERATED_UI_CPP})

-    IF(NOT CPP_FILES AND NOT CPP_FILES_GENERATED AND NOT TOOL_CPPS)
-      SET(BOOL_HEADERS_ONLY_MODULE 1)
-    ENDIF()
-
   # MITK_GENERATE_TOOLS_LIBRARY(Qmitk${LIBPOSTFIX} "NO")

-  IF(NOT BOOL_HEADERS_ONLY_MODULE)
+  IF(NOT MODULE_HEADERS_ONLY)
     ADD_LIBRARY(${MODULE_PROVIDES} ${CPP_FILES} ${CPP_FILES_GENERATED} ${Q${KITNAME}_GENERATED_CPP} ${CORRESPONDING__H_FILES} ${GLOBBED__H_FILES} ${TXX_FILES} ${DOX_FILES} ${UI_FILES} ${RES_FILES} ${TOOL_GUI_CPPS})
     TARGET_LINK_LIBRARIES(${MODULE_PROVIDES} ${QT_LIBRARIES} ${ALL_LIBRARIES} QVTK)
   ENDIF()
@@ -270,7 +261,7 @@

   # install only if shared lib (for now)
   IF(NOT MODULE_FORCE_STATIC)
-    IF(NOT BOOL_HEADERS_ONLY_MODULE)
+    IF(NOT MODULE_HEADERS_ONLY)
       MITK_INSTALL_TARGETS(${MODULE_PROVIDES})
     ENDIF()
   ENDIF(NOT MODULE_FORCE_STATIC)
@@ -352,8 +343,8 @@
   ELSE()
    INSTALL(TARGETS ${ARGN}
      RUNTIME DESTINATION bin
-     LIBRARY DESTINATION lib
-     ARCHIVE DESTINATION lib/static
+     LIBRARY DESTINATION lib/mitk/
+     ARCHIVE DESTINATION lib/mitk/static
    )
   ENDIF()
 ENDMACRO(MITK_INSTALL_TARGETS)


ENH: cleanup and convert depends to macro

--- CMake/vtkWrapJava.cmake
+++ CMake/vtkWrapJava.cmake
@@ -14,106 +14,97 @@
   IF(NOT VTK_WRAP_JAVA_EXE)
     MESSAGE(SEND_ERROR "VTK_WRAP_JAVA_EXE not specified when calling VTK_WRAP_JAVA3")
   ENDIF(NOT VTK_WRAP_JAVA_EXE)
-  # for new cmake use the new custom commands
-  IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)

-    # Initialize the custom target counter.
-    IF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
-      SET(VTK_WRAP_JAVA_CUSTOM_COUNT "")
-      SET(VTK_WRAP_JAVA_CUSTOM_NAME ${TARGET})
-      SET(VTK_WRAP_JAVA_CUSTOM_LIST)
-    ENDIF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
-
-    SET(VTK_JAVA_DEPENDENCIES)
-    SET(VTK_JAVA_DEPENDENCIES_FILE)
-    # For each class
-    FOREACH(FILE ${SOURCES})
-      # should we wrap the file?
-      GET_SOURCE_FILE_PROPERTY(TMP_WRAP_EXCLUDE ${FILE} WRAP_EXCLUDE)
+  # Initialize the custom target counter.
+  IF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
+    SET(VTK_WRAP_JAVA_CUSTOM_COUNT "")
+    SET(VTK_WRAP_JAVA_CUSTOM_NAME ${TARGET})
+    SET(VTK_WRAP_JAVA_CUSTOM_LIST)
+  ENDIF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
+
+  SET(VTK_JAVA_DEPENDENCIES)
+  SET(VTK_JAVA_DEPENDENCIES_FILE)
+  # For each class
+  FOREACH(FILE ${SOURCES})
+    # should we wrap the file?
+    GET_SOURCE_FILE_PROPERTY(TMP_WRAP_EXCLUDE ${FILE} WRAP_EXCLUDE)
+
+    # if we should wrap it
+    IF (NOT TMP_WRAP_EXCLUDE)

-      # if we should wrap it
-      IF (NOT TMP_WRAP_EXCLUDE)
-
-        # what is the filename without the extension
-        GET_FILENAME_COMPONENT(TMP_FILENAME ${FILE} NAME_WE)
-
-        # the input file might be full path so handle that
-        GET_FILENAME_COMPONENT(TMP_FILEPATH ${FILE} PATH)
-
-        # compute the input filename
-        IF (TMP_FILEPATH)
-          SET(TMP_INPUT ${TMP_FILEPATH}/${TMP_FILENAME}.h)
-        ELSE (TMP_FILEPATH)
-          SET(TMP_INPUT ${CMAKE_CURRENT_SOURCE_DIR}/${TMP_FILENAME}.h)
-        ENDIF (TMP_FILEPATH)
-
-        # is it abstract?
-        GET_SOURCE_FILE_PROPERTY(TMP_ABSTRACT ${FILE} ABSTRACT)
-        IF (TMP_ABSTRACT)
-          SET(TMP_CONCRETE 0)
-        ELSE (TMP_ABSTRACT)
-          SET(TMP_CONCRETE 1)
-        ENDIF (TMP_ABSTRACT)
-
-        # new source file is nameJava.cxx, add to resulting list
-        SET(${SRC_LIST_NAME} ${${SRC_LIST_NAME}}
-          ${TMP_FILENAME}Java.cxx)
-
-        # add custom command to output
-        ADD_CUSTOM_COMMAND(
-          OUTPUT ${VTK_JAVA_HOME}/${TMP_FILENAME}.java
-          DEPENDS ${VTK_PARSE_JAVA_EXE} ${VTK_WRAP_HINTS} ${TMP_INPUT}
-          COMMAND ${VTK_PARSE_JAVA_EXE}
-          ARGS ${TMP_INPUT} ${VTK_WRAP_HINTS} ${TMP_CONCRETE}
-          ${VTK_JAVA_HOME}/${TMP_FILENAME}.java
-          COMMENT "Java Wrappings"
+      # what is the filename without the extension
+      GET_FILENAME_COMPONENT(TMP_FILENAME ${FILE} NAME_WE)
+
+      # the input file might be full path so handle that
+      GET_FILENAME_COMPONENT(TMP_FILEPATH ${FILE} PATH)
+
+      # compute the input filename
+      IF (TMP_FILEPATH)
+        SET(TMP_INPUT ${TMP_FILEPATH}/${TMP_FILENAME}.h)
+      ELSE (TMP_FILEPATH)
+        SET(TMP_INPUT ${CMAKE_CURRENT_SOURCE_DIR}/${TMP_FILENAME}.h)
+      ENDIF (TMP_FILEPATH)
+
+      # is it abstract?
+      GET_SOURCE_FILE_PROPERTY(TMP_ABSTRACT ${FILE} ABSTRACT)
+      IF (TMP_ABSTRACT)
+        SET(TMP_CONCRETE 0)
+      ELSE (TMP_ABSTRACT)
+        SET(TMP_CONCRETE 1)
+      ENDIF (TMP_ABSTRACT)
+
+      # new source file is nameJava.cxx, add to resulting list
+      SET(${SRC_LIST_NAME} ${${SRC_LIST_NAME}}
+        ${TMP_FILENAME}Java.cxx)
+
+      # add custom command to output
+      ADD_CUSTOM_COMMAND(
+        OUTPUT ${VTK_JAVA_HOME}/${TMP_FILENAME}.java
+        DEPENDS ${VTK_PARSE_JAVA_EXE} ${VTK_WRAP_HINTS} ${TMP_INPUT}
+        COMMAND ${VTK_PARSE_JAVA_EXE}
+        ARGS ${TMP_INPUT} ${VTK_WRAP_HINTS} ${TMP_CONCRETE}
+        ${VTK_JAVA_HOME}/${TMP_FILENAME}.java
+        COMMENT "Java Wrappings"
+        )
+
+      # add custom command to output
+      ADD_CUSTOM_COMMAND(
+        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Java.cxx
+        DEPENDS ${VTK_WRAP_JAVA_EXE} ${VTK_WRAP_HINTS} ${TMP_INPUT}
+        COMMAND ${VTK_WRAP_JAVA_EXE}
+        ARGS ${TMP_INPUT} ${VTK_WRAP_HINTS} ${TMP_CONCRETE}
+        ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Java.cxx
+        COMMENT "Java Wrappings"
+        )
+
+      SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES} "${VTK_JAVA_HOME}/${TMP_FILENAME}.java")
+      SET(VTK_JAVA_DEPENDENCIES_FILE
+        "${VTK_JAVA_DEPENDENCIES_FILE}\n  \"${VTK_JAVA_HOME}/${TMP_FILENAME}.java\"")
+
+      # Add this output to a custom target if needed.
+      IF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
+        SET(VTK_WRAP_JAVA_CUSTOM_LIST ${VTK_WRAP_JAVA_CUSTOM_LIST}
+          ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Java.cxx
           )
-
-        # add custom command to output
-        ADD_CUSTOM_COMMAND(
-          OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Java.cxx
-          DEPENDS ${VTK_WRAP_JAVA_EXE} ${VTK_WRAP_HINTS} ${TMP_INPUT}
-          COMMAND ${VTK_WRAP_JAVA_EXE}
-          ARGS ${TMP_INPUT} ${VTK_WRAP_HINTS} ${TMP_CONCRETE}
-          ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Java.cxx
-          COMMENT "Java Wrappings"
-          )
-
-        SET(VTK_JAVA_DEPENDENCIES ${VTK_JAVA_DEPENDENCIES} "${VTK_JAVA_HOME}/${TMP_FILENAME}.java")
-        SET(VTK_JAVA_DEPENDENCIES_FILE
-          "${VTK_JAVA_DEPENDENCIES_FILE}\n  \"${VTK_JAVA_HOME}/${TMP_FILENAME}.java\"")
-
-        # Add this output to a custom target if needed.
-        IF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
-          SET(VTK_WRAP_JAVA_CUSTOM_LIST ${VTK_WRAP_JAVA_CUSTOM_LIST}
-            ${CMAKE_CURRENT_BINARY_DIR}/${TMP_FILENAME}Java.cxx
-            )
-          SET(VTK_WRAP_JAVA_CUSTOM_COUNT ${VTK_WRAP_JAVA_CUSTOM_COUNT}x)
-          IF(VTK_WRAP_JAVA_CUSTOM_COUNT MATCHES "^${VTK_WRAP_JAVA_CUSTOM_LIMIT}$")
-            SET(VTK_WRAP_JAVA_CUSTOM_NAME ${VTK_WRAP_JAVA_CUSTOM_NAME}Hack)
-            ADD_CUSTOM_TARGET(${VTK_WRAP_JAVA_CUSTOM_NAME} DEPENDS ${VTK_WRAP_JAVA_CUSTOM_LIST})
-            SET(KIT_JAVA_DEPS ${VTK_WRAP_JAVA_CUSTOM_NAME})
-            SET(VTK_WRAP_JAVA_CUSTOM_LIST)
-            SET(VTK_WRAP_JAVA_CUSTOM_COUNT)
-          ENDIF(VTK_WRAP_JAVA_CUSTOM_COUNT MATCHES "^${VTK_WRAP_JAVA_CUSTOM_LIMIT}$")
-        ENDIF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
-      ENDIF (NOT TMP_WRAP_EXCLUDE)
-    ENDFOREACH(FILE)
-
-    ADD_CUSTOM_TARGET("${TARGET}JavaClasses" ALL DEPENDS ${VTK_JAVA_DEPENDENCIES})
-    SET(dir ${CMAKE_CURRENT_SOURCE_DIR})
-    IF(VTK_WRAP_JAVA3_INIT_DIR)
-      SET(dir ${VTK_WRAP_JAVA3_INIT_DIR})
-    ENDIF(VTK_WRAP_JAVA3_INIT_DIR)
-    CONFIGURE_FILE("${dir}/JavaDependencies.cmake.in"
-      "${CMAKE_CURRENT_BINARY_DIR}/JavaDependencies.cmake" IMMEDIATE @ONLY)
-
-  ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
-    #otherwise use old loaded command
-    VTK_WRAP_JAVA2(${TARGET}
-      SOURCES ${SRC_LIST} ${SOURCES}
-      )
-  ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.6)
+        SET(VTK_WRAP_JAVA_CUSTOM_COUNT ${VTK_WRAP_JAVA_CUSTOM_COUNT}x)
+        IF(VTK_WRAP_JAVA_CUSTOM_COUNT MATCHES "^${VTK_WRAP_JAVA_CUSTOM_LIMIT}$")
+          SET(VTK_WRAP_JAVA_CUSTOM_NAME ${VTK_WRAP_JAVA_CUSTOM_NAME}Hack)
+          ADD_CUSTOM_TARGET(${VTK_WRAP_JAVA_CUSTOM_NAME} DEPENDS ${VTK_WRAP_JAVA_CUSTOM_LIST})
+          SET(KIT_JAVA_DEPS ${VTK_WRAP_JAVA_CUSTOM_NAME})
+          SET(VTK_WRAP_JAVA_CUSTOM_LIST)
+          SET(VTK_WRAP_JAVA_CUSTOM_COUNT)
+        ENDIF(VTK_WRAP_JAVA_CUSTOM_COUNT MATCHES "^${VTK_WRAP_JAVA_CUSTOM_LIMIT}$")
+      ENDIF(VTK_WRAP_JAVA_NEED_CUSTOM_TARGETS)
+    ENDIF (NOT TMP_WRAP_EXCLUDE)
+  ENDFOREACH(FILE)
+
+  ADD_CUSTOM_TARGET("${TARGET}JavaClasses" ALL DEPENDS ${VTK_JAVA_DEPENDENCIES})
+  SET(dir ${CMAKE_CURRENT_SOURCE_DIR})
+  IF(VTK_WRAP_JAVA3_INIT_DIR)
+    SET(dir ${VTK_WRAP_JAVA3_INIT_DIR})
+  ENDIF(VTK_WRAP_JAVA3_INIT_DIR)
+  CONFIGURE_FILE("${dir}/JavaDependencies.cmake.in"
+    "${CMAKE_CURRENT_BINARY_DIR}/JavaDependencies.cmake" IMMEDIATE @ONLY)
 ENDMACRO(VTK_WRAP_JAVA3)

 # VS 6 does not like needing to run a huge number of custom commands
@@ -132,3 +123,44 @@
       ${VTK_WRAP_JAVA_CUSTOM_LIMIT}${VTK_WRAP_JAVA_CUSTOM_LIMIT})
   ENDFOREACH(t)
 ENDIF(CMAKE_GENERATOR MATCHES "^Visual Studio 6$")
+
+
+MACRO(VTK_GENERATE_JAVA_DEPENDENCIES TARGET)
+
+  SET (javaPath "${VTK_BINARY_DIR}/java")
+  IF (USER_JAVA_CLASSPATH)
+    SET (javaPath "${USER_JAVA_PATH};${VTK_BINARY_DIR}/java")
+  ENDIF (USER_JAVA_CLASSPATH)
+
+  # get the classes for this lib
+  FOREACH(srcName ${ARGN})
+
+    # what is the filename without the extension
+    GET_FILENAME_COMPONENT(srcNameWe ${srcName} NAME_WE)
+
+    # the input file might be full path so handle that
+    GET_FILENAME_COMPONENT(srcPath ${srcName} PATH)
+
+    SET(className "${srcPath}/${srcNameWe}.class")
+    SET (OUT_TEXT ${OUT_TEXT} "\n    dummy = new ${srcNameWe}()")
+
+    # On Unix we can just call javac ... *.java
+    ADD_CUSTOM_COMMAND(
+      OUTPUT "${className}"
+      COMMAND "${JAVA_COMPILE}" ARGS -classpath "${javaPath}" "${srcPath}/vtk${TARGET}Driver.java"
+      DEPENDS "${srcName}"
+      )
+
+    SET (classes ${classes} ${className})
+  ENDFOREACH(srcName)
+
+  ADD_CUSTOM_COMMAND(TARGET ${TARGET} SOURCE ${TARGET} DEPENDS ${classes})
+
+  CONFIGURE_FILE(
+    ${VTK_CMAKE_DIR}/vtkJavaDriver.java.in
+    "${VTK_BINARY_DIR}/java/vtk/vtk${TARGET}Driver.java"
+    COPY_ONLY
+    IMMEDIATE
+    )
+
+ENDMACRO(VTK_GENERATE_JAVA_DEPENDENCIES)


fix to poco cmake module to find the lib on Ubuntu, where it is in /usr/lib directly

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1041 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/PoCo.cmake
+++ CMakeModules/PoCo.cmake
@@ -16,6 +16,7 @@
     /opt/poco
     /opt/Poco
     /usr/local
+    /usr/lib
     /usr/lib/PoCo
     /usr/lib/Poco
     /usr/local/Poco


nightly start time

nightly start time

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

--- Numerics/cmake/DartConfig.cmake
+++ Numerics/cmake/DartConfig.cmake
@@ -1,5 +1,5 @@
 SET(CTEST_PROJECT_NAME "Siconos")
-SET(NIGHTLY_START_TIME "20:00:00 CEST")
+SET(NIGHTLY_START_TIME "20:00:00")
 SET(DROP_METHOD "http")
 SET(DROP_SITE "cdash.inria.fr")
 SET(DROP_LOCATION "/CDash/submit.php?project=Siconos")


Fail if Qwt is not found

Fail if Qwt is not found

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -472,6 +472,10 @@
 if(DEVBASE_QWT_REQUIRED)
     find_package(Qwt REQUIRED)

+    if(NOT QWT_FOUND)
+        message(FATAL_ERROR "Qwt not found")
+    endif()
+
     include_directories(
         SYSTEM
         ${QWT_INCLUDE_DIR}


Extend library list for TAO

Extend library list for TAO

--- cmake/Modules/FindTAO.cmake
+++ cmake/Modules/FindTAO.cmake
@@ -137,6 +137,7 @@
     TAO_DynamicInterface
     TAO_ETCL
     TAO_Messaging
+    TAO_Notify_Service
     TAO_PI
     TAO_PI_Server
     TAO_PortableServer


Added missing Boost_LIBRARY_DIRS variable for ThirdParty boost auto build.

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@3936 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -59,7 +59,8 @@
         SET(Boost_THREAD_LIBRARY_RELEASE boost_thread)
         SET(Boost_INCLUDE_DIRS ${TPSRC}/dist/include
                                ${TPSRC}/dist/include/boost-1_49)
-        LINK_DIRECTORIES(${TPSRC}/dist/lib)
+        SET(Boost_LIBRARY_DIRS ${TPSRC}/dist/lib)
+        LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
     ELSE ()
         EXTERNALPROJECT_ADD(
             boost


Revert Address sanitizer changes

Revert Address sanitizer changes

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -530,14 +530,13 @@
 		)
 	endif()

-	set(max_optimization -O1)
+	set(max_optimization -Os)

 	set(optimization_flags
 		-fno-strict-aliasing
 		-funsafe-math-optimizations
 		-ffunction-sections
 		-fdata-sections
-		-g -fsanitize=address -fno-omit-frame-pointer
 		)

 	if (NOT ${CMAKE_C_COMPILER_ID} MATCHES ".*Clang.*")


Update default.cmake

Update default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -24,7 +24,7 @@

 # NOTE: no names with spaces!

-hunter_config(gloox VERSION 1.0.20-p4)
+hunter_config(gloox VERSION 1.0.20-p5)
 hunter_config(wdc VERSION 1.0.1-hunter-p1)
 hunter_config(pugixml VERSION 1.8.1)
 hunter_config(puffin-stream VERSION 0.2.2.0)


Fixed available build types

Fixed available build types

--- cmake/megamol_options.cmake
+++ cmake/megamol_options.cmake
@@ -9,7 +9,7 @@
 endif()

 # Build types
-set(CMAKE_CONFIGURATION_TYPES CACHE STRING "Debug;Release;RelWithDebInfo" FORCE)
+set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE STRING "" FORCE)
 if(NOT CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
 endif()


Fix rpath for MacOS/iOS

Fix rpath for MacOS/iOS

Summary: libs can be installed to ../lib64.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1735,7 +1735,7 @@

   if (APPLE)
     set(_install_name_dir INSTALL_NAME_DIR "@rpath")
-    set(_install_rpath "@loader_path/../lib" ${extra_libdir})
+    set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
   elseif(UNIX)
     set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
     if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")


Added support for the target_compile_features() CMake builtin function to the PCH module/logic.

--- pch.cmake
+++ pch.cmake
@@ -88,7 +88,6 @@
         if( ${CMAKE_GENERATOR} STREQUAL "Xcode" )
             set_target_properties(${_targetName} PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER ${_input} XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "Yes")
         else()
-
             add_library( ${_targetName}_PCH OBJECT ${_input} )
             set_source_files_properties( ${_input} PROPERTIES OBJECT_DEPENDS "${PCH_LOCAL_DEPENDS}" COMPILE_OPTIONS -xc++-header LANGUAGE "CXX" COMPILE_DEFINITIONS "USING_PCH" )

@@ -133,7 +132,6 @@
             add_dependencies( ${_targetName}_PCH_symlink ${_targetName}_PCH )

             get_target_property( _target_include_dirs ${_targetName} INCLUDE_DIRECTORIES )
-
             if( _target_include_dirs )
                 target_include_directories( ${_targetName}_PCH PRIVATE ${_target_include_dirs} )
             endif()
@@ -144,21 +142,28 @@
             endif()

             get_target_property( _target_system_include_dirs ${_targetName} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES )
-
             if( _target_system_include_dirs )
                 target_include_directories( ${_targetName}_PCH SYSTEM PRIVATE ${_target_system_include_dirs} )
             endif()

             get_target_property( _target_compile_definitions ${_targetName} COMPILE_DEFINITIONS )
-
             if( _target_compile_definitions )
                 target_compile_definitions( ${_targetName}_PCH PRIVATE ${_target_compile_definitions} )
             endif()

             get_target_property( _target_compile_options ${_targetName} COMPILE_OPTIONS )
-
             if( _target_compile_options )
                 target_compile_options( ${_targetName}_PCH PRIVATE ${_target_compile_options} )
+            endif()
+
+            get_target_property( _target_compile_features ${_targetName} COMPILE_FEATURES )
+            if( _target_compile_features )
+                target_compile_features( ${_targetName}_PCH PRIVATE ${_target_compile_features} )
+            endif()
+
+            get_target_property( _interface_target_compile_features ${_targetName} INTERFACE_COMPILE_FEATURES )
+            if( _interface_target_compile_features )
+                target_compile_features( ${_targetName}_PCH PRIVATE ${_interface_target_compile_features} )
             endif()

             ## Implementation note:


Added install target for static versions

git-svn-id: e0b5bbb11d0e9fdbbfcabba14dc32ad5d6b235bd@170 fdac6126-5c0c-442c-9429-916003d36597

--- cmake/ACGCommon.cmake
+++ cmake/ACGCommon.cmake
@@ -341,7 +341,13 @@
     set (_and_static 0)
   endif ()

-  add_library (${_target} ${_type} ${ARGN})
+  add_library (${_target} ${_type} ${ARGN} )
+
+#  acg_get_version()
+#
+#  set_target_properties (${_target} PROPERTIES VERSION    ${VERSION-MAJOR}.${VERSION-MINOR}
+#                                               SOVERSION  ${VERSION-MAJOR}.${VERSION-MINOR} )
+#

   # set common target properties defined in common.cmake
   acg_set_target_props (${_target})
@@ -353,8 +359,17 @@
     acg_set_target_props (${_target}Static)

     if (NOT APPLE)
+# todo : create correct so names
       set_target_properties (${_target}Static PROPERTIES
-                             LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+                             LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
+                            )
+
+# todo : rename the lib to omit the static name extension
+      install (TARGETS ${_target}Static
+               RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
+               LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}
+               ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR} )
+
     endif ()
   endif ()

@@ -426,7 +441,7 @@
   endif ()

   if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
-    if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC)
+    if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC )
       install (TARGETS ${_target}
                RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}
                LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR}


[cmake] Fix SO link to a more descriptive one

--- cmake/EmbedText.cmake
+++ cmake/EmbedText.cmake
@@ -2,7 +2,7 @@
 # For use in CMake script mode (cmake -P).
 # Required definitions on command line: INPUT_FILE, OUTPUT_FILE, VARIABLE_NAME

-# Inspired by https://stackoverflow.com/a/27206982
+# Inspired by https://stackoverflow.com/questions/11813271/embed-resources-eg-shader-code-images-into-executable-library-with-cmake/27206982#27206982
 file(READ ${INPUT_FILE} contents HEX)
 string(REGEX REPLACE "(0d)?(..)" "0x\\2," contents ${contents}) # Strip \r for consistency
 file(WRITE ${OUTPUT_FILE} "const unsigned char ${VARIABLE_NAME}[] = {${contents}};\n")


cmake/FindIconv.cmake: fix set of ICONV_LINK_FLAGS [ci skip]

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -59,6 +59,7 @@
   SET (_ICONV_LDFLAGS "${_ICONV_LDFLAGS} ${_iconv_link_flag}")
 ENDFOREACH ()

+SET (ICONV_LINK_FLAGS ${_ICONV_LINK_FLAGS} CACHE STRING "Linker flags when linking against Iconv (list)")
 SET (ICONV_LDFLAGS "${_ICONV_LDFLAGS}" CACHE STRING "Linker flags when linking against Iconv")

 IF(ICONV_FOUND)
@@ -67,7 +68,7 @@
   MESSAGE(STATUS "")
   MESSAGE(STATUS "              INCLUDE_DIR: ${ICONV_INCLUDE_DIR}")
   MESSAGE(STATUS "              LINK_FLAGS : ${ICONV_LINK_FLAGS}")
-  MESSAGE(STATUS "                LD_FLAGS : ${ICONV_LD_FLAGS}")
+  MESSAGE(STATUS "                LD_FLAGS : ${ICONV_LDFLAGS}")
   MESSAGE(STATUS " SECOND_ARGUMENT_IS_CONST: ${ICONV_SECOND_ARGUMENT_IS_CONST}")
   MESSAGE(STATUS "-----------------------------------------")
 ENDIF()


[cmake] detect arm32/arm64

[cmake] detect arm32/arm64

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -161,7 +161,7 @@

 #...............................................................................

-# detect host/target CPU (currently we only support x86 and amd64)
+# detect host/target CPU (we support x86 and amd64)

 macro (
 axl_normalize_cpu
@@ -175,6 +175,10 @@
 		set (${_RESULT} "amd64")
 	elseif ("${_CPU_LC}" MATCHES "^(x86|i386)$")
 		set (${_RESULT} "x86")
+	elseif ("${_CPU_LC}" MATCHES "^(aarch64|arm64)$")
+		set (${_RESULT} "arm64")
+	elseif ("${_CPU_LC}" MATCHES "^(arm)$")
+		set (${_RESULT} "arm32")
 	else ()
 		set (${_RESULT} "${_CPU}") # can't normalize -- leave as is
 	endif ()
@@ -185,9 +189,11 @@
 	_CPU
 	)

+	# TODO: replace with try_run and CPU detection C pre-processor code
+
 	get_filename_component (_CXX_FILE_NAME ${CMAKE_CXX_COMPILER} NAME)

-	if ("${_CXX_FILE_NAME}" MATCHES "arm")
+	if ("${_CXX_FILE_NAME}${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
 		if (CMAKE_SIZEOF_VOID_P EQUAL 8)
 			set (${_CPU} "arm64")
 		else ()


Support not creating targets for configured files

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -67,13 +67,15 @@
     WORKING_DIRECTORY
             "${CMAKE_CURRENT_BINARY_DIR}"
     COMMENT "Configuring ${name} file \"${source}\" -> \"${dest}\"")
-  add_custom_target(configure-${name} ${all}
-    DEPENDS "${dest}"
-    SOURCES "${source}")
-  source_group("Configured Files"
-    FILES "${source}")
-  add_dependencies(configure
-    configure-${name})
+  if (NOT no_configure_target)
+    add_custom_target(configure-${name} ${all}
+      DEPENDS "${dest}"
+      SOURCES "${source}")
+    source_group("Configured Files"
+      FILES "${source}")
+    add_dependencies(configure
+      configure-${name})
+  endif ()
 endfunction ()

 function (vistk_configure_file_always name source dest)


fixing a typo, my bad

fixing a typo, my bad

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

--- cmake/pcl_cpack.cmake
+++ cmake/pcl_cpack.cmake
@@ -69,7 +69,7 @@
     # add documentation
     if(BUILD_documentation)
         set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} doc")
-    if(BUILD_documentation)
+    endif(BUILD_documentation)
     # add PCLConfig
     set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL} pclconfig")
     set(PCL_CPACK_COMPONENTS "${PCL_CPACK_COMPONENTS}\nset(CPACK_COMPONENT_PCLCONFIG_GROUP \"PCL\")\n")


modules: updated FindMagnumIntegration.cmake.

--- modules/FindMagnumIntegration.cmake
+++ modules/FindMagnumIntegration.cmake
@@ -81,7 +81,7 @@
         set(_MAGNUM_${_COMPONENT}INTEGRATION_MAGNUM_DEPENDENCY Shapes)
     endif()

-    set(_MAGNUMINTEGRATION_DEPENDENCIES ${_MAGNUMINTEGRATION_DEPENDENCIES} ${_MAGNUM_${_COMPONENT}INTEGRATION_MAGNUM_DEPENDENCY})
+    list(APPEND _MAGNUMINTEGRATION_DEPENDENCIES ${_MAGNUM_${_COMPONENT}INTEGRATION_MAGNUM_DEPENDENCY})
 endforeach()
 find_package(Magnum REQUIRED ${_MAGNUMINTEGRATION_DEPENDENCIES})


update CUDA architecture flags initialization

* remove obsolete paths
* add Pascal arch support


Android: always sort list of NDK toolchains

Order returned by CMake is unreliable but we need clang to go after gcc for
automatic toolchain selection.

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -596,6 +596,9 @@
  endif()
  if( NOT __availableToolchains )
   file( GLOB __availableToolchains RELATIVE "${ANDROID_NDK}/toolchains" "${ANDROID_NDK}/toolchains/*" )
+  if( __availableToolchains )
+   list(SORT __availableToolchains) # we need clang to go after gcc
+  endif()
   __LIST_FILTER( __availableToolchains "^[.]" )
   __LIST_FILTER( __availableToolchains "llvm" )
   __GLOB_NDK_TOOLCHAINS( __availableToolchains )


Fixed Android API level detection for toolchain build

--- android/android.toolchain.cmake
+++ android/android.toolchain.cmake
@@ -101,7 +101,8 @@
 set( ANDROID_NDK_TOOLCHAIN_DEFAULT_SEARCH_PATH /opt/android-toolchain )
 set( TOOL_OS_SUFFIX "" )

-macro( __TOOLCHAIN_DETECT_API_LEVEL _path _expected)
+macro( __TOOLCHAIN_DETECT_API_LEVEL _path )
+ SET( _expected ${ARGV1} )
  if( NOT EXISTS ${_path} )
   message( FATAL_ERROR "Could not verify Android API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." )
  endif()
@@ -111,7 +112,7 @@
   message( FATAL_ERROR "Could not verify Android API level. Probably you have specified invalid level value, or your copy of NDK/toolchain is broken." )
  endif()
  string( REGEX REPLACE "${API_LEVEL_REGEX}" "\\1" ANDROID_LEVEL_FOUND "${API_FILE_CONTENT}" )
- if( NOT "${_expected}" STREQUAL "" )
+ if( DEFINED _expected )
   if( NOT ${ANDROID_LEVEL_FOUND} EQUAL ${_expected} )
    message( FATAL_ERROR "Specified Android API level does not match level found. Probably your copy of NDK/toolchain is broken." )
   endif()
@@ -191,7 +192,7 @@
       sudo ln -s ~/my-android-toolchain ${ANDROID_NDK_TOOLCHAIN_DEFAULT_SEARCH_PATH}" )
  endif()

- __TOOLCHAIN_DETECT_API_LEVEL( "${ANDROID_NDK_TOOLCHAIN_ROOT}/include/android/api-level.h" )
+ __TOOLCHAIN_DETECT_API_LEVEL( "${ANDROID_NDK_TOOLCHAIN_ROOT}/sysroot/usr/include/android/api-level.h" )

  #message( STATUS "Using android NDK standalone toolchain from ${ANDROID_NDK_TOOLCHAIN_ROOT}" )
  set( BUILD_WITH_ANDROID_NDK_TOOLCHAIN True )


- Maybe fix location of unit test executables

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -436,10 +436,8 @@

 function(COFFEE_ADD_TEST TARGET TITLE SOURCES LIBRARIES )
     # Bleh, Android kind of sucks for this.
-    if(ANDROID)
+    if(ANDROID OR WIN_UWP)
         return()
-	elseif(WIN_UWP)
-		return()
     endif()

     coffee_gen_licenseinfo("${TARGET}" "")
@@ -474,7 +472,7 @@
             "$<TARGET_FILE:${TARGET}>"

             DESTINATION
-            bin/tests
+            "bin/tests/${CMAKE_LIBRARY_ARCHITECTURE}"
             )
     endif()


Fix the search path for CMake files

Fix the search path for CMake files

This allows to find the LLVM's CMake files after moving them in
r259821.

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@259845 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBStandalone.cmake
+++ cmake/modules/LLDBStandalone.cmake
@@ -34,7 +34,7 @@
       set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
   endif()

-  list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
+  list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")

   if (LLDB_PATH_TO_LLVM_BUILD)
     get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
@@ -73,9 +73,9 @@
     message("-- Found PythonInterp: ${PYTHON_EXECUTABLE}")
   endif()
   # Import CMake library targets from LLVM and Clang.
-  include("${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake/LLVMConfig.cmake")
-  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
-      include("${LLDB_PATH_TO_CLANG_BUILD}/share/clang/cmake/ClangConfig.cmake")
+  include("${LLDB_PATH_TO_LLVM_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake")
+  if (EXISTS "${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
+      include("${LLDB_PATH_TO_CLANG_BUILD}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake")
   endif()

   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")


COMP: BUG: Target "Module***" links to itself.

--- CMake/selxModules.cmake
+++ CMake/selxModules.cmake
@@ -116,10 +116,6 @@
       list( APPEND SUPERELASTIX_TEST_SOURCE_FILES ${MODULE}_TEST_SOURCE_FILES )
     endif()

-    if( ${MODULE}_LIBRARIES )
-      list( APPEND SUPERELASTIX_LIBRARIES ${${MODULE}_LIBRARIES} )
-    endif()
-
     # Header-only modules should not be compiled
     if( ${MODULE}_SOURCE_FILES )
       # Check if user accidentally tries to compile header-only library
@@ -137,7 +133,11 @@
     # Aggregate all header-only Components in a separate target for Visual Studio IDE.
       target_sources( HeaderOnlyComponents PUBLIC ${${MODULE}_HEADER_FILES} )
     endif()
-
+
+    if( ${MODULE}_LIBRARIES )
+      list( APPEND SUPERELASTIX_LIBRARIES ${${MODULE}_LIBRARIES} )
+    endif()
+
     # Aggregate all interface headers in a separate target for Visual Studio IDE.
     if( ${MODULE}_INTERFACE_FILES )
         target_sources( Interfaces PUBLIC ${${MODULE}_INTERFACE_FILES} )


COMP: raise error if Ice not found

COMP: raise error if Ice not found

--- CMake/FindOTBIce.cmake
+++ CMake/FindOTBIce.cmake
@@ -31,6 +31,8 @@
 if(ICE_FOUND)
   set(ICE_LIBRARIES ${ICE_LIBRARY})
   set(ICE_INCLUDE_DIRS ${ICE_INCLUDE_DIR})
+else()
+  message(FATAL_ERROR "Cannot find OTBIce. Set ICE_INCLUDE_DIR and ICE_LIBRARY")
 endif()

 mark_as_advanced(ICE_INCLUDE_DIR ICE_LIBRARY)


cmake: Fix a typo in the options

cmake: Fix a typo in the options

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

--- tests/ctest-default.cmake
+++ tests/ctest-default.cmake
@@ -13,7 +13,7 @@
 set(CTEST_BUILD_CONFIGURATION "Debug")

 ## The build options for the project
-set(CTEST_BUILD_OPTIONS "-DUNIT_TESTING=ON -DWITH_CMOKERY_SUPPORT=ON")
+set(CTEST_BUILD_OPTIONS "-DUNIT_TESTING=ON -DWITH_CMOCKERY_SUPPORT=ON")

 #set(CTEST_CUSTOM_MEMCHECK_IGNORE torture_rand)


*** empty log message ***

*** empty log message ***

git-svn-id: b7791fb0f5d07d96612766859ad70a13be88ea96@650 305cdda6-5ce1-45b3-a98d-dfc68c8b3305

--- library/FindACML.cmake
+++ library/FindACML.cmake
@@ -1,6 +1,8 @@

 SET(ACML_USE_SHARED_LIBRARIES OFF CACHE BOOL "Use the ACLM shared library." )
 SET(ACML_USE_OPENMP_LIBRARIES OFF CACHE BOOL "Use the OpenMP implementation.")
+
+

 MACRO(RESET_VAR_IF_CHANGED toChange toCheck)
 	IF( NOT ACML_${toCheck}_PREV_VALUE )
@@ -23,44 +25,58 @@
 	SET(ACML_${toCheck}_PREV_VALUE ${${toCheck}} CACHE INTERNAL "" FORCE)
 ENDMACRO(RESET_VAR_IF_CHANGED toChange)

-#TODO
-#Auto-detect the correct data sizes (32 or 64 bit) based on OS.
-#Auto-detect directory names.  There are a lot of options.

 RESET_VAR_IF_CHANGED( ACML_INCLUDE_PATH ACML_USE_OPENMP_LIBRARIES)
 RESET_VAR_IF_CHANGED( ACML_INCLUDE_PATH ACML_USE_SHARED_LIBRARIES)
 RESET_VAR_IF_CHANGED( ACML ACML_USE_OPENMP_LIBRARIES)
 RESET_VAR_IF_CHANGED( ACML ACML_USE_SHARED_LIBRARIES)
+RESET_VAR_IF_CHANGED( ACML_SEARCH_PATHS ACML_USE_OPENMP_LIBRARIES)
+RESET_VAR_IF_CHANGED( ACML_SEARCH_PATHS ACML_USE_SHARED_LIBRARIES)

+SET(ACML_BASE_SEARCH_PATHS "/opt/acml" "C:\\Program Files\\AMD\\acml")
+SET(ACML_SEARCH_PATHS INTERNAL)
+
+# The various supported versions.  When new versions come out this will need
+# to be updated to allow automatic detection.
+SET(ACML_VERSIONS 3.5.0 3.6.0 3.6.1)
+
+SET(MP_COMPILER_VERSIONS gfortran64_mp_int64 pgi32_mp)
+SET(COMPILER_VERSIONS gfortran64_int64 pgi32)
+
+SET(COMPILER_VERSION_TO_USE "a")

 IF( ACML_USE_OPENMP_LIBRARIES )
-	SET(ACML_SEARCH_PATHS /opt/acml3.5.0/gfortran64_mp_int64/include "C:\\Program Files\\AMD\\acml3.6.0\\pgi32_mp\\include" )
+    SET(COMPILER_VERSION_TO_USE ${MP_COMPILER_VERSIONS})
 ELSE( ACML_USE_OPENMP_LIBRARIES )
-	SET(ACML_SEARCH_PATHS /opt/acml3.5.0/gfortran64_int64/include "C:\\Program Files\\AMD\\acml3.6.0\\pgi32\\include" )
+    SET(COMPILER_VERSION_TO_USE ${COMPILER_VERSIONS})
 ENDIF( ACML_USE_OPENMP_LIBRARIES )

+FOREACH(path_iter ${ACML_BASE_SEARCH_PATHS})
+    FOREACH(version_iter ${ACML_VERSIONS})
+        FOREACH(compiler_iter ${COMPILER_VERSION_TO_USE})
+            LIST(APPEND ACML_SEARCH_PATHS ${path_iter}${version_iter}/${compiler_iter}/include)
+        ENDFOREACH(compiler_iter ${COMPILER_VERSION_TO_USE})
+    ENDFOREACH(version_iter ${ACML_VERSIONS})
+ENDFOREACH(path_iter ${ACML_BASE_SEARCH_PATHS})

 FIND_PATH(ACML_INCLUDE_PATH acml.h ${ACML_SEARCH_PATHS} )
 SET(ACML_LIB_PATH ${ACML_INCLUDE_PATH}/../lib)

 IF( ACML_USE_SHARED_LIBRARIES )
 	IF( ACML_USE_OPENMP_LIBRARIES )
-		SET(ACML_LIB_NAMES libacml_mp_dll acml)
+		SET(ACML_LIB_NAMES acml_mp)
 	ELSE( ACML_USE_OPENMP_LIBRARIES )
-		SET(ACML_LIB_NAMES libacml_dll acml)
+		SET(ACML_LIB_NAMES acml)
 	ENDIF( ACML_USE_OPENMP_LIBRARIES )
 ELSE( ACML_USE_SHARED_LIBRARIES )
 	IF( ACML_USE_OPENMP_LIBRARIES )
-		SET(ACML_LIB_NAMES libacml_mp acml)
+		SET(ACML_LIB_NAMES acml_mp)
 	ELSE( ACML_USE_OPENMP_LIBRARIES )
-		SET(ACML_LIB_NAMES libacml acml)
+		SET(ACML_LIB_NAMES acml)
 	ENDIF( ACML_USE_OPENMP_LIBRARIES )
 ENDIF( ACML_USE_SHARED_LIBRARIES )

 FIND_LIBRARY( ACML NAMES ${ACML_LIB_NAMES} PATHS ${ACML_LIB_PATH} )
-
-#SET( ACML_BLAS_INCLUDE_FILE ${ACML_INCLUDE_PATH}/acml.h )
-#SET( ACML_LAPACK_INCLUDE_FILE ${ACML_INCLUDE_PATH}/acml.h )

 IF( ${CMAKE_GENERATOR} STREQUAL "Unix Makefiles" )
 	SET( ACML_TARGET_LINK_LIBRARIES ${ACML} gfortran )


Remove -O as default compiler setting

Remove -O as default compiler setting

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -62,7 +62,7 @@

     check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
     if (WITH_FORTIFY_SOURCE)
-      add_definitions(-D_FORTIFY_SOURCE=2 -O2)
+      add_definitions(-D_FORTIFY_SOURCE=2)
     endif (WITH_FORTIFY_SOURCE)
   endif (CMAKE_COMPILER_IS_GNUCC OR COMPILER_IS_CLANG)
 endif (UNIX)


Fix CMake error whet llvm-config reports a non-existent source directory.

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

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -42,11 +42,15 @@
   endif()

   if (NOT EXISTS ${LLVM_MAIN_SRC_DIR})
-    message(FATAL_ERROR "Not found: ${LLVM_MAIN_SRC_DIR}")
+    set(LLVM_FOUND OFF)
+    message(WARNING "Not found: ${LLVM_MAIN_SRC_DIR}")
+    return()
   endif()

   if(NOT EXISTS ${LLVM_CMAKE_PATH})
-    message(FATAL_ERROR "Not found: ${LLVM_CMAKE_PATH}")
+    set(LLVM_FOUND OFF)
+    message(WARNING "Not found: ${LLVM_CMAKE_PATH}")
+    return()
   endif()

   list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")


Don't attempt to build spotless if Matlab is not present (replaces 99210e8dcfbd7d2a80c0b1d6e407b428e551ef3b)

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -283,6 +283,16 @@
 endif()

+# Checks whether Matlab is installed, else remove dependent packages
+find_program(matlab matlab)
+if (NOT matlab)
+  message(WARNING "Could not find matlab executable - not building spotless")
+  list(REMOVE_ITEM externals
+    spotless
+  )
+endif()
+
+
 # Use PCL from jochen sprickerhof ppa
 if (USE_SYSTEM_PCL)
   list(REMOVE_ITEM externals


cctag serialize on

cctag serialize on

--- mpg-2014-20.cmake
+++ mpg-2014-20.cmake
@@ -13,7 +13,7 @@
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DTHIS_IS_RELEASE_MODE")

 SET(COMPILE_STATIC_CCTAG_LIBRARY true)
-SET(CCTAG_SERIALIZE 0)
+SET(CCTAG_SERIALIZE 1)

 set(USE_CUDA true)


Add generic lambda preprocessor definition.

--- cmake/CheckGenericLambdas.cmake
+++ cmake/CheckGenericLambdas.cmake
@@ -4,6 +4,7 @@

 IF (USE_GENERIC_LAMBDAS)
 	MESSAGE("-- Generic lambdas (C++14) are supported by the compiler.")
+	ADD_DEFINITIONS(-DUSE_GENERIC_LAMBDAS)
 ELSE ()
 	MESSAGE("-- Generic lambdas (C++14) are not supported by the compiler.")
 ENDIF()


Fix Compiler Settings Error

Fix Compiler Settings Error

The missing space causes building as per the readme to fail. I have added this to my own build and it compiles and runs fine.

--- cmake/EthCompilerSettings.cmake
+++ cmake/EthCompilerSettings.cmake
@@ -3,7 +3,7 @@
 # C++11 check and activation
 if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")

-	set(CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -Wextra -Wno-error=parentheses -pedantic${CMAKE_CXX_FLAGS}")
+	set(CMAKE_CXX_FLAGS "-Wall -Wno-unknown-pragmas -Wextra -Wno-error=parentheses -pedantic ${CMAKE_CXX_FLAGS}")
 	set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g -DETH_DEBUG")
 	set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DETH_RELEASE")
 	set(CMAKE_CXX_FLAGS_RELEASE        "-O3 -DNDEBUG -DETH_RELEASE")