If libtool creates a lib64 directory for fftw libraries instead of lib, make symbolic link to lib.

--- itk/CMake/itkExternal_FFTW.cmake
+++ itk/CMake/itkExternal_FFTW.cmake
@@ -102,6 +102,15 @@
     set(FFTW_LIBDIR ${ITK_BINARY_DIR}/fftw/lib)
     link_directories(${FFTW_LIBDIR})
     include_directories(${FFTW_INCLUDE_PATH})
+    if(UNIX AND NOT APPLE)
+      if(CMAKE_SIZEOF_VOID_P MATCHES 8)
+        if(EXISTS ${ITK_BINARY_DIR}/fftw/lib64)
+          add_custom_command(TARGET fftwd
+            POST_BUILD
+            COMMAND ln -sf ${ITK_BINARY_DIR}/fftw/lib64 ${ITK_BINARY_DIR}/fftw/lib)
+        endif()
+      endif()
+    endif()
     #
     # copy libraries into install tree
     install(CODE


no longer exporting ICC specific symbols caused by using -static-intel

--- common/cmake/icc.cmake
+++ common/cmake/icc.cmake
@@ -23,11 +23,15 @@
 SET(FLAGS_AVX2   "-xCORE-AVX2")
 SET(FLAGS_AVX512KNL "-xMIC-AVX512")

-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden -no-ansi-alias -static-intel -fasm-blocks")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden -no-ansi-alias -fasm-blocks")

 SET(CMAKE_CXX_FLAGS_DEBUG          "-DDEBUG  -DTBB_USE_DEBUG -g -O0")
 SET(CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG                    -O3 -restrict -no-inline-max-total-size -inline-factor=200")
 SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG  -DTBB_USE_DEBUG -g -O3 -restrict -no-inline-max-total-size -inline-factor=200")
+
+# enable -static-intel and avoid to export ICC specific symbols from Embree
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-intel")
+SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--exclude-libs=ALL)

 #SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g -debug inline-debug-info")
 #SET(CMAKE_EXE_LINKER_FLAGS "-g")


Remove Boost Include dirs from environment.

--- salome_adm/cmake_files/FindSalomeBoost.cmake
+++ salome_adm/cmake_files/FindSalomeBoost.cmake
@@ -48,5 +48,4 @@
 IF(Boost_FOUND OR BOOST_FOUND)
   SALOME_ACCUMULATE_HEADERS(Boost_INCLUDE_DIRS)
   SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${BOOST_ROOT_DIR}/lib)
-  SALOME_ACCUMULATE_ENVIRONMENT(PATH ${BOOST_ROOT_DIR}/include)
 ENDIF()


not quite submission score

not quite submission score

Change-Id: Ia43de43d20ff61f9ca5fe4c2603b5e6351ffd4c3

--- VAD_target_properties.cmake
+++ VAD_target_properties.cmake
@@ -161,7 +161,7 @@
   STATIC_LIBRARY_FLAGS_RELEASE
   STATIC_LIBRARY_FLAGS
   SUFFIX
-  TYPE
+#  TYPE also readonly!
   VERSION
   VISIBILITY_INLINES_HIDDEN
   VS_DOTNET_REFERENCES


Disable flaky model_analyzer_test on windows.

PiperOrigin-RevId: 180599588

--- tensorflow/contrib/cmake/tf_tests.cmake
+++ tensorflow/contrib/cmake/tf_tests.cmake
@@ -190,6 +190,7 @@
     "${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/profiler/model_analyzer_test.py"
     # Fails because uses data dependencies with bazel
     "${tensorflow_source_dir}/tensorflow/python/saved_model/saved_model_test.py"
     # requires scipy


Bump TubeTK to revert scale change

Bump TubeTK to revert scale change

--- 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 "e102c5134a4efbd7cf41069b454b103084f49089"
+    GIT_TAG "aade15d7e2663b2e4f2c9ceb837de1d8d28eab69"
     CMAKE_CACHE_ARGS
       -DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
       -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}


Try to fix C++11 error with GCC4.6 Error was "yield is not a member of std::this_thread"

--- SofaKernel/cmake/CompilerOptions.cmake
+++ SofaKernel/cmake/CompilerOptions.cmake
@@ -81,6 +81,14 @@
 set(CMAKE_CXX_STANDARD 11)
 set(CMAKE_CXX_STANDARD_REQUIRED ON)

+# An important C++11 feature may be not enabled due to
+# the compiler being built without the --enable-libstdcxx-time option.
+if(CMAKE_COMPILER_IS_GNUCXX)
+    if(CMAKE_CXX_COMPILER_VERSION VERSION_LOWER 4.8)
+        set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -D_GLIBCXX_USE_SCHED_YIELD")
+    endif()
+endif()
+
 # hack for clang on old macosx (version < 10.9, such as the dashboard servers)
 # that is using, by default at that time, a libstdc++ that did not fully implement c++11
 if(APPLE AND ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND CMAKE_SYSTEM_VERSION VERSION_LESS "10.9" AND ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" )


Experimental WebAssembly cmake option for emscripten

--- cmake-toolchains/emscripten.toolchain.cmake
+++ cmake-toolchains/emscripten.toolchain.cmake
@@ -39,6 +39,7 @@
 # tweakable options
 option(FIPS_EMSCRIPTEN_USE_FS "emscripten: enable FS module" OFF)
 option(FIPS_EMSCRIPTEN_USE_DFE "emscripten: enable Duplicate Function Elimination" OFF)
+option(FIPS_EMSCRIPTEN_USE_WASM "emscripten: enable WebAssembly (experimental)" OFF)
 set(FIPS_EMSCRIPTEN_TOTAL_MEMORY 134217728 CACHE STRING "emscripten: total heap size in bytes")
 set(FIPS_EMSCRIPTEN_LTO_LEVEL 1 CACHE STRING "emscripten: Link-time-optimization level (0..3)")
 set(FIPS_EMSCRIPTEN_OUTLINING_LIMIT 20000 CACHE STRING "emscripten: outlining limit")
@@ -105,10 +106,18 @@
     set(FIPS_EMSC_RTTI_FLAGS "-fno-rtti")
 endif()

+# WebAssembly on/off?
+if (FIPS_EMSCRIPTEN_USE_WASM)
+    set(EMSCRIPTEN_WASM_FLAGS "-s BINARYEN=1 -s 'BINARYEN_METHOD=\"native-wasm\"' -s 'BINARYEN_SCRIPTS=\"spidermonkify.py\"' -s GLOBAL_BASE=1000 -s ALIASING_FUNCTION_POINTERS=0")
+else()
+    set(EMSCRIPTEN_WASM_FLAGS "")
+endif()
+
 message("FIPS_EMSCRIPTEN_TOTAL_MEMORY: ${FIPS_EMSCRIPTEN_TOTAL_MEMORY}")
 message("FIPS_EMSCRIPTEN_LTO_LEVEL: ${FIPS_EMSCRIPTEN_LTO_LEVEL}")
 message("FIPS_EMSCRIPTEN_OUTLINING_LIMIT: ${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
 message("FIPS_EMSCRIPTEN_MEM_INIT_METHOD: ${FIPS_EMSCRIPTEN_MEM_INIT_METHOD}")
+message("FIPS_EMSCRIPTEN_USE_WASM: ${FIPS_EMSCRIPTEN_USE_WASM}")
 message("EMSCRIPTEN_TOTAL_MEMORY_WORKER: ${EMSCRIPTEN_TOTAL_MEMORY_WORKER}")
 message("EMSCRIPTEN_USE_CLOSURE: ${EMSCRIPTEN_USE_CLOSURE}")
 message("EMSCRIPTEN_ASSERTIONS: ${EMSCRIPTEN_ASSERTIONS}")
@@ -208,7 +217,7 @@
 set(CMAKE_C_FLAGS_PROFILING "${EMSCRIPTEN_OPT} --profiling")

 # linker flags
-set(CMAKE_EXE_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file ${EMSCRIPTEN_MEMORY_INIT_FLAG} -s MEM_INIT_METHOD=${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP}")
+set(CMAKE_EXE_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file ${EMSCRIPTEN_MEMORY_INIT_FLAG} -s MEM_INIT_METHOD=${FIPS_EMSCRIPTEN_MEM_INIT_METHOD} -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY} -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} ${EMSCRIPTEN_WASM_FLAGS}")
 set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE}")
 set(CMAKE_EXE_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")
@@ -217,7 +226,7 @@
 set(CMAKE_STATIC_LINKER_FLAGS "${EMSCRIPTEN_CONFIG_OPTION}")

 # dynamic lib linker flags
-set(CMAKE_SHARED_LINKER_FLAGS "-shared ${EMSCRIPTEN_CONFIG_OPTIONS} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file 0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP}")
+set(CMAKE_SHARED_LINKER_FLAGS "-shared ${EMSCRIPTEN_CONFIG_OPTIONS} ${EMSCRIPTEN_CACHE_OPTION} ${EMSCRIPTEN_TRACING_OPTION} --memory-init-file 0 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s TOTAL_MEMORY=${FIPS_EMSCRIPTEN_TOTAL_MEMORY_WORKER} -s BUILD_AS_WORKER=1 -s EXPORTED_FUNCTIONS=[\\\"_dowork\\\"] -s DISABLE_EXCEPTION_CATCHING=${EMSCRIPTEN_DISABLE_EXCEPTION_CATCHING} -s NO_FILESYSTEM=${EMSCRIPTEN_NO_FILESYSTEM} -s ELIMINATE_DUPLICATE_FUNCTIONS=${EMSCRIPTEN_DFE} -s ELIMINATE_DUPLICATE_FUNCTIONS_DUMP_EQUIVALENT_FUNCTIONS=${EMSCRIPTEN_DFE_DUMP} ${EMSCRIPTEN_WASM_FLAGS}")
 set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT} --closure ${EMSCRIPTEN_USE_CLOSURE}")
 set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${EMSCRIPTEN_OPT} -g -s ASM_JS=1 -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} --closure 0")
 set(CMAKE_SHARED_LINKER_FLAGS_PROFILING "--profiling ${EMSCRIPTEN_OPT} --llvm-lto ${FIPS_EMSCRIPTEN_LTO_LEVEL} -s VERBOSE=${EMSCRIPTEN_BUILD_VERBOSE} -s ASM_JS=1 -s ASSERTIONS=${EMSCRIPTEN_ASSERTIONS} -s OUTLINING_LIMIT=${FIPS_EMSCRIPTEN_OUTLINING_LIMIT}")


Get focal length from calibration intrinsics

--- cmake/Depthai/DepthaiDeviceSideConfig.cmake
+++ cmake/Depthai/DepthaiDeviceSideConfig.cmake
@@ -2,7 +2,7 @@
 set(DEPTHAI_DEVICE_SIDE_MATURITY "snapshot")

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "9349b07517306b353cfbfeeb1be2c9746f9eda8e")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "a367a99082def6e82292ea1b18c3c5e7f730d302")

 # "version if applicable"
 set(DEPTHAI_DEVICE_SIDE_VERSION "")


[cmake] Fix gtest options for gcc9 and old CMake

Using target_compile_options to set INTERFACE items on IMPORTED targets
is only supported in cmake 3.11 and up (see similar PR #5396).


Require Vdt 0.4 or later, needed for header vdt/tanh.h used by TMVA

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -1244,7 +1244,7 @@
 if(vdt OR builtin_vdt)
   if(NOT builtin_vdt)
     message(STATUS "Looking for VDT")
-    find_package(Vdt)
+    find_package(Vdt 0.4)
     if(NOT VDT_FOUND)
       if(fail-on-missing)
         message(FATAL_ERROR "VDT not found. Ensure that the installation of VDT is in the CMAKE_PREFIX_PATH")


Fail to configure if fail-on-missing=ON and xxHash is not found

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -221,10 +221,14 @@
 #---Check for xxHash-----------------------------------------------------------------
 if(NOT builtin_xxhash)
   message(STATUS "Looking for xxHash")
-  find_package(xxHash)
-  if(NOT xxHash_FOUND)
-    message(STATUS "xxHash not found. Switching on builtin_xxhash option")
-    set(builtin_xxhash ON CACHE BOOL "Enabled because xxHash not found (${builtin_xxhash_description})" FORCE)
+  if(fail-on-missing)
+    find_package(xxHash REQUIRED)
+  else()
+    find_package(xxHash)
+    if(NOT xxHash_FOUND)
+      message(STATUS "xxHash not found. Switching on builtin_xxhash option")
+      set(builtin_xxhash ON CACHE BOOL "Enabled because xxHash not found (${builtin_xxhash_description})" FORCE)
+    endif()
   endif()
 endif()


disabling libcmaes surrogates as unused in ROOT and for faster build of the library

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -496,7 +496,7 @@
       PREFIX cma
       INSTALL_DIR ${CMAKE_BINARY_DIR}
       URL https://github.com/beniz/libcmaes/archive/master.tar.gz
-      CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=<INSTALL_DIR> --with-eigen3-include=${CMAKE_BINARY_DIR}/include/eigen3 --enable-onlylib
+      CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=<INSTALL_DIR> --with-eigen3-include=${CMAKE_BINARY_DIR}/include/eigen3 --enable-onlylib --disable-surrog
       BUILD_IN_SOURCE 1
       )
     set(LIBCMAES_INCLUDE_DIR ${CMAKE_BINARY_DIR}/include/libcmaes ${CMAKE_BINARY_DIR}/include/eigen3)


Add component display names

Add component display names

--- cmake/OpenCVPackaging.cmake
+++ cmake/OpenCVPackaging.cmake
@@ -61,6 +61,15 @@
 set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
 set(CPACK_DEBIAN_PACKAGE_SECTION "libs")
 set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org")
+
+#display names
+set(CPACK_COMPONENT_DEV_DISPLAY_NAME     "Development files")
+set(CPACK_COMPONENT_DOCS_DISPLAY_NAME    "Documentation")
+set(CPACK_COMPONENT_JAVA_DISPLAY_NAME    "Java bindings")
+set(CPACK_COMPONENT_LIBS_DISPLAY_NAME    "Libraries and data")
+set(CPACK_COMPONENT_PYTHON_DISPLAY_NAME  "Python bindings")
+set(CPACK_COMPONENT_SAMPLES_DISPLAY_NAME "Samples")
+set(CPACK_COMPONENT_TESTS_DISPLAY_NAME   "Tests")

 #depencencies
 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE)


Fixed Boost_NO_BOOST_CMAKE option location.

--- cmake/ThirdPartyBoost.cmake
+++ cmake/ThirdPartyBoost.cmake
@@ -10,16 +10,21 @@
 MESSAGE(STATUS "Searching for Boost:")
 SET(NEEDED_BOOST_LIBS thread iostreams date_time filesystem system
     program_options regex)
+SET(Boost_DEBUG 0)
+SET(Boost_NO_BOOST_CMAKE ON)
 IF( BOOST_ROOT )
+    SET(Boost_NO_SYSTEM_PATHS ON)
     FIND_PACKAGE( Boost COMPONENTS ${NEEDED_BOOST_LIBS})
 ELSE ()
     SET(TEST_ENV1 $ENV{BOOST_HOME})
     SET(TEST_ENV2 $ENV{BOOST_DIR})
     IF (DEFINED TEST_ENV1)
         SET(BOOST_ROOT $ENV{BOOST_HOME})
+        SET(Boost_NO_SYSTEM_PATHS ON)
         FIND_PACKAGE( Boost QUIET COMPONENTS ${NEEDED_BOOST_LIBS} )
     ELSEIF (DEFINED TEST_ENV2)
         SET(BOOST_ROOT $ENV{BOOST_DIR})
+        SET(Boost_NO_SYSTEM_PATHS ON)
         FIND_PACKAGE( Boost QUIET COMPONENTS ${NEEDED_BOOST_LIBS} )
     ELSE ()
         SET(BOOST_ROOT ${TPDIST})
@@ -186,8 +191,6 @@
     MESSAGE(STATUS "Build boost libs: ${NEEDED_BOOST_LIBS_STRING}")
 ELSE (THIRDPARTY_BUILD_BOOST)
     ADD_CUSTOM_TARGET(boost ALL)
-    SET(Boost_DEBUG 0)
-    SET(Boost_NO_BOOST_CMAKE ON)
     IF (BOOST_THREAD_LIBRARY)
         MARK_AS_ADVANCED(BOOST_THREAD_LIBRARY)
     ENDIF (BOOST_THREAD_LIBRARY)


build: fix git describe call on older Git versions

Older Git versions still do not support the -C argument for specifying
the working directory. Switch to using cmake WORKING_DIRECTORY instead.

This fixes #7287 again after commit 5e7e1cb.

Signed-off-by: Henrik Brix Andersen <a076b11c2cc63ccdc903dbe182e1eecc3cbbc094@brixandersen.dk>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -251,7 +251,8 @@

 find_package(Git QUIET)
 if(GIT_FOUND)
-  execute_process(COMMAND ${GIT_EXECUTABLE} -C ${ZEPHYR_BASE} describe
+  execute_process(COMMAND ${GIT_EXECUTABLE} describe
+    WORKING_DIRECTORY ${ZEPHYR_BASE}
     OUTPUT_VARIABLE BUILD_VERSION
     OUTPUT_STRIP_TRAILING_WHITESPACE)
 endif()


cmake: don't mess with git submodules everywhere

It's enough to have the check_submodules.sh script. The rest needs to
go.

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -138,15 +138,11 @@
 	string(REPLACE "/" "_" NAME ${PATH})
 	add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-		COMMAND git submodule update --init --recursive ${PATH}
 		COMMAND touch ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
 		DEPENDS ${CMAKE_SOURCE_DIR}/.gitmodules
 		)
 	add_custom_target(${TARGET}
 		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-# This is NOT a good approach as it overwrites checked out branches
-# behind the back of a developer
-		#COMMAND git submodule update --recursive ${PATH}
 		DEPENDS ${CMAKE_BINARY_DIR}/git_init_${NAME}.stamp
 		)
 endfunction()


updated compiler options

updated compiler options

--- cmake/compilerOptions.cmake
+++ cmake/compilerOptions.cmake
@@ -19,10 +19,11 @@

 # === GNU C++ compiler.
 if (CMAKE_COMPILER_IS_GNUCC) # || CMAKE_COMPILER_IS_GNUCXX ?!
-    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fPIC -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT")
-    set(CMAKE_C_FLAGS_RELEASE "-O3 -fPIC -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT")
+    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT")
+    set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG -DQT_NO_DEBUG -DQT_NO_DEBUG_OUTPUT")
 #    add_definitions(-Wall -Wextra -pedantic -std=c++0x)
-    list(APPEND CMAKE_C_FLAGS "-std=c99")
+    list(APPEND CMAKE_C_FLAGS "-std=c99 -fPIC")
+    list(APPEND CMAKE_CXX_FLAGS "-fPIC")
     add_definitions(-Wall -Wextra)
     add_definitions(-Wcast-align)
     add_definitions(-Wcast-qual)


Added glm to configs/default.cmake

Added glm to configs/default.cmake

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -106,6 +106,7 @@
 hunter_config(geos VERSION 3.4.2)
 hunter_config(glog VERSION 0.3.4-p1)
 hunter_config(glfw VERSION 3.2-p0)
+hunter_config(glm VERSION 0.9.7.6)
 hunter_config(glproto VERSION 1.4.17)
 hunter_config(half VERSION 1.1.0-p0)
 hunter_config(hdf5 VERSION 1.8.15-p1)


Empty double quota `""` is passed to `find_package(Thread)`, causing a test command `gcc ... "" ...` failed while trying to compile a source file with empty name. (#1508)

```
[user@******** /]# gcc ""
gcc: error: : No such file or directory
gcc: fatal error: no input files
compilation terminated.
```

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -62,9 +62,9 @@
   set (MKLDNN_CMAKE_EXTRA_ARGS)
   if(NOT onnxruntime_BUILD_FOR_NATIVE_MACHINE)
     # pre-v1.0
-    list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DARCH_OPT_FLAGS=\"\"")
+    list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DARCH_OPT_FLAGS=")
     # v1.0
-    list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DMKLDNN_ARCH_OPT_FLAGS=\"\"")
+    list(APPEND MKLDNN_CMAKE_EXTRA_ARGS "-DMKLDNN_ARCH_OPT_FLAGS=")
     set(MKLDNN_PATCH_COMMAND1 git apply ${CMAKE_SOURCE_DIR}/patches/mkldnn/mem-patch.cmake.patch)
     # discard prior changes due to patching in mkldnn source to unblock incremental builds.
     set(MKLDNN_PATCH_DISCARD_COMMAND cd ${MKLDNN_SOURCE} && git checkout -- .)


Workaround for gcc 4.8.2: Suppress mkl-dnn warning manually since pragma GCC diagnostic ignored is not working on gcc 4.8.2 (#2812)

--- cmake/external_mkldnn.cmake
+++ cmake/external_mkldnn.cmake
@@ -105,9 +105,12 @@
         if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 8.0 OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 8.0)
             set(MKLDNN_FLAG "-Wno-stringop-truncation -Wno-stringop-overflow")
         endif()
-    elseif(NGRAPH_MANYLINUX_ENABLE) #pragma GCC diagnostic ignored does not work on GCC used for manylinux1
-        set(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result -Wno-error=array-bounds")
-        set(MKLDNN_FLAG "${MKLDNN_FLAG} -Wno-unused-result -Wno-unused-value")
+    elseif(LINUX)
+        if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 4.8.2)
+            #pragma GCC diagnostic ignored does not work on GCC used for manylinux1
+            set(MKLDNN_FLAG "-Wno-error=strict-overflow -Wno-error=unused-result -Wno-error=array-bounds")
+            set(MKLDNN_FLAG "${MKLDNN_FLAG} -Wno-unused-result -Wno-unused-value")
+        endif()
     endif()
 endif()


Replacing /GR with /GR- instead of applying both options to the project.  This should reduce some build bot warnings (D9025: "overriding '/GR' with '/GR-'").

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -191,7 +191,7 @@
   if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
     set(target_compile_flags "${target_compile_flags} -fno-rtti")
   elseif (MSVC)
-    set(target_compile_flags "${target_compile_flags} /GR-")
+    llvm_replace_compiler_option(target_compile_flags "/GR" "/GR-")
   endif ()

   if (SUPPORTS_NO_VARIADIC_MACROS_FLAG)


[CMake] add_lit_testsuite: EXCLUDE_FROM_ALL excludes the test ${target} out of check-all.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -284,11 +284,14 @@
 function(add_lit_testsuite target comment)
   parse_arguments(ARG "PARAMS;DEPENDS;ARGS" "" ${ARGN})

-  # Register the testsuites, params and depends for the global check rule.
-  set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_DEFAULT_ARGS})
-  set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${ARG_PARAMS})
-  set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS})
-  set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${ARG_ARGS})
+  # EXCLUDE_FROM_ALL excludes the test ${target} out of check-all.
+  if(NOT EXCLUDE_FROM_ALL)
+    # Register the testsuites, params and depends for the global check rule.
+    set_property(GLOBAL APPEND PROPERTY LLVM_LIT_TESTSUITES ${ARG_DEFAULT_ARGS})
+    set_property(GLOBAL APPEND PROPERTY LLVM_LIT_PARAMS ${ARG_PARAMS})
+    set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS})
+    set_property(GLOBAL APPEND PROPERTY LLVM_LIT_EXTRA_ARGS ${ARG_ARGS})
+  endif()

   # Produce a specific suffixed check rule.
   add_lit_target(${target} ${comment}


[CMake] Minor change to symlink generation for LLDB

If OUTPUT_DIR is not specified we can assume the symlink is linking to a file in the same directory, so we can use $<TARGET_FILE_NAME:${target}> to create a relative symlink.

In the case of LLDB, when we build a framework, we are creating symlinks in a different directory than the file we're pointing to, and we don't install those links. To make this work in the build directory we can use $<TARGET_FILE:${target}> instead, which uses the full path to the target.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1238,6 +1238,8 @@

 function(add_llvm_tool_symlink link_name target)
   cmake_parse_arguments(ARG "ALWAYS_GENERATE" "OUTPUT_DIR" "" ${ARGN})
+  set(dest_binary "$<TARGET_FILE:${target}>")
+
   # This got a bit gross... For multi-configuration generators the target
   # properties return the resolved value of the string, not the build system
   # expression. To reconstruct the platform-agnostic path we have to do some
@@ -1246,6 +1248,11 @@
   # and replace it with CMAKE_CFG_INTDIR. This allows the build step to be type
   # agnostic again.
   if(NOT ARG_OUTPUT_DIR)
+    # If you're not overriding the OUTPUT_DIR, we can make the link relative in
+    # the same directory.
+    if(UNIX)
+      set(dest_binary "$<TARGET_FILE_NAME:${target}>")
+    endif()
     if(CMAKE_CONFIGURATION_TYPES)
       list(GET CMAKE_CONFIGURATION_TYPES 0 first_type)
       string(TOUPPER ${first_type} first_type_upper)
@@ -1271,10 +1278,8 @@

   if(UNIX)
     set(LLVM_LINK_OR_COPY create_symlink)
-    set(dest_binary "$<TARGET_FILE_NAME:${target}>")
   else()
     set(LLVM_LINK_OR_COPY copy)
-    set(dest_binary "$<TARGET_FILE:${target}>")
   endif()

   set(output_path "${ARG_OUTPUT_DIR}/${link_name}${CMAKE_EXECUTABLE_SUFFIX}")


[Undo] Change in user-config.cmake

[Undo] Change in user-config.cmake

--- user-config.cmake
+++ user-config.cmake
@@ -11,8 +11,8 @@
 #                      WINDOWS                          #
 #-------------------------------------------------------#
 ### 64bit (x64) ###
- set (CMAKE_PREFIX_PATH "C:\\Qt\\5.11.2\\msvc2017_64") # <Set Path to Qt>
-set (OPENSSL_DIR "C:\\OpenSSL-v111-Win64\\bin") # <OTIONAL : Set the past to custom OpenSSL version>
+# set (CMAKE_PREFIX_PATH "C:\\Qt\\5.11.2\\msvc2017_64\\") # <Set Path to Qt>
+# set (OPENSSL_DIR "path to openssl") # <OTIONAL : Set the past to custom OpenSSL version>

 ### 32bit (x86) ###
 # set (CMAKE_PREFIX_PATH "C:\\Qt\\5.10.2\\msvc2015\\") # <Set Path to Qt>


[Conf] More robust way to derive Boost.Python component

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -70,6 +70,8 @@
 #  * INSTALL_INCLUDE_DIR  - Installation directory for the header files
 #  * INSTALL_DATA_DIR     - Installation directory for the data files
 #  * INSTALL_SAMPLE_DIR   - Installation directory for the (CSV) sample files
+#  * NEED_PYTHON          - Whether Python libraries are needed
+#                           That paremeter is derived from the required libraries
 #  * RUN_GCOV             - Whether or not to perform code coverage
 #
 macro (set_project_options _build_doc _enable_tests _run_gcov)
@@ -106,6 +108,7 @@
   set (CSS_ALL_TARGETS)
   set (IMG_ALL_TARGETS)
   set (MAN_ALL_TARGETS)
+  set (NEED_PYTHON OFF)

   # Set the library installation directory (either 32 or 64 bits)
   set (LIBDIR "lib${LIB_SUFFIX}" CACHE PATH
@@ -335,6 +338,7 @@
     endif (${_arg_lower} STREQUAL "lcov")

     if (${_arg_lower} STREQUAL "python")
+      set (NEED_PYTHON ON)
       get_python (${_arg_version})
     endif (${_arg_lower} STREQUAL "python")

@@ -616,19 +620,37 @@
   #         On some platform/Boost version combinations, the Python version
   #         may be just the major version (2 or 3 as of 2020) or the major
   #         and minor versions (e.g., 27, 28, 34, 36, 37, 38, 39 as of 2020)
-  set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
-  set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
+  # Note 3: Boot.Python has is reuired only for Python extensions. It should
+  #         not be linked with other regular (non-Python) libraries/binaries,
+  #         as it pulls with it symbols from the Python interpreter, which are
+  #         available only when launched from a Python interpreter.
   set (Boost_USE_STATIC_LIBS OFF)
   set (Boost_USE_MULTITHREADED ON)
   set (Boost_USE_STATIC_RUNTIME OFF)
+  # Boost.Python - Depending on the platforms, the component name
+  # differs. We try all of them, and the find_package() will retrieve
+  # just one
+  if (NEED_PYTHON)
+    set (python_cpt_name0 "python")
+    #
+    if (Python3_VERSION_MAJOR)
+      set (python_cpt_name1 "python${Python3_VERSION_MAJOR}")
+    endif (Python3_VERSION_MAJOR)
+    #
+    if (Python3_VERSION_MINOR)
+      set (python_cpt_name2 "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
+    endif (Python3_VERSION_MINOR)
+  endif (NEED_PYTHON)

   # Boost components for (non-Python) libraries
   set (BOOST_REQUIRED_COMPONENTS_FOR_LIB
     date_time random iostreams serialization filesystem system locale regex)

   # Boost components for Python extensions
-  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT
-	${python_cpt_name1} ${python_cpt_name2})
+  if (NEED_PYTHON)
+    set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT
+      ${python_cpt_name0} ${python_cpt_name1} ${python_cpt_name2})
+  endif (NEED_PYTHON)

   # Boost components for main (non-test) binaries
   set (BOOST_REQUIRED_COMPONENTS_FOR_BIN program_options)
@@ -655,54 +677,61 @@
   find_package (BoostWrapper ${_required_version} REQUIRED)

   if (Boost_FOUND)
-    # Boost.Python library
-	if (${Boost_PYTHON3_FOUND})
-      message (STATUS "  + Boost_PYTHON3_FOUND: ${Boost_PYTHON3_FOUND}")
-	endif (${Boost_PYTHON3_FOUND})
-	#
-	if (${Boost_PYTHON38_FOUND})
-      message (STATUS "  + Boost_PYTHON38_FOUND: ${Boost_PYTHON38_FOUND}")
-	endif (${Boost_PYTHON38_FOUND})
-	#
-	if (${Boost_PYTHON_VERSION})
+
+    if (NEED_PYTHON)
+      # Boost has a single Python library, but its name depends on the
+      # distribution, it can be libboost_python3 or libboost_python3x
+      if (Boost_PYTHON_LIBRARY)
+	set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name0})
+	if (Python3_VERSION_MAJOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name1})
+	endif (Python3_VERSION_MAJOR)
+	if (Python3_VERSION_MINOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
+	endif (Python3_VERSION_MINOR)
+      endif (Boost_PYTHON_LIBRARY)
+
+      #
+      if (Boost_PYTHON${Python3_VERSION_MAJOR}_LIBRARY)
+	set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1})
+	list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name0})
+	if (Python3_VERSION_MINOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
+	endif (Python3_VERSION_MINOR)
+      endif (Boost_PYTHON${Python3_VERSION_MAJOR}_LIBRARY)
+
+      #
+      if (Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_LIBRARY)
+	set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name2})
+	list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name0})
+	if (Python3_VERSION_MAJOR)
+	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name1})
+	endif (Python3_VERSION_MAJOR)
+      endif (Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_LIBRARY)
+
+      # Reporting
+      message (STATUS "  + Retained Boost Python component: ${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT}")
+
+      # Derive the Boost.Python component name (amoung Boost_PYTHON,
+      # Boost_PYTHON3, Boost_PYTHON3X)
+      string (TOUPPER ${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT} _python_cpt)
+
+      # Reporting
+      message (STATUS "  + Boost Python component: Boost_${_python_cpt}")
+
+      # Derive the Python version used by Boost.Python
+      if (${Boost_${_python_cpt}_LIBRARY} MATCHES "python([1-9])\\.?([0-9])?")
+	set (Boost_PYTHON_VERSION "${CMAKE_MATCH_1}${CMAKE_MATCH_2}")
+      endif (${Boost_${_python_cpt}_LIBRARY} MATCHES "python([1-9])\\.?([0-9])?")
+
+      # Reporting
       message (STATUS "  + Boost_PYTHON_VERSION: ${Boost_PYTHON_VERSION}")
-	endif (${Boost_PYTHON_VERSION})
-	#
-	if (${Boost_PYTHON_LIBRARY})
-      message (STATUS "  + Boost_PYTHON_LIBRARY: ${Boost_PYTHON_LIBRARY}")
-	endif (${Boost_PYTHON_LIBRARY})
-	#
-	if (${Boost_PYTHON3_LIBRARY})
-      message (STATUS "  + Boost_PYTHON3_LIBRARY: ${Boost_PYTHON3_LIBRARY}")
-	endif (${Boost_PYTHON3_LIBRARY})
-	#
-	if (${Boost_PYTHON36_LIBRARY})
-      message (STATUS "  + Boost_PYTHON36_LIBRARY: ${Boost_PYTHON36_LIBRARY}")
-	endif (${Boost_PYTHON36_LIBRARY})
-	#
-	if (${Boost_PYTHON37_LIBRARY})
-      message (STATUS "  + Boost_PYTHON37_LIBRARY: ${Boost_PYTHON37_LIBRARY}")
-	endif (${Boost_PYTHON37_LIBRARY})
-	#
-	if (${Boost_PYTHON38_LIBRARY})
-      message (STATUS "  + Boost_PYTHON38_LIBRARY: ${Boost_PYTHON38_LIBRARY}")
-	endif (${Boost_PYTHON38_LIBRARY})
-	#
-	if (${Boost_PYTHON39_LIBRARY})
-      message (STATUS "  + Boost_PYTHON39_LIBRARY: ${Boost_PYTHON39_LIBRARY}")
-	endif (${Boost_PYTHON39_LIBRARY})
-
-	# Boost has a single Python library, but its name depends on the
-	# distribution, it can be libboost_python3 or libboost_python3x
-	if (${Boost_PYTHON3_FOUND})
-	  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name1})
-	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name2})
-	endif (${Boost_PYTHON3_FOUND})
-
-	if (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})
-	  set (BOOST_REQUIRED_COMPONENTS_FOR_PYEXT ${python_cpt_name2})
-	  list (REMOVE_ITEM BOOST_REQUIRED_COMPONENTS ${python_cpt_name1})
-	endif (${Boost_PYTHON${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}_FOUND})
+
+      # Boost.Python library
+      if (Boost_${_python_cpt}_LIBRARY)
+	message (STATUS "  + Boost_${_python_cpt}_LIBRARY: ${Boost_${_python_cpt}_LIBRARY}")
+      endif (Boost_${_python_cpt}_LIBRARY)
+    endif (NEED_PYTHON)

     # Update the list of include directories for the project
     include_directories (${Boost_INCLUDE_DIRS})
@@ -715,8 +744,10 @@
       "${BOOST_REQUIRED_COMPONENTS_FOR_LIB}")

     # Update the list of Python library dependencies for the project
-    register_boost_lib ("PROJ_DEP_LIBS_FOR_PYEXT"
-      "${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT}")
+    if (NEED_PYTHON)
+      register_boost_lib ("PROJ_DEP_LIBS_FOR_PYEXT"
+	"${BOOST_REQUIRED_COMPONENTS_FOR_PYEXT}")
+    endif (NEED_PYTHON)

     # Update the list of binary dependencies for the project
     register_boost_lib ("PROJ_DEP_LIBS_FOR_BIN"
@@ -772,22 +803,22 @@

   set (${_proto_srcs})
   foreach (FIL ${ARGN})
-	# Extract the file-path and the extension of the Protobuf specification file
+    # Extract the file-path and the extension of the Protobuf specification file
     get_filename_component (ABS_FIL ${FIL} ABSOLUTE)
     get_filename_component (FIL_WE ${FIL} NAME_WE)

-	# With Python, Protobuf adds "_pb2"
-	set (_proto_gen_src ${FIL_WE}_pb2.py)
-
-	message (STATUS
-	  "Adding ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src} to Python sources")
+    # With Python, Protobuf adds "_pb2"
+    set (_proto_gen_src ${FIL_WE}_pb2.py)
+
+    message (STATUS
+      "Adding ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src} to Python sources")

     list (APPEND ${_proto_srcs} "${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}")

-	# Add a specific command for the Protobuf stub/skeleton generation
+    # Add a specific command for the Protobuf stub/skeleton generation
     add_custom_command (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}"
       COMMAND  ${PROTOBUF_PROTOC_EXECUTABLE}
-	  --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
+      --python_out ${CMAKE_CURRENT_BINARY_DIR} ${_protobuf_include_path} ${ABS_FIL}
       DEPENDS ${ABS_FIL} ${PROTOBUF_PROTOC_EXECUTABLE}
       COMMENT "Running Python protocol buffer compiler on ${FIL}, generating ${CMAKE_CURRENT_BINARY_DIR}/${_proto_gen_src}"
       VERBATIM)
@@ -1852,10 +1883,10 @@
   endif (${_lib_short_name} STREQUAL ${MODULE_NAME})

   ##
-  # Python extension libraries hase some peculiarities
+  # Python extension libraries has some peculiarities
   if ("${_lib_prefix}" STREQUAL "py")
-	message (STATUS "${_lib_short_name} is assumed to be a Python library:")
-	message (STATUS "  -> Following libraries will be weakly linked: ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT}")
+    message (STATUS "${_lib_short_name} is assumed to be a Python library:")
+    message (STATUS "  -> Following libraries will be weakly linked: ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT}")

     # no 'lib' prefix
     set_target_properties (${_lib_target} PROPERTIES PREFIX "")
@@ -1863,34 +1894,34 @@
     # The suffix must be .so (even on MacOS, not .dylib)
     set_target_properties (${_lib_target} PROPERTIES SUFFIX ".so")

-	# Add the dependencies for Python extensions.
-	#
-	# Python extensions (which are also libraries per se) must not be linked
-	# against libpython3.x.so (which includes the interpreter). On Linux, it is
-	# fine not to link against libpython3.x.so, but on OS X, the compiler
-	# fails, unless the -undefined dynamic_lookup option is passed, which is
-	# what target_link_libraries_with_dynamic_lookup() is doing. That function
-	# is specified in the targetLinkLibrariesWithDynamicLookup.cmake file.
-	#
-	# See also:
-	#  https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/
-	#  https://github.com/scikit-build/scikit-build/blob/master/skbuild/resources/cmake/targetLinkLibrariesWithDynamicLookup.cmake
-	target_link_libraries_with_dynamic_lookup (${_lib_target}
-	  ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT})
-	#python_extension_module (${_lib_target})
+    # Add the dependencies for Python extensions.
+    #
+    # Python extensions (which are also libraries per se) must not be linked
+    # against libpython3.x.so (which includes the interpreter). On Linux, it is
+    # fine not to link against libpython3.x.so, but on OS X, the compiler
+    # fails, unless the -undefined dynamic_lookup option is passed, which is
+    # what target_link_libraries_with_dynamic_lookup() is doing. That function
+    # is specified in the targetLinkLibrariesWithDynamicLookup.cmake file.
+    #
+    # See also:
+    #  https://blog.tim-smith.us/2015/09/python-extension-modules-os-x/
+    #  https://github.com/scikit-build/scikit-build/blob/master/skbuild/resources/cmake/targetLinkLibrariesWithDynamicLookup.cmake
+    target_link_libraries_with_dynamic_lookup (${_lib_target}
+      ${Python3_LIBRARIES} ${PROJ_DEP_LIBS_FOR_PYEXT})
+    #python_extension_module (${_lib_target})

   endif ("${_lib_prefix}" STREQUAL "py")

   ##
   # Library name (and soname)
   if (WIN32)
-	# MS Windows
+    # MS Windows
     set_target_properties (${_lib_target} PROPERTIES
       OUTPUT_NAME ${_lib_short_name}
       VERSION ${GENERIC_LIB_VERSION})

   else (WIN32)
-	# Linux and MacOS
+    # Linux and MacOS
     set_target_properties (${_lib_target} PROPERTIES
       OUTPUT_NAME ${_lib_short_name}
       VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
@@ -1907,15 +1938,15 @@
   ##
   # Installation of the library
   if ("${_lib_prefix}" STREQUAL "py")
-	# If the library is Python, install it into a dedicated directory
-	message (STATUS "${_lib_short_name} is assumed to be a Python library")
-	install (TARGETS ${_lib_target}
+    # If the library is Python, install it into a dedicated directory
+    message (STATUS "${_lib_short_name} is assumed to be a Python library")
+    install (TARGETS ${_lib_target}
       EXPORT ${LIB_DEPENDENCY_EXPORT}
       LIBRARY DESTINATION "${INSTALL_PY_LIB_DIR}" COMPONENT runtime)
-
+
   else ("${_lib_prefix}" STREQUAL "py")
-	# Install the library in the standard location
-	install (TARGETS ${_lib_target}
+    # Install the library in the standard location
+    install (TARGETS ${_lib_target}
       EXPORT ${LIB_DEPENDENCY_EXPORT}
       LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT runtime)
   endif ("${_lib_prefix}" STREQUAL "py")
@@ -2673,7 +2704,7 @@

 # Python
 macro (display_python)
-  if (Python3_FOUND)
+  if (NEED_PYTHON)
     message (STATUS)
     message (STATUS "* Python:")
     message (STATUS "  - Python3_VERSION ............... : ${Python3_VERSION}")
@@ -2682,7 +2713,10 @@
     message (STATUS "  - Python3_LIBRARIES ............. : ${Python3_LIBRARIES}")
     message (STATUS "  - Python3_LIBRARY_DIRS .......... : ${Python3_LIBRARY_DIRS}")
     message (STATUS "  - Python3_RUNTIME_LIBRARY_DIRS .. : ${Python3_RUNTIME_LIBRARY_DIRS}")
-  endif (Python3_FOUND)
+  else (NEED_PYTHON)
+    message (STATUS)
+    message (STATUS "* Python not required")
+  endif (NEED_PYTHON)
 endmacro (display_python)

 # ICU
@@ -2717,7 +2751,9 @@
     message (STATUS "  - Boost_LIB_VERSION ............. : ${Boost_LIB_VERSION}")
     message (STATUS "  - Boost_HUMAN_VERSION ........... : ${Boost_HUMAN_VERSION}")
     message (STATUS "  - Boost_INCLUDE_DIRS ............ : ${Boost_INCLUDE_DIRS}")
-    message (STATUS "  - Boost_PYTHON_VERSION .......... : ${Boost_PYTHON_VERSION}")
+    if (NEED_PYTHON)
+      message (STATUS "  - Boost_PYTHON_VERSION .......... : ${Boost_PYTHON_VERSION}")
+    endif (NEED_PYTHON)
     message (STATUS "  - Boost required components ..... : ${BOOST_REQUIRED_COMPONENTS}")
     message (STATUS "  - Boost required libraries ...... : ${BOOST_REQUIRED_LIBS}")
     message (STATUS "  - Boost required libs for Py ext. : ${PROJ_DEP_LIBS_FOR_PYEXT}")


add target synonym

add target synonym

--- contrib/cmake/build_from_scratch.cmake
+++ contrib/cmake/build_from_scratch.cmake
@@ -168,6 +168,8 @@

 if(TARGET)
     set(_cmake_target_args --target ${TARGET})
+elseif(TARGETS) # allow TARGETS as a synonym for TARGET :)
+    set(_cmake_target_args --target ${TARGETS})
 endif()

 if(WIN32)


ENH: added support to locate Cg on Mac Os X

--- CMake/FindCg.cmake
+++ CMake/FindCg.cmake
@@ -1,94 +1,124 @@
 #
 # Try to find nVidia's Cg compiler, runtime libraries, and include path.
+# Once done this will define
 #
+# CG_FOUND        - system has NVidia Cg and it can be used.
 # CG_INCLUDE_PATH = directory where cg.h resides
 # CG_LIBRARY = full path to libCg.so (Cg.DLL on win32)
 # CG_GL_LIBRARY = full path to libCgGL.so (CgGL.dll on win32)
 # CG_COMPILER = full path to cgc (cgc.exe on win32)
-#
+#

-IF (WIN32)
-FIND_PROGRAM( CG_COMPILER cgc
-  "C:/Program Files/NVIDIA Corporation/Cg/bin"
-  "C:/Program Files/Cg"
-  ${PROJECT_SOURCE_DIR}/../Cg
-  DOC "The Cg Compiler"
-)
-IF (CG_COMPILER)
-  GET_FILENAME_COMPONENT(CG_COMPILER_DIR ${CG_COMPILER} PATH)
-  GET_FILENAME_COMPONENT(CG_COMPILER_SUPER_DIR ${CG_COMPILER_DIR} PATH)
-ELSE (CG_COMPILER)
-  SET (CG_COMPILER_DIR .)
-  SET (CG_COMPILER_SUPER_DIR ..)
-ENDIF (CG_COMPILER)
-FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
-  "C:/Program Files/NVIDIA Corporation/Cg/include"
-  "C:/Program Files/Cg"
-  ${PROJECT_SOURCE_DIR}/../Cg
-  ${CG_COMPILER_SUPER_DIR}/include
-  ${CG_COMPILER_DIR}
-  DOC "The directory where Cg/cg.h resides"
-)
-FIND_LIBRARY( CG_LIBRARY
-  NAMES Cg
-  PATHS
-    "C:/Program Files/NVIDIA Corporation/Cg/lib"
-    "C:/Program Files/Cg"
-    ${PROJECT_SOURCE_DIR}/../Cg
-    ${CG_COMPILER_SUPER_DIR}/lib
-    ${CG_COMPILER_DIR}
-  DOC "The Cg runtime library"
-)
-FIND_LIBRARY( CG_GL_LIBRARY
-  NAMES CgGL
-  PATHS
-    "C:/Program Files/NVIDIA Corporation/Cg/lib"
-    "C:/Program Files/Cg"
-    ${PROJECT_SOURCE_DIR}/../Cg
-    ${CG_COMPILER_SUPER_DIR}/lib
-    ${CG_COMPILER_DIR}
-  DOC "The Cg runtime library"
-)
-ELSE (WIN32)
-FIND_PROGRAM( CG_COMPILER cgc
-  /usr/bin
-  /usr/local/bin
-  DOC "The Cg Compiler"
-)
-GET_FILENAME_COMPONENT(CG_COMPILER_DIR "${CG_COMPILER}" PATH)
-GET_FILENAME_COMPONENT(CG_COMPILER_SUPER_DIR "${CG_COMPILER_DIR}" PATH)
-FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
-  /usr/include
-  /usr/local/include
-  ${CG_COMPILER_SUPER_DIR}/include
-  DOC "The directory where Cg/cg.h resides"
-)
-FIND_LIBRARY( CG_LIBRARY Cg
-  PATHS
-    /usr/lib64
-    /usr/lib
-    /usr/local/lib64
-    /usr/local/lib
-    ${CG_COMPILER_SUPER_DIR}/lib64
-    ${CG_COMPILER_SUPER_DIR}/lib
-  DOC "The Cg runtime library"
-)
-FIND_LIBRARY( CG_GL_LIBRARY CgGL
-  PATHS
-    /usr/lib64
-    /usr/lib
-    /usr/local/lib64
-    /usr/local/lib
-    ${CG_COMPILER_SUPER_DIR}/lib64
-    ${CG_COMPILER_SUPER_DIR}/lib
-  DOC "The Cg runtime library"
-)
-ENDIF (WIN32)
+# On OSX default to using the framework version of Cg.
+
+IF (APPLE)
+  INCLUDE(${CMAKE_ROOT}/Modules/CMakeFindFrameworks.cmake)
+  SET(CG_FRAMEWORK_INCLUDES)
+  CMAKE_FIND_FRAMEWORKS(Cg)
+  IF (Cg_FRAMEWORKS)
+    FOREACH(dir ${Cg_FRAMEWORKS})
+      SET(CG_FRAMEWORK_INCLUDES ${CG_FRAMEWORK_INCLUDES}
+        ${dir}/Headers ${dir}/PrivateHeaders)
+    ENDFOREACH(dir)
+
+    #Find the include  dir
+    FIND_PATH(CG_INCLUDE_PATH cg.h
+      ${CG_FRAMEWORK_INCLUDES}
+      )
+
+    #Since we are using Cg framework, we must link to it.
+    SET(CG_LIBRARY "-framework Cg" CACHE STRING "Cg library")
+    SET(CG_GL_LIBRARY "-framework Cg" CACHE STRING "Cg GL library")
+  ENDIF (Cg_FRAMEWORKS)
+  FIND_PROGRAM(CG_COMPILER cgc
+    /usr/bin
+    /usr/local/bin
+    DOC "The Cg compiler"
+    )
+ELSE (APPLE)
+  IF (WIN32)
+    FIND_PROGRAM( CG_COMPILER cgc
+      "C:/Program Files/NVIDIA Corporation/Cg/bin"
+      "C:/Program Files/Cg"
+      ${PROJECT_SOURCE_DIR}/../Cg
+      DOC "The Cg Compiler"
+      )
+    IF (CG_COMPILER)
+      GET_FILENAME_COMPONENT(CG_COMPILER_DIR ${CG_COMPILER} PATH)
+      GET_FILENAME_COMPONENT(CG_COMPILER_SUPER_DIR ${CG_COMPILER_DIR} PATH)
+    ELSE (CG_COMPILER)
+      SET (CG_COMPILER_DIR .)
+      SET (CG_COMPILER_SUPER_DIR ..)
+    ENDIF (CG_COMPILER)
+    FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
+      "C:/Program Files/NVIDIA Corporation/Cg/include"
+      "C:/Program Files/Cg"
+      ${PROJECT_SOURCE_DIR}/../Cg
+      ${CG_COMPILER_SUPER_DIR}/include
+      ${CG_COMPILER_DIR}
+      DOC "The directory where Cg/cg.h resides"
+      )
+    FIND_LIBRARY( CG_LIBRARY
+      NAMES Cg
+      PATHS
+      "C:/Program Files/NVIDIA Corporation/Cg/lib"
+      "C:/Program Files/Cg"
+      ${PROJECT_SOURCE_DIR}/../Cg
+      ${CG_COMPILER_SUPER_DIR}/lib
+      ${CG_COMPILER_DIR}
+      DOC "The Cg runtime library"
+      )
+    FIND_LIBRARY( CG_GL_LIBRARY
+      NAMES CgGL
+      PATHS
+      "C:/Program Files/NVIDIA Corporation/Cg/lib"
+      "C:/Program Files/Cg"
+      ${PROJECT_SOURCE_DIR}/../Cg
+      ${CG_COMPILER_SUPER_DIR}/lib
+      ${CG_COMPILER_DIR}
+      DOC "The Cg runtime library"
+      )
+  ELSE (WIN32)
+    FIND_PROGRAM( CG_COMPILER cgc
+      /usr/bin
+      /usr/local/bin
+      DOC "The Cg Compiler"
+      )
+    GET_FILENAME_COMPONENT(CG_COMPILER_DIR "${CG_COMPILER}" PATH)
+    GET_FILENAME_COMPONENT(CG_COMPILER_SUPER_DIR "${CG_COMPILER_DIR}" PATH)
+    FIND_PATH( CG_INCLUDE_PATH Cg/cg.h
+      /usr/include
+      /usr/local/include
+      ${CG_COMPILER_SUPER_DIR}/include
+      DOC "The directory where Cg/cg.h resides"
+      )
+    FIND_LIBRARY( CG_LIBRARY Cg
+      PATHS
+      /usr/lib64
+      /usr/lib
+      /usr/local/lib64
+      /usr/local/lib
+      ${CG_COMPILER_SUPER_DIR}/lib64
+      ${CG_COMPILER_SUPER_DIR}/lib
+      DOC "The Cg runtime library"
+      )
+    FIND_LIBRARY( CG_GL_LIBRARY CgGL
+      PATHS
+      /usr/lib64
+      /usr/lib
+      /usr/local/lib64
+      /usr/local/lib
+      ${CG_COMPILER_SUPER_DIR}/lib64
+      ${CG_COMPILER_SUPER_DIR}/lib
+      DOC "The Cg runtime library"
+      )
+  ENDIF (WIN32)
+ENDIF (APPLE)

 IF (CG_INCLUDE_PATH)
-SET( FOUND_CG 1 CACHE STRING "Set to 1 if CG is found, 0 otherwise")
+  SET( FOUND_CG 1 CACHE STRING "Set to 1 if CG is found, 0 otherwise")
 ELSE (CG_INCLUDE_PATH)
-SET( FOUND_CG 0 CACHE STRING "Set to 1 if CG is found, 0 otherwise")
+  SET( FOUND_CG 0 CACHE STRING "Set to 1 if CG is found, 0 otherwise")
 ENDIF (CG_INCLUDE_PATH)

 MARK_AS_ADVANCED( FOUND_CG )


work around ccache 3.7 command line interface change

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -2051,8 +2051,10 @@
 			else()
 				set (_ccacheExe "${_launcher}")
 			endif()
+			# ccache 3.7.0 replaced --print-config with --show-config
+			# use -p instead, which seems to work for all version for now, sigh
 			execute_process(
-				COMMAND "${_ccacheExe}" "--print-config"
+				COMMAND "${_ccacheExe}" "-p"
 				WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
 				RESULT_VARIABLE _result
 				OUTPUT_VARIABLE _ccacheConfig OUTPUT_STRIP_TRAILING_WHITESPACE


fix COTIRE_MINIMUM_NUMBER_OF_TARGET_SOURCES property definition

--- CMake/cotire.cmake
+++ CMake/cotire.cmake
@@ -3856,7 +3856,7 @@
 		FULL_DOCS
 			"The variable can be set to an integer > 0."
 			"If a target contains less than that number of source files, cotire will not enable the use of the precompiled header for the target."
-			"If not defined, defaults to 3."
+			"If not defined, defaults to 2."
 	)

 	define_property(


Modify set variables to clarify logic.

Modify set variables to clarify logic.

--- cmake/checks/check_01_cxx_features.cmake
+++ cmake/checks/check_01_cxx_features.cmake
@@ -321,8 +321,8 @@

   RESET_CMAKE_REQUIRED()
 ELSE()
-  SET(DEAL_II_WITH_CXX11 FALSE)
-  SET(DEAL_II_WITH_CXX14 FALSE)
+  SET(DEAL_II_HAVE_CXX11 FALSE)
+  SET(DEAL_II_HAVE_CXX14 FALSE)
 ENDIF()

 #


bye cruft

bye cruft

--- cmake/install_cmake_infrastructure.cmake
+++ cmake/install_cmake_infrastructure.cmake
@@ -1,181 +0,0 @@
-function(install_cmake_infrastructure PACKAGE_NAME)
-  if (NOT PROJECT_NAME STREQUAL PACKAGE_NAME)
-    message(FATAL_ERROR "install_cmake_infrastructure called for project (PROJECT_NAME=${PROJECT_NAME}) "
-      "that does not match package name argument PACKAGE_NAME=${PACKAGE_NAME}\n"
-      "Did you forget to call project()?\n")
-  endif()
-
-  parse_arguments(PACKAGE
-    "INCLUDE_DIRS;LIBRARIES;CFG_EXTRAS;MSG_DIRS;PYTHONPATH;DEPENDS"
-    ""
-    ${ARGN})
-
-  log(2 "install_cmake_infrastructure ${PACKAGE_NAME} at version ${${PACKAGE_NAME}_VERSION} in @CMAKE_INSTALL_PREFIX@")
-  set(pfx ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY})
-  set(PACKAGE_NAME ${PACKAGE_NAME})
-  if(NOT "${${PACKAGE}_VERSION}" STREQUAL "")
-    set(PACKAGE_VERSION ${${PACKAGE}_VERSION})
-  else()
-    set(PACKAGE_VERSION "0.0.0")
-  endif()
-  set(PACKAGE_INCLUDE_DIRS ${PACKAGE_INCLUDE_DIRS})
-  set(PACKAGE_DEPENDS ${PACKAGE_DEPENDS})
-  set(PACKAGE_LIBRARIES ${PACKAGE_LIBRARIES})
-  set(PACKAGE_CFG_EXTRAS ${PACKAGE_CFG_EXTRAS})
-  set(PACKAGE_CMAKE_CONFIG_FILES_DIR ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE_NAME}/cmake)
-  set(PACKAGE_MSG_DIRS ${PACKAGE_MSG_DIRS})
-  if (PACKAGE_PYTHONPATH)
-    set(PACKAGE_PYTHONPATH ${PACKAGE_PYTHONPATH})
-    set(${PACKAGE_NAME}_PYTHONPATH ${PACKAGE_PYTHONPATH} CACHE FILEPATH "python path")
-  endif()
-  # in source
-  set(PKG_INCLUDE_PREFIX ${CMAKE_CURRENT_SOURCE_DIR})
-  set(PKG_LIB_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
-  set(PKG_MSG_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/msg)
-  set(PKG_CMAKE_DIR ${CMAKE_BINARY_DIR}/cmake)
-  set(PKG_CMAKE_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
-  set(PKG_BIN_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/scripts
-    ${CMAKE_CURRENT_BINARY_DIR}/bin)
-  set(PKG_LOCATION "Source")
-
-  foreach(extra ${PACKAGE_CFG_EXTRAS})
-    assert_file_exists(${CMAKE_CURRENT_SOURCE_DIR}/cmake/${extra}.in "Nonexistent extra")
-    configure_file(cmake/${extra}.in
-      ${CMAKE_BINARY_DIR}/cmake/${extra}
-      @ONLY
-      )
-  endforeach()
-
-  #
-  # Versions find_packageable from the buildspace
-  #
-  string(TOLOWER ${PACKAGE_NAME} package_lower)
-  set(_cfgdir ${CMAKE_BINARY_DIR}/cmake/${package_lower})
-  set(_cfgout ${_cfgdir}/${package_lower}-config.cmake)
-  log(2 "Writing config to ${_cfgout}")
-
-  file(RELATIVE_PATH PACKAGE_RELATIVE_PATH ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-  if(PACKAGE_RELATIVE_PATH STREQUAL "")
-    set(PACKAGE_RELATIVE_PATH ".")
-  endif()
-  file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/etc)
-  safe_execute_process(COMMAND ${catkin_EXTRAS_DIR}/update_index.py
-    ${CMAKE_BINARY_DIR}/etc/packages.list
-    "${PACKAGE_NAME}"
-    "${PACKAGE_RELATIVE_PATH}"
-    )
-
-  #
-  #  Install stuff for share/ relative to this.  Maybe we'll want
-  #  to use PACKAGE_RELATIVE_PATH here?
-  #
-  set(PROJECT_SHARE_INSTALL_PREFIX share/${PACKAGE_NAME})
-
-
-  # THIS IS IMPORTANT. CMAKE_PREFIX_PATH appears to be twitchy: just
-  # spent hours figuring out that having /opt/ros/fuerte first is
-  # necessary for this finding to work.  Very strange.  xxx_DIR
-  # circumvents this twitchiness.
-  set(${PACKAGE_NAME}_DIR ${_cfgdir} CACHE FILEPATH "${PACKAGE_NAME} cmake config file dir")
-  configure_file(${catkin_EXTRAS_DIR}/templates/pkg-config.cmake.buildspace.in
-    ${_cfgout}
-    @ONLY
-    )
-
-  configure_file(${catkin_EXTRAS_DIR}/templates/pkg-config-version.cmake.in
-    ${_cfgdir}/${package_lower}-config-version.cmake
-    @ONLY
-    )
-
-  # installable
-  set(PKG_INCLUDE_PREFIX ${CMAKE_INSTALL_PREFIX})
-  set(PKG_LIB_PREFIX ${CMAKE_INSTALL_PREFIX})
-  set(PKG_MSG_DIRS ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE_NAME}/msg)
-  set(PKG_CMAKE_DIR ${CMAKE_INSTALL_PREFIX}/share/${PACKAGE_NAME}/cmake)
-  set(PKG_CMAKE_SRC_DIR ${PKG_CMAKE_DIR})
-  set(PKG_BIN_DIRS ${CMAKE_INSTALL_PREFIX}/bin)
-  set(PKG_LOCATION "Installed")
-
-  file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/pkg-config)
-  em_expand(${catkin_EXTRAS_DIR}/templates/pkg-config.pc.context.in
-    ${CMAKE_CURRENT_BINARY_DIR}/pkg-config.pc.context.py
-    ${catkin_EXTRAS_DIR}/em/pkg-config.pc.em
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PACKAGE_NAME}.pc)
-
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${PACKAGE_NAME}.pc
-    DESTINATION lib/pkgconfig
-    )
-
-  em_expand(${catkin_EXTRAS_DIR}/templates/pkg-config.pc.context.in
-    ${CMAKE_CURRENT_BINARY_DIR}/pkg-config.pc.context.py
-    ${catkin_EXTRAS_DIR}/em/manifest.xml.em
-    ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/manifest.xml)
-
-  install(FILES ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/manifest.xml
-    DESTINATION share/${PACKAGE_NAME}
-    )
-  #
-  #  Versions to be installed
-  #
-  set(INSTALLABLE_CFG_EXTRAS "")
-  foreach(extra ${PACKAGE_CFG_EXTRAS})
-    list(APPEND INSTALLABLE_CFG_EXTRAS ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${extra})
-    configure_file(cmake/${extra}.in
-      cmake_install/${extra}
-      @ONLY
-      )
-  endforeach()
-
-  string(TOLOWER ${PROJECT_NAME} project_lower)
-  if(EXISTS ${${PROJECT_NAME}_EXTRAS_DIR}/${project_lower}-config.cmake.in)
-    configure_file(${${PROJECT_NAME}_EXTRAS_DIR}/${project_lower}-config.cmake.in
-      ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${project_lower}-config.cmake
-      @ONLY
-      )
-  else()
-    configure_file(${catkin_EXTRAS_DIR}/templates/pkg-config.cmake.installable.in
-      ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${project_lower}-config.cmake
-      @ONLY
-      )
-  endif()
-
-  if(EXISTS ${${PROJECT_NAME}_EXTRAS_DIR}/${project_lower}-config-version.cmake.in)
-    configure_file(${${PROJECT_NAME}_EXTRAS_DIR}/${project_lower}-config-version.cmake.in
-      ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${project_lower}-config-version.cmake
-      @ONLY
-      )
-  else()
-    configure_file(${catkin_EXTRAS_DIR}/templates/pkg-config-version.cmake.in
-      ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${project_lower}-config-version.cmake
-      @ONLY
-      )
-  endif()
-
-  install(FILES
-    ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${package_lower}-config.cmake
-    ${CMAKE_CURRENT_BINARY_DIR}/cmake_install/${package_lower}-config-version.cmake
-    ${INSTALLABLE_CFG_EXTRAS}
-    DESTINATION ${PROJECT_SHARE_INSTALL_PREFIX}/cmake
-    )
-
-  # install libraries
-  if(PACKAGE_LIBRARIES)
-    install(TARGETS ${PACKAGE_LIBRARIES}
-      LIBRARY DESTINATION lib
-      ARCHIVE DESTINATION lib
-      )
-  endif()
-
-  # install headers, only works for one dir right now
-  if(PACKAGE_INCLUDE_DIRS)
-    if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${PACKAGE_INCLUDE_DIRS})
-      install(DIRECTORY ${PACKAGE_INCLUDE_DIRS}/
-	DESTINATION include
-        PATTERN .svn EXCLUDE
-        )
-    else()
-      message(WARNING "Include directory '${PACKAGE_INCLUDE_DIRS}' for ${PROJECT_NAME} not found")
-    endif()
-  endif()
-
-endfunction()


toolbox: reduce code by using a function

--- lib/cmake/macros.cmake
+++ lib/cmake/macros.cmake
@@ -69,23 +69,20 @@
 #   COND: conditional option to use
 #
 macro(disable_if OPT COND)
-	if(${COND})
+	function(cache_opt)
 		if(NOT __${OPT} AND ${OPT})
-			set(__${OPT} ${${OPT}} CACHE INTERNAL "INTERNAL CACHE FOR ${OPT}")
-		endif()
-		if(NOT __${OPT}_HELPSTRING)
-			get_property(__${OPT}_HELPSTRING CACHE ${OPT} PROPERTY HELPSTRING)
-			set(__${OPT}_HELPSTRING CACHE INTERNAL "${__${OPT}_HELPSTRING}")
-		endif()
-		unset(${OPT} CACHE)
-	else()
-		if(NOT __${OPT} AND ${OPT}) # AND NOT BVS_MODULE_HOTSWAP STREQUAL "")
 			set(__${OPT} ${${OPT}} CACHE INTERNAL "INTERNAL CACHE FOR ${OPT}")
 		endif()
 		if(NOT __${OPT}_HELPSTRING)
 			get_property(HELPSTRING CACHE ${OPT} PROPERTY HELPSTRING)
 			set(__${OPT}_HELPSTRING "${HELPSTRING}" CACHE INTERNAL "")
 		endif()
+	endfunction()
+	if(${COND})
+		cache_opt()
+		unset(${OPT} CACHE)
+	else()
+		cache_opt()
 		set(${OPT} ${__${OPT}} CACHE BOOL "${__${OPT}_HELPSTRING}" FORCE)
 		unset(__${OPT} CACHE)
 		unset(__${OPT}_HELPSTRING CACHE)


No comment.

No comment.

--- frontends/CsoundAC/cmake_install.cmake
+++ frontends/CsoundAC/cmake_install.cmake
@@ -45,8 +45,8 @@
     ENDIF()
   ENDFOREACH()
   FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE SHARED_LIBRARY FILES
-    "/home/mkg/csound/libCsoundAC.so.6.0"
-    "/home/mkg/csound/libCsoundAC.so"
+    "/home/mkg/csound-csound6-git/libCsoundAC.so.6.0"
+    "/home/mkg/csound-csound6-git/libCsoundAC.so"
     )
   FOREACH(file
       "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/libCsoundAC.so.6.0"
@@ -70,7 +70,7 @@
          FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/_CsoundAC.so"
          RPATH "")
   ENDIF()
-  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE MODULE FILES "/home/mkg/csound/_CsoundAC.so")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE MODULE FILES "/home/mkg/csound-csound6-git/_CsoundAC.so")
   IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/_CsoundAC.so" AND
      NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/_CsoundAC.so")
     FILE(RPATH_REMOVE
@@ -82,7 +82,7 @@
 ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")

 IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
-  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE FILE FILES "/home/mkg/csound/CsoundAC.py")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE FILE FILES "/home/mkg/csound-csound6-git/CsoundAC.py")
 ENDIF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")

 IF(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
@@ -92,7 +92,7 @@
          FILE "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/luaCsoundAC.so"
          RPATH "")
   ENDIF()
-  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE MODULE FILES "/home/mkg/csound/luaCsoundAC.so")
+  FILE(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" TYPE MODULE FILES "/home/mkg/csound-csound6-git/luaCsoundAC.so")
   IF(EXISTS "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/luaCsoundAC.so" AND
      NOT IS_SYMLINK "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/lib/luaCsoundAC.so")
     FILE(RPATH_REMOVE


remove XP_GRAPH_DEPS from conditional

remove XP_GRAPH_DEPS from conditional

issue https://github.com/smanders/externpro/issues/200#issuecomment-403987699

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -604,7 +604,7 @@
     file(READ ${g_READMEsub} sub)
     file(APPEND ${g_README} ${sub})
   endif()
-  if(EXISTS ${PRO_DIR}/deps.dot AND XP_GRAPH_DEPS)
+  if(EXISTS ${PRO_DIR}/deps.dot)
     set(user smanders)
     set(branch dev)
     set(mark customgraph01)


Getting rid of LD_LIBRARY_PATH, step 1, embed DT_RUNPATH into the compiled binaries.

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

   # <FS:TS> Enable AVX optimizations if requested and at least GCC 4.6.


Fixed debug information format for mac to allow breakpoints to work under Xcode.

--- indra/cmake/Variables.cmake
+++ indra/cmake/Variables.cmake
@@ -102,7 +102,7 @@
   set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
   set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk)
   set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.2")
-  set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "DWARF with dSYM File")
+  set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)

   # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
   # -DCMAKE_OSX_ARCHITECTURES:STRING='i386;ppc'


version 0.0.1.1

version 0.0.1.1

--- PluginConfig.cmake
+++ PluginConfig.cmake
@@ -8,7 +8,7 @@
 set(PLUGIN_NAME "FBVLC")
 set(PLUGIN_PREFIX "FBVLC")
 set(COMPANY_NAME "RSATom")
-set(PLUGIN_VERSION "0.0.1.0")
+set(PLUGIN_VERSION "0.0.1.1")

 #if you want embed vlc into FBVLC distribution:
 # 1) place vlc into FBVLC\Win\WiX\vlc-${VLC_VERSION}


cmake: python installation

cmake: python installation

Also fixes issue with empty PYTHON_PACKAGES_PATH (cross-compilation mode)

--- modules/python/common.cmake
+++ modules/python/common.cmake
@@ -132,13 +132,8 @@

 if(NOT INSTALL_CREATE_DISTRIB AND DEFINED ${PYTHON}_PACKAGES_PATH)
   set(__dst "${${PYTHON}_PACKAGES_PATH}")
-  install(TARGETS ${the_module} OPTIONAL
-          ${PYTHON_INSTALL_CONFIGURATIONS}
-          RUNTIME DESTINATION "${__dst}" COMPONENT python
-          LIBRARY DESTINATION "${__dst}" COMPONENT python
-          ${PYTHON_INSTALL_ARCHIVE}
-          )
-else()
+endif()
+if(NOT __dst)
   if(DEFINED ${PYTHON}_VERSION_MAJOR)
     set(__ver "${${PYTHON}_VERSION_MAJOR}.${${PYTHON}_VERSION_MINOR}")
   elseif(DEFINED ${PYTHON}_VERSION_STRING)
@@ -146,12 +141,19 @@
   else()
     set(__ver "unknown")
   endif()
-  install(TARGETS ${the_module}
-          CONFIGURATIONS Release
-          RUNTIME DESTINATION python/${__ver}/${OpenCV_ARCH} COMPONENT python
-          LIBRARY DESTINATION python/${__ver}/${OpenCV_ARCH} COMPONENT python
-          )
+  if(INSTALL_CREATE_DISTRIB)
+    set(__dst "python/${__ver}/${OpenCV_ARCH}")
+  else()
+    set(__dst "python/${__ver}")
+  endif()
 endif()
+
+install(TARGETS ${the_module}
+        ${PYTHON_INSTALL_CONFIGURATIONS}
+        RUNTIME DESTINATION "${__dst}" COMPONENT python
+        LIBRARY DESTINATION "${__dst}" COMPONENT python
+        ${PYTHON_INSTALL_ARCHIVE}
+        )

 unset(PYTHON_SRC_DIR)
 unset(PYTHON_CVPY_PROCESS)


Added functions for reading files

Added functions for reading files

--- build/macros.cmake
+++ build/macros.cmake
@@ -4,6 +4,10 @@
 endif()
 set(ORK_MACROS_INCLUDED 1)

+####################
+#Variable section
+####################
+
 macro(ensure_non_empty _var)
 	if(NOT ${_var})
 		message(FATAL_ERROR "Error: ${${_var}} not defined")
@@ -49,6 +53,9 @@
 	set(${_var} "" CACHE INTERNAL "" FORCE)
 endmacro()

+####################
+#Option section
+####################

 macro(detect_option_flag _var _msg _val)
 	if(DEFINED ${_var})
@@ -63,7 +70,6 @@
 		set(${_var} ${_val} PATH "${_msg}")
 	endif()
 endmacro()
-

 macro(detect_path _var _val1 _val2)
 	if(EXISTS "${_val1}")
@@ -75,13 +81,15 @@
 	endif()
 endmacro()

-
 macro(find_3p_path _build _var _val1 _val2)
 	if(${_build})
 		detect_path(${_var} "${ORK_3P_SOURCE_DIR}/${_val1}" "${ORK_3P_SOURCE_DIR}/${_val2}")
 	endif()
 endmacro()

+####################
+#Install section
+####################

 macro(parse_version _ver _prefix)
 	set(VERSION_REGEX "[0-9]+\\.[0-9]+\\.[0-9]+")
@@ -94,7 +102,6 @@
 		message(FATAL_ERROR "Invalid version: ${${_ver}}")
 	endif()
 endmacro()
-

 macro(install_bin _targ)
 	if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
@@ -152,6 +159,10 @@
 		endif()
 	endif()
 endmacro()
+
+####################
+#Compiler section
+####################

 macro(get_compiler_name _var)
 	if(MSVC)
@@ -201,3 +212,26 @@
 		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
 	endif()
 endmacro()
+
+####################
+#File section
+####################
+
+function(file_2_strings path_to_file_ var_)
+	if(NOT EXISTS "${path_to_file_}")
+		message(FATAL_ERROR "File does not exist: ${path_to_file_}")
+	endif()
+	if(IS_DIRECTORY "${path_to_file_}")
+		message(FATAL_ERROR "Cannot convert directory to strings: ${path_to_file_}")
+	endif()
+	file(STRINGS "${path_to_file_}" _content)
+	set(${var_} "${_content}" PARENT_SCOPE)
+endfunction()
+
+function(if_file_2_strings path_to_file_ var_)
+	set(_content)
+	if(EXISTS "${path_to_file_}")
+		file(STRINGS "${path_to_file_}" _content)
+	endif()
+	set(${var_} "${_content}" PARENT_SCOPE)
+endfunction()


Add link to SO

Add link to SO

[skip ci]

--- scripts/link-all.cmake
+++ scripts/link-all.cmake
@@ -70,6 +70,7 @@
     message(
         FATAL_ERROR
         "Python script failed: ${cmd}, ${result}, ${output}, ${error}"
+        "(may help: https://stackoverflow.com/a/2009505/2288008)"
     )
   endif()
   return()


removing kinect driver from externals because the driver you get from svn doesn't compile (it requires a minor modification in the CMakeLists.txt

--- software/externals/cmake/externals.cmake
+++ software/externals/cmake/externals.cmake
@@ -64,9 +64,9 @@
 set(velodyne_revision 852)
 set(velodyne_depends common_utils)

-set(kinect_url https://svn.csail.mit.edu/rrg_pods/drivers/kinect)
-set(kinect_revision 961)
-set(kinect_depends libbot-drc)
+#set(kinect_url https://svn.csail.mit.edu/rrg_pods/drivers/kinect)
+#set(kinect_revision 961)
+#set(kinect_depends libbot-drc)

 set(microstrain_comm_url https://svn.csail.mit.edu/rrg_pods/drivers/microstrain_comm)
 set(microstrain_comm_revision 853)
@@ -169,7 +169,7 @@
   isam_include
   visualization
   #velodyne
-  kinect
+  #kinect
   microstrain_comm
   fovis-git
   estimate-pose


Argh, the double quotes are apparently important to refer to ${LINK_FLAGS_PROPERTIES} on Mac OS X within common.cmake. (For consistency, we also put them in case of WIN32.)

--- cmake/common.cmake
+++ cmake/common.cmake
@@ -108,11 +108,11 @@

     IF(WIN32)
         SET_TARGET_PROPERTIES(${TARGET_NAME}
-            PROPERTIES PREFIX "" LINK_FLAGS ${LINK_FLAGS_PROPERTIES}
+            PROPERTIES PREFIX "" LINK_FLAGS "${LINK_FLAGS_PROPERTIES}"
         )
     ELSE()
         SET_TARGET_PROPERTIES(${TARGET_NAME}
-            PROPERTIES LINK_FLAGS ${LINK_FLAGS_PROPERTIES}
+            PROPERTIES LINK_FLAGS "${LINK_FLAGS_PROPERTIES}"
         )
     ENDIF()
 ENDMACRO()


Add -DMEM_STATS into config.cmake
This enables jerry print memory stats at clean up

IoT.js-DCO-1.0-Signed-off-by: Chunseok Lee chunseok.lee@samsung.com

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

 if ("${JERRY_MEM_STATS}" STREQUAL "YES")
-  set(CFLAGS "${CFLAGS} -DENABLE_JERRY_MEM_STATS")
+  set(CFLAGS "${CFLAGS} -DENABLE_JERRY_MEM_STATS -DMEM_STATS")
 endif()
 unset(JERRY_MEM_STATS CACHE)


external-luajit: added fix for older cmake's

--- cmake/luajit.cmake
+++ cmake/luajit.cmake
@@ -40,10 +40,12 @@
     if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
         set (CMAKE_REQUIRED_LIBRARIES "-ldl ${CMAKE_REQUIRED_LIBRARIES}")
     endif()
+    set (CMAKE_REQUIRED_INCLUDES "${LUAJIT_INCLUDE}")
     CHECK_CXX_SOURCE_RUNS ("${LUAJIT_TEST}" LUAJIT_RUNS)
     set (LUAJIT_TESTED "${LUAJIT_RUNS}")
     unset (LUAJIT_RUNS)
     unset (CMAKE_REQUIRED_LIBRARIES)
+    unset (CMAKE_REQUIRED_INCLUDES)
 endmacro()

 #
@@ -77,7 +79,6 @@
     luajit_find(False)
     if (LUAJIT_INCLUDE AND LUAJIT_LIB)
         include_directories("${LUAJIT_INCLUDE}")
-        link_directories("${LUAJIT_PREFIX}")
         luajit_test()
         if (LUAJIT_TESTED)
             message (STATUS "Supplied luajit is suitable for use.")


Only build the OpenCV example plug-in if MITK_USE_OpenCV is ON.

--- Examples/Plugins/PluginList.cmake
+++ Examples/Plugins/PluginList.cmake
@@ -14,5 +14,5 @@
   org.mitk.example.gui.regiongrowing:ON

   org.mitk.example.gui.imaging:ON
-  org.mitk.example.gui.opencv:ON
+  org.mitk.example.gui.opencv:${MITK_USE_OpenCV}
 )


Fixed a bug where declaring a dependency that was already declared somewhere else caused the build to break. Now use the existing parameters, and doesnt try to redefine them. Need to be tested extensively, maybe other tricky issues are hiding...

--- dist/WkBuild.cmake
+++ dist/WkBuild.cmake
@@ -28,7 +28,7 @@
 #

 #debug
-message ( "== Loading WkBuild.cmake ..." )
+message ( STATUS "== Loading WkBuild.cmake ..." )

 if ( CMAKE_BACKWARDS_COMPATIBILITY LESS 2.6 )
 	message ( FATAL_ERROR " CMAKE MINIMUM BACKWARD COMPATIBILITY REQUIRED : 2.6 !" )
@@ -72,9 +72,9 @@
 	file( WRITE ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "### Config file for ${PROJECT_NAME} auto generated by WkCmake ###

 ### First section : Main target ###
-IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
-   MESSAGE(FATAL_ERROR "CMake >= 2.6.0 required")
-ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
+IF(\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION} LESS 2.5)
+   MESSAGE(FATAL_ERROR \"CMake >= 2.6.0 required\")
+ENDIF(\${CMAKE_MAJOR_VERSION}.\${CMAKE_MINOR_VERSION} LESS 2.5)
 CMAKE_POLICY(PUSH)
 CMAKE_POLICY(VERSION 2.6)

@@ -82,13 +82,18 @@
 #all required target should be defined there... no need to specify all targets in ${PROJECT_NAME}_LIBRARIES, they will be linked automatically
 include(\${SELF_DIR}/${PROJECT_NAME}Export.cmake)
 get_filename_component(${PROJECT_NAME}_INCLUDE_DIR \"\${SELF_DIR}/${WKCMAKE_INCLUDE_DIR}/\" ABSOLUTE)
-set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIR}\")
+if ( NOT ${PROJECT_NAME}_INCLUDE_DIRS )
+	set(${PROJECT_NAME}_INCLUDE_DIRS \"\${${PROJECT_NAME}_INCLUDE_DIR}\")
+endif ( NOT ${PROJECT_NAME}_INCLUDE_DIRS )
 	")

 	file( APPEND ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "
 #however we still want to have ${PROJECT_NAME}_LIBRARIES available
 set(${PROJECT_NAME}_LIBRARY ${PROJECT_NAME} )
-set(${PROJECT_NAME}_LIBRARIES \"\${${PROJECT_NAME}_LIBRARY}\")
+if ( NOT ${PROJECT_NAME}_LIBRARIES )
+	set(${PROJECT_NAME}_LIBRARIES \"\${${PROJECT_NAME}_LIBRARY}\")
+endif ( NOT ${PROJECT_NAME}_LIBRARIES )
+
 	" )

 	get_target_property(${PROJECT_NAME}_LOCATION ${PROJECT_NAME} LOCATION)
@@ -131,7 +136,7 @@
 		set(${PROJECT_NAME}_load_type ${ARGV1} )
 	endif ( ${ARGC} GREATER 1 )

-	message ( "== Configuring ${PROJECT_NAME} as ${project_type} ${${PROJECT_NAME}_load_type}" )
+	message ( STATUS "== Configuring ${PROJECT_NAME} as ${project_type} ${${PROJECT_NAME}_load_type}" )

 	# testing type
 	if (NOT ${project_type} STREQUAL "EXECUTABLE" AND NOT ${project_type} STREQUAL "LIBRARY" )
@@ -154,7 +159,7 @@
 		set(CMAKE_VERBOSE_MAKEFILE OFF CACHE INTERNAL "Verbose build commands disabled for Release build." FORCE)
 		set(CMAKE_USE_RELATIVE_PATHS OFF CACHE INTERNAL "Absolute paths used in makefiles and projects for Release build." FORCE)
 	else (${${PROJECT_NAME}_BUILD_TYPE} STREQUAL Release)
-		message( "== Non Release build detected : enabling verbose makefile" )
+		message( STATUS "== Non Release build detected : enabling verbose makefile" )
 		# To get the actual commands used
 		set(CMAKE_VERBOSE_MAKEFILE ON CACHE INTERNAL "Verbose build commands enabled for Non Release build." FORCE)
 				#VLD
@@ -166,13 +171,13 @@

 	#Defining target

-	message ( "== Sources Files autodetection..." )
+	message ( STATUS "== Sources Files autodetection..." )

 	#VS workaround to display headers
 	FILE(GLOB_RECURSE HEADERS RELATIVE "${PROJECT_SOURCE_DIR}" ${WKCMAKE_INCLUDE_DIR}/*.h ${WKCMAKE_INCLUDE_DIR}/*.hh ${WKCMAKE_INCLUDE_DIR}/*.hpp)
 	FILE(GLOB_RECURSE SOURCES RELATIVE "${PROJECT_SOURCE_DIR}" ${WKCMAKE_SRC_DIR}/*.c ${WKCMAKE_SRC_DIR}/*.cpp ${WKCMAKE_SRC_DIR}/*.cc)
-	message ( "== Headers detected in ${WKCMAKE_INCLUDE_DIR} : ${HEADERS}" )
-	message ( "== Sources detected in ${WKCMAKE_SRC_DIR} : ${SOURCES}" )
+	message ( STATUS "== Headers detected in ${WKCMAKE_INCLUDE_DIR} : ${HEADERS}" )
+	message ( STATUS "== Sources detected in ${WKCMAKE_SRC_DIR} : ${SOURCES}" )

 	if ( NOT CMAKE_MODULE_PATH )
 		set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/${WKCMAKE_DIR}/Modules/")
@@ -203,7 +208,7 @@

 	#TODO : find a simpler way than this complex merge...
 	MERGE("${HEADERS}" "${SOURCES}" SOURCES)
-	MESSAGE ( "== ${PROJECT_NAME} Sources : ${SOURCES}" )
+	MESSAGE ( STATUS "== ${PROJECT_NAME} Sources : ${SOURCES}" )

 	#
 	# Handling my own build config
@@ -279,26 +284,31 @@
 	# maybe belongs somewhere else
 	set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/${WKCMAKE_DIR}/Modules/")

-	find_package( ${package_name} ${ARGN} )
 	SetPackageVarName( package_var_name ${package_name} )
 	#message ( "${package_name} -> ${package_var_name}" )

+
+	#Here to avoid redefinition of library target if already found by a dependency using my dependency as well...
+	if ( NOT ${package_var_name}_FOUND )
+		find_package( ${package_name} ${ARGN} )
+	endif ( NOT ${package_var_name}_FOUND )
+
 	if ( ${package_var_name}_FOUND )
-
+
 		# to handle cmake moule who dont have exactly the same standard as WkModules
 		if ( NOT ${package_var_name}_INCLUDE_DIRS )
-			set ( ${package_var_name}_INCLUDE_DIRS ${${package_var_name}_INCLUDE_DIR})
+			set ( ${package_var_name}_INCLUDE_DIRS ${${package_var_name}_INCLUDE_DIR} CACHE PATH "${package_name} Headers directories")
 		endif ( NOT ${package_var_name}_INCLUDE_DIRS )

 		add_definitions(-D WK_${package_var_name}_FOUND)

 		include_directories(${${package_var_name}_INCLUDE_DIRS})
-		message ( "== Binary Dependency ${package_name} include : ${${package_var_name}_INCLUDE_DIRS} OK !")
-
+			message ( STATUS "== Binary Dependency ${package_name} include : ${${package_var_name}_INCLUDE_DIRS} OK !")
+
 	else ( ${package_var_name}_FOUND )
-		message ( "== Binary Dependency ${package_name} : FAILED ! " )
+		message ( STATUS "== Binary Dependency ${package_name} : FAILED ! " )
 	endif ( ${package_var_name}_FOUND )
-
+
 CMAKE_POLICY(POP)
 endmacro (WkDependsInclude package_name)

@@ -313,38 +323,46 @@

 		# to handle cmake moule who dont have exactly the same standard as WkModules
 		if ( NOT ${package_var_name}_LIBRARIES )
-			set ( ${package_var_name}_LIBRARIES ${${package_var_name}_LIBRARY})
+			set ( ${package_var_name}_LIBRARIES ${${package_var_name}_LIBRARY} CACHE FILEPATH "${package_name} Libraries ")
 		endif ( NOT ${package_var_name}_LIBRARIES )
 		#todo : maybe we need a complete layer over that, Wk Modules handling Wk fetures such as run_libraries and correct variable name...

 		target_link_libraries(${PROJECT_NAME} ${${package_var_name}_LIBRARIES})
-		message ( "== Binary Dependency ${package_name} libs : ${${package_var_name}_LIBRARIES} OK !")
+		message ( STATUS "== Binary Dependency ${package_name} libs : ${${package_var_name}_LIBRARIES} OK !")
 		#if the find module also defines the runtime libraries ( Wk find module standard  NOT CMAKE itself !)
-		set( ${PROJECT_NAME}_RUN_LIBRARIES ${${PROJECT_NAME}_RUN_LIBRARIES} ${${package_var_name}_RUN_LIBRARIES} CACHE INTERNAL " libraries needed to run ${PROJECT_NAME} " )
+		set( ${PROJECT_NAME}_RUN_LIBRARIES ${${PROJECT_NAME}_RUN_LIBRARIES} ${${package_var_name}_RUN_LIBRARIES} CACHE FILEPATH " ${package_name} libraries needed to run ${PROJECT_NAME} " )
 		IF ( WIN32 )
-			message ( "== Binary Dependency ${package_name} runlibs : ${${package_var_name}_RUN_LIBRARIES} OK !")
+			message ( STATUS "== Binary Dependency ${package_name} runlibs : ${${package_var_name}_RUN_LIBRARIES} OK !")
 		ENDIF ( WIN32 )
-		#once the project is built with it the dependency becomes mandatory
+		# Once the project is built with it, the dependency becomes mandatory
+		# However we need to propagate hte location of dependencies, to make it easier for later
+		get_filename_component( ${package_name}_FDIR ${${package_name}_DIR} ABSOLUTE )
 		# we append to the config cmake script
 		file( APPEND ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake "

 ### External Dependency ${package_name} ###
 CMAKE_POLICY(PUSH)
 CMAKE_POLICY(VERSION 2.6)
-
-find_package( ${package_name} REQUIRED )
-if ( ${package_var_name}_FOUND )
-	set(${PROJECT_NAME}_INCLUDE_DIRS \${${PROJECT_NAME}_INCLUDE_DIRS} \"${${package_var_name}_INCLUDE_DIRS}\" )
-	set(${PROJECT_NAME}_LIBRARIES \${${PROJECT_NAME}_LIBRARIES} \"${${package_var_name}_LIBRARIES}\" )
-	set(${PROJECT_NAME}_RUN_LIBRARIES \${${PROJECT_NAME}_RUN_LIBRARIES} \"${${package_var_name}_RUN_LIBRARIES}\" )
-endif ( ${package_var_name}_FOUND )
-
+
+# We need to find the dependency here to get the directory of the library...
+#However we already know where it is going to be
+set ( ${package_name}_DIR ${${package_name}_FDIR} CACHE PATH \"Imported location of ${package_name} from ${PROJECT_NAME}\" )
+find_package( ${package_name} )
+
+# Include directory might be needed by upper project if ${PROJECT_NAME} doesn totally encapsulate it.
+# NB : It shouldnt hurt if the upper project also define it as its own dependency
+set(${PROJECT_NAME}_INCLUDE_DIRS \${${PROJECT_NAME}_INCLUDE_DIRS} \"${${package_var_name}_INCLUDE_DIRS}\" CACHE PATH \"${PROJECT_NAME} Headers\" )
+set(${PROJECT_NAME}_LIBRARIES \${${PROJECT_NAME}_LIBRARIES} \"${${package_var_name}_LIBRARIES}\" CACHE FILEPATH \"${PROJECT_NAME} Libraries\")
+if ( WIN32 )
+	set(${PROJECT_NAME}_RUN_LIBRARIES \${${PROJECT_NAME}_RUN_LIBRARIES} \"${${package_var_name}_RUN_LIBRARIES}\" CACHE FILEPATH \"${PROJECT_NAME} DLLs\" )
+endif ( WIN32 )
+
 CMAKE_POLICY(POP)

 		")

 	else ( ${package_var_name}_FOUND )
-		message ( "== Binary Dependency ${package_name} : FAILED ! " )
+		message ( STATUS "== Binary Dependency ${package_name} : FAILED ! " )
 	endif ( ${package_var_name}_FOUND )

 CMAKE_POLICY(POP)


Provide project brief description for doxygen

--- doc/Doxyfile.cmake
+++ doc/Doxyfile.cmake
@@ -40,7 +40,7 @@
 # for a project that appears at the top of each page and should give viewer
 # a quick idea about the purpose of the project. Keep the description short.

-PROJECT_BRIEF          =
+PROJECT_BRIEF          = "C++ vector expression template library for OpenCL/CUDA"

 # With the PROJECT_LOGO tag one can specify an logo or icon that is
 # included in the documentation. The maximum height of the logo should not


Fix the OCaml findlib META file for Plcairo to reflect the PLplot version

svn path=/trunk/; revision=10499

--- bindings/ocaml/plcairo/META.cmake
+++ bindings/ocaml/plcairo/META.cmake
@@ -2,7 +2,7 @@
 requires = "plplot"
 requires += "cairo"
 description = "PLplot Cairo extras"
-version = "0.1"
+version = "@VERSION@"
 browse_interfaces = " Plcairo "
 archive(byte) = "plcairo.cma"
 archive(native) = "plcairo.cmxa"


Don't set up pyclassad when not building python bindings #6486

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -783,13 +783,15 @@

 #####################################
 # Set the python helper info at the global level so we can reference it from the packaging.
-get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARIES} NAME)
-string(REGEX REPLACE "([0-9]+[.][0-9]+).*" "\\1" _PYTHON_VERSION ${PYTHON_VERSION_STRING})
-if ( ${PACKAGE_VERSION} MATCHES "([0-9]+)[.]([0-9]+)[.]([0-9]+)" )
+if(WITH_PYTHON_BINDINGS AND PYTHONLIBS_FOUND)
+  get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARIES} NAME)
+  string(REGEX REPLACE "([0-9]+[.][0-9]+).*" "\\1" _PYTHON_VERSION ${PYTHON_VERSION_STRING})
+  if ( ${PACKAGE_VERSION} MATCHES "([0-9]+)[.]([0-9]+)[.]([0-9]+)" )
     set( PYCLASSAD_LIB_NAME "pyclassad${_PYTHON_VERSION}_${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}" )
     set( UTILS_LIB_NAME "condor_utils_${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}" )
-else()
+  else()
     message(FATAL_ERROR "Can't determine HTCondor version!")
+  endif()
 endif()

 #####################################


libpyclassad should not get Python version from interpreter filename

--- build/cmake/CondorConfigure.cmake
+++ build/cmake/CondorConfigure.cmake
@@ -177,6 +177,8 @@
 						message(STATUS "PYTHON_LIBRARIES=${PYTHON_LIBRARIES}")
 						set(PYTHONLIBS_FOUND TRUE)
 						set(PYTHONINTERP_FOUND TRUE)
+						set(PYTHON_VERSION_STRING "${_PYTHON_VERSION_LIST}")
+						message(STATUS "Got PYTHON_VERSION_STRING = ${PYTHON_VERSION_STRING}")
 					endif()
 				endif()
 			endif()
@@ -781,8 +783,8 @@

 #####################################
 # Set the python helper info at the global level so we can reference it from the packaging.
-GET_FILENAME_COMPONENT(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARIES} NAME)
-STRING(REGEX REPLACE ".*python([0-9]+[.]?[0-9]+).*" "\\1" _PYTHON_VERSION ${PYTHON_EXECUTABLE})
+get_filename_component(PYTHON_LIBRARY_FILENAME ${PYTHON_LIBRARIES} NAME)
+string(REGEX REPLACE "([0-9]+[.][0-9]+).*" "\\1" _PYTHON_VERSION ${PYTHON_VERSION_STRING})
 if ( ${PACKAGE_VERSION} MATCHES "([0-9]+)[.]([0-9]+)[.]([0-9]+)" )
     set( PYCLASSAD_LIB_NAME "pyclassad${_PYTHON_VERSION}_${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}" )
     set( UTILS_LIB_NAME "condor_utils_${CMAKE_MATCH_1}_${CMAKE_MATCH_2}_${CMAKE_MATCH_3}" )


Related to bug 880: Accept make as well a gmake when searching the MakeCommand. And don't include \n in match expression

--- cmake/EigenConfigureTesting.cmake
+++ cmake/EigenConfigureTesting.cmake
@@ -24,9 +24,9 @@
 # At this stage, we can also add custom flags to the build tool through the user defined EIGEN_TEST_BUILD_FLAGS variable.
 file(READ  "${CMAKE_CURRENT_BINARY_DIR}/DartConfiguration.tcl" EIGEN_DART_CONFIG_FILE)
 # try to grab the default flags
-string(REGEX MATCH "MakeCommand:.*-- (.*)DefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+string(REGEX MATCH "MakeCommand:.*-- (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 if(NOT CMAKE_MATCH_1)
-string(REGEX MATCH "MakeCommand:.*gmake (.*)DefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
+string(REGEX MATCH "MakeCommand:.*make (.*)\nDefaultCTestConfigurationType" EIGEN_DUMMY ${EIGEN_DART_CONFIG_FILE})
 endif()
 string(REGEX REPLACE "MakeCommand:.*DefaultCTestConfigurationType" "MakeCommand: ${CMAKE_COMMAND} --build . --target buildtests --config \"\${CTEST_CONFIGURATION_TYPE}\" -- ${CMAKE_MATCH_1} ${EIGEN_TEST_BUILD_FLAGS}\nDefaultCTestConfigurationType"
        EIGEN_DART_CONFIG_FILE2 ${EIGEN_DART_CONFIG_FILE})


cmake: ignore redundant move warning for spdlog

--- cmake/external_dependencies.cmake
+++ cmake/external_dependencies.cmake
@@ -191,7 +191,7 @@
                   GIT_TAG v1.x
                   TEST_DEFINITIONS -DSPDLOG_FMT_EXTERNAL
                   TEST_LINK_LIBS ${FMT_TARGET_NAME}
-                  CXX_FLAGS "-Wno-attributes -Wno-reorder"
+                  CXX_FLAGS "-Wno-attributes -Wno-reorder -Wno-redundant-move"
                   )
 endfunction()


No need to create stamp files for dictionaries, better to depend on the {dictionary}.cxx for tests

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -380,20 +380,18 @@
   endforeach()

   #---call rootcint------------------------------------------
-  add_custom_command(OUTPUT ${dictionary}.stamp
-                     BYPRODUCTS ${dictionary}.cxx ${pcm_name} ${rootmap_name}
+  add_custom_command(OUTPUT ${dictionary}.cxx ${pcm_name} ${rootmap_name}
                      COMMAND ${command} -v2 -f  ${dictionary}.cxx ${newargs} ${excludepathsargs} ${rootmapargs}
                                         ${ARG_OPTIONS} ${definitions} ${includedirs} ${headerfiles} ${_linkdef}
-                     COMMAND ${CMAKE_COMMAND} -E touch ${dictionary}.stamp
                      IMPLICIT_DEPENDS ${_implicitdeps}
                      DEPENDS ${_list_of_header_dependencies} ${_linkdef} ${ROOTCINTDEP} ${ARG_DEPENDENCIES})
   get_filename_component(dictname ${dictionary} NAME)

   #---roottest compability
   if(ARG_NOINSTALL OR CMAKE_ROOTTEST_DICT OR (NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY))
-    add_custom_target(${dictname} DEPENDS ${dictionary}.stamp)
-  else()
-    add_custom_target(${dictname} DEPENDS ${dictionary}.stamp)
+    add_custom_target(${dictname} DEPENDS ${dictionary}.cxx)
+  else()
+    add_custom_target(${dictname} DEPENDS ${dictionary}.cxx)

     set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_TARGETS ${dictname})
     set_property(GLOBAL APPEND PROPERTY ROOT_DICTIONARY_FILES ${CMAKE_CURRENT_BINARY_DIR}/${dictionary}.cxx)


[cmake] IS_DIRECTORY "works best" with full paths:

Fixes ROOT_GENERATE_DICTIONARY not finding v7 headers.

--- cmake/modules/RootNewMacros.cmake
+++ cmake/modules/RootNewMacros.cmake
@@ -943,7 +943,7 @@

   if (PROJECT_NAME STREQUAL ROOT)
     include_directories(BEFORE "inc")
-    if(IS_DIRECTORY "v7/inc")
+    if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/v7/inc")
       include_directories(BEFORE "v7/inc")
     endif()
   endif()


compat: use: fail when pacakge is not found

But do not fail when trying to load *Config.cmake that are now
in qibuild/cmake
(PYTHON-TOOLS, QT-TOOLS for instance)

--- cmake/qibuild/compat/compat.cmake
+++ cmake/qibuild/compat/compat.cmake
@@ -3,12 +3,6 @@

 # This is to be used when the names of the
 # flags have changed:
-
-
-# TODO:
-# - subfolder in install_ functions
-# - ALL, REQUIRED, LINUX, in use_lib() <- filter this
-#

 # Example:
@@ -163,7 +157,24 @@
   qi_stage_cmake(${_NAME})
 endfunction()

-function(use)
+function(use module)
+  # Some modules are now in qibuild/cmake, so
+  # there is no need to find them anymore.
+  set(_known_modules
+    "PYTHON-TOOLS"
+  )
+
+  list(FIND _known_modules ${module} _index)
+
+  if(NOT ${_index} EQUAL -1)
+    qi_deprecated("use(${module}) is deprecated.
+    This code has been put in qibuild/cmake.
+    You can safely remove the call to this line now
+    ")
+    return()
+  endif()
+
+
   qi_deprecated("use() is deprecated
    Simply use find_package() instead.
   Old:
@@ -173,7 +184,7 @@
     qi_stage_cmake(foo)
     find_package(foo)
   ")
-  find_package(${ARGN} QUIET)
+  find_package(${module} REQUIRED)
 endfunction()

 function(use_lib)


Revert back the Urho3D CMake common module.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -468,8 +468,6 @@
 # This macro should be called before the CMake target has been added
 # Typically, user should indirectly call this macro by using the 'PCH' option when calling define_source_file() macro
 macro (enable_pch HEADER_PATHNAME)
-    message (STATUS ${HEADER_PATHNAME})
-
     # Determine the precompiled header output filename
     get_filename_component (HEADER_FILENAME ${HEADER_PATHNAME} NAME)
     if (CMAKE_COMPILER_IS_GNUCXX)
@@ -515,7 +513,6 @@
         endif ()
     else ()
         # GCC or Clang
-        message (STATUS "GCC/Clang")
         if (TARGET ${TARGET_NAME})
             # Cache the compiler flags setup for the current scope so far
             get_directory_property (COMPILE_DEFINITIONS COMPILE_DEFINITIONS)
@@ -536,29 +533,20 @@
             # Make sure the precompiled headers are not stale by creating custom rules to re-compile the header as necessary
             file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${PCH_FILENAME})
             foreach (CONFIG ${CMAKE_CONFIGURATION_TYPES} ${CMAKE_BUILD_TYPE})   # These two vars are mutually exclusive
-                message(STATUS ${CONFIG})
                 # Generate *.rsp containing configuration specific compiler flags
                 string (TOUPPER ${CONFIG} UPPERCASE_CONFIG)
-                message(STATUS "Writing file: ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new")
                 file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new "${COMPILE_DEFINITIONS} ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${UPPERCASE_CONFIG}} ${COMPILER_EXPORT_FLAGS} ${INCLUDE_DIRECTORIES} -c -x c++-header")
-                message(STATUS "Executing process: ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp")
                 execute_process (COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp)
                 file (REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp.new)
                 # Determine the dependency list
-                message(STATUS "Executing process: ${CMAKE_CXX_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -MTdeps -MM -o ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_PATHNAME}")
                 execute_process (COMMAND ${CMAKE_CXX_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -MTdeps -MM -o ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_PATHNAME} RESULT_VARIABLE CXX_COMPILER_EXIT_CODE)
                 if (NOT CXX_COMPILER_EXIT_CODE EQUAL 0)
                     message (FATAL_ERROR "The configured compiler toolchain in the build tree is not able to handle all the compiler flags required to build the project. "
                         "Please kindly update your compiler toolchain to its latest version. If you are using MinGW then make sure it is MinGW-W64 instead of MinGW-W32 or TDM-GCC (Code::Blocks default). "
                         "However, if you think there is something wrong with the compiler flags being used then please file a bug report to the project devs.")
                 endif ()
-                message(STATUS "Result: ${DEPS_RESULT}")
-                message(STATUS "Output: ${DEPS_OUT}")
-                message(STATUS "Reading file: ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps")
                 file (STRINGS ${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.deps DEPS)
-                message(STATUS "Dependencies read: ${DEPS}")
                 string (REGEX REPLACE "^deps: *| *\\; +" ";" DEPS ${DEPS})
-                message(STATUS "Dependencies regex: ${DEPS}")
                 # Create the rule that depends on the included headers
                 add_custom_command (OUTPUT ${HEADER_FILENAME}.${CONFIG}.pch.trigger
                     COMMAND ${CMAKE_CXX_COMPILER} @${CMAKE_CURRENT_BINARY_DIR}/${HEADER_FILENAME}.${CONFIG}.pch.rsp -o ${PCH_FILENAME}/${PCH_FILENAME}.${CONFIG} ${CMAKE_CURRENT_SOURCE_DIR}/${HEADER_PATHNAME}


OPENSSL: incorrect configure script used

--- SuperBuild/CMake/External_openssl.cmake
+++ SuperBuild/CMake/External_openssl.cmake
@@ -55,7 +55,7 @@
       INSTALL_DIR ${SB_INSTALL_PREFIX}
       DOWNLOAD_DIR ${DOWNLOAD_LOCATION}
       PATCH_COMMAND  ${CMAKE_COMMAND} -E copy_directory ${OPENSSL_SB_SRC} ${OPENSSL_SB_BUILD_DIR}
-      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR} ./Configure ${OPENSSL_BUILD_ARCH}
+      CONFIGURE_COMMAND ${CMAKE_COMMAND} -E chdir ${OPENSSL_SB_BUILD_DIR} ./config ${OPENSSL_BUILD_ARCH}
       --prefix=${SB_INSTALL_PREFIX} shared zlib zlib-dynamic -I${SB_INSTALL_PREFIX}/include -L${SB_INSTALL_PREFIX}/lib
       BUILD_COMMAND $(MAKE)
       INSTALL_COMMAND $(MAKE) install


BUG: Bump ITKUltrasound for SliceSeries angle direction fix

--- SuperBuild/External_ITKUltrasound.cmake
+++ SuperBuild/External_ITKUltrasound.cmake
@@ -7,8 +7,8 @@
 set(${proj}_DEPENDENCIES )
 ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

-# disable-wrapping 2016-05-31
-set(${proj}_GIT_TAG 0c4d6594ef31ac1f36278f97081b578532474547)
+# disable-wrapping 2016-06-01
+set(${proj}_GIT_TAG 3468f98076b617ea2d1704a78db4a0f6e6b8cedf)
 ExternalProject_Add(${proj}
   ${${proj}_EP_ARGS}
   GIT_REPOSITORY ${git_protocol}://github.com/thewtex/ITKUltrasound.git


fix build

fix build

--- SuperBuild/External_astra-toolbox.cmake
+++ SuperBuild/External_astra-toolbox.cmake
@@ -101,15 +101,15 @@
       # apparently this is the only way to pass environment variables to
       # external projects
       CONFIGURE_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux
-        ${CMAKE_COMMAND} -E env ./autogen.sh
-        ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix
+        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ./autogen.sh
+        #${CMAKE_COMMAND} -E env ./autogen.sh

       # This build is Unix specific
       BUILD_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux make install-libraries
+        ${CMAKE_COMMAND} -E env ${cmd} --with-cuda=${CUDA_TOOLKIT_ROOT_DIR} --prefix=${libastra_Install_Dir} --with-install-type=prefix
       INSTALL_COMMAND
-        ${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h
+        ${CMAKE_COMMAND} -E chdir ${${proj}_BINARY_DIR}/ make -j install-libraries
+        #${CMAKE_COMMAND} -E chdir ${${proj}_SOURCE_DIR}/build/linux ls -h
       DEPENDS
         ${${proj}_DEPENDENCIES}
     )
@@ -122,7 +122,7 @@
 #! /bin/bash
 set -ex

-CPPFLAGS="-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build
+CPPFLAGS=\"-DASTRA_CUDA -DASTRA_PYTHON -I${SUPERBUILD_INSTALL_DIR}/include -L${SUPERBUILD_INSTALL_DIR}/lib -I${${proj}_SOURCE_DIR}/include\" CC=${CMAKE_C_COMPILER} ${PYTHON_EXECUTABLE} builder.py build
 ")


added linker runtime sanitization flags

added linker runtime sanitization flags

without them, linux linker fails with:
    undefined reference to `__ubsan_handle_sub_overflow'
    undefined reference to `__asan_report_load8'
    undefined reference to `__asan_init'
    ...
    ... and much more

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -17,6 +17,7 @@
 # http://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
 # http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
 set( TNUN_compiler_runtime_sanity_checks -fsanitize=undefined -fsanitize=integer -fsanitize=address -fno-omit-frame-pointer )
+set( TNUN_linker_runtime_sanity_checks -Wl,-fsanitize=address ubsan )

 # Implementation note:
 # When clang is used behind ccache, it throws a lot of "unused-argument" warnings.


Added an implementation note.

Added an implementation note.

--- toolchains/clang.cmake
+++ toolchains/clang.cmake
@@ -24,6 +24,7 @@

 # Leak sanitizer is available only on Clang on Linux x64.
 # http://clang.llvm.org/docs/LeakSanitizer.html
+# Currently it is very very slow (two orders of magnitude slower than Valgrind).
 #if( ${CMAKE_SYSTEM_NAME} MATCHES "Linux" AND TNUN_ABI STREQUAL "x64" )
 #    list( APPEND TNUN_compiler_runtime_sanity_checks -fsanitize=leak )
 #    list( APPEND TNUN_linker_runtime_sanity_checks -fsanitize=leak)


No modify path form by default.

No modify path form by default.

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

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

--- build-aux/cmake/modules/CPackInfo.cmake
+++ build-aux/cmake/modules/CPackInfo.cmake
@@ -50,7 +50,7 @@
   set(CPACK_NSIS_HELP_LINK ${PROJECT_HELP_LINK})
   set(CPACK_NSIS_URL_INFO_ABOUT ${PROJECT_HOMEPAGE})
   set(CPACK_NSIS_CONTACT ${PROJECT_SUPPORT})
-  set(CPACK_NSIS_MODIFY_PATH ON)
+  set(CPACK_NSIS_MODIFY_PATH OFF)
 else(WIN32 AND NOT UNIX)
   # Compute list of programs to strip.
   foreach(i ${INSTALLED_PROGRAMS})


Include GLM from vcpkg

Include GLM from vcpkg

--- 3rdparty/3rdparty.cmake
+++ 3rdparty/3rdparty.cmake
@@ -27,8 +27,7 @@
 # Header only libraries #
 #########################

-include_target(glm::glm "${CMAKE_CURRENT_LIST_DIR}/glm")
-set_target_properties(glm::glm PROPERTIES INTERFACE_COMPILE_DEFINITIONS "GLM_ENABLE_EXPERIMENTAL")
+find_package(GLM REQUIRED)

 include_target(nlohmann::json "${CMAKE_CURRENT_LIST_DIR}/json/single_include")
 include_target(spirv::headers "${CMAKE_CURRENT_LIST_DIR}/SPIRV-Headers")


[CMake] Add tf_cc_while_loop to the list of objects in tf_shared_lib.cmake.

This addresses an unknown external symbol error when attempting to link the
shared library.

Partially addresses #13448.

PiperOrigin-RevId: 170899880

--- tensorflow/contrib/cmake/tf_shared_lib.cmake
+++ tensorflow/contrib/cmake/tf_shared_lib.cmake
@@ -27,6 +27,7 @@
       $<TARGET_OBJECTS:tf_cc>
       $<TARGET_OBJECTS:tf_cc_framework>
       $<TARGET_OBJECTS:tf_cc_ops>
+      $<TARGET_OBJECTS:tf_cc_while_loop>
       $<TARGET_OBJECTS:tf_core_lib>
       $<TARGET_OBJECTS:tf_core_cpu>
       $<TARGET_OBJECTS:tf_core_framework>
@@ -63,6 +64,7 @@
     $<TARGET_OBJECTS:tf_cc>
     $<TARGET_OBJECTS:tf_cc_framework>
     $<TARGET_OBJECTS:tf_cc_ops>
+    $<TARGET_OBJECTS:tf_cc_while_loop>
     $<TARGET_OBJECTS:tf_core_lib>
     $<TARGET_OBJECTS:tf_core_cpu>
     $<TARGET_OBJECTS:tf_core_framework>


Fix linux build

Fix linux build

--- modules/zlib.cmake
+++ modules/zlib.cmake
@@ -14,6 +14,9 @@

   # Set module options
   option(AMD64 "Enable building amd64 assembly implementation" ON)
+
+  # Includes
+  include_directories("zlib")

   # Add module subdirectory
   add_subdirectory("zlib")


Remove newline in CMake output

Remove newline in CMake output

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

--- EqCompilerVersion.cmake
+++ EqCompilerVersion.cmake
@@ -3,7 +3,7 @@
 FUNCTION(EQ_COMPILER_DUMPVERSION OUTPUT_VERSION)
   EXECUTE_PROCESS(COMMAND
     ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
-    OUTPUT_VARIABLE EQ_COMPILER_VERSION
+    OUTPUT_VARIABLE EQ_COMPILER_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE
   )
   STRING(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2"
     EQ_COMPILER_VERSION ${EQ_COMPILER_VERSION})


Set minor version to month

Set minor version to month

--- Applications/mitkDiffusion/CPackOptions.cmake
+++ Applications/mitkDiffusion/CPackOptions.cmake
@@ -6,7 +6,7 @@
 # Major version is the year of release
 set(CPACK_PACKAGE_VERSION_MAJOR "2012")
 # Minor version is the month of release
-set(CPACK_PACKAGE_VERSION_MINOR "")
+set(CPACK_PACKAGE_VERSION_MINOR "09")
 # Patch versioning is not intended to be done
 set(CPACK_PACKAGE_VERSION_PATCH "")


ENH: Sync ITK version with 3D Slicer

ENH: Sync ITK version with 3D Slicer

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -37,9 +37,9 @@
   ${github_protocol}://github.com/TubeTK/TubeTK-ImageViewer.git )
 set( ImageViewer_GIT_TAG 44adad4d8cc00e33b7c478c4bd0f4eb901bd7814 )

-# Insight Segmentation and Registration Toolkit snapshot 2013-07-12 12:08:29
+# Insight Segmentation and Registration Toolkit snapshot 2013-08-28 16:10:36
 set( ITK_GIT_REPOSITORY ${github_protocol}://github.com/Kitware/ITK.git )
-set( ITK_GIT_TAG 35b90133a793ffd884820e499175db19366fe627 )
+set( ITK_GIT_TAG 237932867d8491db6a7745e6b4cc2b25f8e4470c )

 # JsonCpp snapshot 2013-08-08 23:08:28
 set( JsonCpp_SVN_REPOSITORY


CMake: - some edit of accumulate environment macro

--- salome_adm/cmake_files/SalomeMacros.cmake
+++ salome_adm/cmake_files/SalomeMacros.cmake
@@ -657,9 +657,19 @@
 #
 MACRO(SALOME_ACCUMULATE_ENVIRONMENT envvar)
   FOREACH(_item ${ARGN})
-    LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
-    IF(_res EQUAL -1)
-      LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+    IF(EXISTS ${_item})
+      IF(IS_DIRECTORY ${_item})
+        LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item} _res)
+        IF(_res EQUAL -1)
+          LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_item})
+        ENDIF()
+      ELSE()
+        GET_FILENAME_COMPONENT(_path_dir ${_item} PATH)
+        LIST(FIND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_path_dir} _res)
+        IF(_res EQUAL -1)
+          LIST(APPEND _${PROJECT_NAME}_EXTRA_ENV_${envvar} ${_path_dir})
+        ENDIF()
+      ENDIF()
     ENDIF()
   ENDFOREACH()
   LIST(FIND _${PROJECT_NAME}_EXTRA_ENV ${envvar} _res)


fixed: HUGH_INSTALL_PREFIX vs CMAKE_INSTALL_PREFIX consistency

--- share/hugh/cmake/SetupInstallPrefix.cmake
+++ share/hugh/cmake/SetupInstallPrefix.cmake
@@ -7,14 +7,14 @@
 ####################################################################################################

 if(DEFINED ENV{HUGH_INSTALL_PREFIX})
-  set(HUGH_INSTALL_PREFIX $ENV{HUGH_INSTALL_PREFIX} CACHE INTERNAL "HUGH Installation Root")
+  set(HUGH_INSTALL_PREFIX $ENV{HUGH_INSTALL_PREFIX} CACHE INTERNAL "HUGH Installation Root" FORCE)
 endif()

 if(NOT HUGH_INSTALL_PREFIX)
-  set(HUGH_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE INTERNAL "HUGH Installation Root")
+  set(HUGH_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE INTERNAL "HUGH Installation Root" FORCE)
 endif()

-set(CMAKE_INSTALL_PREFIX ${HUGH_INSTALL_PREFIX})
+set(CMAKE_INSTALL_PREFIX ${HUGH_INSTALL_PREFIX} CACHE INTERNAL "" FORCE)

 if(TRUE OR VERBOSE)
   message(STATUS "CMAKE_INSTALL_PREFIX set to '" ${CMAKE_INSTALL_PREFIX} "'")


nomsg

nomsg

--- OTBLibraryDepends.cmake
+++ OTBLibraryDepends.cmake
@@ -1,2 +1,3 @@
 SET(OTBCommon_LIB_DEPENDS "ITKCommon;")
 SET(OTBIO_LIB_DEPENDS "ITKIO;")
+SET(OTBFeatureExtraction_LIB_DEPENDS "ITKCommon;")