Backup. Builds on windows. Need to test on Linux now.

--- cmake_modules/LPSCommon.cmake
+++ cmake_modules/LPSCommon.cmake
@@ -257,13 +257,9 @@
             STRING "Flags used by the linker for executables for Debug-contracts builds")

     else()
-#        if(${USE_VTK})
-#            set(CMAKE_CXX_FLAGS_DEBUG-CONTRACTS "${LPS_CXX_FLAGS} -g -DUSE_VTK " CACHE
-#                STRING "Flags used by the C++ compiler for Debug-contracts builds" FORCE)
-#        else()
-            set(CMAKE_CXX_FLAGS_DEBUG-CONTRACTS "${LPS_CXX_FLAGS} -g" CACHE
-                STRING "Flags used by the C++ compiler for Debug-contracts builds" FORCE)
-        endif()
+
+        set(CMAKE_CXX_FLAGS_DEBUG-CONTRACTS "${LPS_CXX_FLAGS} -g" CACHE
+            STRING "Flags used by the C++ compiler for Debug-contracts builds" FORCE)
         set(CMAKE_EXE_LINKER_FLAGS_DEBUG-CONTRACTS ${CMAKE_EXE_LINKER_FLAGS}  CACHE
             STRING "Flags used by the linker for executables for Debug-contracts builds")
     endif()
@@ -580,7 +576,7 @@
         # If the target already exists, don't try to create it.
         if(NOT TARGET ${t_file})
              message(STATUS "Creating ${t_file} from ${t_cc_file}")
-             add_executable(${t_file} EXCLUDE_FROM_ALL ${t_cc_file})
+             add_executable(${t_file} ${t_cc_file})
             # Make sure the library is up to date
             if(WIN64MSVC OR WIN64INTEL)
                 # Supply the *_DLL_IMPORTS directive to preprocessor
@@ -796,7 +792,7 @@
     if("${COMPONENT}" MATCHES "TOOLS")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")

-        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(USE_VTK OFF CACHE BOOL \"Set to link against VTK libs\")\n")
+        file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(USE_VTK ${USE_VTK} CACHE BOOL \"Set to link against VTK libs\")\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "set(VTK_LIB_DIR @VTK_LIB_DIR@ CACHE PATH \"VTK library path\")\n")
         file(APPEND ${CMAKE_BINARY_DIR}/${EXPORTS_FILE} "\n")
@@ -832,7 +828,7 @@
         file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
         if("${COMPONENT}" MATCHES "GEOMETRY")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
-            file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(USE_VTK OFF CACHE BOOL \"Set to link against VTK libs\")\n")
+            file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(USE_VTK ${USE_VTK} CACHE BOOL \"Set to link against VTK libs\")\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(VTK_LIB_DIR @SHEAFSYSTEM_HOME@/lib/vtk CACHE PATH \"VTK library path\" FORCE)\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
@@ -855,11 +851,10 @@
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(${COMPONENT}_SHARED_LIBS ${${COMPONENT}_SHARED_LIBS} CACHE STRING \"${PROJECT_NAME} cumulative shared library list\")\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
         endif()
-        #$$ISSUE: The below commented-out syntax should work, but doesnt. Find out why.
-        #if(${USE_VTK} AND (${COMPONENT} MATCHES "GEOMETRY"))
-        if("${COMPONENT}" MATCHES "GEOMETRY")
+
+        if("${COMPONENT}" MATCHES "TOOLS")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
-            file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(USE_VTK OFF CACHE BOOL \"Set ON to link against VTK libs\")\n")
+            file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(USE_VTK ${USE_VTK} CACHE BOOL \"Set ON to link against VTK libs\")\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "set(VTK_INC_DIR @SHEAFSYSTEM_HOME@/include/VTK CACHE PATH \"VTK library path\")\n")
             file(APPEND ${CMAKE_BINARY_DIR}/${INSTALL_CONFIG_FILE} "\n")


Re-add -std=c++11 but disble host flag propagation.

--- add_dependencies.cmake
+++ add_dependencies.cmake
@@ -11,7 +11,8 @@
 find_package(CUDA 7.0 REQUIRED)
 set(CUDA_SEPARABLE_COMPILATION ON)
 set(CUDA_VERBOSE_BUILD ON)
-set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3 -gencode arch=compute_30,code=sm_30)
+set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};-O3;-std=c++11;-gencode arch=compute_30,code=sm_30)
+SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
 add_definitions(-DUSECUDA)
 include_directories(${CUDA_INCLUDE_DIRS})
 list(APPEND LIBRARIES ${CUDA_LIB})


Add -fno-omit-frame-pointer by default on RK1108

--- standard/toolchain-rk1108.cmake
+++ standard/toolchain-rk1108.cmake
@@ -5,7 +5,7 @@
 set(BUILD_RK1108 1)

 set(RK1108_TOOLCHAIN_ROOT /opt/rk1108_toolchain)
-set(RK1108_COMMON_FLAGS " --sysroot=${RK1108_TOOLCHAIN_ROOT}/usr/arm-rkcvr-linux-uclibcgnueabihf/sysroot -D__RK1108__")
+set(RK1108_COMMON_FLAGS " --sysroot=${RK1108_TOOLCHAIN_ROOT}/usr/arm-rkcvr-linux-uclibcgnueabihf/sysroot -D__RK1108__ -fno-omit-frame-pointer")

 set(CMAKE_C_COMPILER ${RK1108_TOOLCHAIN_ROOT}/usr/bin/arm-linux-gcc CACHE FILEPATH "C Compiler" FORCE)
 set(CMAKE_CXX_COMPILER ${RK1108_TOOLCHAIN_ROOT}/usr/bin/arm-linux-g++ CACHE FILEPATH "C++ Compiler" FORCE)


fix a cmake issue

fix a cmake issue

--- build-config.cmake
+++ build-config.cmake
@@ -32,7 +32,7 @@

 # Reduces executables size by using GNU strip (GNU Binutils).
 # Note that this is GNU toolchain only"
-SET ( GCC_STRIP_EXECUTABLES "YES" CACHE STRINGS "" )
+SET ( GCC_STRIP_EXECUTABLES "YES" CACHE STRING "" )
 SET_PROPERTY( CACHE GCC_STRIP_EXECUTABLES PROPERTY STRINGS "YES" "NO" )

 SET ( APP_ROOT_DIR /srv/babaei.net/subscribe CACHE PATH "" )


Move clang tidy flag to the correct place.

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -145,7 +145,6 @@
       ${_NO_CPPCOREGUIDELINES_PRO_TYPE_VARARG}
       -cppcoreguidelines-slicing
       -cppcoreguidelines-special-member-functions
-      -modernize-make-shared
       fuchsia-*
       -fuchsia-default-arguments
       -fuchsia-default-arguments-calls
@@ -163,6 +162,7 @@
       misc-*
       -misc-non-private-member-variables-in-classes
       modernize-*
+      -modernize-make-shared
       -modernize-pass-by-value
       -modernize-raw-string-literal
       -modernize-use-trailing-return-type


debug output for cmake

debug output for cmake

--- cmake/gflags.cmake
+++ cmake/gflags.cmake
@@ -13,10 +13,12 @@
 # limitations under the License.
 set(gRPC_GFLAGS_PROVIDER "module" CACHE STRING "portability fix")
 if("${gRPC_GFLAGS_PROVIDER}" STREQUAL "module")
+  message("gRPC GFLAGS is MODULE")
   if(NOT GFLAGS_ROOT_DIR)
     set(GFLAGS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags)
   endif()
   if(EXISTS "${GFLAGS_ROOT_DIR}/CMakeLists.txt")
+    message("gRPC GFLAGS adding subdirectory")
     add_subdirectory(${GFLAGS_ROOT_DIR} third_party/gflags)
     if(TARGET gflags_static)
       set(_gRPC_GFLAGS_LIBRARIES gflags_static)
@@ -26,6 +28,7 @@
     message(WARNING "gRPC_GFLAGS_PROVIDER is \"module\" but GFLAGS_ROOT_DIR is wrong")
   endif()
 elseif("${gRPC_GFLAGS_PROVIDER}" STREQUAL "package")
+  message("gRPC GFLAGS is PACKAGE")
   # Use "CONFIG" as there is no built-in cmake module for gflags.
   find_package(gflags REQUIRED CONFIG)
   if(TARGET gflags)


fixed cmake issue

fixed cmake issue

--- cmake/macros.cmake
+++ cmake/macros.cmake
@@ -1,10 +1,10 @@
-function(add_subdirectory_ex arg)
+macro(add_subdirectory_ex arg)
 	message(STATUS "---------Configure ${arg}")
 	add_subdirectory(${arg})
 	message(STATUS "---------Done ${arg}")
-endfunction()
+endmacro()

-function(detect_platform)
+macro(detect_platform)
 	if(UNIX AND NOT APPLE)
 		set(LINUX TRUE)
 	endif()
@@ -32,22 +32,22 @@
 			add_definitions(-DDEBUG)
 		endif()
 	endif()
-endfunction()
+endmacro()

-function(print_info)
+macro(print_info)
 	message(STATUS "PROJECT_BINARY_DIR >>> ${PROJECT_BINARY_DIR}")
 	message(STATUS "CMAKE_CXX_FLAGS >>> ${CMAKE_CXX_FLAGS}")
 	message(STATUS "CMAKE_CXX_FLAGS_DEBUG >>> ${CMAKE_CXX_FLAGS_DEBUG}")
 	message(STATUS "CMAKE_CXX_FLAGS_RELEASE >>> ${CMAKE_CXX_FLAGS_RELEASE}")
-endfunction()
+endmacro()

-function(set_output_paths)
+macro(set_output_paths)
 	set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
 	set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
 	set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
-endfunction()
+endmacro()

-function(set_project_custom_defines)
+macro(set_project_custom_defines)
 	add_definitions(-DENGINE_DIRECTORY="${PROJECT_SOURCE_DIR}" -DSHADER_INCLUDE_DIRECTORY="${BGFX_DIR}/src")
-endfunction()
+endmacro()


Only create test if virtualenv module found

--- cmake/python.cmake
+++ cmake/python.cmake
@@ -164,22 +164,34 @@

 # Test
 if(BUILD_TESTING)
-	# Testing using a vitual environment
-	set(VENV_EXECUTABLE ${PYTHON_EXECUTABLE} -m virtualenv)
-	set(VENV_DIR ${CMAKE_BINARY_DIR}/venv)
-	if(WIN32)
-		set(VENV_BIN_DIR "${VENV_DIR}\\Scripts")
-	else()
-		set(VENV_BIN_DIR ${VENV_DIR}/bin)
-	endif()
-	# make a virtualenv to install our python package in it
-	add_custom_command(TARGET bdist POST_BUILD
-		COMMAND ${VENV_EXECUTABLE} -p ${PYTHON_EXECUTABLE} ${VENV_DIR}
-		COMMAND ${VENV_BIN_DIR}/python setup.py install
-	  COMMAND ${CMAKE_COMMAND} -E copy
+	# Look for python module virtualenv
+	execute_process(
+		COMMAND ${PYTHON_EXECUTABLE} "-c" "import virtualenv"
+		RESULT_VARIABLE _RESULT
+		ERROR_QUIET
+		OUTPUT_STRIP_TRAILING_WHITESPACE
+		)
+	if(${_RESULT} STREQUAL "0")
+		message(STATUS "Found python module: virtualenv")
+		# Testing using a vitual environment
+		set(VENV_EXECUTABLE ${PYTHON_EXECUTABLE} -m virtualenv)
+		set(VENV_DIR ${CMAKE_BINARY_DIR}/venv)
+		if(WIN32)
+			set(VENV_BIN_DIR "${VENV_DIR}\\Scripts")
+		else()
+			set(VENV_BIN_DIR ${VENV_DIR}/bin)
+		endif()
+		# make a virtualenv to install our python package in it
+		add_custom_command(TARGET bdist POST_BUILD
+			COMMAND ${VENV_EXECUTABLE} -p ${PYTHON_EXECUTABLE} ${VENV_DIR}
+			COMMAND ${VENV_BIN_DIR}/python setup.py install
+			COMMAND ${CMAKE_COMMAND} -E copy
 			${CMAKE_CURRENT_SOURCE_DIR}/test.py.in
 			${VENV_DIR}/test.py
-		WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
-    # run the tests within the virtualenv
+			WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
+		# run the tests within the virtualenv
 		add_test(pytest_venv ${VENV_BIN_DIR}/python ${VENV_DIR}/test.py)
+	else()
+		message(WARNING "Can't find python module: virtualenv")
+	endif()
 endif()


Remove optimization level limit for flang again and add -fno-unroll-loops for AOCC flang 2.x instead

--- cmake/system.cmake
+++ cmake/system.cmake
@@ -419,10 +419,9 @@

 if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
 if ("${F_COMPILER}" STREQUAL "FLANG")
-  set(FILTER_FLAGS "-O2;-O3")
-  foreach (FILTER_FLAG ${FILTER_FLAGS})
-    string(REPLACE ${FILTER_FLAG} "-O1" CMAKE_Fortran_FLAGS_RELEASE ${CMAKE_Fortran_FLAGS_RELEASE})
-  endforeach ()
+if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
+  set(CMAKE_Fortran_FLAGS_RELEASE "${CMAKE_Fortran_FLAGS_RELEASE} -fno-unroll-loops")
+endif ()
 endif ()
 endif ()


CMake: Remove deploy_qt_dlls() macro because it is no longer necessary.

--- CMake/Modules/UrhoCommon.cmake
+++ CMake/Modules/UrhoCommon.cmake
@@ -221,31 +221,6 @@
         endif ()
     endif ()
 endmacro ()
-
-# Macro deploys Qt dlls to folder where target executable is located.
-# Macro arguments:
-#  target - name of target which links to Qt.
-macro(deploy_qt_dlls target)
-    if (WIN32)
-        if (TARGET ${target})
-            # Find Qt dir
-            foreach (dir ${CMAKE_PREFIX_PATH})
-                if (EXISTS ${dir}/bin/windeployqt.exe)
-                    set(windeployqt "${dir}/bin/windeployqt.exe")
-                    break()
-                endif ()
-            endforeach ()
-            if (windeployqt)
-                add_custom_command(
-                    TARGET ${target}
-                    POST_BUILD
-                    COMMAND "${windeployqt}" --no-quick-import --no-translations --no-system-d3d-compiler --no-compiler-runtime --no-webkit2 --no-angle --no-opengl-sw $<TARGET_FILE_DIR:${target}>
-                    VERBATIM
-                )
-            endif ()
-        endif ()
-    endif ()
-endmacro()

 # Groups sources into subfolders.
 macro(group_sources)


Bug fix: removed aarch64 architecture for now, supports for arm64 will be added as soon as it is made available in Clang

--- support/iOS.cmake
+++ support/iOS.cmake
@@ -168,7 +168,7 @@

 # set the architecture for iOS
 if (${IOS_PLATFORM} STREQUAL "OS")
-  set(IOS_ARCH armv6 armv7 aarch64)
+  set(IOS_ARCH armv6 armv7)
 else ()
   set (IOS_ARCH i386)
 endif ()


tomviz: make sure to include tomviz.utils python module in binary

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -16,6 +16,12 @@
   USE_SOURCE_PERMISSIONS
   COMPONENT superbuild
   PATTERN "pyconfig.h")
+
+# install tomviz's python modules
+install(DIRECTORY "${install_location}/lib/tomviz"
+  DESTINATION "lib"
+  USE_SOURCE_PERMISSIONS
+  COMPONENT superbuild)

 install(DIRECTORY "${install_location}/share/tomviz"
   DESTINATION "share"


Install dependencies of fewer python libraries

--- projects/unix/tomviz.bundle.cmake
+++ projects/unix/tomviz.bundle.cmake
@@ -88,9 +88,24 @@
 )
 endif()

-# install dependencies of python plugin libraries
+# install dependencies of numpy libraries
 install(CODE
-  "file(GLOB_RECURSE plugin_libs \"${CMAKE_INSTALL_PREFIX}/lib/python3.6/site-packages\" *.so)
+  "file(GLOB_RECURSE plugin_libs \"${CMAKE_INSTALL_PREFIX}/lib/python3.6/site-packages/numpy\" *.so)
+  set(qt_libraries_dir \"${Qt5_DIR}/../../..\")
+  foreach(lib \${plugin_libs})
+    execute_process(COMMAND
+      ${CMAKE_COMMAND}
+        -Dexecutable:PATH=\${lib}
+        -Ddependencies_root:PATH=${install_location}
+        -Dtarget_root:PATH=\${CMAKE_INSTALL_PREFIX}/lib
+        -Dpv_version:STRING=${tomviz_version}
+        -Dqt_root:PATH=${Qt5_DIR}/../../../
+        -P ${CMAKE_CURRENT_LIST_DIR}/install_dependencies.cmake)
+  endforeach()"
+  COMPONENT superbuild)
+# install dependencies of scipy libraries
+install(CODE
+  "file(GLOB_RECURSE plugin_libs \"${CMAKE_INSTALL_PREFIX}/lib/python3.6/site-packages/scipy\" *.so)
   set(qt_libraries_dir \"${Qt5_DIR}/../../..\")
   foreach(lib \${plugin_libs})
     execute_process(COMMAND


binding.gyp.cmake: fix compilation when not setting target_arch

NPM package now only builds x86 builds, but for npm those are the only ones
that have ever worked due to a rework of the cmake code generating the
binding.gyp file is required

Signed-off-by: Brendan Le Foll <3e0e8c4069934e8b47d99704927a85c66c0ceb33@intel.com>

--- src/javascript/binding.gyp.cmake
+++ src/javascript/binding.gyp.cmake
@@ -18,18 +18,8 @@
                     'SWIGJAVASCRIPT',
                     'BUILDING_NODE_EXTENSION=1',
                     'SWIG_V8_VERSION=0x0<(v8_version)',
-                    'V8_VERSION=0x0<(v8_version)' ],
-      'conditions' : [
-          [ 'target_arch=="x64"',
-            { 'defines' : [ 'X86PLAT=ON' ], },
-          ],
-          [ 'target_arch=="ia32"',
-            { 'defines' : [ 'X86PLAT=ON' ], },
-          ],
-          [ 'target_arch=="arm"',
-            { 'defines' : [ 'ARMPLAT=ON' ], },
-          ],
-      ],
+                    'V8_VERSION=0x0<(v8_version)',
+                    'X86PLAT=ON' ]
     }
   ]
 }


add a new generated kernel into kernel list

--- library/src/device/generator/generated-kernels.cmake
+++ library/src/device/generator/generated-kernels.cmake
@@ -21,20 +21,16 @@
 rocfft_kernel_512.h
 rocfft_kernel_64.h
 rocfft_kernel_64_sbcc.h
+rocfft_kernel_64_sbrc.h
 rocfft_kernel_8.h
 )

 set( kernels_pow3
-rocfft_kernel_128_sbcc.h
-rocfft_kernel_128_sbrc.h
 rocfft_kernel_1.h
 rocfft_kernel_2187.h
 rocfft_kernel_243.h
-rocfft_kernel_256_sbcc.h
-rocfft_kernel_256_sbrc.h
 rocfft_kernel_27.h
 rocfft_kernel_3.h
-rocfft_kernel_64_sbcc.h
 rocfft_kernel_729.h
 rocfft_kernel_81.h
 rocfft_kernel_9.h
@@ -42,16 +38,11 @@

 set( kernels_pow5
 rocfft_kernel_125.h
-rocfft_kernel_128_sbcc.h
-rocfft_kernel_128_sbrc.h
 rocfft_kernel_1.h
-rocfft_kernel_256_sbcc.h
-rocfft_kernel_256_sbrc.h
 rocfft_kernel_25.h
 rocfft_kernel_3125.h
 rocfft_kernel_5.h
 rocfft_kernel_625.h
-rocfft_kernel_64_sbcc.h
 )

 set( kernels_all
@@ -177,6 +168,7 @@
 rocfft_kernel_648.h
 rocfft_kernel_64.h
 rocfft_kernel_64_sbcc.h
+rocfft_kernel_64_sbrc.h
 rocfft_kernel_675.h
 rocfft_kernel_6.h
 rocfft_kernel_720.h


BUG: try_compile needs to have CMAKE_CXX_STANDARD passed

When using cmake version 3 or greater, and -DCMAKE_CXX_STANDARD:STRING=11
then the try_compile needs to explicitly have CMAKE_CXX_STANDARD passed
as an option so that the same compilation environment is used consistently
for introspection testing and the final product.

This patch is represented in the upstream VXL and should merge without
conflicts when VXL is upgraded in the future.

Without this patch set, VXL is always resulting with instrospection result
that claims CXX98 rather than CXX11 and then compilation errors result
due to mismatch of VXL_CONSTEXPR.

Change-Id: I24ee7d7e88abe994e0a19d2423fa32b81f12dcc0

--- Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake
+++ Modules/ThirdParty/VNL/src/vxl/config/cmake/config/VXLIntrospectionConfig.cmake
@@ -747,6 +747,13 @@
 # Reset the update configuration flag
 set( VXL_UPDATE_CONFIGURATION "OFF" CACHE BOOL "Re-run the configuration tests?" FORCE )

+if(CMAKE_CXX_STANDARD)
+  set(CMAKE_TEST_FLAGS "-DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD}")
+endif()
+if(CMAKE_CXX_STANDARD)
+   set(TRY_COMP_CXX_STANDARD
+       -DCMAKE_CXX_STANDARD:STRING=${CMAKE_CXX_STANDARD})
+endif()
 # Identify the version of CXX compiler used when VXL was built. This needs to be
 # identified so that external applications can identify how VXL was built.
 set(VXL_COMPILED_CXX_STANDARD_VERSION 1)
@@ -754,8 +761,12 @@
   try_compile(VXL_MIN_CXX_LEVEL_TEST
     ${CMAKE_CURRENT_BINARY_DIR}/CMakeTmp
     ${CMAKE_CURRENT_LIST_DIR}/vxlGetCXXCompilerVersion.cxx
+    CMAKE_FLAGS
+        -DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS} "${TEST_ADD_LIBRARIES}"
+        ${TRY_COMP_CXX_STANDARD}
     COMPILE_DEFINITIONS -DVXL_CXX_TEST_VERSION=${CXX_TEST_VERSION}
-    OUTPUT_VARIABLE VXL_COMPILED_CXX_STANDARD_VERSION_LOG )
+    OUTPUT_VARIABLE VXL_COMPILED_CXX_STANDARD_VERSION_LOG
+  )
   if(VXL_MIN_CXX_LEVEL_TEST)
      set(VXL_COMPILED_CXX_STANDARD_VERSION ${CXX_TEST_VERSION})
   endif()


Provide option to pass through CMake arguments.

In the CMAKE_COMMAND invocation. The use-case is primarily
specifying additional paths to modules, for separately-packaged
libraries.

--- rosserial_client/cmake/rosserial_client-extras.cmake
+++ rosserial_client/cmake/rosserial_client-extras.cmake
@@ -45,7 +45,7 @@
 # @public
 #
 function(rosserial_configure_client)
-  cmake_parse_arguments(client "" "DIRECTORY;TOOLCHAIN_FILE" "" ${ARGN})
+  cmake_parse_arguments(client "" "DIRECTORY;TOOLCHAIN_FILE" "CMAKE_ARGUMENTS" ${ARGN})
   if(NOT client_DIRECTORY)
     message(SEND_ERROR "rosserial_client_add_client called without DIRECTORY argument.")
   endif()
@@ -61,6 +61,7 @@
     COMMAND ${CMAKE_COMMAND} ${PROJECT_SOURCE_DIR}/${client_DIRECTORY}
       -DROS_LIB_DIR=${${PROJECT_NAME}_ROS_LIB_DIR}
       -DEXECUTABLE_OUTPUT_PATH=${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}
+      ${client_CMAKE_ARGUMENTS}
       ${DTOOLCHAIN_FILE}
   )
   add_dependencies(${PROJECT_NAME}_${client_DIRECTORY} ${PROJECT_NAME}_ros_lib)


keep the return value - hoping that this skips steps when appropriate

--- VCTest.cmake
+++ VCTest.cmake
@@ -14,19 +14,19 @@
    while(${CTEST_ELAPSED_TIME} LESS 64800)
       set(START_TIME ${CTEST_ELAPSED_TIME})
       CTEST_START (Continuous)
-      CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
-      CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
-      CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
-      CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}")
-      CTEST_SUBMIT ()
+      CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
+      CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+      CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+      CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+      CTEST_SUBMIT (RETURN_VALUE res)
       ctest_sleep(${START_TIME} 1200 ${CTEST_ELAPSED_TIME})
    endwhile()
 else($ENV{ctest_model} STREQUAL "Continuous")
    CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
    CTEST_START ($ENV{ctest_model})
-   CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}")
-   CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}")
-   CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}")
-   CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}")
-   CTEST_SUBMIT ()
+   CTEST_UPDATE (SOURCE "${CTEST_SOURCE_DIRECTORY}" RETURN_VALUE res)
+   CTEST_CONFIGURE (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+   CTEST_BUILD (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+   CTEST_TEST (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
+   CTEST_SUBMIT (RETURN_VALUE res)
 endif($ENV{ctest_model} STREQUAL "Continuous")


Do not use system paths when searching for the d3dcompiler DLL, to avoid using the wrong architecture.

--- CMake/Modules/FindDirect3D.cmake
+++ CMake/Modules/FindDirect3D.cmake
@@ -48,9 +48,11 @@
     set (PATH_SUFFIX x86)
 endif ()
 # Only need to search the DLL as a proxy for the presence of the MS Windows SDK
+# Note: do not use default paths such as the PATH variable, to potentially avoid using a wrong architecture DLL
 find_file (DIRECT3D_DLL NAMES ${DLL_NAMES} PATHS
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}"
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}")
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}"
+    NO_DEFAULT_PATH)
 if (DIRECT3D_DLL OR MINGW)  # MinGW compiler toolchain is assumed to come with its own necessary headers and libraries for Direct3D
     if (NOT URHO3D_D3D11)
         set (DIRECT3D_LIBRARIES d3d9 d3dcompiler)


COMP: set the OTB_CMAKEMODULE_DIRS_CONFIG variable for build tree and install tree

--- CMake/otbGenerateOTBConfig.cmake
+++ CMake/otbGenerateOTBConfig.cmake
@@ -20,7 +20,8 @@
 # Binary directory
 SET(OTB_BINARY_DIRS_CONFIG ${EXECUTABLE_OUTPUT_PATH})

-
+# Package directories (cmake files...)
+SET(OTB_CMAKEMODULE_DIRS_CONFIG ${OTB_SOURCE_DIR}/CMake)

 #            SET(OTB_LIBRARY_DIRS_CONFIG ${OTB_LIBRARY_DIRS_CONFIG} ${GDAL_LIBRARY_DIRS} ${ITK_LIBRARY_DIRS} ${FLTK_LIBRARY_DIRS})

@@ -72,6 +73,9 @@
 # Binary directories
 SET(OTB_BINARY_DIRS_CONFIG "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_BIN_DIR}")

+# Package directories (cmake files...)
+SET(OTB_CMAKEMODULE_DIRS_CONFIG "\${OTB_INSTALL_PREFIX}/${OTB_INSTALL_PACKAGE_DIR}")
+
 #-----------------------------------------------------------------------------
 # Configure OTBConfig.cmake for the INSTALL tree.


moved to third party repository

moved to third party repository

--- CMakeExternals/OpenIGTLink.cmake
+++ CMakeExternals/OpenIGTLink.cmake
@@ -1,7 +1,6 @@
 #-----------------------------------------------------------------------------
 # OpenIGTLink
 #-----------------------------------------------------------------------------
-
 if(MITK_USE_OpenIGTLink)

   # Sanity checks
@@ -22,20 +21,13 @@
           -DCMAKE_USE_PTHREADS:BOOL=OFF)
     endif()

-    #list(APPEND additional_cmake_args
-    #     -DUSE_WRAP_ITK:BOOL=OFF
-    #    )
-
-   # set(ITK_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchITK-4.5.1.cmake)
-
     ExternalProject_Add(${proj}
        SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src
        BINARY_DIR ${proj}-build
        PREFIX ${proj}-cmake
-       URL /projects/OpenIGTLink-54df50de62511f8fd07a7ce5b308f1202b30933a.tar.gz
+       URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/OpenIGTLink-54df50de.tar.gz
        URL_MD5 b9fd8351b059f4ec615f2dfd74ab2458
        INSTALL_COMMAND ""
-       #PATCH_COMMAND ${ITK_PATCH_COMMAND}
        CMAKE_GENERATOR ${gen}
        CMAKE_ARGS
          ${ep_common_args}
@@ -45,8 +37,6 @@
          -DOpenIGTLink_PROTOCOL_VERSION_2:BOOL=ON
          -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
          -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
-         #-DITK_USE_SYSTEM_GDCM:BOOL=ON
-         #-DGDCM_DIR:PATH=${GDCM_DIR}
        DEPENDS ${proj_DEPENDENCIES}
       )


BUGFIX: Enable thread-safe flags for Boost::compute upstream

--- CMakeModules/boost_package.cmake
+++ CMakeModules/boost_package.cmake
@@ -37,5 +37,5 @@

 # NOTE: BOOST_CHRONO_HEADER_ONLY is required for Windows because otherwise it
 # will try to link with libboost-chrono.
-set_target_properties(Boost::boost PROPERTIES
-  INTERFACE_COMPILE_DEFINITIONS BOOST_CHRONO_HEADER_ONLY)
+set_target_properties(Boost::boost PROPERTIES INTERFACE_COMPILE_DEFINITIONS
+  "BOOST_CHRONO_HEADER_ONLY;BOOST_COMPUTE_THREAD_SAFE;BOOST_COMPUTE_HAVE_THREAD_LOCAL")


COMP: CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH are cmake vars, not env vars

--- CMake/FindOSGeo4W.cmake
+++ CMake/FindOSGeo4W.cmake
@@ -5,8 +5,8 @@
   FIND_PATH(OSGEO4W_ROOT NAMES OSGeo4W.bat PATHS $ENV{OSGEO4W_ROOT} )

   IF(OSGEO4W_ROOT)
-		SET(CMAKE_INCLUDE_PATH ${OSGEO4W_ROOT}/include;$ENV{CMAKE_INCLUDE_PATH})
-    SET(CMAKE_LIBRARY_PATH ${OSGEO4W_ROOT}/lib;$ENV{CMAKE_LIBRARY_PATH})
+		SET(CMAKE_INCLUDE_PATH ${OSGEO4W_ROOT}/include;${CMAKE_INCLUDE_PATH})
+    SET(CMAKE_LIBRARY_PATH ${OSGEO4W_ROOT}/lib;${CMAKE_LIBRARY_PATH})
     SET(OSGEO4W_FOUND TRUE)
 		MESSAGE(STATUS "Found OSGeo4W (${OSGEO4W_ROOT})")
 	ELSE(OSGEO4W_ROOT)


Correct paths in sitkAddTest for multi-project configurations

--- CMake/sitkAddTest.cmake
+++ CMake/sitkAddTest.cmake
@@ -2,7 +2,7 @@
 include(CMakeParseArguments)

 set(SimpleITK_DATA_ROOT ${SimpleITK_SOURCE_DIR}/Testing/Data)
-set(SimpleITK_TEST_OUTPUT_DIR ${SimpleITK_BINARY_DIR}/Testing/Temporary)
+set(SimpleITK_TEST_OUTPUT_DIR ${CMAKE_BINARY_DIR}/Testing/Temporary)

 #-----------------------------------------------------------------------------
 # SimpleITK wrapper for add_test that adds support for external data,
@@ -76,7 +76,7 @@
   endif()
   if (NOT SimpleITK_PYTHON_USE_VIRTUALENV)
     set_property(TEST Python.${name}
-      APPEND PROPERTY ENVIRONMENT PYTHONPATH=${SimpleITK_BINARY_DIR}/Wrapping/Python
+      APPEND PROPERTY ENVIRONMENT PYTHONPATH=${SimpleITK_Python_BINARY_DIR}
       )
   endif()

@@ -195,9 +195,9 @@

   set( _JAVA_LIBRARY_PATH  "$<TARGET_FILE_DIR:SimpleITKJava_JAVA>")
   if(WIN32)
-    set( _JAVA_CLASSPATH "${SimpleITK_BINARY_DIR}/Wrapping/Java/${JAR_FILE}$<SEMICOLON>${_class_path}" )
+    set( _JAVA_CLASSPATH "${SimpleITK_Java_BINARY_DIR}/${JAR_FILE}$<SEMICOLON>${_class_path}" )
   else()
-    set( _JAVA_CLASSPATH "${SimpleITK_BINARY_DIR}/Wrapping/Java/${JAR_FILE}:${_class_path}" )
+    set( _JAVA_CLASSPATH "${SimpleITK_Java_BINARY_DIR}/${JAR_FILE}:${_class_path}" )
   endif()

   if (NOT TARGET ${_java_class}Java)
@@ -260,6 +260,9 @@
   set_property(TEST R.${name}
     PROPERTY LABELS R
     )
+
+  file(TO_NATIVE_PATH "${SimpleITK_R_BINARY_DIR}/R_libs" _native_path)
+
   set_property(TEST R.${name}
     PROPERTY ENVIRONMENT R_LIBS=${_native_path}
     )


remove unnecessary library libcrypt from non-proper builds to reduce shadow memory usage #3137 (as already not included in proper builds). ===VersionHistory:None===

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -829,9 +829,6 @@

 	if ( NOT PROPER AND HAVE_LIBRESOLV )
 		set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lresolv")
-		if (NOT DARWIN)
-			set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lcrypt")
-		endif()
 	endif()

 	if (HAVE_PTHREADS)


need access to zlibDllConfig.h too (in VTK binary tree)

--- GenerateVTKConfig.cmake
+++ GenerateVTKConfig.cmake
@@ -86,7 +86,8 @@
   ${VTK_SOURCE_DIR}/Graphics
   ${VTK_SOURCE_DIR}/Filtering
   ${VTK_SOURCE_DIR}/Common
-  ${VTK_SOURCE_DIR}/Utilities/zlib)
+  ${VTK_SOURCE_DIR}/Utilities/zlib
+  ${VTK_BINARY_DIR}/Utilities/zlib)

 # Add the system include directories last.
 SET(VTK_INCLUDE_DIRS ${VTK_INCLUDE_DIRS} ${VTK_INCLUDE_DIRS_SYS})


also find it in lib64/

also find it in lib64/

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

--- cmake/FindCLucene.cmake
+++ cmake/FindCLucene.cmake
@@ -14,11 +14,11 @@
 ENDIF(EXISTS ${PROJECT_CMAKE}/CLuceneConfig.cmake)

   SET(TRIAL_LIBRARY_PATHS
-    $ENV{CLUCENE_HOME}/lib
-    $ENV{HOME}/testinstall/lib
-    /usr/lib
-    /usr/local/lib
-    /sw/lib
+    $ENV{CLUCENE_HOME}/lib${LIB_SUFFIX}
+    $ENV{HOME}/testinstall/lib${LIB_SUFFIX}
+    /usr/lib${LIB_SUFFIX}
+    /usr/local/lib${LIB_SUFFIX}
+    /sw/lib${LIB_SUFFIX}
   )
   SET(TRIAL_INCLUDE_PATHS
     $ENV{CLUCENE_HOME}/include


cmake: Fix finding OpenSSL 1.1.0 libs on Windows platforms

--- cmake/FindOpenSSL.cmake
+++ cmake/FindOpenSSL.cmake
@@ -107,6 +107,7 @@
       NAMES
         "libeay32${MSVC_RUNTIME_SUFFIX}d"
         libeay32
+        libcrypto
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
         ${MSVC_RUNTIME_PATH_SUFFIX}
@@ -119,6 +120,7 @@
       NAMES
         "libeay32${MSVC_RUNTIME_SUFFIX}"
         libeay32
+        libcrypto
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
         ${MSVC_RUNTIME_PATH_SUFFIX}
@@ -132,6 +134,7 @@
         "ssleay32${MSVC_RUNTIME_SUFFIX}d"
         ssleay32
         ssl
+        libssl
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
         ${MSVC_RUNTIME_PATH_SUFFIX}
@@ -145,6 +148,7 @@
         "ssleay32${MSVC_RUNTIME_SUFFIX}"
         ssleay32
         ssl
+        libssl
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
         ${MSVC_RUNTIME_PATH_SUFFIX}
@@ -164,6 +168,7 @@
     FIND_LIBRARY(LIB_EAY
       NAMES
         libeay32
+        libcrypto
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
         "lib"
@@ -173,6 +178,7 @@
     FIND_LIBRARY(SSL_EAY
       NAMES
         ssleay32
+        libssl
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
       PATH_SUFFIXES
         "lib"
@@ -186,6 +192,7 @@
     FIND_LIBRARY(LIB_EAY
       NAMES
         libeay32
+        libcrypto
       HINTS
         ${_OPENSSL_LIBDIR}
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}
@@ -196,6 +203,7 @@
     FIND_LIBRARY(SSL_EAY
       NAMES
         ssleay32
+        libssl
       HINTS
         ${_OPENSSL_LIBDIR}
       ${_OPENSSL_ROOT_HINTS_AND_PATHS}


Always show all warnings, pedantically

Always show all warnings, pedantically

--- cmake/compilation.cmake
+++ cmake/compilation.cmake
@@ -3,6 +3,9 @@

 # Some release optimization flags for GCC/Clang.
 if (NOT WIN32)
+  # Always show all warnings.
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -pedantic")
+
   # Clang/GCC
   set(REL_OPTS "-pipe -fvisibility=hidden -fvisibility-inlines-hidden -ffast-math -funroll-loops")


Fix: some MacOS don't like --as-needed linker flag
While there lowercase some maco calls

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -82,9 +82,11 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     else()
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
     #
     set_target_properties(${_name} PROPERTIES
@@ -111,9 +113,11 @@
     #
     # Only link if needed
     if(WIN32 AND MSVC)
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+    elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
     else()
-      SET_TARGET_PROPERTIES(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl,--as-needed)
     endif()
     #
     set(PCL_EXECUTABLES ${PCL_EXECUTABLES} ${_name})
@@ -139,12 +143,15 @@
     target_link_libraries(${_exename} ${GTEST_BOTH_LIBRARIES} ${PCL_ADD_TEST_LINK_WITH})
     #
     # Only link if needed
-    if(UNIX)
-      SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS -Wl,--as-needed)
+    if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      set_target_properties(${_name} PROPERTIES LINK_FLAGS -Wl)
+      target_link_libraries(${_exename} pthread)
+    elseif(UNIX)
+      set_target_properties(${_exename} PROPERTIES LINK_FLAGS -Wl,--as-needed)
       # GTest >= 1.5 requires pthread and CMake's 2.8.4 FindGTest is broken
       target_link_libraries(${_exename} pthread)
     elseif(WIN32)
-      SET_TARGET_PROPERTIES(${_exename} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
+      set_target_properties(${_exename} PROPERTIES LINK_FLAGS_RELEASE /OPT:REF)
     endif()
     #
     PCL_LINK_OPENMP(${_exename})


fix: bug #5

fix: bug #5

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

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -78,7 +78,7 @@
     add_library(${_name} ${_lib_type} ${ARGN})
     set_target_properties(${_name} PROPERTIES
         VERSION ${PCL_VERSION}
-        SOVERSION ${PROJECT_MAJOR_VERSION})
+        SOVERSION ${PCL_MAJOR_VERSION})
     install(TARGETS ${_name} LIBRARY DESTINATION ${LIB_INSTALL_DIR}
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
         COMPONENT ${_component})


Added support to overwrite the generator type. Eigen'fied the new variables.

--- test/testsuite.cmake
+++ test/testsuite.cmake
@@ -27,6 +27,13 @@
 #  - EIGEN_WORK_DIR: directory used to download the source files and make the builds
 #      default: folder which contains this script
 #  - EIGEN_CMAKE_ARGS: additional arguments passed to cmake
+#  - EIGEN_GENERATOR_TYPE: allows to overwrite the generator type
+#      default: nmake (windows
+#      See http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Generators for a complete
+#      list of supported generators.
+#  - EIGEN_NO_UPDATE: allows to submit dash boards from local repositories
+#      This might be interesting in case you want to submit dashboards
+#      including local changes.
 #  - CTEST_SOURCE_DIRECTORY: path to eigen's src (use a new and empty folder, not the one you are working on)
 #      default: <EIGEN_WORK_DIR>/src
 #  - CTEST_BINARY_DIRECTORY: build directory
@@ -132,11 +139,11 @@

 ## mandatory variables (the default should be ok in most cases):

-if(NOT IGNORE_CVS)
+if(NOT EIGEN_NO_UPDATE)
   SET (CTEST_CVS_COMMAND "hg")
   SET (CTEST_CVS_CHECKOUT "${CTEST_CVS_COMMAND} clone http://bitbucket.org/eigen/eigen2 \"${CTEST_SOURCE_DIRECTORY}\"")
   SET(CTEST_BACKUP_AND_RESTORE TRUE) # the backup is CVS related ...
-endif(NOT IGNORE_CVS)
+endif(NOT EIGEN_NO_UPDATE)

 # which ctest command to use for running the dashboard
 SET (CTEST_COMMAND "${EIGEN_CMAKE_DIR}ctest -D ${EIGEN_MODE}")
@@ -158,15 +165,24 @@
 # any quotes inside of this string if you use it
 if(WIN32 AND NOT UNIX)
   #message(SEND_ERROR "win32")
-  set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
-  SET (CTEST_INITIAL_CACHE "
-    MAKECOMMAND:STRING=nmake -i
-    CMAKE_MAKE_PROGRAM:FILEPATH=nmake
-    CMAKE_GENERATOR:INTERNAL=NMake Makefiles
-    CMAKE_BUILD_TYPE:STRING=Release
-    BUILDNAME:STRING=${EIGEN_BUILD_STRING}
-    SITE:STRING=${EIGEN_SITE}
-  ")
+  if(EIGEN_GENERATOR_TYPE)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"${EIGEN_GENERATOR_TYPE}\"")
+    SET (CTEST_INITIAL_CACHE "
+      CMAKE_BUILD_TYPE:STRING=Release
+      BUILDNAME:STRING=${EIGEN_BUILD_STRING}
+      SITE:STRING=${EIGEN_SITE}
+    ")
+  else(EIGEN_GENERATOR_TYPE)
+    set(CTEST_CMAKE_COMMAND "${CTEST_CMAKE_COMMAND} -G \"NMake Makefiles\" -DCMAKE_MAKE_PROGRAM=nmake")
+    SET (CTEST_INITIAL_CACHE "
+      MAKECOMMAND:STRING=nmake -i
+      CMAKE_MAKE_PROGRAM:FILEPATH=nmake
+      CMAKE_GENERATOR:INTERNAL=NMake Makefiles
+      CMAKE_BUILD_TYPE:STRING=Release
+      BUILDNAME:STRING=${EIGEN_BUILD_STRING}
+      SITE:STRING=${EIGEN_SITE}
+    ")
+  endif(EIGEN_GENERATOR_TYPE)
 else(WIN32 AND NOT UNIX)
   SET (CTEST_INITIAL_CACHE "
     BUILDNAME:STRING=${EIGEN_BUILD_STRING}


cmake(java): Add support for examples and test (#202)

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -171,3 +171,81 @@
   message(STATUS "Building ${FILE_NAME}: ...DONE")
 endfunction()

+# add_java_example()
+# CMake function to generate and build java sample.
+# Parameters:
+#  the java filename
+# e.g.:
+# add_java_example(Foo.java)
+function(add_java_example FILE_NAME)
+  message(STATUS "Building ${FILE_NAME}: ...")
+  get_filename_component(EXAMPLE_NAME ${FILE_NAME} NAME_WE)
+  get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
+  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
+
+  set(EXAMPLE_PATH ${PROJECT_BINARY_DIR}/java/${COMPONENT_NAME}/${EXAMPLE_NAME})
+  file(MAKE_DIRECTORY ${EXAMPLE_PATH}/${JAVA_PACKAGE_PATH})
+
+  file(COPY ${FILE_NAME} DESTINATION ${EXAMPLE_PATH}/${JAVA_PACKAGE_PATH})
+
+  string(TOLOWER ${EXAMPLE_NAME} JAVA_SAMPLE_PROJECT)
+  configure_file(
+    ${PROJECT_SOURCE_DIR}/ortools/java/pom-sample.xml.in
+    ${EXAMPLE_PATH}/pom.xml
+    @ONLY)
+
+  add_custom_target(java_example_${EXAMPLE_NAME} ALL
+    DEPENDS ${EXAMPLE_PATH}/pom.xml
+    COMMAND ${MAVEN_EXECUTABLE} compile
+    WORKING_DIRECTORY ${EXAMPLE_PATH})
+  add_dependencies(java_example_${EXAMPLE_NAME} java_package)
+
+  if(BUILD_TESTING)
+    add_test(
+      NAME java_${EXAMPLE_NAME}
+      COMMAND ${MAVEN_EXECUTABLE} exec:java
+        -Dexec.mainClass=com.google.ortools.${COMPONENT_NAME}.${EXAMPLE_NAME}
+      WORKING_DIRECTORY ${EXAMPLE_PATH})
+  endif()
+
+  message(STATUS "Building ${FILE_NAME}: ...DONE")
+endfunction()
+
+# add_java_test()
+# CMake function to generate and build java sample.
+# Parameters:
+#  the java filename
+# e.g.:
+# add_java_test(Foo.java)
+function(add_java_test FILE_NAME)
+  message(STATUS "Building ${FILE_NAME}: ...")
+  get_filename_component(TEST_NAME ${FILE_NAME} NAME_WE)
+  get_filename_component(COMPONENT_DIR ${FILE_NAME} DIRECTORY)
+  get_filename_component(COMPONENT_NAME ${COMPONENT_DIR} NAME)
+
+  set(TEST_PATH ${PROJECT_BINARY_DIR}/java/${COMPONENT_NAME}/${TEST_NAME})
+  file(MAKE_DIRECTORY ${TEST_PATH}/${JAVA_TEST_PATH})
+
+  file(COPY ${FILE_NAME} DESTINATION ${TEST_PATH}/${JAVA_TEST_PATH})
+
+  string(TOLOWER ${TEST_NAME} JAVA_TEST_PROJECT)
+  configure_file(
+    ${PROJECT_SOURCE_DIR}/ortools/java/pom-test.xml.in
+    ${TEST_PATH}/pom.xml
+    @ONLY)
+
+  add_custom_target(java_sample_${TEST_NAME} ALL
+    DEPENDS ${TEST_PATH}/pom.xml
+    COMMAND ${MAVEN_EXECUTABLE} compile
+    WORKING_DIRECTORY ${TEST_PATH})
+  add_dependencies(java_sample_${TEST_NAME} java_package)
+
+  if(BUILD_TESTING)
+    add_test(
+      NAME java_${TEST_NAME}
+      COMMAND ${MAVEN_EXECUTABLE} test
+      WORKING_DIRECTORY ${TEST_PATH})
+  endif()
+
+  message(STATUS "Building ${FILE_NAME}: ...DONE")
+endfunction()


Check the total number of arguments passed insead of if the ARGV# is defined. This fixes a problem when compling openblas as a subproject of another code.

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -157,31 +157,31 @@
 #                               STRING - compiles only the given type (e.g. DOUBLE)
 function(GenerateNamedObjects sources_in)

-  if (DEFINED ARGV1)
+  if (${ARGC} GREATER 1)
     set(defines_in ${ARGV1})
   endif ()

-  if (DEFINED ARGV2 AND NOT "${ARGV2}" STREQUAL "")
+  if (${ARGC} GREATER 2 AND NOT "${ARGV2}" STREQUAL "")
     set(name_in ${ARGV2})
     # strip off extension for kernel files that pass in the object name.
     get_filename_component(name_in ${name_in} NAME_WE)
   endif ()

-  if (DEFINED ARGV3)
+  if (${ARGC} GREATER 3)
     set(use_cblas ${ARGV3})
   else ()
     set(use_cblas false)
   endif ()

-  if (DEFINED ARGV4)
+  if (${ARGC} GREATER 4)
     set(replace_last_with ${ARGV4})
   endif ()

-  if (DEFINED ARGV5)
+  if (${ARGC} GREATER 5)
     set(append_with ${ARGV5})
   endif ()

-  if (DEFINED ARGV6)
+  if ${ARGC} GREATER 6)
     set(no_float_type ${ARGV6})
   else ()
     set(no_float_type false)
@@ -196,7 +196,7 @@
   set(real_only false)
   set(complex_only false)
   set(mangle_complex_sources false)
-  if (DEFINED ARGV7 AND NOT "${ARGV7}" STREQUAL "")
+  if (${ARGC} GREATER 7 AND NOT "${ARGV7}" STREQUAL "")
     if (${ARGV7} EQUAL 1)
       set(real_only true)
     elseif (${ARGV7} EQUAL 2)
@@ -342,17 +342,17 @@
 function(GenerateCombinationObjects sources_in defines_in absent_codes_in all_defines_in replace_scheme)

   set(alternate_name_in "")
-  if (DEFINED ARGV5)
+  if (${ARGC} GREATER 5)
     set(alternate_name_in ${ARGV5})
   endif ()

   set(no_float_type false)
-  if (DEFINED ARGV6)
+  if (${ARGC} GREATER 6)
     set(no_float_type ${ARGV6})
   endif ()

   set(complex_filename_scheme "")
-  if (DEFINED ARGV7)
+  if (${ARGC} GREATER 7)
     set(complex_filename_scheme ${ARGV7})
   endif ()


armadillo fix

armadillo fix

--- include/pass_bits/config.hpp.cmake
+++ include/pass_bits/config.hpp.cmake
@@ -3,6 +3,9 @@
 // Armadillo
 #define ARMA_DONT_PRINT_ERRORS
 #define ARMA_DONT_USE_BLAS
+#define ARMA_DONT_USE_LAPACK
+#define ARMA_USE_CXX11
+#define ARMA_USE_OPENMP
 #include <armadillo>

 // MPI support must be added via CMake, to ensure that we also link against it.


fixing little issue with WkPlatform not being included by client projects since moved to CMakeFiles.

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -95,7 +95,7 @@
 #all required target should be defined there... no need to specify all targets in ${PROJECT_NAME}_LIBRARIES, they will be linked automatically
 include(\${SELF_DIR}/${PROJECT_NAME}Export.cmake)
 get_filename_component(${PROJECT_NAME}_INCLUDE_DIR \"\${SELF_DIR}/${WKCMAKE_INCLUDE_DIR}/\" ABSOLUTE)
-set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIR}\")
+set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIR}\" \"\${SELF_DIR}/CMakeFiles\")
 	")

 	file( APPEND ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "


Use /opt/homebrew/Cellar/qt@5/ for Arm MacOS

--- cmake/macos.cmake
+++ cmake/macos.cmake
@@ -31,10 +31,15 @@
 endfunction()

+
 # Homebrew has issues, fix it
 macro(add_homebrew_qt_prefix_path)
     if (APPLE)
-        file (GLOB dirs  /usr/local/Cellar/qt/*)
+        if ( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL arm64 )
+            file (GLOB dirs  /opt/homebrew/Cellar/qt@5/*)
+        else()
+            file (GLOB dirs  /usr/local/Cellar/qt/*)
+        endif()
         list(APPEND CMAKE_PREFIX_PATH ${dirs})
     endif()
 endmacro()


Updated WSREP_PATCH_REVNO.

Updated WSREP_PATCH_REVNO.

--- cmake/wsrep.cmake
+++ cmake/wsrep.cmake
@@ -23,7 +23,7 @@
 # MariaDB addition: Revision number of the last revision merged from
 # codership branch visible in @@visible_comment.
 # Branch : codership-mysql/5.5
-SET(WSREP_PATCH_REVNO "3961")  # Should be updated on every merge.
+SET(WSREP_PATCH_REVNO "3980")  # Should be updated on every merge.

 # MariaDB: Obtain patch revision number:
 # Update WSREP_PATCH_REVNO if WSREP_REV environment variable is set.


FogBugz #10429: Update cmake files across sub-projects

--- common.cmake
+++ common.cmake
@@ -51,8 +51,8 @@

 include_directories( include  )

-file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp")
-file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" )
+file(GLOB PROJECT_INCLUDES "include/*.h" "include/*.hpp" "include/*/*.h" "include/*/*.hpp" "include/*/*/*.h" "include/*/*/*.hpp")
+file(GLOB PROJECT_SRC "src/*.c" "src/*.cpp" "src/*/*.c" "src/*/*.cpp" "src/*/*/*.c" "src/*/*/*.cpp")

 add_library (${PROJECT} ${PROJECT_SRC} ${PROJECT_INCLUDES})


Give FindNETGEN a path hint so that it works with the standard Fedora 28 netgen package.

--- cMake/FindNETGEN.cmake
+++ cMake/FindNETGEN.cmake
@@ -15,7 +15,7 @@

 find_package(Netgen CONFIG)
 if(Netgen_FOUND)
-  set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIR})
+  set(NGLIB_INCLUDE_DIR ${NETGEN_INCLUDE_DIR} PATH_SUFFIXES netgen-mesher)
   set(NGLIB_LIBRARIES nglib)
   set(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)
   # for external smesh only the following two variables are needed:


fixed the list(LENGTH syntax

fixed the list(LENGTH syntax

--- external/Boost.cmake
+++ external/Boost.cmake
@@ -66,10 +66,7 @@
 set(Boost_INCLUDE_DIRS ${BOOST_ROOT})

 file(GLOB Boost_LIBRARIES ${BOOST_ROOT}/stage/lib/*)
-set(qty_libs 0)
-if(Boost_LIBRARIES)
-  list(LENGTH ${Boost_LIBRARIES} qty_libs)
-endif()
+list(LENGTH Boost_LIBRARIES qty_libs)
 if(${qty_libs} LESS 2)
   message(STATUS "Boost being installed at BOOST_ROOT = ${BOOST_ROOT}")
   if (MSVC OR MSYS OR MINGW)


Add search paths to find assimp from precompiled package

--- cmake/FindASSIMP.cmake
+++ cmake/FindASSIMP.cmake
@@ -24,9 +24,11 @@
     NAMES assimp
     PATHS
     $ENV{ASSIMPDIR}/lib/x${ASSIMP_PF}
+    $ENV{ASSIMPDIR}/lib${ASSIMP_PF}
     $ENV{ASSIMPDIR}/lib
     $ENV{ASSIMPDIR}/lib/.libs
     $ENV{ASSIMP_HOME}/lib/x${ASSIMP_PF}
+    $ENV{ASSIMP_HOME}/lib${ASSIMP_PF}
     $ENV{ASSIMP_HOME}/lib
     $ENV{ASSIMP_HOME}/lib/.libs
     $ENV{ASSIMP_HOME}/build/code
@@ -49,6 +51,7 @@
         NAMES assimp.dll "assimp${ASSIMP_PF}.dll"
         PATHS
         $ENV{ASSIMPDIR}/bin/x${ASSIMP_PF}
+        $ENV{ASSIMPDIR}/bin${ASSIMP_PF}
         $ENV{ASSIMPDIR}/bin
         $ENV{ASSIMP_HOME}/bin/x${ASSIMP_PF}
         $ENV{ASSIMP_HOME}/bin


- Fixed typo

- Fixed typo

--- cmake/FindCLEVER.cmake
+++ cmake/FindCLEVER.cmake
@@ -141,7 +141,7 @@
 					set(_opts ${_opts} PATHS "${${_dir}}/include" NO_DEFAULT_PATH)
 				endif (${_dir})

-				find_file(_ipath${VarName} ${_opts})
+				find_path(_ipath${VarName} ${_opts})

 				if (_ipath${VarName})
 					list(APPEND ${VarName}_INCLUDE_DIRS "${_ipath${VarName}}")


remove searching all of c:/

remove searching all of c:/

--- cmake/FindLuaJIT.cmake
+++ cmake/FindLuaJIT.cmake
@@ -11,7 +11,6 @@
     c:/usr/local
     c:/usr/lib
     c:/usr
-    c:/
     $ENV{LUAJIT_DIR}
     )


fix for building OpenCL on some linux distributions

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -118,7 +118,7 @@
   endif()
 else()
   find_library(OpenCL_LIBRARY
-    NAMES OpenCL)
+    NAMES OpenCL libOpenCL.so.1)
 endif()

 set(OpenCL_LIBRARIES ${OpenCL_LIBRARY})


Update HunterGate

Update HunterGate

--- cmake/HunterGate.cmake
+++ cmake/HunterGate.cmake
@@ -315,6 +315,12 @@
 # apply all variables easily just by 'include' command
 # (otherwise PARENT_SCOPE magic needed)
 macro(HunterGate)
+  if(HUNTER_GATE_DONE)
+    # variable HUNTER_GATE_DONE set explicitly for external project
+    # (see `hunter_download`)
+    set_property(GLOBAL PROPERTY HUNTER_GATE_DONE YES)
+  endif()
+
   # First HunterGate command will init Hunter, others will be ignored
   get_property(_hunter_gate_done GLOBAL PROPERTY HUNTER_GATE_DONE SET)


Bad mac merge.

Bad mac merge.

--- cmake/ectoMacros.cmake
+++ cmake/ectoMacros.cmake
@@ -28,13 +28,6 @@
       LINK_FLAGS -shared-libgcc
       PREFIX ""
       )
-    if(APPLE)
-      set_target_properties(${NAME}_ectomodule
-        PROPERTIES
-        #LINK_FLAGS "-bundle -flat_namespace -undefined dynamic_lookup"
-        SUFFIX .so
-      )
-    endif(APPLE)
   elseif(WIN32)
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('SO')"
       RESULT_VARIABLE PYTHON_PY_PROCESS


cmake: introduce zephyr_file() extension command

Fixes: #23825

This commit introduces a `zephyr_file()` extension command that allows
for examine a path list for relative paths, and convert relative paths
provided with `-D<path>` into absolute paths, starting from
`APPLICATION_SOURCE_DIR`.

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

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -1681,3 +1681,65 @@

   set(${target_name} gen_${x}_${unique_chars} PARENT_SCOPE)
 endfunction()
+
+# Usage:
+#   zephyr_file(<mode> <arg> ...)
+#
+# Zephyr file function extension.
+# This function currently support the following <modes>
+#
+# APPLICATION_ROOT <path>: Check all paths in provided variable, and convert
+#                          those paths that are defined with `-D<path>=<val>`
+#                          to absolute path, relative from `APPLICATION_SOURCE_DIR`
+#                          Issue an error for any relative path not specified
+#                          by user with `-D<path>`
+#
+# returns an updated list of absolute paths
+function(zephyr_file)
+  set(options APPLICATION_ROOT)
+  cmake_parse_arguments(FILE "${options}" "" "" ${ARGN})
+  if(NOT FILE_APPLICATION_ROOT)
+    message(FATAL_ERROR "No <mode> given to `zephyr_file(<mode> <args>...)` function,\n \
+Please provide one of following: APPLICATION_ROOT")
+  endif()
+
+  if(FILE_APPLICATION_ROOT)
+    if(NOT (${ARGC} EQUAL 2))
+      math(EXPR ARGC "${ARGC} - 1")
+      message(FATAL_ERROR "zephyr_file(APPLICATION_ROOT <path-variable>) takes exactly 1 argument, ${ARGC} were given")
+    endif()
+
+    # Note: user can do: `-D<var>=<relative-path>` and app can at same
+    # time specify `list(APPEND <var> <abs-path>)`
+    # Thus need to check and update only CACHED variables (-D<var>).
+    set(CACHED_PATH $CACHE{${ARGV1}})
+    foreach(path ${CACHED_PATH})
+      # The cached variable is relative path, i.e. provided by `-D<var>` or
+      # `set(<var> CACHE)`, so let's update current scope variable to absolute
+      # path from  `APPLICATION_SOURCE_DIR`.
+      if(NOT IS_ABSOLUTE ${path})
+        set(abs_path ${APPLICATION_SOURCE_DIR}/${path})
+        list(FIND ${ARGV1} ${path} index)
+        if(NOT ${index} LESS 0)
+          list(REMOVE_AT ${ARGV1} ${index})
+          list(INSERT ${ARGV1} ${index} ${abs_path})
+        endif()
+      endif()
+    endforeach()
+
+    # Now all cached relative paths has been updated.
+    # Let's check if anyone uses relative path as scoped variable, and fail
+    foreach(path ${${ARGV1}})
+      if(NOT IS_ABSOLUTE ${path})
+        message(FATAL_ERROR
+"Relative path encountered in scoped variable: ${ARGV1}, value=${path}\n \
+Please adjust any `set(${ARGV1} ${path})` or `list(APPEND ${ARGV1} ${path})`\n \
+to absolute path using `\${CMAKE_CURRENT_SOURCE_DIR}/${path}` or similar. \n \
+Relative paths are only allowed with `-D${ARGV1}=<path>`")
+      endif()
+    endforeach()
+
+    # This updates the provided argument in parent scope (callers scope)
+    set(${ARGV1} ${${ARGV1}} PARENT_SCOPE)
+  endif()
+endfunction()


Reenable jaspReliability

Reenable jaspReliability

--- Tools/CMake/Modules.cmake
+++ Tools/CMake/Modules.cmake
@@ -43,7 +43,7 @@
     "jaspNetwork"
     "jaspQualityControl"
     "jaspProphet"
-   # "jaspReliability"
+    "jaspReliability"
     "jaspSem"
     "jaspSummaryStatistics"
     "jaspVisualModeling"


[compiler-rt] Cleanup the --target and --sysroot handling

This addresses issue introduced in r359646.

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

--- cmake/Modules/AddCompilerRT.cmake
+++ cmake/Modules/AddCompilerRT.cmake
@@ -274,12 +274,11 @@
     endif()

     if(type STREQUAL "OBJECT")
-      get_property(cflags_${libname} SOURCE ${sources_${libname}} PROPERTY COMPILE_FLAGS)
       if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
-        list(APPEND cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}")
+        list(APPEND extra_cflags_${libname} "--target=${CMAKE_C_COMPILER_TARGET}")
       endif()
       if(CMAKE_SYSROOT)
-        list(APPEND cflags_${libname} "--sysroot=${CMAKE_SYSROOT}")
+        list(APPEND extra_cflags_${libname} "--sysroot=${CMAKE_SYSROOT}")
       endif()
       string(REPLACE ";" " " extra_cflags_${libname} "${extra_cflags_${libname}}")
       string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions
@@ -297,7 +296,7 @@
           string(REPLACE "<SOURCE>" "${sources_${libname}}"
                  compile_command_${libname} ${compile_command_${libname}})
         elseif(substitution STREQUAL "<FLAGS>")
-          string(REPLACE "<FLAGS>" "${CMAKE_C_FLAGS} ${cflags_${libname}} ${extra_cflags_${libname}}"
+          string(REPLACE "<FLAGS>" "${CMAKE_C_FLAGS} ${extra_cflags_${libname}}"
                  compile_command_${libname} ${compile_command_${libname}})
         else()
           string(REPLACE "${substitution}" "" compile_command_${libname}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 02)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
+++ Modules/ThirdParty/KWSys/src/KWSys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@
 SET(KWSYS_DATE_STAMP_MONTH 04)

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


Bump the version number to 0.2.0

Bump the version number to 0.2.0

--- projects/tomviz.bundle.common.cmake
+++ projects/tomviz.bundle.common.cmake
@@ -1,7 +1,7 @@
 # We hardcode the version numbers since we cannot determine versions during
 # configure stage.
 set (tomviz_version_major 0)
-set (tomviz_version_minor 1)
+set (tomviz_version_minor 2)
 set (tomviz_version_patch 0)
 set (tomviz_version_suffix)
 set (tomviz_version "${tomviz_version_major}.${tomviz_version_minor}.${tomviz_version_patch}")


hotfix for linux build

hotfix for linux build

--- cmake/modules/FindUsdCycles.cmake
+++ cmake/modules/FindUsdCycles.cmake
@@ -47,7 +47,7 @@

     DOC "usdCycles Libraries directory")

-set(USD_CYCLES_LIBS usdCycles)
+set(USD_CYCLES_LIBS UsdCycles)

 foreach (lib ${USD_CYCLES_LIBS})
     find_library(${lib}_LIBRARY


Set CMake policy CMP0022 to NEW explicitly

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -4,6 +4,7 @@
 cmake_policy(SET CMP0003 NEW) # See "cmake --help-policy CMP0003" for more details
 cmake_policy(SET CMP0011 NEW) # See "cmake --help-policy CMP0011" for more details
 cmake_policy(SET CMP0009 NEW) # See "cmake --help-policy CMP0009" for more details
+cmake_policy(SET CMP0022 NEW) # See "cmake --help-policy CMP0022" for more details

 set(lib lib)
 set(bin bin)


Populate PYTHON_VERSION* cmake cache variables

Make sure that we set PYTHON_VERSION,
PYTHON_VERSION_MAJOR, PYTHON_VERSION_MINOR,
and PYTHON_VERSION_PATCH CMake cache variables
when using either the old Python detection logic
or the new CMake FindPython(2,3) commands. These
are needed by IMP to correctly set the directory
to install Python extensions into.

--- cmake_modules/IMPFindPython.cmake
+++ cmake_modules/IMPFindPython.cmake
@@ -13,8 +13,16 @@
                       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
                       OUTPUT_VARIABLE python_full_version
                       OUTPUT_STRIP_TRAILING_WHITESPACE)
-      string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" python_version
+      string(REGEX REPLACE "^([0-9])+\\.[0-9]+.*" "\\1" major
              "${python_full_version}")
+      string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" minor
+             "${python_full_version}")
+      string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" patch
+             "${python_full_version}")
+      set(PYTHON_VERSION ${python_full_version} CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MAJOR ${major} CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MINOR ${minor} CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_PATCH ${patch} CACHE INTERNAL "" FORCE)
       message(STATUS "Python binary is " ${python_full_path} " (version " ${python_full_version} ")")

       find_package(PythonLibs ${python_full_version} EXACT REQUIRED)
@@ -58,6 +66,10 @@
       set(PYTHON_NUMPY_FOUND ${Python3_NumPy_FOUND} CACHE INTERNAL "" FORCE)
       set(PYTHON_NUMPY_INCLUDE_DIR ${Python3_NumPy_INCLUDE_DIRS}
           CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION ${Python3_VERSION} CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR} CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR} CACHE INTERNAL "" FORCE)
+      set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH} CACHE INTERNAL "" FORCE)
     else()
       find_package(Python2 COMPONENTS Interpreter Development NumPy)
       if(Python2_Interpreter_FOUND AND Python2_Development_FOUND)
@@ -68,6 +80,13 @@
         set(PYTHON_NUMPY_FOUND ${Python2_NumPy_FOUND} CACHE INTERNAL "" FORCE)
         set(PYTHON_NUMPY_INCLUDE_DIR ${Python2_NumPy_INCLUDE_DIRS}
             CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION ${Python2_VERSION} CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION_MAJOR ${Python2_VERSION_MAJOR}
+            CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION_MINOR ${Python2_VERSION_MINOR}
+            CACHE INTERNAL "" FORCE)
+        set(PYTHON_VERSION_PATCH ${Python2_VERSION_PATCH}
+            CACHE INTERNAL "" FORCE)
       else()
         message(FATAL_ERROR "Could not find a Python interpreter and matching headers/libraries. Python is required to build.")
       endif()


-Wno-return-type-c-linkage surpreses "extern C warning" spam reguarding nonstandard classes used in conjunction with the script trampoline macros.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -29,8 +29,8 @@
     #set(CXX_FLAG32 "-m32") #uncomment for build x32 on OSx64

     if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
+	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors -Wno-return-type-c-linkage ${TORQUE_ADDITIONAL_LINKER_FLAGS}")
     else()
     # default compiler flags
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_FLAG32} -Wundef -msse -pipe -Wfatal-errors ${TORQUE_ADDITIONAL_LINKER_FLAGS} -Wl,-rpath,'$$ORIGIN'")


Update BdeTargetUtils.cmake

Update BdeTargetUtils.cmake

--- BdeBuildSystem/BdeTargetUtils.cmake
+++ BdeBuildSystem/BdeTargetUtils.cmake
@@ -456,7 +456,7 @@
         endif()

         # Generating .pc file. This will be a noop in non-Bloomberg build env.
-        if (NOT NO_EMIT_PKG_CONFIG_FILE)
+        if (NOT _NO_EMIT_PKG_CONFIG_FILE)
             bbs_emit_pkg_config(${target})
         endif()


ENH: bug. CTEST_PROJECT_NAME is only used by CMake's CTEST_BUILD command, which combines it with other variables to create the full command-line that will build the project (say: C:\devel\languages\c\msnet2003\Common7\IDE\devenv.com Insight.sln /build Release /project ALL_BUILD). As one can see from that example, the *wrong* solution file was picked, Insight.sln instead of ITK.sln.

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -1,4 +1,4 @@
-SET(CTEST_PROJECT_NAME "Insight")
+SET(CTEST_PROJECT_NAME "ITK")
 SET(CTEST_NIGHTLY_START_TIME "21:00:00 EDT")

 IF(NOT DEFINED CTEST_DROP_METHOD)


new CTestConfig file for dashboard tracking of compilation results

--- CTestConfig.cmake
+++ CTestConfig.cmake
@@ -17,11 +17,9 @@
 ##
 ######################################################################

-set(CTEST_PROJECT_NAME "Medular")
+set(CTEST_PROJECT_NAME "Mediseen-medinria-plugins")
 set(NIGHTLY_START_TIME "21:00:00 EST")
 set(DROP_METHOD "http")
 set(DROP_SITE "cdash.inria.fr")
-set(DROP_LOCATION "/CDash/submit.php?project=Medular")
+set(DROP_LOCATION "/CDash/submit.php?project=Mediseen-medinria-plugins")
 set(DROP_SITE_CDASH TRUE)
-set(CTEST_UPDATE_TYPE "git")
-set(UPDATE_COMMAND "git")


ctest: ignore icecc errors

ctest: ignore icecc errors

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

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -15,6 +15,7 @@
    )

 set(CTEST_CUSTOM_ERROR_EXCEPTION ${CTEST_CUSTOM_ERROR_EXCEPTION}
+   "^ICECC"
    "^make\\[[1-9]\\]: "
    "^collect2: ld returned . exit status"
    "^make: \\*\\*\\* \\[.*\\] Error ")


silence some useless ARM warnings

silence some useless ARM warnings

svn path=/trunk/kdesupport/akonadi/; revision=1150517

--- CTestCustom.cmake
+++ CTestCustom.cmake
@@ -13,6 +13,9 @@
   "GConf Error"
   "Client failed to connect to the D-BUS daemon"
   "Failed to connect to socket"
+  "qlist.h.*increases required alignment of target type"
+  "qmap.h.*increases required alignment of target type"
+  "qhash.h.*increases required alignment of target type"
   )

 # No coverage for these files


Removed a CMake-generated file from the repo.

--- DART_config.cmake
+++ DART_config.cmake
@@ -1,14 +0,0 @@
-# This file is automatically generated from CMake
-# Include this file in CMakeLists.txt with
-# INCLUDE(${CMAKE_INSTALL_PREFIX}/share/dart/DART_config.cmake)
-
-
-INCLUDE_DIRECTORIES(/usr/local/include)
-INCLUDE_DIRECTORIES(/usr/local/include/dart)
-INCLUDE_DIRECTORIES(/usr/local/include/eigen-3.0.5)
-INCLUDE_DIRECTORIES(/usr/local/include/fcl)
-SET(DART_HEADERS /usr/local/include/dart /usr/local/include)
-
-LINK_DIRECTORIES(/usr/local/lib)
-SET(DART_LIBRARIES optimized collision optimized dynamics optimized geometry optimized kinematics optimized planning optimized renderer optimized utils debug collisiond debug dynamicsd debug geometryd debug kinematicsd debug planningd debug rendererd debug utilsd)
-


Change vista-common.cmake to have error reporting in update stage

Create a macro that takes the return of an execute_process and prints out a
Fatal_error if the process didnt execute correctly.

Change-Id: I4e3fd38be5dc3a567e050894fb5734473d402544

--- DashboardScripts/vista_common.cmake
+++ DashboardScripts/vista_common.cmake
@@ -192,29 +192,60 @@
 set(ctest_checkout_script ${CTEST_DASHBOARD_ROOT}/${_name}-init.cmake)
 file(WRITE ${ctest_checkout_script} "# git repo init script for ${_name}

+macro(CheckResult Result Message)
+  if(NOT "${Result}" EQUAL 0)
+    message(FATAL_ERROR "ERROR: ${Message}")
+  endif()
+endmacro()
+
 if(EXISTS \"${CTEST_SOURCE_DIRECTORY}/.git\")
- execute_process(
+  execute_process(
+    COMMAND \"${CTEST_GIT_COMMAND}\" checkout master
+    WORKING_DIRECTORY \"${CTEST_SOURCE_DIRECTORY}\"
+    RESULT_VARIABLE return
+  )
+  CheckResult(return "Git Checkout Master in ${CTEST_SOURCE_DIRECTORY}")
+
+
+  execute_process(
   COMMAND \"${CTEST_GIT_COMMAND}\" pull
-  WORKING_DIRECTORY \"${CTEST_SOURCE_DIRECTORY}\"
-  )
+    WORKING_DIRECTORY \"${CTEST_SOURCE_DIRECTORY}\"
+    RESULT_VARIABLE return
+    )
+  CheckResult(return "Git Pull in ${CTEST_SOURCE_DIRECTORY}")
+
 else()
   execute_process(
   COMMAND \"${CTEST_GIT_COMMAND}\" clone ${git_branch_new} \"${testing_git_url}\"
           \"${CTEST_SOURCE_DIRECTORY}\"
+  RESULT_VARIABLE return
   )
+  CheckResult(return "Git Clone in ${CTEST_SOURCE_DIRECTORY}")
 endif()

 if(EXISTS \"${CTEST_VISTA_CODE_DIRECTORY}/.git\")
-execute_process(
-  COMMAND \"${CTEST_GIT_COMMAND}\" pull
-  WORKING_DIRECTORY \"${CTEST_VISTA_CODE_DIRECTORY}\"
-  )
+  execute_process(
+    COMMAND \"${CTEST_GIT_COMMAND}\" checkout master
+    WORKING_DIRECTORY \"${CTEST_VISTA_CODE_DIRECTORY}\"
+    RESULT_VARIABLE return
+    )
+  CheckResult(return "Git Checkout Master in ${CTEST_VISTA_CODE_DIRECTORY}")
+
+  execute_process(
+    COMMAND \"${CTEST_GIT_COMMAND}\" pull
+    WORKING_DIRECTORY \"${CTEST_VISTA_CODE_DIRECTORY}\"
+    RESULT_VARIABLE return
+    )
+  CheckResult(return "Git Pull in ${CTEST_VISTA_CODE_DIRECTORY}")
+
 else()
   execute_process(
   COMMAND \"${CTEST_GIT_COMMAND}\" clone ${git_branch_new} \"${foia_git_url}\"
           \"${CTEST_VISTA_CODE_DIRECTORY}\"
+  RESULT_VARIABLE return
   )
+  CheckResult(return "Git Clone in ${CTEST_VISTA_CODE_DIRECTORY}")
 endif()

 ")


Fixed yaml-cpp.pc file (with prefix)

Fixed yaml-cpp.pc file (with prefix)

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

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


disable hdf5 by default (#407)

disable hdf5 by default (#407)

Change SB variable STIR_DISABLE_HDF5_SUPPORT -> STIR_DISABLE_HDF5

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -50,7 +50,7 @@
   option(STIR_BUILD_SWIG_PYTHON "Build STIR Python interface" ${default_STIR_BUILD_SWIG_PYTHON})
   option(STIR_DISABLE_CERN_ROOT "Disable STIR ROOT interface" ON)
   option(STIR_DISABLE_LLN_MATRIX "Disable STIR Louvain-la-Neuve Matrix library for ECAT7 support" ON)
-  option(STIR_DISABLE_HDF5_SUPPORT "Disable STIR use of HDF5 libraries" ON)
+  option(STIR_DISABLE_HDF5 "Disable STIR use of HDF5 libraries" ON)
   option(STIR_ENABLE_EXPERIMENTAL "Enable STIR experimental code" OFF)

   mark_as_advanced(BUILD_STIR_EXECUTABLES BUILD_STIR_SWIG_PYTHON STIR_DISABLE_CERN_ROOT)
@@ -99,7 +99,7 @@
     -DOPENMP_LIBRARIES:PATH=${OPENMP_LIBRARIES}
     # Use 2 variables for ROOT to cover multiple STIR versions
     -DDISABLE_CERN_ROOT_SUPPORT:BOOL=${STIR_DISABLE_CERN_ROOT} -DDISABLE_CERN_ROOT:BOOL=${STIR_DISABLE_CERN_ROOT}
-    -DDISABLE_HDF5_SUPPORT:BOOL=${STIR_DISABLE_HDF5_SUPPORT}
+    -DDISABLE_HDF5:BOOL=${STIR_DISABLE_HDF5}
     -DDISABLE_LLN_MATRIX:BOOL=${STIR_DISABLE_LLN_MATRIX}
     -DSTIR_ENABLE_EXPERIMENTAL:BOOL=${STIR_ENABLE_EXPERIMENTAL}
     -DDISABLE_NLOHMANN_JSON:BOOL=${STIR_DISABLE_JSON}


Fixed x86 support with tegra nsight.

Fixed x86 support with tegra nsight.

Change-Id: I66d2ef192b78e81acd7e24dbe1d76932159616a4
Reviewed-on: https://wn-project.dnsalias.net/gerrit/102
Try: Andrew Woloszyn <2926f0436f8103ab8257713335cf26447d8bf68a@google.com>
Tested-by: WNBot <efa0942020584fb66fb8bea377b59e48fa0f85ef@gmail.com>
Reviewed-by: Devon Powell <bef84a74f4a3947934cc58306a6aae518eaf1936@gmail.com>

--- Utilities/helpers.cmake
+++ Utilities/helpers.cmake
@@ -244,14 +244,15 @@
   if (${WN_IS_TEGRA})
 #TODO(awoloszyn): Add Arm64 support in the future.
     set(WN_TEGRA_TARGET_TRIPLE "armv7a-linux-androideabi")
-    if (${CMAKE_ANDROID_ARCH})
+    if (DEFINED CMAKE_ANDROID_ARCH)
       if (${CMAKE_ANDROID_ARCH} STREQUAL "x86")
-        set(WN_TEGRA_TARGET_TRIPLE "armv7a-linux-androideabi")
+        set(WN_TEGRA_TARGET_TRIPLE "i686-none-linux-android")
       elseif(${CMAKE_ANDROID_ARCH} STREQUAL "x86_64")
-        set(WN_TEGRA_TARGET_TRIPLE "armv7a-linux-androideabi")
+        set(WN_TEGRA_TARGET_TRIPLE "x86_64-none-linux-android")
       endif()
     endif()
     list(APPEND WN_LLVM_EXTRA_FLAGS "-DLLVM_HOST_TRIPLE=${WN_TEGRA_TARGET_TRIPLE}")
+    list(APPEND WN_LLVM_EXTRA_FLAGS "-DCMAKE_ANDROID_ARCH=${CMAKE_ANDROID_ARCH}")
   endif()

   execute_process(


fix: Add missing vtkIOXML module dependency

--- BasisProject.cmake
+++ BasisProject.cmake
@@ -65,7 +65,8 @@
       vtkFiltersCore,
       vtkFiltersHybrid,
       vtkFiltersModeling,
-      vtkImagingCore
+      vtkImagingCore,
+      vtkIOXML
     }"
     #<dependency>
   OPTIONAL_DEPENDS


Fixed Jenkins error

Fixed Jenkins error

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -34,8 +34,9 @@
 if(NOT NUMBER_PROCESSORS EQUAL 0)
     if(${JENKINS_GENERATOR} MATCHES "Unix Makefiles")
         set(CTEST_BUILD_FLAGS "-j${NUMBER_PROCESSORS} -l${NUMBER_PROCESSORS}")
-    elseif(${JENKINS_GENERATOR} MATCHES "Visual Studio")
-        set(CTEST_WIN_CXX_FLAGS "-DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS:STRING=/MP")
+    # Error using visual studio with multicore
+    #elseif(${JENKINS_GENERATOR} MATCHES "Visual Studio")
+        #set(CTEST_WIN_CXX_FLAGS "-DEPROSIMA_EXTRA_CMAKE_CXX_FLAGS:STRING=/MP")
     endif()
     set(CTEST_TEST_ARGS ${CTEST_TEST_ARGS} PARALLEL_LEVEL ${NUMBER_PROCESSORS})
 endif()


Updated jenkins cmake script

Updated jenkins cmake script

--- CTestJenkins.cmake
+++ CTestJenkins.cmake
@@ -30,7 +30,7 @@
 set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
 set(CTEST_CONFIGURATION_TYPE ${CTEST_BUILD_CONFIGURATION})

-ctest_start(${JENKINS_DASHBOARD} QUIET)
+ctest_start("${JENKINS_DASHBOARD}" QUIET)
 ctest_configure(OPTIONS -DCMAKE_BUILD_TYPE=${CTEST_BUILD_CONFIGURATION} RETURN_VALUE CONFIGURING_RET_VALUE QUIET)
 ctest_build(RETURN_VALUE BUILDING_RET_VALUE QUIET)
 ctest_test(QUIET)


Add Altera target to Makefile for test cases

--- tests/Makefile.cmake
+++ tests/Makefile.cmake
@@ -20,6 +20,7 @@
 CC_LINK         = -lm -ldl -lstdc++ @THREADS_LINK@ @RT_LIBRARIES@ @OPENCV_LIBRARIES@
 CL_LINK         = $(CC_LINK) @OPENCL_LFLAGS@
 CU_LINK         = $(CC_LINK) @CUDA_LINK@
+ALTERA_RUN      = LD_LIBRARY_PATH=$$LD_LIBRARAY_PATH$$(aocl link-config | sed 's/\ /\n/g' | grep "^\-L" | sed 's/-L/:/g' | tr -d '\n')

 # Source-to-source compiler configuration
@@ -99,6 +100,18 @@
 	@echo 'Executing OpenCL binary'
 	./main_opencl

+opencl-fpga:
+	@echo 'Executing Hipacc Compiler for OpenCL:'
+	$(COMPILER) $(TEST_CASE)/main.cpp $(MYFLAGS) $(COMPILER_INC) -emit-$@ $(HIPACC_OPTS) -o main.cc
+
+altera: opencl-fpga
+	@echo 'Generate aocx for Altera'
+	aoc -march=emulator *.cl
+	@echo 'Compiling Host file for Altera Emulation'
+	g++ -DALTERACL -std=c++11 -fPIC -I$(HIPACC_DIR)/include $(shell aocl compile-config) -Wl,--no-as-needed $(shell aocl link-config) -lstdc++ -static-libstdc++ -o main_altera main.cc
+	@echo 'Emulate Generated Binaries'
+	CL_CONTEXT_EMULATOR_DEVICE_ALTERA=s5_ref $(ALTERA_RUN) ./main_altera
+
 filterscript renderscript:
 	rm -f *.rs *.fs
 	@echo 'Executing Hipacc Compiler for $@:'


Disable pkg-config on Windows

Disable pkg-config on Windows

--- BdeBuildSystem/BdeImportPkgConfigTargets.cmake
+++ BdeBuildSystem/BdeImportPkgConfigTargets.cmake
@@ -64,9 +64,15 @@
   set( PKG_CONFIG_INSTALLATION_NAMES ${installation_names} CACHE STRING "Which pkg-config installations to use")
 endmacro()

-_bbs_pcimport_initialize()
+if( NOT WIN32)
+  _bbs_pcimport_initialize()
+endif()

 function( bbs_import_pkgconfig_targets )
+  if (WIN32)
+    message(STATUS "Skipping pkg-config dependency resolution")
+  endif()
+
   _bbs_import_pkgconfig_targets( "${ARGV}" "" )
   if ( TARGET peutil )
      # WORKAROUND: Generally it's not a good idea to hardcode specific


Corrected URL for HDF5

Corrected URL for HDF5

--- superbuild/External-HDF5.cmake
+++ superbuild/External-HDF5.cmake
@@ -3,7 +3,7 @@
 ExternalProject_add(HDF5
   SOURCE_DIR ${CMAKE_BINARY_DIR}/HDF5
   BINARY_DIR ${CMAKE_BINARY_DIR}/HDF5-build
-  URL http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz
+  URL http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.13/src/hdf5-1.8.13.tar.gz
   UPDATE_COMMAND ""
   CMAKE_ARGS
     -DCMAKE_BUILD_TYPE:STRING=${BUILD_TYPE}


Fix PYTHON_RPATH for tarball builds. #7435

Since the python shared libraries were moved one directory down, they
need to look one directory further up to find their dependencies.

--- build/cmake/CondorPackageConfig.cmake
+++ build/cmake/CondorPackageConfig.cmake
@@ -167,14 +167,14 @@
 	if (${BIT_MODE} MATCHES "32" OR ${SYS_ARCH} MATCHES "IA64" )
 		set( CONDOR_RPATH "$ORIGIN/../lib:/lib:/usr/lib:$ORIGIN/../lib/condor:/usr/lib/condor" )
 		set( EXTERNALS_RPATH "$ORIGIN/../lib:/lib:/usr/lib:$ORIGIN/../lib/condor:/usr/lib/condor" )
-		set( PYTHON_RPATH "$ORIGIN/../:/lib:/usr/lib:$ORIGIN/../condor" )
+		set( PYTHON_RPATH "$ORIGIN/../../:/lib:/usr/lib:$ORIGIN/../../condor" )
 	else()
 		set( CONDOR_RPATH "$ORIGIN/../lib:/lib64:/usr/lib64:$ORIGIN/../lib/condor:/usr/lib64/condor" )
 		set( EXTERNALS_RPATH "$ORIGIN/../lib:/lib64:/usr/lib64:$ORIGIN/../lib/condor:/usr/lib64/condor" )
         if ( ${SYSTEM_NAME} MATCHES "rhel7" OR ${SYSTEM_NAME} MATCHES "centos7" OR ${SYSTEM_NAME} MATCHES "sl7")
-            set( PYTHON_RPATH "$ORIGIN/../:/usr/lib64/boost169:/lib64:/usr/lib64:$ORIGIN/../condor" )
+            set( PYTHON_RPATH "$ORIGIN/../../:/usr/lib64/boost169:/lib64:/usr/lib64:$ORIGIN/../../condor" )
         else()
-            set( PYTHON_RPATH "$ORIGIN/../:/lib64:/usr/lib64:$ORIGIN/../condor" )
+            set( PYTHON_RPATH "$ORIGIN/../../:/lib64:/usr/lib64:$ORIGIN/../../condor" )
         endif()
 	endif()
 elseif( ${OS_NAME} STREQUAL "DARWIN" )


Finalize run_testsuite.cmake

Finalize run_testsuite.cmake

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30867 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -144,11 +144,11 @@
 FILE(GLOB _test ${CTEST_BINARY_DIRECTORY}/*)
 IF( "${TRACK}" STREQUAL "Build Tests"
     AND NOT "${_test}" STREQUAL "" )
-    MESSAGE(FATAL_ERROR "
+      MESSAGE(FATAL_ERROR "
 TRACK was set to \"Build Tests\" which require an empty build directory.
 But files were found in \"${CTEST_BINARY_DIRECTORY}\"
 "
-      )
+        )
 ENDIF()

 MESSAGE("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}")
@@ -276,19 +276,17 @@
 # Append subversion information to CTEST_BUILD_NAME:
 #

-IF(NOT TRACK MATCHES "Foobar" AND SUBVERSION_FOUND) #TODO: Exclude Continuous TRACKS
-  EXECUTE_PROCESS(
-    COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
-    OUTPUT_QUIET ERROR_QUIET
-    RESULT_VARIABLE _result
-    )
-  IF(${_result} EQUAL 0)
-    Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
-    STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
-    STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
-    STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
-    SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}")
-  ENDIF()
+EXECUTE_PROCESS(
+  COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
+  OUTPUT_QUIET ERROR_QUIET
+  RESULT_VARIABLE _result
+  )
+IF(${_result} EQUAL 0)
+  Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
+  STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
+  STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
+  STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
+  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}")
 ENDIF()

 MESSAGE("-- CTEST_BUILD_NAME:       ${CTEST_BUILD_NAME}")
@@ -306,13 +304,6 @@
     )
 ENDIF()

-IF("${TRACK}" STREQUAL "Build Tests")
-  # if not on trunk, append branch to track:
-  IF(NOT "${_branch}" STREQUAL "trunk")
-    SET(TRACK "${TRACK} - ${_branch}")
-  ENDIF()
-ENDIF()
-
 #
 # Write revision log:
 #
@@ -355,11 +346,24 @@
 #                                                                      #
 ########################################################################

+#
+# We submit Build and Regression Tests to subprojects according to the svn
+# branch:
+#
+
+IF(NOT "${_branch}" STREQUAL "")
+  SET_PROPERTY(GLOBAL PROPERTY SubProject ${_branch})
+ENDIF()
+
 CTEST_START(Experimental TRACK ${TRACK})

+CTEST_SUBMIT(PARTS Notes)
+
 CTEST_CONFIGURE(OPTIONS "${_options}")
+CTEST_SUBMIT(PARTS Configure)

 CTEST_BUILD(TARGET) # run all target
+CTEST_SUBMIT(PARTS Build)

 # TODO: Run this during the BUILD stage...
 EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
@@ -367,5 +371,4 @@
   )

 CTEST_TEST()
-
-CTEST_SUBMIT()
+CTEST_SUBMIT(PARTS Test)


bug#58955: Must -DBUILD_CONFIG=mysql_release require libaio on Linux

Allow users to build without aio if they really want to, by passing
-DIGNORE_AIO_CHECK to cmake.

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -118,17 +118,21 @@
   OPTION(WITH_PIC "" ON) # Why?

   IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    # Ensure aio is available on Linux (required by InnoDB)
-    CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
-    CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
-    IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
-      MESSAGE(FATAL_ERROR "
-      aio is required on Linux, you need to install the required library:
-
-        Debian/Ubuntu:              apt-get install libaio-dev
-        RedHat/Fedora/Oracle Linux: yum install libaio-devel
-        SuSE:                       zypper install libaio-devel
-       ")
+    IF(NOT IGNORE_AIO_CHECK)
+      # Ensure aio is available on Linux (required by InnoDB)
+      CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H)
+      CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO)
+      IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO)
+        MESSAGE(FATAL_ERROR "
+        aio is required on Linux, you need to install the required library:
+
+          Debian/Ubuntu:              apt-get install libaio-dev
+          RedHat/Fedora/Oracle Linux: yum install libaio-devel
+          SuSE:                       zypper install libaio-devel
+
+        If you really do not want it, pass -DIGNORE_AIO_CHECK to cmake.
+        ")
+      ENDIF()
     ENDIF()

     # Enable fast mutexes on Linux


Fix previous

Fix previous

--- cmake/build_configurations/mysql_release.cmake
+++ cmake/build_configurations/mysql_release.cmake
@@ -15,6 +15,8 @@

 # This file includes build settings used for MySQL release

+INCLUDE(CheckIncludeFiles)
+INCLUDE(CheckLibraryExists)

 SET(FEATURE_SET "community" CACHE STRING
 " Selection of features. Options are


updated added documentation

updated added documentation

--- cmake/testing/test_execute_glob_parallel.cmake
+++ cmake/testing/test_execute_glob_parallel.cmake
@@ -1,50 +1,62 @@
-
+##
+##
+## runs all tests specified in glob expressions in parallel
 function(test_execute_glob_parallel)
   list_extract_flag(args --no-status)
   ans(no_status)
   set(args ${ARGN})
+
+  ## get all test files
   cd("${CMAKE_CURRENT_BINARY_DIR}")
   glob("${args}")
   ans(test_files)

-  environment_processor_count()
-  ans(max)
-  set(processes)

+  ## setup refs which are used by callback
   list(LENGTH test_files test_count)
-
   ref_set(test_count ${test_count})
   ref_set(tests_failed)
   ref_set(tests_succeeded)
   ref_set(tests_completed)

+  ##
+  set(processes)

-
-  function(__tst_status)
-    ref_get(tests_failed)
-    ans(tests_failed)
-    ref_get(tests_succeeded)
-    ans(tests_succeeded)
-    ref_get(test_count)
-    ans(test_count)
-    ref_get(tests_completed)
-    ans(tests_completed)
+  ## status callback  shows
+  set(status_callback)
+  if(NOT no_status)
+    function_new()
+    ans(status_callback)
+    function(${status_callback})
+      ref_get(tests_failed)
+      ans(tests_failed)
+      ref_get(tests_succeeded)
+      ans(tests_succeeded)
+      ref_get(test_count)
+      ans(test_count)
+      ref_get(tests_completed)
+      ans(tests_completed)

-    list(LENGTH tests_failed failure_count)
-    list(LENGTH tests_succeeded success_count)
-    list(LENGTH tests_completed completed_count)
+      list(LENGTH tests_failed failure_count)
+      list(LENGTH tests_succeeded success_count)
+      list(LENGTH tests_completed completed_count)

-    timer_elapsed(test_time_sum)
-    ans(elapsed_time)
-    spinner()
-    ans(spinner)
-    status_line("${completed_count}  / ${test_count}  ok: ${success_count} nok: ${failure_count}  (running ${running_count}) (elapsed time ${elapsed_time} ms) ${spinner}")
-  endfunction()
+      timer_elapsed(test_time_sum)
+      ans(elapsed_time)
+      spinner()
+      ans(spinner)
+      status_line("${completed_count}  / ${test_count}  ok: ${success_count} nok: ${failure_count}  (running ${running_count}) (elapsed time ${elapsed_time} ms) ${spinner}")
+    endfunction()
+    ## add flag
+    set(status_callback --idle-callback ${status_callback})
+  endif()

-  function(___tst_complete process_handle)
+  ## test complete callback outputs info and if test fails also the stderr of the test's process
+  function_new()
+  ans(test_complete_callback)
+  function(${test_complete_callback} process_handle)
     map_tryget(${process_handle} exit_code)
     ans(error)
-

     if(error)
       ref_append(tests_failed ${process_handle})
@@ -56,38 +68,37 @@

     endif()
     ref_append(tests_completed ${process_handle})
-
-    #print_vars(process_handle.test_file process_handle.exit_code process_handle.state)
-   #json_print(${process_handle})
   endfunction()

-  set(status_callback)
-  if(NOT no_status)
-    set(status_callback --idle-callback __tst_status)
-  endif()
+  ## init time for all tests
   timer_start(test_time_sum)

+  ## start every test in parallel
   foreach(test_file ${test_files})
-    cmakepp("test_execute" "${test_file}" --async)
+    ## start test in a async process and add it to the process list
+    cmakepp("test_execute" "${test_file}" --async)  # wrapped execute()
     ans(process)
+    list(APPEND processes ${process})

-
+    ## add a property to process handle which is passed on to callback
     map_set(${process} test_file ${test_file})

-    assign(success = process.on_terminated.add(___tst_complete))
+    ## add a listener to on_terminated event from process handle
+    assign(success = process.on_terminated.add(${test_complete_callback}))

-    list(APPEND processes ${process})
+    ## since starting a process is relatively slow I added a process wait -1
+    ## here that gathers all completed processes
+    ## -1 indicates that it will take only the finished processes
     process_wait_n(-1 ${processes} ${status_callback})
     ans(complete)
+    ## remove the completed tests from the processes so that they will not be waited for again
     if(complete)
       list(REMOVE_ITEM processes ${complete})
     endif()
   endforeach()

+  ## wait for all remaining processes (* indicates that all processes are to be waited for)
   process_wait_n(* ${processes} ${status_callback})
-  ans(finished)
-
-

 endfunction()


Tagging v1.2.1

Tagging v1.2.1

--- CMake_version_options.cmake
+++ CMake_version_options.cmake
@@ -4,7 +4,7 @@
 ## Version information
 set(HOOMD_VERSION_MAJOR "1")
 set(HOOMD_VERSION_MINOR "2")
-set(HOOMD_VERSION_PATCH "0")
+set(HOOMD_VERSION_PATCH "1")
 set(HOOMD_VERSION "${HOOMD_VERSION_MAJOR}.${HOOMD_VERSION_MINOR}.${HOOMD_VERSION_PATCH}")

 # users may not have git installed, or this may be a tarball build - set a dummy version if that is the case


build: support installation in alternate dir

I couldn't do an install in a local dir because CMake wanted to put the
hawkey python files in the system directories. The patch below fixed it
for me. Though I'm not a CMake expert, so there might be a more
canonical way of doing this.

Closes: #136
Approved by: ignatenkobrain

--- cmake/modules/FindPythonInstDir.cmake
+++ cmake/modules/FindPythonInstDir.cmake
@@ -1 +1,6 @@
-EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "
+from sys import stdout
+from distutils import sysconfig
+path=sysconfig.get_python_lib(True, prefix='${CMAKE_INSTALL_PREFIX}')
+stdout.write(path)"
+OUTPUT_VARIABLE PYTHON_INSTALL_DIR)


Adding an environment variable to find the Oculus SDK.

--- cmake/FindOculusSDK.cmake
+++ cmake/FindOculusSDK.cmake
@@ -5,6 +5,9 @@
 #  OCULUS_SDK_LIBRARIES    - List of libraries when using OculusSDK.
 #  OCULUS_SDK_FOUND        - True if OculusSDK found.

+IF (DEFINED ENV{OCULUS_SDK_ROOT_DIR})
+    SET(OCULUS_SDK_ROOT_DIR "$ENV{OCULUS_SDK_ROOT_DIR}")
+ENDIF()
 SET(OCULUS_SDK_ROOT_DIR
     "${OCULUS_SDK_ROOT_DIR}"
     CACHE


generate Linkdef header with custom command

--- cmake/MacroRootDict.cmake
+++ cmake/MacroRootDict.cmake
@@ -69,15 +69,24 @@
 # ----------------------------------------------------------------------------
 MACRO( GEN_ROOT_DICT_LINKDEF_HEADER _namespace )

+    SET( _input_headers ${ARGN} )
     SET( _linkdef_header "${ROOT_DICT_OUTPUT_DIR}/${_namespace}_Linkdef.h" )

-    IF( NOT EXISTS "${_linkdef_header}" )
-        FOREACH( _header ${ARGN} )
-            FILE( APPEND "${_linkdef_header}" "#pragma link C++ defined_in \"${_header}\";\n" )
-        ENDFOREACH()
-    ENDIF()
+    FOREACH( _header ${_input_headers} )
+        #FILE( APPEND "${_linkdef_header}" "#pragma link C++ defined_in \"${_header}\";\n" )
+        #SET( ${_namespace}_file_contents "${${_namespace}_file_contents} #pragma link C++ defined_in \\\"${_header}\\\"\\;\\\\n" )
+        SET( ${_namespace}_file_contents "${${_namespace}_file_contents} #pragma link C++ defined_in \\\"${_header}\\\"\\;" )
+    ENDFOREACH()

-    SET( ROOT_DICT_INPUT_HEADERS ${ARGN} ${_linkdef_header} )
+    ADD_CUSTOM_COMMAND(
+        OUTPUT ${_linkdef_header}
+        COMMAND mkdir -p ${ROOT_DICT_OUTPUT_DIR}
+        COMMAND echo "${${_namespace}_file_contents}" > ${_linkdef_header}
+        DEPENDS ${_input_headers}
+        COMMENT "generating: ${_linkdef_header}"
+    )
+
+    SET( ROOT_DICT_INPUT_HEADERS ${_input_headers} ${_linkdef_header} )

 ENDMACRO()

@@ -115,9 +124,8 @@
         STRING( REGEX REPLACE "^(.*)\\.(.*)$" "\\1.h" _dict_hdr_file "${_dict_src_file}" )
         ADD_CUSTOM_COMMAND(
             OUTPUT  ${_dict_src_file} ${_dict_hdr_file}
-            COMMAND mkdir ARGS -p ${ROOT_DICT_OUTPUT_DIR}
-            COMMAND ${ROOT_CINT_WRAPPER}
-            ARGS -f "${_dict_src_file}" -c ${ROOT_DICT_CINT_DEFINITIONS} ${_dict_includes} ${ROOT_DICT_INPUT_HEADERS}
+            COMMAND mkdir -p ${ROOT_DICT_OUTPUT_DIR}
+            COMMAND ${ROOT_CINT_WRAPPER} -f "${_dict_src_file}" -c ${ROOT_DICT_CINT_DEFINITIONS} ${_dict_includes} ${ROOT_DICT_INPUT_HEADERS}
             WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
             DEPENDS ${ROOT_DICT_INPUT_HEADERS}
             COMMENT "generating: ${_dict_src_file} ${_dict_hdr_file}"


[cmake] ilmbase: add 2 possible input folders

Alembic uses direct includes to ilmbase (half.h) while AliceVision use includes with the project prefix (OpenEXR/half.h), so here we add both folders.

--- src/cmake/FindOpenEXR.cmake
+++ src/cmake/FindOpenEXR.cmake
@@ -148,7 +148,7 @@
       OPENEXR_IEX_LIBRARY AND OPENEXR_HALF_LIBRARY)
     set (OPENEXR_FOUND TRUE)
     set (ILMBASE_FOUND TRUE)
-    set (ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH} CACHE STRING "The include paths needed to use IlmBase")
+    set (ILMBASE_INCLUDE_DIR ${ILMBASE_INCLUDE_PATH};${ILMBASE_INCLUDE_PATH}/OpenEXR CACHE STRING "The include paths needed to use IlmBase")
     set (OPENEXR_INCLUDE_DIR ${OPENEXR_INCLUDE_PATH} CACHE STRING "The include paths needed to use OpenEXR")
     set (ILMBASE_LIBRARIES ${OPENEXR_IMATH_LIBRARY} ${OPENEXR_IEX_LIBRARY} ${OPENEXR_HALF_LIBRARY} ${OPENEXR_ILMTHREAD_LIBRARY} ${ILMBASE_PTHREADS} CACHE STRING "The libraries needed to use IlmBase")
     set (OPENEXR_LIBRARIES ${OPENEXR_ILMIMF_LIBRARY} ${ILMBASE_LIBRARIES} ${ZLIB_LIBRARIES} CACHE STRING "The libraries needed to use OpenEXR")


Include System.cmake in Common.cmake

Include System.cmake in Common.cmake

--- Common.cmake
+++ Common.cmake
@@ -1,3 +1,5 @@
+
+include(${CMAKE_CURRENT_LIST_DIR}/System.cmake)

 # Common settings
 enable_testing()


BUG: set correct branch for diapotb

BUG: set correct branch for diapotb

--- Modules/Remote/diapotb.remote.cmake
+++ Modules/Remote/diapotb.remote.cmake
@@ -22,5 +22,5 @@
 otb_fetch_module(DiapOTBModule
   "OTB module for SAR processing in Diapason."
   GIT_REPOSITORY https://gitlab.orfeo-toolbox.org/remote_modules/diapotb.git
-  GIT_TAG 130f9286533414faf4b1a2bae3ff2496d2541d0f
+  GIT_TAG 9119c2eb062012f7d1c00047d4ca0df24163d61d
 )


[cmake] Add flags for MSVC directly in SiconosProject

--- Numerics/cmake/SiconosProject.cmake
+++ Numerics/cmake/SiconosProject.cmake
@@ -131,6 +131,8 @@
   CHECK_FUNCTION_EXISTS(gettimeofday HAVE_SYSTIMES_H)
   IF(MSVC)
     SET(BUILD_AS_CPP TRUE)
+    ADD_DEFINITIONS("-DBOOST_ALL_NO_LIB")
+    ADD_DEFINITIONS("-DEHsc") # this shoule be define by CMake, see Windows-MSVC.cmake
   ENDIF(MSVC)

   # Link external lib statically. This comes handy when we want to distribute


Removed default config for Gadgetron

Removed default config for Gadgetron

Creation of the default config file for Gadgetron is removed because the
ExternalProject_Add_Step executes the command as bash. This is not portable to
systems without bash. So it is removed for now.

[ 95%] Creating default Gadgetron configuration if not present
/bin/sh: 1 : Syntax error :end of file unexpected (expected "then")

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -81,15 +81,6 @@
         ${${proj}_DEPENDENCIES}
   )

-    ExternalProject_Add_Step(${proj} after_install
-     	COMMENT "Creating default Gadgetron configuration if not present"
-	COMMAND
-if(NOT EXISTS "${Gadgetron_Install_Dir}/share/gadgetron/config/gadgetron.xml")
-    configure_file(${Gadgetron_Install_Dir}/share/gadgetron/config/gadgetron.xml.example ${Gadgetron_Install_Dir}/share/gadgetron/config/gadgetron.xml)
-endif()
-    	DEPENDEES install
-    )
-
     set(Gadgetron_ROOT        ${Gadgetron_SOURCE_DIR})
     set(Gadgetron_INCLUDE_DIR ${Gadgetron_SOURCE_DIR})


Looks for Python if not yet available for patching

--- SuperBuild/External_Gadgetron.cmake
+++ SuperBuild/External_Gadgetron.cmake
@@ -83,6 +83,15 @@
     set(${proj}_ENABLE_OPENMP OFF)
   endif()

+  # require to have access to Python for patching
+  if (NOT PYTHON_EXECUTABLE)
+    if (${CMAKE_VERSION} VERSION_LESS "3.12")
+      find_package(PythonInterp REQUIRED)
+    else()
+      find_package(Python COMPONENTS Interpreter REQUIRED)
+      set (PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+    endif()
+  endif()

   # Sets ${proj}_URL_MODIFIED and ${proj}_TAG_MODIFIED
   SetGitTagAndRepo("${proj}")


ENH (#1397): create CMake GUI option for application and functionality testing

--- QApplications/MainApp/ApplicationTesting.cmake
+++ QApplications/MainApp/ApplicationTesting.cmake
@@ -1,6 +1,7 @@
 # tests without data or empty nodes
 SET(datatypes Image Surface PointSet Node)
-
+OPTION(MITK_APPLICATION_TESTING "Test the main application. Needs GUI" OFF)
+OPTION(MITK_FUNCTIONALITY_TESTING "Test each functionlity on its own. Needs GUI" OFF)
 IF(MITK_APPLICATION_TESTING)
   ADD_TEST(MainAppWithoutData ${EXECUTABLE_OUTPUT_PATH}/MainApp -noMITKOptions -testing)
   ADD_TEST(MainAppOptionTesting ${EXECUTABLE_OUTPUT_PATH}/MainApp -noMITKOptions -optiontesting)


BUG: Adjust itk.org ExternalData URL.

BUG: Adjust itk.org ExternalData URL.

The request to https://www.itk.org gives a 301 redirect to
https://itk.org.
Use the direct address, which helps some clients.

Change-Id: Ibec8f8cf95415fc2467150bb115efde5e96994ca

--- CMake/sitkExternalData.cmake
+++ CMake/sitkExternalData.cmake
@@ -40,7 +40,7 @@
     "https://midas3.kitware.com/midas/api/rest?method=midas.bitstream.download&checksum=%(hash)&algorithm=%(algo)"

     # Data published by developers using git-gerrit-push.
-    "https://www.itk.org/files/ExternalData/%(algo)/%(hash)"
+    "https://itk.org/files/ExternalData/%(algo)/%(hash)"
     )
 endif()
 # Tell ExternalData commands not to transform raw files to content links.


Find the latest installed qt version on windows machines.

--- CMakeScripts/LocateQt5.cmake
+++ CMakeScripts/LocateQt5.cmake
@@ -11,12 +11,13 @@
     STRING(REPLACE "/Tools" ";" QT_BIN "${QT_BIN}")
     LIST(GET QT_BIN 0 QT_BIN)
     FILE(GLOB QT_VERSIONS "${QT_BIN}/5.*")
-    LIST(SORT QT_VERSIONS)
-
-    # assume the latest version will be last alphabetically
-    LIST(REVERSE QT_VERSIONS)
-
     LIST(GET QT_VERSIONS 0 QT_VERSION)
+    # find the latest qt version in QT_VERSIONS
+    foreach(Ver ${QT_VERSIONS})
+        if(${Ver} VERSION_GREATER ${QT_VERSION})
+            set(QT_VERSION ${Ver})
+        endif()
+    endforeach()

     # fix any double slashes which seem to be common
     STRING(REPLACE "//" "/"  QT_VERSION "${QT_VERSION}")


release

release


[glog] remove entry with dead link

[glog] remove entry with dead link

--- cmake/projects/glog/hunter.cmake
+++ cmake/projects/glog/hunter.cmake
@@ -7,17 +7,6 @@
 include(hunter_cacheable)
 include(hunter_download)
 include(hunter_pick_scheme)
-
-hunter_add_version(
-    PACKAGE_NAME
-    glog
-    VERSION
-    "0.3.4-p0"
-    URL
-    "https://github.com/ruslo/glog/archive/v0.3.4-p0.tar.gz"
-    SHA1
-    de92243289267cb0f0f971a9aedf21bba74b71b3
-)

 hunter_add_version(
     PACKAGE_NAME


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


BUG: cmake syntax error in last commit

BUG: cmake syntax error in last commit

--- SuperBuild/Packaging/InstallSupportFiles.cmake
+++ SuperBuild/Packaging/InstallSupportFiles.cmake
@@ -237,7 +237,7 @@
     install(
       FILES ${PACKAGE_SUPPORT_FILES_DIR}/otbenv.profile
       DESTINATION ${PKG_STAGE_DIR}
-      RENAME otbenv.sh)
+      RENAME otbenv.sh
     )
     endforeach()


Select specific branch for the external CMake script

--- CMakeExternals.cmake
+++ 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 https://github.com/UniStuttgart-VISUS/megamol-cmake-externals.git script-externals --depth 1
+    ${GIT_EXECUTABLE} clone -b v1.0 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()


CMake Fixes for win32

CMake Fixes for win32

--- common.cmake
+++ common.cmake
@@ -12,20 +12,27 @@
 INCLUDE (CPack)
 INCLUDE (CTest)

-set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
-set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
-set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
-set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
-
 # Compiler-specific C++11 activation.
 if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
+    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
+    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
+    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+
     execute_process(
         COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
     if (NOT (GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7))
         message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.7 or greater.")
     endif ()
 elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+
+    set(CMAKE_CXX_FLAGS                "-Wall -std=c++11")
+    set(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g")
+    set(CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELEASE        "-O4 -DNDEBUG")
+    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
+
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
 elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
     add_definitions("/W2")


Update Hunter

Update Hunter

--- common.cmake
+++ common.cmake
@@ -5,7 +5,7 @@
 # * https://github.com/ruslo/hunter
 include("${CMAKE_CURRENT_LIST_DIR}/cmake/HunterGate.cmake")
 HunterGate(
-    URL "https://github.com/ruslo/hunter/archive/android-005.tar.gz"
-    SHA1 "a26088094228c90f748c41e003c6496a858a5f17"
+    URL "https://github.com/ruslo/hunter/archive/v0.11.1.tar.gz"
+    SHA1 "3b8ffc911b3cd8308547ef1d3a5a69331dab5c19"
     ${CONFIG_FILE}
 )