Fix a small mistake.

Fix a small mistake.

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -94,7 +94,7 @@
     find_package(Threads REQUIRED)
     link_libraries(${CMAKE_THREAD_LIBS_INIT})
     set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl -lrt")
-endif(NOT APPLE)
+endif(NOT APPLE AND NOT ANDROID)

 function(merge_static_libs TARGET_NAME)
   set(libs ${ARGN})


fix compile error when WITH_PSLIB=ON (#21702)

* fix compile error when WITH_PSLIB=ON
* test=develop

--- cmake/generic.cmake
+++ cmake/generic.cmake
@@ -93,7 +93,11 @@
 if(NOT APPLE)
   find_package(Threads REQUIRED)
   link_libraries(${CMAKE_THREAD_LIBS_INIT})
-  set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -pthread -ldl -lrt")
+  if(WITH_PSLIB)
+    set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -pthread -ldl -lrt -lz -lssl")
+  else()
+    set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -pthread -ldl -lrt")
+  endif()
 endif(NOT APPLE)

 set_property(GLOBAL PROPERTY FLUID_MODULES "")


Suppress OpenCL module on OSX Jenkins builds

--- cmake/jenkins.cmake
+++ cmake/jenkins.cmake
@@ -3,6 +3,10 @@
   message(STATUS "Set CXX to g++ based on label_expr content")
   set(CMAKE_C_COMPILER "gcc" CACHE PATH "C compiler option")
   set(CMAKE_CXX_COMPILER "g++" CACHE PATH "C++ compiler option")
+  # OpenCL header on OSX do not work with GCC
+  if(APPLE)
+    set(CAF_NO_OPENCL yes CACHE BOOL "Configure OpenCL module")
+  endif(APPLE)
 elseif ("${LABEL_EXPR}" MATCHES "clang")
   message(STATUS "Set CXX to clang++ based on label_expr content")
   set(CMAKE_C_COMPILER "clang" CACHE STRING "C compiler option")


Remove obsolete Jenkins config from helper script

--- cmake/jenkins.cmake
+++ cmake/jenkins.cmake
@@ -8,7 +8,3 @@
   set(CMAKE_C_COMPILER "clang" CACHE STRING "C compiler option")
   set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "C++ compiler option")
 endif()
-if ("${LABEL_EXPR}" MATCHES "asio")
-  message(STATUS "Set define to use boost asio for the multiplexer")
-  set(CAF_USE_ASIO yes CACHE STRING "Enable ASIO in CAF")
-endif()


Fixed VisualStudio debug mode compiler flags

--- cmake/windows.cmake
+++ cmake/windows.cmake
@@ -44,7 +44,7 @@
 #	/EHa: fat exception model
 #
 # DEBUG compiler flags:
-#	/ZI create debugging information PDB file with support for Edit-and-Continue
+#	/Zi create debugging information PDB file
 #	/Od disable optimizations
 # 	/Oy- do not suppress frame pointers (recommended for debugging)
 #	/MTd use statically linked, thread-safe, debug CRT libs
@@ -62,16 +62,16 @@
 	set(ORYOL_VS_EXCEPTION_FLAGS "/EHsc")
 endif()
 set(CMAKE_CXX_FLAGS "${ORYOL_VS_EXCEPTION_FLAGS} /WX /TP /DWIN32 ${ORYOL_PLATFORM_DEFINES}")
-set(CMAKE_CXX_FLAGS_DEBUG "/Od /Oy- /MTd /D_DEBUG /DORYOL_DEBUG=1")
+set(CMAKE_CXX_FLAGS_DEBUG "/Zi /Od /Oy- /MTd /D_DEBUG /DORYOL_DEBUG=1")
 set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MT /DNDEBUG")

 set(CMAKE_C_FLAGS "/WX /TC /errorReport:queue /DWIN32 ${ORYOL_PLATFORM_DEFINES}")
-set(CMAKE_C_FLAGS_DEBUG "/Od /Oy- /MTd /D_DEBUG /DORYOL_DEBUG=1")
+set(CMAKE_C_FLAGS_DEBUG "/Zi /Od /Oy- /MTd /D_DEBUG /DORYOL_DEBUG=1")
 set(CMAKE_C_FLAGS_RELEASE "/Ox /MT /DNDEBUG ")

 # define exe linker flags
 set(CMAKE_EXE_LINKER_FLAGS "/STACK:5000000 /machine:${ORYOL_WINDOWS_PLATFORM_NAME}")
-set(CMAKE_EXE_LINKER_FLAGS_DEBUG "")
+set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG")
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")

 # update cache variables for cmake gui


Implement inheriting of debug_assert target

Fixes #49.

--- external/external.cmake
+++ external/external.cmake
@@ -7,8 +7,12 @@
     set(TYPE_SAFE_HAS_IMPORTED_TARGETS ON)
 else()
     set(TYPE_SAFE_HAS_IMPORTED_TARGETS OFF)
-    message(STATUS "Installing debug_assert via submodule")
-    execute_process(COMMAND git submodule update --init -- external/debug_assert
-                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-    add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/debug_assert)
+    if(TARGET debug_assert)
+        message(STATUS "Using inherited debug_assert target")
+    else()
+        message(STATUS "Installing debug_assert via submodule")
+        execute_process(COMMAND git submodule update --init -- external/debug_assert
+                        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+        add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/external/debug_assert)
+    endif()
 endif()


REFAC: use GDAL 3.0.2 in SuperBuild

REFAC: use GDAL 3.0.2 in SuperBuild

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -105,7 +105,7 @@
     --with-webp=no
     --with-threads=yes
     --with-freexl=no
-    --with-proj=yes
+    --with-proj=${SB_INSTALL_PREFIX}
     --with-libjson-c=internal
     ${GDAL_SB_CONFIG}
     ${GDAL_SB_EXTRA_OPTIONS}
@@ -148,8 +148,8 @@

 ExternalProject_Add(GDAL
   PREFIX GDAL
-  URL "http://download.osgeo.org/gdal/2.4.1/gdal-2.4.1.tar.gz"
-  URL_MD5 8bc93c7ae4d3a46916918a52c7f5f10f
+  URL "http://download.osgeo.org/gdal/3.0.2/gdal-3.0.2.tar.gz"
+  URL_MD5 8a31507806b26f070858558aaad42277
   SOURCE_DIR ${GDAL_SB_SRC}
   BINARY_DIR ${GDAL_SB_SRC}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


ENH: avoid cyclic include of Packaging

ENH: avoid cyclic include of Packaging

--- SuperBuild/CMake/External_otb.cmake
+++ SuperBuild/CMake/External_otb.cmake
@@ -161,6 +161,8 @@
   -DOTB_WRAP_JAVA:BOOL=${OTB_WRAP_JAVA}
   ${OTB_SB_CONFIG}
   ${OTB_SB_LARGEINPUT_CONFIG}
+  -DGENERATE_PACKAGE:BOOL=OFF
+  -DGENERATE_XDK:BOOL=OFF
   ${OTB_ADDITIONAL_CACHE}
   CMAKE_COMMAND ${SB_CMAKE_COMMAND}
   )


Updating error message and target name to correctly reflect board.

--- targets/target-kubos-isis-gcc/CMake/toolchain.cmake
+++ targets/target-kubos-isis-gcc/CMake/toolchain.cmake
@@ -1,23 +1,16 @@
 # Copyright (C) 2016 Kubos Corporation
-if (TARGET_KUBOS_ARM_NONE_EABI_GCC_TOOLCHAIN_INCLUDED)
+if (TARGET_KUBOS_ISIS_GCC_TOOLCHAIN_INCLUDED)
     return()
 endif()
-set(TARGET_KUBOS_ARM_NONE_EABI_GCC_TOOLCHAIN_INCLUDED 1)
+set(TARGET_KUBOS_ISIS_GCC_TOOLCHAIN_INCLUDED 1)

 set(CMAKE_SYSTEM_PROCESSOR "arm926ej-s")
 add_definitions("-DTOOLCHAIN_GCC_ARM")
 list(APPEND CMAKE_PREFIX_PATH "/opt/buildroot/usr/bin")

 macro(gcc_not_found)
-    if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
-        message(" you can install the ARM GCC embedded compiler tools from:")
-        message(" https://launchpad.net/gcc-arm-embedded/+download ")
-    elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
-        message(" it is included in the arm-none-eabi-gcc package that you can install")
-        message(" with homebrew:\n")
-        message("   brew tap ARMmbed/homebrew-formulae")
-        message("   brew install arm-none-eabi-gcc")
-    endif()
+    message("/opt/buildroot has not been found.  It can be installed by building Linux")
+	message("with the BR2_HOST_DIR option set to '/opt/buildroot'")
 endmacro()

 macro(gcc_load_toolchain prefix)


Turn off precompiled headers for command-line nmake. Should probably be fixed to be cross-platform?

--- CMakeModules/PrecompiledHeader.cmake
+++ CMakeModules/PrecompiledHeader.cmake
@@ -17,7 +17,7 @@
   get_filename_component(HEADER ${HEADER_FILE} NAME)

   # Use MSVC_IDE to exclude NMake from using PCHs
-  if (MSVC AND NOT NMAKE AND NOT OGITOR_UNITY_BUILD)
+  if (MSVC_IDE AND NOT NMAKE AND NOT OGITOR_UNITY_BUILD)
 	add_definitions(/Yu"${HEADER}")
     set_source_files_properties(${SRC_FILE}
       PPROPERTIES COMPILE_FLAGS /Yc"${HEADER}"


Use Daemon_SOURCE_DIR for pnacl toolchain resolution

--- cmake/DaemonGame.cmake
+++ cmake/DaemonGame.cmake
@@ -93,7 +93,7 @@
                 BUILD_IN_SOURCE 0
                 CMAKE_ARGS
                     -DFORK=2
-                    -DCMAKE_TOOLCHAIN_FILE=${CMAKE_SOURCE_DIR}/daemon/cmake/toolchain-pnacl.cmake
+                    -DCMAKE_TOOLCHAIN_FILE=${Daemon_SOURCE_DIR}/cmake/toolchain-pnacl.cmake
                     -DDEPS_DIR=${DEPS_DIR}
                     -DBUILD_GAME_NACL=1
                     -DBUILD_GAME_NATIVE_DLL=0


[cmake] fix PymorUtils for CMAKE_WITH_AUTOTOOLS case?

--- cmake/PymorUtils.cmake
+++ cmake/PymorUtils.cmake
@@ -12,23 +12,43 @@
         set(pythonWrapperCpp       "${CMAKE_CURRENT_BINARY_DIR}/${target_name}_bindings_generator.cc")
         set_source_files_properties("${pythonWrapperCpp}" PROPERTIES GENERATED TRUE)

-        add_custom_command(
-            OUTPUT
-                "${pythonWrapperCpp}"
-            COMMAND
-                "${PYTHON_EXECUTABLE}"
-                "${pythonWrapperGenerator}"
-                "${target_name}"
-                "${header_filename}"
-                "${CMAKE_BINARY_DIR}/config.h"
-                "${CMAKE_CURRENT_BINARY_DIR}"
-            DEPENDS
-                "${pythonWrapperGenerator}"
-            WORKING_DIRECTORY
-                "${CMAKE_CURRENT_BINARY_DIR}"
-            COMMENT
-                "${pythonTarget}: generating bindings" VERBATIM
-        )
+        if(CMAKE_WITH_AUTOTOOLS)
+          add_custom_command(
+              OUTPUT
+                  "${pythonWrapperCpp}"
+              COMMAND
+                  "${PYTHON_EXECUTABLE}"
+                  "${pythonWrapperGenerator}"
+                  "${target_name}"
+                  "${header_filename}"
+                  "${PROJECT_BINARY_DIR}/config.h"
+                  "${CMAKE_CURRENT_BINARY_DIR}"
+              DEPENDS
+                  "${pythonWrapperGenerator}"
+              WORKING_DIRECTORY
+                  "${CMAKE_CURRENT_BINARY_DIR}"
+              COMMENT
+                  "${pythonTarget}: generating bindings" VERBATIM
+          )
+        else(CMAKE_WITH_AUTOTOOLS)
+          add_custom_command(
+              OUTPUT
+                  "${pythonWrapperCpp}"
+              COMMAND
+                  "${PYTHON_EXECUTABLE}"
+                  "${pythonWrapperGenerator}"
+                  "${target_name}"
+                  "${header_filename}"
+                  "${PROJECT_SOURCE_DIR}/config.h"
+                  "${CMAKE_CURRENT_BINARY_DIR}"
+              DEPENDS
+                  "${pythonWrapperGenerator}"
+              WORKING_DIRECTORY
+                  "${CMAKE_CURRENT_BINARY_DIR}"
+              COMMENT
+                  "${pythonTarget}: generating bindings" VERBATIM
+          )
+        endif(CMAKE_WITH_AUTOTOOLS)

         include_directories( ${PYTHON_INCLUDE_DIRS} "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}")
         add_library( ${pythonTarget} MODULE "${pythonWrapperCpp}" )


Fix error message when ENABLE_LIBSODIUM is set and libsodium is not found

--- cmake/check_reqs.cmake
+++ cmake/check_reqs.cmake
@@ -3,7 +3,11 @@
 get_property(nacl_required GLOBAL PROPERTY NACL_REQUIRED)
 if(${nacl_required})
   if("${NACL_LIBRARIES}" STREQUAL "")
-    message(FATAL_ERROR "NaCl is not available, but a selected module needs it")
+    if(ENABLE_LIBSODIUM)
+      message(FATAL_ERROR "libsodium is not available, but a selected module needs it")
+    else(ENABLE_LIBSODIUM)
+      message(FATAL_ERROR "NaCl is not available, but a selected module needs it")
+    endif(ENABLE_LIBSODIUM)
   endif()

   if(ENABLE_LIBSODIUM)


cmake: Re-write the capability database to avoid file appends

CI sometimes fails with a temporarily corrupted toolchain capabilitiy
database file. Although not proven, there is evidence that CMake's
file(APPEND does not work atomically when there are concurrent writes
and reads of a certain size.

To avoid file appending, we re-write the key-value database
implementation to store keys in filenames and values in individual
single-byte files.

This is (most likely) fixes #9992.

NB: Users that have been overriding the database file location with
the CMake variable ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE must now specify
a directory with the variable ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_DIR.

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -628,37 +628,53 @@
 # caching comes in addition to the caching that CMake does in the
 # build folder's CMakeCache.txt)
 function(zephyr_check_compiler_flag lang option check)
-  # Locate the cache
+  # Locate the cache directory
   set_ifndef(
-    ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE
-    ${USER_CACHE_DIR}/ToolchainCapabilityDatabase.cmake
+    ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_DIR
+    ${USER_CACHE_DIR}/ToolchainCapabilityDatabase
     )
-
-  # Read the cache
-  include(${ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE} OPTIONAL)
+  if(DEFINED ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE)
+    assert(0
+      "The deprecated ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE is now a directory"
+      "and is named ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_DIR"
+      )
+    # Remove this deprecation warning in version 1.14.
+  endif()
+
+  # The toolchain capability database/cache is maintained as a
+  # directory of files. The filenames in the directory are keys, and
+  # the file contents are the values in this key-value store.

   # We need to create a unique key wrt. testing the toolchain
-  # capability. This key must be a valid C identifier that includes
-  # everything that can affect the toolchain test.
+  # capability. This key must include everything that can affect the
+  # toolchain test.
+  #
+  # Also, to fit the key into a filename we calculate the MD5 sum of
+  # the key.

   # The 'cacheformat' must be bumped if a bug in the caching mechanism
   # is detected and all old keys must be invalidated.
-  set(cacheformat 2)
+  set(cacheformat 3)

   set(key_string "")
-  set(key_string "${key_string}ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_")
-  set(key_string "${key_string}cacheformat_")
   set(key_string "${key_string}${cacheformat}_")
   set(key_string "${key_string}${TOOLCHAIN_SIGNATURE}_")
   set(key_string "${key_string}${lang}_")
   set(key_string "${key_string}${option}_")
   set(key_string "${key_string}${CMAKE_REQUIRED_FLAGS}_")

-  string(MAKE_C_IDENTIFIER ${key_string} key)
+  string(MD5 key ${key_string})

   # Check the cache
-  if(DEFINED ${key})
-    set(${check} ${${key}} PARENT_SCOPE)
+  set(key_path ${ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_DIR}/${key})
+  if(EXISTS ${key_path})
+    file(READ
+    ${key_path}   # File to be read
+    key_value     # Output variable
+    LIMIT 1       # Read at most 1 byte ('0' or '1')
+    )
+
+    set(${check} ${key_value} PARENT_SCOPE)
     return()
   endif()

@@ -668,11 +684,22 @@
   set(${check} ${inner_check} PARENT_SCOPE)

   # Populate the cache
-  file(
-    APPEND
-    ${ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE}
-    "set(${key} ${inner_check})\n"
-    )
+  if(NOT (EXISTS ${key_path}))
+    file(
+      WRITE
+      ${key_path}
+      ${inner_check}
+      )
+
+    # Populate a metadata file (only intended for trouble shooting)
+    # with information about the hash, the toolchain capability
+    # result, and the toolchain test.
+    file(
+      APPEND
+      ${ZEPHYR_TOOLCHAIN_CAPABILITY_CACHE_DIR}/log.txt
+      "${inner_check} ${key} ${key_string}\n"
+      )
+  endif()
 endfunction()

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   18)
+SET(KWSYS_DATE_STAMP_DAY   19)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   02)
+SET(KWSYS_DATE_STAMP_DAY   03)


- Fixes to Android Java thingies, layouts

--- cmake/Packaging/AndroidApkBuild.cmake
+++ cmake/Packaging/AndroidApkBuild.cmake
@@ -69,6 +69,8 @@
     if( "${Api_Target}" GREATER "20" )
         # isGame is only available on API 21+
         set ( ANDROID_APK_IS_GAME "android:isGame=\"true\"" )
+        # Lollipop+ does not work on Kitkat
+        set ( ANDROID_API_MIN_TARGET "21" )

         #set ( ANDROID_APK_BANNER_DATA "android:banner=\"@drawable/banner\"" )
         #set ( ANDROID_APK_LOGO_DATA "android:logo=\"@drawable/logo\"")
@@ -290,25 +292,25 @@
             @ONLY
             )

-#        if(ANDROID_NATIVE_API_LEVEL GREATER 19)
-#            configure_file (
-#                "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.lollipop.in"
-#                "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
-#                @ONLY
-#                )
-#        elseif(ANDROID_NATIVE_API_LEVEL EQUAL 19)
-#            configure_file (
-#                "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.kitkat.in"
-#                "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
-#                @ONLY
-#                )
-#        else()
+        if(ANDROID_NATIVE_API_LEVEL GREATER 20)
+            configure_file (
+                "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.lollipop.in"
+                "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
+                @ONLY
+                )
+        elseif(ANDROID_NATIVE_API_LEVEL GREATER 18)
+            configure_file (
+                "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.kitkat.in"
+                "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
+                @ONLY
+                )
+        else()
         configure_file (
             "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/SDLActivity.java.in"
             "${BUILD_OUTDIR}/src/org/libsdl/app/SDLActivity.java"
             @ONLY
             )
-#        endif()
+        endif()

         configure_file (
             "${ANDROID_PROJECT_CONFIG_DIR}/sdl2/${ANDROID_STARTUP_ACTIVITY}.java.in"


[cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading

Prevent unloading shared libraries on Linux when dlclose() is called.
This is necessary since command-line option parsing API relies on
registering the global option instances in the option parser instance
which can be loaded in a different shared library.

Given that we can't reliably remove those options when a library is
unloaded, the parser ends up containing dangling references. Since glibc
has relatively complex library unloading rules, some of the LLVM
libraries can be unloaded while others (including the Support library)
stay loaded causing quite a mayhem. To reliably prevent that, just
forbid unloading all libraries -- it's a very bad idea anyway.

While the issue arguably happens only with BUILD_SHARED_LIBS, it may
affect any library reusing llvm::cl interface.

Based on patch provided Ross Hayward on https://bugs.gentoo.org/617154.
Previously hit by Fedora back in Feb 2016:
https://lists.freedesktop.org/archives/mesa-dev/2016-February/107242.html

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -149,6 +149,14 @@
         ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
    NOT LLVM_USE_SANITIZER)
   set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
+endif()
+
+# Pass -Wl,-z,nodelete. This makes sure our shared libraries are not unloaded
+# by dlclose(). We need that since the CLI API relies on cross-references
+# between global objects which became horribly broken when one of the libraries
+# is unloaded.
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,nodelete")
 endif()


COMP: Revert "COMP: Make ThirdParty Eigen3 COMPILE_DEPENDS"

This reverts commit 1c49f4bba661d0aeb8c3734b2f14e38e3a2a073b.

GCC still complains about shadowed definitions.
Make the ITKEigen3 dependency PUBLIC, so the `-isystem` flag
is used, and the warnings suppressed.

--- Modules/Core/Common/itk-module.cmake
+++ Modules/Core/Common/itk-module.cmake
@@ -13,12 +13,12 @@
 itk_module(ITKCommon
   ENABLE_SHARED
   DEPENDS
+    ITKEigen3
     ITKKWIML
     ${ITKCOMMON_TBB_DEPENDS}
   PRIVATE_DEPENDS
     ITKDoubleConversion
   COMPILE_DEPENDS
-    ITKEigen3
     ITKKWSys
     ITKVNLInstantiation
   TEST_DEPENDS


Fixed bug in TbagStripRegex.cmake script.

--- cmake/TbagScript/TbagStripRegex.cmake
+++ cmake/TbagScript/TbagStripRegex.cmake
@@ -9,6 +9,10 @@
     file (MAKE_DIRECTORY "${OUTPUT_DIR}")
 endif ()

+if (EXISTS "${OUTPUT_PATH}")
+    file (REMOVE "${OUTPUT_PATH}")
+endif ()
+
 file (STRINGS "${SOURCE_PATH}" __content ENCODING UTF-8)
 foreach (__cursor ${__content})
     if (NOT __cursor MATCHES ${REGEX})


Add install option to dawn_add_executable

--- cmake/modules/DawnAddExecutable.cmake
+++ cmake/modules/DawnAddExecutable.cmake
@@ -35,9 +35,11 @@
 #   List of external libraries and/or CMake targets to link against.
 # ``OUTPUT_DIR`` [optional]
 #   Directory to place the exectuable (e.g ``${CMAKE_BINARY_DIR}/bin``).
+# ``INSTALL_DESTINATION`` [optional]
+#   Destition (relative to ``CMAKE_INSTALL_PREFIX``) to install the exectuable.
 #
 function(dawn_add_executable)
-  set(one_value_args NAME OUTPUT_DIR)
+  set(one_value_args NAME OUTPUT_DIR INSTALL_DESTINATION)
   set(multi_value_args SOURCES DEPENDS)
   cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})

@@ -51,4 +53,10 @@
   if(ARG_OUTPUT_DIR)
     set_target_properties(${ARG_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${ARG_OUTPUT_DIR}")
   endif()
+
+  if(ARG_INSTALL_DESTINATION)
+    install(TARGETS ${ARG_NAME}
+            DESTINATION ${ARG_INSTALL_DESTINATION}
+            EXPORT ${ARG_NAME}Targets)
+  endif()
 endfunction()


cmake: Enable the lto cache when building with -flto=thin on darwin

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -643,6 +643,11 @@
 if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
   append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS
                       CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+  # On darwin, enable the lto cache. This improves initial build time a little
+  # since we re-link a lot of the same objects, and significantly improves
+  # incremental build time.
+  append_if(APPLE "-Wl,-cache_path_lto,${PROJECT_BINARY_DIR}/lto.cache"
+            CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
 elseif(uppercase_LLVM_ENABLE_LTO STREQUAL "FULL")
   append("-flto=full" CMAKE_CXX_FLAGS CMAKE_C_FLAGS
                  CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)


[t:4846] merging 4846 branch.

[t:4846] merging 4846 branch.

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@43235 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -103,6 +103,8 @@
   string(REGEX REPLACE ";" "," intel_warning_string "${intel_warnings}")
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -diag-disable ${intel_warning_string}")

-  # make sure to link with both intel's math library and regular -lm
-  link_libraries(imf m)
+  # make sure intel libs are linked statically
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel")
+  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-intel")
 endif()


COMP include Simulation code directory in

--- CMake/otbIncludeDirectories.cmake
+++ CMake/otbIncludeDirectories.cmake
@@ -48,6 +48,7 @@
   ${OTB_SOURCE_DIR}/Code/Projections
   ${OTB_SOURCE_DIR}/Code/Radiometry
   ${OTB_SOURCE_DIR}/Code/SARPolarimetry
+  ${OTB_SOURCE_DIR}/Code/Simulation
   ${OTB_SOURCE_DIR}/Code/SpatialReasoning
   ${OTB_SOURCE_DIR}/Code/Testing
   ${OTB_SOURCE_DIR}/Code/UtilitiesAdapters/CurlAdapters


Added the Mac include directory for QScintilla

--- CMakeScripts/FindQScintilla.cmake
+++ CMakeScripts/FindQScintilla.cmake
@@ -19,7 +19,10 @@

 IF(QT4_FOUND)
     FIND_PATH(QSCINTILLA_INCLUDE_DIR qsciglobal.h
-    "${QT_INCLUDE_DIR}/Qsci" /usr/include /usr/include/Qsci
+    "${QT_INCLUDE_DIR}/Qsci"
+        /usr/include
+        /usr/include/Qsci
+        /usr/local/Cellar/qt/4.8.3/include/Qsci
     )

     SET(QSCINTILLA_NAMES ${QSCINTILLA_NAMES} qscintilla2 libqscintilla2 libqscintilla2-8)


Add GitHub repo URL so it's easier to find the place I'm pulling it from


update ios.toolchain.cmake

update ios.toolchain.cmake

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -247,7 +247,7 @@
     set(DEPLOYMENT_TARGET "11.0")
   endif()
   message(STATUS "[DEFAULTS] Using the default min-version since DEPLOYMENT_TARGET not provided!")
-elseif(DEFINED DEPLOYMENT_TARGET AND PLATFORM STREQUAL "MAC_CATALYST" AND ${DEPLOYMENT_TARGET} VERSION_LESS "13.0")
+elseif(DEFINED DEPLOYMENT_TARGET AND PLATFORM MATCHES "^MAC_CATALYST" AND ${DEPLOYMENT_TARGET} VERSION_LESS "13.0")
   message(FATAL_ERROR "Mac Catalyst builds requires a minimum deployment target of 13.0!")
 endif()

@@ -717,7 +717,7 @@
     set(SDK_NAME_VERSION_FLAGS
             "-mios-simulator-version-min=${DEPLOYMENT_TARGET}")
   endif()
-elseif(NOT PLATFORM_INT STREQUAL "MAC_CATALYST")
+elseif(NOT PLATFORM_INT MATCHES "^MAC_CATALYST")
   # Newer versions of CMake sets the version min flags correctly, skip this for Mac Catalyst targets
   set(CMAKE_OSX_DEPLOYMENT_TARGET ${DEPLOYMENT_TARGET})
 endif()
@@ -726,7 +726,7 @@
   set(APPLE_TARGET_TRIPLE ${APPLE_TARGET_TRIPLE_INT} CACHE INTERNAL "")
 endif()

-if(PLATFORM_INT STREQUAL "MAC_CATALYST")
+if(PLATFORM_INT MATCHES "^MAC_CATALYST")
   set(C_TARGET_FLAGS "-target ${APPLE_TARGET_TRIPLE_INT} -isystem ${CMAKE_OSX_SYSROOT_INT}/System/iOSSupport/usr/include")
 endif()

@@ -870,7 +870,7 @@
 set(CMAKE_FIND_FRAMEWORK FIRST)

 # Set up the default search directories for frameworks.
-if(PLATFORM_INT MATCHES "MAC_CATALYST.*")
+if(PLATFORM_INT MATCHES "^MAC_CATALYST")
   set(CMAKE_FRAMEWORK_PATH
           ${CMAKE_DEVELOPER_ROOT}/Library/PrivateFrameworks
           ${CMAKE_OSX_SYSROOT_INT}/System/Library/Frameworks


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   13)
+SET(KWSYS_DATE_STAMP_DAY   14)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   05)
+SET(KWSYS_DATE_STAMP_DAY   06)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 07)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   11)
+SET(KWSYS_DATE_STAMP_DAY   12)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   01)
+SET(KWSYS_DATE_STAMP_DAY   02)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 12)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   26)
+SET(KWSYS_DATE_STAMP_DAY   27)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   17)
+SET(KWSYS_DATE_STAMP_DAY   18)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 11)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   04)
+SET(KWSYS_DATE_STAMP_DAY   05)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 03)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   20)
+SET(KWSYS_DATE_STAMP_DAY   21)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 05)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   28)
+SET(KWSYS_DATE_STAMP_DAY   29)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 10)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   22)
+SET(KWSYS_DATE_STAMP_DAY   23)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -7,4 +7,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 09)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   06)
+SET(KWSYS_DATE_STAMP_DAY   07)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 01)

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   19)
+SET(KWSYS_DATE_STAMP_DAY   20)


Update version.

Update version.

--- cmake/projects/libdill/hunter.cmake
+++ cmake/projects/libdill/hunter.cmake
@@ -9,8 +9,8 @@
 hunter_add_version(
     PACKAGE_NAME libdill
     VERSION "1.6"
-    URL "https://github.com/isaachier/libdill/archive/hunter-1.6-p0.tar.gz"
-    SHA1 "e583b83bee8305ceddcbfdcbd7cdcb29ec405110")
+    URL "https://github.com/isaachier/libdill/archive/hunter-1.6-p1.tar.gz"
+    SHA1 "fa46951cca010b6a829b9d8aaf6a94a221cc7002")
 hunter_cmake_args(libdill CMAKE_ARGS
                   BUILD_TESTING=OFF
                   BUILD_PERF=OFF)


Reject PETSc versions prior to 3.0.

Reject PETSc versions prior to 3.0.

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

--- deal.II/cmake/modules/FindPETSC.cmake
+++ deal.II/cmake/modules/FindPETSC.cmake
@@ -193,6 +193,12 @@

   SET(PETSC_VERSION "${PETSC_VERSION_MAJOR}.${PETSC_VERSION_MINOR}.${PETSC_VERSION_SUBMINOR}")

+  IF (${PETSC_VERSION_MAJOR} LESS 3)
+    MESSAGE (FATAL_ERROR "************************************************\n"
+                         "Only PETSc versions 3.0 and later are supported!\n"
+                         "************************************************\n")
+  ENDIF()
+
   MARK_AS_ADVANCED(
     PETSC_ARCH
     PETSC_DIR


Turn DU into a default module

Turn DU into a default module

--- modules/digitaluniverse/include.cmake
+++ modules/digitaluniverse/include.cmake
@@ -1 +1 @@
-set(DEFAULT_MODULE OFF)
+set(DEFAULT_MODULE ON)


remove all svn repos and use git for all

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -2,25 +2,25 @@
 set(lcm_pod_revision c43ae7d)
 set(lcm_pod_depends)

-set(libbot-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/libbot-drc)
-set(libbot-drc_revision 8334)
-set(libbot-drc_depends)
+set(libbot_url https://github.com/mitdrc/libbot.git)
+set(libbot_revision 1d5627d1c45b72331677556d7d255d49a2c6934c)
+set(libbot_depends)

 set(Eigen_pod_url https://github.com/RobotLocomotion/eigen-pod.git)
 set(Eigen_pod_revision 0f940b6) # drake now uses: c6c4738
 set(Eigen_pod_depends)

-set(opencv-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/opencv-drc)
-set(opencv-drc_revision 8298)
-set(opencv-drc_depends Eigen_pod)
-
-set(pcl_dep_url https://svn.csail.mit.edu/drc/trunk/software/externals/pcl_dep)
-set(pcl_dep_revision 8337)
-set(pcl_dep_depends)
+set(opencv-pod_url https://github.com/mitdrc/opencv-pod)
+set(opencv-pod_revision 7f4c81676f887ee64da446f1ba61a3e5ed80f879)
+set(opencv-pod_depends Eigen_pod)
+
+set(flann-pod_url https://github.com/mitdrc/flann-pod)
+set(flann-pod_revision 9619e03a1d1f8b4b27d370810b9b2ccfe00adf58)
+set(flann-pod_depends)

 set(pcl_url http://github.com/pointcloudlibrary/pcl.git)
 set(pcl_revision pcl-1.7.1)
-set(pcl_depends pcl_dep Eigen_pod)
+set(pcl_depends flann-pod Eigen_pod)
 set(pcl_external_args
   CMAKE_CACHE_ARGS
     -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
@@ -28,29 +28,29 @@
     -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
   )

-set(octomap-drc_url https://svn.csail.mit.edu/drc/trunk/software/externals/octomap-drc)
-set(octomap-drc_revision 8327)
-set(octomap-drc_depends)
-
-set(occ-map_url https://svn.csail.mit.edu/rrg_pods/Isam_Slam/occ-map)
-set(occ-map_revision 958)
-set(occ-map_depends libbot-drc opencv-drc)
-
-set(common_utils_url https://svn.csail.mit.edu/common_utils)
-set(common_utils_revision 301)
-set(common_utils_depends Eigen_pod libbot-drc occ-map octomap-drc)
+set(octomap-pod_url https://github.com/mitdrc/octomap-pod.git)
+set(octomap-pod_revision 590b430dfe9f949118fdd618b620d82d84eb0162)
+set(octomap-pod_depends)
+
+set(occ-map_url https://github.com/mitdrc/occ-map.git)
+set(occ-map_revision 34ab71fa693216d2c0508f0f2680b9a68994f473)
+set(occ-map_depends libbot opencv-pod)
+
+set(common_utils_url https://github.com/mitdrc/common_utils.git)
+set(common_utils_revision edc762537aee1bc264392f6902dbcc97b0f563f7)
+set(common_utils_depends Eigen_pod libbot occ-map octomap-pod)

 set(frsm_url ssh://git@github.com/mitdrc/frsm.git)
 set(frsm_revision bbf1d83023ae35ecf595c93e46b8601206be9e9b)
-set(frsm_depends libbot-drc)
-
-set(kinect_url https://svn.csail.mit.edu/rrg_pods/drivers/kinect)
-set(kinect_revision 964)
-set(kinect_depends libbot-drc)
-
-set(microstrain_comm_url https://svn.csail.mit.edu/rrg_pods/drivers/microstrain_comm)
-set(microstrain_comm_revision 853)
-set(microstrain_comm_depends common_utils)
+set(frsm_depends libbot)
+
+set(kinect_url https://github.com/mitdrc/kinect.git)
+set(kinect_revision 1b7c944c08ba4e3a488298d1cdbf6f8485fb015e)
+set(kinect_depends libbot)
+
+set(microstrain_url https://github.com/mitdrc/microstrain.git)
+set(microstrain_revision ac3551eb4bdbaa6a081cfd1d74b605b34578ee7f)
+set(microstrain_depends common_utils)

 set(bullet_url https://github.com/RobotLocomotion/bullet-pod.git)
 set(bullet_revision c7c87f3)
@@ -58,15 +58,15 @@

 set(fovis_url ssh://git@github.com/fovis/fovis.git)
 set(fovis_revision ee2fe6593ed9e7e5ce2b2f6f1c64b627da119090)
-set(fovis_depends libbot-drc kinect)
-
-set(estimate-pose_url https://svn.csail.mit.edu/rrg_pods/estimate-pose)
-set(estimate-pose_revision 827)
+set(fovis_depends libbot kinect)
+
+set(estimate-pose_url https://github.com/mitdrc/estimate-pose.git)
+set(estimate-pose_revision e24a46af00c46116b76f69ff0f20923e60daa519)
 set(estimate-pose_depends fovis)

-set(vicon_url https://svn.csail.mit.edu/rrg_pods/drivers/vicon)
-set(vicon_revision 855)
-set(vicon_depends libbot-drc)
+set(vicon_url https://github.com/mitdrc/vicon.git)
+set(vicon_revision 9d42432a278d9e07394d11ab5a5c23b07e307c2c)
+set(vicon_depends libbot)

 set(apriltags_url https://github.com/psiorx/apriltags-pod.git)
 set(apriltags_revision ed2972f01e00d9b5a4afa2612b018374d889641f)
@@ -103,7 +103,7 @@

 set(libmultisense_url https://bitbucket.org/crl/libmultisense)
 set(libmultisense_hg_tag a57026c)
-set(libmultisense_depends opencv-drc)
+set(libmultisense_depends opencv-pod)
 set(libmultisense_external_args
   CMAKE_CACHE_ARGS
     -DCMAKE_PREFIX_PATH:PATH=${CMAKE_INSTALL_PREFIX}
@@ -118,19 +118,18 @@

 set(externals
   Eigen_pod
-  libbot-drc
-  opencv-drc
-  pcl_dep
-  #pcl_drc
+  libbot
+  opencv-pod
+  flann-pod
   pcl
-  octomap-drc
+  octomap-pod
   libmultisense
   multisense-lcm
   occ-map
   common_utils
   frsm
   kinect
-  microstrain_comm
+  microstrain
   fovis
   estimate-pose
   vicon


Find script tweaks

Find script tweaks

[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[ ] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation

--- FindEqualizer.cmake
+++ FindEqualizer.cmake
@@ -76,6 +76,9 @@
 endif()
 if(Equalizer_FIND_VERSION)
   # Matching Collage versions
+  set(_eq_coVersion_ "0.5.0")
+  set(_eq_coVersion_1.3.1 "0.5.0")
+  set(_eq_coVersion_1.3.0 "0.5.0")
   set(_eq_coVersion_1.2.0 "0.4.8")
   set(_eq_coVersion_1.1.7 "0.4.7")
   set(_eq_coVersion_1.1.6 "0.4.1")


Added TSMF debug flag.

Added TSMF debug flag.

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -98,6 +98,7 @@
 option(WITH_DEBUG_CHANNELS "Print channel manager debug messages." ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_CLIPRDR "Print clipboard redirection debug messages" ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_DVC "Print dynamic virtual channel debug messages." ${DEFAULT_DEBUG_OPTION})
+option(WITH_DEBUG_TSMF "Print TSMF virtual channel debug messages." ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_GDI "Print graphics debug messages." ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_KBD "Print keyboard related debug messages." ${DEFAULT_DEBUG_OPTION})
 option(WITH_DEBUG_LICENSE "Print license debug messages." ${DEFAULT_DEBUG_OPTION})


glibc sucks

glibc sucks

--- cmake/Modules/platform.cmake
+++ cmake/Modules/platform.cmake
@@ -43,16 +43,8 @@
 		check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)

 		if(NOT(HAVE_CLOCK_GETTIME))
-			# XXX hack to make this check work
-			set(CMAKE_REQUIRED_DEFINITIONS -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_VERSION=700)
-			check_symbol_exists(clock_gettime time.h HAVE_CLOCK_GETTIME)
-			if(HAVE_CLOCK_GETTIME)
-				# Needed to see it
-				add_definitions(-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_VERSION=700)
-			else()
-				# OS X check
-				check_include_files("mach/mach.h;mach/clock.h" HAVE_MACH_CLOCK_H)
-			endif()
+			# OS X check
+			check_include_files("mach/mach.h;mach/clock.h" HAVE_MACH_CLOCK_H)
 		endif()

 		check_symbol_exists(nanosleep time.h HAVE_NANOSLEEP)
@@ -73,6 +65,24 @@
 	posix_check()
 	if(NOT HAVE_POSIX)
 		windows_check()
+	elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+		# now this is a story all about how
+		# my flags got twisted upside down
+		# and I'd like to take a minute just sit right there
+		# I'll tell why glibc sucks and smells like derriere.
+		#
+		# in man page feature_test_macros(7), of course
+		# they lie and say you only need _XOPEN_SOURCE
+		# cleaning all the flags, and relaxing all cool
+		# and making clean CMakeLists outside the school
+		#
+		# then gcc and cmake spewed a bunch of remarks
+		# about missing prototypes and unknown marks
+		# I read in one little bug that red hat was swine
+		# and said "You're missing the whole point of using #define."
+		set(GLIBC_SUCKS "-D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700")
+		set(CMAKE_REQUIRED_DEFINITIONS ${GLIBC_SUCKS})
+		add_definitions(${GLIBC_SUCKS})
 	endif()

 	test_big_endian(BIG_ENDIAN)


Fix detection of cfitsio from EPEL on CentOS 8

--- cmake/Packages/CFITSIO.cmake
+++ cmake/Packages/CFITSIO.cmake
@@ -22,7 +22,14 @@
     PATHS $ENV{CFITSIOROOT}/include
     NO_DEFAULT_PATH)
   FIND_PATH (CFITSIO_INCLUDE_DIR fitsio.h)
-  GET_FILENAME_COMPONENT (CFITSIOROOT ${CFITSIO_INCLUDE_DIR} PATH)
+  if(CFITSIO_INCLUDE_DIR)
+    GET_FILENAME_COMPONENT (CFITSIOROOT ${CFITSIO_INCLUDE_DIR} PATH)
+  else()
+    FIND_PATH (CFITSIO_INCLUDE_DIR cfitsio/fitsio.h
+      PATHS $ENV{CFITSIOROOT}/include
+      )
+    SET(CFITSIO_INCLUDE_DIR "${CFITSIO_INCLUDE_DIR}/cfitsio")
+  endif()

   SET (CFITSIO_VERSION 0)
   IF (CFITSIO_INCLUDE_DIR)


Fixed scotch for build-specific compilation.

--- cmake/ThirdPartyScotch.cmake
+++ cmake/ThirdPartyScotch.cmake
@@ -1,5 +1,7 @@
-OPTION(NEKTAR_USE_SCOTCH
-    "Use Scotch library for performing mesh partitioning." OFF)
+IF (NOT WIN32)
+    OPTION(NEKTAR_USE_SCOTCH
+        "Use Scotch library for performing mesh partitioning." OFF)
+ENDIF(NOT WIN32)

 CMAKE_DEPENDENT_OPTION(THIRDPARTY_BUILD_SCOTCH
     "Build Scotch library from ThirdParty" OFF
@@ -13,8 +15,11 @@
             MESSAGE(FATAL_ERROR
                 "'flex' lexical parser not found. Cannot build scotch.")
         ENDIF(NOT FLEX)
+        MARK_AS_ADVANCED(FLEX)

-        SET(SCOTCH_SRC ${TPSRC}/src/scotch-6.0.0/src)
+        # Note that scotch is compiled in the source-tree, so we unpack the
+        # source code in the ThirdParty builds directory.
+        SET(SCOTCH_SRC ${TPBUILD}/scotch-6.0.0/src)

         IF (APPLE)
             SET(SCOTCH_MAKE Makefile.inc.i686_mac_darwin8)
@@ -37,17 +42,22 @@
             PREFIX ${TPSRC}
             URL ${TPURL}/scotch_6.0.0.tar.gz
             URL_MD5 "ba117428c0a6cd97d0c93e8b872bb3fe"
+            STAMP_DIR ${TPSRC}/stamp
             DOWNLOAD_DIR ${TPSRC}
+            SOURCE_DIR ${TPBUILD}/scotch-6.0.0
+            BINARY_DIR ${TPBUILD}/scotch-6.0.0
+            TMP_DIR ${TPBUILD}/scotch-6.0.0-tmp
+            INSTALL_DIR ${TPDIST}
             CONFIGURE_COMMAND rm -f ${SCOTCH_SRC}/Makefile.inc
                 COMMAND ln -s
                 ${SCOTCH_SRC}/Make.inc/${SCOTCH_MAKE}
                 ${SCOTCH_SRC}/Makefile.inc
-            BUILD_COMMAND $(MAKE) -C ${TPSRC}/src/scotch-6.0.0/src
+            BUILD_COMMAND $(MAKE) -C ${SCOTCH_SRC}
                 "CFLAGS=${SCOTCH_CFLAGS}"
                 "LDFLAGS=${SCOTCH_LDFLAGS}"
                 "CLIBFLAGS=-fPIC" scotch
-            INSTALL_COMMAND $(MAKE) -C ${TPSRC}/src/scotch-6.0.0/src
-                prefix=${TPSRC}/dist install
+            INSTALL_COMMAND $(MAKE) -C ${SCOTCH_SRC}
+                prefix=${TPDIST} install
         )
         SET(SCOTCH_LIB scotch CACHE FILEPATH
             "Scotch library" FORCE)
@@ -58,9 +68,9 @@
         MARK_AS_ADVANCED(SCOTCH_LIB)
         MARK_AS_ADVANCED(SCOTCHERR_LIB)
         MARK_AS_ADVANCED(SCOTCHMETIS_LIB)
-        LINK_DIRECTORIES(${TPSRC}/dist/lib)
-        INCLUDE_DIRECTORIES(${TPSRC}/dist/include)
-        MESSAGE(STATUS "Build Scotch: ${TPSRC}/dist/lib/lib${SCOTCH_LIB}.a")
+        LINK_DIRECTORIES(${TPDIST}/lib)
+        INCLUDE_DIRECTORIES(${TPDIST}/include)
+        MESSAGE(STATUS "Build Scotch: ${TPDIST}/lib/lib${SCOTCH_LIB}.a")
     ELSE (THIRDPARTY_BUILD_SCOTCH)
         INCLUDE (FindScotch)
     ENDIF (THIRDPARTY_BUILD_SCOTCH)


[cmake] do all warning suppressions via command line

gcc (sometimes) loses diagnostic-ignored pragmas if they are declared in
PCH. the previous approach was to force-include pragma-suppression
header whenever this gcc behaviour causes annoying warnings; however, it
quickly gets out-of-hand. a better approach would be to silence these
warnings down via the command line.

also, added nicely-formatted diagnostics on cmake-configure stage.

--- cmake/axl_std_settings.cmake
+++ cmake/axl_std_settings.cmake
@@ -325,18 +325,70 @@
 			)
 	endif ()

+	# alas, warning suppressions must be passed in command line, not pragma-ed
+	# that is because GCC diagnostic pragmas get lost if defined in precompiled headers
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_DEPRECATED_DECLARATIONS
+		DESCRIPTION "Warn about uses of functions/variables/types marked as deprecated"
+		DEFAULT "-Wno-deprecated-declarations"
+		"-Wdeprecated-declarations" "-Wno-deprecated-declarations"
+		)
+
 	axl_create_compiler_flag_setting (
 		GCC_FLAG_WARNING_MULTICHAR
-		DESCRIPTION "GNU C++ shows warnings if multicharacter constants are used, e.g. 'ABCD'"
+		DESCRIPTION "Warn if a multicharacter constant (‘'FOOF'’) is used"
 		DEFAULT "-Wno-multichar"
 		"-Wmultichar" "-Wno-multichar"
 		)

 	axl_create_compiler_flag_setting (
 		GCC_FLAG_WARNING_FORMAT
-		DESCRIPTION "GNU C++ shows warnings if printf format specifiers mismatch arguments"
+		DESCRIPTION "Check calls to printf/scanf/etc to ensure that the arguments are appropriate to the format string"
 		DEFAULT "-Wno-format"
 		"-Wformat" "-Wno-format"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_CPP_WARNING_INVALID_OFFSETOF
+		DESCRIPTION "Warn about applying the offsetof macro to a non-POD type"
+		DEFAULT "-Wno-invalid-offsetof"
+		"-Winvalid-offsetof" "-Wno-invalid-offsetof"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_CPP_WARNING_NARROWING
+		DESCRIPTION "Warn about narrowing conversions"
+		DEFAULT "-Wno-narrowing"
+		"-Wnarrowing" "-Wno-narrowing"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_DANGLING_ELSE
+		DESCRIPTION "Warn about dangling else without explicit braces"
+		DEFAULT "-Wno-dangling-else"
+		"-Wdangling-else" "-Wno-dangling-else"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_CPP_WARNING_LOGICAL_OP_PARENTHESES
+		DESCRIPTION "Warn about '&&' within '||'"
+		DEFAULT "-Wno-logical-op-parentheses"
+		"-Wlogical-op-parentheses" "-Wno-logical-op-parentheses"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_CPP_WARNING_SWITCH
+		DESCRIPTION "Warn about missing case values in a switch statement"
+		DEFAULT "-Wno-switch"
+		"-Wswitch" "-Wno-switch"
+		)
+
+	axl_create_compiler_flag_setting (
+		GCC_FLAG_WARNING_INCOMPATIBLE_MS_STRUCT
+		DESCRIPTION "Warn about possible layout incompatibilities with MS compilers"
+		DEFAULT "-Wno-incompatible-ms-struct"
+		"-Wincompatible-ms-struct" "-Wno-incompatible-ms-struct"
 		)
 endmacro ()

@@ -404,6 +456,26 @@
 endmacro ()

 macro (
+axl_cleanup_compiler_flags
+	_FLAGS
+	_WARNING_FLAG_LIST
+	)
+
+	string (REPLACE " " ";" _FLAG_LIST "${${_FLAGS}}")
+	list (REMOVE_DUPLICATES _FLAG_LIST)
+
+	foreach (_FLAG ${_FLAG_LIST})
+		if (_FLAG MATCHES "-W[a-z-]+")
+			list (APPEND ${_WARNING_FLAG_LIST} ${_FLAG})
+			list (REMOVE_ITEM _FLAG_LIST ${_FLAG})
+		endif ()
+	endforeach ()
+
+	string (REPLACE ";" " " ${_FLAGS} "${_FLAG_LIST}")
+	string (STRIP "${${_FLAGS}}" ${_FLAGS})
+endmacro ()
+
+macro (
 axl_print_std_settings)

 	string (LENGTH ".......................:" AXL_G_MESSAGE_ALIGN)
@@ -426,19 +498,34 @@
 		axl_message ("    Build configuration:" ${CMAKE_BUILD_TYPE})
 	endif ()

-	string (STRIP "${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}" _C_FLAGS_DEBUG)
-	string (STRIP "${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}" _C_FLAGS_RELEASE)
-	string (STRIP "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}" _CXX_FLAGS_DEBUG)
-	string (STRIP "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}" _CXX_FLAGS_RELEASE)
+	set (_C_FLAGS_DEBUG "${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
+	set (_C_FLAGS_RELEASE "${CMAKE_C_COMPILER_ARG1} ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
+	set (_CXX_FLAGS_DEBUG "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
+	set (_CXX_FLAGS_RELEASE "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
+	set (_WARNING_FLAG_LIST)
+
+	axl_cleanup_compiler_flags (_C_FLAGS_DEBUG _WARNING_FLAG_LIST)
+	axl_cleanup_compiler_flags (_C_FLAGS_RELEASE _WARNING_FLAG_LIST)
+	axl_cleanup_compiler_flags (_CXX_FLAGS_DEBUG _WARNING_FLAG_LIST)
+	axl_cleanup_compiler_flags (_CXX_FLAGS_RELEASE _WARNING_FLAG_LIST)

 	message (STATUS "C/C++:")
 	axl_message ("    C Compiler:"          ${CMAKE_C_COMPILER})
-	axl_message ("    C flags (Debug):"     ${_C_FLAGS_DEBUG})
+	axl_message ("    C flags (Debug):"     "'${_C_FLAGS_DEBUG}'")
 	axl_message ("    C flags (Release):"   ${_C_FLAGS_RELEASE})
 	axl_message ("    C++ Compiler:"        ${CMAKE_CXX_COMPILER})
 	axl_message ("    C++ flags (Debug):"   ${_CXX_FLAGS_DEBUG})
 	axl_message ("    C++ flags (Release):" ${_CXX_FLAGS_RELEASE})

+	if (_WARNING_FLAG_LIST)
+		message (STATUS "    C/C++ warning flags:")
+
+		list (REMOVE_DUPLICATES _WARNING_FLAG_LIST)
+		foreach (_FLAG ${_WARNING_FLAG_LIST})
+			axl_message ("        ${_FLAG}")
+		endforeach ()
+	endif ()
+
 	get_directory_property (_CXX_DEFINITIONS COMPILE_DEFINITIONS)

 	if (_CXX_DEFINITIONS)


Drop relative install location variables, which are now no longer used.

Change install location for man pages from prefix/man to prefix/share/man.
(Thanks to Orion Poplawski for noticing this variance with the FHS standard.)

svn path=/trunk/; revision=7153

--- cmake/modules/instdirs.cmake
+++ cmake/modules/instdirs.cmake
@@ -22,40 +22,31 @@
 # Relative and absolute install locations.

 # Data.
-set(DATA_INSTALL_DIR share/${PACKAGE}${VERSION})
-set(DATA_DIR ${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR})
+set(DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE}${VERSION})

 # Libraries.
-set(LIB_INSTALL_DIR lib)
-set(LIB_DIR ${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR})
+set(LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib)

 # Headers.
-set(INCLUDE_INSTALL_DIR include/${PACKAGE})
-set(INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/${INCLUDE_INSTALL_DIR})
+set(INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include/${PACKAGE})

 # Binaries.
-set(BIN_INSTALL_DIR bin)
-set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/${BIN_INSTALL_DIR})
+set(BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)

 # Tcl files.
-set(TCL_INSTALL_DIR ${DATA_INSTALL_DIR}/tcl)
-set(TCL_DIR ${CMAKE_INSTALL_PREFIX}/${TCL_INSTALL_DIR})
+set(TCL_DIR ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE}${VERSION}/tcl)

 # Drivers.
-set(DRV_INSTALL_DIR ${LIB_INSTALL_DIR}/${PACKAGE}${VERSION}/drivers${LIB_TAG})
-set(DRV_DIR ${CMAKE_INSTALL_PREFIX}/${DRV_INSTALL_DIR})
+set(DRV_DIR ${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE}${VERSION}/drivers${LIB_TAG})

 # Documentation.
-set(DOC_INSTALL_DIR share/doc/${PACKAGE})
-set(DOC_DIR ${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR})
+set(DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/${PACKAGE})

 # Man pages.
-set(MAN_INSTALL_DIR man)
-set(MAN_DIR ${CMAKE_INSTALL_PREFIX}/${MAN_INSTALL_DIR})
+set(MAN_DIR ${CMAKE_INSTALL_PREFIX}/share/man)

 # Info pages.
-set(INFO_INSTALL_DIR share/info)
-set(INFO_DIR ${CMAKE_INSTALL_PREFIX}/${INFO_INSTALL_DIR})
+set(INFO_DIR ${CMAKE_INSTALL_PREFIX}/share/info)

 # Other path-related variables.


Removed unused flags

Removed unused flags

--- cmake/platforms/Darwin.cmake
+++ cmake/platforms/Darwin.cmake
@@ -9,11 +9,11 @@
 # (std::type_infos representing the same template type do not compare equal,
 # introducing subtle bugs)
 # IMPORTANT: DO NOT ADD THIS FLAG WITH STATIC LINKING
-string_append(CMAKE_EXE_LINKER_FLAGS "-Wl,-E")
+string_append(CMAKE_EXE_LINKER_FLAGS "-Wl")

 # Forbid undefined symbols at link time (shared libraries and executables)
-string_append(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined")
-string_append(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-undefined")
+string_append(CMAKE_SHARED_LINKER_FLAGS "-Wl")
+string_append(CMAKE_EXE_LINKER_FLAGS "-Wl")

 # Link with the loader library
 #list(APPEND SYSLIBS dl)


Add dependency on .clang-format in cmake

--- cmake/ClangFormat.cmake
+++ cmake/ClangFormat.cmake
@@ -14,6 +14,11 @@
 message(STATUS "Found clang-format at ${CLANG_FORMAT_PROGRAM}")
 add_custom_target(format VERBATIM)
 add_custom_target(reformat VERBATIM)
+
+file(GLOB_RECURSE CLANG_FORMAT_PATHS CONFIGURE_DEPENDS "*.clang-format")
+foreach(PATH ${CLANG_FORMAT_PATHS})
+    message(STATUS "Found .clang-format at ${PATH}")
+endforeach()

 function(format TARGET)
     list(APPEND TOUCH_PATHS)
@@ -33,7 +38,7 @@
             OUTPUT "${FULL_TOUCH_PATH}"
             COMMAND "${CLANG_FORMAT_PROGRAM}" -i -style=file "${SOURCE_FILE}"
             COMMAND "${CMAKE_COMMAND}" -E touch "${FULL_TOUCH_PATH}"
-            DEPENDS "${FULL_SOURCE_PATH}"
+            DEPENDS "${FULL_SOURCE_PATH}" ${CLANG_FORMAT_PATHS}
             COMMENT "${SOURCE_FILE}"
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
         )


Reverte this changes which was not sense

svn path=/trunk/kdesupport/strigi/; revision=903641

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -26,7 +26,6 @@
   /usr/local/lib${LIB_SUFFIX}
   /opt/local/lib${LIB_SUFFIX}
   /usr/lib${LIB_SUFFIX}
-  /usr/lib64${LIB_SUFFIX}
   /sw/lib${LIB_SUFFIX}
   /usr/pkg/lib${LIB_SUFFIX}
   )


Detect custom GMP and MPFR for FastJet

Detect custom GMP and MPFR for FastJet

--- cmake/FindFASTJET.cmake
+++ cmake/FindFASTJET.cmake
@@ -123,6 +123,52 @@
             message(WARNING "FastJet was compiled witouth CGAL")
         endif(fastjetcgal GREATER -1)

+        # GMP for FastJet
+        list(FIND FASTJET_LIBS "gmp" fastjetgmp)
+        if(fastjetgmp GREATER -1)
+            message(STATUS "FastJet was compiled with GMP")
+            # FastJet was compiled with GMP. We need GMP.
+            if(GMP)
+                find_library(GMP_LIB "gmpxx" "${GMP}/lib" NO_DEFAULT_PATH)
+                if(NOT GMP_LIB)
+                    message(FATAL_ERROR "GMP not found under the given location")
+                endif()
+                message(STATUS "GMP found in ${GMP}")
+                list(APPEND FASTJET_LIBS_DIR ${GMP}/lib)
+            else(GMP)
+                # Attempt to use system's GMP
+                find_library(GMP_LIB "gmpxx")
+                if(NOT GMP_LIB)
+                    message(FATAL_ERROR "GMP not installed: install it or specify a custom one with -DGMP")
+                endif()
+            endif(GMP)
+        else()
+            message(WARNING "FastJet was compiled witouth GMP")
+        endif(fastjetgmp GREATER -1)
+
+        # MPFR for FastJet
+        list(FIND FASTJET_LIBS "mpfr" fastjetmpfr)
+        if(fastjetmpfr GREATER -1)
+            message(STATUS "FastJet was compiled with MPFR")
+            # FastJet was compiled with MPFR. We need MPFR.
+            if(MPFR)
+                find_library(MPFR_LIB "mpfr" "${MPFR}/lib" NO_DEFAULT_PATH)
+                if(NOT MPFR_LIB)
+                    message(FATAL_ERROR "MPFR not found under the given location")
+                endif()
+                message(STATUS "MPFR found in ${MPFR}")
+                list(APPEND FASTJET_LIBS_DIR ${MPFR}/lib)
+            else(MPFR)
+                # Attempt to use system's MPFR
+                find_library(MPFR_LIB "mpfr")
+                if(NOT MPFR_LIB)
+                    message(FATAL_ERROR "MPFR not installed: install it or specify a custom one with -DMPFR")
+                endif()
+            endif(MPFR)
+        else()
+            message(WARNING "FastJet was compiled witouth MPFR")
+        endif(fastjetmpfr GREATER -1)
+
         # Extract library paths used by FastJet to find needed libs: (LIST)
         string(REGEX MATCHALL "(^| )-L[^ ]+" fjlibdirs ${FASTJET_CONFIGLIBS})
         foreach(fjlibdir ${fjlibdirs})


Finalize Nuget Openssl detection

Finalize Nuget Openssl detection

--- cmake/FindOpenSSL.cmake
+++ cmake/FindOpenSSL.cmake
@@ -77,16 +77,17 @@
   endif()
   if (OPENSSL_ROOT_DIR AND NUGET)
     message("Found nuGET installation of OpenSSL!")
+    set(SSL_BITS "x64")
     # its an openssl downloaded via nuget!
     set(OPENSSL_INCLUDE "${OPENSSL_ROOT_DIR}/build/native/include")
     set(_OPENSSL_ROOT_HINTS "${OPENSSL_ROOT_DIR}/build/native/include")

-    set(OPENSSL_LIB_DIR "${OPENSSL_ROOT_DIR}/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/x64/release/")
+    set(OPENSSL_LIB_DIR "${OPENSSL_ROOT_DIR}/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/${SSL_BITS}")
     set(_OPENSSL_ROOT_HINTS "${OPENSSL_ROOT_DIR}/build/native/include")

     set(_OPENSSL_ROOT_PATHS
       "${OPENSSL_ROOT_DIR}/build/native/include"
-      "${OPENSSL_ROOT_DIR}/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/x64/release/")
+      "${OPENSSL_ROOT_DIR}/lib/native/v140/windesktop/msvcstl/dyn/rt-dyn/${SSL_BITS}/")
   else()
     # http://www.slproweb.com/products/Win32OpenSSL.html
     set(_OPENSSL_ROOT_HINTS
@@ -129,7 +130,64 @@
 )

 if(WIN32 AND NOT CYGWIN)
-  if(MSVC)
+  if (NUGET)
+    # /MD and /MDd are the standard values - if someone wants to use
+    # others, the libnames have to change here too
+    # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b
+    # enable OPENSSL_MSVC_STATIC_RT to get the libs build /MT (Multithreaded no-DLL)
+    # In Visual C++ naming convention each of these four kinds of Windows libraries has it's standard suffix:
+    #   * MD for dynamic-release
+    #   * MDd for dynamic-debug
+    #   * MT for static-release
+    #   * MTd for static-debug
+
+    # Implementation details:
+    # We are using the libraries located in the VC subdir instead of the parent directory eventhough :
+    # libeay32MD.lib is identical to ../libeay32.lib, and
+    # ssleay32MD.lib is identical to ../ssleay32.lib
+    # enable OPENSSL_USE_STATIC_LIBS to use the static libs located in lib/VC/static
+
+    if (OPENSSL_MSVC_STATIC_RT)
+      set(_OPENSSL_MSVC_RT_MODE "MT")
+    else ()
+      set(_OPENSSL_MSVC_RT_MODE "MD")
+    endif ()
+
+    set(LIB_EAY_DEBUG LIB_EAY_DEBUG-NOTFOUND)
+    if (EXISTS "${OPENSSL_LIB_DIR}/debug/libeay32.lib")
+      set(LIB_EAY_DEBUG "${OPENSSL_LIB_DIR}/debug/libeay32.lib")
+    endif()
+
+    set(LIB_EAY_RELEASE LIB_EAY_RELEASE-NOTFOUND)
+    if (EXISTS "${OPENSSL_LIB_DIR}/release/libeay32.lib")
+      set(LIB_EAY_RELEASE "${OPENSSL_LIB_DIR}/release/libeay32.lib")
+    endif()
+
+    set(SSL_EAY_DEBUG SSL_EAY_DEBUG-NOTFOUND)
+    if (EXISTS "${OPENSSL_LIB_DIR}/debug/ssleay32.lib")
+      set(SSL_EAY_DEBUG "${OPENSSL_LIB_DIR}/debug/ssleay32.lib")
+    endif()
+
+    set(SSL_EAY_RELEASE SSL_EAY_RELEASE-NOTFOUND)
+    if (EXISTS "${OPENSSL_LIB_DIR}/release/ssleay32.lib")
+      set(SSL_EAY_RELEASE "${OPENSSL_LIB_DIR}/release/ssleay32.lib")
+    endif()
+
+    set(LIB_EAY_LIBRARY_DEBUG "${LIB_EAY_DEBUG}")
+    set(LIB_EAY_LIBRARY_RELEASE "${LIB_EAY_RELEASE}")
+    set(SSL_EAY_LIBRARY_DEBUG "${SSL_EAY_DEBUG}")
+    set(SSL_EAY_LIBRARY_RELEASE "${SSL_EAY_RELEASE}")
+
+    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+    select_library_configurations(LIB_EAY)
+    select_library_configurations(SSL_EAY)
+
+    mark_as_advanced(LIB_EAY_LIBRARY_DEBUG LIB_EAY_LIBRARY_RELEASE
+                     SSL_EAY_LIBRARY_DEBUG SSL_EAY_LIBRARY_RELEASE)
+    set(OPENSSL_SSL_LIBRARY ${SSL_EAY_LIBRARY} )
+    set(OPENSSL_CRYPTO_LIBRARY ${LIB_EAY_LIBRARY} )
+    set(OPENSSL_LIBRARIES ${SSL_EAY_LIBRARY} ${LIB_EAY_LIBRARY} )
+  elseif(MSVC)
     # /MD and /MDd are the standard values - if someone wants to use
     # others, the libnames have to change here too
     # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b


Bug 493 : multiple calls to FindUmfPack (transplanted from 35ee747575143155b8ef538c0c0b30d0cf0894a3)

--- cmake/FindUmfpack.cmake
+++ cmake/FindUmfpack.cmake
@@ -19,8 +19,9 @@
 find_library(UMFPACK_LIBRARIES umfpack PATHS $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})

 if(UMFPACK_LIBRARIES)
-
-  get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)
+  if (NOT UMFPACK_LIBDIR)
+    get_filename_component(UMFPACK_LIBDIR ${UMFPACK_LIBRARIES} PATH)
+  endif(NOT UMFPACK_LIBDIR)

   find_library(AMD_LIBRARY amd PATHS ${UMFPACK_LIBDIR} $ENV{UMFPACKDIR} ${LIB_INSTALL_DIR})
   if (AMD_LIBRARY)


Swig version 1.3.35 (provided by Ubuntu 8.10) is also good enough for the Lua bindings.

svn path=/trunk/; revision=9674

--- cmake/modules/lua.cmake
+++ cmake/modules/lua.cmake
@@ -41,7 +41,7 @@
 endif(ENABLE_lua AND NOT SWIG_FOUND)

 if(ENABLE_lua)
-  transform_version(NUMERICAL_SWIG_MINIMUM_VERSION_FOR_LUA "1.3.36")
+  transform_version(NUMERICAL_SWIG_MINIMUM_VERSION_FOR_LUA "1.3.35")
   transform_version(NUMERICAL_SWIG_VERSION "${SWIG_VERSION}")
   if(NUMERICAL_SWIG_VERSION LESS "${NUMERICAL_SWIG_MINIMUM_VERSION_FOR_LUA}")
     message(STATUS "WARNING: swig version too old for Lua bindings.   Disabling Lua bindings.")


stgz_shortcuts exists but does nothing on windows.

	* build-aux/cmake/modules/CPackSTGZShortcuts.cmake: Do that.

--- build-aux/cmake/modules/CPackSTGZShortcuts.cmake
+++ build-aux/cmake/modules/CPackSTGZShortcuts.cmake
@@ -21,44 +21,45 @@
 ## For any other OS, simply run ``make package''.
 ##

+if(NOT COMMAND STGZ_SHORTCUTS)
+
 include(Dirs)

-## I want CPACK_PACKAGE_FILE_NAME for binary package, not for source package :(
-include(${CMAKE_BINARY_DIR}/CPackConfig.cmake)
-
-if(UNIX AND NOT WIN32 AND NOT STGZ_SHORTCUTS)
-macro(STGZ_SHORTCUTS)
+function(STGZ_SHORTCUTS)
   parse_arguments(
     "STGZ_SHORTCUTS"
     "DATA_DIR;FILE_EXTENSION;MIME"
     "DESKTOP;MENU"
     ${ARGN})

-  set(STGZ_XDG_FILENAME
+  if(UNIX AND NOT WIN32)
+    set(STGZ_XDG_FILENAME
       "${GOSTAI}-${PROJECT_NAME}"
       )

-  configure_file(
-    ${CMAKE_MODULE_PATH}/create_shortcut.sh.in
-    ${CMAKE_BINARY_DIR}/create_shortcut.sh
-    @ONLY
-    )
-  configure_file(
-    ${CMAKE_MODULE_PATH}/CPackSTGZShortcuts.patch.in
-    ${CMAKE_BINARY_DIR}/CPackSTGZShortcuts.patch
-    @ONLY
-    )
+    configure_file(
+      ${CMAKE_MODULE_PATH}/create_shortcut.sh.in
+      ${CMAKE_BINARY_DIR}/create_shortcut.sh
+      @ONLY
+      )
+    configure_file(
+      ${CMAKE_MODULE_PATH}/CPackSTGZShortcuts.patch.in
+      ${CMAKE_BINARY_DIR}/CPackSTGZShortcuts.patch
+      @ONLY
+      )

-  add_custom_target(package_linux
-    COMMAND $(MAKE) package
-    COMMAND patch -i CPackSTGZShortcuts.patch
-    )
-  install(PROGRAMS ${CMAKE_BINARY_DIR}/create_shortcut.sh
-    DESTINATION ${DATA_DIR}
-    )
-  install(FILES "${STGZ_SHORTCUTS_DATA_DIR}/${STGZ_XDG_FILENAME}.png"
-    DESTINATION ${DATA_DIR}
-    )
+    add_custom_target(package_linux
+      COMMAND $(MAKE) package
+      COMMAND patch -i CPackSTGZShortcuts.patch
+      )
+    install(PROGRAMS ${CMAKE_BINARY_DIR}/create_shortcut.sh
+      DESTINATION ${DATA_DIR}
+      )
+    install(FILES "${STGZ_SHORTCUTS_DATA_DIR}/${STGZ_XDG_FILENAME}.png"
+      DESTINATION ${DATA_DIR}
+      )
+  endif(UNIX AND NOT WIN32)

-endmacro(STGZ_SHORTCUTS)
-endif(UNIX AND NOT WIN32 AND NOT STGZ_SHORTCUTS)
+endfunction(STGZ_SHORTCUTS)
+
+endif(NOT COMMAND STGZ_SHORTCUTS)


Adding download log output

Adding download log output

Download logs are now written to ${TEMP}/download.log, to aid in
debugging when node-cmake reports errors. This file will only persist
for a single execution, so be sure to save it to another location
between runs, if necessary.

--- NodeJS.cmake
+++ NodeJS.cmake
@@ -32,10 +32,15 @@
 # Download with a bit of nice output (without spewing progress)
 function(download_file URL)
     message(STATUS "Downloading: ${URL}")
+    file(APPEND ${TEMP}/download.log "Downloading: ${URL}\n")
+    file(APPEND ${TEMP}/download.log "----------------------------------------\n")
     file(DOWNLOAD
         ${URL}
         ${ARGN}
+        LOG DOWNLOAD_LOG
     )
+    file(APPEND ${TEMP}/download.log ${DOWNLOAD_LOG})
+    file(APPEND ${TEMP}/download.log "----------------------------------------\n")
 endfunction()

 # Embedded win_delay_load_hook file so that this file can be copied


Add test labels automatically in CommonCPPCTest

Set the test labels on the generated tests according to the value of the
variable TEST_LABEL and optionally an additional ${NAME}_TEST_LABEL
variable. If both variables are defined, both labels are added.

--- CommonCPPCTest.cmake
+++ CommonCPPCTest.cmake
@@ -12,6 +12,8 @@
 # * For each test ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS can be
 #   set to customise the actual test command, supplying a prefix command
 #   and additional arguments to follow the test executable.
+# * TEST_LABEL sets the LABEL property on each generated test;
+#   ${NAME}_TEST_LABEL specifies an additional label.

 if(NOT WIN32) # tests want to be with DLLs on Windows - no rpath
   set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
@@ -54,6 +56,12 @@
   # Per target test command customisation with
   # ${NAME}_TEST_PREFIX and ${NAME}_TEST_ARGS
   add_test(${NAME} ${${NAME}_TEST_PREFIX} ${EXECUTABLE} ${${NAME}_TEST_ARGS})
+
+  # Add test labels
+  set(TEST_LABELS ${TEST_LABEL} ${${NAME}_TEST_LABEL})
+  if (TEST_LABELS)
+    set_tests_properties(${NAME} PROPERTIES LABELS "${TEST_LABELS}")
+  endif()
 endforeach()

 add_custom_target(run_cpp_tests


Fixed dyninst check

Fixed dyninst check

--- DyninstInstall.cmake
+++ DyninstInstall.cmake
@@ -55,7 +55,7 @@
 endif(NOT DEFINED LIBDWARF_INCLUDE)

 ## Check if existing dyninst install was passed
-if (NOT DEFINED ${DYNINST_ROOT})
+if (NOT DEFINED DYNINST_ROOT)
 	message(INFO " DYNINST_ROOT not set, compiling dyninst from source")
 	ExternalProject_Add(
   		dyninst
@@ -68,9 +68,9 @@
   		UPDATE_COMMAND ""
 	)
 	set(DYNINST_ROOT "${CMAKE_INSTALL_PREFIX}")
-else (NOT DEFINED ${DYNINST_ROOT})
+else (NOT DEFINED DYNINST_ROOT)
 	add_custom_target(dyninst)
-endif(NOT DEFINED ${DYNINST_ROOT})
+endif(NOT DEFINED DYNINST_ROOT)
 get_filename_component(LIBELF_DIR "${LIBELF_LIBFILE}" DIRECTORY)
 get_filename_component(LIBDWARF_DIR "${LIBDWARF_LIBFILE}" DIRECTORY)
 set(DYNINST_LIBRARY_DIR "-L${DYNINST_ROOT}/lib")


Improved Findcppnetlib.cmake

Improved Findcppnetlib.cmake

--- Findcppnetlib.cmake
+++ Findcppnetlib.cmake
@@ -1,65 +1,98 @@
-# _____________________________________________________________________________
 #
-# CPP-NETLIB
-# _____________________________________________________________________________
+# Copyright 2015 Grigori Chevtchenko <grigori.chevtchenko@epfl.ch>
+#
+# 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 name of Eyescale Software GmbH nor the names of its
+# 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
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# =============================================================================
+#
+# CPPNETLIB
+#
+#==============================================================================
+# This module uses the following input variables:
+#
+# CPPNETLIB_ROOT - Path to the cpp-netlib module
+#
+# This module defines the following output variables:
+#
+# CPPNETLIB_FOUND - Was cppnetlib and all of the specified components found?
+#
+# CPPNETLIB_INCLUDE_DIRS - Where to find the headers
+#
+# CPPNETLIB_LIBRARIES - The cppnetlib libraries
+#==============================================================================
+#

 # Assume not found.
 SET(CPPNETLIB_FOUND FALSE)

 # PATH ________________________________________________________________________

-if (CPPNETLIB_PATH)
-    # Set by user...
-else (CPPNETLIB_PATH)
+if(NOT CPPNETLIB_PATH)
     find_path(CPPNETLIB_PATH include/boost/network.hpp
-	HINTS ${CPP_NETLIB_ROOT} $ENV{CPP_NETLIB_ROOT}
+	HINTS ${CPPNETLIB_ROOT} $ENV{CPPNETLIB_ROOT}
         /usr/local/
         /usr/
     )
-endif (CPPNETLIB_PATH)
+endif ()

-message(**************************** cppnetlib path: ${CPPNETLIB_PATH} **************************)
+# HEADERS AND DYNAMIC LIBRARIES_________________________________________________

-if (CPPNETLIB_PATH)
-    set (CPPNETLIB_FOUND TRUE)
-endif (CPPNETLIB_PATH)
-
-# HEADERS _____________________________________________________________________
-
-if (CPPNETLIB_FOUND)
+if(CPPNETLIB_PATH)
     set (CPPNETLIB_INCLUDE_DIR ${CPPNETLIB_PATH}/include)
     mark_as_advanced (CPPNETLIB_INCLUDE_DIR)
-endif (CPPNETLIB_FOUND)

-message(**************************** cppnetlib include path: ${CPPNETLIB_INCLUDE_DIR} **************************)
-
-# DINAMYIC LIBRARY ______________________________________________________________
-
-if (CPPNETLIB_FOUND)
     find_library(CPPNETLIB_LIBRARY1 NAMES cppnetlib-client-connections
 	HINTS ${CPPNETLIB_ROOT} $ENV{CPPNETLIB_ROOT}
-        PATHS ${CPPNETLIB_PATH}/lib64
+        PATHS ${CPPNETLIB_PATH}/lib64 ${CPPNETLIB_PATH}/lib
     )
     find_library(CPPNETLIB_LIBRARY2 NAMES cppnetlib-server-parsers
         HINTS ${CPPNETLIB_ROOT} $ENV{CPPNETLIB_ROOT}
-        PATHS ${CPPNETLIB_PATH}/lib64
+        PATHS ${CPPNETLIB_PATH}/lib64 ${CPPNETLIB_PATH}/lib
     )
     find_library(CPPNETLIB_LIBRARY3 NAMES cppnetlib-uri
         HINTS ${CPPNETLIB_ROOT} $ENV{CPPNETLIB_ROOT}
-        PATHS ${CPPNETLIB_PATH}/lib64
+        PATHS ${CPPNETLIB_PATH}/lib64 ${CPPNETLIB_PATH}/lib
     )
     SET(CPPNETLIB_LIBRARIES ${CPPNETLIB_LIBRARY1} ${CPPNETLIB_LIBRARY2} ${CPPNETLIB_LIBRARY3})
     mark_as_advanced(CPPNETLIB_LIBRARIES)
-endif (CPPNETLIB_FOUND)
+endif()

 # FOUND _______________________________________________________________________
-if(CPPNETLIB_FOUND)
-    message(STATUS
-      "Found cpp-netlib in ${CPPNETLIB_INCLUDE_DIR};${CPPNETLIB_LIBRARIES}")
+if(CPPNETLIB_FIND_REQUIRED)
+    set(_cppnetlib_output 1)
+else()
+    if(NOT CPPNETLIB_FIND_QUIETLY)
+        set(_cppnetlib_output 1)
+    endif()
 endif()

-if (NOT CPPNETLIB_FOUND)
-   if (CPPNETLIB_FIND_REQUIRED)
-      message(FATAL_ERROR "Could not find cpp-netlib")
-   endif (CPPNETLIB_FIND_REQUIRED)
-endif (NOT CPPNETLIB_FOUND)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(CPPNETLIB DEFAULT_MSG CPPNETLIB_LIBRARIES CPPNETLIB_INCLUDE_DIR)
+
+set(CPPNETLIB_INCLUDE_DIRS ${CPPNETLIB_INCLUDE_DIR})
+
+if(CPPNETLIB_FOUND AND _cppnetlib_output )
+    message(STATUS "Found cpp-netlib in ${CPPNETLIB_INCLUDE_DIR};${CPPNETLIB_LIBRARIES}")
+endif()


removed OldCMakeLists.cmkae

removed OldCMakeLists.cmkae

--- OldCMakeLists.cmake
+++ OldCMakeLists.cmake
@@ -1,246 +0,0 @@
-# cmake global
-cmake_minimum_required(VERSION 3.0.0)
-
-# Figure out environment.
-set(ETH_CMAKE_DIR   "${CMAKE_CURRENT_LIST_DIR}/../cpp-ethereum-cmake"   CACHE PATH "The path to the cmake directory")
-list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})
-
-# set cmake_policies
-include(EthPolicy)
-eth_policy()
-
-# project name and version should be set after cmake_policy CMP0048
-project(ethereum VERSION "0.9.91")
-
-set(CMAKE_AUTOMOC ON)
-
-if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
-	set(CMAKE_BUILD_TYPE ${D_CMAKE_BUILD_TYPE})
-endif ()
-
-
-
-		#add_definitions(-DETH_ETHASHCL)
-	#endif()
-
-	#if (EVMJIT)
-		#add_definitions(-DETH_EVMJIT)
-	#endif()
-
-	#if (CPUID_FOUND)
-		#add_definitions(-DETH_CPUID)
-	#endif()
-
-	#if (CURL_FOUND)
-		#add_definitions(-DETH_CURL)
-	#endif()
-
-
-
-endfunction()
-
-set(CPPETHEREUM 1)
-
-function(createBuildInfo)
-	# Set build platform; to be written to BuildInfo.h
-	set(ETH_BUILD_PLATFORM "${TARGET_PLATFORM}")
-	if (CMAKE_COMPILER_IS_MINGW)
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/mingw")
-	elseif (CMAKE_COMPILER_IS_MSYS)
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/msys")
-	elseif (CMAKE_COMPILER_IS_GNUCXX)
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/g++")
-	elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/msvc")
-	elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/clang")
-	else ()
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/unknown")
-	endif ()
-
-	if (EVMJIT)
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/JIT")
-	else ()
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/int")
-	endif ()
-
-	if (PARANOID)
-		set(ETH_BUILD_PLATFORM "${ETH_BUILD_PLATFORM}/PARA")
-	endif ()
-
-	#cmake build type may be not specified when using msvc
-	if (CMAKE_BUILD_TYPE)
-		set(_cmake_build_type ${CMAKE_BUILD_TYPE})
-	else()
-		set(_cmake_build_type "${CMAKE_CFG_INTDIR}")
-	endif()
-
-	message("createBuildInfo()")
-
-	# Generate header file containing useful build information
-	if (FATDB)
-		set(FATDB10 1)
-	else()
-		set(FATDB10 0)
-	endif()
-	add_custom_target(BuildInfo.h ALL
-		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-		COMMAND ${CMAKE_COMMAND} -DETH_SOURCE_DIR="${CMAKE_SOURCE_DIR}" -DETH_DST_DIR="${CMAKE_BINARY_DIR}"
-			-DETH_BUILD_TYPE="${_cmake_build_type}" -DETH_BUILD_PLATFORM="${ETH_BUILD_PLATFORM}" -DETH_CMAKE_DIR="${ETH_CMAKE_DIR}"
-			-DPROJECT_VERSION="${PROJECT_VERSION}" -DETH_FATDB="${FATDB10}"
-			-P "${ETH_SCRIPTS_DIR}/buildinfo.cmake"
-		)
-	include_directories(${CMAKE_CURRENT_BINARY_DIR})
-
-	set(CMAKE_INCLUDE_CURRENT_DIR ON)
-	set(SRC_LIST BuildInfo.h)
-endfunction()
-
-######################################################################################################
-
-# Force chromium.
-set (ETH_HAVE_WEBENGINE 1)
-
-# Backwards compatibility
-if (HEADLESS)
-	message("*** WARNING: -DHEADLESS=1 option is DEPRECATED! Use -DBUNDLE=minimal or -DGUI=0")
-	set(GUI OFF)
-endif ()
-
-
-
-
-# Default CMAKE_BUILD_TYPE accordingly.
-set(CMAKE_BUILD_TYPE CACHE STRING ${D_CMAKE_BUILD_TYPE})
-
-# Default TARGET_PLATFORM to ${CMAKE_SYSTEM_NAME}
-# change this once we support cross compiling
-set(TARGET_PLATFORM CACHE STRING ${CMAKE_SYSTEM_NAME})
-if ("x${TARGET_PLATFORM}" STREQUAL "x")
-	set(TARGET_PLATFORM ${CMAKE_SYSTEM_NAME})
-endif ()
-
-include(EthDependencies)
-
-configureProject()
-
-
-
-include(EthCompilerSettings)
-message("-- CXXFLAGS: ${CMAKE_CXX_FLAGS}")
-
-# this must be an include, as a function it would mess up with variable scope!
-include(EthExecutableHelper)
-
-message("creating build info...")
-createBuildInfo()
-
-if (ROCKSDB AND ROCKSDB_FOUND)
-	set(DB_INCLUDE_DIRS ${ROCKSDB_INCLUDE_DIRS})
-	set(DB_LIBRARIES ${ROCKSDB_LIBRARIES})
-	add_definitions(-DETH_ROCKSDB)
-else()
-	set(DB_INCLUDE_DIRS ${LEVELDB_INCLUDE_DIRS})
-	set(DB_LIBRARIES ${LEVELDB_LIBRARIES})
-endif()
-
-
-if (TOOLS OR GUI OR TESTS)
-	set(GENERAL 1)
-else ()
-	set(GENERAL 0)
-endif ()
-
-add_subdirectory(libdevcore)
-if (GENERAL)
-	add_subdirectory(libevmcore)
-	add_subdirectory(libevmasm)
-	add_subdirectory(liblll)
-endif ()
-
-if (SERPENT)
-	add_subdirectory(libserpent)
-	add_subdirectory(sc)
-endif ()
-
-if (TOOLS)
-	add_subdirectory(lllc)
-endif ()
-
-if (JSCONSOLE)
-	add_subdirectory(libjsengine)
-	add_subdirectory(libjsconsole)
-endif ()
-
-if (NOT WIN32)
-	add_definitions(-DETH_HAVE_SECP256K1)
-	add_subdirectory(secp256k1)
-endif ()
-
-add_subdirectory(libscrypt)
-add_subdirectory(libdevcrypto)
-add_subdirectory(libnatspec)
-
-if (GENERAL)
-	add_subdirectory(libp2p)
-endif ()
-
-if (GENERAL OR MINER)
-	add_subdirectory(libethash)
-	if (ETHASHCL)
-		add_subdirectory(libethash-cl)
-	endif ()
-endif ()
-
-add_subdirectory(libethcore)
-
-if (GENERAL)
-	add_subdirectory(libevm)
-	add_subdirectory(libethereum)
-endif ()
-
-if (MINER OR TOOLS)
-	add_subdirectory(ethminer)
-endif ()
-
-if (ETHKEY OR TOOLS)
-	add_subdirectory(ethkey)
-endif ()
-
-# TODO: sort out tests so they're not dependent on webthree/web3jsonrpc and reenable
-#if (TESTS)
-	add_subdirectory(libtestutils)
-	add_subdirectory(test)
-#endif ()
-
-if (TOOLS)
-
-	add_subdirectory(rlp)
-	add_subdirectory(abi)
-	add_subdirectory(ethvm)
-
-#	if("x${CMAKE_BUILD_TYPE}" STREQUAL "xDebug")
-#		add_subdirectory(exp)
-#	endif ()
-
-endif()
-
-# Optional sub-projects
-if (EXISTS "${CMAKE_SOURCE_DIR}/solidity/CMakeLists.txt")
-	add_subdirectory(solidity)
-endif()
-
-if (EXISTS "${CMAKE_SOURCE_DIR}/webthree/CMakeLists.txt")
-	add_subdirectory(webthree)
-endif()
-
-# Optionally if the user has dot/grapviz, generate the dependency graph
-find_program(GRAPHVIZDOT dot)
-if (GRAPHVIZDOT)
-	message(STATUS "Graphviz detected. Drawing a module dependency graph at ${CMAKE_SOURCE_DIR}/dependency_graph.svg")
-	execute_process(
-		COMMAND dot -Tsvg dependency_graph.dot -o dependency_graph.svg
-		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-	)
-endif()
-


Fix latest PackageConfig change

Fix latest PackageConfig change

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -199,7 +199,9 @@
     "find_package(${_dependent} ${_FIND_VERSION} \${_req} \${_quiet})\n"
     "if(${${_dependent}_name}_FOUND)\n"
     "list(APPEND ${${_dependent}_name}_LIBRARIES \${_library_backups})\n"
-    "list(REMOVE_DUPLICATES ${${_dependent}_name}_LIBRARIES)\n"
+    "if(${${_dependent}_name}_LIBRARIES)\n"
+    "  list(REMOVE_DUPLICATES ${${_dependent}_name}_LIBRARIES)\n"
+    "endif()\n"
     )
   if(_FIND_VERSION)
     list(APPEND DEPENDENTS


Bumped version number

Bumped version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.2.9)
+set(autowiring_VERSION 0.2.10)


Graph Control 4.0.4-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -4,9 +4,9 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 4 )
 set ( HPCC_MINOR 0 )
-set ( HPCC_POINT 3 )
-set ( HPCC_MATURITY "closedown" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_POINT 4 )
+set ( HPCC_MATURITY "rc" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Graph Control 6.0.0-rc6 Release Candidate 6

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

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


Bump version to 0.2.0

Bump version to 0.2.0

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(LeapIPC_VERSION 0.1.8)
+set(LeapIPC_VERSION 0.2.0)


Declare targets in FindCAF cmake module

Declare targets in FindCAF cmake module

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -71,7 +71,7 @@
         message(WARNING "Found all.hpp for CAF core, but not build_config.hpp")
         set(CAF_${comp}_FOUND false)
       else()
-        list(APPEND CAF_INCLUDE_DIRS "${caf_build_header_path}")
+        list(APPEND CAF_INCLUDE_DIR_${UPPERCOMP} "${caf_build_header_path}")
       endif()
     endif()
     list(APPEND CAF_INCLUDE_DIRS "${CAF_INCLUDE_DIR_${UPPERCOMP}}")
@@ -84,7 +84,6 @@
       find_library(CAF_LIBRARY_${UPPERCOMP}
                    NAMES
                      "caf_${comp}"
-                     "caf_${comp}_static"
                    HINTS
                      ${library_hints}
                      /usr/lib
@@ -120,3 +119,43 @@
                  CAF_LIBRARIES
                  CAF_INCLUDE_DIRS)

+if (CAF_core_FOUND AND NOT TARGET caf::core)
+  add_library(caf::core UNKNOWN IMPORTED)
+  set_target_properties(caf::core PROPERTIES
+    IMPORTED_LOCATION "${CAF_LIBRARY_CORE}"
+    INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_CORE}")
+endif ()
+if (CAF_io_FOUND AND NOT TARGET caf::io)
+  add_library(caf::io UNKNOWN IMPORTED)
+  set_target_properties(caf::io PROPERTIES
+    IMPORTED_LOCATION "${CAF_LIBRARY_IO}"
+    INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_IO}"
+    INTERFACE_LINK_LIBRARIES "caf::core")
+endif ()
+if (CAF_openssl_FOUND AND NOT TARGET caf::openssl)
+  add_library(caf::openssl UNKNOWN IMPORTED)
+  set_target_properties(caf::openssl PROPERTIES
+    IMPORTED_LOCATION "${CAF_LIBRARY_OPENSSL}"
+    INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_OPENSSL}"
+    INTERFACE_LINK_LIBRARIES "caf::core;caf::io")
+  if (NOT BUILD_SHARED_LIBS)
+    include(CMakeFindDependencyMacro)
+    set(OPENSSL_USE_STATIC_LIBS TRUE)
+    find_dependency(OpenSSL)
+    set_property(TARGET caf::openssl APPEND PROPERTY
+      INTERFACE_LINK_LIBRARIES "OpenSSL::SSL")
+  endif ()
+endif ()
+if (CAF_opencl_FOUND AND NOT TARGET caf::opencl)
+  add_library(caf::opencl UNKNOWN IMPORTED)
+  set_target_properties(caf::opencl PROPERTIES
+    IMPORTED_LOCATION "${CAF_LIBRARY_OPENCL}"
+    INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_OPENCL}"
+    INTERFACE_LINK_LIBRARIES "caf::core")
+endif ()
+if (CAF_test_FOUND AND NOT TARGET caf::test)
+  add_library(caf::test INTERFACE IMPORTED)
+  set_target_properties(caf::test PROPERTIES
+    INTERFACE_INCLUDE_DIRECTORIES "${CAF_INCLUDE_DIR_TEST}"
+    INTERFACE_LINK_LIBRARIES "caf::core")
+endif ()


Set CAF_VERSION from FindCAF script

Set CAF_VERSION from FindCAF script

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -13,10 +13,9 @@
 # Variables defined by this module:
 #
 #  CAF_FOUND              System has CAF headers and library
+#  CAF_VERSION            Found CAF release number
 #  CAF_LIBRARIES          List of library files  for all components
 #  CAF_INCLUDE_DIRS       List of include paths for all components
-#  CAF_LIBRARY_$C         Library file for component $C
-#  CAF_INCLUDE_DIR_$C     Include path for component $C

 if(CAF_FIND_COMPONENTS STREQUAL "")
   message(FATAL_ERROR "FindCAF requires at least one COMPONENT.")
@@ -49,7 +48,8 @@
               /usr/local/include
               /opt/local/include
               /sw/include
-              ${CMAKE_INSTALL_PREFIX}/include)
+              ${CMAKE_INSTALL_PREFIX}/include
+              ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
   mark_as_advanced(CAF_INCLUDE_DIR_${UPPERCOMP})
   if (NOT "${CAF_INCLUDE_DIR_${UPPERCOMP}}"
       STREQUAL "CAF_INCLUDE_DIR_${UPPERCOMP}-NOTFOUND")
@@ -66,6 +66,7 @@
                   /usr/local/include
                   /opt/local/include
                   /sw/include
+                  ${CMAKE_INSTALL_PREFIX}/include
                   ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
       if ("${caf_build_header_path}" STREQUAL "caf_build_header_path-NOTFOUND")
         message(WARNING "Found all.hpp for CAF core, but not build_config.hpp")
@@ -91,6 +92,7 @@
                      /usr/local/lib
                      /opt/local/lib
                      /sw/lib
+                     ${CMAKE_INSTALL_PREFIX}/lib
                      ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}
                      ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_BUILD_TYPE})
       mark_as_advanced(CAF_LIBRARY_${UPPERCOMP})
@@ -108,15 +110,35 @@
   list(REMOVE_DUPLICATES CAF_INCLUDE_DIRS)
 endif()

+
+if (NOT CAF_INCLUDE_DIR_CORE STREQUAL "CAF_INCLUDE_DIR_CORE-NOTFOUND")
+  # read content of config.hpp
+  file(READ "${CAF_INCLUDE_DIR_CORE}/caf/config.hpp" CONFIG_HPP)
+  # get line containing the version
+  string(REGEX MATCH "#define CAF_VERSION [0-9]+" VERSION_LINE "${CONFIG_HPP}")
+  # extract version number from line
+  string(REGEX MATCH "[0-9]+" VERSION_INT "${VERSION_LINE}")
+  # calculate major, minor, and patch version
+  math(EXPR CAF_VERSION_MAJOR "${VERSION_INT} / 10000")
+  math(EXPR CAF_VERSION_MINOR "( ${VERSION_INT} / 100) % 100")
+  math(EXPR CAF_VERSION_PATCH "${VERSION_INT} % 100")
+  # create full version string
+  set(CAF_VERSION "${CAF_VERSION_MAJOR}.${CAF_VERSION_MINOR}.${CAF_VERSION_PATCH}")
+  if (NOT CAF_VERSION)
+    unset(CAF_VERSION)
+    message(WARNING "Unable to determine CAF version")
+  endif ()
+endif ()
+
 # let CMake check whether all requested components have been found
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(CAF
                                   FOUND_VAR CAF_FOUND
-                                  REQUIRED_VARS CAF_LIBRARIES CAF_INCLUDE_DIRS
+                                  REQUIRED_VARS CAF_VERSION CAF_LIBRARIES CAF_INCLUDE_DIRS
                                   HANDLE_COMPONENTS)

 # final step to tell CMake we're done
 mark_as_advanced(CAF_ROOT_DIR
+                 CAF_VERSION
                  CAF_LIBRARIES
                  CAF_INCLUDE_DIRS)
-


FindHIP: Fix bug in parsing source files and options

Change-Id: Ib1c793dd19d61b387da3f5894c4e37c66f02b753

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -193,9 +193,15 @@
     foreach(arg ${ARGN})
         if("x${arg}" STREQUAL "xHIPCC_OPTIONS")
             set(_hipcc_found_options TRUE)
+            set(_hcc_found_options FALSE)
+            set(_nvcc_found_options FALSE)
         elseif("x${arg}" STREQUAL "xHCC_OPTIONS")
+            set(_hipcc_found_options FALSE)
             set(_hcc_found_options TRUE)
+            set(_nvcc_found_options FALSE)
         elseif("x${arg}" STREQUAL "xNVCC_OPTIONS")
+            set(_hipcc_found_options FALSE)
+            set(_hcc_found_options FALSE)
             set(_nvcc_found_options TRUE)
         elseif(
                 "x${arg}" STREQUAL "xEXCLUDE_FROM_ALL" OR


No need to throw error message for TBB if it wasn't required

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -265,8 +265,8 @@
 endif (TBB_INCLUDE_DIR)

 if (NOT TBB_FOUND)
-    message("ERROR: Intel TBB NOT found!")
-    message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
+    #message("ERROR: Intel TBB NOT found!")
+    #message(STATUS "Looked for Threading Building Blocks in ${_TBB_INSTALL_DIR}")
     # do only throw fatal, if this pkg is REQUIRED
     if (TBB_FIND_REQUIRED)
         message(FATAL_ERROR "Could NOT find TBB library.")


Track origins with valgrind by default

Track origins with valgrind by default

--- cmake/Testing.cmake
+++ cmake/Testing.cmake
@@ -75,7 +75,7 @@
   # add valgrind test
   if (valgrind AND NOT coverage AND NOT ${TEST_TARGET} STREQUAL "runBiodynamoTests_mechanical_interaction_test")
     # filter out SchedulerTest.Backup because of timing issue
-    add_test(NAME "valgrind_${TEST_TARGET}" COMMAND valgrind --leak-resolution=high --tool=memcheck --leak-check=full --show-leak-kinds=all --gen-suppressions=all --show-reachable=no --suppressions=${CMAKE_BINARY_DIR}/../util/valgrind-bdm.supp --error-exitcode=1 ./${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup)
+    add_test(NAME "valgrind_${TEST_TARGET}" COMMAND valgrind --track-origins=yes --leak-resolution=high --tool=memcheck --leak-check=full --show-leak-kinds=all --gen-suppressions=all --show-reachable=no --suppressions=${CMAKE_BINARY_DIR}/../util/valgrind-bdm.supp --error-exitcode=1 ./${TEST_TARGET} -- --gtest_filter=-*DeathTest.*:IOTest.InvalidRead:SchedulerTest.Backup)
   endif()

   add_dependencies(check ${TEST_TARGET})


Ensure we always have a version number

Ensure we always have a version number

When not compiling from a git repository the version number macros used
to be empty. That's a problem with the new major and minor version
number functionality in OrbitVersion.

This change defaults to 0.0.0 when new version could be determined from
Git.

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -46,8 +46,16 @@
   string(REGEX MATCH "([0-9]+)\\." MAJOR_VERSION "${VERSION_STRING}")
   set(MAJOR_VERSION "${CMAKE_MATCH_1}")

+  if(NOT MAJOR_VERSION)
+    set(MAJOR_VERSION 0)
+  endif()
+
   string(REGEX MATCH "\\.([0-9]+)" MINOR_VERSION "${VERSION_STRING}")
   set(MINOR_VERSION "${CMAKE_MATCH_1}")
+
+  if(NOT MINOR_VERSION)
+    set(MINOR_VERSION 0)
+  endif()

   set(PATCH_VERSION "0")


wip commit

wip commit

--- cmake/version.cmake
+++ cmake/version.cmake
@@ -51,7 +51,10 @@
 	SET(REVISION_PREFIX "0x")
 	SET(REVISION_HUMAN ${MAINVERSION})
 	SET(PREFIX "v")
-	SET(REVISION ${MAINVERSION})
+	STRING(REGEX REPLACE "([0-9]+)\.*" "\\1" VERSION_MAJOR "${MAINVERSION}")
+	STRING(REGEX REPLACE ".*\0*([0-9]+)\.*" "\\1" VERSION_MINOR "${MAINVERSION}")
+	STRING(REGEX REPLACE ".*\..*-0*([0-9]+).*" "\\1" VERSION_SUB "${MAINVERSION}")
+	SET(REVISION ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_SUB})

 	EXECUTE_PROCESS(
 		COMMAND stat -c %y "${ROOT_DIR}/NEWS"


Proper fix for finding core library in component find mode

--- PackageConfig.cmake
+++ PackageConfig.cmake
@@ -1,3 +1,4 @@
+
 # Copyright (c) 2013 Daniel Nachbaur <daniel.nachbaur@epfl.ch>

 # This file creates package information for find_package by generating
@@ -44,6 +45,9 @@
   "\n"
 # find components if specified
   "  if(${CMAKE_PROJECT_NAME}_FIND_COMPONENTS)\n"
+  "    find_library(\${UPPER_PROJECT_NAME}_LIBRARY ${CMAKE_PROJECT_NAME} NO_DEFAULT_PATH\n"
+  "                 PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"
+  "    list(APPEND ${UPPER_PROJECT_NAME}_LIBRARIES \${${UPPER_PROJECT_NAME}_LIBRARY})\n"
   "    foreach(_component \${${CMAKE_PROJECT_NAME}_FIND_COMPONENTS})\n"
   "      find_library(\${_component}_libraryname ${CMAKE_PROJECT_NAME}_\${_component} NO_DEFAULT_PATH\n"
   "        PATHS \${PACKAGE_PREFIX_DIR} PATH_SUFFIXES lib ${PYTHON_LIBRARY_PREFIX})\n"


Added better messages and fixed a spelling mistake

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -141,7 +141,7 @@
   # Unless specified, SDK version 8.0 is used by default as minimum target version.
   set(IOS_DEPLOYMENT_TARGET "8.0"
       CACHE STRING "Minimum iOS version to build for." )
-  message(STATUS "Using the default min-version sonce IOS_DEPLOYMENT_TARGET not provided!")
+  message(STATUS "Using the default min-version since IOS_DEPLOYMENT_TARGET not provided!")
 endif()
 # Use bitcode or not
 if (NOT DEFINED ENABLE_BITCODE)
@@ -252,8 +252,10 @@

 if (ENABLE_BITCODE)
   set(BITCODE "-fembed-bitcode")
+  message(STATUS "Enabling bitcode support.")
 else()
   set(BITCODE "")
+  message(STATUS "Disabling bitcode support.")
 endif()

 set(CMAKE_C_FLAGS


SVN_SILENT made messages (.desktop file)

--- plasma/package/metadata.desktop.cmake
+++ plasma/package/metadata.desktop.cmake
@@ -2,7 +2,7 @@
 Type=Service
 X-Plasma-API=declarativeappletscript
 X-Plasma-MainScript=ui/main.qml
-
+
 X-KDE-PluginInfo-Author=Dan Vrátil
 X-KDE-PluginInfo-Email=dvratil@redhat.com
 X-KDE-PluginInfo-Name=org.kde.plasma.kscreen.qml


updates to .gitlab-ci.yml

updates to .gitlab-ci.yml

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -56,6 +56,8 @@
     MESSAGE(STATUS "Found Intel SPMD Compiler (ISPC): ${EMBREE_ISPC_EXECUTABLE}")
   ENDIF()
 ENDIF()
+
+MESSAGE("EMBREE_ISPC_EXECUTABLE = ${EMBREE_ISPC_EXECUTABLE}")

 # check ISPC version
 EXECUTE_PROCESS(COMMAND ${EMBREE_ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)


disabling klocwork check for now

disabling klocwork check for now

--- common/cmake/test.cmake
+++ common/cmake/test.cmake
@@ -143,9 +143,9 @@
 # add klocwork test
 IF (EMBREE_TESTING_KLOCWORK)
   ADD_TEST(NAME Klocwork-Build WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork_build.sh)
-  ADD_TEST(NAME Klocwork-Check WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork_check.sh)
+#  ADD_TEST(NAME Klocwork-Check WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMAND ${PROJECT_SOURCE_DIR}/scripts/klocwork_check.sh)
   SET_TESTS_PROPERTIES(Klocwork-Build PROPERTIES TIMEOUT 2400)
-  SET_TESTS_PROPERTIES(Klocwork-Check PROPERTIES TIMEOUT 300)
+#  SET_TESTS_PROPERTIES(Klocwork-Check PROPERTIES TIMEOUT 300)
 ENDIF()

 # add valgrind test


[CMake][Exp PyROOT] Remove cached Python related variables

This is needed because doesn't allow incremental builds to work
correctly. In the case of multiple python, the second time we would
wrongly enter the if(PYTHON_EXECUTABLE) case because PYTHON_EXECUTABLE
is cached, but in this case PyROOT would be built only for one version.

--- cmake/modules/SearchRootCoreDeps.cmake
+++ cmake/modules/SearchRootCoreDeps.cmake
@@ -80,13 +80,13 @@
     set(Python${PYTHON_PREFER_VERSION}_EXECUTABLE "${PYTHON_EXECUTABLE}")
     find_package(Python${PYTHON_PREFER_VERSION} COMPONENTS Interpreter Development NumPy)
     if(Python${PYTHON_PREFER_VERSION}_Interpreter_FOUND)
-      set(PYTHON_EXECUTABLE "${Python${PYTHON_PREFER_VERSION}_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_STRING "${Python${PYTHON_PREFER_VERSION}_VERSION}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_MAJOR "${Python${PYTHON_PREFER_VERSION}_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_MINOR "${Python${PYTHON_PREFER_VERSION}_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_EXECUTABLE "${Python${PYTHON_PREFER_VERSION}_EXECUTABLE}")
+      set(PYTHON_VERSION_STRING "${Python${PYTHON_PREFER_VERSION}_VERSION}")
+      set(PYTHON_VERSION_MAJOR "${Python${PYTHON_PREFER_VERSION}_VERSION_MAJOR}")
+      set(PYTHON_VERSION_MINOR "${Python${PYTHON_PREFER_VERSION}_VERSION_MINOR}")
       if(Python${PYTHON_PREFER_VERSION}_Development_FOUND)
-        set(PYTHON_INCLUDE_DIRS "${Python${PYTHON_PREFER_VERSION}_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-        set(PYTHON_LIBRARIES "${Python${PYTHON_PREFER_VERSION}_LIBRARIES}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_INCLUDE_DIRS "${Python${PYTHON_PREFER_VERSION}_INCLUDE_DIRS}")
+        set(PYTHON_LIBRARIES "${Python${PYTHON_PREFER_VERSION}_LIBRARIES}")
         # Set PyROOT variables
         set(Python${PYTHON_PREFER_VERSION}_Interpreter_Development_FOUND ON) # This means we have both Interpreter and Development, hence we can build PyROOT with Python3
         set(PYTHON_EXECUTABLE_Development_Main "${Python${PYTHON_PREFER_VERSION}_EXECUTABLE}")
@@ -98,8 +98,8 @@
         set(PYTHON_LIBRARIES_Development_Main "${Python${PYTHON_PREFER_VERSION}_LIBRARIES}")
       endif()
       if(Python${PYTHON_PREFER_VERSION}_NumPy_FOUND)
-        set(NUMPY_FOUND ${Python${PYTHON_PREFER_VERSION}_NumPy_FOUND} CACHE INTERNAL "" FORCE)
-        set(NUMPY_INCLUDE_DIRS "${Python${PYTHON_PREFER_VERSION}_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+        set(NUMPY_FOUND ${Python${PYTHON_PREFER_VERSION}_NumPy_FOUND})
+        set(NUMPY_INCLUDE_DIRS "${Python${PYTHON_PREFER_VERSION}_NumPy_INCLUDE_DIRS}")
       endif()
     endif()
     if(DEFINED Python${PYTHON_PREFER_VERSION}_VERSION AND "${Python${PYTHON_PREFER_VERSION}_VERSION}" VERSION_LESS "2.7")
@@ -116,13 +116,13 @@
     # automatically by find_package(Python2 ...) ONLY IF PYTHON3 WASN'T FOUND
     find_package(Python3 COMPONENTS Interpreter Development NumPy)
     if(Python3_Interpreter_FOUND)
-      set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_STRING "${Python3_VERSION}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
-      set(PYTHON_VERSION_MINOR "${Python3_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+      set(PYTHON_EXECUTABLE "${Python3_EXECUTABLE}")
+      set(PYTHON_VERSION_STRING "${Python3_VERSION}")
+      set(PYTHON_VERSION_MAJOR "${Python3_VERSION_MAJOR}")
+      set(PYTHON_VERSION_MINOR "${Python3_VERSION_MINOR}")
       if(Python3_Development_FOUND)
-        set(PYTHON_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-        set(PYTHON_LIBRARIES "${Python3_LIBRARIES}" CACHE INTERNAL "" FORCE)
+        set(PYTHON_INCLUDE_DIRS "${Python3_INCLUDE_DIRS}")
+        set(PYTHON_LIBRARIES "${Python3_LIBRARIES}")
         # Set PyROOT variables
         set(Python3_Interpreter_Development_FOUND ON) # This means we have both Interpreter and Development, hence we can build PyROOT with Python3
         set(PYTHON_EXECUTABLE_Development_Main "${Python3_EXECUTABLE}")
@@ -134,8 +134,8 @@
         set(PYTHON_LIBRARIES_Development_Main "${Python3_LIBRARIES}")
       endif()
       if(Python3_NumPy_FOUND)
-        set(NUMPY_FOUND ${Python3_NumPy_FOUND} CACHE INTERNAL "" FORCE)
-        set(NUMPY_INCLUDE_DIRS "${Python3_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+        set(NUMPY_FOUND ${Python3_NumPy_FOUND})
+        set(NUMPY_INCLUDE_DIRS "${Python3_NumPy_INCLUDE_DIRS}")
       endif()
     endif()

@@ -147,13 +147,13 @@
       if(NOT Python3_Interpreter_FOUND)
         # Only Python2 was found, set as main
         if(Python2_Interpreter_FOUND)
-          set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}" CACHE INTERNAL "" FORCE)
-          set(PYTHON_VERSION_STRING "${Python2_VERSION}" CACHE INTERNAL "" FORCE)
-          set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}" CACHE INTERNAL "" FORCE)
-          set(PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}" CACHE INTERNAL "" FORCE)
+          set(PYTHON_EXECUTABLE "${Python2_EXECUTABLE}")
+          set(PYTHON_VERSION_STRING "${Python2_VERSION}")
+          set(PYTHON_VERSION_MAJOR "${Python2_VERSION_MAJOR}")
+          set(PYTHON_VERSION_MINOR "${Python2_VERSION_MINOR}")
           if(Python2_Development_FOUND)
-            set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-            set(PYTHON_LIBRARIES "${Python2_LIBRARIES}" CACHE INTERNAL "" FORCE)
+            set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}")
+            set(PYTHON_LIBRARIES "${Python2_LIBRARIES}")
             # Set PyROOT variables
             set(Python2_Interpreter_Development_FOUND ON) # This means we have both Interpreter and Development, hence we can build PyROOT with Python2
             set(PYTHON_EXECUTABLE_Development_Main "${Python2_EXECUTABLE}")
@@ -165,8 +165,8 @@
             set(PYTHON_LIBRARIES_Development_Main "${Python2_LIBRARIES}")
           endif()
           if(Python2_NumPy_FOUND)
-            set(NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
-            set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+            set(NUMPY_FOUND ${Python2_NumPy_FOUND})
+            set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}")
           endif()
         endif()
       else()
@@ -188,8 +188,8 @@
               set(OTHER_NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}")
             endif()
           else()
-            set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
-            set(PYTHON_LIBRARIES "${Python2_LIBRARIES}" CACHE INTERNAL "" FORCE)
+            set(PYTHON_INCLUDE_DIRS "${Python2_INCLUDE_DIRS}")
+            set(PYTHON_LIBRARIES "${Python2_LIBRARIES}")
             # Set PyROOT variables
             set(PYTHON_EXECUTABLE_Development_Main "${Python2_EXECUTABLE}")
             set(PYTHON_VERSION_STRING_Development_Main "${Python2_VERSION}")
@@ -199,8 +199,8 @@
             set(PYTHON_INCLUDE_DIRS_Development_Main "${Python2_INCLUDE_DIRS}")
             set(PYTHON_LIBRARIES_Development_Main "${Python2_LIBRARIES}")
             if(Python2_NumPy_FOUND)
-              set(NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
-              set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}" CACHE INTERNAL "" FORCE)
+              set(NUMPY_FOUND ${Python2_NumPy_FOUND})
+              set(NUMPY_INCLUDE_DIRS "${Python2_NumPy_INCLUDE_DIRS}")
             endif()
           endif()
         endif()