cmake: Explicitly set the entry point when testing toolchain flags

We are observing warnings when test-compiling toolchain flags that
look like:

cannot find entry symbol _start; defaulting to 00000000000010d4

To fix this warning we explicitly set an entry point to an arbitrary
address. The files are only compiled, not run, so the entry point does
not need to be correct.

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

--- cmake/compiler/gcc/target.cmake
+++ cmake/compiler/gcc/target.cmake
@@ -105,7 +105,13 @@
 #
 # Appending onto any existing values lets users specify
 # toolchain-specific flags at generation time.
-list(APPEND CMAKE_REQUIRED_FLAGS -nostartfiles -nostdlib ${isystem_include_flags} -Wl,--unresolved-symbols=ignore-in-object-files)
+list(APPEND CMAKE_REQUIRED_FLAGS
+  -nostartfiles
+  -nostdlib
+  ${isystem_include_flags}
+  -Wl,--unresolved-symbols=ignore-in-object-files
+  -Wl,--entry=0 # Set an entry point to avoid a warning
+  )
 string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")

 # Load toolchain_cc-family macros


Set SimpleITK version to 2.0.0

Set SimpleITK version to 2.0.0

--- Version.cmake
+++ Version.cmake
@@ -8,8 +8,8 @@

 # Version info

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


Unix builds now default to .so Boost libraries For reasons unknown, referencing static (.a) libraries on Unix operating systems (specifically Ubuntu 64bit) would cause errors during compilation. Now, CMake will use shared libraries (.so) if compiling on Unix and static otherwise.

--- src/main/resources/project-files/jace/Prerequisites.cmake
+++ src/main/resources/project-files/jace/Prerequisites.cmake
@@ -31,7 +31,14 @@
 #        for Boost Thread specifically.

 message(STATUS "-- Boost:")
-set(Boost_USE_STATIC_LIBS ON)
+if(UNIX)
+  set(Boost_USE_SHARED_LIBS ON)
+endif(UNIX)
+
+if(NOT DEFINED Boost_USE_SHARED_LIBS)
+  set(Boost_USE_STATIC_LIBS ON)
+endif(NOT DEFINED Boost_USE_SHARED_LIBS)
+
 set(Boost_USE_MULTITHREADED ON)
 set(Boost_ADDITIONAL_VERSIONS
   "1.37" "1.37.0" "1.37.1" "1.38" "1.38.0" "1.38.1" "1.39" "1.39.0" "1.39.1"


enhance xpListAppendIfDne to support multiple vars

* to support multiple boost vers in default case

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -665,7 +665,7 @@
 endfunction()

 function(xpListAppendIfDne appendTo items)
-  foreach(item ${items})
+  foreach(item ${items} ${ARGN})
     list(FIND ${appendTo} ${item} index)
     if(index EQUAL -1)
       list(APPEND ${appendTo} ${item})


xpSourceListAppend enhancements

xpSourceListAppend enhancements

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -582,6 +582,26 @@
   set(${_ret} ${prefix} PARENT_SCOPE)
 endfunction()

+function(xpListPrependToAll var prefix)
+  set(listVar)
+  foreach(f ${ARGN})
+    list(APPEND listVar "${prefix}/${f}")
+  endforeach()
+  set(${var} "${listVar}" PARENT_SCOPE)
+endfunction()
+
+function(xpListAppendTrailingSlash var)
+  set(listVar)
+  foreach(f ${ARGN})
+    if(IS_DIRECTORY ${f})
+      list(APPEND listVar "${f}/")
+    else()
+      list(APPEND listVar "${f}")
+    endif()
+  endforeach()
+  set(${var} "${listVar}" PARENT_SCOPE)
+endfunction()
+
 function(xpListAppendIfDne appendTo items)
   foreach(item ${items})
     list(FIND ${appendTo} ${item} index)
@@ -683,17 +703,73 @@
   set(${parentList} ${${parentList}} PARENT_SCOPE)
 endmacro()

+function(xpGitIgnoredDirs var dir)
+  if(NOT GIT_FOUND)
+    include(FindGit)
+    find_package(Git)
+  endif()
+  execute_process(
+    COMMAND ${GIT_EXECUTABLE} ls-files --exclude-standard --ignored --others --directory
+    WORKING_DIRECTORY ${dir}
+    ERROR_QUIET
+    OUTPUT_VARIABLE ignoredDirs
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+  separate_arguments(ignoredDirs UNIX_COMMAND "${ignoredDirs}")
+  list(APPEND ignoredDirs ${ARGN})
+  xpListPrependToAll(ignoredDirs ${dir} ${ignoredDirs})
+  set(${var} "${ignoredDirs}" PARENT_SCOPE)
+endfunction()
+
+function(xpGitUntrackedFiles var dir)
+  if(NOT GIT_FOUND)
+    include(FindGit)
+    find_package(Git)
+  endif()
+  execute_process(
+    COMMAND ${GIT_EXECUTABLE} ls-files --exclude-standard --others
+    WORKING_DIRECTORY ${dir}
+    ERROR_QUIET
+    OUTPUT_VARIABLE untrackedFiles
+    OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+  separate_arguments(untrackedFiles UNIX_COMMAND "${untrackedFiles}")
+  xpListPrependToAll(untrackedFiles ${dir} ${untrackedFiles})
+  set(${var} "${untrackedFiles}" PARENT_SCOPE)
+endfunction()
+
+function(xpGlobFiles var item)
+  if(IS_DIRECTORY ${item})
+    string(REGEX REPLACE "/$" "" item ${item}) # remove trailing slash
+    xpListPrependToAll(globexpr ${item} ${ARGN})
+    # NOTE: By default GLOB_RECURSE omits directories from result list
+    file(GLOB_RECURSE dirFiles ${globexpr})
+    xpGitUntrackedFiles(untrackedFiles ${item})
+    if(dirFiles AND untrackedFiles)
+      list(REMOVE_ITEM dirFiles ${untrackedFiles})
+    endif()
+    list(APPEND listVar ${dirFiles})
+  else()
+    get_filename_component(dir ${item} DIRECTORY)
+    xpListPrependToAll(globexpr ${dir} ${ARGN})
+    file(GLOB match ${globexpr})
+    list(FIND match ${item} idx)
+    if(NOT ${idx} EQUAL -1)
+      list(APPEND listVar ${item})
+    endif()
+  endif()
+  set(${var} ${${var}} ${listVar} PARENT_SCOPE)
+endfunction()
+
 macro(xpSourceListAppend)
   set(_dir ${CMAKE_CURRENT_SOURCE_DIR})
   if(EXISTS ${_dir}/CMakeLists.txt)
-    list(APPEND masterSrcList ${_dir}/CMakeLists.txt\n)
+    list(APPEND masterSrcList ${_dir}/CMakeLists.txt)
   endif()
   file(GLOB msvcFiles "${_dir}/*.sln" "${_dir}/*.vcxproj" "${_dir}/*.vcxproj.filters")
-  foreach(v ${msvcFiles})
-    list(APPEND masterSrcList ${v}\n)
-  endforeach()
+  list(APPEND masterSrcList ${msvcFiles})
   if(${ARGC} GREATER 0)
-    foreach(f ${ARGV0})
+    foreach(f ${ARGN})
       # remove any relative parts with get_filename_component call
       # as this will help REMOVE_DUPLICATES
       if(IS_ABSOLUTE ${f})
@@ -701,19 +777,23 @@
       else()
         get_filename_component(f ${_dir}/${f} ABSOLUTE)
       endif()
-      list(APPEND masterSrcList ${f}\n)
+      list(APPEND masterSrcList ${f})
     endforeach()
   else()
+    file(GLOB miscFiles LIST_DIRECTORIES false
+      ${_dir}/.git ${_dir}/.gitattributes ${_dir}/.gitmodules
+      ${_dir}/*clang-format
+      ${_dir}/README.md
+      )
+    list(APPEND masterSrcList ${miscFiles})
     file(RELATIVE_PATH relPath ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
     string(REPLACE "/" "" custTgt .CMake${relPath})
-    add_custom_target(${custTgt}) # creates utility project in MSVC
+    add_custom_target(${custTgt} SOURCES ${miscFiles}) # creates utility project in MSVC
     set_property(TARGET ${custTgt} PROPERTY FOLDER ${folder})
   endif()
   if(EXISTS ${_dir}/.codereview)
     file(GLOB crFiles "${_dir}/.codereview/*")
-    foreach(v ${crFiles})
-      list(APPEND masterSrcList ${v}\n)
-    endforeach()
+    list(APPEND masterSrcList ${crFiles})
     file(RELATIVE_PATH relPath ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
     string(REPLACE "/" "" custTgt .codereview${relPath})
     add_custom_target(${custTgt} SOURCES ${crFiles}) # creates utility project in MSVC
@@ -721,23 +801,56 @@
   endif()
   if(NOT ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
     set(masterSrcList "${masterSrcList}" PARENT_SCOPE)
+  else()
+    list(REMOVE_DUPLICATES masterSrcList)
+    ####
+    xpGitIgnoredDirs(ignoredDirs ${CMAKE_SOURCE_DIR} .git/)
+    xpGitUntrackedFiles(untrackedFiles ${CMAKE_SOURCE_DIR})
+    file(GLOB topdir ${_dir}/*)
+    xpListAppendTrailingSlash(topdir ${topdir})
+    list(REMOVE_ITEM topdir ${ignoredDirs} ${untrackedFiles})
+    list(SORT topdir) # sort list in-place alphabetically
+    foreach(item ${topdir})
+      xpGlobFiles(repoFiles ${item} *)
+      xpGlobFiles(fmtFiles ${item} *.c *.h *.cpp *.hpp *.cu *.cuh)
+    endforeach()
+    list(REMOVE_ITEM repoFiles ${masterSrcList})
+    if(repoFiles)
+      string(REPLACE ";" "\n" repoFiles "${repoFiles}")
+      file(WRITE ${CMAKE_BINARY_DIR}/notincmake.txt ${repoFiles}\n)
+      list(APPEND masterSrcList ${CMAKE_BINARY_DIR}/notincmake.txt)
+    endif()
+    ####
+    if(fmtFiles AND NOT ${CMAKE_PROJECT_NAME} STREQUAL externpro)
+      xpGetPkgVar(clangformat EXE)
+      add_custom_command(OUTPUT format_cmake
+        COMMAND $<TARGET_FILE:clang-format> -style=file -i ${fmtFiles}
+        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
+        COMMENT "Running clang-format..."
+        )
+      string(REPLACE ";" "\n" fmtFiles "${fmtFiles}")
+      file(WRITE ${CMAKE_BINARY_DIR}/formatfiles.txt ${fmtFiles}\n)
+      add_custom_target(format SOURCES ${CMAKE_BINARY_DIR}/formatfiles.txt DEPENDS format_cmake)
+      list(APPEND masterSrcList ${CMAKE_BINARY_DIR}/formatfiles.txt)
+      set_property(TARGET format PROPERTY FOLDER CMakeTargets)
+    endif()
+    ####
+    option(XP_CSCOPE "always update cscope database" OFF)
+    if(XP_CSCOPE)
+      file(GLOB cscope_files ${CMAKE_BINARY_DIR}/cscope.*)
+      list(LENGTH cscope_files len)
+      if(NOT ${len} EQUAL 0)
+        file(REMOVE ${cscope_files})
+      endif()
+      string(REPLACE ";" "\n" cscopeFileList "${masterSrcList}")
+      file(WRITE ${CMAKE_BINARY_DIR}/cscope.files ${cscopeFileList}\n)
+      message(STATUS "Generating cscope database")
+      execute_process(COMMAND cscope -b -q -k -i cscope.files)
+    endif()
   endif()
 endmacro()

-function(xpGenerateCscopeDb)
-  option(XP_CSCOPE "always update cscope database" OFF)
-  if(NOT XP_CSCOPE)
-    return()
-  endif()
-  file(GLOB cscope_files ${CMAKE_CURRENT_BINARY_DIR}/cscope.*)
-  list(LENGTH cscope_files len)
-  if(NOT ${len} EQUAL 0)
-    file(REMOVE ${cscope_files})
-  endif()
-  list(REMOVE_DUPLICATES masterSrcList)
-  file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cscope.files ${masterSrcList})
-  message(STATUS "Generating cscope database")
-  execute_process(COMMAND cscope -b -q -k -i cscope.files)
+function(xpGenerateCscopeDb) # TODO: remove
 endfunction()

 function(xpTouchFiles fileList)


added pgmlink dependency to ilastik

added pgmlink dependency to ilastik

--- ilastik.cmake
+++ ilastik.cmake
@@ -27,7 +27,7 @@
 include (greenlet)
 include (cylemon)
 include (yapsy)
-#include (pgmlink)
+include (pgmlink)
 include (scikit-learn)

 # select the desired ilastik commit
@@ -63,7 +63,7 @@
     ExternalProject_Add(${ilastik_NAME}
         DEPENDS             ${vigra_NAME} ${h5py_NAME} ${psutil_NAME}
                             ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME}
-                            ${cylemon_NAME} ${scikit-learn_NAME}
+                            ${cylemon_NAME} ${scikit-learn_NAME} ${pgmlink_NAME}
         SOURCE_DIR          ${ilastik_SRC_DIR}
         GIT_REPOSITORY      ${ilastik_URL}
         UPDATE_COMMAND      ${ILASTIK_UPDATE_COMMAND}
@@ -87,7 +87,7 @@
     ExternalProject_Add(${ilastik_NAME}
         DEPENDS             ${vigra_NAME} ${h5py_NAME} ${psutil_NAME}
                             ${blist_NAME} ${greenlet_NAME} ${yapsy_NAME}
-                            ${cylemon_NAME} ${scikit-learn_NAME}
+                            ${cylemon_NAME} ${scikit-learn_NAME} ${pgmlink_NAME}
         SOURCE_DIR          ${ilastik_SRC_DIR}
         GIT_REPOSITORY      ${ilastik_URL}
         UPDATE_COMMAND      ${ILASTIK_UPDATE_COMMAND}


Correction of FindARToolKit5.cmake

Correction of FindARToolKit5.cmake

--- cmake/Modules/FindARToolKit5.cmake
+++ cmake/Modules/FindARToolKit5.cmake
@@ -54,11 +54,13 @@
 				libARWrapper.so
 				PATHS
 				${ARTOOLKIT5_DIR}/lib)
-			set(ARTOOLKIT5_FOUND TRUE)
 		endif (ARTOOLKIT5_DIR)

 	endif (WIN32)

+	if(ARTOOLKIT5_LIBRARIES)
+		set(ARTOOLKIT5_FOUND TRUE)
+	endif(ARTOOLKIT5_LIBRARIES)
 	if (ARTOOLKIT5_FOUND)
 		message(STATUS "Found ARTOOLKIT5: ${ARTOOLKIT5_LIBRARIES}")
 	else (ARTOOLKIT5_FOUND)


[CMake] Get back some variables used in AddLLVM.cmake

This fixes 'gtest/gtest.h' file not found when building unit tests after r351863.

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


cmake: internal/stage: fixes for windows.

Simply bug fixes

--- cmake/qibuild/internal/stage.cmake
+++ cmake/qibuild/internal/stage.cmake
@@ -34,8 +34,7 @@
   # root_dir/share/cmake/${_target}/${_target}-config.cmake,
   # so we can find root_dir from the location of the generated file...
   set(_header
-"
-# This is an autogenerated file. Do not edit
+"# This is an autogenerated file. Do not edit

 get_filename_component(_cur_dir \${CMAKE_CURRENT_LIST_FILE} PATH)
 set(_root_dir \"\${_cur_dir}/../../../\")
@@ -54,10 +53,12 @@
 find_library(${_U_target}_DEBUG_LIBRARY ${target}_d)
 find_library(${_U_target}_LIBRARY       ${target})
 if (${_U_target}_DEBUG_LIBRARY)
-  set(${_U_target}_LIBRARIES optimized:\${${_U_target}_LIBRARY};debug:\${${_U_target}_DEBUG_LIBRARY})
+  set(${_U_target}_LIBRARIES optimized;\${${_U_target}_LIBRARY};debug;\${${_U_target}_DEBUG_LIBRARY})
 else()
   set(${_U_target}_LIBRARIES \${${_U_target}_LIBRARY})
 endif()
+set(${_U_target}_LIBRARIES \"\${${_U_target}_LIBRARIES}\" CACHE STRING \"\" FORCE)
+mark_as_advanced(${_U_target}_LIBRARIES)
 ")
   set(${res} ${_res} PARENT_SCOPE)
 endfunction()


[Build] Fixed a merge issue in the CMake configuration file.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -224,13 +224,7 @@
   #set (CPACK_SOURCE_IGNORE_DIRECTORY ${CPACK_SOURCE_IGNORE_FILES} .git)

   # Initialise the source package generator with the variables above
-=======
-    "${AUTOTOOLS_IGNRD};${SCM_IGNRD};${EDIT_IGNRD};${PACK_IGNRD}")
-  #set (CPACK_SOURCE_IGNORE_DIRECTORY ${CPACK_SOURCE_IGNORE_FILES} .git)
-
-  # Initialise the source package generator with the variables above
   include (InstallRequiredSystemLibraries)
->>>>>>> trunk
   include (CPack)

   # Add a 'dist' target, similar to what is given by GNU Autotools


Fix counting of number of test successes

--- tests/system_tests/run_system_tests.sh.cmake
+++ tests/system_tests/run_system_tests.sh.cmake
@@ -73,12 +73,14 @@
 PARALLEL_NP=""

 RETURN_SUCCESS=0
-FAIL_TRANSLATE=1
-FAIL_COMPILE=2
-FAIL_EXECUTE=3
-SKIP_TRANSLATE=4
-SKIP_COMPILE=5
-SKIP_EXECUTE=6
+RETURN_TRANSLATE=1
+RETURN_COMPILE=2
+FAIL_TRANSLATE=3
+FAIL_COMPILE=4
+FAIL_EXECUTE=5
+SKIP_TRANSLATE=6
+SKIP_COMPILE=7
+SKIP_EXECUTE=8
 ###############################################################

 function print_error()
@@ -1052,9 +1054,9 @@
     for TARGET in $TARGETS; do
 		for TEST in $TESTS; do
 			SHORTNAME=$(basename $TEST)
-			if is_skipped_module_test $TEST $TARGET; then
-				continue;
-			fi
+			#if is_skipped_module_test $TEST $TARGET; then
+			#continue;
+			#fi
 			if [ "$CONFIG_ARG" != "" ]; then
 				CONFIG=$CONFIG_ARG
 			elif [ $CONFIG_ALL -eq 1 ]; then
@@ -1122,7 +1124,11 @@
 			popd > /dev/null
 			return $FAIL_TRANSLATE
 		fi
-		if [ "$STAGE" = "TRANSLATE" ]; then return; fi
+		if [ "$STAGE" = "TRANSLATE" ]; then
+			do_test_finish $RETURN_TRANSLATE
+			continue
+		fi
+
 		echo "[COMPILE] Processing $SHORTNAME for $TARGET target"
 		if compile $SHORTNAME $TARGET; then
 			echo "[COMPILE] SUCCESS"
@@ -1133,7 +1139,11 @@
 			popd > /dev/null
 			return $FAIL_COMPILE
 		fi
-		if [ "$STAGE" = "COMPILE" ]; then continue; fi
+
+		if [ "$STAGE" = "COMPILE" ]; then
+			do_test_finish $RETURN_COMPILE
+			continue
+		fi

 		case "$TARGET" in
 			mpi|mpi2|mpi-*)
@@ -1182,6 +1192,13 @@
 			inc NUM_SUCCESS_TRANS
 			inc NUM_SUCCESS_COMPILE
 			inc NUM_SUCCESS_EXECUTE
+			;;
+		$RETURN_TRANSLATE)
+			inc NUM_SUCCESS_TRANS
+			;;
+		$RETURN_COMPILE)
+			inc NUM_SUCCESS_TRANS
+			inc NUM_SUCCESS_COMPILE
 			;;
 		$FAIL_TRANSLATE)
 			inc NUM_FAIL_TRANS


Pre-merge fixes and modifications to PR #94:

* Setting the correct compiler flags variable...
* Variable name changes
* Only printing one status message (and changed its text)


- Add command for installing single header files

--- cmake/Modules/InstallConvenience.cmake
+++ cmake/Modules/InstallConvenience.cmake
@@ -17,6 +17,13 @@
                 )
         endif()
     endforeach()
+endmacro()
+
+macro(COFFEE_BUNDLE_HEADER)
+    install (
+        FILES ${ARGN}
+        DESTINATION include/
+        )
 endmacro()

 macro(COFFEE_BUNDLE_LIBRARY )


update(build): updated libs to latest master.

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

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -24,8 +24,8 @@
   # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
   # -DFALCOSECURITY_LIBS_VERSION=dev ..`
   if(NOT FALCOSECURITY_LIBS_VERSION)
-    set(FALCOSECURITY_LIBS_VERSION "85f898e7afdc250984bb31c5f80a86dc97ec0d10")
-    set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=c4175c8830d11f5d2467e1f4e61a2ea47449135c08af7acbe4d7f36a0d9b6252")
+    set(FALCOSECURITY_LIBS_VERSION "39e05ab79c77cfb05a3fa2309becc346d2b0fa2b")
+    set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=3f9a20e871d22333bfa34ea3f4a05d0697202895450dd3a7d519096c9e587b1e")
   endif()

   # cd /path/to/build && cmake /path/to/source


avoid updating timestamp of extracted request/response messages (#296)

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -99,8 +99,24 @@
       file(READ "${_idl_file}" _service_content)
       string(REGEX REPLACE "^((.*\r?\n)|)---(\r?\n.*)?$" "\\1" _request_content "${_service_content}")
       string(REGEX REPLACE "^((.*\r?\n)|)---(\r?\n(.*)|())$" "\\3" _response_content "${_service_content}")
-      file(WRITE "${_request_file}" "${_request_content}")
-      file(WRITE "${_response_file}" "${_response_content}")
+      # only re-write the request/response messages if the content has changed
+      # to avoid the last modified timestamp to be updated
+      if(NOT EXISTS "${_request_file}")
+        file(WRITE "${_request_file}" "${_request_content}")
+      else()
+        file(READ "${_request_file}" _existing_request_content)
+        if(NOT "${_request_content}" STREQUAL "${_existing_request_content}")
+          file(WRITE "${_request_file}" "${_request_content}")
+        endif()
+      endif()
+      if(NOT EXISTS "${_response_file}")
+        file(WRITE "${_response_file}" "${_response_content}")
+      else()
+        file(READ "${_response_file}" _existing_response_content)
+        if(NOT "${_response_content}" STREQUAL "${_existing_response_content}")
+          file(WRITE "${_response_file}" "${_response_content}")
+        endif()
+      endif()
       list(APPEND _idl_files "${_request_file}" "${_response_file}")
     endif()
   endforeach()


use python interpretor on windows if found

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@11637 e6417c60-b987-48fd-844e-b20f0fcc1017

--- seqan/util/cmake/FindSeqAn.cmake
+++ seqan/util/cmake/FindSeqAn.cmake
@@ -24,15 +24,15 @@
 macro(seqan_instrumentation_cmake)
 	if(SEQAN_INSTRUMENTATION)
 	    message(STATUS "Prepare SeqAn Usability Analyzer data collection...")
-	    if(CMAKE_HOST_WIN32)
+	    if(CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
 	        execute_process(COMMAND ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
 	        add_custom_target(seqan_instrumentation_build ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
 	                          COMMENT "Build Instrumentation...")
-	    else(CMAKE_HOST_WIN32)
+	    else(CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
 	        execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py cmake ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
 	        add_custom_target(seqan_instrumentation_build ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}
 	                          COMMENT "Build Instrumentation...")
-	    endif(CMAKE_HOST_WIN32)
+	    endif(CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
 	else(SEQAN_INSTRUMENTATION)
 		#message(STATUS "SeqAn Usability Analyzer data collection deactivated")
 	endif(SEQAN_INSTRUMENTATION)
@@ -47,7 +47,7 @@
 	if(SEQAN_INSTRUMENTATION)
 	    add_dependencies(${TARGET} seqan_instrumentation_build)

-	    if(CMAKE_HOST_WIN32)
+	    if(CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
 	      add_custom_command(TARGET ${TARGET}
 	                         PRE_BUILD
 	                         COMMAND ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe pre_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
@@ -56,7 +56,7 @@
 	                         POST_BUILD
 	                         COMMAND ${CMAKE_SOURCE_DIR}/misc/seqan_instrumentation/py2exe/dist/seqan_instrumentation.exe post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
 	                         COMMENT "Post Build Instrumentation...")
-	    else(CMAKE_HOST_WIN32)
+	    else(CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
 	      add_custom_command(TARGET ${TARGET}
 	                         PRE_BUILD
 	                         COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py pre_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
@@ -65,7 +65,7 @@
 	                         POST_BUILD
 	                         COMMAND ${PYTHON_EXECUTABLE} ${SEQAN_ROOT_SOURCE_DIR}/misc/seqan_instrumentation/bin/seqan_instrumentation.py post_build ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR} ${TARGET}
 	                         COMMENT "Post Build Instrumentation...")
-	    endif(CMAKE_HOST_WIN32)
+	    endif(CMAKE_HOST_WIN32 AND NOT PYTHONINTERP_FOUND)
 	endif(SEQAN_INSTRUMENTATION)
 endmacro (seqan_instrumentation_target TARGET)


CMake: Add orLogo.png & Directory.Build.props

--- cmake/dotnet.cmake
+++ cmake/dotnet.cmake
@@ -66,6 +66,12 @@
   add_subdirectory(ortools/${SUBPROJECT}/csharp)
   list(APPEND dotnet_native_targets dotnet_${SUBPROJECT})
 endforeach()
+
+############################
+##  .Net Runtime Package  ##
+############################
+file(COPY tools/doc/orLogo.png DESTINATION dotnet)
+file(COPY ortools/dotnet/Directory.Build.props DESTINATION dotnet)

 # Build or retrieve .snk file
 if(DEFINED ENV{DOTNET_SNK})


fixes to build flags in CONFIGURE_OSPRAY().

--- cmake/ospray.cmake
+++ cmake/ospray.cmake
@@ -23,11 +23,11 @@
 # arch-specific cmd-line flags for various arch and compiler configs

 # Configure the output directories. To allow IMPI to do its magic we
-# will put *exexecutables* into the (same) build directory, but tag
+# will put *executables* into the (same) build directory, but tag
 # mic-executables with ".mic". *libraries* cannot use the
 # ".mic"-suffix trick, so we'll put libraries into separate
 # directories (names 'intel64' and 'mic', respectively)
-MACRO(CONFIGURE_OSPRAY)
+MACRO(CONFIGURE_OSPRAY_NO_ARCH)
   SET(LIBRARY_OUTPUT_PATH ${OSPRAY_BINARY_DIR})
   SET(EXECUTABLE_OUTPUT_PATH ${OSPRAY_BINARY_DIR})

@@ -118,7 +118,6 @@
     ELSE()
       MESSAGE("unknown OSPRAY_XEON_TARGET '${OSPRAY_XEON_TARGET}'")
     ENDIF()
-    #    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OSPRAY_ARCH_FLAGS__${OSPRAY_XEON_TARGET}}")
   ENDIF()

   IF (OSPRAY_MPI)
@@ -126,7 +125,7 @@
   ENDIF()

   IF (THIS_IS_MIC)
-    # whehter to build in MIC/xeon phi support
+    # whether to build in MIC/xeon phi support
     SET(OSPRAY_BUILD_COI_DEVICE OFF CACHE BOOL "Build COI Device for OSPRay's MIC support?")
   ENDIF()

@@ -149,3 +148,12 @@
 ENDMACRO()

+MACRO(CONFIGURE_OSPRAY)
+
+  CONFIGURE_OSPRAY_NO_ARCH()
+  IF (OSPRAY_TARGET STREQUAL "MIC")
+  ELSE()
+    SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OSPRAY_ARCH_${OSPRAY_XEON_TARGET}}")
+  ENDIF()
+
+ENDMACRO()


msvc: disable warnings totally for external targets

--- cmake/Reaper.cmake
+++ cmake/Reaper.cmake
@@ -21,8 +21,9 @@

 # Ignore level-4 warning C4201: nonstandard extension used : nameless struct/union
 # Ignore level-1 warning C4251: 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
+set(REAPER_MSVC_DISABLE_WARNINGS "/W0")
 set(REAPER_MSVC_DEBUG_FLAGS ${REAPER_MSVC_COMMON_FLAGS} "/W4" "/wd4201" "/wd4251")
-set(REAPER_MSVC_RELEASE_FLAGS ${REAPER_MSVC_COMMON_FLAGS} "/W0")
+set(REAPER_MSVC_RELEASE_FLAGS ${REAPER_MSVC_COMMON_FLAGS} ${REAPER_MSVC_DISABLE_WARNINGS})
 set(REAPER_GCC_DEBUG_FLAGS "-Wall" "-Wextra" "-Wundef" "-Wshadow" "-funsigned-char"
         "-Wchar-subscripts" "-Wcast-align" "-Wwrite-strings" "-Wunused" "-Wuninitialized"
         "-Wpointer-arith" "-Wredundant-decls" "-Winline" "-Wformat"
@@ -82,18 +83,25 @@
 endmacro()

 # Helper macro that add default compilation flags for reaper targets
-macro(reaper_configure_warnings target)
-    if(MSVC)
-        target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_MSVC_DEBUG_FLAGS}>")
-        target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_MSVC_RELEASE_FLAGS}>")
-    elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
-        target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_GCC_DEBUG_FLAGS}>")
-        target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_GCC_RELEASE_FLAGS}>")
-    elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-        target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_CLANG_DEBUG_FLAGS}>")
-        target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_CLANG_RELEASE_FLAGS}>")
+macro(reaper_configure_warnings target enabled)
+    if(${enabled})
+        if(MSVC)
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_MSVC_DEBUG_FLAGS}>")
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_MSVC_RELEASE_FLAGS}>")
+        elseif(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_GCC_DEBUG_FLAGS}>")
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_GCC_RELEASE_FLAGS}>")
+        elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_CLANG_DEBUG_FLAGS}>")
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_CLANG_RELEASE_FLAGS}>")
+        else()
+            message(FATAL_ERROR "Could not detect compiler")
+        endif()
     else()
-        message(FATAL_ERROR "Could not detect compiler")
+        if(MSVC)
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:DEBUG>:${REAPER_MSVC_DISABLE_WARNINGS}>")
+            target_compile_options(${target} PRIVATE "$<$<CONFIG:RELEASE>:${REAPER_MSVC_DISABLE_WARNINGS}>")
+        endif()
     endif()
 endmacro()

@@ -121,19 +129,20 @@
 # Use this macro for engine libraries
 macro(reaper_configure_library target project_label)
     reaper_configure_target_common(${target} ${project_label})
-    reaper_configure_warnings(${target})
+    reaper_configure_warnings(${target} ON)
     reaper_generate_export_header(${target} ${project_label})
 endmacro()

 # Use this macro for executables
 macro(reaper_configure_executable target project_label)
     reaper_configure_target_common(${target} ${project_label})
-    reaper_configure_warnings(${target})
+    reaper_configure_warnings(${target} ON)
 endmacro()

 # Use this macro for external dependencies
 macro(reaper_configure_external_target target project_label)
     reaper_configure_target_common(${target} ${project_label})
+    reaper_configure_warnings(${target} OFF)
 endmacro()

 # Reaper standard test macro
@@ -146,7 +155,7 @@
     add_executable(${REAPER_TEST_BIN} ${REAPER_TEST_SRCS})

     reaper_configure_target_common(${REAPER_TEST_BIN} "${REAPER_TEST_BIN}")
-    reaper_configure_warnings(${REAPER_TEST_BIN})
+    reaper_configure_warnings(${REAPER_TEST_BIN} ON)

     # User includes dirs (won't hide warnings)
     target_include_directories(${REAPER_TEST_BIN} PUBLIC


Minor cleaning up of our main CMake file.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -11,6 +11,19 @@
     ELSE()
         MESSAGE(FATAL_ERROR "Sorry, but OpenCOR can only be built in 32-bit or 64-bit.")
     ENDIF()
+
+    # Required packages
+
+    FIND_PACKAGE(Qt5Widgets REQUIRED)
+
+    # Keep track of some information about Qt
+
+    SET(QT_BINARY_DIR ${_qt5_widgets_install_prefix}/bin)
+    SET(QT_LIBRARY_DIR ${_qt5_widgets_install_prefix}/lib)
+    SET(QT_PLUGINS_DIR ${_qt5_widgets_install_prefix}/plugins)
+    SET(QT_VERSION_MAJOR 5)
+    SET(QT_VERSION_MINOR 0)
+    SET(QT_VERSION_PATCH 1)

     # Some settings which depend on whether we want a debug or release version
     # of OpenCOR
@@ -78,19 +91,6 @@
     IF(WIN32)
         ADD_DEFINITIONS(-D_UNICODE)
     ENDIF()
-
-    # Required packages
-
-    FIND_PACKAGE(Qt5Widgets REQUIRED)
-
-    # Keep track of some information about Qt
-
-    SET(QT_BINARY_DIR ${_qt5_widgets_install_prefix}/bin)
-    SET(QT_LIBRARY_DIR ${_qt5_widgets_install_prefix}/lib)
-    SET(QT_PLUGINS_DIR ${_qt5_widgets_install_prefix}/plugins)
-    SET(QT_VERSION_MAJOR 5)
-    SET(QT_VERSION_MINOR 0)
-    SET(QT_VERSION_PATCH 1)

     # Default location of third-party libraries
     # Note: this is only required so that we can quickly test third-party


Forgot to change the patch version of Qt which we use.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -72,7 +72,7 @@
     SET(QT_PLUGINS_DIR ${_qt5_widgets_install_prefix}/plugins)
     SET(QT_VERSION_MAJOR 5)
     SET(QT_VERSION_MINOR 0)
-    SET(QT_VERSION_PATCH 0)
+    SET(QT_VERSION_PATCH 1)

     # Whether we are building for 32-bit or 64-bit


Some minor cleaning up.

Some minor cleaning up.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -748,7 +748,7 @@

                 # Plugins

-                FOREACH(PLUGIN ${PLUGINS} ${PLUGIN_NAME})
+                FOREACH(PLUGIN ${PLUGINS})
                     TARGET_LINK_LIBRARIES(${TEST_NAME}
                         ${PLUGIN}Plugin
                     )


Remove prefix duplication in yaml-cpp.pc.cmake

--- yaml-cpp.pc.cmake
+++ yaml-cpp.pc.cmake
@@ -1,7 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${prefix}/@LIB_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_ROOT_DIR@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_ROOT_DIR@

 Name: Yaml-cpp
 Description: A YAML parser and emitter for C++


Bump version number in file used in case we can't use Git for versioning.

--- cmake-local/Version.cmake
+++ cmake-local/Version.cmake
@@ -3,7 +3,7 @@
 set(CPACK_PACKAGE_VENDOR "Sensics, Inc.")
 set(CPACK_PACKAGE_CONTACT "<support@osvr.com>")
 set(CPACK_PACKAGE_VERSION_MAJOR 0)
-set(CPACK_PACKAGE_VERSION_MINOR 2)
+set(CPACK_PACKAGE_VERSION_MINOR 6)
 set(OSVR_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR})
 set(CPACK_PACKAGE_VERSION ${OSVR_VERSION})


SST Requires libfabric >= 1.6

SST Requires libfabric >= 1.6

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -140,7 +140,7 @@
 endif()
 if(ADIOS2_USE_SST AND ADIOS2_HAVE_MPI)
   set(ADIOS2_HAVE_SST TRUE)
-  find_package(LIBFABRIC)
+  find_package(LIBFABRIC 1.6)
   if(LIBFABRIC_FOUND)
     set(ADIOS2_SST_HAVE_LIBFABRIC TRUE)
   endif()


修改cmake脚本

修改cmake脚本

--- cmake/FindZLTOOLKIT.cmake
+++ cmake/FindZLTOOLKIT.cmake
@@ -1,8 +1,8 @@
 find_path(ZLTOOLKIT_INCLUDE_DIR
   NAMES Network/Socket.h
   PATHS
-  ${PROJECT_SOURCE_DIR}/../ZLToolKit/build/include
-  $ENV{HOME}/ZLToolKit/include/ZLToolKit)
+  ${PROJECT_SOURCE_DIR}/../ZLToolKit/src
+  $ENV{HOME}/ZLToolKit/include)

 message(STATUS "${ZLTOOLKIT_INCLUDE_DIR}")


add no-missing-braces clang compiler flag

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -23,7 +23,7 @@
 set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++11")
 set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")

-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -g -Wall")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -g -Wall -Wno-missing-braces")

 set(MACOS_COMPILE_DEFS MAC_OS)


ctest: replace icpc with ICC in the build name

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

--- test.cmake
+++ test.cmake
@@ -133,6 +133,7 @@
    string(REPLACE "\n" ";" COMPILER_VERSION "${COMPILER_VERSION_COMPLETE}")
    list(GET COMPILER_VERSION 0 COMPILER_VERSION)
    string(REPLACE "Open64 Compiler Suite: Version" "Open64" COMPILER_VERSION "${COMPILER_VERSION}")
+   string(REPLACE "icpc" "ICC" COMPILER_VERSION "${COMPILER_VERSION}")
    string(REPLACE "gxx" "GCC" COMPILER_VERSION "${COMPILER_VERSION}")
    string(REPLACE "g++" "GCC" COMPILER_VERSION "${COMPILER_VERSION}")
    string(REPLACE ".exe" "" COMPILER_VERSION "${COMPILER_VERSION}")


set timeout limit for lhc tests

set timeout limit for lhc tests

--- test/cpymadtest/CTestTestfile.cmake
+++ test/cpymadtest/CTestTestfile.cmake
@@ -7,7 +7,7 @@
 # 'ctest -LE SLOW'
 foreach(PYTEST lhc-b4 lhc)
    add_test(test_${PYTEST} ${PYTHON} test_${PYTEST}.py)
-   set_tests_properties(test_${PYTEST} PROPERTIES LABELS SLOW FAIL_REGULAR_EXPRESSION "FAILED")
+   set_tests_properties(test_${PYTEST} PROPERTIES LABELS SLOW FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT 900)
 endforeach()

 add_test(test_madx ${PYTHON} test_madx.py)


Fix typo in FindTBB.cmake which makes it impossible to use TBB on MacOSX

--- CMake/FindTBB.cmake
+++ CMake/FindTBB.cmake
@@ -196,7 +196,7 @@
 if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" AND
     NOT ${CMAKE_SYSTEM_VERSION} LESS 13.0)
   set (USE_LIBCXX OFF)
-  cmake_policiy(GET CMP0025 POLICY_VAR)
+  cmake_policy(GET CMP0025 POLICY_VAR)

   if (${POLICY_VAR} STREQUAL "NEW")
     if (${CMAKE_CXX_COMPILER_ID} STREQUAL "AppleClang")


added output of the current architecture we are compiling for

--- CMake/config.cmake
+++ CMake/config.cmake
@@ -64,8 +64,10 @@
 # detect architecture
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
     set(RTTR_NATIVE_ARCH 64)
+    message(STATUS "Architecture: x64")
 else()
     set(RTTR_NATIVE_ARCH 32)
+    message(STATUS "Architecture: x86")
 endif()

 enable_rtti(BUILD_WITH_RTTI)
@@ -90,7 +92,7 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -v")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   message(STATUS "added flag -std=c++11 to g++")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
   message(WARNING "clang support is currently experimental")


Updated Jenkins cmake script

Updated Jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -27,6 +27,7 @@
 endif()
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -G \"${CTEST_CMAKE_GENERATOR}\"")
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
+set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})

 ctest_start("Experimental" QUIET)
 ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE QUIET)


Fix coverage again

Fix coverage again

--- CodeCoverage.cmake
+++ CodeCoverage.cmake
@@ -167,7 +167,10 @@
 	DEPENDS ${SETUP_TARGET_FOR_COVERAGE_TARGET}_generate_clean
 	COMMENT "Gathering coverage info"
     # Capturing lcov counters and generating report
-    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} -q --directory ${COVERAGE_SOURCE_DIR} --no-external --capture --output-file ${COVERAGE_INFO_FILE}
+    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} -q --directory ${COVERAGE_SOURCE_DIR} --capture --output-file ${COVERAGE_INFO_FILE}
+    COMMAND ${LCOV_PATH} --gcov-tool ${GCOV_PATH} -q --remove ${COVERAGE_INFO_FILE} "/usr/include/*" --output-file ${COVERAGE_INFO_FILE}.cleaned
+    COMMAND ${CMAKE_COMMAND} -E copy ${COVERAGE_INFO_FILE}.cleaned ${COVERAGE_INFO_FILE}
+    COMMAND ${CMAKE_COMMAND} -E remove ${COVERAGE_INFO_FILE}.cleaned
   )

 	if (COVERALLS_PATH)


Implement common_package_disable

Implement common_package_disable

--- CommonPackage.cmake
+++ CommonPackage.cmake
@@ -14,6 +14,9 @@
 #    of common_package_post()
 #  - sets include_directories() and link_directories() accordingly
 #
+# common_package_disable(<list>)
+#   Disables the previous found package(s)
+#
 # common_package_post()
 #  - generates defines.h and options.cmake for found packages.
 #  - prints status message of found and not-found packages
@@ -147,6 +150,22 @@
   endif()
 endmacro()

+macro(common_package_disable)
+  set(__args ${ARGN}) # ARGN is not a list. make one.
+  foreach(Package_Name ${__args})
+    string(TOUPPER ${Package_Name} PACKAGE_NAME)
+    set(${Package_Name}_name)
+    set(${Package_Name}_FOUND)
+    set(${PACKAGE_NAME}_FOUND)
+    set(__use_package_define "${UPPER_PROJECT_NAME}_USE_${PACKAGE_NAME}")
+    string(REGEX REPLACE "-" "_" __use_package_define ${__use_package_define})
+    list(REMOVE_ITEM COMMON_PACKAGE_DEFINES ${__use_package_define})
+    string(REPLACE " ${Package_Name}" "" ${PROJECT_NAME}_FIND_PACKAGES_FOUND
+      "${${PROJECT_NAME}_FIND_PACKAGES_FOUND}")
+    set(${PROJECT_NAME}_FIND_PACKAGES_NOTFOUND
+      "${${PROJECT_NAME}_FIND_PACKAGES_NOTFOUND} ${Package_Name}")
+  endforeach()
+endmacro()

 macro(common_package_post)
   # Write defines.h and options.cmake


Fix description

Fix description

svn path=/trunk/kdesupport/qca/; revision=733595

--- qca2.pc.cmake
+++ qca2.pc.cmake
@@ -4,7 +4,7 @@
 includedir=@CMAKE_INSTALL_PREFIX@/include/QtCrypto

 Name: QCA
-Description: Qt Cryptographic Architecture library\n
+Description: Qt Cryptographic Architecture library
 Version: @QCA_LIB_VERSION_STRING@
 Requires: QtCore
 Libs: -L${libdir} -lqca


correct mkl env var

correct mkl env var

--- cmake/cblas.cmake
+++ cmake/cblas.cmake
@@ -16,7 +16,7 @@
 set(CBLAS_FOUND OFF)

 ## Find MKL First.
-set(MKL_ROOT $ENV{MKL_ROOT} CACHE PATH "Folder contains MKL")
+set(MKL_ROOT $ENV{MKLROOT} CACHE PATH "Folder contains MKL")

 find_path(MKL_INCLUDE_DIR mkl.h PATHS
   ${MKL_ROOT}/include)


Add check_test_ran.py invocation to synthesize failures for tests that don't produce the expected xunit output file.

--- cmake/tests.cmake
+++ cmake/tests.cmake
@@ -15,6 +15,9 @@

   # TODO: [tds] rosunit should define these macros, not us.  I guess.
   find_program(ROSUNIT_SUMMARIZE_EXE summarize_results.py
+    PATHS ${CMAKE_SOURCE_DIR}/ros/tools/rosunit/scripts
+    NO_DEFAULT_PATH)
+  find_program(ROSUNIT_CHECK_TEST_RAN_EXE check_test_ran.py
     PATHS ${CMAKE_SOURCE_DIR}/ros/tools/rosunit/scripts
     NO_DEFAULT_PATH)

@@ -92,6 +95,7 @@
   string(REPLACE "/" "_" _testname ${file})
   # We use rostest to call the executable to get process control, #1629
   append_test_to_cache(catkin-tests "${_chdir_prefix} ${ROSUNIT_EXE} --name=${_testname} --time-limit=${_pyunit_TIMEOUT} --package=${PROJECT_NAME} -- ${_file_name} ${_covarg} ${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${ROSUNIT_CHECK_TEST_RAN_EXE} ${CMAKE_BINARY_DIR}/test_results/${PROJECT_NAME}/TEST-${_testname}.xml")
 endfunction()

 function(add_gtest exe)
@@ -102,7 +106,7 @@
     set(_gtest_TIMEOUT 60.0)
   endif()
   if(_gtest_WORKING_DIRECTORY)
-    set(_chdir_prefix "bash -c \"cd ${_gtest_WORKING_DIRECTORY} &&")
+    set(_chdir_prefix "bash -c \"cd ${_gtest_WORKING_DIRECTORY} && ")
     set(_chdir_suffix "\"")
   endif()

@@ -119,7 +123,8 @@
   string(REPLACE "/" "_" _testname ${exe})
   get_target_property(_exe_path ${exe} RUNTIME_OUTPUT_DIRECTORY)
   # We use rosunit to call the executable to get process control, #1629, #3112
-  append_test_to_cache(catkin-tests "${_chdir_prefix} ${ROSUNIT_EXE} --name=${_testname} --time-limit=${_gtest_TIMEOUT} --package=${PROJECT_NAME} ${_exe_path}/${exe} ${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${_chdir_prefix}${ROSUNIT_EXE} --name=${_testname} --time-limit=${_gtest_TIMEOUT} --package=${PROJECT_NAME} ${_exe_path}/${exe}${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${ROSUNIT_CHECK_TEST_RAN_EXE} ${CMAKE_BINARY_DIR}/test_results/${PROJECT_NAME}/TEST-${_testname}.xml")
 endfunction()

 function(add_nosetests dir)
@@ -131,7 +136,7 @@

   parse_arguments(_nose "WORKING_DIRECTORY" "" ${ARGN})
   if(_nose_WORKING_DIRECTORY)
-    set(_chdir_prefix "bash -c \"cd ${_nose_WORKING_DIRECTORY} &&")
+    set(_chdir_prefix "bash -c \"cd ${_nose_WORKING_DIRECTORY} && ")
     set(_chdir_suffix "\"")
   endif()

@@ -155,7 +160,8 @@
   set(output_dir_name ${CMAKE_BINARY_DIR}/test_results/${PROJECT_NAME})
   append_test_to_cache(catkin-tests "${CMAKE_COMMAND} -E make_directory ${output_dir_name}")
   string(REPLACE "/" "." output_file_name ${dir})
-  append_test_to_cache(catkin-tests "${_chdir_prefix} ${nosetests_path} --where=${_dir_name} --with-xunit --xunit-file=${output_dir_name}/${output_file_name}.xml ${_covarg} ${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${_chdir_prefix}${nosetests_path} --where=${_dir_name} --with-xunit --xunit-file=${output_dir_name}/${output_file_name}.xml ${_covarg}${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${ROSUNIT_CHECK_TEST_RAN_EXE} ${output_dir_name}/${output_file_name}.xml")
 endfunction()

 function(add_rostest file)
@@ -167,7 +173,7 @@

   parse_arguments(_rosunit "WORKING_DIRECTORY" "" ${ARGN})
   if(_rosunit_WORKING_DIRECTORY)
-    set(_chdir_prefix "bash -c \"cd ${_rosunit_WORKING_DIRECTORY} &&")
+    set(_chdir_prefix "bash -c \"cd ${_rosunit_WORKING_DIRECTORY} && ")
     set(_chdir_suffix "\"")
   endif()

@@ -180,5 +186,5 @@
     message(FATAL_ERROR "Can't find rostest file \"${file}\"")
   endif()

-  append_test_to_cache(catkin-tests "${_chdir_prefix} ${rostest_exe} ${_file_name} ${_chdir_suffix}")
+  append_test_to_cache(catkin-tests "${_chdir_prefix}${rostest_exe} ${_file_name}${_chdir_suffix}")
 endfunction()


utils.cmake fix version retrieval

utils.cmake fix version retrieval

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -1,63 +1,63 @@
 function(get_version_from_file VERSION_MAJOR VERSION_MINOR VERSION_PATCH)
-	file(STRINGS "Version.txt" VERSION_STR)
-	foreach(STR ${VERSION_STR})
-		if(${STR} MATCHES "OR_TOOLS_MAJOR=(.*)")
-			set(${VERSION_MAJOR} ${CMAKE_MATCH_1} PARENT_SCOPE)
-		endif()
-		if(${STR} MATCHES "OR_TOOLS_MINOR=(.*)")
-			set(${VERSION_MINOR} ${CMAKE_MATCH_1} PARENT_SCOPE)
-		endif()
-	endforeach()
-	set(${VERSION_PATCH} 999 PARENT_SCOPE)
+  file(STRINGS "Version.txt" VERSION_STR)
+  foreach(STR ${VERSION_STR})
+    if(${STR} MATCHES "OR_TOOLS_MAJOR=(.*)")
+      set(${VERSION_MAJOR} ${CMAKE_MATCH_1} PARENT_SCOPE)
+    endif()
+    if(${STR} MATCHES "OR_TOOLS_MINOR=(.*)")
+      set(${VERSION_MINOR} ${CMAKE_MATCH_1} PARENT_SCOPE)
+    endif()
+  endforeach()
+  set(${VERSION_PATCH} 9999 PARENT_SCOPE)
 endfunction()

 function(get_version_from_git VERSION_MAJOR VERSION_MINOR VERSION_PATCH)
-	find_package(Git QUIET)
-	if(NOT GIT_FOUND)
-		message(STATUS "Did not find git package, get version from file...")
-		get_version_from_file(MAJOR MINOR PATCH)
-	else()
-		execute_process(COMMAND
-			${GIT_EXECUTABLE}
-			"describe" "--tags"
-			RESULT_VARIABLE _OUTPUT_VAR
-			OUTPUT_VARIABLE FULL
-			ERROR_QUIET)
-		if(NOT _OUTPUT_VAR)
-			execute_process(COMMAND
-				${GIT_EXECUTABLE}
-				"rev-list" "HEAD" "--count"
-				RESULT_VARIABLE _OUTPUT_VAR
-				OUTPUT_VARIABLE PATCH
-				ERROR_QUIET)
-			STRING(STRIP PATCH ${PATCH})
-			STRING(REGEX REPLACE "\n$" "" PATCH ${PATCH})
-			STRING(REGEX REPLACE " " "" PATCH ${PATCH})
-			STRING(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" MAJOR "${FULL}")
-			STRING(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" MINOR "${FULL}")
-		else()
-			message(STATUS "Did not find any tag")
-			get_version_from_file(MAJOR MINOR PATCH)
-		endif()
-	endif()
-	set(${VERSION_MAJOR} ${MAJOR} PARENT_SCOPE)
-	set(${VERSION_MINOR} ${MINOR} PARENT_SCOPE)
-	set(${VERSION_PATCH} ${PATCH} PARENT_SCOPE)
+  find_package(Git QUIET)
+  if(NOT GIT_FOUND)
+    message(STATUS "Did not find git package, get version from file...")
+    get_version_from_file(MAJOR MINOR PATCH)
+  else()
+    execute_process(COMMAND
+      ${GIT_EXECUTABLE} describe --tags
+      RESULT_VARIABLE _OUTPUT_VAR
+      OUTPUT_VARIABLE FULL
+      ERROR_QUIET
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+    if(NOT _OUTPUT_VAR)
+      execute_process(COMMAND
+        ${GIT_EXECUTABLE} rev-list HEAD --count
+        RESULT_VARIABLE _OUTPUT_VAR
+        OUTPUT_VARIABLE PATCH
+        ERROR_QUIET
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+      STRING(STRIP PATCH ${PATCH})
+      STRING(REGEX REPLACE "\n$" "" PATCH ${PATCH})
+      STRING(REGEX REPLACE " " "" PATCH ${PATCH})
+      STRING(REGEX REPLACE "^v([0-9]+)\\..*" "\\1" MAJOR "${FULL}")
+      STRING(REGEX REPLACE "^v[0-9]+\\.([0-9]+).*" "\\1" MINOR "${FULL}")
+    else()
+      message(STATUS "Did not find any tag")
+      get_version_from_file(MAJOR MINOR PATCH)
+    endif()
+  endif()
+  set(${VERSION_MAJOR} ${MAJOR} PARENT_SCOPE)
+  set(${VERSION_MINOR} ${MINOR} PARENT_SCOPE)
+  set(${VERSION_PATCH} ${PATCH} PARENT_SCOPE)
 endfunction()

 function(set_version VERSION)
-	get_filename_component(GIT_DIR ".git" ABSOLUTE)
-	if(EXISTS ${GIT_DIR})
-		get_version_from_git(MAJOR MINOR PATCH)
-	else()
-		get_version_from_file(MAJOR MINOR PATCH)
-	endif()
-	set(${VERSION} "${MAJOR}.${MINOR}.${PATCH}" PARENT_SCOPE)
+  get_filename_component(GIT_DIR ".git" ABSOLUTE)
+  if(EXISTS ${GIT_DIR})
+    get_version_from_git(MAJOR MINOR PATCH)
+  else()
+    get_version_from_file(MAJOR MINOR PATCH)
+  endif()
+  set(${VERSION} "${MAJOR}.${MINOR}.${PATCH}" PARENT_SCOPE)
 endfunction()

 function(check_target my_target)
-	if(NOT TARGET ${my_target})
-		message(FATAL_ERROR " Or-Tools: compiling Or-Tools requires a ${my_target}
-		CMake target in your project, see CMake/README.md for more details")
-	endif(NOT TARGET ${my_target})
+  if(NOT TARGET ${my_target})
+    message(FATAL_ERROR " Or-Tools: compiling Or-Tools requires a ${my_target}
+    CMake target in your project, see CMake/README.md for more details")
+  endif(NOT TARGET ${my_target})
 endfunction()


Removed /dev/null reference.

Removed /dev/null reference.

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -485,7 +485,10 @@

 if(NOT DEFINED ${CACHE_VAR_NAME})
   message(STATUS "Find out LLC target triple (for host ${LLVM_HOST_TARGET})")
-  execute_process(COMMAND ${CLANG} "${CLANG_TARGET_OPTION}${LLVM_HOST_TARGET}" -x c /dev/null -S -emit-llvm -o - RESULT_VARIABLE RES_VAR OUTPUT_VARIABLE OUTPUT_VAR)
+  SET (_EMPTY_C_FILE "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/tripletfind.c")
+  FILE (WRITE "${_EMPTY_C_FILE}" "")
+
+  execute_process(COMMAND ${CLANG} "${CLANG_TARGET_OPTION}${LLVM_HOST_TARGET}" -x c ${_EMPTY_C_FILE} -S -emit-llvm -o - RESULT_VARIABLE RES_VAR OUTPUT_VARIABLE OUTPUT_VAR)
   if(RES_VAR)
     message(FATAL_ERROR "Error ${RES_VAR} while determining target triple")
   endif()


hack rdma cmake build lib

hack rdma cmake build lib

--- cmake/rdma.cmake
+++ cmake/rdma.cmake
@@ -10,7 +10,7 @@

   function(generate_rdma_links)
     #redirect to current DIR to isolate the pollution from system runtime environment
-    #it can benifits unified control for different gcc environment.
+    #it can benifits unified control for different gcc environment.
     #e.g, by default gcc48 did not refer /usr/lib64 which could contain low version
     #runtime libraries that will crash process while loading it. That redirect trick
     #can fix it.
@@ -19,7 +19,9 @@
       COMMAND ln -s -f /usr/lib64/libibverbs.so.1.0.0 librdma/libibverbs.so.1
       COMMAND ln -s -f /usr/lib64/libibverbs.so.1.0.0 librdma/libibverbs.so
       COMMAND ln -s -f /usr/lib64/librdmacm.so.1.0.0 librdma/librdmacm.so.1
-      COMMAND ln -s -f /usr/lib64/librdmacm.so.1.0.0 librdma/librdmacm.so
+      COMMAND ln -s -f /usr/lib64/librdmacm.so.1.0.0 librdma/librdmacm.so
+      COMMAND ln -s -f /lib64/libnl.so.1.1.4 librdma/libnl.so.1
+      COMMAND ln -s -f /lib64/libnl.so.1.1.4 librdma/libnl.so
       WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
   endfunction(generate_rdma_links)
@@ -44,7 +46,7 @@
       RDMA_INC_XIO AND
       RDMA_INC_EVENT AND
       RDMA_INC_NUMA AND
-      RDMA_LIB_SXISOCK AND
+      RDMA_LIB_SXISOCK AND
       RDMA_LIB_XIO AND
       RDMA_LIB_EVENT AND
       RDMA_LIB_EVENT_CORE AND
@@ -53,19 +55,19 @@
       RDMA_LIB_NUMA
       )

-    set(RDMA_INC_DIR
-      ${RDMA_INC_SXISOCK}
+    set(RDMA_INC_DIR
+      ${RDMA_INC_SXISOCK}
       ${RDMA_INC_XIO}
       ${RDMA_INC_EVENT}
       ${RDMA_INC_NUMA})
-    set(RDMA_LIBS
-      ${RDMA_LIB_SXISOCK}
-      ${RDMA_LIB_XIO}
-      ${RDMA_LIB_EVENT}
-      ${RDMA_LIB_EVENT_CORE}
-      ${RDMA_LIB_EVENT_EXTRA}
-      ${RDMA_LIB_EVENT_PTHREADS}
-      ${RDMA_LIB_NUMA}
+    set(RDMA_LIBS
+      ${RDMA_LIB_SXISOCK}
+      ${RDMA_LIB_XIO}
+      ${RDMA_LIB_EVENT}
+      ${RDMA_LIB_EVENT_CORE}
+      ${RDMA_LIB_EVENT_EXTRA}
+      ${RDMA_LIB_EVENT_PTHREADS}
+      ${RDMA_LIB_NUMA}
       )
     set(RDMA_LD_FLAGS "-L./librdma -libverbs -lrdmacm -Xlinker -rpath ./librdma")
     include_directories("${RDMA_INC_DIR}")


Update facts.cmake

Update facts.cmake

--- facts/facts.cmake
+++ facts/facts.cmake
@@ -58,9 +58,9 @@
 ENDIF()

 execute_process(
-	COMMAND cmake -P cmaki_identifier.cmake
-	WORKING_DIRECTORY "$ENV{CMAKI_INSTALL}"
-	OUTPUT_VARIABLE RESULT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
+	COMMAND cmake -P $ENV{CMAKI_INSTALL}/cmaki_identifier.cmake
+	OUTPUT_VARIABLE RESULT_VERSION
+	OUTPUT_STRIP_TRAILING_WHITESPACE)
 set(CMAKI_PLATFORM "${RESULT_VERSION}")
 message("---- detecting platform: ${CMAKI_PLATFORM}")


Revert cmake evaluation test

Revert cmake evaluation test

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -162,7 +162,7 @@
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/py_func_test.py"
       # training tests
       "${tensorflow_source_dir}/tensorflow/python/training/basic_session_run_hooks_test.py"  # Needs tf.contrib fix.
-      "${tensorflow_source_dir}/tensorflow/python/training/evaluation_test.py"  # Needs tf.contrib fix.
+      "${tensorflow_source_dir}/tensorflow/python/training/evaluation_test.py"  # Needs tf.contrib fix.
       "${tensorflow_source_dir}/tensorflow/python/training/localhost_cluster_performance_test.py"  # Needs portpicker.
       "${tensorflow_source_dir}/tensorflow/python/training/monitored_session_test.py"  # Needs tf.contrib fix.
       "${tensorflow_source_dir}/tensorflow/python/training/saver_large_variable_test.py"  # Overflow error.


cmake: improve TOOLS behavior+description

--- scripts/cmake/ElektraCache.cmake
+++ scripts/cmake/ElektraCache.cmake
@@ -66,11 +66,13 @@

 if (TOOLS MATCHES "DEFAULT")
 	set (TOOLS_FORCE FORCE)
+	list (REMOVE_ITEM TOOLS DEFAULT)
 endif ()

 if (TOOLS MATCHES "NODEP")
 	set (TOOLS_LIST race)
 	set (TOOLS_FORCE FORCE)
+	list (REMOVE_ITEM TOOLS NODEP)
 endif ()

 if (TOOLS MATCHES "ALL")
@@ -92,7 +94,7 @@
 endif ()

 set (TOOLS_DOC
-     "Which TOOLS should be added? ALL for all available, NODEP for TOOLS without additional dependencies, DEFAULT for minimal set.")
+     "Which TOOLS should be added? Either list individual tools or ALL for all available (including website!), NODEP for TOOLS without additional dependencies, DEFAULT is only kdb.")

 set (
 	TOOLS


libjansson fix

libjansson fix

--- libjansson.cmake
+++ libjansson.cmake
@@ -13,6 +13,7 @@
 external_source(libjansson
   2.4
   jansson-2.4.tar.gz
+  ""
   http://www.digip.org/jansson/releases
   )

@@ -22,7 +23,7 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${libjansson_SRC_DIR}/configure --prefix=${BUILDEM_DIR} --enable-shared
-    GIT_REPOSITORY      ${libjansson_URL}
+    URL      ${libjansson_URL}
     BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
     INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
 )


FindMPI: add in the SDK path

FindMPI: add in the SDK path

Also use the environment as a preference to the registry.

Change-Id: Ib97f9f4774816f289673017dc3cb0f3b749df0d4

--- CMake/FindMPI.cmake
+++ CMake/FindMPI.cmake
@@ -150,7 +150,11 @@
 # Grab the path to MPI from the registry if we're on windows.
 set(_MPI_PREFIX_PATH)
 if(WIN32)
+  # MSMPI
+  list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_BIN}")
   list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MPI;InstallRoot]/Bin")
+  list(APPEND _MPI_PREFIX_PATH "$ENV{MSMPI_INC}/..") # The SDK is installed separately from the runtime
+  # MPICH
   list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH\\SMPD;binary]/..")
   list(APPEND _MPI_PREFIX_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MPICH2;Path]")
   list(APPEND _MPI_PREFIX_PATH "$ENV{ProgramW6432}/MPICH2/")


backported boost probing in non-standard  places

--- cmake/boost.cmake
+++ cmake/boost.cmake
@@ -1,4 +1,6 @@
 set(Boost_USE_MULTITHREADED ON)
+set(BOOST_INCLUDEDIR "${CMAKE_INSTALL_PREFIX}/include/strus")
+set(BOOST_LIBRARYDIR "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/strus")
 find_package( Boost 1.53.0 COMPONENTS atomic QUIET)
 if( Boost_ATOMIC_FOUND )
 	if(APPLE OR WIN32)


Correctly setting compile time defines in cmake

--- cmake/flags.cmake
+++ cmake/flags.cmake
@@ -1,11 +1,9 @@
-set(F_CPU "-DF_CPU=11059200")
-set(CAN_BAUDRATE "-DCAN_BAUDRATE=250")
+set(F_CPU 11059200)
+set(CAN_BAUDRATE 250)

 # Name of target Micro Controller Unit
 # see the available avr-gcc mmcur options for possible values
 set(CMCU "-mmcu=at90can128")
-
-set(CDEFS "${F_CPU} ${CAN_BAUDRATE}")

 set(CSTANDARD "-std=c99")
 set(CDEBUG "-g")
@@ -14,8 +12,9 @@

 set(COPT "-Os")

-set(CFLAGS "${CMCU} ${CDEFS} ${CINCS} ${CSTANDARD} ${CDEBUG} ${CWARN} ${CTUNING} ${COPT} ${CEXTRA}")
-set(CXXFLAGS "${CMCU} ${CDEFS} ${CINCS} ${COPT}")
+add_definitions(-DF_CPU=${F_CPU} -DCAN_BAUDRATE=${CAN_BAUDRATE})
+set(CFLAGS "${CMCU} ${CINCS} ${CSTANDARD} ${CDEBUG} ${CWARN} ${CTUNING} ${COPT} ${CEXTRA}")
+set(CXXFLAGS "${CMCU} ${CINCS} ${COPT}")

 set(CMAKE_C_FLAGS ${CFLAGS})
 set(CMAKE_CXX_FLAGS ${CXXFLAGS})


Update install script to allow using Qt (GL) and a non fixed ICU library version

--- CMakeModules/install/windows.cmake
+++ CMakeModules/install/windows.cmake
@@ -170,11 +170,6 @@
     ${QT_DLL_DIR}/Qt5Xml.dll
     ${QT_DLL_DIR}/Qt5Widgets.dll
     ${QT_DLL_DIR}/Qt5XmlPatterns.dll
-	${QT_DLL_DIR}/libEGL.dll
-	${QT_DLL_DIR}/libGLESv2.dll
-	${QT_DLL_DIR}/icudt51.dll
-	${QT_DLL_DIR}/icuin51.dll
-	${QT_DLL_DIR}/icuuc51.dll
 	${QT_DLL_DIR}/assistant.exe
 	${QT_DLL_DIR}/Qt5Help.dll
 	${QT_DLL_DIR}/Qt5Network.dll
@@ -192,6 +187,18 @@
 	${QT_DLL_DIR}/Qt5CLucene.dll
     DESTINATION bin
     CONFIGURATIONS Release)
+if(EXISTS "${QT_DLL_DIR}/libEGL.dll")
+	install(FILES
+		${QT_DLL_DIR}/libEGL.dll
+		DESTINATION bin
+		CONFIGURATIONS Release)
+endif()
+if(EXISTS "${QT_DLL_DIR}/libGLESv2.dll")
+	install(FILES
+		${QT_DLL_DIR}/libGLESv2.dll
+		DESTINATION bin
+		CONFIGURATIONS Release)
+endif()
 install(FILES
     ${QT_DLL_DIR}/Qt5Cored.dll
     ${QT_DLL_DIR}/Qt5Guid.dll
@@ -199,11 +206,6 @@
     ${QT_DLL_DIR}/Qt5Xmld.dll
     ${QT_DLL_DIR}/Qt5Widgetsd.dll
     ${QT_DLL_DIR}/Qt5XmlPatternsd.dll
-	${QT_DLL_DIR}/libEGLd.dll
-	${QT_DLL_DIR}/libGLESv2d.dll
-	${QT_DLL_DIR}/icudt51.dll
-	${QT_DLL_DIR}/icuin51.dll
-	${QT_DLL_DIR}/icuuc51.dll
 	${QT_DLL_DIR}/assistant.exe
 	${QT_DLL_DIR}/Qt5Helpd.dll
 	${QT_DLL_DIR}/Qt5Networkd.dll
@@ -220,6 +222,18 @@
 	${QT_DLL_DIR}/Qt5CLucened.dll
     DESTINATION bin
     CONFIGURATIONS Debug)
+if(EXISTS "${QT_DLL_DIR}/libEGLd.dll")
+	install(FILES
+		${QT_DLL_DIR}/libEGLd.dll
+		DESTINATION bin
+		CONFIGURATIONS Release)
+endif()
+if(EXISTS "${QT_DLL_DIR}/libGLESv2d.dll")
+	install(FILES
+		${QT_DLL_DIR}/libGLESv2d.dll
+		DESTINATION bin
+		CONFIGURATIONS Release)
+endif()
 install(FILES ${QT_PLUGINS_DIR}/iconengines/qsvgicon.dll
     DESTINATION bin/iconengines
     CONFIGURATIONS Release RelWithDebInfo MinSizeRel)
@@ -238,6 +252,10 @@
 install(FILES ${QT_PLUGINS_DIR}/sqldrivers/qsqlited.dll
     DESTINATION bin/sqldrivers
     CONFIGURATIONS Debug)
+install(DIRECTORY ${QT_DLL_DIR}/
+    DESTINATION "bin"
+    FILES_MATCHING
+    PATTERN "*icu*.dll")

 # Runtime libraries
 IF(OGITOR_DIST)


Make formatting of osx install script more consistent

--- scripts/osx-post-install.cmake
+++ scripts/osx-post-install.cmake
@@ -3,4 +3,4 @@
 # We want to explicitly symlink the newly installed app bundle
 # such that the icon and executable match up correctly.
 execute_process(COMMAND rm -f /usr/local/bin/tev)
-execute_process(COMMAND ln -s "/Applications/tev.app/Contents/MacOS/tev" /usr/local/bin/tev)
+execute_process(COMMAND ln -s /Applications/tev.app/Contents/MacOS/tev /usr/local/bin/tev)


Proper dependency handling for embedded resources.

--- CMake/mitkFunctionCreateModule.cmake
+++ CMake/mitkFunctionCreateModule.cmake
@@ -386,9 +386,26 @@
           if(NOT MODULE_NO_INIT)
             usFunctionGenerateModuleInit(CPP_FILES)
           endif()
+
+          set(binary_res_files )
+          set(source_res_files )
           if(RESOURCE_FILES)
-            # Add a source level dependency on resource files
-            list(APPEND CPP_FILES ${MODULE_TARGET}_resources.cpp)
+            set(res_dir Resources)
+            foreach(res_file ${RESOURCE_FILES})
+              if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${res_dir}/${res_file})
+                list(APPEND binary_res_files "${res_file}")
+              else()
+                list(APPEND source_res_files "${res_file}")
+              endif()
+            endforeach()
+
+            # Add a source level dependencies on resource files
+            if(source_res_files)
+              list(APPEND CPP_FILES ${MODULE_TARGET}_resources.cpp)
+            endif()
+            if(binary_res_files)
+              list(APPEND CPP_FILES ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}_binary_resources.cpp)
+            endif()
           endif()
         endif()

@@ -553,29 +570,16 @@
             set_property(TARGET ${MODULE_AUTOLOAD_WITH} APPEND PROPERTY MITK_AUTOLOAD_TARGETS ${MODULE_TARGET})
           endif()

-          if(RESOURCE_FILES)
-            set(res_dir Resources)
-            set(binary_res_files )
-            set(source_res_files )
-            foreach(res_file ${RESOURCE_FILES})
-              if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${res_dir}/${res_file})
-                list(APPEND binary_res_files "${res_file}")
-              else()
-                list(APPEND source_res_files "${res_file}")
-              endif()
-            endforeach()
-
-            set(res_macro_args )
-            if(binary_res_files)
-              usFunctionAddResources(TARGET ${MODULE_TARGET}
-                                     WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${res_dir}
-                                     FILES ${binary_res_files})
-            endif()
-            if(source_res_files)
-              usFunctionAddResources(TARGET ${MODULE_TARGET}
-                                     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${res_dir}
-                                     FILES ${source_res_files})
-            endif()
+          if(binary_res_files)
+            usFunctionAddResources(TARGET ${MODULE_TARGET}
+                                   SOURCE_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_TARGET}_binary_resources.cpp
+                                   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${res_dir}
+                                   FILES ${binary_res_files})
+          endif()
+          if(source_res_files)
+            usFunctionAddResources(TARGET ${MODULE_TARGET}
+                                   WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${res_dir}
+                                   FILES ${source_res_files})
           endif()

         endif()


fixed build of python wrapper

fixed build of python wrapper

--- SuperBuild/External_astra-toolbox.cmake
+++ SuperBuild/External_astra-toolbox.cmake
@@ -172,7 +172,7 @@
 endif()

    file(COPY ${${proj}_SOURCE_DIR}/python_build
-     DESTINATION ${${proj}_SOURCE_DIR}/python
+	   DESTINATION ${${proj}_BINARY_DIR}/python
      FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)

     #create an install script
@@ -186,7 +186,7 @@
 ")

    file(COPY ${${proj}_SOURCE_DIR}/python_install
-     DESTINATION ${${proj}_SOURCE_DIR}/python
+	   DESTINATION ${${proj}_BINARY_DIR}/python
      FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ)

     ExternalProject_Add(${python_wrapper}
@@ -199,7 +199,7 @@
       INSTALL_DIR ${libastra_Install_Dir}
       # apparently this is the only way to pass environment variables to
       # external projects
-      CONFIGURE_COMMAND ""
+      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_build ${${proj}_SOURCE_DIR}/python/ && ${CMAKE_COMMAND} -E copy ${${proj}_BINARY_DIR}/python/python_install ${${proj}_SOURCE_DIR}/python/

       # This build is Unix specific
       BUILD_COMMAND


Correct Github ITK repo in CircleCI CMake configuration

The escaped quotes became part to the variable value.

--- .circleci/circleci.cmake
+++ .circleci/circleci.cmake
@@ -62,7 +62,7 @@

 SET (_dashboard_cache "
-    ITK_GIT_REPOSITORY:STRING=\"https://github.com/InsightSoftwareConsortium/ITK.git\"
+    ITK_GIT_REPOSITORY:STRING=https://github.com/InsightSoftwareConsortium/ITK.git
     BUILD_DOCUMENTS:BOOL=OFF
     BUILD_EXAMPLES:BOOL=OFF
     BUILD_SHARED_LIBS:BOOL=ON


ENH: Fixed CI/main_superbuild.cmake CDash multi-submit if error.

--- CI/main_superbuild.cmake
+++ CI/main_superbuild.cmake
@@ -134,7 +134,7 @@

 if ( NOT _configure_rv EQUAL 0 )
   ctest_submit()
-  message( SEND_ERROR "An error occurs during ctest_configure.")
+  message( FATAL_ERROR "An error occurs during ctest_configure.")
 endif()

 ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}"
@@ -143,24 +143,17 @@
             )

 if ( NOT _build_rv EQUAL 0 )
-  ctest_submit()
   message( SEND_ERROR "An error occurs during ctest_build.")
 endif()

 # Uncomment when ready for test
-# ctest_test(PARALLEL_LEVEL 8
-#            RETURN_VALUE _test_rv
-#            CAPTURE_CMAKE_ERROR _test_error
-#            )
+ctest_test(PARALLEL_LEVEL 8
+           RETURN_VALUE _test_rv
+           CAPTURE_CMAKE_ERROR _test_error
+           )

-# if ( NOT _test_rv EQUAL 0 )
-#   ctest_submit()
-#   message( SEND_ERROR "An error occurs during ctest_test.")
-# endif()
-
-ctest_test(
-  BUILD "${CTEST_BINARY_DIRECTORY}"
-  PARALLEL_LEVEL 4
-  )
+if ( NOT _test_rv EQUAL 0 )
+  message( SEND_ERROR "An error occurs during ctest_test.")
+endif()

 ctest_submit()


Fixed CMake error when boost is not found

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -103,7 +103,7 @@
 # Find Boost
 # Prefer static linking in all cases
 set(Boost_USE_STATIC_LIBS TRUE)
-set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38")
+set(Boost_ADDITIONAL_VERSIONS "1.37.0" "1.37" "1.38.0" "1.38" "1.39.0" "1.39")
 # Components that need linking (NB does not include heaader-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
 find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
@@ -177,7 +177,6 @@
   ${CEGUI_INCLUDE_DIRS}
   ${OIS_INCLUDE_DIRS}
   ${Cg_INCLUDE_DIRS}
-  ${Boost_INCLUDE_DIRS}
   ${X11_INCLUDE_DIR}
   ${DirectX_INCLUDE_DIRS}
   ${CppUnit_INCLUDE_DIRS}
@@ -187,9 +186,13 @@
 link_directories(
   ${OPENGL_LIBRARY_DIRS}
   ${Cg_LIBRARY_DIRS}
-  ${Boost_LIBRARY_DIRS}
   ${X11_LIBRARY_DIRS}
   ${DirectX_LIBRARY_DIRS}
   ${CppUnit_LIBRARY_DIRS}
 )

+if (Boost_FOUND)
+  include_directories(${Boost_INCLUDE_DIRS})
+  link_directories(${Boost_LIBRARY_DIRS})
+endif ()
+


ENH: ExternalData: Fix typo in unknown action error message

s/Unnknown/Unknown/

Change-Id: I2cd43988962358f0add5653eeed83e21b384387f

--- CMake/ExternalData.cmake
+++ CMake/ExternalData.cmake
@@ -726,5 +726,5 @@
   endif()
   _ExternalData_compute_hash(hash "${algo}" "${file}")
 else()
-  message(FATAL_ERROR "Unknnown ExternalData_ACTION=[${ExternalData_ACTION}]")
+  message(FATAL_ERROR "Unknown ExternalData_ACTION=[${ExternalData_ACTION}]")
 endif()


Updated to new CTK version.

Updated to new CTK version.

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag 4cfeaaf7)
+    set(revision_tag 62a5c581)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -61,7 +61,7 @@
       BINARY_DIR ${proj}-build
       PREFIX ${proj}-cmake
       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      URL_MD5 23889893185726547ad1273dc8b63a46
+      URL_MD5 d18b18137caffdd30ec1fd978596245d
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}
@@ -81,7 +81,7 @@
         -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON
         -DCTK_USE_GIT_PROTOCOL:BOOL=OFF
         -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz
-        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_0d46f8a6.tar.gz
+        -DqRestAPI_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/qRestAPI_5f3a03b1.tar.gz
       DEPENDS ${proj_DEPENDENCIES}
      )
   set(CTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build)


Increment VTK tag to support vtkControlPoints API change

--- CMakeExternals/VTK.cmake
+++ CMakeExternals/VTK.cmake
@@ -37,7 +37,7 @@

     if(NOT DEFINED VTK_DIR)

-      set(revision_tag 4b419e67427e974b51ea0812bae25b174426a2ff)
+      set(revision_tag f0766a470edcc6b84a779b45ba11feee40ac3bdb)
       if(${proj}_REVISION_TAG)
         set(revision_tag ${${proj}_REVISION_TAG})
       endif()


Use lowercase for a few cmake macros to keep capitalization normalized.

--HG--
branch : v1-8

--- CMake/Utils/FindPkgMacros.cmake
+++ CMake/Utils/FindPkgMacros.cmake
@@ -124,16 +124,15 @@

 # Slightly customised framework finder
-MACRO(findpkg_framework fwk)
-  IF(APPLE)
-    SET(${fwk}_FRAMEWORK_PATH
+macro(findpkg_framework fwk)
+  if(APPLE)
+    set(${fwk}_FRAMEWORK_PATH
       ${${fwk}_FRAMEWORK_SEARCH_PATH}
       ${CMAKE_FRAMEWORK_PATH}
       ~/Library/Frameworks
       /Library/Frameworks
       /System/Library/Frameworks
       /Network/Library/Frameworks
-      /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/System/Library/Frameworks/
       ${CMAKE_CURRENT_SOURCE_DIR}/lib/Release
       ${CMAKE_CURRENT_SOURCE_DIR}/lib/Debug
     )
@@ -146,16 +145,16 @@
       set(${fwk}_FRAMEWORK_PATH ${${fwk}_FRAMEWORK_PATH} ${i}/lib/Release ${i}/lib/Debug)
     endforeach(i)

-    FOREACH(dir ${${fwk}_FRAMEWORK_PATH})
-      SET(fwkpath ${dir}/${fwk}.framework)
-      IF(EXISTS ${fwkpath})
-        SET(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES}
+    foreach(dir ${${fwk}_FRAMEWORK_PATH})
+      set(fwkpath ${dir}/${fwk}.framework)
+      if(EXISTS ${fwkpath})
+        set(${fwk}_FRAMEWORK_INCLUDES ${${fwk}_FRAMEWORK_INCLUDES}
           ${fwkpath}/Headers ${fwkpath}/PrivateHeaders)
-        SET(${fwk}_FRAMEWORK_PATH ${dir})
+        set(${fwk}_FRAMEWORK_PATH ${dir})
         if (NOT ${fwk}_LIBRARY_FWK)
-          SET(${fwk}_LIBRARY_FWK "-framework ${fwk}")
+          set(${fwk}_LIBRARY_FWK "-framework ${fwk}")
         endif ()
-      ENDIF(EXISTS ${fwkpath})
-    ENDFOREACH(dir)
-  ENDIF(APPLE)
-ENDMACRO(findpkg_framework)
+      endif(EXISTS ${fwkpath})
+    endforeach(dir)
+  endif(APPLE)
+endmacro(findpkg_framework)


add default AMD targets

add default AMD targets

--- CMake/hoomd/HOOMDHIPSetup.cmake
+++ CMake/hoomd/HOOMDHIPSetup.cmake
@@ -36,6 +36,18 @@
         # override command line, so that it doesn't contain "-x cu"
         set(CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
             "<CMAKE_CUDA_COMPILER> ${CMAKE_CUDA_HOST_FLAGS} <DEFINES> <INCLUDES> <FLAGS> -c <SOURCE> -o <OBJECT>")
+
+        # compile for these architectures
+        if (HIP_PLATFORM STREQUAL "hip-clang" OR HIP_PLATFORM STREQUAL "hcc")
+            set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --amdgpu-target=gfx900")
+            set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --amdgpu-target=gfx906")
+            set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --amdgpu-target=gfx908")
+        endif()
+
+        if (HIP_FOUND)
+            # reduce link time (no device linking)
+            set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -fno-gpu-rdc")
+        endif()

         # these are no-ops, as device linking is not supported with hcc
         set(CMAKE_CUDA_DEVICE_LINK_LIBRARY "<CMAKE_CUDA_COMPILER> -o <TARGET> -x c++ -c /dev/null")
@@ -94,11 +106,6 @@

     ENABLE_LANGUAGE(CUDA)

-    if (HIP_FOUND)
-        # reduce link time (no device linking)
-        set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -fno-gpu-rdc")
-    endif()
-
     if(NOT TARGET HIP::hip)
         add_library(HIP::hip INTERFACE IMPORTED)
         set_target_properties(HIP::hip PROPERTIES


Update FindLibintl.cmake

Update FindLibintl.cmake

--- cmake-scripts/FindLibintl.cmake
+++ cmake-scripts/FindLibintl.cmake
@@ -44,7 +44,7 @@
     set(LIBINTL_LIB_FOUND TRUE)
   else (LIBINTL_LIBC_HAS_DGETTEXT)
     find_library(LIBINTL_LIBRARIES
-      NAMES intl libintl
+      NAMES intl
       HINTS
       PATH_SUFFIXES gettext/lib
       PATHS ${LIBINTL_SEARCH_PATHS}


small error

small error

--- cmake/CheckFloatPrecision.cmake
+++ cmake/CheckFloatPrecision.cmake
@@ -22,8 +22,7 @@
 include(CheckCSourceRuns)

 macro(check_float_precision)
-
- SET(CMAKE_REQUIRED_FLAGS ${CMAKE_C
+
  check_c_source_runs("
   #include <stdio.h>
   #include <string.h>


activating C++11 features for DO.FileSystem because of dependencies with Boost libraries.

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -6,4 +6,19 @@
     message(STATUS "  - Using version 2012: setting '_VARIADIC_MAX=10' to compile 'Google Test'")
     add_definitions(/D _VARIADIC_MAX=10)
   endif ()
-endif (MSVC)+endif (MSVC)
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+  do_step_message("Found ${CMAKE_CXX_COMPILER_ID} compiler:")
+  set (ENABLE_CXX11 "-std=c++11")
+  if (CMAKE_COMPILER_IS_GNUCXX)
+    execute_process(COMMAND "${CMAKE_CXX_COMPILER} -dumpversion"
+      OUTPUT_VARIABLE GCC_VERSION)
+    if (GCC_VERSION VERSION_LESS 4.7)
+      set(ENABLE_CXX11 "-std=c++0x")
+    endif ()
+  endif ()
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ENABLE_CXX11}")
+  message(STATUS "  - Activating C++11 features, specifically for dependencies with Boost libraries.")
+  message(STATUS "  - C++11 compiler flags: ${CMAKE_CXX_FLAGS}")
+endif ()


[cmake] Enable zlib support for Apple stage2 builds

This allows llvm-profdata to interact with profiles containing
compressed name data.

rdar://problem/26122944

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

--- cmake/caches/Apple-stage2.cmake
+++ cmake/caches/Apple-stage2.cmake
@@ -10,7 +10,7 @@
 set(CLANG_TOOL_SCAN_VIEW_BUILD OFF CACHE BOOL "")
 set(CLANG_LINKS_TO_CREATE clang++ cc c++ CACHE STRING "")
 set(CMAKE_MACOSX_RPATH ON CACHE BOOL "")
-set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
+set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
 set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
 set(LLVM_EXTERNALIZE_DEBUGINFO ON CACHE BOOL "")
 set(CLANG_PLUGIN_SUPPORT OFF CACHE BOOL "")


Fix debug build failures on windows (#3253)

* fix win dbg build"

Signed-off-by: Ashwini Khade <c033833d70de1f14d546d5b23d66cc02095a83ed@microsoft.com>

* fix linux debug build

Signed-off-by: Ashwini Khade <c033833d70de1f14d546d5b23d66cc02095a83ed@microsoft.com>

Co-authored-by: Chun-Wei Chen <3d21e1cad9aa0e4aa10838f859be24690cfc357c@gmail.com>

--- cmake/external/googletest.cmake
+++ cmake/external/googletest.cmake
@@ -8,9 +8,15 @@
 set(googletest_TAG e93da23920e5b6887d6a6a291c3a59f83f5b579e)
 #0fe96607d85cf3a25ac40da369db62bbee2939a5

-if(WIN32)
+if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
+  set(googletest_STATIC_LIBRARIES
+      ${CMAKE_CURRENT_BINARY_DIR}/googletest/src/googletest/googletest/Debug/gtestd.lib)
+elseif(WIN32 AND NOT CMAKE_BUILD_TYPE MATCHES Debug)
   set(googletest_STATIC_LIBRARIES
       ${CMAKE_CURRENT_BINARY_DIR}/googletest/src/googletest/googletest/Release/gtest.lib)
+elseif(CMAKE_BUILD_TYPE MATCHES Debug)
+  set(googletest_STATIC_LIBRARIES
+      ${CMAKE_CURRENT_BINARY_DIR}/googletest/src/googletest/googletest/libgtestd.a)
 else()
   set(googletest_STATIC_LIBRARIES
       ${CMAKE_CURRENT_BINARY_DIR}/googletest/src/googletest/googletest/libgtest.a)
@@ -27,10 +33,10 @@
     GIT_TAG ${googletest_TAG}
     DOWNLOAD_DIR "${DOWNLOAD_LOCATION}"
     BUILD_IN_SOURCE 1
-    BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release --target gtest
+    BUILD_COMMAND ${CMAKE_COMMAND} --build . --config ${CMAKE_BUILD_TYPE} --target gtest
     INSTALL_COMMAND ""
     CMAKE_CACHE_ARGS
-        -DCMAKE_BUILD_TYPE:STRING=Release
+        -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
         -DBUILD_GMOCK:BOOL=OFF
         -DBUILD_GTEST:BOOL=ON
         -Dgtest_force_shared_crt:BOOL=${ONNX_USE_MSVC_SHARED_RUNTIME}


Removed semicolons that produced lots of warnings during cmake run in dev mode.

--- cmake/BALLDoc.cmake
+++ cmake/BALLDoc.cmake
@@ -30,15 +30,15 @@
 	## doc
 	ADD_CUSTOM_TARGET(doc ${AUTO_BUILD_DOC}
 										COMMAND ${CMAKE_COMMAND} -E echo ""
-										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-										COMMAND ${CMAKE_COMMAND} -E echo "Creating html documentation";
-										COMMAND ${CMAKE_COMMAND} -E echo "";
+										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+										COMMAND ${CMAKE_COMMAND} -E echo "Creating html documentation"
+										COMMAND ${CMAKE_COMMAND} -E echo ""
 										COMMAND ${CMAKE_COMMAND} -E remove_directory doc/html
 										COMMAND ${CMAKE_COMMAND} -E chdir doc ${DOXYGEN_EXECUTABLE} Doxyfile
-										COMMAND ${CMAKE_COMMAND} -E echo "";
-										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-										COMMAND ${CMAKE_COMMAND} -E echo "The documentation has been successfully created.";
-										COMMAND ${CMAKE_COMMAND} -E echo "You can now open 'doc/html/index.html' in a web browser.";
+										COMMAND ${CMAKE_COMMAND} -E echo ""
+										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+										COMMAND ${CMAKE_COMMAND} -E echo "The documentation has been successfully created."
+										COMMAND ${CMAKE_COMMAND} -E echo "You can now open 'doc/html/index.html' in a web browser."
 										COMMAND ${CMAKE_COMMAND} -E echo ""
 										COMMENT "Build the doxygen documentation"
 										COMPONENT "${COMPONENT_DOCUMENTATION_HTML}"
@@ -58,17 +58,17 @@
 	## doc_tidy
 	ADD_CUSTOM_TARGET(doc_tidy
 										COMMAND ${CMAKE_COMMAND} -E echo ""
-										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-										COMMAND ${CMAKE_COMMAND} -E echo "Creating html documentation";
-										COMMAND ${CMAKE_COMMAND} -E echo "";
+										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+										COMMAND ${CMAKE_COMMAND} -E echo "Creating html documentation"
+										COMMAND ${CMAKE_COMMAND} -E echo ""
 										COMMAND ${CMAKE_COMMAND} -E remove_directory doc/html
 										COMMAND ${CMAKE_COMMAND} -E chdir doc ${DOXYGEN_EXECUTABLE} Doxyfile
-										COMMAND ${CMAKE_COMMAND} -E echo "Running tidy...";
+										COMMAND ${CMAKE_COMMAND} -E echo "Running tidy..."
 										COMMAND ${CMAKE_COMMAND} -E chdir doc/html tidy -m -i -asxml -q -bare -clean *htm* 2>/dev/null | true
-										COMMAND ${CMAKE_COMMAND} -E echo "Finshed Tunning tidy...";
-										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-										COMMAND ${CMAKE_COMMAND} -E echo "The documentation has been successfully created.";
-										COMMAND ${CMAKE_COMMAND} -E echo "You can now open 'doc/html/index.html' in a web browser.";
+										COMMAND ${CMAKE_COMMAND} -E echo "Finshed Tunning tidy..."
+										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+										COMMAND ${CMAKE_COMMAND} -E echo "The documentation has been successfully created."
+										COMMAND ${CMAKE_COMMAND} -E echo "You can now open 'doc/html/index.html' in a web browser."
 										COMMAND ${CMAKE_COMMAND} -E echo ""
 										COMMENT "Build the doxygen documentation"
 										VERBATIM)
@@ -78,15 +78,15 @@
 		## doc_dot target
 		ADD_CUSTOM_TARGET(doc_dot
 											COMMAND ${CMAKE_COMMAND} -E echo ""
-											COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-											COMMAND ${CMAKE_COMMAND} -E echo "Creating DOT html documentation";
-											COMMAND ${CMAKE_COMMAND} -E echo "";
+											COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+											COMMAND ${CMAKE_COMMAND} -E echo "Creating DOT html documentation"
+											COMMAND ${CMAKE_COMMAND} -E echo ""
 											COMMAND ${CMAKE_COMMAND} -E remove_directory doc/html-dot
 											COMMAND ${CMAKE_COMMAND} -E chdir doc ${DOXYGEN_EXECUTABLE} Doxyfile_dot
-											COMMAND ${CMAKE_COMMAND} -E echo "";
-											COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-											COMMAND ${CMAKE_COMMAND} -E echo "The documentation has been successfully created.";
-											COMMAND ${CMAKE_COMMAND} -E echo "You can now open 'doc/html-dot/index.html' in a web browser.";
+											COMMAND ${CMAKE_COMMAND} -E echo ""
+											COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+											COMMAND ${CMAKE_COMMAND} -E echo "The documentation has been successfully created."
+											COMMAND ${CMAKE_COMMAND} -E echo "You can now open 'doc/html-dot/index.html' in a web browser."
 											COMMAND ${CMAKE_COMMAND} -E echo ""
 											COMMENT "Build the doxygen documentation"
 											VERBATIM)
@@ -104,19 +104,19 @@
 	# doc_tutorials target
 	ADD_CUSTOM_TARGET(doc_tutorial ${AUTO_BUILD_DOC}
 										COMMAND ${CMAKE_COMMAND} -E echo ""
-										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
-										COMMAND ${CMAKE_COMMAND} -E echo "Creating BALL pdf tutorial";
-										COMMAND ${CMAKE_COMMAND} -E echo "";
+										COMMAND ${CMAKE_COMMAND} -E echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
+										COMMAND ${CMAKE_COMMAND} -E echo "Creating BALL pdf tutorial"
+										COMMAND ${CMAKE_COMMAND} -E echo ""
 										COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_SOURCE_DIR}/doc/TUTORIAL/	${PDFLATEX_COMPILER} tutorial.tex
 										COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_SOURCE_DIR}/doc/TUTORIAL/	${BIBTEX_COMPILER} tutorial
 										COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_SOURCE_DIR}/doc/TUTORIAL/	${MAKEINDEX_COMPILER} tutorial.idx
 										COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_SOURCE_DIR}/doc/TUTORIAL/	${PDFLATEX_COMPILER} tutorial.tex
 										COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_SOURCE_DIR}/doc/TUTORIAL/	${PDFLATEX_COMPILER} tutorial.tex
 										COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/doc/TUTORIAL/tutorial.pdf doc/tutorial.pdf
-										COMMAND ${CMAKE_COMMAND} -E echo "";
-										COMMAND ${CMAKE_COMMAND} -E echo "The BALL tutorial in PDF format has been successfully created:";
-										COMMAND ${CMAKE_COMMAND} -E echo "doc/tutorial.pdf";
-										COMMAND ${CMAKE_COMMAND} -E echo "";
+										COMMAND ${CMAKE_COMMAND} -E echo ""
+										COMMAND ${CMAKE_COMMAND} -E echo "The BALL tutorial in PDF format has been successfully created:"
+										COMMAND ${CMAKE_COMMAND} -E echo "doc/tutorial.pdf"
+										COMMAND ${CMAKE_COMMAND} -E echo ""
 										COMMENT "Build the BALL pdf tutorial"
 										VERBATIM)


Fixed FindMKL module to search also through lmod paths.

--- cmake/FindMKL.cmake
+++ cmake/FindMKL.cmake
@@ -18,7 +18,7 @@
 set(MKL_ROOT "/opt/intel/mkl" CACHE PATH "Folder contains MKL")

 # Find include dir
-find_path(MKL_INCLUDE_DIR mkl.h PATHS ${MKL_ROOT}/include)
+find_path(MKL_INCLUDE_DIR mkl.h PATHS ${MKL_ROOT}/include ENV CPATH)

 # Handle suffix
 set(_MKL_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
@@ -41,30 +41,37 @@
 endif   (${MKL_ARCHITECTURE} EQUAL 32)

 if(MKL_SDL)
-    find_library(MKL_LIBRARY mkl_rt PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/)
+  find_library(MKL_LIBRARY mkl_rt PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/
+                                  ENV   LIBRARY_PATH )
     set(MKL_MINIMAL_LIBRARY ${MKL_LIBRARY})
 else()
     ######################### Interface layer #######################
     set(MKL_INTERFACE_LIBRARY_NAME mkl_intel${MKL_LIBRARY})
     find_library(MKL_INTERFACE_LIBRARY ${MKL_INTERFACE_LIBRARY_NAME}
-        PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/ ${MKL_INTERFACE_LIBRARY})
+      PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/ ${MKL_INTERFACE_LIBRARY}
+      ENV LIBRARY_PATH)

     ######################## Threading layer ########################
     set(MKL_THREADING_LIBRARY_NAME mkl_intel_thread)
     find_library(MKL_THREADING_LIBRARY ${MKL_THREADING_LIBRARY_NAME}
-        PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/)
+      PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/
+      ENV LIBRARY_PATH)

     ####################### Computational layer #####################
     find_library(MKL_CORE_LIBRARY mkl_core
-        PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/)
+      PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/
+      ENV LIBRARY_PATH)
     find_library(MKL_FFT_LIBRARY mkl_cdft_core
-        PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/)
+      PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/
+      ENV LIBRARY_PATH)
     find_library(MKL_SCALAPACK_LIBRARY mkl_scalapack${MKL_LIBRARY}
-        PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/)
+      PATHS ${MKL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/
+      ENV LIBRARY_PATH)

     ############################ RTL layer ##########################
     find_library(MKL_RTL_LIBRARY iomp5
-      PATHS ${INTEL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/)
+      PATHS ${INTEL_ROOT}/lib/${MKL_LIBRARY_FOLDER}/
+      ENV LIBRARY_PATH)

     set(MKL_LIBRARY ${MKL_INTERFACE_LIBRARY} ${MKL_THREADING_LIBRARY}
                     ${MKL_CORE_LIBRARY} ${MKL_FFT_LIBRARY}


Fixes link errors when using ITK 4.+

Fixes link errors when using ITK 4.+

--- cyitk/cyitkConfigureModule.cmake
+++ cyitk/cyitkConfigureModule.cmake
@@ -108,7 +108,7 @@
   foreach(CPP_FILE ${CYITK_IMAGE_SRCS})
     string(REGEX REPLACE ".cpp$" "" MODULE_NAME ${CPP_FILE})
     add_library(${CYITK_IMAGE_CLASSES_TARGET_NAME} MODULE ${CYITK_CYTHON_WORKING_DIR}/${CPP_FILE})
-    target_link_libraries(${CYITK_IMAGE_CLASSES_TARGET_NAME} ITKCommon ITKIO ${PYTHON_LIBRARY})
+    target_link_libraries(${CYITK_IMAGE_CLASSES_TARGET_NAME} ${ITK_LIBRARIES} ${PYTHON_LIBRARY})
     set_target_properties(${CYITK_IMAGE_CLASSES_TARGET_NAME} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${CYITK_MODULE_BINARY_DIR} OUTPUT_NAME ${MODULE_NAME})
     file(APPEND ${CYITK_MODULE_BINARY_DIR}/${CYITK_INIT_PY} "from ${MODULE_NAME} import *\n")
   endforeach(CPP_FILE)
@@ -116,7 +116,7 @@
   foreach(CPP_FILE ${CYITK_SRCS})
     string(REGEX REPLACE ".cpp$" "" MODULE_NAME ${CPP_FILE})
     add_library(${MODULE_NAME} MODULE ${CYITK_CYTHON_WORKING_DIR}/${CPP_FILE})
-    target_link_libraries(${MODULE_NAME} ITKCommon ITKBasicFilters ITKAlgorithms ITKIO ${PYTHON_LIBRARY} ${CYITK_WRAPPED_LIBRARIES})
+    target_link_libraries(${MODULE_NAME} ${ITK_LIBRARIES} ${PYTHON_LIBRARY} ${CYITK_WRAPPED_LIBRARIES})
     set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "" LIBRARY_OUTPUT_DIRECTORY ${CYITK_MODULE_BINARY_DIR})
     file(APPEND ${CYITK_MODULE_BINARY_DIR}/${CYITK_INIT_PY} "from ${MODULE_NAME} import *\n")
   endforeach(CPP_FILE)


fix missing cholmod and cxsparse

fix missing cholmod and cxsparse

--- kr_cmake_modules/cmake/Modules/Findg2o.cmake
+++ kr_cmake_modules/cmake/Modules/Findg2o.cmake
@@ -122,8 +122,9 @@

 # Set standard CMake FindPackage variables if found.
 if(G2O_FOUND)
-    set(G2O_INCLUDE_DIRS ${G2O_INCLUDE_DIR})
+    list(APPEND G2O_INCLUDE_DIRS ${G2O_INCLUDE_DIR} /usr/include/suitesparse)
     file(GLOB G2O_LIBRARIES ${G2O_LIBRARY_DIR}libg2o*)
+    list(APPEND G2O_LIBRARIES ${G2O_LIBRARIES} cholmod cxsparse)
 endif()

 # Handle REQUIRED / QUIET optional arguments.


Removing old findPagmo script

Removing old findPagmo script

--- Tudat/External/CMake/FindPaGMO.cmake
+++ Tudat/External/CMake/FindPaGMO.cmake
@@ -1,112 +0,0 @@
- #    Copyright (c) 2010-2017, Delft University of Technology
- #    All rigths reserved
- #
- #    This file is part of the Tudat. Redistribution and use in source and
- #    binary forms, with or without modification, are permitted exclusively
- #    under the terms of the Modified BSD license. You should have received
- #    a copy of the license with this file. If not, please or visit:
- #    http://tudat.tudelft.nl/LICENSE.
- #
- #    References
- #      FindEigen3.cmake (2-clause BSD license)
- #
- #    Notes
- #	    Sets the following variables:
- #          PAGMO_INCLUDE_DIR    - Source directory to include
- #
- #   	    PAGMO_VERSION        - PaGMO version found e.g. 2.4.0
- #   	    PAGMO_VERSION_MAJOR  - PaGMO major version found e.g. 2
- #   	    PAGMO_VERSION_MINOR  - PaGMO minor version found e.g. 4
- #   	    (PAGMO_VERSION_PATCH  - PaGMO patch version found e.g. 0)
-
-macro(_pagmo_check_version)
-
-  message(STATUS "Checking for PaGMO in: ${PAGMO_BASE_PATH} and ${PAGMO_BUILD_PATH}" )
-
-  # Reads the version from a file in the build folder
-  file(READ "${PAGMO_BUILD_PATH}/include/pagmo/config.hpp" _pagmo_header)
-
-  STRING(REGEX REPLACE "^.*define PAGMO_VERSION_MAJOR ([0-9]+).*" "\\1" PAGMO_VERSION_MAJOR "${_pagmo_header}")
-  STRING(REGEX REPLACE "^.*define PAGMO_VERSION_MINOR ([0-9]+).*" "\\1" PAGMO_VERSION_MINOR "${_pagmo_header}")
-  set(PAGMO_VERSION ${PAGMO_VERSION_MAJOR}.${PAGMO_VERSION_MINOR}.0)
-
-  # Only check version if a required is set.
-  if(PaGMO_FIND_VERSION)
-    if(${PAGMO_VERSION} VERSION_LESS ${PaGMO_FIND_VERSION})
-      set(PAGMO_VERSION_OK FALSE)
-    else(${PAGMO_VERSION} VERSION_LESS ${PaGMO_FIND_VERSION})
-      set(PAGMO_VERSION_OK TRUE)
-    endif(${PAGMO_VERSION} VERSION_LESS ${PaGMO_FIND_VERSION})
-  else(PaGMO_FIND_VERSION)
-      set(PAGMO_VERSION_OK TRUE)
-  endif(PaGMO_FIND_VERSION)
-
-  if(NOT PAGMO_VERSION_OK)
-    message(STATUS "PaGMO version ${PAGMO_VERSION} found in ${PAGMO_INCLUDE_DIR}, "
-                   "but at least version ${PaGMO_FIND_VERSION} is required!")
-  endif(NOT PAGMO_VERSION_OK)
-
-  #Set include directories
-  set(PAGMO_INCLUDE_DIR "${PAGMO_BASE_PATH}/include/;${PAGMO_BUILD_PATH}/include/")
-endmacro(_pagmo_check_version)
-
-
-if(PAGMO_BASE_PATH)
-
-  set(PAGMO_BASE_PATH_INIT ON)
-
-else (PAGMO_BASE_PATH)
-  find_path(PAGMO_BASE_PATH NAMES pagmo-config.cmake.in
-      PATHS
-      ${PROJECT_SOURCE_DIR}/pagmo2
-      ${PROJECT_SOURCE_DIR}/../pagmo2
-      ${PROJECT_SOURCE_DIR}/../../../pagmo2
-      ${PROJECT_SOURCE_DIR}/../../../../pagmo2
-      ${PROJECT_SOURCE_DIR}/../../../../../pagmo2
-    )
-
-    if(PAGMO_BASE_PATH)
-	set(PAGMO_BASE_PATH_INIT ON)
-	else(PAGMO_BUILD_PATH)
-	message(STATUS "Couldn't find PaGMO directory!")
-    endif()
-
-    mark_as_advanced(PAGMO_BASE_PATH)
-
-endif(PAGMO_BASE_PATH)
-
-
-if(PAGMO_BUILD_PATH)
-
-  set(PAGMO_BUILD_PATH_INIT ON)
-
-else (PAGMO_BUILD_PATH)
-  find_path(PAGMO_BUILD_PATH NAMES "include/pagmo/config.hpp"
-      PATHS
-      ${CMAKE_BINARY_DIR}/pagmo2
-      ${CMAKE_BINARY_DIR}/../pagmo2
-      ${CMAKE_BINARY_DIR}/../../../pagmo2
-      ${CMAKE_BINARY_DIR}/../../../../pagmo2
-      ${CMAKE_BINARY_DIR}/../../../../../pagmo2
-    )
-
-    if(PAGMO_BUILD_PATH)
-	set(PAGMO_BUILD_PATH_INIT ON)
-    else(PAGMO_BUILD_PATH)
-	message(STATUS "Couldn't find PaGMO build directory!")
-    endif()
-
-    mark_as_advanced(PAGMO_BUILD_PATH)
-
-endif(PAGMO_BUILD_PATH)
-
-
-if(PAGMO_BASE_PATH_INIT AND PAGMO_BUILD_PATH_INIT)
-    _pagmo_check_version()
-    set(FOUND_PAGMO ${PAGMO_VERSION_OK})
-endif()
-
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PaGMO DEFAULT_MSG PAGMO_INCLUDE_DIR  PAGMO_VERSION_OK)
-


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -15,7 +15,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2010)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 01)
+SET(KWSYS_DATE_STAMP_MONTH 02)

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


Fix version= arg to package.cmake for DrMemory

DynamoRIO uses VERSION_NUMBER and DrMemory uses TOOL_VERSION_NUMBER to
not conflict.

Review URL: https://codereview.appspot.com/6497088

SVN-Revision: 1014

--- package.cmake
+++ package.cmake
@@ -106,7 +106,7 @@
 # version is optional
 if (arg_version)
   set(base_cache "${base_cache}
-    VERSION_NUMBER:STRING=${arg_version}")
+    TOOL_VERSION_NUMBER:STRING=${arg_version}")
 endif (arg_version)

 # the build dir names here must match those in tests/runsuite.cmake to


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -4,7 +4,7 @@
 SET(KWSYS_DATE_STAMP_YEAR  2008)

 # KWSys version date month component.  Format is MM.
-SET(KWSYS_DATE_STAMP_MONTH 03)
+SET(KWSYS_DATE_STAMP_MONTH 04)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Set compiler to c99.

Set compiler to c99.

--- cmake/Modules/DefineCompilerFlags.cmake
+++ cmake/Modules/DefineCompilerFlags.cmake
@@ -3,47 +3,57 @@
 include(CheckCCompilerFlag)

 if (UNIX AND NOT WIN32)
-  # with -fPIC
-  check_c_compiler_flag("-fPIC" WITH_FPIC)
-  if (WITH_FPIC)
-    add_definitions(-fPIC)
-  endif (WITH_FPIC)
+  if (CMAKE_COMPILER_IS_GNUCC)
+    # add -Wconversion ?
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -pedantic -Wall -Wextra -Wshadow -Wmissing-prototypes -Wdeclaration-after-statement -Wunused -Wfloat-equal -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute")

-  if (CMAKE_SIZEOF_VOID_P MATCHES "8")
-    # with large file support
-    execute_process(
-      COMMAND
-        getconf LFS64_CFLAGS
-      OUTPUT_VARIABLE
-        _lfs_CFLAGS
-      ERROR_QUIET
-      OUTPUT_STRIP_TRAILING_WHITESPACE
+    # with -fPIC
+    check_c_compiler_flag("-fPIC" WITH_FPIC)
+    if (WITH_FPIC)
+      add_definitions(-fPIC)
+    endif (WITH_FPIC)
+
+    if (CMAKE_SIZEOF_VOID_P MATCHES "8")
+      # with large file support
+      execute_process(
+        COMMAND
+          getconf LFS64_CFLAGS
+        OUTPUT_VARIABLE
+          _lfs_CFLAGS
+        ERROR_QUIET
+        OUTPUT_STRIP_TRAILING_WHITESPACE
     )
-  else (CMAKE_SIZEOF_VOID_P MATCHES "8")
-    # with large file support
-    execute_process(
-      COMMAND
-        getconf LFS_CFLAGS
-      OUTPUT_VARIABLE
-        _lfs_CFLAGS
-      ERROR_QUIET
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-    )
-  endif (CMAKE_SIZEOF_VOID_P MATCHES "8")
+    else (CMAKE_SIZEOF_VOID_P MATCHES "8")
+      # with large file support
+      execute_process(
+        COMMAND
+          getconf LFS_CFLAGS
+        OUTPUT_VARIABLE
+          _lfs_CFLAGS
+        ERROR_QUIET
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+      )
+      string(REGEX REPLACE "[\r\n]" " " "${_lfs_CFLAGS}" "${${_lfs_CFLAGS}}")

-  string(REGEX REPLACE "[\r\n]" " " ${_lfs_CFLAGS} "${${_lfs_CFLAGS}}")
+      add_definitions(${_lfs_CFLAGS})
+    endif (CMAKE_SIZEOF_VOID_P MATCHES "8")

-  add_definitions(${_lfs_CFLAGS})
-  add_definitions(-Wall -Wextra -Wmissing-prototypes -Wdeclaration-after-statement -Wunused)
+    check_c_compiler_flag("-fstack-protector" WITH_STACK_PROTECTOR)
+    if (WITH_STACK_PROTECTOR)
+      add_definitions(-fstack-protector)
+    endif (WITH_STACK_PROTECTOR)

-  check_c_compiler_flag("-fstack-protector" WITH_STACK_PROTECTOR)
-  if (WITH_STACK_PROTECTOR)
-    add_definitions(-fstack-protector)
-  endif (WITH_STACK_PROTECTOR)
+    check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
+    if (WITH_FORTIFY_SOURCE)
+      add_definitions(-D_FORTIFY_SOURCE=2)
+    endif (WITH_FORTIFY_SOURCE)

-  check_c_compiler_flag("-D_FORTIFY_SOURCE=2" WITH_FORTIFY_SOURCE)
-  if (WITH_FORTIFY_SOURCE)
-    add_definitions(-D_FORTIFY_SOURCE=2)
-  endif (WITH_FORTIFY_SOURCE)
+    # Set linker flags
+    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+  endif (CMAKE_COMPILER_IS_GNUCC)
+endif (UNIX AND NOT WIN32)

-endif (UNIX AND NOT WIN32)
+# suppress warning about "deprecated" functions
+if (MSVC)
+  add_definitions(-D_CRT_SECURE_NO_WARNINGS)
+endif (MSVC)


Qt 5.9 Windows: Link Qt5ThemeSupport.lib

--- cmake/Qt5Widgets_HunterPlugin_5_9.cmake
+++ cmake/Qt5Widgets_HunterPlugin_5_9.cmake
@@ -314,6 +314,13 @@

   # defined: __imp__DwmEnableBlurBehindWindow
   _qt_cmake_extra_helpers_add_interface(Qt5::Widgets Dwmapi)
+
+  # defined: QAbstractFileIconEngine::pixmap
+  _qt_cmake_extra_helpers_add_interface_release_debug(
+      Qt5::Widgets
+      "${_qt_install_prefix}/lib/Qt5ThemeSupport.lib"
+      "${_qt_install_prefix}/lib/Qt5ThemeSupportd.lib"
+  )
 elseif(MINGW)
   _qt_cmake_extra_helpers_add_source(
       Qt5::Widgets