removed debug symbol generation on Xeon Phi in release mode

--- cmake/build_icc_mic.cmake
+++ cmake/build_icc_mic.cmake
@@ -20,24 +20,13 @@
 SET(__AVX__ 0)

 SET (CMAKE_CXX_COMPILER icpc)
-SET (CMAKE_CXX_FLAGS "-mmic -restrict -g -Wall -fasm-blocks -fPIC")
+SET (CMAKE_CXX_FLAGS "-mmic -restrict -Wall -fasm-blocks -fPIC")
 SET (CMAKE_CXX_FLAGS_NOOPT "-O0 -DDEBUG")
-SET (CMAKE_CXX_FLAGS_DEBUG "-w1 -O2 -DDEBUG ")
-
-#--no-exceptions --no-rtti
-
-IF (ISPC_PLUS)
-
-SET (CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG -mCG_lrb_num_threads=4 -mCG_lrb_num_threads=4 -ansi-alias -fp-model fast -fimf-precision=low -fasm-blocks -no-inline-max-total-size -inline-factor=200 -fPIC  -fma  -restrict -no-prec-div -no-prec-sqrt  -mGLOB_default_function_attrs=\"use_vec_for_imul=on;use_fast_math=on;gather_scatter_loop_jknzd=on;gather_scatter_loop_unroll=2;use_gather_scatter_hint=on;c_lrb_avoid_vector_insts_with_rip=on;c_avoid_bank_conflicts=on;c_sch_nop_insertion=on;c_avoid_movz_and_movs=off;c_avoid_integer_ciscization=on;avoid_stall_between_all_insts=on;avoid_long_vector_ints=on;avoid_loads_with_extend=on;smart_mem_conflicts=on\"  -mP2OPT_hlo_prefetch=F ")
-
-ELSE ()
+SET (CMAKE_CXX_FLAGS_DEBUG "-g -w1 -O2 -DDEBUG ")

 # -ansi-alias # ISPC not working with ansi-alias flag

-SET (CMAKE_CXX_FLAGS_RELEASE "-g -O3 -DNDEBUG -mCG_lrb_num_threads=4 -mCG_lrb_num_threads=4 -fp-model fast -fimf-precision=low -fasm-blocks -no-inline-max-total-size -inline-factor=200 -fPIC  -fma  -restrict -no-prec-div -no-prec-sqrt  -mGLOB_default_function_attrs=\"use_vec_for_imul=on;use_fast_math=on;gather_scatter_loop_jknzd=on;gather_scatter_loop_unroll=2;use_gather_scatter_hint=on;c_lrb_avoid_vector_insts_with_rip=on;c_avoid_bank_conflicts=on;c_sch_nop_insertion=on;c_avoid_movz_and_movs=off;c_avoid_integer_ciscization=on;avoid_stall_between_all_insts=on;avoid_long_vector_ints=on;avoid_loads_with_extend=on;smart_mem_conflicts=on\"  -mP2OPT_hlo_prefetch=F ")
-
-
-ENDIF()
+SET (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -mCG_lrb_num_threads=4 -mCG_lrb_num_threads=4 -fp-model fast -fimf-precision=low -fasm-blocks -no-inline-max-total-size -inline-factor=200 -fPIC  -fma  -restrict -no-prec-div -no-prec-sqrt  -mGLOB_default_function_attrs=\"use_vec_for_imul=on;use_fast_math=on;gather_scatter_loop_jknzd=on;gather_scatter_loop_unroll=2;use_gather_scatter_hint=on;c_lrb_avoid_vector_insts_with_rip=on;c_avoid_bank_conflicts=on;c_sch_nop_insertion=on;c_avoid_movz_and_movs=off;c_avoid_integer_ciscization=on;avoid_stall_between_all_insts=on;avoid_long_vector_ints=on;avoid_loads_with_extend=on;smart_mem_conflicts=on\"  -mP2OPT_hlo_prefetch=F ")

 SET(CMAKE_LINKER icpc)
 SET(CMAKE_CXX_LINK_EXECUTABLE	"<CMAKE_CXX_COMPILER> -mmic -static-intel -L/opt/intel/composerxe_mic/compiler/lib/mic -rdynamic -fPIC -L/opt/intel/mic/coi/device-linux-release/lib <LINK_FLAGS> -o <TARGET> ${CMAKE_GNULD_IMAGE_VERSION} <OBJECTS> <LINK_LIBRARIES> -zmuldefs")


Set iOS version to generic iphoneos to make it work with Xcode 6.1

--- cmake/ios.toolchain.cmake
+++ cmake/ios.toolchain.cmake
@@ -20,7 +20,7 @@
 CMAKE_FORCE_CXX_COMPILER(g++ GNU)

 set(CMAKE_OSX_ARCHITECTURES "armv7")
-set(CMAKE_OSX_SYSROOT "iphoneos8.0")
+set(CMAKE_OSX_SYSROOT "iphoneos")
 set(CMAKE_XCODE_EFFECTIVE_PLATFORMS "-iphoneos;-iphonesimulator")

 # define configurations


Update common.cmake to link CoreFoundation on Apple to allow debug tooling

--- jdksavdecc-c/common.cmake
+++ jdksavdecc-c/common.cmake
@@ -21,6 +21,11 @@
         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
     endif()
 endif()
+
+IF (APPLE)
+    FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
+    set(LIBS ${LIBS} ${COREFOUNDATION_LIBRARY})
+ENDIF (APPLE)

 if (${CXX11} MATCHES "ON")
     # Compiler-specific C++11 activation.


changed to 1.0.0-rc.3

changed to 1.0.0-rc.3

--- version_config.cmake
+++ version_config.cmake
@@ -116,7 +116,7 @@
   set(DEFAULT_glog_TAG v035)

 else()
-  set(DEFAULT_SIRF_TAG v1.0.0-rc.2)
+  set(DEFAULT_SIRF_TAG v1.0.0-rc.3)

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )


Modification of dtkBuild cmake file to enable installation of dtk using make intsall command.

--- cmake/dtkBuild.cmake
+++ cmake/dtkBuild.cmake
@@ -4,9 +4,9 @@
 ## Copyright (C) 2008 - Julien Wintz, Inria.
 ## Created: Fri Apr  2 09:05:55 2010 (+0200)
 ## Version: $Id$
-## Last-Updated: Mon May 23 14:36:15 2011 (+0200)
-##           By: Julien Wintz
-##     Update #: 179
+## Last-Updated: Mon May 30 09:34:23 2011 (+0200)
+##           By: Thibaud Kloczko
+##     Update #: 181
 ######################################################################
 ##
 ### Commentary:
@@ -138,19 +138,15 @@
 ## Path relocation
 ## #################################################################

-set(CMAKE_SKIP_BUILD_RPATH FALSE)
-
-set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-
 if (APPLE)
   set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
-endif ()
+endif (APPLE)

 if (UNIX AND NOT APPLE)
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
-endif ()
+endif (UNIX AND NOT APPLE)

-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

 ## #################################################################
 ## Uninstall target


avoid rt detection hackery for mingw/win and apple.

--- cmake/tools/rt.cmake
+++ cmake/tools/rt.cmake
@@ -31,12 +31,15 @@
 # message("CMAKE_SYSTEM_LIBRARY_PATH: ${CMAKE_SYSTEM_LIBRARY_PATH}")
 # message("CMAKE_VERSION=${CMAKE_VERSION}")

+message(STATUS "RT_LIBRARY: ${RT_LIBRARY}")
 if(NOT APPLE)
   if (${CMAKE_VERSION} VERSION_LESS 2.8.4)
-    # cmake later than 2.8.0 appears to have a better find_library
-    # that knows about the ABI of the compiler.  For lucid we just
-    # depend on the linker to find it for us.
-    set(RT_LIBRARY rt CACHE FILEPATH "Hacked find of rt for cmake < 2.8.4")
+    if(NOT (WIN32 OR MINGW))
+      # cmake later than 2.8.0 appears to have a better find_library
+      # that knows about the ABI of the compiler.  For lucid we just
+      # depend on the linker to find it for us.
+      set(RT_LIBRARY rt CACHE FILEPATH "Hacked find of rt for cmake < 2.8.4")
+    endif()
   else()
     find_library(RT_LIBRARY rt)
     assert_file_exists(${RT_LIBRARY} "RT Library")


Use PYTHONPATH from ctest environment in client tests

--- tests/JavascriptTests.cmake
+++ tests/JavascriptTests.cmake
@@ -220,6 +220,7 @@
   string(REPLACE ";" " " plugins "${plugins}")

   set_property(TEST ${testname} PROPERTY ENVIRONMENT
+    "PYTHONPATH=$ENV{PYTHONPATH}"
     "SPEC_FILE=${specFile}"
     "ASSETSTORE_TYPE=${assetstoreType}"
     "WEB_SECURITY=${webSecurity}"


Try something else

Try something else

--- src/nodejslib/nodejslib.cmake
+++ src/nodejslib/nodejslib.cmake
@@ -8,6 +8,7 @@
 find_package(Boost)
 include_directories(${Boost_INCLUDE_DIRS})
 include_directories(${OpenCamLib_SOURCE_DIR}/../node_modules/node-addon-api)
+include_directories(${CMAKE_JS_INC})

 # this branches into the dirs and compiles stuff there
 add_subdirectory( ${OpenCamLib_SOURCE_DIR}/cutters  )
@@ -24,14 +25,15 @@
 include_directories( ${OpenCamLib_SOURCE_DIR}/common )
 include_directories( ${OpenCamLib_SOURCE_DIR} )

-include_directories(${CMAKE_JS_INC})
+include_directories(${OpenCamLib_SOURCE_DIR}/nodejslib)
+
 add_library(opencamlib
 	SHARED
-	# ${OCL_GEO_SRC}
-	# ${OCL_CUTTER_SRC}
-	# ${OCL_DROPCUTTER_SRC}
-	# ${OCL_ALGO_SRC}
-	# ${OCL_COMMON_SRC}
+	${OCL_GEO_SRC}
+	${OCL_CUTTER_SRC}
+	${OCL_DROPCUTTER_SRC}
+	${OCL_ALGO_SRC}
+	${OCL_COMMON_SRC}
 	${OpenCamLib_SOURCE_DIR}/nodejslib/point_js.cpp
 	${OpenCamLib_SOURCE_DIR}/nodejslib/stlsurf_js.cpp
 	${OpenCamLib_SOURCE_DIR}/nodejslib/stlreader_js.cpp
@@ -46,25 +48,11 @@
 	${OpenCamLib_SOURCE_DIR}/nodejslib/nodejslib.cpp
 )

-# link_libraries(${CMAKE_JS_LIB})
-# link_libraries(${Boost_LIBRARIES})
-
 target_link_libraries(
   opencamlib
-  point_js
-  stlsurf_js
-  stlreader_js
-  triangle_js
-  bbox_js
-  cylcutter_js
-  waterline_js
-  line_js
-  path_js
-  adaptivepathdropcutter_js
-  adaptivewaterline_js
-  nodejslib
   ${Boost_LIBRARIES}
   ${PYTHON_LIBRARIES}
+  ${CMAKE_JS_LIB}
 )

 if(WIN32)


Fetch tags on update

Fetch tags on update

--- CMake/MITKDashboardScript.download.cmake
+++ CMake/MITKDashboardScript.download.cmake
@@ -463,7 +463,7 @@

   ctest_start(${CTEST_DASHBOARD_MODEL})

-  set(CTEST_UPDATE_OPTIONS "origin ${MITK_BRANCH}")
+  set(CTEST_UPDATE_OPTIONS "--tags origin ${MITK_BRANCH}")

   ctest_update(RETURN_VALUE return_value)

@@ -521,7 +521,7 @@
 ${indent}Old revision: ${old_revision} (committed by ${committer})
 ${indent}${indent}${subject}")

-      git("fetch" "--quiet" "origin" "${branch}"
+      git("fetch" "--quiet" "--tags" "origin" "${branch}"
         WORKING_DIRECTORY "${extension_dir}")

       git("diff" "--quiet" "HEAD" "FETCH_HEAD"


build: Remove unused SoQt cmake scripts

build: Remove unused SoQt cmake scripts

--- cMake/FindSoQt.cmake
+++ cMake/FindSoQt.cmake
@@ -1,115 +0,0 @@
-#############################################################################
-# Description:
-# Try to find SoQt library.
-# Once run this will define:
-#
-# SOQT_FOUND
-# SOQT_LIBRARIES
-# SOQT_LIBRARY_RELEASE
-# SOQT_LIBRARY_DEBUG
-#
-#############################################################################
-
-
-
-
-IF(UNIX OR WIN32)
-
-IF(WIN32)
-  IF(MINGW)
-  FIND_LIBRARY(SOQT_LIBRARY
-    NAMES SoQt #only shared libraries under windows
-    PATHS
-    /usr/lib
-    /usr/local/lib
-    /lib
-    "$ENV{COINDIR}/lib"
-  )
-  ELSE(MINGW)
-  FIND_LIBRARY(SOQT_LIBRARY_RELEASE
-    #only shared libraries under windows
-	NAMES soqt1
-    PATHS
-    "$ENV{COINDIR}/lib"
-    )
-  FIND_LIBRARY(SOQT_LIBRARY_DEBUG
-    NAMES soqt1d #only shared libraries under windows
-    PATHS
-    "$ENV{COINDIR}/lib"
-    )
-
-  FIND_PATH(SOQT_INCLUDE_PATH Inventor/Qt/SoQt.h
-    "$ENV{COINDIR}/include"
-    "$ENV{INCLUDE}"
-    )
-  MARK_AS_ADVANCED(
-        SOQT_LIBRARY_DEBUG
-        SOQT_LIBRARY_RELEASE
-        SOQT_INCLUDE_PATH
-  )
-  ENDIF(MINGW)
-ELSE(WIN32)
-FIND_LIBRARY(SOQT_LIBRARY
-    NAMES SoQt #only shared libraries under windows
-    PATHS
-    /usr/lib
-    /usr/local/lib
-    /lib
-    "$ENV{COINDIR}/lib"
-    )
-
-  #MESSAGE(STATUS "DBG SOQT_LIBRARY=${SOQT_LIBRARY}")
-
-ENDIF(WIN32)
-
-  ## --------------------------------
-
-  IF(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
-
-        IF(WIN32)
-                IF(SOQT_LIBRARY_RELEASE AND NOT SOQT_LIBRARY_DEBUG)
-                         SET(SOQT_LIBRARY_RELEASE ${SOQT_LIBRARY_RELEASE})
-                ENDIF(SOQT_LIBRARY_RELEASE AND NOT SOQT_LIBRARY_DEBUG)
-                IF(SOQT_LIBRARY_DEBUG AND NOT SOQT_LIBRARY_RELEASE)
-                         SET(SOQT_LIBRARY_DEBUG ${SOQT_LIBRARY_DEBUG})
-                ENDIF(SOQT_LIBRARY_DEBUG AND NOT SOQT_LIBRARY_RELEASE)
-                IF(SOQT_LIBRARY_RELEASE AND SOQT_LIBRARY_DEBUG)
-                         SET(SOQT_LIBRARY_RELEASE ${SOQT_LIBRARY_RELEASE})
-                         SET(SOQT_LIBRARY_DEBUG ${SOQT_LIBRARY_DEBUG})
-                ENDIF(SOQT_LIBRARY_RELEASE AND SOQT_LIBRARY_DEBUG)
-				IF(MINGW)
-                SET(SOQT_LIBRARIES ${SOQT_LIBRARY})
-                MARK_AS_ADVANCED(
-                        SOQT_LIBRARIES
-                        SOQT_LIBRARY
-                )
-				ENDIF(MINGW)
-        ELSE(WIN32)
-                SET(SOQT_LIBRARIES ${SOQT_LIBRARY})
-                MARK_AS_ADVANCED(
-                        SOQT_LIBRARIES
-                        SOQT_LIBRARY
-                )
-        ENDIF(WIN32)
-    SET(SOQT_FOUND TRUE)
-  ELSE(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
-    SET(SOQT_FOUND FALSE)
-    #MESSAGE("SoQt library not found.")
-  ENDIF(SOQT_LIBRARY OR SOQT_LIBRARY_DEBUG OR SOQT_LIBRARY_RELEASE)
-
-  IF(WIN32)
-  IF(SOQT_INCLUDE_PATH)
-        set(SOQT_INCLUDE_DIR ${SOQT_INCLUDE_PATH})
-  ELSE(SOQT_INCLUDE_PATH)
-        #MESSAGE("Can not find SoQt includes")
-  ENDIF(SOQT_INCLUDE_PATH)
-  MARK_AS_ADVANCED(
-        SOQT_INCUDE_DIR
-        )
-  ENDIF(WIN32)
-
-  #MESSAGE(STATUS "SOQT_FOUND : ${SOQT_FOUND}")
-
-ELSE(UNIX OR WIN32)
-  SET(SOQT_FOUND FALSE)
-ENDIF(UNIX OR WIN32)


Typo fix

Typo fix

--- thirdparty/thirdparty.cmake
+++ thirdparty/thirdparty.cmake
@@ -450,7 +450,7 @@

     set(${LIBUSB}_additional_compile_definition "OS_LINUX=1")
     set(${LIBUSB}_additional_include_dir ${thirdparty_dir}/include/${LIBUSB})
-  endif()
+  endif(USE_SYSTEM_LIBUSB)

 else()
   message(FATAL_ERROR "libUSB unsupported platform")


COMP: Use cmake -E create_symlink instead of ln -s.

--- CMake/KitCommonPythonWrapBlock.cmake
+++ CMake/KitCommonPythonWrapBlock.cmake
@@ -80,7 +80,7 @@
     SET(src vtk${KIT}Python${suf})
     SET(tgt ${LIBRARY_OUTPUT_PATH}/libvtk${KIT}Python${suf})
     ADD_CUSTOM_COMMAND(TARGET vtk${KIT}Python POST_BUILD
-                       COMMAND ln -sf ${src} ${tgt})
+      COMMAND ${CMAKE_COMMAND} -E create_symlink ${src} ${tgt})
   ENDIF(CYGWIN OR NOT WIN32)

   # The python modules are installed by a setup.py script which does


Fixed wrong file name

Fixed wrong file name

--- tensorflow/contrib/cmake/external/abseil_cpp.cmake
+++ tensorflow/contrib/cmake/external/abseil_cpp.cmake
@@ -48,7 +48,7 @@
       set(abseil_cpp_STATIC_LIBRARIES
           ${abseil_cpp_BUILD}/absl/base/Release/absl_base.lib
           ${abseil_cpp_BUILD}/absl/base/Release/absl_dynamic_annotations.lib
-          ${abseil_cpp_BUILD}/absl/base/Release/absl_internal_malloc_internal.lib
+          ${abseil_cpp_BUILD}/absl/base/Release/absl_malloc_internal.lib
           ${abseil_cpp_BUILD}/absl/base/Release/absl_internal_throw_delegate.lib
           ${abseil_cpp_BUILD}/absl/numeric/Release/absl_int128.lib
           ${abseil_cpp_BUILD}/absl/strings/Release/absl_strings.lib
@@ -104,4 +104,4 @@

   list(APPEND tensorflow_EXTERNAL_DEPENDENCIES abseil_cpp_build)

-endif (systemlib_ABSEIL_CPP)+endif (systemlib_ABSEIL_CPP)


Android: macro 'find_host_program'

Android: macro 'find_host_program'

--- os/android.cmake
+++ os/android.cmake
@@ -34,3 +34,23 @@
 if(CMAKE_VERSION VERSION_LESS 3.7)
   polly_fatal_error("Minimum CMake version for Android is 3.7")
 endif()
+
+macro(find_host_program)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+ if(CMAKE_HOST_WIN32)
+  set(WIN32 1)
+  set(UNIX)
+ elseif(CMAKE_HOST_APPLE)
+  set(APPLE 1)
+  set(UNIX)
+ endif()
+ find_program(${ARGN})
+ set(WIN32)
+ set(APPLE)
+ set(UNIX 1)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endmacro()


BUG: update tag for FFSforGMM

BUG: update tag for FFSforGMM

--- Modules/Remote/otbFFSforGMM.remote.cmake
+++ Modules/Remote/otbFFSforGMM.remote.cmake
@@ -25,5 +25,5 @@
 https://github.com/Laadr/otbFFSforGMM
 "
   GIT_REPOSITORY https://github.com/Laadr/otbFFSforGMM.git
-  GIT_TAG 3ad529b9c5c81b7dd17fe83d4802ad5a3c4eb62b
+  GIT_TAG d9c31cf51b59a4a10e4daa2858a85cd12561c696
   )


Debug postfix for windows builds

Debug postfix for windows builds

--- CommonLibrary.cmake
+++ CommonLibrary.cmake
@@ -29,6 +29,11 @@
 # Builds libName and installs it. Installs the public headers to include/name.
 # Generates a NAME_INCLUDE_NAME/{BASE_NAME of NAME_INCLUDE_NAME}.h
 # including all public headers.
+#
+# Options
+# By default on windows platforms "_D" is appended to libraries
+# if COMMON_LIBRARY_DEBUG_POSTFIX is ON then "_debug" is added on other platforms
+#

 include(InstallFiles)
 include(CommonQtSupport)
@@ -62,6 +67,19 @@
   # configure only touches file if changed, saves compilation after reconfigure
   configure_file( ${__generated_header_in} ${__generated_header} COPYONLY)
   list(APPEND PUBLIC_HEADERS ${__generated_header})
+endmacro()
+
+#-------------------------------------------------------------------------------
+# set debug postfix
+#-------------------------------------------------------------------------------
+macro(COMMON_SET_LIB_NAME_POSTFIX)
+  if (WIN32)
+    set(CMAKE_DEBUG_POSTFIX "_D")
+  elseif(COMMON_LIBRARY_DEBUG_POSTFIX)
+    set(CMAKE_DEBUG_POSTFIX "_debug")
+  else()
+    set(CMAKE_DEBUG_POSTFIX "")
+  endif()
 endmacro()

 # applying CMAKE_C(XX)_FLAGS to add_library only works from parent scope, hence
@@ -142,6 +160,8 @@
     add_library(${LIBNAME} ${LIBRARY_TYPE} ${SOURCES} ${HEADERS} ${PUBLIC_HEADERS})
     set_target_properties(${LIBNAME}
       PROPERTIES VERSION ${VERSION} SOVERSION ${VERSION_ABI} OUTPUT_NAME ${Name})
+    # append a debug suffix to library name on windows or if user requests it
+    common_set_lib_name_postfix()
     target_link_libraries(${LIBNAME} ${LINK_LIBRARIES})
     install(TARGETS ${LIBNAME}
       ARCHIVE DESTINATION ${LIBRARY_DIR} COMPONENT dev


cmake : CONFIGS out from install

cmake : CONFIGS out from install

git-svn-id: de9bbed4c30e0eb58fe8e7d66f5c80b71699a07c@975 bf01a9d7-0df3-0310-8ad4-b1c94d9ae2d5

--- Numerics/cmake/LibraryProjectSetup.cmake
+++ Numerics/cmake/LibraryProjectSetup.cmake
@@ -65,7 +65,6 @@

 install(TARGETS
   ${PROJECT_NAME}_static ${PROJECT_NAME}_shared
-  CONFIGURATIONS Debug Release
   ARCHIVE DESTINATION ${_install_lib}
   LIBRARY DESTINATION ${_install_lib})
 install(FILES ${${PROJECT_NAME}_HDRS} DESTINATION ${_install_include})


Move cutscene to util/gui.

Move cutscene to util/gui.

--- cmake/FileList.cmake
+++ cmake/FileList.cmake
@@ -155,6 +155,7 @@
 src/util/gui/container.cpp
 src/util/gui/context-box.cpp
 src/util/gui/coordinate.cpp
+src/util/gui/cutscene.cpp
 src/util/gui/fadetool.cpp
 src/util/gui/keys.cpp
 src/util/gui/keyinput.cpp
@@ -209,7 +210,6 @@
 src/platformer/game/animation.cpp
 src/platformer/game/background.cpp
 src/platformer/game/camera.cpp
-src/platformer/game/cutscene.cpp
 src/platformer/game/game.cpp
 src/platformer/game/tile.cpp
 src/platformer/game/world.cpp


Check if system has protobuf package when it already has protoc command

Summary:
When system has protobuf package but hasn't protoc, cmake will be success:

> -- ******** Summary ********
-- General:
--   CMake version         : 3.5.1
--   CMake command         : /usr/bin/cmake
--   Git version           : v0.8.1-967-g27d12d8-dirty
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 5.4.0
--   Protobuf compiler     : PROTOBUF_PROTOC_EXECUTABLE-NOTFOUND
--   Protobuf include path : /usr/include
--   Protobuf libraries    : optimized;/usr/lib/x86_64-linux-gnu/libprotobuf.so;debug;/usr/lib/x86_64-linux-gnu/libprotobuf.so;-lpthread
...

Then make will be failed.
This submit make it to check protobuf package only when protoc has been found.

This pull request is a clone of [1781](https://github.com/caffe2/caffe2/pull/1781), that pull request closed by mistake.
Closes https://github.com/caffe2/caffe2/pull/1792

Differential Revision: D6800513

Pulled By: pietern

fbshipit-source-id: 79a77a139f342ae0aaa2c37fc1d9a74e28a08422

--- cmake/ProtoBuf.cmake
+++ cmake/ProtoBuf.cmake
@@ -114,9 +114,9 @@
         google/protobuf/service.h
         PATHS ${_PROTOBUF_INSTALL_PREFIX}/include
         NO_DEFAULT_PATH)
+      find_package(Protobuf)
     endif()

-    find_package(Protobuf)
   endif()
 endif()


More CMake path quoting for paths with spaces

--- cmake/Modules/CMakeGoInformation.cmake
+++ cmake/Modules/CMakeGoInformation.cmake
@@ -17,6 +17,6 @@
 # TODO: Options for things like -race

 set(CMAKE_Go_COMPILE_OBJECT "")
-set(CMAKE_Go_LINK_EXECUTABLE "${CMAKE_COMMAND} -DGO_ENV=${GO_ENV} -DBUILDBOT=${BUILDBOT} -DGO_BUILD=<TARGET> <LINK_FLAGS> -P ${GO_COMPILE}")
-set(CMAKE_Go_CREATE_STATIC_LIBRARY "${CMAKE_COMMAND} -E touch <TARGET>")
+set(CMAKE_Go_LINK_EXECUTABLE "\"${CMAKE_COMMAND}\" -DGO_ENV=${GO_ENV} -DBUILDBOT=${BUILDBOT} -DGO_BUILD=<TARGET> <LINK_FLAGS> -P ${GO_COMPILE}")
+set(CMAKE_Go_CREATE_STATIC_LIBRARY "\"${CMAKE_COMMAND}\" -E touch <TARGET>")
 set(CMAKE_Go_ARCHIVE_CREATE ${CMAKE_Go_CREATE_STATIC_LIBRARY})


Install tbag libraries.

Install tbag libraries.

--- cmake/TbagModule/TbagProjectTbag.cmake
+++ cmake/TbagModule/TbagProjectTbag.cmake
@@ -8,5 +8,5 @@
 endif ()

 list (APPEND TBAG_PROJECT_INCLUDE_DIRS ${Tbag_INCLUDE_DIRS})
-#list(APPEND TBAG_PROJECT_LDFLAGS      ${Tbag_LIBRARIES})
+list (APPEND TBAG_PROJECT_LDFLAGS      ${Tbag_LIBRARIES})


Accept any filepath in llvm_check_source_file_list

Cmake function llvm_check_source_file_list currently only accepts paths
relative to current CMAKE_SOURCE_DIR or relative to argument SOURCE_DIR.

Extend it to accept any path, including absolute ones.

Differential revision: https://reviews.llvm.org/D44625

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

--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -69,14 +69,18 @@

 function(llvm_check_source_file_list)
   cmake_parse_arguments(ARG "" "SOURCE_DIR" "" ${ARGN})
-  set(listed ${ARG_UNPARSED_ARGUMENTS})
+  foreach(l ${ARG_UNPARSED_ARGUMENTS})
+      get_filename_component(fp ${l} REALPATH)
+      list(APPEND listed ${fp})
+  endforeach()
+
   if(ARG_SOURCE_DIR)
     file(GLOB globbed
-         RELATIVE "${CMAKE_CURRENT_LIST_DIR}"
          "${ARG_SOURCE_DIR}/*.c" "${ARG_SOURCE_DIR}/*.cpp")
   else()
     file(GLOB globbed *.c *.cpp)
   endif()
+
   foreach(g ${globbed})
     get_filename_component(fn ${g} NAME)
     if(ARG_SOURCE_DIR)
@@ -84,15 +88,21 @@
     else()
       set(entry "${fn}")
     endif()
+    get_filename_component(gp ${g} REALPATH)

     # Don't reject hidden files. Some editors create backups in the
     # same directory as the file.
     if (NOT "${fn}" MATCHES "^\\.")
       list(FIND LLVM_OPTIONAL_SOURCES ${entry} idx)
       if( idx LESS 0 )
-        list(FIND listed ${entry} idx)
+        list(FIND listed ${gp} idx)
         if( idx LESS 0 )
-          message(SEND_ERROR "Found unknown source file ${g}
+          if(ARG_SOURCE_DIR)
+              set(fn_relative "${ARG_SOURCE_DIR}/${fn}")
+          else()
+              set(fn_relative "${fn}")
+          endif()
+          message(SEND_ERROR "Found unknown source file ${fn_relative}
 Please update ${CMAKE_CURRENT_LIST_FILE}\n")
         endif()
       endif()


Use new ctest arguments to set environment variables

--- plugin.cmake
+++ plugin.cmake
@@ -13,11 +13,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 ###############################################################################
-
-# support the "if(TEST ...)" command
-if(POLICY CMP0064)
-  cmake_policy(SET CMP0064 NEW)
-endif()

 function(add_histomicstk_python_test case)
   add_python_test("${case}" PLUGIN HistomicsTK
@@ -118,32 +113,22 @@

 add_histomicstk_python_test(cli_common)

-add_histomicstk_python_test(cli_results PLUGIN HistomicsTK
+add_histomicstk_python_test(cli_results
     # There is a bug in cmake that fails when external data files are added to
     # multiple tests, so add it in one of the tests for now
     # "plugins/HistomicsTK/Easy1.png"
+    ENVIRONMENT
+    "CLI_LIST_ENTRYPOINT=${PROJECT_SOURCE_DIR}/plugins/slicer_cli_web/server/cli_list_entrypoint.py"
+    "CLI_CWD=${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/server"
 )
-if(TEST "server_HistomicsTK.cli_results")
-  set_property(TEST server_HistomicsTK.cli_results APPEND PROPERTY ENVIRONMENT
-      "CLI_LIST_ENTRYPOINT=${PROJECT_SOURCE_DIR}/plugins/slicer_cli_web/server/cli_list_entrypoint.py"
-      "CLI_CWD=${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/server"
-  )
-endif()

 # front-end tests
 add_web_client_test(
   HistomicsTK_annotations "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/plugin_tests/client/annotationSpec.js"
   ENABLEDPLUGINS "jobs" "worker" "large_image" "slicer_cli_web" "HistomicsTK"
   TEST_MODULE "plugin_tests.web_client_test"
+  # EXTERNAL_DATA "plugins/HistomicsTK/sample_svs_image.TCGA-DU-6399-01A-01-TS1.e8eb65de-d63e-42db-af6f-14fefbbdf7bd.svs"
 )
-# Ideally, client tests would support the EXTERNAL_DATA keyword, but for now
-# we just use a data file used for one of the server tests.
-if(TEST "web_client_HistomicsTK_annotations")
-  set_property(
-    TEST web_client_HistomicsTK_annotations APPEND PROPERTY
-    ENVIRONMENT "GIRDER_TEST_DATA_PREFIX=${GIRDER_EXTERNAL_DATA_ROOT}"
-  )
-endif()

 add_eslint_test(
   js_static_analysis_HistomicsTK "${PROJECT_SOURCE_DIR}/plugins/HistomicsTK/web_client"


fixed hg args

fixed hg args

--- CPM.cmake
+++ CPM.cmake
@@ -61,6 +61,8 @@
 #    [TARGET_DIR dir]             # Required - Directory to place repository.
 #    [GIT_REPOSITORY repo]        # Git repository to clone and update in TARGET_DIR.
 #    [GIT_TAG tag]                # Git tag to checkout.
+#    [HG_REPOSITORY repo]         # HG repository to clone and update in TARGET_DIR.
+#    [HG_REVISION rev]            # HG tag.
 #    [SVN_REPOSITORY repo]        # SVN repository to checkout.
 #    [SVN_REVISION rev]           # SVN revision.
 #    [SVN_TRUST_CERT 1]           # Trust the Subversion server site certificate
@@ -1370,7 +1372,7 @@
   elseif(DEFINED _CPM_REPO_HG_REPOSITORY)
     _cpm_ensure_hg_repo_is_current(use_caching)
   else()
-    message(FATAL_ERROR "CPM_EnsureRepoIsCurrent: You must specify an SVN or GIT repository.")
+    message(FATAL_ERROR "CPM_EnsureRepoIsCurrent: You must specify an SVN, GIT or HG repository.")
   endif()

 endfunction()


Fix SVN checkout.

Fix SVN checkout.

--- CPM.cmake
+++ CPM.cmake
@@ -866,7 +866,7 @@
     message(FATAL_ERROR "error: could not find svn for checkout of ${_CPM_REPO_SVN_REPOSITORY}")
   endif()

-  set(repo ${_CPM_REPO_GIT_REPOSITORY})
+  set(repo ${_CPM_REPO_SVN_REPOSITORY})
   set(dir ${_CPM_REPO_TARGET_DIR})

   if ((DEFINED _CPM_REPO_SVN_TRUST_CERT) AND (_CPM_REPO_TRUST_CERT))


[Build] Added support for RMOL and AirInv in the CMake framework.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -120,7 +120,11 @@
   if (NOT EXISTS ${DOC_INSTALL_FILE})
     unset (DOC_INSTALL_FILE)
   endif (NOT EXISTS ${DOC_INSTALL_FILE})
-  set (BASICDOC_FILES AUTHORS NEWS README ${DOC_INSTALL_FILE})
+  set (DOC_NEWS_FILE NEWS)
+  if (NOT EXISTS ${DOC_NEWS_FILE})
+    unset (DOC_NEWS_FILE)
+  endif (NOT EXISTS ${DOC_NEWS_FILE})
+  set (BASICDOC_FILES AUTHORS ${DOC_NEWS_FILE} README ${DOC_INSTALL_FILE})
   set (BASICDOC_PATH "share/doc/${PACKAGE}-${PACKAGE_VERSION}")

 endmacro (set_project_options)
@@ -291,9 +295,49 @@
       get_stdair (${_arg_version})
     endif (${_arg_lower} STREQUAL "stdair")

+    if (${_arg_lower} STREQUAL "sevmgr")
+      get_sevmgr (${_arg_version})
+    endif (${_arg_lower} STREQUAL "sevmgr")
+
+    if (${_arg_lower} STREQUAL "trademgen")
+      get_trademgen (${_arg_version})
+    endif (${_arg_lower} STREQUAL "trademgen")
+
+    if (${_arg_lower} STREQUAL "travelccm")
+      get_travelccm (${_arg_version})
+    endif (${_arg_lower} STREQUAL "travelccm")
+
+    if (${_arg_lower} STREQUAL "airsched")
+      get_airsched (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airsched")
+
     if (${_arg_lower} STREQUAL "airrac")
       get_airrac (${_arg_version})
     endif (${_arg_lower} STREQUAL "airrac")
+
+    if (${_arg_lower} STREQUAL "rmol")
+      get_rmol (${_arg_version})
+    endif (${_arg_lower} STREQUAL "rmol")
+
+    if (${_arg_lower} STREQUAL "airinv")
+      get_airinv (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airinv")
+
+    if (${_arg_lower} STREQUAL "avlcal")
+      get_avlcal (${_arg_version})
+    endif (${_arg_lower} STREQUAL "avlcal")
+
+    if (${_arg_lower} STREQUAL "simfqt")
+      get_simfqt (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simfqt")
+
+    if (${_arg_lower} STREQUAL "simlfs")
+      get_simlfs (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simlfs")
+
+    if (${_arg_lower} STREQUAL "simcrs")
+      get_simcrs (${_arg_version})
+    endif (${_arg_lower} STREQUAL "simcrs")

     if (${_arg_lower} STREQUAL "doxygen")
       get_doxygen (${_arg_version})
@@ -577,6 +621,70 @@
   endif (AirRAC_FOUND)

 endmacro (get_airrac)
+
+# ~~~~~~~~~~ RMOL ~~~~~~~~~
+macro (get_rmol)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires RMOL-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires RMOL without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (RMOL ${_required_version} REQUIRED
+	HINTS ${WITH_RMOL_PREFIX})
+  if (RMOL_FOUND)
+    #
+    message (STATUS "Found RMOL version: ${RMOL_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${RMOL_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${RMOL_LIBRARIES})
+
+  else (RMOL_FOUND)
+    set (ERROR_MSG "The RMOL library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_RMOL_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<RMOL install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (RMOL_FOUND)
+
+endmacro (get_rmol)
+
+# ~~~~~~~~~~ Airinv ~~~~~~~~~
+macro (get_airinv)
+  unset (_required_version)
+  if (${ARGC} GREATER 0)
+    set (_required_version ${ARGV0})
+    message (STATUS "Requires Airinv-${_required_version}")
+  else (${ARGC} GREATER 0)
+    message (STATUS "Requires Airinv without specifying any version")
+  endif (${ARGC} GREATER 0)
+
+  find_package (Airinv ${_required_version} REQUIRED
+	HINTS ${WITH_AIRINV_PREFIX})
+  if (Airinv_FOUND)
+    #
+    message (STATUS "Found Airinv version: ${AIRINV_VERSION}")
+
+    # Update the list of include directories for the project
+    include_directories (${AIRINV_INCLUDE_DIRS})
+
+    # Update the list of dependencies for the project
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRINV_LIBRARIES})
+
+  else (Airinv_FOUND)
+    set (ERROR_MSG "The Airinv library cannot be found. If it is installed in")
+    set (ERROR_MSG "${ERROR_MSG} a in a non standard directory, just invoke")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRINV_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<Airinv install path> variable.")
+    message (FATAL_ERROR "${ERROR_MSG}")
+  endif (Airinv_FOUND)
+
+endmacro (get_airinv)

 ##############################################
@@ -1572,6 +1680,34 @@
     message (STATUS "  - AIRRAC_INCLUDE_DIRS ........ : ${AIRRAC_INCLUDE_DIRS}")
   endif (AirRAC_FOUND)
 endmacro (display_airrac)
+
+# RMOL
+macro (display_rmol)
+  if (RMOL_FOUND)
+    message (STATUS)
+    message (STATUS "* RMOL:")
+    message (STATUS "  - RMOL_VERSION ............... : ${RMOL_VERSION}")
+    message (STATUS "  - RMOL_BINARY_DIRS ........... : ${RMOL_BINARY_DIRS}")
+    message (STATUS "  - RMOL_EXECUTABLES ........... : ${RMOL_EXECUTABLES}")
+    message (STATUS "  - RMOL_LIBRARY_DIRS .......... : ${RMOL_LIBRARY_DIRS}")
+    message (STATUS "  - RMOL_LIBRARIES ............. : ${RMOL_LIBRARIES}")
+    message (STATUS "  - RMOL_INCLUDE_DIRS .......... : ${RMOL_INCLUDE_DIRS}")
+  endif (RMOL_FOUND)
+endmacro (display_rmol)
+
+# Airinv
+macro (display_airinv)
+  if (Airinv_FOUND)
+    message (STATUS)
+    message (STATUS "* Airinv:")
+    message (STATUS "  - AIRINV_VERSION ............. : ${AIRINV_VERSION}")
+    message (STATUS "  - AIRINV_BINARY_DIRS ......... : ${AIRINV_BINARY_DIRS}")
+    message (STATUS "  - AIRINV_EXECUTABLES ......... : ${AIRINV_EXECUTABLES}")
+    message (STATUS "  - AIRINV_LIBRARY_DIRS ........ : ${AIRINV_LIBRARY_DIRS}")
+    message (STATUS "  - AIRINV_LIBRARIES ........... : ${AIRINV_LIBRARIES}")
+    message (STATUS "  - AIRINV_INCLUDE_DIRS ........ : ${AIRINV_INCLUDE_DIRS}")
+  endif (Airinv_FOUND)
+endmacro (display_airinv)

 ##
 macro (display_status_all_modules)
@@ -1658,6 +1794,8 @@
   display_soci ()
   display_stdair ()
   display_airrac ()
+  display_rmol ()
+  display_airinv ()
   #
   message (STATUS)
   message (STATUS "Change a value with: cmake -D<Variable>=<Value>" )


[Config] Fixed the delivery directory of Python modules and libraries

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -497,7 +497,7 @@

     # Set the Python installation directory
     set (INSTALL_PY_LIB_DIR
-      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
       CACHE PATH "Installation directory for Python libraries")

     # Update the list of include directories for the project
@@ -1461,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


The viewer now requires the 10.7 SDK or above to compile.

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -140,10 +140,10 @@
   else (XCODE_VERSION GREATER 4.5)
   if (XCODE_VERSION GREATER 4.2)
     set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
-    set(CMAKE_OSX_SYSROOT macosx10.6)
+    set(CMAKE_OSX_SYSROOT macosx10.7)
   else (XCODE_VERSION GREATER 4.2)
-    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
-    set(CMAKE_OSX_SYSROOT macosx10.6)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
+    set(CMAKE_OSX_SYSROOT macosx10.7)
   endif (XCODE_VERSION GREATER 4.2)
   endif (XCODE_VERSION GREATER 4.5)


Remove extra-space

Remove extra-space

Change-Id: I07586e4f02250dc6372c71efc138c4a276f2404a
Reviewed-on: http://review.couchbase.org/82002
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
Tested-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GenerateConfigDotH.cmake
+++ cmake/Modules/GenerateConfigDotH.cmake
@@ -9,7 +9,7 @@
     CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME)
     CHECK_FUNCTION_EXISTS(setitimer HAVE_SETITIMER)
     CHECK_SYMBOL_EXISTS(htonll arpa/inet.h HAVE_HTONLL)
-    CHECK_SYMBOL_EXISTS(res_search "netinet/in.h; resolv.h" HAVE_RES_SEARCH)
+    CHECK_SYMBOL_EXISTS(res_search "netinet/in.h;resolv.h" HAVE_RES_SEARCH)
     CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
     CHECK_INCLUDE_FILES(netdb.h HAVE_NETDB_H)
     CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)


build(cmake): bump libs version to 5727c45

Signed-off-by: Michele Zuccala <47483730395cccb6448ad7313d5cedb48de25e40@zuccala.com>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -20,8 +20,8 @@
 # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
 # -DFALCOSECURITY_LIBS_VERSION=dev ..`
 if(NOT FALCOSECURITY_LIBS_VERSION)
-  set(FALCOSECURITY_LIBS_VERSION "f7029e2522cc4c81841817abeeeaa515ed944b6c")
-  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=63e602c05db142465211e2d151d0ccd08fdb613fe85dd3603c8298bc0108823a")
+  set(FALCOSECURITY_LIBS_VERSION "5727c456ce22f3c1da8c3b1d7d6b6937a9b2126b")
+  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=549d2dd29109d12cc3eb261d86b35c637ac16796f6d88c39dce02f6d1cdf737d")
 endif()

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


Skip the line for Dr.Heapstat if ~~Dr.M~~ is anywhere in the line.

The %ANYLINE patterns can move these markers off of the start of the
line.  This change will allow the winthreads test to pass under
drheapstat.

git-svn-id: fe3cd4388a6e5a968b09397a3d721fe124e8117a@672 5b54908e-ead4-fc18-b48a-0285e6dbc711

--- tests/runtest.cmake
+++ tests/runtest.cmake
@@ -391,10 +391,11 @@
     string(REGEX REPLACE "\n" "\r?\n" line "${line}")
   endif (WIN32)
   if (NOT "${cmd_tomatch}" MATCHES "${line}")
-    # ignore Dr. Memory lines for Dr. Heapstat
+    # Ignore Dr. Memory lines for Dr. Heapstat.  Match ~~Dr.M~~ anywhere in the
+    # line, since %ANYLINE can insert a paren at the beginning of the line.
     # FIXME PR 470723: add Dr. Heapstat-specific tests
     if (NOT TOOL_DR_HEAPSTAT OR
-        NOT "${line}" MATCHES "^~~Dr\\\\.M~~")
+        NOT "${line}" MATCHES "~~Dr\\\\.M~~")
       strip_trailing_newline_regex(line "${line}")
       set(msg "stderr failed to match \"${line}\"")
       # try to find what was meant to match


[Build] Towards a unique CMake support file for all the projects. In more details, the AirSched (not used by OpenTREP) component has been renamed into AirTSP.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -389,9 +389,9 @@
       get_travelccm (${_arg_version})
     endif (${_arg_lower} STREQUAL "travelccm")

-    if (${_arg_lower} STREQUAL "airsched")
-      get_airsched (${_arg_version})
-    endif (${_arg_lower} STREQUAL "airsched")
+    if (${_arg_lower} STREQUAL "airtsp")
+      get_airtsp (${_arg_version})
+    endif (${_arg_lower} STREQUAL "airtsp")

     if (${_arg_lower} STREQUAL "airrac")
       get_airrac (${_arg_version})
@@ -691,28 +691,28 @@
 #    if the debug one is specified also include debug/optimized keywords
 #    in *_LIBRARIES variable
 function(_protobuf_find_libraries name filename)
-   find_library(${name}_LIBRARY
-       NAMES ${filename}
-       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
-   mark_as_advanced(${name}_LIBRARY)
-
-   find_library(${name}_LIBRARY_DEBUG
-       NAMES ${filename}
-       PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
-   mark_as_advanced(${name}_LIBRARY_DEBUG)
-
-   if(NOT ${name}_LIBRARY_DEBUG)
-      # There is no debug library
-      set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
-      set(${name}_LIBRARIES     ${${name}_LIBRARY} PARENT_SCOPE)
-   else()
-      # There IS a debug library
-      set(${name}_LIBRARIES
-          optimized ${${name}_LIBRARY}
-          debug     ${${name}_LIBRARY_DEBUG}
-          PARENT_SCOPE
+  find_library(${name}_LIBRARY
+    NAMES ${filename}
+    PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release)
+  mark_as_advanced(${name}_LIBRARY)
+
+  find_library(${name}_LIBRARY_DEBUG
+    NAMES ${filename}
+    PATHS ${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug)
+  mark_as_advanced(${name}_LIBRARY_DEBUG)
+
+  if(NOT ${name}_LIBRARY_DEBUG)
+    # There is no debug library
+    set(${name}_LIBRARY_DEBUG ${${name}_LIBRARY} PARENT_SCOPE)
+    set(${name}_LIBRARIES     ${${name}_LIBRARY} PARENT_SCOPE)
+  else()
+    # There IS a debug library
+    set(${name}_LIBRARIES
+      optimized ${${name}_LIBRARY}
+      debug     ${${name}_LIBRARY_DEBUG}
+      PARENT_SCOPE
       )
-   endif()
+  endif()
 endfunction()

 # ~~~~~~~~~~ Protobuf ~~~~~~~~~
@@ -1070,37 +1070,37 @@

 endmacro (get_travelccm)

-# ~~~~~~~~~~ AirSched ~~~~~~~~~
-macro (get_airsched)
+# ~~~~~~~~~~ AirTSP ~~~~~~~~~
+macro (get_airtsp)
   unset (_required_version)
   if (${ARGC} GREATER 0)
     set (_required_version ${ARGV0})
-    message (STATUS "Requires AirSched-${_required_version}")
+    message (STATUS "Requires AirTSP-${_required_version}")
   else (${ARGC} GREATER 0)
-    message (STATUS "Requires AirSched without specifying any version")
+    message (STATUS "Requires AirTSP without specifying any version")
   endif (${ARGC} GREATER 0)

-  find_package (AirSched ${_required_version} REQUIRED
-	HINTS ${WITH_AIRSCHED_PREFIX})
-  if (AirSched_FOUND)
+  find_package (AirTSP ${_required_version} REQUIRED
+	HINTS ${WITH_AIRTSP_PREFIX})
+  if (AirTSP_FOUND)
     #
-    message (STATUS "Found AirSched version: ${AIRSCHED_VERSION}")
+    message (STATUS "Found AirTSP version: ${AIRTSP_VERSION}")

     # Update the list of include directories for the project
-    include_directories (${AIRSCHED_INCLUDE_DIRS})
+    include_directories (${AIRTSP_INCLUDE_DIRS})

     # Update the list of dependencies for the project
-    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRSCHED_LIBRARIES})
-
-  else (AirSched_FOUND)
-    set (ERROR_MSG "The AirSched library cannot be found. If it is installed")
+    set (PROJ_DEP_LIBS_FOR_LIB ${PROJ_DEP_LIBS_FOR_LIB} ${AIRTSP_LIBRARIES})
+
+  else (AirTSP_FOUND)
+    set (ERROR_MSG "The AirTSP library cannot be found. If it is installed")
     set (ERROR_MSG "${ERROR_MSG} in a in a non standard directory, just invoke")
-    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRSCHED_PREFIX=")
-    set (ERROR_MSG "${ERROR_MSG}<AirSched install path> variable.")
+    set (ERROR_MSG "${ERROR_MSG} 'cmake' specifying the -DWITH_AIRTSP_PREFIX=")
+    set (ERROR_MSG "${ERROR_MSG}<AirTSP install path> variable.")
     message (FATAL_ERROR "${ERROR_MSG}")
-  endif (AirSched_FOUND)
-
-endmacro (get_airsched)
+  endif (AirTSP_FOUND)
+
+endmacro (get_airtsp)

 # ~~~~~~~~~~ AirRAC ~~~~~~~~~
 macro (get_airrac)
@@ -1495,7 +1495,7 @@
   if (EXISTS ${PROJ_PATH_CFG_SRC})
     set (PROJ_PATH_CFG ${PROJ_PATH_CFG_DIR}/${MODULE_NAME}-paths.hpp)
     configure_file (${PROJ_PATH_CFG_SRC} ${PROJ_PATH_CFG} @ONLY)
-
+
     # Add the 'hdr_cfg_${MODULE_NAME}' target, depending on the converted header
     add_custom_target (hdr_cfg_${MODULE_NAME} ALL DEPENDS ${PROJ_PATH_CFG})

@@ -2288,9 +2288,9 @@
     foreach (_option_item ${ARGN})
       string (REGEX MATCH "MAN([1-9])" _current_section_tmp "${_option_item}")
       if ("${CMAKE_MATCH_1}" STREQUAL "")
-	list (APPEND _man_arg_MAN${_current_section} ${_option_item})
+		list (APPEND _man_arg_MAN${_current_section} ${_option_item})
       else ("${CMAKE_MATCH_1}" STREQUAL "")
-	set (_current_section "${CMAKE_MATCH_1}")
+		set (_current_section "${CMAKE_MATCH_1}")
       endif ("${CMAKE_MATCH_1}" STREQUAL "")
     endforeach (_option_item ${ARGN})
   endif (${CMAKE_VERSION} VERSION_GREATER 2.8.1)
@@ -2683,19 +2683,19 @@
   endif (TravelCCM_FOUND)
 endmacro (display_travelccm)

-# AirSched
-macro (display_airsched)
-  if (AirSched_FOUND)
+# AirTSP
+macro (display_airtsp)
+  if (AirTSP_FOUND)
     message (STATUS)
-    message (STATUS "* AirSched:")
-    message (STATUS "  - AIRSCHED_VERSION .............. : ${AIRSCHED_VERSION}")
-    message (STATUS "  - AIRSCHED_BINARY_DIRS .......... : ${AIRSCHED_BINARY_DIRS}")
-    message (STATUS "  - AIRSCHED_EXECUTABLES .......... : ${AIRSCHED_EXECUTABLES}")
-    message (STATUS "  - AIRSCHED_LIBRARY_DIRS ......... : ${AIRSCHED_LIBRARY_DIRS}")
-    message (STATUS "  - AIRSCHED_LIBRARIES ............ : ${AIRSCHED_LIBRARIES}")
-    message (STATUS "  - AIRSCHED_INCLUDE_DIRS ......... : ${AIRSCHED_INCLUDE_DIRS}")
-  endif (AirSched_FOUND)
-endmacro (display_airsched)
+    message (STATUS "* AirTSP:")
+    message (STATUS "  - AIRTSP_VERSION .............. : ${AIRTSP_VERSION}")
+    message (STATUS "  - AIRTSP_BINARY_DIRS .......... : ${AIRTSP_BINARY_DIRS}")
+    message (STATUS "  - AIRTSP_EXECUTABLES .......... : ${AIRTSP_EXECUTABLES}")
+    message (STATUS "  - AIRTSP_LIBRARY_DIRS ......... : ${AIRTSP_LIBRARY_DIRS}")
+    message (STATUS "  - AIRTSP_LIBRARIES ............ : ${AIRTSP_LIBRARIES}")
+    message (STATUS "  - AIRTSP_INCLUDE_DIRS ......... : ${AIRTSP_INCLUDE_DIRS}")
+  endif (AirTSP_FOUND)
+endmacro (display_airtsp)

 # AirRAC
 macro (display_airrac)
@@ -2836,14 +2836,14 @@
 ##
 macro (display_doc_generation)
   message (STATUS)
-    message (STATUS "* Documentation to be generated ... :")
-	if (INSTALL_DOC)
-      message (STATUS "  + HTML main page ................ : ${DOXYGEN_OUTPUT_REL}")
-      message (STATUS "  + CSS-related files ............. : ${CSS_ALL_TARGETS}")
-      message (STATUS "  + Image-related files ........... : ${IMG_ALL_TARGETS}")
-      message (STATUS "  + PDF reference manual .......... : ${REFMAN_TEX} => ${REFMAN_PDF}")
-	endif (INSTALL_DOC)
-    message (STATUS "  + Man page sections ............. : ${MAN_ALL_TARGETS}")
+  message (STATUS "* Documentation to be generated ... :")
+  if (INSTALL_DOC)
+    message (STATUS "  + HTML main page ................ : ${DOXYGEN_OUTPUT_REL}")
+    message (STATUS "  + CSS-related files ............. : ${CSS_ALL_TARGETS}")
+    message (STATUS "  + Image-related files ........... : ${IMG_ALL_TARGETS}")
+    message (STATUS "  + PDF reference manual .......... : ${REFMAN_TEX} => ${REFMAN_PDF}")
+  endif (INSTALL_DOC)
+  message (STATUS "  + Man page sections ............. : ${MAN_ALL_TARGETS}")
 endmacro (display_doc_generation)

 ##
@@ -2935,7 +2935,7 @@
   display_sevmgr ()
   display_trademgen ()
   display_travelccm ()
-  display_airsched ()
+  display_airtsp ()
   display_airrac ()
   display_rmol ()
   display_airinv ()


[Build] Factorisation is now over for the CMake configuration for the embeddable project. There is still some work to do to merge it with StdAir's project CMake framework.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -427,6 +427,13 @@
   # for the building process (see below), because that latter needs those paths
   # to be correctly set.
   include (config/project_install_dirs.cmake)
+
+  ##
+  # Initialise the list of targets to build: libraries, binaries and tests
+  set (PROJ_ALL_LIB_TARGETS "")
+  set (PROJ_ALL_BIN_TARGETS "")
+  set (PROJ_ALL_TST_TARGETS "")
+
 endmacro (init_build)

 ####
@@ -542,6 +549,10 @@
   # by the module_generate_config_helpers() macro
   add_dependencies (${MODULE_LIB_TARGET} hdr_cfg_${MODULE_NAME})

+  # Register the library target in the project (for reporting purpose)
+  set (PROJ_ALL_LIB_TARGETS
+	${PROJ_ALL_LIB_TARGETS} ${MODULE_LIB_TARGET} PARENT_SCOPE)
+
   ##
   # Library name (and soname)
   set (_module_lib_name ${MODULE_NAME})
@@ -585,6 +596,99 @@
   install (EXPORT ${LIB_DEPENDENCY_EXPORT} DESTINATION
     "${INSTALL_DATA_DIR}/${PACKAGE}/CMake" COMPONENT devel)
 endmacro (module_export_install)
+
+##
+# Assembling: specify the standard binary target for the current module.
+macro (module_binary_add_standard)
+  # Register the binary
+  add_executable (${MODULE_NAME} batches/${MODULE_NAME}.cpp)
+
+  # Register the dependencies on which the binary depends upon
+  target_link_libraries (${MODULE_NAME}
+	${PROJ_DEP_LIBS_FOR_BIN} ${MODULE_LIB_TARGET} ${_intermodule_dependencies})
+
+  # Register the binary target in the project (for reporting purpose)
+  set (PROJ_ALL_BIN_TARGETS ${PROJ_ALL_BIN_TARGETS} ${MODULE_NAME} PARENT_SCOPE)
+endmacro (module_binary_add_standard)
+
+##
+# Binary installation
+# The parameter corresponds to additional binaries to be installed.
+# When no parameter is given, only the standard binary is installed.
+macro (module_binary_install_all)
+  install (TARGETS ${MODULE_NAME}
+	EXPORT ${LIB_DEPENDENCY_EXPORT}
+	RUNTIME DESTINATION "${INSTALL_BIN_DIR}" COMPONENT runtime)
+endmacro (module_binary_install_all)
+
+
+###################################################################
+##                            Tests                              ##
+###################################################################
+#
+macro (add_test_suites _test_suite_dir_list)
+  if (Boost_FOUND)
+	# Tell CMake/CTest that tests will be performed
+	enable_testing()
+
+	#
+	foreach (_module_name ${_test_suite_dir_list})
+	  set (${_module_name}_ALL_TST_TARGETS "")
+	  # Each individual test suite is specified within the dedicated
+	  # sub-directory
+	  add_subdirectory (test/${_module_name})
+	  add_custom_target (check DEPENDS check_${_module_name}tst)
+	endforeach (_module_name)
+  endif (Boost_FOUND)
+
+endmacro (add_test_suites)
+
+#
+macro (module_test_add_suite _test_name _test_sources)
+  if (Boost_FOUND)
+	# Register the test binary target
+	add_executable (${_test_name} ${_test_sources})
+
+	# Build the list of library targets on which that test depends upon
+	set (_library_lists "")
+	foreach (_arg_lib ${ARGV})
+	  if (NOT ${_arg_lib} STREQUAL ${_test_name}
+		  AND NOT ${_arg_lib} STREQUAL ${_test_sources})
+		set (_library_lists ${_library_lists} ${_arg_lib})
+	  endif ()
+	endforeach (_arg_lib)
+
+	# Tell the test binary that it depends on all those libraries
+	target_link_libraries (${_test_name} ${_library_lists}
+	  ${MODULE_LIB_TARGET} ${PROJ_DEP_LIBS_FOR_TST})
+
+	# Register the binary target in the module
+	set (${MODULE_NAME}_ALL_TST_TARGETS
+	  ${${MODULE_NAME}_ALL_TST_TARGETS} ${_test_name})
+
+	# Register the test
+	if (WIN32)
+	  add_test (${_test_name} ${_test_name}.exe)
+	else (WIN32)
+	  add_test (${_test_name} ${_test_name})
+	endif (WIN32)
+  endif (Boost_FOUND)
+
+  # Register the binary target in the project (for reporting purpose)
+  set (PROJ_ALL_TST_TARGETS
+	${PROJ_ALL_TST_TARGETS} ${${MODULE_NAME}_ALL_TST_TARGETS} PARENT_SCOPE)
+
+endmacro (module_test_add_suite)
+
+#
+macro (module_test_build_all)
+  if (Boost_FOUND)
+	# Tell how to test, i.e., how to run the test binaries
+	# and collect the results
+	add_custom_target (check_${MODULE_NAME}tst
+	  COMMAND ${CMAKE_CTEST_COMMAND} DEPENDS ${PROJ_ALL_TST_TARGETS})
+  endif (Boost_FOUND)
+endmacro (module_test_build_all)

 ###################################################################
@@ -708,7 +812,9 @@
   message (STATUS "---------------------------")
   message (STATUS "--- Build Configuration ---")
   message (STATUS "---------------------------")
-  message (STATUS "Embedded components = ${EMBEDDED_COMPONENTS}")
+  message (STATUS "Libraries to build ... : ${PROJ_ALL_LIB_TARGETS}")
+  message (STATUS "Binaries to build .... : ${PROJ_ALL_BIN_TARGETS}")
+  message (STATUS "Tests to build ....... : ${PROJ_ALL_TST_TARGETS}")
   message (STATUS "BUILD_SHARED_LIBS = ${BUILD_SHARED_LIBS}")
   message (STATUS "CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}")
   message (STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")


Deleting unemap.cmake, it was never used and this cmake cross-platform build doesn't build a motif version of cmgui.

https://tracker.physiomeproject.org/show_bug.cgi?id=2566

git-svn-id: 4705079bc6b8aadf675e3696f5c015a6aa4916e3@7907 3c1deb5b-d424-0410-962d-aba41a686d42

--- source/unemap.cmake
+++ source/unemap.cmake
@@ -1,43 +0,0 @@
-
-# Defines UNEMAP_SRCS
-
-IF( USE_UNEMAP )
-
-	SET( UNEMAP TRUE )
-	SET( SPECTRAL_TOOLS TRUE )
-	SET( UNEMAP_USE_3D TRUE )
-	SET( NOT_ACQUISITION_ONLY TRUE )
-
-	SET( UNEMAP_SRCS unemap_application/acquisition.c
-		unemap_application/acquisition_window.c
-		unemap_application/acquisition_work_area.c
-		unemap_application/analysis.c
-		unemap_application/analysis_calculate.c
-		unemap_application/analysis_drawing.c
-		unemap_application/analysis_window.c
-		unemap_application/analysis_work_area.c
-		unemap_application/bard.c
-		unemap_application/beekeeper.c
-		unemap_application/cardiomapp.c
-		unemap_application/delaunay.c
-		unemap_application/edf.c
-		unemap_application/eimaging_time_dialog.c
-		unemap_application/drawing_2d.c
-		unemap_application/interpolate.c
-		unemap_application/map_dialog.c
-		unemap_application/mapping.c
-		unemap_application/mapping_window.c
-		unemap_application/neurosoft.c
-		unemap_application/pacing_window.c
-		unemap_application/page_window.c
-		unemap_application/rig.c
-		unemap_application/rig_node.c
-		unemap_application/setup_dialog.c
-		unemap_application/spectral_methods.c
-		unemap_application/system_window.c
-		unemap_application/trace_window.c
-		unemap_application/unemap_command.c
-		unemap_application/unemap_hardware_client.c
-		unemap_application/unemap_package.c )
-ENDIF( USE_UNEMAP )
-


SuperBuild: qt4 wrong path for configure_qt4.sh.in

--- SuperBuild/CMake/External_qt4.cmake
+++ SuperBuild/CMake/External_qt4.cmake
@@ -42,17 +42,17 @@
     ${CMAKE_SOURCE_DIR}/patches/QT4/configure_qt4.bat.in
     ${CMAKE_BINARY_DIR}/configure_qt4.bat
     @ONLY)
-
+
   set(QT4_CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/configure_qt4.bat)
-
+
 else()
   configure_file(
-    ${QT4_SB_SRC}/patches/QT4/configure_qt4.sh.in
+    ${CMAKE_SOURCE_DIR}/patches/patches/QT4/configure_qt4.sh.in
     ${CMAKE_BINARY_DIR}/configure_qt4.sh
     @ONLY)
-
+
   set(QT4_CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/configure_qt4.sh)
-
+
 endif()

   ExternalProject_Add(QT4
@@ -72,11 +72,11 @@
  #RK: Because QT4 sucks with qmake -query.
   ExternalProject_Add_Step(QT4 copy_specs
     COMMAND
-    ${CMAKE_COMMAND} -E copy_directory
+    ${CMAKE_COMMAND} -E copy_directory
     ${QT4_SB_SRC}/mkspecs ${SB_INSTALL_PREFIX}/mkspecs
     DEPENDEES patch update
     DEPENDERS configure )
-
+
   ExternalProject_Add_Step(QT4 _jpeg_lib_name
     COMMAND
     ${CMAKE_COMMAND} -E copy
@@ -84,7 +84,7 @@
     ${QT4_SB_SRC}/src/gui/image/
     DEPENDEES patch update
     DEPENDERS configure )
-
+
 endif()


SuperBuild: gdal use same dir for src and build because autoconf

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -33,18 +33,18 @@
       PREFIX GDAL
       URL "http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz"
       URL_MD5 866a46f72b1feadd60310206439c1a76
-      BINARY_DIR ${GDAL_SB_BUILD_DIR}
+      SOURCE_DIR ${GDAL_SB_SRC}
+      BINARY_DIR ${GDAL_SB_SRC}
       INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
       DEPENDS ${GDAL_DEPENDENCIES}
       PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
         COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/GDAL/S2_patch ${GDAL_SB_SRC}
-        COMMAND ${CMAKE_COMMAND} -E copy_directory ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
       CONFIGURE_COMMAND
         # use 'env' because CTest launcher doesn't perform shell interpretation
         ${SB_ENV_CONFIGURE_CMD}
-        ${GDAL_SB_BUILD_DIR}/configure
+        ${GDAL_SB_SRC}/configure
         --prefix=${SB_INSTALL_PREFIX}
         --enable-static=no
         --without-ogdi
@@ -59,8 +59,6 @@
       BUILD_COMMAND $(MAKE)
       INSTALL_COMMAND $(MAKE) install
     )
-
-  FIX_RPATH_FOR_AUTOCONF_BUILD(GDAL "libgdal*.dylib")

   else(MSVC)
   ##add libkml
@@ -77,17 +75,16 @@
        URL "http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz"
        URL_MD5 866a46f72b1feadd60310206439c1a76
        SOURCE_DIR ${GDAL_SB_SRC}
-       BINARY_DIR ${GDAL_SB_BUILD_DIR}
+       BINARY_DIR ${GDAL_SB_SRC}
        INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
        DEPENDS ${GDAL_DEPENDENCIES}
        PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/patches/GDAL/GNUmakefile ${GDAL_SB_SRC}/swig/python/GNUmakefile
         COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/patches/GDAL/S2_patch ${GDAL_SB_SRC}
-        COMMAND ${CMAKE_COMMAND} -E copy_directory  ${GDAL_SB_SRC} ${GDAL_SB_BUILD_DIR}
        CONFIGURE_COMMAND  ${CMAKE_COMMAND} -E copy  ${CMAKE_SOURCE_DIR}/patches/GDAL/ogrsqlitevirtualogr.cpp
-      ${GDAL_SB_BUILD_DIR}/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
-       BUILD_COMMAND nmake /f ${GDAL_SB_BUILD_DIR}/makefile.vc MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
-       INSTALL_COMMAND nmake /f ${GDAL_SB_BUILD_DIR}/makefile.vc devinstall MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
+      ${GDAL_SB_SRC}/ogr/ogrsf_frmts/sqlite/ogrsqlitevirtualogr.cpp
+       BUILD_COMMAND nmake /f ${GDAL_SB_SRC}/makefile.vc MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
+       INSTALL_COMMAND nmake /f ${GDAL_SB_SRC}/makefile.vc devinstall MSVC_VER=${MSVC_VERSION} EXT_NMAKE_OPT=${CMAKE_BINARY_DIR}/nmake_gdal_extra.opt
     )

   endif()


+ Strip the build path from the file listings created in the doxygen output.

--- src/rezplugins/build_system/cmake_files/RezInstallDoxygen.cmake
+++ src/rezplugins/build_system/cmake_files/RezInstallDoxygen.cmake
@@ -124,6 +124,7 @@
 			COMMAND echo ${_extract_all} >> ${dest_dir}/Doxyfile
 			COMMAND echo INPUT = ${INSTDOX_FILES} >> ${dest_dir}/Doxyfile
 			COMMAND echo IMAGE_PATH = ${CMAKE_SOURCE_DIR}/${INSTDOX_IMAGEPATH} >> ${dest_dir}/Doxyfile
+			COMMAND echo STRIP_FROM_PATH = ${CMAKE_SOURCE_DIR} >> ${dest_dir}/Doxyfile
 			COMMENT "Generating Doxyfile ${dest_dir}/Doxyfile..."
 			VERBATIM
 		)


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 11)

 # 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 05)

 # 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 08)

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


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   14)
+SET(KWSYS_DATE_STAMP_DAY   15)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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 08)

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   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 02)

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


Use fork() instead of clone() for valgrind death tests.

--- CMake/SurgSimUtilities.cmake
+++ CMake/SurgSimUtilities.cmake
@@ -37,11 +37,16 @@

 set(SURGSIM_COPY_WARNING_ONCE TRUE)
 set(SURGSIM_TEST_RUN_PREFIX)
+set(SURGSIM_TEST_RUN_SUFFIX)
 if(NOT WIN32)
 	if(SURGSIM_TESTS_RUN_WITH_VALGRIND)
 		set(SURGSIM_TEST_RUN_PREFIX valgrind --tool=memcheck --error-exitcode=1
 			--fullpath-after=
 			--suppressions=${SURGSIM_TOOLS_DIR}/memcheck.supp --gen-suppressions=all)
+		# The following assumes that the test is using Google Test.
+		# It's needed because by default tests use clone(), which doesn't
+		# play well with valgrind; fork() is supposed to work better.
+		set(SURGSIM_TEST_RUN_SUFFIX --gtest_death_test_use_fork)
 		if(SURGSIM_TESTS_RUN_WITH_VALGRIND_VERBOSE)
 			set(SURGSIM_TEST_RUN_PREFIX ${SURGSIM_TEST_RUN_PREFIX} -v)
 		endif(SURGSIM_TESTS_RUN_WITH_VALGRIND_VERBOSE)
@@ -168,6 +173,7 @@
 	if(NOT SURGSIM_TESTS_ALL_IN_ONE)
 		add_custom_command(TARGET ${TESTNAME} POST_BUILD
 			COMMAND ${SURGSIM_TEST_RUN_PREFIX} $<TARGET_FILE:${TESTNAME}>
+				${SURGSIM_TEST_RUN_SUFFIX}
 			VERBATIM)
 	endif()
 endmacro()


Wrapping: De-duplicate vtk_wrap_hierarchy argument file name

Use a variable to hold the name of the arguments file.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -28,9 +28,10 @@
   endforeach()

   # write wrapper-tool arguments to a file
+  set(_args_file ${module_name}Hierarchy.args)
   string(STRIP "${_common_args}" CMAKE_CONFIGURABLE_FILE_CONTENT)
   configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in
-                 ${module_name}Hierarchy.args @ONLY)
+                 ${_args_file} @ONLY)

   # list of all files to wrap
   set(VTK_WRAPPER_INIT_DATA)
@@ -135,13 +136,13 @@
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${module_name}Hierarchy.stamp.txt
            ${help_ninja}
     COMMAND ${VTK_WRAP_HIERARCHY_EXE}
-            @${module_name}Hierarchy.args -o ${OUTPUT_DIR}/${module_name}Hierarchy.txt
+            @${_args_file} -o ${OUTPUT_DIR}/${module_name}Hierarchy.txt
             ${module_name}Hierarchy.data
             ${OTHER_HIERARCHY_FILES}
     COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${module_name}Hierarchy.stamp.txt
     COMMENT "For ${module_name} - updating ${module_name}Hierarchy.txt"
     DEPENDS ${VTK_WRAP_HIERARCHY_EXE}
-            ${CMAKE_CURRENT_BINARY_DIR}/${module_name}Hierarchy.args
+            ${CMAKE_CURRENT_BINARY_DIR}/${_args_file}
             ${CMAKE_CURRENT_BINARY_DIR}/${module_name}Hierarchy.data
             ${OTHER_HIERARCHY_FILES}
             ${INPUT_FILES}


cmake: Do not remove libresolv from required libraries.

Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@samba.org>
Reviewed-by: Michael Adam <dcf2bf3ff8ea93047d51252815aac9756207ea09@samba.org>

--- ConfigureChecks.cmake
+++ ConfigureChecks.cmake
@@ -51,6 +51,8 @@
 check_include_file(resolv.h HAVE_RESOLV_H)

 # FUNCTIONS
+set(CMAKE_REQUIRED_LIBRARIES)
+
 find_library(RESOLV_LIRBRARY resolv)

 if (RESOLV_LIRBRARY)
@@ -91,8 +93,6 @@

 check_function_exists(res_nsearch HAVE_RES_NSEARCH)
 check_function_exists(__res_nsearch HAVE___RES_NSEARCH)
-
-set(CMAKE_REQUIRED_LIBRARIES)

 if (UNIX)
     if (NOT LINUX)


Implement COMMON_USE_CXX03 to disable c++11 features

--- Compiler.cmake
+++ Compiler.cmake
@@ -1,4 +1,5 @@
-# Copyright (c) 2012-2013 Fabien Delalondre <fabien.delalondre@epfl.ch>
+# Copyright (c) 2012-2014 Fabien Delalondre <fabien.delalondre@epfl.ch>
+#                         Stefan.Eilemann@epfl.ch
 #
 # Sets compiler optimization, definition and warnings according to
 # chosen compiler. Supported compilers are XL, Intel, Clang, gcc (4.4
@@ -6,6 +7,7 @@
 #
 # Input Variables
 # * COMMON_MINIMUM_GCC_VERSION check for a minimum gcc version, default 4.4
+# * COMMON_USE_CXX03 When set, do not enable C++11 language features
 #
 # Output Variables
 # * GCC_COMPILER_VERSION The compiler version if gcc is used
@@ -60,26 +62,30 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wuninitialized")

-  if(NOT GCC_COMPILER_VERSION VERSION_LESS 4.3)
-    if(GCC_COMPILER_VERSION VERSION_LESS 4.7)
-      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
-    else()
+  if(NOT COMMON_USE_CXX03)
+    if(CMAKE_COMPILER_IS_CLANG)
       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+    elseif(NOT GCC_COMPILER_VERSION VERSION_LESS 4.3)
+      if(GCC_COMPILER_VERSION VERSION_LESS 4.7)
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
+      else()
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+      endif()
     endif()
-  endif()
-  if(CMAKE_COMPILER_IS_CLANG)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
   endif()

 # icc
 elseif(CMAKE_COMPILER_IS_INTEL)
   set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_GCC_FLAGS}")
-  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_GCC_FLAGS} -std=c++11 -Wno-deprecated -Wno-unknown-pragmas -Wshadow -fno-strict-aliasing -Wuninitialized -Wsign-promo -Wnon-virtual-dtor")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMMON_GCC_FLAGS} -Wno-deprecated -Wno-unknown-pragmas -Wshadow -fno-strict-aliasing -Wuninitialized -Wsign-promo -Wnon-virtual-dtor")

   # Release: automatically generate instructions for the highest
   # supported compilation host
   set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -xhost")
   set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -xhost")
+  if(NOT COMMON_USE_CXX03)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+  endif()

 # xlc/BlueGene/PPC
 elseif(CMAKE_COMPILER_IS_XLCXX)


Fix portfile generation

Fix portfile generation

--- MacPorts.cmake
+++ MacPorts.cmake
@@ -41,7 +41,7 @@
 set(PORTFILE "${CMAKE_BINARY_DIR}/${PORTFILE_DIR}/Portfile")
 set(PORTFILE_GH "${PORTFILE_GH_DIR}/${PORTFILE_DIR}/Portfile")

-configure_file(${CMAKE_SOURCE_DIR}/CMake/Portfile ${PORTFILE} @ONLY)
+configure_file(${CMAKE_CURRENT_LIST_DIR}/Portfile ${PORTFILE} @ONLY)
 install(FILES ${PORTFILE} DESTINATION ${PORTFILE_DIR} COMPONENT lib)
 install(CODE
   "execute_process(COMMAND /opt/local/bin/portindex ${CMAKE_INSTALL_PREFIX}/ports)"


audio: Remove unused MAGNUM_PLUGINS_IMPORTER_DIR define.

No textures are imported anymore.

Signed-off-by: Squareys <0f6a03d4883e012ba4cb2c581a68f35544703cd6@googlemail.com>

--- src/audio/configure.h.cmake
+++ src/audio/configure.h.cmake
@@ -1,4 +1,4 @@
-/*
+/*
     This file is part of Magnum.

     Copyright © 2010, 2011, 2012, 2013, 2014, 2015
@@ -24,9 +24,7 @@
 */

 #ifdef CORRADE_IS_DEBUG_BUILD
-#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DEBUG_DIR}"
 #define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_DIR}"
 #else
-#define MAGNUM_PLUGINS_IMPORTER_DIR "${MAGNUM_PLUGINS_IMPORTER_DIR}"
 #define MAGNUM_PLUGINS_AUDIOIMPORTER_DIR "${MAGNUM_PLUGINS_AUDIOIMPORTER_DIR}"
 #endif


Clean leftover commented line

Clean leftover commented line

--- build.cmake
+++ build.cmake
@@ -126,7 +126,6 @@
     string(LENGTH "${OptionName}" OPT_LEN)
     math(EXPR SPACING_LEN "${SPACING_MAX} - ${OPT_LEN}")
     string(SUBSTRING "${SPACING}" 0 ${SPACING_LEN} SPACING_1ST)
-    #set(BUILD_SCRIPT_OPTIONS_DOC "${BUILD_SCRIPT_OPTIONS_DOC}  ${OptionName}${SPACING_1ST}${HelpDoc} (${DefaultValue})\n")
     set(BUILD_SCRIPT_OPTIONS_DOC "${BUILD_SCRIPT_OPTIONS_DOC}  ${OptionName}${SPACING_1ST}${HelpDoc}  (${DefaultValue})")
     foreach(DOCSTR ${ARGN})
         set(BUILD_SCRIPT_OPTIONS_DOC "${BUILD_SCRIPT_OPTIONS_DOC}\n    ${SPACING}${DOCSTR}")


BUG: copy-paste mistake

BUG: copy-paste mistake

--- Modules/Components/ElastixComponent/ModuleElastixComponent.cmake
+++ Modules/Components/ElastixComponent/ModuleElastixComponent.cmake
@@ -19,13 +19,13 @@

 set( MODULE ModuleElastixComponent )

-+# If OpenMP is supported by this machine, elastix will be compiled with
-+# OpenMP flags, and we need to add them here as well
-+find_package( OpenMP )
-+if (OPENMP_FOUND)
-+  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
-+  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
-+endif()
+# If OpenMP is supported by this machine, elastix will be compiled with
+# OpenMP flags, and we need to add them here as well
+find_package( OpenMP )
+if (OPENMP_FOUND)
+  set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
+  set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}" )
+endif()

 # Find UseElastix.cmake
 if( NOT EXISTS ${ELASTIX_USE_FILE} )


Fix Apr include variable scope

Fix Apr include variable scope

--- external/nupic_core.cmake
+++ external/nupic_core.cmake
@@ -97,9 +97,11 @@
 set(SWIG_DIR "${NUPIC_CORE_THIRDPARTY_DIR}/share/swig/3.0.2" PARENT_SCOPE)

 # Apr1
+set(APR1_STATIC_LIB_INC_DIR "${NUPIC_CORE_THIRDPARTY_DIR}/Apr1StaticLib/include")
 set(APR1_STATIC_LIB_INC_DIR "${NUPIC_CORE_THIRDPARTY_DIR}/Apr1StaticLib/include" PARENT_SCOPE)

 # Aprutil1
+set(APRUTIL1_STATIC_LIB_INC_DIR "${NUPIC_CORE_THIRDPARTY_DIR}/AprUtil1StaticLib/include")
 set(APRUTIL1_STATIC_LIB_INC_DIR "${NUPIC_CORE_THIRDPARTY_DIR}/AprUtil1StaticLib/include" PARENT_SCOPE)

 # Capnp


fix ADD_LINTER_TESTS

fix ADD_LINTER_TESTS

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -145,7 +145,7 @@
   set(rosidl_generate_interfaces_IDL_FILES ${_idl_files})
   set(rosidl_generate_interfaces_DEPENDENCY_PACKAGE_NAMES ${_recursive_dependencies})
   set(rosidl_generate_interfaces_SKIP_INSTALL ${_ARG_SKIP_INSTALL})
-  set(rosidl_generate_interfaces_ADD_LINTER_TESTS ${_ARG_LINT_INTERFACES})
+  set(rosidl_generate_interfaces_ADD_LINTER_TESTS ${_ARG_ADD_LINTER_TESTS})
   ament_execute_extensions("rosidl_generate_interfaces")

   if(NOT _ARG_SKIP_INSTALL)


request for more compiler checks

request for more compiler checks

Change-Id: Ifd3fe50217a8efc439aa9606a48f392170e36c69
Reviewed-on: http://review.couchbase.org/c/libcouchbase/+/138669
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -28,17 +28,25 @@
         -Wextra
         -pedantic
         -fdiagnostics-show-option
-        -Wshadow
         -Wformat
         -Wno-strict-aliasing
         -Winit-self
         -Wno-missing-field-initializers
-        -Wno-variadic-macros)
+        -Wno-variadic-macros
+        -Wshadow # warn the user if a variable declaration shadows one from a parent context
+        -Wunused # warn on anything being unused
+        -Wpedantic # warn if non-standard C++ is used
+        )

 IF(CMAKE_C_COMPILER_ID STREQUAL "Clang")
     LIST(APPEND LCB_GNUC_CPP_WARNINGS
             -Wno-cast-align
             -Wno-dollar-in-identifier-extension)
+ELSE()
+    LIST(APPEND LCB_GNUC_CPP_WARNINGS
+            -Wlogical-op # warn about logical operations being used where bitwise were probably wanted
+            -Wuseless-cast # warn if you perform a cast to the same type
+            )
 ENDIF()

 IF(LCB_USE_ASAN)


Fix px4fmu-v2_ekf2 config

Fix px4fmu-v2_ekf2 config

--- cmake/configs/nuttx_px4fmu-v2_ekf2.cmake
+++ cmake/configs/nuttx_px4fmu-v2_ekf2.cmake
@@ -14,29 +14,32 @@
 	drivers/stm32/tone_alarm
 	drivers/led
 	drivers/px4fmu
-	drivers/boards/px4fmu-v4
+	drivers/px4io
+	drivers/boards/px4fmu-v2
 	drivers/rgbled
 	drivers/mpu6000
 	drivers/mpu9250
+	drivers/lsm303d
+	drivers/l3gd20
 	drivers/hmc5883
 	drivers/ms5611
-	drivers/mb12xx
+	#drivers/mb12xx
 	drivers/srf02
 	drivers/sf0x
 	drivers/ll40ls
 	drivers/trone
 	drivers/gps
 	drivers/pwm_out_sim
-	drivers/hott
-	drivers/hott/hott_telemetry
-	drivers/hott/hott_sensors
+	#drivers/hott
+	#drivers/hott/hott_telemetry
+	#drivers/hott/hott_sensors
 	drivers/blinkm
 	drivers/airspeed
 	drivers/ets_airspeed
 	drivers/meas_airspeed
 	drivers/frsky_telemetry
 	modules/sensors
-	drivers/mkblctrl
+	#drivers/mkblctrl
 	drivers/px4flow
 	drivers/oreoled
 	drivers/gimbal
@@ -54,14 +57,13 @@
 	systemcmds/pwm
 	systemcmds/esc_calib
 	systemcmds/reboot
-	systemcmds/topic_listener
+	#systemcmds/topic_listener
 	systemcmds/top
 	systemcmds/config
 	systemcmds/nshterm
 	systemcmds/mtd
 	systemcmds/dumpfile
 	systemcmds/ver
-	systemcmds/tests

 	#
 	# General system control
@@ -76,7 +78,7 @@
 	#
 	# Estimation modules (EKF/ SO3 / other filters)
 	#
-	modules/position_estimator_inav
+	# Too high RAM usage due to static allocations
 	modules/ekf2

 	#
@@ -110,7 +112,6 @@
 	#lib/mathlib/CMSIS
 	lib/mathlib
 	lib/mathlib/math/filter
-	lib/rc
 	lib/ecl
 	lib/external_lgpl
 	lib/geo
@@ -123,13 +124,13 @@
 	platforms/nuttx

 	# had to add for cmake, not sure why wasn't in original config
-	platforms/common
+	platforms/common
 	platforms/nuttx/px4_layer

 	#
 	# OBC challenge
 	#
-	modules/bottle_drop
+	#modules/bottle_drop

 	#
 	# Rover apps
@@ -142,7 +143,7 @@
 	#examples/math_demo
 	# Tutorial code from
 	# https://px4.io/dev/px4_simple_app
-	examples/px4_simple_app
+	#examples/px4_simple_app

 	# Tutorial code from
 	# https://px4.io/dev/daemon


Fiddling around with the latest CMake 2.6.2 FindBoost.cmake

git-svn-id: 4ba210d0a933e3fb1aa9ab096f190cd38965d92a@1296 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/boost/FindBoost.cmake
+++ src/CMake/boost/FindBoost.cmake
@@ -286,12 +286,18 @@

   # Try to find Boost by stepping backwards through the Boost versions
   # we know about.
-  FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
-    IF( NOT Boost_INCLUDE_DIR )
+  IF( NOT Boost_INCLUDE_DIR )
+    # Build a list of path suffixes for each version.
+    SET(_boost_PATH_SUFFIXES)
+    FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
       # Add in a path suffix, based on the required version, ideally
       # we could read this from version.hpp, but for that to work we'd
       # need to know the include dir already
-      set(_boost_PATH_SUFFIX ${_boost_VER})
+      if (WIN32 AND NOT CYGWIN)
+        set(_boost_PATH_SUFFIX boost_${_boost_VER})
+      else (WIN32 AND NOT CYGWIN)
+        set(_boost_PATH_SUFFIX boost-${_boost_VER})
+      endif (WIN32 AND NOT CYGWIN)

       IF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
           STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1_\\2_\\3"
@@ -300,27 +306,16 @@
           STRING(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\1_\\2"
             _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
       ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
-
-	  if (BOOST_ROOT)
-      FIND_PATH(Boost_INCLUDE_DIR
-          NAMES         boost/config.hpp
-          HINTS         ${_boost_INCLUDE_SEARCH_DIRS}
-          PATH_SUFFIXES boost-${_boost_PATH_SUFFIX} boost_${_boost_PATH_SUFFIX}
-		  NO_CMAKE_PATH
-		  NO_CMAKE_ENVIRONMENT_PATH
-		  NO_SYSTEM_ENVIRONMENT_PATH
-		  NO_CMAKE_SYSTEM_PATH
+      LIST(APPEND _boost_PATH_SUFFIXES "${_boost_PATH_SUFFIX}")
+    ENDFOREACH(_boost_VER)
+
+    # Look for a standard boost header file.
+    FIND_PATH(Boost_INCLUDE_DIR
+      NAMES         boost/config.hpp
+      HINTS         ${_boost_INCLUDE_SEARCH_DIRS}
+      PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
       )
-	  else (BOOST_ROOT)
-      FIND_PATH(Boost_INCLUDE_DIR
-          NAMES         boost/config.hpp
-          HINTS         ${_boost_INCLUDE_SEARCH_DIRS}
-          PATH_SUFFIXES boost-${_boost_PATH_SUFFIX} boost_${_boost_PATH_SUFFIX}
-      )
-	  endif(BOOST_ROOT)
-
-    ENDIF( NOT Boost_INCLUDE_DIR )
-  ENDFOREACH(_boost_VER)
+  ENDIF( NOT Boost_INCLUDE_DIR )

   IF(Boost_INCLUDE_DIR)
     # Extract Boost_VERSION and Boost_LIB_VERSION from version.hpp


Fix double digit clang version numbers. (2)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -66,7 +66,9 @@
                     set(CC_NAME "clang")
                     exec_program($ENV{CC} ARGS --version OUTPUT_VARIABLE CC_VERSION_VERBOSE)
                     string(REGEX REPLACE ".*clang version ([0-99]+\\.[0-99]+).*" "\\1" CC_VERSION ${CC_VERSION_VERBOSE})
-                    if(CC_VERSION VERSION_GREATER 7.0 OR CC_VERSION VERSION_EQUAL 7.0)
+                    if(CC_VERSION VERSION_GREATER 10.0 OR CC_VERSION VERSION_EQUAL 10.0)
+                        string(SUBSTRING "${CC_VERSION}" 0 2 CC_VERSION)
+                    elseif(CC_VERSION VERSION_GREATER 7.0 OR CC_VERSION VERSION_EQUAL 7.0)
                         string(SUBSTRING "${CC_VERSION}" 0 1 CC_VERSION)
                     endif()
                 endif()


GCC UbSan does not respect log_path.

GCC UbSan does not respect log_path.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -355,14 +355,7 @@
 # Dynamic analysis (UBSan)
 # UBan was introduced in GCC 4.9 / Clang 3.3
 # UBSan respects log_path starting Clang 3.7
-if(CC_NAME STREQUAL "gcc")
-    if(CC_VERSION VERSION_GREATER 4.9 OR CC_VERSION VERSION_EQUAL 4.9)
-        if(CC_UBSAN GREATER 0)
-            set(CTEST_MEMORYCHECK_TYPE "UndefinedBehaviorSanitizer")
-            set(CC_UBSAN_FLAGS "-fsanitize=undefined")
-        endif()
-    endif()
-elseif(CC_NAME STREQUAL "clang")
+if(CC_NAME STREQUAL "clang")
     if(CC_VERSION VERSION_GREATER 3.7 OR CC_VERSION VERSION_EQUAL 3.7)
         if(CC_UBSAN GREATER 0)
             set(CTEST_MEMORYCHECK_TYPE "UndefinedBehaviorSanitizer")


Remove -D_CRT_SECURE_NO_WARNINGS again.

Remove -D_CRT_SECURE_NO_WARNINGS again.

No longer needed since strncpy is now exempt via #pragma.

--- cmake/Modules/CppUTestConfigurationOptions.cmake
+++ cmake/Modules/CppUTestConfigurationOptions.cmake
@@ -1,6 +1,5 @@
 if (MSVC)
     set(CPP_PLATFORM VisualCpp)
-    add_definitions(-D_CRT_SECURE_NO_WARNINGS)
     include_directories(${CppUTestRootDirectory}/include/Platforms/${CPP_PLATFORM})
 elseif (STD_C)
     set(CPP_PLATFORM Gcc)


Generate javascript code if it is requested

Change-Id: Ic415b713a6f9ab6e1189215c541685e550ce7f56

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -542,7 +542,10 @@

     execute_process(
       COMMAND ${KTOOL_ROM_PROCESSOR_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js -it npm
-      OUTPUT_VARIABLE PROCESSOR_OUTPUT
+    )
+
+    execute_process(
+      COMMAND ${KTOOL_ROM_PROCESSOR_EXECUTABLE} -r ${PARAM_MODELS} -dr ${KURENTO_MODULES_DIR} -c ${CMAKE_BINARY_DIR}/js/lib -it js
     )

     add_custom_target(js


Print xf86vmode dependency only in case of Unix or Apple.

--- CMake/PrintSettings.cmake
+++ CMake/PrintSettings.cmake
@@ -38,10 +38,10 @@

 if ((UNIX) OR (APPLE))
 	message(STATUS "    * X11:      ${X11_FOUND}")
-endif ()

-if (IRRIMGUI_BUILD_EXAMPLES)
-	message(STATUS "    * xf86vm:   ${X11_xf86vmode_FOUND}")
+	if (IRRIMGUI_BUILD_EXAMPLES)
+		message(STATUS "    * xf86vm:   ${X11_xf86vmode_FOUND}")
+	endif ()
 endif ()

 message(STATUS " ")


remove "/usr" prefix from Mac installer destination


Remove -D in TBB compile definitions

Remove -D in TBB compile definitions

--- CMake/hoomd/FindTBB.cmake
+++ CMake/hoomd/FindTBB.cmake
@@ -39,6 +39,6 @@

     if (TBB_USE_GLIBCXX_VERSION)
         set_target_properties(TBB::tbb PROPERTIES
-            INTERFACE_COMPILE_DEFINITIONS "-DTBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION}")
+            INTERFACE_COMPILE_DEFINITIONS "TBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION}")
     endif()
 endif()


Adjusted BOOST_INCLUDEDIR for SOFA.

Adjusted BOOST_INCLUDEDIR for SOFA.

--- CMakeExternals/SOFA.cmake
+++ CMakeExternals/SOFA.cmake
@@ -33,7 +33,7 @@

   if(NOT MITK_USE_SYSTEM_Boost)
     list(APPEND additional_cmake_args
-      -DBOOST_INCLUDEDIR:PATH=${CMAKE_BINARY_DIR}/Boost-install/include
+      -DBOOST_INCLUDEDIR:PATH=${CMAKE_BINARY_DIR}/Boost-install/include/boost-1_54
       -DBOOST_LIBRARYDIR:PATH=${CMAKE_BINARY_DIR}/Boost-install/lib
       -DBoost_NO_SYSTEM_PATHS:BOOL=ON
     )


Fixed Caelum link command.

Fixed Caelum link command.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@893 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/Caelum.cmake
+++ CMakeModules/Caelum.cmake
@@ -12,9 +12,9 @@
 endmacro (INCLUDE_CAELUM)

 macro (LINK_CAELUM)
-	if (NOT MSVC)
+	if (MSVC)
 		target_link_libraries (${TARGET_NAME}
 			optimized caelum
 			debug caelum_d)
-	endif (NOT MSVC)
+	endif (MSVC)
 endmacro (LINK_CAELUM)


explicitly allow "test" target with cmake 3.0

--- core/rosbuild/core/rosbuild/public.cmake
+++ core/rosbuild/core/rosbuild/public.cmake
@@ -317,7 +317,12 @@
     add_custom_target(tests)
   endif()
   # The 'test' target runs all but the future tests
+  cmake_policy(PUSH)
+  if(POLICY CMP0037)
+    cmake_policy(SET CMP0037 OLD)
+  endif()
   add_custom_target(test)
+  cmake_policy(POP)
   # We need to build tests before running them.  Addition of this
   # dependency also ensures that old test results get cleaned prior to a
   # new test run.


Removed experimental optional API from the default build options.

--- CMake/TBTKConfigTemplate.cmake
+++ CMake/TBTKConfigTemplate.cmake
@@ -111,11 +111,13 @@
 	TBTK_MESSAGE("[ ] GMP")
 ENDIF(GMP_FOUND)

-IF(GNUPLOT_FOUND)
-	TBTK_MESSAGE("[X] Gnuplot")
-ELSE(GNUPLOT_FOUND)
-	TBTK_MESSAGE("[ ] Gnuplot")
-ENDIF(GNUPLOT_FOUND)
+IF(TBTK_ENABLE_ALL_OPTIONS)
+	IF(GNUPLOT_FOUND)
+		TBTK_MESSAGE("[X] Gnuplot")
+	ELSE(GNUPLOT_FOUND)
+		TBTK_MESSAGE("[ ] Gnuplot")
+	ENDIF(GNUPLOT_FOUND)
+ENDIF(TBTK_ENABLE_ALL_OPTIONS)

 IF(HDF5_FOUND)
 	TBTK_MESSAGE("[X] HDF5")
@@ -129,13 +131,15 @@
 	TBTK_MESSAGE("[ ] HDF5")
 ENDIF(HDF5_FOUND)

-IF(LIBINT2_FOUND)
-	TBTK_MESSAGE("[X] Libint2")
-	INCLUDE_DIRECTORIES(${LIBINT2_INCLUDES})
-	LIST(APPEND TBTK_LIBRARIES ${LIBINT2_LIBRARIES})
-ELSE(LIBINT2_FOUND)
-	TBTK_MESSAGE("[ ] Libint2")
-ENDIF(LIBINT2_FOUND)
+IF(TBTK_ENABLE_ALL_OPTIONS)
+	IF(LIBINT2_FOUND)
+		TBTK_MESSAGE("[X] Libint2")
+		INCLUDE_DIRECTORIES(${LIBINT2_INCLUDES})
+		LIST(APPEND TBTK_LIBRARIES ${LIBINT2_LIBRARIES})
+	ELSE(LIBINT2_FOUND)
+		TBTK_MESSAGE("[ ] Libint2")
+	ENDIF(LIBINT2_FOUND)
+ENDIF(TBTK_ENABLE_ALL_OPTIONS)

 IF(OpenCV_FOUND)
 	TBTK_MESSAGE("[X] OpenCV")
@@ -145,11 +149,14 @@
 	TBTK_MESSAGE("[ ] OpenCV")
 ENDIF(OpenCV_FOUND)

-IF(OpenBLAS_FOUND)
-	TBTK_MESSAGE("[X] OpenBLAS")
-ELSE(OpenBLAS_FOUND)
-	TBTK_MESSAGE("[ ] OpenBLAS")
-ENDIF(OpenBLAS_FOUND)
+IF(TBTK_ENABLE_ALL_OPTIONS)
+	IF(OpenBLAS_FOUND)
+		TBTK_MESSAGE("[X] OpenBLAS")
+		SET(TBTK_USE_OPEN_BLAS TRUE)
+	ELSE(OpenBLAS_FOUND)
+		TBTK_MESSAGE("[ ] OpenBLAS")
+	ENDIF(OpenBLAS_FOUND)
+ENDIF(TBTK_ENABLE_ALL_OPTIONS)

 IF(OpenMP_FOUND OR OPENMP_FOUND)
 	TBTK_MESSAGE("[X] OpenMP")
@@ -175,20 +182,22 @@
 	TBTK_MESSAGE("[ ] SuperLU")
 ENDIF(SuperLU_FOUND)

-IF(wxWidgets_FOUND)
-	TBTK_MESSAGE("[X] wxWidgets")
-	INCLUDE(${wxWidgets_USE_FILE})
-	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
-	LIST(APPEND TBTK_LIBRARIES ${wxWidgets_LIBRARIES})
-	LINK_DIRECTORIES(${wxWidgets_LIBRARY_DIRS})
-ELSE(wxWidgets_FOUND)
-	TBTK_MESSAGE("[ ] wxWidgets")
-ENDIF(wxWidgets_FOUND)
+IF(TBTK_ENABLE_ALL_OPTIONS)
+	IF(wxWidgets_FOUND)
+		TBTK_MESSAGE("[X] wxWidgets")
+		INCLUDE(${wxWidgets_USE_FILE})
+		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${wxWidgets_CXX_FLAGS}")
+		LIST(APPEND TBTK_LIBRARIES ${wxWidgets_LIBRARIES})
+		LINK_DIRECTORIES(${wxWidgets_LIBRARY_DIRS})
+	ELSE(wxWidgets_FOUND)
+		TBTK_MESSAGE("[ ] wxWidgets")
+	ENDIF(wxWidgets_FOUND)
+ENDIF(TBTK_ENABLE_ALL_OPTIONS)

 #LIST(APPEND TBTK_LIBRARIES "-lhdf5 -lhdf5_cpp -llapack -lblas")
 LIST(APPEND TBTK_LIBRARIES "lapack")
-IF(OpenBLAS_FOUND)
+IF(TBTK_USE_OPEN_BLAS)
 	LIST(APPEND TBTK_LIBRARIES "openblas")
-ELSE(OpenBLAS_FOUND)
+ELSE(TBTK_USE_OPEN_BLAS)
 	LIST(APPEND TBTK_LIBRARIES "blas")
-ENDIF()
+ENDIF(TBTK_USE_OPEN_BLAS)


* Fixes libcurl, xmlrpc in the works

* Fixes libcurl, xmlrpc in the works

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1303 5b2332b8-efa3-11de-8684-7d64432d61a3

--- CMakeModules/ModuleSetup.cmake
+++ CMakeModules/ModuleSetup.cmake
@@ -278,8 +278,7 @@
         COMPONENTS xmlrpc xmlrpcepi xmlrpc-epi
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/src
-        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Release
-        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi/Debug)
+        ${ENV_NAALI_DEP_PATH}/xmlrpc-epi)

     find_debug_libraries (XMLRPC "d")

@@ -288,7 +287,7 @@
 macro (configure_curl)
     sagase_configure_package (CURL
         NAMES Curl curl libcurl
-        COMPONENTS curl_imp
+        COMPONENTS curl libcurl libcurl_imp
         PREFIXES ${ENV_NAALI_DEP_PATH}
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Debug
         ${ENV_NAALI_DEP_PATH}/libcurl/lib/DLL-Release)


Fixing arpack install script

Fixing arpack install script

Former-commit-id: 7aa16f7f7eb6e47f7cba5276a845e57f93799d09

--- cmake-modules/Fetch_Arpack-ng.cmake
+++ cmake-modules/Fetch_Arpack-ng.cmake
@@ -10,14 +10,16 @@
 message(STATUS "SEARCHING FOR ARPACK IN SYSTEM")
 find_library(ARPACK_LIBRARIES
         NAMES libarpack${ARPACK_LIBRARY_SUFFIX}
-        PATHS /usr/lib/x86_64-linux-gnu/
+        PATHS
+            /usr/lib/x86_64-linux-gnu/
+            /usr/lib
         NO_DEFAULT_PATH
-        )
+    )

 if (NOT ARPACK_LIBRARIES)
     # Try finding arpack as module library
+    message(STATUS "ARPACK NOT FOUND IN SYSTEM. SEARCH RETURNED:  ${ARPACK_LIBRARIES}")
     message(STATUS "SEARCHING FOR ARPACK IN LOADED MODULES")
-
     find_library(ARPACK_LIBRARIES
             NAMES libarpack${ARPACK_LIBRARY_SUFFIX} arpack
             PATHS "$ENV{ARPACK_DIR}/lib" "$ENV{ARPACK_DIR}/lib64"


Sorted out include dirs

Sorted out include dirs

Former-commit-id: f451f03b5c17e8949dbb57a229f6a73aff643b7f

--- cmake-modules/Fetch_OpenBLAS2.cmake
+++ cmake-modules/Fetch_OpenBLAS2.cmake
@@ -37,7 +37,7 @@
     list(APPEND OpenBLAS_CMAKE_OPTIONS  -DLDFLAGS:STRING=${LDFLAGS})
     list(APPEND OpenBLAS_CMAKE_OPTIONS  -DFFLAGS:STRING=${FFLAGS})
     include(${PROJECT_SOURCE_DIR}/cmake-modules/BuildDependency.cmake)
-    build_dependency(OpenBLAS "${OpenBLAS_CMAKE_OPTIONS}")
+    build_dependency(OpenBLAS "${CMAKE_INSTALL_PREFIX}" "${OpenBLAS_CMAKE_OPTIONS}")
     find_OpenBLAS()
     if(TARGET OpenBLAS)
         message(STATUS "OpenBLAS installed successfully")


Add IGNORE_URLS argument

Add IGNORE_URLS argument

--- cmake/DevBaseLinkcheckerMacro.cmake
+++ cmake/DevBaseLinkcheckerMacro.cmake
@@ -2,7 +2,7 @@
 function(check_for_broken_links)
     set(OPTIONS "")
     set(ONE_VALUE_ARGUMENTS TARGET)
-    set(MULTI_VALUE_ARGUMENTS SOURCES)  # Html source files.
+    set(MULTI_VALUE_ARGUMENTS IGNORE_URLS SOURCES)  # Html source files.

     cmake_parse_arguments(CHECK_LINKS "${OPTIONS}"
         "${ONE_VALUE_ARGUMENTS}" "${MULTI_VALUE_ARGUMENTS}" ${ARGN})
@@ -15,6 +15,10 @@
     endif()

     set(sources ${CHECK_LINKS_SOURCES})
+
+    foreach(url_regex ${CHECK_LINKS_IGNORE_URLS})
+        list(APPEND ignore_urls_option "--ignore-url=${url_regex}")
+    endforeach()

     foreach(source_filename ${sources})
         get_filename_component(source_directory ${source_filename} DIRECTORY)
@@ -40,7 +44,9 @@
                 # We are only interested in the links in the current file,
                 # not in the links in linked files.
                 --recursion-level=1
+                ${ignore_urls_option}
                 ${source_pathname}
+            VERBATIM
             COMMAND ${CMAKE_COMMAND} -E touch ${destination_pathname}
             DEPENDS ${source_pathname}
         )


Enabled CMAKE_CXX_EXTENSIONS (required by Elemental). Removed CXX98 and CXX0X capability tests from ConfigureCXXSTD.cmake

--- cmake/Modules/ConfigureCXXSTD.cmake
+++ cmake/Modules/ConfigureCXXSTD.cmake
@@ -19,16 +19,6 @@
 if(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
   # Now version selection, focus on version 15 and above as that is the
   # baseline - means that this isn't comprehensive for lower versions
-
-  # c++98 should be supported for all(?) versions we may encounter, and
-  # make it the default as required for compilers that recognise standards
-  set(CMAKE_CXX_STANDARD_DEFAULT "11")
-
-  set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
-  set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
-
-  set(CMAKE_CXX0X_STANDARD_COMPILE_OPTION "-std=c++0x")
-  set(CMAKE_CXX0X_EXTENSION_COMPILE_OPTION "-std=gnu++0x")

   if(NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0))

@@ -119,12 +109,7 @@
     endif()
   endif()

-  # always available?
-  set(CMAKE_CXX98_COMPILE_FEATURES cxx_template_template_parameters)
-
   set(CMAKE_CXX_COMPILE_FEATURES
-    ${CMAKE_CXX98_COMPILE_FEATURES}
-    ${CMAKE_CXX0X_COMPILE_FEATURES}
     ${CMAKE_CXX11_COMPILE_FEATURES}
     ${CMAKE_CXX14_COMPILE_FEATURES}
     )
@@ -134,7 +119,7 @@
 #-----------------------------------------------------------------------
 # Configure/Select C++ Standard
 # Require at least C++11 with no extensions and the following features
-set(CMAKE_CXX_EXTENSIONS OFF)
+set(CMAKE_CXX_EXTENSIONS ON)

 set(${PROJECT_NAME}_TARGET_COMPILE_FEATURES
   cxx_alias_templates


Tweaks in code of CheckSanitizers.cmake

Tweaks in code of CheckSanitizers.cmake

--- cmake/modules/CheckSanitizers.cmake
+++ cmake/modules/CheckSanitizers.cmake
@@ -35,7 +35,22 @@
 option (UBSAN "Enable UndefinedBehaviorSanitizer (aka UBSAN)" OFF)

-include(CheckCXXCompilerFlag)
+function (check_sanitizer_flags SAN_DESCRIPTION SAN_FLAGS)
+	include (CheckCXXCompilerFlag)
+	set (READABLE_CXX_COMPILER "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
+
+	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
+	set (CMAKE_REQUIRED_FLAGS "${SAN_FLAGS}")
+	CHECK_CXX_COMPILER_FLAG("${SAN_FLAGS}" COMPILER_SUPPORTS_FLAGS)
+	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})
+
+	if (COMPILER_SUPPORTS_FLAGS)
+		message (STATUS "${READABLE_CXX_COMPILER} supports ${SAN_DESCRIPTION}")
+		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SAN_FLAGS}" PARENT_SCOPE)
+	else ()
+		message (WARNING "${READABLE_CXX_COMPILER} doesn't support ${SAN_DESCRIPTION}")
+	endif()
+endfunction ()

 # Check for Address Sanitizer.
@@ -44,18 +59,9 @@
 		message (FATAL_ERROR "ASAN is not compatible with TSAN or MSAN")
 	endif ()

-	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
+	set (ASAN_DESCRIPTION "AddressSanitizer")
 	set (ASAN_FLAGS  "-fsanitize=address -fno-omit-frame-pointer")
-	set (CMAKE_REQUIRED_FLAGS "${ASAN_FLAGS}")
-	CHECK_CXX_COMPILER_FLAG("${ASAN_FLAGS}" COMPILER_SUPPORTS_ASAN)
-	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})
-
-	if (COMPILER_SUPPORTS_ASAN)
-		message (STATUS "${READABLE_CXX_COMPILER} supports AddressSanitizer")
-		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ASAN_FLAGS}")
-	else ()
-		message (WARNING "${READABLE_CXX_COMPILER} doesn't support AddressSanitizer")
-	endif()
+	check_sanitizer_flags (${ASAN_DESCRIPTION} ${ASAN_FLAGS})
 endif ()

@@ -65,50 +71,23 @@
 		message (FATAL_ERROR "TSAN is not compatible with MSAN")
 	endif ()

-	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
+	set (TSAN_DESCRIPTION "ThreadSanitizer")
 	set (TSAN_FLAGS  "-fsanitize=thread -fPIE -pie")
-	set (CMAKE_REQUIRED_FLAGS "${TSAN_FLAGS}")
-	CHECK_CXX_COMPILER_FLAG("${TSAN_FLAGS}" COMPILER_SUPPORTS_TSAN)
-	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})
-
-	if (COMPILER_SUPPORTS_TSAN)
-		message (STATUS "${READABLE_CXX_COMPILER} supports ThreadSanitizer")
-		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TSAN_FLAGS}")
-	else ()
-		message (WARNING "${READABLE_CXX_COMPILER} doesn't support ThreadSanitizer")
-	endif()
+	check_sanitizer_flags (${TSAN_DESCRIPTION} ${TSAN_FLAGS})
 endif ()

 # Check for Memory Sanitizer.
 if (MSAN)
-	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
+	set (MSAN_DESCRIPTION "MemorySanitizer")
 	set (MSAN_FLAGS  "-fsanitize=memory -fsanitize-memory-track-origins -fPIE -pie -fno-omit-frame-pointer")
-	set (CMAKE_REQUIRED_FLAGS "${MSAN_FLAGS}")
-	CHECK_CXX_COMPILER_FLAG("${MSAN_FLAGS}" COMPILER_SUPPORTS_MSAN)
-	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})
-
-	if (COMPILER_SUPPORTS_MSAN)
-		message (STATUS "${READABLE_CXX_COMPILER} supports MemorySanitizer")
-		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MSAN_FLAGS}")
-	else ()
-		message (WARNING "${READABLE_CXX_COMPILER} doesn't support MemorySanitizer")
-	endif()
+	check_sanitizer_flags (${MSAN_DESCRIPTION} ${MSAN_FLAGS})
 endif ()

 # Check for Undefined Behavior Sanitizer.
 if (UBSAN)
-	set (CMAKE_REQUIRED_FLAGS_CACHE ${CMAKE_REQUIRED_FLAGS})
+	set (UBSAN_DESCRIPTION "UndefinedBehaviorSanitizer")
 	set (UBSAN_FLAGS  "-fsanitize=undefined -fno-omit-frame-pointer")
-	set (CMAKE_REQUIRED_FLAGS "${UBSAN_FLAGS}")
-	CHECK_CXX_COMPILER_FLAG("${UBSAN_FLAGS}" COMPILER_SUPPORTS_UBSAN)
-	set (CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_CACHE})
-
-	if (COMPILER_SUPPORTS_UBSAN)
-		message (STATUS "${READABLE_CXX_COMPILER} supports UndefinedBehaviorSanitizer")
-		set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UBSAN_FLAGS}")
-	else ()
-		message (WARNING "${READABLE_CXX_COMPILER} doesn't support UndefinedBehaviorSanitizer")
-	endif()
+	check_sanitizer_flags (${UBSAN_DESCRIPTION} ${UBSAN_FLAGS})
 endif ()


qt: path suffixes "qt4" for libs too

qt: path suffixes "qt4" for libs too

--- cmake/qibuild/modules/qtutils.cmake
+++ cmake/qibuild/modules/qtutils.cmake
@@ -8,8 +8,8 @@
 # and include/QtCore
 #
 function(qt_flib _suffix _libame)
-   flib(QT_${_suffix} OPTIMIZED NAMES "${_libame}" "${_libame}4")
-   flib(QT_${_suffix} DEBUG     NAMES "${_libame}" "${_libame}d4")
+   flib(QT_${_suffix} OPTIMIZED NAMES "${_libame}" "${_libame}4"  PATH_SUFFIXES qt4)
+   flib(QT_${_suffix} DEBUG     NAMES "${_libame}" "${_libame}d4" PATH_SUFFIXES qt4)

    #we want to be able to #include <QtLib>
    fpath(QT_${_suffix} ${_libame} PATH_SUFFIXES qt4 )


Remove QtMain dependency on test program.

	* build-aux/cmake/modules/Gostai.cmake: Here.

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -635,9 +635,6 @@
   # ===================== #
   # Prepare the libraries #
   # ===================== #
-  if(WIN32)
-    list(APPEND ${prefix}_LIBRARIES ${QT_QTMAIN_LIBRARY})
-  endif(WIN32)

   if(${prefix}_LIBRARIES)
     target_link_libraries(${prefix} ${${prefix}_LIBRARIES})


Add QT_NO_DEBUG in release mode.

Add QT_NO_DEBUG in release mode.

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

--- build-aux/cmake/modules/Gostai.cmake
+++ build-aux/cmake/modules/Gostai.cmake
@@ -104,12 +104,13 @@
       set_target_properties(${name} PROPERTIES WIN32_EXECUTABLE FALSE)
     else(CMAKE_BUILD_TYPE STREQUAL "Debug")
       set_target_properties(${name} PROPERTIES WIN32_EXECUTABLE TRUE)
+      list(APPEND ${name}_CPPFLAGS "QT_NO_DEBUG")
     endif(CMAKE_BUILD_TYPE STREQUAL "Debug")
   endif(${name}_NO_CONSOLE)

   if(${name}_CPPFLAGS)
     set_target_properties(${name} PROPERTIES
-      COMPILE_DEFINITIONS ${${name}_CPPFLAGS})
+      COMPILE_DEFINITIONS "${${name}_CPPFLAGS}")
   endif(${name}_CPPFLAGS)

   # ===================== #


cmake: fix smfc macros

cmake: fix smfc macros

--- CMake/smf.cmake
+++ CMake/smf.cmake
@@ -28,8 +28,7 @@
   # gen include dirs for each
   if(SMFC_GEN_INCLUDE_DIRS)
     foreach(d ${SMFC_GEN_INCLUDE_DIRS})
-      set(flatc_generated_includes
-          -I ${d} ${flatc_generated_includes})
+      list(APPEND flatc_generated_includes -I ${d})
     endforeach()
     string(REGEX REPLACE ";" ","
         smfc_generated_includes ${SMFC_GEN_INCLUDE_DIRS})
@@ -47,11 +46,11 @@
     # flatc
     add_custom_command(OUTPUT ${FLATC_OUTPUT}
       COMMAND flatc
-      ARGS --gen-name-strings --gen-object-api "${flatc_language}"
-           --keep-prefix --json --reflect-names --defaults-json
-           --gen-mutable --cpp-str-type 'seastar::sstring'
-           "${flatc_generated_includes}"
-           -o "${SMFC_GEN_OUTPUT_DIRECTORY}/" "${FILE}"
+      ARGS --gen-name-strings --gen-object-api ${flatc_language}
+      ARGS ${flatc_generated_includes}
+      ARGS --keep-prefix --json --reflect-names --defaults-json
+      ARGS --gen-mutable --cpp-str-type 'seastar::sstring'
+      ARGS -o "${SMFC_GEN_OUTPUT_DIRECTORY}/" "${FILE}"
       COMMENT "Building C++ header for ${FILE}"
       DEPENDS flatc
       DEPENDS ${FILE}
@@ -60,9 +59,9 @@
     add_custom_command(OUTPUT ${SMF_GEN_OUTPUT}
       COMMAND smfc
       ARGS --logtostderr --filename ${FILE}
-           "${smfc_language}"
-           "${smfc_generated_includes}"
-           --output_path="${SMFC_GEN_OUTPUT_DIRECTORY}"
+      ARGS "${smfc_language}"
+      ARGS "${smfc_generated_includes}"
+      ARGS --output_path="${SMFC_GEN_OUTPUT_DIRECTORY}"
       COMMENT "Generating smf rpc stubs for ${FILE}"
       DEPENDS smfc
       DEPENDS ${FILE}


ClangTidy: Suppress warnings about unknown command line args by default

This case will come up frequently, since we're creating compilation
databases about compilers which might not be the same as clang.

--- ClangTidy.cmake
+++ ClangTidy.cmake
@@ -49,6 +49,10 @@
                            "${CHECK_SOURCES_SINGLEVAR_OPTIONS}"
                            "${CHECK_SOURCES_MULTIVAR_OPTIONS}"
                            ${ARGN})
+
+    list (APPEND CHECK_SOURCES_DISABLE_CHECKS
+                 "clang-diagnostic-unknown-argument"
+                 "clang-diagnostic-unused-command-line-argument")

     psq_strip_extraneous_sources (FILES_TO_CHECK ${TARGET})
     psq_handle_check_generated_option (CHECK_SOURCES FILES_TO_CHECK


All functional test under cmake_policy(SET CMP0067 NEW)

--- project/cmake/ProjectBuildOption.cmake
+++ project/cmake/ProjectBuildOption.cmake
@@ -43,6 +43,11 @@
 # Check mkstemp/_mktemp/_mktemp_s for file system
 include(CheckCXXSourceCompiles)
 include(CheckCSourceCompiles)
+
+cmake_policy(PUSH)
+cmake_policy(SET CMP0067 NEW)
+# Require CMP0067 to NEW to inherit CXX_STANDARD
+
 if (WIN32)
     check_cxx_source_compiles("
     #include <io.h>
@@ -342,9 +347,6 @@
     endif()
 endif ()

-cmake_policy(PUSH)
-cmake_policy(SET CMP0067 NEW)
-# Require CMP0067 to NEW to inherit CXX_STANDARD
 check_cxx_source_compiles("
 #include <unordered_map>
 #include <unordered_set>
@@ -371,6 +373,8 @@
             return 0;
         }" LIBATFRAME_UTILS_UNORDERED_MAP_SET_HAS_RESERVE)
 endif ()
+
+# Test finished
 cmake_policy(POP)

 set(LIBATFRAME_UTILS_ENABLE_RTTI ${COMPILER_OPTIONS_TEST_RTTI})


BUG: Set new URL for FFTW download

BUG: Set new URL for FFTW download

--- SuperBuild/CMake/External_fftw.cmake
+++ SuperBuild/CMake/External_fftw.cmake
@@ -36,7 +36,7 @@
 # Compile the float version of FFTW
 ExternalProject_Add(FFTWF
   PREFIX FFTW/FFTWF
-  URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
+  URL "http://fftw.org/fftw-3.3.8.tar.gz"
   URL_MD5 8aac833c943d8e90d51b697b27d4384d
   SOURCE_DIR ${FFTWF_SB_SRC}
   BINARY_DIR ${FFTWF_SB_BUILD}
@@ -61,7 +61,7 @@
 # Compile the double version of FFTW
 ExternalProject_Add(FFTWD
   PREFIX FFTW/FFTWD
-  URL "http://www.fftw.org/fftw-3.3.8.tar.gz"
+  URL "http://fftw.org/fftw-3.3.8.tar.gz"
   URL_MD5 8aac833c943d8e90d51b697b27d4384d
   SOURCE_DIR ${FFTWD_SB_SRC}
   BINARY_DIR ${FFTWD_SB_BUILD}


SuperBuild: use internal libjson-c from GDAL

--- SuperBuild/CMake/External_gdal.cmake
+++ SuperBuild/CMake/External_gdal.cmake
@@ -102,7 +102,7 @@
     --with-webp=no
     --with-threads=yes
     --with-freexl=no
-    --with-libjson-c=no
+    --with-libjson-c=internal
     ${GDAL_SB_CONFIG}
     ${GDAL_SB_EXTRA_OPTIONS}
     )


ToolingFindPackageUtil: Set required variables in the CACHE

--- ToolingFindPackageUtil.cmake
+++ ToolingFindPackageUtil.cmake
@@ -92,6 +92,7 @@
     if (PATH_TO_EXECUTABLE)

         set (${PATH_RETURN} "${PATH_TO_EXECUTABLE}" PARENT_SCOPE)
+        unset (PATH_TO_EXECUTABLE CACHE)

     endif ()

@@ -248,7 +249,7 @@
 # VERSION: The detected tool version
 # REQUIRED_VARS : Required variables, set in parent scope if present
 #                 Must specify at least one.
-macro (psq_check_and_report_tool_version PREFIX VERSION)
+function (psq_check_and_report_tool_version PREFIX VERSION)

     string (STRIP "${VERSION}" VERSION)

@@ -268,13 +269,13 @@

         foreach (VARIABLE ${_PSQ_CHECK_${PREFIX}_REQUIRED_VARS})

-            set (${VARIABLE} ${${VARIABLE}} PARENT_SCOPE)
+            set (${VARIABLE} ${${VARIABLE}} CACHE STRING "" FORCE)

         endforeach ()

     endif ()

-endmacro ()
+endfunction ()

 # psq_find_executable_installation_root
 #


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   03)
+SET(KWSYS_DATE_STAMP_DAY   04)


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   07)
+SET(KWSYS_DATE_STAMP_DAY   08)


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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