COMP: Adaption in order to allow "header-only" modules with cpp files

--- CMake/CoreHelpers.cmake
+++ CMake/CoreHelpers.cmake
@@ -207,20 +207,30 @@
   INCLUDE_DIRECTORIES(. ${ALL_INCLUDE_DIRECTORIES})
   INCLUDE(files.cmake)

+  SET(BOOL_HEADERS_ONLY_MODULE 0)
+
   IF(NOT MODULE_QT_MODULE)
     ORGANIZE_SOURCES(SOURCE ${CPP_FILES}
                      HEADER	${H_FILES}
 					 TXX ${TXX_FILES}
 					 DOC ${DOX_FILES}
 					 )
+
+    IF(NOT CPP_FILES AND NOT CPP_FILES_GENERATED AND NOT TOOL_CPPS)
+      SET(BOOL_HEADERS_ONLY_MODULE 1)
+    ENDIF()
+
     IF(MODULE_FORCE_STATIC)
       SET(_STATIC ${MITK_WIN32_FORCE_STATIC})
     ENDIF(MODULE_FORCE_STATIC)

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

     INCLUDE(files.cmake)
@@ -243,18 +253,26 @@
                    QRC ${RES_FILES}
 				   MOC ${Q${KITNAME}_GENERATED_MOC_CPP}
 				   GEN_UI ${Q${KITNAME}_GENERATED_UI_CPP})
-
+
+    IF(NOT CPP_FILES AND NOT CPP_FILES_GENERATED AND NOT TOOL_CPPS)
+      SET(BOOL_HEADERS_ONLY_MODULE 1)
+    ENDIF()
+
   # MITK_GENERATE_TOOLS_LIBRARY(Qmitk${LIBPOSTFIX} "NO")

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

   # install only if shared lib (for now)
   IF(NOT MODULE_FORCE_STATIC)
-    MITK_INSTALL_TARGETS(${MODULE_PROVIDES})
+    IF(NOT BOOL_HEADERS_ONLY_MODULE)
+      MITK_INSTALL_TARGETS(${MODULE_PROVIDES})
+    ENDIF()
   ENDIF(NOT MODULE_FORCE_STATIC)
 ENDIF(_MISSING_DEP)
 ENDMACRO(MITK_CREATE_MODULE)


Updated MD5sums and package numbers for png and zlib. Builds on Linux now.

--- CMake/ExternalPNG.cmake
+++ CMake/ExternalPNG.cmake
@@ -15,8 +15,8 @@
     PREFIX ${libpng_PREFIX}

     DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}
-    URL http://zlib.net/zlib-1.2.5.tar.gz
-    URL_MD5 c735eab2d659a96e5a594c9e8541ad63
+    URL http://zlib.net/zlib-1.2.6.tar.gz
+    URL_MD5 618e944d7c7cd6521551e30b32322f4a

     PATCH_COMMAND ${CMAKE_COMMAND} -E remove <SOURCE_DIR>/zconf.h

@@ -31,8 +31,8 @@
     PREFIX ${libpng_PREFIX}

     DOWNLOAD_DIR ${POLYCODE_DEPS_DOWNLOAD_DIR}
-    URL ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.7.tar.gz
-    URL_MD5 944b56a84b65d94054cc73d7ff965de8
+    URL ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng-1.5.9.tar.gz
+    URL_MD5 c740ba66cd7074ba2471b6a4ff48e1fb

     INSTALL_DIR ${POLYCODE_DEPS_CORE_PREFIX}
     CMAKE_ARGS ${libpng_CMAKE_ARGS} -DCMAKE_PREFIX_PATH=${install_dir} # to find zlib


Change_depth_invalidation_fix_eol

--- CMake/lrs_options.cmake
+++ CMake/lrs_options.cmake
@@ -31,4 +31,4 @@
 option(FORCE_LIBUVC "Explicitly turn-on libuvc backend - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
 option(FORCE_WINUSB_UVC "Explicitly turn-on winusb_uvc (for win7) backend - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
 option(ANDROID_USB_HOST_UVC "Build UVC backend for Android - deprecated, use FORCE_RSUSB_BACKEND instead" OFF)
-option(ENABLE_DEPTH_INVALIDATION "Turn on the depth frame validator" ON)+option(ENABLE_DEPTH_INVALIDATION "Turn on the depth frame validator" ON)


A yacma update to enable more warnings.

A yacma update to enable more warnings.

--- cmake/yacma/YACMACompilerLinkerSettings.cmake
+++ cmake/yacma/YACMACompilerLinkerSettings.cmake
@@ -111,9 +111,7 @@
         # This limit is supposed to be at least 1024 in C++11, but for some reason
         # clang sets this to 256, and gcc to 900.
         _YACMA_CHECK_ENABLE_CXX_FLAG(-ftemplate-depth=1024)
-        # NOTE: this can be useful, but at the moment it triggers lots of warnings in type traits.
-        # Keep it in mind for the next time we touch type traits.
-        # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
+        _YACMA_CHECK_ENABLE_CXX_FLAG(-Wold-style-cast)
         # NOTE: disable this for now, as it results in a lot of clutter from Boost.
         # _YACMA_CHECK_ENABLE_CXX_FLAG(-Wzero-as-null-pointer-constant)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-pedantic-errors)
@@ -131,6 +129,7 @@
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshift-negative-value)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wshift-overflow=2)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wduplicated-cond)
+        _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wnull-dereference)
         # From GCC 7.
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wduplicated-branches)
         _YACMA_CHECK_ENABLE_DEBUG_CXX_FLAG(-Wrestrict)


ENH:  Update ITK git tag.

ENH:  Update ITK git tag.

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

   ### --- End Project specific additions
   set(${proj}_REPOSITORY ${git_protocol}://itk.org/ITK.git)
-  set(${proj}_GIT_TAG 877a6ea10e9ed4672b632c313e2265fb0c887930) ##
+  set(${proj}_GIT_TAG c98c5ddd9a01f311b4dd95f036acde0fd9a4e155) ##
   set(ITK_VERSION_ID ITK-4.9) ### NOTE: When updating GIT_TAG, also update ITK_VERSION_ID

   ExternalProject_Add(${proj}


Bump version to 1.7.8

Bump version to 1.7.8

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(LIBREPO_MAJOR "1")
 SET(LIBREPO_MINOR "7")
-SET(LIBREPO_PATCH "7")
+SET(LIBREPO_PATCH "8")


TosLang: Fixing adding test cases with BOOST_AUTO_TEST_SUITE

--- cmake/BoostTestHelpers.cmake
+++ cmake/BoostTestHelpers.cmake
@@ -17,6 +17,13 @@
    if(${N} EQUAL 1)
        list(GET SUITE_MATCHES 0 SUITE_MATCH)
        string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), [A-Za-z_0-9]+ *\\)" "\\1" SUITE_NAME ${SUITE_MATCH})
+   else()
+       string(REGEX MATCH "BOOST_AUTO_TEST_SUITE\\( *([A-Za-z_0-9]+) *\\)"
+       SUITE_MATCHES ${SOURCE_FILE_CONTENTS})
+       if(${N} EQUAL 1)
+           list(GET SUITE_MATCHES 0 SUITE_MATCH)
+           string(REGEX REPLACE ".*\\( *([A-Za-z_0-9]+), [A-Za-z_0-9]+ *\\)" "\\1" SUITE_NAME ${SUITE_MATCH})
+       endif()
    endif()

     string(REGEX MATCHALL "BOOST_AUTO_TEST_CASE\\( *([A-Za-z_0-9]+) *\\)"


Uninstall: Remove completion directories

This update closes #1244.

--- cmake/ElektraUninstall.cmake
+++ cmake/ElektraUninstall.cmake
@@ -93,6 +93,11 @@
 	"/usr/local/share/man/man7"
 	"/usr/local/share/man"
 	"/usr/local/share"
+	"/usr/share/bash-completion/completions"
+	"/usr/share/bash-completion"
+	"/usr/share/zsh/vendor-completions"
+	"/usr/share/zsh"
+	"/usr/share"
 )

 foreach (directory ${REMOVAL_CANDIDATES})


Fix for http://opensync.org/ticket/834 this time fixing it at shared cmake OpenSyncDefaults.cmake
level.

This way we have the proper path in the pkgconfig file while still removing one level of
include path.

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@3630 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/OpenSyncDefaults.cmake
+++ cmake/OpenSyncDefaults.cmake
@@ -40,7 +40,7 @@

 SET( OPENSYNC_LIBRARIES_DIR "${LIB_INSTALL_DIR}" CACHE PATH "OpenSync library location" )
 SET( OPENSYNC_LIBEXEC_DIR "${LIBEXEC_INSTALL_DIR}/${OPENSYNC_API_DIR}" CACHE PATH "OpenSync libexec location" )
-SET( OPENSYNC_INCLUDE_DIR "${INCLUDE_INSTALL_DIR}/${OPENSYNC_API_DIR}/opensync" CACHE PATH "OpenSync headers location" )
+SET( OPENSYNC_INCLUDE_DIR "${INCLUDE_INSTALL_DIR}/${OPENSYNC_API_DIR}" CACHE PATH "OpenSync headers location" )
 SET( OPENSYNC_DATA_DIR "${SHARE_INSTALL_DIR}/${OPENSYNC_API_DIR}" CACHE PATH "OpenSync data directory" )

 # OpenSync build options:


cmake: allow more than one dependency for libswift targets

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -667,8 +667,8 @@
 function(add_libswift_module module)
   cmake_parse_arguments(ALSM
                         ""
+                        ""
                         "DEPENDS"
-                        ""
                         ${ARGN})
   set(sources ${ALSM_UNPARSED_ARGUMENTS})
   list(TRANSFORM sources PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
@@ -717,8 +717,8 @@
 function(add_libswift name)
   cmake_parse_arguments(ALS
                         ""
-                        "BOOTSTRAPPING;SWIFT_EXEC;DEPENDS"
-                        ""
+                        "BOOTSTRAPPING;SWIFT_EXEC"
+                        "DEPENDS"
                         ${ARGN})

   set(libswift_compile_options


Another small fix for FindGLEW

Another small fix for FindGLEW

--- cmake/modules/FindGLEW.cmake
+++ cmake/modules/FindGLEW.cmake
@@ -161,7 +161,7 @@
              PATHS ENV GLEW_ROOT)

 find_library(GLEW_STATIC_LIBRARY_DEBUG
-             NAMES GLEWds glewds glew32ds
+             NAMES GLEWds glewd glewds glew32ds
              PATH_SUFFIXES lib lib64
              PATHS ENV GLEW_ROOT)


Removed all extra MSVC flags

Removed all extra MSVC flags

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -124,21 +124,16 @@

  elseif (TUDAT_BUILD_MSVC)
      add_compile_definitions(TUDAT_BUILD_MSVC)
-     add_definitions( "-D_ENABLE_EXTENDED_ALIGNED_STORAGE" )
+     add_definitions("-D_ENABLE_EXTENDED_ALIGNED_STORAGE")
      message(STATUS "Using MSVC compiler.")
      # problem: https://dev.azure.com/tudat-team/feedstock-builds/_build/results?buildId=95&view=logs&j=00f5923e-fdef-5026-5091-0d5a0b3d5a2c&t=3cc4a9ed-60e1-5810-6eb3-5f9cd4a26dba
      # solution: https://stackoverflow.com/questions/1091662/vc-internal-compiler-error
-#     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
-     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
+     #     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /Ox /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
+#     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W3 /FC -D_SCL_SECURE_NO_WARNINGS")
      if (TUDAT_FORCE_DYNAMIC_RUNTIME)
          # This is needed for conda builds, as the prebuilt libraries are MD.
-         foreach (flag_var
-                 CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
-                 CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
-             # Find all dynamic runtime (MD) references and replace with static (MT)
-             set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")
-             message(STATUS "Forcing MD_DynamicRuntime on MSVC")
-         endforeach (flag_var)
+         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MD")
+         message(STATUS "Forcing MD_DynamicRuntime on MSVC")
      else ()
          # The following applied to legacy Tudat.
          # Because we are using static boost libraries, with static runtime, we need to force MSVC to


Increment minor version to 1.2.4

Increment minor version to 1.2.4

--- Version.cmake
+++ Version.cmake
@@ -10,7 +10,7 @@

 set(SimpleITK_VERSION_MAJOR 1)
 set(SimpleITK_VERSION_MINOR 2)
-set(SimpleITK_VERSION_PATCH 3)
+set(SimpleITK_VERSION_PATCH 4)
 #set(SimpleITK_VERSION_TWEAK "")


cmake: NDEBUG to off with Debug target. This cause the deadlock to be back.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -41,7 +41,7 @@

 if(CMAKE_BUILD_TYPE STREQUAL "Debug")
     set(DEBUG ON)
-    set(NDEBUG ON)
+    set(NDEBUG OFF)
 endif(CMAKE_BUILD_TYPE STREQUAL "Debug")

 set( HAVE_DYNAMIC_PLUGINS ${ENABLE_DYNAMIC_PLUGINS})


Remove STL headers from coverage

Remove STL headers from coverage

--- cmake/Modules/CoverallsGenerateGcov.cmake
+++ cmake/Modules/CoverallsGenerateGcov.cmake
@@ -200,9 +200,11 @@
 	# /path/to/project/root/subdir/the_file.c:creating '#path#to#project#root#subdir#the_file.c.gcov'
 	#
 	# If -p is not specified then the file is named only "the_file.c.gcov"
+  # The -r flag ensures gcov only looks are files with relative path names, and exclused files with
+  # absolute names (i.e., STL headers).
 	#
 	execute_process(
-		COMMAND ${GCOV_EXECUTABLE} -p -o ${GCDA_DIR} ${GCDA}
+		COMMAND ${GCOV_EXECUTABLE} -r -p -o ${GCDA_DIR} ${GCDA}
 		WORKING_DIRECTORY ${COV_PATH}
 	)
 endforeach()


linux: fix bad tbb download string

linux: fix bad tbb download string

--- versions.cmake
+++ versions.cmake
@@ -187,7 +187,7 @@
   set(tbb_file "tbb${tbb_ver}_osx.tgz")
   set(tbb_md5 "e96382f8dbf10e4edbdf1b64605ae891")
 else ()
-  set(tbb_file "tbb${tbb_ver}_lin_0.tgz")
+  set(tbb_file "tbb${tbb_ver}_lin.tgz")
   set(tbb_md5 "e668583115832dac196846c8d0fe30ec")
 endif ()


SVN_SILENT made messages (.desktop file)

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -7,6 +7,7 @@
 Name[it]=Messaggistica istantanea
 Name[kk]=Лезде хабарласу
 Name[nl]=Instant Messaging
+Name[pt_BR]=Mensagens instantâneas
 Name[sv]=Direktmeddelanden
 Name[uk]=Миттєвий обмін повідомленнями
 Name[x-test]=xxInstant Messagingxx
@@ -18,6 +19,7 @@
 Comment[it]=Avvia una chat con un tuo contatto di MI oppure cambia il tuo stato di MI
 Comment[kk]=Кез-келген лезде хабарласу контактыңызбен чат-әңгімені бастау не күй-жайын өзгерту
 Comment[nl]=Begin een chat met een van uw IM-contactpersonen of wijzig uw IM-status
+Comment[pt_BR]=Inicia um bate-papo com um dos seus contatos de MI ou altera o seu status
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями
 Comment[x-test]=xxStart a chat with any of your IM contacts or change your IM statusxx


update

update

--- VERSION.cmake
+++ VERSION.cmake
@@ -46,5 +46,5 @@

 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "0")
-SET(LIBSATSOLVER_PATCH "19")
+SET(LIBSATSOLVER_PATCH "20")


setting paths

setting paths

--- centos_5.cmake
+++ centos_5.cmake
@@ -1,30 +1,5 @@
 # Redhat 6.5 64 bit (not tested on 32 bit)
 #IF (${DEVSIM_CONFIG} STREQUAL "redhat_6.5")
-ADD_DEFINITIONS(-DTCL_THREADS -pthread -fvisibility=hidden)
-SET (FLEX /usr/bin/flex)
-SET (BISON /usr/bin/bison)
-SET (PYTHON_INCLUDE $ENV{HOME}/anaconda/include/python2.7)
-# use /opt/acml5.3.0/util/cpuid.exe to find support
-# ACML 5.3 available at developer.amd.com
-SET (ZLIB_INCLUDE $ENV{HOME}/anaconda/include)
-IF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
-# please put the correct path for libgfortran, if you know it
-SET (BLAS_ARCHIVE -llapack -lblas)
-SET (ZLIB_ARCHIVE $ENV{HOME}/anaconda/lib/libz.a)
-SET (SQLITE3_ARCHIVE $ENV{HOME}/anaconda/lib/libsqlite3.a)
-SET (TCL_STUB $ENV{HOME}/lib/libtclstub8.5.a)
-SET (TCL_ARCHIVE "$ENV{HOME}/libibtcl8.5.so" -ldl)
-SET (PYTHON_ARCHIVE $ENV{HOME}/anaconda/lib/libpython2.7.so)
-ELSE (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
-SET (BLAS_ARCHIVE -llapack -lblas)
-SET (ZLIB_ARCHIVE $ENV{HOME}/anaconda/lib/libz.a)
-SET (SQLITE3_ARCHIVE $ENV{HOME}/anaconda/lib/libsqlite3.a)
-SET (TCL_STUB $ENV{HOME}/anaconda/lib/libtclstub8.5.a)
-SET (TCL_ARCHIVE "$ENV{HOME}/anaconda/lib/libtcl8.5.so" -ldl)
-SET (PYTHON_ARCHIVE $ENV{HOME}/anaconda/lib/libpython2.7.so)
-ENDIF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
-
-
 SET (EXTERNAL_LIB ${PROJECT_SOURCE_DIR}/external)
 SET (SUPERLULOCATE  ${EXTERNAL_LIB}/SuperLU_4.3)
 SET (SUPERLU_INCLUDE ${SUPERLULOCATE}/SRC)
@@ -38,6 +13,27 @@

 SET (SYMDIFF_ARCHIVE ${EXTERNAL_LIB}/symdiff/lib/libsymdiff_static.a)
 SET (SYMDIFF_INCLUDE ${EXTERNAL_LIB}/symdiff/include)
+ADD_DEFINITIONS(-DTCL_THREADS -pthread -fvisibility=hidden)
+SET (FLEX /usr/bin/flex)
+SET (BISON /usr/bin/bison)
+SET (PYTHON_INCLUDE $ENV{HOME}/anaconda/include/python2.7)
+# use /opt/acml5.3.0/util/cpuid.exe to find support
+# ACML 5.3 available at developer.amd.com
+SET (ZLIB_INCLUDE $ENV{HOME}/anaconda/include)
+
+IF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
+ELSE (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
+# TODO: place a symlink in EXTERNAL_LIB pointing to lapack and blas with
+# an unversioned so name
+SET (BLAS_ARCHIVE -llapack -lblas)
+SET (ZLIB_ARCHIVE $ENV{HOME}/anaconda/lib/libz.a)
+SET (SQLITE3_ARCHIVE $ENV{HOME}/anaconda/lib/libsqlite3.a)
+SET (TCL_STUB $ENV{HOME}/anaconda/lib/libtclstub8.5.a)
+SET (TCL_ARCHIVE -L$ENV{HOME}/anaconda/lib -ltcl8.5 -ldl)
+SET (PYTHON_ARCHIVE -L$ENV{HOME}/anaconda/lib -lpython2.7)
+ENDIF (${CMAKE_SIZEOF_VOID_P} MATCHES 4)
+
+

 #ENDIF (${DEVSIM_CONFIG} STREQUAL "redhat_6.5")


ENH: Update elastix to revision 5256

ENH: Update elastix to revision 5256

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -1,7 +1,7 @@
 set( proj Elastix )

 set( ELASTIX_REPOSITORY https://svn.bigr.nl/elastix/trunkpublic/ )
-set( ELASTIX_REVISION 5211 )
+set( ELASTIX_REVISION 5256 )

 ExternalProject_Add( ${proj}
   SVN_REPOSITORY ${ELASTIX_REPOSITORY}


cmake to find gtest does not use defined paths in CMakeList

--- cmake/EmbeddedGTest.cmake
+++ cmake/EmbeddedGTest.cmake
@@ -2,7 +2,7 @@
 # GTEST_INCLUDE_DIR where to find gtest.h
 # GTEST_FOUND If false, do not try to use Google Test
 find_path ( GTEST_INCLUDE_DIR gtest/gtest.h
-PATHS /home/develop/iot/gmock-1.7.0/include /usr/local/include
+PATHS ${IOTAGENT_DEPENDENCIES_PATHS}
 NO_DEFAULT_PATH )
 # handle the QUIETLY and REQUIRED arguments and set GTEST_FOUND to TRUE if
 # all listed variables are TRUE


Fix for packaging external boost for command line systems like linux and macosx.

--- cmake/ExternalBoost.cmake
+++ cmake/ExternalBoost.cmake
@@ -25,7 +25,7 @@
   set( Boost_Ext "tar.bz2" )
 endif( )

-set( Boost.Command ./b2 --prefix=<SOURCE_DIR>/../package )
+set( Boost.Command ./b2 --prefix=<INSTALL_DIR>/package )

 if( CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX )
   list( APPEND Boost.Command cxxflags=-fPIC  )


COMP: disable compute capabilities 2.0 for CUDA 9 (issue #112)

--- cmake/FindCUDA_wrap.cmake
+++ cmake/FindCUDA_wrap.cmake
@@ -74,10 +74,16 @@
      -gencode arch=compute_35,code=sm_35
      -gencode arch=compute_35,code=compute_35
      )
-else()
+elseif("${CUDA_VERSION}" LESS 9.0)
  set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
      -Wno-deprecated-gpu-targets
      -gencode arch=compute_20,code=sm_20
+     -gencode arch=compute_30,code=sm_30
+     -gencode arch=compute_35,code=sm_35
+     -gencode arch=compute_35,code=compute_35
+     )
+else()
+ set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}
      -gencode arch=compute_30,code=sm_30
      -gencode arch=compute_35,code=sm_35
      -gencode arch=compute_35,code=compute_35


Updated libarchive

Updated libarchive

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -38,8 +38,8 @@
 hunter_config(
     libarchive
     VERSION "3.4.2-p0"
-    URL "https://github.com/luxonis/libarchive/archive/03dd2a24eb1ea2ef26cd5175c93e3191c48d2e2b.tar.gz"
-    SHA1 "7740889ee44028fac28e5a592870fabd65b70dff"
+    URL "https://github.com/luxonis/libarchive/archive/ace98b6abd6790eb43f043aaa261e468a3f44cd2.tar.gz"
+    SHA1 "8996d316f21b88b38cec026eef56aa0fd1fd5008"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
         ENABLE_ACL=OFF


Disable OCaml by default until the broken build caused by the recent
pllegend changes can be fixed.

svn path=/trunk/; revision=11499

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -24,7 +24,7 @@
 if(DEFAULT_NO_BINDINGS)
   option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 else(DEFAULT_NO_BINDINGS)
-  option(ENABLE_ocaml "Enable OCaml bindings" ON)
+  option(ENABLE_ocaml "Enable OCaml bindings" OFF)
 endif(DEFAULT_NO_BINDINGS)

 if(ENABLE_ocaml AND NOT BUILD_SHARED_LIBS)


Disable OCaml by default for static build until rpath issues are
straightened out.  Note, there is now a new option available called
ENABLE_ocaml_static which defaults to OFF, but if you set it to ON
you will get a build of OCaml for that static case.

svn path=/trunk/; revision=11941

--- cmake/modules/ocaml.cmake
+++ cmake/modules/ocaml.cmake
@@ -26,6 +26,14 @@
 else(DEFAULT_NO_BINDINGS)
   option(ENABLE_ocaml "Enable OCaml bindings" ON)
 endif(DEFAULT_NO_BINDINGS)
+
+option(ENABLE_ocaml_static "Enable OCaml bindings for the static build case" OFF)
+
+if(NOT ENABLE_ocaml_static AND NOT BUILD_SHARED_LIBS)
+    message(STATUS "WARNING:"
+      "Static build with ENABLE_ocaml_static false.  Therefore, disabling ocaml bindings")
+    set(ENABLE_ocaml OFF CACHE BOOL "Enable OCaml bindings" FORCE)
+endif(NOT ENABLE_ocaml_static AND NOT BUILD_SHARED_LIBS)

 if(ENABLE_ocaml AND NOT BUILD_SHARED_LIBS)
   message(STATUS "NOTICE: "


attempt to fix error in rc call

attempt to fix error in rc call

--- cmake/mysql_version.cmake
+++ cmake/mysql_version.cmake
@@ -186,7 +186,7 @@
   GET_FILENAME_COMPONENT(ORIGINALFILENAME ${target_location} NAME)

   # Directory where we have resouce script and compiled .res file
-  SET(RES_DIR ${CMAKE_CURRENT_BINARY_DIR}/version_resources)
+  SET(RES_DIR ${CMAKE_BINARY_DIR}/version_resources)

   # Create resource script (.rc)
   CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/versioninfo.rc.in
@@ -205,9 +205,8 @@
   IF(RUN_RC)
     # Run resource compiler
     EXECUTE_PROCESS(
-    COMMAND ${CMAKE_RC_COMPILER} /nologo /fo ${target}_versioninfo.res
-    ${target}_versioninfo.rc
-    WORKING_DIRECTORY ${RES_DIR}
+    COMMAND ${CMAKE_RC_COMPILER} ${target}_versioninfo.rc
+    WORKING_DIRECTORY ${RES_DIR} OUTPUT_QUIET
     )
   ENDIF()
   TARGET_LINK_LIBRARIES(${target} ${RES_DIR}/${target}_versioninfo.res)


ENH: CI: PKG: Disabled debug traces.

ENH: CI: PKG: Disabled debug traces.


Update compiler flags for MSVC

Update compiler flags for MSVC

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -8,9 +8,13 @@
 elseif(COMPILER_SUPPORTS_CXXOX)
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
 else()
-    message(SEND_ERROR
-        "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support.
-    Please use a different C++ compiler.")
+    if(MSVC)
+        if(MSVC_VERSION LESS 1900)
+            message(SEND_ERROR "MSVC < 14.0 is not supported. Please update your compiler or use mingw")
+        endif()
+    else()
+        message(SEND_ERROR "The ${CMAKE_CXX_COMPILER} compiler lacks C++11 support. Use another compiler.")
+    endif()
 endif()

 macro(set_debug_flag_if_possible _flag_)
@@ -22,7 +26,7 @@

 # Add some warnings in debug mode
 if(MSVC)
-    set_debug_flag_if_possible("/W4")
+    # set_debug_flag_if_possible("/W4")
 else()
     set_debug_flag_if_possible("-Wall")
     set_debug_flag_if_possible("-Wextra")


Try finding lib.

Try finding lib.

--- cmake/HalleyProject.cmake
+++ cmake/HalleyProject.cmake
@@ -5,6 +5,10 @@

 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -stdlib=libc++") # Apparently Clang on Mac needs this...
+endif()
+
+if (CMAKE_LIBRARY_PATH)
+	link_directories(CMAKE_INCLUDE_PATH)
 endif()

 set (SDL2_BUILDING_LIBRARY 1)
@@ -19,7 +23,7 @@
 		find_Package(SDL2 REQUIRED)
 		find_package(OggVorbis REQUIRED)
 		find_package(OpenGL REQUIRED)
-		find_package(Boost REQUIRED)
+		find_package(Boost COMPONENTS system filesystem REQUIRED)
 	else()
 		set(SDL2_LIBRARIES "")
 		set(Boost_FILESYSTEM_LIBRARY "")
@@ -47,6 +51,9 @@
 	find_package(OpenGL REQUIRED)
 	find_package(Boost COMPONENTS system filesystem thread REQUIRED)
 endif()
+
+message("filesystem: " ${Boost_FILESYSTEM_LIBRARY})
+message("system: " ${Boost_SYSTEM_LIBRARY})

 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DGSL_THROW_ON_CONTRACT_VIOLATION")
 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DGSL_UNENFORCED_ON_CONTRACT_VIOLATION")


Don't download BoringSSL or search for OpenSSL if target crypto is already defined

Without this projects including Tink as a subdirectory that already define a `crypto` target will fail to build.
This is useful when building Tink alongside other libraries that define some `crypto` target.

PiperOrigin-RevId: 486128754

--- cmake/TinkWorkspace.cmake
+++ cmake/TinkWorkspace.cmake
@@ -89,22 +89,29 @@
 # Paths are hard-coded in tests, which expects wycheproof/ in this location.
 add_directory_alias("${wycheproof_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/external/wycheproof")

-if (NOT TINK_USE_SYSTEM_OPENSSL)
-  # Commit from Sep 14, 2022.
-  http_archive(
-    NAME boringssl
-    URL https://github.com/google/boringssl/archive/d345d68d5c4b5471290ebe13f090f1fd5b7e8f58.zip
-    SHA256 482796f369c8655dbda3be801ae98c47916ecd3bff223d007a723fd5f5ecba22
-    CMAKE_SUBDIR src
-  )
-
-  # BoringSSL targets do not carry include directory info, this fixes it.
-  target_include_directories(crypto PUBLIC
-    "$<BUILD_INTERFACE:${boringssl_SOURCE_DIR}/src/include>")
+# Don't fetch BoringSSL or look for OpenSSL if target `crypto` is already
+# defined.
+if (NOT TARGET crypto)
+  if (NOT TINK_USE_SYSTEM_OPENSSL)
+    # Commit from Sep 14, 2022.
+    http_archive(
+      NAME boringssl
+      URL https://github.com/google/boringssl/archive/d345d68d5c4b5471290ebe13f090f1fd5b7e8f58.zip
+      SHA256 482796f369c8655dbda3be801ae98c47916ecd3bff223d007a723fd5f5ecba22
+      CMAKE_SUBDIR src
+    )
+    # BoringSSL targets do not carry include directory info, this fixes it.
+    target_include_directories(crypto PUBLIC
+      "$<BUILD_INTERFACE:${boringssl_SOURCE_DIR}/src/include>")
+  else()
+    # Support for ED25519 was added from 1.1.1.
+    find_package(OpenSSL 1.1.1 REQUIRED)
+    _create_interface_target(crypto OpenSSL::Crypto)
+  endif()
 else()
-  # Support for ED25519 was added from 1.1.1.
-  find_package(OpenSSL 1.1.1 REQUIRED)
-  _create_interface_target(crypto OpenSSL::Crypto)
+  message(STATUS "Using an already declared `crypto` target")
+  get_target_property(crypto_INCLUDE_DIR crypto INTERFACE_INCLUDE_DIRECTORIES)
+  message(STATUS "crypto Include Dir: ${crypto_INCLUDE_DIR}")
 endif()

 set(RAPIDJSON_BUILD_DOC OFF CACHE BOOL "Tink dependency override" FORCE)


add _USE_MATH_DEFINES

add _USE_MATH_DEFINES

--- cmake/get-libvorbis.cmake
+++ cmake/get-libvorbis.cmake
@@ -20,6 +20,10 @@
       -DOGG_INCLUDE_DIR=${DEPENDENCY_INSTALL_DIR}/include
 )

+if(WIN32)
+  add_definitions(-D_USE_MATH_DEFINES)
+endif()
+
 ExternalProject_Add(
     libvorbis
     DEPENDS         libogg


Delete FindPRMan.cmake

Delete FindPRMan.cmake

--- config/cmake/FindPRMan.cmake
+++ config/cmake/FindPRMan.cmake
@@ -1,53 +0,0 @@
-#==========
-#
-# Copyright (c) 2010, Dan Bethell.
-# All rights reserved.
-#
-# For license information regarding redistribution and
-# use, please refer to the COPYING file.
-#
-#==========
-#
-# Variables defined by this module:
-#   PRMan_FOUND
-#   PRMan_INCLUDE_DIR
-#   PRMan_COMPILE_FLAGS
-#   PRMan_LIBRARIES
-#   PRMan_LIBRARY_DIR
-#
-# Usage:
-#   FIND_PACKAGE( PRMan )
-#   FIND_PACKAGE( PRMan REQUIRED )
-#
-# Note:
-# You can tell the module where PRMan is installed by setting
-# the PRMan_INSTALL_PATH (or setting the RMANTREE environment
-# variable) before calling FIND_PACKAGE.
-#
-# E.g.
-#   SET( PRMan_INSTALL_PATH "/opt/pixar/RenderManProServer-15.0" )
-#   FIND_PACKAGE( PRMan REQUIRED )
-#
-#==========
-
-# our includes
-FIND_PATH( PRMan_INCLUDE_DIR ri.h
-  $ENV{RMANTREE}/include
-  ${PRMan_INSTALL_PATH}/include
-  )
-
-# our library itself
-FIND_LIBRARY( PRMan_LIBRARIES prman
-  $ENV{RMANTREE}/lib
-  ${PRMan_INSTALL_PATH}/lib
-  )
-
-# our compilation flags
-SET( PRMan_COMPILE_FLAGS "-DPRMAN -fPIC" )
-
-# did we find everything?
-INCLUDE( FindPackageHandleStandardArgs )
-FIND_PACKAGE_HANDLE_STANDARD_ARGS( "PRMan" DEFAULT_MSG
-  PRMan_INCLUDE_DIR
-  PRMan_LIBRARIES
-  )


added quotes around the test program call in run_test_*.bat (needed when paths have spaces)

--- config/VigraAddTest.cmake
+++ config/VigraAddTest.cmake
@@ -84,6 +84,7 @@
     VIGRA_NATIVE_PATH(VIGRA_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
     IF(MSVC OR MINGW)
         SET(VIGRA_RUN_TEST "${CMAKE_CURRENT_BINARY_DIR}/run_${target}.bat")
+        SET(VIGRA_TEST_EXECUTABLE "\"${VIGRA_TEST_EXECUTABLE}\"")  # take care of paths with spaces
         CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config/run_test.bat.in
                        ${VIGRA_RUN_TEST}
                        @ONLY)


STYLE: Remove CMake code for old Apple compilers (GCC < 4.3/Clang < 3.2)

For Apple, ITKv5.3 ("itkCompilerChecks.cmake") requires at least LLVM
Clang 3.4 or GCC 5.1.

Follow-up to:

pull request https://github.com/InsightSoftwareConsortium/ITK/pull/2563
commit 4e812d60743a3ed7c09647e7f3f0e8498583c2da
"COMP: Require compiler versions that support C++14"
(merged on 3 June 2021)

--- CMake/ITKModuleMacros.cmake
+++ CMake/ITKModuleMacros.cmake
@@ -11,12 +11,6 @@
 include(${_ITKModuleMacros_DIR}/ITKModuleCPPCheckTest.cmake)
 include(${_ITKModuleMacros_DIR}/ITKFactoryRegistration.cmake)

-# With Apple's (GGC <=4.2 and LLVM-GCC <=4.2) or (Clang < 3.2)
-# visibility of template  don't work. Set the option to off and hide it.
-if(APPLE AND ((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "4.3")
-   OR ((CMAKE_CXX_COMPILER_ID MATCHES "Clang") AND CMAKE_CXX_COMPILER_VERSION  VERSION_LESS "3.2")))
-  set( USE_COMPILER_HIDDEN_VISIBILITY OFF CACHE INTERNAL "" )
-endif()
 include(GenerateExportHeader)

 # itk_module(<name>)


opencv can be compiled via superbuild. no need for local opencv anymore

--- CMakeExternals/OpenCV.cmake
+++ CMakeExternals/OpenCV.cmake
@@ -3,17 +3,6 @@
 #-----------------------------------------------------------------------------

 IF(MITK_USE_OpenCV)
-
-  if (UNIX AND NOT APPLE)
-
-    include(${MITK_SOURCE_DIR}/CMake/mitkMacroGetLinuxDistribution.cmake)
-    GetLinuxDistribution()
-
-    if("${LINUX_DISTRIBUTION}" MATCHES "^[Uu][Bb][Uu][Nn][Tt][Uu].*" AND "${LINUX_RELEASE}" MATCHES "11.04")
-      set(OpenCV_DIR "/usr/share/opencv/")
-    endif()
-
-  endif()

   # Sanity checks
   IF(DEFINED OpenCV_DIR AND NOT EXISTS ${OpenCV_DIR})


config: Remove unused options.

config: Remove unused options.

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

--- config.h.cmake
+++ config.h.cmake
@@ -117,21 +117,6 @@

 /**************************** OPTIONS ****************************/

-/* define if the compiler implements namespaces */
-#cmakedefine HAVE_NAMESPACES
-
-/* Namespace for Google classes */
-#cmakedefine GOOGLE_NAMESPACE
-
-/* the namespace where STL code like vector<> is defined */
-#cmakedefine STL_NAMESPACE
-
-/* Stops putting the code inside the Google namespace */
-#cmakedefine _END_GOOGLE_NAMESPACE_
-
-/* Puts following code inside the Google namespace */
-#cmakedefine _START_GOOGLE_NAMESPACE_
-
 /*************************** ENDIAN *****************************/

 #cmakedefine WORDS_SIZEOF_VOID_P ${WORDS_SIZEOF_VOID_P}


wxwidgets use script: wxBase requires pthreads lib

* still not sure if we need to add wxWidgets_CXX_FLAGS (-pthread) to CMAKE_CXX_FLAGS
* https://stackoverflow.com/questions/2127797/significance-of-pthread-flag-when-compiling
* holding off, hoping we don't have to modify global CMAKE_CXX_FLAGS - cmake is ready to go, just commented-out
* see issue https://github.com/smanders/externpro/issues/194#issuecomment-398804739

--- projects/use/usexp-wxwidgets-config.cmake
+++ projects/use/usexp-wxwidgets-config.cmake
@@ -46,11 +46,14 @@
     #message(STATUS "wxWidgets_LIBRARY_DIRS: ${wxWidgets_LIBRARY_DIRS}")
     message(STATUS "wxWidgets_DEFINITIONS: ${wxWidgets_DEFINITIONS}")
     message(STATUS "wxWidgets_CXX_FLAGS: ${wxWidgets_CXX_FLAGS}")
-    # -pthread # TODO from wxWidgets_CXX_FLAGS include(${wxWidgets_USE_FILE})
   endif()
   mark_as_advanced(wxWidgets_USE_DEBUG)
   mark_as_advanced(wxWidgets_wxrc_EXECUTABLE)
   mark_as_advanced(_filename)
+  #if(DEFINED wxWidgets_CXX_FLAGS)
+  #  # -pthread from wxWidgets_CXX_FLAGS, was from include(${wxWidgets_USE_FILE})
+  #  xpListAppendIfDne(CMAKE_CXX_FLAGS ${wxWidgets_CXX_FLAGS})
+  #endif()
   set(${PRJ}_DEFINITIONS ${wxWidgets_DEFINITIONS})
   list(APPEND ${PRJ}_INCLUDE_DIR ${wxWidgets_INCLUDE_DIRS})
   ##################
@@ -111,6 +114,9 @@
   set(_wx_wxtiff_link wxjpeg wxzlib)
   set(_wx_xml_deps base)
   set(_wx_xml_link wxexpat)
+  set(THREADS_PREFER_PTHREAD_FLAG ON)
+  find_package(Threads REQUIRED)
+  set(_wx_base_libs Threads::Threads)
   checkLibraryConcat(dl dlclose _wx_base_libs)
   checkLibraryConcat(m pow _wx_base_libs)
   # standard way is to get these _wx_link libs from 'wx-config --libs'


Possibly fix scotch include directory

Possibly fix scotch include directory

--- cmake/FindScotch.cmake
+++ cmake/FindScotch.cmake
@@ -14,7 +14,7 @@
 IF (SCOTCH_LIB AND SCOTCHERR_LIB)
     SET(SCOTCH_FOUND TRUE)
     GET_FILENAME_COMPONENT(SCOTCH_PATH ${SCOTCH_LIB} PATH)
-    INCLUDE_DIRECTORIES(${SCOTCH_PATH}/../../include)
+    INCLUDE_DIRECTORIES(${SCOTCH_PATH}/../include)
     MARK_AS_ADVANCED(SCOTCH_PATH)
     MARK_AS_ADVANCED(SCOTCH_LIB)
     MARK_AS_ADVANCED(SCOTCHERR_LIB)


CMake: ZeroMQ - removing mandatory requirement for static library

FindZMQ: removing mandatory requirement for static library,
SLC 6 development package does not contain it

--- cmake/FindZeroMQ.cmake
+++ cmake/FindZeroMQ.cmake
@@ -2,7 +2,6 @@
 # ZeroMQ custom installation can be pointed using -DZEROMQ
 #       - ZEROMQ_INCLUDE_DIR - Where to find zeromq include sub-directory.
 #       - ZEROMQ_LIBRARIES   - List of libraries when using zeromq.
-#       - ZEROMQ_LIBRARIES_STATIC   - List of static libraries when using zeromq.
 #       - ZEROMQ_FOUND       - True if zeromq found.

 message(STATUS "Checking for ZeroMQ ${ZEROMQ}")
@@ -17,12 +16,6 @@
                 DOC "Path to libzmq)"
             )

-    find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
-                PATHS ${ZEROMQ}/lib
-                NO_DEFAULT_PATH
-                DOC "Path to libzmq)"
-            )
-
     find_path(ZEROMQ_INCLUDE_DIR NAMES zmq.h zmq_utils.h zmq.hpp}
                 PATHS ${ZEROMQ}/include
                 NO_DEFAULT_PATH
@@ -31,10 +24,6 @@
 else(ZEROMQ)
     # Check is the library is installed on the system
     find_library(ZEROMQ_LIBRARIES NAMES zmq
-                DOC "Path to libzmq)"
-            )
-
-    find_library(ZEROMQ_LIBRARIES_STATIC NAMES libzmq.a
                 DOC "Path to libzmq)"
             )

@@ -50,17 +39,12 @@
     set(ZEROMQ_DISABLED TRUE)
 endif()

-if(NOT ZEROMQ_LIBRARIES_STATIC AND NOT ZEROMQ_DISABLED)
-    message(STATUS "ZeroMQ static library not found. Disabling ZeroMQ support")
-    set(ZEROMQ_DISABLED TRUE)
-endif()
-
 if(NOT ZEROMQ_INCLUDE_DIR AND NOT ZEROMQ_DISABLED)
     message(STATUS "ZeroMQ headers not found. Please install development package. Disabling ZeroMQ support")
     set(ZEROMQ_DISABLED TRUE)
 endif()

-if(ZEROMQ_LIBRARIES AND ZEROMQ_LIBRARIES_STATIC AND ZEROMQ_INCLUDE_DIR)
+if(ZEROMQ_LIBRARIES AND ZEROMQ_INCLUDE_DIR)
     message(STATUS "Found ZeroMQ ${ZEROMQ_LIBRARIES}")
     set(ZEROMQ_FOUND TRUE)
 endif()


fix typo in add_unit_tests macro

fix typo in add_unit_tests macro

${test_ame} -> ${test_name}

--- cmake/TestHelper.cmake
+++ cmake/TestHelper.cmake
@@ -38,7 +38,7 @@
     if($ENV{BC_UNIT_TEST_VG})
         add_test(
             NAME ${test_name}
-            COMMAND valgrind --leak-check=full --error-exitcode=1 $<TARGET_FILE:${test_ame}>
+            COMMAND valgrind --leak-check=full --error-exitcode=1 $<TARGET_FILE:${test_name}>
             )
     else()
         add_test(NAME ${test_name} COMMAND ${test_name})


disable ctest on the farm (fix #460)

disable ctest on the farm (fix #460)

--- cmake/test/tests.cmake
+++ cmake/test/tests.cmake
@@ -46,7 +46,11 @@
   return()
 endif()

-enable_testing()
+# do not enable ctest's on the farm, since they are automatically executed by the current rules files
+# and since the tests have not been build rostests would hang forever
+if(NOT CATKIN_BUILD_BINARY_PACKAGE)
+  enable_testing()
+endif()

 # allow overriding CATKIN_TEST_RESULTS_DIR when explicitly passed to CMake as a command line argument
 if(DEFINED CATKIN_TEST_RESULTS_DIR)


Compilation on linux (CMake)

Compilation on linux (CMake)

--- cmake/modules/ALICEMacros.cmake
+++ cmake/modules/ALICEMacros.cmake
@@ -255,6 +255,49 @@

 Endif(ALICE_TARGET STREQUAL linuxx8664gcc)

+# linux
+If(ALICE_TARGET STREQUAL linux)
+
+
+  Set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -shared -Wl")
+
+  Set(CMAKE_Fortran_FLAGS "-fno-second-underscore -m32")
+
+  Set(CLIBDEFS "-DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ")
+
+  Set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -pipe -W -Wall -Weffc++ -Woverloaded-virtual -fmessage-length=0 -Wno-long-long -Dlinux -I/usr/X11R6/include")
+  Set(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} -m32 -Wall -W -pipe")
+
+  If(CMAKE_Fortran_COMPILER MATCHES g95)
+    Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fbounds-check -ftrace=full -DFORTRAN_G95")
+    Execute_process(COMMAND g95 --print-search-dirs
+      OUTPUT_VARIABLE _out)
+    String(REGEX REPLACE "^.*install: *([^\n]*)/\n.*$" "\\1" _libdir ${_out})
+    Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} -L${_libdir} -lf95")
+  Else(CMAKE_Fortran_COMPILER MATCHES g95)
+    Set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -DFORTRAN_GFORTRAN")
+    Execute_process(
+      COMMAND gfortran -m32 -print-file-name=libgfortran.so
+      OUTPUT_VARIABLE FLIB
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
+    Execute_process(
+      COMMAND gfortran -m32 -print-file-name=libgfortranbegin.a
+      OUTPUT_VARIABLE FLIB
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    Set(ROOT_LIBRARIES "${ROOT_LIBRARIES} ${FLIB}")
+  Endif(CMAKE_Fortran_COMPILER MATCHES g95)
+
+  Set(LINK_FLAGS "${LINK_FLAGS} -m32")
+
+  Set(ALIROOT_LIBRARIES "${ROOT_LIBRARIES}")
+
+  Set(ALIROOT_INCLUDE_DIR ${ROOT_INCLUDE_DIR} /usr/X11/include)
+
+  Set(LINK_FLAGS "${LINK_FLAGS}")
+
+Endif(ALICE_TARGET STREQUAL linux)
+
 # macosx
 If(ALICE_TARGET STREQUAL macosx)

@@ -438,108 +481,6 @@
 #
 #
 #
-# ../build/Makefile.linux
-# # -*- mode: makefile -*-
-# # Makefile to build AliRoot for Linux
-#
-# # System dependent commands
-#
-# XARGS = xargs -r
-#
-# # The compilers
-# CXX           = g++
-# CC	      = gcc
-# CCMAJORV      = $(shell $(CC) -dumpversion | cut -d. -f1)
-# CCMINORV      = $(shell $(CC) -dumpversion | cut -d. -f2)
-# F77	      = $(shell root-config --f77)
-#
-# # Global optimisation
-# OPT           = -O -g
-# NOOPT         = -g
-#
-# CXXOPT        = $(OPT)
-# CXXNOOPT      = $(NOOPT)
-# COPT	      = $(OPT)
-# FOPT	      = $(OPT)
-#
-# # CERNLIB defines
-# CLIBDEFS      = -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ
-# CLIBCXXOPTS   =
-# CLIBCOPT      =
-# CLIBFOPT      = $(CLIBDEFS)
-#
-# # Compiler flags
-# ifeq ($(CCMAJORV),2)
-# CXXFLAGS       = $(OPT) -W -Wall -fPIC -pipe
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -fPIC -pipe
-# else
-# ifeq ($(CCMAJORV),3)
-# CXXFLAGS       = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
-# else
-# ifeq ($(CCMAJORV),4)
-# CXXFLAGS       = $(OPT) -W -Wall -Weffc++ -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi -Dlinux
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -pedantic-errors -ansi
-# else
-# CXXFLAGS       = $(OPT) -W -Wall -Woverloaded-virtual -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi -Dlinux
-# CXXFLAGSNO     = $(NOOPT) -W -Wall -Weffc++ -fPIC -pipe -fmessage-length=0 -Wno-long-long -ansi
-# endif
-# endif
-# endif
-# CFLAGS	       = $(OPT) -Wall -Werror -fPIC -pipe -Wno-long-long -pedantic-errors -ansi
-# FFLAGS         = $(CLIBFOPT) $(FOPT) -fno-second-underscore
-#
-# ifeq (g95,$(F77))
-# FFLAGS	      +=-DFORTRAN_G95
-# else
-# ifeq (gfortran,$(F77))
-# FFLAGS	      +=-DFORTRAN_GFORTRAN
-# else
-# FFLAGS	      +=
-# endif
-# endif
-#
-# # rmkdepend flags for building dependencies of FORTRAN files
-# DEPENDFFLAGS   = $(FFLAGS)
-#
-# # rootcint flags
-# CINTFLAGS     =
-#
-# LD            = g++
-# LDFLAGS       = $(OPT)
-#
-# SHLD	      = $(LD)
-# SOFLAGS       = $(OPT) -shared -Wl
-# SOEXT 	      = so
-#
-# #System libraries
-# SYSLIBS      := -ldl -lcrypt -L/usr/X11R6/lib -lX11
-#
-# ifeq (g95,$(F77))
-# SHLIB += -L$(shell g95 --print-search-dirs | sed -n -e 's/install: //p') -lf95
-# else
-# ifeq (gfortran,$(F77))
-# SHLIB := $(shell gfortran -print-file-name=libgfortran.so)
-# SHLIB += $(shell gfortran -print-file-name=libgfortranbegin.a)
-# SYSLIBS += $(SHLIB)
-# else
-# SHLIB         = -lg2c
-# SYSLIBS +=  -lg2c
-# endif
-# endif
-#
-# ALLD	      = ar
-# ALFLAGS       = cr
-# ALLIB         =
-# AEXT 	      = a
-#
-# # additional ROOT libraries
-#
-#
-#
-#
-#
-#
 # ../build/Makefile.linuxalphagcc
 # # -*- mode: makefile -*-
 # # Makefile to build AliRoot for Linux on alpha


Put TCL_TCLSH logic here where it belongs and also remove perl logic which
has nothing to do with tcl now.

svn path=/trunk/; revision=7052

--- cmake/modules/tcl-related.cmake
+++ cmake/modules/tcl-related.cmake
@@ -47,19 +47,6 @@
 #			 Otherwise, undefined.
 #			 Used for source file configuration.)

-# AM: Hack - replace Perl script by equivalent Tcl script
-set(PERL_FOUND TRUE)
-if(ENABLE_tcl AND NOT PERL_FOUND)
-  message(STATUS
-  "WARNING: perl not found which is required to generate Tcl interface"
-  )
-  message(STATUS "Disabling everything that is Tcl/Tk related")
-  set(ENABLE_tcl OFF CACHE BOOL "Enable Tcl bindings" FORCE)
-  set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
-  set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
-  set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
-endif(ENABLE_tcl AND NOT PERL_FOUND)
-
 if(ENABLE_tcl)
   message(STATUS "Looking for include paths and libraries for Tcl/Tk")
   find_package(TCL)
@@ -68,6 +55,19 @@
     message(STATUS
     "Looking for include paths and libraries for Tcl/Tk - found"
     )
+    message(STATUS "Looking for tclsh")
+    include(FindTclsh)
+    if(TCL_TCLSH)
+      message(STATUS "Looking for tclsh - found")
+    else(TCL_TCLSH)
+      message(STATUS "Looking for tclsh - not found")
+    endif(TCL_TCLSH)
+  else(TCL_FOUND)
+    message(STATUS
+    "Looking for include paths and libraries for Tcl/Tk - not found"
+    )
+  endif(TCL_FOUND)
+  if(TCL_FOUND AND TCL_TCLSH)
     if(ENABLE_itcl)
       message(STATUS "Looking for itcl.h")
       find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH})
@@ -129,14 +129,11 @@
         set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
       endif(ITK_INCLUDE_PATH)
     endif(ENABLE_itk)
-  else(TCL_FOUND)
-    message(STATUS
-    "Looking for include paths and libraries for Tcl/Tk - not found"
-    )
+  else(TCL_FOUND AND TCL_TCLSH)
     message(STATUS "Disabling everything that is Tcl/Tk related")
     set(ENABLE_tcl OFF CACHE BOOL "Enable Tcl bindings" FORCE)
     set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE)
     set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE)
     set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE)
-  endif(TCL_FOUND)
+  endif(TCL_FOUND AND TCL_TCLSH)
 endif(ENABLE_tcl)


swig/python: doc

swig/python: doc

--- cmake/qibuild/swig/python.cmake
+++ cmake/qibuild/swig/python.cmake
@@ -3,16 +3,16 @@

 include(CMakeParseArguments)

-#############
-#
-# Nice wrapper for swig.
-#
-# wrap_python(module_name interface_file SRCS srcs... DEPENDENCIES deps ...)
+#! Python wrapper for swig.
 #
 # /!\ The module_name must be the same as the one declare in ${interface_file}
 # for instance, if module_name equals foo, foo.i must contain:
 #   %module foo
-##############
+#
+# \arg:module_name the target name
+# \arg:interface_file the swig interface file (extension is .i)
+# \group:SRC The list of source files
+# \group:DEPENDS The list of source files
 function(qi_swig_wrap_python module_name interface_file)
   cmake_parse_arguments(ARG "" "" "SRC;DEPENDS" ${ARGN})


Only statically link boost on Windows.

Only statically link boost on Windows.

--- bin/dsn.cmake
+++ bin/dsn.cmake
@@ -286,7 +286,7 @@
     endif()

     set(Boost_USE_MULTITHREADED            ON)
-    if(${STATIC_LINK})
+	if(MSVC)#${STATIC_LINK})
         set(Boost_USE_STATIC_LIBS        ON)
         set(Boost_USE_STATIC_RUNTIME    ON)
     else()


Typo

Typo

Former-commit-id: 743d1bd10c0cf691108a9301b003e04366f2aee1

--- cmake-modules/CompilerFlags.cmake
+++ cmake-modules/CompilerFlags.cmake
@@ -118,7 +118,7 @@

 # when building, don't use the install RPATH already (but later on when installing)
 # Note: Since DMRG++ is often run from the build folder we want to keep the build-folder RPATH in the executable.
-#       Therefore itt makes sense to keep this setting "FALSE" here but "TRUE" for dependencies that are
+#       Therefore it makes sense to keep this setting "FALSE" here but "TRUE" for dependencies that are
 #       installed with in "fetch" mode with externalproject_add
 set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)


cmake: don't warn about missing MIC SDK

cmake: don't warn about missing MIC SDK

a status message is enough. it's perfectly fine to work on a non-MIC
development environment.

Signed-off-by: Matthias Kretz <372ea4eca737a13cd010ee806d4ce7b98ee71550@kde.org>

--- cmake/FindMIC.cmake
+++ cmake/FindMIC.cmake
@@ -168,7 +168,7 @@
       set(MIC_CXX_FLAGS)
    endif()
 else()
-   message(WARNING "MIC SDK was not found!")
+   message(STATUS "MIC SDK was not found!")
 endif()

 if(MIC_NATIVE_FOUND)


Use VERSION_GREATER_EQUAL

Use VERSION_GREATER_EQUAL

--- cmake/FindRPM.cmake
+++ cmake/FindRPM.cmake
@@ -30,7 +30,7 @@
 if(RPM_VERSION)
 	string(COMPARE GREATER "4.6" ${RPM_VERSION} RPM46_FOUND)
 	string(COMPARE GREATER "4.7" ${RPM_VERSION} RPM47_FOUND)
-	if(NOT (RPM_VERSION VERSION_LESS "4.18"))
+	if(RPM_VERSION VERSION_GREATER_EQUAL "4.18")
 		set(RPM418_FOUND 1)
 	endif()
 endif()


PKG: declare libomp as system lib in macOS package

--- Packaging/PackageGlobals.cmake
+++ Packaging/PackageGlobals.cmake
@@ -141,6 +141,7 @@
   OpenGL.framework
   libgcc_s.*dylib
   libcups.*dylib
+  libomp.dylib
   )

 if(WIN32)


Check new GCC ABI in configure step and eventually fail configuration

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -1,6 +1,7 @@
 #---------------------------------------------------------------------------------------------------
 #  CheckCompiler.cmake
 #---------------------------------------------------------------------------------------------------
+include (CheckCXXSourceCompiles)

 #---Enable FORTRAN (unfortunatelly is not not possible in all cases)-------------------------------
 if(fortran)
@@ -52,6 +53,15 @@
   endif()
   message(STATUS "Found GCC. Major version ${GCC_MAJOR}, minor version ${GCC_MINOR}")
   set(COMPILER_VERSION gcc${GCC_MAJOR}${GCC_MINOR}${GCC_PATCH})
+  CHECK_CXX_SOURCE_COMPILES("
+    #include <string>
+    #if _GLIBCXX_USE_CXX11_ABI
+    #error \"cling does not support GCC 5 ABI.\"
+    #endif
+    int main() {}" CXX_SUPPORTS_OLD_ABI)
+  if(NOT CXX_SUPPORTS_OLD_ABI)
+     message(FATAL_ERROR "Found GCC compiler with new ABI. Cling does not support the GCC 5 ABI yet")
+  endif()
 else()
   set(GCC_MAJOR 0)
   set(GCC_MINOR 0)


Add the missing source file to the target onnxruntime_test_debug_node… (#7676)

* Add the missing source file to the target onnxruntime_test_debug_node_inputs_outputs

--- cmake/onnxruntime_unittests.cmake
+++ cmake/onnxruntime_unittests.cmake
@@ -1022,6 +1022,7 @@
     SOURCES
       "${TEST_SRC_DIR}/debug_node_inputs_outputs/debug_node_inputs_outputs_utils_test.cc"
       "${TEST_SRC_DIR}/framework/TestAllocatorManager.cc"
+      "${TEST_SRC_DIR}/framework/test_utils.cc"
       "${TEST_SRC_DIR}/providers/provider_test_utils.cc"
       ${onnxruntime_unittest_main_src}
     LIBS ${onnxruntime_test_providers_libs} ${onnxruntime_test_common_libs}


Try to fix cotire errors in PPA servers

Try to fix cotire errors in PPA servers

--- cmakemodules/DeclareMRPTLib.cmake
+++ cmakemodules/DeclareMRPTLib.cmake
@@ -281,6 +281,7 @@
 					list(APPEND COTIRE_PREFIX_HEADER_IGNORE_PATH
 						"${OpenCV_INCLUDE_DIR}"
 						"${MRPT_LIBS_ROOT}/${name}/src"
+						"/usr/"  # avoid problems with Cotire trying to include internal GCC headers, not suitable for direct use.
 					)
 					set_target_properties(mrpt-${name} PROPERTIES
 						COTIRE_PREFIX_HEADER_IGNORE_PATH "${COTIRE_PREFIX_HEADER_IGNORE_PATH}"


Quieter find libusb

Quieter find libusb

--- cmakemodules/Findlibusb-1.0.cmake
+++ cmakemodules/Findlibusb-1.0.cmake
@@ -81,11 +81,11 @@
   endif (LIBUSB_1_INCLUDE_DIRS AND LIBUSB_1_LIBRARIES)

   if (LIBUSB_1_FOUND)
-    if (NOT libusb_1_FIND_QUIETLY)
+    if ($ENV{VERBOSE})
       message(STATUS "Found libusb-1.0:")
 	  message(STATUS " - Includes: ${LIBUSB_1_INCLUDE_DIRS}")
 	  message(STATUS " - Libraries: ${LIBUSB_1_LIBRARIES}")
-    endif (NOT libusb_1_FIND_QUIETLY)
+    endif ($ENV{VERBOSE})
   else (LIBUSB_1_FOUND)
     if (libusb_1_FIND_REQUIRED)
       message(FATAL_ERROR "Could not find libusb")


Move config

Move config

svn path=/trunk/KDE/kdenetwork/kppp/; revision=540656

--- config-kppp.h.cmake
+++ config-kppp.h.cmake
@@ -2,3 +2,6 @@
 /* Define to 1 if you have the <linux/if_ppp.h> header file. */
 #cmakedefine HAVE_LINUX_IF_PPP_H 1

+/* Define to 1 if you have the <net/if_ppp.h> header file. */
+#cmakedefine HAVE_NET_IF_PPP_H 1
+


Only copy file if different, and use cmake internal path names rather than system specific ones

--- build/modules/AddPBJTarget.cmake
+++ build/modules/AddPBJTarget.cmake
@@ -137,12 +137,8 @@
   ENDFOREACH()

   IF(PBJ_OUTPUTCPPFILE)
-    FILE(TO_NATIVE_PATH ${PBJ_GenFile} PBJ_src)
-    FILE(TO_NATIVE_PATH ${PBJ_OUTPUTCPPFILE} PBJ_dst)
-
-
     ADD_CUSTOM_COMMAND(OUTPUT ${PBJ_OUTPUTCPPFILE}
-                       COMMAND ${CMAKE_COMMAND} -E copy ${PBJ_src} ${PBJ_dst}
+                       COMMAND ${CMAKE_COMMAND} -E copy_if_different ${PBJ_GenFile} ${PBJ_OUTPUTCPPFILE}
                        DEPENDS ${PBJ_CPP_FILES}
                        COMMENT "Creating protocol buffers cpp file")
   ENDIF()


fix cmake problem and enable it to find libopenblas.dll.a on windows

--- cmake/Modules/FindOpenBLAS.cmake
+++ cmake/Modules/FindOpenBLAS.cmake
@@ -1,4 +1,5 @@

+file(TO_CMAKE_PATH $ENV{OpenBLAS_HOME} OpenBLAS_HOME)

 SET(Open_BLAS_INCLUDE_SEARCH_PATHS
   /usr/include
@@ -10,8 +11,8 @@
   /opt/OpenBLAS/include
   ${PROJECT_SOURCE_DIR}/3rdparty/OpenBLAS/include
   ${PROJECT_SOURCE_DIR}/thirdparty/OpenBLAS/include
-  $ENV{OpenBLAS_HOME}
-  $ENV{OpenBLAS_HOME}/include
+  ${OpenBLAS_HOME}
+  ${OpenBLAS_HOME}/include
 )

 SET(Open_BLAS_LIB_SEARCH_PATHS
@@ -28,12 +29,16 @@
         ${PROJECT_SOURCE_DIR}/thirdparty/OpenBLAS/lib
         $ENV{OpenBLAS}cd
         $ENV{OpenBLAS}/lib
-        $ENV{OpenBLAS_HOME}
-        $ENV{OpenBLAS_HOME}/lib
+        ${OpenBLAS_HOME}
+        ${OpenBLAS_HOME}/lib
  )

 FIND_PATH(OpenBLAS_INCLUDE_DIR NAMES cblas.h PATHS ${Open_BLAS_INCLUDE_SEARCH_PATHS})
-FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
+IF(MSVC)
+	FIND_FILE(OpenBLAS_LIB NAMES libopenblas.dll.a PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
+ELSE(MSVC)
+	FIND_LIBRARY(OpenBLAS_LIB NAMES openblas PATHS ${Open_BLAS_LIB_SEARCH_PATHS})
+ENDIF()

 SET(OpenBLAS_FOUND ON)


Better package file name

Better package file name

--- cmake/medinria-pluginsPack.cmake
+++ cmake/medinria-pluginsPack.cmake
@@ -1,7 +1,22 @@
 include (InstallRequiredSystemLibraries)

 set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
-set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}")
+
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+  #GET distribution id
+  execute_process(COMMAND lsb_release -irs
+    COMMAND sed "s/ //"
+    COMMAND sed "s/Fedora/fc/"
+    OUTPUT_VARIABLE DISTRIB
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  execute_process(COMMAND arch
+    OUTPUT_VARIABLE ARCH
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+  set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-${DISTRIB}-${ARCH}")
+else("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+  set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-${CMAKE_SYSTEM_PROCESSOR}")
+endif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+
 set(CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${${PROJECT_NAME}_VERSION}-src")

 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_NAME})


[cmake] Pass external project source directories to sub-configures

We're passing LLVM_EXTERNAL_PROJECTS to cross-compilation configures, so
we also need to pass the source directories of those projects, otherwise
configuration can fail from not finding them.

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

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -1,3 +1,4 @@
+include(AddLLVM)
 include(LLVMExternalProjectUtils)

@@ -57,6 +58,13 @@
   string(REPLACE ";" "$<SEMICOLON>" llvm_external_projects_arg
          "${LLVM_EXTERNAL_PROJECTS}")

+  set(external_project_source_dirs)
+  foreach(project ${LLVM_EXTERNAL_PROJECTS})
+    canonicalize_tool_name(${project} name)
+    list(APPEND external_project_source_dirs
+         "-DLLVM_EXTERNAL_${name}_SOURCE_DIR=${LLVM_EXTERNAL_${name}_SOURCE_DIR}")
+  endforeach()
+
   add_custom_command(OUTPUT ${${project_name}_${target_name}_BUILD}/CMakeCache.txt
     COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
         -DCMAKE_MAKE_PROGRAM="${CMAKE_MAKE_PROGRAM}"
@@ -69,6 +77,7 @@
         -DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}"
         -DLLVM_ENABLE_PROJECTS="${llvm_enable_projects_arg}"
         -DLLVM_EXTERNAL_PROJECTS="${llvm_external_projects_arg}"
+        ${external_project_source_dirs}
         -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
         ${build_type_flags} ${linker_flag} ${external_clang_dir}
         ${ARGN}


Use Release configuration for ctest scripting.

--- cmake/usCTestScript_custom.cmake
+++ cmake/usCTestScript_custom.cmake
@@ -12,7 +12,9 @@
   #set(CTEST_COMPILER "gcc-4.5")
 endif()

-set(CTEST_CONFIGURATION_TYPE Debug)
+set(CTEST_CONFIGURATION_TYPE Release)
+set(CTEST_BUILD_CONFIGURATION Release)
+
 set(CTEST_PARALLEL_LEVEL 4)

 set(US_TEST_SHARED 1)


New DISABLE_ flag in CMake for libusb0.0

--- cmakemodules/script_kinect.cmake
+++ cmakemodules/script_kinect.cmake
@@ -1,10 +1,17 @@
 # Look for the libusb1 lib
 # ------------------------------
-IF(UNIX)
-	IF(PKG_CONFIG_FOUND)
-        	PKG_CHECK_MODULES(PKG_LIBUSB10 libusb-1.0)
-	ENDIF(PKG_CONFIG_FOUND)
-ENDIF(UNIX)
+OPTION(DISABLE_LIBUSB "Force to not detecting the libusb library" OFF)
+mark_as_advanced(DISABLE_LIBUSB)
+
+IF (NOT DISABLE_LIBUSB)
+	IF(UNIX)
+		IF(PKG_CONFIG_FOUND)
+			PKG_CHECK_MODULES(PKG_LIBUSB10 libusb-1.0)
+		ENDIF(PKG_CONFIG_FOUND)
+	ENDIF(UNIX)
+ELSE (NOT DISABLE_LIBUSB)
+	SET(PKG_LIBUSB10_FOUND "")
+ENDIF (NOT DISABLE_LIBUSB)

 # Build the XBox Kinect support (via libfreenect)


Fix comment in ffig.cmake (#113)

Fix comment in ffig.cmake (#113)

The `RUBY` part should say `PYTHON`.

--- cmake/ffig.cmake
+++ cmake/ffig.cmake
@@ -23,7 +23,7 @@
 #
 # Optional bindings can be created by passing in any of the optional arguments:
 # * RUBY - creates myModuleName.rb
-# * RUBY - creates myModuleName.py
+# * PYTHON - creates myModuleName.py
 # * CPP - creates myModuleName_cpp.h
 # * CPP_MOCKS - creates myModuleName_mocks.h


Correct include version for I2C (#497)

Correct include version for I2C (#497)

--- CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
+++ CMake/Modules/CHIBIOS_STM32F4xx_sources.cmake
@@ -65,7 +65,7 @@
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2
             ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2
-            if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL")
+            if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL")
                 ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1
             else()
                 ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2
@@ -96,7 +96,7 @@
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DACv1)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/DMAv2)
 list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/GPIOv2)
-if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL")
+if(${CHIBIOS_BOARD} STREQUAL "ST_STM32F429I_DISCOVERY" OR ${CHIBIOS_BOARD} STREQUAL "ST_STM32F4_DISCOVERY" OR ${CHIBIOS_BOARD} STREQUAL "MBN_QUAIL")
     list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv1)
 else()
     list(APPEND CHIBIOS_INCLUDE_DIRS ${PROJECT_BINARY_DIR}/ChibiOS_Source/os/hal/ports/STM32/LLD/I2Cv2)


cmake: do not use link groups

cmake: do not use link groups

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -356,8 +356,6 @@
     add_executable(${project_elf} "${project_elf_src}")
     add_dependencies(${project_elf} _project_elf_src)

-    target_link_libraries(${project_elf} "-Wl,--start-group")
-
     if(test_components)
         target_link_libraries(${project_elf} "-Wl,--whole-archive")
         foreach(test_component ${test_components})


Upgrading iOS deployment target

Upgrading iOS deployment target

--- core/cmake/toolchains/ios.cmake
+++ core/cmake/toolchains/ios.cmake
@@ -5,7 +5,7 @@
   CACHE STRING "ios_archs"
 )

-set(IOS_DEPLOYMENT_TARGET 6.0
+set(IOS_DEPLOYMENT_TARGET 10.0
   CACHE STRING "ios_deployment_target"
 )


Rework output filename of tarballs

Rework output filename of tarballs

--- cmake/CPackConfig.cmake
+++ cmake/CPackConfig.cmake
@@ -6,16 +6,21 @@
 SET(CPACK_PACKAGE_ICON "doc/logo_small.png")
 SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE.md")

-# Set version dervied from project version:
-SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
-SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
-IF("${PROJECT_VERSION_PATCH}" STREQUAL "")
-    SET(CPACK_PACKAGE_VERSION_PATCH "0")
+# Figure out, which system we are running on:
+IF(DEFINED ENV{BUILD_FLAVOUR})
+    SET(CPACK_SYSTEM_NAME $ENV{BUILD_FLAVOUR})
 ELSE()
-    SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
+    SET(CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}")
 ENDIF()

-SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-latest_$ENV{BUILD_FLAVOUR}")
+# Set version dervied from project version, or "latest" for untagged:
+IF(NOT TAG_FOUND)
+    SET(CPACK_PACKAGE_VERSION "latest")
+ELSE()
+    SET(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
+ENDIF()
+
+SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")

 # Configure the targets and components to include
 SET(CPACK_GENERATOR "TGZ")


Forgot to revert from test

Forgot to revert from test

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

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -13,7 +13,7 @@
 INCLUDE(FindLibraryWithDebug)

 if(NOT CLUCENE_MIN_VERSION)
-  set(CLUCENE_MIN_VERSION "0.9.21")
+  set(CLUCENE_MIN_VERSION "0.9.16")
 endif(NOT CLUCENE_MIN_VERSION)

 IF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)


removed unused lines in FindJsoncpp

removed unused lines in FindJsoncpp

--- cmake/FindJsoncpp.cmake
+++ cmake/FindJsoncpp.cmake
@@ -31,12 +31,6 @@
 # boost is using the same "hack" as us with "optimized" and "debug"
 if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")

-	if (CMAKE_CL_64)
-		set(JSONCPP_NAMES_DEBUG jsoncppd_x64)
-	else ()
-		set(JSONCPP_NAMES_DEBUG jsoncppd)
-	endif()
-
 	find_library(
 		JSONCPP_LIBRARY_DEBUG
 		NAMES jsoncppd


Do not add built plugins inside tundra/bin/plugins/[Release|RelWithDebInfo|Debug] when making Xcode project, but put all plugins in same folder

--- cmake/ModuleSetup.cmake
+++ cmake/ModuleSetup.cmake
@@ -63,6 +63,7 @@
             # set target directory
             if (APPLE)
                 set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -flat_namespace")
+                set_target_properties (${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_CONFIGURATION_BUILD_DIR ${TARGET_DIR})
             endif()
             set_target_properties (${TARGET_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${TARGET_DIR})
             set_target_properties (${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TARGET_DIR})


fix: forgotten stm32f205xxx

fix: forgotten stm32f205xxx

--- cmake/gcc_stm32f2.cmake
+++ cmake/gcc_stm32f2.cmake
@@ -10,7 +10,7 @@
 SET(STM32_CODES "205.B" "205.C" "205.E" "205.F" "205.G" "215.E" "215.G" "207.C" "207.E" "207.F" "207.G" "217.E" "217.G")

 MACRO(STM32_GET_CHIP_TYPE CHIP CHIP_TYPE)
-    STRING(REGEX REPLACE "^[sS][tT][mM]32[fF](2[01]7.[BCDEFG]).+$" "\\1" STM32_CODE ${CHIP})
+    STRING(REGEX REPLACE "^[sS][tT][mM]32[fF](2[01][57].[BCDEFG]).+$" "\\1" STM32_CODE ${CHIP})
     SET(INDEX 0)
     FOREACH(C_TYPE ${STM32_CHIP_TYPES})
         LIST(GET STM32_CODES ${INDEX} CHIP_TYPE_REGEXP)
@@ -23,7 +23,7 @@
 ENDMACRO()

 MACRO(STM32_GET_CHIP_PARAMETERS CHIP FLASH_SIZE RAM_SIZE)
-    STRING(REGEX REPLACE "^[sS][tT][mM]32[fF]2[01]7.([BCDEFG])" "\\1" STM32_SIZE_CODE ${CHIP})
+    STRING(REGEX REPLACE "^[sS][tT][mM]32[fF]2[01][57].([BCDEFG]).*" "\\1" STM32_SIZE_CODE ${CHIP})

     IF(STM32_SIZE_CODE STREQUAL "B")
         SET(FLASH "128K")
@@ -59,7 +59,7 @@
         MESSAGE(FATAL_ERROR "Invalid/unsupported STM32F2 chip type: ${CHIP_TYPE}")
     ENDIF()

-    STRING(REGEX REPLACE "^(2[01]7).[BCDEFG]" "\\1" DEVICE_NUM ${STM32_CHIP_TYPE})
+    STRING(REGEX REPLACE "^(2[01][57]).[BCDEFG]" "\\1" DEVICE_NUM ${STM32_CHIP_TYPE})

     GET_TARGET_PROPERTY(TARGET_DEFS ${TARGET} COMPILE_DEFINITIONS)
     IF(TARGET_DEFS)


CMake: Linux fix

CMake: Linux fix

--- cmake/globalutils.cmake
+++ cmake/globalutils.cmake
@@ -510,24 +510,24 @@
         if(CMAKE_MATCH_1)
             set(${retval} 64 PARENT_SCOPE)
             return()
-       endif()
-       string(REGEX MATCH "(i386)" found_32bit ${result})
-       if(CMAKE_MATCH_1)
+        endif()
+        string(REGEX MATCH "(i386)" found_32bit ${result})
+        if(CMAKE_MATCH_1)
             set(${retval} 32 PARENT_SCOPE)
             return()
-       endif()
+        endif()
     else()
         execute_process(COMMAND file -L -b ${lib} OUTPUT_VARIABLE result)
-        string(REGEX MATCH "x86_64" found_64bit ${result})
+        string(REGEX MATCH "(x86-64)" found_64bit ${result})
         if(CMAKE_MATCH_1)
             set(${retval} 64 PARENT_SCOPE)
             return()
-       endif()
-       string(REGEX MATCH "80386" found_32bit ${result})
-       if(CMAKE_MATCH_1)
+        endif()
+        string(REGEX MATCH "(80386)" found_32bit ${result})
+        if(CMAKE_MATCH_1)
             set(${retval} 32 PARENT_SCOPE)
             return()
-       endif()
+        endif()
     endif()

     set(${retval} 0 PARENT_SCOPE)


Add C++ check for broken isnan(). All C++ specific checks are now done.
No attempt to tweak compiler flags yet. Let's see what cmake does first.

svn path=/trunk/; revision=6747

--- cmake/modules/c++.cmake
+++ cmake/modules/c++.cmake
@@ -33,6 +33,7 @@
 CHECK_INCLUDE_FILE_CXX(cmath HAVE_CMATH)

 # Need to add check for broken cmath with isnan missing (BROKEN_ISNAN_CXX)
+INCLUDE(TestBrokenIsnanCXX)

 # Need to add check if stdint.h can be used from c++ (HAVE_CXX_STDINT_H)
 INCLUDE(TestForStdintCXX)


Better Windows support in Findlily.cmake (fixes #504).

--- Findlily.cmake
+++ Findlily.cmake
@@ -16,16 +16,15 @@
 #     This function is intended for projects that export a single extension
 #     library for the interpreter to load.

-set(_LILY_BASE_PATH "${CMAKE_INSTALL_PREFIX}")
-
 if(WIN32)
-    set(_LILY_BASE_PATH "${_LILY_BASE_PATH}/../lily")
-
     find_library(_LILY_STATIC_LIBRARY
                  NAMES
-                     "liblily.lib"
-                 PATHS
-                     "${_LILY_BASE_PATH}/lib")
+                     Lily/lib/liblily.lib)
+
+    get_filename_component(_LILY_BASE_PATH ${_LILY_STATIC_LIBRARY} DIRECTORY)
+    set(_LILY_BASE_PATH ${_LILY_BASE_PATH}/..)
+else()
+    set(_LILY_BASE_PATH ${CMAKE_INSTALL_PREFIX})
 endif()

 find_path(LILY_INCLUDE_DIRS
@@ -48,22 +47,28 @@
     message(FATAL_ERROR "Could not find Lily.")
 endif()

-function(lily_add_library _LIBRARY_NAME TARGETS)
+function(lily_add_library _LIBRARY_NAME)
     set(_LIBRARY_SOURCES ${ARGV})
+    set(_OUT_DIR         ${PROJECT_BINARY_DIR}/src)
+
     list(REMOVE_AT _LIBRARY_SOURCES 0)
-
-    add_library("${_LIBRARY_NAME}" SHARED "${_LIBRARY_SOURCES}")
+    add_library(${_LIBRARY_NAME} SHARED ${_LIBRARY_SOURCES})

     if(WIN32)
-        target_link_libraries("${_LIBRARY_NAME}" "${_LILY_STATIC_LIBRARY}")
+        target_link_libraries(${_LIBRARY_NAME} ${_LILY_STATIC_LIBRARY})
     endif()

-    target_include_directories("${_LIBRARY_NAME}" PUBLIC "${LILY_INCLUDE_DIRS}")
+    target_include_directories(${_LIBRARY_NAME} PUBLIC ${LILY_INCLUDE_DIRS})

-    set_target_properties("${_LIBRARY_NAME}" PROPERTIES
-            PREFIX
-                ""
-            LIBRARY_OUTPUT_DIRECTORY
-                "${PROJECT_BINARY_DIR}/src"
+    set_target_properties(
+        ${_LIBRARY_NAME}
+        PROPERTIES
+            PREFIX ""
+            LIBRARY_OUTPUT_DIRECTORY         ${_OUT_DIR}
+            LIBRARY_OUTPUT_DIRECTORY_DEBUG   ${_OUT_DIR}
+            LIBRARY_OUTPUT_DIRECTORY_RELEASE ${_OUT_DIR}
+            RUNTIME_OUTPUT_DIRECTORY         ${_OUT_DIR}
+            RUNTIME_OUTPUT_DIRECTORY_DEBUG   ${_OUT_DIR}
+            RUNTIME_OUTPUT_DIRECTORY_RELEASE ${_OUT_DIR}
     )
 endfunction(lily_add_library)


hdf5: search multiple paths for cxx headers

Change-Id: I31f3b974a31bc2f7f6ebf3a9de456b6f54de28e1

--- VAD_HDF5.cmake
+++ VAD_HDF5.cmake
@@ -1,4 +1,13 @@
 set(GIT_REPO "https://github.com/live-clones/hdf5.git")
+
+macro(h5_try_dir PATH)
+  if (NOT _FOUND_H5CPP)
+    find_path(_FOUND_H5CPP H5Cpp.h HINTS ${PATH} NO_DEFAULT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_FIND_ROOT_PATH)
+    if (_FOUND_H5CPP)
+      set_target_properties(hdf5_cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${PATH})
+    endif()
+  endif()
+endmacro()

 function(vad_system)
   message("run VAD_SYSTEM for HDF5")
@@ -12,7 +21,17 @@

   if (NOT TARGET hdf5_cpp)
     add_library(hdf5_cpp INTERFACE IMPORTED)
-    set_target_properties(hdf5_cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${HDF5_CXX_INCLUDE_DIRS};${HDF5_CXX_INCLUDE_DIR}")
+
+    # search cxx header and add to hdf5_cpp target (workaround for various ways that findhdf5/hdf5config are broken on different systems)
+    h5_try_dir("${HDF5_CXX_INCLUDE_DIRS}")
+    h5_try_dir("${HDF5_CXX_INCLUDE_DIR}")
+    h5_try_dir("${HDF5_C_INCLUDE_DIRS}")
+    h5_try_dir("${HDF5_C_INCLUDE_DIR}")
+    h5_try_dir("${HDF5_CXX_INCLUDE_DIRS}/cpp")
+    h5_try_dir("${HDF5_CXX_INCLUDE_DIR}/cpp")
+    h5_try_dir("${HDF5_C_INCLUDE_DIRS}/cpp")
+    h5_try_dir("${HDF5_C_INCLUDE_DIR}/cpp")
+
     set_target_properties(hdf5_cpp PROPERTIES INTERFACE_LINK_LIBRARIES "${HDF5_CXX_LIBRARIES}")
   endif()
 endfunction()


Adds missing changes

Adds missing changes

--- TargetHooks.cmake
+++ TargetHooks.cmake
@@ -3,6 +3,7 @@

 include(CMakeParseArguments)
 include(CppcheckTargets)
+include(CpplintTargets)

 set(ALL_DEP_TARGETS "")
 set(ALL_LIB_TARGETS "")
@@ -12,11 +13,13 @@
 macro(add_executable _target)
   _add_executable(${_target} ${ARGN})
   add_cppcheck(${_target} POSSIBLE_ERROR FAIL_ON_WARNINGS EXCLUDE_QT_MOC_FILES)
+  add_cpplint(${_target} CATEGORY_FILTER_OUT readability/streams EXCLUDE_PATTERN ".*moc_.*\\.cxx|Buildyard/Build")
   set_property(GLOBAL APPEND PROPERTY ALL_DEP_TARGETS ${_target})
 endmacro()
 macro(add_library _target)
   _add_library(${_target} ${ARGN})
   add_cppcheck(${_target} POSSIBLE_ERROR FAIL_ON_WARNINGS EXCLUDE_QT_MOC_FILES)
+  add_cpplint(${_target} CATEGORY_FILTER_OUT readability/streams EXCLUDE_PATTERN ".*moc_.*\\.cxx|Buildyard/Build")

   # ignore IMPORTED add_library from finders (e.g. Qt)
   cmake_parse_arguments(_arg "IMPORTED" "" "" ${ARGN})


Add comment for debugging weird misalignment issues

Former-commit-id: 7c1eb30991af7e7bf8b6cce2cbcf997a762ef4b9

--- cmake-modules/SetupDependenciesConan.cmake
+++ cmake-modules/SetupDependenciesConan.cmake
@@ -156,6 +156,11 @@
             # Something like "double free or corruption ..."
             #   * EIGEN_MAX_ALIGN_BYTES=16 works on Tetralith

+            ### NOTE October 4 2020 ####
+            #
+            # Another flag that seems to fix weird release-only bugs is
+            #       -fno-strict-aliasing
+
             ### NOTE August 26 2020 ####
             #
             # Ceres started crashing on Tetralith again using -march=native.


TEST: fix test command #3

TEST: fix test command #3

--- Packaging/testing.cmake
+++ Packaging/testing.cmake
@@ -33,6 +33,6 @@

 add_test(
   NAME Tu_uninstall_otb
-  COMMAND ${pkg_extracted_dir}/uninstall_otb${my_ext}
+  COMMAND ${pkg_extracted_dir}/tools/uninstall_otb${my_ext}
   WORKING_DIRECTORY ${testing_dir}
   )


Correct hash variable used for SwigWin

Correct hash variable used for SwigWin

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -42,7 +42,7 @@
     # swig.exe available as pre-built binary on Windows:
     ExternalProject_Add(Swig
       URL "${SWIGWIN_URL}"
-      URL_HASH MD5=${SWIG_DOWNLOAD_WIN_HASH}
+      URL_HASH MD5=${SWIGWIN_DOWNLOAD_HASH}
       SOURCE_DIR ${swig_source_dir}
       CONFIGURE_COMMAND ""
       BUILD_COMMAND ""


Bugfix

Bugfix

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

--- deal.II/cmake/configure/configure_boost.cmake
+++ deal.II/cmake/configure/configure_boost.cmake
@@ -38,7 +38,7 @@
       )
   ELSE()
     LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES
-      ${Boost_THREAD_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
+      ${Boost_THREAD_LIBRARY_RELEASE} ${Boost_SERIALIZATION_LIBRARY_RELEASE}
       )
   ENDIF()


cmake: Set ICONV_CONST correctly.

cmake: Set ICONV_CONST correctly.

--- extras/buildsystem/cmake/include/config.cmake
+++ extras/buildsystem/cmake/include/config.cmake
@@ -104,15 +104,18 @@
     check_library_exists(getaddrinfo nsl "" HAVE_GETADDRINFO)
 endif(NOT HAVE_GETADDRINFO)

-set(LIBICONV "")
 vlc_check_functions_exist(iconv)
-
 if(NOT HAVE_ICONV)
     set(LIBICONV "iconv")
     check_library_exists(iconv iconv "" HAVE_ICONV)
 endif(NOT HAVE_ICONV)
-# FIXME: this will break on *BSD:
-set( ICONV_CONST "" )
+CHECK_C_SOURCE_COMPILES(" #include <iconv.h>
+ int main() { return iconv(0, (char **)0, 0, (char**)0, 0); }" ICONV_NO_CONST)
+if( ICONV_NO_CONST )
+  set( ICONV_CONST "const" )
+else( ICONV_NO_CONST )
+  set( ICONV_CONST " ")
+endif( ICONV_NO_CONST )

 check_library_exists(rt clock_nanosleep "" HAVE_CLOCK_NANOSLEEP)
 if (HAVE_CLOCK_NANOSLEEP)


Added a BUILD_BYPRODUCT to ImportPugiXML.cmake for compatibility with Ninja

--- external/ImportPugiXML.cmake
+++ external/ImportPugiXML.cmake
@@ -17,6 +17,7 @@
     CMAKE_ARGS “-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>”
     UPDATE_COMMAND ""
     INSTALL_COMMAND ""
+    BUILD_BYPRODUCTS ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external-build/libpugixml${CMAKE_STATIC_LIBRARY_SUFFIX}
   )

   set(PUGIXML_LIBRARY ${EXTERNAL_BUILD_DIR}/pugixml/src/pugixml_external-build/libpugixml${CMAKE_STATIC_LIBRARY_SUFFIX})


Use the usResourceCompiler target name if available.

This establishes proper build system dependencies, making sure the
executable is build before it is used.

--- Core/Code/CppMicroServices/CMake/usFunctionEmbedResources.cmake
+++ Core/Code/CppMicroServices/CMake/usFunctionEmbedResources.cmake
@@ -79,9 +79,14 @@
     set(us_lib_name "\"\"")
   endif()

+  set(resource_compiler ${CppMicroServices_RCC_EXECUTABLE})
+  if(TARGET ${CppMicroServices_RCC_EXECUTABLE_NAME})
+    set(resource_compiler ${CppMicroServices_RCC_EXECUTABLE_NAME})
+  endif()
+
   add_custom_command(
     OUTPUT ${us_cpp_resource_file}
-    COMMAND ${CppMicroServices_RCC_EXECUTABLE} "${us_lib_name}" ${us_cpp_resource_file} ${absolute_res_files}
+    COMMAND ${resource_compiler} "${us_lib_name}" ${us_cpp_resource_file} ${absolute_res_files}
     WORKING_DIRECTORY ${US_RESOURCE_ROOT_DIR}
     DEPENDS ${absolute_res_files}
     COMMENT "Generating embedded resource file ${us_cpp_resource_name}"


Add Quicktime prebuilt to the list of used libs; Quicktime never got downloaded and the plugin never got build properly if no QT SDK was installed

--- indra/cmake/ViewerMiscLibs.cmake
+++ indra/cmake/ViewerMiscLibs.cmake
@@ -7,6 +7,7 @@
   use_prebuilt_binary(libuuid)
   use_prebuilt_binary(slvoice)
   use_prebuilt_binary(fontconfig)
+  use_prebuilt_binary(quicktime)
 endif(NOT STANDALONE)

 if(VIEWER AND NOT STANDALONE)


CMake: OGRE_LIB_SUFFIX is used on windows as well

--- CMake/ConfigureBuild.cmake
+++ CMake/ConfigureBuild.cmake
@@ -152,20 +152,23 @@
 configure_file(${OGRE_TEMPLATES_DIR}/OgreBuildSettings.h.in ${OGRE_BINARY_DIR}/include/OgreBuildSettings.h @ONLY)
 install(FILES ${OGRE_BINARY_DIR}/include/OgreBuildSettings.h DESTINATION include/OGRE)

+set(OGRE_LIB_SUFFIX "")
+
+if (OGRE_STATIC)
+  set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}Static")
+endif ()
+if (OGRE_BUILD_TYPE STREQUAL "debug")
+  set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}_d")
+endif ()

 # Create the pkg-config package files on Unix systems
 if (UNIX)
-  set(OGRE_LIB_SUFFIX "")
   set(OGRE_PLUGIN_PREFIX "")
   set(OGRE_PLUGIN_EXT ".so")
   set(OGRE_PAGING_ADDITIONAL_PACKAGES "")
   if (OGRE_STATIC)
-    set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}Static")
     set(OGRE_PLUGIN_PREFIX "lib")
     set(OGRE_PLUGIN_EXT ".a")
-  endif ()
-  if (OGRE_BUILD_TYPE STREQUAL "debug")
-    set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}_d")
   endif ()

   set(OGRE_ADDITIONAL_LIBS "")


Adapted Boost.cmake file so that the previously created script is passed as install command for Mac OS X

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -42,9 +42,10 @@
       set(_boost_build_cmd )
     endif()

-    set(POST_BUILD "")
+    set(APPLE_INSTALL_COMMAND "")
     if(APPLE)
-      set(POST_BUILD install_name_tool -id ${CMAKE_CURRENT_BINARY_DIR}/${proj}-install/lib/libboost_thread.dylib ${CMAKE_CURRENT_BINARY_DIR}/${proj}-install/lib/libboost_thread.dylib)
+      configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeExternals/ChangeBoostLibsInstallNameForMac.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${proj}-cmake/ChangeBoostLibsInstallNameForMac.cmake @ONLY)
+      set(APPLE_INSTALL_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/${proj}-cmake/ChangeBoostLibsInstallNameForMac.cmake)
     endif()

     ExternalProject_Add(${proj}
@@ -57,8 +58,7 @@
       INSTALL_DIR ${proj}-install
       CONFIGURE_COMMAND "${_boost_cfg_cmd}"
       BUILD_COMMAND "${_boost_build_cmd}"
-      INSTALL_COMMAND ""
-      ${POST_BUILD}
+      INSTALL_COMMAND ${APPLE_INSTALL_COMMAND}
       DEPENDS ${proj_DEPENDENCIES}
       )


tpyo

tpyo

svn path=/trunk/KDE/kdepim/kleopatra/; revision=805888

--- kleopatra/ConfigureChecks.cmake
+++ kleopatra/ConfigureChecks.cmake
@@ -133,7 +133,7 @@
   set ( YUP TRUE )
   if ( YUP )
     set ( ASSUAN_LINKABLE_TO_DSO true )
-    message( STATUS "--> Assuming that is can. If compilation of libkleopatraclient fails on AMD64, check that libassuan is compiled with -fPIC and try again. Otherwise, pass -DBUILD_libkleopatraclient=OFF." )
+    message( STATUS "--> Assuming that it can. If compilation of libkleopatraclient fails on AMD64, check that libassuan is compiled with -fPIC and try again. Otherwise, pass -DBUILD_libkleopatraclient=OFF." )
   else ( YUP )
   # TODO: make this one executed at configure time, so the check below works:
   add_library( dso_with_assuan_check SHARED ${CMAKE_SOURCE_DIR}/kleopatra/dso_with_assuan_check.c )


to let the output file name unique so that we can import it easily

--- build/cmake/ThriftMacros.cmake
+++ build/cmake/ThriftMacros.cmake
@@ -18,7 +18,7 @@
 #

-set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)
+#set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)

 macro(ADD_LIBRARY_THRIFT name)


Don't version this anymore

Don't version this anymore

--- cmake/FindDO.cmake
+++ cmake/FindDO.cmake
@@ -1,86 +0,0 @@
-# Load DO-specific macros
-include(DOMacros)
-
-set(DO_VERSION 1.0.0)
-
-################################################################################
-# DEBUG: Which project calls FindDO.cmake?
-do_step_message("FindDO running for project '${PROJECT_NAME}'")
-
-################################################################################
-# Setup DO++ once for all for every test projects in the 'test' directory.
-if (NOT DO_FOUND)
-    if (DEFINED ENV{DO_DIR} AND EXISTS "$ENV{DO_DIR}/cmake/FindDO.cmake") # Check if DO++ is installed
-        string(REPLACE "\\" "/" DO_DIR "$ENV{DO_DIR}")
-        set(DO_INCLUDE_DIR ${DO_DIR}/include)
-    elseif (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/cmake/FindDO.cmake") # DO++ needs to be built or used from source
-        message(STATUS "Building DO++ from source")
-        set(DO_DIR ${CMAKE_CURRENT_SOURCE_DIR})
-        set(DO_INCLUDE_DIR ${DO_DIR}/src)
-    else ()
-        message(FATAL "DO++ is not found!")
-    endif ()
-
-
-    # DEBUG
-    do_step_message("Found DO libraries in directory:")
-    message(STATUS "  - DO_DIR = '${DO_DIR}'")
-
-    # Set third-party software directories
-    set(DO_SOURCE_DIR ${DO_DIR}/src/DO)
-    set(DO_ThirdParty_DIR ${DO_DIR}/third-party)
-    set(Eigen3_DIR ${DO_ThirdParty_DIR}/eigen)
-    set(gtest_DIR ${DO_ThirdParty_DIR}/gtest)
-    set(flann_DIR ${DO_ThirdParty_DIR}/flann)
-
-    # List the available component libraries in DO++
-    # Foundational libraries
-    do_append_components(DO_COMPONENTS Core)
-    do_append_components(DO_COMPONENTS Graphics)
-    do_append_components(DO_COMPONENTS ImageProcessing)
-
-    do_append_components(DO_COMPONENTS Geometry)
-
-    do_append_components(DO_COMPONENTS Features)
-		do_append_components(DO_COMPONENTS FeatureDetectors)
-
-    do_append_components(DO_COMPONENTS Match)
-
-    # DEBUG: Print the list of component libraries
-    do_step_message("Currently available component libraries:")
-    foreach (component ${DO_COMPONENTS})
-        message (STATUS "  - ${component}")
-    endforeach (component)
-
-    # Configure compiler
-    include (DOConfigureCompiler)
-
-    # Set DO
-    set(DO_FOUND TRUE)
-    set(DO_USE_FILE UseDO)
-endif ()
-
-
-
-
-################################################################################
-# Check that the requested libraries exists whenever:
-# 'find_package(DO COMPONENTS Core Graphics ... REQUIRED)' is called.
-if (DO_FIND_COMPONENTS)
-    # DEBUG
-    do_substep_message("Requested libraries by project '${PROJECT_NAME}':")
-    foreach (component ${DO_FIND_COMPONENTS})
-       do_substep_message ("- ${component}")
-    endforeach (component)
-
-    set(DO_USE_COMPONENTS "")
-    foreach (component ${DO_FIND_COMPONENTS})
-        list(FIND DO_COMPONENTS ${component} COMPONENT_INDEX)
-        if (COMPONENT_INDEX EQUAL -1)
-            message (FATAL_ERROR "[DO] ${component} does not exist!")
-        else ()
-            set(DO_${component}_FOUND TRUE)
-            list (APPEND DO_USE_COMPONENTS ${component})
-        endif ()
-    endforeach (component)
-endif (DO_FIND_COMPONENTS)


Make MSVC happy when Clang-Tidy is available on Windows.

Indeed, we were getting the following issue:
C:\Users\Alan\Desktop\libCellML\build\..\tests\model\model.cpp:362:5: error: an exception may be thrown in function '~structure' which should not throw exceptions [bugprone-exception-escape,-warnings-as-errors]
    ~structure()
    ^

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -122,6 +122,7 @@

   if(CLANG_TIDY_AVAILABLE)
     if(NOT "${_TARGET}" STREQUAL "cellml")
+        set(_NO_BUGPRONE_EXCEPTION_ESCAPE -bugprone-exception-escape)
         set(_NO_CPPCOREGUIDELINES_PRO_TYPE_VARARG -cppcoreguidelines-pro-type-vararg)
         set(_NO_HICPP_VARARG -hicpp-vararg)
     endif()
@@ -131,6 +132,7 @@
     set(_CLANG_TIDY_CHECKS
       -*
       bugprone-*
+      ${_NO_BUGPRONE_EXCEPTION_ESCAPE}
       cert-*
       -cert-err58-cpp
       cppcoreguidelines-*


compiled for android64

compiled for android64

--- etc/android_arm64_toolchain.cmake
+++ etc/android_arm64_toolchain.cmake
@@ -1,5 +1,5 @@
 set(ENV{QT_OPENGL_ES_3_1} True)
-set(QT_TARGET $ENV{HOME}/Qt/5.12/android_arm64)
+set(QT_TARGET $ENV{HOME}/Qt/5.12.0/android_arm64_v8a)
 set(CMAKE_STAGING_PREFIX $ENV{HOME}/work/android-toolchain/arm64_24)
 set(CMAKE_INSTALL_PREFIX ${CMAKE_STAGING_PREFIX})
 set(CMAKE_SYSTEM_NAME Android)


Forcebuild under Visual Studio was missing a configuration parameter

--- cmake/ExternalForceBuild.cmake
+++ cmake/ExternalForceBuild.cmake
@@ -2,7 +2,7 @@

     ExternalProject_Get_Property(${project} stamp_dir)
     ExternalProject_Add_Step(${project} forcebuild
-        COMMAND ${CMAKE_COMMAND} -E touch_nocreate "${stamp_dir}/${project}-configure"
+        COMMAND ${CMAKE_COMMAND} -E touch_nocreate "${stamp_dir}/${CMAKE_CFG_INTDIR}/${project}-configure"
         COMMENT "Forcing build step for '${project}'"
         DEPENDEES configure
         DEPENDERS build


libavcodec depends on libswresample

libavcodec depends on libswresample

--- cmake/Modules/FindFFmpeg.cmake
+++ cmake/Modules/FindFFmpeg.cmake
@@ -49,6 +49,11 @@
 PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
 )

+find_library(FFMPEG_LIBSWRESAMPLE
+NAMES swresample
+PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
+)
+
 if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT)
 set(FFMPEG_FOUND TRUE)
 endif()
@@ -60,6 +65,7 @@
 ${FFMPEG_LIBAVCODEC}
 ${FFMPEG_LIBAVFORMAT}
 ${FFMPEG_LIBAVUTIL}
+${FFMPEG_LIBSWRESAMPLE}
 )

 endif (FFMPEG_FOUND)


Changed cmake python library search startegy for crosscompiling

--- cmake/OpenCVDetectPython.cmake
+++ cmake/OpenCVDetectPython.cmake
@@ -38,7 +38,9 @@

   if(NOT ANDROID AND NOT IOS)
     ocv_check_environment_variables(PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
-    if(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL)
+    if(CMAKE_CROSSCOMPILING)
+      find_host_package(PythonLibs ${PYTHON_VERSION_MAJOR_MINOR})
+    elseif(CMAKE_VERSION VERSION_GREATER 2.8.8 AND PYTHON_VERSION_FULL)
       find_host_package(PythonLibs ${PYTHON_VERSION_FULL} EXACT)
     else()
       find_host_package(PythonLibs ${PYTHON_VERSION_FULL})


Changed CXX var name

Changed CXX var name

--- cmake/modules/BuildGTest.cmake
+++ cmake/modules/BuildGTest.cmake
@@ -1,7 +1,7 @@
 set(GTEST_INSTALL_DIR ${CMAKE_THIRD_PARTY_DIR})

 if(WIN32)
-  set(ADD_CXX_FLAGS "/w")
+  set(GTEST_ADD_CXX_FLAGS "/w")
 endif()

 if(NOT BUILD_SHARED_LIBS)
@@ -21,7 +21,7 @@
     #GIT_TAG 045e7f9ee4f969ac1a3fe428f79c4b880f0aff43
     GIT_SHALLOW true

-    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} -DCMAKE_CXX_FLAGS=${ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_GMOCK=${BUILD_GMOCK} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -Dgmock_build_tests=OFF -Dgtest_force_shared_crt=ON
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} -DCMAKE_CXX_FLAGS=${GTEST_ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_GMOCK=${BUILD_GMOCK} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -Dgmock_build_tests=OFF -Dgtest_force_shared_crt=ON
     INSTALL_DIR ${GTEST_INSTALL_DIR}
   )
 else()
@@ -44,7 +44,7 @@
     GIT_TAG release-1.8.0
     GIT_SHALLOW true

-    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} -DCMAKE_CXX_FLAGS=${ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_GMOCK=${BUILD_GMOCK} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -Dgmock_build_tests=OFF
+    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${GTEST_INSTALL_DIR} -DCMAKE_CXX_FLAGS=${GTEST_ADD_CXX_FLAGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_GMOCK=${BUILD_GMOCK} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -Dgmock_build_tests=OFF
     BUILD_BYPRODUCTS ${_byproducts}
     INSTALL_DIR ${GTEST_INSTALL_DIR}
   )


Use more coherent icc flags for the builds

--- cmake/modules/SetUpLinux.cmake
+++ cmake/modules/SetUpLinux.cmake
@@ -226,14 +226,14 @@
   set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS}")

   # Select flags.
-  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DNDEBUG")
-  set(CMAKE_CXX_FLAGS_RELEASE        "-O -DNDEBUG")
-  set(CMAKE_CXX_FLAGS_OPTIMIZED      "-O -DNDEBUG")
-  set(CMAKE_CXX_FLAGS_DEBUG          "-g")
-  set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g -DNDEBUG")
-  set(CMAKE_C_FLAGS_RELEASE          "-O -DNDEBUG")
-  set(CMAKE_C_FLAGS_OPTIMIZED        "-O -DNDEBUG")
-  set(CMAKE_C_FLAGS_DEBUG            "-g")
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -fp-model precise -g -DNDEBUG")
+  set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -fp-model precise -DNDEBUG")
+  set(CMAKE_CXX_FLAGS_OPTIMIZED      "-O3 -DNDEBUG")
+  set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
+  set(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -fp-model precise -g -DNDEBUG")
+  set(CMAKE_C_FLAGS_RELEASE          "-O2 -fp-model precise -DNDEBUG")
+  set(CMAKE_C_FLAGS_OPTIMIZED        "-O3 -DNDEBUG")
+  set(CMAKE_C_FLAGS_DEBUG            "-O0 -g")

   #Settings for cint
   set(CPPPREP "${CXX} -E -C")


fixed missing rpath in the oskar qt_app macro

--- cmake/oskar_build_macros.cmake
+++ cmake/oskar_build_macros.cmake
@@ -102,6 +102,8 @@
         ${APP_EXTRA_LIBS}    # extra libs
     )
     set_target_properties(${target} PROPERTIES
+        INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/${OSKAR_LIB_INSTALL_DIR}
+        INSTALL_RPATH_USE_LINK_PATH TRUE
         OUTPUT_NAME   ${APP_NAME}
     )


Added missing parenthesis

Added missing parenthesis

Adding libsndfile in NDK based android app is failing for this typo

--- cmake/sqlite/FindSQLite3.cmake
+++ cmake/sqlite/FindSQLite3.cmake
@@ -42,8 +42,8 @@
 	)

 if (SQLite3_FOUND)
-	set SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR})
-	set SQLite3_LIBRARIES ${SQLite3_LIBRARY})
+	set (SQLite3_INCLUDE_DIRS ${SQLite3_INCLUDE_DIR})
+	set (SQLite3_LIBRARIES ${SQLite3_LIBRARY})
 	if (NOT TARGET SQLite::SQLite3)
 		add_library (SQLite::SQLite3 UNKNOWN IMPORTED)
 		set_target_properties (SQLite::SQLite3 PROPERTIES


Now that we move all the headers to the build directory, it is no needed to provide a full list of include directories in ROOT_INCLUDE_DIRS.

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -482,11 +482,9 @@
 set(ROOT_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}\")")

 #---To be used from the binary tree--------------------------------------------------------------------------
-get_property(buildtree_include_dirs GLOBAL PROPERTY ROOT_INCLUDE_DIRS)
-list(REMOVE_DUPLICATES buildtree_include_dirs)
 set(ROOT_INCLUDE_DIR_SETUP "
 # ROOT configured for use from the build tree - absolute paths are used.
-set(ROOT_INCLUDE_DIRS ${buildtree_include_dirs})
+set(ROOT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
 ")
 set(ROOT_LIBRARY_DIR_SETUP "
 # ROOT configured for use from the build tree - absolute paths are used.


Don't cache {C,CXX} flags, this file is parsed twice, the first time CMAKE_SIZEOF_VOID_P is unset so the variables are set incorrectly.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -204,19 +204,13 @@
     ENDIF()
   ENDIF()

-  SET(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CXXFLAGS}"
-    CACHE STRING "Release type C++ compiler flags")
-  SET(CMAKE_C_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CFLAGS}"
-    CACHE STRING "Release type C compile flags")
-
-  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CXXFLAGS}"
-    CACHE STRING "Default/RelWithDebInfo type C++ compiler flags")
-  SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CFLAGS}"
-    CACHE STRING "Default/RelWithDebInfo type C compiler flags")
-
-  SET(CMAKE_CXX_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CXXFLAGS}"
-    CACHE STRING "Debug type C++ compiler flags")
-  SET(CMAKE_C_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CFLAGS}"
-    CACHE STRING "Debug type C compiler flags")
-
-ENDIF()
+  SET(CMAKE_CXX_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CXXFLAGS}")
+  SET(CMAKE_C_FLAGS_RELEASE "${OPT_FLG} ${COMMON_CFLAGS}")
+
+  SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CXXFLAGS}")
+  SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${OPT_FLG} ${COMMON_CFLAGS}")
+
+  SET(CMAKE_CXX_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CXXFLAGS}")
+  SET(CMAKE_C_FLAGS_DEBUG "${DBG_FLG} ${COMMON_CFLAGS}")
+
+ENDIF()


ENH: Added CMake version number restriction.

--- Utilities/Upgrading/FindWindowsMangledMethods.cmake
+++ Utilities/Upgrading/FindWindowsMangledMethods.cmake
@@ -49,6 +49,8 @@
 #-----------------------------------------------------------------------------
 # Instructions to use this script:
 #
+# CMake version 2.0.x is required, but 2.0.5 or better is preferred.
+#
 # Set the current working directory to the top of a source tree and
 # run this script with this command:
 #
@@ -58,6 +60,10 @@
 # Each line will consist of a file name and a partial method
 # signature.  Note that Set/Get macros are capable of producing
 # methods that might be mangled.  These are also listed.
+
+IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.0)
+  MESSAGE(FATAL_ERROR "CMake 2.0 or higher is required for this script.")
+ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.0)

 # List of symbols that might be mangled.
 SET(SYMBOLS


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/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   16)
+SET(KWSYS_DATE_STAMP_DAY   17)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/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   30)
+SET(KWSYS_DATE_STAMP_DAY   31)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,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)


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/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   30)
+SET(KWSYS_DATE_STAMP_DAY   31)


chroot name cleanup

chroot name cleanup

--- src/build_options.cmake
+++ src/build_options.cmake
@@ -30,7 +30,7 @@

 if( NOT BUILD_X64 )
   # If we're in our 64-bit chroot, default to 64-bit, else 32-bit
-  if( "$ENV{SCHROOT_CHROOT_NAME}" STREQUAL "vogl_precise_amd64" )
+  if( "$ENV{SCHROOT_CHROOT_NAME}" MATCHES "(.*)amd64(.*)" )
     set(BUILD_X64 "TRUE")
   else()
     set(BUILD_X64 "FALSE")


BUG: On Windows, Shark does not find boost headers

--- CMake/FindShark.cmake
+++ CMake/FindShark.cmake
@@ -144,7 +144,7 @@
   VERSION_VAR SHARK_VERSION_STRING)

 if(SHARK_FOUND)
-  set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${OTBBoost_INCLUDE_DIR} )
+  set(SHARK_INCLUDE_DIRS ${SHARK_INCLUDE_DIR} ${OTBBoost_SYSTEM_INCLUDE_DIRS} )
   set(SHARK_LIBRARIES ${SHARK_LIBRARY} ${OTBBoost_LIBRARIES} )
   if(REQUIRED_CBLAS_LIB)
     set(SHARK_LIBRARIES ${SHARK_LIBRARIES} ${CBLAS_LIBRARY})


Just ignore CMake Warning and CMake Error in CONFIGURE_ERROR now.

We're relying on some tests to generate these messages, so we need
to handle them more intelligently than just rejecting all logs
that contain them.

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -364,11 +364,11 @@
         # Don't tolerate warings in the configure phase
         list (APPEND DRIVER_SCRIPT_CONTENTS
               "if (\"\${CONFIGURE_ERROR}\"\n"
-              "    MATCHES \"^.*CMake Warning.*$\")\n"
+              "    MATCHES \"^CMake Warning.*$\")\n"
               "    message (FATAL_ERROR \"CMake Warnings were present:\"\n"
               "             \"\${CONFIGURE_WARNINGS_CONTENTS}\")\n"
               "endif (\"\${CONFIGURE_ERROR}\"\n"
-              "       MATCHES \"^.*CMake Warning.*$\")\n")
+              "       MATCHES \"^CMake Warning.*$\")\n")

         if (CMAKE_UNIT_LOG_COVERAGE)

@@ -422,30 +422,37 @@
                   # whether it matches one of the paths in our COVERAGE_FILES
                   "        string (SUBSTRING \"\${CONFIGURE_TRACE_CONTENTS}\"\n"
                   "                0 \${NEXT_LINE_INDEX} LINE)\n"
-                  "        foreach (FILE \${COVERAGE_FILES})\n"
-                  "            if (\"\${LINE}\" MATCHES \"\${FILE}.*$\")\n"
+                  # Ignore CMake Warning|Error and anything starting with
+                  # two spaces
+                  "        if (NOT \"\${LINE}\" MATCHES\n"
+                  "            \"^CMake (Warning|Error).*$\" AND\n"
+                  "            NOT \"\${LINE}\" MATCHES\n"
+                  "            \"^  .*$\")\n"
+                  "            foreach (FILE \${COVERAGE_FILES})\n"
+                  "                if (\"\${LINE}\" MATCHES \"\${FILE}.*$\")\n"
                   # Once we've found a matching line, strip out the rest of
                   # the mostly useless information. Find the first ":" after
                   # the filename and then write out the string until that
                   # semicolon is reached
-                  "                string (LENGTH \"${FILE}\" FILE_LEN)\n"
-                  "                string (SUBSTRING \"\${LINE}\"\n"
-                  "                        \${FILE_LEN} -1\n"
-                  "                        AFTER_FILE_STRING)\n"
+                  "                    string (LENGTH \"${FILE}\" FILE_LEN)\n"
+                  "                    string (SUBSTRING \"\${LINE}\"\n"
+                  "                            \${FILE_LEN} -1\n"
+                  "                            AFTER_FILE_STRING)\n"
                   # Match ):. This prevents drive letters on Windows causing
                   # problems
-                  "                string (FIND \"\${AFTER_FILE_STRING}\"\n"
-                  "                        \"):\" DEL_IDX)\n"
-                  "                math (EXPR COLON_INDEX_IN_LINE\n"
-                  "                      \"\${FILE_LEN} + \${DEL_IDX} + 1\")\n"
-                  "                string (SUBSTRING \"\${LINE}\"\n"
-                  "                        0 \${COLON_INDEX_IN_LINE}\n"
-                  "                        FILENAME_AND_LINE)\n"
-                  "                list (APPEND\n"
-                  "                      COVERAGE_FILE_CONTENTS\n"
-                  "                      \"\${FILENAME_AND_LINE}\\n\")\n"
-                  "            endif ()\n"
-                  "        endforeach ()\n"
+                  "                    string (FIND \"\${AFTER_FILE_STRING}\"\n"
+                  "                            \"):\" DEL_IDX)\n"
+                  "                    math (EXPR COLON_INDEX_IN_LINE\n"
+                  "                          \"\${FILE_LEN} + \${DEL_IDX} + 1\")\n"
+                  "                    string (SUBSTRING \"\${LINE}\"\n"
+                  "                            0 \${COLON_INDEX_IN_LINE}\n"
+                  "                            FILENAME_AND_LINE)\n"
+                  "                    list (APPEND\n"
+                  "                          COVERAGE_FILE_CONTENTS\n"
+                  "                          \"\${FILENAME_AND_LINE}\\n\")\n"
+                  "               endif ()\n"
+                  "            endforeach ()\n"
+                  "        endif ()\n"
                   # Increment NEXT_LINE_INDEX so that we can take a new
                   # substring without the \n and check for the next one
                   "        math (EXPR NEXT_LINE_INDEX\n"


mingw: enable asprintf

mingw: enable asprintf

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -39,6 +39,13 @@
     set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${DLFCN_LIBRARY})
 endif (HAVE_LIBDL)

+check_function_exists(asprintf HAVE_ASPRINTF)
+if(NOT HAVE_ASPRINTF)
+    if(MINGW)
+        add_definitions( -D__USE_MINGW_ANSI_STDIO=1 )
+    endif()
+endif()
+
 check_function_exists(strerror_r HAVE_STRERROR_R)

 set(CSYNC_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "csync required system libraries")


ImportedProjectUtils: Include SpacifyList

--- ImportedProjectUtils.cmake
+++ ImportedProjectUtils.cmake
@@ -8,6 +8,7 @@
 cmake_include_guard (SET_MODULE_PATH)
 include ("cmake/cmake-header-language/DetermineHeaderLanguage")
 include ("cmake/cmake-forward-cache/ForwardCacheVariables")
+include ("cmake/cmake-spacify-list/SpacifyList")
 include (CMakeParseArguments)

 if (NOT CMAKE_SCRIPT_MODE_FILE)


Fix dataserver build on OS X.

Fix dataserver build on OS X.


fix: Language C++11 requires -std=c++11 flag, not just -std=c++0x [Basis]

--- CMake/Basis/ProjectTools.cmake
+++ CMake/Basis/ProjectTools.cmake
@@ -1888,9 +1888,6 @@
       if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
         include(CheckCXXCompilerFlag)
         CHECK_CXX_COMPILER_FLAG("-std=c++${CXX_VERSION}" COMPILER_SUPPORTS_CXX${CXX_VERSION})
-        if (CXX_VERSION STREQUAL "11" AND NOT COMPILER_SUPPORTS_CXX${CXX_VERSION})
-          CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX${CXX_VERSION})
-        endif ()
         if (COMPILER_SUPPORTS_CXX${CXX_VERSION})
           if (NOT CMAKE_CXX_FLAGS MATCHES "-std=c\\+\\+${CXX_VERSION}")
             if (CMAKE_CXX_FLAGS)
@@ -1899,7 +1896,7 @@
             set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}-std=c++${CXX_VERSION}")
           endif ()
         else ()
-          message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++${CXX_VERSION} support. Please use a different C++ compiler.")
+          message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no full C++${CXX_VERSION} support. Please use a different C++ compiler.")
         endif ()
       endif ()
     else ()


fix compilation

fix compilation

--- CMake/Packages/FindCEGUI.cmake
+++ CMake/Packages/FindCEGUI.cmake
@@ -134,7 +134,7 @@
 ${CEGUI_TOLUA_LIBRARY_OPTIMIZED}
 )

-add_parent_dir(CEGUI_INCLUDE_DIR CEGUI_INCLUDE_DIR)
+GET_FILENAME_COMPONENT(CEGUI_INCLUDE_DIR "${CEGUI_INCLUDE_DIR}" PATH)

 set(CEGUI_INCLUDE_DIR
 "${CEGUI_BUILD}Library/Cegui/cegui/include"