Allow python to work on windows from build dir.

The _d prefix is not needed for python since it wraps pure c.

Tested on windows 7 64 vs2010

Change-Id: I8856e6bd89ebcb64b76e35e670c8961e67a38e57
Reviewed-on: http://gerrit.aldebaran.lan/34789
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: gerrit

--- cmake/qibuild/swig/python.cmake
+++ cmake/qibuild/swig/python.cmake
@@ -104,19 +104,6 @@
     set_target_properties(${_swig_target} PROPERTIES SUFFIX   ".pyd")
   endif()

-  if(MSVC)
-    # .dll compiled in debug with visual studio are not usable
-    # from python.exe, (unless you are very careful : the size of the ojbjects
-    # are not the same in debug or in release with visual studio), which
-    # can lead to hard to solve bugs.
-    # Here, we add an _d so we are sure a Visual Studio users cannot
-    # use their modules unless they have built them in release.
-    set_target_properties(${_swig_target}
-      PROPERTIES
-        DEBUG_POSTFIX "_d"
-    )
-  endif()
-
   qi_install_python(TARGETS ${_swig_target})

   qi_install_python("${QI_SDK_DIR}/${QI_SDK_LIB}/${module_name}.py")


Interpreting the second parameter of ADD_TEST_DIRECTORY as an exception list. Those tests will be removed from the tests to be executed. Approved: Gabriel Petrovay

--- cmake_modules/ZorbaModule.cmake
+++ cmake_modules/ZorbaModule.cmake
@@ -553,11 +553,21 @@

 ENDMACRO(expected_failure)

-# Convenience macro for adding tests in a standard format. QQQ doc!
-MACRO(ADD_TEST_DIRECTORY TEST_DIR)
+# Convenience macro for adding tests in a standard format.
+# Parameters:
+#   TEST_DIR - all the .xq files in this directory will be added as tests
+#   ARGV1    - if this is present, it will be interpreted as a list of
+#              exceptions. The list items will be removed from the list of
+#              files found in TEST_DIR.
+MACRO (ADD_TEST_DIRECTORY TEST_DIR)
   # QQQ error-check: Queries directory exists, some tests found...
   FILE(GLOB_RECURSE TESTFILES FOLLOW_SYMLINKS
     RELATIVE "${TEST_DIR}/Queries" "${TEST_DIR}/Queries/*.xq")
+
+  FOREACH (EXCEPTION ${ARGV1})
+    LIST (REMOVE_ITEM TESTFILES ${EXCEPTION})
+  ENDFOREACH (EXCEPTION)
+
   SET(TESTCOUNTER 0)
   FOREACH(TESTFILE ${TESTFILES})
     SET(TESTNAME "${PROJECT_NAME}/${TESTFILE}")
@@ -579,7 +589,7 @@
     ENDIF (${TESTMOD} EQUAL 0)
   ENDFOREACH(TESTFILE)
   MESSAGE(STATUS "Added ${TESTCOUNTER} tests in ${TEST_DIR}")
-ENDMACRO(ADD_TEST_DIRECTORY)
+ENDMACRO (ADD_TEST_DIRECTORY)

 # Macro to install a basic CMake config file for a module. Provide a
 # source and binary directory. Result will be installed in binary


Apparently boost 1.53 now needs atomic in order to use threads.

--HG--
branch : v1-9


Remove a GL ES 2 reference in the 1.7 branch

--HG--
branch : v1-7

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -92,10 +92,6 @@
 find_package(OpenGLES)
 macro_log_feature(OPENGLES_FOUND "OpenGL ES" "Support for the OpenGL ES 1.x render system" "http://www.khronos.org/opengles/" FALSE "" "")

-# Find OpenGL ES 2.x
-#find_package(OpenGLES2)
-#macro_log_feature(OPENGLES2_FOUND "OpenGL ES 2" "Support for the OpenGL ES 2.x render system" "http://www.khronos.org/opengles/" FALSE "" "")
-
 # Find DirectX
 if(WIN32)
 	find_package(DirectX)


Fix typeo in warning message

Fix typeo in warning message

--- CMake/sitkUseGTest.cmake
+++ CMake/sitkUseGTest.cmake
@@ -74,7 +74,7 @@
     add_library(GTest::Main ALIAS ${GTEST_MAIN_LIBRARIES})

   else()
-    message(WARNING "CTEST_ROOT appears to be a source directory \
+    message(WARNING "GTEST_ROOT appears to be a source directory \
     but \"gtest/gtest.h\"  can not be found in source directory: \
     ${GTEST_ROOT}")
   endif()


normalize all CmakeLists and common.cmake files to work with latest CMake 3.1rc2 on windows

--- common.cmake
+++ common.cmake
@@ -1,6 +1,4 @@
 cmake_minimum_required (VERSION 2.8)
-project (${PROJECT})
-enable_testing()

 option(TODO "Enable TODO items that are in progress" OFF)
 option(TESTS "Enable building of extended test code in library" ON)
@@ -8,11 +6,33 @@
 option(TOOLS "Enable building of tools" ON)
 option(TOOLS_DEV "Enable building of tools-dev" ON)

-if(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake|MSBuild)")
+project (${PROJECT})
+enable_testing()
+
+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")
+    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 "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+elseif(${CMAKE_MAKE_PROGRAM} MATCHES "(msdev|devenv|nmake|MSBuild)")
     add_definitions("/W2")
-else()
-    add_definitions("-Wall -Wextra")
-endif()
+else ()
+    message(FATAL_ERROR "Your C++ compiler does not support C++11.")
+endif ()
+

 if(TODO MATCHES "ON")
    add_definitions("-DTODO=1")
@@ -22,7 +42,10 @@

 set(LIBS ${LIBS} ${CHECK_LIBRARIES} ${PROJECT})

+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" )

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


DOC: Remove errant "+" in Remote_documentation.

Change-Id: Ic88002d7dfc51589d725e7f846997573703809b1

--- CMake/ITKGroups.cmake
+++ CMake/ITKGroups.cmake
@@ -63,7 +63,7 @@
 algorithms that hope to eventually be integrated into the toolkit,
 niche algorithms with limited application, and Modules in progress that do not
 yet have the test coverage and cross-platform standards required by the main toolkit.
-+The modules are OFF by default in ITK's CMake configuration.
+The modules are OFF by default in ITK's CMake configuration.
 Note that these modules do get the same level of support and backwards
 compatibility as other modules in the toolkit.")


Fix build step with downloaded dependency sources

--- CMake/RealmCore.cmake
+++ CMake/RealmCore.cmake
@@ -1,4 +1,3 @@
-###########################################################################
 #
 # Copyright 2016 Realm Inc.
 #
@@ -73,7 +72,7 @@
     if(core_prefix)
         build_existing_realm_core(${core_prefix})
         if(sync_prefix)
-            build_existing_realm_sync(${sync_prefix} ${core_prefix})
+            build_existing_realm_sync(${sync_prefix})
         endif()
     elseif(enable_sync)
         # FIXME: Support building against prebuilt sync binaries.
@@ -316,6 +315,9 @@

 macro(build_realm_sync)
     set(sync_prefix_directory "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/realm-sync")
+
+    ExternalProject_Get_Property(realm-core SOURCE_DIR)
+    set(core_directory ${SOURCE_DIR})

     ExternalProject_Add(realm-sync-lib
         DEPENDS realm-core
@@ -363,8 +365,8 @@

     # Create directories that are included in INTERFACE_INCLUDE_DIRECTORIES, as CMake requires they exist at
     # configure time, when they'd otherwise not be created until we download and build sync.
-    file(MAKE_DIRECTORY ${sync_directory}/src)
-    set_property(TARGET realm-sync PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${sync_directory}/src)
+    file(MAKE_DIRECTORY ${SOURCE_DIR}/src)
+    set_property(TARGET realm-sync PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${SOURCE_DIR}/src)

     # Sync server library is built as part of the sync library build
     set(sync_server_library_debug "${sync_debug_binary_dir}/src/realm/${CMAKE_STATIC_LIBRARY_PREFIX}realm-server-dbg${CMAKE_STATIC_LIBRARY_SUFFIX}")
@@ -388,7 +390,7 @@
     set_property(TARGET realm-sync-server PROPERTY INTERFACE_LINK_LIBRARIES ${SSL_LIBRARIES} ${YAML_LDFLAGS})
 endmacro()

-function(build_existing_realm_sync sync_directory core_directory)
+function(build_existing_realm_sync sync_directory)
     get_filename_component(sync_directory ${sync_directory} ABSOLUTE)
     build_realm_sync(URL ""
                      SOURCE_DIR ${sync_directory}
@@ -399,11 +401,6 @@

 function(clone_and_build_realm_sync branch)
     set(cmake_files ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
-    if(REALM_PLATFORM STREQUAL "Android")
-        set(config_cmd test -f src/config.mk || REALM_CORE_PREFIX=${cmake_files}/realm-core/src/realm-core REALM_FORCE_OPENSSL=YES REALM_ENABLE_ASSERTIONS= sh build.sh config && echo "ENABLE_ENCRYPTION    = yes" >> src/config.mk)
-    else()
-        set(config_cmd test -f src/config.mk || REALM_CORE_PREFIX=${cmake_files}/realm-core/src/realm-core sh build.sh config)
-    endif()

     build_realm_sync(GIT_REPOSITORY "git@github.com:realm/realm-sync.git"
                      GIT_TAG ${branch}


Reduce IO by buffering reads and writes more efficiently

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -290,6 +290,8 @@
         set (TEST_DIRECTORY_CONFIGURE_SCRIPT
              "${TEST_DIRECTORY_NAME}/CMakeLists.txt")
         set (TEST_DIRECTORY_CONFIGURE_SCRIPT_CONTENTS
+             "project (TestProject CXX C)\n"
+             "cmake_minimum_required (VERSION 2.8 FATAL_ERROR)\n"
              "if (POLICY CMP0025)\n"
              "  cmake_policy (SET CMP0025 NEW)\n"
              "endif (POLICY CMP0025)\n"


ManageFile: cmake-fedora.conf should also be able to be found when in NO_PACK/FedPkg/<prj>

--- Modules/ManageFile.cmake
+++ Modules/ManageFile.cmake
@@ -308,7 +308,9 @@
     FIND_FILE_ERROR_HANDLING(${var} ${ARGN}
 	FIND_ARGS NAMES cmake-fedora.conf
 	PATHS ${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/cmake-fedora
-	. cmake-fedora /etc
+	. cmake-fedora /etc
+	${CMAKE_SOURCE_DIR}/../../../
+	${CMAKE_SOURCE_DIR}/../../../cmake-fedora
 	)
     SET(${var} "${${var}}" PARENT_SCOPE)
 ENDFUNCTION(MANAGE_CMAKE_FEDORA_CONF var)


vorbis: update to 1.3.6

vorbis: update to 1.3.6

--- packages/vorbis.cmake
+++ packages/vorbis.cmake
@@ -1,7 +1,7 @@
 ExternalProject_Add(vorbis
     DEPENDS ogg
-    URL "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.5.tar.xz"
-    URL_HASH SHA256=54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1
+    URL "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.6.tar.xz"
+    URL_HASH SHA256=af00bb5a784e7c9e69f56823de4637c350643deedaf333d0fa86ecdba6fcb415
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ${EXEC} <SOURCE_DIR>/configure
         --host=${TARGET_ARCH}


no longer trying stupid hacks... the clang5 builds on the CI will fail for now because of libc++/libstdc++ problems with <optional>/<unordered_map>... wtf

--- scripts/cmake/compiler_flags.cmake
+++ scripts/cmake/compiler_flags.cmake
@@ -111,12 +111,7 @@
 endif()

 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    if(NOT TOOLCHAIN STREQUAL "js")
-        ucm_add_flags(-stdlib=libc++)
-        # this hack is for build problems - as seen here: https://stackoverflow.com/questions/46580808
-        include_directories(BEFORE "/usr/include/c++/5")
-        include_directories(AFTER "/usr/include/x86_64-linux-gnu/c++/5/")
-    endif()
+    ucm_add_flags(-stdlib=libc++)

     list(APPEND ha_compiler_flags
         -Weverything


Missing bracket

Missing bracket

Closes astro-informatics/purify#28

--- modules/FindCFitsIO.cmake
+++ modules/FindCFitsIO.cmake
@@ -50,7 +50,7 @@
 )
 if(CFITSIO_FOUND AND NOT CFitsIO_FOUND)
     set(CFitsIO_FOUND ${CFITSIO_FOUND})
-endif(
+endif()
 if(CFitsIO_FOUND)
   if(CFitsIO_LIBRARY MATCHES "\\.a$")
     add_library(cfitsio STATIC IMPORTED GLOBAL)


Fixed bzip2 compilation as shared library

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -680,8 +680,10 @@

 # Generic configure flags to select static or shared library compilation.
 if (${BUILD_SHARED_LIBS})
+  set(LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
   set(CONFIGURE_LIB_TYPE --enable-shared --disable-static)
 else ()
+  set(LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
   set(CONFIGURE_LIB_TYPE --disable-shared --enable-static)
 endif ()

@@ -908,12 +910,8 @@

 ################################################################################
 # bzip2.
-set(BZIP2_MAKEFILE Makefile)
-if (BUILD_SHARED_LIBS)
-  set(BZIP2_MAKEFILE Makefile-libbz2_so)
-endif ()
-add_external_project(
-  ${BZIP2_TARGET}
+add_external_project(
+  ${BZIP2_TARGET}_download
   PREFIX ${BZIP2_PREFIX}
   DOWNLOAD_DIR ${BZIP2_PREFIX}/download
   DOWNLOAD_COMMAND
@@ -924,13 +922,31 @@
       tar --strip-components 1 -xvf
           ${BZIP2_PREFIX}/download/bzip2-1.0.6.tar.gz
   CONFIGURE_COMMAND ${NOP}
-  BUILD_COMMAND make -f ${BZIP2_MAKEFILE} bzip2 bzip2recover
-      CC=${CMAKE_C_COMPILER}
-      CXX=${CMAKE_CXX_COMPILER} CFLAGS=${CMAKE_C_FLAGS_WITH_ARCHS}
-      CXXFLAGS=${CMAKE_CXX_FLAGS_WITH_ARCHS}
-      LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
-  INSTALL_COMMAND make -f ${BZIP2_MAKEFILE} install PREFIX=${BZIP2_PREFIX}
-  BUILD_IN_SOURCE 1)
+  BUILD_COMMAND ${NOP}
+  INSTALL_COMMAND ${NOP})
+ExternalProject_Get_Property(${BZIP2_TARGET}_download SOURCE_DIR)
+set(BZIP2_SRCS
+    ${SOURCE_DIR}/blocksort.c
+    ${SOURCE_DIR}/huffman.c
+    ${SOURCE_DIR}/crctable.c
+    ${SOURCE_DIR}/randtable.c
+    ${SOURCE_DIR}/compress.c
+    ${SOURCE_DIR}/decompress.c
+    ${SOURCE_DIR}/bzlib.c)
+set_source_files_properties(${BZIP2_SRCS} PROPERTIES GENERATED TRUE)
+cc_library(${BZIP2_TARGET}
+           ${SOURCE_DIR}/blocksort.c
+           ${SOURCE_DIR}/huffman.c
+           ${SOURCE_DIR}/crctable.c
+           ${SOURCE_DIR}/randtable.c
+           ${SOURCE_DIR}/compress.c
+           ${SOURCE_DIR}/decompress.c
+           ${SOURCE_DIR}/bzlib.c)
+set_target_properties(
+    ${BZIP2_TARGET} PROPERTIES
+    LIBRARY_OUTPUT_DIRECTORY ${BZIP2_PREFIX}/lib
+    OUTPUT_NAME bz2)
+add_dependencies(${BZIP2_TARGET} ${BZIP2_TARGET}_download)

 ################################################################################
 # Clang compiler.


Pass CTEST_USE_LAUNCHERS through External_Bender.cmake

See Issue #13720

--- CMake/Superbuild/External_Bender.cmake
+++ CMake/Superbuild/External_Bender.cmake
@@ -70,6 +70,7 @@
       -DBender_SUPERBUILD:BOOL=OFF
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+      -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS}
       -DDOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY:PATH=${DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY}
       -DBender_INSTALL_BIN_DIR:STRING=${Slicer_INSTALL_BIN_DIR}
       -DBender_INSTALL_LIB_DIR:STRING=${Slicer_INSTALL_LIB_DIR}


Bumping TubeTK superbuild to latest version

--- CMake/Superbuild/External_TubeTK.cmake
+++ CMake/Superbuild/External_TubeTK.cmake
@@ -45,7 +45,7 @@
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
     GIT_REPOSITORY "https://github.com/KitwareMedical/TubeTK.git"
-    GIT_TAG "6fc02d86917e6a0dcf549d99efe3ebd8e30c1e7b"
+    GIT_TAG "303c6009a02f638b625d9108fe1d88ad139b8167"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Add new visual studio version 1914

Add new visual studio version 1914

Summary: Merge branch 'T24779-VisualStudio2017-15.7'

Test Plan: Build with VS 2017 15.7.1

Reviewers: O1 MITK Core, kislinsk

Reviewed By: O1 MITK Core, kislinsk

Spies: wieset

Differential Revision: https://phabricator.mitk.org/D131

--- CMake/mitkFunctionGetMSVCVersion.cmake
+++ CMake/mitkFunctionGetMSVCVersion.cmake
@@ -39,6 +39,10 @@
     set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
     set(VISUAL_STUDIO_VERSION_MINOR "3" PARENT_SCOPE)
     set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
+  elseif(MSVC_VERSION EQUAL 1914)
+    set(VISUAL_STUDIO_VERSION_MAJOR "14" PARENT_SCOPE)
+    set(VISUAL_STUDIO_VERSION_MINOR "4" PARENT_SCOPE)
+    set(VISUAL_STUDIO_PRODUCT_NAME "Visual Studio 2017" PARENT_SCOPE)
   else()
     message(WARNING "Unknown Visual Studio version ${MSVC_VERSION}. Please update CMake/mitkFunctionGetMSVCVersion.cmake.")
   endif()


added todo

added todo

--- Modules/process-dependency-entry.cmake
+++ Modules/process-dependency-entry.cmake
@@ -49,6 +49,7 @@
     ELSEIF(GIT_CHECKOUT AND NOT GIT_URL)
       # TODO ASSERT_PACKAGE_AVAILABILITY without url
     ELSE()
+      # TODO check if package available, even without git repo
       TART_DEBUG("No repo details for package ${DEPENDENCY}, adding local version..")
       ADD_TART_DEPENDENCY(${PARENT_BUILD_TARGET} ${DEPENDENCY})
       CONTINUE()


add tests 20-26

add tests 20-26

--- reg_tests/CTestList.cmake
+++ reg_tests/CTestList.cmake
@@ -34,3 +34,10 @@
 add_test_r(Test17)
 add_test_r(Test18)
 add_test_r(Test19)
+add_test_r(Test20)
+add_test_r(Test21)
+add_test_r(Test22)
+add_test_r(Test23)
+add_test_r(Test24)
+add_test_r(Test25)
+add_test_r(Test26)


Add X11 linking

Add X11 linking

--- support/cmake/support_macros.cmake
+++ support/cmake/support_macros.cmake
@@ -158,7 +158,7 @@
     target_include_directories(libOpenSpace SYSTEM PUBLIC ${SGCT_INCLUDE_DIRECTORIES})
     target_link_libraries(libOpenSpace ${SGCT_LIBRARIES})
     if (UNIX AND (NOT APPLE))
-        target_link_libraries(libOpenSpace Xcursor Xinerama)
+        target_link_libraries(libOpenSpace Xcursor Xinerama X11)
     endif ()

     # Spice


Enable OpenCV for dartclients

Enable OpenCV for dartclients

--- CMake/MITKDashboardScript.TEMPLATE.cmake
+++ CMake/MITKDashboardScript.TEMPLATE.cmake
@@ -66,6 +66,7 @@

 set(ADDITIONNAL_CMAKECACHE_OPTION "
 MITK_USE_Boost:BOOL=ON
+MITK_USE_OPEN_CV:BOOL=ON
 ")

 # List of test that should be explicitly disabled on this machine


check file exist before adding it to to be installed list

--- SuperBuild/Packaging/PackageHelper.cmake
+++ SuperBuild/Packaging/PackageHelper.cmake
@@ -748,17 +748,19 @@
                     ${CMAKE_BINARY_DIR}/make_symlinks_temp
                     "ln -sf $OUT_DIR/lib/${linked_to_file} $OUT_DIR/lib/${basename_of_sofile}\n"
                     )
-                  #message("${sofile} is a symlink to ${linked_to_file}")
+                  # message("${sofile} is a symlink to ${linked_to_file}")
                 else() # is_symlink
                   if(NOT "${basename_of_sofile}" MATCHES "otbapp_")
-                    file(APPEND ${CMAKE_BINARY_DIR}/install_to_${DEST_LIB_DIR} "${sofile}\n")
-                    #just install the so file to <staging-dir>/lib
-                    #install(FILES "${sofile}" DESTINATION ${PKG_STAGE_DIR}/lib MESSAGE_NEVER)
-                    # Finally touch a file in temp directory for globbing later
-                    # message("touching ${basename_of_sofile}")
-                    execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_BINARY_DIR}/temp_so_names_dir/${basename_of_sofile}")
-                  endif() #if(.. MATCHES "otbapp_")
-                endif() #is_symlink
+                    if( EXISTS ${SEARCHDIR}/${sofile} )
+                      file(APPEND ${CMAKE_BINARY_DIR}/install_to_${DEST_LIB_DIR} "${sofile}\n")
+                      #just install the so file to <staging-dir>/lib
+                      #install(FILES "${sofile}" DESTINATION ${PKG_STAGE_DIR}/lib MESSAGE_NEVER)
+                      # Finally touch a file in temp directory for globbing later
+                      # message("touching ${basename_of_sofile}")
+                      execute_process(COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_BINARY_DIR}/temp_so_names_dir/${basename_of_sofile}")
+                    endif() # ( EXISTS ${SEARCHDIR}/${sofile} )
+                  endif() # if(.. MATCHES "otbapp_")
+                endif() # is_symlink
               endif() #is_valid
             endforeach()
           endif(is_executable)


build: effectively revert 986beb75225a09969f71123f134967eecef0dcd5

This change broke the Windows builds for all the variants.  `-z defs` cannot be
used on all targets, particularly in environments where the stdlib is being
compiled for a foreign host.  This needs to be handled more carefully as I
mentioned on the PR itself.  In the mean time, revert it to get Windows building
again.

--- cmake/modules/SwiftSharedCMakeConfig.cmake
+++ cmake/modules/SwiftSharedCMakeConfig.cmake
@@ -81,9 +81,7 @@
   # HACK: this ugly tweaking is to prevent the propagation of the flag from LLVM
   # into swift.  The use of this flag pollutes all targets, and we are not able
   # to remove it on a per-target basis which breaks cross-compilation.
-  if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
-    string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
-  endif()
+  string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")

   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
   string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" PACKAGE_VERSION_MAJOR


NSIS Windows installer: fix missing DLLs

Closes #917

--- cmakemodules/script_install_commands.cmake
+++ cmakemodules/script_install_commands.cmake
@@ -48,11 +48,11 @@
 	endif()

 	# My own debug DLLs:
-	file(GLOB_RECURSE EXTRA_DLLS "${MRPT_BINARY_DIR}/bin/Debug/*.dll")
+	file(GLOB_RECURSE EXTRA_DLLS "${MRPT_BINARY_DIR}/bin/Debug/*.dll" "${MRPT_BINARY_DIR}/bin/Release/*.dll")
 	foreach(F ${EXTRA_DLLS})
 		install(FILES "${F}" DESTINATION bin)
 	endforeach()
-	file(GLOB_RECURSE EXTRA_LIBS "${MRPT_BINARY_DIR}/lib/Debug/*.lib")
+	file(GLOB_RECURSE EXTRA_LIBS "${MRPT_BINARY_DIR}/lib/Debug/*.lib" "${MRPT_BINARY_DIR}/lib/Release/*.lib" )
 	foreach(F ${EXTRA_LIBS})
 		install(FILES "${F}" DESTINATION lib)
 	endforeach()


CHG: never use public dashboard

CHG: never use public dashboard

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,4 +1,8 @@
 OPTION(USE_KITWARE_DARTBOARD "Use the Kitware Dartboard for Build Submissions." OFF)
+
+
+# never use kitware dashboard, since it doesn't work at the moment (10.10.2007)
+IF(FALSE)

 # configure dart for submission to kitware
 IF(USE_KITWARE_DARTBOARD)
@@ -18,6 +22,7 @@
 	# SET (DOXYGEN_URL "http://mbi-srv.inet.dkfz-heidelberg.de/docs/image_processing/mitk/doxygen/" )

 ENDIF(USE_KITWARE_DARTBOARD)
+ENDIF(FALSE)

 IF(EXISTS ${MBI_DART_WORKDIR}/notes.txt)
   MAKE_DIRECTORY(${MBI_DART_WORKDIR}/bin/Testing/Notes)


Ultime commit.

Ultime commit.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -1,6 +1,6 @@
 # Dashboard is opened for submissions for a 24 hour period starting at
 # the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
-SET (NIGHTLY_START_TIME "00:10:00 EDT")
+SET (NIGHTLY_START_TIME "00:10:00 CET")

 SET (BUILDNAME "${BUILDNAME}${CMAKE_BUILD_TYPE}")


[build] Fix cmake warning on FindMbedTLS (#1935)

The warning message:
"The package name passed to `find_package_handle_standard_args` (Libmbedtls)
does not match the name of the calling package (MbedTLS).  This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern."

--- scripts/FindMbedTLS.cmake
+++ scripts/FindMbedTLS.cmake
@@ -111,5 +111,5 @@

 # Now we've accounted for the 3-vs-1 library case:
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Libmbedtls DEFAULT_MSG MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS)
+find_package_handle_standard_args(MbedTLS DEFAULT_MSG MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS)
 mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARIES MBEDTLS_INCLUDE_DIRS)


use target_compile_definitions instead of add_definitions for try compile

--- connext_cmake_module/cmake/check_abi.cmake
+++ connext_cmake_module/cmake/check_abi.cmake
@@ -16,8 +16,8 @@

 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")

-add_definitions(@Connext_DEFINITIONS@)
 include_directories(@Connext_INCLUDE_DIRS@)
 add_executable(exe
   "@connext_cmake_module_DIR@/check_abi.cpp")
+target_compile_definitions(exe PRIVATE @Connext_DEFINITIONS@)
 target_link_libraries(exe @Connext_LIBRARIES@)


opengm.cmake: Clone from opengm/opengm, not ilastik/opengm fork. opengm.cmake: Use specific commit instead of HEAD.

--- opengm.cmake
+++ opengm.cmake
@@ -12,8 +12,8 @@
 include (PatchSupport)

 external_git_repo (opengm
-    HEAD
-    https://github.com/ilastik/opengm)
+    576dc472324a5dce40b7e9bb4c270afbd9b3da37
+    http://github.com/opengm/opengm)

 if(CPLEX_ROOT_DIR)
     set(CMAKE_CPLEX_ROOT_DIR "-DCPLEX_ROOT_DIR=${CPLEX_ROOT_DIR}")
@@ -33,9 +33,9 @@
         -DWITH_BOOST=ON
         ${CMAKE_CPLEX_ROOT_DIR}

-    BUILD_COMMAND       ${BUILDEM_ENV_STRING} make
-    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} make install
-    #TEST_COMMAND        ${BUILDEM_ENV_STRING} make test
+    BUILD_COMMAND       ${BUILDEM_ENV_STRING} $(MAKE)
+    INSTALL_COMMAND     ${BUILDEM_ENV_STRING} $(MAKE) install
+    TEST_COMMAND        ${BUILDEM_ENV_STRING} $(MAKE) test
 )

 set_target_properties(${opengm_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)


Don't need the complete name for spglib

Don't need the complete name for spglib

The find_library call will prepend lib on Unix systems, and the
appropriate ending (.a/.so on Linux, .a/.dylib on Mac, and .lib/.dll on
Windows platforms). This was not working on Windows as the library
generated is called spglib.lib there.

--- cmake/FindSpglib.cmake
+++ cmake/FindSpglib.cmake
@@ -7,7 +7,7 @@
 #  SPGLIB_LIBRARY      - The Spglib library
 #
 find_path(SPGLIB_INCLUDE_DIR spglib/spglib.h)
-find_library(SPGLIB_LIBRARY NAMES libspglib.a)
+find_library(SPGLIB_LIBRARY NAMES spglib)

 set(SPGLIB_INCLUDE_DIRS "${SPGLIB_INCLUDE_DIR}")


Remove message in cmake

Remove message in cmake

--- cmake/GenClients.cmake
+++ cmake/GenClients.cmake
@@ -32,8 +32,6 @@
       )
   endforeach()

-  message(STATUS "${FILES_MOVED}")
-
   # Create a custom target that
   add_custom_target(python_client ALL DEPENDS ${FILES_MOVED})
 endfunction()


fix(qt): Qt 5.0 generates configure errors

--- cmake/consort/qt.cmake
+++ cmake/consort/qt.cmake
@@ -162,13 +162,6 @@
 			set( CMAKE_AUTORCC 1 )

 			message(STATUS "Qt version: ${Qt5Core_VERSION_STRING} (${QT_ROOT})")
-
-			# Qt before 5.1 didn't automatically add these
-			if( Qt5Core_VERSION_STRING VERSION_LESS "5.1" )
-				foreach(m ${_modules})
-					target_include_directories(Qt5::${m} SYSTEM BEFORE INTERFACE ${Qt5${m}_INCLUDE_DIRS})
-				endforeach()
-			endif()

 			if( NOT QT_TRANSLATIONS_DIR)
 				get_target_property(QT_QMAKE_EXECUTABLE Qt5::qmake IMPORTED_LOCATION)
@@ -516,6 +509,11 @@
 macro( QT_USE_MODULES )
 	foreach( m ${THIS_QT_MODULES} )
 		target_link_libraries(${name} "Qt5::${m}")
+
+		# Qt before 5.1 didn't automatically add these
+		if( Qt5Core_VERSION_STRING VERSION_LESS "5.1" )
+			target_include_directories(${name} SYSTEM BEFORE PRIVATE ${Qt5${m}_INCLUDE_DIRS})
+		endif()
 	endforeach()
 endmacro()


cmake: n_template: apply templating to filename only (skip path)

Signed-off-by: Karol Gugala <38af71640571ee4b5093d4f69ffca1ac454f2948@antmicro.com>

--- common/cmake/gen.cmake
+++ common/cmake/gen.cmake
@@ -341,7 +341,12 @@
   foreach(PREFIX ${N_TEMPLATE_PREFIXES})
     foreach(SRC ${N_TEMPLATE_SRCS})
       set(REAL_INCLUDE_FILES "")
-      get_templated_filename(SRC_WITH_PREFIX ${SRC} ${PREFIX})
+      get_filename_component(SRC_FILE ${SRC} NAME)
+      get_filename_component(SRC_DIR ${SRC} DIRECTORY)
+      get_templated_filename(SRC_WITH_PREFIX ${SRC_FILE} ${PREFIX})
+      if (NOT "${SRC_DIR}" STREQUAL "")
+        set(SRC_WITH_PREFIX ${SRC_DIR}/${SRC_WITH_PREFIX})
+      endif()
       get_file_target(SRC_TARGET_NAME ${SRC})
       get_target_property(SRC_INCLUDE_FILES ${SRC_TARGET_NAME} INCLUDE_FILES)
       foreach(INC ${SRC_INCLUDE_FILES})


Add style test for bsve utility

Add style test for bsve utility

--- plugin.cmake
+++ plugin.cmake
@@ -29,8 +29,8 @@
                       "${PROJECT_SOURCE_DIR}/plugins/minerva/server/rest")
 add_python_style_test(pep8_style_minerva_utility
                       "${PROJECT_SOURCE_DIR}/plugins/minerva/server/utility")
-add_python_style_test(pep8_style_minerva_analyses
-                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/analyses")
+add_python_style_test(pep8_style_minerva_bsve
+                      "${PROJECT_SOURCE_DIR}/plugins/minerva/server/utility/bsve")
 add_python_style_test(pep8_style_minerva_jobs
                       "${PROJECT_SOURCE_DIR}/plugins/minerva/server/jobs")


Applied changes from the Android script to the main script.  iOS updates.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -94,7 +94,7 @@
 endmacro(create_executable)

 macro(create_header_library target)
-  if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${project_name}-config.cmake")
+  if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}-config.cmake")
     set(${target}_DIR ${CMAKE_CURRENT_LIST_DIR} CACHE INTERNAL "${target} path")
   else ()
     set(${target}_includes "${CMAKE_CURRENT_LIST_DIR}/source" PARENT_SCOPE)
@@ -115,20 +115,20 @@
   endif ()
 endmacro(create_test)

-if (IOS)
+#if (IOS)
+#  macro(add_project project_name)
+#    message(STATUS "ios ${project_name}")
+#    #include(${CMAKE_SOURCE_DIR}/toolchains/ios.cmake)
+#    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
+#    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+#    project(${project_name})
+#    set(${project_name}_DIR ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
+#    include(${project_name}-config.cmake)
+#  endmacro(add_project)
+#else ()
+
   macro(add_project project_name)
-    message(STATUS "ios ${project_name}")
-    #include(${CMAKE_SOURCE_DIR}/toolchains/ios.cmake)
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-    project(${project_name})
-    set(${project_name}_DIR ${CMAKE_CURRENT_LIST_DIR} PARENT_SCOPE)
-    include(${project_name}-config.cmake)
-  endmacro(add_project)
-else ()
-
-  macro(add_project project_name)
-    if (MINGW OR ANDROID)
+    if (NOT MSVC)
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
     endif ()

@@ -143,7 +143,7 @@

   endmacro(add_project)

-endif ()
+#endif ()

 macro(add name)
   add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/${name})
@@ -243,12 +243,13 @@
     #    message("'${${output_variable}}' ${library_name} ${library_index}")
     if (${library_index} EQUAL "-1")
       list(APPEND ${output_variable} ${library_name})
+      #message("${CURRENT_TARGET} ${library_name} ${${library_name}_dependencies}")
       append_dependency_hierarchy("${${library_name}_dependencies}" ${output_variable} ${library_name})
-    elseif (IS_EXECUTABLE AND NOT "${parent_name}" STREQUAL "")
+    elseif (IS_EXECUTABLE AND MINGW AND NOT "${parent_name}" STREQUAL "")
       #      message("check ${library_index}, ${parent_index}")
       list(FIND ${output_variable} ${parent_name} parent_index)
       if (${parent_index} GREATER ${library_index})
-        message("move ${library_index}, ${parent_index}")
+        #message("move ${library_index}, ${parent_index}")
         #        message("before ${${output_variable}}")
         list(REMOVE_AT ${output_variable} ${parent_index})
         list(INSERT ${output_variable} ${library_index} ${parent_name})
@@ -275,7 +276,7 @@

   if (LOCAL_TARGET)
     get_dependency_hierarchy("${ARGN}" all_dependencies)
-    #    message("  ${CURRENT_TARGET}: ${all_dependencies}")
+        #message("  ${CURRENT_TARGET}: ${all_dependencies}")

     if (IS_EXECUTABLE)
       #      set(reverse_list ${all_dependencies})
@@ -337,12 +338,11 @@

     foreach (library_name ${ARGN})
       if (TARGET ${library_name})
-        add_dependencies(${CURRENT_TARGET}
-          ${library_name}
-          )
-        list(APPEND "${CURRENT_TARGET}_dependencies" "${library_name}")
-        set(${CURRENT_TARGET}_dependencies ${${CURRENT_TARGET}_dependencies} PARENT_SCOPE)
+        add_dependencies(${CURRENT_TARGET} ${library_name})
       endif ()
+
+      list(APPEND "${CURRENT_TARGET}_dependencies" "${library_name}")
+      set(${CURRENT_TARGET}_dependencies ${${CURRENT_TARGET}_dependencies} PARENT_SCOPE)
     endforeach ()
   endif ()
 endmacro()


Added more flags for using OpenGL libraries

First commit in this branch only considered VTK_USE_X and seemed to have broken CDash for MacOSX

--- CMake/vtkOpenGL.cmake
+++ CMake/vtkOpenGL.cmake
@@ -18,7 +18,11 @@

 # OSMesa logic for offscreen mesa rendering.
 option(VTK_OPENGL_HAS_OSMESA
-  "The OpenGL library being used supports off screen Mesa calls" OFF)
+  "The OpenGL library being used supports / can be combined with off screen Mesa calls" OFF)
+
+# OSMesa offscreen mesa rendering.
+option(VTK_USE_OSMESA
+  "Use OSMesa for off screen rendering." OFF)
 # EGL offscreen rendering
 option(VTK_USE_OFFSCREEN_EGL
   "Use EGL for OpenGL client API for offscreen rendering." OFF)
@@ -33,33 +37,29 @@
 endif()

 option(VTK_USE_OFFSCREEN "Use off screen calls by default" OFF)
-unset(VTK_CAN_DO_OFFSCREEN)
-if(VTK_OPENGL_HAS_OSMESA OR WIN32 OR VTK_USE_OFFSCREEN_EGL)
-  set(VTK_CAN_DO_OFFSCREEN 1)
-endif()
-if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS)
-  set(VTK_USE_OSMESA FALSE)
+
+if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS OR VTK_USE_OSMESA)
   if (VTK_USE_OFFSCREEN_EGL)
     message(FATAL_ERROR "VTK_USE_OFFSCREEN_EGL set together with one of ("
-      "VTK_USE_X, VTK_USE_COCOA, WIN32, ANDROID OR APPLE_IOS). "
-      "You cannot use both offscreen and one of the listed windowing systems.")
+      "VTK_USE_X, VTK_USE_COCOA, VTK_USE_OSMESA, WIN32, ANDROID OR APPLE_IOS). "
+      "You cannot use both offscreen and one of the listed windowing systems or "
+      "alternative offscreen rendering backends.")
   endif()
-elseif(VTK_USE_OFFSCREEN_EGL)
-  set(VTK_USE_OSMESA FALSE)
-else()
-  set(VTK_USE_OSMESA TRUE)
 endif()

-mark_as_advanced(VTK_USE_X VTK_OPENGL_HAS_OSMESA VTK_USE_OFFSCREEN_EGL
+mark_as_advanced(VTK_USE_X VTK_OPENGL_HAS_OSMESA VTK_USE_OSMESA VTK_USE_OFFSCREEN_EGL
   VTK_USE_OFFSCREEN VTK_EGL_DEVICE_INDEX)

 if(VTK_USE_OSMESA)
-  find_package(OSMesa REQUIRED)
-  include_directories(SYSTEM ${OSMESA_INCLUDE_DIR})
-elseif(VTK_USE_OFFSCREEN_EGL)
+    find_package(OSMesa REQUIRED)
+    include_directories(SYSTEM ${OSMESA_INCLUDE_DIR})
+endif()
+if(VTK_USE_OFFSCREEN_EGL)
     find_package(EGL REQUIRED)
     include_directories(SYSTEM ${EGL_INCLUDE_DIR})
-else()
+endif()
+
+if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS)
   find_package(OpenGL REQUIRED)
   include_directories(SYSTEM ${OPENGL_INCLUDE_DIR})
   if(APPLE)
@@ -80,12 +80,18 @@
 endif()

 # Function to link a VTK target to the necessary OpenGL libraries.
+set(VTK_OPENGL_LINK_LIBRARIES)
+
+if(VTK_USE_OFFSCREEN_EGL)
+  set(VTK_OPENGL_LINK_LIBRARIES ${VTK_OPENGL_LINK_LIBRARIES} ${EGL_LIBRARIES})
+endif()
+if(VTK_USE_OSMESA)
+  set(VTK_OPENGL_LINK_LIBRARIES ${VTK_OPENGL_LINK_LIBRARIES} ${OSMESA_LIBRARY})
+endif()
+if(VTK_USE_X OR VTK_USE_COCOA OR WIN32 OR ANDROID OR APPLE_IOS)
+  set(VTK_OPENGL_LINK_LIBRARIES ${VTK_OPENGL_LINK_LIBRARIES} ${OPENGL_LIBRARIES})
+endif()
+
 function(vtk_opengl_link target)
-  if(VTK_USE_OSMESA)
-    vtk_module_link_libraries(${target} LINK_PRIVATE ${OSMESA_LIBRARY})
-  elseif(VTK_USE_OFFSCREEN_EGL)
-    vtk_module_link_libraries(${target} LINK_PRIVATE ${EGL_LIBRARIES})
-  else()
-    vtk_module_link_libraries(${target} LINK_PRIVATE ${OPENGL_LIBRARIES})
-  endif()
+  vtk_module_link_libraries(${target} LINK_PRIVATE ${VTK_OPENGL_LINK_LIBRARIES})
 endfunction()


Add NO_CLEAN and ALLOW_CONFIGURE_FAIL

Add NO_CLEAN and ALLOW_CONFIGURE_FAIL

--- CMakeUnitRunner.cmake
+++ CMakeUnitRunner.cmake
@@ -158,6 +158,14 @@
                                  TEST_WORKING_DIRECTORY_NAME
                                  TEST_FILE)

+    set (CONFIGURE_STEP_OPTION_ARGS ALLOW_FAIL)
+
+    cmake_parse_arguments (CONFIGURE_STEP
+                           "${CONFIGURE_STEP_OPTION_ARGS}"
+                           ""
+                           ""
+                           ${ARGN})
+
     set (TEST_FILE_PATH
          ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE})

@@ -176,6 +184,12 @@
         file (WRITE ${TEST_DIRECTORY_CONFIGURE_SCRIPT}
               ${TEST_DIRECTORY_CONFIGURE_SCRIPT_CONTENTS})

+        if (CONFIGURE_STEP_ALLOW_FAIL)
+
+            set (ALLOW_FAIL_OPTION ALLOW_FAIL)
+
+        endif (CONFIGURE_STEP_ALLOW_FAIL)
+
         string (REPLACE " " "\\ " GENERATOR ${CMAKE_GENERATOR})
         set (CONFIGURE_COMMAND
              ${CMAKE} ..
@@ -183,7 +197,8 @@
              -DCMAKE_VERBOSE_MAKEFILE=ON
              -G "${GENERATOR}")
         _add_driver_step (${DRIVER_SCRIPT} CONFIGURE
-                          COMMAND ${CONFIGURE_COMMAND})
+                          COMMAND ${CONFIGURE_COMMAND}
+                          ${ALLOW_FAIL_OPTION})

     else (EXISTS ${TEST_FILE_PATH})
@@ -213,10 +228,16 @@

     endif (BUILD_STEP_ALLOW_FAIL)

+    if (NOT BUILD_STEP_NO_CLEAN)
+
+        set (CLEAN_FIRST_OPTION --clean-first)
+
+    endif (NOT BUILD_STEP_NO_CLEAN)
+
     set (BUILD_COMMAND ${CMAKE}
                        --build
                        ${TEST_WORKING_DIRECTORY_NAME}
-                       --clean-first
+                       ${CLEAN_FIRST_OPTION}
                        --target
                        ${TARGET})
     _add_driver_step (${DRIVER_SCRIPT} BUILD
@@ -278,7 +299,10 @@
 # VERIFY to ensure that the project built correctly.
 function (add_cmake_build_test TEST_NAME VERIFY)

-    set (ADD_CMAKE_BUILD_TEST_OPTION_ARGS ALLOW_BUILD_FAIL)
+    set (ADD_CMAKE_BUILD_TEST_OPTION_ARGS
+         ALLOW_BUILD_FAIL
+         ALLOW_CONFIGURE_FAIL
+         NO_CLEAN)
     set (ADD_CMAKE_BUILD_TEST_SINGLEVAR_ARGS
          TARGET)
     set (ADD_CMAKE_BUILD_TEST_MULTIVAR_ARGS)
@@ -300,6 +324,18 @@
         set (ALLOW_BUILD_FAIL_OPTION ALLOW_FAIL)

     endif (ADD_CMAKE_BUILD_TEST_ALLOW_BUILD_FAIL)
+
+    if (ADD_CMAKE_BUILD_TEST_ALLOW_CONFIGURE_FAIL)
+
+        set (ALLOW_CONFIGURE_FAIL_OPTION ALLOW_FAIL)
+
+    endif (ADD_CMAKE_BUILD_TEST_ALLOW_CONFIGURE_FAIL)
+
+    if (ADD_CMAKE_BUILD_TEST_NO_CLEAN)
+
+        set (NO_CLEAN_OPTION NO_CLEAN)
+
+    endif (ADD_CMAKE_BUILD_TEST_NO_CLEAN)

     _define_variables_for_test (${TEST_NAME})
     _bootstrap_test_driver_script(${TEST_NAME}
@@ -310,11 +346,18 @@
                             ${TEST_INITIAL_CACHE_FILE}
                             ${TEST_DIRECTORY_NAME}
                             ${TEST_WORKING_DIRECTORY_NAME}
-                            ${TEST_FILE})
-    _append_build_step (${TEST_DRIVER_SCRIPT}
-                        ${TEST_WORKING_DIRECTORY_NAME}
-                        ${ADD_CMAKE_BUILD_TEST_TARGET}
-                        ${ALLOW_BUILD_FAIL_OPTION})
+                            ${TEST_FILE}
+                            ${ALLOW_CONFIGURE_FAIL_OPTION})
+
+    if (NOT ADD_CMAKE_BUILD_TEST_ALLOW_CONFIGURE_FAIL)
+
+        _append_build_step (${TEST_DRIVER_SCRIPT}
+                            ${TEST_WORKING_DIRECTORY_NAME}
+                            ${ADD_CMAKE_BUILD_TEST_TARGET}
+                            ${ALLOW_BUILD_FAIL_OPTION}
+                            ${NO_CLEAN_OPTION})
+
+    endif (NOT ADD_CMAKE_BUILD_TEST_ALLOW_CONFIGURE_FAIL)
     _append_verify_step (${TEST_DRIVER_SCRIPT}
                          ${TEST_INITIAL_CACHE_FILE}
                          ${VERIFY})


cmake: Try to fix compilation on FreeBSD.

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -167,6 +167,10 @@
     set(HAVE_APPLE 1)
 endif (OSX)

+if (BSD)
+    add_definitions(-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1)
+endif (BSD)
+
 # ENDIAN
 if (NOT WIN32)
     test_big_endian(WORDS_BIGENDIAN)


start disabling some testing.cmake

start disabling some testing.cmake

--- test/testing.cmake
+++ test/testing.cmake
@@ -65,28 +65,36 @@
   "${MDIR}/4/"
   "${MDIR}/vis")
 set(MDIR ${MESHES}/pipe)
-mpi_test(convert 1
-  ./convert
-  "${MDIR}/pipe.smd"
-  "${MDIR}/pipe.sms"
-  "pipe.smb")
+if(ENABLE_SIMMETRIX)
+  set(PIPE_MODEL "${MDIR}/pipe.smd")
+  mpi_test(convert 1
+    ./convert
+    "${MDIR}/pipe.smd"
+    "${MDIR}/pipe.sms"
+    "pipe.smb")
+else()
+  set(PIPE_MODEL "${MDIR}/pipe.dmg")
+  file(COPY "${MDIR}/pipe0.smb" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
+endif()
 mpi_test(verify_serial 1
   ./verify
-  "${MDIR}/pipe.smd"
+  "${PIPE_MODEL}"
   "pipe.smb")
 mpi_test(uniform_serial 1
   ./uniform
-  "${MDIR}/pipe.smd"
+  "${PIPE_MODEL}"
   "pipe.smb"
   "pipe_unif.smb")
-mpi_test(snap_serial 1
-  ./snap
-  "${MDIR}/pipe.smd"
-  "pipe_unif.smb"
-  "pipe.smb")
+if(ENABLE_SIMMETRIX)
+  mpi_test(snap_serial 1
+    ./snap
+    "${PIPE_MODEL}"
+    "pipe_unif.smb"
+    "pipe.smb")
+endif()
 mpi_test(ma_serial 1
   ./ma_test
-  "${MDIR}/pipe.smd"
+  "${PIPE_MODEL}"
   "pipe.smb")
 mpi_test(aniso_ma_serial 1
   ./aniso_ma_test
@@ -301,15 +309,17 @@
   "67k/")
 mpi_test(ma_insphere 1
   ./ma_insphere)
-set(MDIR ${MESHES}/curved)
-mpi_test(curvedSphere 1
-  ./curvetest
-  "${MDIR}/sphere1.xmt_txt"
-  "${MDIR}/sphere1_4.smb")
-mpi_test(curvedKova 1
-  ./curvetest
-  "${MDIR}/Kova.xmt_txt"
-  "${MDIR}/Kova.smb")
+if(ENABLE_SIMMETRIX)
+  set(MDIR ${MESHES}/curved)
+  mpi_test(curvedSphere 1
+    ./curvetest
+    "${MDIR}/sphere1.xmt_txt"
+    "${MDIR}/sphere1_4.smb")
+  mpi_test(curvedKova 1
+    ./curvetest
+    "${MDIR}/Kova.xmt_txt"
+    "${MDIR}/Kova.smb")
+endif()
 if (PCU_COMPRESS)
   set(MDIR ${MESHES}/phasta/1-1-Chef-Tet-Part/run_sim)
   mpi_test(chefStream 1 ${CMAKE_CURRENT_BINARY_DIR}/chefStream


cmake: bump min SDK version 0.10.1

cmake: bump min SDK version 0.10.1

This new SDK:
() Fixes an issue with i586 toolchain where no coverage data
   would be produced;
() Adds a new x86_64 toolchain for building x86_64
   targets, decoupling x86_64 builds from host toolchain;
() Includes MIPS toolchain;
() Reverts bossa to older version to fix flashing issues;
() Turns on multilib support for RISC-V; and,
() Updates OpenOCD for TI and some ARC fixes.

Signed-off-by: Daniel Leung <d94e04d205b5962d7873a139ef298b03c1717f72@intel.com>

--- cmake/toolchain/zephyr/host-tools.cmake
+++ cmake/toolchain/zephyr/host-tools.cmake
@@ -17,7 +17,7 @@
   return()
 endif()

-set(REQUIRED_SDK_VER 0.10.0)
+set(REQUIRED_SDK_VER 0.10.1)
 set(TOOLCHAIN_VENDOR zephyr)
 set(TOOLCHAIN_ARCH x86_64)


Print testing directory

Print testing directory

--- tests/common.cmake
+++ tests/common.cmake
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Ruslan Baratov
+# Copyright (c) 2013-2014, Ruslan Baratov
 # All rights reserved.

 cmake_minimum_required(VERSION 3.0)
@@ -9,3 +9,8 @@

 include("${HUNTER_ROOT}/cmake/Hunter")
 include(hunter_add_package)
+
+get_filename_component(test_name "${CMAKE_PARENT_LIST_FILE}" DIRECTORY)
+string(REPLACE "${HUNTER_ROOT}/" "" test_name "${test_name}")
+
+message("Testing: ${test_name}")


Fix test coverage problem by forcing to use gcov-4.8

--- src/CTestConfig.cmake
+++ src/CTestConfig.cmake
@@ -20,3 +20,4 @@
 set(CTEST_DROP_SITE_CDASH TRUE)

 set(UPDATE_COMMAND "git")
+set(COVERAGE_COMMAND "gcov-4.8")


Essais dart.

Essais dart.

--- DartConfig.cmake
+++ DartConfig.cmake
@@ -18,7 +18,7 @@
 SET (PROJECT_URL "http://smsc.cnes.fr/PLEIADES/")

 # Dart server configuration
-SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/OrfeotoolboxRollup.cgi)
+SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/OrfeotoolboxRollup.cgi")

 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/insight-rollup-dashboard.sh")
 #SET (ROLLUP_URL "http://${DROP_SITE}/cgi-bin/orfeotoolbox-rollup-dashboard.sh")


ENH: Update ctkMacroGenerateDGraphInput to present a thrid parameter 'with_option'

If with_option is TRUE, the file DGraphInput.txt will be generated, this later
one consider only the enabled dependencies.

If with_option is FALSE, the file DGraphInput-alldep.txt will be generated,
this later one include all dependencies (whatever is the value of the corresponding
option)

--- CMake/ctkMacroGenerateDGraphInput.cmake
+++ CMake/ctkMacroGenerateDGraphInput.cmake
@@ -1,8 +1,8 @@

 #
+# Generate a DGrapgh input file expected by DGraph executable.
 #
-#
-MACRO(ctkMacroGenerateDGraphInput dir name target_directories)
+MACRO(ctkMacroGenerateDGraphInput dir target_directories with_option)
   IF(NOT EXISTS ${dir})
     MESSAGE(FATAL_ERROR "Directory ${dir} doesn't exist!")
   ENDIF()
@@ -21,13 +21,17 @@
     LIST(GET target_info_list 1 option_name)
     #MESSAGE(STATUS target_dir:${target_dir})
     #MESSAGE(STATUS option_name:${option_name})
+    #MESSAGE(STATUS option_name-value:${${option_name}})

     # make sure the directory exists
     IF(NOT EXISTS ${target_dir}/CMakeLists.txt)
       MESSAGE(FATAL_ERROR "Target directory ${target_dir}/CMakeLists.txt doesn't exists !")
     ENDIF()

+    SET(include_dep 1)
+    IF(${with_option})
       SET(include_dep ${${option_name}})
+    ENDIF()
     IF(${include_dep})
       # extract project name from CMakeLists.txt
       FILE(STRINGS "${target_dir}/CMakeLists.txt" project_string
@@ -39,7 +43,7 @@
         MESSAGE(FATAL_ERROR "Failed to extract project name from ${target_dir}/CMakeLists.txt")
       ENDIF()
       #MESSAGE(STATUS target_project_name:${target_project_name})
-
+
       LIST(APPEND vertices ${target_project_name})

       # Make sure the variable is cleared
@@ -47,13 +51,13 @@

       # get dependencies
       ctkMacroCollectTargetLibraryNames(${target_dir} dependencies)
-
+
       # Make sure the variable is cleared
       SET(ctk_dependencies)

       # filter dependencies starting with CTK
       ctkMacroGetAllCTKTargetLibraries("${dependencies}" ctk_dependencies)
-
+
       # Generate XML related to the dependencies
       FOREACH(dependency_name ${ctk_dependencies})
         LIST(APPEND edges ${dependency_name})
@@ -68,9 +72,13 @@
   LIST(LENGTH edges numberOfEdges)

   SET(dgraph_list "${numberOfVertices} ${numberOfEdges}\n" ${dgraph_list})
-
-  SET(filename "${dir}/DGraphInput.txt")
+
+  IF(${with_option})
+    SET(filename "${dir}/DGraphInput.txt")
+  ELSE()
+    SET(filename "${dir}/DGraphInput-alldep.txt")
+  ENDIF()

   FILE(WRITE ${filename} ${dgraph_list})
   MESSAGE(STATUS "Generated: ${filename}")
-ENDMACRO()+ENDMACRO()


Update libc++ feature to indicate that it is not OS X only

--HG--
branch : v1-9

--- CMake/FeatureSummary.cmake
+++ CMake/FeatureSummary.cmake
@@ -124,7 +124,7 @@
 	set(_core "${_core}  + ZIP archives\n")
 endif ()
 if (OGRE_CONFIG_ENABLE_LIBCPP_SUPPORT)
-	set(_core "${_core}  + libc++ support for OS X\n")
+	set(_core "${_core}  + libc++ support\n")
 endif ()
 if (OGRE_CONFIG_ENABLE_VIEWPORT_ORIENTATIONMODE)
 	set(_core "${_core}  + Viewport orientation mode support\n")


From Michael Platings, fix for build with cmake 2.6.x

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -22,7 +22,9 @@

 IF(APPLE)
     # do nothing
-ELSEIF(CMAKE_CL_64 OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8))
+ELSEIF(CMAKE_CL_64)
+    SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
+ELSEIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8)
     SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
 ELSE()
     SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)


don't emit scary message if fox toolkit was not found

git-svn-id: a0a066a1d7ce87c7a04dae20f169ad0cd8bda35d@1336 04231f92-3938-0410-9931-e931ac552b4f

--- CMakeModules/FindFOX.cmake
+++ CMakeModules/FindFOX.cmake
@@ -19,12 +19,6 @@
   SET(FOX_FOUND 1 CACHE STRING "Set to 1 if fox-1.6 is found, 0 otherwise")
 ELSE(FOX_INCLUDE_DIR AND FOX_LIBRARIES)
   SET(FOX_FOUND 0 CACHE STRING "Set to 1 if fox-1.6 is found, 0 otherwise")
-  IF(NOT FOX_INCLUDE_DIR)
-    MESSAGE("ERROR: Couldn't find fox-1.6 include directory")
-  ENDIF(NOT FOX_INCLUDE_DIR)
-  IF(NOT FOX_LIBRARIES)
-    MESSAGE("ERROR: Couldn't find fox-1.6 library directory")
-  ENDIF(NOT FOX_LIBRARIES)
 ENDIF(FOX_INCLUDE_DIR AND FOX_LIBRARIES)

 MARK_AS_ADVANCED(FOX_FOUND)


disable format build target if MSVC

disable format build target if MSVC

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -830,7 +830,8 @@
       list(APPEND masterSrcList ${CMAKE_BINARY_DIR}/notincmake.txt)
     endif()
     ####
-    if(fmtFiles AND NOT ${CMAKE_PROJECT_NAME} STREQUAL externpro)
+    # Windows can't handle passing very many files to clang-format
+    if(NOT MSVC AND fmtFiles AND NOT ${CMAKE_PROJECT_NAME} STREQUAL externpro)
       # make paths relative to CMAKE_SOURCE_DIR
       xpListRemoveFromAll(fmtFiles ${CMAKE_SOURCE_DIR} . ${fmtFiles})
       list(LENGTH fmtFiles lenFmtFiles)


Some changes on the final output

Some changes on the final output

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

--- deal.II/contrib/cmake/setup_finalize.cmake
+++ deal.II/contrib/cmake/setup_finalize.cmake
@@ -15,11 +15,13 @@
 #
 # And print out a nice configuration summary:
 #
+
+
 MESSAGE("

-   *                                    *
-   *  deal.II successfully configured!  *
-   *                                    *
+*     *                                    *     *
+*     *  deal.II successfully configured!  *     *
+*     *                                    *     *

       CMAKE_BUILD_TYPE:     ${CMAKE_BUILD_TYPE}
@@ -27,36 +29,22 @@
       CMAKE_SOURCE_DIR:     ${CMAKE_SOURCE_DIR}
       CMAKE_BINARY_DIR:     ${CMAKE_BINARY_DIR}

-      CMAKE_CXX_COMPILER:   ${CMAKE_CXX_COMPILER_ID} "
-"${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME}
+      CMAKE_CXX_COMPILER:   ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} on platform ${CMAKE_SYSTEM_NAME}

-General compiler flags (used by all build targets):
+Compiler flags used for this build:
+      CMAKE_CXX_FLAGS:           ${CMAKE_CXX_FLAGS}")
+IF(CMAKE_BUILD_TYPE MATCHES "Release")
+  MESSAGE("      CMAKE_CXX_FLAGS_RELEASE:   ${CMAKE_CXX_FLAGS_RELEASE}")
+ENDIF()
+IF(CMAKE_BUILD_TYPE MATCHES "Debug")
+  MESSAGE("      CMAKE_CXX_FLAGS_DEBUG:     ${CMAKE_CXX_FLAGS_DEBUG}")
+ENDIF()
+MESSAGE("      CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}")

-      CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}
-")
-
-IF(CMAKE_BUILD_TYPE MATCHES "Release")
-  MESSAGE("Additional compiler flags used for the Release target:
-
-      CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}
-")
-ENDIF()
-
-IF(CMAKE_BUILD_TYPE MATCHES "Debug")
-  MESSAGE("Additional compiler flags used for the Debug target:
-
-      CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}
-")
-ENDIF()
-
-MESSAGE("Configured linker flags:
-
-      CMAKE_SHARED_LINKER_FLAGS: ${CMAKE_SHARED_LINKER_FLAGS}
-")

 IF(FEATURE_UMFPACK_CONTRIB_CONFIGURED)
-  MESSAGE("The contrib UMFPACK library will be compiled with the following C compiler:
-
+  MESSAGE("
+The contrib UMFPACK library will be compiled with the following C compiler:
       CMAKE_C_COMPILER:       ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}
       CMAKE_C_FLAGS:         ${CMAKE_C_FLAGS}")
   IF(CMAKE_BUILD_TYPE MATCHES "Release")
@@ -65,21 +53,19 @@
   IF(CMAKE_BUILD_TYPE MATCHES "Debug")
     MESSAGE("      CMAKE_C_FLAGS_DEBUG:   ${CMAKE_C_FLAGS_DEBUG}")
   ENDIF()
-  MESSAGE("
-  ")
 ENDIF()

+
 IF(NOT DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS)
-  MESSAGE("WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n\n")
+  MESSAGE("\n
+WARNING: DEAL_II_SETUP_DEFAULT_COMPILER_FLAGS is set to OFF\n")
 ENDIF()

+
 MESSAGE("
-Configured Features (DEAL_II_FEATURE_AUTODETECTION = ${DEAL_II_FEATURE_AUTODETECTION}):
-")
-
+Configured Features (DEAL_II_FEATURE_AUTODETECTION = ${DEAL_II_FEATURE_AUTODETECTION}):")
 GET_CMAKE_PROPERTY(res VARIABLES)
 FOREACH(var ${res})
-
   IF(var MATCHES "DEAL_II_WITH")
     IF(${${var}})
       # FEATURE is enabled
@@ -97,12 +83,11 @@
       MESSAGE("    ( ${var} = ${${var}} )")
     ENDIF()
   ENDIF()
+ENDFOREACH()

-ENDFOREACH()
+
 MESSAGE("
-Further configuration:
-")
-
+Further configuration:")
 FOREACH(var ${res})
   IF(var MATCHES "DEAL_II_INSTALL")
     IF(${${var}})
@@ -113,6 +98,5 @@
   ENDIF()
 ENDFOREACH()

-MESSAGE("

-")
+MESSAGE("\n")


CMake: have a fallback for the 'nice' version string

In case no such string has been forced by the user and we are not precisely on
a tag, have a sensible fallback (e.g. the complete 'git describe' result).

Signed-off-by: David Wagner <60228a510f9a76940848fa2d29321fc4edfc2119@intel.com>

--- SetVersion.cmake
+++ SetVersion.cmake
@@ -74,6 +74,11 @@

 # If we are precisely on a tag, make a nicer version string (unless otherwise
 # forced by the user - see above)
-if((NOT DEFINED NICE_PF_VERSION) AND (PF_VERSION_TWEAK EQUAL 0) AND (NOT PF_VERSION_DIRTY))
-    set(NICE_PF_VERSION "v${PF_VERSION_MAJOR}.${PF_VERSION_MINOR}.${PF_VERSION_PATCH}")
+if((NOT DEFINED NICE_PF_VERSION))
+    if((PF_VERSION_TWEAK EQUAL 0) AND (NOT PF_VERSION_DIRTY))
+        set(NICE_PF_VERSION "v${PF_VERSION_MAJOR}.${PF_VERSION_MINOR}.${PF_VERSION_PATCH}")
+    else()
+        # Fallback
+        set(NICE_PF_VERSION "${PF_VERSION}")
+    endif()
 endif()


Locates the sources directory of the SIRF correctly

--- SuperBuild.cmake
+++ SuperBuild.cmake
@@ -89,7 +89,7 @@
 #set(proj ${PRIMARY_PROJECT_NAME})

 # Make environment files
-set(SIRF_SRC_PATH ${CMAKE_CURRENT_LIST_DIR}/SIRF)
+set(SIRF_SRC_PATH ${SOURCE_DOWNLOAD_CACHE}/SIRF)
 set(CCPPETMR_INSTALL ${SUPERBUILD_INSTALL_DIR})
 configure_file(env_ccppetmr.sh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.sh)
 configure_file(env_ccppetmr.csh.in ${CCPPETMR_INSTALL}/bin/env_ccppetmr.csh)


enable --exclude-libs on all UNIX except Mac OS X

--- cmake/LLVM.cmake
+++ cmake/LLVM.cmake
@@ -219,7 +219,7 @@
 foreach(LIBNAME ${CLANG_LIBNAMES})
   find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")
   list(APPEND CLANG_LIBFILES "${C_LIBFILE_${LIBNAME}}")
-  if(CMAKE_SYSTEM_NAME MATCHES "Linux")
+  if(UNIX AND (NOT APPLE))
     set(LLVM_LDFLAGS "${LLVM_LDFLAGS} -Wl,--exclude-libs,lib${LIBNAME}")
   endif()
 endforeach()


Change string prefix

Change string prefix

--- cmake/Suil.cmake
+++ cmake/Suil.cmake
@@ -129,9 +129,10 @@

     # get application version
     set(${name}_VERSION ${SUIL_APP_VERSION})
-    if (NOT ${name}_VERSION)
+    if (NOT SUIL_APP_VERSION)
         set(${name}_VERSION "0.0.0")
     endif()
+    message(STATUS "version configured to: ${${name}_VERSION}")

     if (SUIL_APP_LIBRARY)
         message(STATUS "configuring target ${name} as a ${SUIL_APP_LIBRARY} library")


added debugging symbols to ispc. fixes #14

--- cmake/ispc.cmake
+++ cmake/ispc.cmake
@@ -85,6 +85,13 @@
     SET(CMAKE_ISPC_FLAGS --target=${CMAKE_ISPC_TARGET} --addressing=32)
 #    SET(CMAKE_ISPC_FLAGS --target=${CMAKE_ISPC_TARGET} --addressing=32 --cpu=${OSPRAY_ISPC_CPU})
   ENDIF()
+
+	IF (${CMAKE_BUILD_TYPE} STREQUAL "Release")
+    SET(CMAKE_ISPC_OPT_FLAGS -O3)
+	ELSE()
+    SET(CMAKE_ISPC_OPT_FLAGS -O2 -g)
+	ENDIF()
+

   SET(ISPC_OBJECTS "")
   FOREACH(src ${ARGN})
@@ -155,7 +162,7 @@
       ${ISPC_DEFINES}
       --arch=${ISPC_ARCHITECTURE}
       --pic
-      -O3
+      ${CMAKE_ISPC_OPT_FLAGS}
       --woff
       ${CMAKE_ISPC_FLAGS}
       --opt=fast-math


CMake util: fix copyright

CMake util: fix copyright

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -1,3 +1,4 @@
+# Copyright (c) 2020 ARM Limited. All rights reserved.
 # SPDX-License-Identifier: Apache-2.0

 # PREFIX - TARGET or similar (can be empty string)


zlib 1.2.8 -> 1.2.9 (#121)

zlib 1.2.8 -> 1.2.9 (#121)

--- cmake/zlib.cmake
+++ cmake/zlib.cmake
@@ -10,8 +10,8 @@
   set(zlib_source  "${CMAKE_CURRENT_BINARY_DIR}/zlib-src")
   set(zlib_build   "${CMAKE_CURRENT_BINARY_DIR}/zlib")
   set(zlib_install "${CMAKE_CURRENT_BINARY_DIR}/prefix")
-  set(zlib_file "http://zlib.net/zlib128.zip")
-  set(zlib_md5 "126f8676442ffbd97884eb4d6f32afb4")
+  set(zlib_file "http://zlib.net/zlib129.zip")
+  set(zlib_md5 "9553a573137c2225c6c57b2aa2124c0f")

   if(CMAKE_CFG_INTDIR STREQUAL ".")
     set(zlib_build_type ${CMAKE_BUILD_TYPE})


Fix mistake.

Fix mistake.

--- cmake/FindIconv.cmake
+++ cmake/FindIconv.cmake
@@ -89,7 +89,7 @@
     set(ICONV_LIBRARIES ${ICONV_LIBRARY})
 endif()

-if(NOT ICONV_LIBRARY AND NOT TARGET ICONV::ICONV)
+if(ICONV_LIBRARY AND NOT TARGET ICONV::ICONV)
     add_library(ICONV::ICONV UNKNOWN IMPORTED)
     set_target_properties(ICONV::ICONV PROPERTIES
         INTERFACE_INCLUDE_DIRECTORIES "${ICONV_INCLUDE_DIRS}"


cmake: properly remove -DNDEBUG aside -DNDEBUG=1, too.

--- cmake/FindMYSQL.cmake
+++ cmake/FindMYSQL.cmake
@@ -7,7 +7,7 @@
 find_program(MYSQL_CONFIG_EXECUTABLE NAMES mysql_config DOC "path to mysql_config executable")

 execute_process(
-	COMMAND sh -c "${MYSQL_CONFIG_EXECUTABLE} --cflags | sed s/-DNDEBUG=1//g"
+	COMMAND sh -c "${MYSQL_CONFIG_EXECUTABLE} --cflags | sed -e 's/-DNDEBUG\\(=1\\)\\?//g'"
 	OUTPUT_VARIABLE MYSQL_CFLAGS
 	OUTPUT_STRIP_TRAILING_WHITESPACE
 )


Find install_manifest.txt for uninstall target (#2752)

--- cmake/Uninstall.cmake
+++ cmake/Uninstall.cmake
@@ -1,9 +1,14 @@
 # uninstall
-if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
-  message(FATAL_ERROR "Cannot find install manifest: ${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
-endif(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt")
+find_file (
+  INSTALL_MANIFEST_LOCATION "install_manifest.txt"
+  PATHS "${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_BINARY_DIR}/.."
+)

-file(READ "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt" files)
+if(NOT INSTALL_MANIFEST_LOCATION)
+  message(FATAL_ERROR "Cannot find install_manifest.txt")
+endif(NOT INSTALL_MANIFEST_LOCATION)
+
+file(READ "${INSTALL_MANIFEST_LOCATION}" files)
 string(REGEX REPLACE "\n" ";" files "${files}")
 foreach(file ${files})
   message(STATUS "Uninstalling $ENV{DESTDIR}${file}")


UseCython.cmake: Compile with --gdb flag automatically.

Pass --gdb to cython when CMAKE_BUILD_TYPE is Debug or RelWithDebInfo.

--- cmake/UseCython.cmake
+++ cmake/UseCython.cmake
@@ -184,14 +184,15 @@
   # Set additional flags.
   if( CYTHON_ANNOTATE )
     set( annotate_arg "--annotate" )
-  else()
-    set( annotate_arg "" )
   endif()

   if( CYTHON_NO_DOCSTRINGS )
     set( no_docstrings_arg "--no-docstrings" )
-  else()
-    set( no_docstrings_arg "" )
+  endif()
+
+  if( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR
+        "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo" )
+      set( cython_debug_arg "--gdb" )
   endif()

   # Include directory arguments.
@@ -213,7 +214,7 @@
   add_custom_command( OUTPUT ${_generated_file}
     COMMAND ${CYTHON_EXECUTABLE}
     ARGS ${cxx_arg} ${include_directory_arg}
-    ${annotate_arg} ${no_docstrings_arg} ${CYTHON_FLAGS}
+    ${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg} ${CYTHON_FLAGS}
     --output-file  ${_generated_file} ${pyx_locations}
     DEPENDS ${pyx_locations} ${pxd_dependencies}
     IMPLICIT_DEPENDS ${pyx_lang} ${c_header_dependencies}


[axl_cmake] display help on which entries to add to paths.cmake (filter AXL_PATH_LIST to extract relevant entries); axl_find_executable on windows showed some error messages in CMake log (should not happen, redirect error to NUL)

--- cmake/axl_utils.cmake
+++ cmake/axl_utils.cmake
@@ -85,7 +85,7 @@
 	unset (_FILTERED_LIST)

 	foreach (_ITEM ${_LIST})
-		string (REGEX MATCH "${_FILTER}$" _MATCH "${_ITEM}")
+		string (REGEX MATCH "${_FILTER}" _MATCH "${_ITEM}")
 		if (_MATCH)
 			list (APPEND _FILTERED_LIST ${_ITEM})
 		endif ()
@@ -852,6 +852,7 @@
 	if (WIN32)
 		execute_process (
 			COMMAND where ${_FILE_NAME}
+			ERROR_FILE "NUL"
 			OUTPUT_VARIABLE _OUTPUT
 			)

@@ -1107,10 +1108,17 @@

 		string (TOUPPER ${_IMPORT} _IMPORT_UC)
 		if (NOT ${_IMPORT_UC}_FOUND AND NOT _IS_OPTIONAL)
-			message (FATAL_ERROR "${_IMPORT} is required but not found, check paths.cmake")
+			string (TOUPPER ${_IMPORT} _FILTER)
+			axl_filter_list (_FILTERED_PATH_LIST ${_FILTER} ${AXL_PATH_LIST})
+
+			if (NOT _FILTERED_PATH_LIST)
+				message (FATAL_ERROR "${_IMPORT} is required but not found (use paths.cmake)")
+			else ()
+				message (FATAL_ERROR "${_IMPORT} is required but not found (adjust ${_FILTERED_PATH_LIST} in paths.cmake)")
+			endif ()
 		endif ()
 	elseif (NOT _IS_OPTIONAL)
-		message (FATAL_ERROR "import_${_IMPORT}.cmake not found (use AXL_IMPORT_DIR_LIST in dependencies.cmake)")
+		message (FATAL_ERROR "import_${_IMPORT}.cmake not found (adjust AXL_IMPORT_DIR_LIST in dependencies.cmake)")
 	endif ()
 endmacro ()


attempt #2 at fixing CMake builds

attempt #2 at fixing CMake builds

--- cmake/benchmark.cmake
+++ cmake/benchmark.cmake
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.

-set(BENCHMARK_ENABLE_GTEST_TESTS OFF)
+set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "Turn off gTest in gBenchmark")

 if("${gRPC_BENCHMARK_PROVIDER}" STREQUAL "module")
   if(NOT BENCHMARK_ROOT_DIR)


Revert "[ASan] Enable on SystemZ."

Revert "[ASan] Enable on SystemZ."

This reverts commit r287764.

Two tests broke on the clang-s390x-linux buildbot:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/1293.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -148,7 +148,7 @@
 set(ALL_SANITIZER_COMMON_SUPPORTED_ARCH ${X86} ${X86_64} ${PPC64}
     ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
 set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
-    ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
+    ${MIPS32} ${MIPS64} ${PPC64})
 set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
 set(ALL_LSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
 set(ALL_MSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64} ${PPC64})


more robust cmake configuration

more robust cmake configuration

--- cmake/configure.cmake
+++ cmake/configure.cmake
@@ -35,6 +35,7 @@
 endif()
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wsign-promo")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wsign-conversion")
+        set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fno-common")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
         set(CMAKE_CXX_FLAGS                     "${CMAKE_CXX_FLAGS} -DEIGEN_MPL2_ONLY -DEIGEN_DONT_PARALLELIZE -DEIGEN_DEFAULT_TO_ROW_MAJOR")


fixed compiler_setup on windows

fixed compiler_setup on windows

--- misc/CMake/compiler/compiler_setup.cmake
+++ misc/CMake/compiler/compiler_setup.cmake
@@ -4,13 +4,13 @@
 # This approach to managing compiler settings was adopted from interactions
 # between Jeff Amstutz and Intel Corporation.

-if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
   include(gcc)
-elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel")
+elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
   include(icc)
-elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
+elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   include(clang)
-elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC")
+elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
 message(STATUS ">${CMAKE_CXX_COMPILER_ID}<")
   include(msvc)
   if(NOT DEFINED QTVERSION_DIR)


Escape quotes in defs for dict generation command

--- cmake/CMakeALICE.cmake
+++ cmake/CMakeALICE.cmake
@@ -36,7 +36,8 @@
     # Get the list of definitions from the directory to be sent to CINT
     get_directory_property(tmpdirdefs COMPILE_DEFINITIONS)
     foreach(dirdef ${tmpdirdefs})
-        set(GLOBALDEFINITIONS -D${dirdef} ${GLOBALDEFINITIONS})
+        string(REPLACE "\"" "\\\"" dirdef_esc ${dirdef})
+        set(GLOBALDEFINITIONS -D${dirdef_esc} ${GLOBALDEFINITIONS})
     endforeach()

     # Custom definitions specific to library


cmake: set a distinct output folder for MSVC implib

--- cmake/DPF-plugin.cmake
+++ cmake/DPF-plugin.cmake
@@ -209,6 +209,7 @@
   target_link_libraries("${NAME}-ladspa" PRIVATE "${NAME}-dsp")
   set_target_properties("${NAME}-ladspa" PROPERTIES
     LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
+    ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/ladspa/$<0:>"
     OUTPUT_NAME "${NAME}-ladspa"
     PREFIX "")
 endfunction()
@@ -236,6 +237,7 @@
   target_link_libraries("${NAME}-dssi" PRIVATE "${NAME}-dsp")
   set_target_properties("${NAME}-dssi" PROPERTIES
     LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
+    ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/dssi/$<0:>"
     OUTPUT_NAME "${NAME}-dssi"
     PREFIX "")

@@ -265,6 +267,7 @@
   target_link_libraries("${NAME}-lv2" PRIVATE "${NAME}-dsp")
   set_target_properties("${NAME}-lv2" PROPERTIES
     LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
+    ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/lv2/$<0:>"
     OUTPUT_NAME "${NAME}_dsp"
     PREFIX "")

@@ -280,6 +283,7 @@
       target_link_libraries("${NAME}-lv2-ui" PRIVATE "${NAME}-ui")
       set_target_properties("${NAME}-lv2-ui" PROPERTIES
         LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/${NAME}.lv2/$<0:>"
+        ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/lv2/$<0:>"
         OUTPUT_NAME "${NAME}_ui"
         PREFIX "")
     endif()
@@ -310,6 +314,7 @@
   target_link_libraries("${NAME}-vst2" PRIVATE "${NAME}-dsp" "${NAME}-ui")
   set_target_properties("${NAME}-vst2" PROPERTIES
     LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/$<0:>"
+    ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/obj/vst2/$<0:>"
     OUTPUT_NAME "${NAME}-vst2"
     PREFIX "")
 endfunction()


FindOpenCL.cmake cleanup

FindOpenCL.cmake cleanup

Cleaned comments, added more standard paths for CUDA.

--- cmake/FindOpenCL.cmake
+++ cmake/FindOpenCL.cmake
@@ -1,17 +1,15 @@
 # - Try to find OpenCL
 # This module tries to find an OpenCL implementation on your system. It supports
-# AMD / ATI, Apple and NVIDIA implementations, but should work, too.
+# AMD / ATI, Apple and NVIDIA implementations.
 #
-# To set manually the paths, define these environment variables:
+# To set the paths manually, define these environment variables:
 # OpenCL_INCPATH    - Include path (e.g. OpenCL_INCPATH=/opt/cuda/4.0/cuda/include)
 # OpenCL_LIBPATH    - Library path (e.h. OpenCL_LIBPATH=/usr/lib64/nvidia)
 #
 # Once done this will define
-#  OPENCL_FOUND        - system has OpenCL
+#  OPENCL_FOUND         - system has OpenCL
 #  OPENCL_INCLUDE_DIRS  - the OpenCL include directory
-#  OPENCL_LIBRARIES    - link these to use OpenCL
-#
-# WIN32 should work, but is untested
+#  OPENCL_LIBRARIES     - link these to use OpenCL

 FIND_PACKAGE(PackageHandleStandardArgs)

@@ -61,8 +59,8 @@
 	# The AMD SDK currently does not place its headers
 	# in /usr/include, therefore also search relative
 	# to the library
-	FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include" "/opt/AMDAPP/include" ENV OpenCL_INCPATH)
-	FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include" "/opt/AMDAPP/include" ENV OpenCL_INCPATH)
+	FIND_PATH(OPENCL_INCLUDE_DIRS CL/cl.h PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include" "/opt/cuda/include" "/opt/AMDAPP/include" ENV OpenCL_INCPATH)
+	FIND_PATH(_OPENCL_CPP_INCLUDE_DIRS CL/cl.hpp PATHS ${_OPENCL_INC_CAND} "/usr/local/cuda/include" "/opt/cuda/include" "/opt/AMDAPP/include" ENV OpenCL_INCPATH)

     ENDIF (WIN32)

@@ -77,7 +75,5 @@
     LIST( REMOVE_DUPLICATES OPENCL_INCLUDE_DIRS )
 ENDIF(_OPENCL_CPP_INCLUDE_DIRS)

-MARK_AS_ADVANCED(
-    OPENCL_INCLUDE_DIRS
-    )
+MARK_AS_ADVANCED( OPENCL_INCLUDE_DIRS )


changed required PCL version to less restrictive 1.7. Otherwise, there is a conflict on Jenkins because it only provides package for 1.7.1

--- cmake/V4RFindPCL.cmake
+++ cmake/V4RFindPCL.cmake
@@ -1,2 +1,2 @@
-find_package(PCL 1.7.2 REQUIRED)
+find_package(PCL 1.7 REQUIRED)
 v4r_include_directories(${PCL_INCLUDE_DIRS})


Add file boilerplate

Add file boilerplate

[ci skip]

--- cmake/cline_tool.cmake
+++ cmake/cline_tool.cmake
@@ -1,3 +1,18 @@
+#
+# Copyright 2018 Jeff Bush
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#

 macro(add_command_line_tool name)
     set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-O3")


cmake: do not error on missing 'config'

cmake: do not error on missing 'config'

'conf' is part of the zephyr SDK or need to be built and installed in
the path. We now using python for Kconfig processing, so this is not a
strict requirement and we should be able to build without it. If the
binary is not found, just go on with our business.

Signed-off-by: Anas Nashif <0d9952ec84ac43c159f6b7e7ed99a9080c00dd6e@intel.com>

--- cmake/host-tools.cmake
+++ cmake/host-tools.cmake
@@ -17,9 +17,6 @@
     KCONFIG_CONF
     conf
     )
-  if(${KCONFIG_CONF} STREQUAL KCONFIG_CONF-NOTFOUND)
-    message(FATAL_ERROR "Unable to find the Kconfig program 'conf'")
-  endif()
 endif()

 find_program(


COMP: Update KWStyle to fix compile warnings on Ubuntu 20.04

KWStyle/kwsCheckLineLength.cxx:83:27: warning: '%ld' directive writing between 1 and 20 bytes into a region of size 10 [-Wformat-overflow=]

--- Utilities/KWStyle/BuildKWStyle.cmake
+++ Utilities/KWStyle/BuildKWStyle.cmake
@@ -23,7 +23,7 @@
 if(NOT TARGET KWStyle)
 ExternalProject_add(KWStyle
   GIT_REPOSITORY "${git_protocol}://github.com/Kitware/KWStyle.git"
-  GIT_TAG d4df63060dfa5aa750cc35023a73c25ef1162069
+  GIT_TAG 39aaf6cc9d56ae1cbf28f098ade3df1f58131c01
   UPDATE_COMMAND ""
   DOWNLOAD_DIR ${KWStyle_SOURCE_DIR}
   SOURCE_DIR ${KWStyle_SOURCE_DIR}


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

--- Utilities/kwsys/kwsysDateStamp.cmake
+++ Utilities/kwsys/kwsysDateStamp.cmake
@@ -12,10 +12,10 @@
 #=============================================================================

 # KWSys version date year component.  Format is CCYY.
-SET(KWSYS_DATE_STAMP_YEAR  2009)
+SET(KWSYS_DATE_STAMP_YEAR  2010)

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Untested copyscript fix

Untested copyscript fix

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

--- copyScript.cmake
+++ copyScript.cmake
@@ -84,8 +84,8 @@
   endif(COPY_TARGET_RELEASE_TYPE MATCHES "RelWithDebInfo")

     file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/copyScript.bat
-        "xcopy /s /y \"${WIN_SOURCE_DIR}\\libs\\server\\\"*.h \"${COPY_TARGET}\\include\\eq\\server\"\n"
-        "xcopy /s /y \"${WIN_SOURCE_DIR}\\libs\\server\\equalizers\\\"*.h \"${COPY_TARGET}\\include\\eq\\server\\equalizers\"\n"
+        "xcopy /s /y \"${WIN_SOURCE_DIR}\\libs\\eq\\server\\\"*.h \"${COPY_TARGET}\\include\\eq\\server\"\n"
+        "xcopy /s /y \"${WIN_SOURCE_DIR}\\libs\\eq\\server\\equalizers\\\"*.h \"${COPY_TARGET}\\include\\eq\\server\\equalizers\"\n"

         "\"%ProgramFiles(x86)%\\Git\\bin\\git.exe\" --no-pager log --max-count=1 \"${WIN_SOURCE_DIR}\" > \"${COPY_TARGET}\\include\\eq\\Version.txt\"\n"
         "pause\n"


MAJ itkIncludeDirectories.cmake. Ajout chemin ITK_SOURCE_DIR dans les includes.

--- Utilities/ITK/itkIncludeDirectories.cmake
+++ Utilities/ITK/itkIncludeDirectories.cmake
@@ -40,6 +40,8 @@
   ${ITK_BINARY_DIR}/Utilities/gdcm
   ${ITK_BINARY_DIR}/Utilities
   ${ITK_SOURCE_DIR}/Utilities
+#THOMAS
+  ${ITK_SOURCE_DIR}
 )

 IF(USE_LOG4CXX)


pw_build: Check the library type in pw_add_library CMake function

This is helpful in case the user forgets to specify the library type,
since it is not required for the built-in add_library function.

Change-Id: I9932bcfb63431fccf68766ce2d292413ba03bfac
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/112213
Reviewed-by: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Commit-Queue: Auto-Submit <14637eda5603879df170705285bf30f5996692f0@pigweed.google.com.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>

--- pw_build/pigweed.cmake
+++ pw_build/pigweed.cmake
@@ -287,6 +287,12 @@
 #   PUBLIC_LINK_OPTIONS - public target_link_options arguments
 #   PRIVATE_LINK_OPTIONS - private target_link_options arguments
 function(pw_add_library NAME TYPE)
+  set(supported_library_types INTERFACE OBJECT STATIC SHARED MODULE)
+  if(NOT "${TYPE}" IN_LIST supported_library_types)
+    message(FATAL_ERROR "\"${TYPE}\" is not a valid library type for ${NAME}. "
+          "Must be INTERFACE, OBJECT, STATIC, SHARED, or MODULE.")
+  endif()
+
   set(num_positional_args 2)
   set(option_args)
   set(one_value_args)


New version: 0.2.12

New version: 0.2.12

--- VERSION.cmake
+++ VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "2")
-SET(HAWKEY_PATCH "11")
+SET(HAWKEY_PATCH "12")


SVN_SILENT made messages (.desktop file) - always resolve ours

In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"

--- plasma-runner-ktp-contact.desktop.cmake
+++ plasma-runner-ktp-contact.desktop.cmake
@@ -42,6 +42,7 @@
 Name[tr]=Anında Mesajlaşma
 Name[ug]=مۇڭداشقۇ
 Name[uk]=Миттєвий обмін повідомленнями
+Name[x-test]=xxInstant Messagingxx
 Name[zh_CN]=即时通讯
 Name[zh_TW]=即時訊息
 Comment=Start a chat with any of your IM contacts or change your IM status
@@ -85,6 +86,7 @@
 Comment[sv]=Börja chatta med någon direktmeddelandekontakt eller ändra din direktmeddelandestatus
 Comment[tr]=IM kişilerinizden biriyle sohbete başlayın veya IM durumunuzu değiştirin
 Comment[uk]=Почати спілкування з будь-яким з ваших контактів або змінити ваш запис стану у системах обміну повідомленнями
+Comment[x-test]=xxStart a chat with any of your IM contacts or change your IM statusxx
 Comment[zh_CN]=与任意您的即时通讯联系人开始聊天或修改您的状态
 Comment[zh_TW]=與您的即時訊息聯絡人開始聊天，或是變更您的即時訊息狀態
 Icon=user-online


Minor change

Minor change

--- adm_local/cmake_files/FindSalomeTBB.cmake
+++ adm_local/cmake_files/FindSalomeTBB.cmake
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #

-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(TBB TBB_INCLUDE_DIRS 2)
+SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(TBB TBB_INCLUDE_DIRS 1)
 MARK_AS_ADVANCED(TBB_INCLUDE_DIRS TBB_LIBRARIES)

 IF(TBB_FOUND)


Add option for thrift include path to thrift_* CMake macros (#329)

Summary:
To enable the inclusion of thrift files that reside in other directories
we need a way to pass the include paths.

Implemented as an optional argument, allowing compatibility with
existing users of the macro and extensibility for more parameters in the
future.
Pull Request resolved: https://github.com/facebook/fbthrift/pull/329

Reviewed By: vitaut

Differential Revision: D14404924

Pulled By: calebmarchent

fbshipit-source-id: ca2708db94ee82686b8eb2086f9ad33778bd741e

--- ThriftLibrary.cmake
+++ ThriftLibrary.cmake
@@ -49,6 +49,7 @@
   "${file_path}"
   "${output_path}"
   "${include_prefix}"
+  "${ARGN}"
 )
 bypass_source_check(${${file_name}-${language}-SOURCES})
 add_library(
@@ -107,6 +108,7 @@
   "${file_path}"
   "${output_path}"
   "${include_prefix}"
+  "${ARGN}"
 )
 add_library(
   "${file_name}-${language}"
@@ -157,6 +159,18 @@
 #

 macro(thrift_generate file_name services language options file_path output_path include_prefix)
+
+cmake_parse_arguments(THRIFT_GENERATE   # Prefix
+  "" # Options
+  "" # One Value args
+  "THRIFT_INCLUDE_DIRECTORIES" # Multi-value args
+  "${ARGN}")
+
+set(thrift_include_directories)
+foreach(dir ${THRIFT_GENERATE_THRIFT_INCLUDE_DIRECTORIES})
+  list(APPEND thrift_include_directories "-I" "${dir}")
+endforeach()
+
 set("${file_name}-${language}-HEADERS"
   ${output_path}/gen-${language}/${file_name}_constants.h
   ${output_path}/gen-${language}/${file_name}_data.h
@@ -202,6 +216,7 @@
   COMMAND ${THRIFT1}
     --gen "${gen_language}:${options}${include_prefix_text}"
     -o ${output_path}
+    ${thrift_include_directories}
     --templates ${THRIFT_TEMPLATES}
     "${file_path}/${file_name}.thrift"
   DEPENDS ${THRIFT1}


cmake: jailhouse: fix arguments passed to QEMU on make run target

"-serial mon:stdio" was already injected elsewhere, so remove
duplication. That argument, when coming from the common infrastructure,
also comes as one of the last ones. Because of that, the former "-serial
vc" was taking precedence and we were never seeing output on stdio.
Removing the virtual console altogether, for now, fixes that.

Finally, since cmake came in, we have to fix the path for the fsdev
argument to QEMU as well.

Signed-off-by: Gustavo Lima Chaves <dc5f5719afbf9af3fe162a3ac398146b4d0a4afe@intel.com>

--- boards/x86/x86_jailhouse/board.cmake
+++ boards/x86/x86_jailhouse/board.cmake
@@ -15,12 +15,11 @@
   -cpu ${QEMU_CPU_TYPE_${ARCH}}
   -drive file=${JAILHOUSE_QEMU_IMG_FILE},format=qcow2,id=disk,if=none
   -device ide-hd,drive=disk
-  -serial mon:stdio
-  -serial vc -netdev user,id=net
+  -netdev user,id=net
   -device e1000e,addr=2.0,netdev=net
   -device intel-hda,addr=1b.0
   -device hda-duplex
-  -fsdev local,path=./,security_model=passthrough,id=vfs
+  -fsdev local,path=./zephyr,security_model=passthrough,id=vfs
   -device virtio-9p-pci,addr=1f.7,mount_tag=host,fsdev=vfs
   )


Allow to import already built documentation.

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

Signed-off-by: Nicolas Despres <abdeb541ca46f1651c9cc594d44e707056e73d5d@gostai.com>

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -142,6 +142,9 @@
 #  SOURCES	- the list of all XML files involved in the docbook.
 #  EXTRA	- the list of all extra files (others than generated HTML
 #		  files) Qt assistant requires (images for instance).
+#  IMPORT_BUILD - the path where to find already built file. This is useful
+#                 when your building the package on a platform that do not
+#		  support the tool chain needed to build the documentation.
 function(gostai_add_qt_assistant name)

   set(assistant_dir ${CMAKE_MODULE_PATH}/assistant)
@@ -149,172 +152,207 @@
   set(css_filename styles.css)
   set(chunk_dir ${name}_assistant)

-  # Find tools.
-  find_package(XSLTProc REQUIRED)
-  find_package(QHelpGenerator REQUIRED)
-  find_package(QCollectionGenerator REQUIRED)
+  # Find tools
   find_package(QtAssistant REQUIRED)

   # Parse arguments.
   set(prefix ${name}_assistant)
   parse_arguments(
     ${prefix}
-    "SOURCES;EXTRA"
+    "SOURCES;EXTRA;IMPORT_BUILD"
     ""
     ${ARGN})
   set(${prefix}_SOURCES ${${prefix}_SOURCES} PARENT_SCOPE)
   set(${prefix}_EXTRA ${${prefix}_EXTRA} PARENT_SCOPE)
-
-  print_var(${prefix}_SOURCES ${prefix}_EXTRA)
-
-  # Search for the main file.
-  set(${prefix}_MAIN_SOURCE ${name}.xml)
-  set(${prefix}_MAIN_SOURCE ${${prefix}_MAIN_SOURCE} PARENT_SCOPE)
-  list(FIND ${prefix}_SOURCES ${${prefix}_MAIN_SOURCE} main_idx)
-  if(main_idx STREQUAL -1)
-    message(FATAL_ERROR
-      "cannot find assistant docbook main file '${${prefix}_MAIN_SOURCE}'")
-  endif(main_idx STREQUAL -1)
-
-  # Configure extra files style sheet.
-  set(extra_files ${css_filename} index.html)
-  list(APPEND extra_files ${${prefix}_EXTRA})
-  foreach(extra_file ${extra_files})
-    set(extra_files_xml
-      "${extra_files_xml}<file>${chunk_dir}/${extra_file}</file>")
-  endforeach(extra_file)
-  configure_file(${stylesheets_dir}/extra_files.xsl.in
-    ${CMAKE_CURRENT_BINARY_DIR}/extra_files.xsl)
-
-  # Copy css.
-  configure_file(${assistant_dir}/${css_filename}
-    ${CMAKE_CURRENT_BINARY_DIR}/${chunk_dir}/${css_filename}
-    COPYONLY)
-
-  # Copy extra files.
-  foreach(extra_file ${${prefix}_EXTRA})
+  set(compressed_help_name ${name}.qch)
+
+  # We import already built documentation.
+  if(${prefix}_IMPORT_BUILD)
+
+    if(EXISTS ${${prefix}_IMPORT_BUILD})
+
+      set(collection_filename ${${prefix}_IMPORT_BUILD}/${name}.qhc)
+      set(compressed_help_filename
+	${${prefix}_IMPORT_BUILD}/${compressed_help_name})
+
+    else(EXISTS ${${prefix}_IMPORT_BUILD})
+
+      message(SEND_ERROR
+	"documentation import directory '${${prefix}_IMPORT_BUILD}' does "
+	"not exists")
+
+    endif(EXISTS ${${prefix}_IMPORT_BUILD})
+
+  # otherwise we compile it from source
+  else(${prefix}_IMPORT_BUILD)
+
+    # Find tools.
+    find_package(XSLTProc REQUIRED)
+    find_package(QHelpGenerator REQUIRED)
+    find_package(QCollectionGenerator REQUIRED)
+
+    # Search for the main file.
+    set(${prefix}_MAIN_SOURCE ${name}.xml)
+    set(${prefix}_MAIN_SOURCE ${${prefix}_MAIN_SOURCE} PARENT_SCOPE)
+    list(FIND ${prefix}_SOURCES ${${prefix}_MAIN_SOURCE} main_idx)
+    if(main_idx STREQUAL -1)
+      message(FATAL_ERROR
+	"cannot find assistant docbook main file '${${prefix}_MAIN_SOURCE}'")
+    endif(main_idx STREQUAL -1)
+
+    # Configure extra files style sheet.
+    set(extra_files ${css_filename} index.html)
+    list(APPEND extra_files ${${prefix}_EXTRA})
+    foreach(extra_file ${extra_files})
+      set(extra_files_xml
+	"${extra_files_xml}<file>${chunk_dir}/${extra_file}</file>")
+    endforeach(extra_file)
+    configure_file(${stylesheets_dir}/extra_files.xsl.in
+      ${CMAKE_CURRENT_BINARY_DIR}/extra_files.xsl)
+
+    # Copy css.
+    configure_file(${assistant_dir}/${css_filename}
+      ${CMAKE_CURRENT_BINARY_DIR}/${chunk_dir}/${css_filename}
+      COPYONLY)
+
+    # Copy extra files.
+    foreach(extra_file ${${prefix}_EXTRA})
+      configure_file(
+	${extra_file}
+	${CMAKE_CURRENT_BINARY_DIR}/${chunk_dir}/${extra_file}
+	COPYONLY)
+    endforeach(extra_file)
+
+    # Configure project information.
     configure_file(
-      ${extra_file}
-      ${CMAKE_CURRENT_BINARY_DIR}/${chunk_dir}/${extra_file}
-      COPYONLY)
-  endforeach(extra_file)
-
-  # Configure project information.
-  configure_file(
-    ${CMAKE_MODULE_PATH}/project-info.docbook.in
-    ${CMAKE_CURRENT_BINARY_DIR}/project-info.xml)
-  # Configure Gostai information.
-  configure_file(
-    ${CMAKE_MODULE_PATH}/gostai-info.docbook.in
-    ${CMAKE_CURRENT_BINARY_DIR}/gostai-info.xml)
-
-  set(xsltproc_path
-    "${CMAKE_CURRENT_BINARY_DIR}")
-
-  # Compile chunk HTML version.
-  set(chunk_index ${chunk_dir}/index.html)
-  add_custom_command(
-    OUTPUT ${chunk_index}
-    COMMAND ${XSLTPROC_EXECUTABLE}
-
-    ARGS
-    --xinclude
-    --output ${CMAKE_CURRENT_BINARY_DIR}/${chunk_dir}/
-    --path ${xsltproc_path}
-    ${stylesheets_dir}/chunk-stylesheet.xsl
-    ${${prefix}_MAIN_SOURCE}
-
-    DEPENDS
-    ${${prefix}_SOURCES}
-    ${stylesheets_dir}/chunk-stylesheet.xsl
-
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    )
-
-  # Compile single page HTML version (not really maintained!)
-  set(html_filename ${name}.html)
-  add_custom_command(
-    OUTPUT ${html_filename}
-    COMMAND ${XSLTPROC_EXECUTABLE}
-
-    ARGS --xinclude
-    --output ${CMAKE_CURRENT_BINARY_DIR}/${html_filename}
-    --path ${xsltproc_path}
-    ${stylesheets_dir}/html-stylesheet.xsl
-    ${${prefix}_MAIN_SOURCE}
-
-    DEPENDS
-    ${${prefix}_SOURCES}
-    ${stylesheets_dir}/html-stylesheet.xsl
-
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    )
-
-  # Compile Qt Help project (.qhp)
-  set(project_help_filename ${name}.qhp)
-  add_custom_command(
-    OUTPUT ${project_help_filename}
-    COMMAND ${XSLTPROC_EXECUTABLE}
-
-    ARGS
-    --xinclude
-    --output ${CMAKE_CURRENT_BINARY_DIR}/${project_help_filename}
-    --path ${xsltproc_path}
-    ${stylesheets_dir}/assistant-stylesheet.xsl
-    ${${prefix}_MAIN_SOURCE}
-
-    DEPENDS
-    ${${prefix}_SOURCES}
-    ${stylesheets_dir}/assistant-stylesheet.xsl
-    ${CMAKE_CURRENT_BINARY_DIR}/extra_files.xsl
-
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    )
-
-  # Compile Qt Compressed help file. (.qch)
-  set(compressed_help_name ${name}.qch)
-  set(compressed_help_filename
-    ${CMAKE_CURRENT_BINARY_DIR}/${compressed_help_name})
-  add_custom_command(
-    OUTPUT ${compressed_help_filename}
-    COMMAND ${QHELPGENERATOR_EXECUTABLE}
-    ARGS ${project_help_filename} -o ${compressed_help_filename}
-    DEPENDS ${project_help_filename} ${QHELPGENERATOR_EXECUTABLE}
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    )
-
-  # Configure Qt Help Collection Project
-  if(CMAKE_BUILD_TYPE STREQUAL "Debug")
-    set(ADDR_BAR_ENABLED "true")
-  else(CMAKE_BUILD_TYPE STREQUAL "Debug")
-    set(ADDR_BAR_ENABLED "false")
-  endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
-  set(REGISTER_SECTION "<file>${compressed_help_name}</file>")
-  set(collection_project_filename ${CMAKE_CURRENT_BINARY_DIR}/${name}.qhcp)
-  configure_file(${assistant_dir}/collection-help-project.qhcp.in
-    ${collection_project_filename}
-    ESCAPE_QUOTES
-    @ONLY
-    )
-
-  # Make Qt Collection file
-  configure_file(${assistant_dir}/gostai-doc.png
-    ${CMAKE_CURRENT_BINARY_DIR}/gostai-doc.png
-    COPYONLY
-    )
-  set(collection_filename ${CMAKE_CURRENT_BINARY_DIR}/${name}.qhc)
-  add_custom_command(
-    OUTPUT ${collection_filename}
-    COMMAND ${QCOLLECTIONGENERATOR_EXECUTABLE}
-    ARGS ${collection_project_filename} -o ${collection_filename}
-
-    DEPENDS
-    ${collection_project_filename}
-    ${QCOLLECTIONGENERATOR_EXECUTABLE}
-    ${compressed_help_filename}
-
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    )
+      ${CMAKE_MODULE_PATH}/project-info.docbook.in
+      ${CMAKE_CURRENT_BINARY_DIR}/project-info.xml)
+    # Configure Gostai information.
+    configure_file(
+      ${CMAKE_MODULE_PATH}/gostai-info.docbook.in
+      ${CMAKE_CURRENT_BINARY_DIR}/gostai-info.xml)
+
+    set(xsltproc_path
+      "${CMAKE_CURRENT_BINARY_DIR}")
+
+    # Compile chunk HTML version.
+    set(chunk_index ${chunk_dir}/index.html)
+    add_custom_command(
+      OUTPUT ${chunk_index}
+      COMMAND ${XSLTPROC_EXECUTABLE}
+
+      ARGS
+      --xinclude
+      --output ${CMAKE_CURRENT_BINARY_DIR}/${chunk_dir}/
+      --path ${xsltproc_path}
+      ${stylesheets_dir}/chunk-stylesheet.xsl
+      ${${prefix}_MAIN_SOURCE}
+
+      DEPENDS
+      ${${prefix}_SOURCES}
+      ${stylesheets_dir}/chunk-stylesheet.xsl
+
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      )
+
+    # Compile single page HTML version (not really maintained!)
+    set(html_filename ${name}.html)
+    add_custom_command(
+      OUTPUT ${html_filename}
+      COMMAND ${XSLTPROC_EXECUTABLE}
+
+      ARGS --xinclude
+      --output ${CMAKE_CURRENT_BINARY_DIR}/${html_filename}
+      --path ${xsltproc_path}
+      ${stylesheets_dir}/html-stylesheet.xsl
+      ${${prefix}_MAIN_SOURCE}
+
+      DEPENDS
+      ${${prefix}_SOURCES}
+      ${stylesheets_dir}/html-stylesheet.xsl
+
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      )
+
+    # Compile Qt Help project (.qhp)
+    set(project_help_filename ${name}.qhp)
+    add_custom_command(
+      OUTPUT ${project_help_filename}
+      COMMAND ${XSLTPROC_EXECUTABLE}
+
+      ARGS
+      --xinclude
+      --output ${CMAKE_CURRENT_BINARY_DIR}/${project_help_filename}
+      --path ${xsltproc_path}
+      ${stylesheets_dir}/assistant-stylesheet.xsl
+      ${${prefix}_MAIN_SOURCE}
+
+      DEPENDS
+      ${${prefix}_SOURCES}
+      ${stylesheets_dir}/assistant-stylesheet.xsl
+      ${CMAKE_CURRENT_BINARY_DIR}/extra_files.xsl
+
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+      )
+
+    # Compile Qt Compressed help file. (.qch)
+    set(compressed_help_filename
+      ${CMAKE_CURRENT_BINARY_DIR}/${compressed_help_name})
+    add_custom_command(
+      OUTPUT ${compressed_help_filename}
+      COMMAND ${QHELPGENERATOR_EXECUTABLE}
+      ARGS ${project_help_filename} -o ${compressed_help_filename}
+      DEPENDS ${project_help_filename} ${QHELPGENERATOR_EXECUTABLE}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+      )
+
+    # Configure Qt Help Collection Project
+    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+      set(ADDR_BAR_ENABLED "true")
+    else(CMAKE_BUILD_TYPE STREQUAL "Debug")
+      set(ADDR_BAR_ENABLED "false")
+    endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
+    set(REGISTER_SECTION "<file>${compressed_help_name}</file>")
+    set(collection_project_filename ${CMAKE_CURRENT_BINARY_DIR}/${name}.qhcp)
+    configure_file(${assistant_dir}/collection-help-project.qhcp.in
+      ${collection_project_filename}
+      ESCAPE_QUOTES
+      @ONLY
+      )
+
+    # Make Qt Collection file
+    configure_file(${assistant_dir}/gostai-doc.png
+      ${CMAKE_CURRENT_BINARY_DIR}/gostai-doc.png
+      COPYONLY
+      )
+    set(collection_filename ${CMAKE_CURRENT_BINARY_DIR}/${name}.qhc)
+    add_custom_command(
+      OUTPUT ${collection_filename}
+      COMMAND ${QCOLLECTIONGENERATOR_EXECUTABLE}
+      ARGS ${collection_project_filename} -o ${collection_filename}
+
+      DEPENDS
+      ${collection_project_filename}
+      ${QCOLLECTIONGENERATOR_EXECUTABLE}
+      ${compressed_help_filename}
+
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+      )
+
+    # Add associated target
+    add_custom_target(${prefix}
+      DEPENDS
+      ${chunk_index}
+      ${html_filename}
+      ${project_help_filename}
+      ${compressed_help_filename}
+      ${collection_filename}
+      )
+    if(TARGET doc)
+      add_dependencies(doc ${prefix})
+    endif(TARGET doc)
+
+  endif(${prefix}_IMPORT_BUILD)

   # Schedule for installation.
   install(
@@ -339,19 +377,6 @@

   dldep_install(${QT_QTASSISTANT_EXECUTABLE})

-  # Add associated target
-  add_custom_target(${prefix}
-    DEPENDS
-    ${chunk_index}
-    ${html_filename}
-    ${project_help_filename}
-    ${compressed_help_filename}
-    ${collection_filename}
-    )
-  if(TARGET doc)
-    add_dependencies(doc ${prefix})
-  endif(TARGET doc)
-
 endfunction(gostai_add_qt_assistant name)

 endif(NOT GOSTAI_CMAKE_GUARD)


fixing GLM issue with MSVC

fixing GLM issue with MSVC

--- cmake/EmbedGlm.cmake
+++ cmake/EmbedGlm.cmake
@@ -22,3 +22,10 @@
 ExternalProject_Add_Step(glm "copy_include"
   COMMAND ${CMAKE_COMMAND} -E copy_directory "${SOURCE_DIR}/glm" "${GLM_INCLUDE_DIR}/glm" DEPENDEES install
 )
+
+# https://github.com/g-truc/glm/issues/283
+# GLM does not compile with MSVC (32bits configuration) since 0.9.6
+# Even if the issue is closed, it does not seem fixed in current version.
+if(MSVC)
+  add_definitions( -DGLM_FORCE_PURE )
+endif()


Cmake: added missing if

Cmake: added missing if

--- cmake/globalutils.cmake
+++ cmake/globalutils.cmake
@@ -688,7 +688,7 @@
            install(TARGETS ${ARGN}
                     RUNTIME DESTINATION bin
                     COMPONENT modules)
-        else(APPLE)
+        elseif(APPLE)
             install(TARGETS ${ARGN}
                     RUNTIME DESTINATION bin
                     BUNDLE DESTINATION .


added some helper cmake macros to enable:
 * two-step packaga structure (foo/bar with foo_bar as package name)
 * new pcl_cuda_add_library macro which uses cuda's cuda_add_library

git-svn-id: e7ea667a1d39a4453c4efcc4ba7bca3d620c3f19@1082 a9d63959-f2ad-4865-b262-bf0e56cfafb6

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -47,7 +47,8 @@
                 set(${_var} FALSE)
                 PCL_SET_SUBSYS_STATUS(${_name} FALSE "Requires ${_dep}")
             else(NOT _status)
-                include_directories(${PROJECT_SOURCE_DIR}/${_dep}/include)
+                PCL_GET_SUBSYS_INCLUDE_DIR(_include_dir ${_dep})
+                include_directories(${PROJECT_SOURCE_DIR}/${_include_dir}/include)
             endif(NOT _status)
         endforeach(_dep)
     endif(${_var})
@@ -94,6 +95,37 @@
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
     install(EXPORT pcl DESTINATION ${LIB_INSTALL_DIR}/pcl FILE UsePCL.cmake)
 endmacro(PCL_ADD_LIBRARY)
+
+
+###############################################################################
+# Add a cuda library target.
+# _name The library name.
+# _component The part of PCL that this library belongs to.
+# ARGN The source files for the library.
+macro(PCL_CUDA_ADD_LIBRARY _name _component)
+    cuda_add_library(${_name} ${PCL_LIB_TYPE} ${ARGN})
+    # must link explicitly against boost.
+    target_link_libraries(${_name} ${Boost_LIBRARIES})
+    #
+    # Only link if needed
+    if(WIN32 AND MSVC)
+      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)
+    endif()
+    #
+    set_target_properties(${_name} PROPERTIES
+        VERSION ${PCL_VERSION}
+        SOVERSION ${PCL_MAJOR_VERSION}
+        DEFINE_SYMBOL "PCLAPI_EXPORTS")
+    install(TARGETS ${_name} EXPORT pcl
+        RUNTIME DESTINATION ${BIN_INSTALL_DIR} COMPONENT ${_component}
+        LIBRARY DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component}
+        ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT ${_component})
+    install(EXPORT pcl DESTINATION ${LIB_INSTALL_DIR}/pcl FILE UsePCL.cmake)
+endmacro(PCL_CUDA_ADD_LIBRARY)

 ###############################################################################
@@ -279,6 +311,28 @@

 ###############################################################################
+# Set the include directory name of a subsystem.
+# _name Subsystem name.
+# _includedir Name of subdirectory for includes
+# ARGN[0] Reason for not building.
+macro(PCL_SET_SUBSYS_INCLUDE_DIR _name _includedir)
+    SET_IN_GLOBAL_MAP(PCL_SUBSYS_INCLUDE ${_name} ${_includedir})
+endmacro(PCL_SET_SUBSYS_INCLUDE_DIR)
+
+
+###############################################################################
+# Get the include directory name of a subsystem - return _name if not set
+# _var Destination variable.
+# _name Name of the subsystem.
+macro(PCL_GET_SUBSYS_INCLUDE_DIR _var _name)
+    GET_IN_MAP(${_var} PCL_SUBSYS_INCLUDE ${_name})
+    if(NOT ${_var})
+      set (${_var} ${_name})
+    endif(NOT ${_var})
+endmacro(PCL_GET_SUBSYS_INCLUDE_DIR)
+
+
+###############################################################################
 # Write a report on the build/not-build status of the subsystems
 macro(PCL_WRITE_STATUS_REPORT)
     message(STATUS "The following subsystems will be built:")


Downgrade grabber dependency message level to STATUS.

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -861,7 +861,7 @@
       find_package(${_name})
       if (NOT ${_name_capitalized}_FOUND)
         set(WITH_${_name_capitalized} FALSE CACHE BOOL "${_description}" FORCE)
-        message(WARNING "${_description}: not building because ${_name} not found")
+        message(STATUS "${_description}: not building because ${_name} not found")
       else()
         set(HAVE_${_name_capitalized} TRUE)
         include_directories(SYSTEM "${${_name_capitalized}_INCLUDE_DIRS}")


Link to delayimp library for all MSVC versions

--- cmake/pcl_targets.cmake
+++ cmake/pcl_targets.cmake
@@ -196,7 +196,7 @@
       target_link_libraries(${_name} gomp)
     endif()

-	if(MSVC90 OR MSVC10)
+	if(MSVC)
 	  target_link_libraries(${_name} delayimp.lib)  # because delay load is enabled for openmp.dll
 	endif()