Use proper LIB_SUFFIX for libraries installation path.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -44,7 +44,8 @@
 endif()

 # Installation dirs
-set_parent_scope(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib)
+include(CorradeLibSuffix)
+set_parent_scope(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
 set_parent_scope(MAGNUM_PLUGINS_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
 set_parent_scope(MAGNUM_PLUGINS_IMPORTER_INSTALL_DIR ${MAGNUM_PLUGINS_INSTALL_DIR}/importers)
 set_parent_scope(MAGNUM_CMAKE_MODULE_INSTALL_DIR ${CMAKE_ROOT}/Modules)


Updated FindMagnum.cmake from Mangum repository.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -14,13 +14,13 @@
 # components. The base library depends on Corrade, OpenGL and GLEW
 # libraries. Additional dependencies are specified by the components. The
 # optional components are:
-#  DebugTools       - DebugTools library (depends on MeshTools, Physics,
-#                     Primitives, SceneGraph and Shaders components)
+#  DebugTools       - DebugTools library (depends on MeshTools, Primitives,
+#                     SceneGraph, Shaders and Shapes components)
 #  MeshTools        - MeshTools library
-#  Physics          - Physics library (depends on SceneGraph component)
 #  Primitives       - Primitives library
 #  SceneGraph       - SceneGraph library
 #  Shaders          - Shaders library
+#  Shapes           - Shapes library (depends on SceneGraph component)
 #  Text             - Text library (depends on TextureTools component)
 #  TextureTools     - TextureTools library
 #  GlutApplication  - GLUT application (depends on GLUT library)
@@ -224,7 +224,7 @@

     # DebugTools library
     if(${component} STREQUAL DebugTools)
-        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Profiler.h)
+        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES DebugTools.h)
     endif()

     # Mesh tools library
@@ -232,11 +232,6 @@
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES CompressIndices.h)
     endif()

-    # Physics library
-    if(${component} STREQUAL Physics)
-        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES AbstractShape.h)
-    endif()
-
     # Primitives library
     if(${component} STREQUAL Primitives)
         set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Cube.h)
@@ -244,17 +239,22 @@

     # Scene graph library
     if(${component} STREQUAL SceneGraph)
-        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Scene.h)
+        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES SceneGraph.h)
     endif()

     # Shaders library
     if(${component} STREQUAL Shaders)
-        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES PhongShader.h)
+        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Shaders.h)
+    endif()
+
+    # Shapes library
+    if(${component} STREQUAL Shapes)
+        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Shapes.h)
     endif()

     # Text library
     if(${component} STREQUAL Text)
-        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES AbstractFont.h)
+        set(_MAGNUM_${_COMPONENT}_INCLUDE_PATH_NAMES Text.h)
     endif()

     # TextureTools library


[doxyrest] release 1.0.1

[doxyrest] release 1.0.1

--- version.cmake
+++ version.cmake
@@ -11,7 +11,7 @@

 set (DOXYREST_VERSION_MAJOR     1)
 set (DOXYREST_VERSION_MINOR     0)
-set (DOXYREST_VERSION_REVISION  0)
+set (DOXYREST_VERSION_REVISION  1)
 set (DOXYREST_VERSION_TAG)

 set (DOXYREST_VERSION_FULL "${DOXYREST_VERSION_MAJOR}.${DOXYREST_VERSION_MINOR}.${DOXYREST_VERSION_REVISION}")


Graph Control 4.0.0-rc9 Release Candidate 9

Signed-off-by: Richard Chapman <5900d56196fe29dba8e3ae556d57eae28e9f0195@hpccsystems.com>

--- version.cmake
+++ version.cmake
@@ -6,7 +6,7 @@
 set ( HPCC_MINOR 0 )
 set ( HPCC_POINT 0 )
 set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 8 )
+set ( HPCC_SEQUENCE 9 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


[jancy] release 1.8.2

[jancy] release 1.8.2

version bump prior releasing ioninja-3.8.4

--- version.cmake
+++ version.cmake
@@ -11,7 +11,7 @@

 set (JANCY_VERSION_MAJOR     1)
 set (JANCY_VERSION_MINOR     8)
-set (JANCY_VERSION_REVISION  1)
+set (JANCY_VERSION_REVISION  2)
 set (JANCY_VERSION_TAG)

 set (JANCY_VERSION_FULL "${JANCY_VERSION_MAJOR}.${JANCY_VERSION_MINOR}.${JANCY_VERSION_REVISION}")


version.cmake - need to talk to Neil about how to fix this..

--- version.cmake
+++ version.cmake
@@ -28,18 +28,32 @@
 		OUTPUT_STRIP_TRAILING_WHITESPACE
 	)
 	message(" Git describe: ${GIT_DESCRIBE}")
-	string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-RC[0-9]+)?-([0-9]+)-([^-]+)-?([^-]*)$" GIT_REPO_MATCH ${GIT_DESCRIBE})
-	#message("Matched version: ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${CMAKE_MATCH_3} ${CMAKE_MATCH_4}")
+
+	if ("${GIT_DESCRIBE}" STREQUAL "")
+		set(ODC_MAJOR_VERSION "0")
+		set(ODC_MINOR_VERSION "0")
+		set(ODC_MICRO_VERSION "0")
+		set(ODC_RC_VERSION "")
+		set(ODC_AHEAD_VERSION "0")
+		set(ODC_VERSION "${ODC_MAJOR_VERSION}.${ODC_MINOR_VERSION}.${ODC_MICRO_VERSION}${ODC_RC_VERSION}")

-	set(ODC_MAJOR_VERSION ${CMAKE_MATCH_1})
-	set(ODC_MINOR_VERSION ${CMAKE_MATCH_2})
-	set(ODC_MICRO_VERSION ${CMAKE_MATCH_3})
-	set(ODC_RC_VERSION ${CMAKE_MATCH_4})
-	set(ODC_AHEAD_VERSION ${CMAKE_MATCH_5})
-	set(ODC_VERSION "${ODC_MAJOR_VERSION}.${ODC_MINOR_VERSION}.${ODC_MICRO_VERSION}${ODC_RC_VERSION}")
+		set(GIT_REPO_COMMIT "TESTBUILD")
+		set(GIT_REPO_DIRTY "")
+	else()
+		string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)(-RC[0-9]+)?-([0-9]+)-([^-]+)-?([^-]*)$" GIT_REPO_MATCH ${GIT_DESCRIBE})
+		#message("Matched version: ${CMAKE_MATCH_1} ${CMAKE_MATCH_2} ${CMAKE_MATCH_3} ${CMAKE_MATCH_4}")

-	set(GIT_REPO_COMMIT ${CMAKE_MATCH_6})
-	set(GIT_REPO_DIRTY ${CMAKE_MATCH_7})
+		set(ODC_MAJOR_VERSION ${CMAKE_MATCH_1})
+		set(ODC_MINOR_VERSION ${CMAKE_MATCH_2})
+		set(ODC_MICRO_VERSION ${CMAKE_MATCH_3})
+		set(ODC_RC_VERSION ${CMAKE_MATCH_4})
+		set(ODC_AHEAD_VERSION ${CMAKE_MATCH_5})
+		set(ODC_VERSION "${ODC_MAJOR_VERSION}.${ODC_MINOR_VERSION}.${ODC_MICRO_VERSION}${ODC_RC_VERSION}")
+
+		set(GIT_REPO_COMMIT ${CMAKE_MATCH_6})
+		set(GIT_REPO_DIRTY ${CMAKE_MATCH_7})
+	endif()
+
 	message("-- opendatacon version: ${ODC_VERSION} ${GIT_REPO_COMMIT}(${ODC_AHEAD_VERSION} ahead) ${GIT_REPO_DIRTY}")

 	execute_process(


All: Bump dev version number

All: Bump dev version number

--- version.cmake
+++ version.cmake
@@ -2,9 +2,9 @@
 	set(PROJECT_NAME "mGBA")
 endif()
 set(LIB_VERSION_MAJOR 0)
-set(LIB_VERSION_MINOR 3)
+set(LIB_VERSION_MINOR 4)
 set(LIB_VERSION_PATCH 0)
-set(LIB_VERSION_ABI 0.3)
+set(LIB_VERSION_ABI 0.4)
 set(LIB_VERSION_STRING ${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH})

 execute_process(COMMAND git describe --always --abbrev=40 --dirty OUTPUT_VARIABLE GIT_COMMIT ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)


ENH: Different buildname to differentiate Munit.

Give a unique build name so that we can tell the build with MUnit
from the build without MUnit.

--- Scripts/runDashboardBuildWithMUnit.cmake
+++ Scripts/runDashboardBuildWithMUnit.cmake
@@ -1,6 +1,6 @@
 #Client maintainer: name@email
 set(CTEST_SITE "osehra001.rackspace")
-set(CTEST_BUILD_NAME "RHEL6.1-GT.M")
+set(CTEST_BUILD_NAME "RHEL6.1-GT.M-MUnit")
 set(dashboard_cache "
 GTMPROFILE:PATH=$ENV{gtmprofilefile}
 VISTA_GLOBALS_DIR:PATH=$ENV{VistAGlobalsDir}


Fix misleading message.

Fix misleading message.

--- cmake/FindCLHPP.cmake
+++ cmake/FindCLHPP.cmake
@@ -27,9 +27,9 @@
 )

 if (CLHPP_INCLUDE_DIR)
-  message("-- Found OpenCL 2.0 C++ headers: " ${CLHPP_INCLUDE_DIR})
+  message("-- Found OpenCL C++ header v2: " ${CLHPP_INCLUDE_DIR})
   set(CLHPP_FOUND ON)
 else()
-  message(STATUS "OpenCL 2.0 C++ headers is not installed.")
+  message(STATUS "OpenCL C++ header v2 is not installed.")
   set(CLHPP_FOUND OFF)
 endif()


Fix alignment of macro FIND_AND_ADD_CLANG_LIB

--- cmake/Findclang.cmake
+++ cmake/Findclang.cmake
@@ -44,7 +44,7 @@
           /usr/local/llvm80/include
           /mingw64/include)

-      macro(FIND_AND_ADD_CLANG_LIB _libname_)
+  macro(FIND_AND_ADD_CLANG_LIB _libname_)
       string(TOUPPER ${_libname_} _prettylibname_)
       find_library(CLANG_${_prettylibname_}_LIB NAMES ${_libname_}
           PATHS


better ?

better ?

--- cmake/UseCyclus.cmake
+++ cmake/UseCyclus.cmake
@@ -91,7 +91,7 @@
     # set cpp path

     IF(DEFINED ENV{CPP})
-        SET(SYS_CPP "ENV{CPP}")
+        SET(SYS_CPP "$ENV{CPP}")
     ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
         SET(SYS_CPP "clang++")
     ELSE()


[sanitizers] Upgrade ios min version to 8

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

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -208,7 +208,7 @@
     list(APPEND DARWIN_EMBEDDED_PLATFORMS ios)
     set(DARWIN_ios_MIN_VER_FLAG -miphoneos-version-min)
     set(DARWIN_ios_SANITIZER_MIN_VER_FLAG
-      ${DARWIN_ios_MIN_VER_FLAG}=7.0)
+      ${DARWIN_ios_MIN_VER_FLAG}=8.0)
   endif()
   if(COMPILER_RT_ENABLE_WATCHOS)
     list(APPEND DARWIN_EMBEDDED_PLATFORMS watchos)


[tsan] Disable x86_64h build that was enabled as part of r259542.

It fails almost every test on clang-stage1-cmake-RA_check.

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -299,6 +299,9 @@
 if(APPLE)
   include(CompilerRTDarwinUtils)

+  # tsan fails almost everything for x86_64h
+  list(REMOVE_ITEM ALL_TSAN_SUPPORTED_ARCH x86_64h)
+
   # On Darwin if /usr/include doesn't exist, the user probably has Xcode but not
   # the command line tools. If this is the case, we need to find the OS X
   # sysroot to pass to clang.


[cmakeswitch to master branch for nd as external project

--- cmake/nd-config.cmake
+++ cmake/nd-config.cmake
@@ -12,7 +12,7 @@
   set(ND_GIT_REPOSITORY ssh://git@bitbucket.org/nclack/nd.git CACHE STRING "Location of the git repository for libnd.")
   ExternalProject_Add(libnd
     GIT_REPOSITORY ${ND_GIT_REPOSITORY}
-    GIT_TAG spin-off-plugins
+    # GIT_TAG spin-off-plugins
     # UPDATE_COMMAND ""
     # UPDATE_COMMAND ${GIT_EXECUTABLE} pull origin master
     LIST_SEPARATOR ^^


remove rcgen.cmake, since it doesn't seem to be needed for anything.

svn path=/trunk/playground/network/telepathy-integration-daemon/; revision=984641

--- kpeople/nepomuk-feeder/nie/rcgen.cmake
+++ kpeople/nepomuk-feeder/nie/rcgen.cmake
@@ -1,45 +0,0 @@
-# a CMake script. envoke with the -P option
-
-# must define
-# targetdir
-# ontofile1, ontofile2, ontofile3, ontofile4
-# _rcgen
-
-file(TO_NATIVE_PATH ${_rcgen} _rcgen)
-
-execute_process(
-  COMMAND ${_rcgen} --listheaders --prefix ${targetdir}/ --ontologies ${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4}
-  OUTPUT_VARIABLE _out_headers
-  RESULT_VARIABLE _rcgen_result
-  ERROR_QUIET
-  )
-file(WRITE ${targetdir}/out_headers "${_out_headers}")
-
-# If the first call succeeds it is very very likely that the rest will, too
-if(${_rcgen_result} EQUAL 0)
-
-  execute_process(
-    COMMAND ${_rcgen} --listsources --prefix ${targetdir}/ --ontologies ${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4}
-    OUTPUT_VARIABLE _out_sources
-    ERROR_QUIET
-    )
-  file(WRITE ${targetdir}/out_sources "${_out_sources}")
-
-  execute_process(
-    COMMAND ${_rcgen} --listincludes --ontologies ${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4}
-    OUTPUT_VARIABLE _out_includes
-    ERROR_QUIET
-    )
-  file(WRITE ${targetdir}/out_includes "${_out_includes}")
-
-  execute_process(
-    COMMAND ${_rcgen} --writeall --templates "DUMMY" --target ${targetdir}/ --ontologies ${ontofile1} ${ontofile2} ${ontofile3} ${ontofile4}
-    ERROR_QUIET
-    )
-
-else(${_rcgen_result} EQUAL 0)
-
-  message(FATAL_ERROR "Failed to generate Nepomuk resource classes. Do you have a recent Soprano version?")
-
-endif(${_rcgen_result} EQUAL 0)
-


Comment cleanup. Left Andrew's RPM lines commented out

--- src/toolbox/cmake/cpack_settings.cmake
+++ src/toolbox/cmake/cpack_settings.cmake
@@ -1,14 +1,9 @@
 #Tweaks for the different package types
-message(STATUS "========loading ${CPACK_GENERATOR} config==========")

 if (${CPACK_GENERATOR} STREQUAL "DEB")
-   message(STATUS "Building DEBIAN packages")
    set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
-#   set(CPACK_DEB_COMPONENT_INSTALL ON)
-#   set(CPACK_COMPONENTS_ALL libraries headers)
 elseif (${CPACK_GENERATOR} STREQUAL "RPM")
-   message(STATUS "Building RPM packages")
-else()
-   message(STATUS "Building ${CPACK_GENERATOR} packages")
+   #set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.0.1e")
+   #set(CPACK_RPM_PACKAGE_AUTOREQPROV " no")
 endif()


bugfix in ispc.cmake

bugfix in ispc.cmake

--- common/cmake/ispc.cmake
+++ common/cmake/ispc.cmake
@@ -21,7 +21,8 @@

 IF (NOT __XEON__)
   execute_process(COMMAND which ispc OUTPUT_VARIABLE ISPC_EXECUTABLE)
-  execute_process(COMMAND dirname ${ISPC_EXECUTABLE} OUTPUT_VARIABLE ISPC_DIR)
+  execute_process(COMMAND dirname ${ISPC_EXECUTABLE} OUTPUT_VARIABLE ISPC_DIR_TEMP)
+  STRING(REGEX REPLACE "\n" "" ISPC_DIR "${ISPC_DIR_TEMP}")
 ENDIF ()

 MACRO (ispc_compile targets)


 - обновлен cmake-макрос для двухпроходной компиляции

git-svn-id: 41bd7e47c31e4d43f97241d7529f6785d233c6d8@12409 23f926e6-80f1-49ca-85a0-60d4a27bb3ac

--- rdo/packages/cmake/trunk/split-bison.cmake
+++ rdo/packages/cmake/trunk/split-bison.cmake
@@ -39,26 +39,26 @@

-	IF(MSVC)
+	IF(WIN32)
 		ADD_CUSTOM_COMMAND(
 			OUTPUT ${OUTPUT_FILE}
 			COMMAND set BISON_PKGDATADIR=${BISON_FLEX_DIRECTORY}/share/bison
 			COMMAND set BISON_PATH=${BISON_EXECUTABLE} -g -v ${BISON_DEFINE}
 			COMMAND ${PROJECT_SOURCE_DIR}/scripts/python/split-bison.py ARGS ${${INPUT_FILE}_INPUT} -y1 ${BISON_${FILE_TYPE}_INPUT_1} -y2 ${BISON_${FILE_TYPE}_INPUT_2}
-                        COMMAND ${PROJECT_SOURCE_DIR}/scripts/python/run-bison.py ARGS ${${INPUT_FILE}_INPUT} -y1 ${BISON_${FILE_TYPE}_INPUT_1} -y2 ${BISON_${FILE_TYPE}_INPUT_2} -o1 ${CPP_OUTPUT_FILE_1} -o2 ${CPP_OUTPUT_FILE_2} -n1 ${Y_1} -n2 ${Y_2}
+			COMMAND ${PROJECT_SOURCE_DIR}/scripts/python/run-bison.py ARGS ${${INPUT_FILE}_INPUT} -y1 ${BISON_${FILE_TYPE}_INPUT_1} -y2 ${BISON_${FILE_TYPE}_INPUT_2} -o1 ${CPP_OUTPUT_FILE_1} -o2 ${CPP_OUTPUT_FILE_2} -n1 ${Y_1} -n2 ${Y_2}
 			DEPENDS ${${INPUT_FILE}_INPUT}
 			COMMENT "[BISON][rdo${INPUT_FILE}] Building parser with bison ${BISON_VERSION}"
 			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 		)
-	ELSE(MSVC)
+	ELSE()
 		ADD_CUSTOM_COMMAND(
 			OUTPUT ${OUTPUT_FILE}
 			COMMAND export BISON_PATH=${BISON_EXECUTABLE} -g -v ${BISON_DEFINE}
 			COMMAND ${PROJECT_SOURCE_DIR}/scripts/python/split-bison.py ARGS ${${INPUT_FILE}_INPUT} -y1 ${BISON_${FILE_TYPE}_INPUT_1} -y2 ${BISON_${FILE_TYPE}_INPUT_2}
-                        COMMAND ${PROJECT_SOURCE_DIR}/scripts/python/run-bison.py ARGS ${${INPUT_FILE}_INPUT} -y1 ${BISON_${FILE_TYPE}_INPUT_1} -y2 ${BISON_${FILE_TYPE}_INPUT_2} -o1 ${CPP_OUTPUT_FILE_1} -o2 ${CPP_OUTPUT_FILE_2} -n1 ${Y_1} -n2 ${Y_2}
+			COMMAND ${PROJECT_SOURCE_DIR}/scripts/python/run-bison.py ARGS ${${INPUT_FILE}_INPUT} -y1 ${BISON_${FILE_TYPE}_INPUT_1} -y2 ${BISON_${FILE_TYPE}_INPUT_2} -o1 ${CPP_OUTPUT_FILE_1} -o2 ${CPP_OUTPUT_FILE_2} -n1 ${Y_1} -n2 ${Y_2}
 			DEPENDS ${${INPUT_FILE}_INPUT}
 			COMMENT "[BISON][rdo${INPUT_FILE}] Building parser with bison ${BISON_VERSION}"
 			WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
 		)
-	ENDIF(MSVC)
-ENDMACRO(RDO_BISON_TARGET)
+	ENDIF()
+ENDMACRO(RDO_SPLIT_BISON_TARGET)


Add '-static-libgcc' to CMAKE_C_FLAGS

Add '-static-libgcc' to CMAKE_C_FLAGS

[skip ci]

--- flags/static-std.cmake
+++ flags/static-std.cmake
@@ -12,6 +12,8 @@
 polly_add_cache_flag(CMAKE_CXX_FLAGS "-static-libgcc")
 polly_add_cache_flag(CMAKE_CXX_FLAGS "-static-libstdc++")

+polly_add_cache_flag(CMAKE_C_FLAGS "-static-libgcc")
+
 # There is no macro to detect this flags on toolchain calculation so we must
 # mark this toolchain explicitly.
-list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "static-std")
+list(APPEND HUNTER_TOOLCHAIN_UNDETECTABLE_ID "static-std-v2")


Removed debug message.

Removed debug message.

--- src/cmake/Modules/FindLibClangmm.cmake
+++ src/cmake/Modules/FindLibClangmm.cmake
@@ -18,8 +18,6 @@
   PATHS /usr/local/lib ${MSYS_BIN_PATH}
 )

-message("${LCL_INCLUDE_DIR}")
-
 set(LCL_LIBRARIES ${LCL_LIBRARY} )
 set(LCL_INCLUDE_DIRS ${LCL_INCLUDE_DIR} )


Remove extraneous flags from VC builds

Remove extraneous flags from VC builds

Change-Id: Ib7fc4eb1d242e3c60f64144f768129c6e4ced74c
Reviewed-on: http://review.couchbase.org/33286
Reviewed-by: Brett Lawson <c8c4369773d7d7226e031f0c4af62e3f38a08510@gmail.com>
Tested-by: Mark Nunberg <e7d42768707bf23038325b0b68d4b577e5f6064a@haskalah.org>

--- cmake/Modules/GetLibcouchbaseFlags.cmake
+++ cmake/Modules/GetLibcouchbaseFlags.cmake
@@ -39,15 +39,15 @@
 list2args(LCB_GNUC_CXX_WARNINGS)

 #MSVC-specific flags for C/C++
-LIST(APPEND LCB_CL_CPPFLAGS /nologo /W3 /MP /Z7 /EHsc /FD /c)
+LIST(APPEND LCB_CL_CPPFLAGS /nologo /W3 /MP /EHsc)
 list2args(LCB_CL_CPPFLAGS)

 # Common flags for DEBUG
-LIST(APPEND LCB_CL_CPPFLAGS_DEBUG /RTC1 /LDd /MDd)
+LIST(APPEND LCB_CL_CPPFLAGS_DEBUG /RTC1)
 list2args( LCB_CL_CPPFLAGS_DEBUG)

 # Common flags for RELEASE
-LIST(APPEND LCB_CL_CPPFLAGS_REL /MD /LD /O2)
+LIST(APPEND LCB_CL_CPPFLAGS_REL /O2)
 list2args(LCB_CL_CPPFLAGS_REL)

 IF(${MSVC})
@@ -69,8 +69,8 @@
     # put debug info into release build and revert /OPT defaults after
     # /DEBUG so that it won't degrade performance and size
     # http://msdn.microsoft.com/en-us/library/xe4t6fc1(v=vs.80).aspx
-    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:ICF")
-    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:ICF")
+    SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF /OPT:ICF")
+    SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF /OPT:ICF")
     SET(LCB_CORE_CXXFLAGS "")
     SET(LCB_CORE_CFLAGS "")
     SET(LCB_BASIC_CFLAGS "")


Now resources are copied to both Debug and Release folders every build when using MSVC.

--- scripts/project.cmake
+++ scripts/project.cmake
@@ -147,39 +147,35 @@
 macro(add_resources resources_dir)

   file(GLOB_RECURSE BUNDLE_RESOURCES ${resources_dir}/*)
-  if (IOS_NOT_USING_ANYMORE)
-    # add_executable("${CURRENT_TARGET}_resources" MACOSX_BUNDLE ${BUNDLE_RESOURCES})
-    add_library("${CURRENT_TARGET}_resources" ${BUNDLE_RESOURCES})
-    get_filename_component(base_path ${resources_dir} ABSOLUTE)
-
-    foreach (resource_path ${BUNDLE_RESOURCES})
-      get_filename_component(resource_dir ${resource_path} DIRECTORY)
-      get_relative_path(relative_dir ${base_path} ${resource_dir})
-    endforeach ()
-
-    set_target_properties("${CURRENT_TARGET}_resources" PROPERTIES LINKER_LANGUAGE C)
-    set_target_properties("${CURRENT_TARGET}_resources" PROPERTIES BUNDLE_EXTENSION "bundle")
-    set_xcode_property(${CURRENT_TARGET}_resources IPHONEOS_DEPLOYMENT_TARGET "8.4")
-    set(ALL_RESOURCES "${ALL_RESOURCES} BUNDLE_RESOURCES" PARENT_SCOPE)
-
-  else ()
-    list(GET CURRENT_SOURCES 0 FIRST_SOURCE)
-    set_source_files_properties(${FIRST_SOURCE} PROPERTIES OBJECT_DEPENDS "${BUNDLE_RESOURCES}")
-
-    if (IOS)
-      add_custom_command(TARGET ${CURRENT_TARGET}
-        COMMAND ${CMAKE_COMMAND} -E copy_directory
-        ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} ${CMAKE_BINARY_DIR}/${resources_dir}
-        COMMENT "Copying ${CURRENT_TARGET} files"
-        )
-
-    else ()
-      add_custom_command(TARGET ${CURRENT_TARGET}
-        COMMAND ${CMAKE_COMMAND} -E copy_directory
-        ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${resources_dir}
-        COMMENT "Copying ${CURRENT_TARGET} files"
-        )
-    endif ()
+  list(GET CURRENT_SOURCES 0 FIRST_SOURCE)
+  set_source_files_properties(${FIRST_SOURCE} PROPERTIES OBJECT_DEPENDS "${BUNDLE_RESOURCES}")
+
+  if (IOS)
+    add_custom_command(TARGET ${CURRENT_TARGET}
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} ${CMAKE_BINARY_DIR}/${resources_dir}
+      COMMENT "Copying ${CURRENT_TARGET} files"
+      )
+
+  elseif (MSVC)
+    add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir}
+      ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/${resources_dir}
+      COMMENT "Copying ${CURRENT_TARGET} files"
+      )
+    add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir}
+      ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/${resources_dir}
+      COMMENT "Copying ${CURRENT_TARGET} files"
+      )
+  else ()
+    add_custom_command(TARGET ${CURRENT_TARGET} POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E copy_directory
+      ${CMAKE_CURRENT_LIST_DIR}/${resources_dir} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${resources_dir}
+      COMMENT "Copying ${CURRENT_TARGET} files"
+      )
   endif ()

 endmacro(add_resources)


Bugfix

Bugfix

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

--- deal.II/cmake/modules/FindTRILINOS.cmake
+++ deal.II/cmake/modules/FindTRILINOS.cmake
@@ -53,13 +53,13 @@
 # So we check again for every lib and store the full path:
 #
 FOREACH(library ${Trilinos_LIBRARIES})
-  FIND_LIBRARY(TRILINOS_LIBRARY_${macro_library}
+  FIND_LIBRARY(TRILINOS_LIBRARY_${library}
     NAMES ${library}
     HINTS ${Trilinos_LIBRARY_DIRS}
     )
-  MARK_AS_ADVANCED(TRILINOS_LIBRARY_${macro_library})
+  MARK_AS_ADVANCED(TRILINOS_LIBRARY_${library})

-  LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${macro_library}})
+  LIST(APPEND TRILINOS_LIBRARIES ${TRILINOS_LIBRARY_${library}})
 ENDFOREACH()


added boost_random

added boost_random

--- boost.cmake
+++ boost.cmake
@@ -34,7 +34,7 @@
     UPDATE_COMMAND      ""
     PATCH_COMMAND       ""
     CONFIGURE_COMMAND   ${BUILDEM_ENV_STRING} ./bootstrap.sh
-        --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options
+        --with-libraries=date_time,filesystem,python,regex,serialization,system,test,thread,program_options,boost_random
         --with-python=${PYTHON_EXE}
         --prefix=${BUILDEM_DIR}
         LDFLAGS=${BUILDEM_LDFLAGS}


- migrate to the new DPM test bed

- migrate to the new DPM test bed

--- test/functional/ctest_functional.cmake
+++ test/functional/ctest_functional.cmake
@@ -9,7 +9,7 @@
 set(http_desy_base "http://sligo.desy.de:2880/pnfs/desy.de/data/dteam")
 set(http_desy_file "${http_desy_base}/fbxtest.txt")

-set(http_lcgdm_base "https://lxfsra04a04.cern.ch/dpm/cern.ch/home/dteam/")
+set(http_lcgdm_base "https://lxfsra10a01.cern.ch/dpm/cern.ch/home/dteam/")

 test_dav_endpoint_ronly( ${http_desy_base} "")


Use CMAKE_C_FLAGS to compile duktape

Use CMAKE_C_FLAGS to compile duktape

--- lib/duktape.cmake
+++ lib/duktape.cmake
@@ -28,4 +28,3 @@
 	LINKER_LANGAUGE "C"
 )
 target_include_directories(${DUKTAPE_LIBRARY} PUBLIC ${DUKTAPE_INCLUDE_DIRS})
-target_compile_options(${DUKTAPE_LIBRARY} PUBLIC ${CMAKE_C_FLAGS})


pw_toolchain: CIPD-provided sysroot on CMake/Linux

Changes the host clang CMake toolchain to use the CIPD-provided sysroots
when building for Linux.

Change-Id: I51fb42d8140f81ede5b3e6ad567cc1b6c7443929
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/106170
Commit-Queue: Armando Montanez <97ef6fdb231c129ac8827d9f0c4106bfbf57f74f@google.com>
Reviewed-by: Wyatt Hepler <cca3bedb37979eacd157a9bceb473582df8aea1e@google.com>

--- pw_toolchain/host_clang/toolchain.cmake
+++ pw_toolchain/host_clang/toolchain.cmake
@@ -62,14 +62,17 @@
 # TODO: Migrate this to match GN's tokenized trace setup.
 pw_set_backend(pw_trace pw_trace.null)

-# The CIPD provided Clang/LLVM toolchain must link against the matched
-# libc++ which is also from CIPD. However, by default, Clang on Mac (but
-# not on Linux) will fall back to the system libc++, which is
-# incompatible due to an ABI change.
-#
-# Pull the appropriate paths from our Pigweed env setup.
 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+    # The CIPD provided Clang/LLVM toolchain must link against the matched
+    # libc++ which is also from CIPD. However, by default, Clang on Mac (but
+    # not on Linux) will fall back to the system libc++, which is
+    # incompatible due to an ABI change.
+    #
+    # Pull the appropriate paths from our Pigweed env setup.
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -nostdlib++ $ENV{PW_PIGWEED_CIPD_INSTALL_DIR}/lib/libc++.a")
+elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+    # Use the CIPD provided sysroot to make host builds more hermetic.
+    set(CMAKE_SYSROOT "$ENV{PW_PIGWEED_CIPD_INSTALL_DIR}/clang_sysroot")
 endif()

 set(pw_build_WARNINGS pw_build.strict_warnings pw_build.extra_strict_warnings


Do not force g++-7 for nsync, but don't fail on warnings

--- tensorflow_cc/cmake/TensorflowShared.cmake
+++ tensorflow_cc/cmake/TensorflowShared.cmake
@@ -11,8 +11,8 @@
   DOWNLOAD_COMMAND ""
   UPDATE_COMMAND ""
   CONFIGURE_COMMAND tensorflow/contrib/makefile/compile_linux_protobuf.sh
-            # patch nsync to use g++-7
-            COMMAND sed -i "s/ g++/ g++-7/g" tensorflow/contrib/makefile/compile_nsync.sh
+            # Do not fail on warnings when building nsync
+            COMMAND sed -i "s/ -Werror//g" tensorflow/contrib/makefile/compile_nsync.sh
             COMMAND tensorflow/contrib/makefile/compile_nsync.sh
             COMMAND "${CMAKE_CURRENT_BINARY_DIR}/build_tensorflow.sh"
             COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/cmake/copy_links.sh" .


Added libraries and includes for ImageMagick


CodeGenerator: Fix generation of FindMODULE prefix for headers

Change-Id: If59ee0e10ed979fdcde5d1d26a50cb276a55e353

--- CMake/CodeGenerator.cmake
+++ CMake/CodeGenerator.cmake
@@ -584,8 +584,11 @@
     string (STRIP ${_INTERFACE_INTERNAL_GENERATED_HEADERS} _INTERFACE_INTERNAL_GENERATED_HEADERS)
   endif ()

-  string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" _INTERFACE_HEADERS_DIR ${GEN_FILES_DIR})
-  string (REPLACE "${CMAKE_SOURCE_DIR}/" "" _INTERFACE_HEADERS_DIR ${GEN_FILES_DIR})
+  set (_INTERFACE_HEADERS_DIR ${GEN_FILES_DIR})
+  string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" _INTERFACE_HEADERS_DIR ${_INTERFACE_HEADERS_DIR})
+  string (REPLACE "${CMAKE_BINARY_DIR}" "build" _INTERFACE_HEADERS_DIR ${_INTERFACE_HEADERS_DIR})
+  string (REPLACE "${CMAKE_SOURCE_DIR}/" "" _INTERFACE_HEADERS_DIR ${_INTERFACE_HEADERS_DIR})
+  string (REPLACE "${CMAKE_SOURCE_DIR}" "" _INTERFACE_HEADERS_DIR ${_INTERFACE_HEADERS_DIR})

   foreach (HEADER ${SERVER_INTERNAL_GENERATED_HEADERS})
     string (REGEX REPLACE ".*/" "" HEADER ${HEADER})
@@ -595,8 +598,11 @@
     string (STRIP ${_SERVER_INTERNAL_GENERATED_HEADERS} _SERVER_INTERNAL_GENERATED_HEADERS)
   endif ()

-  string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" _SERVER_INTERNAL_GENERATED_HEADERS_DIR ${SERVER_INTERNAL_GEN_FILES_DIR})
-  string (REPLACE "${CMAKE_SOURCE_DIR}/" "" _SERVER_INTERNAL_GENERATED_HEADERS_DIR ${SERVER_INTERNAL_GEN_FILES_DIR})
+  set (_SERVER_INTERNAL_GENERATED_HEADERS_DIR ${SERVER_INTERNAL_GEN_FILES_DIR})
+  string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" _SERVER_INTERNAL_GENERATED_HEADERS_DIR ${_SERVER_INTERNAL_GENERATED_HEADERS_DIR})
+  string (REPLACE "${CMAKE_BINARY_DIR}" "build" _SERVER_INTERNAL_GENERATED_HEADERS_DIR ${_SERVER_INTERNAL_GENERATED_HEADERS_DIR})
+  string (REPLACE "${CMAKE_SOURCE_DIR}/" "" _SERVER_INTERNAL_GENERATED_HEADERS_DIR ${_SERVER_INTERNAL_GENERATED_HEADERS_DIR})
+  string (REPLACE "${CMAKE_SOURCE_DIR}" "" _SERVER_INTERNAL_GENERATED_HEADERS_DIR ${_SERVER_INTERNAL_GENERATED_HEADERS_DIR})

   foreach (HEADER ${SERVER_GENERATED_HEADERS})
     string (REGEX REPLACE ".*/" "" HEADER ${HEADER})
@@ -606,8 +612,11 @@
     string (STRIP ${_SERVER_GENERATED_HEADERS} _SERVER_GENERATED_HEADERS)
   endif ()

-  string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" _PARAM_SERVER_STUB_DESTINATION ${PARAM_SERVER_STUB_DESTINATION})
+  set (_PARAM_SERVER_STUB_DESTINATION ${PARAM_SERVER_STUB_DESTINATION})
+  string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" _PARAM_SERVER_STUB_DESTINATION ${_PARAM_SERVER_STUB_DESTINATION})
+  string (REPLACE "${CMAKE_BINARY_DIR}" "build" _PARAM_SERVER_STUB_DESTINATION ${_PARAM_SERVER_STUB_DESTINATION})
   string (REPLACE "${CMAKE_SOURCE_DIR}/" "" _PARAM_SERVER_STUB_DESTINATION ${_PARAM_SERVER_STUB_DESTINATION})
+  string (REPLACE "${CMAKE_SOURCE_DIR}" "" _PARAM_SERVER_STUB_DESTINATION ${_PARAM_SERVER_STUB_DESTINATION})

   foreach (HEADER ${PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS})
     string (REGEX REPLACE ".*/" "" HEADER ${HEADER})
@@ -621,7 +630,9 @@
     string (REGEX REPLACE "/.*$" "" HEADER ${HEADER})
     set (HEADER "${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}")
     string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" HEADER ${HEADER})
+    string (REPLACE "${CMAKE_BINARY_DIR}" "build" HEADER ${HEADER})
     string (REPLACE "${CMAKE_SOURCE_DIR}/" "" HEADER ${HEADER})
+    string (REPLACE "${CMAKE_SOURCE_DIR}" "" HEADER ${HEADER})
     unset (CONTAINS)
     if (DEFINED _PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS_PREFIX)
       list(FIND _PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS_PREFIX ${HEADER} CONTAINS)
@@ -651,7 +662,9 @@
     string (REGEX REPLACE "/.*$" "" HEADER ${HEADER})
     set (HEADER "${CMAKE_CURRENT_SOURCE_DIR}/${HEADER}")
     string (REPLACE "${CMAKE_BINARY_DIR}/" "build/" HEADER ${HEADER})
+    string (REPLACE "${CMAKE_BINARY_DIR}" "build" HEADER ${HEADER})
     string (REPLACE "${CMAKE_SOURCE_DIR}/" "" HEADER ${HEADER})
+    string (REPLACE "${CMAKE_SOURCE_DIR}" "" HEADER ${HEADER})
     unset (CONTAINS)
     if (DEFINED _PARAM_INTERFACE_LIB_EXTRA_HEADERS_PREFIX)
       list(FIND _PARAM_INTERFACE_LIB_EXTRA_HEADERS_PREFIX ${HEADER} CONTAINS)


Revert WARNING to FATAL_ERROR in vtkWrapPython.

This reverts the part of commit b4a7e2b7 that turned the "missing header"
error into a warning.  If vtkWrapPython.cmake is unable to find a header
that it was told to wrap, that should qualify as an error.

--- CMake/vtkWrapPython.cmake
+++ CMake/vtkWrapPython.cmake
@@ -285,19 +285,15 @@

   # Decide what to do for each header.
   foreach(header ${${module}_HEADERS})
-    set(_excluded ${${module}_HEADER_${header}_WRAP_EXCLUDE_PYTHON})
-    if(NOT _excluded)
+    # Everything in this block is for headers that will be wrapped.
+    if(NOT ${module}_HEADER_${header}_WRAP_EXCLUDE_PYTHON)
+
       # Find the full path to the header file to be wrapped.
       vtk_find_header(${header}.h "${${module}_INCLUDE_DIRS}" class_header_path)
-      # Exclude with warning if not found
       if(NOT class_header_path)
-        set(_excluded 1)
-        message(WARNING "Could not find ${header}.h for Python wrapping!")
-      endif()
-    endif()
-
-    # Everything in this block is for headers that will be wrapped.
-    if(NOT _excluded)
+        message(FATAL_ERROR "Could not find ${header}.h for Python wrapping!")
+      endif()
+
       # add the info to the init file
       set(VTK_WRAPPER_INIT_DATA
         "${VTK_WRAPPER_INIT_DATA}\n${header}")


More warnings!

More warnings!

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -1,4 +1,7 @@
 include(CheckCXXCompilerFlag)
+include(CheckCCompilerFlag)
+
+option(USE_WARNINGS "Compile the code with warnings (default in debug mode)" OFF)

 # C++11 support.
 CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
@@ -17,28 +20,52 @@
     endif()
 endif()

-macro(set_debug_flag_if_possible _flag_)
+macro(add_warning _flag_)
     CHECK_CXX_COMPILER_FLAG("${_flag_}" CXX_SUPPORTS${_flag_})
+    CHECK_C_COMPILER_FLAG("${_flag_}" CC_SUPPORTS${_flag_})
     if(CXX_SUPPORTS${_flag_})
         set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${_flag_}")
+        if(USE_WARNINGS)
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flag_}")
+        endif()
+    endif()
+
+    if(C_SUPPORTS${_flag_})
+        set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${_flag_}")
+        if(USE_WARNINGS)
+            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag_}")
+        endif()
     endif()
 endmacro()

 # Add some warnings in debug mode
 if(MSVC)
-    # set_debug_flag_if_possible("/W4")
+    add_warning("/W2")
 else()
-    set_debug_flag_if_possible("-Wall")
-    set_debug_flag_if_possible("-Wextra")
-    set_debug_flag_if_possible("-Wconversion")
-    set_debug_flag_if_possible("-Wsign-conversion")
-    set_debug_flag_if_possible("-Wsign-promo")
-    set_debug_flag_if_possible("-Wsuggest-override")
-    set_debug_flag_if_possible("-pedantic")
+    # Basic set of warnings
+    add_warning("-Wall")
+    add_warning("-Wextra")
+    # Initialization and convertion values
+    add_warning("-Wuninitialized")
+    add_warning("-Wconversion")
+    add_warning("-Wsign-conversion")
+    add_warning("-Wsign-promo")
+    # C++11 functionalities
+    add_warning("-Wsuggest-override")
+    add_warning("-Wsuggest-final-types")
+    # C++ standard conformance
+    add_warning("-Wpedantic")
+    add_warning("-pedantic")
+    # The compiler is your friend
+    add_warning("-Wdocumentation")
+    add_warning("-Wdeprecated")
+    add_warning("-Wextra-semi")
+
+    # Remove some warnings
+    add_warning("-Wno-potentially-evaluated-expression")
 endif()

-include(CheckCCompilerFlag)
-CHECK_C_COMPILER_FLAG("-std=c99" CC_SUPPORTS_C99)
+CHECK_C_COMPILER_FLAG("-std=c99" COMPILER_SUPPORTS_C99)

 if(CC_SUPPORTS_C99)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")


Add compiler switch to warn about shadowed variables and functions.

--- clang.cmake
+++ clang.cmake
@@ -1,7 +1,7 @@
 SET (CMAKE_C_COMPILER "clang")
 SET (CMAKE_CXX_COMPILER "clang++")

-SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wwrite-strings -std=c99 -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
+SET(CMAKE_C_FLAGS "-pipe -Wall -Wextra -Wshadow -Wwrite-strings -std=c99 -pedantic -O2 -fomit-frame-pointer" CACHE STRING "" FORCE)
 SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-O2 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,--gc-sections" CACHE STRING "" FORCE)

 MESSAGE (STATUS "Found CLANG toolchain")


Fix android toolchain - now find_XXX works

--- CMake/toolchain/android.toolchain.cmake
+++ CMake/toolchain/android.toolchain.cmake
@@ -961,7 +961,7 @@
 set( BUILD_ANDROID True )

 # where is the target environment
-set( CMAKE_FIND_ROOT_PATH "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )
+set( CMAKE_FIND_ROOT_PATH "/" "${ANDROID_TOOLCHAIN_ROOT}/bin" "${ANDROID_TOOLCHAIN_ROOT}/${ANDROID_TOOLCHAIN_MACHINE_NAME}" "${ANDROID_SYSROOT}" "${CMAKE_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/share" )

 # only search for libraries and includes in the ndk toolchain
 set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )


BUG: otool test for BlockSetCmakeOSXVariables logic was reversed

--- CMake/TubeTKBlockSetCMakeOSXVariables.cmake
+++ CMake/TubeTKBlockSetCMakeOSXVariables.cmake
@@ -107,10 +107,10 @@
         OUTPUT_VARIABLE QMAKE_USE_STDC
         OUTPUT_STRIP_TRAILING_WHITESPACE )
       if( "x${QMAKE_USE_STDC}x" STREQUAL "xx" )
-        set( CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE PATH
+        set( CMAKE_OSX_DEPLOYMENT_TARGET "${SDK_VERSION}" CACHE PATH
           "Deployment target needs to be explicitly set." FORCE )
       else()
-        set( CMAKE_OSX_DEPLOYMENT_TARGET "${SDK_VERSION}" CACHE PATH
+        set( CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE PATH
           "Deployment target needs to be explicitly set." FORCE )
       endif()
     endif()


STYLE: CMakeLists files updated

STYLE: CMakeLists files updated

CMAKE_BUILD_TYPE is automatically set to Release by default and default possible values are also set, as long as not value is given initially.
Option to select BUILD_TESTING is now available both with Superbuild and not Superbuild.


CMake: Define `ABSL_ROOT_DIR` after populate call, shallow checkouts

The first part is to enable the UTF8 Range library shipped by protobuf to
build correctly. Otherwise, one had to run CMake twice (!) to configure.

To save time and bandwith, do not checkout the full Git history of
dependencies and do not checkout all of the submodules.

PiperOrigin-RevId: 490248302
Change-Id: Id98f5ca3d32af30562088af616da32899de51774

--- cmake/BinExportDeps.cmake
+++ cmake/BinExportDeps.cmake
@@ -25,21 +25,24 @@
 # Abseil
 FetchContent_Declare(absl
   GIT_REPOSITORY https://github.com/abseil/abseil-cpp
-  GIT_TAG        7f3c0d781134d25b24e0b55346482a2d366bf59b # 2022-09-30
+  GIT_TAG        a09d210567dfcd9c1c63b255dbaec84537f6b458 # 2022-11-22
+  GIT_SHALLOW    TRUE
+  GIT_SUBMODULES ""
 )
 set(ABSL_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
 set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE)
+set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
+FetchContent_MakeAvailable(absl)
 # Protobuf's utf8_range fork insists on this being set
 set(ABSL_ROOT_DIR "${absl_SOURCE_DIR}" CACHE STRING "" FORCE)
-set(ABSL_USE_EXTERNAL_GOOGLETEST ON CACHE BOOL "" FORCE)
-FetchContent_MakeAvailable(absl)
 binexport_check_target(absl::core_headers)

 if(BUILD_TESTING AND BINEXPORT_BUILD_TESTING)
   # Googletest (needs to come after Abseil due to C++ standard propagation)
   FetchContent_Declare(googletest
     GIT_REPOSITORY https://github.com/google/googletest.git
-    GIT_TAG        93f08be653c36ddc6943e9513fc14c7292b4d007 # 2022-09-30
+    GIT_TAG        519beb0e52c842729b4b53731d27c0e0c32ab4a2 # 2022-11-21
+    GIT_SHALLOW    TRUE
   )
   FetchContent_MakeAvailable(googletest)
   binexport_check_target(gtest)
@@ -51,6 +54,7 @@
     FetchContent_Declare(benchmark
       GIT_REPOSITORY https://github.com/google/benchmark.git
       GIT_TAG        d2a8a4ee41b923876c034afb939c4fc03598e622 # 2022-10-04
+      GIT_SHALLOW    TRUE
     )
     set(BENCHMARK_CXX_STANDARD ${CMAKE_CXX_STANDARD} CACHE STRING "" FORCE)
     set(BENCHMARK_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
@@ -64,7 +68,10 @@
 # Protocol Buffers
 FetchContent_Declare(protobuf
   GIT_REPOSITORY https://github.com/protocolbuffers/protobuf.git
-  GIT_TAG        3b4fdac42a6ec145412953ae578e7eb0cfcb800d # 2022-10-25
+  GIT_TAG        8809a113bc0a00b685b787a03d0698aa8c3e10e8 # 2022-11-21
+  GIT_SHALLOW    TRUE
+  GIT_SUBMODULES third_party/jsoncpp
+                 third_party/utf8_range
 )
 set(protobuf_ABSL_PROVIDER "package" CACHE STRING "" FORCE)
 set(protobuf_BUILD_TESTS OFF CACHE BOOL "" FORCE)


Upgraded Qt to version 5.15.5 with OpenSSL support on ubuntu

--- cmake/Depdendencies.cmake
+++ cmake/Depdendencies.cmake
@@ -63,9 +63,13 @@
             )
         else()
             fast_download_dependency(qt5
-                    5.14.0
-                    3281e50a545c1a7275cf7626b348468049ac41c05944bcc9fd08708831c2d28f
+                    5.15.5
+                    bd9dcfb8cd54f37946341195cbbc2d839e46e52c312560924deacbd151ab6fb4
                     libQt5Core.so libQt5Gui.so libQt5Widgets.so libQt5OpenGL.so libQt5Multimedia.so libQt5MultimediaWidgets.so libQt5Network.so libQt5PrintSupport.so libQt5SerialPort.so
+            )
+            fast_download_dependency(openssl
+                    1.1.1
+                    813d09d0e4fb8c03b4470692659d8600e5d56c77708aa27c0290e9be03cc7352
             )
         endif()
         # MOC setup


Explicitly pass CXX to NCCL Makefile

Explicitly pass CXX to NCCL Makefile

Summary:
Necessary if CXX isn't set when cmake is called. The CXX variable will then be
empty which prevents make from using its own default.
Closes https://github.com/caffe2/caffe2/pull/202

Differential Revision: D4711113

Pulled By: Yangqing

fbshipit-source-id: 895c07044b263ba9b5440453978248506d7ac225

--- cmake/External/nccl.cmake
+++ cmake/External/nccl.cmake
@@ -22,7 +22,7 @@
       SOURCE_DIR ${nccl_PREFIX}
       BUILD_IN_SOURCE 1
       CONFIGURE_COMMAND ""
-      BUILD_COMMAND make
+      BUILD_COMMAND make "CXX=${CMAKE_CXX_COMPILER}"
       INSTALL_COMMAND ""
       )

@@ -36,4 +36,3 @@
   endif()

 endif()
-


Changed missing Cmake variable still using the old "CV" instead of "VISION".

--- cmake/ROCSBuildOpts.cmake
+++ cmake/ROCSBuildOpts.cmake
@@ -76,10 +76,10 @@
 		set(ROCS_BUILD_MODULE_VISION YES)
 	endif(USE_MODULE_VISION)
 	# CV Apps
-	option(USE_MODULE_CV_APPS "Use applications of the module CV." NO)
-	if(USE_MODULE_CV_APPS)
-		set(ROCS_BUILD_MODULE_CV_APPS YES)
-	endif(USE_MODULE_CV_APPS)
+	option(USE_MODULE_VISION_APPS "Use applications of the module CV." NO)
+	if(USE_MODULE_VISION_APPS)
+		set(ROCS_BUILD_MODULE_VISION_APPS YES)
+	endif(USE_MODULE_VISION_APPS)
 	# Concept
 	option(USE_MODULE_CONCEPT "Use the module Concept." NO)
 	if(USE_MODULE_CONCEPT)


Cycles: Add cmake path for the CUDA toolkit (default installation) on windows.

--- cmake/external_libs.cmake
+++ cmake/external_libs.cmake
@@ -89,8 +89,11 @@
 # CUDA

 if(WITH_CYCLES_CUDA)
-
-	set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
+	if(WIN32)
+		set(CYCLES_CUDA "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v4.0" CACHE PATH "Path to CUDA installation")
+	else()
+		set(CYCLES_CUDA "/usr/local/cuda" CACHE PATH "Path to CUDA installation")
+	endif()
 	set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
 	set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")


icu updated

icu updated

--- cmake/win32.install.cmake
+++ cmake/win32.install.cmake
@@ -34,9 +34,9 @@
 	${DLL_D_PLUGINS_QMINIMAL}
 )

-FIND_FILE(DLL_ICUUC                   icuuc51.dll              PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_ICUIN                   icuin51.dll              PATHS ${QT_LIBRARY_DIR})
-FIND_FILE(DLL_ICUDT                   icudt51.dll              PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_ICUUC                   icuuc52.dll              PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_ICUIN                   icuin52.dll              PATHS ${QT_LIBRARY_DIR})
+FIND_FILE(DLL_ICUDT                   icudt52.dll              PATHS ${QT_LIBRARY_DIR})

 FIND_FILE(DLL_R_QT_CORE               Qt5Core.dll              PATHS ${QT_LIBRARY_DIR})
 FIND_FILE(DLL_D_QT_CORE               Qt5Cored.dll             PATHS ${QT_LIBRARY_DIR})


ENH: Cuberille future compilation deprecations

Need to update to avoid using deprecated
interfaces.

Change-Id: I2cd15edd6f8adf8dfdc98435e46440f9f120c67a

--- Modules/Remote/Cuberille.remote.cmake
+++ Modules/Remote/Cuberille.remote.cmake
@@ -17,5 +17,5 @@
 http://www.insight-journal.org/browse/publication/213
 "
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git
-  GIT_TAG aa2dea61661403a72f07019d9411d5aadf928252
+  GIT_TAG f664b26e1ba24d8ae64d88d86dce1f6898202d59
   )


No longer use QWT_FOUND and set QWT_DEFINITIONS.

	QWT_FOUND is not cached so better use QWT_LIBRARY.

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

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

--- build-aux/cmake/modules/FindQwt.cmake
+++ build-aux/cmake/modules/FindQwt.cmake
@@ -29,15 +29,13 @@
   find_library(QWT_LIBRARY NAMES qwt qwt5)
   if(QWT_LIBRARY)
     message(STATUS "Found qwt library: ${QWT_LIBRARY}")
-    add_definitions(-DQWT_DLL)
-    set(QWT_FOUND TRUE)
   else(QWT_LIBRARY)
     message(SEND_ERROR "no qwt library found "
       "(setting -DQWT_ROOT_DIR=/path/to/qwt may solve this problem).")
   endif(QWT_LIBRARY)
 endif(NOT QWT_LIBRARY)

-if(QWT_FOUND)
+if(QWT_LIBRARY)
   # Search for the include directory.
   if(NOT QWT_INCLUDE_DIR)
     find_path(QWT_INCLUDE_DIR qwt.h)
@@ -50,4 +48,5 @@
       set(QWT_FOUND FALSE)
     endif(QWT_INCLUDE_DIR)
   endif(NOT QWT_INCLUDE_DIR)
-endif(QWT_FOUND)
+  add_definitions(-DQWT_DLL)
+endif(QWT_LIBRARY)


Fix flatc_target

Fix flatc_target

--- Findflatbuffers.cmake
+++ Findflatbuffers.cmake
@@ -21,12 +21,12 @@
     foreach(FILE ${ARGN})
       get_filename_component(FLATC_OUTPUT ${FILE} NAME_WE)
       set(FLATC_OUTPUT
-        "${PROJECT_BINARY_DIR}/${FLATC_OUTPUT}_generated.h")
+        "${CMAKE_CURRENT_BINARY_DIR}/${FLATC_OUTPUT}_generated.h")
       list(APPEND FLATC_OUTPUTS ${FLATC_OUTPUT})

       add_custom_command(OUTPUT ${FLATC_OUTPUT}
         COMMAND ${FLATC_EXECUTABLE}
-        ARGS -c -o "${PROJECT_BINARY_DIR}/" ${FILE}
+        ARGS -c -o "${CMAKE_CURRENT_BINARY_DIR}/" ${FILE}
         COMMENT "Building C++ header for ${FILE}"
         DEPENDS ${FILE}
         WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
@@ -35,7 +35,7 @@
   endfunction()

   set(FLATBUFFERS_INCLUDE_DIRS ${FLATBUFFERS_INCLUDE_DIR})
-  include_directories(${PROJECT_BINARY_DIR})
+  include_directories(${CMAKE_CURRENT_BINARY_DIR})
 else()
   set(FLATBUFFERS_INCLUDE_DIR)
 endif()


Add include directories for externals to ROOT_INCLUDE_DIRS

This is used in the build directory to propagate the right includes
while running tests for roottest.

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -615,7 +615,8 @@
 #---To be used from the binary tree--------------------------------------------------------------------------
 set(ROOT_INCLUDE_DIR_SETUP "
 # ROOT configured for use from the build tree - absolute paths are used.
-set(ROOT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include)
+set(ROOT_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/include
+    ${CMAKE_BINARY_DIR}/externals/${CMAKE_INSTALL_PREFIX}/include)
 ")
 set(ROOT_LIBRARY_DIR_SETUP "
 # ROOT configured for use from the build tree - absolute paths are used.


Turn off fortify, since it doesn't work for -O0. Refs #5926.

git-svn-id: b5c078ec0b4d3a50497e9dd3081db18a5b4f16e5@54709 c7de825b-a66e-492c-adef-691d508d4ae1

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -25,7 +25,9 @@
 ## add TOKU_PTHREAD_DEBUG for debug builds
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG=1)
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO TOKU_PTHREAD_DEBUG=1)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO _FORTIFY_SOURCE=2)
+## fortify doesn't work with -O0, so we are deprecating it for now.  Sometime we should turn on
+## fortify for -O1 builds, but we don't want it on the release builds.
+## #set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO _FORTIFY_SOURCE=2)

 ## coverage
 option(USE_GCOV "Use gcov for test coverage." OFF)


SVN_SILENT made messages (.desktop file)

--- src/vlc.desktop.cmake
+++ src/vlc.desktop.cmake
@@ -20,6 +20,7 @@
 Name[el]=VLC
 Name[es]=VLC
 Name[et]=VLC
+Name[eu]=VLC
 Name[fi]=VLC
 Name[fr]=VLC
 Name[ga]=VLC
@@ -64,6 +65,7 @@
 Comment[el]=Σύστημα υποστήριξης Phonon VLC
 Comment[es]=Motor VLC para Phonon
 Comment[et]=Phononi VLC taustaprogramm
+Comment[eu]=Phonon-en VLC bizkarraldekoa
 Comment[fi]=Phonon VLC -taustaohjelma
 Comment[fr]=Module VLC pour Phonon
 Comment[ga]=Inneall VLC Phonon


Use HTTPS for eigen download address

Use HTTPS for eigen download address

See Issue #14395

--- CMake/Superbuild/External_Eigen3.cmake
+++ CMake/Superbuild/External_Eigen3.cmake
@@ -61,7 +61,7 @@
   ExternalProject_Add(${proj}
     SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}
     BINARY_DIR ${${proj}_DIR}
-    URL "http://bitbucket.org/eigen/eigen/get/3.1.2.tar.gz"
+    URL "https://bitbucket.org/eigen/eigen/get/3.1.2.tar.gz"
     UPDATE_COMMAND ""
     CONFIGURE_COMMAND ""
     BUILD_COMMAND ""


Use OpenSuse python build fix

Use OpenSuse python build fix

--- CMake/Superbuild/External_Slicer.cmake
+++ CMake/Superbuild/External_Slicer.cmake
@@ -79,7 +79,7 @@
     BINARY_DIR ${${proj}_DIR}
     PREFIX ${proj}${ep_suffix}
     GIT_REPOSITORY "git://public.kitware.com/Bender/Slicer.git"
-    GIT_TAG "dabe11290061a89345e870df0dee6e3fd606d873"
+    GIT_TAG "d086dea38a119c192341457ec1f4e419a03b5e78"
     ${bender_external_update}
     INSTALL_COMMAND ""
     CMAKE_GENERATOR ${gen}


Renamed the internal tinyxml library of SOFA to SofaTinyXml.

--- CMakeExternals/PatchSOFA-rev9832.cmake
+++ CMakeExternals/PatchSOFA-rev9832.cmake
@@ -8,8 +8,21 @@
 configure_file(${TEMPLATE_FILE} "framework/sofa/helper/vector_device.h" @ONLY)

 file(STRINGS "sofa-dependencies.cmake" sofaDependencies_cmake NEWLINE_CONSUME)
+string(REPLACE "\"tinyxml\"" "\"SofaTinyXml\"" sofaDependencies_cmake "${sofaDependencies_cmake}")
 string(REPLACE "add_subdirectory(\"\${SOFA_A" "#add_subdirectory(\"\${SOFA_A" sofaDependencies_cmake "${sofaDependencies_cmake}")
 file(WRITE "sofa-dependencies.cmake" "${sofaDependencies_cmake}")
+
+file(STRINGS "modules/sofa/component/SofaBaseVisual/CMakeLists.txt" CMakeLists_txt NEWLINE_CONSUME)
+string(REPLACE "tinyxml" "SofaTinyXml" CMakeLists_txt "${CMakeLists_txt}")
+file(WRITE "modules/sofa/component/SofaBaseVisual/CMakeLists.txt" "${CMakeLists_txt}")
+
+file(STRINGS "modules/sofa/component/SofaLoader/CMakeLists.txt" CMakeLists_txt NEWLINE_CONSUME)
+string(REPLACE "tinyxml" "SofaTinyXml" CMakeLists_txt "${CMakeLists_txt}")
+file(WRITE "modules/sofa/component/SofaLoader/CMakeLists.txt" "${CMakeLists_txt}")
+
+file(STRINGS "modules/sofa/simulation/common/CMakeLists.txt" CMakeLists_txt NEWLINE_CONSUME)
+string(REPLACE "tinyxml" "SofaTinyXml" CMakeLists_txt "${CMakeLists_txt}")
+file(WRITE "modules/sofa/simulation/common/CMakeLists.txt" "${CMakeLists_txt}")

 file(STRINGS "modules/sofa/component/SofaUserInteraction/CMakeLists.txt" CMakeLists_txt NEWLINE_CONSUME)
 string(REPLACE "../collision/AddFramePerformer." "#../collision/AddFramePerformer." CMakeLists_txt "${CMakeLists_txt}")
@@ -90,5 +103,5 @@
   debug SofaUserInteraction\${version}d optimized SofaUserInteraction\${version}
   debug SofaValidation\${version}d optimized SofaValidation\${version}
   debug SofaVolumetricData\${version}d optimized SofaVolumetricData\${version}
-  debug tinyxml\${version}d optimized tinyxml\${version}
+  debug SofaTinyXml\${version}d optimized SofaTinyXml\${version}
 )")


Correct minor bug

Correct minor bug

--- ilastik.cmake
+++ ilastik.cmake
@@ -38,8 +38,7 @@
         -DCMAKE_PREFIX_PATH=${FLYEM_BUILD_DIR}
         -DVIGRA_ROOT=${FLYEM_BUILD_DIR}
         ${ilastik_SRC_DIR}/lazyflow/lazyflow/drtile
-    BUILD_COMMAND       ${FLYEM_ENV_STRING}
-        ${ilastik_SRC_DIR}/lazyflow/lazyflow/drtile/make
+    BUILD_COMMAND       ${FLYEM_ENV_STRING} make
     BUILD_IN_SOURCE     1
     INSTALL_COMMAND     ${CMAKE_COMMAND} -E copy drtile.so ${FLYEM_BUILD_DIR}/lib
 )


Update FindLustre in order to handle a default VERBOSE option set to 0 and the proper c99 compiler option

--- share/FindLustre.cmake
+++ share/FindLustre.cmake
@@ -15,7 +15,15 @@
 # The module defines some functions:
 #   Lustre_Compile([NODE <Lustre Main Node>]
 #                  LUS_FILES <Lustre files>
-#                  [USER_C_FILES <C files>])
+#                  [USER_C_FILES <C files>]
+#                  [VERBOSE <level>]
+#                  LIBNAME <libraryName>)
+#
+# When used the Lustre_Compile macro define the variable
+# LUSTRE_GENERATED_C_FILES_<libraryName> in the parent scope
+# so that the caller can get (if needed) the list of Lustre generated files.
+# The VERBOSE level is a numeric value passed directly to the -verbose
+# command line option of the lustre compiler
 #

 if(LUSTRE_PATH_HINT)
@@ -65,7 +73,7 @@
 include(CMakeParseArguments)
 function(Lustre_Compile)
   set(options "")
-  set(oneValueArgs NODE LIBNAME)
+  set(oneValueArgs NODE LIBNAME VERBOSE)
   set(multiValueArgs LUS_FILES USER_C_FILES)
   cmake_parse_arguments(LUS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})

@@ -79,6 +87,13 @@
   else()
     set(LUSTRE_NODE_OPT "")
     set(LUSTRE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/lus_${LUS_LIBNAME}")
+  endif()
+
+  if (LUS_VERBOSE)
+    set(LUSTRE_VERBOSE_OPT "-verbose ${LUS_VERBOSE}")
+  else()
+    # the default is to be quiet.
+    set(LUSTRE_VERBOSE_OPT "-verbose;0")
   endif()

   file(MAKE_DIRECTORY ${LUSTRE_OUTPUT_DIR})
@@ -97,7 +112,7 @@
     set(LUSTRE_GENERATED_FILES ${LUSTRE_GENERATED_FILES} ${LUSTRE_OUTPUT_DIR}/${L}.lusic)
     add_custom_command(
       OUTPUT ${LUSTRE_GENERATED_FILES}
-      COMMAND ${LUSTRE_COMPILER} ${LUSTRE_NODE_OPT} -d ${LUSTRE_OUTPUT_DIR} ${LFILE}
+      COMMAND ${LUSTRE_COMPILER} ${LUSTRE_VERBOSE_OPT} ${LUSTRE_NODE_OPT} -d ${LUSTRE_OUTPUT_DIR} ${LFILE}
       DEPENDS ${LFILE}
       WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
       COMMENT "Compile Lustre source(s): ${LFILE} (generates: ${LUSTRE_GENERATED_FILES})."
@@ -109,6 +124,7 @@
   add_library(${LUS_LIBNAME} SHARED
               ${GLOBAL_LUSTRE_GENERATED_C_FILES} ${LUS_USER_C_FILES}
               )
+  set_target_properties(${LUS_LIBNAME} PROPERTIES COMPILE_FLAGS "-std=c99")
   set(LUSTRE_GENERATED_C_FILES_${LUS_LIBNAME} "${GLOBAL_LUSTRE_GENERATED_C_FILES}" PARENT_SCOPE)
   message(STATUS "Lustre: Added rule for building lustre library: ${LUS_LIBNAME}")
 endfunction(Lustre_Compile)


SuperBuild: use a sourceforge download mirror to avoid redirection

--- SuperBuild/CMake/External_opencv.cmake
+++ SuperBuild/CMake/External_opencv.cmake
@@ -14,7 +14,7 @@

 ExternalProject_Add(OPENCV
   PREFIX OPENCV
-  URL "http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.11/opencv-2.4.11.zip/download"
+  URL "http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.11/opencv-2.4.11.zip"
   URL_MD5 32f498451bff1817a60e1aabc2939575
   BINARY_DIR ${OPENCV_SB_BUILD_DIR}
   INSTALL_DIR ${SB_INSTALL_PREFIX}


STYLE: simplify ImportGDAL

STYLE: simplify ImportGDAL

--- CMake/ImportGdal.cmake
+++ CMake/ImportGdal.cmake
@@ -72,8 +72,7 @@
               libgeotiff)
   MARK_AS_ADVANCED(GEOTIFF_INCLUDE_DIRS)
   IF (NOT GEOTIFF_INCLUDE_DIRS)
-  MESSAGE(FATAL_ERROR
-           "Cannot find geotiff headers. Please set GEOTIFF_INCLUDE_DIRS.")
+    MESSAGE(FATAL_ERROR "Cannot find geotiff headers. Please set GEOTIFF_INCLUDE_DIRS.")
   ENDIF (NOT GEOTIFF_INCLUDE_DIRS)

   # Find tiff headers
@@ -81,8 +80,7 @@
               HINTS ${GDAL_INCLUDE_DIR})
   MARK_AS_ADVANCED(TIFF_INCLUDE_DIRS)
   IF (NOT TIFF_INCLUDE_DIRS)
-  MESSAGE(FATAL_ERROR
-           "Cannot find libtiff headers. Please set TIFF_INCLUDE_DIRS.")
+    MESSAGE(FATAL_ERROR "Cannot find libtiff headers. Please set TIFF_INCLUDE_DIRS.")
   ENDIF (NOT TIFF_INCLUDE_DIRS)

   # Find jpeg headers
@@ -91,8 +89,7 @@
   FIND_PATH(JPEG_INCLUDE_DIRS jpeglib.h ${GDAL_INCLUDE_DIR})
   MARK_AS_ADVANCED(JPEG_INCLUDE_DIRS)
   IF (NOT JPEG_INCLUDE_DIRS)
-  MESSAGE(FATAL_ERROR
-           "Cannot find jpeg headers. Please set JPEG_INCLUDE_DIRS.")
+    MESSAGE(FATAL_ERROR "Cannot find jpeg headers. Please set JPEG_INCLUDE_DIRS.")
   ENDIF (NOT JPEG_INCLUDE_DIRS)
   INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIRS})

@@ -101,8 +98,7 @@
               HINTS ${GDAL_INCLUDE_DIR})
   MARK_AS_ADVANCED(OGR_INCLUDE_DIRS)
   IF (NOT OGR_INCLUDE_DIRS)
-  MESSAGE(FATAL_ERROR
-           "Cannot find ogr headers. Please set OGR_INCLUDE_DIRS.")
+    MESSAGE(FATAL_ERROR "Cannot find ogr headers. Please set OGR_INCLUDE_DIRS.")
   ENDIF (NOT OGR_INCLUDE_DIRS)
   INCLUDE_DIRECTORIES(${OGR_INCLUDE_DIRS})

@@ -120,8 +116,7 @@
     FIND_LIBRARY(TIFF_LIBRARY NAMES tiff libtiff_i)
     MARK_AS_ADVANCED(TIFF_LIBRARY)
     IF (NOT TIFF_LIBRARY)
-      MESSAGE(FATAL_ERROR
-              "Cannot find tiff library. Please set TIFF_LIBRARY.")
+      MESSAGE(FATAL_ERROR "Cannot find tiff library. Please set TIFF_LIBRARY.")
     ENDIF (NOT TIFF_LIBRARY)
   ENDIF(GDAL_HAS_TIFF)

@@ -139,8 +134,7 @@
     FIND_LIBRARY(GEOTIFF_LIBRARY NAMES geotiff geotiff_i)
     MARK_AS_ADVANCED(GEOTIFF_LIBRARY)
     IF (NOT GEOTIFF_LIBRARY)
-      MESSAGE(FATAL_ERROR
-              "Cannot find geotiff library. Please set GEOTIFF_LIBRARY.")
+      MESSAGE(FATAL_ERROR "Cannot find geotiff library. Please set GEOTIFF_LIBRARY.")
     ENDIF (NOT GEOTIFF_LIBRARY)
   ENDIF(GDAL_HAS_GEOTIFF)

@@ -158,8 +152,7 @@
     FIND_LIBRARY(JPEG_LIBRARY NAMES jpeg jpeg_i)
     MARK_AS_ADVANCED(JPEG_LIBRARY)
     IF (NOT JPEG_LIBRARY)
-      MESSAGE(FATAL_ERROR
-              "Cannot find jpeg library. Please set JPEG_LIBRARY.")
+      MESSAGE(FATAL_ERROR "Cannot find jpeg library. Please set JPEG_LIBRARY.")
     ENDIF (NOT JPEG_LIBRARY)
   ENDIF(GDAL_HAS_JPEG)

@@ -178,8 +171,7 @@
     FIND_LIBRARY(OGR_LIBRARY ogr PATHS)
     MARK_AS_ADVANCED(OGR_LIBRARY)
     IF (NOT OGR_LIBRARY)
-      MESSAGE(FATAL_ERROR
-              "Cannot find ogr library. Please set OGR_LIBRARY.")
+      MESSAGE(FATAL_ERROR "Cannot find ogr library. Please set OGR_LIBRARY.")
     ENDIF (NOT OGR_LIBRARY)
   ENDIF(GDAL_HAS_OGR)


ENH: Unset variables when switching between slicer and stand-alone build

Change-Id: If17ccc6c99938203f8808447b95ce2ffac4f870b

--- CMake/SuperBuild.cmake
+++ CMake/SuperBuild.cmake
@@ -365,6 +365,14 @@

   endif( TubeTK_USE_QT )

+else( NOT TubeTK_BUILD_SLICER_EXTENSION )
+
+  unset( CTK_DIR )
+  unset( ITK_DIR )
+  unset( VTK_DIR )
+  unset( QT_QMAKE_EXECUTABLE )
+  unset( SlicerExecutionModel_DIR )
+
 endif( NOT TubeTK_BUILD_SLICER_EXTENSION )


Use PythonInterp in GenerateInitializers to avoid errors

--- exotica/cmake/AddInitializer.cmake
+++ exotica/cmake/AddInitializer.cmake
@@ -1,4 +1,6 @@
 cmake_minimum_required(VERSION 2.8)
+
+find_package(PythonInterp REQUIRED)

 set(_InitializerInputFiles)
 set(_InitializerOutputFiles)
@@ -22,7 +24,7 @@
 include_directories(${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION})
 add_custom_command(
   OUTPUT ${_InitializerOutputFiles}
-  COMMAND python ${_InitializerScriptDir}/GenerateInitializers.py exotica "${_InitializerSearchPaths}" ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION} ${_InitializerInputFiles} ${_InitializerOutputFiles}
+  COMMAND ${PYTHON_EXECUTABLE} ${_InitializerScriptDir}/GenerateInitializers.py exotica "${_InitializerSearchPaths}" ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION} ${_InitializerInputFiles} ${_InitializerOutputFiles}
   DEPENDS ${_InitializerInputFiles} ${_InitializerScriptDir}/GenerateInitializers.py
 )
 add_custom_target(${PROJECT_NAME}_initializers DEPENDS ${_InitializerOutputFiles})


Add detection of TBB. Closes #60

Add detection of TBB. Closes #60

--- CMake/IRTKBuildDeps.cmake
+++ CMake/IRTKBuildDeps.cmake
@@ -99,3 +99,12 @@
   link_libraries(${NIFTICLIB_LIBRARIES})
   add_definitions(-DHAS_NIFTI -DHAVE_NIFTI)
 endif()
+
+option(WITH_TBB "Build with optional support for TBB." ON)
+if(WITH_TBB)
+  find_package(TBB REQUIRED)
+  include_directories(${TBB_INCLUDE_DIRS})
+  link_directories(${TBB_LIBRARY_DIRS})
+  link_libraries(${TBB_LIBRARIES})
+  add_definitions(-DHAS_TBB -DHAVE_TBB)
+endif()


cmake: Remove obsolete SLICER_EXTENSION_PATH definition

This definition was obsoleted by commit 440eb0e11 (ENH: Deletion of the
BatchMake and the CLI Shape Analysis Module )

--- SPHARM-PDM.cmake
+++ SPHARM-PDM.cmake
@@ -1,15 +1,4 @@
 project(SPHARM-PDM)
-
-
-if( SPHARM-PDM_BUILD_SLICER_EXTENSION )
-#-----------------------------------------------------------------------------
-#   Program definitions for C++ interfacing
-#   Necessary at runtime
-#-----------------------------------------------------------------------------
-  set(RELATIVE_EXTENSION_PATH ..)
-  set(NOCLI_INSTALL_DIR ${${LOCAL_PROJECT_NAME}_CLI_INSTALL_RUNTIME_DESTINATION}/${RELATIVE_EXTENSION_PATH})
-  add_definitions(-DSLICER_EXTENSION_PATH=${RELATIVE_EXTENSION_PATH})
-endif()

 include(${CMAKE_CURRENT_SOURCE_DIR}/Common.cmake)


ENH: not tweak but -nopt

ENH: not tweak but -nopt

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -113,7 +113,7 @@
 IF(NOT CMAKE_COMPILER_IS_GNUCXX)
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
   IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
-     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -tweak")
+     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nopt")
   ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
 ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)


Tests: Prepared Makefile for CPU vectorization

--- tests/Makefile.cmake
+++ tests/Makefile.cmake
@@ -1,9 +1,10 @@
 # Configuration
 HIPACC_DIR     ?= @CMAKE_INSTALL_PREFIX@
 COMPILER       ?= $(HIPACC_DIR)/bin/hipacc
-COMMON_INC     ?= -I@OpenCV_INCLUDE_DIRS@ \
+COMMON_INC     ?= -I/usr/include \
+                  -I@OpenCV_INCLUDE_DIRS@ \
                   -I$(TEST_CASE)
-COMPILER_INC   ?= -std=c++11 -stdlib=libc++ $(COMMON_INC) \
+COMPILER_INC   ?= $(COMMON_INC) \
                   -I`@llvm-config@ --includedir` \
                   -I`@llvm-config@ --includedir`/c++/v1 \
                   -I`@clang@ -print-file-name=include` \
@@ -38,8 +39,8 @@
 HIPACC_EXPLORE?=off
 HIPACC_TIMING?=off
 HIPACC_TARGET?=Kepler-30
-HIPACC_VEC_WIDTH?=16
-HIPACC_VEC_IS?=sse2
+HIPACC_VEC_IS?=sse4.2
+HIPACC_OMP?=off

 HIPACC_OPTS=-target $(HIPACC_TARGET)
@@ -57,7 +58,10 @@
 endif
 ifeq ($(HIPACC_VEC),on)
     HIPACC_OPTS+= -vectorize $(HIPACC_VEC)
-    HIPACC_WFV+= -v -v-w $(HIPACC_VEC_WIDTH) -i-s $(HIPACC_VEC_IS)
+    HIPACC_CPU_OPTS+= -v -i-s $(HIPACC_VEC_IS)
+ifdef HIPACC_VEC_WIDTH
+    HIPACC_CPU_OPTS+= -v-w $(HIPACC_VEC_WIDTH)
+endif
 endif
 ifdef HIPACC_CONFIG
     HIPACC_OPTS+= -use-config $(HIPACC_CONFIG)
@@ -67,6 +71,10 @@
 endif
 ifeq ($(HIPACC_TIMING),on)
     HIPACC_OPTS+= -time-kernels
+endif
+ifeq ($(HIPACC_OMP),on)
+    HIPACC_CPU_OPTS+= -omp
+    CC_LINK+= -fopenmp
 endif

 # set target GPU architecture to the compute capability encoded in target
@@ -79,7 +87,7 @@

 cpu:
 	@echo 'Executing Hipacc Compiler for C++:'
-	$(COMPILER) $(COMPILER_INC) $(MYFLAGS) -emit-cpu $(HIPACC_WFV) -o main.cc $(TEST_CASE)/main.cpp
+	$(COMPILER) $(COMPILER_INC) $(MYFLAGS) -emit-cpu $(HIPACC_CPU_OPTS) -o main.cc $(TEST_CASE)/main.cpp
 	@echo 'Compiling C++ file using c++:'
 	$(CC_CC) -I$(HIPACC_DIR)/include $(COMMON_INC) $(MYFLAGS) $(OFLAGS) -m$(HIPACC_VEC_IS) -o main_cpu main.cc $(CC_LINK)
 	@echo 'Executing C++ binary'


Third party updates.

Third party updates.

--- 3rdParty/CUnit/cunit-config.cmake
+++ 3rdParty/CUnit/cunit-config.cmake
@@ -15,7 +15,11 @@
 set(CUNIT_ARCHIVE_MD5 "31c62bd7a65007737ba28b7aafc44d3a")
 set(CUNIT_INSTALL "${LEGATO_BINARY_DIR}/3rdParty/CUnit")
 set(CUNIT_SOURCE "${LEGATO_SOURCE_DIR}/3rdParty/CUnit/src")
-
+
+if(CMAKE_VERSION VERSION_GREATER 3.0)
+    cmake_policy(SET CMP0045 OLD)
+endif()
+
 get_target_property(CUNIT_TARGET cunit TYPE)

 # Create target 'cunit' to build the library
@@ -24,7 +28,7 @@
     include(ExternalProject)

     if(CMAKE_CROSSCOMPILING)
-        include(GetCompilerTarget)
+        include(GetCompilerOptions)
         get_compiler_target(gcc TARGET_HOST)
         set(CUNIT_CONFIGURE_ARGS    "--host=${TARGET_HOST}")
     endif()


Add warnings as errors flag

Add warnings as errors flag

--- Builds/CMake/CompileOptions.cmake
+++ Builds/CMake/CompileOptions.cmake
@@ -1,6 +1,16 @@
 #
 # Platform and architecture setup
 #
+
+# Set warnings as errors flag
+option(CUBBYFLOW_WARNINGS_AS_ERRORS ON)
+if(CUBBYFLOW_WARNINGS_AS_ERRORS)
+	if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+		set(WARN_AS_ERROR_FLAGS	"/WX")
+	else()
+		set(WARN_AS_ERROR_FLAGS "-Werror")
+	endif()
+endif()

 # Get upper case system name
 string(TOUPPER ${CMAKE_SYSTEM_NAME} SYSTEM_NAME_UPPER)
@@ -66,7 +76,7 @@
 	set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
 		/MP           # -> build with multiple processes
 		/W4           # -> warning level 3
-		/WX           # -> treat warnings as errors
+		${WARN_AS_ERROR_FLAGS}

 		# /wd4251     # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
 		# /wd4592     # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
@@ -93,8 +103,7 @@
 if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 	set(DEFAULT_COMPILE_OPTIONS ${DEFAULT_COMPILE_OPTIONS}
 		-Wall
-		-Wno-missing-braces
-		-Werror
+		${WARN_AS_ERROR_FLAGS}
 		-std=c++1z
 	)
 endif ()


Add glfw.3 to possible glfw3 library names.  Fixes OS X build.

Previously OS X was finding 'glfw' but that was removed.  glfw.3 is
more appropriate anyway.

--- modules/FindGLFW3.cmake
+++ modules/FindGLFW3.cmake
@@ -33,7 +33,7 @@
 	ENDIF(APPLE)

 	FIND_LIBRARY( GLFW3_LIBRARY
-        NAMES libglfw.so libglfw.so.3 libglfw.so.3.0 glfw3
+        NAMES libglfw.so libglfw.so.3 libglfw.so.3.0 glfw.3 glfw3
 		PATHS
 		/usr/lib64
 		/usr/lib


refactor: Update paraview to version 4.2

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -27,8 +27,8 @@
   GIT_TAG patched-3)

 add_revision(paraview
-  GIT_REPOSITORY git://github.com/gcasey/ParaView.git
-  GIT_TAG 983cebbb5adc27cffb941add14052850017aa483)
+  GIT_REPOSITORY git://github.com/Kitware/ParaView.git
+  GIT_TAG v4.2.0)

 add_revision(veloview
     SOURCE_DIR ${CMAKE_SOURCE_DIR}/..


Android: do not force compilers

Android: do not force compilers

[skip ci]

--- android-ndk-r10e.cmake
+++ android-ndk-r10e.cmake
@@ -19,4 +19,5 @@

 include("${CMAKE_CURRENT_LIST_DIR}/flags/cxx11.cmake") # before toolchain!

+option(ANDROID_FORCE_COMPILERS "" OFF)
 include("${CMAKE_CURRENT_LIST_DIR}/os/android.toolchain.cmake")


Add EXTRA_C_FLAGS as well.

Add EXTRA_C_FLAGS as well.

--- build_settings.cmake
+++ build_settings.cmake
@@ -20,7 +20,7 @@
 set(WARN_OPTS "-Wuninitialized -Werror -Wall -W -Wchar-subscripts -Wcomment -Wformat -Wparentheses -Wreturn-type -Wswitch -Wtrigraphs -Wunused -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings")

 # C and C++ compiler flags
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O3 ${WARN_OPTS} -fPIC -D_GLIBCXX_USE_CXX11_ABI=0 -DBOOST_DISABLE_ASSERTS -march=westmere -mtune=intel ${EXTRA_C_FLAGS}")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS} -Wnon-virtual-dtor -fvisibility-inlines-hidden -fdiagnostics-color=auto ${EXTRA_CXX_FLAGS}")

 # Linker flags


Export dynamic symbols also for binaries.

--- build_settings.cmake
+++ build_settings.cmake
@@ -26,6 +26,7 @@

 # Linker flags
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id -latomic -ldl -Wl,-E")
+SET( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -rdynamic" )

 # Use C++ 14
 set(CMAKE_CXX_STANDARD 14)


merging heads again >:(

merging heads again >:(

--- indra/cmake/Copy3rdPartyLibs.cmake
+++ indra/cmake/Copy3rdPartyLibs.cmake
@@ -209,7 +209,7 @@
         libapr-1.so.0
         libaprutil-1.so.0
         libatk-1.0.so
-        libcrypto.so
+        libcrypto.so.0.9.7
         libdb-4.2.so
         libexpat.so
         libgmock_main.so


Remove boost_system as a dependency (only headers required)

--- cmake/AddBoost.cmake
+++ cmake/AddBoost.cmake
@@ -14,26 +14,11 @@
 ##
 ##===------------------------------------------------------------------------------------------===##

-set(Boost_USE_MULTITHREADED ON)
-if(BUILD_SHARED_LIBS)
-  set(Boost_USE_STATIC_LIBS OFF)
-  set(Boost_USE_MULTITHREADED ON)
-  set(Boost_USE_STATIC_RUNTIME OFF)
-  add_definitions(-DBOOST_ALL_DYN_LINK)
-else()
-  set(Boost_USE_STATIC_LIBS ON)
-  set(Boost_USE_MULTITHREADED ON)
-  set(Boost_USE_STATIC_RUNTIME OFF)
-endif()
-
-set(GTCLANG_BOOST_COMPONENTS system)
-find_package(Boost 1.58 COMPONENTS ${GTCLANG_BOOST_COMPONENTS} REQUIRED)
+find_package(Boost 1.58 REQUIRED)

 dawn_export_package(
   NAME Boost
   FOUND ${Boost_FOUND}
   VERSION "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}"
-  LIBRARIES ${Boost_LIBRARIES}
   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-  DEFINITIONS -DBOOST_ALL_NO_LIB
 )


Disable internal headers as they don't work atm. Add libz for windows and fixed findGLEW to work with windows

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -35,13 +35,12 @@
 #ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 #POSSIBILITY OF SUCH DAMAGE.
 #=============================================================================
-
 # Look for the header file.
 FIND_PATH(GLEW_INCLUDE_DIR NAMES GL/glew.h)
 MARK_AS_ADVANCED(GLEW_INCLUDE_DIR)

 # Look for the library.
-FIND_LIBRARY(GLEW_LIBRARY NAMES GLEW)
+FIND_LIBRARY(GLEW_LIBRARY NAMES GLEW glew32)
 MARK_AS_ADVANCED(GLEW_LIBRARY)

 # handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if


fix GLFW Xrandr & xf86vmode dependency paths for X11 based systems

now uses the path returned by FindX11.cmake instead of just a -l<xxx>

fixes #199

--- cmake/FindGLFW.cmake
+++ cmake/FindGLFW.cmake
@@ -111,9 +111,15 @@
         find_package(X11 REQUIRED)

         if(NOT X11_Xrandr_FOUND)
-            message(FATAL_ERROR "Xrandr library not found")
+            message(FATAL_ERROR "Xrandr library not found - required for GLFW")
         endif()
-
+
+        if(NOT X11_xf86vmode_FOUND)
+            message(FATAL_ERROR "xf86vmode library not found - required for GLFW")
+        endif()
+
+        list(APPEND GLFW_x11_LIBRARY ${X11_Xrandr_LIB} ${X11_Xxf86vm_LIB})
+
         find_library( GLFW_glfw_LIBRARY
             NAMES
                 glfw
@@ -138,7 +144,7 @@
 if(GLFW_INCLUDE_DIR)

     if(GLFW_glfw_LIBRARY)
-        set( GLFW_LIBRARIES ${GLFW_glfw_LIBRARY} ${GLFW_cocoa_LIBRARY} ${GLFW_iokit_LIBRARY} )
+        set( GLFW_LIBRARIES ${GLFW_glfw_LIBRARY} ${GLFW_x11_LIBRARY} ${GLFW_cocoa_LIBRARY} ${GLFW_iokit_LIBRARY} )
         set( GLFW_FOUND "YES" )
         set (GLFW_LIBRARY ${GLFW_LIBRARIES})
         set (GLFW_INCLUDE_PATH ${GLFW_INCLUDE_DIR})
@@ -179,10 +185,6 @@
         mark_as_advanced(GLFW_VERSION)
     endif()

-    # static builds of glfw require Xrandr
-    if( NOT WIN32 AND NOT APPLE AND GLFW_FOUND)
-        list(APPEND GLFW_LIBRARIES -lXrandr -lXxf86vm)
-    endif()
 endif(GLFW_INCLUDE_DIR)

 include(FindPackageHandleStandardArgs)


protoc: only disable in watch os mode

protoc: only disable in watch os mode

Summary:
(see comment)
Closes https://github.com/caffe2/caffe2/pull/1157

Reviewed By: bddppq

Differential Revision: D5753813

Pulled By: Yangqing

fbshipit-source-id: 7a60f03bb37314161e42ac0405a4b168d2541f3f

--- cmake/ProtoBuf.cmake
+++ cmake/ProtoBuf.cmake
@@ -38,11 +38,16 @@
   endif()
 elseif (ANDROID OR IOS)
   custom_protobuf_find()
-  # For Androd or iOS, we won't need to build the libprotoc and protoc binaries
-  # because we will use the host protoc to build the proto files.
-  set_target_properties(
-      libprotoc protoc PROPERTIES
-      EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
+  if (IOS_PLATFORM STREQUAL "WATCHOS")
+    # Unfortunately, WatchOS does not support building libprotoc and protoc,
+    # so we will need to exclude it. The problem of using EXCLUDE_FROM_ALL is
+    # that one is not going to be able to run cmake install. A proper solution
+    # has to be implemented by protobuf since we derive our cmake files from
+    # there.
+    set_target_properties(
+        libprotoc protoc PROPERTIES
+        EXCLUDE_FROM_ALL 1 EXCLUDE_FROM_DEFAULT_BUILD 1)
+  endif()
 else()
   find_package( Protobuf )
   if ( NOT (Protobuf_FOUND OR PROTOBUF_FOUND) )


correct F4 series CCRAM handling

correct F4 series CCRAM handling


Avoid hunter disabling ENV${CMAKE_PREFIX_PATH}

--- scripts/AddHunter.cmake
+++ scripts/AddHunter.cmake
@@ -38,6 +38,11 @@
     list(APPEND HUNTER_RECIPE_DIRS "${HUNTER_REPOSITORY_cookoff_DIRECTORY}")
     list(APPEND CMAKE_MODULE_PATH "${HUNTER_REPOSITORY_cookoff_DIRECTORY}/find")
   endif()
+  # Add env cmake prefix path explictly since hunter will set internal version,
+  # at which point cmake would ignore env one
+  if(NOT CMAKE_PREFIX_PATH AND NOT "$ENV{CMAKE_PREFIX_PATH}" STREQUAL "")
+    string(REGEX REPLACE ":" ";" CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH})
+  endif()
 endmacro()

 macro(find_or_add_hunter_package package)


Fix adb search path issue for Android build in FindAdb.cmake (#430)

--- bldsys/cmake/module/FindAdb.cmake
+++ bldsys/cmake/module/FindAdb.cmake
@@ -1,5 +1,5 @@
 #[[
- Copyright (c) 2019, Arm Limited and Contributors
+ Copyright (c) 2022, Arm Limited and Contributors

  SPDX-License-Identifier: Apache-2.0

@@ -29,7 +29,7 @@
     NAMES
         ${ADB_FILE}
     PATH_SUFFIXES
-        bin
+        platform-tools
     PATHS
         $ENV{ANDROID_HOME})


Do not look for ScaLAPACK if MPI is off

Do not look for ScaLAPACK if MPI is off

--- cmake/custom/mpi.cmake
+++ cmake/custom/mpi.cmake
@@ -43,7 +43,7 @@
 include(CMakeDependentOption)
 cmake_dependent_option(
   ENABLE_SCALAPACK "Enable usage of ScaLAPACK" OFF
-  "ENABLE_MPI" ON
+  "NOT ENABLE_MPI" ON
   )
 if(ENABLE_SCALAPACK)
   set(USE_ScaLAPACK ON)


cmake: Minor refactoring of 'import_kconfig'

Minor refactoring of 'import_kconfig' in preparation of resolving

Signed-off-by: Sebastian Bøe <edee888afd63e94916688495334700803eba20a0@nordicsemi.no>

--- cmake/extensions.cmake
+++ cmake/extensions.cmake
@@ -744,20 +744,21 @@

 # 2.2 Misc
 #
-# Parse a KConfig formatted file (typically named *.config) and
-# introduce all the CONF_ variables into the CMake namespace
-function(import_kconfig config_file)
-  # Parse the lines prefixed with CONFIG_ in ${config_file}
+# Parse a KConfig fragment (typically with extension .config) and
+# introduce all the symbols that are prefixed with 'CONFIG_' into the
+# CMake namespace
+function(import_kconfig kconfig_fragment)
+  # Parse the lines prefixed with 'CONFIG_' in ${kconfig_fragment}
   file(
     STRINGS
-    ${config_file}
+    ${kconfig_fragment}
     DOT_CONFIG_LIST
     REGEX "^CONFIG_"
     ENCODING "UTF-8"
   )

   foreach (CONFIG ${DOT_CONFIG_LIST})
-    # CONFIG looks like: CONFIG_NET_BUF=y
+    # CONFIG could look like: CONFIG_NET_BUF=y

     # Match the first part, the variable name
     string(REGEX MATCH "[^=]+" CONF_VARIABLE_NAME ${CONFIG})


Fixed CMake dependency typo

Fixed CMake dependency typo

--- cmake/sdksCommon.cmake
+++ cmake/sdksCommon.cmake
@@ -53,7 +53,7 @@
     # Since we removed the hand-written C2J_LIST and instead auto generating it based on models,
     # and location of models may not exist or incorrect when SDK is installed and then source has been deleted by customers.
     # we end up getting an incomplete C2J_LIST when customers call find_package(AWSSDK). But C2J_LIST is only used in customers code for dependencies completing.
-    set(${DEPENDENCY_LIST_VAR} "${TEMP_VAR};core" PARENT_SCOPE)
+    set(${DEPENDENCY_LIST_VAR} "${TEMP_VAR},core" PARENT_SCOPE)
 endfunction()

 function(get_dependencies_for_test TEST_NAME DEPENDENCY_LIST_VAR)


Fix CMake to only actually include SDL once in solution file

--- src/build_options.cmake
+++ src/build_options.cmake
@@ -382,9 +382,24 @@
     if (MSVC)
         set(SDL2Root "${CMAKE_EXTERNAL_PATH}/SDL")

-        INCLUDE_EXTERNAL_MSPROJECT(SDL "${SDL2Root}/VisualC/SDL/SDL_VS2013.vcxproj")
         set(SDL2_INCLUDE "${SDL2Root}/include" PARENT_SCOPE)
         set(SDL2_LIBRARY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/SDL2.lib" PARENT_SCOPE)
+
+        # Only want to include this once.
+        # This has to go into properties because it needs to persist across the entire cmake run.
+        get_property(SDL_PROJECT_ALREADY_INCLUDED
+            GLOBAL
+            PROPERTY SDL_PROJECT_INCLUDED
+        )
+
+        if (NOT SDL_PROJECT_ALREADY_INCLUDED)
+            INCLUDE_EXTERNAL_MSPROJECT(SDL "${SDL2Root}/VisualC/SDL/SDL_VS2013.vcxproj")
+            set_property(GLOBAL
+                PROPERTY SDL_PROJECT_INCLUDED "TRUE"
+            )
+            message("Including SDL_VS2013.vcxproj for you!")
+        endif()
+
     else()
         message(FATAL_ERROR "Need to deal with SDL on non-Windows platforms")
     endif()


restored netlib scalapack support

restored netlib scalapack support

--- cmake/FindScalapack.cmake
+++ cmake/FindScalapack.cmake
@@ -18,6 +18,8 @@
   set(SCALAPACK_FOUND TRUE)
   RETURN()
 endif()
+
+include(FindPackageHandleStandardArgs)

 if(EXISTS $ENV{MKLROOT})
   find_file(_MKL_SCALAPACK_INCLUDE
@@ -82,6 +84,8 @@
         CACHE STRING "MKL ScaLAPACK for GCC")
     endif()
     set(SCALAPACK_MKL ON)
+    find_package_handle_standard_args(Scalapack
+      DEFAULT_MSG SCALAPACK_LIBRARIES SCALAPACK_INCLUDE_PATH)
   endif()
 else()
   find_library(SCALAPACK_LIBRARIES
@@ -96,18 +100,15 @@
     /usr/local/lib
     /usr/lib)
   unset(WITH_MKL)
+  find_package_handle_standard_args(Scalapack
+    DEFAULT_MSG SCALAPACK_LIBRARIES)
 endif()

 if(SCALAPACK_LIBRARIES)
   set(SCALAPACK_FOUND TRUE)
-  message(STATUS "Found SCALAPACK (MKL : ${SCALAPACK_MKL})")
 endif()

 mark_as_advanced(_MKL_SCALAPACK_LP64 _MKL_INTEL_LP64
   _MKL_GNU_THREAD _MKL_INTEL_THREAD _MKL_CORE
   _MKL_BLACS_INTELMPI_LP64 _MKL_SCALAPACK_INCLUDE _MKL_BLACS_OPENMPI_LP64)

-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Scalapack
-  DEFAULT_MSG SCALAPACK_LIBRARIES SCALAPACK_INCLUDE_PATH)
-


CMake check for git on the system

CMake check for git on the system

--- cmake/GetGitVersion.cmake
+++ cmake/GetGitVersion.cmake
@@ -10,7 +10,8 @@
 # include(GetGitVersion)
 # get_git_version(GIT_VERSION)
 #
-# Requires CMake 2.6+
+# Requires CMake 2.8.11+
+find_package(Git)

 if(__get_git_version)
   return()
@@ -18,16 +19,21 @@
 set(__get_git_version INCLUDED)

 function(get_git_version var)
-  execute_process(COMMAND git describe --match "v[0-9]*.[0-9]*.[0-9]*" --abbrev=8
-      RESULT_VARIABLE status
-      OUTPUT_VARIABLE GIT_VERSION
-      ERROR_QUIET)
-  if(${status})
+  if(GIT_EXECUTABLE)
+      execute_process(COMMAND git describe --match "v[0-9]*.[0-9]*.[0-9]*" --abbrev=8
+          RESULT_VARIABLE status
+          OUTPUT_VARIABLE GIT_VERSION
+          ERROR_QUIET)
+      if(${status})
+          set(GIT_VERSION "v0.0.0")
+      else()
+          string(STRIP ${GIT_VERSION} GIT_VERSION)
+          string(REGEX REPLACE "-[0-9]+-g" "-" GIT_VERSION ${GIT_VERSION})
+      endif()
+  else()
       set(GIT_VERSION "v0.0.0")
-  else()
-      string(STRIP ${GIT_VERSION} GIT_VERSION)
-      string(REGEX REPLACE "-[0-9]+-g" "-" GIT_VERSION ${GIT_VERSION})
   endif()
+

   # Work out if the repository is dirty
   execute_process(COMMAND git update-index -q --refresh


improve the mkl search procedure

improve the mkl search procedure

--- cmake/OpenCVFindMKL.cmake
+++ cmake/OpenCVFindMKL.cmake
@@ -79,9 +79,10 @@

 #determine arch
 if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
-    set(MKL_X64 1)
-    set(MKL_ARCH "intel64")
-
+    set(MKL_ARCH_LIST "intel64")
+    if(MSVC)
+        list(APPEND MKL_ARCH_LIST "win-x64")
+    endif()
     include(CheckTypeSize)
     CHECK_TYPE_SIZE(int _sizeof_int)
     if (_sizeof_int EQUAL 4)
@@ -90,14 +91,19 @@
         set(MKL_ARCH_SUFFIX "ilp64")
     endif()
 else()
-    set(MKL_ARCH "ia32")
+    set(MKL_ARCH_LIST "ia32")
     set(MKL_ARCH_SUFFIX "c")
 endif()

 if(MKL_VERSION_STR VERSION_GREATER "11.3.0" OR MKL_VERSION_STR VERSION_EQUAL "11.3.0")
     set(mkl_lib_find_paths
-        ${MKL_ROOT_DIR}/lib
-        ${MKL_ROOT_DIR}/lib/${MKL_ARCH} ${MKL_ROOT_DIR}/../tbb/lib/${MKL_ARCH})
+        ${MKL_ROOT_DIR}/lib)
+    foreach(MKL_ARCH ${MKL_ARCH_LIST})
+      list(APPEND mkl_lib_find_paths
+        ${MKL_ROOT_DIR}/lib/${MKL_ARCH}
+        ${MKL_ROOT_DIR}/../tbb/lib/${MKL_ARCH}
+        ${MKL_ROOT_DIR}/${MKL_ARCH})
+    endforeach()

     set(mkl_lib_list "mkl_intel_${MKL_ARCH_SUFFIX}")

@@ -121,7 +127,7 @@

 set(MKL_LIBRARIES "")
 foreach(lib ${mkl_lib_list})
-    find_library(${lib} ${lib} ${mkl_lib_find_paths})
+    find_library(${lib} NAMES ${lib} ${lib}_dll HINTS ${mkl_lib_find_paths})
     mark_as_advanced(${lib})
     if(NOT ${lib})
         mkl_fail()


Simplify compiler flags

Simplify compiler flags

--- cmake/compile_flags.cmake
+++ cmake/compile_flags.cmake
@@ -52,10 +52,6 @@
 function(set_default_flags target_name)
     if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
         set(flags /MP /GF)
-
-        if(${MSVC_VERSION} GREATER 1900)
-            set(flags ${flags} /Zc:__cplusplus)
-        endif()
     elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
         set(flags -fpic)
     elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)


Moving back to VTK 5.8, 5.10.1 has weird problems with views W/L

--- cmake/externals/VTK.cmake
+++ cmake/externals/VTK.cmake
@@ -14,8 +14,8 @@
         set(location_args ${location_args} GIT_TAG ${revision})
     else()
         set(location_args
-            URL "http://www.vtk.org/files/release/5.10/vtk-5.10.1.tar.gz"
-            URL_MD5 "264b0052e65bd6571a84727113508789")
+            URL "http://www.vtk.org/files/release/5.8/vtk-5.8.0.tar.gz"
+            URL_MD5 "37b7297d02d647cc6ca95b38174cb41f")
     endif()

     find_package(Qt4 REQUIRED)


libvorbis DEPENDS libogg

libvorbis DEPENDS libogg

--- cmake/get-libvorbis.cmake
+++ cmake/get-libvorbis.cmake
@@ -18,6 +18,7 @@

 ExternalProject_Add(
     libvorbis
+    DEPENDS         libogg
     PREFIX          ${DEPENDENCY_EXTRACT_DIR}
     DOWNLOAD_DIR    ${DEPENDENCY_DOWNLOAD_DIR}
     DOWNLOAD_NAME   libvorbis-v${LIBOGG_VERSION}.zip


move anakin release to third_party/install/anakin

--- cmake/inference_lib.cmake
+++ cmake/inference_lib.cmake
@@ -150,7 +150,7 @@
         SRCS
         ${PADDLE_BINARY_DIR}/paddle/fluid/inference/api/libinference_anakin_api* # compiled anakin api
         ${ANAKIN_INSTALL_DIR} # anakin release
-        DSTS ${dst_dir}/inference/anakin ${dst_dir}/inference/anakin)
+        DSTS ${dst_dir}/inference/anakin ${FLUID_INSTALL_DIR}/third_party/install/anakin)
      list(APPEND inference_deps anakin_inference_lib)
 endif()


Remove uneccessary debug message

Remove uneccessary debug message

Change-Id: Ib986469db48890777fe3fa96ad0c118af10cf3c9

--- cmake/internal/doit.cmake
+++ cmake/internal/doit.cmake
@@ -174,7 +174,6 @@
 			IF(NOT ${CONFIG_BUILD_GLOBAL_TEST_EXECUTABLE})
 				IF(${${CURRENT_MODULE_NAME}_HAS_SOURCE_FILES})
 					IF(NOT "${CURRENT_MODULE_TYPE}" STREQUAL "DYNAMIC") # use an advanced flag to control this behaviour ("DYNAMIC_TEST_LINK_BEHAVIOUR") ?!
-                    MESSAGE("XXXXXXXXXXXXXXXXXXXX ${CURRENT_MODULE_NAME}_LIBRARIES=${${CURRENT_MODULE_NAME}_LIBRARIES}")
 						SET(collected_dependencies_test ${${CURRENT_MODULE_NAME}_LIBRARIES} ${collected_dependencies_test})
 					ENDIF()
 				ENDIF()


[cmake] `Helpers` use `RUNTIME DESTINATION` in `alicevision_add_software`

--- src/cmake/Helpers.cmake
+++ src/cmake/Helpers.cmake
@@ -182,7 +182,8 @@
   )

   install(TARGETS ${software_name}
-    DESTINATION ${CMAKE_INSTALL_BINDIR}
+    RUNTIME
+      DESTINATION ${CMAKE_INSTALL_BINDIR}
   )
 endfunction()


Removed some dumb commits

Removed some dumb commits

--- src/cmake_install.cmake
+++ src/cmake_install.cmake
@@ -1,39 +0,0 @@
-# Install script for directory: /Users/ddliu/Desktop/CapSolvIt/CapSolv/src
-
-# Set the install prefix
-if(NOT DEFINED CMAKE_INSTALL_PREFIX)
-  set(CMAKE_INSTALL_PREFIX "/usr/local")
-endif()
-string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
-
-# Set the install configuration name.
-if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
-  if(BUILD_TYPE)
-    string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
-           CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
-  else()
-    set(CMAKE_INSTALL_CONFIG_NAME "")
-  endif()
-  message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
-endif()
-
-# Set the component getting installed.
-if(NOT CMAKE_INSTALL_COMPONENT)
-  if(COMPONENT)
-    message(STATUS "Install component: \"${COMPONENT}\"")
-    set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
-  else()
-    set(CMAKE_INSTALL_COMPONENT)
-  endif()
-endif()
-
-if(CMAKE_INSTALL_COMPONENT)
-  set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
-else()
-  set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
-endif()
-
-file(WRITE "/Users/ddliu/Desktop/CapSolvIt/CapSolv/src/${CMAKE_INSTALL_MANIFEST}" "")
-foreach(file ${CMAKE_INSTALL_MANIFEST_FILES})
-  file(APPEND "/Users/ddliu/Desktop/CapSolvIt/CapSolv/src/${CMAKE_INSTALL_MANIFEST}" "${file}\n")
-endforeach()


update for windows compile. (#27813)

update for windows compile. (#27813)

--- cmake/init.cmake
+++ cmake/init.cmake
@@ -28,5 +28,6 @@

 if(WIN32)
     set(WIN_PROPS ${CMAKE_SOURCE_DIR}/cmake/paddle_win.props)
+    set(CMAKE_CXX_FLAGS_RELEASE "-O3 -Os -DNDEBUG")
 endif()


corrected ISPC warning message for proper location (on Mac and Linux).

--- cmake/ispc.cmake
+++ cmake/ispc.cmake
@@ -15,7 +15,7 @@

 IF (NOT EXISTS "${OSPRAY_ISPC_DIRECTORY}/ispc")
   MESSAGE("********************************************")
-  MESSAGE("Could not find ISPC (tried ${PROJECT_SOURCE_DIR}/../ispc-v1.7.0-linux).")
+  MESSAGE("Could not find ISPC (tried ${OSPRAY_ISPC_DIRECTORY}.")
   MESSAGE("")
   MESSAGE("This version of ospray expects you to have a binary install of ISPC version 1.7.0, and expects this to be installed in the sibling directory to where the ospray source are located. Please go to https://ispc.github.io/downloads.html, select the binary release for your particular platform, and unpack it to ${PROJECT_SOURCE_DIR}/../")
   MESSAGE("")


Only pass TOOLCHAIN_FILE when specified.

Also don't pass the package path, since it's unnecessary. Avoiding
unused variables suppresses a CMake warning.

--- rosserial_client/cmake/rosserial_client-extras.cmake
+++ rosserial_client/cmake/rosserial_client-extras.cmake
@@ -50,15 +50,18 @@
     message(SEND_ERROR "rosserial_client_add_client called without DIRECTORY argument.")
   endif()

+  if(client_TOOLCHAIN_FILE)
+    set(DTOOLCHAIN_FILE -DCMAKE_TOOLCHAIN_FILE=${client_TOOLCHAIN_FILE})
+  endif()
+
   # Create a build tree directory for configuring the client's CMake project.
   file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/${client_DIRECTORY})
   add_custom_target(${PROJECT_NAME}_${client_DIRECTORY}
     WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/${client_DIRECTORY}
     COMMAND ${CMAKE_COMMAND} ${PROJECT_SOURCE_DIR}/${client_DIRECTORY}
       -DROS_LIB_DIR=${${PROJECT_NAME}_ROS_LIB_DIR}
-      -DCATKIN_PACKAGE_DIR=${PROJECT_SOURCE_DIR}
       -DEXECUTABLE_OUTPUT_PATH=${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}
-      -DCMAKE_TOOLCHAIN_FILE=${client_TOOLCHAIN_FILE}
+      ${DTOOLCHAIN_FILE}
   )
   add_dependencies(${PROJECT_NAME}_${client_DIRECTORY} ${PROJECT_NAME}_ros_lib)
 endfunction()