[cmake] Refactor warning flag logic to use Unix warnings with clang-cl

Summary:
clang-cl understands the GCC-style -W[no-]foo flags, and for the most
part ignores MSVC -wd flags. So, let's pass the curated set of warning
flags we use on Unix on Windows. We can also stop passing /W4 -wd*,
which for the most part corresponds to -Wall -Wextra with a bunch of
flags that we mostly ignore.

I had to disable -Wnon-virtual-dtor on Windows, because it fires on
every COM class ever. I filed PR32286 to fix this.

So far I've only found two instances of -Wstring-conversion in the
WinASan code, which I'll fix. Other than that we seem clean.

Reviewers: hans

Subscribers: mgorny, llvm-commits

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -311,6 +311,113 @@
     -D_UNICODE
   )

+  if (LLVM_ENABLE_WERROR)
+    append("/WX" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif (LLVM_ENABLE_WERROR)
+
+  append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # /Zc:strictStrings is incompatible with VS12's (Visual Studio 2013's)
+  # debug mode headers. Instead of only enabling them in VS2013's debug mode,
+  # we'll just enable them for Visual Studio 2015 (VS 14, MSVC_VERSION 1900)
+  # and up.
+  if (NOT (MSVC_VERSION LESS 1900))
+    # Disable string literal const->non-const type conversion.
+    # "When specified, the compiler requires strict const-qualification
+    # conformance for pointers initialized by using string literals."
+    append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif(NOT (MSVC_VERSION LESS 1900))
+
+  # "Generate Intrinsic Functions".
+  append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+  # "Enforce type conversion rules".
+  append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
+
+  if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT LLVM_ENABLE_LTO)
+    # clang-cl and cl by default produce non-deterministic binaries because
+    # link.exe /incremental requires a timestamp in the .obj file.  clang-cl
+    # has the flag /Brepro to force deterministic binaries. We want to pass that
+    # whenever you're building with clang unless you're passing /incremental
+    # or using LTO (/Brepro with LTO would result in a warning about the flag
+    # being unused, because we're not generating object files).
+    # This checks CMAKE_CXX_COMPILER_ID in addition to check_cxx_compiler_flag()
+    # because cl.exe does not emit an error on flags it doesn't understand,
+    # letting check_cxx_compiler_flag() claim it understands all flags.
+    check_cxx_compiler_flag("/Brepro" SUPPORTS_BREPRO)
+    if (SUPPORTS_BREPRO)
+      # Check if /INCREMENTAL is passed to the linker and complain that it
+      # won't work with /Brepro.
+      string(TOUPPER "${CMAKE_EXE_LINKER_FLAGS}" upper_exe_flags)
+      string(TOUPPER "${CMAKE_MODULE_LINKER_FLAGS}" upper_module_flags)
+      string(TOUPPER "${CMAKE_SHARED_LINKER_FLAGS}" upper_shared_flags)
+
+      string(FIND "${upper_exe_flags} ${upper_module_flags} ${upper_shared_flags}"
+        "/INCREMENTAL" linker_flag_idx)
+
+      if (${linker_flag_idx} GREATER -1)
+        message(WARNING "/Brepro not compatible with /INCREMENTAL linking - builds will be non-deterministic")
+      else()
+        append("/Brepro" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+      endif()
+    endif()
+  endif()
+
+elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
+  append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
+  if (LLVM_ENABLE_CXX1Y)
+    check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)
+    append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS)
+  else()
+    check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11)
+    if (CXX_SUPPORTS_CXX11)
+      if (CYGWIN OR MINGW)
+        # MinGW and Cygwin are a bit stricter and lack things like
+        # 'strdup', 'stricmp', etc in c++11 mode.
+        append("-std=gnu++11" CMAKE_CXX_FLAGS)
+      else()
+        append("-std=c++11" CMAKE_CXX_FLAGS)
+      endif()
+    else()
+      message(FATAL_ERROR "LLVM requires C++11 support but the '-std=c++11' flag isn't supported.")
+    endif()
+  endif()
+  if (LLVM_ENABLE_MODULES)
+    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+    set(module_flags "-fmodules -fmodules-cache-path=${PROJECT_BINARY_DIR}/module.cache")
+    if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+      # On Darwin -fmodules does not imply -fcxx-modules.
+      set(module_flags "${module_flags} -fcxx-modules")
+    endif()
+    if (LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
+      set(module_flags "${module_flags} -Xclang -fmodules-local-submodule-visibility")
+    endif()
+    if (LLVM_ENABLE_MODULE_DEBUGGING AND
+        ((uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") OR
+         (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")))
+      set(module_flags "${module_flags} -gmodules")
+    endif()
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${module_flags}")
+
+    # Check that we can build code with modules enabled, and that repeatedly
+    # including <cassert> still manages to respect NDEBUG properly.
+    CHECK_CXX_SOURCE_COMPILES("#undef NDEBUG
+                               #include <cassert>
+                               #define NDEBUG
+                               #include <cassert>
+                               int main() { assert(this code is not compiled); }"
+                               CXX_SUPPORTS_MODULES)
+    set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+    if (CXX_SUPPORTS_MODULES)
+      append("${module_flags}" CMAKE_CXX_FLAGS)
+    else()
+      message(FATAL_ERROR "LLVM_ENABLE_MODULES is not supported by this compiler")
+    endif()
+  endif(LLVM_ENABLE_MODULES)
+endif( MSVC )
+
+if (MSVC AND NOT CLANG_CL)
   set(msvc_warning_flags
     # Disabled warnings.
     -wd4141 # Suppress ''modifier' : used more than once' (because of __forceinline combined with inline)
@@ -354,12 +461,12 @@
     -wd4592 # Suppress ''var': symbol will be dynamically initialized (implementation limitation)
     -wd4319 # Suppress ''operator' : zero extending 'type' to 'type' of greater size'

-	# Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
-	# support the 'aligned' attribute in the way that clang sources requires (for
-	# any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
-	# avoid unwanted alignment warnings.
-	# When we switch to requiring a version of MSVC that supports the 'alignas'
-	# specifier (MSVC 2015?) this warning can be re-enabled.
+    # Ideally, we'd like this warning to be enabled, but MSVC 2013 doesn't
+    # support the 'aligned' attribute in the way that clang sources requires (for
+    # any code that uses the LLVM_ALIGNAS macro), so this is must be disabled to
+    # avoid unwanted alignment warnings.
+    # When we switch to requiring a version of MSVC that supports the 'alignas'
+    # specifier (MSVC 2015?) this warning can be re-enabled.
     -wd4324 # Suppress 'structure was padded due to __declspec(align())'

     # Promoted warnings.
@@ -375,7 +482,7 @@
     # clang-cl having /W4 after the -we flags will re-enable the warnings
     # disabled by -we.
     set(msvc_warning_flags "/W4 ${msvc_warning_flags}")
-    # CMake appends /W3 by default, and having /W3 followed by /W4 will result in
+    # CMake appends /W3 by default, and having /W3 followed by /W4 will result in
     # cl : Command line warning D9025 : overriding '/W3' with '/W4'.  Since this is
     # a command line warning and not a compiler warning, it cannot be suppressed except
     # by fixing the command line.
@@ -386,172 +493,74 @@
       # No MSVC equivalent available
     endif (LLVM_ENABLE_PEDANTIC)
   endif (LLVM_ENABLE_WARNINGS)
-  if (LLVM_ENABLE_WERROR)
-    append("/WX" msvc_warning_flags)
-  endif (LLVM_ENABLE_WERROR)

   foreach(flag ${msvc_warning_flags})
     append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
   endforeach(flag)
-
-  append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-
-  # /Zc:strictStrings is incompatible with VS12's (Visual Studio 2013's)
-  # debug mode headers. Instead of only enabling them in VS2013's debug mode,
-  # we'll just enable them for Visual Studio 2015 (VS 14, MSVC_VERSION 1900)
-  # and up.
-  if (NOT (MSVC_VERSION LESS 1900))
-    # Disable string literal const->non-const type conversion.
-    # "When specified, the compiler requires strict const-qualification
-    # conformance for pointers initialized by using string literals."
-    append("/Zc:strictStrings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-  endif(NOT (MSVC_VERSION LESS 1900))
-
-  # "Generate Intrinsic Functions".
-  append("/Oi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-
-  # "Enforce type conversion rules".
-  append("/Zc:rvalueCast" CMAKE_CXX_FLAGS)
-
-  if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT LLVM_ENABLE_LTO)
-    # clang-cl and cl by default produce non-deterministic binaries because
-    # link.exe /incremental requires a timestamp in the .obj file.  clang-cl
-    # has the flag /Brepro to force deterministic binaries. We want to pass that
-    # whenever you're building with clang unless you're passing /incremental
-    # or using LTO (/Brepro with LTO would result in a warning about the flag
-    # being unused, because we're not generating object files).
-    # This checks CMAKE_CXX_COMPILER_ID in addition to check_cxx_compiler_flag()
-    # because cl.exe does not emit an error on flags it doesn't understand,
-    # letting check_cxx_compiler_flag() claim it understands all flags.
-    check_cxx_compiler_flag("/Brepro" SUPPORTS_BREPRO)
-    if (SUPPORTS_BREPRO)
-      # Check if /INCREMENTAL is passed to the linker and complain that it
-      # won't work with /Brepro.
-      string(TOUPPER "${CMAKE_EXE_LINKER_FLAGS}" upper_exe_flags)
-      string(TOUPPER "${CMAKE_MODULE_LINKER_FLAGS}" upper_module_flags)
-      string(TOUPPER "${CMAKE_SHARED_LINKER_FLAGS}" upper_shared_flags)
-
-      string(FIND "${upper_exe_flags} ${upper_module_flags} ${upper_shared_flags}"
-        "/INCREMENTAL" linker_flag_idx)
-
-      if (${linker_flag_idx} GREATER -1)
-        message(WARNING "/Brepro not compatible with /INCREMENTAL linking - builds will be non-deterministic")
-      else()
-        append("/Brepro" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-      endif()
-    endif()
-  endif()
-
-elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
-  if (LLVM_ENABLE_WARNINGS)
-    append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    append("-Wcast-qual" CMAKE_CXX_FLAGS)
-
-    # Turn off missing field initializer warnings for gcc to avoid noise from
-    # false positives with empty {}. Turn them on otherwise (they're off by
-    # default for clang).
-    check_cxx_compiler_flag("-Wmissing-field-initializers" CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG)
-    if (CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG)
-      if (CMAKE_COMPILER_IS_GNUCXX)
-        append("-Wno-missing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-      else()
-        append("-Wmissing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-      endif()
-    endif()
-
-    append_if(LLVM_ENABLE_PEDANTIC "-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    append_if(LLVM_ENABLE_PEDANTIC "-Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
-    append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
-    append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)
-
-    # Check if -Wnon-virtual-dtor warns even though the class is marked final.
-    # If it does, don't add it. So it won't be added on clang 3.4 and older.
-    # This also catches cases when -Wnon-virtual-dtor isn't supported by
-    # the compiler at all.  This flag is not activated for gcc since it will
-    # incorrectly identify a protected non-virtual base when there is a friend
-    # declaration.
-    if (NOT CMAKE_COMPILER_IS_GNUCXX)
-      set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11 -Werror=non-virtual-dtor")
-      CHECK_CXX_SOURCE_COMPILES("class base {public: virtual void anchor();protected: ~base();};
-                                 class derived final : public base { public: ~derived();};
-                                 int main() { return 0; }"
-                                CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR)
-      set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-      append_if(CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
-                "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)
-    endif()
-
-    # Enable -Wdelete-non-virtual-dtor if available.
-    add_flag_if_supported("-Wdelete-non-virtual-dtor" DELETE_NON_VIRTUAL_DTOR_FLAG)
-
-    # Check if -Wcomment is OK with an // comment ending with '\' if the next
-    # line is also a // comment.
+endif (MSVC AND NOT CLANG_CL)
+
+if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
+  append("-Wall -W -Wno-unused-parameter -Wwrite-strings" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  append("-Wcast-qual" CMAKE_CXX_FLAGS)
+
+  # Turn off missing field initializer warnings for gcc to avoid noise from
+  # false positives with empty {}. Turn them on otherwise (they're off by
+  # default for clang).
+  check_cxx_compiler_flag("-Wmissing-field-initializers" CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG)
+  if (CXX_SUPPORTS_MISSING_FIELD_INITIALIZERS_FLAG)
+    if (CMAKE_COMPILER_IS_GNUCXX)
+      append("-Wno-missing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    else()
+      append("-Wmissing-field-initializers" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    endif()
+  endif()
+
+  if (LLVM_ENABLE_PEDANTIC AND LLVM_COMPILER_IS_GCC_COMPATIBLE)
+    append("-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+    append("-Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif()
+
+  add_flag_if_supported("-Wcovered-switch-default" COVERED_SWITCH_DEFAULT_FLAG)
+  append_if(USE_NO_UNINITIALIZED "-Wno-uninitialized" CMAKE_CXX_FLAGS)
+  append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)
+
+  # Check if -Wnon-virtual-dtor warns even though the class is marked final.
+  # If it does, don't add it. So it won't be added on clang 3.4 and older.
+  # This also catches cases when -Wnon-virtual-dtor isn't supported by
+  # the compiler at all.  This flag is not activated for gcc since it will
+  # incorrectly identify a protected non-virtual base when there is a friend
+  # declaration. Don't activate this in general on Windows as this warning has
+  # too many false positives on COM-style classes, which are destroyed with
+  # Release() (PR32286).
+  if (NOT CMAKE_COMPILER_IS_GNUCXX AND NOT WIN32)
     set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror -Wcomment")
-    CHECK_C_SOURCE_COMPILES("// \\\\\\n//\\nint main() {return 0;}"
-                            C_WCOMMENT_ALLOWS_LINE_WRAP)
+    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -std=c++11 -Werror=non-virtual-dtor")
+    CHECK_CXX_SOURCE_COMPILES("class base {public: virtual void anchor();protected: ~base();};
+                               class derived final : public base { public: ~derived();};
+                               int main() { return 0; }"
+                              CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR)
     set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-    if (NOT C_WCOMMENT_ALLOWS_LINE_WRAP)
-      append("-Wno-comment" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    endif()
-
-    # Enable -Wstring-conversion to catch misuse of string literals.
-    add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG)
-  endif (LLVM_ENABLE_WARNINGS)
-  append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-  add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
-  if (LLVM_ENABLE_CXX1Y)
-    check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)
-    append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS)
-  else()
-    check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11)
-    if (CXX_SUPPORTS_CXX11)
-      if (CYGWIN OR MINGW)
-        # MinGW and Cygwin are a bit stricter and lack things like
-        # 'strdup', 'stricmp', etc in c++11 mode.
-        append("-std=gnu++11" CMAKE_CXX_FLAGS)
-      else()
-        append("-std=c++11" CMAKE_CXX_FLAGS)
-      endif()
-    else()
-      message(FATAL_ERROR "LLVM requires C++11 support but the '-std=c++11' flag isn't supported.")
-    endif()
-  endif()
-  if (LLVM_ENABLE_MODULES)
-    set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
-    set(module_flags "-fmodules -fmodules-cache-path=${PROJECT_BINARY_DIR}/module.cache")
-    if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
-      # On Darwin -fmodules does not imply -fcxx-modules.
-      set(module_flags "${module_flags} -fcxx-modules")
-    endif()
-    if (LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY)
-      set(module_flags "${module_flags} -Xclang -fmodules-local-submodule-visibility")
-    endif()
-    if (LLVM_ENABLE_MODULE_DEBUGGING AND
-        ((uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") OR
-         (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")))
-      set(module_flags "${module_flags} -gmodules")
-    endif()
-    set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${module_flags}")
-
-    # Check that we can build code with modules enabled, and that repeatedly
-    # including <cassert> still manages to respect NDEBUG properly.
-    CHECK_CXX_SOURCE_COMPILES("#undef NDEBUG
-                               #include <cassert>
-                               #define NDEBUG
-                               #include <cassert>
-                               int main() { assert(this code is not compiled); }"
-                               CXX_SUPPORTS_MODULES)
-    set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
-    if (CXX_SUPPORTS_MODULES)
-      append("${module_flags}" CMAKE_CXX_FLAGS)
-    else()
-      message(FATAL_ERROR "LLVM_ENABLE_MODULES is not supported by this compiler")
-    endif()
-  endif(LLVM_ENABLE_MODULES)
-endif( MSVC )
+    append_if(CXX_WONT_WARN_ON_FINAL_NONVIRTUALDTOR
+              "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)
+  endif()
+
+  # Enable -Wdelete-non-virtual-dtor if available.
+  add_flag_if_supported("-Wdelete-non-virtual-dtor" DELETE_NON_VIRTUAL_DTOR_FLAG)
+
+  # Check if -Wcomment is OK with an // comment ending with '\' if the next
+  # line is also a // comment.
+  set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
+  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror -Wcomment")
+  CHECK_C_SOURCE_COMPILES("// \\\\\\n//\\nint main() {return 0;}"
+                          C_WCOMMENT_ALLOWS_LINE_WRAP)
+  set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
+  if (NOT C_WCOMMENT_ALLOWS_LINE_WRAP)
+    append("-Wno-comment" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+  endif()
+
+  # Enable -Wstring-conversion to catch misuse of string literals.
+  add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG)
+endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))

 macro(append_common_sanitizer_flags)
   if (NOT MSVC)


Add codecov.io support. (2)

Add codecov.io support. (2)

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -295,7 +295,7 @@
         set(ENV{COBERTURADIR} "${CTEST_BINARY_DIRECTORY}")
     endif()
     if(UNIX)
-        execute_process(COMMAND bash <(curl -s https://codecov.io/bash))
+        execute_process(COMMAND curl -s https://codecov.io/bash COMMAND bash)
     endif()
     ctest_coverage()
     ctest_submit(PARTS Start Update Configure Build Test Coverage Upload Submit)


break-up sdSetFlags

break-up sdSetFlags

* xpSetFlags, xpSetUnitTestTools as public interfaces (to be called by outside cmake)
* xpSetMsvcFlags, xpSetGccFlags for compiler-specific flags

see issue https://github.com/smanders/externpro/issues/180

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1801,26 +1801,7 @@
   endif()
 endmacro()

-macro(sdSetFlags) # set preprocessor, compiler, linker flags
-  enable_testing()
-  set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables Solution Folders
-  ######
-  option(SD_GENERATE_TESTTOOLS "include test tool projects" ON)
-  if(SD_GENERATE_TESTTOOLS)
-    set(TESTTOOL) # will be part of main solution
-  else()
-    set(TESTTOOL EXCLUDE_FROM_ALL) # generated, but not part of main solution
-  endif()
-  ######
-  option(SD_GENERATE_UNITTESTS "include unit test projects" ON)
-  if(SD_GENERATE_UNITTESTS)
-    set(UNITTEST) # will be part of main solution
-  else()
-    set(UNITTEST EXCLUDE_FROM_ALL) # generated, but not part of main solution
-  endif()
-  ######
-  xpCommonFlags()
-  xpEnableWarnings()
+macro(xpSetMsvcFlags)
   if(MSVC)
     add_definitions(
       -D_CRT_NONSTDC_NO_DEPRECATE
@@ -1859,7 +1840,11 @@
     # Disable the following warnings
     xpStringAppendIfDne(CMAKE_CXX_FLAGS "/wd4503") # decorated name length exceeded, name was truncated
     xpStringAppendIfDne(CMAKE_CXX_FLAGS "/wd4351") # new behavior: elements of array will be default initialized
-  elseif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+  endif()
+endmacro()
+
+macro(xpSetGccFlags)
+  if(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
     include(CheckCCompilerFlag)
     include(CheckCXXCompilerFlag)
     option(SD_USE_ASAN "use address sanitizer" OFF)
@@ -1919,3 +1904,31 @@
     endif()
   endif()
 endmacro()
+
+macro(xpSetFlags) # preprocessor, compiler, linker flags
+  enable_testing()
+  set_property(GLOBAL PROPERTY USE_FOLDERS ON) # enables Solution Folders
+  xpCommonFlags()
+  xpEnableWarnings()
+  if(MSVC)
+    xpSetMsvcFlags()
+  elseif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+    xpSetGccFlags()
+  endif()
+endmacro()
+
+macro(xpSetUnitTestTools)
+  option(SD_GENERATE_TESTTOOLS "include test tool projects" ON)
+  if(SD_GENERATE_TESTTOOLS)
+    set(TESTTOOL) # will be part of main solution
+  else()
+    set(TESTTOOL EXCLUDE_FROM_ALL) # generated, but not part of main solution
+  endif()
+  ######
+  option(SD_GENERATE_UNITTESTS "include unit test projects" ON)
+  if(SD_GENERATE_UNITTESTS)
+    set(UNITTEST) # will be part of main solution
+  else()
+    set(UNITTEST EXCLUDE_FROM_ALL) # generated, but not part of main solution
+  endif()
+endmacro()


detect newer boosts like 1.41

detect newer boosts like 1.41


Fix Boost library directory detection to work properly when both debug and optimized libraries are found.

--- build/modules/FindBoost.cmake
+++ build/modules/FindBoost.cmake
@@ -186,10 +186,22 @@
       SET(Boost_${basename}_LIBRARY         ${Boost_${basename}_LIBRARY_DEBUG})
       SET(Boost_${basename}_LIBRARIES       ${Boost_${basename}_LIBRARY_DEBUG})
     ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
-
+
     IF (Boost_${basename}_LIBRARY)
       SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library")
-      GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS "${Boost_${basename}_LIBRARY}" PATH)
+
+      # extract include directories for each type of library available
+      SET(Boost_LIBRARY_DIRS)
+      IF (Boost_${basename}_LIBRARY_DEBUG)
+        GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS_DEBUG "${Boost_${basename}_LIBRARY_DEBUG}" PATH)
+        SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS_DEBUG})
+      ENDIF (Boost_${basename}_LIBRARY_DEBUG)
+
+      IF(Boost_${basename}_LIBRARY_RELEASE)
+        GET_FILENAME_COMPONENT(Boost_LIBRARY_DIRS_RELEASE "${Boost_${basename}_LIBRARY_RELEASE}" PATH)
+        SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS_RELEASE})
+      ENDIF(Boost_${basename}_LIBRARY_RELEASE)
+
       SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
       SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
     ENDIF (Boost_${basename}_LIBRARY)


Tag logrotate configuration file as %config in spec file.

--- build/rpm/flexisip.spec.cmake
+++ build/rpm/flexisip.spec.cmake
@@ -190,7 +190,8 @@
 %endif

 %{_sysconfdir}/flexisip
-%{_sysconfdir}/logrotate.d/flexisip-logrotate
+%config %{_sysconfdir}/logrotate.d/flexisip-logrotate
+
 /lib/systemd/system/flexisip.service
 /lib/systemd/system/flexisip@.service
 /lib/systemd/system/flexisip-proxy.service


deleted cmake subfolder

deleted cmake subfolder

--- cmake/modules/FindEigen.cmake
+++ cmake/modules/FindEigen.cmake
@@ -1,27 +0,0 @@
-###############################################################################
-# Find Eigen3
-#
-# This sets the following variables:
-# EIGEN_FOUND - True if Eigen was found.
-# EIGEN_INCLUDE_DIRS - Directories containing the Eigen include files.
-# EIGEN_DEFINITIONS - Compiler flags for Eigen.
-
-find_package(PkgConfig)
-pkg_check_modules(PC_EIGEN eigen3)
-set(EIGEN_DEFINITIONS ${PC_EIGEN_CFLAGS_OTHER})
-
-find_path(EIGEN_INCLUDE_DIR Eigen/Core
-    HINTS ${PC_EIGEN_INCLUDEDIR} ${PC_EIGEN_INCLUDE_DIRS} "$ENV{PROGRAMFILES}/Eigen 3.0.0/include/eigen3"
-    PATH_PREFIX eigen3)
-
-set(EIGEN_INCLUDE_DIRS ${EIGEN_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Eigen DEFAULT_MSG EIGEN_INCLUDE_DIR)
-
-mark_as_advanced(EIGEN_INCLUDE_DIR)
-
-if(EIGEN_FOUND)
-  message(STATUS "Eigen found (include: ${EIGEN_INCLUDE_DIRS})")
-endif(EIGEN_FOUND)
-


Prefer the pkg-config pathes.

Prefer the pkg-config pathes.

git-svn-id: e31799a7ad59d6ea355ca047c69e0aee8a59fcd3@2630 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e

--- cmake/modules/FindGLIB2.cmake
+++ cmake/modules/FindGLIB2.cmake
@@ -9,6 +9,7 @@
 #
 #  Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
 #  Copyright (c) 2006 Philippe Bernery <philippe.bernery@gmail.com>
+#  Copyright (c) 2007 Daniel Gollub <dgollub@suse.de>
 #
 #  Redistribution and use is allowed according to the terms of the New
 #  BSD license.
@@ -27,11 +28,19 @@
   ## Glib
   pkgconfig(glib-2.0 _GLIB2IncDir _GLIB2LinkDir _GLIB2LinkFlags _GLIB2Cflags)

+  # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
   find_path(GLIBCONFIG_INCLUDE_DIR
     NAMES
       glibconfig.h
     PATHS
       ${_GLIB2IncDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_path(GLIBCONFIG_INCLUDE_DIR
+    NAMES
+      glibconfig.h
+    PATHS
       /opt/gnome/lib64/glib-2.0/include
       /opt/gnome/lib/glib-2.0/include
       /opt/lib/glib-2.0/include
@@ -48,6 +57,13 @@
       glib.h
     PATHS
       ${_GLIB2IncDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_path(GLIB2_INCLUDE_DIR
+    NAMES
+      glib.h
+    PATHS
       /opt/gnome/include/glib-2.0
       /opt/local/include/glib-2.0
       /sw/include/glib-2.0
@@ -60,6 +76,13 @@
       glib-2.0
     PATHS
       ${_GLIB2LinkDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_library(GLIB2_LIBRARY
+    NAMES
+      glib-2.0
+    PATHS
       /opt/gnome/lib
       /opt/local/lib
       /sw/lib
@@ -73,11 +96,19 @@

   set(GMODULE2_DEFINITIONS ${_GMODULE2Cflags})

+  # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
   find_path(GMODULE2_INCLUDE_DIR
     NAMES
       gmodule.h
     PATHS
       ${_GMODULE2IncDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_path(GMODULE2_INCLUDE_DIR
+    NAMES
+      gmodule.h
+    PATHS
       /opt/gnome/include/glib-2.0
       /opt/local/include/glib-2.0
       /sw/include/glib-2.0
@@ -90,6 +121,13 @@
       gmodule-2.0
     PATHS
       ${_GMODULE2LinkDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_library(GMODULE2_LIBRARY
+    NAMES
+      gmodule-2.0
+    PATHS
       /opt/gnome/lib
       /opt/local/lib
       /sw/lib
@@ -106,18 +144,28 @@

   set(GTHREAD2_DEFINITIONS ${_GTHREAD2Cflags})

+  # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
   find_path(GTHREAD2_INCLUDE_DIR
     NAMES
       gthread.h
     PATHS
       ${_GTHREAD2IncDir}
-      /opt/gnome/include/glib-2.0
-      /opt/local/include/glib-2.0
-      /sw/include/glib-2.0
-      /usr/include/glib-2.0
-      /usr/local/include/glib-2.0
     PATH_SUFFIXES
       glib
+    NO_DEFAULT_PATH
+  )
+
+  find_path(GTHREAD2_INCLUDE_DIR
+    NAMES
+      gthread.h
+    PATHS
+      /opt/gnome/include/glib-2.0
+      /opt/local/include/glib-2.0
+      /sw/include/glib-2.0
+      /usr/include/glib-2.0
+      /usr/local/include/glib-2.0
+    PATH_SUFFIXES
+      glib
   )

   find_library(GTHREAD2_LIBRARY
@@ -125,6 +173,13 @@
       gthread-2.0
     PATHS
       ${_GTHREAD2LinkDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_library(GTHREAD2_LIBRARY
+    NAMES
+      gthread-2.0
+    PATHS
       /opt/gnome/lib
       /opt/local/lib
       /sw/lib
@@ -142,18 +197,28 @@

   set(GOBJECT2_DEFINITIONS ${_GOBJECT2Cflags})

+  # Prefer pkg-config results for custom builds found in PKG_CONFIG_PATH
   find_path(GOBJECT2_INCLUDE_DIR
     NAMES
       gobject.h
     PATHS
       ${_GOBJECT2IncDir}
-      /opt/gnome/include/glib-2.0
-      /opt/local/include/glib-2.0
-      /sw/include/glib-2.0
-      /usr/include/glib-2.0
-      /usr/local/include/glib-2.0
     PATH_SUFFIXES
       gobject
+    NO_DEFAULT_PATH
+  )
+
+  find_path(GOBJECT2_INCLUDE_DIR
+    NAMES
+      gobject.h
+    PATHS
+      /opt/gnome/include/glib-2.0
+      /opt/local/include/glib-2.0
+      /sw/include/glib-2.0
+      /usr/include/glib-2.0
+      /usr/local/include/glib-2.0
+    PATH_SUFFIXES
+      gobject
   )

   find_library(GOBJECT2_LIBRARY
@@ -161,6 +226,13 @@
       gobject-2.0
     PATHS
       ${_GOBJECT2LinkDir}
+    NO_DEFAULT_PATH
+  )
+
+  find_library(GOBJECT2_LIBRARY
+    NAMES
+      gobject-2.0
+    PATHS
       /opt/gnome/lib
       /opt/local/lib
       /sw/lib
@@ -290,4 +362,12 @@
   # show the GLIB2_INCLUDE_DIRS and GLIB2_LIBRARIES variables only in the advanced view
   mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_LIBRARIES GLIB2_PUBLIC_LINK_FLAGS)

+  # same for all other variables
+  mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARY GLIBCONFIG_INCLUDE_DIR)
+  mark_as_advanced(GMODULE2_INCLUDE_DIR GMODULE2_LIBRARY)
+  mark_as_advanced(GOBJECT2_INCLUDE_DIR GOBJECT2_LIBRARY)
+  mark_as_advanced(GTHREAD2_INCLUDE_DIR GTHREAD2_LIBRARY)
+  mark_as_advanced(LIBICONV_INCLUDE_DIR LIBICONV_LIBRARY)
+  mark_as_advanced(LIBINTL_INCLUDE_DIR LIBINTL_LIBRARY)
+
 endif (GLIB2_LIBRARIES AND GLIB2_INCLUDE_DIRS AND GLIB2_PUBLIC_LINK_FLAGS)


Fixed compile problems which occured if the wxWidgets driver was turned on, but the cxx bindings were turned off, since there was no check for stdint.h.

svn path=/trunk/; revision=9019

--- cmake/modules/wxwidgets.cmake
+++ cmake/modules/wxwidgets.cmake
@@ -38,6 +38,18 @@
     )
     set(PLD_wxwidgets OFF CACHE BOOL "Enable wxwidgets device" FORCE)
   endif(NOT wxWidgets_FOUND)
+endif(PLD_wxwidgets)
+
+# Need to add check if stdint.h can be used from c++ (HAVE_CXX_STDINT_H)
+if(PLD_wxwidgets)
+  include(TestForStdintCXX)
+  if(NOT CMAKE_CXX_STDINT_H)
+    message(STATUS
+    "WARNING: CXX compiler doesn't support using stdint.h so "
+    "setting PLD_wxwidgets to OFF."
+    )
+    set(PLD_wxwidgets OFF CACHE BOOL "Enable wxwidgets device" FORCE)
+  endif(NOT CMAKE_CXX_STDINT_H)
 endif(PLD_wxwidgets)

 if(PLD_wxwidgets)


Synchronize adm files

Synchronize adm files

--- adm_local_without_kernel/cmake_files/SalomeMacros.cmake
+++ adm_local_without_kernel/cmake_files/SalomeMacros.cmake
@@ -837,7 +837,12 @@
  ENDFOREACH()

  # Get module name as substring of "Salome<ModuleName>"
- STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
+ STRING(REGEX MATCH "^Salome" _is_salome_project ${PROJECT_NAME})
+ IF(_is_salome_project)
+   STRING(SUBSTRING "${PROJECT_NAME}" 6 -1 PRNAME)
+ ELSE()
+   SET(PRNAME ${PROJECT_NAME})
+ ENDIF()
  SET(_env "${PRNAME}_ROOT_DIR=${CMAKE_INSTALL_PREFIX}${sep}${_env}")

  # Creating follow string for Windows environement:


removed findcoin.cmake from looking for coin's bz2 library.

--- src/CMake/FindCOIN.cmake
+++ src/CMake/FindCOIN.cmake
@@ -62,11 +62,6 @@
   HINTS ${COIN_ROOT_DIR}/lib/coin
   HINTS ${COIN_ROOT_DIR}/lib
 )
-FIND_LIBRARY(COIN_BZ2_LIBRARY
-  NAMES bz2 libbz2
-  HINTS ${COIN_ROOT_DIR}/lib/coin
-  HINTS ${COIN_ROOT_DIR}/lib
-)

 INCLUDE(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
@@ -85,13 +80,10 @@

 IF(COIN_FOUND)
   SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
-  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY}")
+  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_ZLIB_LIBRARY}")
   IF(COIN_ZLIB_LIBRARY)
     SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_ZLIB_LIBRARY}")
   ENDIF(COIN_ZLIB_LIBRARY)
-   IF(COIN_BZ2_LIBRARY)
-    SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARIES};${COIN_BZ2_LIBRARY}")
-  ENDIF(COIN_BZ2_LIBRARY)
-  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_BZ2_LIBRARY};${COIN_CLP_LIBRARIES}")
+  SET(COIN_CBC_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_ZLIB_LIBRARY};${COIN_CLP_LIBRARIES}")
   SET(COIN_LIBRARIES ${COIN_CBC_LIBRARIES})
 ENDIF(COIN_FOUND)


Revert "update sha1 for PythonQt external to get upstream bug fix"

This reverts commit 8a3d777f629977024db12995d34a6a384aaf26a7.

--- distro/superbuild/cmake/externals.cmake
+++ distro/superbuild/cmake/externals.cmake
@@ -150,7 +150,7 @@
 # PythonQt
 ExternalProject_Add(PythonQt
   GIT_REPOSITORY https://github.com/commontk/PythonQt.git
-  GIT_TAG cbf890f
+  GIT_TAG 00e6c6b2
   CMAKE_CACHE_ARGS
     ${default_cmake_args}
     ${qt_args}


Bugfix

Bugfix

git-svn-id: 59f82343654cec32357d3b049d399063e4e4cfc7@30969 0785d39b-7218-0410-832d-ea1e28bc413d

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -423,7 +423,7 @@
 IF(NOT "${_svn_WC_REVISION}" STREQUAL "")
   FILE(WRITE ${_path}/Update.xml
 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<Update mode=\"Client\" Generator=\"${CTEST_GENERATOR}\">
+<Update mode=\"Client\" Generator=\"ctest-${CTEST_VERSION}\">
     <Site>${CTEST_SITE}</Site>
       <BuildName>${CTEST_BUILD_NAME}</BuildName>
         <BuildStamp>${_tag}-${TRACK}</BuildStamp>


Fixes bug in target name that caused a missing dependency of the swig wrapper on the swig wrapped package.

--- internal/py_swig.cmake
+++ internal/py_swig.cmake
@@ -20,7 +20,8 @@
     ENDIF()

     PACKAGE_BASENAME_TO_URI(${_NAME} target_uri)
-    URI_TO_TARGET_NAME(${target_uri} target)
+    URI_TO_TARGET_NAME(${target_uri} target) # uri of the new bindings package to be created
+    URI_TO_TARGET_NAME(${_WRAP_PACKAGE_URI} wrap_target_name) # uri of the package to be wrapped

     # Compute all package dependencies (transitively)
     COMPUTE_PACKAGE_TRANSITIVE_CLOSURE("${_WRAP_PACKAGE_URI}" missing_package_uris required_package_uris required_libraries required_includes)
@@ -37,12 +38,12 @@
     SET(CMAKE_SWIG_FLAGS "")
     SET_SOURCE_FILES_PROPERTIES(${_SOURCE} PROPERTIES CPLUSPLUS ON)
     SWIG_ADD_MODULE(${_NAME} python ${_SOURCE})
-    #SWIG_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES} ${${_WRAP}_LIBRARIES})
+
     SWIG_LINK_LIBRARIES(${_NAME} ${PYTHON_LIBRARIES} ${required_libraries})

     # This makes sure CMAKE knows to build all of our dependencies first
-    ADD_CUSTOM_TARGET(${target} DEPENDS ${_WRAP} SOURCES ${_SOURCE})
-    ADD_DEPENDENCIES(${SWIG_MODULE_${_NAME}_REAL_NAME} ${_WRAP} ${target})
+    ADD_CUSTOM_TARGET(${target} DEPENDS ${wrap_target_name} SOURCES ${_SOURCE})
+    ADD_DEPENDENCIES(${SWIG_MODULE_${_NAME}_REAL_NAME} ${target})

     SET("${target}_DIR" ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Path to package ${target_uri}" FORCE)
     MARK_AS_ADVANCED("${target}_DIR")


fix for craype config skipping SSE4.2 code generation

--- common/cmake/crayprgenv.cmake
+++ common/cmake/crayprgenv.cmake
@@ -15,7 +15,11 @@
 ## ======================================================================== ##

 SET(FLAGS_SSE2      "-target-cpu=xeon")
-SET(FLAGS_SSE42     "ERROR_ISA_NOT_SUPPORTED")
+IF(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
+  SET(FLAGS_SSE42   "-target-cpu=xeon -msse4.2")
+ELSE()#Intel
+  SET(FLAGS_SSE42   "-target-cpu=xeon -xsse4.2 -fPIC")
+ENDIF()
 SET(FLAGS_AVX       "-target-cpu=sandybridge")
 SET(FLAGS_AVX2      "-target-cpu=haswell")
 SET(FLAGS_AVX512KNL "-target-cpu=mic-knl")


BUG: fix pkgsetup.in source directory

BUG: fix pkgsetup.in source directory

--- SuperBuild/CMake/External_package.cmake
+++ SuperBuild/CMake/External_package.cmake
@@ -40,7 +40,7 @@
        include(CMakeParseArguments)
        set(CMAKE_INSTALL_PREFIX \"${SB_INSTALL_PREFIX}\")
        set(DOWNLOAD_LOCATION \"${DOWNLOAD_LOCATION}\")
-       set(PACKAGE_SUPPORT_FILES_DIR \"${CMAKE_SOURCE_DIR}/CMake/Packaging\")
+       set(PACKAGE_SUPPORT_FILES_DIR \"${CMAKE_SOURCE_DIR}/Packaging\")
        set(Monteverdi_SOURCE_DIR \"${CMAKE_BINARY_DIR}/MVD/src/MVD\")
        set(Monteverdi_BINARY_DIR \"${CMAKE_BINARY_DIR}/MVD/build\")
        set(OTB_INSTALL_DIR \"${CMAKE_BINARY_DIR}/OTB/build\")


cmake function to create header resources

* see issue https://github.com/smanders/externpro/issues/123

--- modules/xpfunmac.cmake
+++ modules/xpfunmac.cmake
@@ -1121,6 +1121,30 @@
     )
 endfunction()

+function(xpCreateHeaderResource _output) # .hrc
+  xpGetPkgVar(wxInclude EXE) # sets WXINCLUDE_EXE
+  foreach(in ${ARGN})
+    if(NOT IS_ABSOLUTE ${in})
+      get_filename_component(in ${CMAKE_CURRENT_SOURCE_DIR}/${in} ABSOLUTE)
+    endif()
+    if(EXISTS ${in})
+      get_filename_component(of ${in} NAME_WE)
+      get_filename_component(nm ${in} NAME)
+      get_filename_component(dr ${in} DIRECTORY)
+      set(op ${CMAKE_CURRENT_BINARY_DIR}/Resources/${of}.hrc)
+      add_custom_command(OUTPUT ${op}
+        COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Resources
+        COMMAND $<TARGET_FILE:${WXINCLUDE_EXE}> --const --appendtype --wxnone --output-file=${op} ${nm}
+        WORKING_DIRECTORY ${dr} DEPENDS ${in}
+        )
+      list(APPEND outList ${op})
+    else()
+      message(FATAL_ERROR "resource not found: ${in}")
+    endif()
+  endforeach()
+  set(${_output} ${outList} PARENT_SCOPE)
+endfunction()
+
 function(xpGitCheckout url hash dir)
   if(NOT GIT_FOUND)
     include(FindGit)


version bump libvisual alsa

version bump libvisual alsa

git-svn-id: 647c2dfdf120d9af8205d960f30c8711574448cd@1404 6778bc44-b910-0410-a7a0-be141de4315d

--- src/projectM-libvisual-alsa/cmake/CPack-projectM.cmake
+++ src/projectM-libvisual-alsa/cmake/CPack-projectM.cmake
@@ -17,8 +17,8 @@
 #SET(CPACK_BINARY_TGZ ON)
 #SET(CPACK_SOURCE_Z OFF)
 SET(CPACK_PACKAGE_VERSION_MAJOR "2")
-SET(CPACK_PACKAGE_VERSION_MINOR "0")
-SET(CPACK_PACKAGE_VERSION_PATCH "1")
+SET(CPACK_PACKAGE_VERSION_MINOR "1")
+SET(CPACK_PACKAGE_VERSION_PATCH "0")

 INCLUDE(CPack)


[FIX] added missing cdash project

[FIX] added missing cdash project

--- util/travis/linux-cibuild.cmake
+++ util/travis/linux-cibuild.cmake
@@ -1,4 +1,7 @@
-# define build name&co for easier identification on cdassh
+# This project name is used for the CDash submission.
+SET (CTEST_PROJECT_NAME "SeqAn")
+
+# define build name&co for easier identification on CDash
 set(CTEST_BUILD_NAME "travis-ci-$ENV{TRAVIS_BRANCH}-$ENV{BUILD_NAME}-$ENV{CXX}")
 set(CTEST_SITE "travis-ci-build-server")
 set(CTEST_SOURCE_DIRECTORY "$ENV{SOURCE_DIRECTORY}")


fpta-cmake: check and use GNU C11.

fpta-cmake: check and use GNU C11.

--- cmake.fpta/compiler.cmake
+++ cmake.fpta/compiler.cmake
@@ -42,7 +42,7 @@
 #
 # Check supported standards
 #
-if((NOT HAVE_STD_C11 AND NOT HAVE_STD_C99 AND NOT HAVE_STD_GNU99) OR
+if((NOT HAVE_STD_C11 AND NOT HAVE_STD_C99 AND NOT HAVE_STD_GNU99 AND NOT HAVE_STD_GNU11) OR
     (NOT HAVE_STD_CXX11 AND NOT HAVE_STD_GNUXX0X))
   set(CMAKE_REQUIRED_FLAGS "-std=c11")
   check_c_source_compiles("
@@ -57,6 +57,25 @@
     int main(void) { return 0; }
     " HAVE_STD_C11)

+  set(CMAKE_REQUIRED_FLAGS "-std=gnu11")
+  check_c_source_compiles("
+    #if __STDC_VERSION__ < 201112L
+    #   error GNU C11 not available
+    #endif
+    /*
+    * FreeBSD 10 ctype.h header fail to compile on gcc4.8 in c11 mode.
+    * Make sure we aren't affected.
+    */
+    #include <ctype.h>
+    /* Check for GNU C extension for VA_ARGS */
+    static inline void probe(int anchor, ...) { (void) anchor; }
+    #define PROBE(...) probe(42, ##__VA_ARGS__)
+    int main(void) {
+    PROBE(); PROBE(1); PROBE(2,2); PROBE(3,3,3);
+    return 0;
+    }
+    " HAVE_STD_GNU11)
+
   set(CMAKE_REQUIRED_FLAGS "-std=c99")
   check_c_source_compiles("
     #if (__STDC_VERSION__ < 199901L) && (_MSC_FULL_VER < 180040629)
@@ -70,7 +89,13 @@
     #if __STDC_VERSION__ < 199901L
     #   error C99 not available
     #endif
-    int main(void) { return 0; }
+    /* Check for GNU C extension for VA_ARGS */
+    static inline void probe(int anchor, ...) { (void) anchor; }
+    #define PROBE(...) probe(42, ##__VA_ARGS__)
+    int main(void) {
+    PROBE(); PROBE(1); PROBE(2,2); PROBE(3,3,3);
+    return 0;
+    }
     " HAVE_STD_GNU99)

   set(CMAKE_REQUIRED_FLAGS "-std=c++11")
@@ -391,7 +416,9 @@
   endif()

   # Set standard
-  if(HAVE_STD_C11)
+  if(HAVE_STD_GNU11)
+    add_compile_flags("C" "-std=gnu11")
+  elseif(HAVE_STD_C11)
     add_compile_flags("C" "-std=c11")
   elseif(HAVE_STD_GNU99)
     add_compile_flags("C" "-std=gnu99")


fptu-cmake: enable exception handling for C code.

--- cmake.fptu/compiler.cmake
+++ cmake.fptu/compiler.cmake
@@ -373,6 +373,9 @@
 macro(setup_compile_flags)
   # LY: save initial C/CXX flags
   if(NOT INITIAL_CMAKE_FLAGS_SAVED)
+    if(MSVC)
+      string(REGEX REPLACE "^(.*)(/EHsc)( *)(.*)$" "\\1/EHs\\3\\4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+    endif()
     set(INITIAL_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
     set(INITIAL_CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
     set(INITIAL_CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "Initial CMake's flags" FORCE)
@@ -389,6 +392,10 @@
   set(SHARED_LINKER_FLAGS ${INITIAL_CMAKE_SHARED_LINKER_FLAGS})
   set(STATIC_LINKER_FLAGS ${INITIAL_CMAKE_STATIC_LINKER_FLAGS})
   set(MODULE_LINKER_FLAGS ${INITIAL_CMAKE_MODULE_LINKER_FLAGS})
+
+  if(CC_HAS_FEXCEPTIONS)
+    add_compile_flags("C;CXX" "-fexceptions")
+  endif()

   if(CC_HAS_FNO_COMMON)
     add_compile_flags("C;CXX" "-fno-common")


Update compiler flags

Update compiler flags

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -5,8 +5,10 @@
 set(cxx11_flag_needed OFF)
 if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
     set(cxx11_flag_needed ON)
-elseif(${CMAKE_COMPILER_IS_GNUCC} AND ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.0)
-    set(cxx11_flag_needed ON)
+elseif(${CMAKE_COMPILER_IS_GNUCC})
+    if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.0)
+        set(cxx11_flag_needed ON)
+    endif()
 endif()

 if(${cxx11_flag_needed})
@@ -31,12 +33,15 @@
 endmacro()

 # Add some warnings in debug mode
-set_debug_flag_if_possible("-Wall")
-set_debug_flag_if_possible("-Wextra")
-set_debug_flag_if_possible("-Wconversion")
-set_debug_flag_if_possible("-Wsign-conversion")
-set_debug_flag_if_possible("-Wsign-promo")
-
+if(MSVC)
+    set_debug_flag_if_possible("/W4")
+else()
+    set_debug_flag_if_possible("-Wall")
+    set_debug_flag_if_possible("-Wextra")
+    set_debug_flag_if_possible("-Wconversion")
+    set_debug_flag_if_possible("-Wsign-conversion")
+    set_debug_flag_if_possible("-Wsign-promo")
+endif()

 if(FORTRAN_BINDING)
 include(CheckFortranCompilerFlag)


Disable media foundation backend by default

--- cmake/ConfigOptions.cmake
+++ cmake/ConfigOptions.cmake
@@ -52,7 +52,7 @@
 		"NOT WITH_VALGRIND_MEMCHECK; NOT WITH_SANITIZE_ADDRESS; NOT WITH_SANITIZE_MEMORY" OFF)
 else()
 	if(NOT UWP)
-		option(WITH_MEDIA_FOUNDATION "Enable H264 media foundation decoder." ON)
+		option(WITH_MEDIA_FOUNDATION "Enable H264 media foundation decoder." OFF)
 	endif()
 endif()


Removed obsolete gstreamer detection script.

--- cmake/FindGstreamer.cmake
+++ cmake/FindGstreamer.cmake
@@ -1,145 +0,0 @@
-# - Try to find Gstreamer and its plugins
-# Once done, this will define
-#
-#  GSTREAMER_FOUND - system has Gstreamer
-#  GSTREAMER_INCLUDE_DIRS - the Gstreamer include directories
-#  GSTREAMER_LIBRARIES - link these to use Gstreamer
-#
-# Additionally, gstreamer-base is always looked for and required, and
-# the following related variables are defined:
-#
-#  GSTREAMER_BASE_INCLUDE_DIRS - gstreamer-base's include directory
-#  GSTREAMER_BASE_LIBRARIES - link to these to use gstreamer-base
-#
-# Optionally, the COMPONENTS keyword can be passed to find_package()
-# and Gstreamer plugins can be looked for.  Currently, the following
-# plugins can be searched, and they define the following variables if
-# found:
-#
-#  gstreamer-app:        GSTREAMER_APP_INCLUDE_DIRS and GSTREAMER_APP_LIBRARIES
-#  gstreamer-audio:      GSTREAMER_AUDIO_INCLUDE_DIRS and GSTREAMER_AUDIO_LIBRARIES
-#  gstreamer-fft:        GSTREAMER_FFT_INCLUDE_DIRS and GSTREAMER_FFT_LIBRARIES
-#  gstreamer-pbutils:    GSTREAMER_PBUTILS_INCLUDE_DIRS and GSTREAMER_PBUTILS_LIBRARIES
-#  gstreamer-video:      GSTREAMER_VIDEO_INCLUDE_DIRS and GSTREAMER_VIDEO_LIBRARIES
-#
-# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org>
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  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.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS 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 ITS
-# 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.
-
-find_package(PkgConfig)
-
-# The minimum Gstreamer version we support.
-set(GSTREAMER_MINIMUM_VERSION 1.0.5)
-
-# Helper macro to find a Gstreamer plugin (or Gstreamer itself)
-#   _component_prefix is prepended to the _INCLUDE_DIRS and _LIBRARIES variables (eg. "GSTREAMER_AUDIO")
-#   _pkgconfig_name is the component's pkg-config name (eg. "gstreamer-1.0", or "gstreamer-video-1.0").
-#   _header is the component's header, relative to the gstreamer-1.0 directory (eg. "gst/gst.h").
-#   _library is the component's library name (eg. "gstreamer-1.0" or "gstvideo-1.0")
-macro(FIND_GSTREAMER_COMPONENT _component_prefix _pkgconfig_name _header _library)
-    # FIXME: The QUIET keyword can be used once we require CMake 2.8.2.
-    pkg_check_modules(PC_${_component_prefix} ${_pkgconfig_name})
-
-    find_path(${_component_prefix}_INCLUDE_DIRS
-        NAMES ${_header}
-        HINTS ${PC_${_component_prefix}_INCLUDE_DIRS} ${PC_${_component_prefix}_INCLUDEDIR}
-        PATH_SUFFIXES gstreamer-1.0
-    )
-
-    find_library(${_component_prefix}_LIBRARIES
-        NAMES ${_library} gstreamer_android
-        HINTS ${PC_${_component_prefix}_LIBRARY_DIRS} ${PC_${_component_prefix}_LIBDIR} ${GSTREAMER_ROOT_DIR}
-    )
-endmacro()
-
-# ------------------------
-# 1. Find Gstreamer itself
-# ------------------------
-
-# 1.1. Find headers and libraries
-set(GLIB_ROOT_DIR ${GSTREAMER_ROOT_DIR})
-find_package(Glib REQUIRED)
-FIND_GSTREAMER_COMPONENT(GSTREAMER gstreamer-1.0 gst/gst.h gstreamer-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_BASE gstreamer-base-1.0 gst/gst.h gstbase-1.0)
-
-# 1.2. Check Gstreamer version
-if (GSTREAMER_INCLUDE_DIRS)
-    if (EXISTS "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h")
-        file(READ "${GSTREAMER_INCLUDE_DIRS}/gst/gstversion.h" GSTREAMER_VERSION_CONTENTS)
-
-        string(REGEX MATCH "#define +GST_VERSION_MAJOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
-        set(GSTREAMER_VERSION_MAJOR "${CMAKE_MATCH_1}")
-
-        string(REGEX MATCH "#define +GST_VERSION_MINOR +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
-        set(GSTREAMER_VERSION_MINOR "${CMAKE_MATCH_1}")
-
-        string(REGEX MATCH "#define +GST_VERSION_MICRO +\\(([0-9]+)\\)" _dummy "${GSTREAMER_VERSION_CONTENTS}")
-        set(GSTREAMER_VERSION_MICRO "${CMAKE_MATCH_1}")
-
-        set(GSTREAMER_VERSION "${GSTREAMER_VERSION_MAJOR}.${GSTREAMER_VERSION_MINOR}.${GSTREAMER_VERSION_MICRO}")
-    endif ()
-endif ()
-
-# FIXME: With CMake 2.8.3 we can just pass GSTREAMER_VERSION to FIND_PACKAGE_HANDLE_STANDARD_ARGS as VERSION_VAR
-#        and remove the version check here (GSTREAMER_MINIMUM_VERSION would be passed to FIND_PACKAGE).
-set(VERSION_OK TRUE)
-if ("${GSTREAMER_VERSION}" VERSION_LESS "${GSTREAMER_MINIMUM_VERSION}")
-    set(VERSION_OK FALSE)
-endif ()
-
-# -------------------------
-# 2. Find Gstreamer plugins
-# -------------------------
-
-FIND_GSTREAMER_COMPONENT(GSTREAMER_APP gstreamer-app-1.0 gst/app/gstappsink.h gstapp-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_AUDIO gstreamer-audio-1.0 gst/audio/audio.h gstaudio-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_FFT gstreamer-fft-1.0 gst/fft/gstfft.h gstfft-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_PBUTILS gstreamer-pbutils-1.0 gst/pbutils/pbutils.h gstpbutils-1.0)
-FIND_GSTREAMER_COMPONENT(GSTREAMER_VIDEO gstreamer-video-1.0 gst/video/video.h gstvideo-1.0)
-
-# ------------------------------------------------
-# 3. Process the COMPONENTS passed to FIND_PACKAGE
-# ------------------------------------------------
-set(_GSTREAMER_REQUIRED_VARS Glib_INCLUDE_DIRS Glib_LIBRARIES GSTREAMER_INCLUDE_DIRS GSTREAMER_LIBRARIES VERSION_OK GSTREAMER_BASE_INCLUDE_DIRS GSTREAMER_BASE_LIBRARIES)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Gstreamer DEFAULT_MSG GSTREAMER_LIBRARIES GSTREAMER_INCLUDE_DIRS)
-
-list(APPEND GSTREAMER_INCLUDE_DIRS ${Glib_INCLUDE_DIRS})
-list(APPEND GSTREAMER_LIBRARIES ${Glib_LIBRARIES})
-list(APPEND GSTREAMER_INCLUDE_DIRS ${GSTREAMER_BASE_INCLUDE_DIRS})
-list(APPEND GSTREAMER_LIBRARIES ${GSTREAMER_BASE_LIBRARIES})
-list(APPEND GSTREAMER_INCLUDE_DIRS ${GSTREAMER_APP_INCLUDE_DIRS})
-list(APPEND GSTREAMER_LIBRARIES ${GSTREAMER_APP_LIBRARIES})
-list(APPEND GSTREAMER_INCLUDE_DIRS ${GSTREAMER_VIDEO_INCLUDE_DIRS})
-list(APPEND GSTREAMER_LIBRARIES ${GSTREAMER_VIDEO_LIBRARIES})
-
-foreach (_component ${Gstreamer_FIND_COMPONENTS})
-    set(_gst_component "GSTREAMER_${_component}")
-    string(TOUPPER ${_gst_component} _UPPER_NAME)
-
-    FIND_PACKAGE_HANDLE_STANDARD_ARGS(${_UPPER_NAME} DEFAULT_MSG ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
-    list(APPEND GSTREAMER_INCLUDE_DIRS ${${_UPPER_NAME}_INCLUDE_DIRS})
-    list(APPEND GSTREAMER_LIBRARIES ${${_UPPER_NAME}_LIBRARIES})
-endforeach ()
-
-


replaced echo -e with printf (also works on mac)

--- cmake/MacroRootDict.cmake
+++ cmake/MacroRootDict.cmake
@@ -79,7 +79,7 @@
     ADD_CUSTOM_COMMAND(
         OUTPUT ${_linkdef_header}
         COMMAND mkdir -p ${ROOT_DICT_OUTPUT_DIR}
-        COMMAND echo -e "${${_namespace}_file_contents}" > ${_linkdef_header}
+        COMMAND printf "${${_namespace}_file_contents}" > ${_linkdef_header}
         DEPENDS ${_input_headers}
         COMMENT "generating: ${_linkdef_header}"
     )


Clean up OPENSIM_ADD_LIBRARY macro.

Clean up OPENSIM_ADD_LIBRARY macro.

--- cmake/OpenSimMacros.cmake
+++ cmake/OpenSimMacros.cmake
@@ -41,7 +41,6 @@
     # Version stuff.
     # --------------
     SET(OSIMADDLIB_LIBRARY_NAME osim${OSIMADDLIB_KIT})
-    SET(COPYRIGHT_YEARS "2005-14")

     ADD_DEFINITIONS(
         -DOPENSIM_${OSIMADDLIB_UKIT}_LIBRARY_NAME=${OSIMADDLIB_LIBRARY_NAME}
@@ -61,17 +60,17 @@
     INCLUDE_DIRECTORIES(${OpenSim_SOURCE_DIR}/Vendors ${OpenSim_SOURCE_DIR})

     # Create the library using the provided source and include files.
-    ADD_LIBRARY(osim${OSIMADDLIB_KIT} SHARED
+    ADD_LIBRARY(${OSIMADDLIB_LIBRARY_NAME} SHARED
         ${OSIMADDLIB_SOURCES} ${OSIMADDLIB_INCLUDES})

     # This target links to the libraries provided as arguments to this func.
-    TARGET_LINK_LIBRARIES(osim${OSIMADDLIB_KIT} ${OSIMADDLIB_LINKLIBS})
+    TARGET_LINK_LIBRARIES(${OSIMADDLIB_LIBRARY_NAME} ${OSIMADDLIB_LINKLIBS})

     # This is for exporting classes on Windows.
     SET(EXPORT_MACRO OSIM${OSIMADDLIB_UKIT}_EXPORTS)
-    SET_TARGET_PROPERTIES(osim${OSIMADDLIB_KIT} PROPERTIES
+    SET_TARGET_PROPERTIES(${OSIMADDLIB_LIBRARY_NAME} PROPERTIES
        DEFINE_SYMBOL ${EXPORT_MACRO}
-       PROJECT_LABEL "Libraries - osim${OSIMADDLIB_KIT}"
+       PROJECT_LABEL "Libraries - ${OSIMADDLIB_LIBRARY_NAME}"
     )

@@ -82,14 +81,14 @@
     # (Linux) or OpemSim/lib/*.dylib (Mac). Windows .lib files, and Linux/Mac
     # .a static archives are only needed at link time so go in sdk/lib.
     IF(WIN32)
-        SET(OSIMLIB_LIBRARY_DESTINATION sdk/lib)
+        SET(OSIMADDLIB_LIBRARY_DESTINATION sdk/lib)
     ELSE()
-        SET(OSIMLIB_LIBRARY_DESTINATION lib)
+        SET(OSIMADDLIB_LIBRARY_DESTINATION lib)
     ENDIF()
-    INSTALL(TARGETS osim${OSIMADDLIB_KIT}
+    INSTALL(TARGETS ${OSIMADDLIB_LIBRARY_NAME}
         EXPORT OpenSimTargets
         RUNTIME DESTINATION bin
-        LIBRARY DESTINATION "${OSIMLIB_LIBRARY_DESTINATION}"
+        LIBRARY DESTINATION "${OSIMADDLIB_LIBRARY_DESTINATION}"
         ARCHIVE DESTINATION sdk/lib)

     # Install headers.


Minor updates to ZincPackaging, cleaning some debug messages and old comments.  https://tracker.physiomeproject.org/show_bug.cgi?id=3439

git-svn-id: b9baf8c2d14a71b3ba9c27a102eb6e792fc13348@9744 3c1deb5b-d424-0410-962d-aba41a686d42

--- cmake/ZincPackaging.cmake
+++ cmake/ZincPackaging.cmake
@@ -26,7 +26,6 @@
 		IF( COMMAND_RESULT EQUAL 0 )
 			STRING( REGEX MATCH "^[^\\]*" COMMAND_OUTPUT ${COMMAND_OUTPUT} )
 			STRING( STRIP ${COMMAND_OUTPUT} COMMAND_OUTPUT )
-			message(STATUS "comm out: ${COMMAND_OUTPUT}" )
 			STRING( REPLACE " " "-" SYSTEM_NAME ${COMMAND_OUTPUT} )
 		ENDIF()
 	ELSE()
@@ -49,7 +48,6 @@

 	SET( ZINC_ARCHITECTURE "universal" )
 	SET( CPACK_GENERATOR  "TGZ" "PackageMaker" )
-	#SET( CPACK_BUNDLE_NAME "OpenCMISS-Zinc" )
 ELSEIF( UNIX )
 	SET( CPACK_GENERATOR "TGZ" )
 	STRING( FIND ${ZINC_SYSTEM} "Ubuntu" INDEX )
@@ -64,7 +62,6 @@
 SET( CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/distrib/description.txt" )
 SET( CPACK_PACKAGE_VENDOR "physiomeproject" )

-message(STATUS "CPack package name: 'zinc-${ZINC_VERSION}-${ZINC_ARCHITECTURE}-${ZINC_SYSTEM}'" )
 SET( CPACK_PACKAGE_FILE_NAME "zinc-${ZINC_VERSION}-${ZINC_ARCHITECTURE}-${ZINC_SYSTEM}" )
 SET( CPACK_OUTPUT_FILE_PREFIX "package" )


qi_sanitise_compile_flags: remove -Wextra (we are not martians)

Change-Id: Iea8312fd70f8dfc1425aca2b24b510e4e380bc67

--- cmake/qibuild/flags.cmake
+++ cmake/qibuild/flags.cmake
@@ -51,7 +51,7 @@
     # add_definitions("-ansi")

     # Activate warnings
-    add_definitions("-Wall -Wextra -Wno-unused-parameter")
+    add_definitions("-Wall -Wno-unused-parameter")

     if (ARGS_HIDDEN_SYMBOLS)
       add_definitions("-fvisibility=hidden")


openssl use script fix

openssl use script fix

* when building only one version, need to set appropriate boolean
* issue https://github.com/smanders/externpro/issues/36

--- projects/openssl.cmake
+++ projects/openssl.cmake
@@ -21,7 +21,12 @@
   list(REMOVE_DUPLICATES OPENSSL_VERSIONS)
   list(LENGTH OPENSSL_VERSIONS NUM_VER)
   if(NUM_VER EQUAL 1)
-    set(ONE_VER "set(XP_USE_LATEST_OPENSSL ON) # currently only one version supported\n")
+    if(OPENSSL_VERSIONS EQUAL OPENSSL_OLDVER)
+      set(boolean OFF)
+    else() # OPENSSL_VERSIONS EQUAL OPENSSL_NEWVER
+      set(boolean ON)
+    endif()
+    set(ONE_VER "set(XP_USE_LATEST_OPENSSL ${boolean}) # currently only one version supported\n")
   endif()
   set(MOD_OPT "set(VER_MOD)")
   set(VER_CFG xpConfigBase)


Dont assume install for golang binaries

Dont assume install for golang binaries

--- golang.cmake
+++ golang.cmake
@@ -41,8 +41,6 @@
     ${CMAKE_GO_FLAGS} ${GO_EXECUTABLE_SOURCE_FILES}
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

-  install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${GO_EXECUTABLE_NAME} DESTINATION bin)
-
 endfunction()

 function(add_go_library)
@@ -81,7 +79,4 @@
     ${CMAKE_GO_FLAGS} ${GO_LIBRARY_SOURCE_FILES}
     WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})

-  if(DEFINED GO_LIBRARY_SHARED)
-    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME} DESTINATION bin)
-  endif()
 endfunction()


Add possibilite of launch local tests in developpement directory
using in trunk/test  this command :  LOCAL_TEST=TRUE ctest

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

--- trunk/test/CTestTestfile.cmake
+++ trunk/test/CTestTestfile.cmake
@@ -7,13 +7,23 @@
 #    The unique name of the test ( eg.: testname1 )
 #    The full path to the executable of the test ( eg.: "$ENV{HOME}/bin/TEST_EXECUTABLE_1.sh" )
 #    A List of arguments to the executable ( eg.: "ARGUMENT_1" "ARGUMENT_2" etc. )
-
-
+
 # basic test (just for sample) check that binary directory is readable
 #ADD_TEST(LS_BINARY_PATH "ls" "-all")
 #ADD_TEST(PWD_BINARY_PATH "pwd")

+
+
 ## -- Other Tests : Place a file named DartTestfile.txt in path with tests.
+
+# If you want to run only test in your developpement machine locallly you can run (on bash shell) this command in this directory
+# LOCAL_TEST=TRUE ctest
+IF($ENV{LOCAL_TEST} MATCHES TRUE)
+	set(OV_ROOT_DIR              "$ENV{PWD}/..")
+	set(CTEST_SOURCE_DIRECTORY		"${OV_ROOT_DIR}")
+	set($ENV{OV_BINARY_PATH} "${OV_ROOT_DIR}/dist")
+	message("running local test here= $ENV{OV_BINARY_PATH}")
+ENDIF($ENV{LOCAL_TEST} MATCHES TRUE)

 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-plugins/acquisition/trunc/test")
@@ -57,65 +67,8 @@
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-applications/acquisition-server/trunc/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-documentation/trunc/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe/tags/wip-omk4/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe/trunc/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-toolkit/trunc/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-scenarios/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/acquisition/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/turbofieldtrip/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/tools/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/vrpn/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/stimulation/branches/wip-emaby/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/stimulation/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/feature-extraction/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/classification-gpl/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/signal-processing/branches/wip-emaby/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/signal-processing/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/simple-visualisation/branches/wip-lbonnet-p300/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/simple-visualisation/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/file-io/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/samples/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/examples/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/classification/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/stream-codecs/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/python/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/streaming/branches/wip-emaby/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/streaming/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/signal-processing-gpl/branches/wip-emaby/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/signal-processing-gpl/branches/wip-acellard-ARFeatures/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/signal-processing-gpl/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/matlab/branches/wip-lbonnet-matlabdll/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-plugins/matlab/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/id-generator/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/external-stimulation-connection-example/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/designer/tags/wip-omk4/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/designer/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/ssvep-demo/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/skeleton-generator/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/vr-demo/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/vrpn-simulator/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/plugin-inspector/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/acquisition-server/branches/wip-lbonnet-micromed/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/acquisition-server/branches/wip-lbonnet-gtec/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/acquisition-server/branches/wip-emaby/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/acquisition-server/branches/wip-jfruitet/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-applications/acquisition-server/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-documentation/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe/tags/wip-omk4/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-toolkit/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-scenarios/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-kernel-omk/tags/wip-omk4/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-kernel-omk/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/xml/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/automaton/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/stream/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/ebml/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/socket/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/fs/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/openvibe-modules/system/trunc/test")
-SUBDIRS("${CTEST_SOURCE_DIRECTORY}/test/trunk/scripts/software/tmp/vrpn/java_vrpn/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-kernel-omk/tags/wip-omk4/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-kernel-omk/trunc/test")
 SUBDIRS("${CTEST_SOURCE_DIRECTORY}/openvibe-modules/xml/trunc/test")


Always using the convex decomposition stub for now.

--- indra/cmake/LLConvexDecomposition.cmake
+++ indra/cmake/LLConvexDecomposition.cmake
@@ -3,10 +3,10 @@

 set(LLCONVEXDECOMP_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)

-if (INSTALL_PROPRIETARY AND NOT STANDALONE)
-  use_prebuilt_binary(llconvexdecomposition)
-  set(LLCONVEXDECOMP_LIBRARY llconvexdecomposition)
-else (INSTALL_PROPRIETARY AND NOT STANDALONE)
+# if (INSTALL_PROPRIETARY AND NOT STANDALONE)
+#   use_prebuilt_binary(llconvexdecomposition)
+#   set(LLCONVEXDECOMP_LIBRARY llconvexdecomposition)
+# else (INSTALL_PROPRIETARY AND NOT STANDALONE)
   use_prebuilt_binary(llconvexdecompositionstub)
   set(LLCONVEXDECOMP_LIBRARY llconvexdecompositionstub)
-endif (INSTALL_PROPRIETARY AND NOT STANDALONE)
+# endif (INSTALL_PROPRIETARY AND NOT STANDALONE)


flags/gold: modify C flags too

flags/gold: modify C flags too

--- flags/gold.cmake
+++ flags/gold.cmake
@@ -10,3 +10,4 @@
 include(polly_add_cache_flag)

 polly_add_cache_flag(CMAKE_CXX_FLAGS "-fuse-ld=gold")
+polly_add_cache_flag(CMAKE_C_FLAGS "-fuse-ld=gold")


SWD-168
removed some additional messages

git-svn-id: ffa0477179a225c7c90b98ebb17cced7db4a2d00@349 3149698f-976c-419d-aa71-eec1decff2c2

--- extensions/FindMatlab.cmake
+++ extensions/FindMatlab.cmake
@@ -573,9 +573,8 @@
         OUTPUT_NAME ${${prefix}_OUTPUT_NAME}
         SUFFIX ".${Matlab_MEX_EXTENSION}")

-  message(STATUS "Documentaiton file ${${prefix}_DOCUMENTATION} -- BEFORE")
+
   if(NOT ${${prefix}_DOCUMENTATION} STREQUAL "")
-    message(STATUS "Documentaiton file ${${prefix}_DOCUMENTATION}")
     get_target_property(output_name ${${prefix}_NAME} OUTPUT_NAME)
     add_custom_command(
       TARGET ${${prefix}_NAME}


add new freetype versions into CMake script

--- CMake/Packages/FindFreetype.cmake
+++ CMake/Packages/FindFreetype.cmake
@@ -22,7 +22,7 @@
   FREETYPE_INCLUDE_DIR
 )

-set(FREETYPE_LIBRARY_NAMES freetype2410 freetype249 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
+set(FREETYPE_LIBRARY_NAMES freetype2412 freetype2411 freetype2410 freetype249 freetype2311 freetype239 freetype238 freetype235 freetype219 freetype)
 get_debug_names(FREETYPE_LIBRARY_NAMES)

 use_pkgconfig(FREETYPE_PKGC freetype2)


[cmake] Allow testing against installed LLVM with no sources

Adjust the stand-alone build files to accept either CMake files from
LLVM_CMAKE_PATH or from LLVM_MAIN_SRC_DIR instead of requiring both.
This makes it possible to run libcxx tests on top of installed LLVM
and lit, without having to unpack a copy of LLVM sources. Furthermore,
it avoids adding duplicate paths.

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

git-svn-id: 756ef344af921d95d562d9e9f9389127a89a6314@284583 91177308-0d34-0410-b5e6-96231b3b80d8

--- cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -43,20 +43,15 @@
     return()
   endif()

-  if (NOT EXISTS ${LLVM_MAIN_SRC_DIR})
+  if (EXISTS "${LLVM_CMAKE_PATH}")
+    list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
+  elseif (EXISTS "${LLVM_MAIN_SRC_DIR}/cmake/modules")
+    list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
+  else()
     set(LLVM_FOUND OFF)
-    message(WARNING "Not found: ${LLVM_MAIN_SRC_DIR}")
+    message(WARNING "Neither ${LLVM_CMAKE_PATH} nor ${LLVM_MAIN_SRC_DIR}/cmake/modules found")
     return()
   endif()
-
-  if(NOT EXISTS ${LLVM_CMAKE_PATH})
-    set(LLVM_FOUND OFF)
-    message(WARNING "Not found: ${LLVM_CMAKE_PATH}")
-    return()
-  endif()
-
-  list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
-  list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")

   set(LLVM_FOUND ON)
 endmacro(find_llvm_parts)


Add CPU specific flags to other hc12 targets too

--- toolchain/Platform/Generic-chc12-hc12.cmake
+++ toolchain/Platform/Generic-chc12-hc12.cmake
@@ -37,8 +37,10 @@

 IF (${HC12_CORE} STREQUAL "HC12")
     SET (HC12_CORE_LETTER "")
+    SET (CMAKE_C_FLAGS_INIT    "${CMAKE_C_FLAGS_INIT} -CpuHC12")
 ELSEIF (${HC12_CORE} STREQUAL "HCS12")
     SET (HC12_CORE_LETTER "")
+    SET (CMAKE_C_FLAGS_INIT    "${CMAKE_C_FLAGS_INIT} -CpuHCS12")
 ELSEIF (${HC12_CORE} STREQUAL "HCS12X")
     SET (HC12_CORE_LETTER     "x")
     SET (CMAKE_C_FLAGS_INIT    "${CMAKE_C_FLAGS_INIT} -CpuHCS12X")


From Laurens Voerman, "attached is a zip with a modified version of:
OpenSceneGraph\CMakeModules\FindFBX.cmake

This version can find fbx sdk 2015.1 and will prefer it over older versions.

Tested with Visual Studio Express 2013 on 64bit windows 7"

git-svn-id: aa838dfc23441284dd616281de4245daec5d2135@14782 16af8721-9629-0410-8352-f15c8da7e697

--- CMakeModules/FindFBX.cmake
+++ CMakeModules/FindFBX.cmake
@@ -34,6 +34,8 @@
     SET(FBX_LIBDIR ${FBX_LIBDIR}/x86)
 ENDIF()

+#try to use 2015.1 or 2014.2 version
+
 IF(APPLE)
     SET(FBX_LIBNAME "libfbxsdk")
 ELSEIF(CMAKE_COMPILER_IS_GNUCXX)
@@ -46,10 +48,15 @@

 SET( FBX_SEARCH_PATHS
     $ENV{FBX_DIR}
+    "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2015.1"
+    "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2015.1"
+    /Applications/Autodesk/FBXSDK20151
     "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2014.2"
     "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2014.2"
+    /Applications/Autodesk/FBXSDK20142
     /Applications/Autodesk/FBXSDK20141
 )
+#I think the last line in the search path is an old typo, but let's search for 2014.1 anyway - LV

 # search for headers & debug/release libraries
 FIND_PATH(FBX_INCLUDE_DIR "fbxsdk.h"


make CMake config search path file-relative

--- mpt-config.cmake
+++ mpt-config.cmake
@@ -61,7 +61,7 @@
     endif()
     # local build definition
     if(NOT Mpt_${_up})
-      find_path(Mpt_${_up} "CMakeLists.txt" PATH "${CMAKE_CURRENT_SOURCE_DIR}/mpt${_comp}" NO_DEFAULT_PATH)
+      find_path(Mpt_${_up} "CMakeLists.txt" PATH "${CMAKE_CURRENT_LIST_DIR}/mpt${_comp}" NO_DEFAULT_PATH)
     endif()
     # remote build definition
     if(NOT Mpt_${_up})


fix compile error by unrecognised -Wmaybe-uninitialised

--- cmake/ElektraCompiling.cmake
+++ cmake/ElektraCompiling.cmake
@@ -84,7 +84,7 @@
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wformat-security")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wshadow")
 set (COMMON_FLAGS "${COMMON_FLAGS} -Wcomments -Wtrigraphs -Wundef")
-set (COMMON_FLAGS "${COMMON_FLAGS} -Wuninitialized -Winit-self -Wmaybe-uninitialized")
+set (COMMON_FLAGS "${COMMON_FLAGS} -Wuninitialized -Winit-self")

 #set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--unresolved-symbols=ignore-in-shared-libs")


If version cannot be determined, set it to v0.0.0 (#4371)

Co-authored-by: aslepko <9e299a1527b0bd3517f664f5453026effb78217d@users.noreply.github.com>

--- cmake/Modules/git_tags.cmake
+++ cmake/Modules/git_tags.cmake
@@ -85,7 +85,7 @@
             set(NGRAPH_VERSION_LABEL "${NGRAPH_MOST_RECENT_RELEASE_TAG}+${HASH}" PARENT_SCOPE)
         else()
             if(HASH)
-                set(NGRAPH_VERSION_LABEL "?.?.?+${HASH}" PARENT_SCOPE)
+                set(NGRAPH_VERSION_LABEL "v0.0.0+${HASH}" PARENT_SCOPE)
             else()
                 # Not in a git repo
                 file(READ ${CMAKE_CURRENT_SOURCE_DIR}/TAG NGRAPH_TAG)


fix CUDA 5.5 support (npp, arm cross compilation) in CMake scripts:

The patch was submitted to CMake and might be available
in the next CMake release.

But until we have the fix in CMake we should add workaround in our scripts.

--- cmake/OpenCVDetectCUDA.cmake
+++ cmake/OpenCVDetectCUDA.cmake
@@ -13,7 +13,7 @@
   return()
 endif()

-find_package(CUDA 4.2 QUIET)
+find_host_package(CUDA 4.2 QUIET)

 if(CUDA_FOUND)
   set(HAVE_CUDA 1)
@@ -26,49 +26,188 @@
     set(HAVE_CUBLAS 1)
   endif()

-  if(${CUDA_VERSION} VERSION_LESS "5.5")
-    find_cuda_helper_libs(npp)
+  ##############################################################################################
+  # Hack for CUDA >5.5 support
+  #
+  # The patch was submitted to CMake and might be available
+  # in the next CMake release.
+  #
+  # In the future we should check CMake version here, like
+  # if(CMAKE_VERSION VERSION_LESS "2.8.13")
+
+  set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+  set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+  set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+
+  if(NOT "${CUDA_TOOLKIT_ROOT_DIR}" STREQUAL "${OPENCV_CUDA_TOOLKIT_ROOT_DIR_INTERNAL}")
+    unset(CUDA_TOOLKIT_TARGET_DIR CACHE)
+  endif()
+
+  if(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND ${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
+    set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf" CACHE PATH "Toolkit target location.")
   else()
-    # hack for CUDA 5.5
-    if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm")
-      unset(CUDA_TOOLKIT_INCLUDE CACHE)
-      unset(CUDA_CUDART_LIBRARY CACHE)
-      unset(CUDA_cublas_LIBRARY CACHE)
-      unset(CUDA_cufft_LIBRARY CACHE)
-      unset(CUDA_npp_LIBRARY CACHE)
-
-      if(SOFTFP)
-        set(cuda_arm_path "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabi")
-      else()
-        set(cuda_arm_path "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
-      endif()
-
-      set(CUDA_TOOLKIT_INCLUDE "${cuda_arm_path}/include" CACHE PATH "include path")
-      set(CUDA_INCLUDE_DIRS ${CUDA_TOOLKIT_INCLUDE})
-
-      set(cuda_arm_library_path "${cuda_arm_path}/lib")
-
-      set(CUDA_CUDART_LIBRARY "${cuda_arm_library_path}/libcudart.so" CACHE FILEPATH "cudart library")
-      set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
-      set(CUDA_cublas_LIBRARY "${cuda_arm_library_path}/libcublas.so" CACHE FILEPATH "cublas library")
-      set(CUDA_cufft_LIBRARY "${cuda_arm_library_path}/libcufft.so" CACHE FILEPATH "cufft library")
-      set(CUDA_nppc_LIBRARY "${cuda_arm_library_path}/libnppc.so" CACHE FILEPATH "nppc library")
-      set(CUDA_nppi_LIBRARY "${cuda_arm_library_path}/libnppi.so" CACHE FILEPATH "nppi library")
-      set(CUDA_npps_LIBRARY "${cuda_arm_library_path}/libnpps.so" CACHE FILEPATH "npps library")
-      set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}" CACHE STRING "npp library")
-    else()
-      unset(CUDA_npp_LIBRARY CACHE)
-
-      find_cuda_helper_libs(nppc)
-      find_cuda_helper_libs(nppi)
-      find_cuda_helper_libs(npps)
-
-      set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}" CACHE STRING "npp library")
-    endif()
-  endif()
+    set(CUDA_TOOLKIT_TARGET_DIR "${CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "Toolkit target location.")
+  endif()
+
+  if(NOT "${CUDA_TOOLKIT_TARGET_DIR}" STREQUAL "${OPENCV_CUDA_TOOLKIT_TARGET_DIR_INTERNAL}")
+    unset(CUDA_TOOLKIT_INCLUDE CACHE)
+    unset(CUDA_CUDART_LIBRARY CACHE)
+    unset(CUDA_CUDA_LIBRARY CACHE)
+    unset(CUDA_cupti_LIBRARY CACHE)
+    unset(CUDA_cublas_LIBRARY CACHE)
+    unset(CUDA_cublasemu_LIBRARY CACHE)
+    unset(CUDA_cufft_LIBRARY CACHE)
+    unset(CUDA_cufftemu_LIBRARY CACHE)
+    unset(CUDA_curand_LIBRARY CACHE)
+    unset(CUDA_cusparse_LIBRARY CACHE)
+    unset(CUDA_npp_LIBRARY CACHE)
+    unset(CUDA_nppc_LIBRARY CACHE)
+    unset(CUDA_nppi_LIBRARY CACHE)
+    unset(CUDA_npps_LIBRARY CACHE)
+    unset(CUDA_nvcuvenc_LIBRARY CACHE)
+    unset(CUDA_nvcuvid_LIBRARY CACHE)
+  endif()
+
+  # CUDA_TOOLKIT_INCLUDE
+  find_path(CUDA_TOOLKIT_INCLUDE
+    device_functions.h # Header included in toolkit
+    PATHS "${CUDA_TOOLKIT_TARGET_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}"
+    ENV CUDA_PATH
+    ENV CUDA_INC_PATH
+    PATH_SUFFIXES include
+    NO_DEFAULT_PATH
+  )
+
+  # Search default search paths, after we search our own set of paths.
+  find_path(CUDA_TOOLKIT_INCLUDE device_functions.h)
+  mark_as_advanced(CUDA_TOOLKIT_INCLUDE)
+
+  macro(opencv_cuda_find_library_local_first_with_path_ext _var _names _doc _path_ext)
+    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      # CUDA 3.2+ on Windows moved the library directories, so we need the new
+      # and old paths.
+      set(_cuda_64bit_lib_dir "${_path_ext}lib/x64" "${_path_ext}lib64" "${_path_ext}libx64" )
+    endif()
+    # CUDA 3.2+ on Windows moved the library directories, so we need to new
+    # (lib/Win32) and the old path (lib).
+    find_library(${_var}
+      NAMES ${_names}
+      PATHS "${CUDA_TOOLKIT_TARGET_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}"
+      ENV CUDA_PATH
+      ENV CUDA_LIB_PATH
+      PATH_SUFFIXES ${_cuda_64bit_lib_dir} "${_path_ext}lib/Win32" "${_path_ext}lib" "${_path_ext}libWin32"
+      DOC ${_doc}
+      NO_DEFAULT_PATH
+    )
+    # Search default search paths, after we search our own set of paths.
+    find_library(${_var} NAMES ${_names} DOC ${_doc})
+  endmacro()
+
+  macro(opencv_cuda_find_library_local_first _var _names _doc )
+    opencv_cuda_find_library_local_first_with_path_ext( "${_var}" "${_names}" "${_doc}" "" )
+  endmacro()
+
+  macro(opencv_find_library_local_first _var _names _doc )
+    opencv_cuda_find_library_local_first( "${_var}" "${_names}" "${_doc}" "" )
+  endmacro()
+
+  # CUDA_LIBRARIES
+  opencv_cuda_find_library_local_first(CUDA_CUDART_LIBRARY cudart "\"cudart\" library")
+  if(CUDA_VERSION VERSION_EQUAL "3.0")
+    # The cudartemu library only existed for the 3.0 version of CUDA.
+    opencv_cuda_find_library_local_first(CUDA_CUDARTEMU_LIBRARY cudartemu "\"cudartemu\" library")
+    mark_as_advanced(
+      CUDA_CUDARTEMU_LIBRARY
+    )
+  endif()
+
+  # CUPTI library showed up in cuda toolkit 4.0
+  if(NOT CUDA_VERSION VERSION_LESS "4.0")
+    opencv_cuda_find_library_local_first_with_path_ext(CUDA_cupti_LIBRARY cupti "\"cupti\" library" "extras/CUPTI/")
+    mark_as_advanced(CUDA_cupti_LIBRARY)
+  endif()
+
+  # If we are using emulation mode and we found the cudartemu library then use
+  # that one instead of cudart.
+  if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
+    set(CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY})
+  else()
+    set(CUDA_LIBRARIES ${CUDA_CUDART_LIBRARY})
+  endif()
+  if(APPLE)
+    # We need to add the path to cudart to the linker using rpath, since the
+    # library name for the cuda libraries is prepended with @rpath.
+    if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
+      get_filename_component(_cuda_path_to_cudart "${CUDA_CUDARTEMU_LIBRARY}" PATH)
+    else()
+      get_filename_component(_cuda_path_to_cudart "${CUDA_CUDART_LIBRARY}" PATH)
+    endif()
+    if(_cuda_path_to_cudart)
+      list(APPEND CUDA_LIBRARIES -Wl,-rpath "-Wl,${_cuda_path_to_cudart}")
+    endif()
+  endif()
+
+  # 1.1 toolkit on linux doesn't appear to have a separate library on
+  # some platforms.
+  opencv_cuda_find_library_local_first(CUDA_CUDA_LIBRARY cuda "\"cuda\" library (older versions only).")
+
+  mark_as_advanced(
+    CUDA_CUDA_LIBRARY
+    CUDA_CUDART_LIBRARY
+  )
+
+  #######################
+  # Look for some of the toolkit helper libraries
+  macro(OPENCV_FIND_CUDA_HELPER_LIBS _name)
+    opencv_cuda_find_library_local_first(CUDA_${_name}_LIBRARY ${_name} "\"${_name}\" library")
+    mark_as_advanced(CUDA_${_name}_LIBRARY)
+  endmacro()
+
+  # Search for additional CUDA toolkit libraries.
+  if(CUDA_VERSION VERSION_LESS "3.1")
+    # Emulation libraries aren't available in version 3.1 onward.
+    opencv_find_cuda_helper_libs(cufftemu)
+    opencv_find_cuda_helper_libs(cublasemu)
+  endif()
+  opencv_find_cuda_helper_libs(cufft)
+  opencv_find_cuda_helper_libs(cublas)
+  if(NOT CUDA_VERSION VERSION_LESS "3.2")
+    # cusparse showed up in version 3.2
+    opencv_find_cuda_helper_libs(cusparse)
+    opencv_find_cuda_helper_libs(curand)
+    if (WIN32)
+      opencv_find_cuda_helper_libs(nvcuvenc)
+      opencv_find_cuda_helper_libs(nvcuvid)
+    endif()
+  endif()
+  if(CUDA_VERSION VERSION_GREATER "5.0")
+    # In CUDA 5.5 NPP was splitted onto 3 separate libraries.
+    opencv_find_cuda_helper_libs(nppc)
+    opencv_find_cuda_helper_libs(nppi)
+    opencv_find_cuda_helper_libs(npps)
+    set(CUDA_npp_LIBRARY "${CUDA_nppc_LIBRARY};${CUDA_nppi_LIBRARY};${CUDA_npps_LIBRARY}")
+  elseif(NOT CUDA_VERSION VERSION_LESS "4.0")
+    opencv_find_cuda_helper_libs(npp)
+  endif()
+
+  if(CUDA_BUILD_EMULATION)
+    set(CUDA_CUFFT_LIBRARIES ${CUDA_cufftemu_LIBRARY})
+    set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublasemu_LIBRARY})
+  else()
+    set(CUDA_CUFFT_LIBRARIES ${CUDA_cufft_LIBRARY})
+    set(CUDA_CUBLAS_LIBRARIES ${CUDA_cublas_LIBRARY})
+  endif()
+
+  set(OPENCV_CUDA_TOOLKIT_ROOT_DIR_INTERNAL "${CUDA_TOOLKIT_ROOT_DIR}" CACHE INTERNAL
+    "This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was set successfully." FORCE)
+  set(OPENCV_CUDA_TOOLKIT_TARGET_DIR_INTERNAL "${CUDA_TOOLKIT_TARGET_DIR}" CACHE INTERNAL
+    "This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was set successfully." FORCE)
+
+  # Hack for CUDA >5.5 support
+  ##############################################################################################

   if(WITH_NVCUVID)
-    find_cuda_helper_libs(nvcuvid)
+    opencv_find_cuda_helper_libs(nvcuvid)
     set(HAVE_NVCUVID 1)
   endif()


cmake: Avoid adding default path as system directory for GCC 6.x

This is a completion for PR #7390 and fixes #6517 and #815.

--- cmake/OpenCVPCHSupport.cmake
+++ cmake/OpenCVPCHSupport.cmake
@@ -65,6 +65,9 @@
         ocv_is_opencv_directory(__result ${item})
         if(__result)
           LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
+        elseif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
+               item MATCHES "/usr/include$")
+          # workaround for GCC 6.x bug
         else()
           LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
         endif()
@@ -75,6 +78,9 @@
         ocv_is_opencv_directory(__result ${item})
         if(__result)
           LIST(APPEND ${_out_compile_flags} "${_PCH_include_prefix}\"${item}\"")
+        elseif(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND
+               item MATCHES "/usr/include$")
+          # workaround for GCC 6.x bug
         else()
           LIST(APPEND ${_out_compile_flags} "${_PCH_isystem_prefix}\"${item}\"")
         endif()


Working on includes for libraries.

Working on includes for libraries.

--- cmake/Platform/Arduino.cmake
+++ cmake/Platform/Arduino.cmake
@@ -490,18 +490,23 @@

             get_arduino_flags(ARDUINO_LINKER_FLAGS ARDUINO_COMPILE_FLAGS ${BOARD_ID})

-            set_target_properties(${TARGET_LIB_NAME} PROPERTIES
-                COMPILE_FLAGS "${ARDUINO_COMPILE_FLAGS} -I${LIB_PATH} -I${LIB_PATH}/utility"
-                LINK_FLAGS "${ARDUINO_LINKER_FLAGS}")
-
             find_arduino_libraries(LIB_DEPS "${LIB_SRCS}")
+
+            set(LIB_DEP_INCLUDES)
+
             foreach(LIB_DEP ${LIB_DEPS})
+                set(LIB_DEP_INCLUDES "${LIB_DEP_INCLUDES} -I${LIB_DEP}")
                 setup_arduino_library(DEP_LIB_SRCS ${BOARD_ID} ${LIB_DEP})
                 list(APPEND LIB_TARGETS ${DEP_LIB_SRCS})
             endforeach()

+            set_target_properties(${TARGET_LIB_NAME} PROPERTIES
+                COMPILE_FLAGS "${ARDUINO_COMPILE_FLAGS} -I${LIB_PATH} -I${LIB_PATH}/utility ${LIB_DEP_INCLUDES}"
+                LINK_FLAGS "${ARDUINO_LINKER_FLAGS}")
+
             target_link_libraries(${TARGET_LIB_NAME} ${BOARD_ID}_CORE ${LIB_TARGETS})
             list(APPEND LIB_TARGETS ${TARGET_LIB_NAME})
+
         endif()
     else()
         # Target already exists, skiping creating


Fix Ldap include path in cmake find module.

Change-Id: I877475e7f2b4888a712c3aef5bd207e35046afb1
Reviewed-on: http://gerrit.sjc.cloudera.com:8080/3865
Reviewed-by: Nong Li <99a5e5f8f5911755b88e0b536d46aafa102bed41@cloudera.com>
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
Tested-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>

--- cmake_modules/FindLdap.cmake
+++ cmake_modules/FindLdap.cmake
@@ -13,7 +13,7 @@
 )

 set(LDAP_INCLUDE_DIR
-  ${THIRDPARTY_LDAP}/install/include
+  ${THIRDPARTY_LDAP}/impala_install/include
 )

 find_library(LDAP_LIB_PATH NAMES ldap


Updating ITK tag along 4.6.0 release

Updating ITK tag along 4.6.0 release

Change-Id: I9a8591db4e61a79246be742704344736c97c63ce

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,8 @@
 set(ITK_REPOSITORY git://itk.org/ITK.git)

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG v4.6rc03)
+# This tag is expected to be the v4.6.0 tag
+set(ITK_TAG_COMMAND GIT_TAG 3d95bcf22e141e64fae2ba8e48104bc467230412 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )


Update the ITK superbuild version along release-4.13

This update to ITK include a critical fix to the LBFGS2 optimizer.

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -52,7 +52,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(ITK_GIT_TAG " 0d52c43179b3a72340788ee883b27a8c5e716f68" CACHE
+set(ITK_GIT_TAG "4cfd25bee7a590244bd28155e37640fe55ec4181" CACHE
   STRING "Tag in ITK git repo") # release-4.13
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Update ITK Superbuild version along RC

Update ITK Superbuild version along RC

This update contains several warnings fixes for compilers.

Change-Id: I2162450c3ba8eb405b6f3f4b17c141412fcd84a6

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -35,7 +35,7 @@
 set(ITK_REPOSITORY "${git_protocol}://itk.org/ITK.git")

 # NOTE: it is very important to update the ITK_DIR path with the ITK version
-set(ITK_TAG_COMMAND GIT_TAG  v4.10rc02 )
+set(ITK_TAG_COMMAND GIT_TAG  c29756e1dbb0afbb991ad2f399658d754035d225 )

 if( ${ITK_WRAPPING} OR ${BUILD_SHARED_LIBS} )
   set( ITK_BUILD_SHARED_LIBS ON )


New version: 0.4.5

New version: 0.4.5

--- hawkey/VERSION.cmake
+++ hawkey/VERSION.cmake
@@ -1,3 +1,3 @@
 SET(HAWKEY_MAJOR "0")
 SET(HAWKEY_MINOR "4")
-SET(HAWKEY_PATCH "4")
+SET(HAWKEY_PATCH "5")


Reverted previous change.

Reverted previous change.

--- run_ctest.cmake
+++ run_ctest.cmake
@@ -243,6 +243,7 @@
     ctest_test()
     ctest_memcheck()
     ctest_submit(PARTS Start Update Configure Build Test MemCheck Upload Submit)
+    set(CTEST_MEMORYCHECK_COMMAND "")
     set(CTEST_MEMORYCHECK_COMMAND_OPTIONS "")
 endif()


fix typos

fix typos

--- utilities/cmake/setup_test_case.macro.cmake
+++ utilities/cmake/setup_test_case.macro.cmake
@@ -39,13 +39,13 @@
       ${_input_file_list_full}
       # Remove dependency on the project main target to avoid race condition
       # in parallel testing.
-      # Always build the excutable before run cTest.
+      # Always build the executable before run cTest.
       # ${PRJ_NAME}
       ${_extra_depends_for_output}
     VERBATIM
     )

-  # Bring ${_comparison_file} into ${_test_directory} for possible manuel comparision.
+  # Bring ${_comparison_file} into ${_test_directory} for possible manual comparison.
     ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/${_comparison_file}
     COMMAND  ${_exec_copy}  ${_para_copy} ${_test_src_directory}/${_comparison_file} ${_test_directory}/${_comparison_file}
     WORKING_DIRECTORY
@@ -66,7 +66,7 @@

   # Finally add test target. This will be invoked by the ctest command.
   ADD_TEST(NAME ${_test_name}
-    # The next command is equavalent to run 'make diff_${_test_name}' inside
+    # The next command is equivalent to run 'make diff_${_test_name}' inside
     # ${CMAKE_BINARY_DIR}.
     COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target diff_${_test_name}
     WORKING_DIRECTORY ${_test_directory}


Install ressources according to OGRE_LIB_DIRECTORY .

--HG--
branch : v1-7

--- CMake/InstallResources.cmake
+++ CMake/InstallResources.cmake
@@ -46,10 +46,10 @@
   set(OGRE_MEDIA_PATH "share/OGRE/media")
   set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
   set(OGRE_MEDIA_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
-  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/lib/OGRE")
-  set(OGRE_PLUGIN_DIR_DBG "${CMAKE_INSTALL_PREFIX}/lib/OGRE")
-  set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/lib/OGRE/Samples")
-  set(OGRE_SAMPLES_DIR_DBG "${CMAKE_INSTALL_PREFIX}/lib/OGRE/Samples")
+  set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
+  set(OGRE_PLUGIN_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE")
+  set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
+  set(OGRE_SAMPLES_DIR_DBG "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
   set(OGRE_CFG_INSTALL_PATH "share/OGRE")
 endif ()


COMP: Hierarchy file rebuild independent of library rebuild.

--- CMake/vtkWrapHierarchy.cmake
+++ CMake/vtkWrapHierarchy.cmake
@@ -114,6 +114,14 @@
     ARGS
     "-E" "touch" "${quote}${OUTPUT_DIR}/${TARGET}.target${quote}"
     ${verbatim}
+
+    COMMAND ${VTK_WRAP_HIERARCHY_EXE}
+    ARGS
+    "-o" "${quote}${OUTPUT_DIR}/vtk${KIT}Hierarchy.txt${quote}"
+    "${quote}${OUTPUT_DIR}/${TARGET}.data${quote}"
+    ${OTHER_HIERARCHY_FILES}
+    COMMENT "Hierarchy Wrapping - generating vtk${KIT}Hierarchy.txt"
+    ${verbatim}
     )

 ENDMACRO(VTK_WRAP_HIERARCHY)


[FIX] Build System: fixed a typo

[FIX] Build System: fixed a typo

--- util/travis/linux-cibuild.cmake
+++ util/travis/linux-cibuild.cmake
@@ -11,8 +11,7 @@
 message(STATUS "CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}")

 # create cache
-set(INITIAL_CACHE "CMAKE_BUILD_TYPE=Release")
-SEQAN_TRAVIS_BUILD:BOOL=ON")
+set(INITIAL_CACHE "CMAKE_BUILD_TYPE=Release SEQAN_TRAVIS_BUILD:BOOL=ON")
 file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" ${INITIAL_CACHE})

 # customize reporting of errors in CDash


BUG: Added DICOMParser's build directory.

--- itkIncludeDirectories.cmake
+++ itkIncludeDirectories.cmake
@@ -34,6 +34,7 @@
   ${ITK_SOURCE_DIR}/Code/SpatialObject
   ${ITK_SOURCE_DIR}/Utilities/MetaIO
   ${ITK_SOURCE_DIR}/Utilities/DICOMParser
+  ${ITK_BINARY_DIR}/Utilities/DICOMParser
   ${ITK_BINARY_DIR}/Utilities/expat
   ${ITK_SOURCE_DIR}/Utilities/expat
   ${ITK_BINARY_DIR}/Utilities


Updating ITK Superbuild along release-4.13 branch

$ git log 3213404416666c17dbabc8fb0a07f1d27362f32c..upstream/release-4.13 --format="%C(auto) %h %s"
 28fd1cb66a Merge pull request #1400 from blowekamp/FixGDCMHeapOverflowForRelease4.13
 5df152b4c3 BUG: Address buffer overflow with deprecated GDCM1 interface
 f64fdf66b1 Merge pull request #1392 from blowekamp/FixN4MTimeForRelease4.13
 63d148715e BUG: Don't use InsertElement which modifies MTime
 ebaca30f07 Merge pull request #1389 from blowekamp/UpdateGDCMForRelease4.13
 08dc0116fe BUG: update CircleCI configuration with selections from master
 90e6da1ff6 ENH: Update GDCM to latest on the release-2.8 branch
 20f10c2e20 Merge branch 'upstream-GDCM' into UpdateGDCMForRelease4.13
 0353bb40ed GDCM 2019-11-04 (7e3be76f)

--- SuperBuild/External_ITK.cmake
+++ SuperBuild/External_ITK.cmake
@@ -52,7 +52,7 @@
 mark_as_advanced(ITK_GIT_REPOSITORY)
 sitk_legacy_naming(ITK_GIT_REPOSITORY ITK_REPOSITORY)

-set(_DEFAULT_ITK_GIT_TAG "3213404416666c17dbabc8fb0a07f1d27362f32c") # after 4.13.2 along release-4.13
+set(_DEFAULT_ITK_GIT_TAG "28fd1cb66a77441e0a7999128c16e97e1b7291ff") # after 4.13.2 along release-4.13
 set(ITK_GIT_TAG "${_DEFAULT_ITK_GIT_TAG}" CACHE STRING "Tag in ITK git repo")
 mark_as_advanced(ITK_GIT_TAG)
 set(ITK_TAG_COMMAND GIT_TAG "${ITK_GIT_TAG}")


Graph Control 6.0.0-rc4 Release Candidate 4

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


Split off 8.4.28

Split off 8.4.28

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 4 )
-set ( HPCC_POINT 27 )
+set ( HPCC_POINT 29 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


KWSys Nightly Date Stamp

KWSys Nightly Date Stamp

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

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


Create a FEDPKG_PRJ_DIR_GIT if it accidently been cleaned

--- Modules/ManageReleaseFedora.cmake
+++ Modules/ManageReleaseFedora.cmake
@@ -149,7 +149,13 @@

 	SET(FEDPKG_PRJ_DIR "${FEDPKG_DIR}/${PROJECT_NAME}")
 	SET(FEDPKG_PRJ_DIR_GIT "${FEDPKG_PRJ_DIR}/.git/description")
-	SET_PROPERTY(DIRECTORY ${FEDPKG_PRJ_DIR}/.git/ PROPERTY CLEAN_NO_CUSTOM "1")
+	# In case FEDPKG_PRJ_DIR_GIT be clean by "make clean"
+
+	IF(EXISTS  "${FEDPKG_PRJ_DIR}")
+	    IF(NOT EXISTS "${FEDPKG_PRJ_DIR_GIT}")
+		FILE(WRITE ${FEDPKG_PRJ_DIR_GIT} "${PRJ_SUMMARY}")
+	    ENDIF(NOT EXISTS "${FEDPKG_PRJ_DIR_GIT}")
+	ENDIF(EXISTS  "${FEDPKG_PRJ_DIR}")
     ENDIF(NOT _manage_release_fedora_dependencies_missing)

     FUNCTION(RELEASE_ADD_KOJI_BUILD_SCRATCH)
@@ -347,6 +353,7 @@
 		COMMAND ${FEDPKG_CMD} clone ${PROJECT_NAME}
 		WORKING_DIRECTORY ${FEDPKG_DIR}
 		COMMENT "fedpkg clone ${PROJECT_NAME}"
+		VERBATIM
 		)

 	    # NVRD: Name-Version-Release-Dist


set ikos version number

set ikos version number

--- cmake/FindIKOS.cmake
+++ cmake/FindIKOS.cmake
@@ -8,4 +8,11 @@

   find_package_handle_standard_args(IKOS REQUIRED_VARS IKOS_INCLUDE_DIR IKOS_DBM_LIB)
   mark_as_advanced(IKOS_ROOT IKOS_INCLUDE_DIR IKOS_DBM_LIB)
+  # start from 1 to make cmakedefine happy
+  set (IKOS_MAJOR_VERSION 1)
+  if (EXISTS ${IKOS_ROOT}/lib/dbm/dbm.cpp)
+    set (IKOS_MINOR_VERSION 1)
+  else()
+    set (IKOS_MINOR_VERSION 2)
+  endif()
 endif()


FindOgre.cmake: take into consideration that VC9 has $(ConfigurationName) VS env var, but VC10 and onwards has $(Configuration) VS env var instead.

--- cmake/FindOgre.cmake
+++ cmake/FindOgre.cmake
@@ -104,8 +104,10 @@
         link_directories(${OGRE_DIR}/lib)
         if (WIN32)
             include_directories(${OGRE_DIR}/include/OGRE/RenderSystems/Direct3D9)
-            link_directories(${OGRE_DIR}/lib/$(Configuration))
-            link_directories(${OGRE_DIR}/lib/$(Configuration)/opt)
+            # Note: VC9 uses $(ConfigurationName), but #VC10 and onwards uses $(Configuration).
+            # However VC10 seems to able to $(ConfigurationName) also, so use that.
+            link_directories(${OGRE_DIR}/lib/$(ConfigurationName))
+            link_directories(${OGRE_DIR}/lib/$(ConfigurationName)/opt)
         endif()
         message(STATUS "Using Ogre from SDK directory " ${OGRE_DIR})
     else()


cmake: detect libLLVM.so

cmake: detect libLLVM.so

--- cmake/Findllvm.cmake
+++ cmake/Findllvm.cmake
@@ -9,26 +9,32 @@

 find_path(LLVM_C_INCLUDE_DIR NAMES llvm-c/Core.h PATHS /usr/include/llvm-c-3.7/)
 find_path(LLVM_INCLUDE_DIR NAMES llvm/IR/IRBuilder.h PATHS /usr/include/llvm-3.7/)
+set(LLVM_INCLUDE_DIRS ${LLVM_C_INCLUDE_DIR} ${LLVM_INCLUDE_DIR})

-find_program(LLVM_CONFIG_EXE NAMES llvm-config llvm-config-3.7)
+find_library(LLVM_LIBRARY NAMES LLVM)
+if(LLVM_LIBRARY)
+    set(LLVM_LIBRARIES ${LLVM_LIBRARY})
+    set(LLVM_LIBDIRS "")
+else()
+    find_program(LLVM_CONFIG_EXE NAMES llvm-config llvm-config-3.7)

-execute_process(
-    COMMAND ${LLVM_CONFIG_EXE} --libs
-    OUTPUT_VARIABLE LLVM_LIBRARIES
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(
+        COMMAND ${LLVM_CONFIG_EXE} --libs
+        OUTPUT_VARIABLE LLVM_LIBRARIES
+        OUTPUT_STRIP_TRAILING_WHITESPACE)

-execute_process(
-    COMMAND ${LLVM_CONFIG_EXE} --system-libs
-    OUTPUT_VARIABLE LLVM_SYSTEM_LIBS
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(
+        COMMAND ${LLVM_CONFIG_EXE} --system-libs
+        OUTPUT_VARIABLE LLVM_SYSTEM_LIBS
+        OUTPUT_STRIP_TRAILING_WHITESPACE)

-execute_process(
-    COMMAND ${LLVM_CONFIG_EXE} --libdir
-    OUTPUT_VARIABLE LLVM_LIBDIRS
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process(
+        COMMAND ${LLVM_CONFIG_EXE} --libdir
+        OUTPUT_VARIABLE LLVM_LIBDIRS
+        OUTPUT_STRIP_TRAILING_WHITESPACE)

-set(LLVM_INCLUDE_DIRS ${LLVM_C_INCLUDE_DIR} ${LLVM_INCLUDE_DIR})
-set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
+    set(LLVM_LIBRARIES ${LLVM_LIBRARIES} ${LLVM_SYSTEM_LIBS})
+endif()

 include(FindPackageHandleStandardArgs)


Fix order of ufid flags to match canonical order.

--- cmake/bde_ufid.cmake
+++ cmake/bde_ufid.cmake
@@ -608,21 +608,21 @@
     if(NOT UFID)
         if(CMAKE_BUILD_TYPE)
             if(CMAKE_BUILD_TYPE STREQUAL "Release")
-                message(STATUS  "Setting 'Release' to UFID to 'opt_mt_exc'.")
-                set(UFID "opt_mt_exc" CACHE STRING "UFID for the project")
+                message(STATUS  "Setting 'Release' to UFID to 'opt_exc_mt'.")
+                set(UFID "opt_exc_mt" CACHE STRING "UFID for the project")
             endif()
             if(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
-                message(STATUS  "Setting 'RelWithDebInfo' to UFID to 'opt_dbg_mt_exc'.")
-                set(UFID "opt_dbg_mt_exc" CACHE STRING "UFID for the project")
+                message(STATUS  "Setting 'RelWithDebInfo' to UFID to 'opt_dbg_exc_mt'.")
+                set(UFID "opt_dbg_exc_mt" CACHE STRING "UFID for the project")
             endif()
             if(CMAKE_BUILD_TYPE STREQUAL "Debug")
-                message(STATUS  "Setting 'Debug' to UFID to 'dbg_mt_exc'.")
-                set(UFID "dbg_mt_exc" CACHE STRING "UFID for the project")
+                message(STATUS  "Setting 'Debug' to UFID to 'dbg_exc_mt'.")
+                set(UFID "dbg_exc_mt" CACHE STRING "UFID for the project")
             endif()
         else()
             message(WARNING "Nor CMAKE_BUILD_TYPE nor UFID is defined.")
-            message(STATUS  "Setting default UFID to 'opt_mt_exc'.")
-            set(UFID "opt_mt_exc" CACHE STRING "UFID for the project")
+            message(STATUS  "Setting default UFID to 'opt_exc_mt'.")
+            set(UFID "opt_exc_mt" CACHE STRING "UFID for the project")
         endif()
     endif()


ios: add CFBundleShortVersionString as required by latest iOS beta

--- cmake/fips_osx.cmake
+++ cmake/fips_osx.cmake
@@ -76,7 +76,9 @@
                 "    <key>CFBundleSignature</key>\n"
                 "    <string>????</string>\n"
                 "    <key>CFBundleVersion</key>\n"
-                "    <string>1.0</string>\n"
+                "    <string>1.0.0</string>\n"
+                "    <key>CFBundleShortVersionString</key>\n"
+                "    <string>1.0.0</string>\n"
                 "    <key>LSRequiresIPhoneOS</key>\n"
                 "    <true/>\n"
                 "    <key>UIStatusBarHidden</key>\n"