[CMake] Added needed blank lines after pragma comments for lib.

--- cmake/MT_BuildFunctions.cmake
+++ cmake/MT_BuildFunctions.cmake
@@ -45,7 +45,9 @@
 #pragma comment(lib, \"wininet.lib\")

 #pragma comment(lib, \"MT_Core.lib\")
-#endif /* _MSC_VER */")
+#endif /* _MSC_VER */
+
+")
   endif(MSVC)

   get_directory_property(DEFS DIRECTORY ${dir} COMPILE_DEFINITIONS)


Locate the C BLAS library before the F77 one.

--- cmake/Modules/FindCBLAS.cmake
+++ cmake/Modules/FindCBLAS.cmake
@@ -48,7 +48,7 @@

 # Finds the library
 find_library(CBLAS_LIBRARIES
-  NAMES blas cblas mkl blis openblas accelerate
+  NAMES cblas blas mkl blis openblas accelerate
   HINTS ${CBLAS_HINTS}
   PATH_SUFFIXES
     lib lib64 lib/x86_64 lib/x64 lib/x86 lib/Win32 lib/import lib64/import


compiler-warnings: lower stack-usage warning thr to 4K

IIRC should break

--- cmake/compiler-warnings.cmake
+++ cmake/compiler-warnings.cmake
@@ -25,8 +25,7 @@
 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wno-unused-parameter)

 # should be < 64Kb
-# FIXME: 4K
-math(EXPR MAX_MEANINGFUL_SIZE 8*1024)
+math(EXPR MAX_MEANINGFUL_SIZE 4*1024)
 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wframe-larger-than=${MAX_MEANINGFUL_SIZE})
 CHECK_CXX_COMPILER_FLAG_AND_ENABLE_IT(-Wstack-usage=${MAX_MEANINGFUL_SIZE})


Fix a typo (copy and paste)

Fix a typo (copy and paste)

--- cmake/modules/FindDavix.cmake
+++ cmake/modules/FindDavix.cmake
@@ -16,4 +16,4 @@
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(DAVIX DEFAULT_MSG DAVIX_INCLUDE_DIR DAVIX_LIBRARY)

-mark_as_advanced(GFAL_FOUND GFAL_INCLUDE_DIR GFAL_LIBRARY)
+mark_as_advanced(DAVIX_FOUND DAVIX_INCLUDE_DIR DAVIX_LIBRARY)


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

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

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -60,6 +60,7 @@
 Name[zh_TW]=VLC

 Comment=Phonon VLC backend
+Comment[ast]=Backend de VLC pa Phonon
 Comment[bg]=Ядро VLC за Phonon
 Comment[bs]=VLC kao pozadina za Phonon
 Comment[ca]=Dorsal del VLC pel Phonon


Fixed build on Windows.

Fixed build on Windows.

--- misc/CMake-Modules/FindGDCM.cmake
+++ misc/CMake-Modules/FindGDCM.cmake
@@ -211,7 +211,7 @@
     endif()

 	macro( add_gdcm_library lib )
-	    if( ${${lib}_DEBUG} )
+	    if( ${lib}_DEBUG )
     	    list( APPEND GDCM_LIBRARIES optimized ${${lib}_RELEASE} debug ${${lib}_DEBUG} )
 	    else()
 	        list( APPEND GDCM_LIBRARIES ${${lib}_RELEASE} )
@@ -227,8 +227,8 @@
 	add_gdcm_library( GDCM_LIBRARY_IOD )
 	add_gdcm_library( GDCM_LIBRARY_JPEG16 )

-	macro( add_gdcm_library_optional lib)
-	    if( ${${lib}_RELEASE} )
+	macro( add_gdcm_library_optional lib )
+	    if( ${lib}_RELEASE )
 	        add_gdcm_library( ${lib} )
 	    endif()
 	endmacro()


Remove quotes around ep_extra_args

Remove quotes around ep_extra_args

Change-Id: I3a600d41f6d3ecc3023cd775586c2ff04f8c72a3

--- SuperBuild/External_GTest.cmake
+++ SuperBuild/External_GTest.cmake
@@ -34,11 +34,11 @@
   # using the GTest features which require tuple, so just disable them
   # and hope that upstream premanetly addresses the problem, with out
   # required more CMake core for compiler issues.
-  set(ep_extra_args "${ep_extra_args} -D CMAKE_CXX_FLAGS=-DGTEST_HAS_TR1_TUPLE=0 ${CMAKE_CXX_FLAGS}")
+  set(ep_extra_args ${ep_extra_args} -D CMAKE_CXX_FLAGS=-DGTEST_HAS_TR1_TUPLE=0 ${CMAKE_CXX_FLAGS})
 endif()

 if(MSVC)
-  set(ep_extra_args "${ep_extra_args} -D gtest_force_shared_crt:BOOL=ON")
+  set(ep_extra_args ${ep_extra_args} -D gtest_force_shared_crt:BOOL=ON)
 endif()


ENH: Added KWSYS_PLATFORM_CXX_TEST_RUN macro.

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -43,3 +43,75 @@
     ENDIF(${var}_COMPILED)
   ENDIF(${invert} MATCHES INVERT)
 ENDMACRO(KWSYS_PLATFORM_CXX_TEST)
+
+MACRO(KWSYS_PLATFORM_CXX_TEST_RUN var description invert)
+  IF("${var}" MATCHES "^${var}$")
+    MESSAGE(STATUS "${description}")
+    TRY_RUN(${var} ${var}_COMPILED
+      ${CMAKE_CURRENT_BINARY_DIR}
+      ${CMAKE_CURRENT_SOURCE_DIR}/kwsysPlatformCxxTests.cxx
+      COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
+      OUTPUT_VARIABLE OUTPUT)
+
+    # Note that ${var} will be a 0 return value on success.
+    IF(${var}_COMPILED)
+      IF(${var})
+        FILE(APPEND
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+          "${description} compiled but failed to run with the following output:\n${OUTPUT}\n\n")
+      ELSE(${var})
+        FILE(APPEND
+          ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
+          "${description} compiled and ran with the following output:\n${OUTPUT}\n\n")
+      ENDIF(${var})
+    ELSE(${var}_COMPILED)
+      FILE(APPEND
+        ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
+        "${description} failed to compile with the following output:\n${OUTPUT}\n\n")
+    ENDIF(${var}_COMPILED)
+
+    IF(${invert} MATCHES INVERT)
+      IF(${var}_COMPILED)
+        IF(${var})
+          MESSAGE(STATUS "${description} - yes")
+        ELSE(${var})
+          MESSAGE(STATUS "${description} - no")
+        ENDIF(${var})
+      ELSE(${var}_COMPILED)
+        MESSAGE(STATUS "${description} - failed to compile")
+      ENDIF(${var}_COMPILED)
+    ELSE(${invert} MATCHES INVERT)
+      IF(${var}_COMPILED)
+        IF(${var})
+          MESSAGE(STATUS "${description} - no")
+        ELSE(${var})
+          MESSAGE(STATUS "${description} - yes")
+        ENDIF(${var})
+      ELSE(${var}_COMPILED)
+        MESSAGE(STATUS "${description} - failed to compile")
+      ENDIF(${var}_COMPILED)
+    ENDIF(${invert} MATCHES INVERT)
+  ENDIF("${var}" MATCHES "^${var}$")
+
+  IF(${invert} MATCHES INVERT)
+    IF(${var}_COMPILED)
+      IF(${var})
+        SET(${var} 1)
+      ELSE(${var})
+        SET(${var} 0)
+      ENDIF(${var})
+    ELSE(${var}_COMPILED)
+      SET(${var} 1)
+    ENDIF(${var}_COMPILED)
+  ELSE(${invert} MATCHES INVERT)
+    IF(${var}_COMPILED)
+      IF(${var})
+        SET(${var} 0)
+      ELSE(${var})
+        SET(${var} 1)
+      ENDIF(${var})
+    ELSE(${var}_COMPILED)
+      SET(${var} 0)
+    ENDIF(${var}_COMPILED)
+  ENDIF(${invert} MATCHES INVERT)
+ENDMACRO(KWSYS_PLATFORM_CXX_TEST_RUN)


Find hdf5 in anaconda

Find hdf5 in anaconda

Former-commit-id: 5890d59e0689c85cc98278431d471b64092bf3c0

--- cmake-modules/FindPackageHDF5.cmake
+++ cmake-modules/FindPackageHDF5.cmake
@@ -13,8 +13,8 @@

-find_file(HDF5_C_COMPILER_EXECUTABLE        NAMES h5cc  PATHS $ENV{PATH} /usr/bin /usr/local/bin )
-find_file(HDF5_CXX_COMPILER_EXECUTABLE      NAMES h5c++ PATHS $ENV{PATH} /usr/bin /usr/local/bin )
+find_file(HDF5_C_COMPILER_EXECUTABLE        NAMES h5cc  PATHS $ENV{PATH} /usr/bin /usr/local/bin $ENV{HOME}/.conda/bin  $ENV{HOME}/anaconda3/bin)
+find_file(HDF5_CXX_COMPILER_EXECUTABLE      NAMES h5c++ PATHS $ENV{PATH} /usr/bin /usr/local/bin $ENV{HOME}/.conda/bin  $ENV{HOME}/anaconda3/bin)
 if(BUILD_SHARED_LIBS)
     set(HDF5_TARGET_SUFFIX "shared")
     set(HDF5_LIBRARY_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})


Tidy up tf_tests.cmake and reenable tests that are not failing anymore. (#13709)

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -179,6 +179,9 @@

   # exclude the ones we don't want
   set(tf_test_src_py_exclude
+    # generally excluded
+    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/__init__.py"
+
     # Python source line inspection tests are flaky on Windows (b/36375074).
     "${tensorflow_source_dir}/tensorflow/python/debug/cli/analyzer_cli_test.py"
     "${tensorflow_source_dir}/tensorflow/python/debug/cli/profile_analyzer_cli_test.py"
@@ -188,16 +191,10 @@
     "${tensorflow_source_dir}/tensorflow/python/debug/lib/dist_session_debug_grpc_test.py"
     "${tensorflow_source_dir}/tensorflow/python/debug/lib/session_debug_grpc_test.py"
     # generally not working
-    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/__init__.py"
-    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/benchmark_test.py"
-    "${tensorflow_source_dir}/tensorflow/python/kernel_tests/resource_variable_ops_test.py"
     "${tensorflow_source_dir}/tensorflow/python/profiler/pprof_profiler_test.py"
     # flaky test
     "${tensorflow_source_dir}/tensorflow/python/profiler/internal/run_metadata_test.py"
     "${tensorflow_source_dir}/tensorflow/python/saved_model/saved_model_test.py"
-    # requires scipy
-    "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/preprocessing/*_test.py"
-    "${tensorflow_source_dir}/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py"
     # flaky tests
     "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cwise_ops_test.py"  # takes very long to run
     "${tensorflow_source_dir}/tensorflow/contrib/tfprof/python/tools/tfprof/internal/run_metadata_test.py"
@@ -213,58 +210,47 @@
   if (WIN32)
     set(tf_test_src_py_exclude
       ${tf_test_src_py_exclude}
-      # generally excluded
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/__init__.py"
-
       # TODO: failing tests.
       # Nothing critical in here but should get this list down to []
       # The failing list is grouped by failure source
+
       # stl on windows handles overflows different
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/as_string_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/cast_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/string_to_number_op_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/clip_ops_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/tensor_array_ops_test.py"  # Needs portpicker.
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/concat_op_test.py"  # numerical issues
+      # Float division by zero
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/benchmark_test.py"
       # Type error in testRemoteIteratorUsingRemoteCallOpDirectSessionGPUCPU.
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/iterator_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/self_adjoint_eig_op_test.py"
-      # misc
+      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/iterator_ops_test.py"
+      # IteratorGetMax OutOfRangeError
       "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/batch_dataset_op_test.py"
+      # Depends on gemmlowp -> pthread
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/neon_depthwise_conv_op_test.py"
+      # int32/int64 mixup
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/variable_scope_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/reshape_op_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/training/evaluation_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/neon_depthwise_conv_op_test.py"  # Depends on gemmlowp -> pthread.
-      # int32/int64 mixup
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/functional_ops_test.py"
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/py_func_test.py"
+      # Windows file management related issues.
+      "${tensorflow_source_dir}/tensorflow/python/training/evaluation_test.py"
       # training tests
       "${tensorflow_source_dir}/tensorflow/python/training/basic_session_run_hooks_test.py"  # Needs tf.contrib fix.
-      "${tensorflow_source_dir}/tensorflow/python/training/localhost_cluster_performance_test.py"  # Needs portpicker.
       "${tensorflow_source_dir}/tensorflow/python/training/quantize_training_test.py"  # Needs quantization ops to be included in windows.
       "${tensorflow_source_dir}/tensorflow/python/training/supervisor_test.py"  # Flaky I/O error on rename.
-      "${tensorflow_source_dir}/tensorflow/python/training/sync_replicas_optimizer_test.py"  # Needs portpicker.
       "${tensorflow_source_dir}/tensorflow/python/training/server_lib_test.py"  # Test occasionally deadlocks.
-      "${tensorflow_source_dir}/tensorflow/python/debug/lib/session_debug_multi_gpu_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/concat_op_test.py"  # numerical issues
-
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/array_ops_test.py"  # depends on python/framework/test_ops
+      "${tensorflow_source_dir}/tensorflow/python/debug/lib/session_debug_multi_gpu_test.py"  # Fails on multiple GPUs.
       # Dataset tests
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/dataset_constructor_op_test.py"
-      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/iterator_ops_cluster_test.py"
-      # Broken tensorboard test due to cmake issues.
-      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/dataset_constructor_op_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/iterator_ops_cluster_test.py"  # Needs portpicker
-      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/sloppy_transformation_dataset_op_test.py"  # b/65430561
-      # Type error in testRemoteIteratorUsingRemoteCallOpDirectSessionGPUCPU.
-      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/iterator_ops_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/dataset_constructor_op_test.py"  # Segfaults on windows
+      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/dataset_constructor_op_test.py"  # Segfaults on Windows.
       # tensor_forest tests (also note that we exclude the hybrid tests for now)
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/count_extremely_random_stats_op_test.py"  # Results in wrong order.
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/sample_inputs_op_test.py"  # Results in wrong order.
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/kernel_tests/scatter_add_ndim_op_test.py"  # Bad placement.
       "${tensorflow_source_dir}/tensorflow/contrib/tensor_forest/python/topn_test.py"  # Results inaccurate
       "${tensorflow_source_dir}/tensorflow/python/ops/cloud/bigquery_reader_ops_test.py"  # No libcurl support
-      # Newly running on Windows since TensorBoard backend move. Fail on Windows and need debug.
-      "${tensorflow_source_dir}/tensorflow/contrib/data/python/kernel_tests/dataset_constructor_op_test.py"  # Segfaults on Windows.
       # Dask.Dataframe bugs on Window Build
       "${tensorflow_source_dir}/tensorflow/contrib/learn/python/learn/tests/dataframe/tensorflow_dataframe_test.py"
       "${tensorflow_source_dir}/tensorflow/contrib/learn/python/learn/learn_io/data_feeder_test.py"
@@ -273,37 +259,11 @@
       # Need extra build
       "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/conditional_distribution_test.py"
       "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/conditional_transformed_distribution_test.py"
+      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/estimator_test.py"
+      "${tensorflow_source_dir}/tensorflow/python/kernel_tests/array_ops_test.py"  # depends on python/framework/test_ops
       # Windows Path
       "${tensorflow_source_dir}/tensorflow/contrib/framework/python/ops/checkpoint_ops_test.py" #TODO: Fix path
-      "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/models_test.py"
-      # Related to Windows Multiprocessing https://github.com/fchollet/keras/issues/5071
-      "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/engine/training_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/utils/data_utils_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/callbacks_test.py"
-      # Scipy needed
-      "${tensorflow_source_dir}/tensorflow/contrib/keras/python/keras/preprocessing/image_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/bijectors/sigmoid_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/binomial_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/chi2_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/geometric_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/inverse_gamma_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/logistic_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/mixture_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/mvn_diag_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/mvn_full_covariance_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/mvn_tril_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/negative_binomial_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/poisson_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/quantized_distribution_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/relaxed_bernoulli_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/relaxed_onehot_categorical_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/transformed_distribution_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/vector_student_t_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/wishart_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/factorization/python/ops/kmeans_test.py"
-      "${tensorflow_source_dir}/tensorflow/contrib/learn/python/learn/estimators/kmeans_test.py"
-      # Failing with TF 1.3 (TODO)
-      "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/estimator_test.py"
+      # Numpy upgrade needed?
       "${tensorflow_source_dir}/tensorflow/contrib/distributions/python/kernel_tests/bijectors/sinh_arcsinh_test.py"
       # Test should only be run manually
       "${tensorflow_source_dir}/tensorflow/python/kernel_tests/reduction_ops_test_big.py"


Fix the library name in the FindGLES2 script

--- CMake/Packages/FindOpenGLES2.cmake
+++ CMake/Packages/FindOpenGLES2.cmake
@@ -50,7 +50,7 @@

     FIND_LIBRARY(OPENGLES2_gl_LIBRARY
-      NAMES GLES_CM
+      NAMES GLESv2
       PATHS /opt/graphics/OpenGL/lib
             /usr/openwin/lib
             /usr/shlib /usr/X11R6/lib


Enable use of unordered_map in classads

Enable use of unordered_map in classads

This is the standards-compliant hash_map implementations
on those platforms that have it. (Only rhel 3 and macos 10.5
don't)

--- src/condor_includes/config.h.cmake
+++ src/condor_includes/config.h.cmake
@@ -567,4 +567,7 @@
 /* Define to 1 if the system has proportional set size (PSS).*/
 #cmakedefine HAVE_PSS 1

+/* Define to 1 if the system has a working tr1/unordered_map */
+#cmakedefine HAVE_TR1_UNORDERED_MAP 1
+
 #endif


Make test more robust against adversity

Make test more robust against adversity

When DYLD_FALLBACK_LIBRARY_PATH is just weird

--- tests/create_environment_script.cmake
+++ tests/create_environment_script.cmake
@@ -7,6 +7,8 @@
 # Executes an environment script, checks its result and output
 function(try_execute script)
     cmake_parse_arguments(try_execute "" "OUTPUT" "ARGS" ${ARGN})
+    string(REPLACE ":" " " try_execute_OUTPUT "${try_execute_OUTPUT}")
+    string(STRIP "${try_execute_OUTPUT}" try_execute_OUTPUT)

     execute_process(
         COMMAND "${PROJECT_BINARY_DIR}/${script}.sh" ${try_execute_ARGS}
@@ -20,6 +22,8 @@
         message(FATAL_ERROR "environment script failed with "
             "${result}: ${error}")
     endif()
+    string(REPLACE ":" " " output "${output}")
+    string(STRIP "${output}" output)
     if(NOT "${output}" STREQUAL "${try_execute_OUTPUT}")
         message(FATAL_ERROR "environment script did not output expected"
             " result\n"
@@ -51,14 +55,16 @@
 # Check DYLD_ENVIRONMENT_PATH has expected path
 function(check_path)
     unset(expected)
-    foreach(current $ENV{DYLD_FALLBACK_LIBRARY_PATH} ${ARGN})
+    string(REPLACE ":" " " vars "$ENV{DYLD_FALLBACK_LIBRARY_PATH} ${ARGN}")
+    string(STRIP "${vars}" vars)
+    foreach(current ${vars})
         if("${expected}" STREQUAL "")
             set(expected "${current}")
         else()
             set(expected "${expected}:${current}")
         endif()
     endforeach()
-
+
     try_execute(dyld OUTPUT "${expected}")
 endfunction()

@@ -67,20 +73,20 @@
 try_execute(noexec ARGS echo "hello" OUTPUT "hello")

 # With an executable/command
-create_environment_script(PATH "${PROJECT_BINARY_DIR}/with_exec.sh"
+create_environment_script(PATH "${PROJECT_BINARY_DIR}/with_exec.sh"
     EXECUTABLE echo)
 try_execute(with_exec ARGS "hello, world" OUTPUT "hello, world")

 # Changing work directory
 get_filename_component(directory "${PROJECT_BINARY_DIR}/CMakeFiles" ABSOLUTE)
-create_environment_script(PATH "${PROJECT_BINARY_DIR}/ch_dir.sh"
+create_environment_script(PATH "${PROJECT_BINARY_DIR}/ch_dir.sh"
     EXECUTABLE pwd WORKING_DIRECTORY "${directory}"
 )
 try_execute(ch_dir  OUTPUT "${directory}")

 # Check dyldpath modifications
-create_environment_script(PATH "${PROJECT_BINARY_DIR}/dyld.sh"
+create_environment_script(PATH "${PROJECT_BINARY_DIR}/dyld.sh"
     EXECUTABLE "echo $DYLD_FALLBACK_LIBRARY_PATH")
 file(REMOVE "${PROJECT_BINARY_DIR}/paths/ldpaths")
 file(REMOVE_RECURSE


cmake: Define _XOPEN_SOURCE_EXTENDED with value 1 for HP-UX

--- platforms/hpux-gcc/platform.cmake
+++ platforms/hpux-gcc/platform.cmake
@@ -8,5 +8,5 @@
 set (PLIB_PLATFORM_DEFINES
         -D_REENTRANT
         -D_THREAD_SAFE
-        -D_XOPEN_SOURCE_EXTENDED
+        -D_XOPEN_SOURCE_EXTENDED=1
 )


Ajout PATH des include pour Radar

Ajout PATH des include pour Radar

--- otbIncludeDirectories.cmake
+++ otbIncludeDirectories.cmake
@@ -23,6 +23,7 @@
   ${OTB_SOURCE_DIR}/Code/Fusion
   ${OTB_SOURCE_DIR}/Code/Projections
   ${OTB_SOURCE_DIR}/Code/Radiometry
+  ${OTB_SOURCE_DIR}/Code/Radar
   ${OTB_SOURCE_DIR}/Code/Markov
   ${OTB_SOURCE_DIR}/Utilities/BGL
   ${OTB_SOURCE_DIR}/Utilities/BGL/boost
@@ -175,6 +176,7 @@
   ${OTB_INSTALL_INCLUDE_DIR}/Gui
   ${OTB_INSTALL_INCLUDE_DIR}/Projections
   ${OTB_INSTALL_INCLUDE_DIR}/Radiometry
+  ${OTB_INSTALL_INCLUDE_DIR}/Radar
   ${OTB_INSTALL_INCLUDE_DIR}/Markov
   ${OTB_INSTALL_INCLUDE_DIR}/Fusion
   ${OTB_INSTALL_INCLUDE_DIR}/Utilities


[CMake] Support stripping and linking output to .build-id directory

When installing runtimes with install-runtimes-stripped, we don't want
to just strip them, we also want to preserve the debugging information
for potential debugging. To make it possible to later find the stripped
debugging information, we want to use the .build-id layout:

https://fedoraproject.org/wiki/RolandMcGrath/BuildID#Find_files_by_build_ID

That is, for libfoo.so with build ID abcdef1234, the debugging information
will be installed into lib/debug/.build-id/ab/cdef1234. llvm-objcopy
already has support for stripping files and linking the debugging
stripped output into the right location. However, CMake doesn't support
customizing strip invocation for the *-stripped targets. So instead, we
replace CMAKE_STRIP with a custom script that invokes llvm-objcopy with
the right command line flags.

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

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@355765 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -74,6 +74,9 @@
     set(RUNTIMES_${target}_SANITIZER_CXX_ABI "libc++" CACHE STRING "")
     set(RUNTIMES_${target}_SANITIZER_CXX_ABI_INTREE ON CACHE BOOL "")
     set(RUNTIMES_${target}_COMPILER_RT_USE_BUILTINS_LIBRARY ON CACHE BOOL "")
+
+    # Use .build-id link.
+    list(APPEND RUNTIME_BUILD_ID_LINK "${target}")
   endif()
 endforeach()

@@ -126,6 +129,9 @@
     set(RUNTIMES_${target}-fuchsia_LIBCXX_HERMETIC_STATIC_LIBRARY ON CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_STATICALLY_LINK_ABI_IN_SHARED_LIBRARY OFF CACHE BOOL "")
     set(RUNTIMES_${target}-fuchsia_LIBCXX_ABI_VERSION 2 CACHE STRING "")
+
+    # Use .build-id link.
+    list(APPEND RUNTIME_BUILD_ID_LINK "${target}-fuchsia")
   endforeach()

   set(LLVM_RUNTIME_SANITIZERS "Address" CACHE STRING "")
@@ -134,6 +140,7 @@

 set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")
 set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "")
+set(LLVM_RUNTIME_BUILD_ID_LINK_TARGETS "${RUNTIME_BUILD_ID_LINK}" CACHE STRING "")

 # Setup toolchain.
 set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")


Set CMAKE_BUILD_WITH_INSTALL_RPATH for Fuchsia runtimes

This doesn't make any difference since we don't use RPATH/RUNPATH
on Fuchsia but it avoids the CMake error when re-linking libraries
while building with Ninja.

Differntial Revision: https://reviews.llvm.org/D46610

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@331833 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/caches/Fuchsia-stage2.cmake
+++ cmake/caches/Fuchsia-stage2.cmake
@@ -67,6 +67,7 @@
 foreach(target x86_64;aarch64)
   set(RUNTIMES_${target}-fuchsia_CMAKE_SYSTEM_NAME Fuchsia CACHE STRING "")
   set(RUNTIMES_${target}-fuchsia_CMAKE_BUILD_TYPE ${FUCHSIA_RUNTIMES_BUILD_TYPE} CACHE STRING "")
+  set(RUNTIMES_${target}-fuchsia_CMAKE_BUILD_WITH_INSTALL_RPATH ON CACHE STRING "")
   set(RUNTIMES_${target}-fuchsia_CMAKE_ASM_FLAGS ${FUCHSIA_${target}_C_FLAGS} CACHE PATH "")
   set(RUNTIMES_${target}-fuchsia_CMAKE_C_FLAGS ${FUCHSIA_${target}_C_FLAGS} CACHE PATH "")
   set(RUNTIMES_${target}-fuchsia_CMAKE_CXX_FLAGS ${FUCHSIA_${target}_CXX_FLAGS} CACHE PATH "")


Take into account trunk versions of clang

for example which output with clang --version something like
 Ubuntu clang version 3.5-1~exp1 (trunk) (based on LLVM 3.5)
 Target: x86_64-pc-linux-gnu
 Thread model: posix

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -14,9 +14,9 @@

 #----Test if clang setup works----------------------------------------------------------------------
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
-  exec_program(${CMAKE_C_COMPILER} ARGS "-v" OUTPUT_VARIABLE _clang_version_info)
-  string(REGEX REPLACE "^.*[ ]([0-9]+)\\.[0-9]+[ ].*" "\\1" CLANG_MAJOR "${_clang_version_info}")
-  string(REGEX REPLACE "^.*[ ][0-9]+\\.([0-9]+)[ ].*" "\\1" CLANG_MINOR "${_clang_version_info}")
+  exec_program(${CMAKE_C_COMPILER} ARGS "--version 2>&1 | grep version" OUTPUT_VARIABLE _clang_version_info)
+  string(REGEX REPLACE "^.*clang[ ]version[ ]([0-9]+)\\.[0-9]+.*" "\\1" CLANG_MAJOR "${_clang_version_info}")
+  string(REGEX REPLACE "^.*clang[ ]version[ ][0-9]+\\.([0-9]+).*" "\\1" CLANG_MINOR "${_clang_version_info}")
   message(STATUS "Found Clang. Major version ${CLANG_MAJOR}, minor version ${CLANG_MINOR}")
   set(COMPILER_VERSION clang${CLANG_MAJOR}${CLANG_MINOR})
 else()


Typos.

Typos.

--- cmake/modules/CheckCompiler.cmake
+++ cmake/modules/CheckCompiler.cmake
@@ -126,14 +126,14 @@
                              int main() { assert(this code is not compiled); }"
                              CXX_SUPPORTS_MODULES)
   set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-  if (CXX_SUPPORTS_MODULES)
+  if(CXX_SUPPORTS_MODULES)
     file(COPY ${CMAKE_SOURCE_DIR}/build/unix/module.modulemap DESTINATION ${ROOT_INCLUDE_DIR})

     # This var is useful when we want to compile things without cxxmodules.
     set(ROOT_CXXMODULES_CXXFLAGS "-fmodules -fcxx-modules -Xclang -fmodules-local-submodule-visibility -fmodules-cache-path=${CMAKE_BINARY_DIR}/include/pcms/")
     set(ROOT_CXXMODULES_CFLAGS "-fmodules -fmodules-cache-path=${CMAKE_BINARY_DIR}/include/pcms/")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ROOT_CXXMODULES_FLAGS}")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXXMODULES_FLAGS}")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ROOT_CXXMODULES_CFLAGS}")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ROOT_CXXMODULES_CXXFLAGS}")
   else()
     message(FATAL_ERROR "cxxmodules is not supported by this compiler")
   endif()


[modules] Do not put deprecated headers in the modules.

This avoids generating warnings which in turn cause roottest failures.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -446,6 +446,10 @@
                         TException.h ThreadLocalStorage.h ROOT/TThreadExecutor.hxx
                         TBranchProxyTemplate.h TGLIncludes.h TGLWSIncludes.h
                         snprintf.h strlcpy.h")
+
+   # Deprecated header files.
+  set (excluded_headers "${excluded_headers} TSelectorCint.h")
+
   set(modulemap_entry "module \"${library}\" {")
   # For modules GCocoa and GQuartz we need objc context.
   if (${library} MATCHES "(libGCocoa|libGQuartz)\..*")


Fix for ROOT-5751 (CMake)

Fix for ROOT-5751 (CMake)

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -451,6 +451,7 @@
     install(DIRECTORY ${d} DESTINATION include
                            COMPONENT headers
                            PATTERN ".svn" EXCLUDE
+                           PATTERN "X11" EXCLUDE
                            REGEX "LinkDef" EXCLUDE )
     set_property(GLOBAL APPEND PROPERTY ROOT_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/${d})
   endforeach()


cmake-modules :
 + added gthread to FindThirdPartyGlade.cmake

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

--- trunk/cmake-modules/FindThirdPartyGlade.cmake
+++ trunk/cmake-modules/FindThirdPartyGlade.cmake
@@ -13,14 +13,15 @@

 INCLUDE("FindThirdPartyPkgConfig")
 pkg_check_modules(GLADE libglade-2.0)
+pkg_check_modules(GTHREAD gthread-2.0)

-IF(GLADE_FOUND)
+IF(GLADE_FOUND AND GTHREAD_FOUND)
 	MESSAGE(STATUS "  Found glade...")
-	INCLUDE_DIRECTORIES(${GLADE_INCLUDE_DIRS})
-	ADD_DEFINITIONS(${GLADE_CFLAGS})
-	ADD_DEFINITIONS(${GLADE_CFLAGS_OTHERS})
-	LINK_DIRECTORIES(${GLADE_LIBRARY_DIRS})
-	FOREACH(GLADE_LIB ${GLADE_LIBRARIES})
+	INCLUDE_DIRECTORIES(${GLADE_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS})
+	ADD_DEFINITIONS(${GLADE_CFLAGS} ${GTHREAD_CFLAGS})
+	ADD_DEFINITIONS(${GLADE_CFLAGS_OTHERS} ${GTHREAD_CFLAGS_OTHERS})
+	LINK_DIRECTORIES(${GLADE_LIBRARY_DIRS} ${GTHREAD_LIBRARY_DIRS})
+	FOREACH(GLADE_LIB ${GLADE_LIBRARIES} ${GTHREAD_LIBRARIES})
 		SET(GLADE_LIB1 "GLADE_LIB1-NOTFOUND")
 		FIND_LIBRARY(GLADE_LIB1 NAMES ${GLADE_LIB} PATHS ${GLADE_LIBRARY_DIRS} ${GLADE_LIBDIR} NO_DEFAULT_PATH)
 		FIND_LIBRARY(GLADE_LIB1 NAMES ${GLADE_LIB})
@@ -31,6 +32,6 @@
 			MESSAGE(STATUS "    [FAILED] Third party lib ${GLADE_LIB}")
 		ENDIF(GLADE_LIB1)
 	ENDFOREACH(GLADE_LIB)
-ELSE(GLADE_FOUND)
+ELSE(GLADE_FOUND AND GTHREAD_FOUND)
 	MESSAGE(STATUS "  FAILED to find glade...")
-ENDIF(GLADE_FOUND)
+ENDIF(GLADE_FOUND AND GTHREAD_FOUND)


* Add extra -I flags to specify paths to child header files.

--- Child/Code/child.pc.cmake
+++ Child/Code/child.pc.cmake
@@ -2,5 +2,5 @@
 Description: Child library
 Version: ${CHILD_VERSION}
 Libs: -L${CMAKE_INSTALL_PREFIX}/lib -lchild
-Cflags: -I${CMAKE_INSTALL_PREFIX}/include/
+Cflags: -I${CMAKE_INSTALL_PREFIX}/include -I${CMAKE_INSTALL_PREFIX}/include/child -I${CMAKE_INSTALL_PREFIX}/include/child/ChildInterface


curl 自动follow 30x跳转

curl 自动follow 30x跳转

--- Modules/FindConfigurePackage.cmake
+++ Modules/FindConfigurePackage.cmake
@@ -60,7 +60,7 @@
 function(FindConfigurePackageDownloadFile from to)
     find_program (CURL_FULL_PATH curl)
     if(CURL_FULL_PATH)
-        execute_process(COMMAND ${CURL_FULL_PATH} -v ${from} -o ${to})
+        execute_process(COMMAND ${CURL_FULL_PATH} -L ${from} -o ${to})
     else()
         find_program (WGET_FULL_PATH wget)
         if(WGET_FULL_PATH)


ENH: Use v1.0.0 for tag

ENH: Use v1.0.0 for tag

--- Modules/Remote/TubeTK.remote.cmake
+++ Modules/Remote/TubeTK.remote.cmake
@@ -48,5 +48,5 @@
   "http://www.tubetk.org"
   MODULE_COMPLIANCE_LEVEL 3
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTubeTK.git
-  GIT_TAG cee053ac95743ed6d7a879465ac2d4ddd4beb04f
+  GIT_TAG v1.0.0
   )


Clean existing admin-ui builds before building.

This prevents some weird issues when switching between different
branches in the CI environment.

--- build/cmake/core-admin-ui.cmake
+++ build/cmake/core-admin-ui.cmake
@@ -52,8 +52,8 @@
     ${STAMP_DIR}/core-admin-ui-build-dir
     ${STAMP_DIR}/core-admin-ui-yarn-install
     ${STAMP_DIR}/core-admin-ui-bower-install
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=development --output-path=./dist-dev
-  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=production --output-path=./dist-prod
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && rm -rf ./dist-dev && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=development --output-path=./dist-dev
+  COMMAND cd ${CORE_BUILD_DIR}/tmp/admin-ui-build && rm -rf ./dist-prod && env PATH=${DEV_INSTALL_PREFIX}/bin:$ENV{PATH} ./node_modules/.bin/ember build --environment=production --output-path=./dist-prod
   COMMAND touch ${STAMP_DIR}/core-admin-ui-build
 )


emscripten: add FIPS_EMSCRIPTEN_USE_WEBGPU cmake option

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -15,7 +15,7 @@

 find_package(Java COMPONENTS Runtime)

-# tweakable options
+# tweakable options
 option(FIPS_EMSCRIPTEN_USE_FS "enable FS module" OFF)
 option(FIPS_EMSCRIPTEN_USE_DFE "enable Duplicate Function Elimination" OFF)
 option(FIPS_EMSCRIPTEN_USE_WASM "enable WebAssembly" ON)
@@ -23,6 +23,7 @@
 option(FIPS_EMSCRIPTEN_USE_CPU_PROFILER "enable the built-in CPU profiler" OFF)
 option(FIPS_EMSCRIPTEN_USE_MEMORY_PROFILER "enable the built-in memory profiler" OFF)
 option(FIPS_EMSCRIPTEN_USE_WEBGL2 "use WebGL2" OFF)
+option(FIPS_EMSCRIPTEN_USE_WEBGPU "use WebGPU" OFF)
 option(FIPS_EMSCRIPTEN_USE_CLOSURE "run closure compiler on JS code" OFF)
 option(FIPS_EMSCRIPTEN_USE_EMMALLOC "use emmalloc allocator" OFF)
 option(FIPS_EMSCRIPTEN_USE_EMBIND "use embind" OFF)
@@ -71,6 +72,9 @@
 if (FIPS_EMSCRIPTEN_USE_WEBGL2)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s USE_WEBGL2=1")
 endif()
+if (FIPS_EMSCRIPTEN_USE_WEBGPU)
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s USE_WEBGPU=1")
+endif()
 if (FIPS_EMSCRIPTEN_USE_EMMALLOC)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s \"MALLOC='emmalloc'\"")
 endif()
@@ -78,7 +82,7 @@
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} --bind")
 endif()
 if (FIPS_EMSCRIPTEN_USE_FS)
-    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_FILESYSTEM=0")
+    set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_FILESYSTEM=0")
 else()
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s NO_FILESYSTEM=1")
 endif()
@@ -106,7 +110,7 @@
     set(EMSC_CXX_FLAGS "${EMSC_CXX_FLAGS} -fno-rtti")
 endif()
 set(EMSC_LINKER_FLAGS_RELEASE "${EMSC_LINKER_FLAGS_RELEASE} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL}")
-if (FIPS_EMSCRIPTEN_USE_WASM)
+if (FIPS_EMSCRIPTEN_USE_WASM)
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=1")
 else()
     set(EMSC_LINKER_FLAGS "${EMSC_LINKER_FLAGS} -s WASM=0")
@@ -146,7 +150,7 @@
 # If an SDK-local .emscripten is not found, fall back to ~/.emscripten
 get_filename_component(EMSCRIPTEN_DOT_FILE "${EMSCRIPTEN_EMSDK}/.emscripten" ABSOLUTE)
 if (EMSCRIPTEN_TRACING)
-    # set a separate .emscripten_cache when tracing since this will use an
+    # set a separate .emscripten_cache when tracing since this will use an
     # instrumented dlmalloc.c
     get_filename_component(EMSCRIPTEN_CACHE "${EMSCRIPTEN_EMSDK}/.emscripten_cache_tracing" ABSOLUTE)
 else()


Update required version of GCC to 5.3.0 to enable Vc in ROOT

The static_assert() in Vc/common/simdize.h:758 is triggering due to
some strange interaction between the pragmas to suppress the warnings
and other things (see commit a79d073ef7). Newer versions of GCC seem
unaffected by this problem, so we require a recent enough GCC from
now on to sidestep this issue.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1246,8 +1246,8 @@
 #---Check for Vc compatibility-----------------------------------------------------------
 if(vc OR builtin_vc)
   if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.2.0)
-      message(STATUS "Vc requires GCC version >= 5.2.0; switching OFF 'vc' option")
+    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.3.0)
+      message(STATUS "Vc requires GCC version >= 5.3.0; switching OFF 'vc' option")
       set(vc OFF CACHE BOOL "" FORCE)
       set(builtin_vc OFF CACHE BOOL "" FORCE)
     endif()


[cmake] Spelling in comment (NFC).

[cmake] Spelling in comment (NFC).

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -4,7 +4,7 @@
 # For the licensing terms see $ROOTSYS/LICENSE.
 # For the list of contributors see $ROOTSYS/README/CREDITS.

-#---Check for installed packages depending on the build options/components eamnbled -
+#---Check for installed packages depending on the build options/components enabled --
 include(ExternalProject)
 include(FindPackageHandleStandardArgs)


fix cmake

fix cmake

--- source/ConfigureChecks.cmake
+++ source/ConfigureChecks.cmake
@@ -37,6 +37,7 @@
   am
   lzo
   boost_memory
+  beansdb
   )

 FIND_PACKAGE(ilplib REQUIRED COMPONENTS


Add more compiler flags.

Add more compiler flags.

--- cmake/DOConfigureCompiler.cmake
+++ cmake/DOConfigureCompiler.cmake
@@ -77,8 +77,13 @@
   # Base compilation flags.
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wnon-virtual-dtor")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wpointer-arith")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wundef")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wunused-variable")
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ENABLE_CXX11}")
   # Additional flags for Release builds.


cmake/MyPackageDependency.cmake and recursivity

--- cmake/MyPackageDependency.cmake
+++ cmake/MyPackageDependency.cmake
@@ -76,7 +76,7 @@
     # Remember all eventual packageDepend variables we depend upon
     #
     FOREACH (_what INCLUDE_DIRS LIBRARIES C_FLAGS_SHARED LINK_FLAGS)
-      SET (_val ${${_PACKAGEDEPEND}_${_what})
+      SET (_val ${${_PACKAGEDEPEND}_${_what}})
       IF (MYPACKAGE_DEBUG)
         MESSAGE (STATUS "[${PROJECT_NAME}-DEPEND-DEBUG] Setting property MYPACKAGE_DEPENDENCY_${packageDepend}_${_what} to ${_val}")
       ENDIF ()


Simplify the if statement even more when auto detect Houdini ABI

Signed-off-by: Fredrik Salomonsson <94092975b04047b37821994781a0b9ea8d41c3ff@d2.com>

--- cmake/OpenVDBHoudiniSetup.cmake
+++ cmake/OpenVDBHoudiniSetup.cmake
@@ -341,7 +341,7 @@
   find_file(_houdini_openvdb_version_file "openvdb/version.h"
     PATHS ${HOUDINI_INCLUDE_DIR}
     NO_DEFAULT_PATH)
-  if(NOT ${_houdini_openvdb_version_file})
+  if(_houdini_openvdb_version_file)
     OPENVDB_VERSION_FROM_HEADER("${_houdini_openvdb_version_file}"
       ABI OPENVDB_HOUDINI_ABI)
   endif()


removed obsolete code

removed obsolete code

--- cmake/catkin_python_setup.cmake
+++ cmake/catkin_python_setup.cmake
@@ -26,23 +26,11 @@
     message(FATAL_ERROR "generate_messages() must be called after catkin_python_setup() in project '${PROJECT_NAME}'")
   endif()

-  if(${ARGC} GREATER 1)
-    message(FATAL_ERROR "catkin_python_setup() takes only one optional argument, update project '${PROJECT_NAME}'")
-  endif()
-  set(path_to_setup_py "")
-  if(${ARGC} EQUAL 1)
-    set(path_to_setup_py "${ARGN}/")
-  endif()
-  set(setup_py_file "${path_to_setup_py}setup.py")
-  if(NOT("${path_to_setup_py}" STREQUAL ""))
-    string(REPLACE "." "_" path_to_setup_py ${path_to_setup_py})
+  if(NOT EXISTS ${${PROJECT_NAME}_SOURCE_DIR}/setup.py)
+    message(FATAL_ERROR "catkin_python_setup() called without 'setup.py' in project folder ' ${${PROJECT_NAME}_SOURCE_DIR}'")
   endif()

-  if(NOT EXISTS ${${PROJECT_NAME}_SOURCE_DIR}/${setup_py_file})
-    message(FATAL_ERROR "catkin_python_setup() called without '${setup_py_file}' in project '${PROJECT_NAME}'")
-  endif()
-
-  if(EXISTS ${${PROJECT_NAME}_SOURCE_DIR}/${setup_py_file})
+  if(EXISTS ${${PROJECT_NAME}_SOURCE_DIR}/setup.py)
     assert(PYTHON_INSTALL_DIR)
     set(INSTALL_CMD_WORKING_DIRECTORY ${${PROJECT_NAME}_SOURCE_DIR})
     if(NOT MSVC)
@@ -66,7 +54,7 @@
       ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/safe_execute_install.cmake)
     install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/safe_execute_install.cmake)

-    stamp(${${PROJECT_NAME}_SOURCE_DIR}/${setup_py_file})
+    stamp(${${PROJECT_NAME}_SOURCE_DIR}/setup.py)

     assert(CATKIN_ENV)
     assert(PYTHON_EXECUTABLE)
@@ -74,13 +62,13 @@
       ${CATKIN_ENV} ${PYTHON_EXECUTABLE}
       ${catkin_EXTRAS_DIR}/interrogate_setup_dot_py.py
       ${PROJECT_NAME}
-      ${${PROJECT_NAME}_SOURCE_DIR}/${setup_py_file}
-      ${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/${path_to_setup_py}setup_py_interrogation.cmake
+      ${${PROJECT_NAME}_SOURCE_DIR}/setup.py
+      ${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/setup_py_interrogation.cmake
       )

     debug_message(10 "catkin_python_setup() in project '{PROJECT_NAME}' executes:  ${cmd}")
     safe_execute_process(COMMAND ${cmd})
-    include(${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/${path_to_setup_py}setup_py_interrogation.cmake)
+    include(${${PROJECT_NAME}_BINARY_DIR}/catkin_generated/setup_py_interrogation.cmake)

     # generate relaying __init__.py for each python package
     if(${PROJECT_NAME}_PACKAGES)
@@ -105,7 +93,7 @@
     foreach(script ${${PROJECT_NAME}_SCRIPTS})
       get_filename_component(name ${script} NAME)
       if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${script})
-        message(FATAL_ERROR "The script '${name}' as listed in '${setup_py_file}' of '${PROJECT_NAME}' doesn't exist")
+        message(FATAL_ERROR "The script '${name}' as listed in 'setup.py' of '${PROJECT_NAME}' doesn't exist")
       endif()
       set(PYTHON_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/${script})
       configure_file(${catkin_EXTRAS_DIR}/templates/script.py.in


Fix case where there are no test temp directories to create (#9438)

This behavior, introduced in https://github.com/google/iree/pull/9405,
is broken on Android, where we don't do this temp directory
registration:
https://buildkite.com/iree/iree-test-android/builds/6452

Triggered a run of the android test pipeline on this PR:
https://buildkite.com/iree/iree-test-android/builds/6458

--- build_tools/cmake/iree_configure_testing.cmake
+++ build_tools/cmake/iree_configure_testing.cmake
@@ -72,8 +72,10 @@
       string(APPEND _CUR_CMD " ${_DIR}")
     endif()
   endforeach()
-  string(APPEND _CUR_CMD "\"\n")
-  string(APPEND IREE_CREATE_TEST_TMPDIRS_COMMANDS "${_CUR_CMD}")
+  if(NOT _CUR_CMD STREQUAL _CMD_PREFIX)
+    string(APPEND _CUR_CMD "\"\n")
+    string(APPEND IREE_CREATE_TEST_TMPDIRS_COMMANDS "${_CUR_CMD}")
+  endif()

   configure_file("build_tools/cmake/CTestCustom.cmake.in" "${IREE_BINARY_DIR}/CTestCustom.cmake" @ONLY)
 endfunction()


Don't redefine a bunch of defines from llvm-config.h in config.h.

r210144 made config.h include llvm-config.h and deduplicated defines. Then
rL239987 later added back some of the duplication.
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150914/300329.html
suggests this was done for the configure/make build, which no longer exists.

No intended behavior change.

https://reviews.llvm.org/D46288

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

--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -289,55 +289,22 @@
 /* Linker version detected at compile time. */
 #cmakedefine HOST_LINK_VERSION "${HOST_LINK_VERSION}"

-/* Define if we link Polly to the tools */
-#cmakedefine LINK_POLLY_INTO_TOOLS
-
 /* Target triple LLVM will generate code for by default */
 /* Doesn't use `cmakedefine` because it is allowed to be empty. */
 #define LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"

-/* Define if threads enabled */
-#cmakedefine01 LLVM_ENABLE_THREADS
-
 /* Define if zlib compression is available */
 #cmakedefine01 LLVM_ENABLE_ZLIB

-/* Has gcc/MSVC atomic intrinsics */
-#cmakedefine01 LLVM_HAS_ATOMICS
-
-/* Host triple LLVM will be executed on */
-#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"
-
-/* Define if this is Unixish platform */
-#cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
-
 /* Define if overriding target triple is enabled */
 #cmakedefine LLVM_TARGET_TRIPLE_ENV "${LLVM_TARGET_TRIPLE_ENV}"

-/* Define if we have the Intel JIT API runtime support library */
-#cmakedefine01 LLVM_USE_INTEL_JITEVENTS
-
-/* Define if we have the oprofile JIT-support library */
-#cmakedefine01 LLVM_USE_OPROFILE
-
 /* LLVM version information */
 #cmakedefine LLVM_VERSION_INFO "${LLVM_VERSION_INFO}"

 /* Whether tools show host and target info when invoked with --version */
 #cmakedefine01 LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO

-/* Major version of the LLVM API */
-#define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR}
-
-/* Minor version of the LLVM API */
-#define LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR}
-
-/* Patch version of the LLVM API */
-#define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH}
-
-/* LLVM version string */
-#define LLVM_VERSION_STRING "${PACKAGE_VERSION}"
-
 /* Define if libxml2 is supported on this platform. */
 #cmakedefine LLVM_LIBXML2_ENABLED ${LLVM_LIBXML2_ENABLED}


ENH: Update TubeTK hashtag

ENH: Update TubeTK hashtag

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


Setting cmake_find_framework setting so that system frameworks do not override ones found in non-standard directories.

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

--- CMake/hoomd/HOOMDCommonLibsSetup.cmake
+++ CMake/hoomd/HOOMDCommonLibsSetup.cmake
@@ -11,6 +11,7 @@
 # find the python interpreter, first
 find_package(PythonInterp REQUIRED)
 # find the python libraries to link to
+set(CMAKE_FIND_FRAMEWORK "LAST")
 find_package(PythonLibs REQUIRED)

 include_directories(${PYTHON_INCLUDE_PATH})


ENH: Add Boost to the deathstar submission name.

Since it has Boost support enabled.

Change-Id: I09f4ea385b9116dffa480441c159d43e628a949a

--- Deathstar_Kitware_TubeTK_Nightly.cmake
+++ Deathstar_Kitware_TubeTK_Nightly.cmake
@@ -27,7 +27,7 @@
 #   the tubetk source directory.
 #
 set( SITE_NAME "Deathstar.Kitware" )
-set( SITE_PLATFORM "Debian-Stable-64" )
+set( SITE_PLATFORM "Debian-Stable-64-Boost" )
 set( SITE_BUILD_TYPE "RelWithDebInfo" )
 set( SITE_CTEST_MODE "Nightly" ) # Experimental, Continuous, or Nightly
 set( SITE_CMAKE_GENERATOR "Unix Makefiles" )


Try to escape \n char in cmake

Try to escape \n char in cmake

--- CI/main_packages.cmake
+++ CI/main_packages.cmake
@@ -47,9 +47,9 @@
 # OTB_BINARY_DIR
 # CMAKE_INSTALL_PREFIX
 set ( CONFIGURE_OPTIONS
-  "-DCMAKE_PREFIX_PATH=${CTEST_INSTALL_DIRECTORY};
--DOTB_BINARY_DIR=${OTB_SOURCE_DIR}/build;
--DSUPERBUILD_INSTALL_DIR=${CI_ROOT_DIR}/xdk;
+  "-DCMAKE_PREFIX_PATH=${CTEST_INSTALL_DIRECTORY};\
+-DOTB_BINARY_DIR=${OTB_SOURCE_DIR}/build;\
+-DSUPERBUILD_INSTALL_DIR=${CI_ROOT_DIR}/xdk;\
 -DSUPERBUILD_BINARY_DIR=${OTB_SOURCE_DIR};
   " )


Issue #4034: Pass CMAKE_PREFIX_PATH to NiftyLink-build

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -109,6 +109,7 @@
     CMAKE_GENERATOR ${GEN}
     CMAKE_ARGS
       ${EP_COMMON_ARGS}
+      -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH}
       -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
       -DCMAKE_VERBOSE_MAKEFILE:BOOL=${CMAKE_VERBOSE_MAKEFILE}
       -DBUILD_TESTING:BOOL=${BUILD_TESTING} # The value set in EP_COMMON_ARGS normally forces this off, but we may need NiftyGuide to be on.


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


CMake: sync files with KERNEL after inclusion of JUSTIFY_STRING() macro

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -248,11 +248,48 @@
 ENDMACRO(SALOME_UPDATE_FLAG_AND_LOG_PACKAGE)

 ####
+# SALOME_JUSTIFY_STRING()
+#
+# Justifies the string specified as an argument to the given length
+# adding required number of spaces to the end. Does noting if input
+# string is longer as required length.
+# Puts the result to the output variable.
+#
+# USAGE: SALOME_JUSTIFY_STRING(input length result)
+#
+# ARGUMENTS:
+#   input  [in] input string
+#   length [in] required length of resulting string
+#   result [out] name of variable where the result string is put to
+#
+MACRO(SALOME_JUSTIFY_STRING input length result)
+  SET(${result} ${input})
+  STRING(LENGTH ${input} _input_length)
+  MATH(EXPR _nb_spaces "${length}-${_input_length}-1")
+  IF (_nb_spaces GREATER 0)
+    FOREACH(_idx RANGE ${_nb_spaces})
+      SET(${result} "${${result}} ")
+    ENDFOREACH()
+  ENDIF()
+ENDMACRO(SALOME_JUSTIFY_STRING)
+
+####
 # SALOME_PACKAGE_REPORT()
 #
 # Print a quick summary of the detection of optional prerequisites.
+#
+# If optional JUSTIFY argument is specified, names of packages
+# are left-justified to the given length; default value is 10.
+#
+# USAGE: SALOME_PACKAGE_REPORT([JUSTIFY length])
 #
 MACRO(SALOME_PACKAGE_REPORT)
+  PARSE_ARGUMENTS(SALOME_PACKAGE_REPORT "JUSTIFY" "" ${ARGN})
+  IF(SALOME_PACKAGE_REPORT_JUSTIFY)
+    SET(_length ${SALOME_PACKAGE_REPORT_JUSTIFY})
+  ELSE()
+    SET(_length 10)
+  ENDIF()
   MESSAGE(STATUS "")
   MESSAGE(STATUS "  Optional packages - Detection report ")
   MESSAGE(STATUS "  ==================================== ")
@@ -264,6 +301,7 @@
     LIST(GET _SALOME_OPTIONAL_PACKAGES_names ${_idx} _pkg_name)
     LIST(GET _SALOME_OPTIONAL_PACKAGES_found ${_idx} _pkg_found)
     LIST(GET _SALOME_OPTIONAL_PACKAGES_flags ${_idx} _pkg_flag)
+    SALOME_JUSTIFY_STRING(${_pkg_name} ${_length} _pkg_name)
     IF(_pkg_found)
       SET(_found_msg "Found")
       SET(_flag_msg "")


Fix bugs with jitter and msp in cmake

Fix bugs with jitter and msp in cmake

--- Shared/CMake/JamomaUtilFunctions.cmake
+++ Shared/CMake/JamomaUtilFunctions.cmake
@@ -173,23 +173,37 @@

 ## Function to add the Max/MSP includes ##
 function(addMaxsupport)
-	include_directories("${CMAKE_SOURCE_DIR}/../Implementations/Max/source/c74support/max-includes")
-	include_directories("${CMAKE_SOURCE_DIR}/../Implementations/Max/source/c74support/msp-includes")
-	include_directories("${CMAKE_SOURCE_DIR}/../Implementations/Max/source/c74support/jit-includes")
+	set(MAXSDK_PATH "${CMAKE_SOURCE_DIR}/../Implementations/Max/source/c74support")
+	include_directories("${MAXSDK_PATH}/max-includes")
+	include_directories("${MAXSDK_PATH}/msp-includes")
+	include_directories("${MAXSDK_PATH}/jit-includes")
 	include_directories("${CMAKE_SOURCE_DIR}/../Implementations/Max/library/includes")

-	FIND_LIBRARY(MaxAPI_LIB MaxAPI
-				 PATH ${CMAKE_CURRENT_SOURCE_DIR}/../source/c74support/max-includes/)
+	FIND_LIBRARY(MaxAPI_LIB
+				 NAMES MaxAPI
+				 PATHS ${MAXSDK_PATH}/max-includes/)
 	MARK_AS_ADVANCED (MaxAPI_LIB)
 	SET(MaxAPI_LIB ${MaxAPI_LIB})

-	FIND_LIBRARY(MaxAudio_LIB NAMES MaxAudio MaxAudioAPI
-				 PATH ${CMAKE_CURRENT_SOURCE_DIR}/../source/c74support/msp-includes/)
+	FIND_LIBRARY(MaxAudio_LIB
+				 NAMES
+				 	MaxAudio
+				 	MaxAudioAPI
+				 PATHS
+				 	${MAXSDK_PATH}/msp-includes
+				 	${MAXSDK_PATH}/msp-includes/x64
+	)
 	MARK_AS_ADVANCED (MaxAudio_LIB)
 	SET(MaxAudio_LIB ${MaxAudio_LIB})
-
-	FIND_LIBRARY(Jitter_LIB NAMES jitlib JitterAPI
-				 PATH ${CMAKE_CURRENT_SOURCE_DIR}/../source/c74support/jit-includes/)
+
+	FIND_LIBRARY(Jitter_LIB
+				 NAMES
+				 	jitlib
+				 	JitterAPI
+				 PATHS
+				 	${MAXSDK_PATH}/jit-includes
+				 	${MAXSDK_PATH}/jit-includes/x64
+	)
 	MARK_AS_ADVANCED (Jitter_LIB)
 	SET(Jitter_LIB ${Jitter_LIB})


Removed C98 compat pedantic errors when compiling with C++11

--- cmake/Modules/CppUTestWarningFlags.cmake
+++ cmake/Modules/CppUTestWarningFlags.cmake
@@ -23,6 +23,10 @@
       endforeach (flag)
     endmacro(check_and_append_cxx_warning_flags)

+    if (NOT GMOCK AND NOT REAL_GTEST)
+      list(APPEND WARNING_C_FLAGS Werror pedantic-errors)
+    endif (NOT GMOCK AND NOT REAL_GTEST)
+
     set(WARNING_C_FLAGS
         Weverything
         Wall
@@ -36,12 +40,8 @@
         Wno-disabled-macro-expansion
         Wno-reserved-id-macro
         Wno-keyword-macro
-	Wno-long-long
+        Wno-long-long
         )
-
-    if (NOT GMOCK AND NOT REAL_GTEST)
-      list(APPEND WARNING_C_FLAGS Werror pedantic-errors)
-    endif (NOT GMOCK AND NOT REAL_GTEST)

     set(WARNING_C_ONLY_FLAGS
         Wstrict-prototypes
@@ -62,8 +62,12 @@

     if (C++11)
         check_cxx_compiler_flag("-Wno-c++98-compat" NO_WARNING_CXX_98_COMPAT_FLAG)
+        check_cxx_compiler_flag("-Wno-c++98-compat-pedantic" NO_WARNING_CXX_98_COMPAT_PEDANTIC_FLAG)
         if (NO_WARNING_CXX_98_COMPAT_FLAG)
             set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-c++98-compat")
         endif (NO_WARNING_CXX_98_COMPAT_FLAG)
+        if (NO_WARNING_CXX_98_COMPAT_PEDANTIC_FLAG)
+            set(CPPUTEST_CXX_WARNING_FLAGS "${CPPUTEST_CXX_WARNING_FLAGS} -Wno-c++98-compat-pedantic")
+        endif (NO_WARNING_CXX_98_COMPAT_PEDANTIC_FLAG)
     endif (C++11)
 endif (MSVC)


revert to 1cedab9af35e14bdfc76d276367afea4a58ec3df

--- version_config.cmake
+++ version_config.cmake
@@ -21,20 +21,72 @@
 #
 #=========================================================================

-
+## BOOST
 set(Boost_VERSION 1.63.0)
 set(Boost_URL http://downloads.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.zip)
 set(Boost_MD5 3c706b3fc749884ea5510c39474fd732)

-set(STIR_TAG stir_rel_3_00)
-set(GADGETRON_TAG v3.8.2)
-set(ISMRMRD_TAG v1.3.2)
+## Armadillo
+set(Armadillo_URL   https://downloads.sourceforge.net/project/arma/armadillo-7.800.2.tar.xz?r=http%3A%2F%2Farma.sourceforge.net%2Fdownload.html&ts=1492950217&use_mirror=freefr
+ )
+set(Armadillo_MD5 c601f3a5ec6d50666aa3a539fa20e6ca )

+## FFTW3
+if(WIN32)
+  # Just use precompiled version
+  # TODO would prefer the next zip file but for KT using an ftp URL times-out (firewall?)
+  #set(${proj}_URL ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip )
+  #set(${proj}_MD5 cb3c5ad19a89864f036e7a2dd5be168c )
+  set(FFTW3_URL https://s3.amazonaws.com/install-gadgetron-vs2013/Dependencies/FFTW/zip/FFTW3.zip )
+  set(FFTW3_MD5 a42eac92d9ad06d7c53fb82b09df2b6e )
+else(WIN32)
+  set(FFTW3_URL http://www.fftw.org/fftw-3.3.5.tar.gz )
+  set(FFTW3_MD5 6cc08a3b9c7ee06fdd5b9eb02e06f569 )
+endif(WIN32)
+
+set(FFTW3double_URL ${FFTW3_URL})
+set(FFTW3double_MD5 ${FFTW3_MD5})
+
+
+
+## STIR
+
+set(STIR_URL https://github.com/CCPPETMR/STIR )
+set(STIR_TAG 8bf37d9d7fdde7cb3a98a6f848d93827dbd98a18)
+
+## Gadgetron
+set(Gadgetron_URL https://github.com/CCPPETMR/gadgetron )
+set(Gadgetron_TAG f03829ef45e57466829e6ec46da7a7cf61db1c8a)
+
+## ISMRMRD
+set(ISMRMRD_URL https://github.com/CCPPETMR/ismrmrd )
+set(ISMRMRD_TAG 35012c6c8000616546c2d6b1757eba0c5b21b2d4)
+
+
+## HDF5
+set(HDF5_URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.0-patch1/src/CMake-hdf5-1.10.0-patch1.tar.gz )
+set(HDF5_MD5 6fb456d03a60f358f3c077288a6d1cd8 )
+
+## SWIG
+if (WIN32)
+  set(SWIG_URL http://prdownloads.sourceforge.net/swig/swigwin-3.0.12.zip  )
+  set(SWIG_MD5 a49524dad2c91ae1920974e7062bfc93 )
+else(WIN32)
+  set(SWIG_URL http://prdownloads.sourceforge.net/swig/swig-3.0.12.tar.gz )
+  set(SWIG_MD5 82133dfa7bba75ff9ad98a7046be687c )
+endif(WIN32)
 option(DEVEL_BUILD "Use current versions of major packages" OFF)

+## Googletest
+set(googletest_URL https://github.com/google/googletest )
+set(googletest_TAG release-1.8.0)
+
+#SIRF
+set(SIRF_URL https://github.com/CCPPETMR/SIRF )
 if (DEVEL_BUILD)
-set (default_SIRF_GIT_TAG master)
+set (SIRF_TAG master)
 else()
-set(default_SIRF_GIT_TAG v0.9.0)
+set(SIRF_TAG v0.9.0)
 endif()
 option(GIT_TAG_SIRF "git tag for SIRF" ${default_SIRF_GIT_TAG})
+


Reverting r285406, which was a temporary workaround to get one of the documentation bots upgraded to something newer than GCC 4.7. This restores the check for GCC 4.8.

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

--- cmake/modules/CheckCompilerVersion.cmake
+++ cmake/modules/CheckCompilerVersion.cmake
@@ -8,9 +8,8 @@

   if(NOT LLVM_FORCE_USE_OLD_TOOLCHAIN)
     if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-      # FIXME: Change this to 4.8 once documentation builder bot is upgraded
-      if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
-        message(FATAL_ERROR "Host GCC version must be at least 4.7!")
+      if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
+        message(FATAL_ERROR "Host GCC version must be at least 4.8!")
       endif()
     elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
       if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.1)
@@ -36,8 +35,7 @@
 int main() { return (float)x; }"
           LLVM_NO_OLD_LIBSTDCXX)
         if(NOT LLVM_NO_OLD_LIBSTDCXX)
-          # FIXME: Change this to 4.8 once documentation builder bot is upgraded
-          message(FATAL_ERROR "Host Clang must be able to find libstdc++4.7 or newer!")
+          message(FATAL_ERROR "Host Clang must be able to find libstdc++4.8 or newer!")
         endif()
         set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
         set(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})


Sync gcc flags with build base.

Sync gcc flags with build base.

--- cmake/toolchains/linux/gcc-default.cmake
+++ cmake/toolchains/linux/gcc-default.cmake
@@ -29,10 +29,12 @@
     string(CONCAT DEFAULT_CXX_FLAGS
            "${DEFAULT_CXX_FLAGS} "
            "-mstackrealign "
+           "-mfpmath=sse "
           )
     string(CONCAT DEFAULT_C_FLAGS
            "${DEFAULT_C_FLAGS} "
            "-mstackrealign "
+           "-mfpmath=sse "
           )
 endif()


Add NO_EMIT_PKG_CONFIG_FILE flag (#251)

Add NO_EMIT_PKG_CONFIG_FILE flag (#251)

--- BdeBuildSystem/BdeTargetUtils.cmake
+++ BdeBuildSystem/BdeTargetUtils.cmake
@@ -307,7 +307,7 @@
 function(bbs_setup_target_uor target)
     cmake_parse_arguments(PARSE_ARGV 1
                           ""
-                          "SKIP_TESTS NO_GEN_BDE_METADATA"
+                          "SKIP_TESTS NO_GEN_BDE_METADATA NO_EMIT_PKG_CONFIG_FILE"
                           "SOURCE_DIR"
                           "CUSTOM_PACKAGES")
     bbs_assert_no_unparsed_args("")
@@ -456,7 +456,9 @@
         endif()

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

         # Create an alias library with the pkgconfig name, if it is different from
         # the uor name and such a target doesn't exist yet.


Introduce global guard in ToolchainIdentification

--- CMake/ToolchainIdentification.cmake
+++ CMake/ToolchainIdentification.cmake
@@ -1,3 +1,5 @@
+include_guard(GLOBAL)
+
 set(TI_IS_MSVC FALSE)
 set(TI_IS_CLANG_CL FALSE)
 set(TI_IS_GCC FALSE)
@@ -13,20 +15,20 @@

 if(WIN32)
   if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    message("Toolchain identification: TI_IS_CLANG_CL")
+    message(STATUS "Toolchain identification: TI_IS_CLANG_CL")
     set(TI_IS_CLANG_CL TRUE)
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-    message("Toolchain identification: TI_IS_MSVC")
+    message(STATUS "Toolchain identification: TI_IS_MSVC")
     set(TI_IS_MSVC TRUE)
   else()
     message(FATAL_ERROR ${NOT_SUPPORTED_COMPILER_MESSAGE})
   endif()
 elseif(UNIX)
   if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-    message("Toolchain identification: TI_IS_GCC")
+    message(STATUS "Toolchain identification: TI_IS_GCC")
     set(TI_IS_GCC TRUE)
   elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-    message("Toolchain identification: TI_IS_CLANG")
+    message(STATUS "Toolchain identification: TI_IS_CLANG")
     set(TI_IS_CLANG TRUE)
   else()
     message(FATAL_ERROR ${NOT_SUPPORTED_COMPILER_MESSAGE})


[OGRE-84] Build device and simulator libraries to separate locations

--HG--
branch : v1-9

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -11,10 +11,10 @@

 # Default build output paths
 if (NOT OGRE_ARCHIVE_OUTPUT)
-  set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  set(OGRE_ARCHIVE_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
 endif ()
 if (NOT OGRE_LIBRARY_OUTPUT)
-  set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib)
+  set(OGRE_LIBRARY_OUTPUT ${OGRE_BINARY_DIR}/lib/$(PLATFORM_NAME))
 endif ()
 if (NOT OGRE_RUNTIME_OUTPUT)
   set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin)


iOS: Explicitly specify the release lib paths so that libraries are always installed to the correct places.  This fixes the problem of duplicate, single architecture libraries in SDK builds.

--HG--
branch : v1-7

--- CMake/Utils/OgreConfigTargets.cmake
+++ CMake/Utils/OgreConfigTargets.cmake
@@ -43,6 +43,10 @@
   set(OGRE_LIB_RELWDBG_PATH "")
   set(OGRE_LIB_MINSIZE_PATH "")
   set(OGRE_LIB_DEBUG_PATH "")
+  if(APPLE AND OGRE_BUILD_PLATFORM_IPHONE)
+    set(OGRE_RELEASE_PATH "/release")
+    set(OGRE_LIB_RELEASE_PATH "/release")
+  endif(APPLE AND OGRE_BUILD_PLATFORM_IPHONE)
   if (APPLE)
     set(OGRE_PLUGIN_PATH "/")
   else()


Use "pyd" extension for PythonQt module

Use "pyd" extension for PythonQt module

See http://docs.python.org/faq/windows.html#is-a-pyd-file-the-same-as-a-dll

--- CMake/ctkMacroBuildLibWrapper.cmake
+++ CMake/ctkMacroBuildLibWrapper.cmake
@@ -30,7 +30,7 @@
 #! On the other hand, when CTK is built statically, it creates a
 #! static library providing a initialization function that will allow to load
 #! both (1) and (2).
-
+
 #! \ingroup CMakeAPI
 MACRO(ctkMacroBuildLibWrapper)
   ctkMacroParseArguments(MY
@@ -120,6 +120,13 @@
   IF(MY_WRAPPER_LIBRARY_TYPE STREQUAL "MODULE")
     # Make sure that no prefix is set on the library
     set_target_properties(${lib_name}PythonQt PROPERTIES PREFIX "")
+    # Python extension modules on Windows must have the extension ".pyd"
+    # instead of ".dll" as of Python 2.5.  Older python versions do support
+    # this suffix.
+    # See http://docs.python.org/faq/windows.html#is-a-pyd-file-the-same-as-a-dll
+    IF(WIN32 AND NOT CYGWIN)
+      set_target_properties(${lib_name}PythonQt PROPERTIES SUFFIX ".pyd")
+    ENDIF()
   ENDIF()
   set_target_properties(${lib_name}PythonQt PROPERTIES
     RUNTIME_OUTPUT_DIRECTORY "${MY_RUNTIME_OUTPUT_DIRECTORY}"


Need c++11

Need c++11

--- CMakeModules/CompilerSettings.cmake
+++ CMakeModules/CompilerSettings.cmake
@@ -17,6 +17,7 @@
   ADD_DEFINITIONS(-fPIC)
 ENDIF()

+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

 # Set full rpath http://www.paraview.org/Wiki/CMake_RPATH_handling
 # (good to have and required with ROS)


Find debug version of glut32.lib

Find debug version of glut32.lib

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

--- CMakeModules/windows/FindGLUT.cmake
+++ CMakeModules/windows/FindGLUT.cmake
@@ -25,7 +25,7 @@
     PATHS
     $ENV{EXTERNLIBS}/glut/include
     ${GLUT_ROOT_PATH}/include )
-  FIND_LIBRARY( GLUT_LIBRARY_DEBUG NAMES glut32 glutD freeglutD
+  FIND_LIBRARY( GLUT_LIBRARY_DEBUG NAMES glut32D glutD freeglutD
     PATHS
     $ENV{EXTERNLIBS}/glut/lib
     ${OPENGL_LIBRARY_DIR}


Patch debian package script to deal with externals libraries. #2389

When calculating shared library dependencies, dpkg-shlibdeps doesn't
account for libraries not being in their final installation location and
thus not being found via rpath. So we set LD_LIBRARY_PATH to
<package dir>/usr/lib/condor when calling dpkg-shlibdeps. We only do
this for non-proper builds.
We also re-add the --ignore-missing-info option, since the libraries
from our externals don't have explicit dependency info and we no longer
build on debian 4.0 (the reason we removed this option).

--- build/cmake/modules/CPackDeb.cmake
+++ build/cmake/modules/CPackDeb.cmake
@@ -121,9 +121,11 @@

 MESSAGE("Using patched version of CPackDeb.cmake-2.8.3 located in build/cmake")
-# --ignore-missing-info option is removed when calling dpkg-shlibdeps.
-# This option is not supported in Debian 4 and it is not used when we build
-# pacakge on machine with proper dependecy
+# For non-proper builds, Set LD_LIBRARY_PATH to usr/lib/condor under the
+# package assembly directory. Otherwise, dpkg-shlibdeps can't find the
+# libraries stored there by following an rpath of /usr/lib/condor.
+# If/when /usr/lib/condor ceases to be, this use of LD_LIBRARY_PATH
+# should be removed.

 IF(CMAKE_BINARY_DIR)
   MESSAGE(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
@@ -186,12 +188,18 @@
     # Execute dpkg-shlibdeps
     # --ignore-missing-info : allow dpkg-shlibdeps to run even if some libs do not belong to a package
     # -O : print to STDOUT
-    EXECUTE_PROCESS(COMMAND ${SHLIBDEPS_EXECUTABLE} -O ${CPACK_DEB_BINARY_FILES}
+    if ( NOT PROPER )
+      set( ENV{LD_LIBRARY_PATH} ${CPACK_TEMPORARY_DIRECTORY}/usr/lib/condor)
+    endif()
+    EXECUTE_PROCESS(COMMAND ${SHLIBDEPS_EXECUTABLE} --ignore-missing-info -O ${CPACK_DEB_BINARY_FILES}
       WORKING_DIRECTORY "${CPACK_TEMPORARY_DIRECTORY}"
       OUTPUT_VARIABLE SHLIBDEPS_OUTPUT
       RESULT_VARIABLE SHLIBDEPS_RESULT
       ERROR_VARIABLE SHLIBDEPS_ERROR
       OUTPUT_STRIP_TRAILING_WHITESPACE )
+    if ( NOT PROPER )
+      set( ENV{LD_LIBRARY_PATH} "")
+    endif()
     IF(CPACK_DEBIAN_PACKAGE_DEBUG)
       # dpkg-shlibdeps will throw some warnings if some input files are not binary
       MESSAGE( "CPackDeb Debug: dpkg-shlibdeps warnings \n${SHLIBDEPS_ERROR}")


fix: PATCH_VERSION variable suffix in overridden find_package [BASIS]

--- CMake/Basis/CommonTools.cmake
+++ CMake/Basis/CommonTools.cmake
@@ -59,7 +59,7 @@
   foreach (_FP_VAR IN ITEMS FOUND DIR USE_FILE
                             VERSION VERSION_STRING
                             VERSION_MAJOR VERSION_MINOR VERSION_SUBMINOR VERSION_PATCH
-                            MAJOR_VERSION MINOR_VERSION SUBMINOR_VERSION PATCH_VERSION_PATCH
+                            MAJOR_VERSION MINOR_VERSION SUBMINOR_VERSION PATCH_VERSION
                             INCLUDE_DIR INCLUDE_DIRS INCLUDE_PATH
                             LIBRARY_DIR LIBRARY_DIRS LIBRARY_PATH
                             EXECUTABLE COMPILER CONVERTER)


ENH: update DTI-Reg version

ENH: update DTI-Reg version

--- CMake/FindExternalTools.cmake
+++ CMake/FindExternalTools.cmake
@@ -491,7 +491,7 @@
   SVN_REPOSITORY "https://www.nitrc.org/svn/dtireg/trunk"
   SVN_USERNAME slicerbot
   SVN_PASSWORD slicer
-  SVN_REVISION -r 28 # 01/10/2013
+  SVN_REVISION -r 29 # 01/10/2013
   )
 set( CMAKE_ExtraARGS
   -DANTSTOOL:PATH=${ANTSPath}


changed MITK-Data hashcode

changed MITK-Data hashcode

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

 if(BUILD_TESTING)

-  set(revision_tag c06c1ea4)
+  set(revision_tag 14f20c59)
 #                  ^^^^^^^^  these are just to check correct length of hash part

   ExternalProject_Add(${proj}


building clang-format vs plugin requires nuget

issue https://github.com/smanders/externpro/issues/189#issuecomment-404631380
nuget https://github.com/smanders/externpro/issues/201

--- projects/llvm.cmake
+++ projects/llvm.cmake
@@ -29,7 +29,13 @@
   set(XP_DEPS llvm llvm_clang llvm_clangtoolsextra)
   set(XP_CONFIGURE -DLLVM_TARGETS_TO_BUILD:STRING=X86)
   if(MSVC AND MSVC_VERSION GREATER 1910 AND MSVC_VERSION LESS 1919) # VS 15.0 2017
-    list(APPEND XP_CONFIGURE -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON)
+    if(NOT (XP_DEFAULT OR XP_PRO_NUGET))
+      message(STATUS "llvm.cmake: requires nuget")
+      set(XP_PRO_NUGET ON CACHE BOOL "include nuget" FORCE)
+    endif()
+    build_nuget(nugetTgts) # sets NUGET_EXE
+    list(APPEND XP_DEPS ${nugetTgts})
+    list(APPEND XP_CONFIGURE -DBUILD_CLANG_FORMAT_VS_PLUGIN=ON -DNUGET_EXE:PATH=${NUGET_EXE})
     set(buildTgt clang_format_vsix)
   else()
     set(buildTgt clang-format)


XP_BUILD_YASM_COMPLETE_PKG cmake option

XP_BUILD_YASM_COMPLETE_PKG cmake option

OFF by default, which sets INSTALL_YASM_ONLY to ON/TRUE
complete package creates a use script and installs library, headers, other executables
added while doing work/verification for issue https://github.com/smanders/externpro/issues/274#issuecomment-654472915

--- projects/yasm.cmake
+++ projects/yasm.cmake
@@ -27,16 +27,18 @@
   if(NOT (XP_DEFAULT OR XP_PRO_YASM))
     return()
   endif()
-  set(XP_CONFIGURE
-    -DBUILD_SHARED_LIBS=OFF
-    -DINSTALL_YASM_ONLY=ON
-    )
-  if(DEFINED XP_YASM_COMPLETE_PKG)
+  set(XP_CONFIGURE -DBUILD_SHARED_LIBS=OFF)
+  option(XP_BUILD_YASM_COMPLETE_PKG "build complete package of yasm" OFF)
+  mark_as_advanced(XP_BUILD_YASM_COMPLETE_PKG)
+  if(XP_BUILD_YASM_COMPLETE_PKG)
+    list(APPEND XP_CONFIGURE -DINSTALL_YASM_ONLY:BOOL=OFF)
     xpGetArgValue(${PRO_YASM} ARG VER VALUE VER)
     list(APPEND XP_CONFIGURE -DYASM_VER=${VER})
     configure_file(${PRO_DIR}/use/usexp-yasm-config.cmake ${STAGE_DIR}/share/cmake/
       @ONLY NEWLINE_STYLE LF
       )
+  else()
+    list(APPEND XP_CONFIGURE -DINSTALL_YASM_ONLY:BOOL=ON)
   endif()
   set(BUILD_CONFIGS Release) # we only need a release executable
   xpCmakeBuild(yasm "" "${XP_CONFIGURE}" yasmTargets)


Fixed dynamic_reconfigure documentation targets. They were causing a rebuild at each make.

--HG--
extra : convert_revision : svn%3Aeb33c2ac-9c88-4c90-87e0-44a10359b0c3/stacks/driver_common/trunk%4027788

--- dynamic_reconfigure/cmake/cfgbuild.cmake
+++ dynamic_reconfigure/cmake/cfgbuild.cmake
@@ -50,14 +50,15 @@
     string(REPLACE ".cfg" "" _cfg_bare ${_cfg})

     set(_output_cpp ${PROJECT_SOURCE_DIR}/cfg/cpp/${PROJECT_NAME}/${_cfg_bare}Config.h)
-    set(_output_dox ${PROJECT_SOURCE_DIR}/dox/${_cfg_bare}Config.dox)
-    set(_output_usage ${PROJECT_SOURCE_DIR}/dox/${_cfg_bare}Config-usage.dox)
+    set(_output_dox ${PROJECT_SOURCE_DIR}/docs/${_cfg_bare}Config.dox)
+    set(_output_wikidoc ${PROJECT_SOURCE_DIR}/docs/${_cfg_bare}Config.wikidoc)
+    set(_output_usage ${PROJECT_SOURCE_DIR}/docs/${_cfg_bare}Config-usage.dox)
     set(_output_py ${PROJECT_SOURCE_DIR}/src/${PROJECT_NAME}/cfg/${_cfg_bare}Config.py)

     # Add the rule to build the .h the .cfg and the .msg
     # FIXME Horrible hack. Can't get CMAKE to add dependencies for anything
     # but the first output in add_custom_command.
-    add_custom_command(OUTPUT ${_output_cpp} ${_output_dox} ${_output_usage} ${_output_py}
+    add_custom_command(OUTPUT ${_output_cpp} ${_output_dox} ${_output_usage} ${_output_py} ${_output_wikidoc}
                        COMMAND ${gencfg_cpp_exe} ${_input}
                        DEPENDS ${_input} ${gencfg_cpp_exe} ${ROS_MANIFEST_LIST} ${gencfg_build_files} ${gencfg_extra_deps})
     list(APPEND _autogen ${_output_cpp} ${_output_msg} ${_output_getsrv} ${_output_setsrv}


Disable WIN32_REGISTRY for UNIX platforms

Unlike managed build scripts, FEATURE_WIN32_REGISTRY has been
enabled for UNIX-like systems in CMake native build scripts.

Fix #4682 part 3.

Signed-off-by: MyungJoo Ham <84146178f7c201fa3079bfc93fccba71d81dffe3@samsung.com>

--- clrdefinitions.cmake
+++ clrdefinitions.cmake
@@ -183,7 +183,9 @@
 if(WIN32)
     add_definitions(-DFEATURE_VERSIONING_LOG)
 endif(WIN32)
-add_definitions(-DFEATURE_WIN32_REGISTRY)
+if(NOT CLR_CMAKE_PLATFORM_UNIX)
+    add_definitions(-DFEATURE_WIN32_REGISTRY)
+endif(NOT CLR_CMAKE_PLATFORM_UNIX)
 add_definitions(-DFEATURE_WINDOWSPHONE)
 add_definitions(-DFEATURE_WINMD_RESILIENT)
 add_definitions(-D_SECURE_SCL=0)


Fix FindGLFW.cmake for GLFW 3.03 on OSX

Fix FindGLFW.cmake for GLFW 3.03 on OSX

- add missing corevideo dependency

fixes #237

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -103,6 +103,7 @@
                 /usr/local/lib
         )
         set(GLFW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
+        set(GLFW_corevideo_LIBRARY "-framework CoreVideo" CACHE STRING "CoreVideo framework for OSX")
         set(GLFW_iokit_LIBRARY "-framework IOKit" CACHE STRING "IOKit framework for OSX")
     else ()
         # (*)NIX
@@ -147,7 +148,11 @@
 if(GLFW_INCLUDE_DIR)

     if(GLFW_glfw_LIBRARY)
-        set( GLFW_LIBRARIES ${GLFW_glfw_LIBRARY} ${GLFW_x11_LIBRARY} ${GLFW_cocoa_LIBRARY} ${GLFW_iokit_LIBRARY} )
+        set( GLFW_LIBRARIES ${GLFW_glfw_LIBRARY}
+                            ${GLFW_x11_LIBRARY}
+                            ${GLFW_cocoa_LIBRARY}
+                            ${GLFW_iokit_LIBRARY}
+                            ${GLFW_corevideo_LIBRARY} )
         set( GLFW_FOUND "YES" )
         set (GLFW_LIBRARY ${GLFW_LIBRARIES})
         set (GLFW_INCLUDE_PATH ${GLFW_INCLUDE_DIR})


rm findhfdf5, which comes with cmake now

--- cmake/FindHDF5.cmake
+++ cmake/FindHDF5.cmake
@@ -1,341 +0,0 @@
-# - Find HDF5, a library for reading and writing self describing array data.
-#
-# This module invokes the HDF5 wrapper compiler that should be installed
-# alongside HDF5.  Depending upon the HDF5 Configuration, the wrapper compiler
-# is called either h5cc or h5pcc.  If this succeeds, the module will then call
-# the compiler with the -show argument to see what flags are used when compiling
-# an HDF5 client application.
-#
-# The module will optionally accept the COMPONENTS argument.  If no COMPONENTS
-# are specified, then the find module will default to finding only the HDF5 C
-# library.  If one or more COMPONENTS are specified, the module will attempt to
-# find the language bindings for the specified components.  Currently, the only
-# valid components are C and CXX.  The module does not yet support finding the
-# Fortran bindings.  If the COMPONENTS argument is not given, the module will
-# attempt to find only the C bindings.
-#
-# On UNIX systems, this module will read the variable HDF5_USE_STATIC_LIBRARIES
-# to determine whether or not to prefer a static link to a dynamic link for HDF5
-# and all of it's dependencies.  To use this feature, make sure that the
-# HDF5_USE_STATIC_LIBRARIES variable is set before the call to find_package.
-#
-# To provide the module with a hint about where to find your HDF5 installation,
-# you can set the CMAKE variable -OR- environment variable HDF5_ROOT.  The Find
-# module will then look in this path when searching for HDF5 executables, paths,
-# and libraries.
-#
-# In addition to finding the includes and libraries required to compile an HDF5
-# client application, this module also makes an effort to find tools that come
-# with the HDF5 distribution that may be useful for regression testing.
-#
-# This module will define the following variables:
-#  HDF5_INCLUDE_DIRS - Location of the hdf5 includes
-#  HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated)
-#  HDF5_DEFINITIONS - Required compiler definitions for HDF5
-#  HDF5_C_LIBRARIES - Required libraries for the HDF5 C bindings.
-#  HDF5_CXX_LIBRARIES - Required libraries for the HDF5 C++ bindings
-#  HDF5_LIBRARIES - Required libraries for all requested bindings
-#  HDF5_FOUND - true if HDF5 was found on the system
-#  HDF5_LIBRARY_DIRS - the full set of library directories
-#  HDF5_IS_PARALLEL - Whether or not HDF5 was found with parallel IO support
-#  HDF5_C_COMPILER_EXECUTABLE - the path to the HDF5 C wrapper compiler
-#  HDF5_CXX_COMPILER_EXECUTABLE - the path to the HDF5 C++ wrapper compiler
-#  HDF5_DIFF_EXECUTABLE - the path to the HDF5 dataset comparison tool
-
-#=============================================================================
-# Copyright 2009 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distributed this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
-
-include(SelectLibraryConfigurations)
-include(FindPackageHandleStandardArgs)
-
-# List of the valid HDF5 components
-set( HDF5_VALID_COMPONENTS
-    C
-    CXX
-)
-
-# try to find the HDF5 wrapper compilers
-find_program( HDF5_C_COMPILER_EXECUTABLE
-    NAMES h5cc h5pcc
-    HINTS "${HDF5_ROOT}" ENV HDF5_ROOT
-    ${DEPS_BIN_HINTS}
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 Wrapper compiler.  Used only to detect HDF5 compile flags." )
-mark_as_advanced( HDF5_C_COMPILER_EXECUTABLE )
-
-find_program( HDF5_CXX_COMPILER_EXECUTABLE
-    NAMES h5c++ h5pc++
-    HINTS "${HDF5_ROOT}" ENV HDF5_ROOT
-    ${DEPS_BIN_HINTS}
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 C++ Wrapper compiler.  Used only to detect HDF5 compile flags." )
-mark_as_advanced( HDF5_CXX_COMPILER_EXECUTABLE )
-
-find_program( HDF5_DIFF_EXECUTABLE
-    NAMES h5diff
-    HINTS "${HDF5_ROOT}" ENV HDF5_ROOT
-    ${DEPS_BIN_HINTS}
-    PATH_SUFFIXES bin Bin
-    DOC "HDF5 file differencing tool." )
-mark_as_advanced( HDF5_DIFF_EXECUTABLE )
-
-# Invoke the HDF5 wrapper compiler.  The compiler return value is stored to the
-# return_value argument, the text output is stored to the output variable.
-macro( _HDF5_invoke_compiler language output return_value )
-    if( HDF5_${language}_COMPILER_EXECUTABLE )
-        exec_program( ${HDF5_${language}_COMPILER_EXECUTABLE}
-            ARGS -show
-            OUTPUT_VARIABLE ${output}
-            RETURN_VALUE ${return_value}
-        )
-        if( ${${return_value}} EQUAL 0 )
-            # do nothing
-        else()
-            message( STATUS
-              "Unable to determine HDF5 ${language} flags from HDF5 wrapper." )
-        endif()
-    endif()
-endmacro()
-
-# Parse a compile line for definitions, includes, library paths, and libraries.
-macro( _HDF5_parse_compile_line
-    compile_line_var
-    include_paths
-    definitions
-    library_paths
-    libraries )
-
-    # Match the include paths
-    string( REGEX MATCHALL "-I([^\" ]+)" include_path_flags
-        "${${compile_line_var}}"
-    )
-    foreach( IPATH ${include_path_flags} )
-        string( REGEX REPLACE "^-I" "" IPATH ${IPATH} )
-        string( REGEX REPLACE "//" "/" IPATH ${IPATH} )
-        list( APPEND ${include_paths} ${IPATH} )
-    endforeach()
-
-    # Match the definitions
-    string( REGEX MATCHALL "-D[^ ]*" definition_flags "${${compile_line_var}}" )
-    foreach( DEF ${definition_flags} )
-        list( APPEND ${definitions} ${DEF} )
-    endforeach()
-
-    # Match the library paths
-    string( REGEX MATCHALL "-L([^\" ]+|\"[^\"]+\")" library_path_flags
-        "${${compile_line_var}}"
-    )
-
-    foreach( LPATH ${library_path_flags} )
-        string( REGEX REPLACE "^-L" "" LPATH ${LPATH} )
-        string( REGEX REPLACE "//" "/" LPATH ${LPATH} )
-        list( APPEND ${library_paths} ${LPATH} )
-    endforeach()
-
-    # now search for the library names specified in the compile line (match -l...)
-    # match only -l's preceded by a space or comma
-    # this is to exclude directory names like xxx-linux/
-    string( REGEX MATCHALL "[, ]-l([^\", ]+)" library_name_flags
-        "${${compile_line_var}}" )
-    # strip the -l from all of the library flags and add to the search list
-    foreach( LIB ${library_name_flags} )
-        string( REGEX REPLACE "^[, ]-l" "" LIB ${LIB} )
-        list( APPEND ${libraries} ${LIB} )
-    endforeach()
-endmacro()
-
-message("!!! HDF5_LIBRARIES ${HDF5_LIBRARIES}")
-message("!!! HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS}")
-
-
-if( HDF5_INCLUDE_DIRS AND HDF5_LIBRARIES )
-    # Do nothing: we already have HDF5_INCLUDE_PATH and HDF5_LIBRARIES in the
-    # cache, it would be a shame to override them
-else()
-    _HDF5_invoke_compiler( C HDF5_C_COMPILE_LINE HDF5_C_RETURN_VALUE )
-    _HDF5_invoke_compiler( CXX HDF5_CXX_COMPILE_LINE HDF5_CXX_RETURN_VALUE )
-
-    if( NOT HDF5_FIND_COMPONENTS )
-        set( HDF5_LANGUAGE_BINDINGS "C" )
-    else()
-        # add the extra specified components, ensuring that they are valid.
-        foreach( component ${HDF5_FIND_COMPONENTS} )
-            list( FIND HDF5_VALID_COMPONENTS ${component} component_location )
-            if( ${component_location} EQUAL -1 )
-                message( FATAL_ERROR
-                    "\"${component}\" is not a valid HDF5 component." )
-            else()
-                list( APPEND HDF5_LANGUAGE_BINDINGS ${component} )
-            endif()
-        endforeach()
-    endif()
-
-    # seed the initial lists of libraries to find with items we know we need
-    set( HDF5_C_LIBRARY_NAMES_INIT hdf5_hl hdf5 )
-    set( HDF5_CXX_LIBRARY_NAMES_INIT hdf5_cpp ${HDF5_C_LIBRARY_NAMES_INIT} )
-
-    foreach( LANGUAGE ${HDF5_LANGUAGE_BINDINGS} )
-        if( HDF5_${LANGUAGE}_COMPILE_LINE )
-            _HDF5_parse_compile_line( HDF5_${LANGUAGE}_COMPILE_LINE
-                HDF5_${LANGUAGE}_INCLUDE_FLAGS
-                HDF5_${LANGUAGE}_DEFINITIONS
-                HDF5_${LANGUAGE}_LIBRARY_DIRS
-                HDF5_${LANGUAGE}_LIBRARY_NAMES
-            )
-
-            # take a guess that the includes may be in the 'include' sibling directory
-            # of a library directory.
-            foreach( dir ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
-                list( APPEND HDF5_${LANGUAGE}_INCLUDE_FLAGS ${dir}/../include )
-            endforeach()
-        endif()
-
-        # set the definitions for the language bindings.
-        list( APPEND HDF5_DEFINITIONS ${HDF5_${LANGUAGE}_DEFINITIONS} )
-
-        # find the HDF5 include directories
-        find_path( HDF5_${LANGUAGE}_INCLUDE_DIR hdf5.h
-            HINTS
-	        "${HDF5_ROOT}"
-                ${HDF5_${LANGUAGE}_INCLUDE_FLAGS}
-                ENV
-                    HDF5_ROOT
-            ${DEPS_INCLUDE_HINTS}
-            PATHS
-                $ENV{HOME}/.local/include
-            PATH_SUFFIXES
-                include
-                Include
-        )
-        mark_as_advanced( HDF5_${LANGUAGE}_INCLUDE_DIR )
-        list( APPEND HDF5_INCLUDE_DIRS ${HDF5_${LANGUAGE}_INCLUDE_DIR} )
-
-        set( HDF5_${LANGUAGE}_LIBRARY_NAMES
-            ${HDF5_${LANGUAGE}_LIBRARY_NAMES_INIT}
-            ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
-
-        # find the HDF5 libraries
-        foreach( LIB ${HDF5_${LANGUAGE}_LIBRARY_NAMES} )
-            if( UNIX AND HDF5_USE_STATIC_LIBRARIES )
-                # According to bug 1643 on the CMake bug tracker, this is the
-                # preferred method for searching for a static library.
-                # See http://www.cmake.org/Bug/view.php?id=1643.  We search
-                # first for the full static library name, but fall back to a
-                # generic search on the name if the static search fails.
-                set( THIS_LIBRARY_SEARCH_DEBUG lib${LIB}d.a ${LIB}d )
-                set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} )
-            else()
-                set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d )
-                set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} )
-            endif()
-            find_library( HDF5_${LIB}_LIBRARY_DEBUG
-                NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
-                HINTS "${HDF5_ROOT}" ${HDF5_${LANGUAGE}_LIBRARY_DIRS}
-                ${DEPS_LIB_HINTS}
-                ENV HDF5_ROOT
-                PATH_SUFFIXES lib Lib )
-            find_library( HDF5_${LIB}_LIBRARY_RELEASE
-                NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
-                HINTS "${HDF5_ROOT}" ${HDF5_${LANGUAGE}_LIBRARY_DIRS}
-                ${DEPS_LIB_HINTS}
-                ENV HDF5_ROOT
-                PATH_SUFFIXES lib Lib )
-            select_library_configurations( HDF5_${LIB} )
-            # even though we adjusted the individual library names in
-            # select_library_configurations, we still need to distinguish
-            # between debug and release variants because HDF5_LIBRARIES will
-            # need to specify different lists for debug and optimized builds.
-            # We can't just use the HDF5_${LIB}_LIBRARY variable (which was set
-            # up by the selection macro above) because it may specify debug and
-            # optimized variants for a particular library, but a list of
-            # libraries is allowed to specify debug and optimized only once.
-            list( APPEND HDF5_${LANGUAGE}_LIBRARIES_DEBUG
-                ${HDF5_${LIB}_LIBRARY_DEBUG} )
-            list( APPEND HDF5_${LANGUAGE}_LIBRARIES_RELEASE
-                ${HDF5_${LIB}_LIBRARY_RELEASE} )
-        endforeach()
-        list( APPEND HDF5_LIBRARY_DIRS ${HDF5_${LANGUAGE}_LIBRARY_DIRS} )
-
-        # Append the libraries for this language binding to the list of all
-        # required libraries.
-        list( APPEND HDF5_LIBRARIES_DEBUG
-            ${HDF5_${LANGUAGE}_LIBRARIES_DEBUG} )
-        list( APPEND HDF5_LIBRARIES_RELEASE
-            ${HDF5_${LANGUAGE}_LIBRARIES_RELEASE} )
-    endforeach()
-
-    # We may have picked up some duplicates in various lists during the above
-    # process for the language bindings (both the C and C++ bindings depend on
-    # libz for example).  Remove the duplicates.
-    if( HDF5_INCLUDE_DIRS )
-        list( REMOVE_DUPLICATES HDF5_INCLUDE_DIRS )
-    endif()
-    if( HDF5_LIBRARIES_DEBUG )
-        list( REMOVE_DUPLICATES HDF5_LIBRARIES_DEBUG )
-    endif()
-    if( HDF5_LIBRARIES_RELEASE )
-        list( REMOVE_DUPLICATES HDF5_LIBRARIES_RELEASE )
-    endif()
-    if( HDF5_LIBRARY_DIRS )
-        list( REMOVE_DUPLICATES HDF5_LIBRARY_DIRS )
-    endif()
-
-    # Construct the complete list of HDF5 libraries with debug and optimized
-    # variants when the generator supports them.
-    if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE )
-        set( HDF5_LIBRARIES
-            debug ${HDF5_LIBRARIES_DEBUG}
-            optimized ${HDF5_LIBRARIES_RELEASE} )
-    else()
-        set( HDF5_LIBRARIES ${HDF5_LIBRARIES_RELEASE} )
-    endif()
-
-    # If the HDF5 include directory was found, open H5pubconf.h to determine if
-    # HDF5 was compiled with parallel IO support
-    set( HDF5_IS_PARALLEL FALSE )
-    foreach( _dir HDF5_INCLUDE_DIRS )
-        if( EXISTS "${_dir}/H5pubconf.h" )
-            file( STRINGS "${_dir}/H5pubconf.h"
-                HDF5_HAVE_PARALLEL_DEFINE
-                REGEX "HAVE_PARALLEL 1" )
-            if( HDF5_HAVE_PARALLEL_DEFINE )
-                set( HDF5_IS_PARALLEL TRUE )
-            endif()
-        endif()
-    endforeach()
-    set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
-        "HDF5 library compiled with parallel IO support" )
-    mark_as_advanced( HDF5_IS_PARALLEL )
-
-endif()
-
-find_package_handle_standard_args( HDF5 DEFAULT_MSG
-    HDF5_LIBRARIES
-    HDF5_INCLUDE_DIRS
-)
-
-mark_as_advanced(
-    HDF5_INCLUDE_DIRS
-    HDF5_LIBRARIES
-    HDF5_DEFINTIONS
-    HDF5_LIBRARY_DIRS
-    HDF5_C_COMPILER_EXECUTABLE
-    HDF5_CXX_COMPILER_EXECUTABLE )
-
-# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
-# HDF5_INCLUDE_DIRS
-set( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
-
-


Improve find_xxx() commands in FindZBar.cmake, make it less eye-bleeding

--- cmake/FindZBar.cmake
+++ cmake/FindZBar.cmake
@@ -22,29 +22,33 @@

 ELSE (ZBAR_INCLUDE_DIR AND ZBAR_LIBRARIES)

+  IF (WIN32)
+    FIND_PATH(ZBAR_LIBRARY_DIR
+              NAMES bin/libzbar-0.dll
+              HINTS "C:/Program Files" "C:/Program Files (x86)" "C:/"
+              PATH_SUFFIXES ZBar)

-  IF (WIN32)
-		FIND_PATH(ZBAR_LIBRARY_DIR
-							WIN32_DEBUG_POSTFIX d
-							NAMES "bin/libzbar-0.dll"
-              HINTS "C:/Programme/" "C:/Program Files" "C:/"
-							PATH_SUFFIXES ZBar
-              )
-		FIND_LIBRARY(ZBAR_LIBRARIES NAMES libzbar-0.lib HINTS ${ZBAR_LIBRARY_DIR}/lib)
-		FIND_PATH(ZBAR_INCLUDE_DIR NAMES zbar.h HINTS ${ZBAR_LIBRARY_DIR} PATH_SUFFIXES include/zbar)
-	ELSE(WIN32)
+    FIND_LIBRARY(ZBAR_LIBRARIES
+                 NAMES libzbar-0.lib
+                 HINTS ${ZBAR_LIBRARY_DIR}/lib)
+
+    FIND_PATH(ZBAR_INCLUDE_DIR
+              NAMES zbar.h
+              HINTS ${ZBAR_LIBRARY_DIR}
+              PATH_SUFFIXES include)
+  ELSE(WIN32)
     FIND_PACKAGE(PkgConfig)
-#     pkg_check_modules(PC_QCA2 QUIET qca2)
+    #pkg_check_modules(PC_QCA2 QUIET qca2)
     pkg_check_modules(PC_ZBAR zbar)
     SET(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER})
-		FIND_LIBRARY(ZBAR_LIBRARIES
-                  WIN32_DEBUG_POSTFIX d
-                  NAMES zbar
-                  HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS}
-                  )
-		FIND_PATH(ZBAR_INCLUDE_DIR Decoder.h
-            	HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS}
-            	PATH_SUFFIXES zbar)
+
+    FIND_LIBRARY(ZBAR_LIBRARIES
+                 NAMES zbar
+                 HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS})
+
+    FIND_PATH(ZBAR_INCLUDE_DIR Decoder.h
+              HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS}
+              PATH_SUFFIXES zbar)
   ENDIF (WIN32)

   INCLUDE(FindPackageHandleStandardArgs)


Forgot to check ENABLE_WARNINGS_SETTINGS

--- cmake/Warnings.cmake
+++ cmake/Warnings.cmake
@@ -3,6 +3,9 @@
 option(ENABLE_WARNINGS_SETTINGS "Allow target_set_warnings to add flags and defines. Set this to OFF if you want to provide your own warning parameters." ON)

 function(target_set_warnings)
+	if(NOT ENABLE_WARNINGS_SETTINGS)
+		return()
+	endif()
 	if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
 	  set(WMSVC TRUE)
 	elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")


require Fortran 2008 when using gfortran

--- cmake/compiler.cmake
+++ cmake/compiler.cmake
@@ -1,5 +1,5 @@
 set(CMAKE_BUILD_TYPE_INIT "Release")

 if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
-  set(CMAKE_Fortran_FLAGS_INIT "-Wall -Wextra -Wconversion")
+  set(CMAKE_Fortran_FLAGS_INIT "-Wall -Wextra -Wconversion -std=f2008 -pedantic")
 endif()


cmake: fix gif lib detection when cross compiling

GIF find_package only locates the header and library, it doesn't fail
compile tests when detecting the version, but falls back to 3 (as of at
least cmake 3.7.2). Make sure the library links to avoid incorrect
detection when cross compiling.

Change-Id: I0224180bbdf800ab261a9333236730b23c006e69

--- cmake/config.h.cmake
+++ cmake/config.h.cmake
@@ -75,13 +75,34 @@
 endforeach()

 # GIF detection, gifdec isn't part of the imageio lib.
+include(CMakePushCheckState)
 set(WEBP_DEP_GIF_LIBRARIES)
 set(WEBP_DEP_GIF_INCLUDE_DIRS)
 find_package(GIF)
 set(WEBP_HAVE_GIF ${GIF_FOUND})
 if(GIF_FOUND)
-  list(APPEND WEBP_DEP_GIF_LIBRARIES ${GIF_LIBRARIES})
-  list(APPEND WEBP_DEP_GIF_INCLUDE_DIRS ${GIF_INCLUDE_DIR})
+  # GIF find_package only locates the header and library, it doesn't fail
+  # compile tests when detecting the version, but falls back to 3 (as of at
+  # least cmake 3.7.2). Make sure the library links to avoid incorrect
+  # detection when cross compiling.
+  cmake_push_check_state()
+  set(CMAKE_REQUIRED_LIBRARIES ${GIF_LIBRARIES})
+  set(CMAKE_REQUIRED_INCLUDES ${GIF_INCLUDE_DIR})
+  check_c_source_compiles("
+      #include <gif_lib.h>
+      int main(void) {
+        (void)DGifOpenFileHandle;
+        return 0;
+      }
+      " GIF_COMPILES
+  )
+  cmake_pop_check_state()
+  if(GIF_COMPILES)
+    list(APPEND WEBP_DEP_GIF_LIBRARIES ${GIF_LIBRARIES})
+    list(APPEND WEBP_DEP_GIF_INCLUDE_DIRS ${GIF_INCLUDE_DIR})
+  else()
+    unset(GIF_FOUND)
+  endif()
 endif()

 ## Check for specific headers.


cmake: add debugserver target for nsim

cmake: add debugserver target for nsim

add debugserver target to run  "make debugserver" for nsim

Signed-off-by: Wayne Ren <d5c6d7c4aa45e53f819f17870783d153a32ba7d0@synopsys.com>

--- cmake/emu/nsim.cmake
+++ cmake/emu/nsim.cmake
@@ -19,3 +19,14 @@
   WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
   USES_TERMINAL
   )
+
+add_custom_target(debugserver
+  COMMAND
+  ${NSIM}
+  -propsfile
+  ${BOARD_DIR}/support/${NSIM_PROPS}
+  -gdb -port=3333
+  DEPENDS ${logical_target_for_zephyr_elf}
+  WORKING_DIRECTORY ${APPLICATION_BINARY_DIR}
+  USES_TERMINAL
+  )


platform.cmake: Use default installation path for OSX SDK

--- cmake/platform.cmake
+++ cmake/platform.cmake
@@ -15,13 +15,27 @@

   # Setup the SDK selection for backwards compatibility
   set ( SDKVER "10.7" )
-  set ( DEVROOT "/Applications/Developer/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer" )
+
+  set ( DEVROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer" )
   set ( SDKROOT "${DEVROOT}/SDKs/MacOSX${SDKVER}.sdk" )

   if( EXISTS ${SDKROOT} )
     set( CMAKE_OSX_SYSROOT "${SDKROOT}" )
     set( CMAKE_OSX_DEPLOYMENT_TARGET "${SDKVER}" )
     set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=${SDKVER}" )
+
+    # This resolves the error in UnixFile.cpp I get when trying to compile with
+    # Xcode generated project files -- it complains about not being able to find
+    # the header file <MacTypes.h> in one of the system frameworks (CoreServices
+    # or Carbon, I believe).
+    #
+    # This is due to the fact that it is referencing the MacOSX v10.9 SDK, when
+    # it should be using v10.7 header files, like it appears to be for
+    # everything else. This appears to have been working before, perhaps
+    # my recent upgrade to CMake v3.0 had changed something related to all this?
+    set( CMAKE_SYSTEM_FRAMEWORK_PATH "${SDKROOT}/System/Library/Frameworks" )
+    message( STATUS "Using SDK: ${SDKROOT}" )
+
   else( NOT EXISTS ${SDKROOT} ) # Mac OS X v10.7 SDK not found
     message ( WARNING "WARNING: Mac OS X ${SDKVER} SDK path not found: ${SDKROOT}" )
   endif( EXISTS ${SDKROOT} )


- Fix oopsie in config when fixing

- Fix oopsie in config when fixing

--- cmake/Modules/BuildFunctions.cmake
+++ cmake/Modules/BuildFunctions.cmake
@@ -266,7 +266,7 @@
             )

         install(
-            DIRECTORIES
+            DIRECTORY
             ${OUT_DIR}

             DESTINATION


Updated for the 5.9.9 release.

Updated for the 5.9.9 release.

svn path=/trunk/; revision=11955

--- cmake/modules/plplot_version.cmake
+++ cmake/modules/plplot_version.cmake
@@ -1,10 +1,10 @@
 # For now, must set this by hand before each release.  This value affects
 # at least the documentation build and perhaps other parts of the release.
-set(RELEASE_DATE "2011-08-01")
+set(RELEASE_DATE "2011-10-12")

 # Version data that need review and possible modification for each release.

-set(VERSION 5.9.8)
+set(VERSION 5.9.9)

 # CPack version numbers for release tarball name.
 set(CPACK_PACKAGE_VERSION_MAJOR 5)


another way to try FAVOR_BSD

another way to try FAVOR_BSD

--- cmake_modules/CompilerConfig.cmake
+++ cmake_modules/CompilerConfig.cmake
@@ -9,6 +9,10 @@
 set(EXTRA_CXX_FLAGS "-Werror -Wall -Wpedantic -Wextra")
 set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -flto -O3 -DRELEASE -DNDEBUG")
 #set(CMAKE_CXX_FLAGS_RELEASE "-Ofast -ggdb -flto -fno-omit-frame-pointer -O3 -DRELEASE -DNDEBUG")
+
+add_definitions("-D__FAVOR_BSD")
+
+#set(EXTRA_CXX_FLAGS ${EXTRA_CXX_FLAGS} "-D__FAVOR_BSD") #Not working correctly

 if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
     message(STATUS "*** GCC>7 Compiler is too awesome. The following warnings are disabled:")
@@ -28,7 +32,6 @@
 elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     message(STATUS "Detected Linux")
     find_library(DL_LIB dl REQUIRED)
-    set(EXTRA_CXX_FLAGS ${EXTRA_CXX_FLAGS} "-D__FAVOR_BSD") #Not working correctly
 else ()
     message(FATAL_ERROR "Unknown system")
 endif ()


Use execute_process instead of add_custom_command.

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

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

--- build-aux/cmake/modules/Makeinfo.cmake
+++ build-aux/cmake/modules/Makeinfo.cmake
@@ -57,16 +57,26 @@
     set(opts ${opts} -I ${i} )
   endforeach(i)
   # Add command
-  add_custom_command(
-    OUTPUT ${output}
-    COMMAND ${MAKEINFO_EXECUTABLE}
-    ARGS ${opts} ${input} -o ${output}
+  # FIXME: We do not use add_custom_command because CPack.cmake needs the
+  # output file at configuration time.
+  # (see http://public.kitware.com/Bug/view.php?id=6674)
+#   add_custom_command(
+#     OUTPUT ${output}
+#     COMMAND ${MAKEINFO_EXECUTABLE}
+#     ARGS ${opts} ${input} -o ${output}
+#     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+#     DEPENDS ${input} ${MAKEINFO_EXECUTABLE}
+#     COMMENT "${CMAKE_COMMAND} -E cmake_echo_color "
+#     "--switch=${CMAKE_MAKEFILE_COLOR} --cyan "
+#     "Building '${output}'"
+#     VERBATIM
+#     )
+  execute_process(
+    COMMAND ${MAKEINFO_EXECUTABLE} ${opts} ${input} -o ${output}
     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-    DEPENDS ${input} ${MAKEINFO_EXECUTABLE}
-    COMMENT "${CMAKE_COMMAND} -E cmake_echo_color "
-    "--switch=${CMAKE_MAKEFILE_COLOR} --cyan "
-    "Building '${output}'"
-    VERBATIM
+    TIMEOUT 30
+    RESULT_VARIABLE ret
+    ERROR_VARIABLE err
     )
   if(ret)
     message(SEND_ERROR