cmake config update

cmake config update

git-svn-id: 6b1c4fe79111c0bc0cce83313250759594f8984b@5719 e128ff1e-fa79-4151-a8cb-522299a2c450

--- cmake/gsConfig.cmake
+++ cmake/gsConfig.cmake
@@ -169,6 +169,11 @@
   endif()
 endif()

+if (MINGW)
+  # large files can overflow pe/coff sections
+  # this switches binutils to use the pe+ format
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa -mbig-obj")
+endif()

 #message("CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}")
 #message("CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}")


Cmake/Pybind: Disable pre-compiled header for python modules to speed up execution

--- cmake/pybind11.cmake
+++ cmake/pybind11.cmake
@@ -41,8 +41,6 @@
         set_target_properties(${name} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
         target_link_libraries(${name} PUBLIC ${${mod}_target})

-        ivw_compile_optimize_inviwo_core_on_target(${name})
-
         ivw_folder(${name} pybind11modules)
     endif()
 endfunction()


CMakeCompatibility.cmake: simulate target_compile_definitions on cmake < 2.8.11

--- cmake/CMakeCompatibility.cmake
+++ cmake/CMakeCompatibility.cmake
@@ -10,3 +10,38 @@
 		PATH "Directory where .exe and .dll files are dumped.")
 endif()

+if(${CMAKE_VERSION} VERSION_LESS 2.8.11)
+
+include(CMakeParseArguments)
+
+macro(_set_target_interface_defs _TARGET _DEFS)
+	if(DEFINED ${_DEFS})
+#		message(STATUS " _set ${_TARGET} ${_DEFS}")
+		set_property(TARGET ${_TARGET}
+			APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS
+			${${_DEFS}})
+	endif()
+endmacro()
+
+macro(_set_target_defs _TARGET _DEFS)
+	if(DEFINED ${_DEFS})
+#		message(STATUS " _set ${_TARGET} ${_DEFS}")
+		set_property(TARGET ${_TARGET}
+			APPEND PROPERTY COMPILE_DEFINITIONS
+			${${_DEFS}})
+	endif()
+endmacro()
+
+function(target_compile_definitions _TARGET)
+	cmake_parse_arguments(_defs
+		""
+		""
+		"INTERFACE;PUBLIC;PRIVATE"
+		${ARGN}
+	)
+	_set_target_interface_defs(${_TARGET} _defs_INTERFACE)
+	_set_target_interface_defs(${_TARGET} _defs_PUBLIC)
+	_set_target_defs(${_TARGET} _defs_PUBLIC)
+	_set_target_defs(${_TARGET} _defs_PRIVATE)
+endfunction()
+endif()


Fix for issue #506

Fix for issue #506

Quit earlier if libusb-1.0 is not found to prevent OPENNI_FOUND from being set

git-svn-id: 1af002208e930b4d920e7c2b948d1e98a012c795@4036 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -23,15 +23,22 @@
                PATH_SUFFIXES lib)
    include(FindPackageHandleStandardArgs)
    find_package_handle_standard_args(USB_10 DEFAULT_MSG USB_10_LIBRARY USB_10_INCLUDE_DIR)
+   if(NOT USB_10_FOUND)
+     message(STATUS "OpeNI disabled because libusb-1.0 not found.")
+     set(HAVE_OPENNI OFF)
+     return()
+   else(NOT USB_10_FOUND)
+     include_directories(${USB_10_INCLUDE_DIR})
+   endif(NOT USB_10_FOUND)
 endif(NOT WIN32)
-
+
 if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
   pkg_check_modules(PC_OPENNI openni-dev)
 else()
   pkg_check_modules(PC_OPENNI QUIET openni-dev)
 endif()

-set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER} ${PC_USB_10_CFLAGS_OTHER})
+set(OPENNI_DEFINITIONS ${PC_OPENNI_CFLAGS_OTHER})

 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
@@ -43,7 +50,7 @@
              NAMES OpenNI64 OpenNI
              HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
              PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib" "$ENV{PROGRAMW6432}/OpenNI/Lib64"
-			 PATH_SUFFIXES lib Lib Lib64)
+             PATH_SUFFIXES lib Lib Lib64)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
@@ -57,14 +64,6 @@
     OPENNI_LIBRARY OPENNI_INCLUDE_DIR)

 mark_as_advanced(OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
-if(NOT WIN32 AND NOT USB_10_FOUND)
-  message(STATUS "OpenNI disabled because libusb-1.0 not found.")
-  set(HAVE_OPENNI OFF)
-  set(OPENNI_FOUND OFF)
-  return()
-else(NOT WIN32 AND NOT USB_10_FOUND)
-	include_directories(${USB_10_INCLUDE_DIR})
-endif(NOT WIN32 AND NOT USB_10_FOUND)

 if(OPENNI_FOUND)
   set(HAVE_OPENNI ON)


cmake: prefer using Eigen configuration files

- for better compatibility with Ceres 2.0.0 CMake scripts

--- cmake/OpenCVFindLibsPerf.cmake
+++ cmake/OpenCVFindLibsPerf.cmake
@@ -51,7 +51,12 @@

 # --- Eigen ---
 if(WITH_EIGEN AND NOT HAVE_EIGEN)
-  find_package(Eigen3 QUIET)
+  if(NOT OPENCV_SKIP_EIGEN_FIND_PACKAGE_CONFIG)
+    find_package(Eigen3 CONFIG QUIET)  # Ceres 2.0.0 CMake scripts doesn't work with CMake's FindEigen3.cmake module (due to missing EIGEN3_VERSION_STRING)
+  endif()
+  if(NOT Eigen3_FOUND)
+    find_package(Eigen3 QUIET)
+  endif()

   if(Eigen3_FOUND)
     if(TARGET Eigen3::Eigen)


Disable FH4 for now (#104)

Disable FH4 for now (#104)

--- cmake/common_build_flags.cmake
+++ cmake/common_build_flags.cmake
@@ -62,4 +62,7 @@
     # append_cxx_flag("/Wv:18")

     append_cxx_flag("/bigobj")
+
+    # NOTE: Temporary workaround while https://github.com/microsoft/wil/issues/102 is being investigated
+    append_cxx_flag("/d2FH4-")
 endif()


Fix cmake stuffs

Fix cmake stuffs

--- cmake/gentlemanly_engine.cmake
+++ cmake/gentlemanly_engine.cmake
@@ -1,5 +1,5 @@
 if(EMSCRIPTEN)
-	include(emscripten.cmake)
+	include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/emscripten.cmake)
 endif()

 if(ANDROID)
@@ -24,7 +24,7 @@
 		LINK_FLAGS
 			"-s USE_SDL=2 -s USE_FREETYPE=1 -s USE_OGG=1 -s USE_VORBIS=1 ${CPL_FLAGS}"
 		)
-		set_target_properties(${target} PROPERTIES SUFFIX ".html")
+		set_target_properties(${name} PROPERTIES SUFFIX ".html")

 	elseif(ANDROID)


Turn off "treat compiler warnings as errors"

We use external libraries that generate warnings, e.g. pcg.

--- cmake/CompilerWarnings.cmake
+++ cmake/CompilerWarnings.cmake
@@ -3,7 +3,7 @@
 # https://github.com/lefticus/cpp_starter_project/blob/master/cmake/CompilerWarnings.cmake

 function(set_project_warnings project_name)
-  option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" TRUE)
+  option(WARNINGS_AS_ERRORS "Treat compiler warnings as errors" FALSE)

   set(MSVC_WARNINGS
       /W4 # Baseline reasonable warnings


Implmeneted firmware size calculation into build system (per request in #21)

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -471,13 +471,33 @@
                         ARGS     ${ARDUINO_OBJCOPY_EEP_FLAGS}
                                  ${TARGET_PATH}.elf
                                  ${TARGET_PATH}.eep
+                        COMMENT "Generating EEP image"
                         VERBATIM)
+
+    # Convert firmware image to ASCII HEX format
     add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
                         COMMAND ${CMAKE_OBJCOPY}
                         ARGS    ${ARDUINO_OBJCOPY_HEX_FLAGS}
                                 ${TARGET_PATH}.elf
                                 ${TARGET_PATH}.hex
+                        COMMENT "Generating HEX image"
                         VERBATIM)
+
+    # Display target size
+    add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
+                        COMMAND ${CMAKE_COMMAND}
+                        ARGS    -DFIRMWARE_IMAGE=${TARGET_PATH}.hex
+                                -P ${ARDUINO_SIZE_SCRIPT}
+                        COMMENT "Calculating image size"
+                        VERBATIM)
+
+    # Create ${TARGET_NAME}-size target
+    add_custom_target(${TARGET_NAME}-size
+                        COMMAND ${CMAKE_COMMAND}
+                                -DFIRMWARE_IMAGE=${TARGET_PATH}.hex
+                                -P ${ARDUINO_SIZE_SCRIPT}
+                        DEPENDS ${TARGET_NAME}
+                        COMMENT "Calculating ${TARGET_NAME} image size")
 endfunction()

 # setup_arduino_upload(BOARD_ID TARGET_NAME PORT)
@@ -1056,6 +1076,34 @@
 	endforeach()
 endfunction()

+# setup_arduino_size_script(OUTPUT_VAR)
+#
+#        OUTPUT_VAR - Output variable that will contain the script path
+#
+# Generates script used to display the firmware size.
+function(SETUP_ARDUINO_SIZE_SCRIPT OUTPUT_VAR)
+    set(ARDUINO_SIZE_SCRIPT_PATH ${CMAKE_BINARY_DIR}/CMakeFiles/FirmwareSize.cmake)
+
+    file(WRITE ${ARDUINO_SIZE_SCRIPT_PATH} "
+    set(AVRSIZE_PROGRAM ${AVRSIZE_PROGRAM})
+    set(AVRSIZE_FLAGS --target=ihex -d)
+
+    execute_process(COMMAND \${AVRSIZE_PROGRAM} \${AVRSIZE_FLAGS} \${FIRMWARE_IMAGE}
+                    OUTPUT_VARIABLE SIZE_OUTPUT)
+
+    string(STRIP \"\${SIZE_OUTPUT}\" SIZE_OUTPUT)
+
+    # Convert lines into a list
+    string(REPLACE \"\\n\" \";\" SIZE_OUTPUT \"\${SIZE_OUTPUT}\")
+
+    list(GET SIZE_OUTPUT 1 SIZE_ROW)
+
+    if(SIZE_ROW MATCHES \"[ \\t]*[0-9]+[ \\t]*[0-9]+[ \\t]*[0-9]+[ \\t]*([0-9]+)[ \\t]*([0-9a-fA-F]+).*\")
+        message(\"Total size \${CMAKE_MATCH_1} bytes\")
+    endif()")
+
+    set(${OUTPUT_VAR} ${ARDUINO_SIZE_SCRIPT_PATH} PARENT_SCOPE)
+endfunction()

 #=============================================================================#
 #                              C Flags                                        #
@@ -1205,11 +1253,14 @@
     find_program(ARDUINO_AVRDUDE_PROGRAM
                  NAMES avrdude)

-    find_program(ARDUINO_AVRDUDE_CONFIG_PATH
-                 NAMES avrdude.conf
-                 PATHS ${ARDUINO_SDK_PATH} /etc/avrdude
-                 PATH_SUFFIXES hardware/tools
-                               hardware/tools/avr/etc)
+    find_program(AVRSIZE_PROGRAM
+                 NAMES avr-size)
+
+    find_file(ARDUINO_AVRDUDE_CONFIG_PATH
+              NAMES avrdude.conf
+              PATHS ${ARDUINO_SDK_PATH} /etc/avrdude
+              PATH_SUFFIXES hardware/tools
+                            hardware/tools/avr/etc)

     # Ensure that all required paths are found
     foreach(VAR_NAME  ARDUINO_CORES_PATH
@@ -1238,6 +1289,8 @@
     message(STATUS "Arduino SDK version ${ARDUINO_SDK_VERSION}: ${ARDUINO_SDK_PATH}")

+    setup_arduino_size_script(ARDUINO_SIZE_SCRIPT)
+    set(ARDUINO_SIZE_SCRIPT ${ARDUINO_SIZE_SCRIPT} CACHE INTERNAL "Arduino Size Script")

     load_board_settings()
     load_programmers_settings()


CMake: Added VS2008 compiler definitions.

--- cmake/PlatformSpecific.cmake
+++ cmake/PlatformSpecific.cmake
@@ -44,6 +44,33 @@
   else()
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
   endif()
+
+	IF(MSVC90)
+		message(STATUS "Version 9")
+		# Whole Program Opt. gui display fixed in cmake 2.8.5
+		# See http://public.kitware.com/Bug/view.php?id=6794
+		# /GL will be used to build the code but the selection is not displayed in the menu
+
+		set(MSVC_RELEASE_COMPILER_FLAGS "/WX- /MP /Ox /Ob2 /Oi /Oy /GT /GL /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Gd /TP /GL /GF /Ot")
+		set(MSVC_RELEASE_WITH_DEBUG_COMPILER_FLAGS "/Zi")
+
+		set(CMAKE_C_FLAGS_RELEASE   "${CMAKE_C_FLAGS_RELEASE}   ${MSVC_RELEASE_COMPILER_FLAGS} ${MSVC_RELEASE_WITH_DEBUG_COMPILER_FLAGS}")
+		set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MSVC_RELEASE_COMPILER_FLAGS} ${MSVC_RELEASE_WITH_DEBUG_COMPILER_FLAGS}")
+
+		#set(MSVC_RELEASE_LINKER_FLAGS "/LTCG /OPT:REF /OPT:ICF")
+		#set(MSVC_RELEASE_WITH_DEBUG_LINKER_FLAGS "/DEBUG")
+		#set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} ${MSVC_RELEASE_LINKER_FLAGS} ${MSVC_RELEASE_WITH_DEBUG_LINKER_FLAGS}")
+
+		# currently not in release version but should be soon - in meantime linker will inform you about switching this flag automatically because of /GL
+		set(MSVC_RELEASE_LINKER_FLAGS "/LTCG")
+		set(STATIC_LIBRARY_FLAGS_RELEASE "${STATIC_LIBRARY_FLAGS_RELEASE} ${MSVC_RELEASE_LINKER_FLAGS}")
+
+		# Definitions.
+		ADD_DEFINITIONS(-D__SSE2__ -D__SSE__ -D__MMX__)
+		ADD_DEFINITIONS(-D_UNICODE -DUNICODE)
+		ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
+
+	ENDIF(MSVC90)

 	IF(MSVC10)
 		message(STATUS "Version 10")


Bug 775: propagate generator when workingaround cmake bug 9220

--- cmake/language_support.cmake
+++ cmake/language_support.cmake
@@ -33,7 +33,7 @@
   file(WRITE ${CMAKE_BINARY_DIR}/language_tests/${language}/CMakeLists.txt
     ${text})
   execute_process(
-    COMMAND ${CMAKE_COMMAND} .
+    COMMAND ${CMAKE_COMMAND} . -G "${CMAKE_GENERATOR}"
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/language_tests/${language}
     RESULT_VARIABLE return_code
     OUTPUT_QUIET
@@ -64,3 +64,4 @@
 #message("CXX_language_works = ${CXX_language_works}")
 #workaround_9220(CXXp CXXp_language_works)
 #message("CXXp_language_works = ${CXXp_language_works}")
+


build: remove `ANALYZE_CODE_COVERAGE` from `_add_host_variant_c_compile_link_flags`

This flag does not make sense here as this function is called from
`_add_host_variant_link_flags` and `_add_host_variant_c_compile_flags`.
The latter will add the flags appropriately.  The former is always
invoked *after* `_add_host_variant_c_compile_flags`.  This effectively
was duplicating the flags.

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -78,11 +78,10 @@

 # Usage:
 # _add_host_variant_c_compile_link_flags(
-#   ANALYZE_CODE_COVERAGE analyze_code_coverage
 #   RESULT_VAR_NAME result_var_name
 # )
 function(_add_host_variant_c_compile_link_flags)
-  set(oneValueArgs RESULT_VAR_NAME ANALYZE_CODE_COVERAGE)
+  set(oneValueArgs RESULT_VAR_NAME)
   cmake_parse_arguments(CFLAGS
     ""
     "${oneValueArgs}"
@@ -150,11 +149,6 @@
      endif()
   endif()

-  if(CFLAGS_ANALYZE_CODE_COVERAGE)
-    list(APPEND result "-fprofile-instr-generate"
-                       "-fcoverage-mapping")
-  endif()
-
   _compute_lto_flag("${SWIFT_TOOLS_ENABLE_LTO}" _lto_flag_out)
   if (_lto_flag_out)
     list(APPEND result "${_lto_flag_out}")
@@ -165,9 +159,7 @@

 function(_add_host_variant_c_compile_flags target)
-  _add_host_variant_c_compile_link_flags(
-    ANALYZE_CODE_COVERAGE FALSE
-    RESULT_VAR_NAME result)
+  _add_host_variant_c_compile_link_flags(RESULT_VAR_NAME result)
   target_compile_options(${target} PRIVATE
     ${result})

@@ -332,9 +324,7 @@
 endfunction()

 function(_add_host_variant_link_flags target)
-  _add_host_variant_c_compile_link_flags(
-    ANALYZE_CODE_COVERAGE ${SWIFT_ANALYZE_CODE_COVERAGE}
-    RESULT_VAR_NAME result)
+  _add_host_variant_c_compile_link_flags(RESULT_VAR_NAME result)
   target_link_options(${target} PRIVATE
     ${result})


Most swift targets should depend on SwiftOnoneSupport, except Core and SwiftOnoneSupport

--- cmake/modules/AddSwift.cmake
+++ cmake/modules/AddSwift.cmake
@@ -1344,13 +1344,18 @@
   # All Swift code depends on the standard library, except for the standard
   # library itself.
   if(SWIFTLIB_TARGET_LIBRARY AND NOT SWIFTLIB_IS_STDLIB_CORE)
-    list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core)
+    list(APPEND SWIFTLIB_SWIFT_MODULE_DEPENDS Core SwiftOnoneSupport)
+  endif()
+
+  if("${name}" STREQUAL "swiftSwiftOnoneSupport")
+    list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
+      SwiftOnoneSupport)
   endif()

   if((NOT "${SWIFT_BUILD_STDLIB}") AND
      (NOT "${SWIFTLIB_SWIFT_MODULE_DEPENDS}" STREQUAL ""))
     list(REMOVE_ITEM SWIFTLIB_SWIFT_MODULE_DEPENDS
-        Core)
+      Core SwiftOnoneSupport)
   endif()

   translate_flags(SWIFTLIB "${SWIFTLIB_options}")


Revert r349517 "[CMake] Default options for faster executables on MSVC"

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -146,12 +146,6 @@
       llvm_ExternalProject_BuildCmd(tblgen_build_cmd ${target}
                                     ${LLVM_NATIVE_BUILD}
                                     CONFIGURATION Release)
-      # Create an artificial dependency between tablegen projects, because they
-      # compile the same dependencies, thus using the same build folders.
-      # FIXME: A proper fix requires sequentially chaining tablegens.
-      if (NOT ${project} STREQUAL LLVM AND TARGET ${project}-tablegen-host)
-        add_dependencies(${project}-tablegen-host LLVM-tablegen-host)
-      endif()
       add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE}
         COMMAND ${tblgen_build_cmd}
         DEPENDS CONFIGURE_LLVM_NATIVE ${target}


TableGen.cmake: Use DEPFILE for Ninja Generator with CMake>=3.7.

CMake emits build targets as relative paths (from build.ninja) but Ninja doesn't identify absolute path (in *.d) as relative path (in build.ninja).
So, let file names, in the command line, relative from ${CMAKE_BINARY_DIR}, where build.ninja is.

Note that tblgen is executed on ${CMAKE_BINARY_DIR} as working directory.

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

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

--- cmake/modules/TableGen.cmake
+++ cmake/modules/TableGen.cmake
@@ -14,8 +14,31 @@
     message(FATAL_ERROR "${project}_TABLEGEN_EXE not set")
   endif()

-  file(GLOB local_tds "*.td")
-  file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
+  # Use depfile instead of globbing arbitrary *.td(s)
+  # DEPFILE is available for Ninja Generator with CMake>=3.7.
+  if(CMAKE_GENERATOR STREQUAL "Ninja" AND NOT CMAKE_VERSION VERSION_LESS 3.7)
+    # Make output path relative to build.ninja, assuming located on
+    # ${CMAKE_BINARY_DIR}.
+    # CMake emits build targets as relative paths but Ninja doesn't identify
+    # absolute path (in *.d) as relative path (in build.ninja)
+    # Note that tblgen is executed on ${CMAKE_BINARY_DIR} as working directory.
+    file(RELATIVE_PATH ofn_rel
+      ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/${ofn})
+    set(additional_cmdline
+      -o ${ofn_rel}.tmp
+      -d ${ofn_rel}.d
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+      DEPFILE ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.d
+      )
+    set(local_tds)
+    set(global_tds)
+  else()
+    file(GLOB local_tds "*.td")
+    file(GLOB_RECURSE global_tds "${LLVM_MAIN_INCLUDE_DIR}/llvm/*.td")
+    set(additional_cmdline
+      -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
+      )
+  endif()

   if (IS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
     set(LLVM_TARGET_DEFINITIONS_ABSOLUTE ${LLVM_TARGET_DEFINITIONS})
@@ -44,7 +67,7 @@
     COMMAND ${${project}_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR}
     ${LLVM_TABLEGEN_FLAGS}
     ${LLVM_TARGET_DEFINITIONS_ABSOLUTE}
-    -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp
+    ${additional_cmdline}
     # The file in LLVM_TARGET_DEFINITIONS may be not in the current
     # directory and local_tds may not contain it, so we must
     # explicitly list it here:


Remove some hackish workarounds for windows

The add_library macro for windows was using some hackish assumptions
to ensure that libraries get installed properly.

This doesn't always work as it makes the assumption that the user actually
wanted to install the target.

Better to remove this and do it properly (e.g. see https://github.com/ros/roscpp_core/pull/10)

--- cmake/platform/windows.cmake
+++ cmake/platform/windows.cmake
@@ -9,16 +9,34 @@
 endif()

 # Windows/cmake make things difficult if building dll's.
-# These use RUNTIME_OUTPUT_DIRECTORY (aka bin) and can't be
-# distinguished from exe's. We want exe output directory to be
-# in the package's local folder (see catkin_project) - but dlls
-# to be public - ${CMAKE_BINARY_DIR}/bin.
-#
-# This is an awful hack - we want to move away from redefining
+# By default:
+#   .dll -> CMAKE_RUNTIME_OUTPUT_DIRECTORY
+#   .exe -> CMAKE_RUNTIME_OUTPUT_DIRECTORY
+#   .lib -> CMAKE_LIBRARY_OUTPUT_DIRECTORY
+#
+# Subsequently, .dll's and .exe's use the same variable and by
+# default must be installed to the same place. Which is not
+# what we want for catkin. We wish:
+#
+#   .dll -> CATKIN_GLOBAL_BIN_DESTINATION
+#   .exe -> CATKIN_PACKAGE_BIN_DESTINATION
+#   .lib -> CATKIN_PACKAGE_LIB_DESTINATION
+#
+# Since we can't put CMAKE_RUNTIME_OUTPUT_DIRECTORY to
+# two values at once, we have this ugly workaround here.
+#
+# Note - we want to move away from redefining
 # add_library style calls, but necessary until a better solution
 # is available for windows. Alternatives are to set_target_properties
 # on every lib (painful) or to make exe's public (name conflicts
 # bound to arise).
+#
+# Another feature that would be desirable, is to install .pdb's for
+# debugging along with the library. Can't do that here as we do not
+# know for sure if the library target is intended for installation
+# or not. Might a good idea to have a script that searches for all
+# pdb's under CATKIN_DEVEL_PREFIX and copies them over at the end
+# of the cmake build.
 if(BUILD_SHARED_LIBS)
   if(WIN32)
     function(add_library library)
@@ -26,28 +44,13 @@
       list(FIND ARGN "IMPORTED" FIND_POS)
       _add_library(${ARGV0} ${ARGN})
       if(${FIND_POS} EQUAL -1)
-        # It is not imported, add our custom copy rule
-        add_custom_command(TARGET ${ARGV0} POST_BUILD
-          #cmake -E copy_if_different ${ARGV0}.dll ${CMAKE_BINARY_DIR}/bin # Doesn't handle regexp, i.e. dll*
-          # uglier than above, but bruce force copies all the windows rubbish as well (.pdb, .manifest, .txt etc).
-          COMMAND if exist "${PROJECT_BINARY_DIR}/bin/${ARGV0}.dll" ( cp bin/${ARGV0}* ${CMAKE_BINARY_DIR}/bin )
-          WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
-        # Quite likely, linux guys hacking packages will not think to set the runtime destination to bin
-        # for dll's and this will create a huge headache in porting. Just do it here for now.
-        # From cmake docs - 'Installing a target with EXCLUDE_FROM_ALL set to true has undefined behavior.'
-        get_target_property(${ARGV0}_EXCLUDE_FROM_INSTALL ${ARGV0} EXCLUDE_FROM_ALL)
-        if(NOT ${${ARGV0}_EXCLUDE_FROM_INSTALL})
-          install(TARGETS ${ARGV0}
-            RUNTIME DESTINATION bin
-            ARCHIVE DESTINATION lib
-            LIBRARY DESTINATION lib)
-          if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
-            install(FILES ${CMAKE_BINARY_DIR}/bin/${ARGV0}.pdb DESTINATION bin)
-          endif()
-        endif()
+        set_target_properties(${ARGV0}
+          PROPERTIES
+              RUNTIME_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_BIN_DESTINATION}
+              LIBRARY_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}
+              ARCHIVE_OUTPUT_DIRECTORY ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_LIB_DESTINATION}
+        )
       endif()
     endfunction()
-    # Almost impossible to do the same as above to install .pdb's for exe's as we do not know their
-    # runtime destinations. Sometimes the runtime destination is bin, sometimes it is _pkg_name_/bin.
   endif()
 endif()


CMake: correctly detect OpenMP on macOS with Xcode 10 compiler

--- cmake/src-dependencies.cmake
+++ cmake/src-dependencies.cmake
@@ -46,13 +46,17 @@
     message(STATUS "Looking for OpenMP - found")
     set(HAVE_OPENMP 1)

-    if(NOT TARGET OpenMP::OpenMP)
-      add_library(OpenMP::OpenMP INTERFACE IMPORTED)
-      set_property(TARGET OpenMP::OpenMP PROPERTY INTERFACE_COMPILE_OPTIONS "${OpenMP_CXX_FLAGS}")
-      set_property(TARGET OpenMP::OpenMP PROPERTY INTERFACE_LINK_LIBRARIES "${OpenMP_CXX_FLAGS}")
+    if(NOT TARGET OpenMP::OpenMP_CXX)
+      add_library(OpenMP::OpenMP_CXX INTERFACE IMPORTED)
+      if(OpenMP_CXX_FLAGS)
+        set_property(TARGET OpenMP::OpenMP_CXX PROPERTY INTERFACE_COMPILE_OPTIONS ${OpenMP_CXX_FLAGS})
+      endif()
+      if(OpenMP_CXX_LIBRARIES)
+        set_property(TARGET OpenMP::OpenMP_CXX PROPERTY INTERFACE_LINK_LIBRARIES ${OpenMP_CXX_LIBRARIES})
+      endif()
     endif()

-    target_link_libraries(rawspeed PUBLIC OpenMP::OpenMP)
+    target_link_libraries(rawspeed PUBLIC OpenMP::OpenMP_CXX)
     set_package_properties(OpenMP PROPERTIES
                            TYPE RECOMMENDED
                            URL https://www.openmp.org/


#145 helping travis to find OCCT headers...

--- cmake_modules/FindOCCT.cmake
+++ cmake_modules/FindOCCT.cmake
@@ -40,6 +40,7 @@
 	endif()
 	find_path(OCCT_INCLUDE_DIR include inc opencascade
 		${OCCT_ROOT}
+		${OCCT_ROOT}/include
 		)
 	foreach(libName ${OCCT_LIB_NAMES})
 		find_library(libPathRelease${libName} NAMES ${libName}


Added catch to disable MSVC flags for clang (win)

--- cmake_modules/compiler.cmake
+++ cmake_modules/compiler.cmake
@@ -145,74 +145,76 @@

          # if the clang msvc-like command line interface is being used
          if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
-             set(CMAKE_CXX_FLAGS
-                     "${CMAKE_CXX_FLAGS}"
-                     " /MD"
-                     " /EHsc"
-                     " /W3"
-                     " /FC"
-                     " /Ox"
-                     " -D_SCL_SECURE_NO_WARNINGS"
-                     )
-             string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
-
-             # clang-cl 9 doesn't properly implement an alternative for -isystem <dir>
-             # for system headers, all warnings incurred by eigen must be silenced to
-             # make the build log readable.
-             if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
+             if (NOT TUDAT_DISABLE_MSVC_CLANG_CL_FLAGS)
                  set(CMAKE_CXX_FLAGS
                          "${CMAKE_CXX_FLAGS}"
-                         " -Wno-float-conversion"
-                         " -Wno-unreachable-code-return"
-                         " -Wno-unused-template"
-                         " -Wno-sign-conversion"
-                         " -Wno-undef"
-                         " -Wno-unused-result"
-                         " -Wno-documentation-unknown-command"
-                         " -Wno-missing-prototypes"
-                         " -Wno-missing-noreturn"
-                         " -Wno-deprecated-declarations"
-                         " -Wno-implicit-int-conversion"
-                         " -Wno-shadow-field-in-constructor"
-                         " -Wno-shadow-field"
-                         " -Wno-switch-enum"
-                         " -Wno-cast-align"
-                         " -Wno-float-equal"
-                         " -Wno-deprecated-dynamic-exception-spec"
-                         " -Wno-header-hygiene"
-                         " -Wno-zero-as-null-pointer-constant"
-                         " -Wno-vla-extension"
-                         " -Wno-old-style-cast"
-                         " -Wno-disabled-macro-expansion"
-                         " -Wno-covered-switch-default"
-                         " -Wno-range-loop-analysis"
-                         " -Wno-shadow"
-                         " -Wno-reserved-id-macro"
-                         " -Wno-float-overflow-conversion"
-                         " -Wno-unknown-argument"
-                         " -Wno-extra-semi"
-                         " -Wno-global-constructors"
-                         " -Wno-extra-semi-stmt"
-                         " -Wno-documentation-deprecated-sync"
-                         " -Wno-unused-variable"
-                         " -Wno-shadow-uncaptured-local"
-                         " -Wno-documentation"
-                         " -Wno-deprecated"
-                         " -Wno-unused-macros"
-                         " -Wno-vla"
-                         " -Wno-unreachable-code-break"
-                         " -Wno-implicit-fallthrough"
-                         " -Wno-conditional-uninitialized"
-                         " -Wno-exit-time-destructors"
-                         " -Wno-undefined-func-template"
-                         " -Wno-c++98-compat"
-                         " -Wno-shorten-64-to-32"
-                         " -Wno-c++98-compat-pedantic"
-                         " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
-                         " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
-                         " -Wno-return-std-move-in-c++11" # :
+                         " /MD"
+                         " /EHsc"
+                         " /W3"
+                         " /FC"
+                         " /Ox"
+                         " -D_SCL_SECURE_NO_WARNINGS"
                          )
                  string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+
+                 # clang-cl 9 doesn't properly implement an alternative for -isystem <dir>
+                 # for system headers, all warnings incurred by eigen must be silenced to
+                 # make the build log readable.
+                 if (CMAKE_CXX_COMPILER_VERSION LESS_EQUAL 12.0.0)
+                     set(CMAKE_CXX_FLAGS
+                             "${CMAKE_CXX_FLAGS}"
+                             " -Wno-float-conversion"
+                             " -Wno-unreachable-code-return"
+                             " -Wno-unused-template"
+                             " -Wno-sign-conversion"
+                             " -Wno-undef"
+                             " -Wno-unused-result"
+                             " -Wno-documentation-unknown-command"
+                             " -Wno-missing-prototypes"
+                             " -Wno-missing-noreturn"
+                             " -Wno-deprecated-declarations"
+                             " -Wno-implicit-int-conversion"
+                             " -Wno-shadow-field-in-constructor"
+                             " -Wno-shadow-field"
+                             " -Wno-switch-enum"
+                             " -Wno-cast-align"
+                             " -Wno-float-equal"
+                             " -Wno-deprecated-dynamic-exception-spec"
+                             " -Wno-header-hygiene"
+                             " -Wno-zero-as-null-pointer-constant"
+                             " -Wno-vla-extension"
+                             " -Wno-old-style-cast"
+                             " -Wno-disabled-macro-expansion"
+                             " -Wno-covered-switch-default"
+                             " -Wno-range-loop-analysis"
+                             " -Wno-shadow"
+                             " -Wno-reserved-id-macro"
+                             " -Wno-float-overflow-conversion"
+                             " -Wno-unknown-argument"
+                             " -Wno-extra-semi"
+                             " -Wno-global-constructors"
+                             " -Wno-extra-semi-stmt"
+                             " -Wno-documentation-deprecated-sync"
+                             " -Wno-unused-variable"
+                             " -Wno-shadow-uncaptured-local"
+                             " -Wno-documentation"
+                             " -Wno-deprecated"
+                             " -Wno-unused-macros"
+                             " -Wno-vla"
+                             " -Wno-unreachable-code-break"
+                             " -Wno-implicit-fallthrough"
+                             " -Wno-conditional-uninitialized"
+                             " -Wno-exit-time-destructors"
+                             " -Wno-undefined-func-template"
+                             " -Wno-c++98-compat"
+                             " -Wno-shorten-64-to-32"
+                             " -Wno-c++98-compat-pedantic"
+                             " -Wno-used-but-marked-unused" # : boost unit tests. should be reinabled and sorted out.
+                             " -Wno-newline-eof" # : end of line newline. should be reinabled and so.
+                             " -Wno-return-std-move-in-c++11" # :
+                             )
+                     string(CONCAT CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+                 endif ()
              endif ()
          endif ()
          set(CMAKE_CXX_FLAGS_DEBUG "-g")


[Config] Fixed the version issue with SQLite3, and simplified the CMake helper (now that only CMake v3+ is supported)

--- config/FindSQLite3.cmake
+++ config/FindSQLite3.cmake
@@ -15,7 +15,7 @@
   message (FATAL_ERROR "Could not find the sqlite3 command-line program! Please install it (e.g., 'sqlite3-devel' for Fedora/RedHat/CentOS).")
 else (NOT SQLITE3)
   exec_program (sqlite3 ARGS --version OUTPUT_VARIABLE MY_TMP)
-  string (REGEX REPLACE "([0-9].[0-9].[0-9]) .*" "\\1" SQLITE3_VERSION
+  string (REGEX REPLACE "([0-9.]+) .*" "\\1" SQLITE3_VERSION
 	"${MY_TMP}")
   message (STATUS "Found SQLite3 version: ${SQLITE3_VERSION}")
 endif (NOT SQLITE3)
@@ -36,14 +36,9 @@
 # either be defined or correspond to valid paths. We use the
 # find_package_handle_standard_args() CMake macro to have a standard behaviour.
 include (FindPackageHandleStandardArgs)
-if (${CMAKE_VERSION} VERSION_GREATER 2.8.1)
-  find_package_handle_standard_args (SQLite3
+find_package_handle_standard_args (SQLite3
 	REQUIRED_VARS SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR
 	VERSION_VAR SQLITE3_VERSION)
-else (${CMAKE_VERSION} VERSION_GREATER 2.8.1)
-  find_package_handle_standard_args (SQLite3
-	DEFAULT_MSG SQLITE3_LIBRARY SQLITE3_INCLUDE_DIR)
-endif (${CMAKE_VERSION} VERSION_GREATER 2.8.1)

 if (SQLITE3_FOUND)
   set (SQLITE3_LIBRARIES ${SQLITE3_LIBRARY})


Fix to FindICU.cmake

Fix to FindICU.cmake

--- cmake/FindICU.cmake
+++ cmake/FindICU.cmake
@@ -202,6 +202,7 @@
     endif(PKG_CONFIG_FOUND)

     # Check libraries
+    set(${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS io)
     foreach(${ICU_PRIVATE_VAR_NS}_COMPONENT ${${ICU_PUBLIC_VAR_NS}_FIND_COMPONENTS})
         set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_RELEASE_NAMES )
         set(${ICU_PRIVATE_VAR_NS}_POSSIBLE_DEBUG_NAMES )


cmake: Set PYTHON_EXECUTABLE env var with kconfig

In order to be able to invoke Python from Kconfig files,
set the path to the Python executable (which can be python,
python3, py -3, etc) as an environment variable so that
Kconfig shell invocations can use it like:

config MY_OPTION
       string "My option string"
       default "$(shell,$(PYTHON_EXECUTABLE) \
	          $(ZEPHYR_BASE)\scripts\script.py)"

Signed-off-by: Carles Cufi <853081dc8dca4fe6a7e3c984752718b5db36e060@nordicsemi.no>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -23,6 +23,7 @@
 set(ENV{srctree}            ${ZEPHYR_BASE})
 set(ENV{KERNELVERSION}      ${KERNELVERSION})
 set(ENV{KCONFIG_CONFIG}     ${DOTCONFIG})
+set(ENV{PYTHON_EXECUTABLE} ${PYTHON_EXECUTABLE})

 # Set environment variables so that Kconfig can prune Kconfig source
 # files for other architectures
@@ -33,6 +34,7 @@
 add_custom_target(
   menuconfig
   ${CMAKE_COMMAND} -E env
+  PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
   srctree=${ZEPHYR_BASE}
   KERNELVERSION=${KERNELVERSION}
   KCONFIG_CONFIG=${DOTCONFIG}


kconfig.cmake: Consistently use ZEPHYR_BASE

I found the mixing of ZEPHYR_BASE and PROJECT_SOURCE_DIR confusing. They
are synonyms.

Related issue: https://github.com/zephyrproject-rtos/zephyr/issues/7173

Signed-off-by: Ulf Magnusson <f650684f780c6b48c0158c4e0f2e27f74aabc755@gmail.com>

--- cmake/kconfig.cmake
+++ cmake/kconfig.cmake
@@ -4,7 +4,7 @@
 file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig/include/config)
 file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/include/generated)

-set_ifndef(KCONFIG_ROOT ${PROJECT_SOURCE_DIR}/Kconfig)
+set_ifndef(KCONFIG_ROOT ${ZEPHYR_BASE}/Kconfig)

 set(BOARD_DEFCONFIG ${BOARD_DIR}/${BOARD}_defconfig)
 set(DOTCONFIG       ${PROJECT_BINARY_DIR}/.config)
@@ -13,7 +13,7 @@
 string(REPLACE " " ";" CONF_FILE_AS_LIST ${CONF_FILE})
 endif()

-set(ENV{srctree}            ${PROJECT_SOURCE_DIR})
+set(ENV{srctree}            ${ZEPHYR_BASE})
 set(ENV{KERNELVERSION}      ${PROJECT_VERSION})
 set(ENV{KCONFIG_CONFIG}     ${DOTCONFIG})
 set(ENV{KCONFIG_AUTOHEADER} ${AUTOCONF_H})
@@ -42,7 +42,7 @@
     add_custom_target(
       ${kconfig_target}
       ${CMAKE_COMMAND} -E env
-      srctree=${PROJECT_SOURCE_DIR}
+      srctree=${ZEPHYR_BASE}
       KERNELVERSION=${PROJECT_VERSION}
       KCONFIG_CONFIG=${DOTCONFIG}
       ENV_VAR_ARCH=$ENV{ENV_VAR_ARCH}
@@ -131,7 +131,7 @@
 execute_process(
   COMMAND
   ${PYTHON_EXECUTABLE}
-  ${PROJECT_SOURCE_DIR}/scripts/kconfig/kconfig.py
+  ${ZEPHYR_BASE}/scripts/kconfig/kconfig.py
   ${KCONFIG_ROOT}
   ${PROJECT_BINARY_DIR}/.config
   ${PROJECT_BINARY_DIR}/include/generated/autoconf.h


cmake: qi_create_idl: Fix missing quote.

Change-Id: Ia65c37afcd9c30d869de095ad1173d0b95a0a189
Reviewed-on: http://gerrit.aldebaran.lan:8080/18697
Reviewed-by: cgestes <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Reviewed-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>
Tested-by: mnottale <e3ccf1b6558404e921a21fa09cebb1153b50ec36@aldebaran-robotics.com>

--- codegen/src/idl-config.cmake
+++ codegen/src/idl-config.cmake
@@ -137,7 +137,7 @@
   if (NOT ARG_PREFIX)
     set(ARG_PREFIX ".")
   endif()
-  string(REPLACE ";" "," _type_map ${ARG_TYPE_MAP})
+  string(REPLACE ";" "," _type_map "${ARG_TYPE_MAP}")
   foreach(c ${ARG_CLASSES})
     string(REPLACE "::" ";" split_class ${c})
     list(REVERSE split_class)


[Build] The Git-related macro no longer stops with an error when the build occurs in a non-Git directory.

--- config/FindGit.cmake
+++ config/FindGit.cmake
@@ -14,7 +14,7 @@
       OUTPUT_VARIABLE ${prefix}_WC_REVISION_HASH
       OUTPUT_STRIP_TRAILING_WHITESPACE)
     if (NOT ${Git_error} EQUAL 0)
-      message (SEND_ERROR
+      message (STATUS
 	"Command \"${Git_EXECUTBALE} rev-list -n 1 HEAD\" in directory ${dir} failed with output:\n${Git_error}")
     else (NOT ${Git_error} EQUAL 0)
       execute_process (COMMAND ${Git_EXECUTABLE}


Added qt library in target_link_libraries

--- CMake/pqCreateTestSuite.cmake
+++ CMake/pqCreateTestSuite.cmake
@@ -25,12 +25,12 @@

 include_directories(
     "${PQTESTSUITE_INCLUDE_DIR}"
-    ${INCLUDE_PATH}
+    "${INCLUDE_PATH}"
     "${PROJECT_BINARY_DIR}"
 )

 ADD_EXECUTABLE(${PROJECT_NAME} ${SOURCE_FILES} ${MY_MOC_CXX})

-TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_QTTEST_LIBRARY} ${PQTESTSUITE_LIBRARY} ${LIBRARIES_DEPENDENCIES})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${QT_LIBRARIES} ${QT_QTTEST_LIBRARY} ${PQTESTSUITE_LIBRARY} ${LIBRARIES_DEPENDENCIES})

 ENDMACRO()


Bump Gamgee version to TOT from upstream

[git-p4: depot-paths = "//sw/gpgpu/nvbio/bqsr/": change = 18886592]

--- contrib/gamgee.cmake
+++ contrib/gamgee.cmake
@@ -16,7 +16,7 @@
     DEPENDS boost htslib
     #GIT_REPOSITORY "https://github.com/broadinstitute/gamgee.git"
     GIT_REPOSITORY "git://wilkins/broadinstitute/gamgee.git"
-    GIT_TAG "921f74d70b513a3c8295265d9b6503c58d47ace9"
+    GIT_TAG "af59598d74bcce7bc35cf73fbadac2a4e80ae9d6"
     BUILD_IN_SOURCE 1
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ${Boost_B2} -s BOOST_ROOT=${Boost_INSTALL_PREFIX} -s BOOST_BUILD_PATH=${Boost_PREFIX} ${GAMGEE_TOOLCHAIN_FLAGS} variant=${GAMGEE_BUILD_TYPE}


Android: build position independent executables.

this is required for Android 5.0+

--- tools/build/cmake/toolchains/android.toolchain.cmake
+++ tools/build/cmake/toolchains/android.toolchain.cmake
@@ -1413,7 +1413,7 @@
 endif()

 # pie/pic
-if( NOT (ANDROID_NATIVE_API_LEVEL LESS 16) AND (NOT DEFINED ANDROID_APP_PIE OR ANDROID_APP_PIE) AND (CMAKE_VERSION VERSION_GREATER 2.8.8) )
+if( (NOT DEFINED ANDROID_APP_PIE OR ANDROID_APP_PIE) AND (CMAKE_VERSION VERSION_GREATER 2.8.8) )
  set( CMAKE_POSITION_INDEPENDENT_CODE TRUE )
  set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
 else()
@@ -1677,4 +1677,4 @@
 #   ANDROID_DEFAULT_NDK_API_LEVEL_${ARCH}
 #   ANDROID_NDK_SEARCH_PATHS
 #   ANDROID_SUPPORTED_ABIS_${ARCH}
-#   ANDROID_SUPPORTED_NDK_VERSIONS+#   ANDROID_SUPPORTED_NDK_VERSIONS


Fixes #81

Fixes #81

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -664,13 +664,13 @@
   set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE STRING "" ${FORCE_CACHE})
 endif()
 if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY)
-  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY CACHE STRING "" ${FORCE_CACHE})
+  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH CACHE STRING "" ${FORCE_CACHE})
 endif()
 if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE)
-  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY CACHE STRING "" ${FORCE_CACHE})
+  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH CACHE STRING "" ${FORCE_CACHE})
 endif()
 if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE)
-  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY CACHE STRING "" ${FORCE_CACHE})
+  set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH CACHE STRING "" ${FORCE_CACHE})
 endif()

 #
@@ -688,6 +688,7 @@
     XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}")
   endif()
 endmacro(set_xcode_property)
+
 # This macro lets you find executable programs on the host system.
 macro(find_host_package)
   set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)


Take out setting of CMAKE_SYSTEM_PROCESSOR, the multiple arch settings are causing build failures in Travis CI

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -252,7 +252,6 @@
   OUTPUT_STRIP_TRAILING_WHITESPACE)
 # Standard settings.
 set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "")
-set(CMAKE_SYSTEM_PROCESSOR ${IOS_ARCH} CACHE INTERNAL "")
 set(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION} CACHE INTERNAL "")
 set(UNIX TRUE CACHE BOOL "")
 set(APPLE TRUE CACHE BOOL "")


rename multisense_lcm target name to multisense-lcm


Don't build atlas-driver on Mac

Don't build atlas-driver on Mac


v2.4.9

--- VERSION.cmake
+++ VERSION.cmake
@@ -44,10 +44,10 @@
 #    set COMPATMINOR to MINOR. (binary incompatible change)
 #

-# Package version 2.4.8
+# Package version 2.4.9
 SET(OPENWSMAN_MAJOR "2")
 SET(OPENWSMAN_MINOR "4")
-SET(OPENWSMAN_PATCH "8")
+SET(OPENWSMAN_PATCH "9")

 # Plugin API 2.2
 SET(OPENWSMAN_PLUGIN_API_MAJOR "2")


Enable DiffusionHeaderReader in CMake

Enable DiffusionHeaderReader in CMake

Conflicts:

	Modules/DiffusionImaging/DiffusionCore/files.cmake

--- Modules/DiffusionImaging/DiffusionCore/files.cmake
+++ Modules/DiffusionImaging/DiffusionCore/files.cmake
@@ -8,6 +8,10 @@
   DicomImport/mitkPhilipsDicomDiffusionImageHeaderReader.cpp
   DicomImport/mitkSiemensDicomDiffusionImageHeaderReader.cpp
   DicomImport/mitkSiemensMosaicDicomDiffusionImageHeaderReader.cpp
+
+  DicomImport/mitkDiffusionDICOMFileReader.cpp
+  DicomImport/mitkDiffusionHeaderDICOMFileReader.cpp
+  DicomImport/mitkDiffusionHeaderSiemensDICOMFileReader.cpp

   # DataStructures
   IODataStructures/mitkDiffusionCoreObjectFactory.cpp


[OGRE-395] Resolved issue finding OS X framework in FindOgre

--HG--
branch : v1-9

--- CMake/Packages/FindOGRE.cmake
+++ CMake/Packages/FindOGRE.cmake
@@ -154,7 +154,7 @@
   RenderSystem_Direct3D11 RenderSystem_Direct3D9 RenderSystem_GL RenderSystem_GL3Plus RenderSystem_GLES RenderSystem_GLES2)
 set(OGRE_RESET_VARS
   OGRE_CONFIG_INCLUDE_DIR OGRE_INCLUDE_DIR
-  OGRE_LIBRARY_FWK OGRE_LIBRARY_REL OGRE_LIBRARY_DBG
+  OGRE_FRAMEWORK_INCLUDES OGRE_FRAMEWORK_PATH OGRE_LIBRARY_FWK OGRE_LIBRARY_REL OGRE_LIBRARY_DBG
   OGRE_PLUGIN_DIR_DBG OGRE_PLUGIN_DIR_REL OGRE_MEDIA_DIR)
 foreach (comp ${OGRE_COMPONENTS})
   set(OGRE_RESET_VARS ${OGRE_RESET_VARS}
@@ -169,8 +169,16 @@
 	# try to locate Ogre via pkg-config
 	use_pkgconfig(OGRE_PKGC "OGRE${OGRE_LIB_SUFFIX}")

-	# try to find framework on OSX
-	findpkg_framework(Ogre)
+	# Set the framework search path for OS X
+    set(OGRE_FRAMEWORK_SEARCH_PATH
+      ${CMAKE_FRAMEWORK_PATH}
+      ~/Library/Frameworks
+      /Library/Frameworks
+      /System/Library/Frameworks
+      /Network/Library/Frameworks
+      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/Release
+      ${CMAKE_CURRENT_SOURCE_DIR}/lib/macosx/Debug
+    )
 else()
 	set(OGRE_LIBRARY_FWK "")
 endif()
@@ -232,7 +240,7 @@
   set(OGRE_LIBRARY "NOTFOUND")
 endif ()

-set(OGRE_INCLUDE_DIR ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INCLUDE_DIR})
+set(OGRE_INCLUDE_DIR ${OGRE_CONFIG_INCLUDE_DIR} ${OGRE_INCLUDE_DIR} ${OGRE_FRAMEWORK_INCLUDES})
 list(REMOVE_DUPLICATES OGRE_INCLUDE_DIR)
 findpkg_finish(OGRE)
 add_parent_dir(OGRE_INCLUDE_DIRS OGRE_INCLUDE_DIR)
@@ -381,8 +389,8 @@
   find_path(OGRE_${COMPONENT}_INCLUDE_DIR NAMES ${HEADER} HINTS ${OGRE_INCLUDE_DIRS} ${OGRE_PREFIX_SOURCE} PATH_SUFFIXES ${COMPONENT} OGRE/${COMPONENT} Components/${COMPONENT}/include)
   set(OGRE_${COMPONENT}_LIBRARY_NAMES "Ogre${COMPONENT}${OGRE_LIB_SUFFIX}")
   get_debug_names(OGRE_${COMPONENT}_LIBRARY_NAMES)
-  find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
-  find_library(OGRE_${COMPONENT}_LIBRARY_DBG NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} PATH_SUFFIXES "" "Debug")
+  find_library(OGRE_${COMPONENT}_LIBRARY_REL NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES} HINTS ${OGRE_LIBRARY_DIR_REL} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" "Release" "RelWithDebInfo" "MinSizeRel")
+  find_library(OGRE_${COMPONENT}_LIBRARY_DBG NAMES ${OGRE_${COMPONENT}_LIBRARY_NAMES_DBG} HINTS ${OGRE_LIBRARY_DIR_DBG} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" "Debug")
   make_library_set(OGRE_${COMPONENT}_LIBRARY)
   findpkg_finish(OGRE_${COMPONENT})
   if (OGRE_${COMPONENT}_FOUND)
@@ -436,9 +444,9 @@
   get_debug_names(OGRE_${PLUGIN}_LIBRARY_NAMES)
   set(OGRE_${PLUGIN}_LIBRARY_FWK ${OGRE_LIBRARY_FWK})
   find_library(OGRE_${PLUGIN}_LIBRARY_REL NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES}
-    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE opt Release Release/opt RelWithDebInfo RelWithDebInfo/opt MinSizeRel MinSizeRel/opt)
   find_library(OGRE_${PLUGIN}_LIBRARY_DBG NAMES ${OGRE_${PLUGIN}_LIBRARY_NAMES_DBG}
-    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} PATH_SUFFIXES "" OGRE opt Debug Debug/opt)
+    HINTS "${OGRE_BUILD}/lib" ${OGRE_LIBRARY_DIRS} ${OGRE_FRAMEWORK_PATH} PATH_SUFFIXES "" OGRE opt Debug Debug/opt)
   make_library_set(OGRE_${PLUGIN}_LIBRARY)

   if (OGRE_${PLUGIN}_LIBRARY OR OGRE_${PLUGIN}_INCLUDE_DIR)


Fixed assimp v2 / v3 importing problem

Fixed assimp v2 / v3 importing problem

--- CMakeModules/FindAssimp.cmake
+++ CMakeModules/FindAssimp.cmake
@@ -18,16 +18,22 @@
  # Find the headers

 #this is for version 2.x of assimp
-FIND_PATH( ASSIMP_INCLUDE_DIR assimp/assimp.h
+FIND_PATH( ASSIMP2_INCLUDE_DIR assimp/assimp.h
             PATHS /usr/include "${ASSIMP_ROOT}/include" )
-IF(ASSIMP_INCLUDE_DIR)
+IF(ASSIMP2_INCLUDE_DIR)
+  IF(NOT ASSIMP_FIND_QUIETLY)
+    SET(ASSIMP_INCLUDE_DIR ${ASSIMP2_INCLUDE_DIR})
+  ENDIF(NOT ASSIMP_FIND_QUIETLY)
   SET(ASSIMP_DEFINITIONS -DASSIMP_MAJOR_VERSION=2)
-ELSE(ASSIMP_INCLUDE_DIR)
+ELSE(ASSIMP2_INCLUDE_DIR)
   #this is for version 3.x of assimp
-  FIND_PATH( ASSIMP_INCLUDE_DIR assimp/scene.h
+  FIND_PATH( ASSIMP3_INCLUDE_DIR assimp/scene.h
     PATHS /usr/include "${ASSIMP_ROOT}/include" )
+  IF(NOT ASSIMP_FIND_QUIETLY)
+    SET(ASSIMP_INCLUDE_DIR ${ASSIMP3_INCLUDE_DIR})
+  ENDIF(NOT ASSIMP_FIND_QUIETLY)
   SET(ASSIMP_DEFINITIONS -DASSIMP_MAJOR_VERSION=3)
-ENDIF(ASSIMP_INCLUDE_DIR)
+ENDIF(ASSIMP2_INCLUDE_DIR)

 if( WIN32 )
   IF(CMAKE_SIZEOF_VOID_P EQUAL 8)


add support for ImageMagick 7

add support for ImageMagick 7

--- CMakeModules/FindMagick.cmake
+++ CMakeModules/FindMagick.cmake
@@ -31,12 +31,12 @@
 FIND_FILE ( GRAPHICS_MAGICK_CONFIG_SCRIPT NAMES GraphicsMagick-config PATHS /usr/bin /usr/local/bin )
 FIND_FILE ( GRAPHICS_MAGICK_WAND_CONFIG_SCRIPT NAMES GraphicsMagickWand-config PATHS /usr/bin /usr/local/bin )

-FIND_PATH ( IMAGE_MAGICKPP_INCLUDE_DIR NAMES ImageMagick/Magick++ ImageMagick-6/Magick++ PATHS /usr/include/ /usr/local/include/ )
-FIND_PATH ( IMAGE_MAGICK_INCLUDE_DIR NAMES ImageMagick/magick ImageMagick-6/magick PATHS /usr/include/ /usr/local/include/ )
-FIND_PATH ( IMAGE_MAGICK_WAND_INCLUDE_DIR NAMES ImageMagick/wand ImageMagick-6/wand PATHS /usr/include/ /usr/local/include/ )
-FIND_LIBRARY ( IMAGE_MAGICKPP_LIBRARY NAMES Magick++ Magick++-6 PATHS /usr/lib /usr/local/lib )
-FIND_LIBRARY ( IMAGE_MAGICK_CORE_LIBRARY NAMES MagickCore MagickCore-6 PATHS /usr/lib /usr/local/lib )
-FIND_LIBRARY ( IMAGE_MAGICK_WAND_LIBRARY NAMES MagickWand MagickWand-6 PATHS /usr/lib /usr/local/lib )
+FIND_PATH ( IMAGE_MAGICKPP_INCLUDE_DIR NAMES ImageMagick/Magick++ ImageMagick-7/Magick++ ImageMagick-6/Magick++ PATHS /usr/include/ /usr/local/include/ )
+FIND_PATH ( IMAGE_MAGICK_INCLUDE_DIR NAMES ImageMagick/magick ImageMagick-7/magick ImageMagick-6/magick PATHS /usr/include/ /usr/local/include/ )
+FIND_PATH ( IMAGE_MAGICK_WAND_INCLUDE_DIR NAMES ImageMagick/wand ImageMagick-7/wand ImageMagick-6/wand PATHS /usr/include/ /usr/local/include/ )
+FIND_LIBRARY ( IMAGE_MAGICKPP_LIBRARY NAMES Magick++ Magick++-7 Magick++-7.Q8 Magick++-7.Q16 Magick++-6 Magick++-6.Q8 Magick++-6.Q16 PATHS /usr/lib /usr/local/lib )
+FIND_LIBRARY ( IMAGE_MAGICK_CORE_LIBRARY NAMES MagickCore MagickCore-7 MagickCore-7.Q8  MagickCore-7.Q16 MagickCore-6 MagickCore-6.Q8  MagickCore-6.Q16 PATHS /usr/lib /usr/local/lib )
+FIND_LIBRARY ( IMAGE_MAGICK_WAND_LIBRARY NAMES MagickWand MagickWand-7 MagickWand-7.Q8 MagickWand-7.Q16 MagickWand-6 MagickWand-6.Q8 MagickWand-6.Q16 PATHS /usr/lib /usr/local/lib )
 FIND_FILE ( IMAGE_MAGICKPP_CONFIG_SCRIPT NAMES Magick++-config PATHS /usr/bin /usr/local/bin )
 FIND_FILE ( IMAGE_MAGICK_CONFIG_SCRIPT NAMES Magick-config PATHS /usr/bin /usr/local/bin )
 FIND_FILE ( IMAGE_MAGICK_CORE_CONFIG_SCRIPT NAMES MagickCore-config PATHS /usr/bin /usr/local/bin )


-Fix for cmake on windows: python extension module must have the extension ".pyd" instead of ".dll", so set them in target properties for cmake.

--- CMakeModules/UseYafSWIG.cmake
+++ CMakeModules/UseYafSWIG.cmake
@@ -203,8 +203,10 @@
     MODULE
     ${swig_generated_sources}
     ${swig_other_sources})
-  SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME}
-    PROPERTIES PREFIX "")
+  SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES PREFIX "")
+  IF(WIN32 AND NOT CYGWIN)
+    SET_TARGET_PROPERTIES(${SWIG_MODULE_${name}_REAL_NAME} PROPERTIES SUFFIX ".pyd")
+  ENDIF(WIN32 AND NOT CYGWIN)
 ENDMACRO(SWIG_ADD_MODULE)

 #


Switch Collage to be dynamically linked for Equalizer.

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

--- PurplePrecompileHeaders.cmake
+++ PurplePrecompileHeaders.cmake
@@ -41,10 +41,7 @@
     COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} ${COMPILE_FLAGS} -x c++-header -o ${PCH_BINARY} ${PCH_HEADER}
     )

-  add_custom_target(${TARGET}_pch
-    DEPENDS	${PCH_BINARY}
-    )
-
+  add_custom_target(${TARGET}_pch DEPENDS ${PCH_BINARY})
   add_dependencies(${TARGET} ${TARGET}_pch)

   get_target_property(OLD_FLAGS ${TARGET} COMPILE_FLAGS)


cmake: Streamline maintenance removing support for building VTKv6

--- SuperBuild/External_VTK.cmake
+++ SuperBuild/External_VTK.cmake
@@ -25,27 +25,7 @@
 set(proj        VTK) #This local name

-#Setting VTK_VERSION_MAJOR to its default value if it has not been set before
-set(VTK_VERSION_MAJOR 7 CACHE STRING "Choose the expected VTK major version to build Slicer (6 or 7).")
-# Set the possible values of VTK major version for cmake-gui
-set_property(CACHE VTK_VERSION_MAJOR PROPERTY STRINGS "6" "7")
-if(NOT "${VTK_VERSION_MAJOR}" STREQUAL "6" AND NOT "${VTK_VERSION_MAJOR}" STREQUAL "7")
-  set(VTK_VERSION_MAJOR 7 CACHE STRING "Choose the expected VTK major version to build Slicer (6 or 7)." FORCE)
-  message(WARNING "Setting VTK_VERSION_MAJOR to '7' as an invalid value was specified.")
-endif()
-
-set(USE_VTKv6 ON)
-set(USE_VTKv7 OFF)
-if(${VTK_VERSION_MAJOR} STREQUAL "7")
-  set(USE_VTKv6 OFF)
-  set(USE_VTKv7 ON)
-endif()
-
-if(USE_VTKv7)
-  set(${extProjName}_REQUIRED_VERSION "7.1.0")  #If a required version is necessary, then set this, else leave blank
-else()
-  set(${extProjName}_REQUIRED_VERSION "6.3.0")  #If a required version is necessary, then set this, else leave blank
-endif()
+set(${extProjName}_REQUIRED_VERSION "7.1.0")  #If a required version is necessary, then set this, else leave blank

 # Sanity checks
 #if(DEFINED ${extProjName}_DIR AND NOT EXISTS ${${extProjName}_DIR})
@@ -96,13 +76,9 @@

   set(VTK_QT_ARGS)
   if(${PRIMARY_PROJECT_NAME}_USE_QT)
-    if(USE_VTKv7)
-      set(VTK_QT_ARGS
-        -DModule_vtkGUISupportQt:BOOL=ON
-        )
-    else()
-      set(VTK_QT_ARGS)
-    endif()
+    set(VTK_QT_ARGS
+      -DModule_vtkGUISupportQt:BOOL=ON
+      )
     if(NOT APPLE)
       list(APPEND VTK_QT_ARGS
         #-DDESIRED_QT_VERSION:STRING=4 # Unused
@@ -190,13 +166,8 @@
       ${VTK_MAC_ARGS}
     )
   ### --- End Project specific additions
-if(USE_VTKv7)
   set(${proj}_GIT_TAG "v7.1.0")
   set(${proj}_REPOSITORY ${git_protocol}://github.com/Kitware/VTK.git)
-else()
-  set(${proj}_REPOSITORY ${git_protocol}://vtk.org/VTK.git)
-  set(${proj}_GIT_TAG "v6.3.0")
-endif()
   ExternalProject_Add(${proj}
     GIT_REPOSITORY ${${proj}_REPOSITORY}
     GIT_TAG ${${proj}_GIT_TAG}
@@ -226,16 +197,10 @@
     DEPENDERS configure
     COMMAND ${CMAKE_COMMAND}
     -DVTKSource=<SOURCE_DIR>
-    -DUSE_VTKv7=${USE_VTKv7}
     -P ${VTKPatchScript}
     )

-if(USE_VTKv7)
   set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-7.1)
-else()
-  set(${extProjName}_DIR ${CMAKE_BINARY_DIR}/${proj}-install/lib/cmake/vtk-6.3)
-endif()
-
 else()
   if(${USE_SYSTEM_${extProjName}})
     find_package(${extProjName} ${${extProjName}_REQUIRED_VERSION} REQUIRED)


PHASTA project paths

PHASTA project paths

--- phSolver/incompressible/test/testing.cmake
+++ phSolver/incompressible/test/testing.cmake
@@ -1,11 +1,11 @@
 set(CDIR ${CASES}/crossflow)
 add_test(copyInpCfg
-  cp ${CMAKE_SOURCE_DIR}/phSolver/common/input.config ${CDIR})
+  cp ${PHASTA_SOURCE_DIR}/phSolver/common/input.config ${CDIR})
 add_test(resetNumStart
   cp ${CDIR}/numstart.dat ${CDIR}/4-procs_case/numstart.dat)
 add_test(
   NAME crossflow
-  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${CMAKE_BINARY_DIR}/bin/phastaIC.exe
+  COMMAND ${MPIRUN} ${MPIRUN_PROCFLAG} 4 ${PHASTA_BINARY_DIR}/bin/phastaIC.exe
   WORKING_DIRECTORY ${CASES}/crossflow
 )
 add_test(compareCrossflow


New version: 0.3.9

New version: 0.3.9

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "3")
-SET(HAWKEY_PATCH "8")
+SET(HAWKEY_PATCH "9")


Disable VS warning about unchecked iterator access

This disbables the warning that VS issues when
a)  Checked iterators are turned on (by default this is on in debug) AND
b) a function is used that does not utilize checked iterators

boost::uuid triggers this warning

--- CMake/SurgSimBuildFlags.cmake
+++ CMake/SurgSimBuildFlags.cmake
@@ -69,7 +69,8 @@

 	# default VC++ compilation flags
 	add_definitions( -D_CRT_SECURE_NO_WARNINGS )
-
+	add_definitions( -D_SCL_SECURE_NO_WARNINGS )
+
 	# Set the iterator debug level consistently for Debug builds.
 	# [Note that you can't add_definitions() conditionally for debug only,
 	#  because for VS add_definitions() affects ALL build types in the project.


COMP: Require Apple Clang 7.0.2 as minimum in itkCompilerChecks.cmake

Following commit https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/commit/f65f786d883a4de033da118908cf06aacb9e7c2b
"ENH: Update Xcode Apple Clang compiler for nightly dashboard"

The new version numbers are based on feedback from Sean McBride, at:

Pull request "ENH: Update compiler versions for C++14"
https://github.com/InsightSoftwareConsortium/ITKSoftwareGuide/pull/156

Discussion topic "May we start using C++14 at the master branch?"
https://discourse.itk.org/t/may-we-start-using-c-14-at-the-master-branch/4172/23?u=niels_dekker

--- CMake/itkCompilerChecks.cmake
+++ CMake/itkCompilerChecks.cmake
@@ -10,10 +10,10 @@
   message(FATAL_ERROR "LLVM Clang 3.4 or later is required.")
 endif ()

-# Minimum compiler version check: Apple Clang >= 5.1 (Xcode 5.1)
+# Minimum compiler version check: Apple Clang >= 7.0.2 (Xcode 7.2.1)
 if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
-    CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
-  message(FATAL_ERROR "Apple Clang 5.1 or later is required.")
+    CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.2)
+  message(FATAL_ERROR "Apple Clang 7.0.2 or later is required.")
 endif ()

 # Minimum compiler version check: Microsoft C/C++ >= 19.10 (MSVC 14.1, Visual Studio 15 2017)


Fix logic for warning about missing repository version.

The warning message was being displayed when a proper repo existed.

--- CMake/sitkSourceVersion.cmake
+++ CMake/sitkSourceVersion.cmake
@@ -31,19 +31,18 @@

 get_git_head_revision(GIT_REFVAR _GIT_VERSION_HASH)

-# if there is not git directory we should be in a distributed package
+# if there is not a git directory we should be in a distributed package
 # which should contain this additional cmake file with the
 # _GIT_VERSION variables
-if(_GIT_VERSION_HASH STREQUAL "GITDIR-NOTFOUND" AND
-    EXISTS "${CMAKE_CURRENT_LIST_DIR}/sitkSourceVersionVars.cmake" )
-  include( "${CMAKE_CURRENT_LIST_DIR}/sitkSourceVersionVars.cmake" )
+if(_GIT_VERSION_HASH STREQUAL "GITDIR-NOTFOUND")
+    if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/sitkSourceVersionVars.cmake")
+      include( "${CMAKE_CURRENT_LIST_DIR}/sitkSourceVersionVars.cmake" )
+    else()
+      message(WARNING "Unable to determine source version!\n
+Please use the git repository or an official source distribution.\n")
+      set(_GIT_VERSION_DEV "")
+    endif()
   return()
-else()
-  message(WARNING "Unable to determine source version!\n
-Please use the git repository or an official source distribution.\n")
-  set(_GIT_VERSION_DEV "")
-  return()
-
 endif()

 if(_GIT_VERSION_HASH MATCHES "[a-fA-F0-9]+")


Updated hash for new mitk-data

Updated hash for new mitk-data

--- CMakeExternals/MITKData.cmake
+++ CMakeExternals/MITKData.cmake
@@ -13,7 +13,7 @@

 if(BUILD_TESTING)

-  set(revision_tag f5b46a38)
+  set(revision_tag f199a087)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


replace all dashed with underscore

replace all dashed with underscore

git-svn-id: dea4c50957f75874cf9791776be29d2e34106c50@173 ef0d8562-5c19-0410-972e-841db63a069c

--- CMakeModules/FlagsTests.cmake
+++ CMakeModules/FlagsTests.cmake
@@ -2,6 +2,7 @@

 MACRO(CHECK_CFLAGS_APPEND DEST_FLAGS FLAG)
 STRING(REGEX REPLACE "^-+(.*)$" "\\1" FLAG_NAME ${FLAG})
+STRING(REGEX REPLACE "[-]" "_" FLAG_NAME "${FLAG_NAME}" )
 STRING(TOUPPER ${FLAG_NAME} FLAG_NAME)
 SET(HAVE_FLAG "HAVE_FLAG_${FLAG_NAME}")


add OpenCL dependency for cmake builds

add OpenCL dependency for cmake builds

--- cmake/UbiTrackFindCoreLibraries.cmake
+++ cmake/UbiTrackFindCoreLibraries.cmake
@@ -167,6 +167,15 @@
   MESSAGE(STATUS "Found OpenGL: ${OpenGL_INCLUDE_DIR} - ${OpenGL_LIBRARIES}")
 ENDIF(OpenGL_FOUND)

+# OpenCL
+SET(HAVE_OPENCL 0)
+find_package(OpenCL)
+IF(OpenCL_FOUND)
+  add_definitions(-DHAVE_OPENCL)
+  SET(HAVE_OPENCL 1)
+  MESSAGE(STATUS "Found OpenCL: ${OpenCL_INCLUDE_DIR} - ${OpenCL_LIBRARIES}")
+ENDIF(OpenCL_FOUND)
+
 #FreeGlut
 IF(WIN32 AND DEFINED EXTERNAL_LIBRARIES_DIR)
 	set(FREEGLUT_ROOT_DIR "${EXTERNAL_LIBRARIES_DIR}/glut")


Add resolution of dependencies through conan (#199)

--- cmake/bde_external_dependencies.cmake
+++ cmake/bde_external_dependencies.cmake
@@ -53,6 +53,48 @@
     endif()
 endfunction()

+# :: bde_load_conan_build_info ::
+# -----------------------------------------------------------------------------
+# The function tries to detect the use of conan and loads the
+# 'conan_build_info.cmake' file into memory
+function(bde_load_conan_build_info)
+    if (TARGET "CONAN_PKG::bde-tools")
+        message(STATUS "Conan package already loaded")
+        return()
+    endif()
+
+    set(CONAN_BUILD_INFO ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+    if (EXISTS ${CONAN_BUILD_INFO})
+        message(STATUS "Found ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake")
+        include(${CONAN_BLD_INFO})
+        conan_basic_setup(TARGETS)
+    endif()
+endfunction()
+
+# :: bde_resolve_external_dependency_conan ::
+# -----------------------------------------------------------------------------
+# The function tries to resolve a single dependency using conan targets.  The
+# main purpose of the function is to resolve the disparity of target names, and
+# work around the current limitation in the conan cmake generator creating
+# non-global targets that cannot be aliased
+function(bde_resolve_external_dependency_conan depName)
+    bde_assert_no_extra_args()
+
+    set(conanDep "CONAN_PKG::${depName}")
+    if (TARGET ${conanDep})
+        bde_log(VERBOSE "Found dependency ${depName} in conan")
+
+        # After https://github.com/conan-io/conan/issues/3482 is resolved this
+        # should be just an alias
+        add_library(${depName} INTERFACE IMPORTED)
+        target_link_libraries(${depName} INTERFACE ${conanDep})
+        foreach(prop INTERFACE_LINK_LIBRARIES INTERFACE_INCLUDE_DIRECTORIES INTERFACE_COMPILE_DEFINITIONS INTERFACE_COMPILE_OPTIONS)
+            get_property(tmpProp TARGET ${conanDep} PROPERTY ${prop})
+            set_property(TARGET ${conanDep} PROPERTY ${prop} ${tmpProp})
+        endforeach()
+    endif()
+endfunction()
+
 # :: bde_import_target_from_pc ::
 # -----------------------------------------------------------------------------
 # The function tries to find the static library using the pkg-config file(s)
@@ -199,8 +241,9 @@
 # The function tries to resolve all external dependencies in the following
 # order:
 # 1. CMake config
-# 2. .pc file
-# 3. Raw static library.
+# 2. Conan generated cmake target
+# 3. .pc file
+# 4. Raw static library.
 #
 # If the dependency (library) is found, the library is added to the link
 # line (the order is maintained using dependency information found in the
@@ -210,6 +253,8 @@
 function(bde_resolve_external_dependencies externalDeps)
     bde_assert_no_extra_args()

+    bde_load_conan_build_info()
+
     set(deps ${externalDeps})

     while(deps)
@@ -232,6 +277,12 @@
             endif()

             bde_log(VERBOSE "Processing ${depName}")
+
+            # Checking if defined in conanfile
+            bde_resolve_external_dependency_conan(${depName})
+            if (NOT depName OR TARGET ${depName})
+                continue()
+            endif()

             # Looking up CMake export for the external dependency.
             find_package(


When building with LLVM_ENABLE_MODULES, put the module cache into the build
directory. This is important for build bots to avoid filling up /tmp.

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -138,25 +138,6 @@
     message(WARNING "${flag} is not supported.")
   endif()
 endfunction()
-
-if (LLVM_ENABLE_MODULES)
-  set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fmodules -Xclang -fmodules-local-submodule-visibility")
-  # Check that we can build code with modules enabled, and that repeatedly
-  # including <cassert> still manages to respect NDEBUG properly.
-  CHECK_CXX_SOURCE_COMPILES("#undef NDEBUG
-                             #include <cassert>
-                             #define NDEBUG
-                             #include <cassert>
-                             int main() { assert(this code is not compiled); }"
-                             CXX_SUPPORTS_MODULES)
-  set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-  if (CXX_SUPPORTS_MODULES)
-    append_if(CXX_SUPPORTS_MODULES "-fmodules -Xclang -fmodules-local-submodule-visibility" CMAKE_CXX_FLAGS)
-  else()
-    message(FATAL_ERROR "LLVM_ENABLE_MODULES is not supported by this compiler")
-  endif()
-endif(LLVM_ENABLE_MODULES)

 if( LLVM_ENABLE_PIC )
   if( XCODE )
@@ -490,6 +471,24 @@
       message(FATAL_ERROR "LLVM requires C++11 support but the '-std=c++11' flag isn't supported.")
     endif()
   endif()
+  if (LLVM_ENABLE_MODULES)
+    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -fmodules -Xclang -fmodules-local-submodule-visibility -fmodules-cache-path=module.cache")
+    # Check that we can build code with modules enabled, and that repeatedly
+    # including <cassert> still manages to respect NDEBUG properly.
+    CHECK_CXX_SOURCE_COMPILES("#undef NDEBUG
+                               #include <cassert>
+                               #define NDEBUG
+                               #include <cassert>
+                               int main() { assert(this code is not compiled); }"
+                               CXX_SUPPORTS_MODULES)
+    set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+    if (CXX_SUPPORTS_MODULES)
+      append_if(CXX_SUPPORTS_MODULES "-fmodules -Xclang -fmodules-local-submodule-visibility -fmodules-cache-path=module.cache" CMAKE_CXX_FLAGS)
+    else()
+      message(FATAL_ERROR "LLVM_ENABLE_MODULES is not supported by this compiler")
+    endif()
+  endif(LLVM_ENABLE_MODULES)
 endif( MSVC )

 macro(append_common_sanitizer_flags)


[CMake] Add SWIFT_STDLIB_SHORT_MANGLING_LOOKUPS to StandaloneOverlay (#40311)

This will allow it to have a sensible default in configurations that use it.

Addresses rdar://85815655

--- cmake/modules/StandaloneOverlay.cmake
+++ cmake/modules/StandaloneOverlay.cmake
@@ -85,6 +85,9 @@
 targets on Darwin platforms. These targets are in addition to the full \
 library targets.")

+option(SWIFT_STDLIB_SHORT_MANGLING_LOOKUPS
+       "Build stdlib with fast-path context descriptor lookups based on well-known short manglings."
+       TRUE)

 # -----------------------------------------------------------------------------
 # Constants


Update DetectCPUFeatures.cmake

Update DetectCPUFeatures.cmake

--- cmake_modules/DetectCPUFeatures.cmake
+++ cmake_modules/DetectCPUFeatures.cmake
@@ -1,6 +1,5 @@
 include(CheckCXXSourceCompiles)

-message(STATUS "TEST TEST")
 set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})

 set(SSE4PROG "


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -20,6 +20,7 @@
 Name[fr]=VLC
 Name[gl]=VLC
 Name[id]=VLC
+Name[ko]=VLC
 Name[nb]=VLC
 Name[nl]=VLC
 Name[nn]=VLC
@@ -43,6 +44,7 @@
 Comment[fr]=Module VLC pour Phonon
 Comment[gl]=Infraestrutura de VLC para Phonon
 Comment[id]=Backend phonon VLC
+Comment[ko]=Phonon VLC 백엔드
 Comment[nb]=Phonon VLC-motor
 Comment[nl]=VLC-backend van Phonon
 Comment[nn]=VLC-motor for Phonon


removing unused SOFA_QT4 compiler definition.
It was used to differentiate compilation with Qt3 or Qt4.

Former-commit-id: 3a9b9588ecf2be067648046ab4a070d96cf43140

--- cmake/options.cmake
+++ cmake/options.cmake
@@ -54,7 +54,6 @@
 ### the ENV{QTDIR} MUST BE DEFINED in order to find Qt (giving a path in find_package does not work)
 sofa_option(SOFA-EXTERNAL_QT_PATH PATH "${QTDIR}" "Qt dir path")
 sofa_option(SOFA-EXTERNAL_QT5_PATH PATH "${QTDIR}" "Qt5 dir path")
-list(APPEND compilerDefines SOFA_QT4)

 ## boost
 set(MINIBOOST_PATH "${SOFA_EXTLIBS_DIR}/miniBoost")


Accept ISPC release candidates (e.g. v1.9.2rc2)

--- components/ospcommon/cmake/ispc.cmake
+++ components/ospcommon/cmake/ispc.cmake
@@ -55,7 +55,7 @@

 IF(NOT ISPC_VERSION)
   EXECUTE_PROCESS(COMMAND ${ISPC_EXECUTABLE} --version OUTPUT_VARIABLE ISPC_OUTPUT)
-  STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl)? " DUMMY "${ISPC_OUTPUT}")
+  STRING(REGEX MATCH " ([0-9]+[.][0-9]+[.][0-9]+)(dev|knl|rc[0-9])? " DUMMY "${ISPC_OUTPUT}")
   SET(ISPC_VERSION ${CMAKE_MATCH_1})

   IF (ISPC_VERSION VERSION_LESS ISPC_VERSION_REQUIRED)


COMP: ctkMacroWrapPythonQt - Make sure variable moc_flags is cleared

--- CMake/ctkMacroWrapPythonQt.cmake
+++ CMake/ctkMacroWrapPythonQt.cmake
@@ -263,15 +263,18 @@
     COMMENT "PythonQt ${wrap_type} Wrapping - Generating ${wrapper_init_cpp_filename}"
     VERBATIM
     )
-
+
+  # Clear variable
+  SET(moc_flags)
+
+  # Grab moc flags
+  QT4_GET_MOC_FLAGS(moc_flags)
+
   # Prepare custom_command argument
   SET(moc_flags_arg)
   FOREACH(flag ${moc_flags})
     SET(moc_flags_arg "${moc_flags_arg}^^${flag}")
   ENDFOREACH()
-
-  # Use Moc to process the wrapper headers
-  QT4_GET_MOC_FLAGS(moc_flags)

   SET(wrapper_master_moc_filename moc_${WRAPPING_NAMESPACE_UNDERSCORE}_${TARGET}_all.cpp)
   SET(wrapper_master_moc_file ${CMAKE_CURRENT_BINARY_DIR}/${wrap_int_dir}${wrapper_master_moc_filename})


Require pthreads lib on some platforms.

Require pthreads lib on some platforms.

--- CMakeModules/FindPVRTexLib.cmake
+++ CMakeModules/FindPVRTexLib.cmake
@@ -66,6 +66,9 @@
     PATHS ${PVRTEXLIB_ROOT}/OSX_x86/Static
           ${PVRTEXLIB_ROOT}/OSX_x86/Dynamic
   )
+
+  SET( USE_PTHREAD TRUE )
+
 ELSEIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
   SET( PVRTEXLIB_ROOT "/opt/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library" )
   find_path(
@@ -84,6 +87,8 @@
             ${PVRTEXLIB_ROOT}/Linux_x86_32/Dynamic
     )
   ENDIF()
+
+  SET( USE_PTHREAD TRUE )

 ELSEIF(MSVC)
   SET( PVRTEXLIB_ROOT "C:/Imagination/PowerVR/GraphicsSDK/PVRTexTool/Library" )
@@ -105,7 +110,15 @@
   ENDIF()
 ENDIF()

-set(PVRTEXLIB_LIBRARIES ${PVRTEXLIB_LIB} )
+IF( USE_PTHREAD )
+  FIND_PACKAGE( Threads REQUIRED )
+  set(PVRTEXLIB_LIBRARIES
+    ${PVRTEXLIB_LIB}
+    ${CMAKE_THREAD_LIBS_INIT}
+  )
+ELSE()
+  set(PVRTEXLIB_LIBRARIES ${PVRTEXLIB_LIB})
+ENDIF()
 set(PVRTEXLIB_INCLUDE_DIRS ${PVRTEXLIB_INCLUDE_DIR} )

 include(FindPackageHandleStandardArgs)


Defines CMAKE_BUILD_TYPE if not defined in Windows

--- cmake/ospray_macros.cmake
+++ cmake/ospray_macros.cmake
@@ -46,6 +46,9 @@
 ## Setup CMAKE_BUILD_TYPE to have a default + cycle between options in UI
 macro(ospray_configure_build_type)
   set(CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo")
+  if(NOT CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
+  endif()
   if (WIN32)
     if (NOT OSPRAY_DEFAULT_CMAKE_CONFIGURATION_TYPES_SET)
       set(CMAKE_CONFIGURATION_TYPES "${CONFIGURATION_TYPES}"
@@ -54,9 +57,6 @@
           CACHE INTERNAL "Default CMake configuration types set.")
     endif()
   else()
-    if(NOT CMAKE_BUILD_TYPE)
-      set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the build type." FORCE)
-    endif()
     set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${CONFIGURATION_TYPES})
   endif()


fix snap package filename

fix snap package filename

--- cmake/packages/snap.cmake
+++ cmake/packages/snap.cmake
@@ -7,7 +7,7 @@
 if(SNAPCRAFT_FOUND)
   set(SNAPCRAFT_TEMPLATE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Installation/Ubuntu")
   set(SNAPCRAFT_SOURCE_DIR "${CMAKE_BINARY_DIR}/_CPack_Packages/SNAP")
-  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap")
+  set(CPACK_SNAP_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}_${ARANGODB_PACKAGE_ARCHITECTURE}.snap")

   message(STATUS "Creating snap package")


x11_egl: only append library path if it's not empty

Pkg-config will strip out any -L if they match the default search
directory, so we ended up with a -L and no arguments to it, that would
consume whatever came next.

Components: EGL

VK-GL-CTS issue: 2726

Change-Id: Iba0f7d8e0a4ab66e5fd369f60e4d04ac5420df65

--- targets/x11_egl/x11_egl.cmake
+++ targets/x11_egl/x11_egl.cmake
@@ -38,7 +38,9 @@
 if (GLES1_LIBRARIES)
 	set(DEQP_SUPPORT_GLES1	ON)
 	set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARIES})
-	set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS}")
+	if (GLES1_LIBRARY_DIRS)
+		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS}")
+	endif (GLES1_LIBRARY_DIRS)
 	include_directories(${GLES1_INCLUDE_DIRS})
 endif (GLES1_LIBRARIES)


Update cmake/FindFreeRTOS.cmake

Update cmake/FindFreeRTOS.cmake

Done

Co-authored-by: Julien Staub <0e44a740070fae557fd5ae1ae9f383381457fcd0@yahoo.fr>


Restructure the control flow in msvc_fetch_mpir.cmake

--- source/cmake/Modules/msvc_fetch_mpir.cmake
+++ source/cmake/Modules/msvc_fetch_mpir.cmake
@@ -14,47 +14,51 @@

 function(msvc_fetch_mpir)
 	if(${MSVC})
-		set(DOWNLOADS_DIR "${PROJECT_BINARY_DIR}\\Downloads")
-		file(MAKE_DIRECTORY "${DOWNLOADS_DIR}")
-		set(MPIR_VERSION "2.7.2")
 		set(MPIR_INSTALL_DIR "${PROJECT_BINARY_DIR}\\mpir")
 		set(MPIR_INC_OUT "${MPIR_INSTALL_DIR}\\gmp.h")
 		set(MPIR_LIB_OUT "${MPIR_INSTALL_DIR}\\mpir.lib")
+		set(MPIR_PDB_OUT "${MPIR_INSTALL_DIR}\\mpir.pdb")
 		set(GMP_INCLUDE_DIRS "${MPIR_INSTALL_DIR}")
-		set(MPIR_LIBRARY "${MPIR_INSTALL_DIR}\\mpir.lib")
-		if(NOT EXISTS "${MPIR_INC_OUT}" OR NOT EXISTS "${MPIR_LIB_OUT}")
+		if(NOT EXISTS "${MPIR_INC_OUT}" OR NOT EXISTS "${MPIR_LIB_OUT}" OR NOT EXISTS "${MPIR_PDB_OUT}")
+			set(MPIR_VERSION "2.7.2")
 			set(MPIR_DL_BASENAME "mpir-${MPIR_VERSION}")
-			set(MPIR_DL_FILENAME "${MPIR_DL_BASENAME}.tar.bz2")
-			set(MPIR_DL_LOCATION "${DOWNLOADS_DIR}\\${MPIR_DL_FILENAME}")
-			set(MPIR_DL_SERVER "http://mpir.org")
-			set(MPIR_DL_URI "${MPIR_DL_SERVER}/${MPIR_DL_FILENAME}")
-			if(NOT EXISTS "${MPIR_DL_LOCATION}")
-				message(STATUS "Downloading ${MPIR_DL_URI} to ${MPIR_DL_LOCATION}")
-				file(DOWNLOAD "${MPIR_DL_URI}" "${MPIR_DL_LOCATION}")
-			endif()
+			set(DOWNLOADS_DIR "${PROJECT_BINARY_DIR}\\Downloads")
 			set(MPIR_SOURCE_DIR "${DOWNLOADS_DIR}\\${MPIR_DL_BASENAME}")
-			if(NOT IS_DIRECTORY "${MPIR_SOURCE_DIR}")
-				message(STATUS "Unpacking ${MPIR_DL_LOCATION}")
-				execute_process(COMMAND "${CMAKE_COMMAND}" "-E" tar xf "${MPIR_DL_LOCATION}" WORKING_DIRECTORY "${DOWNLOADS_DIR}")
-			endif()
-			get_msvc_short_ver(MSVC_SHORT_VER)
-			set(MPIR_SLN_DIR "${MPIR_SOURCE_DIR}\\build.vc${MSVC_SHORT_VER}")
 			set(MPIR_SLN_OUT_DIR "${MPIR_SOURCE_DIR}\\lib\\win32\\Debug")
+			set(MPIR_SLN_INC "${MPIR_SLN_OUT_DIR}\\gmp.h")
 			set(MPIR_SLN_LIB "${MPIR_SLN_OUT_DIR}\\mpir.lib")
-			set(MPIR_SLN_INC "${MPIR_SLN_OUT_DIR}\\gmp.h")
-			if (NOT EXISTS "${MPIR_SLN_INC}")
+			set(MPIR_SLN_PDB "${MPIR_SLN_OUT_DIR}\\mpir.pdb")
+			if (NOT EXISTS "${MPIR_SLN_INC}" OR NOT EXISTS "${MPIR_SLN_LIB}" OR NOT EXISTS "${MPIR_SLN_PDB}")
+				if(NOT IS_DIRECTORY "${MPIR_SOURCE_DIR}")
+					file(MAKE_DIRECTORY "${DOWNLOADS_DIR}")
+					set(MPIR_DL_FILENAME "${MPIR_DL_BASENAME}.tar.bz2")
+					set(MPIR_DL_LOCATION "${DOWNLOADS_DIR}\\${MPIR_DL_FILENAME}")
+					if(NOT EXISTS "${MPIR_DL_LOCATION}")
+						set(MPIR_DL_SERVER "http://mpir.org")
+						set(MPIR_DL_URI "${MPIR_DL_SERVER}/${MPIR_DL_FILENAME}")
+						message(STATUS "Downloading ${MPIR_DL_URI} to ${MPIR_DL_LOCATION}")
+						file(DOWNLOAD "${MPIR_DL_URI}" "${MPIR_DL_LOCATION}")
+					endif()
+
+					message(STATUS "Unpacking ${MPIR_DL_LOCATION}")
+					execute_process(COMMAND "${CMAKE_COMMAND}" "-E" tar xf "${MPIR_DL_LOCATION}" WORKING_DIRECTORY "${DOWNLOADS_DIR}")
+				endif()
+
 				message(STATUS "Building mpir")
+				get_msvc_short_ver(MSVC_SHORT_VER)
+				set(MPIR_SLN_DIR "${MPIR_SOURCE_DIR}\\build.vc${MSVC_SHORT_VER}")
+				message(INFO "${MPIR_SLN_DIR}\\msbuild.bat")
 				execute_process(COMMAND "${MPIR_SLN_DIR}\\msbuild.bat" gc LIB win32 Debug WORKING_DIRECTORY "${MPIR_SLN_DIR}")
 			endif()

 			#copy files to MPIR_INSTALL_DIR
 			file(COPY "${MPIR_SLN_INC}" DESTINATION "${MPIR_INSTALL_DIR}")
 			file(COPY "${MPIR_SLN_LIB}" DESTINATION "${MPIR_INSTALL_DIR}")
-			file(COPY "${MPIR_SLN_OUT_DIR}\\mpir.pdb" DESTINATION "${MPIR_INSTALL_DIR}")
-
+			file(COPY "${MPIR_SLN_PDB}" DESTINATION "${MPIR_INSTALL_DIR}")
 		endif()
+
 		set(GMP_INCLUDE_DIRS "${GMP_INCLUDE_DIRS}" PARENT_SCOPE)
-		set(GMP_LIBRARIES "${MPIR_LIBRARY}" PARENT_SCOPE)
+		set(GMP_LIBRARIES "${MPIR_LIB_OUT}" PARENT_SCOPE)
 	endif()
 endfunction()


Bugfix

Bugfix

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

--- deal.II/cmake/macros/macro_deal_ii_setup_compiler.cmake
+++ deal.II/cmake/macros/macro_deal_ii_setup_compiler.cmake
@@ -20,7 +20,7 @@
 #       DEAL_II_SETUP_COMPILER()
 #

-MACRO(DEAL_II_SETUP_TARGET target)
+MACRO(DEAL_II_SETUP_COMPILER)

   IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDE)
     MESSAGE(FATAL_ERROR


Updated external scripts to new version

Updated external scripts to new version

--- externals/CMakeExternals.cmake
+++ externals/CMakeExternals.cmake
@@ -2,7 +2,7 @@
 if(NOT EXISTS "${CMAKE_BINARY_DIR}/script-externals")
   message(STATUS "Downloading external scripts")
   execute_process(COMMAND
-    ${GIT_EXECUTABLE} clone -b v2.2 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
+    ${GIT_EXECUTABLE} clone -b v2.3 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
     ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()


[Build] Remove obsolete DB_TEST

[Build] Remove obsolete DB_TEST

--- cmake/BALLConfiguration.cmake
+++ cmake/BALLConfiguration.cmake
@@ -227,20 +227,3 @@

 ## user flag with default "QMYSQL"
 set(QT_DB_PLUGIN "QMYSQL" CACHE STRING "User switch to change the Qt database plugin.")
-
-## DB test settings
-set(DB_TEST OFF CACHE BOOL "If true, the DB tests are enabled.")
-set(DB_TEST_HOST "localhost" CACHE STRING "Test database server name (only used if DB_TEST is true).")
-set(DB_TEST_PORT "3307" CACHE STRING "Test database server port (only used if DB_TEST is true).")
-set(DB_TEST_DB "OPENMS_TEST_DB" CACHE STRING "Test database name (only used for DB_TEST).")
-set(DB_TEST_USER "openms_test_user" CACHE STRING "Test database user name (only used for DB_TEST).")
-set(DB_TEST_PW "openms_test_password" CACHE STRING "Test database user password (only used for DB_TEST).")
-if (DB_TEST)
-	# output
-	message(STATUS "DB testing enabled")
-	message(STATUS "DB testing - creating credentials files ...")
-	# create assorted credentials files
-	configure_file(${PROJECT_SOURCE_DIR}/test/DB_credentials.txt.in ${PROJECT_BINARY_DIR}/test/DB_credentials.txt)
-	configure_file(${PROJECT_SOURCE_DIR}/test/TOPP/DBImporter.ini.in ${PROJECT_BINARY_DIR}/test/TOPP/DBImporter.ini)
-	configure_file(${PROJECT_SOURCE_DIR}/test/TOPP/DBExporter.ini.in ${PROJECT_BINARY_DIR}/test/TOPP/DBExporter.ini)
-endif()


Detect MSVC14 2015 in CMake setup.

Detect MSVC14 2015 in CMake setup.

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -104,7 +104,7 @@
   endif()

   # set MS Visual Studio Compiler flags
-  if (MSVC90 OR MSVC10 OR MSVC11 OR MSVC12)
+  if (MSVC90 OR MSVC10 OR MSVC11 OR MSVC12 OR MSVC14)
     set(CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS ON)
     set(CMAKE_C_FLAGS "/DNOMINMAX /DWIN32 /D_WINDOWS /W3 /Zm1000 /Qc99"
                       CACHE STRING "Flags used by the compiler during all build types." FORCE)


Add PDBs to third-party libs

Add PDBs to third-party libs

--- cmake/bootstrap/windows.cmake
+++ cmake/bootstrap/windows.cmake
@@ -119,7 +119,7 @@
   y_git_clone("https://git.xiph.org/ogg.git" DIR ${_package})
   y_cmake(${_package}
     TARGET "ogg"
-    CONFIG Release Debug)
+    CONFIG RelWithDebInfo Debug)
   file(RENAME ${BUILD_DIR}/${_package}/Debug/ogg.lib ${BUILD_DIR}/${_package}/Debug/oggd.lib)
   file(RENAME ${BUILD_DIR}/${_package}/Debug/ogg.pdb ${BUILD_DIR}/${_package}/Debug/oggd.pdb)
   file(INSTALL
@@ -128,7 +128,8 @@
     ${BUILD_DIR}/${_package}/include/ogg/os_types.h
     DESTINATION ${PREFIX_DIR}/include/ogg)
   file(INSTALL
-    ${BUILD_DIR}/${_package}/Release/ogg.lib
+    ${BUILD_DIR}/${_package}/RelWithDebInfo/ogg.lib
+    ${BUILD_DIR}/${_package}/ogg.dir/RelWithDebInfo/ogg.pdb
     DESTINATION ${PREFIX_DIR}/lib)
   file(INSTALL
     ${BUILD_DIR}/${_package}/Debug/oggd.lib
@@ -179,7 +180,7 @@
   y_download("https://zlib.net/${_package}.tar.xz" SHA1 "e1cb0d5c92da8e9a8c2635dfa249c341dfd00322")
   y_extract("${_package}.tar.xz" DIR ${_package})
   y_cmake(${_package}
-    CONFIG Release Debug
+    CONFIG RelWithDebInfo Debug
     OPTIONS -DSKIP_INSTALL_FILES=ON)
 endif()

@@ -190,7 +191,7 @@
   y_extract("${_package}.tar.gz" DIR ${_package})
   y_cmake(${_package}
     TARGET "jpeg-static"
-    CONFIG Release Debug
+    CONFIG RelWithDebInfo Debug
     OPTIONS -DWITH_CRT_DLL=ON -DWITH_TURBOJPEG=OFF)
   file(RENAME ${BUILD_DIR}/${_package}/Debug/jpeg-static.lib ${BUILD_DIR}/${_package}/Debug/jpeg-staticd.lib)
   file(RENAME ${BUILD_DIR}/${_package}/Debug/jpeg-static.pdb ${BUILD_DIR}/${_package}/Debug/jpeg-staticd.pdb)
@@ -201,7 +202,8 @@
     ${BUILD_DIR}/${_package}/jpeglib.h
     DESTINATION ${PREFIX_DIR}/include)
   file(INSTALL
-    ${BUILD_DIR}/${_package}/Release/jpeg-static.lib
+    ${BUILD_DIR}/${_package}/RelWithDebInfo/jpeg-static.lib
+    ${BUILD_DIR}/${_package}/jpeg-static.dir/RelWithDebInfo/jpeg-static.pdb
     DESTINATION ${PREFIX_DIR}/lib)
   file(INSTALL
     ${BUILD_DIR}/${_package}/Debug/jpeg-staticd.lib
@@ -215,7 +217,7 @@
   y_download("https://downloads.sourceforge.net/project/libpng/libpng16/${_version}/${_package}.tar.xz" SHA1 "0df1561aa1da610e892239348970d574b14deed0")
   y_extract("${_package}.tar.xz" DIR ${_package})
   y_cmake(${_package}
-    CONFIG Release Debug
+    CONFIG RelWithDebInfo Debug
     OPTIONS -DPNG_SHARED=OFF -DPNG_TESTS=OFF -DSKIP_INSTALL_EXECUTABLES=ON -DSKIP_INSTALL_EXPORT=ON -DSKIP_INSTALL_FILES=ON -DSKIP_INSTALL_PROGRAMS=ON)
 endif()

@@ -224,7 +226,7 @@
   y_git_clone("https://git.xiph.org/vorbis.git" DIR ${_package})
   y_cmake(${_package}
     TARGET "vorbisfile"
-    CONFIG Release Debug
+    CONFIG RelWithDebInfo Debug
     OPTIONS -DOGG_ROOT=${PREFIX_DIR})
   file(RENAME ${BUILD_DIR}/${_package}/lib/Debug/vorbis.lib ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.lib)
   file(RENAME ${BUILD_DIR}/${_package}/lib/Debug/vorbis.pdb ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.pdb)
@@ -235,8 +237,10 @@
     ${BUILD_DIR}/${_package}/include/vorbis/vorbisfile.h
     DESTINATION ${PREFIX_DIR}/include/vorbis)
   file(INSTALL
-    ${BUILD_DIR}/${_package}/lib/Release/vorbis.lib
-    ${BUILD_DIR}/${_package}/lib/Release/vorbisfile.lib
+    ${BUILD_DIR}/${_package}/lib/RelWithDebInfo/vorbis.lib
+    ${BUILD_DIR}/${_package}/lib/vorbis.dir/RelWithDebInfo/vorbis.pdb
+    ${BUILD_DIR}/${_package}/lib/RelWithDebInfo/vorbisfile.lib
+    ${BUILD_DIR}/${_package}/lib/vorbisfile.dir/RelWithDebInfo/vorbisfile.pdb
     DESTINATION ${PREFIX_DIR}/lib)
   file(INSTALL
     ${BUILD_DIR}/${_package}/lib/Debug/vorbisd.lib


CMake: mark CCACHE_EXE as advanced.

CMake: mark CCACHE_EXE as advanced.

--- cmake/environmentchecks.cmake
+++ cmake/environmentchecks.cmake
@@ -71,6 +71,7 @@
   set(CMAKE_REQUIRED_FLAGS ${_ORIGINAL_CMAKE_REQUIRED_FLAGS})

   mark_as_advanced(
+    CCACHE_EXE
     CLANG_TIDY_EXE
     CLANG_FORMAT_EXE
     FIND_EXE


improve FindCPLEX

improve FindCPLEX

--- cmake/modules/FindCPLEX.cmake
+++ cmake/modules/FindCPLEX.cmake
@@ -1,40 +1,170 @@
+# This module finds cplex.
+#
+# User can give CPLEX_ROOT_DIR as a hint stored in the cmake cache.
+#
+# It sets the following variables:
+#  CPLEX_FOUND              - Set to false, or undefined, if cplex isn't found.
+#  CPLEX_INCLUDE_DIRS       - include directory
+#  CPLEX_LIBRARIES          - library files
+
 set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory.")

-find_path(CPLEX_INCLUDE_DIR ilcplex/cplex.h HINTS
-    ${CPLEX_ROOT_DIR}/cplex/include
-)
-find_path(CPLEX_CONCERT_INCLUDE_DIR ilconcert/iloenv.h HINTS
-    ${CPLEX_ROOT_DIR}/concert/include
-)
-find_library(CPLEX_LIBRARY NAMES cplex HINTS
-    ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic
-    ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic
-    ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic
-)
-find_library(CPLEX_ILOCPLEX_LIBRARY ilocplex HINTS
-    ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic
-    ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic
-    ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic
-)
-find_library(CPLEX_CONCERT_LIBRARY concert HINTS
-    ${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic
-    ${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix
-    ${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic
-)
-find_path(CPLEX_BIN_DIR cplex HINTS
-    ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_sles10_4.1
-    ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_debian4.0_4.1
-    ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_osx
-)
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_LIBRARY CPLEX_CONCERT_INCLUDE_DIR)
+if(WIN32)
+  set(CPLEX_WIN_VERSION ${CPLEX_WIN_VERSION} CACHE STRING "CPLEX version to be used.")
+  if(NOT CPLEX_ROOT_DIR)
+    set(CPLEX_STUDIO_DIR CPLEX_STUDIO_DIR${CPLEX_WIN_VERSION})
+    execute_process(COMMAND cmd /C set ${CPLEX_STUDIO_DIR} OUTPUT_VARIABLE CPLEX_STUDIO_DIR_VAR ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

-if(CPLEX_FOUND)
-    set(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CPLEX_CONCERT_INCLUDE_DIR})
-    set(CPLEX_LIBRARIES ${CPLEX_CONCERT_LIBRARY} ${CPLEX_ILOCPLEX_LIBRARY} ${CPLEX_LIBRARY})
-    if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-        set(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
-    endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-endif(CPLEX_FOUND)
+    if(NOT CPLEX_STUDIO_DIR_VAR)
+      MESSAGE(FATAL_ERROR "Unable to find CPLEX: environment variable CPLEX_STUDIO_DIR<VERSION> not set.")
+    endif()

-mark_as_advanced(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_CONCERT_LIBRARY)
+    STRING(REGEX REPLACE "^CPLEX_STUDIO_DIR" "" CPLEX_STUDIO_DIR_VAR ${CPLEX_STUDIO_DIR_VAR})
+    if(NOT CPLEX_WIN_VERSION)
+      STRING(REGEX MATCH "^[0-9]+" CPLEX_WIN_VERSION ${CPLEX_STUDIO_DIR_VAR})
+    endif()
+
+    STRING(REGEX REPLACE "^[0-9]+=" "" CPLEX_STUDIO_DIR_VAR ${CPLEX_STUDIO_DIR_VAR})
+    file(TO_CMAKE_PATH "${CPLEX_STUDIO_DIR_VAR}" CPLEX_ROOT_DIR)
+
+  elseif(NOT CPLEX_WIN_VERSION)
+    STRING(REGEX MATCH "[0-9]+$" CPLEX_WIN_VERSION ${CPLEX_ROOT_DIR})
+    if(NOT CPLEX_WIN_VERSION)
+      message(FATAL_ERROR "Unable to determine CPLEX version number. Specify CPLEX_WIN_VERSION")
+    endif()
+  endif()
+
+  MESSAGE(STATUS "Found CLPEX version ${CPLEX_WIN_VERSION} at '${CPLEX_ROOT_DIR}'")
+
+  STRING(REGEX REPLACE "/VC/bin/.*" "" VISUAL_STUDIO_PATH ${CMAKE_C_COMPILER})
+  STRING(REGEX MATCH "Studio [0-9]+" CPLEX_WIN_VS_VERSION ${VISUAL_STUDIO_PATH})
+  STRING(REGEX REPLACE "Studio " "" CPLEX_WIN_VS_VERSION ${CPLEX_WIN_VS_VERSION})
+
+  set(CPLEX_WIN_VS_VERSION ${CPLEX_WIN_VS_VERSION} CACHE STRING "Visual Studio Version")
+
+  if(${CPLEX_WIN_VS_VERSION} STREQUAL "9")
+    set(CPLEX_WIN_VS_VERSION 2008)
+  elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "10")
+    set(CPLEX_WIN_VS_VERSION 2010)
+  elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "11")
+    set(CPLEX_WIN_VS_VERSION 2012)
+  elseif(${CPLEX_WIN_VS_VERSION} STREQUAL "14")
+    set(CPLEX_WIN_VS_VERSION 2015)
+  else()
+    MESSAGE(FATAL_ERROR "CPLEX: unknown Visual Studio version '${CPLEX_WIN_VS_VERSION}' at '${VISUAL_STUDIO_PATH}'.")
+  endif()
+
+
+  if("${CMAKE_C_COMPILER}" MATCHES "amd64")
+    set(CPLEX_WIN_BITNESS x64)
+  else()
+    set(CPLEX_WIN_BITNESS x86)
+  endif()
+
+  set(CPLEX_WIN_BITNESS ${CPLEX_WIN_BITNESS} CACHE STRING "On Windows: x86 or x64 (32bit resp. 64bit)")
+
+  MESSAGE(STATUS "CPLEX: using Visual Studio ${CPLEX_WIN_VS_VERSION} ${CPLEX_WIN_BITNESS} at '${VISUAL_STUDIO_PATH}'")
+
+  if(NOT CPLEX_WIN_LINKAGE)
+    set(CPLEX_WIN_LINKAGE mda CACHE STRING "CPLEX linkage variant on Windows. One of these: mda (dll, release), mdd (dll, debug), mta (static, release), mtd (static, debug)")
+  endif(NOT CPLEX_WIN_LINKAGE)
+
+  # now, generate platform string
+  set(CPLEX_WIN_PLATFORM "${CPLEX_WIN_BITNESS}_windows_vs${CPLEX_WIN_VS_VERSION}/stat_${CPLEX_WIN_LINKAGE}")
+
+else()
+
+  set(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory.")
+  set(CPLEX_WIN_PLATFORM "")
+
+endif()
+
+
+FIND_PATH(CPLEX_INCLUDE_DIR
+  ilcplex/cplex.h
+  HINTS ${CPLEX_ROOT_DIR}/cplex/include
+        ${CPLEX_ROOT_DIR}/include
+  PATHS ENV C_INCLUDE_PATH
+        ENV C_PLUS_INCLUDE_PATH
+        ENV INCLUDE_PATH
+  )
+
+FIND_PATH(CPLEX_CONCERT_INCLUDE_DIR
+  ilconcert/iloenv.h
+  HINTS ${CPLEX_ROOT_DIR}/concert/include
+        ${CPLEX_ROOT_DIR}/include
+  PATHS ENV C_INCLUDE_PATH
+        ENV C_PLUS_INCLUDE_PATH
+        ENV INCLUDE_PATH
+  )
+
+FIND_LIBRARY(CPLEX_LIBRARY
+  NAMES cplex${CPLEX_WIN_VERSION} cplex
+  HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_darwin/static_pic #osx
+  PATHS ENV LIBRARY_PATH #unix
+        ENV LD_LIBRARY_PATH #unix
+  )
+message(STATUS "CPLEX Library: ${CPLEX_LIBRARY}")
+
+FIND_LIBRARY(CPLEX_ILOCPLEX_LIBRARY
+  ilocplex
+  HINTS ${CPLEX_ROOT_DIR}/cplex/lib/${CPLEX_WIN_PLATFORM} #windows
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_debian4.0_4.1/static_pic #unix
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic #unix
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_osx/static_pic #osx
+        ${CPLEX_ROOT_DIR}/cplex/lib/x86-64_darwin/static_pic #osx
+  PATHS ENV LIBRARY_PATH
+        ENV LD_LIBRARY_PATH
+  )
+message(STATUS "ILOCPLEX Library: ${CPLEX_ILOCPLEX_LIBRARY}")
+
+FIND_LIBRARY(CPLEX_CONCERT_LIBRARY
+  concert
+  HINTS ${CPLEX_ROOT_DIR}/concert/lib/${CPLEX_WIN_PLATFORM} #windows
+        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_debian4.0_4.1/static_pic #unix
+        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_sles10_4.1/static_pic #unix
+        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_osx/static_pic #osx
+        ${CPLEX_ROOT_DIR}/concert/lib/x86-64_darwin/static_pic #osx
+  PATHS ENV LIBRARY_PATH
+        ENV LD_LIBRARY_PATH
+  )
+message(STATUS "CONCERT Library: ${CPLEX_CONCERT_LIBRARY}")
+
+if(WIN32)
+    FIND_PATH(CPLEX_BIN_DIR
+      cplex${CPLEX_WIN_VERSION}.dll
+          HINTS ${CPLEX_ROOT_DIR}/cplex/bin/${CPLEX_WIN_PLATFORM} #windows
+      )
+else()
+    FIND_PATH(CPLEX_BIN_DIR
+      cplex
+          HINTS ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_sles10_4.1 #unix
+                ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_debian4.0_4.1 #unix
+                ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_osx #osx
+            ${CPLEX_ROOT_DIR}/cplex/bin/x86-64_darwin #osx
+      ENV LIBRARY_PATH
+          ENV LD_LIBRARY_PATH
+      )
+endif()
+message(STATUS "CPLEX Bin Dir: ${CPLEX_BIN_DIR}")
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(CPLEX DEFAULT_MSG
+ CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_LIBRARY CPLEX_CONCERT_INCLUDE_DIR)
+
+IF(CPLEX_FOUND)
+  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CPLEX_CONCERT_INCLUDE_DIR})
+  SET(CPLEX_LIBRARIES ${CPLEX_CONCERT_LIBRARY} ${CPLEX_ILOCPLEX_LIBRARY} ${CPLEX_LIBRARY} )
+  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
+  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ENDIF(CPLEX_FOUND)
+
+MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_ILOCPLEX_LIBRARY CPLEX_CONCERT_INCLUDE_DIR CPLEX_CONCERT_LIBRARY)
+
+
+


cmake/modules/FindVIGRA.cmake: Document VIGRA_ROOT being exported.

--- cmake/modules/FindVIGRA.cmake
+++ cmake/modules/FindVIGRA.cmake
@@ -1,6 +1,7 @@
 # This module finds an installed Vigra package.
 #
 # It sets the following variables:
+#  VIGRA_ROOT                      - The root path to find includes and libraries for VIGRA (not Python modules).
 #  VIGRA_FOUND                     - Set to false, or undefined, if vigra isn't found.
 #  VIGRA_INCLUDE_DIR               - Vigra include directory.
 #  VIGRA_VIGRANUMPYCORE_LIBRARY    - Vigra's vigranumpycore library


fix scope where debian architectures have to be set

--- cmake/packages/packages.cmake
+++ cmake/packages/packages.cmake
@@ -26,22 +26,19 @@
 set(ARANGODB_PACKAGE_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})
 # eventually the package string will be modified later on:

-if(CMAKE_TARGET_ARCHITECTURES MATCHES ".*x86_64.*")
-  set(ARANGODB_PACKAGE_ARCHITECTURE "amd64")
-elseif(CMAKE_TARGET_ARCHITECTURES MATCHES "aarch64")
-  set(ARANGODB_PACKAGE_ARCHITECTURE "arm64")
-elseif(CMAKE_TARGET_ARCHITECTURES MATCHES "armv7")
-  set(ARANGODB_PACKAGE_ARCHITECTURE "armhf")
-else()
-  set(ARANGODB_PACKAGE_ARCHITECTURE "i386")
-endif()
+if ("${PACKAGING}" STREQUAL "DEB")
+  if(CMAKE_TARGET_ARCHITECTURES MATCHES ".*x86_64.*")
+    set(ARANGODB_PACKAGE_ARCHITECTURE "amd64")
+  elseif(CMAKE_TARGET_ARCHITECTURES MATCHES "aarch64")
+    set(ARANGODB_PACKAGE_ARCHITECTURE "arm64")
+  elseif(CMAKE_TARGET_ARCHITECTURES MATCHES "armv7")
+    set(ARANGODB_PACKAGE_ARCHITECTURE "armhf")
+  else()
+    set(ARANGODB_PACKAGE_ARCHITECTURE "i386")
+  endif()
+
+  set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}")

-
-set(ARANGODB_BASIC_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${ARANGODB_PACKAGE_REVISION}_${ARANGODB_PACKAGE_ARCHITECTURE}")
-
-set(CPACK_PACKAGE_FILE_NAME "${ARANGODB_BASIC_PACKAGE_FILE_NAME}")
-
-if ("${PACKAGING}" STREQUAL "DEB")
   include(packages/deb)
   include(packages/tar)
   if (USE_SNAPCRAFT)


Set web client tests parallel level to 2 on travis

--- cmake/travis_continuous.cmake
+++ cmake/travis_continuous.cmake
@@ -18,7 +18,7 @@
   )
 elseif(test_group STREQUAL browser)
   ctest_test(
-    PARALLEL_LEVEL 1 RETURN_VALUE res
+    PARALLEL_LEVEL 2 RETURN_VALUE res
     EXCLUDE_LABEL girder_python
   )
   file(RENAME "${CTEST_BINARY_DIRECTORY}/coverage/js_coverage.xml" "${CTEST_BINARY_DIRECTORY}/coverage.xml")


CMake 3.5 doesn't know $<IF:...>

CMake 3.5 doesn't know $<IF:...>

--- common/cmake/MyBackward.cmake
+++ common/cmake/MyBackward.cmake
@@ -2,4 +2,4 @@
 find_package (Backward REQUIRED NO_MODULE)

 set_property (TARGET Backward::Backward PROPERTY INTERFACE_SOURCES ${Backward_DIR}/backward.cpp)
-set_property (TARGET Backward::Backward PROPERTY INTERFACE_COMPILE_OPTIONS $<IF:$<CXX_COMPILER_ID:MSVC>,/Fi,-include> backward.hpp)
+set_property (TARGET Backward::Backward PROPERTY INTERFACE_COMPILE_OPTIONS $<$<CXX_COMPILER_ID:MSVC>:/Fi>$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-include> backward.hpp)


Use OFF as the default plug-in build option.

--- Modules/Bundles/PluginList.cmake
+++ Modules/Bundles/PluginList.cmake
@@ -1,10 +1,10 @@
 SET(MITK_EXT_PLUGINS
-  org.mitk.core.ext:ON
+  org.mitk.core.ext:OFF
   org.mitk.core.jobs:OFF
   org.mitk.planarfigure:ON
   org.mitk.diffusionimaging:OFF
-  org.mitk.gui.qt.ext:ON
-  org.mitk.gui.qt.extapplication:ON
+  org.mitk.gui.qt.ext:OFF
+  org.mitk.gui.qt.extapplication:OFF
   org.mitk.gui.qt.datamanager:ON
   org.mitk.gui.qt.segmentation:OFF
   org.mitk.gui.qt.diffusionimaging:OFF


Replace tabs with spaces

Replace tabs with spaces

--- cmake/Modules/AmxConfig.cmake
+++ cmake/Modules/AmxConfig.cmake
@@ -2,18 +2,17 @@

 check_include_file(alloca.h HAVE_ALLOCA_H)
 if(HAVE_ALLOCA_H)
-	add_definitions(-DHAVE_ALLOCA_H)
+  add_definitions(-DHAVE_ALLOCA_H)
 endif()
 check_include_file(inttypes.h HAVE_INTTYPES_H)
 if(HAVE_INTTYPES_H)
-	add_definitions(-DHAVE_INTTYPES_H)
+  add_definitions(-DHAVE_INTTYPES_H)
 endif()
 check_include_file(malloc.h HAVE_MALLOC_H)
 if(HAVE_MALLOC_H)
-	add_definitions(-DHAVE_MALLOC_H)
+  add_definitions(-DHAVE_MALLOC_H)
 endif()
 check_include_file(stdint.h HAVE_STDINT_H)
 if(HAVE_STDINT_H)
-	add_definitions(-DHAVE_STDINT_H)
+  add_definitions(-DHAVE_STDINT_H)
 endif()
-