Graph Control 5.4.8-1 Gold

Graph Control 5.4.8-1 Gold

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

--- version.cmake
+++ version.cmake
@@ -6,8 +6,8 @@

 set ( HPCC_MINOR 4 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "rc" )
-set ( HPCC_SEQUENCE 5 )
+set ( HPCC_MATURITY "release" )
+set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Graph Control 4.0.0-rc14 Release Candidate 14

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 12 )
+set ( HPCC_SEQUENCE 14 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )
   error ( "HPCC_POINT must be less than 66." )


Split off 8.2.22

Split off 8.2.22

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 8 )
 set ( HPCC_MINOR 2 )
-set ( HPCC_POINT 21 )
+set ( HPCC_POINT 23 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


[jancy] release 1.8.3

[jancy] release 1.8.3

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

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

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


Bumped version number

Bumped version number

--- version.cmake
+++ version.cmake
@@ -1 +1 @@
-set(autowiring_VERSION 0.2.12)
+set(autowiring_VERSION 0.3.0)


Fix trigger cmake reconfig on buildtype

Fix trigger cmake reconfig on buildtype

--- version.cmake
+++ version.cmake
@@ -41,10 +41,12 @@
 	set(GIT_REPO_DIRTY ${CMAKE_MATCH_6})
 	message("-- opendatacon version: ${ODC_VERSION} ${GIT_REPO_COMMIT} ${GIT_REPO_DIRTY}")

-	if(DEFINED CURRENT_CONFIG)
-		message("writing ${BINARY_DIR}/current_build_config: ${CURRENT_CONFIG}")
-		file(WRITE "${BINARY_DIR}/current_build_config" "-${CURRENT_CONFIG}")
-		configure_file ("${BINARY_DIR}/current_build_config" "${BINARY_DIR}/current_build_config" COPYONLY)
+	if(DEFINED CURRENT_CONFIG) #true at build-time
+		set(build_config_file "${BINARY_DIR}/current_build_config")
+		message("writing ${build_config_file}: ${CURRENT_CONFIG}")
+		file(WRITE ${build_config_file} "-${CURRENT_CONFIG}")
+	else()
+		set(build_config_file "${CMAKE_BINARY_DIR}/current_build_config")
 	endif()

 	configure_file (
@@ -52,5 +54,10 @@
 		"${CMAKE_SOURCE_DIR}/include/opendatacon/Version.h"
 	)
 	#hack to trigger cmake reconfigure if Version.h changed
+	#reconfigure needed because we use version info to generate cpack info etc.
 	configure_file ("${CMAKE_SOURCE_DIR}/include/opendatacon/Version.h" "${CMAKE_SOURCE_DIR}/include/opendatacon/Version.h" COPYONLY)
+	#ditto for build type
+	if(EXISTS ${build_config_file})
+		configure_file (${build_config_file} ${build_config_file} COPYONLY)
+	endif()
 endif()


Updated SWIG superbuild version to 3.0.9

Change-Id: Iabf6b29f6eb01b192ac4e16e847c75341d474253

--- SuperBuild/External_Swig.cmake
+++ SuperBuild/External_Swig.cmake
@@ -12,9 +12,9 @@

 if(NOT SWIG_DIR)

-  set(SWIG_TARGET_VERSION 3.0.7)
-  set(SWIG_DOWNLOAD_SOURCE_HASH "7fff46c84b8c630ede5b0f0827e3d90a")
-  set(SWIG_DOWNLOAD_WIN_HASH "d8b5a9ce49c819cc1bfc1e797b85ba7a")
+  set(SWIG_TARGET_VERSION 3.0.8)
+  set(SWIG_DOWNLOAD_SOURCE_HASH "c96a1d5ecb13d38604d7e92148c73c97")
+  set(SWIG_DOWNLOAD_WIN_HASH "07bc00f7511b7d57516c50f59d705efa")

   if(WIN32)


Updated XLink to address libusb issue

Updated XLink to address libusb issue

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -14,8 +14,15 @@
 hunter_config(
     XLink
     VERSION "luxonis-2020.2"
-    URL "https://github.com/luxonis/XLink/archive/1717591c8bfb078a9a6ed30bca9c82273296e86f.tar.gz"
-    SHA1 "06419E6F806B9A3DF64E4929E1262497C172CACE"
+    URL "https://github.com/luxonis/XLink/archive/3f8c17eef960d0a76fcb8f78581407d74dade2c7.tar.gz"
+    SHA1 "00494618711aa285282af1c9937e39f42e568680"
+    CMAKE_ARGS
+        CMAKE_POSITION_INDEPENDENT_CODE=ON
+)hunter_config(
+    XLink
+    VERSION "luxonis-2020.2"
+    URL "https://github.com/luxonis/XLink/archive/3f8c17eef960d0a76fcb8f78581407d74dade2c7.tar.gz"
+    SHA1 "00494618711aa285282af1c9937e39f42e568680"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
 )
@@ -32,4 +39,4 @@
     VERSION "1.72.0-p0"
     CMAKE_ARGS
         CMAKE_POSITION_INDEPENDENT_CODE=ON
-)+)


Add function version of Get_Device_Name so that ada xthick14a example compiles
correctly.

svn path=/trunk/; revision=8622

--- bindings/ada/plplot.ads.cmake
+++ bindings/ada/plplot.ads.cmake
@@ -876,6 +876,9 @@
     -- plgdev
     procedure Get_Device_Name(Device_Name : out String);

+    -- Function version of the procedure Get_Device_Name; not part of the PLplot API.
+    -- plgdev
+    function Get_Device_Name return String;

     -- Retrieve current window into device space
     -- plgdidev


forcing to download ann fromm umd.edu

forcing to download ann fromm umd.edu

--- ann.cmake
+++ ann.cmake
@@ -15,7 +15,8 @@
     1.1.2
     ann_1.1.2.tar.gz
     7ffaacc7ea79ca39d4958a6378071365
-    http://www.cs.umd.edu/~mount/ANN/Files/1.1.2)
+    http://www.cs.umd.edu/~mount/ANN/Files/1.1.2
+    FORCE)

 message ("Installing ${libann_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
 ExternalProject_Add(${libann_NAME}


change curl lib to curl_imp

change curl lib to curl_imp

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

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


Updated forge tag

Updated forge tag

glfw window toolkit backend has a fix for window closing operation

--- CMakeModules/build_forge.cmake
+++ CMakeModules/build_forge.cmake
@@ -22,7 +22,7 @@
 ExternalProject_Add(
     forge-ext
     GIT_REPOSITORY https://github.com/arrayfire/forge.git
-    GIT_TAG 5e40ded1d5dd43c637f9a041b4c281e8e1715f00
+    GIT_TAG 0892228ec28902200c7903a707ea4afb96203192
     PREFIX "${prefix}"
     INSTALL_DIR "${prefix}"
     UPDATE_COMMAND ""


ENH: Update clone URL's.

ENH: Update clone URL's.

git sed s%github.com/TubeTK%github.com/KitwareMedical%

--- CMake/Superbuild/ExternalProjectsConfig.cmake
+++ CMake/Superbuild/ExternalProjectsConfig.cmake
@@ -21,7 +21,7 @@
 #
 ##############################################################################

-# See https://github.com/TubeTK/TubeTK/wiki/Dependencies
+# See https://github.com/KitwareMedical/TubeTK/wiki/Dependencies

 # Cppcheck version 1.61
 set( Cppcheck_URL
@@ -33,7 +33,7 @@
 set( CTK_HASH_OR_TAG 233d87b70db2ce7f00bc71be93d009d8b2ee063d )

 # TubeTK Image Viewer snapshot 2014-01-26
-set( ImageViewer_URL ${github_protocol}://github.com/TubeTK/TubeTK-ImageViewer.git )
+set( ImageViewer_URL ${github_protocol}://github.com/KitwareMedical/TubeTK-ImageViewer.git )
 set( ImageViewer_HASH_OR_TAG 9133a934e3238020332ff6e2d51bc5736abd59f1 )

 # Insight Segmentation and Registration Toolkit
@@ -59,7 +59,7 @@

 # TubeTK Parameter Serializer snapshot 2014-02-05 )
 set( ParameterSerializer_URL
-  ${github_protocol}://github.com/TubeTK/TubeTK-ParameterSerializer.git )
+  ${github_protocol}://github.com/KitwareMedical/TubeTK-ParameterSerializer.git )
 set( ParameterSerializer_HASH_OR_TAG fe360ce153bfe4efc36b276750d4606bb1d7b156 )

 # Slicer Execution Model snapshot 2014-05-13


Improve external project example

Improve external project example

- Indicate how to depend on other external projects
- Move ${proj}_DEPENDS variable to right location

--- CMakeExternals/GuidelinesSupportLibrary.cmake
+++ CMakeExternals/GuidelinesSupportLibrary.cmake
@@ -9,9 +9,11 @@
       - CMake/PackageDepends/MITK_GuidelinesSupportLibrary_Config.cmake ]]

 set(proj GuidelinesSupportLibrary)
-set(${proj}_DEPENDS ${proj})
+set(proj_DEPENDENCIES "")

 if(MITK_USE_${proj})
+  set(${proj}_DEPENDS ${proj})
+
   if(DEFINED ${proj}_DIR AND NOT EXISTS ${${proj}_DIR})
     message(FATAL_ERROR "${proj}_DIR variable is defined but corresponds to non-existing directory!")
   endif()
@@ -25,6 +27,7 @@
         -DGSL_CXX_STANDARD:STRING=${MITK_CXX_STANDARD}
         -DGSL_TEST:BOOL=OFF
       CMAKE_CACHE_DEFAULT_ARGS ${ep_common_cache_default_args}
+      DEPENDS ${proj_DEPENDENCIES}
     )

     set(${proj}_DIR ${ep_prefix})


MSR: Use “absolute” path to specify location of SR

--- cmake/Modules/LibAddTest.cmake
+++ cmake/Modules/LibAddTest.cmake
@@ -82,7 +82,7 @@

 	add_test (
 		NAME testshell_markdown_${NAME}
-		COMMAND "${CMAKE_CURRENT_BINARY_DIR}/markdown_shell_recorder.sh" "${FILE}"
+		COMMAND "${CMAKE_BINARY_DIR}/tests/shell/shell_recorder/tutorial_wrapper/markdown_shell_recorder.sh" "${FILE}"
 		WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
 		)
 	set_tests_properties (${TEST_NAME} PROPERTIES ENVIRONMENT "${ARG_ENVIRONMENT}")


Use build script shipped with libFuzzer.

--- cmake/external/libfuzzer.cmake
+++ cmake/external/libfuzzer.cmake
@@ -15,7 +15,7 @@
 set(LIBFUZZER_TARGET external.libfuzzer)
 set(LIBFUZZER_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/${LIBFUZZER_TARGET})

-list(APPEND LIBFUZZER_LIBRARIES LLVMFuzzer)
+list(APPEND LIBFUZZER_LIBRARIES Fuzzer)

 foreach(lib IN LISTS LIBFUZZER_LIBRARIES)
   set(CUR_LIB ${LIBFUZZER_INSTALL_DIR}/src/${LIBFUZZER_TARGET}-build/lib${lib}.a)
@@ -32,12 +32,8 @@
     GIT_REPOSITORY https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer
     GIT_TAG master
     UPDATE_COMMAND ""
-    CMAKE_CACHE_ARGS ${EXTERNAL_PROJECT_CMAKE_COMPILERS}
-    # libFuzzer needs very specific set of flags, so we don't forward EXTERNAL_PROJECT_CMAKE_ARGS
-    CMAKE_ARGS -DLLVM_USE_SANITIZE_COVERAGE=YES
-               -DLLVM_USE_SANITIZER=Address
-               -DCMAKE_CXX_FLAGS=-std=c++11
-               -Wno-dev
+    CONFIGURE_COMMAND ""
+    BUILD_COMMAND CXX=${CMAKE_CXX_COMPILER} ${LIBFUZZER_INSTALL_DIR}/src/${LIBFUZZER_TARGET}/build.sh
     INSTALL_COMMAND ""
     BUILD_BYPRODUCTS ${LIBFUZZER_BUILD_BYPRODUCTS}
 )


Fix typo, should fix dependency problems with kxml_compiler on clean
builds.

svn path=/trunk/KDE/kdepim/; revision=534299

--- cmake/modules/KodeMacros.cmake
+++ cmake/modules/KodeMacros.cmake
@@ -19,7 +19,7 @@
 			COMMAND ${KODE_XML_COMPILER_EXECUTABLE}
 			ARGS --external-parser ${_schema}
 			MAIN_DEPENDENCY ${_schema}
-			DEPENDS ${KODE_XML_COMPILER_EXECUATABLE}
+			DEPENDS ${KODE_XML_COMPILER_EXECUTABLE}
 		)
 		# hack since the above OUTPUT line doesn't work with cmake 2.3.4-20060317
 		add_custom_command( OUTPUT ${_source_h} DEPENDS ${_source_cpp} )


CMake: MSVC: Pass list of components the right way to msvc_llvm_config
and siblings. Support targets whose name does not end on
`CodeGen'. Remove a performance bottleneck.

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

--- cmake/modules/LLVMConfig.cmake
+++ cmake/modules/LLVMConfig.cmake
@@ -1,13 +1,15 @@
-macro(llvm_config executable link_components)
+macro(llvm_config executable)
+  # extra args is the list of link components.
   if( MSVC )
-    msvc_llvm_config(${executable} ${link_components})
+    msvc_llvm_config(${executable} ${ARGN})
   else( MSVC )
-    nix_llvm_config(${executable} ${link_components})
+    nix_llvm_config(${executable} ${ARGN})
   endif( MSVC )
-endmacro(llvm_config executable link_components)
-
-
-function(msvc_llvm_config executable link_components)
+endmacro(llvm_config)
+
+
+function(msvc_llvm_config executable)
+  set( link_components ${ARGN} )
   foreach(c ${link_components})
     if( c STREQUAL "jit" )
       set(lfgs "${lfgs} /INCLUDE:_X86TargetMachineModule")
@@ -22,7 +24,7 @@
     endif()
   endforeach(c)

-  msvc_map_components_to_libraries(${link_components} LIBRARIES)
+  msvc_map_components_to_libraries(LIBRARIES ${link_components})
   target_link_libraries(${executable} ${LIBRARIES})

   if( lfgs )
@@ -30,15 +32,26 @@
       PROPERTIES
       LINK_FLAGS ${lfgs})
   endif()
-endfunction(msvc_llvm_config executable link_components)
-
-
-function(msvc_map_components_to_libraries link_components out_libs)
+endfunction(msvc_llvm_config)
+
+
+function(msvc_map_components_to_libraries out_libs)
+  set( link_components ${ARGN} )
   foreach(c ${link_components})
     # add codegen/asmprinter
     list(FIND LLVM_TARGETS_TO_BUILD ${c} idx)
     if( NOT idx LESS 0 )
-      list(APPEND expanded_components "LLVM${c}CodeGen")
+      list(FIND llvm_libs "LLVM${c}CodeGen" idx)
+      if( NOT idx LESS 0 )
+	list(APPEND expanded_components "LLVM${c}CodeGen")
+      else()
+	list(FIND llvm_libs "LLVM${c}" idx)
+	if( NOT idx LESS 0 )
+	  list(APPEND expanded_components "LLVM${c}")
+	else()
+	  message(FATAL_ERROR "Target ${c} is not in the set of libraries.")
+	endif()
+      endif()
       list(FIND llvm_libs "LLVM${c}AsmPrinter" asmidx)
       if( NOT asmidx LESS 0 )
         list(APPEND expanded_components "LLVM${c}AsmPrinter")
@@ -62,6 +75,7 @@
   endforeach(c)
   # We must match capitalization.
   string(TOUPPER "${llvm_libs}" capitalized_libs)
+  list(REMOVE_DUPLICATES expanded_components)
   set(curr_idx 0)
   list(LENGTH expanded_components lst_size)
   while( ${curr_idx} LESS ${lst_size} )
@@ -75,6 +89,7 @@
     list(APPEND result ${canonical_lib})
     list(APPEND result ${MSVC_LIB_DEPS_${canonical_lib}})
     list(APPEND expanded_components ${MSVC_LIB_DEPS_${canonical_lib}})
+    list(REMOVE_DUPLICATES expanded_components)
     list(LENGTH expanded_components lst_size)
     math(EXPR curr_idx "${curr_idx} + 1")
   endwhile( ${curr_idx} LESS ${lst_size} )
@@ -83,9 +98,9 @@
 endfunction(msvc_map_components_to_libraries)

-macro(nix_llvm_config executable link_components)
+macro(nix_llvm_config executable)
   set(lc "")
-  foreach(c ${LLVM_LINK_COMPONENTS})
+  foreach(c ${ARGN})
     set(lc "${lc} ${c}")
   endforeach(c)
   if( NOT HAVE_LLVM_CONFIG )
@@ -116,7 +131,7 @@
       endif(c MATCHES ".*\\.o")
     endforeach(c)
   endif( NOT HAVE_LLVM_CONFIG )
-endmacro(nix_llvm_config executable link_components)
+endmacro(nix_llvm_config)

 # This data is used on MSVC for stablishing executable/library


TpQtMacros.cmake: Add macro for generating service side adaptors.

--- cmake/modules/TpQtMacros.cmake
+++ cmake/modules/TpQtMacros.cmake
@@ -48,6 +48,15 @@
 #
 # function TPQT_FUTURE_CLIENT_GENERATOR(spec namespace [arguments] [DEPENDS dependencies ...])
 #          Same as tpqt_client_generator, but for future interfaces
+#
+# function TPQT_SERVICE_GENERATOR(spec group pretty_include namespace [arguments] [DEPENDS dependencies ...])
+#          This function takes care of invoking qt-svc-gen.py with the correct arguments, which generates
+#          headers out of specs. spec is the name of the spec headers will be generated from, group represents
+#          the spec's group, pretty_include is the name of the capitalized header (for example ServiceGenerator),
+#          namespace is the C++ namespace the generated header will belong to. This function also accepts
+#          as an optional last argument a list of additional command line arguments which will be passed to
+#          qt-svc-gen.py upon execution. After issuing DEPENDS in the last argument you can pass a list of targets
+#          the generated target will depend on.
 #
 # function TPQT_GENERATE_MANAGER_FILE(MANAGER_FILE OUTPUT_FILENAME DEPEND_FILENAME)
 #          This function takes care of invoking manager-file.py with the correct arguments. The first argument is the
@@ -263,6 +272,40 @@
                        "generate_future-${spec}-body")
 endfunction(tpqt_future_client_generator spec namespace)

+function(tpqt_service_generator spec group pretty_include namespace)
+    tpqt_extract_depends(service_generator_args service_generator_depends ${ARGN})
+    set(ARGS
+        ${CMAKE_SOURCE_DIR}/tools/qt-svc-gen.py
+            --group=${group}
+            --namespace=${namespace}
+            --typesnamespace=Tp
+            --headerfile=${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.h
+            --implfile=${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.cpp
+            --realinclude=TelepathyQt/Service/_gen/svc-${spec}.h
+            --mocinclude=TelepathyQt/Service/_gen/svc-${spec}.moc.hpp
+            --specxml=${CMAKE_CURRENT_BINARY_DIR}/../_gen/stable-spec.xml
+            --ifacexml=${CMAKE_CURRENT_BINARY_DIR}/../_gen/spec-${spec}.xml
+            --visibility=TP_QT_SVC_EXPORT
+            ${service_generator_args})
+    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.h ${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.cpp
+        COMMAND ${PYTHON_EXECUTABLE}
+        ARGS ${ARGS}
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+
+        DEPENDS ${CMAKE_SOURCE_DIR}/tools/libqtcodegen.py
+                ${CMAKE_SOURCE_DIR}/tools/qt-svc-gen.py)
+    add_custom_target(generate_service-${spec}-body DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.cpp)
+    add_dependencies(all-generated-service-sources generate_service-${spec}-body)
+
+    if (service_generator_depends)
+        add_dependencies(generate_service-${spec}-body ${service_generator_depends})
+    endif (service_generator_depends)
+
+    tpqt_generate_moc_i_target_deps(${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.h
+                       ${CMAKE_CURRENT_BINARY_DIR}/_gen/svc-${spec}.moc.hpp
+                       "generate_service-${spec}-body")
+endfunction(tpqt_service_generator spec group pretty_include namespace)
+
 # This function is used for generating CM in various examples
 function(tpqt_generate_manager_file MANAGER_FILE OUTPUT_FILENAME DEPEND_FILENAME)
     # make_directory is required, otherwise the command won't work!!


Version 0.2 cometh...

Version 0.2 cometh...

--- cmake/platform/Propeller.cmake
+++ cmake/platform/Propeller.cmake
@@ -18,45 +18,47 @@
 cmake_minimum_required(VERSION "2.8")
 cmake_policy(VERSION "2.8")

+cmake_policy(SET "CMP0045" OLD)
+
 # C Flags ######################################################################

 set(PROPELLER_C_FLAGS
-"-ffunction-sections -fdata-sections -m32bit-doubles -Wall -std=c99")
+"-ffunction-sections -fdata-sections -m32bit-doubles -Wall")

 set(CMAKE_C_FLAGS
-"-g -Os ${PROPELLER_C_FLAGS}")
+"-g -Os ${PROPELLER_C_FLAGS} -std=c99")

 set(CMAKE_C_FLAGS_DEBUG
-"-g ${PROPELLER_C_FLAGS}")
+"-g ${PROPELLER_C_FLAGS} -std=c99")

 set(CMAKE_C_FLAGS_MINSIZEREL
-"-Os -DNDEBUG ${PROPELLER_C_FLAGS}")
+"-Os -DNDEBUG ${PROPELLER_C_FLAGS} -std=c99")

 set(CMAKE_C_FLAGS_RELEASE
-"-Os -DNDEBUG -w ${PROPELLER_C_FLAGS}")
+"-Os -DNDEBUG -w ${PROPELLER_C_FLAGS} -std=c99")

 set(CMAKE_C_FLAGS_RELWITHDEBINFO
-"-Os -g -w ${PROPELLER_C_FLAGS}")
+"-Os -g -w ${PROPELLER_C_FLAGS} -std=c99")

 # C++ Flags ####################################################################

 set(PROPELLER_CXX_FLAGS
-"${PROPELLER_C_FLAGS} -fno-exceptions -fno-rtti -std=gnu++0x")
+"${PROPELLER_C_FLAGS} -fno-exceptions -fno-rtti")

 set(CMAKE_CXX_FLAGS
-"-g -Os ${PROPELLER_CXX_FLAGS}")
+"-g -Os ${PROPELLER_CXX_FLAGS} -std=gnu++0x")

 set(CMAKE_CXX_FLAGS_DEBUG
-"-g ${PROPELLER_CXX_FLAGS}")
+"-g ${PROPELLER_CXX_FLAGS} -std=gnu++0x")

 set(CMAKE_CXX_FLAGS_MINSIZEREL
-"-Os -DNDEBUG ${PROPELLER_CXX_FLAGS}")
+"-Os -DNDEBUG ${PROPELLER_CXX_FLAGS} -std=gnu++0x")

 set(CMAKE_CXX_FLAGS_RELEASE
-"-Os -DNDEBUG ${PROPELLER_CXX_FLAGS}")
+"-Os -DNDEBUG ${PROPELLER_CXX_FLAGS} -std=gnu++0x")

 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
-"-Os -g ${PROPELLER_CXX_FLAGS}")
+"-Os -g ${PROPELLER_CXX_FLAGS} -std=gnu++0x")

 # Linker Flags #################################################################

@@ -210,7 +212,7 @@
     get_filename_component(SPATH "${SPIN_FILE}" DIRECTORY)

     add_custom_command(OUTPUT "${SPIN_FILE_OBJ}"
-    COMMAND "${OPENSPIN}"
+    COMMAND "${OPENSPIN}" -q
     ARGS -I "${PROPELLER_SDK_PATH}/propeller-gcc/spin"
     ARGS -I "${SPATH}"
     ARGS -o "${SPIN_FILE_DAT}"
@@ -524,19 +526,27 @@
         get_filename_component(FF_PATH_NAME "${FF_PATH}" NAME_WE)
         string(REGEX REPLACE "[^0-9A-Za-z]" "_" FF_PATH_NAME "${FF_PATH_NAME}")

-        list(APPEND FF_PATH_SOURCES ${FF_PATH_HEADERS})
-        add_library("${FF_PATH_NAME}" STATIC ${FF_PATH_SOURCES})
-
-        set_target_properties("${FF_PATH_NAME}" PROPERTIES
-        COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
-        LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
-        SUFFIX ".a")
-
-        set(LIB_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)
-
-    else()
-        set(LIB_TARGET "" PARENT_SCOPE)
-    endif()
+        get_target_property(TARGET_FOUND "${FF_PATH_NAME}" NAME)
+
+        if(NOT "${TARGET_FOUND}")
+
+            list(APPEND FF_PATH_SOURCES ${FF_PATH_HEADERS})
+            add_library("${FF_PATH_NAME}" STATIC ${FF_PATH_SOURCES})
+
+            set_target_properties("${FF_PATH_NAME}" PROPERTIES
+            COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
+            LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
+            SUFFIX ".a")
+
+            set(LIB_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)
+
+            return()
+
+        endif()
+
+    endif()
+
+    set(LIB_TARGET "" PARENT_SCOPE)

 endfunction()

@@ -559,19 +569,27 @@
         get_filename_component(FF_PATH_NAME "${FF_PATH}" NAME_WE)
         string(REGEX REPLACE "[^0-9A-Za-z]" "_" FF_PATH_NAME "${FF_PATH_NAME}")

-        list(APPEND FF_PATH_SOURCES ${FF_PATH_HEADERS})
-        add_executable("${FF_PATH_NAME}" ${FF_PATH_SOURCES})
-
-        set_target_properties("${FF_PATH_NAME}" PROPERTIES
-        COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
-        LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
-        SUFFIX ".elf")
-
-        set(EXE_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)
-
-    else()
-        set(EXE_TARGET "" PARENT_SCOPE)
-    endif()
+        get_target_property(TARGET_FOUND "${FF_PATH_NAME}" NAME)
+
+        if(NOT "${TARGET_FOUND}")
+
+            list(APPEND FF_PATH_SOURCES ${FF_PATH_HEADERS})
+            add_executable("${FF_PATH_NAME}" ${FF_PATH_SOURCES})
+
+            set_target_properties("${FF_PATH_NAME}" PROPERTIES
+            COMPILE_FLAGS "${EXTRA_COMPILE_FLAGS} ${COMPILE_FLAGS}"
+            LINK_FLAGS "${EXTRA_LINK_FLAGS} ${LINK_FLAGS}"
+            SUFFIX ".elf")
+
+            set(EXE_TARGET "${FF_PATH_NAME}" PARENT_SCOPE)
+
+            return()
+
+        endif()
+
+    endif()
+
+    set(EXE_TARGET "" PARENT_SCOPE)

 endfunction()

@@ -784,7 +802,7 @@
             get_filename_component(SPATH "${${TARGET_NAME}_FPATH}" DIRECTORY)

             add_custom_command(OUTPUT "${FILE_NAME_BINARY}"
-            COMMAND "${OPENSPIN}"
+            COMMAND "${OPENSPIN}" -q
             ARGS -I "${PROPELLER_SDK_PATH}/propeller-gcc/spin"
             ARGS -I "${SPATH}"
             ARGS -o "${FILE_NAME_BINARY}"
@@ -818,6 +836,18 @@

     add_definitions("-D__PROPELLER__")

+    if("${${TARGET_NAME}_MM}" STREQUAL "cmm")
+        add_definitions("-D__PROPELLER_CMM__")
+    endif()
+
+    if("${${TARGET_NAME}_MM}" STREQUAL "lmm")
+        add_definitions("-D__PROPELLER_LMM__")
+    endif()
+
+    if("${PROPELLER_C_FLAGS}" MATCHES "-m32bit-doubles")
+        add_definitions("-D__PROPELLER_32BIT_DOUBLES__")
+    endif()
+
     if((DEFINED ${TARGET_NAME}_LIBS) AND ${TARGET_NAME}_LIBS)
         setup_libraries("${${TARGET_NAME}_LIBS}"
         "-m${${TARGET_NAME}_MM}"
@@ -845,10 +875,10 @@
                         list(APPEND LIB_TARGETS "${LIB_SOURCE}")
                     endif()

-                    # Help the linker see spin symbols...
-                    if("${LIB_SOURCE_EXT}" STREQUAL ".spin.obj")
-                        list(APPEND LIB_TARGETS "${LIB_SOURCE}")
-                    endif()
+                    # # Help the linker see spin symbols...
+                    # if("${LIB_SOURCE_EXT}" STREQUAL ".spin.obj")
+                    #     list(APPEND LIB_TARGETS "${LIB_SOURCE}")
+                    # endif()

                 endforeach()


Added missing underscore in CMAKE_CL_64

Added missing underscore in CMAKE_CL_64

--- cmake/FindWin32Lapack.cmake
+++ cmake/FindWin32Lapack.cmake
@@ -2,7 +2,7 @@
 FIND_LIBRARY(WIN32_LAPACK NAMES liblapack PATHS ${TPSRC})

 IF (NOT WIN32_BLAS OR NOT WIN32_LAPACK)
-    IF (CMAKE_CL64)
+    IF (CMAKE_CL_64)
         SET(WIN_ZIP_FILE         "win64-blas-lapack.zip")
         SET(WIN_ZIP_MD5_VALUE    "b5ad4f7335ca964bbdafab129e44a046")
         SET(WIN_ZIP_SHA1_VALUE   "adb331fa195db264e95e46b902887f12971dbf48")
@@ -58,4 +58,4 @@
 LINK_DIRECTORIES(${LAPACK_DIR})

 MESSAGE(STATUS "Found Win32 BLAS: ${WIN32_BLAS}")
-MESSAGE(STATUS "Found Win32 Lapack: ${WIN32_LAPACK}")+MESSAGE(STATUS "Found Win32 Lapack: ${WIN32_LAPACK}")


Use RPATH on Linux and Mac by default

Use RPATH on Linux and Mac by default

Makes it easier to run the tests by automatically adding the appropriate
rpath to executables.

Change-Id: Ia70a90a7c84f944b6963b87f10210baf494a35cf

--- cmake/InstallLocation.cmake
+++ cmake/InstallLocation.cmake
@@ -22,3 +22,14 @@
 if(NOT INSTALL_DOC_DIR)
   set(INSTALL_DOC_DIR "doc")
 endif()
+
+# Set up RPATH for the project too.
+option(ENABLE_RPATH "Enable rpath support on Linux and Mac" ON)
+if(UNIX AND ENABLE_RPATH)
+  if(APPLE)
+    set(CMAKE_INSTALL_NAME_DIR "@executable_path/../${INSTALL_LIBRARY_DIR}")
+  endif()
+  set(CMAKE_SKIP_BUILD_RPATH FALSE)
+  set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif()


WIP:  Ubuntu build

WIP:  Ubuntu build

--- cmake/Modules/FindAGG.cmake
+++ cmake/Modules/FindAGG.cmake
@@ -1,19 +1,54 @@
-# - Try to find AGG
+# - Try to find the AGG graphics library
 # Once done this will define
-#  AGG_FOUND - System has AGG
-#  AGG_INCLUDE_DIRS - The AGG include directories
-#  AGG_LIBRARIES - The libraries needed to use AGG
+#
+#  AGG_FOUND - system has AGG
+#  AGG_INCLUDE_DIR - the AGG include directory
+#  AGG_LIBRARIES - Link these to use AGG
 #  AGG_DEFINITIONS - Compiler switches required for using AGG

-find_path(AGG_INCLUDE_DIR include/agg_config.h
-          HINTS ${AGG_ROOT} )
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

-set(AGG_INCLUDE_DIRS ${AGG_INCLUDE_DIR} )
+if (AGG_INCLUDE_DIR AND AGG_LIBRARIES)

-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set AGG_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(AGG DEFAULT_MSG
-                                  AGG_INCLUDE_DIR)
+  # in cache already
+  set(AGG_FOUND TRUE)

-mark_as_advanced( AGG_INCLUDE_DIR )
+else (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
+  if (NOT WIN32)
+    # use pkg-config to get the directories and then use these values
+    # in the FIND_PATH() and FIND_LIBRARY() calls
+    find_package(PkgConfig)
+    pkg_check_modules(PC_AGG QUIET libagg)
+
+    set(AGG_DEFINITIONS ${PC_AGG_CFLAGS_OTHER})
+  endif (NOT WIN32)
+
+  find_path(AGG_INCLUDE_DIR agg2/agg_pixfmt_gray.h
+    PATHS ${PC_AGG_INCLUDEDIR} ${PC_AGG_INCLUDE_DIRS}
+  )
+
+  find_library(AGG_LIBRARIES NAMES agg
+    PATHS ${PC_AGG_LIBDIR} ${PC_AGG_LIBRARY_DIRS}
+  )
+
+  if (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
+     set(AGG_FOUND TRUE)
+  endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
+
+  if (AGG_FOUND)
+    if (NOT AGG_FIND_QUIETLY)
+      message(STATUS "Found AGG: ${AGG_LIBRARIES}")
+    endif (NOT AGG_FIND_QUIETLY)
+  else (AGG_FOUND)
+    if (AGG_FIND_REQUIRED)
+      message(FATAL_ERROR "Could NOT find AGG")
+    endif (AGG_FIND_REQUIRED)
+  endif (AGG_FOUND)
+
+  mark_as_advanced(AGG_INCLUDE_DIR AGG_LIBRARIES)
+
+endif (AGG_INCLUDE_DIR AND AGG_LIBRARIES)
+


sugar 1.3.0

sugar 1.3.0

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -132,7 +132,7 @@
 hunter_config(sqlite3 VERSION 3.21.0-p2)
 hunter_config(Sober VERSION 0.1.3)
 hunter_config(stormlib VERSION 9.21-p1)
-hunter_config(Sugar VERSION 1.2.2)
+hunter_config(sugar VERSION 1.3.0)
 hunter_config(SuiteSparse VERSION 4.5.1-p1)
 hunter_config(TIFF VERSION 4.0.2-p3)
 hunter_config(toluapp VERSION 1.0.93-p1)


[CMake] Make llvm_install_library_symlink respect LLVM_LIBDIR_SUFFIX.

This is required to support multilib install targets, and addresses a regression introduced in r252093.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1074,7 +1074,7 @@
   set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
   set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})

-  set(output_dir lib)
+  set(output_dir lib${LLVM_LIBDIR_SUFFIX})
   if(WIN32 AND "${type}" STREQUAL "SHARED")
     set(output_dir bin)
   endif()


general.cmake: cleanup, set cmake_minimum_required

Change-Id: I5a5093fef3ffecbf021606ce39c36e34f7ae38e3
Reviewed-on: http://gerrit.aldebaran.lan/56178
Reviewed-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>
Tested-by: dmerejkowsky <1e4b13000fa8777df4cefd2fd8215187e3deb062@aldebaran-robotics.com>

--- cmake/qibuild/general.cmake
+++ cmake/qibuild/general.cmake
@@ -2,11 +2,7 @@
 ## Use of this source code is governed by a BSD-style license that can be
 ## found in the COPYING file.

-# if (_QI_GENERAL_CMAKE_INCLUDED)
-#   return()
-# endif()
-# set(_QI_GENERAL_CMAKE_INCLUDED TRUE)
-
+cmake_minimum_required(VERSION 2.8.12.2)

 #yeah allow NORMAL endfunction/endif/..
 set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
@@ -16,17 +12,8 @@
 cmake_policy(SET CMP0011 NEW)
 # if() recognizes numbers and boolean constants.
 cmake_policy(SET CMP0012 NEW)
-
-if(CMAKE_VERSION VERSION_GREATER "2.8.3")
-  cmake_policy(SET CMP0017 NEW)
-endif()
-
-# We use RUNTIME_DIRECTORY_<CONFIG> for visual studio
-# which is a very nice feature but that only came up with
-# cmake 2.8.2
-if(MSVC_IDE)
-  cmake_minimum_required(VERSION 2.8.3)
-endif()
+# Prefer files from the CMake module directory when including from there.
+cmake_policy(SET CMP0017 NEW)

 #get the current directory of the file
 get_filename_component(_ROOT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)


uses new variable to check SWIG dependency

closes #433

--- SuperBuild/External_STIR.cmake
+++ SuperBuild/External_STIR.cmake
@@ -65,7 +65,7 @@
   if (USE_ITK)
     list(APPEND ${proj}_DEPENDENCIES "ITK")
   endif()
-  if (BUILD_STIR_SWIG_PYTHON)
+  if (STIR_BUILD_SWIG_PYTHON)
     list(APPEND ${proj}_DEPENDENCIES "SWIG")
   endif()
   if (USE_NiftyPET)


changed location of js files

changed location of js files

--- libjsengine/JSResources.cmake
+++ libjsengine/JSResources.cmake
@@ -1,5 +1,5 @@
-set(web3 "${CMAKE_CURRENT_LIST_DIR}/../../js/web3.js/dist/web3.js")
-set(admin "${CMAKE_CURRENT_LIST_DIR}/../../js/admin.js")
+set(web3 "${CMAKE_CURRENT_LIST_DIR}/../../web3.js/dist/web3.js")
+set(admin "${CMAKE_CURRENT_LIST_DIR}/../../webthree-helpers/js/admin.js")
 set(pretty_print "${CMAKE_CURRENT_LIST_DIR}/PrettyPrint.js")
 set(common "${CMAKE_CURRENT_LIST_DIR}/Common.js")


Cleaning up CMake file

Cleaning up CMake file

--- cmake/ConfigureCompiler.cmake
+++ cmake/ConfigureCompiler.cmake
@@ -103,20 +103,41 @@
     endif()
   endif()

-  # set MS Visual Compiler flags (see documentation, there are many other options)
-  if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
-    SET(CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS OFF)
-  endif()
-  if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
-    SET(CONFIGURE_COMPILER_SET_CXX_COMPILER_FLAGS OFF)
-    SET(CONFIGURE_COMPILER_SET_Fortran_COMPILER_FLAGS OFF)
-#    set(CMAKE_CXX_FLAGS " /O2 /Ot /GL /fp:fast -DNDEBUG")
-  endif()
-  if(CMAKE_Fortran_COMPILER_ID STREQUAL "MSVC")
-    SET(CONFIGURE_COMPILER_SET_Fortran_COMPILER_FLAGS OFF)
-  endif()
-
-   # set GNU Compiler Collection flags
+  # set MS Visual 2008 Compiler flags
+  if (MSVC90)
+    if (CMAKE_CL_64)
+      set(CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS OFF)
+      set(CONFIGURE_COMPILER_SET_CXX_COMPILER_FLAGS OFF)
+    else()
+      set(CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS ON)
+      set(CMAKE_C_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm1000 /Qc99"
+                        CACHE STRING "Flags used by the compiler during all build types." FORCE)
+      set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MDd /Zi  /Ob0 /Od /RTC1 /DDEBUG"
+                        CACHE STRING "Flags used by the compiler during debug builds." FORCE)
+      set(CMAKE_C_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG"
+                        CACHE STRING "Flags used by the compiler during release builds." FORCE)
+      set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MD /Zi /O2 /Ob1 /DNDEBUG"
+                        CACHE STRING "Flags used by the compiler during release with debug info builds." FORCE)
+      set(CMAKE_C_FLAGS_MINSIZEREL "/MD /O1 /Ob1 /DNDEBUG"
+                        CACHE STRING "Flags used by the compiler during release minsize builds." FORCE)
+
+      set(CONFIGURE_COMPILER_SET_CXX_COMPILER_FLAGS ON)
+      set(CMAKE_CXX_FLAGS "/DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR"
+                          CACHE STRING "Flags used by the compiler during all build types." FORCE)
+      set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /DDEBUG"
+                          CACHE STRING "Flags used by the compiler during debug builds." FORCE)
+      set(CMAKE_CXX_FLAGS_RELEASE "/MD /O2 /Ob2 /DNDEBUG /DEIGEN_NO_DEBUG"
+                          CACHE STRING "Flags used by the compiler during release builds." FORCE)
+      set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /Zi /O2 /Ob1 /DNDEBUG"
+                          CACHE STRING "Flags used by the compiler during release with debug info builds." FORCE)
+      set(CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O1 /Ob1 /D NDEBUG /DEIGEN_NO_DEBUG"
+                          CACHE STRING "Flags used by the compiler during release minsize builds." FORCE)
+    endif()
+
+    set(CONFIGURE_COMPILER_SET_Fortran_COMPILER_FLAGS OFF)
+  endif()
+
+  # set GNU Compiler Collection flags
   if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
     set(CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS ON)
     set(CMAKE_C_FLAGS "-ansi -pedantic -Wall -Wextra -fmessage-length=100 -std=c99"
@@ -232,12 +253,12 @@
   endif()

   if (NOT CONFIGURE_COMPILER_SET_C_COMPILER_FLAGS)
-    message(FATAL_ERROR "Could not set C Compiler flags! \n Need to fix ConfigureCompiler.cmake to support ${CMAKE_C_COMPILER_ID} compiler!")
+    message(FATAL_ERROR "Could not set C Compiler flags! \nNeed to fix ConfigureCompiler.cmake to support ${CMAKE_C_COMPILER_ID} compiler!")
   endif()
   if (NOT CONFIGURE_COMPILER_SET_CXX_COMPILER_FLAGS)
-    message(FATAL_ERROR "Could not set C++ Compiler flags! \n Need to fix ConfigureCompiler.cmake to support ${CMAKE_CXX_COMPILER_ID} compiler!")
-  endif()
-  if (NOT CONFIGURE_COMPILER_SET_Fortran_COMPILER_FLAGS)
-    message(FATAL_ERROR "Could not set Fortran Compiler flags! \n Need to fix ConfigureCompiler.cmake to support ${CMAKE_Fortran_COMPILER_ID} compiler!")
-  endif()
+    message(FATAL_ERROR "Could not set C++ Compiler flags! \nNeed to fix ConfigureCompiler.cmake to support ${CMAKE_CXX_COMPILER_ID} compiler!")
+  endif()
+#  if (NOT CONFIGURE_COMPILER_SET_Fortran_COMPILER_FLAGS)
+#    message(FATAL_ERROR "Could not set Fortran Compiler flags! \nNeed to fix ConfigureCompiler.cmake to support ${CMAKE_Fortran_COMPILER_ID} compiler!")
+#  endif()
 endif()


potential fix for lib python.

potential fix for lib python.

--- cmake/FindPythonLibsNew.cmake
+++ cmake/FindPythonLibsNew.cmake
@@ -1,211 +1,215 @@
-# - Find python libraries
-# This module finds the libraries corresponding to the Python interpeter
-# FindPythonInterp provides.
-# This code sets the following variables:
-#
-#  PYTHONLIBS_FOUND           - have the Python libs been found
-#  PYTHON_PREFIX              - path to the Python installation
-#  PYTHON_LIBRARIES           - path to the python library
-#  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
-#  PYTHON_SITE_PACKAGES       - path to installation site-packages
-#  PYTHON_IS_DEBUG            - whether the Python interpreter is a debug build
-#
-#  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
-#
-# A function PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is defined to build modules for python.
-
-#=============================================================================
-# Copyright 2001-2009 Kitware, Inc.
-# Copyright 2012 Continuum Analytics, Inc.
-#
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# * Neither the names of Kitware, Inc., the Insight Software Consortium,
-# nor the names of their contributors may be used to endorse or promote
-# products derived from this software without specific prior written
-# permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-#  License text for the above reference.)
-
-# Use the Python interpreter to find the libs.
-if(PythonLibsNew_FIND_REQUIRED)
-    find_package(PythonInterp REQUIRED)
-else()
-    find_package(PythonInterp)
-endif()
-
-if(NOT PYTHONINTERP_FOUND)
-    set(PYTHONLIBS_FOUND FALSE)
-    return()
-endif()
-
-# According to http://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter
-# testing whether sys has the gettotalrefcount function is a reliable, cross-platform
-# way to detect a CPython debug interpreter.
-execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
-    "from distutils import sysconfig as s;import sys;import struct; print('.'.join(str(v) for v in sys.version_info)); print(s.PREFIX); print(s.get_python_inc(plat_specific=True)); print(s.get_python_lib(plat_specific=True)); print(s.get_config_var('SO')); print(hasattr(sys, 'gettotalrefcount')+0); print(struct.calcsize('@P'));"
-    RESULT_VARIABLE _PYTHON_SUCCESS
-    OUTPUT_VARIABLE _PYTHON_VALUES
-    ERROR_VARIABLE _PYTHON_ERROR_VALUE
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-if(NOT _PYTHON_SUCCESS MATCHES 0)
-    if(PythonLibsNew_FIND_REQUIRED)
-        message("-- PYTHON EXECUTABLE: ${PYTHON_EXECUTABLE}")
-        message(FATAL_ERROR
-            "Python config failure:\n${_PYTHON_ERROR_VALUE}")
-    endif()
-    set(PYTHONLIBS_FOUND FALSE)
-    return()
-endif()
-
-# Convert the process output into a list
-string(REGEX REPLACE ";" "\\\\;" _PYTHON_VALUES ${_PYTHON_VALUES})
-string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES})
-list(GET _PYTHON_VALUES 0 _PYTHON_VERSION_LIST)
-list(GET _PYTHON_VALUES 1 PYTHON_PREFIX)
-list(GET _PYTHON_VALUES 2 PYTHON_INCLUDE_DIR)
-list(GET _PYTHON_VALUES 3 PYTHON_SITE_PACKAGES)
-list(GET _PYTHON_VALUES 4 PYTHON_MODULE_EXTENSION)
-list(GET _PYTHON_VALUES 5 PYTHON_IS_DEBUG)
-list(GET _PYTHON_VALUES 6 PYTHON_SIZEOF_VOID_P)
-
-# Make sure the Python has the same pointer-size as the chosen compiler
-if(NOT ${PYTHON_SIZEOF_VOID_P} MATCHES ${CMAKE_SIZEOF_VOID_P})
-    if(PythonLibsNew_FIND_REQUIRED)
-        math(EXPR _PYTHON_BITS "${PYTHON_SIZEOF_VOID_P} * 8")
-        math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8")
-        message(FATAL_ERROR
-            "Python config failure: Python is ${_PYTHON_BITS}-bit, "
-            "chosen compiler is  ${_CMAKE_BITS}-bit")
-    endif()
-    set(PYTHONLIBS_FOUND FALSE)
-    return()
-endif()
-
-# The built-in FindPython didn't always give the version numbers
-string(REGEX REPLACE "\\." ";" _PYTHON_VERSION_LIST ${_PYTHON_VERSION_LIST})
-list(GET _PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
-list(GET _PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
-list(GET _PYTHON_VERSION_LIST 2 PYTHON_VERSION_PATCH)
-
-# Make sure all directory separators are '/'
-string(REGEX REPLACE "\\\\" "/" PYTHON_PREFIX ${PYTHON_PREFIX})
-string(REGEX REPLACE "\\\\" "/" PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
-string(REGEX REPLACE "\\\\" "/" PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES})
-
-# TODO: All the nuances of CPython debug builds have not been dealt with/tested.
-if(PYTHON_IS_DEBUG)
-    set(PYTHON_MODULE_EXTENSION "_d${PYTHON_MODULE_EXTENSION}")
-endif()
-
-if(CMAKE_HOST_WIN32)
-    set(PYTHON_LIBRARY
-        "${PYTHON_PREFIX}/libs/Python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib")
-elseif(APPLE)
-    set(PYTHON_LIBRARY
-        "${PYTHON_PREFIX}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.dylib")
-else()
-    if(${PYTHON_SIZEOF_VOID_P} MATCHES 8)
-        set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib64" "${PYTHON_PREFIX}/lib")
-    else()
-        set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib")
-    endif()
-    # Probably this needs to be more involved. It would be nice if the config
-    # information the python interpreter itself gave us were more complete.
-    find_library(PYTHON_LIBRARY
-        NAMES "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
-              "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m"
-              "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}mu"
-              "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}dm"
-        PATHS ${_PYTHON_LIBS_SEARCH}
-        NO_SYSTEM_ENVIRONMENT_PATH)
-endif()
-
-# For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
-SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
-          "Path to where Python.h is found (deprecated)")
-
-MARK_AS_ADVANCED(
-  PYTHON_LIBRARY
-  PYTHON_INCLUDE_DIR
-)
-
-# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
-# cache entries because they are meant to specify the location of a single
-# library. We now set the variables listed by the documentation for this
-# module.
-SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
-SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
-SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
-
-
-# Don't know how to get to this directory, just doing something simple :P
-#INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-#FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
-find_package_message(PYTHON
-    "Found PythonLibs: ${PYTHON_LIBRARY}"
-    "${PYTHON_EXECUTABLE}${PYTHON_VERSION}")
-#find_package_message(PYTHON "PYTHON_PREFIX: ${PYTHON_PREFIX}" "${PYTHON_PREFIX}")
-#find_package_message(PYTHON "PYTHON_LIBRARY: ${PYTHON_LIBRARY}" "${PYTHON_LIBRARY}")
-#find_package_message(PYTHON "PYTHON_VERSION: ${PYTHON_VERSION}" "${PYTHON_VERSION}")
-#find_package_message(PYTHON "PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE}" "${PYTHON_EXECUTABLE}")
-
-
-# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
-FUNCTION(PYTHON_ADD_MODULE _NAME )
-  GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS
-    GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
-  OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
-  OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED
-    "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
-
-  # Mark these options as advanced
-  MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME}
-    PYTHON_MODULE_${_NAME}_BUILD_SHARED)
-
-  IF(PYTHON_ENABLE_MODULE_${_NAME})
-    IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
-      SET(PY_MODULE_TYPE MODULE)
-    ELSE(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
-      SET(PY_MODULE_TYPE STATIC)
-      SET_PROPERTY(GLOBAL  APPEND  PROPERTY  PY_STATIC_MODULES_LIST ${_NAME})
-    ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
-
-    SET_PROPERTY(GLOBAL  APPEND  PROPERTY  PY_MODULES_LIST ${_NAME})
-    ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
-    TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
-
-    IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
-      SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
-      SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX "${PYTHON_MODULE_EXTENSION}")
-    ELSE()
-    ENDIF()
-
-  ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
-ENDFUNCTION(PYTHON_ADD_MODULE)
-
+# - Find python libraries
+# This module finds the libraries corresponding to the Python interpeter
+# FindPythonInterp provides.
+# This code sets the following variables:
+#
+#  PYTHONLIBS_FOUND           - have the Python libs been found
+#  PYTHON_PREFIX              - path to the Python installation
+#  PYTHON_LIBRARIES           - path to the python library
+#  PYTHON_INCLUDE_DIRS        - path to where Python.h is found
+#  PYTHON_SITE_PACKAGES       - path to installation site-packages
+#  PYTHON_IS_DEBUG            - whether the Python interpreter is a debug build
+#
+#  PYTHON_INCLUDE_PATH        - path to where Python.h is found (deprecated)
+#
+# A function PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is defined to build modules for python.
+
+#=============================================================================
+# Copyright 2001-2009 Kitware, Inc.
+# Copyright 2012 Continuum Analytics, Inc.
+#
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# * Neither the names of Kitware, Inc., the Insight Software Consortium,
+# nor the names of their contributors may be used to endorse or promote
+# products derived from this software without specific prior written
+# permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# Use the Python interpreter to find the libs.
+if(PythonLibsNew_FIND_REQUIRED)
+    find_package(PythonInterp REQUIRED)
+else()
+    find_package(PythonInterp)
+endif()
+
+if(NOT PYTHONINTERP_FOUND)
+    set(PYTHONLIBS_FOUND FALSE)
+    return()
+endif()
+
+# According to http://stackoverflow.com/questions/646518/python-how-to-detect-debug-interpreter
+# testing whether sys has the gettotalrefcount function is a reliable, cross-platform
+# way to detect a CPython debug interpreter.
+execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c"
+    "from distutils import sysconfig as s;import sys;import struct; print('.'.join(str(v) for v in sys.version_info)); print(s.PREFIX); print(s.get_python_inc(plat_specific=True)); print(s.get_python_lib(plat_specific=True)); print(s.get_config_var('SO')); print(hasattr(sys, 'gettotalrefcount')+0); print(struct.calcsize('@P'));"
+    RESULT_VARIABLE _PYTHON_SUCCESS
+    OUTPUT_VARIABLE _PYTHON_VALUES
+    ERROR_VARIABLE _PYTHON_ERROR_VALUE
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+if(NOT _PYTHON_SUCCESS MATCHES 0)
+    if(PythonLibsNew_FIND_REQUIRED)
+        message("-- PYTHON EXECUTABLE: ${PYTHON_EXECUTABLE}")
+        message(FATAL_ERROR
+            "Python config failure:\n${_PYTHON_ERROR_VALUE}")
+    endif()
+    set(PYTHONLIBS_FOUND FALSE)
+    return()
+endif()
+
+# Convert the process output into a list
+string(REGEX REPLACE ";" "\\\\;" _PYTHON_VALUES ${_PYTHON_VALUES})
+string(REGEX REPLACE "\n" ";" _PYTHON_VALUES ${_PYTHON_VALUES})
+list(GET _PYTHON_VALUES 0 _PYTHON_VERSION_LIST)
+list(GET _PYTHON_VALUES 1 PYTHON_PREFIX)
+list(GET _PYTHON_VALUES 2 PYTHON_INCLUDE_DIR)
+list(GET _PYTHON_VALUES 3 PYTHON_SITE_PACKAGES)
+list(GET _PYTHON_VALUES 4 PYTHON_MODULE_EXTENSION)
+list(GET _PYTHON_VALUES 5 PYTHON_IS_DEBUG)
+list(GET _PYTHON_VALUES 6 PYTHON_SIZEOF_VOID_P)
+
+# Make sure the Python has the same pointer-size as the chosen compiler
+if(NOT ${PYTHON_SIZEOF_VOID_P} MATCHES ${CMAKE_SIZEOF_VOID_P})
+    if(PythonLibsNew_FIND_REQUIRED)
+        math(EXPR _PYTHON_BITS "${PYTHON_SIZEOF_VOID_P} * 8")
+        math(EXPR _CMAKE_BITS "${CMAKE_SIZEOF_VOID_P} * 8")
+        message(FATAL_ERROR
+            "Python config failure: Python is ${_PYTHON_BITS}-bit, "
+            "chosen compiler is  ${_CMAKE_BITS}-bit")
+    endif()
+    set(PYTHONLIBS_FOUND FALSE)
+    return()
+endif()
+
+# The built-in FindPython didn't always give the version numbers
+string(REGEX REPLACE "\\." ";" _PYTHON_VERSION_LIST ${_PYTHON_VERSION_LIST})
+list(GET _PYTHON_VERSION_LIST 0 PYTHON_VERSION_MAJOR)
+list(GET _PYTHON_VERSION_LIST 1 PYTHON_VERSION_MINOR)
+list(GET _PYTHON_VERSION_LIST 2 PYTHON_VERSION_PATCH)
+
+# Make sure all directory separators are '/'
+string(REGEX REPLACE "\\\\" "/" PYTHON_PREFIX ${PYTHON_PREFIX})
+string(REGEX REPLACE "\\\\" "/" PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR})
+string(REGEX REPLACE "\\\\" "/" PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES})
+
+# TODO: All the nuances of CPython debug builds have not been dealt with/tested.
+if(PYTHON_IS_DEBUG)
+    set(PYTHON_MODULE_EXTENSION "_d${PYTHON_MODULE_EXTENSION}")
+endif()
+
+if(CMAKE_HOST_WIN32)
+    set(PYTHON_LIBRARY
+        "${PYTHON_PREFIX}/libs/Python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib")
+elseif(APPLE)
+    set(PYTHON_LIBRARY
+        "${PYTHON_PREFIX}/lib/libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.dylib")
+else()
+    if(${PYTHON_SIZEOF_VOID_P} MATCHES 8)
+        set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib64" "${PYTHON_PREFIX}/lib")
+    else()
+        set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib")
+    endif()
+    # Probably this needs to be more involved. It would be nice if the config
+    # information the python interpreter itself gave us were more complete.
+    find_library(PYTHON_LIBRARY
+        NAMES "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
+              "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m"
+              "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}mu"
+              "python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}dm"
+              "libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}"
+              "libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}m"
+              "libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}mu"
+              "libpython${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}dm"
+        PATHS ${_PYTHON_LIBS_SEARCH}
+        NO_SYSTEM_ENVIRONMENT_PATH)
+endif()
+
+# For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
+SET(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}" CACHE INTERNAL
+          "Path to where Python.h is found (deprecated)")
+
+MARK_AS_ADVANCED(
+  PYTHON_LIBRARY
+  PYTHON_INCLUDE_DIR
+)
+
+# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
+# cache entries because they are meant to specify the location of a single
+# library. We now set the variables listed by the documentation for this
+# module.
+SET(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
+SET(PYTHON_LIBRARIES "${PYTHON_LIBRARY}")
+SET(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
+
+
+# Don't know how to get to this directory, just doing something simple :P
+#INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+#FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs DEFAULT_MSG PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
+find_package_message(PYTHON
+    "Found PythonLibs: ${PYTHON_LIBRARY}"
+    "${PYTHON_EXECUTABLE}${PYTHON_VERSION}")
+#find_package_message(PYTHON "PYTHON_PREFIX: ${PYTHON_PREFIX}" "${PYTHON_PREFIX}")
+#find_package_message(PYTHON "PYTHON_LIBRARY: ${PYTHON_LIBRARY}" "${PYTHON_LIBRARY}")
+#find_package_message(PYTHON "PYTHON_VERSION: ${PYTHON_VERSION}" "${PYTHON_VERSION}")
+#find_package_message(PYTHON "PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE}" "${PYTHON_EXECUTABLE}")
+
+
+# PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python.
+FUNCTION(PYTHON_ADD_MODULE _NAME )
+  GET_PROPERTY(_TARGET_SUPPORTS_SHARED_LIBS
+    GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS)
+  OPTION(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE)
+  OPTION(PYTHON_MODULE_${_NAME}_BUILD_SHARED
+    "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS})
+
+  # Mark these options as advanced
+  MARK_AS_ADVANCED(PYTHON_ENABLE_MODULE_${_NAME}
+    PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+
+  IF(PYTHON_ENABLE_MODULE_${_NAME})
+    IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+      SET(PY_MODULE_TYPE MODULE)
+    ELSE(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+      SET(PY_MODULE_TYPE STATIC)
+      SET_PROPERTY(GLOBAL  APPEND  PROPERTY  PY_STATIC_MODULES_LIST ${_NAME})
+    ENDIF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+
+    SET_PROPERTY(GLOBAL  APPEND  PROPERTY  PY_MODULES_LIST ${_NAME})
+    ADD_LIBRARY(${_NAME} ${PY_MODULE_TYPE} ${ARGN})
+    TARGET_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES})
+
+    IF(PYTHON_MODULE_${_NAME}_BUILD_SHARED)
+      SET_TARGET_PROPERTIES(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
+      SET_TARGET_PROPERTIES(${_NAME} PROPERTIES SUFFIX "${PYTHON_MODULE_EXTENSION}")
+    ELSE()
+    ENDIF()
+
+  ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
+ENDFUNCTION(PYTHON_ADD_MODULE)
+


add lack dependency to zlib

add lack dependency to zlib

--- cmake/external/protobuf.cmake
+++ cmake/external/protobuf.cmake
@@ -54,6 +54,7 @@
   CONFIGURE_COMMAND
     ${CMAKE_COMMAND} ${PROTOBUF_SOURCES_DIR}/src/protobuf/cmake
     -Dprotobuf_BUILD_TESTS=OFF
+    -DZLIB_ROOT:FILEPATH=${ZLIB_ROOT}
     -DCMAKE_POSITION_INDEPENDENT_CODE=ON
     -DCMAKE_BUILD_TYPE=Release
     -DCMAKE_INSTALL_PREFIX=${PROTOBUF_INSTALL_DIR}


Fix hex check.

Fix hex check.

--- cmake/scripts/buildinfo.cmake
+++ cmake/scripts/buildinfo.cmake
@@ -52,7 +52,7 @@
 	message(FATAL_ERROR "Unable to determine commit hash. Either compile from within git repository or "
 		"supply a file called commit_hash.txt")
 endif()
-if (NOT SOL_COMMIT_HASH MATCHES [a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9][a-z0-9])
+if (NOT SOL_COMMIT_HASH MATCHES [a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])
     message(FATAL_ERROR "Malformed commit hash \"${SOL_COMMIT_HASH}\". It has to consist of exactly 8 hex digits.")
 endif()


mention how to specify swig executable

mention how to specify swig executable

--- README.cmake
+++ README.cmake
@@ -7,6 +7,8 @@
 cd build-debug
 cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTING=ON -DTRACE_MEMORY_ALLOCS=OFF -DPythonModular=ON -DBUILD_DASHBOARD_REPORTS=ON -DCMAKE_INSTALL_PREFIX="$BUILDDIR/install" ..

+# specify a different swig executable
+cmake -DSWIG_EXECUTABLE=/usr/bin/swig2.0

 # setup cmake for building the final binaries (debugging off, optimization on):
 mkdir build-release


Avoid compilation warning causing error in rocm_2.9 (#2169)

--- cmake/EnableCompilerWarnings.cmake
+++ cmake/EnableCompilerWarnings.cmake
@@ -67,6 +67,7 @@
             -Wunused

             -Wno-sign-compare
+            -Wno-extra-semi-stmt
         )
         if (CMAKE_${COMPILER}_COMPILER_ID MATCHES "Clang")
             list(APPEND CMAKE_COMPILER_WARNINGS


rip out PostgreSQL_TYPE_INCLUDE_DIR and requirement, this is part of the server dev files, not the client files

--- cmake/Modules/FindPostgreSQL.cmake
+++ cmake/Modules/FindPostgreSQL.cmake
@@ -110,19 +110,6 @@
   DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
 )

-find_path(PostgreSQL_TYPE_INCLUDE_DIR
-  NAMES catalog/pg_type.h
-  PATHS
-   # Look in other places.
-   ${PostgreSQL_ROOT_DIRECTORIES}
-  PATH_SUFFIXES
-    pgsql/server
-    postgresql/server
-    include/server
-  # Help the user find it if we cannot.
-  DOC "The ${PostgreSQL_INCLUDE_DIR_MESSAGE}"
-)
-
 # The PostgreSQL library.
 set (PostgreSQL_LIBRARY_TO_FIND pq)
 # Setting some more prefixes for the library
@@ -153,14 +140,14 @@
 # Did we find anything?
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(PostgreSQL
-                                  REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR
+                                  REQUIRED_VARS PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR
                                   VERSION_VAR PostgreSQL_VERSION_STRING)
 set( PostgreSQL_FOUND  ${POSTGRESQL_FOUND})

 # Now try to get the include and library path.
 if(PostgreSQL_FOUND)

-  set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} ${PostgreSQL_TYPE_INCLUDE_DIR} )
+  set(PostgreSQL_INCLUDE_DIRS ${PostgreSQL_INCLUDE_DIR} )
   set(PostgreSQL_LIBRARY_DIRS ${PostgreSQL_LIBRARY_DIR} )
   set(PostgreSQL_LIBRARIES ${PostgreSQL_LIBRARY_TO_FIND})

@@ -169,4 +156,4 @@
   #message("Final PostgreSQL libraries:   ${PostgreSQL_LIBRARIES}")
 endif(PostgreSQL_FOUND)

-mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR PostgreSQL_LIBRARY )
+mark_as_advanced(PostgreSQL_INCLUDE_DIR PostgreSQL_LIBRARY )


Support PASSRC in ROOT_ADD_TEST() with not a number but a string, which is the case when exiting with uncaught  signals.

--- cmake/modules/RootTestDriver.cmake
+++ cmake/modules/RootTestDriver.cmake
@@ -147,7 +147,7 @@
       file(WRITE ${ERR} "${_errvar}")
     endif()

-    if(DEFINED RC AND (NOT _rc EQUAL RC))
+    if(DEFINED RC AND (NOT "${_rc}" STREQUAL "${RC}"))
       message(FATAL_ERROR "error code: ${_rc}")
     elseif(NOT DEFINED RC AND _rc)
       message(FATAL_ERROR "error code: ${_rc}")


Bump the release date by one day.

Bump the release date by one day.

svn path=/trunk/; revision=12556

--- cmake/modules/plplot_version.cmake
+++ cmake/modules/plplot_version.cmake
@@ -1,6 +1,6 @@
 # For now, must set this by hand before each release.  This value affects
 # at least the documentation build and perhaps other parts of the release.
-set(RELEASE_DATE "2013-09-29")
+set(RELEASE_DATE "2013-09-30")

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


Test for rdma_verbs.h as prerequisite for OFED.

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

Presence of this header is deemed sufficient to conclude that the minimum
librdmacm version requirement is met.

--- FindOFED.cmake
+++ FindOFED.cmake
@@ -1,6 +1,6 @@
 # Copyright (c) 2011-2012 Stefan Eilemann <eile@eyescale.ch>

-find_path(_ofed_INCLUDE_DIR rdma/rdma_cma.h
+find_path(_ofed_INCLUDE_DIR rdma/rdma_verbs.h
   HINTS ${OFED_ROOT}/include
   PATHS /usr/include /usr/local/include /opt/local/include)
 find_library(_rdma_LIBRARY NAMES rdmacm


fixed: install libs on non-win32

fixed: install libs on non-win32

git-svn-id: 6c7e10cdde2c115f53707ba8ec4efe535f92d362@1672 4683daeb-ad0f-0410-a623-93161e962ae5

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -484,7 +484,7 @@
     ENDFOREACH(LIB)

     # install rules
-    if(WIN32)
+    IF(WIN32)
         INSTALL(TARGETS ${PROJECT_NAME}
                 CONFIGURATIONS Release
                 RUNTIME DESTINATION lib/opt
@@ -514,7 +514,12 @@
                 RUNTIME DESTINATION lib/relwithdbg
                 LIBRARY DESTINATION lib/relwithdbg
                 ARCHIVE DESTINATION lib/relwithdbg)
-    endif(WIN32)
+    ELSE(WIN32)
+        INSTALL(TARGETS ${PROJECT_NAME}
+                RUNTIME DESTINATION lib${OSG_LIBDIR_SUFFIX}
+                LIBRARY DESTINATION lib${OSG_LIBDIR_SUFFIX}
+                ARCHIVE DESTINATION lib${OSG_LIBDIR_SUFFIX})
+    ENDIF(WIN32)

     INSTALL(FILES ${${PROJECT_NAME}_HDR}
             DESTINATION include/OpenSG


Fix syntax of optional PATCH_COMMAND parameter

While it worked as it was on the latest CMake versions, CMake 3.10,
our minimum required version, cannot parse it otherwise.

--- CMakeExternals/Boost.cmake
+++ CMakeExternals/Boost.cmake
@@ -66,7 +66,7 @@
         return value to be 0 (success). We need this because we reuse the
         extracted source files and patching an already patched file returns
         an error code that we can ignore. ]]
-    set(patch_cmd PATCH_COMMAND ${PATCH_COMMAND} --binary -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/Boost.patch || cd .)
+    set(patch_cmd ${PATCH_COMMAND} --binary -N -p1 -i ${CMAKE_CURRENT_LIST_DIR}/Boost.patch || cd .)
   endif()

@@ -224,6 +224,10 @@

   endif()

+  if(NOT patch_cmd)
+    set(patch_cmd cd .) #[[ Do nothing ]]
+  endif()
+
   if(NOT configure_cmd)
     set(configure_cmd cd .) #[[ Do nothing ]]
   endif()
@@ -247,7 +251,7 @@
   ExternalProject_Add(${proj}
     URL ${url}
     URL_MD5 ${md5}
-    ${patch_cmd}
+    PATCH_COMMAND ${patch_cmd}
     CONFIGURE_COMMAND ${configure_cmd}
     BUILD_COMMAND ${build_cmd}
     INSTALL_COMMAND ${install_cmd}


Change download method of Eigen to Git clone

--- CMakeExternals/Eigen.cmake
+++ CMakeExternals/Eigen.cmake
@@ -17,8 +17,8 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/eigen-3.4.0.tar.gz
-      URL_MD5 4c527a9171d71a72a9d4186e65bea559
+      GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
+      GIT_TAG 3.4.0
       CMAKE_GENERATOR ${gen}
       CMAKE_GENERATOR_PLATFORM ${gen_platform}
       CMAKE_ARGS


From Michael Platings, "I've updated the FBX plugin to use the latest FBX SDK (2012.1). Please apply the attached .cmake which finds the correct SDK headers & libraries."

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -9,56 +9,52 @@
 # correspond to the ./configure --prefix=$FBX_DIR

 IF(APPLE)
-    SET(FBX_LIBNAME "fbxsdk_gcc4_ub")
+    SET(FBX_LIBDIR "gcc4/ub")
 ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
-    SET(FBX_LIBNAME "fbxsdk_gcc4")
-    #TODO: libs are provided for GCC 3.4 & 4.0 in both 32 and 64 bit versions
-    # but I don't know how to confgure that here.
-ELSEIF(MSVC71)
-    SET(FBX_LIBNAME "fbxsdk_md2003")
+    SET(FBX_LIBDIR "gcc4")
 ELSEIF(MSVC80)
-    SET(FBX_LIBNAME "fbxsdk_md2005")
+    SET(FBX_LIBDIR "vs2005")
 ELSEIF(MSVC90)
-    SET(FBX_LIBNAME "fbxsdk_md2008")
+    SET(FBX_LIBDIR "vs2008")
 ELSEIF(MSVC100 OR MSVC_VER>1600)
-    SET(FBX_LIBNAME "fbxsdk_md2010")
-ENDIF()
-
-IF(CMAKE_CL_64)
-    SET(FBX_LIBNAME ${FBX_LIBNAME}_amd64)
+    SET(FBX_LIBDIR "vs2010")
 ENDIF()

 IF(APPLE)
-    SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME})
+    # do nothing
+ELSEIF(CMAKE_CL_64 OR (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SIZEOF_VOID_P EQUAL 8))
+    SET(FBX_LIBDIR ${FBX_LIBDIR}/x64)
 ELSE()
-    SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
+    SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)
 ENDIF()

-# SET final path
-#osg_fbx code is compatible with 2011.2, 2011.3 and 2011.3.1 so find any directory
-SET( FBX_SEARCH_PATHS
+IF(APPLE)
+    SET(FBX_LIBNAME "fbxsdk-2012.1-static")
+ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
+    SET(FBX_LIBNAME "fbxsdk-2012.1-static")
+ELSE()
+    SET(FBX_LIBNAME "fbxsdk-2012.1-md")
+ENDIF()
+
+SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d)
+
+SET( FBX_SEARCH_PATHS
     $ENV{FBX_DIR}
-    $ENV{ProgramW6432}/Autodesk/FBX/FbxSdk/2011.3.1
-    $ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.3.1
-    /Applications/Autodesk/FBXSDK201131
-    $ENV{ProgramW6432}/Autodesk/FBX/FbxSdk/2011.3
-    $ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.3
-    /Applications/Autodesk/FBXSDK20113
-    $ENV{ProgramW6432}/Autodesk/FBX/FbxSdk/2011.2
-    $ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2011.2
-    /Applications/Autodesk/FBXSDK20112
+    $ENV{ProgramW6432}/Autodesk/FBX/FbxSdk/2012.1
+    $ENV{PROGRAMFILES}/Autodesk/FBX/FbxSdk/2012.1
+    /Applications/Autodesk/FBXSDK20121
 )

 # search for headers & debug/release libraries
-FIND_PATH(FBX_INCLUDE_DIR fbxsdk.h
+FIND_PATH(FBX_INCLUDE_DIR "fbxsdk.h"
     PATHS ${FBX_SEARCH_PATHS}
-    PATH_SUFFIXES include )
+    PATH_SUFFIXES "include")
 FIND_LIBRARY( FBX_LIBRARY ${FBX_LIBNAME}
     PATHS ${FBX_SEARCH_PATHS}
-    PATH_SUFFIXES lib)
+    PATH_SUFFIXES "lib/${FBX_LIBDIR}")
 FIND_LIBRARY( FBX_LIBRARY_DEBUG ${FBX_LIBNAME_DEBUG}
     PATHS ${FBX_SEARCH_PATHS}
-    PATH_SUFFIXES lib)
+    PATH_SUFFIXES "lib/${FBX_LIBDIR}")

 IF(FBX_LIBRARY AND FBX_LIBRARY_DEBUG AND FBX_INCLUDE_DIR)
     SET(FBX_FOUND "YES")


Adjust OpenJpeg finding to look in -2.2 directories. (#1520)

Fixes #1517

--- src/cmake/modules/FindOpenJpeg.cmake
+++ src/cmake/modules/FindOpenJpeg.cmake
@@ -59,6 +59,7 @@

 # Generic search paths
 set (OpenJpeg_include_paths
+     /usr/local/include/openjpeg-2.2
      /usr/local/include/openjpeg-2.1
      /usr/local/include/openjpeg-2.0
      /usr/local/include/openjpeg
@@ -84,12 +85,14 @@
        ${OpenJpeg_library_paths}
       )
   set (OpenJpeg_include_paths
+       ${OPENJPEG_HOME}/include/openjpeg-2.2
+       ${OPENJPEG_HOME}/include/openjpeg-2.1
+       ${OPENJPEG_HOME}/include/openjpeg-2.0
        ${OPENJPEG_HOME}/include/openjpeg
        ${OPENJPEG_HOME}/include
        ${OpenJpeg_include_paths}
       )
 endif()
-

 # Locate the header files


[numerics] add test ADMM_RHO_STRATEGY_CONSTANT

--- numerics/numerics_tests.cmake
+++ numerics/numerics_tests.cmake
@@ -292,6 +292,9 @@
     NEW_FC_3D_TEST(${_DAT} SICONOS_FRICTION_3D_NSGS 1e-5 10000
       SICONOS_FRICTION_3D_ONECONTACT_NSN_GP 0 0
       INTERNAL_IPARAM SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_PLI_NSN_LOOP)
+    NEW_FC_3D_TEST(${_DAT} SICONOS_FRICTION_3D_ADMM 1e-5 10000
+      0 0 0
+      IPARAM SICONOS_FRICTION_3D_ADMM_IPARAM_RHO_STRATEGY  SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_CONSTANT)

     NEW_FC_3D_TEST(${_DAT} SICONOS_FRICTION_3D_ADMM 1e-5 10000
       0 0 0


cmake: fix per-file assembly flags

cmake: fix per-file assembly flags

Since
a376e7b9 Fix compilation on windows and clang-cl+ninja.
the highest level assembly flag (/arch:AVX / -msse4.1) would be applied
to all assembly files. This could result in higher level instructions
being used which would defeat the runtime cpu detection check and could
result in a crash.

With this change -m style flags are used with clang-cl as it supports
them and allows the correct level to be set. With at least Visual
Studio 12 (2013)+ /arch is not necessary to build SSE2 or SSE4 code
unless a lesser /arch is forced so these flags are avoided. This matches
the nmake build.

For emscripten only sse2 and sse4.1 are tested (NEON will succeed in
being enabled, but fail to build). This is consistent with
the current behavior added in:
commit 36c81ff6a940f45b492e137b27eae7ff268c3cd8

    WASM-SIMD: port 2 patches from rreverser@'s tree

    * Stop on first found SIMD version
    * Imply lower SSE version when higher is found

Bug: webp:488
Change-Id: I34d01274e5204a477b6b9f35ed566048a62b4c57
Tested: msvc 2013-2019 debug win32/x64 builds; clang-cl under 2019

--- cmake/cpu.cmake
+++ cmake/cpu.cmake
@@ -31,9 +31,17 @@
 set(WEBP_SIMD_FLAGS "SSE41;SSE2;MIPS32;MIPS_DSP_R2;NEON;MSA")
 set(WEBP_SIMD_FILE_EXTENSIONS
     "_sse41.c;_sse2.c;_mips32.c;_mips_dsp_r2.c;_neon.c;_msa.c")
-if(MSVC)
-  # MSVC does not have a SSE4 flag but AVX support implies SSE4 support.
-  set(SIMD_ENABLE_FLAGS "/arch:AVX;/arch:SSE2;;;;")
+if(MSVC AND CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+  # With at least Visual Studio 12 (2013)+ /arch is not necessary to build SSE2
+  # or SSE4 code unless a lesser /arch is forced. MSVC does not have a SSE4
+  # flag, but an AVX one. Using that with SSE4 code risks generating illegal
+  # instructions when used on machines with SSE4 only. The flags are left for
+  # older (untested) versions to avoid any potential compatibility issues.
+  if(MSVC_VERSION GREATER_EQUAL 1800 AND NOT CMAKE_C_FLAGS MATCHES "/arch:")
+    set(SIMD_ENABLE_FLAGS)
+  else()
+    set(SIMD_ENABLE_FLAGS "/arch:AVX;/arch:SSE2;;;;")
+  endif()
   set(SIMD_DISABLE_FLAGS)
 else()
   set(SIMD_ENABLE_FLAGS
@@ -57,9 +65,14 @@

 list(LENGTH WEBP_SIMD_FLAGS WEBP_SIMD_FLAGS_LENGTH)
 math(EXPR WEBP_SIMD_FLAGS_RANGE "${WEBP_SIMD_FLAGS_LENGTH} - 1")
-unset(HIGHEST_SSE_FLAG)

 foreach(I_SIMD RANGE ${WEBP_SIMD_FLAGS_RANGE})
+  # With Emscripten 2.0.9 -msimd128 -mfpu=neon will enable NEON, but the
+  # source will fail to compile.
+  if(EMSCRIPTEN AND ${I_SIMD} GREATER_EQUAL 2)
+    break()
+  endif()
+
   list(GET WEBP_SIMD_FLAGS ${I_SIMD} WEBP_SIMD_FLAG)

   # First try with no extra flag added as the compiler might have default flags
@@ -67,43 +80,33 @@
   unset(WEBP_HAVE_${WEBP_SIMD_FLAG} CACHE)
   cmake_push_check_state()
   set(CMAKE_REQUIRED_FLAGS)
-  if(NOT simd_found)
+  webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
+  if(NOT WEBP_HAVE_${WEBP_SIMD_FLAG})
+    list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
+    if(EMSCRIPTEN)
+      set(SIMD_COMPILE_FLAG "-msimd128 ${SIMD_COMPILE_FLAG}")
+    endif()
+    set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
     webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
-    if(NOT WEBP_HAVE_${WEBP_SIMD_FLAG})
+  else()
+    if(MSVC AND SIMD_ENABLE_FLAGS)
+      # The detection for SSE2/SSE4 support under MSVC is based on the compiler
+      # version so e.g., clang-cl will require flags to enable the assembly.
       list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
-      if(EMSCRIPTEN)
-        set(SIMD_COMPILE_FLAG "-msimd128 ${SIMD_COMPILE_FLAG}")
-      endif()
-      set(CMAKE_REQUIRED_FLAGS ${SIMD_COMPILE_FLAG})
-      webp_check_compiler_flag(${WEBP_SIMD_FLAG} ${WEBP_ENABLE_SIMD})
     else()
-      if(MSVC)
-        list(GET SIMD_ENABLE_FLAGS ${I_SIMD} SIMD_COMPILE_FLAG)
-      else()
-        set(SIMD_COMPILE_FLAG " ")
-      endif()
+      set(SIMD_COMPILE_FLAG " ")
     endif()
-  elseif(${I_SIMD} LESS 2)
-    set(WEBP_HAVE_${WEBP_SIMD_FLAG} 1)
   endif()
   # Check which files we should include or not.
   list(GET WEBP_SIMD_FILE_EXTENSIONS ${I_SIMD} WEBP_SIMD_FILE_EXTENSION)
   file(GLOB SIMD_FILES "${CMAKE_CURRENT_LIST_DIR}/../"
             "src/dsp/*${WEBP_SIMD_FILE_EXTENSION}")
   if(WEBP_HAVE_${WEBP_SIMD_FLAG})
-    if(${I_SIMD} LESS 2 AND NOT HIGHEST_SSE_FLAG)
-      set(HIGHEST_SSE_FLAG ${SIMD_COMPILE_FLAG})
-    endif()
     # Memorize the file and flags.
     foreach(FILE ${SIMD_FILES})
       list(APPEND WEBP_SIMD_FILES_TO_INCLUDE ${FILE})
-      if(${I_SIMD} LESS 2)
-        list(APPEND WEBP_SIMD_FLAGS_TO_INCLUDE ${HIGHEST_SSE_FLAG})
-      else()
-        list(APPEND WEBP_SIMD_FLAGS_TO_INCLUDE ${SIMD_COMPILE_FLAG})
-      endif()
+      list(APPEND WEBP_SIMD_FLAGS_TO_INCLUDE ${SIMD_COMPILE_FLAG})
     endforeach()
-    set(simd_found 1)
   else()
     # Remove the file from the list.
     foreach(FILE ${SIMD_FILES})


patch from pat:

patch from pat:

mex.cmake creates the file /tmp/dummy.c, then adds it to the "last" library target.  But there's a problem, if /tmp is cleaned then dummy.c is never regenerated, leading to the error:

make[4]: *** No rule to make target `/tmp/dummy.c', needed by `util/CMakeFiles/last.dir/tmp/dummy.c.o'.  Stop.

Attached is a patch to fix the issue.  It uses add_custom_command to create a build rule so that cmake knows "last" depends on a generated file, and will regenerate the file as needed.  Also, it uses the pod-build directory instead of /tmp.  Also, I replaced "touch" with "${CMAKE_COMMAND} -E touch".

git-svn-id: cf55bc44fb097054a32fc70455a459c940dbbffc@7603 c9849af7-e679-4ec6-a44e-fc146a885bd3

--- cmake/mex.cmake
+++ cmake/mex.cmake
@@ -84,10 +84,6 @@

 #  note: skipping LDCXX (and just always use LD)

-  if (NOT EXISTS /tmp/dummy.c)
-    execute_process(COMMAND touch /tmp/dummy.c)
-  endif()
-
 endfunction()

 function(add_mex)
@@ -146,7 +142,10 @@
   if (isshared EQUAL -1)
     # note: on ubuntu, gcc did not like the MEX_CLIBS coming along with LINK_FLAGS (it only works if they appear after the input files).  this is a nasty trick that I found online
     if (NOT TARGET last)
-      add_library(last STATIC /tmp/dummy.c)
+      set(dummy_c_file ${CMAKE_CURRENT_BINARY_DIR}/dummy.c)
+      add_custom_command(COMMAND ${CMAKE_COMMAND} -E touch ${dummy_c_file}
+                         OUTPUT ${dummy_c_file})
+      add_library(last STATIC ${dummy_c_file})
       target_link_libraries(last ${MEX_CLIBS})
     endif()


Compile typelib from gir

Compile typelib from gir

--- cmake/GIR.cmake
+++ cmake/GIR.cmake
@@ -19,6 +19,11 @@
                 -o ${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.gir
                 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
                 DEPENDS ${CMAKE_PROJECT_NAME})
+        add_custom_target ("g-ir-compiler_${module}" ALL
+            ${GIR_COMPILER_BIN} ${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.gir
+                --output ${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.typelib
+                WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
+                DEPENDS g-ir-scanner_${module})

     endmacro (gir_build module namespace)

@@ -27,5 +32,7 @@

         install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.gir"
             DESTINATION "${CMAKE_INSTALL_DATADIR}/gir-1.0/")
+        install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${namespace}-${GIR_VERSION}.typelib"
+            DESTINATION "${CMAKE_INSTALL_LIBDIR}/girepository-1.0/")
     endmacro (gir module)
 endif ()


Reducing likelihood of race condition in .catkin marker file

- Uses atomic (<4k write) file(APPEND ...) call to update .catkin marker
  file with less likelihood that parallel catkin processes interfere
  with each-other.
- Only potential for a race condition exists if the .catkin marker file
  has not been created yet. In that case, the tool running the multiple
  instances should check this file and either report the failure in a
  clear way and suggest building again, or simply repair the file,
  itself.

--- cmake/all.cmake
+++ cmake/all.cmake
@@ -16,19 +16,23 @@
 endif()
 message(STATUS "Using CATKIN_DEVEL_PREFIX: ${CATKIN_DEVEL_PREFIX}")

-# create workspace marker
-set(_sourcespaces "${CMAKE_SOURCE_DIR}")
-if(EXISTS "${CATKIN_DEVEL_PREFIX}/.catkin")
-  # prepend to existing list of sourcespaces
-  file(READ "${CATKIN_DEVEL_PREFIX}/.catkin" _existing_sourcespaces)
-  list(FIND _existing_sourcespaces "${CMAKE_SOURCE_DIR}" _index)
-  if(_index EQUAL -1)
-    list(INSERT _existing_sourcespaces 0 ${CMAKE_SOURCE_DIR})
-  endif()
-  set(_sourcespaces ${_existing_sourcespaces})
-endif()
-file(WRITE "${CATKIN_DEVEL_PREFIX}/.catkin" "${_sourcespaces}")
-
+# update develspace marker file with a reference to this sourcespace
+set(_catkin_marker_file "${CATKIN_DEVEL_PREFIX}/.catkin")
+
+# check if the develspace marker file exists yet
+if(EXISTS ${_catkin_marker_file})
+  # append to existing list of sourcespaces
+  file(READ ${_catkin_marker_file} _existing_sourcespaces)
+  list(FIND _existing_sourcespaces "${CMAKE_SOURCE_DIR}" _existing_sourcespace_index)
+  if(_existing_sourcespace_index EQUAL -1)
+    file(APPEND ${_catkin_marker_file} ";${CMAKE_SOURCE_DIR}")
+  endif()
+else()
+  # create a new develspace marker file
+  # NOTE: extra care must be taken when running multiple catkin jobs in parallel
+  #       so that this does not overwrite the result of a similar call in another package
+  file(WRITE ${_catkin_marker_file} "${CMAKE_SOURCE_DIR}")
+endif()

 # use either CMAKE_PREFIX_PATH explicitly passed to CMake as a command line argument
 # or CMAKE_PREFIX_PATH from the environment


BUG#52341: PB2: rpl tests started taking three times more time on
           linux x86_64 max

Rpl tests were surprisingly taking too long when server was built
using cmake on linux. This was because cmake counter part of
patch for WL#4949 was not defining SIGNAL_WITH_VIO_CLOSE flag,
which had negative impact on the time needed to stop the slave IO
thread on STOP SLAVE command.

We fix this by deploy the missing SET command on configure.cmake.

--- configure.cmake
+++ configure.cmake
@@ -913,6 +913,7 @@

 SET(NO_ALARM "${HAVE_SOCKET_TIMEOUT}" CACHE BOOL
    "No need to use alarm to implement socket timeout")
+SET(SIGNAL_WITH_VIO_CLOSE "${HAVE_SOCKET_TIMEOUT}")
 MARK_AS_ADVANCED(NO_ALARM)


automerge: merged bundle from bug report into latest  mysql-trunk-bugfixing (bug 52341).


Updated FindCUDA.cmake to r1174 from upstream + patched it with the system-include fix. This change allows 32/64 cross-compilation in windows.
ticket #302

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

--- src/CMake/cuda/FindCUDA.cmake
+++ src/CMake/cuda/FindCUDA.cmake
@@ -92,7 +92,8 @@
 #    (e.g. nvcc -Ipath0 -Ipath1 ... ). These paths usually contain other .cu
 #    files.
 #
-# CUDA_ADD_LIBRARY( cuda_target file0 file1 ... [OPTIONS ...] )
+# CUDA_ADD_LIBRARY( cuda_target file0 file1 ...
+#                   [STATIC | SHARED | MODULE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
 # -- Creates a shared library "cuda_target" which contains all of the source
 #    (*.c, *.cc, etc.) specified and all of the nvcc'ed .cu files specified.
 #    All of the specified source files and generated .cpp files are compiled
@@ -101,10 +102,12 @@
 #    build and link.  In addition CUDA_INCLUDE_DIRS is added automatically added
 #    to include_directories().
 #
-# CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ... [OPTIONS ...] )
+# CUDA_ADD_EXECUTABLE( cuda_target file0 file1 ...
+#                      [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL] [OPTIONS ...] )
 # -- Same as CUDA_ADD_LIBRARY except that an exectuable is created.
 #
-# CUDA_COMPILE( generated_files file0 file1 ... [OPTIONS ...] )
+# CUDA_COMPILE( generated_files file0 file1 ... [STATIC | SHARED | MODULE]
+#               [OPTIONS ...] )
 # -- Returns a list of generated files from the input source files to be used
 #    with ADD_LIBRARY or ADD_EXECUTABLE.
 #
@@ -112,7 +115,7 @@
 # -- Returns a list of PTX files generated from the input source files.
 #
 # CUDA_WRAP_SRCS ( cuda_target format generated_files file0 file1 ...
-#                  [OPTIONS ...] )
+#                  [STATIC | SHARED | MODULE] [OPTIONS ...] )
 # -- This is where all the magic happens.  CUDA_ADD_EXECUTABLE,
 #    CUDA_ADD_LIBRARY, CUDA_COMPILE, and CUDA_COMPILE_PTX all call this function
 #    under the hood.
@@ -139,6 +142,10 @@
 #    be produced for the given cuda file.  This is because when you add the cuda
 #    file to Visual Studio it knows that this file produces and will link in the
 #    resulting object file automatically.
+#
+#    This script also looks at optional arguments STATIC, SHARED, or MODULE to
+#    override the behavior specified by the value of the CMake variable
+#    BUILD_SHARED_LIBS.  See BUILD_SHARED_LIBS below for more details.
 #
 #    This script will also generate a separate cmake script that is used at
 #    build time to invoke nvcc.  This is for serveral reasons.
@@ -202,11 +209,12 @@
 # with their configuration dependent counterparts (i.e. CMAKE_C_FLAGS_DEBUG).
 # These flags are passed through nvcc to the native compiler.  In addition, on
 # some systems special flags are added for building objects intended for shared
-# libraries.  FindCUDA make use of the CMake variable BUILD_SHARED_LIBS to
-# determine if these flags should be used.  Please set this variable according
-# to how the objects are to be used before calling CUDA_ADD_LIBRARY.  A
-# preprocessor macro, <target_name>_EXPORTS is defined when BUILD_SHARED_LIBS is
-# defined.  In addition, flags passed into add_definitions with -D or /D are
+# libraries.  FindCUDA make use of the CMake variable BUILD_SHARED_LIBS and the
+# usual STATIC, SHARED, and MODULE arguments to determine if these flags should
+# be used.  Please set BUILD_SHARED_LIBS or pass in STATIC, SHARED, or MODULE
+# according to how the objects are to be used before calling CUDA_ADD_LIBRARY.
+# A preprocessor macro, <target_name>_EXPORTS is defined when BUILD_SHARED_LIBS
+# is defined.  In addition, flags passed into add_definitions with -D or /D are
 # passed along to nvcc.
 #
 # Files with the HEADER_FILE_ONLY property set will not be compiled.
@@ -223,9 +231,9 @@

 # FindCUDA.cmake

-# We need to have at least this version to support the VERSION_LESS argument to 'if'.
+# We need to have at least this version to support the VERSION_LESS argument to 'if' (2.6.2) and unset (2.6.3)
 cmake_policy(PUSH)
-cmake_minimum_required(VERSION 2.6.2)
+cmake_minimum_required(VERSION 2.6.3)
 cmake_policy(POP)

 # This macro helps us find the location of helper files we will need the full path to
@@ -406,7 +414,7 @@
     )

   if (CUDA_TOOLKIT_ROOT_DIR)
-    string(REGEX REPLACE "[/\\\\]?bin[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
+    string(REGEX REPLACE "[/\\\\]?bin[64]*[/\\\\]?$" "" CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR})
     # We need to force this back into the cache.
     set(CUDA_TOOLKIT_ROOT_DIR ${CUDA_TOOLKIT_ROOT_DIR} CACHE PATH "Toolkit location." FORCE)
   endif(CUDA_TOOLKIT_ROOT_DIR)
@@ -482,9 +490,12 @@
 set (CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})

 macro(FIND_LIBRARY_LOCAL_FIRST _var _names _doc)
+  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+    set(_cuda_64bit_lib_dir "${CUDA_TOOLKIT_ROOT_DIR}/lib64")
+  endif()
   find_library(${_var}
     NAMES ${_names}
-    PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib64"
+    PATHS ${_cuda_64bit_lib_dir}
           "${CUDA_TOOLKIT_ROOT_DIR}/lib"
     ENV CUDA_LIB_PATH
     DOC ${_doc}
@@ -634,13 +645,23 @@
 ##############################################################################
 # Separate the OPTIONS out from the sources
 #
-macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _options)
+macro(CUDA_GET_SOURCES_AND_OPTIONS _sources _cmake_options _options)
   set( ${_sources} )
+  set( ${_cmake_options} )
   set( ${_options} )
   set( _found_options FALSE )
   foreach(arg ${ARGN})
     if(arg STREQUAL "OPTIONS")
       set( _found_options TRUE )
+    elseif(
+        arg STREQUAL "WIN32" OR
+        arg STREQUAL "MACOSX_BUNDLE" OR
+        arg STREQUAL "EXCLUDE_FROM_ALL" OR
+        arg STREQUAL "STATIC" OR
+        arg STREQUAL "SHARED" OR
+        arg STREQUAL "MODULE"
+        )
+      list(APPEND ${_cmake_options} "${arg}")
     else()
       if ( _found_options )
         list(APPEND ${_options} "${arg}")
@@ -780,12 +801,26 @@
     set(CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper})
   endforeach()

-  CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_options ${ARGN})
+  CUDA_GET_SOURCES_AND_OPTIONS(_cuda_wrap_sources _cuda_wrap_cmake_options _cuda_wrap_options ${ARGN})
   CUDA_PARSE_NVCC_OPTIONS(CUDA_WRAP_OPTION_NVCC_FLAGS ${_cuda_wrap_options})

+  # Figure out if we are building a shared library.  Default the value of BUILD_SHARED_LIBS.
+  set(_cuda_build_shared_libs ${BUILD_SHARED_LIBS})
+  # SHARED, MODULE
+  list(FIND _cuda_wrap_cmake_options SHARED _cuda_found_SHARED)
+  list(FIND _cuda_wrap_cmake_options MODULE _cuda_found_MODULE)
+  if(_cuda_found_SHARED GREATER -1 OR _cuda_found_MODULE GREATER -1)
+    set(_cuda_build_shared_libs TRUE)
+  endif()
+  # STATIC
+  list(FIND _cuda_wrap_cmake_options STATIC _cuda_found_STATIC)
+  if(_cuda_found_STATIC GREATER -1)
+    set(_cuda_build_shared_libs FALSE)
+  endif()
+
   # CUDA_HOST_FLAGS
-  if(BUILD_SHARED_LIBS)
-    # If BUILD_SHARED_LIBS is true, then we need to add extra flags for
+  if(_cuda_build_shared_libs)
+    # If we are setting up code for a shared library, then we need to add extra flags for
     # compiling objects for shared libraries.
     set(CUDA_HOST_SHARED_FLAGS ${CMAKE_SHARED_LIBRARY_${CUDA_C_OR_CXX}_FLAGS})
   endif()
@@ -810,6 +845,11 @@
     set(CUDA_NVCC_FLAGS_CONFIG "${CUDA_NVCC_FLAGS_CONFIG}\nset(CUDA_NVCC_FLAGS_${config_upper} \"${CUDA_NVCC_FLAGS_${config_upper}};${CUDA_WRAP_OPTION_NVCC_FLAGS_${config_upper}}\")")
   endforeach()

+  if(compile_to_ptx)
+    # Don't use any of the host compilation flags for PTX targets
+    set(CUDA_HOST_FLAGS)
+  endif()
+
   # Get the list of definitions from the directory property
   get_directory_property(CUDA_NVCC_DEFINITIONS COMPILE_DEFINITIONS)
   if(CUDA_NVCC_DEFINITIONS)
@@ -818,7 +858,7 @@
     endforeach()
   endif()

-  if(BUILD_SHARED_LIBS)
+  if(_cuda_build_shared_libs)
     list(APPEND nvcc_flags "-D${cuda_target}_EXPORTS")
   endif()

@@ -985,12 +1025,13 @@
   CUDA_ADD_CUDA_INCLUDE_ONCE()

   # Separate the sources from the options
-  CUDA_GET_SOURCES_AND_OPTIONS(_sources _options ${ARGN})
+  CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
   # Create custom commands and targets for each file.
-  CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} )
+  CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} ${_cmake_options}
+    OPTIONS ${_options} )

   # Add the library.
-  add_library(${cuda_target}
+  add_library(${cuda_target} ${_cmake_options}
     ${_generated_files}
     ${_sources}
     )
@@ -1019,12 +1060,12 @@
   CUDA_ADD_CUDA_INCLUDE_ONCE()

   # Separate the sources from the options
-  CUDA_GET_SOURCES_AND_OPTIONS(_sources _options ${ARGN})
+  CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
   # Create custom commands and targets for each file.
   CUDA_WRAP_SRCS( ${cuda_target} OBJ _generated_files ${_sources} OPTIONS ${_options} )

   # Add the library.
-  add_executable(${cuda_target}
+  add_executable(${cuda_target} ${_cmake_options}
     ${_generated_files}
     ${_sources}
     )
@@ -1051,9 +1092,10 @@
 macro(CUDA_COMPILE generated_files)

   # Separate the sources from the options
-  CUDA_GET_SOURCES_AND_OPTIONS(_sources _options ${ARGN})
+  CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
   # Create custom commands and targets for each file.
-  CUDA_WRAP_SRCS( cuda_compile OBJ _generated_files ${_sources} OPTIONS ${_options} )
+  CUDA_WRAP_SRCS( cuda_compile OBJ _generated_files ${_sources} ${_cmake_options}
+    OPTIONS ${_options} )

   set( ${generated_files} ${_generated_files})

@@ -1068,9 +1110,10 @@
 macro(CUDA_COMPILE_PTX generated_files)

   # Separate the sources from the options
-  CUDA_GET_SOURCES_AND_OPTIONS(_sources _options ${ARGN})
+  CUDA_GET_SOURCES_AND_OPTIONS(_sources _cmake_options _options ${ARGN})
   # Create custom commands and targets for each file.
-  CUDA_WRAP_SRCS( cuda_compile_ptx PTX _generated_files ${_sources} OPTIONS ${_options} )
+  CUDA_WRAP_SRCS( cuda_compile_ptx PTX _generated_files ${_sources} ${_cmake_options}
+    OPTIONS ${_options} )

   set( ${generated_files} ${_generated_files})


debug messages and one more directory to search in

--- cmake-modules/Findassimp.cmake
+++ cmake-modules/Findassimp.cmake
@@ -21,6 +21,8 @@
 	elseif(MSVC14)
 		set(ASSIMP_MSVC_VERSION "vc140")
 	endif(MSVC12)
+
+	message(STATUS "CMAKE assimp msvc version ${ASSIMP_MSVC_VERSION}")

 	if(MSVC12 OR MSVC14)

@@ -29,8 +31,12 @@
 				assimp-${ASSIMP_MSVC_VERSION}-mt.lib
 			HINTS
 				${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE}
+				${ASSIMP_ROOT_DIR}/lib
 		)
-
+
+		message(STATUS "Assimp library directory ${ASSIMP_LIBRARY_DIR}")
+
+		# release should be assimp-vc140-mt.dll
 		find_library(ASSIMP_LIBRARY_RELEASE				assimp-${ASSIMP_MSVC_VERSION}-mt.lib 			PATHS ${ASSIMP_LIBRARY_DIR})
 		find_library(ASSIMP_LIBRARY_DEBUG				assimp-${ASSIMP_MSVC_VERSION}-mtd.lib			PATHS ${ASSIMP_LIBRARY_DIR})


Fix for travis

Fix for travis

--- cmake/FindProtocolBuffer.cmake
+++ cmake/FindProtocolBuffer.cmake
@@ -259,7 +259,8 @@

 FIND_LIBRARY(PROTOBUF_LIBRARY
 			 NAMES "protobuf" "libprotobuf" "libprotobufd"
-             PATHS "${PROTOBUF_ROOT}/lib/*"
+             PATHS "${PROTOBUF_ROOT}/lib"
+					"${PROTOBUF_ROOT}/lib/*"
 					"/usr/lib"
 					"/usr/local/lib"
 					"/usr/local/lib/google"
@@ -267,7 +268,8 @@
 )
 FIND_LIBRARY(PROTOBUF_PROTOC_LIBRARY
 			 NAMES "protoc" "libprotoc" "libprotocd"
-             PATHS "${PROTOBUF_ROOT}/lib/*"
+             PATHS "${PROTOBUF_ROOT}/lib"
+					"${PROTOBUF_ROOT}/lib/*"
 					"/usr/lib"
 					"/usr/local/lib"
 					"/usr/local/lib/google"
@@ -275,7 +277,8 @@
 )
 FIND_PROGRAM(PROTOBUF_PROTOC_EXECUTABLE
 			 NAMES protoc
-             PATHS "${PROTOBUF_ROOT}/bin/*"
+             PATHS "${PROTOBUF_ROOT}/bin"
+					"${PROTOBUF_ROOT}/bin/*"
 					"/bin"
 					"/usr/bin"
 					"/usr/local/bin"


adding support for using OPENNI_ROOT cmake and environment variables to find OpenNI

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -18,14 +18,15 @@

 #add a hint so that it can find it without the pkg-config
 find_path(OPENNI_INCLUDE_DIR XnStatus.h
-          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni
+          HINTS ${PC_OPENNI_INCLUDEDIR} ${PC_OPENNI_INCLUDE_DIRS} /usr/include/openni "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
           PATHS "$ENV{PROGRAMFILES}/OpenNI/Include" "$ENV{PROGRAMW6432}/OpenNI/Include"
-          PATH_SUFFIXES openni)
+          PATH_SUFFIXES openni include Include)
 #add a hint so that it can find it without the pkg-config
 find_library(OPENNI_LIBRARY
              NAMES OpenNI64 OpenNI
-             HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib
-             PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib" "$ENV{PROGRAMW6432}/OpenNI/Lib64")
+             HINTS ${PC_OPENNI_LIBDIR} ${PC_OPENNI_LIBRARY_DIRS} /usr/lib "${OPENNI_ROOT}" "$ENV{OPENNI_ROOT}"
+             PATHS "$ENV{PROGRAMFILES}/OpenNI/Lib" "$ENV{PROGRAMW6432}/OpenNI/Lib64"
+			 PATH_SUFFIXES lib Lib Lib64)

 set(OPENNI_INCLUDE_DIRS ${OPENNI_INCLUDE_DIR})
 if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")


typo in FindOpenNI.cmake

typo in FindOpenNI.cmake

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

--- cmake/Modules/FindOpenNI.cmake
+++ cmake/Modules/FindOpenNI.cmake
@@ -58,7 +58,7 @@

 mark_as_advanced(OPENNI_LIBRARY OPENNI_INCLUDE_DIR)
 if(NOT WIN32 AND NOT USB_10_FOUND)
-  message(STATUS "OpeNI disabled because libusb-1.0 not found.")
+  message(STATUS "OpenNI disabled because libusb-1.0 not found.")
   set(HAVE_OPENNI OFF)
   return()
 else(NOT WIN32 AND NOT USB_10_FOUND)


spell out copyright/license of findlibvlc

--- cmake/modules/FindLIBVLC.cmake
+++ cmake/modules/FindLIBVLC.cmake
@@ -1,7 +1,10 @@
-
 # CMake module to search for LIBVLC (VLC library)
-# Authors: Rohit Yadav <rohityadav89@gmail.com>
-#          Harald Sitter <apachelogger@ubuntu.com>
+#
+# Copyright (C) 2011-2012, Harald Sitter <sitter@kde.org>
+# Copyright (C) 2010, Rohit Yadav <rohityadav89@gmail.com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 #
 # If it's found it sets LIBVLC_FOUND to TRUE
 # and following variables are set:
@@ -89,4 +92,3 @@
         message(FATAL_ERROR "Could not find LibVLC")
     endif (LIBVLC_FIND_REQUIRED)
 endif (LIBVLC_FOUND)
-


cmake:  spglib include path

cmake:  spglib include path

make sure cmake works with both include/spglib/spglib.h and include/spglib.h

--- cmake/modules/FindLibSPG.cmake
+++ cmake/modules/FindLibSPG.cmake
@@ -4,8 +4,8 @@
 include(FindPackageHandleStandardArgs)

 find_path(LIBSPG_INCLUDE_DIR
-  NAMES spglib/spglib.h
-  PATH_SUFFIXES include
+  NAMES spglib.h
+  PATH_SUFFIXES include include/spglib spglib
   HINTS
   ENV EBROOTSPGLIB
   ENV SPG_DIR


[lldb][NFC] Fix typo in 368066

[lldb][NFC] Fix typo in 368066

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

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@368143 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -75,7 +75,7 @@
   if(NOT LLDB_EXPLICIT_XCODE_CACHE_USED)
     message(WARNING
       "When building with Xcode, we recommend using the corresponding cache script. "
-      "If this was a mistake, clean your lean build directory and re-run CMake with:\n"
+      "If this was a mistake, clean your build directory and re-run CMake with:\n"
       "  -C ${CMAKE_SOURCE_DIR}/cmake/caches/Apple-lldb-Xcode.cmake\n"
       "See: https://lldb.llvm.org/resources/build.html#cmakegeneratedxcodeproject\n")
   endif()