relax the regex splitting service files (#294)

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -97,8 +97,8 @@
       set(_request_file "${CMAKE_CURRENT_BINARY_DIR}/srv/${_name}_Request.msg")
       set(_response_file "${CMAKE_CURRENT_BINARY_DIR}/srv/${_name}_Response.msg")
       file(READ "${_idl_file}" _service_content)
-      string(REGEX REPLACE "^((.*\n)|)---(\n.*)?$" "\\1" _request_content "${_service_content}")
-      string(REGEX REPLACE "^((.*\n)|)---(\n(.*)|())$" "\\4" _response_content "${_service_content}")
+      string(REGEX REPLACE "^((.*\r?\n)|)---(\r?\n.*)?$" "\\1" _request_content "${_service_content}")
+      string(REGEX REPLACE "^((.*\r?\n)|)---(\r?\n(.*)|())$" "\\3" _response_content "${_service_content}")
       file(WRITE "${_request_file}" "${_request_content}")
       file(WRITE "${_response_file}" "${_response_content}")
       list(APPEND _idl_files "${_request_file}" "${_response_file}")


ENH: temporarilly point External elastix to FBerendsen/elastix/SELX-80-Transformix-Deformation-Field-Object #80

--- SuperBuild/ExternalElastix.cmake
+++ SuperBuild/ExternalElastix.cmake
@@ -20,7 +20,7 @@
 set( proj Elastix )

 set( ELASTIX_GIT_REPOSITORY https://github.com/FBerendsen/elastix )
-set( ELASTIX_GIT_TAG f75266819b9e2714685a94a622e2aadc10790132 )
+set( ELASTIX_GIT_TAG SELX-80-Transformix-Deformation-Field-Object )

 UPDATE_SELX_SUPERBUILD_COMMAND(${proj})


Added llvm version 3.6.1.

Added llvm version 3.6.1.

--- juci/cmake/Modules/FindLibClang.cmake
+++ juci/cmake/Modules/FindLibClang.cmake
@@ -14,7 +14,8 @@
 #               Known LLVM release numbers.

 # most recent versions come first
-set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.6
+set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.6.1
+  3.6
   3.5.1
   3.5.0                   #Arch Linux
   3.5                     #LLVM Debian/Ubuntu packages from http://llvm.org/apt/


Remove warnings on Win32

Remove warnings on Win32

--- sequoia-engine/cmake/SequoiaEngineSetCXXFlags.cmake
+++ sequoia-engine/cmake/SequoiaEngineSetCXXFlags.cmake
@@ -102,6 +102,12 @@

     # C4244 - conversion from 'type1' to 'type2', possible loss of data
     sequoia_check_and_set_cxx_flag("/wd4244" HAVE_MSVC_WD4244)
+
+    # C4305: 'initializing': truncation from 'double' to 'const float
+    sequoia_check_and_set_cxx_flag("/wd4305" HAVE_MSVC_WD4305)
+
+    # C4800:  'unsigned __int64': forcing value to bool 'true' or 'false' (performance warning)
+    sequoia_check_and_set_cxx_flag("/wd4800" HAVE_MSVC_WD4800)

     # C4661 - 'function' : no prototype provided; assumed no parameters
     sequoia_check_and_set_cxx_flag("/wd4661" HAVE_MSVC_WD4661)


added: install verbosity level

added: install verbosity level

--- share/hugh/cmake/CMakeAddons_DefaultVariables.cmake
+++ share/hugh/cmake/CMakeAddons_DefaultVariables.cmake
@@ -21,3 +21,10 @@
 else()
   set(Boost_FIND_QUIETLY ON)
 endif()
+
+# Cmake 'install'
+if(VERBOSE)
+  set(CMAKE_INSTALL_MESSAGE ALWAYS)
+else()
+  set(CMAKE_INSTALL_MESSAGE LAZY)
+endif()


ARROW-3064: [C++] Add option to ADD_ARROW_TEST to indicate additional dependencies for particular unit test executables

Author: Lukasz Bartnik <l.bartnik@gmail.com>

Author: Lukasz A. Bartnik <l.bartnik@gmail.com>

Closes #2439 from lbartnik/fix-3064 and squashes the following commits:

56392e35 <Lukasz A. Bartnik> new argument for ADD_ARROW_TEST

--- cpp/cmake_modules/BuildUtils.cmake
+++ cpp/cmake_modules/BuildUtils.cmake
@@ -307,8 +307,8 @@
 # Arguments after the test name will be passed to set_tests_properties().
 function(ADD_ARROW_TEST REL_TEST_NAME)
   set(options NO_VALGRIND)
-  set(single_value_args)
-  set(multi_value_args STATIC_LINK_LIBS EXTRA_LINK_LIBS EXTRA_INCLUDES LABELS)
+  set(one_value_args)
+  set(multi_value_args STATIC_LINK_LIBS EXTRA_LINK_LIBS EXTRA_INCLUDES EXTRA_DEPENDENCIES LABELS)
   cmake_parse_arguments(ARG "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN})
   if(ARG_UNPARSED_ARGUMENTS)
     message(SEND_ERROR "Error: unrecognized arguments: ${ARG_UNPARSED_ARGUMENTS}")
@@ -352,6 +352,11 @@
         ${ARG_EXTRA_INCLUDES}
         )
     endif()
+
+    if (ARG_EXTRA_DEPENDENCIES)
+      add_dependencies(${TEST_NAME} ${ARG_EXTRA_DEPENDENCIES})
+    endif()
+
     add_dependencies(unittest ${TEST_NAME})
   else()
     # No executable, just invoke the test (probably a script) directly.


Revert "CI: test prepare build with .ssh/config set on maki"

This reverts commit 71233da49030bcb9940daf2192da3260c5e026a8.

--- CI/prepare_superbuild.cmake
+++ CI/prepare_superbuild.cmake
@@ -20,7 +20,7 @@
 # This script is for the superbuild build on the CI platform

 include( "${CMAKE_CURRENT_LIST_DIR}/macros.cmake" )
-set ( DEBUG "1" )
+
 set (ENV{LANG} "C") # Only ascii output
 get_filename_component(OTB_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} DIRECTORY)


COMP: support OSGeo4W OpenThreads

COMP: support OSGeo4W OpenThreads

--- CMake/FindOpenThreads.cmake
+++ CMake/FindOpenThreads.cmake
@@ -62,6 +62,7 @@
     /opt/local/include # DarwinPorts
     /opt/csw/include # Blastwave
     /opt/include
+    $ENV{OSGEO4W_ROOT}/include
     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/include
     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/include
 )
@@ -103,6 +104,7 @@
     /opt/csw/lib
     /opt/lib64
     /opt/lib
+    $ENV{OSGEO4W_ROOT}/lib
     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OpenThreads_ROOT]/lib
     [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSG_ROOT]/lib
 )


Specify export visibility flags only for shared builds.

When building static builds, since the export visibilty flags are not set for
all libraries, we were getting warnings with mismatched visibility when linking
vtkpython statically. Overcome the issue by not sepecifying visbility flags for
static builds.

Change-Id: Ic993920fa51119d5002f28ee5996abeab1b3bb4e

--- CMake/vtkModuleMacros.cmake
+++ CMake/vtkModuleMacros.cmake
@@ -388,9 +388,15 @@

   # Generate the export macro header for symbol visibility/Windows DLL declspec
   generate_export_header(${vtk-module} EXPORT_FILE_NAME ${vtk-module}Module.h)
-  add_compiler_export_flags(my_abi_flags)
-  set_property(TARGET ${vtk-module} APPEND
-    PROPERTY COMPILE_FLAGS "${my_abi_flags}")
+  if (BUILD_SHARED_LIBS)
+    # export flags are only added when building shared libs, they cause
+    # mismatched visibility warnings when building statically since not all
+    # libraries that VTK builds don't set visibility flags. Until we get a
+    # time to do that, we skip visibility flags for static builds.
+    add_compiler_export_flags(my_abi_flags)
+    set_property(TARGET ${vtk-module} APPEND
+      PROPERTY COMPILE_FLAGS "${my_abi_flags}")
+  endif()

   if(BUILD_TESTING AND PYTHON_EXECUTABLE AND NOT ${vtk-module}_NO_HeaderTest)
     string(TOUPPER "${vtk-module}" MOD)


Bump version

Bump version

--- CMake/version.cmake
+++ CMake/version.cmake
@@ -1,3 +1,3 @@
 set (VV_VERSION_MAJOR 3)
 set (VV_VERSION_MINOR 0)
-set (VV_VERSION_PATCH 5)
+set (VV_VERSION_PATCH 6)


Add custom config file support (#159)

Add custom config file support (#159)

Signed-off-by: John Shepherd <f2eddb5f3eba2e7aa76cdcf5ad3c033799787fbd@yahoo.com>

--- ament_cmake_clang_tidy/cmake/ament_clang_tidy.cmake
+++ ament_cmake_clang_tidy/cmake/ament_clang_tidy.cmake
@@ -15,15 +15,25 @@
 #
 # Add a test to check the code for compliance with clang_tidy.
 #
+# The default configuration file for clang-tidy is located at
+# configuration/.clang-tidy within the ament_clang_tidy directory
+# The default configuration file can be either overridden by the
+# argument 'CONFIG_FILE' or by a global variable named
+# 'ament_cmake_clang_tidy_CONFIG_FILE'
+# The 'CONFIG_FILE' argument takes priority over
+# 'ament_cmake_clang_tidy_CONFIG_FILE' if both are defined
+#
 # :param TESTNAME: the name of the test, default: "clang_tidy"
 # :type TESTNAME: string
+# :param CONFIG_FILE: the path of the configuration file for clang-tidy to consider
+# :type CONFIG_FILE: string
 # :param ARGN: the files or directories to check
 # :type ARGN: list of strings
 #
 # @public
 #
 function(ament_clang_tidy)
-  cmake_parse_arguments(ARG "" "TESTNAME" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "TESTNAME;CONFIG_FILE" "" ${ARGN})
   if(NOT ARG_TESTNAME)
     set(ARG_TESTNAME "clang_tidy")
   endif()
@@ -36,6 +46,12 @@
   set(result_file "${AMENT_TEST_RESULTS_DIR}/${PROJECT_NAME}/${ARG_TESTNAME}.xunit.xml")
   set(cmd "${ament_clang_tidy_BIN}" "--xunit-file" "${result_file}")
   list(APPEND cmd ${ARG_UNPARSED_ARGUMENTS})
+
+  if(ARG_CONFIG_FILE)
+    set(APPEND cmd "--config" "${ARG_CONFIG_FILE}")
+  elseif(DEFINED ament_cmake_clang_tidy_CONFIG_FILE)
+    set(APPEND cmd "--config" "${ament_cmake_clang_tidy_CONFIG_FILE}")
+  endif()

   file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/ament_clang_tidy")
   ament_add_test(


Fix typo in `DOConfigureCompiler.cmake`

Fix typo in `DOConfigureCompiler.cmake`

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -42,7 +42,7 @@
   endif()
   set(GCC_VERSION "${GCC_MAJOR}.${GCC_MINOR}")

-  do_substep_message("${CMAKE_CXX_COMPILER_ID} compiler version: ${GCC_VERSION}"")
+  do_substep_message("${CMAKE_CXX_COMPILER_ID} compiler version: ${GCC_VERSION}")
   if (GCC_VERSION  VERSION_LESS 4.5)
     message(FATAL_ERROR "GNU compiler version lower than 4.5 are not supported anymore: C++0x features (auto and lambda) are needed.")
   elseif (GCC_VERSION  VERSION_LESS 4.7)


Add current binary and source dirs

Add current binary and source dirs

--- cmake/MyPackagePrintSetup.cmake
+++ cmake/MyPackagePrintSetup.cmake
@@ -24,6 +24,8 @@
   MESSAGE(STATUS "                   CMAKE_RANLIB: ${CMAKE_RANLIB}")
   MESSAGE(STATUS "               CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}")
   MESSAGE(STATUS "               CMAKE_SOURCE_DIR: ${CMAKE_SOURCE_DIR}")
+  MESSAGE(STATUS "       CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
+  MESSAGE(STATUS "       CMAKE_CURRENT_SOURCE_DIR: ${CMAKE_CURRENT_SOURCE_DIR}")
   MESSAGE(STATUS "              CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
   MESSAGE(STATUS " CMAKE_ARCHIVE_OUTPUT_DIRECTORY: ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
   MESSAGE(STATUS " CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")


fix 0.12.1 find_dependency() calls

fix 0.12.1 find_dependency() calls

--- cmake/projects/eos/hunter.cmake
+++ cmake/projects/eos/hunter.cmake
@@ -18,7 +18,7 @@
     URL
     "https://github.com/hunter-packages/eos/archive/v0.12.1.tar.gz"
     SHA1
-    a3839078423cc81d153db84267e9c2eb14564c88
+    76be9cba78faf3663d17414ddeeacd662106e0d9
 )

 hunter_add_version(


Revert "CI: set debug 1 in prepare superbuild (test)"

This reverts commit f5d78e7719255ebf2c686bdf9989c896022b33ae.


Link phobos static by default

Link phobos static by default

--- cmake-d/Platform/Linux-dmd.cmake
+++ cmake-d/Platform/Linux-dmd.cmake
@@ -56,11 +56,11 @@

 #SET (CMAKE_D_FLAGS_INIT "-version=${CMAKE_BUILD_TYPE}Build ${DSTDLIB_FLAGS} ${DSTDLIB_TYPE} -I$ENV{D_PATH}/include -I$ENV{D_PATH}/import -I${CMAKE_PROJECT_SOURCE_DIR}")
 SET (CMAKE_D_FLAGS_INIT "")
-# DMD can only produce 32-bit binaries for now
-SET (CMAKE_D_LINK_FLAGS "-defaultlib=libphobos2.so")
+
+SET (CMAKE_D_LINK_FLAGS "")
 SET (CMAKE_D_FLAGS_DEBUG_INIT "-g -debug -L--export-dynamic ${DDOC_FLAGS}")
 #  SET (CMAKE_D_FLAGS_MINSIZEREL_INIT "-Os ${DDOC_FLAGS}")
-SET (CMAKE_D_FLAGS_RELEASE_INIT "-O -release -inline ${DDOC_FLAGS}")
+SET (CMAKE_D_FLAGS_RELEASE_INIT "-O ${DDOC_FLAGS}")
 SET (CMAKE_D_FLAGS_RELWITHDEBINFO_INIT "-O -g -L--export-dynamic ${DDOC_FLAGS}")
 #  SET (CMAKE_D_CREATE_PREPROCESSED_SOURCE "<CMAKE_D_COMPILER> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
 SET (CMAKE_D_CREATE_ASSEMBLY_SOURCE "<CMAKE_D_COMPILER> <FLAGS> -S <SOURCE> -of<ASSEMBLY_SOURCE>")


Look for correct METIS headeR

Look for correct METIS headeR

--- cmake/modules/FindParMETIS.cmake
+++ cmake/modules/FindParMETIS.cmake
@@ -56,7 +56,7 @@
 endif()

 if(NOT METIS_INCLUDE_DIR)
-  find_path(METIS_INCLUDE_DIR parmetis.h
+  find_path(METIS_INCLUDE_DIR metis.h
     HINTS ${METIS_INCLUDE_DIR} ENV METIS_INCLUDE_DIR ${METIS_DIR} ENV METIS_DIR
     PATH_SUFFIXES include
     DOC "Directory where the METIS header files are located"


Add wiringpi include dirs to search path for wiringPi.h

--- cmake/modules/FindWiringPi.cmake
+++ cmake/modules/FindWiringPi.cmake
@@ -1,5 +1,6 @@
 find_library(WIRINGPI_LIBRARIES NAMES wiringPi)
 find_path(WIRINGPI_INCLUDE_DIRS NAMES wiringPi.h)
+include_directories(SYSTEM ${WIRINGPI_INCLUDE_DIRS})

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(wiringPi "Could not find WiringPi.  Either install it using instructions at http://wiringpi.com/download-and-install/ or specify a different BOARD_GPIO" WIRINGPI_LIBRARIES WIRINGPI_INCLUDE_DIRS)


Remove rsync dependency

Remove rsync dependency

--- cmake/nuttx/px4_impl_nuttx.cmake
+++ cmake/nuttx/px4_impl_nuttx.cmake
@@ -213,7 +213,8 @@
 	# copy
 	add_custom_command(OUTPUT nuttx_copy_${CONFIG}.stamp
 		COMMAND ${MKDIR} -p ${CMAKE_BINARY_DIR}/${CONFIG}
-		COMMAND rsync -a --exclude=.git ${CMAKE_SOURCE_DIR}/NuttX/ ${nuttx_src}/
+		COMMAND ${CP} -r ${CMAKE_SOURCE_DIR}/NuttX ${nuttx_src}
+		COMMAND ${RM} -rf ${nuttx_src}/.git
 		COMMAND ${TOUCH} nuttx_copy_${CONFIG}.stamp
 		DEPENDS ${DEPENDS})
 	add_custom_target(__nuttx_copy_${CONFIG}


fixed dependency error in cmake

fixed dependency error in cmake

--- cmake/rosidl_generator_cs_generate_interfaces.cmake
+++ cmake/rosidl_generator_cs_generate_interfaces.cmake
@@ -39,7 +39,7 @@
 	    DEPENDS ros2cs_message_generator
 	    VERBATIM
 	  )
-	list(APPEND _message_targets "generate_cs_messages_${_msg_name}")
+	list(APPEND _message_targets "generate_cs_messages_${_msg_name}_${RND_VAL}")
 	else()
       string(RANDOM RND_VAL)
 	  add_custom_target(
@@ -48,6 +48,7 @@
 	    COMMENT "Generating CS code for ${_msg_name}"
 	    VERBATIM
 	  )
+      list(APPEND _message_targets "generate_cs_messages_${_msg_name}_${RND_VAL}")
 	endif()
   else()
     list(REMOVE_ITEM rosidl_generate_interfaces_cs_IDL_FILES ${_idl_file})


COMP: set build output dir for application to lib/otb/applications

--- CMake/OTBApplicationMacros.cmake
+++ CMake/OTBApplicationMacros.cmake
@@ -9,8 +9,14 @@
    target_link_libraries(${APPLICATION_TARGET_NAME} OTBApplicationEngine ${APPLICATION_LINK_LIBRARIES})
    otb_module_target_label(${APPLICATION_TARGET_NAME})

+   # Setup build output location
+   # Do not output in the standard lib folder where all shared libs goes.
+   # This is to avoid the application factory to look into each and every shared lib
+   # for itkLoad symbol
+   set_property(TARGET ${APPLICATION_TARGET_NAME} PROPERTY LIBRARY_OUTPUT_DIRECTORY ${OTB_BINARY_DIR}/lib/otb/applications)
+
    # Remove the usual 'lib' prefix to make it clear it is a plugin
-   # and not a library to link against
+   # and not a shared library to link against
    set_property(TARGET ${APPLICATION_TARGET_NAME} PROPERTY PREFIX "")

    # on Apple platform, a "MODULE" library gets a ".so" extension


Work around CMP0054 warning

Work around CMP0054 warning

Add 'x' prefix and suffix to ensure extra de-referencing of variable
name does not occur.

--- CMake/sitkSITKLegacyNaming.cmake
+++ CMake/sitkSITKLegacyNaming.cmake
@@ -23,7 +23,7 @@
 macro(sitk_legacy_naming new_var_name )

-  if(NOT "${ARGV1}" STREQUAL "")
+  if(NOT "x${ARGV1}x" STREQUAL "xx")
     set( old_var_name ${ARGV1} )
   else()
     string( REGEX REPLACE  "^SimpleITK_" "SITK_" old_var_name "${new_var_name}" )


Trivial commit.

Trivial commit.

--- cmake/TbagFindPackage/FindTbagCUDA.cmake
+++ cmake/TbagFindPackage/FindTbagCUDA.cmake
@@ -53,7 +53,7 @@
         message (FATAL_ERROR "Not found nvcc executable: ${CUDA_NVCC_EXECUTABLE}")
     endif ()

-    if(NOT __gpu_detect_output)
+    if (NOT __gpu_detect_output)
         set (__cuda_source_file "${PROJECT_BINARY_DIR}/tabg_cuda__find_detect_arch.cu")

         file (WRITE ${__cuda_source_file} ""
@@ -77,24 +77,24 @@
                 "    return 0;"
                 "}")

-        execute_process(COMMAND "${CUDA_NVCC_EXECUTABLE}" "--run" "${__cuda_source_file}"
+        execute_process (COMMAND "${CUDA_NVCC_EXECUTABLE}" "--run" "${__cuda_source_file}"
                 WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/CMakeFiles/"
                 RESULT_VARIABLE __nvcc_exit_code
                 OUTPUT_VARIABLE __nvcc_output
                 ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)

-        if(__nvcc_exit_code EQUAL 0)
+        if (__nvcc_exit_code EQUAL 0)
             string (REPLACE "2.1" "2.1(2.0)" __nvcc_output "${__nvcc_output}")
             set (__gpu_detect_output ${__nvcc_output} CACHE INTERNAL "Returned GPU architetures" FORCE)
-        endif()
-    endif()
-
-    if(NOT __gpu_detect_output)
+        endif ()
+    endif ()
+
+    if (NOT __gpu_detect_output)
         message (STATUS "Automatic GPU detection failed. Building for all known architectures.")
         set (${__result} ${TBAG_CUDA_KNOWN_GPU_ARCHS})
-    else()
+    else ()
         set (${__result} ${__gpu_detect_output})
-    endif()
+    endif ()

     # Update result.
     set (${__result} ${${__result}} PARENT_SCOPE)


boards: holybro/kakutef7 disable CONSTRAINED_FLASH to increase optimization

--- boards/holybro/kakutef7/default.cmake
+++ boards/holybro/kakutef7/default.cmake
@@ -7,7 +7,6 @@
 	TOOLCHAIN arm-none-eabi
 	ARCHITECTURE cortex-m7
 	ROMFSROOT px4fmu_common
-	CONSTRAINED_FLASH
 	SERIAL_PORTS
 		TEL1:/dev/ttyS0 # UART1
 		TEL2:/dev/ttyS1 # UART2
@@ -22,13 +21,15 @@
 		gps
 		imu/invensense/icm20689
 		imu/invensense/mpu6000
-		magnetometer
-		optical_flow/px4flow
+		#magnetometer
+		magnetometer/isentek/ist8310
+		#optical_flow/px4flow
 		osd
-		pwm_out_sim
+		#pwm_out_sim
 		pwm_out
 		rc_input
-		telemetry
+		#telemetry
+		telemetry/frsky_telemetry
 		tone_alarm
 	MODULES
 		attitude_estimator_q
@@ -56,26 +57,26 @@
 	SYSTEMCMDS
 		bl_update
 		dmesg
-		dumpfile
-		esc_calib
+		#dumpfile
+		#esc_calib
 		hardfault_log
-		i2cdetect
-		led_control
+		#i2cdetect
+		#led_control
 		mixer
 		#motor_ramp
-		motor_test
-		nshterm
+		#motor_test
+		#nshterm
 		param
 		perf
 		pwm
 		reboot
-		reflect
-		sd_bench
+		#reflect
+		#sd_bench
 		top
-		topic_listener
-		tune_control
-		uorb
-		usb_connected
+		#topic_listener
+		#tune_control
+		#uorb
+		#usb_connected
 		ver
 		work_queue
 	)


PATH-180, BUILDFIX removing extraneous FORCE:MULTIPLE to fix the linux build.

--- indra/cmake/00-Common.cmake
+++ indra/cmake/00-Common.cmake
@@ -180,7 +180,7 @@
       # this stops us requiring a really recent glibc at runtime
       add_definitions(-fno-stack-protector)
       # linking can be very memory-hungry, especially the final viewer link
-      set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory,FORCE:MULTIPLE")
+      set(CMAKE_CXX_LINK_FLAGS "-Wl,--no-keep-memory")
     endif (NOT STANDALONE)
   endif (VIEWER)


Add time to KillWriter delay for stability

--- testing/adios2/engine/staging-common/TestSupp.cmake
+++ testing/adios2/engine/staging-common/TestSupp.cmake
@@ -118,8 +118,8 @@
 set (KillReaders3Max_TIMEOUT "300")
 set (KillReaders3Max_PROPERTIES "RUN_SERIAL;1")

-set (KillWriter_2x2_CMD "run_test.py --test_protocol kill_writer   -nw 2 -nr 2 --interval 2 --warg=RendezvousReaderCount=1,WENGINE_PARAMS --rarg=--expect_writer_failure --rarg=--num_steps --rarg=1000")
-set (KillWriterTimeout_2x2_CMD "run_test.py --test_protocol kill_writer -nw 2 -nr 2 --interval 2 --warg=RendezvousReaderCount=1,WENGINE_PARAMS --rarg=--expect_writer_failure --rarg=--num_steps --rarg=1000 --rarg=--non_blocking")
+set (KillWriter_2x2_CMD "run_test.py --test_protocol kill_writer   -nw 2 -nr 2 --interval 5 --warg=RendezvousReaderCount=1,WENGINE_PARAMS --rarg=--expect_writer_failure --rarg=--num_steps --rarg=1000")
+set (KillWriterTimeout_2x2_CMD "run_test.py --test_protocol kill_writer -nw 2 -nr 2 --interval 5 --warg=RendezvousReaderCount=1,WENGINE_PARAMS --rarg=--expect_writer_failure --rarg=--num_steps --rarg=1000 --rarg=--non_blocking")

 set (PreciousTimestep_CMD "run_test.py --test_protocol kill_readers  -nw 3 -nr 2 --max_readers 2 --warg=FirstTimestepPrecious=true,RendezvousReaderCount=0,WENGINE_PARAMS --rarg=--ignore_time_gap --rarg=--precious_first")


xtools: support xtensa hal

xtools: support xtensa hal

Xtensa toolchain has a HAL library that needs to be compiled in similar
to how we do this with the Zephyr SDK.

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

--- cmake/toolchain/xtools/target.cmake
+++ cmake/toolchain/xtools/target.cmake
@@ -17,3 +17,14 @@

 set(CROSS_COMPILE ${TOOLCHAIN_HOME}/${CROSS_COMPILE_TARGET}/bin/${CROSS_COMPILE_TARGET}-)
 set(SYSROOT_DIR   ${TOOLCHAIN_HOME}/${SYSROOT_TARGET}/${SYSROOT_TARGET})
+
+if("${ARCH}" STREQUAL "xtensa")
+  set(SYSROOT_DIR ${TOOLCHAIN_HOME}/${SYSROOT_TARGET})
+  set(TOOLCHAIN_INCLUDES
+    ${SYSROOT_DIR}/include/arch/include
+    ${SYSROOT_DIR}/include
+    )
+
+  LIST(APPEND TOOLCHAIN_LIBS hal)
+  LIST(APPEND LIB_INCLUDE_DIR -L${SYSROOT_DIR}/lib)
+endif()


[build][valgrind] Remove finding Valgrind from MacroAddValgrindTest

--- cmake/Modules/MacroAddValgrindTest.cmake
+++ cmake/Modules/MacroAddValgrindTest.cmake
@@ -7,7 +7,6 @@
 # @thoni56/Thomas Nilefalk 2015-09-13

 macro (macro_add_valgrind_test)
-  find_package(Valgrind)
   if (Valgrind_FOUND)
     set(
       libname


add hack for avahi < natty

add hack for avahi < natty

--- cmake/qibuild/modules/avahi-config.cmake
+++ cmake/qibuild/modules/avahi-config.cmake
@@ -3,7 +3,17 @@
 clean(AVAHI)
 fpath(AVAHI avahi-client/client.h PATH_SUFFIXES avahi)
 if (UNIX AND NOT APPLE)
-  set(AVAHI_LIBRARIES "-lavahi-common -lavahi-client" CACHE STRING "" FORCE)
+  flib(AVAHI avahi-common)
+  flib(AVAHI avahi-client)
+  # ugly hack: on natty, those are 'system libs', found in /lib/i386/ or something,
+  # so using '-l' work, but not flib.
+
+  # better: could we use:
+  #   if(NATTY)
+  #      list(APPEND CMAKE_
+  if(NOT AVAHI_LIBRARIES)
+    set(AVAHI_LIBRARIES "-lavahi-common -lavahi-client" CACHE STRING "" FORCE)
+  endif()
 else()
   flib(AVAHI avahi-common)
   flib(AVAHI avahi-client)


Restrict boost test to DEAL_II_ALLOW_PLATFORM_INTROSPECTION

--- cmake/configure/configure_boost.cmake
+++ cmake/configure/configure_boost.cmake
@@ -136,7 +136,7 @@
       RESET_CMAKE_REQUIRED()
     ENDIF()

-    IF(${var})
+    IF(${var} AND DEAL_II_ALLOW_PLATFORM_INTROSPECTION)
       # We want to pass the libraries to the CMake project that tests for the
       # BOOST Serialization bug. If we don't change the separator, only the
       # first one is passed. This change in the separator is reverted in


[AIX] For XL, pick GCC-compatible std & default warning options

Summary:
LLVM now requires C++14. For IBM XL compilers with C++14 support, this
can be done with the GCC-style options. The relevant block in the CMake
file is split up into smaller parts as part of this patch to allow the
common cases to be shared.

Reviewers: jfb, jasonliu, daltenty, xingxue

Reviewed By: jfb, xingxue

Subscribers: mstorsjo, mgorny, dexonsmith, llvm-commits

Tags: #llvm

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -432,25 +432,38 @@
     endif()
   endif()

-elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
-  append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-  append_if(LLVM_ENABLE_WERROR "-Wno-error" CMAKE_REQUIRED_FLAGS)
-  add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
-  add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW)
-  check_cxx_compiler_flag("-std=${LLVM_CXX_STD}" CXX_SUPPORTS_CXX_STD)
-  if (CXX_SUPPORTS_CXX_STD)
-   if (CYGWIN OR MINGW)
-      # MinGW and Cygwin are a bit stricter and lack things like
-      # 'strdup', 'stricmp', etc in c++11 mode.
-      string(REPLACE "c++" "gnu++" gnu_LLVM_CXX_STD "${LLVM_CXX_STD}")
-      append("-std=${gnu_LLVM_CXX_STD}" CMAKE_CXX_FLAGS)
+else( MSVC )
+  # Warnings-as-errors handling for GCC-compatible compilers:
+  if ( LLVM_COMPILER_IS_GCC_COMPATIBLE )
+    append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    append_if(LLVM_ENABLE_WERROR "-Wno-error" CMAKE_REQUIRED_FLAGS)
+  endif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
+
+  # Specific default warnings-as-errors for compilers accepting GCC-compatible warning flags:
+  if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" )
+    add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
+    add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW)
+  endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" )
+
+  # C++ language standard selection for compilers accepting the GCC-style option:
+  if ( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" )
+    check_cxx_compiler_flag("-std=${LLVM_CXX_STD}" CXX_SUPPORTS_CXX_STD)
+    if (CXX_SUPPORTS_CXX_STD)
+     if (CYGWIN OR MINGW)
+        # MinGW and Cygwin are a bit stricter and lack things like
+        # 'strdup', 'stricmp', etc in c++11 mode.
+        string(REPLACE "c++" "gnu++" gnu_LLVM_CXX_STD "${LLVM_CXX_STD}")
+        append("-std=${gnu_LLVM_CXX_STD}" CMAKE_CXX_FLAGS)
+      else()
+        append("-std=${LLVM_CXX_STD}" CMAKE_CXX_FLAGS)
+      endif()
     else()
-      append("-std=${LLVM_CXX_STD}" CMAKE_CXX_FLAGS)
-    endif()
-  else()
-    message(FATAL_ERROR "The host compiler does not support '-std=${LLVM_CXX_STD}'.")
-  endif()
-  if (LLVM_ENABLE_MODULES)
+      message(FATAL_ERROR "The host compiler does not support '-std=${LLVM_CXX_STD}'.")
+    endif()
+  endif( LLVM_COMPILER_IS_GCC_COMPATIBLE OR CMAKE_CXX_COMPILER_ID MATCHES "XL" )
+
+  # Modules enablement for GCC-compatible compilers:
+  if ( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
     set(module_flags "-fmodules -fmodules-cache-path=${PROJECT_BINARY_DIR}/module.cache")
     if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@@ -481,7 +494,7 @@
     else()
       message(FATAL_ERROR "LLVM_ENABLE_MODULES is not supported by this compiler")
     endif()
-  endif(LLVM_ENABLE_MODULES)
+  endif( LLVM_COMPILER_IS_GCC_COMPATIBLE AND LLVM_ENABLE_MODULES )
 endif( MSVC )

 if (MSVC)


fix COPYING path

fix COPYING path

--- cmakemodules/script_setup_cpack.cmake
+++ cmakemodules/script_setup_cpack.cmake
@@ -18,7 +18,7 @@
 SET(CPACK_PACKAGE_VERSION_MINOR "${CMAKE_MRPT_VERSION_NUMBER_MINOR}")
 SET(CPACK_PACKAGE_VERSION_PATCH "${CMAKE_MRPT_VERSION_NUMBER_PATCH}")

-SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/doc/COPYING")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
 SET(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")

 SET(CPACK_SOURCE_GENERATOR "TGZ")


cmake system: fix missing .h files in install target under UNIX

--- cmakemodules/script_setup_cpack.cmake
+++ cmakemodules/script_setup_cpack.cmake
@@ -25,16 +25,15 @@
 SET(CPACK_PACKAGE_INSTALL_DIRECTORY "mrpt-${CMAKE_MRPT_VERSION_NUMBER_MAJOR}.${CMAKE_MRPT_VERSION_NUMBER_MINOR}.${CMAKE_MRPT_VERSION_NUMBER_PATCH}" CACHE STRING "Name of the install directory")
 MARK_AS_ADVANCED(CPACK_PACKAGE_INSTALL_DIRECTORY)

+SET(PACKAGE_INCLUDES_SOURCES ON CACHE BOOL "Include all sources while building packages")
+MARK_AS_ADVANCED(PACKAGE_INCLUDES_SOURCES)
+
 IF(WIN32)
 	# --------------------------------
 	# Packages for Windows
 	# --------------------------------
 	SET(CPACK_SOURCE_IGNORE_FILES ".svn/;.*~;build;CMakeCache.txt;_CPack_Pakages/;CMakeFiles/;install/;Makefile;*.cmake")

-	SET(PACKAGE_INCLUDES_SOURCES ON CACHE BOOL "Include all sources while building packages")
-	MARK_AS_ADVANCED(PACKAGE_INCLUDES_SOURCES)
-
-
 	# There is a bug in NSI that does not handle full unix paths properly. Make
 	# sure there is at least one set of four (4) backlasshes.
 	SET(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/share/pixmaps\\\\mrpt_icon.ico")


cmake-modules:
 * FindThirdPartyGUSBampCAPI.cmake : now search into the right path, for compatibility with the latest gtec API version (3.11). Added path for windows 7 64b edition (suffix "(x86)" in path).

git-svn-id: ed1ce8e5c168003d808aec37bc6fda77b178f7bb@3079 c330d7e9-fc0c-0410-a5b3-fd85c6f5aa8f

--- trunk/cmake-modules/FindThirdPartyGUSBampCAPI.cmake
+++ trunk/cmake-modules/FindThirdPartyGUSBampCAPI.cmake
@@ -4,11 +4,16 @@
 # Adds include path
 # ---------------------------------
 IF(WIN32)
-	FIND_PATH(PATH_GUSBampCAPI API/gUSBamp.h PATHS "C:/Program Files/gtec/gUSBampCAPI" "C:/Program Files (x86)/gtec/gUSBampCAPI" $ENV{OpenViBE_dependencies})
+	FIND_PATH(PATH_GUSBampCAPI gUSBamp.h PATHS
+		"C:/Program Files/gtec/gUSBampCAPI/API"
+		"C:/Program Files (x86)/gtec/gUSBampCAPI/API"
+		"C:/Program Files/gtec/gUSBampCAPI/API/Win32"
+		"C:/Program Files (x86)/gtec/gUSBampCAPI/API/Win32"
+		$ENV{OpenViBE_dependencies})
 	IF(PATH_GUSBampCAPI)
 		MESSAGE(STATUS "  Found gUSBampCAPI...")
-		INCLUDE_DIRECTORIES(${PATH_GUSBampCAPI}/API)
-		FIND_LIBRARY(LIB_GUSBampCAPI gUSBamp PATHS ${PATH_GUSBampCAPI}/API )
+		INCLUDE_DIRECTORIES(${PATH_GUSBampCAPI})
+		FIND_LIBRARY(LIB_GUSBampCAPI gUSBamp PATHS ${PATH_GUSBampCAPI})
 		IF(LIB_GUSBampCAPI)
 			MESSAGE(STATUS "    [  OK  ] lib ${LIB_GUSBampCAPI}")
 			TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_GUSBampCAPI} )
@@ -21,8 +26,8 @@
 				TARGET ${PROJECT_NAME}-dynamic
 				POST_BUILD
 				COMMAND ${CMAKE_COMMAND}
-				ARGS -E copy "${PATH_GUSBampCAPI}/API/gUSBamp.dll" "${PROJECT_SOURCE_DIR}/bin"
-				COMMENT "      --->   Copying dll file ${PATH_GUSBampCAPI}/API/gUSBamp.dll for the g.Tec g.USBamp driver."
+				ARGS -E copy "${PATH_GUSBampCAPI}/gUSBamp.dll" "${PROJECT_SOURCE_DIR}/bin"
+				COMMENT "      --->   Copying dll file ${PATH_GUSBampCAPI}/gUSBamp.dll for the g.Tec g.USBamp driver."
 			VERBATIM)

 		ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyGUSBampCAPI)


Fix Sndio & ALSA packages configuration

Fix Sndio & ALSA packages configuration

--- cmake/check.cmake
+++ cmake/check.cmake
@@ -15,12 +15,12 @@
 find_package (ALSA)
 if (ALSA_FOUND)
 set (HAVE_ALSA_ASOUNDLIB_H 1)
-endif ()
-
+else ()
 find_package (Sndio)
 if (SNDIO_FOUND)
 set (HAVE_SNDIO_H 1)
-endif ()
+endif (SNDIO_FOUND)
+endif (ALSA_FOUND)

 check_include_file(byteswap.h       HAVE_BYTESWAP_H)
 check_include_file(dlfcn.h          HAVE_DLFCN_H)


Update cmake conan helper

Update cmake conan helper

--- cmake/conan.cmake
+++ cmake/conan.cmake
@@ -67,25 +67,20 @@
     #message(STATUS "GENERATOR " ${CMAKE_GENERATOR})
     #message(STATUS "GENERATOR WIN64 " ${CMAKE_CL_64})

-    message(STATUS "Conan ** WARNING** : This detection of settings from cmake is experimental and incomplete. "
-                    "Please check 'conan.cmake' and contribute")
+    message(STATUS "Conan: Automatic detection of conan settings from cmake")

     parse_arguments(${ARGV})
-    set(arch ${ARGUMENTS_ARCH})
-
-    if(CONAN_CMAKE_MULTI)
-        set(_SETTINGS -g cmake_multi)
-    else()
-        set(_SETTINGS -g cmake)
-    endif()
+
     if(ARGUMENTS_BUILD_TYPE)
-        set(_SETTINGS ${_SETTINGS} -s build_type=${ARGUMENTS_BUILD_TYPE})
+        set(_CONAN_SETTING_BUILD_TYPE ${ARGUMENTS_BUILD_TYPE})
     elseif(CMAKE_BUILD_TYPE)
-        set(_SETTINGS ${_SETTINGS} -s build_type=${CMAKE_BUILD_TYPE})
+        set(_CONAN_SETTING_BUILD_TYPE ${CMAKE_BUILD_TYPE})
     else()
         message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)")
     endif()
-
+    if(ARGUMENTS_ARCH)
+        set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH})
+    endif()
     #handle -s os setting
     if(CMAKE_SYSTEM_NAME)
         #use default conan os setting if CMAKE_SYSTEM_NAME is not defined
@@ -93,11 +88,11 @@
         if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
             set(CONAN_SYSTEM_NAME Macos)
         endif()
-        set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD)
+        set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore)
         list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index)
         if (${_index} GREATER -1)
             #check if the cmake system is a conan supported one
-            set(_SETTINGS ${_SETTINGS} -s os=${CONAN_SYSTEM_NAME})
+            set(_CONAN_SETTING_OS ${CONAN_SYSTEM_NAME})
         else()
             message(FATAL_ERROR "cmake system ${CONAN_SYSTEM_NAME} is not supported by conan. Use one of ${CONAN_SUPPORTED_PLATFORMS}")
         endif()
@@ -114,10 +109,6 @@
         message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unabled to detect compiler version.")
     endif()

-    if(arch)
-        set(_SETTINGS ${_SETTINGS} -s arch=${arch})
-    endif()
-
     if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU)
         # using GCC
         # TODO: Handle other params
@@ -128,19 +119,21 @@
         if(${MAJOR} GREATER 4)
             set(COMPILER_VERSION ${MAJOR})
         endif()
-        set(_SETTINGS ${_SETTINGS} -s compiler=gcc -s compiler.version=${COMPILER_VERSION})
+        set(_CONAN_SETTING_COMPILER gcc)
+        set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION})
         if (USING_CXX)
-          conan_cmake_detect_gnu_libcxx(_LIBCXX)
-            set(_SETTINGS ${_SETTINGS} -s compiler.libcxx=${_LIBCXX})
+            conan_cmake_detect_gnu_libcxx(_LIBCXX)
+            set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
         endif ()
     elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang)
         # using AppleClang
         string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
         list(GET VERSION_LIST 0 MAJOR)
         list(GET VERSION_LIST 1 MINOR)
-        set(_SETTINGS ${_SETTINGS} -s compiler=apple-clang -s compiler.version=${MAJOR}.${MINOR})
+        set(_CONAN_SETTING_COMPILER apple-clang)
+        set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
         if (USING_CXX)
-            set(_SETTINGS ${_SETTINGS} -s compiler.libcxx=libc++)
+            set(_CONAN_SETTING_COMPILER_LIBCXX libc++)
         endif ()
     elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang)
         string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
@@ -150,18 +143,25 @@
             cmake_policy(GET CMP0025 APPLE_CLANG_POLICY_ENABLED)
             if(NOT APPLE_CLANG_POLICY_ENABLED)
                 message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it")
-                set(_SETTINGS ${_SETTINGS} -s compiler=apple-clang -s compiler.version=${MAJOR}.${MINOR})
+                set(_CONAN_SETTING_COMPILER apple-clang)
+                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
             else()
-                set(_SETTINGS ${_SETTINGS} -s compiler=clang -s compiler.version=${MAJOR}.${MINOR})
+                set(_CONAN_SETTING_COMPILER clang)
+                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
             endif()
             if (USING_CXX)
-                set(_SETTINGS ${_SETTINGS} -s compiler.libcxx=libc++)
+                set(_CONAN_SETTING_COMPILER_LIBCXX libc++)
             endif ()
         else()
-            set(_SETTINGS ${_SETTINGS} -s compiler=clang -s compiler.version=${MAJOR}.${MINOR})
+            set(_CONAN_SETTING_COMPILER clang)
+            if(${MAJOR} GREATER 7)
+                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR})
+            else()
+                set(_CONAN_SETTING_COMPILER_VERSION ${MAJOR}.${MINOR})
+            endif()
             if (USING_CXX)
                 conan_cmake_detect_gnu_libcxx(_LIBCXX)
-                set(_SETTINGS ${_SETTINGS} -s compiler.libcxx=${_LIBCXX})
+                set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
             endif ()
         endif()
     elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC)
@@ -170,38 +170,68 @@
         if("${_VISUAL_VERSION}" STREQUAL "")
             message(FATAL_ERROR "Conan: Visual Studio not recognized")
         else()
-            set(_SETTINGS ${_SETTINGS} -s compiler=${_VISUAL} -s compiler.version=${_VISUAL_VERSION})
-        endif()
-
-        if(NOT arch)
+            set(_CONAN_SETTING_COMPILER ${_VISUAL})
+            set(_CONAN_SETTING_COMPILER_VERSION ${_VISUAL_VERSION})
+        endif()
+
+        if(NOT _CONAN_SETTING_ARCH)
             if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64")
-                set(_SETTINGS ${_SETTINGS} -s arch=x86_64)
+                set(_CONAN_SETTING_ARCH x86_64)
             elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM")
                 message(STATUS "Conan: Using default ARM architecture from MSVC")
-                set(_SETTINGS ${_SETTINGS} -s arch=armv6)
+                set(_CONAN_SETTING_ARCH armv6)
             elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86")
-                set(_SETTINGS ${_SETTINGS} -s arch=x86)
+                set(_CONAN_SETTING_ARCH x86)
             else ()
                 message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]")
             endif()
         endif()

         conan_cmake_detect_vs_runtime(_vs_runtime)
-        message(STATUS "Detected VS runtime: ${_vs_runtime}")
-        set(_SETTINGS ${_SETTINGS} -s compiler.runtime=${_vs_runtime})
-
+        message(STATUS "Conan: Detected VS runtime: ${_vs_runtime}")
+        set(_CONAN_SETTING_COMPILER_RUNTIME ${_vs_runtime})
+
         if (CMAKE_GENERATOR_TOOLSET)
-            set(_SETTINGS ${_SETTINGS} -s compiler.toolset=${CMAKE_VS_PLATFORM_TOOLSET})
+            set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET})
         elseif(CMAKE_VS_PLATFORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja"))
-            set(_SETTINGS ${_SETTINGS} -s compiler.toolset=${CMAKE_VS_PLATFORM_TOOLSET})
+            set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET})
         endif()
     else()
         message(FATAL_ERROR "Conan: compiler setup not recognized")
     endif()
+
+    # If profile is defined it is used
+    if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ARGUMENTS_DEBUG_PROFILE)
+        set(_SETTINGS -pr ${ARGUMENTS_DEBUG_PROFILE})
+    elseif(CMAKE_BUILD_TYPE STREQUAL "Release" AND ARGUMENTS_RELEASE_PROFILE)
+        set(_SETTINGS -pr ${ARGUMENTS_RELEASE_PROFILE})
+    elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND ARGUMENTS_RELWITHDEBINFO_PROFILE)
+        set(_SETTINGS -pr ${ARGUMENTS_RELWITHDEBINFO_PROFILE})
+    elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" AND ARGUMENTS_MINSIZEREL_PROFILE)
+        set(_SETTINGS -pr ${ARGUMENTS_MINSIZEREL_PROFILE})
+    elseif(ARGUMENTS_PROFILE)
+        set(_SETTINGS -pr ${ARGUMENTS_PROFILE})
+    endif()
+
+    if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL")
+        set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version
+                                   compiler.runtime compiler.libcxx compiler.toolset)
+    endif()
+
+    # Automatic from CMake
+    foreach(ARG ${ARGUMENTS_PROFILE_AUTO})
+        string(TOUPPER ${ARG} _arg_name)
+        string(REPLACE "." "_" _arg_name ${_arg_name})
+        if(_CONAN_SETTING_${_arg_name})
+            set(_SETTINGS ${_SETTINGS} -s ${ARG}=${_CONAN_SETTING_${_arg_name}})
+        endif()
+    endforeach()

     foreach(ARG ${ARGUMENTS_SETTINGS})
         set(_SETTINGS ${_SETTINGS} -s ${ARG})
     endforeach()
+
+    message(STATUS "Conan: Settings= ${_SETTINGS}")

     set(${result} ${_SETTINGS} PARENT_SCOPE)
 endfunction()
@@ -259,10 +289,11 @@

 macro(parse_arguments)
-  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS)
-  set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE PROFILE ARCH BUILD_TYPE)
-  set(multiValueArgs REQUIRES OPTIONS IMPORTS SETTINGS BUILD CONAN_COMMAND)
-  cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
+  set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_OUTPUT_DIRS OUTPUT_QUIET NO_IMPORTS)
+  set(oneValueArgs CONANFILE DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE
+                   PROFILE ARCH BUILD_TYPE INSTALL_FOLDER CONAN_COMMAND)
+  set(multiValueArgs REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO INSTALL_ARGS)
+  cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
 endmacro()

 function(conan_cmake_install)
@@ -273,6 +304,12 @@
     # cmake does not identify conan as command, even if it is +x and it is in the path
     parse_arguments(${ARGV})

+    if(CONAN_CMAKE_MULTI)
+        set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake_multi)
+    else()
+        set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake)
+    endif()
+
     set(CONAN_BUILD_POLICY "")
     foreach(ARG ${ARGUMENTS_BUILD})
         if(${ARG} STREQUAL "all")
@@ -292,38 +329,44 @@
       set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE})
       # A conan file has been specified - apply specified options as well if provided
       foreach(ARG ${ARGUMENTS_OPTIONS})
-          set(CONAN_OPTIONS ${CONAN_OPTIONS} -o ${ARG})
+          set(CONAN_OPTIONS ${CONAN_OPTIONS} -o=${ARG})
       endforeach()
     else()
       set(CONANFILE ".")
-    endif()
-    if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ARGUMENTS_DEBUG_PROFILE)
-      set(settings -pr ${ARGUMENTS_DEBUG_PROFILE})
-    endif()
-    if(CMAKE_BUILD_TYPE STREQUAL "Release" AND ARGUMENTS_RELEASE_PROFILE)
-      set(settings -pr ${ARGUMENTS_RELEASE_PROFILE})
-    endif()
-    if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND ARGUMENTS_RELWITHDEBINFO_PROFILE)
-      set(settings -pr ${ARGUMENTS_RELWITHDEBINFO_PROFILE})
-    endif()
-    if(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" AND ARGUMENTS_MINSIZEREL_PROFILE)
-      set(settings -pr ${ARGUMENTS_MINSIZEREL_PROFILE})
-    endif()
-    if(ARGUMENTS_PROFILE)
-      set(settings -pr ${ARGUMENTS_PROFILE})
     endif()
     if(ARGUMENTS_UPDATE)
       set(CONAN_INSTALL_UPDATE --update)
     endif()
-    set(conan_args install ${CONANFILE} ${settings} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_OPTIONS})
+    if(ARGUMENTS_NO_IMPORTS)
+      set(CONAN_INSTALL_NO_IMPORTS --no-imports)
+    endif()
+    set(CONAN_INSTALL_FOLDER "")
+    if(ARGUMENTS_INSTALL_FOLDER)
+      set(CONAN_INSTALL_FOLDER -if=${ARGUMENTS_INSTALL_FOLDER})
+    endif()
+    foreach(ARG ${ARGUMENTS_GENERATORS})
+        set(CONAN_GENERATORS ${CONAN_GENERATORS} -g=${ARG})
+    endforeach()
+    foreach(ARG ${ARGUMENTS_ENV})
+        set(CONAN_ENV_VARS ${CONAN_ENV_VARS} -e=${ARG})
+    endforeach()
+    set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_INSTALL_NO_IMPORTS} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER} ${ARGUMENTS_INSTALL_ARGS})

     string (REPLACE ";" " " _conan_args "${conan_args}")
     message(STATUS "Conan executing: ${conan_command} ${_conan_args}")

+    if(ARGUMENTS_OUTPUT_QUIET)
+      set(OUTPUT_CONTROL OUTPUT_QUIET)
+    endif()
+
     execute_process(COMMAND ${conan_command} ${conan_args}
                      RESULT_VARIABLE return_code
+                     OUTPUT_VARIABLE conan_output
+                     ERROR_VARIABLE conan_output
                      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

+    message(STATUS "${conan_output}")
+
     if(NOT "${return_code}" STREQUAL "0")
       message(FATAL_ERROR "Conan install failed='${return_code}'")
     endif()
@@ -386,16 +429,19 @@
 macro(conan_cmake_run)
     parse_arguments(${ARGV})

-    if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE AND NOT CONAN_EXPORTED)
+    if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE AND NOT CONAN_EXPORTED
+            AND NOT ARGUMENTS_BUILD_TYPE)
         set(CONAN_CMAKE_MULTI ON)
         message(STATUS "Conan: Using cmake-multi generator")
     else()
         set(CONAN_CMAKE_MULTI OFF)
     endif()
+
     if(NOT CONAN_EXPORTED)
         conan_cmake_setup_conanfile(${ARGV})
         if(CONAN_CMAKE_MULTI)
             foreach(CMAKE_BUILD_TYPE "Release" "Debug")
+                set(ENV{CONAN_IMPORT_PATH} ${CMAKE_BUILD_TYPE})
                 conan_cmake_settings(settings ${ARGV})
                 conan_cmake_install(SETTINGS ${settings} ${ARGV})
             endforeach()
@@ -421,3 +467,53 @@
         conan_basic_setup(${_setup_options})
     endif()
 endmacro()
+
+macro(conan_check)
+    # Checks conan availability in PATH
+    # Arguments REQUIRED and VERSION are optional
+    # Example usage:
+    #    conan_check(VERSION 1.0.0 REQUIRED)
+    message(STATUS "Conan: checking conan executable in path")
+    set(options REQUIRED)
+    set(oneValueArgs VERSION)
+    cmake_parse_arguments(CONAN "${options}" "${oneValueArgs}" "" ${ARGN})
+
+    find_program(CONAN_CMD conan)
+    if(NOT CONAN_CMD AND CONAN_REQUIRED)
+        message(FATAL_ERROR "Conan executable not found!")
+    endif()
+    message(STATUS "Conan: Found program ${CONAN_CMD}")
+    execute_process(COMMAND ${CONAN_CMD} --version
+                    OUTPUT_VARIABLE CONAN_VERSION_OUTPUT
+                    ERROR_VARIABLE CONAN_VERSION_OUTPUT)
+    message(STATUS "Conan: Version found ${CONAN_VERSION_OUTPUT}")
+
+    if(DEFINED CONAN_VERSION)
+        string(REGEX MATCH ".*Conan version ([0-9]+\.[0-9]+\.[0-9]+)" FOO
+            "${CONAN_VERSION_OUTPUT}")
+        if(${CMAKE_MATCH_1} VERSION_LESS ${CONAN_VERSION})
+            message(FATAL_ERROR "Conan outdated. Installed: ${CONAN_VERSION}, \
+                required: ${CONAN_VERSION_REQUIRED}. Consider updating via 'pip \
+                install conan --upgrade'.")
+        endif()
+    endif()
+endmacro()
+
+macro(conan_add_remote)
+    # Adds a remote
+    # Arguments URL and NAME are required, INDEX is optional
+    # Example usage:
+    #    conan_add_remote(NAME bincrafters INDEX 1
+    #       URL https://api.bintray.com/conan/bincrafters/public-conan)
+    set(oneValueArgs URL NAME INDEX)
+    cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN})
+
+    if(DEFINED CONAN_INDEX)
+        set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}")
+    endif()
+
+    message(STATUS "Conan: Adding ${CONAN_NAME} remote repositoy (${CONAN_URL})")
+    execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_URL}
+      ${CONAN_INDEX_ARG} -f)
+endmacro()
+


fix CMake warning with 2.8.12 and newer (fix #44)

--- core/rosbuild/core/rosbuild/public.cmake
+++ core/rosbuild/core/rosbuild/public.cmake
@@ -331,7 +331,7 @@
   # handle lingers in the test results directory), because CMake doesn't
   # seem to be able to do it.
   add_custom_target(rosbuild_clean-test-results
-                    if ! rm -rf ${rosbuild_test_results_dir}/${PROJECT_NAME}\; then echo "WARNING: failed to remove test-results directory"\; fi)
+                    if ! rm -rf ${rosbuild_test_results_dir}/${PROJECT_NAME}\; then echo "\"WARNING: failed to remove test-results directory\"\;" fi)
   # Make the tests target depend on rosbuild_clean-test-results, which will ensure
   # that test results are deleted before we try to build tests, and thus
   # before we try to run tests.


Remove more standard universe configuration

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -457,7 +457,6 @@
 		message(FATAL_ERROR "Could not find libuuid")
 	endif()
 	find_path(HAVE_UUID_UUID_H "uuid/uuid.h")
-	find_library( HAVE_DMTCP dmtcpaware HINTS /usr/local/lib/dmtcp )
 	find_multiple( "resolv" HAVE_LIBRESOLV )
 	find_library( HAVE_LIBLTDL "ltdl" )
 	find_multiple( "cares" HAVE_LIBCARES )
@@ -765,10 +764,6 @@
 	set(HAVE_GNU_LD ON)
     option(HAVE_HTTP_PUBLIC_FILES "Support for public input file transfer via HTTP" ON)

-elseif(${OS_NAME} STREQUAL "AIX")
-	set(AIX ON)
-	set(DOES_SAVE_SIGSTATE ON)
-	set(NEEDS_64BIT_STRUCTS ON)
 elseif(${OS_NAME} STREQUAL "DARWIN")
 	add_definitions(-DDarwin)
 	set(DARWIN ON)
@@ -1070,39 +1065,6 @@
         if (LINUX)
           option(WITH_GANGLIA "Compiling with support for GANGLIA" ON)
         endif(LINUX)
-
-	# the following logic if for standard universe *only*
-	if (LINUX AND NOT CLIPPED AND GLIBC_VERSION)
-
-		add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/zlib/1.2.3)
-		add_subdirectory(${CONDOR_EXTERNAL_DIR}/bundles/glibc)
-
-		if (EXT_GLIBC_FOUND)
-		  if (${BIT_MODE} STREQUAL "32")
-			  set (DOES_COMPRESS_CKPT ON) # this is total crap
-		  endif(${BIT_MODE} STREQUAL "32")
-
-		  if (DOES_SAVE_SIGSTATE)
-			  set(STD_U_C_FLAGS -DSAVE_SIGSTATE)
-		  endif(DOES_SAVE_SIGSTATE)
-
-		  set (STD_UNIVERSE ON)
-
-		  # seriously I've sold my soul doing this dirty work
-		  set (CONDOR_COMPILE ${CONDOR_SOURCE_DIR}/src/condor_scripts/condor_compile)
-		  set (CONDOR_ARCH_LINK ${CONDOR_SOURCE_DIR}/src/condor_scripts/condor_arch_link)
-		  set (STDU_LIB_LOC ${CMAKE_INSTALL_PREFIX}/${C_LIB})
-
-		  include_directories( ${CONDOR_SOURCE_DIR}/src/condor_io.std )
-
-		  message( STATUS "** Standard Universe Enabled **")
-
-		else()
-			message( STATUS "** Standard Universe Disabled **")
-		endif()
-	else()
-		message( STATUS "** Standard Universe Disabled **")
-	endif()

 endif(WINDOWS)


Fix root target directory of copy_dll_dependencies() function

--- cmake/utils.cmake
+++ cmake/utils.cmake
@@ -224,7 +224,7 @@
 function(copy_dll_dependencies TARGET)
     get_target_dependencies(${TARGET} dependencies)

-    set(dest_directory $<TARGET_FILE_DIR:${ROOT_TARGET}>)
+    set(dest_directory $<TARGET_FILE_DIR:${TARGET}>)
     foreach(dep ${dependencies})
         if(TARGET ${dep})
             get_target_property(type ${dep} TYPE)


-TEST: update dashboard BIGR.cluster to itk 4.5.0

--- Testing/Dashboard/pxDashboard_BIGR_linux64_gcc.cmake
+++ Testing/Dashboard/pxDashboard_BIGR_linux64_gcc.cmake
@@ -46,7 +46,7 @@

 SET( dashboard_cache "
 // Which ITK to use
-ITK_DIR:PATH=/cm/shared/apps/itk/4.2.0/releasefftw
+ITK_DIR:PATH=/cm/shared/apps/itk/4.5.0/releasefftw

 // Some ITKTools settings, defining the configuration
 ITKTOOLS_BUILD_TESTING:BOOL=ON


CMake: Mark TRILINOS_CONFIG_DIR as advanced

git-svn-id: 31d9d2f6432a47c86a3640814024c107794ea77c@28866 0785d39b-7218-0410-832d-ea1e28bc413d

--- deal.II/cmake/modules/FindTRILINOS.cmake
+++ deal.II/cmake/modules/FindTRILINOS.cmake
@@ -122,6 +122,7 @@

   MARK_AS_ADVANCED(
     TRILINOS_DIR
+    TRILINOS_CONFIG_DIR
     )

 ELSE()


Quickfix - misspeled git tag.

Quickfix - misspeled git tag.

--- cmake/DownloadDependencies.cmake
+++ cmake/DownloadDependencies.cmake
@@ -6,7 +6,7 @@
 FetchContent_Declare(
         nana
         GIT_REPOSITORY "https://github.com/cnjinhao/nana.git"
-        GIT_TAG "1.7.1"
+        GIT_TAG "v1.7.1"
         GIT_SHALLOW TRUE
         GIT_PROGRESS TRUE
         UPDATE_COMMAND ""


Build: Reformat CMake code

Build: Reformat CMake code

--- cmake/Modules/Findyaml-cpp.cmake
+++ cmake/Modules/Findyaml-cpp.cmake
@@ -9,27 +9,27 @@
 #  YAML-CPP_VERSION		The version string of yaml-cpp
 #
 # This script is a modified version of the code available here:
-# 	https://cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules
+#	https://cmake.org/Wiki/CMake:How_To_Find_Libraries#Writing_find_modules

-find_package(PkgConfig)
-pkg_check_modules(PC_YAML-CPP QUIET yaml-cpp)
+find_package (PkgConfig)
+pkg_check_modules (PC_YAML-CPP QUIET yaml-cpp)

-find_path(YAML-CPP_INCLUDE_DIR
+find_path (YAML-CPP_INCLUDE_DIR
 	NAMES yaml-cpp/yaml.h
 	HINTS ${PC_YAML-CPP_INCLUDEDIR} ${PC_YAML-CPP_INCLUDE_DIRS}
 	PATH_SUFFIXES yaml-cpp)

-find_library(YAML-CPP_LIBRARY
+find_library (YAML-CPP_LIBRARY
 	NAMES yaml-cpp
 	HINTS ${PC_YAML-CPP_LIBDIR} ${PC_YAML-CPP_LIBRARY_DIRS})

-set(YAML-CPP_VERSION ${PC_YAML-CPP_VERSION})
+set (YAML-CPP_VERSION ${PC_YAML-CPP_VERSION})

-include(FindPackageHandleStandardArgs)
+include (FindPackageHandleStandardArgs)
 # Handle the QUIETLY and REQUIRED arguments and set YAML-CPP_FOUND to TRUE, if all listed variables are TRUE
-find_package_handle_standard_args(yaml-cpp REQUIRED_VARS YAML-CPP_LIBRARY YAML-CPP_INCLUDE_DIR VERSION_VAR YAML-CPP_VERSION)
+find_package_handle_standard_args (yaml-cpp REQUIRED_VARS YAML-CPP_LIBRARY YAML-CPP_INCLUDE_DIR VERSION_VAR YAML-CPP_VERSION)

-mark_as_advanced(YAML-CPP_INCLUDE_DIR YAML-CPP_LIBRARY YAML-CPP_VERSION)
+mark_as_advanced (YAML-CPP_INCLUDE_DIR YAML-CPP_LIBRARY YAML-CPP_VERSION)

-set(YAML-CPP_LIBRARIES ${YAML-CPP_LIBRARY})
-set(YAML-CPP_INCLUDE_DIRS ${YAML-CPP_INCLUDE_DIR})
+set (YAML-CPP_LIBRARIES ${YAML-CPP_LIBRARY})
+set (YAML-CPP_INCLUDE_DIRS ${YAML-CPP_INCLUDE_DIR})


fix OPENCV_DISABLE_THREAD_SUPPORT

fix OPENCV_DISABLE_THREAD_SUPPORT

Message was,
  CMake Error at CMakeLists.txt:1475 (message):
    Not all parallel frameworks have been disabled (using Concurrency).

--- cmake/OpenCVFindFrameworks.cmake
+++ cmake/OpenCVFindFrameworks.cmake
@@ -17,7 +17,7 @@
 endif()

 # --- Concurrency ---
-if(MSVC AND NOT HAVE_TBB)
+if(MSVC AND NOT HAVE_TBB AND NOT OPENCV_DISABLE_THREAD_SUPPORT)
   set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
   file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
   try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")


[cmake] Pass LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN to NATIVE configure

We should propagate this down to host builds so that e.g. people using
an optimized tablegen can do the sub-configure successfully.

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

--- cmake/modules/CrossCompile.cmake
+++ cmake/modules/CrossCompile.cmake
@@ -52,6 +52,7 @@
         -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="${experimental_targets_to_build_arg}"
         -DLLVM_DEFAULT_TARGET_TRIPLE="${TARGET_TRIPLE}"
         -DLLVM_TARGET_ARCH="${LLVM_TARGET_ARCH}"
+        -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN="${LLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN}"
         ${build_type_flags} ${linker_flag} ${external_clang_dir}
     WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
     DEPENDS CREATE_LLVM_${target_name}


PX4 add compiler dependent: disable no-stringop-truncation

--- cmake/px4_add_common_flags.cmake
+++ cmake/px4_add_common_flags.cmake
@@ -89,6 +89,7 @@
 		-Wno-missing-field-initializers
 		-Wno-missing-include-dirs # TODO: fix and enable
 		-Wno-unused-parameter
+
 		)

 	# compiler specific flags
@@ -115,6 +116,10 @@
 		if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9)
 			# force color for gcc > 4.9
 			add_compile_options(-fdiagnostics-color=always)
+		endif()
+
+		if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 9.3)
+			add_compile_options(-Wno-stringop-truncation)
 		endif()

 		add_compile_options(


Rename git default variable to exclude from Superbuild propagation

--- SuperBuild/SuperBuild.cmake
+++ SuperBuild/SuperBuild.cmake
@@ -116,12 +116,12 @@
 # Use GIT protocol
 #------------------------------------------------------------------------------
 find_package(Git)
-set(SimpleITK_GIT_PROTOCOL_default "https")
+set(_SimpleITK_GIT_PROTOCOL_default "https")
 if (GIT_VERSION_STRING VERSION_LESS "1.7.10")
   # minimum version for https support
   set(SimpleITK_GIT_PROTOCOL_default "git")
 endif()
-set(SimpleITK_GIT_PROTOCOL  ${SimpleITK_GIT_PROTOCOL_default} CACHE STRING "If behind a firewall turn set this to 'https' or 'http'." )
+set(SimpleITK_GIT_PROTOCOL  ${_SimpleITK_GIT_PROTOCOL_default} CACHE STRING "If behind a firewall turn set this to 'https' or 'http'." )
 mark_as_advanced(SimpleITK_GIT_PROTOCOL)
 set_property(CACHE SimpleITK_GIT_PROTOCOL PROPERTY STRINGS "https;http;git")
 set(git_protocol ${SimpleITK_GIT_PROTOCOL})


[mechanics] add test for mechanisms (2 over 3 failed)

--- mechanics/mechanics_tests.cmake
+++ mechanics/mechanics_tests.cmake
@@ -21,4 +21,51 @@
     END_TEST()
   ENDIF()

+  IF(WITH_MECHANISMS)
+    MESSAGE("   ")
+    MESSAGE("-------------------------------------- ************************ ")
+
+    get_subdirectories(dirlist ${CMAKE_SOURCE_DIR}/examples/Mechanics/Mechanisms/)
+    foreach(_dir ${dirlist})
+      MESSAGE("${_dir}")
+      set(bin_dir ${CMAKE_BINARY_DIR}/mechanics/swig/mechanics/mechanisms/test/${_dir})
+      MESSAGE("mkdir ${bin_dir} ")
+      file(MAKE_DIRECTORY ${bin_dir})
+      file(GLOB EXAMPLES_FILES ${CMAKE_SOURCE_DIR}/examples/Mechanics/Mechanisms/${_dir}/bodydef.py
+	${CMAKE_SOURCE_DIR}/examples/Mechanics/Mechanisms/${_dir}/mbtbLocalOptions.py)
+      foreach(_F ${EXAMPLES_FILES})
+	MESSAGE("${_F}")
+	configure_file(${_F} ${bin_dir})
+	file(READ ${_F} RESOURCES_FILE)
+	string(REGEX REPLACE
+	  "with3D=1"
+	  "with3D=0 # remove X output for test#"
+	  RESOURCES_FILE_MODIFIED ${RESOURCES_FILE})
+	MESSAGE(${RESOURCES_FILE_MODIFIED})
+	get_filename_component(_F_NAME ${_F} NAME)
+	file(WRITE ${bin_dir}/${_F_NAME} ${RESOURCES_FILE_MODIFIED})
+      endforeach()
+      get_subdirectories(subdirlist ${CMAKE_SOURCE_DIR}/examples/Mechanics/Mechanisms/${_dir})
+
+      foreach(_subdir ${subdirlist})
+	if(NOT _subdir MATCHES siconos)
+	  MESSAGE("subdir ${_subdir}")
+	  file(GLOB EXAMPLES_SUBDIR_FILES
+	    ${CMAKE_SOURCE_DIR}/examples/Mechanics/Mechanisms/${_dir}/${_subdir}/*.*)
+	  file(MAKE_DIRECTORY ${bin_dir}/${_subdir})
+	  foreach(_F ${EXAMPLES_SUBDIR_FILES})
+	    MESSAGE("${_F}")
+	    configure_file(${_F} ${bin_dir}/${_subdir})
+	  endforeach()
+	endif()
+      endforeach(_subdir)
+
+
+      set(command_name "python ${CMAKE_BINARY_DIR}/scripts/siconos -P ${CMAKE_BINARY_DIR}/scripts/siconos-mechanisms.py .")
+      MESSAGE("${command_name}")
+      add_test(mechanisms_${_dir} ${CMAKE_COMMAND} -E chdir ${bin_dir} python ${CMAKE_BINARY_DIR}/scripts/siconos -P ${CMAKE_BINARY_DIR}/scripts/siconos-mechanisms.py . )
+    endforeach(_dir)
+
+  ENDIF()
+
 endif()


Fixed the core/policy.

Fixed the core/policy.

--- core/policy.cmake
+++ core/policy.cmake
@@ -1,41 +1,104 @@
 #!/usr/bin/env cmake -P
+
 cmake_minimum_required(VERSION 3.0.2)
+message([[## Policy "CMP0007" specifies to control an interpretation of an empty element in list.]])
+cmake_policy(PUSH)
+  function(verify_cmp0007 behavior)
+    cmake_policy(SET CMP0007 ${behavior})
+    cmake_policy(GET CMP0007 current_behavior)
+    message("CMP0007: ${current_behavior}")
+
+    set(list_value "a;b;;c")
+    list(LENGTH list_value length)
+    message("list: ${list_value}")
+    message("length: ${length}")
+    message("")
+  endfunction()

-# Policy "CMP0007" specifies to control an interpretation of an empty element in list.
-function(verify_cmp0007 behavior)
-  cmake_policy(SET CMP0007 ${behavior})
+  verify_cmp0007(OLD) #[[
+    CMP0007: OLD
+    list: a;b;;c
+    length: 3
+  ]]
+
+  verify_cmp0007(NEW) #[[
+    CMP0007: NEW
+    list: a;b;;c
+    length: 4
+  ]]
+cmake_policy(POP)
+
+
+cmake_minimum_required(VERSION 3.0.2)
+message([[## Policy stack structure]])
+cmake_policy(PUSH)
+  cmake_policy(SET CMP0007 NEW)
   cmake_policy(GET CMP0007 current_behavior)
-  message("CMP0007: ${current_behavior}")
+  message("CMP0007: ${current_behavior}") # CMP0007: NEW

-  set(list_value "a;b;;c")
-  list(LENGTH list_value length)
-  message("list: ${list_value}")
-  message("length: ${length}")
-  message("")
-endfunction()
+  cmake_policy(PUSH) # Push the current policy settings
+    cmake_policy(SET CMP0007 OLD)
+    cmake_policy(GET CMP0007 current_behavior)
+    message("CMP0007: ${current_behavior}") # CMP0007: OLD
+  cmake_policy(POP) # Pop the current policy settings
+
+  cmake_policy(GET CMP0007 current_behavior)
+  message("CMP0007: ${current_behavior}") # CMP0007: NEW
+cmake_policy(POP)

-verify_cmp0007(OLD) #[[
-  CMP0007: OLD
-  list: a;b;;c
-  length: 3
-]]

-verify_cmp0007(NEW) #[[
-  CMP0007: NEW
-  list: a;b;;c
-  length: 4
-]]
+cmake_minimum_required(VERSION 3.0.2)
+message([[## Policy setting by CMake versions]])
+cmake_policy(PUSH)
+  set(policy_no CMP0050)
+  cmake_policy(VERSION 2.6)
+  cmake_policy(GET ${policy_no} current_behavior)
+  message("CMake 2.6 ${policy_no}: ${current_behavior}")
+
+  cmake_policy(VERSION 3.0)
+  cmake_policy(GET ${policy_no} current_behavior)
+  message("CMake 3.0 ${policy_no}: ${current_behavior}")
+cmake_policy(POP)

-# Policy stack structure
-cmake_policy(SET CMP0007 NEW)
-cmake_policy(GET CMP0007 current_behavior)
-message("CMP0007: ${current_behavior}") # CMP0007: NEW

-cmake_policy(PUSH) # Push the current policy settings
-  cmake_policy(SET CMP0007 OLD)
-  cmake_policy(GET CMP0007 current_behavior)
-  message("CMP0007: ${current_behavior}") # CMP0007: OLD
-cmake_policy(POP) # Pop the current policy settings
+cmake_minimum_required(VERSION 3.0.2)
+message([[## CMake minimum required version]])
+cmake_policy(PUSH)
+  cmake_minimum_required(VERSION 2.6)
+  message("CMake minimum required version: ${CMAKE_MINIMUM_REQUIRED_VERSION}")
+
+  cmake_minimum_required(VERSION 3.0.2)
+  message("CMake minimum required version: ${CMAKE_MINIMUM_REQUIRED_VERSION}")
+
+
+  message([[## Checks whether the policy exists]])
+  cmake_minimum_required(VERSION 3.0.2)
+
+  #[[
+    cmake_policy(SET CMP0900 NEW) # Error
+    cmake_policy(GET CMP0900 behavior) # Error
+  ]]
+
+  if(POLICY CMP0900)
+    cmake_policy(SET CMP0900 NEW)
+  endif()
+cmake_policy(POP)

-cmake_policy(GET CMP0007 current_behavior)
-message("CMP0007: ${current_behavior}") # CMP0007: NEW
+
+cmake_minimum_required(VERSION 3.0.2)
+message([[## Policy default setting]])
+cmake_policy(PUSH)
+  set(CMAKE_POLICY_DEFAULT_CMP0050 NEW CACHE STRING "" FORCE)
+  message("CMAKE_POLICY_DEFAULT_CMP0050: ${CMAKE_POLICY_DEFAULT_CMP0050}")
+
+  cmake_minimum_required(VERSION 2.8)
+  cmake_policy(GET CMP0050 current_behavior)
+  message("CMP0050: ${current_behavior}") # CMP0050: NEW
+
+
+  unset(CMAKE_POLICY_DEFAULT_CMP0050 CACHE)
+
+  cmake_minimum_required(VERSION 2.8)
+  cmake_policy(GET CMP0050 current_behavior)
+  message("CMP0050: ${current_behavior}") # CMP0050:
+cmake_policy(POP)


Tidy test names

Tidy test names

--- reactor/cmake_modules/FindGTest.cmake
+++ reactor/cmake_modules/FindGTest.cmake
@@ -29,9 +29,7 @@
     # Disable install step
     INSTALL_COMMAND ""
     # Wrap download, configure and build steps in a script to log output
-    LOG_DOWNLOAD ON
-    LOG_CONFIGURE ON
-    LOG_BUILD ON)
+    )

 add_definitions(-DGTEST_LANG_CXX11)

@@ -41,7 +39,7 @@
   include_directories(${source_dir}/include)
   # Better, but only works on CMake 2.8.6?
   # get_target_property(THISTEST_INCLUDE test_${name} INCLUDE_DIRECTORIES)
-  # set_target_properties(test_${name} PROPERTIES INCLUDE_DIRECTORIES
+  # set_target_properties(Test${name} PROPERTIES INCLUDE_DIRECTORIES
   #                       "${source_dir}/include;${THISTEST_INCLUDE}")

   add_executable(test_${name} ${source})
@@ -60,6 +58,6 @@
     target_link_libraries(test_${name} ${ARGN})
   endif(NOT "${ARGN}" STREQUAL "")

-  add_test(cxx_${name} ${EXECUTABLE_OUTPUT_PATH}/test_${name}
+  add_test(${name} ${EXECUTABLE_OUTPUT_PATH}/test_${name}
               --gtest_output=xml:${CMAKE_BINARY_DIR}/test-results/test_${name}.xml)
 endmacro()


STYLE: Nightly Date Stamp

STYLE: Nightly Date Stamp

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

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


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   12)
+SET(KWSYS_DATE_STAMP_DAY   13)


port-to-0.9: Remove deprecated Find file


Adapt FindGLIB2.cmake module to work on Windows with installed gstreamer

--- cmake/FindGLIB2.cmake
+++ cmake/FindGLIB2.cmake
@@ -19,83 +19,171 @@
 #  BSD license.
 #  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #
-
+# GREGORIAN - Vojage Vojage

 IF (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
   # in cache already
   SET(GLIB2_FOUND TRUE)
 ELSE (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS )
-
-  INCLUDE(FindPkgConfig)
-
-  ## Glib
-  IF ( GLIB2_FIND_REQUIRED )
-    SET( _pkgconfig_REQUIRED "REQUIRED" )
-  ELSE ( GLIB2_FIND_REQUIRED )
-    SET( _pkgconfig_REQUIRED "" )
-  ENDIF ( GLIB2_FIND_REQUIRED )
-
-  IF ( GLIB2_MIN_VERSION )
-    PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
-  ELSE ( GLIB2_MIN_VERSION )
-    PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
-  ENDIF ( GLIB2_MIN_VERSION )
-  IF ( PKG_CONFIG_FOUND )
-    IF ( GLIB2_FOUND )
-      SET ( GLIB2_CORE_FOUND TRUE )
-    ELSE ( GLIB2_FOUND )
-      SET ( GLIB2_CORE_FOUND FALSE )
-    ENDIF ( GLIB2_FOUND )
-  ENDIF ( PKG_CONFIG_FOUND )
+  IF ( NOT WIN32 )
+	  INCLUDE(FindPkgConfig)
+
+	  ## Glib
+	  IF ( GLIB2_FIND_REQUIRED )
+		SET( _pkgconfig_REQUIRED "REQUIRED" )
+	  ELSE ( GLIB2_FIND_REQUIRED )
+		SET( _pkgconfig_REQUIRED "" )
+	  ENDIF ( GLIB2_FIND_REQUIRED )
+
+	  IF ( GLIB2_MIN_VERSION )
+		PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0>=${GLIB2_MIN_VERSION} )
+	  ELSE ( GLIB2_MIN_VERSION )
+		PKG_SEARCH_MODULE( GLIB2 ${_pkgconfig_REQUIRED} glib-2.0 )
+	  ENDIF ( GLIB2_MIN_VERSION )
+	  IF ( PKG_CONFIG_FOUND )
+		IF ( GLIB2_FOUND )
+		  SET ( GLIB2_CORE_FOUND TRUE )
+		ELSE ( GLIB2_FOUND )
+		  SET ( GLIB2_CORE_FOUND FALSE )
+		ENDIF ( GLIB2_FOUND )
+	  ENDIF ( PKG_CONFIG_FOUND )
+  ELSE()
+	SET(GLIB2_FOUND FALSE)
+	SET(PKG_CONFIG_FOUND FALSE)
+  ENDIF()

   # Look for glib2 include dir and libraries w/o pkgconfig
   IF ( NOT GLIB2_FOUND AND NOT PKG_CONFIG_FOUND )
-    FIND_PATH(
-      _glibconfig_include_DIR
-    NAMES
-      glibconfig.h
-    PATHS
-      /opt/gnome/lib64
-      /opt/gnome/lib
-      /opt/lib/
-      /opt/local/lib
-      /sw/lib/
-      /usr/lib64
-      /usr/lib
-      /usr/local/include
-      ${CMAKE_LIBRARY_PATH}
-    PATH_SUFFIXES
-      glib-2.0/include
-    )
-
-    FIND_PATH(
-      _glib2_include_DIR
-    NAMES
-      glib.h
-    PATHS
-      /opt/gnome/include
-      /opt/local/include
-      /sw/include
-      /usr/include
-      /usr/local/include
-    PATH_SUFFIXES
-      glib-2.0
-    )
-
-    #MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}")
-
-    FIND_LIBRARY(
-      _glib2_link_DIR
-    NAMES
-      glib-2.0
-      glib
-    PATHS
-      /opt/gnome/lib
-      /opt/local/lib
-      /sw/lib
-      /usr/lib
-      /usr/local/lib
-    )
+	IF( WIN32 AND GSTREAMER_FOUND )
+		get_filename_component(_gst_libs_DIR ${GSTREAMER_LIBRARIES} DIRECTORY)
+		SET( _glibconfig_include_DIR ${_gst_libs_DIR}/glib-2.0/include )
+		FIND_PATH(
+		  _glib2_include_DIR
+		NAMES
+		  glib.h
+		PATHS
+		  ${GSTREAMER_INCLUDE_DIRS}
+		PATH_SUFFIXES
+		  ../glib-2.0
+		)
+
+		FIND_LIBRARY(
+		  _glib2_link_DIR
+		NAMES
+		  glib-2.0
+		  glib
+		PATHS
+		  ${_gst_libs_DIR}
+		)
+		FIND_LIBRARY(
+		  _gio2_link_DIR
+		NAMES
+		  gio-2.0
+		  gio
+		PATHS
+		  ${_gst_libs_DIR}
+		)
+		FIND_LIBRARY(
+		  _gmodule2_link_DIR
+		NAMES
+		  gmodule-2.0
+		  gmodule
+		PATHS
+		  ${_gst_libs_DIR}
+		)
+		FIND_LIBRARY(
+		  _gobject2_link_DIR
+		NAMES
+		  gobject-2.0
+		  gobject
+		PATHS
+		  ${_gst_libs_DIR}
+		)
+	ELSE( WIN32 AND GSTREAMER_FOUND )
+		FIND_PATH(
+		  _glibconfig_include_DIR
+		NAMES
+		  glibconfig.h
+		PATHS
+		  /opt/gnome/lib64
+		  /opt/gnome/lib
+		  /opt/lib/
+		  /opt/local/lib
+		  /sw/lib/
+		  /usr/lib64
+		  /usr/lib
+		  /usr/local/include
+		  ${CMAKE_LIBRARY_PATH}
+		PATH_SUFFIXES
+		  glib-2.0/include
+		)
+
+		FIND_PATH(
+		  _glib2_include_DIR
+		NAMES
+		  glib.h
+		PATHS
+		  /opt/gnome/include
+		  /opt/local/include
+		  /sw/include
+		  /usr/include
+		  /usr/local/include
+		PATH_SUFFIXES
+		  glib-2.0
+		)
+
+		#MESSAGE(STATUS "Glib headers: ${_glib2_include_DIR}")
+
+		FIND_LIBRARY(
+		  _glib2_link_DIR
+		NAMES
+		  glib-2.0
+		  glib
+		PATHS
+		  /opt/gnome/lib
+		  /opt/local/lib
+		  /sw/lib
+		  /usr/lib
+		  /usr/local/lib
+		)
+		FIND_LIBRARY(
+		  _gio2_link_DIR
+		NAMES
+		  gio-2.0
+		  gio
+		PATHS
+		  /opt/gnome/lib
+		  /opt/local/lib
+		  /sw/lib
+		  /usr/lib
+		  /usr/local/lib
+		)
+		FIND_LIBRARY(
+		  _gmodule2_link_DIR
+		NAMES
+		  gmodule-2.0
+		  gmodule
+		PATHS
+		  /opt/gnome/lib
+		  /opt/local/lib
+		  /sw/lib
+		  /usr/lib
+		  /usr/local/lib
+		)
+		FIND_LIBRARY(
+		  _gobject2_link_DIR
+		NAMES
+		  gobject-2.0
+		  gobject
+		PATHS
+		  /opt/gnome/lib
+		  /opt/local/lib
+		  /sw/lib
+		  /usr/lib
+		  /usr/local/lib
+		)
+	ENDIF( WIN32 AND GSTREAMER_FOUND )
+
     IF ( _glib2_include_DIR AND _glib2_link_DIR )
         SET ( _glib2_FOUND TRUE )
     ENDIF ( _glib2_include_DIR AND _glib2_link_DIR )
@@ -103,7 +191,7 @@

     IF ( _glib2_FOUND )
         SET ( GLIB2_INCLUDE_DIRS ${_glib2_include_DIR} ${_glibconfig_include_DIR} )
-        SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} )
+        SET ( GLIB2_LIBRARIES ${_glib2_link_DIR} ${_gio2_link_DIR}  ${_gmodule2_link_DIR} ${_gobject2_link_DIR} )
         SET ( GLIB2_CORE_FOUND TRUE )
     ELSE ( _glib2_FOUND )
         SET ( GLIB2_CORE_FOUND FALSE )
@@ -112,27 +200,37 @@
     # Handle dependencies
     # libintl
     IF ( NOT LIBINTL_FOUND )
-      FIND_PATH(LIBINTL_INCLUDE_DIR
-      NAMES
-        libintl.h
-      PATHS
-        /opt/gnome/include
-        /opt/local/include
-        /sw/include
-        /usr/include
-        /usr/local/include
-      )
-
-      FIND_LIBRARY(LIBINTL_LIBRARY
-      NAMES
-        intl
-      PATHS
-        /opt/gnome/lib
-        /opt/local/lib
-        /sw/lib
-        /usr/local/lib
-        /usr/lib
-      )
+		IF( WIN32 AND GSTREAMER_FOUND )
+			SET( LIBINTL_INCLUDE_DIR ${GSTREAMER_INCLUDE_DIRS}/.. )
+			FIND_LIBRARY(LIBINTL_LIBRARY
+			  NAMES
+				intl
+			  PATHS
+				${_gst_libs_DIR}
+			)
+		ELSE( WIN32 AND GSTREAMER_FOUND )
+			FIND_PATH(LIBINTL_INCLUDE_DIR
+			  NAMES
+				libintl.h
+			  PATHS
+				/opt/gnome/include
+				/opt/local/include
+				/sw/include
+				/usr/include
+				/usr/local/include
+			)
+
+			FIND_LIBRARY(LIBINTL_LIBRARY
+			  NAMES
+				intl
+			  PATHS
+				/opt/gnome/lib
+				/opt/local/lib
+				/sw/lib
+				/usr/local/lib
+				/usr/lib
+			)
+		ENDIF( WIN32 AND GSTREAMER_FOUND )

       IF (LIBINTL_LIBRARY AND LIBINTL_INCLUDE_DIR)
         SET (LIBINTL_FOUND TRUE)
@@ -141,31 +239,41 @@

     # libiconv
     IF ( NOT LIBICONV_FOUND )
-      FIND_PATH(LIBICONV_INCLUDE_DIR
-      NAMES
-        iconv.h
-      PATHS
-        /opt/gnome/include
-        /opt/local/include
-        /opt/local/include
-        /sw/include
-        /sw/include
-        /usr/local/include
-        /usr/include
-      PATH_SUFFIXES
-        glib-2.0
-      )
-
-      FIND_LIBRARY(LIBICONV_LIBRARY
-      NAMES
-        iconv
-      PATHS
-        /opt/gnome/lib
-        /opt/local/lib
-        /sw/lib
-        /usr/lib
-        /usr/local/lib
-      )
+		IF( WIN32 AND GSTREAMER_FOUND )
+			SET( LIBICONV_INCLUDE_DIR ${GSTREAMER_INCLUDE_DIRS}/.. )
+			FIND_LIBRARY(LIBICONV_LIBRARY
+			  NAMES
+				iconv
+			  PATHS
+				${_gst_libs_DIR}
+			)
+		ELSE( WIN32 AND GSTREAMER_FOUND )
+			FIND_PATH(LIBICONV_INCLUDE_DIR
+			  NAMES
+				iconv.h
+			  PATHS
+				/opt/gnome/include
+				/opt/local/include
+				/opt/local/include
+				/sw/include
+				/sw/include
+				/usr/local/include
+				/usr/include
+			  PATH_SUFFIXES
+				glib-2.0
+			  )
+
+			  FIND_LIBRARY(LIBICONV_LIBRARY
+			  NAMES
+				iconv
+			  PATHS
+				/opt/gnome/lib
+				/opt/local/lib
+				/sw/lib
+				/usr/lib
+				/usr/local/lib
+			  )
+		ENDIF( WIN32 AND GSTREAMER_FOUND )

       IF (LIBICONV_LIBRARY AND LIBICONV_INCLUDE_DIR)
         SET (LIBICONV_FOUND TRUE)


FindLua51: Also look for lua.h in the "lua-5.1" directory.

--- cmake/FindLua51.cmake
+++ cmake/FindLua51.cmake
@@ -3,14 +3,14 @@
 ################################################################################
 include(FindPackageHandleStandardArgs)

-find_path(LUA_H_PATH NAMES lua.h PATH_SUFFIXES lua5.1 lua51 lua)
-find_library(LUA_LIB NAMES lua5.1 lua51 lua PATH_SUFFIXES dynamic)
-find_library(LUA_LIB_DBG NAMES lua5.1_d lua51_d lua_d PATH_SUFFIXES dynamic)
+find_path(LUA_H_PATH NAMES lua.h PATH_SUFFIXES lua5.1 lua51 lua-5.1 lua)
+find_library(LUA_LIB NAMES lua5.1 lua51 lua-5.1 lua PATH_SUFFIXES dynamic)
+find_library(LUA_LIB_DBG NAMES lua5.1_d lua51_d lua-5.1_d lua_d PATH_SUFFIXES dynamic)
 mark_as_advanced(LUA_H_PATH LUA_LIB LUA_LIB_DBG)

 if (WIN32 OR APPLE)
-    find_library(LUA_LIB_STATIC NAMES lua5.1 lua51 lua PATH_SUFFIXES static)
-    find_library(LUA_LIB_STATIC_DBG NAMES lua5.1_d lua51_d lua_d PATH_SUFFIXES static)
+    find_library(LUA_LIB_STATIC NAMES lua5.1 lua51 lua-5.1 lua PATH_SUFFIXES static)
+    find_library(LUA_LIB_STATIC_DBG NAMES lua5.1_d lua51_d lua-5.1_d lua_d PATH_SUFFIXES static)
     mark_as_advanced(LUA_LIB_STATIC LUA_LIB_STATIC_DBG)
 endif()


Change CMake warning to simple message for old Metis versions

--- cmake/FindMetis.cmake
+++ cmake/FindMetis.cmake
@@ -26,7 +26,7 @@
   string(REGEX MATCH "define[ \t]+METIS_VER_SUBMINOR[ \t]+([0-9]+)" _metis_subminor_version_match "${_metis_version_header}")
   set(METIS_SUBMINOR_VERSION "${CMAKE_MATCH_1}")
   if(NOT METIS_MAJOR_VERSION)
-    message(WARNING "Could not determine Metis version. Assuming version 4.0.0")
+    message(STATUS "Could not determine Metis version. Assuming version 4.0.0")
     set(METIS_VERSION 4.0.0)
   else()
     set(METIS_VERSION ${METIS_MAJOR_VERSION}.${METIS_MINOR_VERSION}.${METIS_SUBMINOR_VERSION})


look for clang-cpp shared lib when it exists

See #4799

--- cmake/Findclang.cmake
+++ cmake/Findclang.cmake
@@ -8,54 +8,72 @@
 # CLANG_LIBDIRS

 find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
+  PATHS
+    /usr/lib/llvm/10/include
+    /usr/lib/llvm-10/include
+    /usr/lib/llvm-10.0/include
+    /usr/local/llvm100/include
+    /usr/local/llvm10/include
+    /mingw64/include
+)
+
+if(NOT ZIG_STATIC_LLVM)
+  find_library(CLANG_CPP_DYLIB
+    NAMES
+      clang-cpp-10.0
+      clang-cpp100
+      clang-cpp
     PATHS
-        /usr/lib/llvm/10/include
-        /usr/lib/llvm-10/include
-        /usr/lib/llvm-10.0/include
-        /usr/local/llvm100/include
-        /usr/local/llvm10/include
-        /mingw64/include)
+      ${CLANG_LIBDIRS}
+      /usr/lib/llvm-10/lib
+      /usr/local/llvm100/lib
+      /usr/local/llvm10/lib
+  )
+endif()

-macro(FIND_AND_ADD_CLANG_LIB _libname_)
+if(CLANG_CPP_DYLIB)
+  set(CLANG_LIBRARIES ${CLANG_CPP_DYLIB})
+else()
+  macro(FIND_AND_ADD_CLANG_LIB _libname_)
     string(TOUPPER ${_libname_} _prettylibname_)
     find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
-        PATHS
-            ${CLANG_LIBDIRS}
-            /usr/lib/llvm/10/lib
-            /usr/lib/llvm-10/lib
-            /usr/lib/llvm-10.0/lib
-            /usr/local/llvm100/lib
-            /usr/local/llvm10/lib
-            /mingw64/lib
-            /c/msys64/mingw64/lib
-            c:\\msys64\\mingw64\\lib)
-    if(CLANG_${_prettylibname_}_LIB)
-        set(CLANG_LIBRARIES ${CLANG_LIBRARIES} ${CLANG_${_prettylibname_}_LIB})
-    endif()
-endmacro(FIND_AND_ADD_CLANG_LIB)
+      PATHS
+        ${CLANG_LIBDIRS}
+        /usr/lib/llvm/10/lib
+        /usr/lib/llvm-10/lib
+        /usr/lib/llvm-10.0/lib
+        /usr/local/llvm100/lib
+        /usr/local/llvm10/lib
+        /mingw64/lib
+        /c/msys64/mingw64/lib
+        c:\\msys64\\mingw64\\lib
+    )
+    set(CLANG_LIBRARIES ${CLANG_LIBRARIES} ${CLANG_${_prettylibname_}_LIB})
+  endmacro(FIND_AND_ADD_CLANG_LIB)

-FIND_AND_ADD_CLANG_LIB(clangFrontendTool)
-FIND_AND_ADD_CLANG_LIB(clangCodeGen)
-FIND_AND_ADD_CLANG_LIB(clangFrontend)
-FIND_AND_ADD_CLANG_LIB(clangDriver)
-FIND_AND_ADD_CLANG_LIB(clangSerialization)
-FIND_AND_ADD_CLANG_LIB(clangSema)
-FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerFrontend)
-FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerCheckers)
-FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerCore)
-FIND_AND_ADD_CLANG_LIB(clangAnalysis)
-FIND_AND_ADD_CLANG_LIB(clangASTMatchers)
-FIND_AND_ADD_CLANG_LIB(clangAST)
-FIND_AND_ADD_CLANG_LIB(clangParse)
-FIND_AND_ADD_CLANG_LIB(clangSema)
-FIND_AND_ADD_CLANG_LIB(clangBasic)
-FIND_AND_ADD_CLANG_LIB(clangEdit)
-FIND_AND_ADD_CLANG_LIB(clangLex)
-FIND_AND_ADD_CLANG_LIB(clangARCMigrate)
-FIND_AND_ADD_CLANG_LIB(clangRewriteFrontend)
-FIND_AND_ADD_CLANG_LIB(clangRewrite)
-FIND_AND_ADD_CLANG_LIB(clangCrossTU)
-FIND_AND_ADD_CLANG_LIB(clangIndex)
+  FIND_AND_ADD_CLANG_LIB(clangFrontendTool)
+  FIND_AND_ADD_CLANG_LIB(clangCodeGen)
+  FIND_AND_ADD_CLANG_LIB(clangFrontend)
+  FIND_AND_ADD_CLANG_LIB(clangDriver)
+  FIND_AND_ADD_CLANG_LIB(clangSerialization)
+  FIND_AND_ADD_CLANG_LIB(clangSema)
+  FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerFrontend)
+  FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerCheckers)
+  FIND_AND_ADD_CLANG_LIB(clangStaticAnalyzerCore)
+  FIND_AND_ADD_CLANG_LIB(clangAnalysis)
+  FIND_AND_ADD_CLANG_LIB(clangASTMatchers)
+  FIND_AND_ADD_CLANG_LIB(clangAST)
+  FIND_AND_ADD_CLANG_LIB(clangParse)
+  FIND_AND_ADD_CLANG_LIB(clangSema)
+  FIND_AND_ADD_CLANG_LIB(clangBasic)
+  FIND_AND_ADD_CLANG_LIB(clangEdit)
+  FIND_AND_ADD_CLANG_LIB(clangLex)
+  FIND_AND_ADD_CLANG_LIB(clangARCMigrate)
+  FIND_AND_ADD_CLANG_LIB(clangRewriteFrontend)
+  FIND_AND_ADD_CLANG_LIB(clangRewrite)
+  FIND_AND_ADD_CLANG_LIB(clangCrossTU)
+  FIND_AND_ADD_CLANG_LIB(clangIndex)
+endif()

 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(clang DEFAULT_MSG CLANG_LIBRARIES CLANG_INCLUDE_DIRS)


cmake intel compiler option

cmake intel compiler option

--- cmake/compilers.cmake
+++ cmake/compilers.cmake
@@ -4,10 +4,10 @@
   set(old_flags -std=legacy -w)
 elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel)
   if(WIN32)
-    add_compile_options(/arch:native)
+    add_compile_options(/QxHost)
     set(old_flags /w)
   else()
-    add_compile_options(-march=native)
+    add_compile_options(-xHost)
     set(old_flags -w)
   endif()
 endif()


Disable LSan on NetBSD

Disable LSan on NetBSD

This no longer builds after refactoring and needs restoration.
Additionally the checked in support was incomplete.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -565,7 +565,7 @@
 endif()

 if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
-    OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
+    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
   set(COMPILER_RT_HAS_LSAN TRUE)
 else()
   set(COMPILER_RT_HAS_LSAN FALSE)


r9986/sofa : fixed SOFA_HAVE_METIS macro definition

Former-commit-id: 6ec70839607ad8f17c8577922843edf95bb4f698

--- cmake/externals.cmake
+++ cmake/externals.cmake
@@ -145,9 +145,9 @@

 ## metis
 if(SOFA-EXTERNAL_METIS)
-        list(APPEND compilerDefines SOFA_HAVE_METIS)
         find_package(METIS REQUIRED)
 endif()
+RegisterDependencies(${METIS_LIBRARIES} OPTION SOFA-EXTERNAL_METIS COMPILE_DEFINITIONS SOFA_HAVE_METIS)

 # enable unit tests


r9693/sofa : cmake: fixed switching between glut/freeglut

For freeglut on linux, you need to install
sudo apt-get install libxmu-dev libxi-dev

Former-commit-id: dd4f6e3bab39be627235f26449962e8ade4d6b4c

--- cmake/externals.cmake
+++ cmake/externals.cmake
@@ -71,6 +71,7 @@
 ## opengl / glew / glut
 if (NOT SOFA-MISC_NO_OPENGL)
 	find_package(OPENGL REQUIRED)
+	unset(GLUT_LIBRARIES CACHE) # force remove glut path to be able to switch glut/freeglut
 	if(WIN32)
 		set(OPENGL_LIBRARIES ${OPENGL_LIBRARIES} "glu32")
 		if (SOFA-EXTERNAL_HAVE_FREEGLUT)
@@ -142,7 +143,7 @@
 RegisterDependencies(${OPENGL_LIBRARIES})
 RegisterDependencies(${GLEW_LIBRARIES} OPTION SOFA-EXTERNAL_HAVE_GLEW COMPILE_DEFINITIONS SOFA_HAVE_GLEW)
 if(SOFA-EXTERNAL_HAVE_FREEGLUT)
-	RegisterDependencies(${GLUT_LIBRARIES} OPTION SOFA-EXTERNAL_HAVE_FREEGLUT COMPILE_DEFINITIONS SOFA_HAVE_FREEGLUT)
+	RegisterDependencies(${GLUT_LIBRARIES} COMPILE_DEFINITIONS SOFA_HAVE_FREEGLUT)
 else()
 	RegisterDependencies(${GLUT_LIBRARIES})
 endif()


forgot to disable more of GTest

forgot to disable more of GTest

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

--- cmake/pcl_tests.cmake
+++ cmake/pcl_tests.cmake
@@ -23,17 +23,17 @@
     endif(REASON)
 elseif(NOT ${BUILD_TESTS})
     message(STATUS "Tests will not be built: Disabled manually")
-else(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})
-    if(GTEST_FOUND)
-        message(STATUS "Tests will be built")
-    else(GTEST_FOUND)
-        set (BUILD_TESTS OFF CACHE BOOL "Tests can not be built!" FORCE)
-    endif(GTEST_FOUND)
+    #else(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})
+#    if(GTEST_FOUND)
+#        message(STATUS "Tests will be built")
+#    else(GTEST_FOUND)
+#        set (BUILD_TESTS OFF CACHE BOOL "Tests can not be built!" FORCE)
+#    endif(GTEST_FOUND)
 endif(NOT ${DEFAULT} AND NOT ${BUILD_TESTS})

 # Set up for testing if tests are enabled
 if(BUILD_TESTS)
     enable_testing()
-    include_directories(${GTEST_INCLUDE_DIRS})
+#    include_directories(${GTEST_INCLUDE_DIRS})
 endif(BUILD_TESTS)


Fixed string equality check that failed in some cases

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -310,12 +310,15 @@
 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
 # This little macro lets you set any XCode specific property.
 macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION)
-  if (XCODE_RELVERSION STREQUAL "All")
+  set(XCODE_RELVERSION_I "${XCODE_RELVERSION}")
+  if (XCODE_RELVERSION_I STREQUAL "All")
+    message(STATUS "XCODE_RELVERSION_I match!")
     set_property(TARGET ${TARGET} PROPERTY
     XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}")
   else()
+    message(STATUS "XCODE_RELVERSION_I NO match! ${XCODE_RELVERSION_I}")
     set_property(TARGET ${TARGET} PROPERTY
-    XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION}] "${XCODE_VALUE}")
+    XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}")
   endif()
 endmacro(set_xcode_property)
 # This macro lets you find executable programs on the host system.


Fixes #40

Fixes #40

--- ios.toolchain.cmake
+++ ios.toolchain.cmake
@@ -451,6 +451,7 @@
 set(IOS TRUE CACHE BOOL "")
 set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
 set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
+set(CMAKE_STRIP strip CACHE FILEPATH "" FORCE)
 # Set the architectures for which to build.
 set(CMAKE_OSX_ARCHITECTURES ${ARCHS} CACHE STRING "Build architecture for iOS")
 # Change the type of target generated for try_compile() so it'll work when cross-compiling
@@ -474,10 +475,16 @@
 if(ARCHS MATCHES "((^|, )(arm64|arm64e|x86_64))+")
   set(CMAKE_C_SIZEOF_DATA_PTR 8)
   set(CMAKE_CXX_SIZEOF_DATA_PTR 8)
+  if(ARCHS MATCHES "((^|, )(arm64|arm64e))+")
+    set(CMAKE_SYSTEM_PROCESSOR "arm64")
+  else()
+    set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+  endif()
   message(STATUS "Using a data_ptr size of 8")
 else()
   set(CMAKE_C_SIZEOF_DATA_PTR 4)
   set(CMAKE_CXX_SIZEOF_DATA_PTR 4)
+  set(CMAKE_SYSTEM_PROCESSOR "arm")
   message(STATUS "Using a data_ptr size of 4")
 endif()


libomp on NetBSD needs libc, libpthread and libm.

git-svn-id: f99161ee8ccfe2101cbe1bdda2220bce2ed25485@248200 91177308-0d34-0410-b5e6-96231b3b80d8

--- runtime/cmake/LibompMicroTests.cmake
+++ runtime/cmake/LibompMicroTests.cmake
@@ -169,6 +169,8 @@
 set(libomp_expected_library_deps)
 if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
   set(libomp_expected_library_deps libc.so.7 libthr.so.3)
+elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+  set(libomp_expected_library_deps libc.so.12 libpthread.so.1 libm.so.0)
 elseif(APPLE)
   set(libomp_expected_library_deps /usr/lib/libSystem.B.dylib)
 elseif(WIN32)


Regards #118 (and perhaps fixes it):

Regards #118 (and perhaps fixes it):

* Trying to remove "/W3" compiler option when adding "/W4" ourselves.


Fix echo targets.

Fix echo targets.

Signed-off-by: Keith Rothman <1bc19627a439baf17510dc2d0b2d250c96d445a5@users.noreply.github.com>

--- make/devices.cmake
+++ make/devices.cmake
@@ -887,8 +887,8 @@
   set(ECHO_OUT_NET ${OUT_LOCAL}/echo/${TOP}.net)
   add_custom_command(
     OUTPUT ${ECHO_OUT_NET}
-    DEPENDS ${OUT_EBLIF} ${OUT_IO} ${VPR_DEPS}
-    COMMAND ${VPR_CMD} --echo_file on --pack
+    DEPENDS ${OUT_EBLIF} ${OUT_IO} ${VPR_DEPS} ${ECHO_DIRECTORY_TARGET}
+    COMMAND ${VPR_CMD} --debug_clustering on --echo_file on --pack
     COMMAND
       ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/echo/vpr_stdout.log ${OUT_LOCAL}/echo/pack.log
     WORKING_DIRECTORY ${OUT_LOCAL}/echo
@@ -921,8 +921,8 @@
   set(ECHO_OUT_PLACE ${OUT_LOCAL}/echo/${TOP}.place)
   add_custom_command(
     OUTPUT ${ECHO_OUT_PLACE}
-    DEPENDS ${ECHO_OUT_NET} ${OUT_IO} ${VPR_DEPS}
-    COMMAND ${VPR_CMD} ${FIX_PINS_ARG} --place
+    DEPENDS ${ECHO_OUT_NET} ${OUT_IO} ${VPR_DEPS} ${ECHO_DIRECTORY_TARGET}
+    COMMAND ${VPR_CMD} ${FIX_PINS_ARG} --echo_file on --place
     COMMAND
       ${CMAKE_COMMAND} -E copy ${OUT_LOCAL}/echo/vpr_stdout.log
         ${OUT_LOCAL}/echo/place.log
@@ -953,7 +953,7 @@
         ${OUT_LOCAL}/echo/route.log
     WORKING_DIRECTORY ${OUT_LOCAL}/echo
   )
-  add_custom_target(${NAME}_route_echo DEPENDS ${OUT_ROUTE})
+  add_custom_target(${NAME}_route_echo DEPENDS ${ECHO_ATOM_NETLIST_ORIG})

   # Generate HLC
   # -------------------------------------------------------------------------


Updated

Updated

--- cmake/CMakeBuildFlags.cmake
+++ cmake/CMakeBuildFlags.cmake
@@ -1,6 +1,6 @@
 include(CheckCXXCompilerFlag)

-if("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
+if("${CMAKE_C_COMPILER_ID}" MATCHES "MSVC$" OR "${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
 	SET(CMAKE_COMPILER_IS_WINDOWS 1)
 endif()


Mark SDK_INCLUDE_DIR as advanced

Mark SDK_INCLUDE_DIR as advanced

--- cmake/Modules/FindSDK.cmake
+++ cmake/Modules/FindSDK.cmake
@@ -10,4 +10,5 @@
           NO_SYSTEM_ENVIRONMENT_PATH
           NO_CMAKE_SYSTEM_PATH)

+mark_as_advanced(SDK_INCLUDE_DIR)
 find_package_handle_standard_args(SDK REQUIRED_VARS SDK_INCLUDE_DIR)


Added dependency from numpy to debian package with python bindings.

(cherry picked from commit be6b8476750e1aefe21c9775b0b732b497e2d4bd)

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -69,10 +69,10 @@
 set(CPACK_COMPONENT_docs_DEPENDS libs)
 set(CPACK_COMPONENT_java_DEPENDS libs)
 set(CPACK_COMPONENT_python_DEPENDS libs)
-set(CPACK_DEB_python_PACKAGE_DEPENDS "python${PYTHON_VERSION_MAJOR_MINOR}")
+set(CPACK_DEB_python_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}")
 set(CPACK_COMPONENT_tests_DEPENDS libs)
 if (HAVE_opencv_python)
-  set(CPACK_DEB_tests_PACKAGE_DEPENDS "python${PYTHON_VERSION_MAJOR_MINOR}, python-py | python-pytest")
+  set(CPACK_DEB_tests_PACKAGE_DEPENDS "python-numpy (>=${PYTHON_NUMPY_VERSION}), python${PYTHON_VERSION_MAJOR_MINOR}, python-py | python-pytest")
 endif()

 if(HAVE_CUDA)


fix pathline for latest version of boost

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -149,7 +149,7 @@

     IF (APPLE)
         EXTERNALPROJECT_ADD_STEP(boost patch-install-path
-            COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPBUILD}/boost/tools/build/v2/tools/darwin.jam
+            COMMAND sed -i ".bak" "s|-install_name \"|&${TPDIST}/lib/|" ${TPBUILD}/boost/tools/build/src/tools/darwin.jam
             DEPENDERS build
             DEPENDEES download)
     ENDIF (APPLE)


[CMake] Introduce llvm_update_compile_flags(target_name) to update compile flags in target properties.

FIXME: Just add_unittest() is using it.
FIXME: Cooperate with source properties.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1,6 +1,24 @@
 include(LLVMParseArguments)
 include(LLVMProcessSources)
 include(LLVM-Config)
+
+function(llvm_update_compile_flags name)
+  get_property(target_compile_flags TARGET ${name} PROPERTY COMPILE_FLAGS)
+  if(NOT "${LLVM_COMPILE_FLAGS}" STREQUAL "")
+    set(target_compile_flags "${target_compile_flags} ${LLVM_COMPILE_FLAGS}")
+  endif()
+  if(LLVM_NO_RTTI)
+    list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
+    if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
+      set(target_compile_flags "${target_compile_flags} -fno-rtti")
+    elseif (MSVC)
+      llvm_replace_compiler_option(target_compile_flags "/GR" "/GR-")
+    endif ()
+  endif()
+
+  set_property(TARGET ${name} PROPERTY COMPILE_FLAGS "${target_compile_flags}")
+  set_property(TARGET ${name} APPEND PROPERTY COMPILE_DEFINITIONS ${LLVM_COMPILE_DEFINITIONS})
+endfunction()

 function(add_llvm_symbol_exports target_name export_file)
   if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
@@ -343,6 +361,23 @@
     set(EXCLUDE_FROM_ALL ON)
   endif()

+  # Visual Studio 2012 only supports up to 8 template parameters in
+  # std::tr1::tuple by default, but gtest requires 10
+  if (MSVC AND MSVC_VERSION EQUAL 1700)
+    list(APPEND LLVM_COMPILE_DEFINITIONS _VARIADIC_MAX=10)
+  endif ()
+
+  include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
+  if (NOT LLVM_ENABLE_THREADS)
+    list(APPEND LLVM_COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0)
+  endif ()
+
+  if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
+    set(LLVM_COMPILE_FLAGS "-Wno-variadic-macros")
+  endif ()
+
+  set(LLVM_NO_RTTI ON)
+
   add_llvm_executable(${test_name} ${ARGN})
   set(outdir ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
   set_output_directory(${test_name} ${outdir} ${outdir})
@@ -357,30 +392,7 @@
   if (NOT ${test_suite_folder} STREQUAL "NOTFOUND")
     set_property(TARGET ${test_name} PROPERTY FOLDER "${test_suite_folder}")
   endif ()
-
-  # Visual Studio 2012 only supports up to 8 template parameters in
-  # std::tr1::tuple by default, but gtest requires 10
-  if (MSVC AND MSVC_VERSION EQUAL 1700)
-    set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS _VARIADIC_MAX=10)
-  endif ()
-
-  include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
-  set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_RTTI=0)
-  if (NOT LLVM_ENABLE_THREADS)
-    set_property(TARGET ${test_name} APPEND PROPERTY COMPILE_DEFINITIONS GTEST_HAS_PTHREAD=0)
-  endif ()
-
-  get_property(target_compile_flags TARGET ${test_name} PROPERTY COMPILE_FLAGS)
-  if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
-    set(target_compile_flags "${target_compile_flags} -fno-rtti")
-  elseif (MSVC)
-    llvm_replace_compiler_option(target_compile_flags "/GR" "/GR-")
-  endif ()
-
-  if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)
-    set(target_compile_flags "${target_compile_flags} -Wno-variadic-macros")
-  endif ()
-  set_property(TARGET ${test_name} PROPERTY COMPILE_FLAGS "${target_compile_flags}")
+  llvm_update_compile_flags(${test_name})
 endfunction()

 # This function provides an automatic way to 'configure'-like generate a file


[CMake] Make the bindir and libdir arguments to set_output_directory optional

When building a plugin against an installed LLVM toolchain using
add_llvm_loadable_module (in the documented manner) doesn't work as nothing sets
the *_OUTPUT_INTDIR variables causing an error when set_output_directory is
called. Making those arguments optional (causing the default output directory
to be used) fixes this.

Differential Revision: http://reviews.llvm.org/D13215

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -194,34 +194,43 @@
 # Set each output directory according to ${CMAKE_CONFIGURATION_TYPES}.
 # Note: Don't set variables CMAKE_*_OUTPUT_DIRECTORY any more,
 # or a certain builder, for eaxample, msbuild.exe, would be confused.
-function(set_output_directory target bindir libdir)
-  # Do nothing if *_OUTPUT_INTDIR is empty.
-  if("${bindir}" STREQUAL "")
-    return()
-  endif()
-
-  # moddir -- corresponding to LIBRARY_OUTPUT_DIRECTORY.
+function(set_output_directory target)
+  cmake_parse_arguments(ARG "" "BINARY_DIR;LIBRARY_DIR;" "" ${ARGN})
+
+  # module_dir -- corresponding to LIBRARY_OUTPUT_DIRECTORY.
   # It affects output of add_library(MODULE).
   if(WIN32 OR CYGWIN)
     # DLL platform
-    set(moddir ${bindir})
-  else()
-    set(moddir ${libdir})
+    set(module_dir ${ARG_BINARY_DIR})
+  else()
+    set(module_dir ${ARG_LIBRARY_DIR})
   endif()
   if(NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
     foreach(build_mode ${CMAKE_CONFIGURATION_TYPES})
       string(TOUPPER "${build_mode}" CONFIG_SUFFIX)
-      string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} bi ${bindir})
-      string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} li ${libdir})
-      string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} mi ${moddir})
-      set_target_properties(${target} PROPERTIES "RUNTIME_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${bi})
-      set_target_properties(${target} PROPERTIES "ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${li})
-      set_target_properties(${target} PROPERTIES "LIBRARY_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${mi})
+      if(ARG_BINARY_DIR)
+        string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} bi ${ARG_BINARY_DIR})
+        set_target_properties(${target} PROPERTIES "RUNTIME_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${bi})
+      endif()
+      if(ARG_LIBRARY_DIR)
+        string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} li ${ARG_LIBRARY_DIR})
+        set_target_properties(${target} PROPERTIES "ARCHIVE_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${li})
+      endif()
+      if(module_dir)
+        string(REPLACE ${CMAKE_CFG_INTDIR} ${build_mode} mi ${module_dir})
+        set_target_properties(${target} PROPERTIES "LIBRARY_OUTPUT_DIRECTORY_${CONFIG_SUFFIX}" ${mi})
+      endif()
     endforeach()
   else()
-    set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${bindir})
-    set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${libdir})
-    set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${moddir})
+    if(ARG_BINARY_DIR)
+      set_target_properties(${target} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${ARG_BINARY_DIR})
+    endif()
+    if(ARG_LIBRARY_DIR)
+      set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${ARG_LIBRARY_DIR})
+    endif()
+    if(module_dir)
+      set_target_properties(${target} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${module_dir})
+    endif()
   endif()
 endfunction()

@@ -399,7 +408,7 @@
     set(windows_resource_file ${windows_resource_file} PARENT_SCOPE)
   endif()

-  set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
+  set_output_directory(${name} BINARY_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR} LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
   # $<TARGET_OBJECTS> doesn't require compile flags.
   if(NOT obj_name)
     llvm_update_compile_flags(${name})
@@ -628,7 +637,7 @@
   endif()

   set(EXCLUDE_FROM_ALL OFF)
-  set_output_directory(${name} ${LLVM_RUNTIME_OUTPUT_INTDIR} ${LLVM_LIBRARY_OUTPUT_INTDIR})
+  set_output_directory(${name} BINARY_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR} LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
   llvm_config( ${name} ${USE_SHARED} ${LLVM_LINK_COMPONENTS} )
   if( LLVM_COMMON_DEPENDS )
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
@@ -835,7 +844,7 @@

   add_llvm_executable(${test_name} ${ARGN})
   set(outdir ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR})
-  set_output_directory(${test_name} ${outdir} ${outdir})
+  set_output_directory(${test_name} BINARY_DIR ${outdir} LIBRARY_DIR ${outdir})
   target_link_libraries(${test_name}
     gtest
     gtest_main


[CMake] LLVM_COMPILE_FLAGS also applies to C files

LLVM_COMPILE_FLAGS also applies to C files, otherwise tuning flags,
etc. won't be picked up.

https://reviews.llvm.org/D67171

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -58,7 +58,7 @@
   if(update_src_props)
     foreach(fn ${sources})
       get_filename_component(suf ${fn} EXT)
-      if("${suf}" STREQUAL ".cpp")
+      if("${suf}" STREQUAL ".cpp" OR "${suf}" STREQUAL ".c")
         set_property(SOURCE ${fn} APPEND_STRING PROPERTY
           COMPILE_FLAGS "${target_compile_flags}")
       endif()


Fix case of variable name in cmake fortran support.

svn path=/trunk/; revision=12856

--- cmake/modules/fortran.cmake
+++ cmake/modules/fortran.cmake
@@ -28,13 +28,13 @@
   option(ENABLE_f95 "Enable f95 bindings" ON)
 endif(DEFAULT_NO_BINDINGS)

-if(Enable_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS)
+if(ENABLE_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS)
   workaround_9220(Fortran PLPLOT_Fortran_COMPILER_WORKS)
   if(NOT PLPLOT_Fortran_COMPILER_WORKS)
     message(STATUS "WARNING: no working Fortran compiler so disabling Fortran bindings and examples.")
     set(ENABLE_f95 OFF CACHE BOOL "Enable f95 bindings" FORCE)
   endif(NOT PLPLOT_Fortran_COMPILER_WORKS)
-endif(Enable_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS)
+endif(ENABLE_f95 AND NOT PLPLOT_Fortran_COMPILER_WORKS)

 if(ENABLE_f95)
   # Find and check Fortran compiler.


fix typo

fix typo

--- cmake/os/WindowsCache.cmake
+++ cmake/os/WindowsCache.cmake
@@ -132,7 +132,7 @@
 SET(HAVE_PATHS_H CACHE  INTERNAL "")
 SET(HAVE_PCLOSE CACHE  INTERNAL "")
 SET(HAVE_PERROR 1 CACHE  INTERNAL "")
-SET(HAVE_POLL CACHE  INTERNAL "")
+SET(HAVE_POLL_H CACHE  INTERNAL "")
 SET(HAVE_POPEN CACHE  INTERNAL "")
 SET(HAVE_POLL CACHE INTERNAL "")
 SET(HAVE_PORT_CREATE CACHE  INTERNAL "")


tabspace

tabspace

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -463,11 +463,11 @@
        # Add other flags to the compiler
        add_definitions(${GTK3_CFLAGS_OTHER})

-	   if(TORQUE_USE_ZENITY)
-			set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "nfd_gtk.c" )
-	   else()
-			set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "simple_exec.h" "nfd_zenity.c")
-	   endif()
+       if(TORQUE_USE_ZENITY)
+          set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "nfd_gtk.c" )
+       else()
+          set(BLACKLIST "nfd_win.cpp" "nfd_cocoa.m" "simple_exec.h" "nfd_zenity.c")
+       endif()
        addLib(nativeFileDialogs)

        set(BLACKLIST ""  )


EDGE-528: replace -Wpedantic with -pedantic (#76)

--- platforms/shared/shared.cmake
+++ platforms/shared/shared.cmake
@@ -68,7 +68,7 @@
 endmacro()

 macro(setFlagsCommon)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wextra -Wpedantic")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -Wextra -pedantic")
 endmacro()

 macro(findOpencvCommon)


F2C only compiles with Release

F2C only compiles with Release

--- hunter_recipes/projects/F2C/hunter.cmake
+++ hunter_recipes/projects/F2C/hunter.cmake
@@ -18,4 +18,5 @@
 )

 hunter_pick_scheme(DEFAULT F2C)
+hunter_configuration_types(F2C CONFIGURATION_TYPES Release)
 hunter_download(PACKAGE_NAME F2C)