Cmake: appleclang fix

Cmake: appleclang fix

--- cmake/compileoptions.cmake
+++ cmake/compileoptions.cmake
@@ -71,6 +71,8 @@
         if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR
             "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
             list(APPEND comp_opts "-Wno-mismatched-tags") # gives lots of warnings about redefinitions of structs as class.
+        #endif()
+        if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang"
             list(APPEND comp_opts "-fsized-deallocation") # see https://github.com/pybind/pybind11/issues/1604
         endif()


On Windows, the cmake subbuild needs to be passed --config Release for release builds. This is at build time rather than at configure time.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -131,39 +131,42 @@
   message("CMake generator platform: ${CMAKE_GENERATOR_PLATFORM}")
   message("CMake toolchain file: ${CMAKE_TOOLCHAIN_FILE}")

-  set(CMAKE_SUBBUILD_OPTIONS -G "${CMAKE_GENERATOR}")
+  set(CMAKE_SUB_CONFIGURE_OPTIONS -G "${CMAKE_GENERATOR}")
+  set(CMAKE_SUB_BUILD_OPTIONS)

   if (CMAKE_BUILD_TYPE)
     # If Release or Debug were specified, pass it along.
-    set(CMAKE_SUBBUILD_OPTIONS
-        ${CMAKE_SUBBUILD_OPTIONS}
+    set(CMAKE_SUB_CONFIGURE_OPTIONS
+        ${CMAKE_SUB_CONFIGURE_OPTIONS}
         -DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}")
   endif()

   if(APPLE)
     # Propagate MacOS build flags.
     if(CMAKE_OSX_ARCHITECTURES)
-      set(CMAKE_SUBBUILD_OPTIONS
-          ${CMAKE_SUBBUILD_OPTIONS}
+      set(CMAKE_SUB_CONFIGURE_OPTIONS
+          ${CMAKE_SUB_CONFIGURE_OPTIONS}
           -DCMAKE_OSX_ARCHITECTURES="${CMAKE_OSX_ARCHITECTURES}")
     endif()
   elseif(MSVC)
     # Propagate MSVC build flags.
-    if(MSVC_RUNTIME_LIBRARY_STATIC)
-      if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+    if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+      set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS} --config Debug)
+      if(MSVC_RUNTIME_LIBRARY_STATIC)
         set(SUBBUILD_MSVC_RUNTIME_FLAG "/MTd")
       else()
-        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MT")
+        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MDd")
       endif()
     else()
-      if (CMAKE_BUILD_TYPE STREQUAL "Debug")
-        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MDd")
-      else()  # build type
+      set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS} --config Release)
+      if(MSVC_RUNTIME_LIBRARY_STATIC)
+        set(SUBBUILD_MSVC_RUNTIME_FLAG "/MT")
+      else()
         set(SUBBUILD_MSVC_RUNTIME_FLAG "/MD")
       endif()
     endif()
-    set(CMAKE_SUBBUILD_OPTIONS
-        ${CMAKE_SUBBUILD_OPTIONS}
+    set(CMAKE_SUB_CONFIGURE_OPTIONS
+        ${CMAKE_SUB_CONFIGURE_OPTIONS}
         -DCMAKE_C_FLAGS=${SUBBUILD_MSVC_RUNTIME_FLAG}
         -DCMAKE_CXX_FLAGS=${SUBBUILD_MSVC_RUNTIME_FLAG}
         -A "${CMAKE_GENERATOR_PLATFORM}")
@@ -174,21 +177,21 @@
     else()
       set(SUBBUILD_USE_CXX11_ABI 1)
     endif()
-    set(CMAKE_SUBBUILD_OPTIONS
-        ${CMAKE_SUBBUILD_OPTIONS}
+    set(CMAKE_SUB_CONFIGURE_OPTIONS
+        ${CMAKE_SUB_CONFIGURE_OPTIONS}
           -DCMAKE_C_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=${SUBBUILD_USE_CXX11_ABI}"
           -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=${SUBBUILD_USE_CXX11_ABI}")
     if(CMAKE_TOOLCHAIN_FILE)
-      set(CMAKE_SUBBUILD_OPTIONS
-          ${CMAKE_SUBBUILD_OPTIONS}
+      set(CMAKE_SUB_CONFIGURE_OPTIONS
+          ${CMAKE_SUB_CONFIGURE_OPTIONS}
           -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE})
     endif()
   endif()
-  message("Sub-build options: ${CMAKE_SUBBUILD_OPTIONS}")
+  message("Sub-build options: ${CMAKE_SUB_CONFIGURE_OPTIONS}")

   if(NOT ANDROID AND NOT IOS)
     execute_process(
-      COMMAND ${ENV_COMMAND} cmake -DOPENSSL_NO_ASM=TRUE ${CMAKE_SUBBUILD_OPTIONS} ../boringssl/src
+      COMMAND ${ENV_COMMAND} cmake -DOPENSSL_NO_ASM=TRUE ${CMAKE_SUB_CONFIGURE_OPTIONS} ../boringssl/src
       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/src/boringssl-build
       RESULT_VARIABLE boringssl_configure_status
     )
@@ -202,7 +205,7 @@
     endif()

     execute_process(
-      COMMAND ${ENV_COMMAND} cmake --build . --target ssl crypto -- ${cmake_build_args}
+      COMMAND ${ENV_COMMAND} cmake --build . ${CMAKE_SUB_BUILD_OPTIONS} --target ssl crypto -- ${cmake_build_args}
       WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/src/boringssl-build
       RESULT_VARIABLE boringssl_build_status
     )


Remove debug outputs

Remove debug outputs

--- cmake/module/FindAnt.cmake
+++ cmake/module/FindAnt.cmake
@@ -45,12 +45,9 @@
       message( STATUS "Warning, could not run ant -version")
     endif()
   else()
-    message(${var})
     # extract major/minor version and patch level from "ant -version" output
-    #if(var MATCHES "Apache Ant\(TM\) version ([0-9]+\\.[0-9]+\\.[0-9_.]+.*) compiled on .*")
     if(var MATCHES "Apache Ant(.*)version ([0-9]+\\.[0-9]+\\.[0-9_.])(.*)")
       set(Ant_VERSION_STRING "${CMAKE_MATCH_2}")
-      message(${Ant_VERSION_STRING})
     endif()
     string( REGEX REPLACE "([0-9]+).*" "\\1" Ant_VERSION_MAJOR "${Ant_VERSION_STRING}" )
     string( REGEX REPLACE "[0-9]+\\.([0-9]+).*" "\\1" Ant_VERSION_MINOR "${Ant_VERSION_STRING}" )


cmake: qi_create_lib: fix subfolder support

--- cmake/qibuild/target.cmake
+++ cmake/qibuild/target.cmake
@@ -255,26 +255,26 @@
   if (ARG_RESOURCE)
     set_target_properties("${name}" PROPERTIES RESOURCE      "${ARG_RESOURCE}")
   endif()
-
   if (WIN32)
     # always postfix debug lib/bin with _d ...
     set_target_properties("${name}" PROPERTIES DEBUG_POSTFIX "_d")
     # ... and generate libraries and next to executables.
     set_target_properties("${name}"
       PROPERTIES
-        RUNTIME_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${ARG_SUBFOLDER}
-        ARCHIVE_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${ARG_SUBFOLDER}
-        LIBRARY_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${ARG_SUBFOLDER}
+        RUNTIME_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${ARG_SUBFOLDER}"
+        ARCHIVE_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${ARG_SUBFOLDER}"
+        LIBRARY_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${ARG_SUBFOLDER}"
     )
   else()
     set_target_properties("${name}" PROPERTIES
-        ARCHIVE_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${SDK_LIB}/${ARG_SUBFOLDER}
-        LIBRARY_OUTPUT_DIRECTORY ${QI_SDK_DIR}/${SDK_LIB}/${ARG_SUBFOLDER}
+        RUNTIME_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${QI_SDK_LIB}/${ARG_SUBFOLDER}"
+        ARCHIVE_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${QI_SDK_LIB}/${ARG_SUBFOLDER}"
+        LIBRARY_OUTPUT_DIRECTORY "${QI_SDK_DIR}/${QI_SDK_LIB}/${ARG_SUBFOLDER}"
     )
   endif()

   #make install rules
-  qi_install_target("${name}")
+  qi_install_target("${name}" SUBFOLDER "${ARG_SUBFOLDER}")

   if(APPLE)
     set_target_properties("${name}"


Do not enable -fPIC when compiling on Windows (#1280)

Regardless of the compiler, Windows targets do not support -fPIC,
as position independent code is already implicitly enabled. Compiling
simdjson with Clang on Windows will error because -fPIC is an
unsupported option for target 'x86_64-pc-windows-msvc'.

--- cmake/simdjson-flags.cmake
+++ cmake/simdjson-flags.cmake
@@ -89,7 +89,9 @@
   target_compile_options(simdjson-flags INTERFACE  /Zi)
 endif()
 else()
-  target_compile_options(simdjson-internal-flags INTERFACE -fPIC)
+  if(NOT WIN32)
+    target_compile_options(simdjson-internal-flags INTERFACE -fPIC)
+  endif()
   target_compile_options(simdjson-internal-flags INTERFACE -Werror -Wall -Wextra -Weffc++)
   target_compile_options(simdjson-internal-flags INTERFACE -Wsign-compare -Wshadow -Wwrite-strings -Wpointer-arith -Winit-self -Wconversion -Wno-sign-conversion)
 endif()


ENH: change loc of log files

ENH: change loc of log files

--- Utilities/kwsys/kwsysPlatformCxxTests.cmake
+++ Utilities/kwsys/kwsysPlatformCxxTests.cmake
@@ -7,10 +7,10 @@
       COMPILE_DEFINITIONS -DTEST_${var} ${KWSYS_PLATFORM_CXX_TEST_DEFINES}
       OUTPUT_VARIABLE OUTPUT)
     IF(${var}_COMPILED)
-      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeOutput.log
+      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeOutput.log
         "${description} compiled with the following output:\n${OUTPUT}\n\n" APPEND)
     ELSE(${var}_COMPILED)
-      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeError.log
+      WRITE_FILE(${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/CMakeError.log
         "${description} failed to compile with the following output:\n${OUTPUT}\n\n" APPEND)
     ENDIF(${var}_COMPILED)
     IF(${invert} MATCHES INVERT)


no longer installing tbb.dll into lib folder (but only to bin folder)

--- common/cmake/FindTBB.cmake
+++ common/cmake/FindTBB.cmake
@@ -117,7 +117,6 @@

 IF (WIN32)
   INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT examples)
-  INSTALL(PROGRAMS ${TBB_BINDIR}/tbb.dll ${TBB_BINDIR}/tbbmalloc.dll DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
   INSTALL(PROGRAMS ${TBB_LIBDIR}/tbb.lib ${TBB_LIBDIR}/tbbmalloc.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
 ELSEIF (EMBREE_ZIP_MODE)
   IF (APPLE)


cmake: error out if SDC and XDC are provided simultaneously

Signed-off-by: Alessandro Comodi <622632e70fd6771cf2cd943f69e5e51ab66adef8@antmicro.com>

--- common/cmake/devices.cmake
+++ common/cmake/devices.cmake
@@ -1294,6 +1294,9 @@
     if(NOT "${ADD_FPGA_TARGET_INPUT_XDC_FILE}" STREQUAL "")
       add_file_target(FILE ${ADD_FPGA_TARGET_INPUT_XDC_FILE})
     endif()
+    if(NOT "${ADD_FPGA_TARGET_INPUT_SDC_FILE}" STREQUAL "")
+      add_file_target(FILE ${ADD_FPGA_TARGET_INPUT_SDC_FILE})
+    endif()
   endif()

   if(NOT "${ADD_FPGA_TARGET_INPUT_XDC_FILE}" STREQUAL "")
@@ -1439,13 +1442,17 @@
   set(VPR_DEPS "")

   set(SDC_ARG "")
+  if(NOT "${ADD_FPGA_TARGET_INPUT_XDC_FILE}" STREQUAL "" AND
+     NOT "${ADD_FPGA_TARGET_INPUT_SDC_FILE}" STREQUAL "")
+    message(FATAL_ERROR "SDC and XDC constraint files cannot be provided simultaneously!")
+  endif()
+
   if(NOT "${ADD_FPGA_TARGET_INPUT_XDC_FILE}" STREQUAL "")
     append_file_dependency(VPR_DEPS ${OUT_SDC_REL})
     get_file_location(SDC_LOCATION ${OUT_SDC_REL})
     set(SDC_ARG --sdc_file ${SDC_LOCATION})
   endif()

-  # Overrides the SDC if the INPUT_SDC_FILE parameter is set
   if(NOT "${ADD_FPGA_TARGET_INPUT_SDC_FILE}" STREQUAL "")
     append_file_dependency(VPR_DEPS ${ADD_FPGA_TARGET_INPUT_SDC_FILE})
     get_file_location(SDC_LOCATION ${ADD_FPGA_TARGET_INPUT_SDC_FILE})


Use launch_test CMake target as output file basename. (#448)

Signed-off-by: Michel Hidalgo <2c7f9fd20fbeb41ce8894ec4653d66fa7f3b6e1a@ekumenlabs.com>

--- launch_testing_ament_cmake/cmake/add_launch_test.cmake
+++ launch_testing_ament_cmake/cmake/add_launch_test.cmake
@@ -125,7 +125,7 @@
   ament_add_test(
     "${_launch_test_TARGET}"
     COMMAND ${cmd}
-    OUTPUT_FILE "${CMAKE_BINARY_DIR}/launch_test/CHANGEME.txt"
+    OUTPUT_FILE "${CMAKE_BINARY_DIR}/launch_test/${_launch_test_TARGET}.txt"
     RESULT_FILE "${_launch_test_RESULT_FILE}"
     TIMEOUT "${_launch_test_TIMEOUT}"
     ${_launch_test_UNPARSED_ARGUMENTS}


BUG: missing c file

BUG: missing c file

--- Modules/ThirdParty/GDAL/otb-module-init.cmake
+++ Modules/ThirdParty/GDAL/otb-module-init.cmake
@@ -174,7 +174,7 @@
   gdal_try_run(STATUS GDAL_CAN_CREATE_JP2OpenJPEG gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2OpenJPEG)
 endif()

-gdal_try_run(STATUS GDAL_HAS_JP2KAK gdalFormatsTest.c JP2KAK)
+gdal_try_run_c(STATUS GDAL_HAS_JP2KAK gdalFormatsTest.c JP2KAK)
 if (GDAL_HAS_JP2KAK)
   set(JPEG2000_DRIVER_USED "Kakadu")
   gdal_try_run(STATUS GDAL_CAN_CREATE_JP2KAK gdalCreateCopyTest.cxx ${TEMP}/testImage.gtif ${TEMP}/testImage.j2k JP2KAK)


Rectified source code alignment.

Rectified source code alignment.

--- Source/cmake/Modules/Urho3D-CMake-magic.cmake
+++ Source/cmake/Modules/Urho3D-CMake-magic.cmake
@@ -285,7 +285,7 @@
                 set (SYMLINK ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TARGET_NAME}.lnk)
                 add_custom_command (TARGET ${TARGET_NAME} PRE_LINK
                     COMMAND rd \"${SYMLINK}\"
-					COMMAND mklink /D \"${SYMLINK}\" \"$(ProjectDir)$(IntDir)\"
+                    COMMAND mklink /D \"${SYMLINK}\" \"$(ProjectDir)$(IntDir)\"
                     COMMENT "Creating a symbolic link pointing to object file directory")
             else ()
                 file (MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${TARGET_NAME}.dir)


Change a complex while loop to a simple foreach loop

--- CMake/OTBGroups.cmake
+++ CMake/OTBGroups.cmake
@@ -120,13 +120,11 @@
   set( _${group}_on_module_list )
   list( LENGTH _${group}_module_list _num_modules )
   set( _current_module 0 )
-  while( ${_current_module} LESS ${_num_modules} )
-    list( GET _${group}_module_list ${_current_module} _module_name )
-    if( NOT OTB_MODULE_${_module_name}_EXCLUDE_FROM_DEFAULT )
+  foreach(module ${_${group}_module_list})
+    if( NOT OTB_MODULE_${module}_EXCLUDE_FROM_DEFAULT )
       list( APPEND _${group}_on_module_list ${_module_name} )
     endif()
-  math( EXPR _current_module "${_current_module} + 1" )
-  endwhile()
+  endforeach()
 endforeach()

 if("$ENV{DASHBOARD_TEST_FROM_CTEST}" STREQUAL "")


Moved the all warnings flag into just debug builds.

--- CMake/toolchain.cmake
+++ CMake/toolchain.cmake
@@ -17,7 +17,7 @@
 set(YOTTA_FORCE_INCLUDE_FLAG "-include")

 # provide compatibility definitions for compiling with this target: these are
-# definitions that legacy code assumes will be defined.
+# definitions that legacy code assumes will be defined.
 add_definitions("-DTOOLCHAIN_GCC")

 macro(_gcc_not_found progname)
@@ -51,7 +51,12 @@
     set(YOTTA_POSTPROCESS_COMMAND "\"${K_OBJCOPY}\" -O binary YOTTA_CURRENT_EXE_NAME YOTTA_CURRENT_EXE_NAME.bin")

     # set default compilation flags
-    set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra -gstrict-dwarf")
+    IF(CMAKE_BUILD_TYPE MATCHES Debug)
+        set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wall -Wextra -gstrict-dwarf")
+    ELSE()
+        set(_C_FAMILY_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -ffunction-sections -fdata-sections -Wextra -gstrict-dwarf")
+    ENDIF()
+
     set(CMAKE_C_FLAGS_INIT   "${_C_FAMILY_FLAGS_INIT}")
     set(CMAKE_ASM_FLAGS_INIT "-fno-exceptions -fno-unwind-tables -x assembler-with-cpp")
     set(CMAKE_CXX_FLAGS_INIT "--std=gnu++11 ${_C_FAMILY_FLAGS_INIT} -fno-rtti -fno-threadsafe-statics")


Add documentation

Add documentation

--- CppcheckTargets.cmake
+++ CppcheckTargets.cmake
@@ -9,7 +9,8 @@
 # Requires these CMake modules:
 #  Findcppcheck
 #
-# Requires CMake 2.6 or newer (uses the 'function' command)
+# Accepts the following input variables:
+# * CPPCHECK_EXTRA_ARGS for additional command line parameters to cppcheck
 #
 # Original Author:
 # 2009-2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>


Changed from -cuda to -c compilation in FindCuda.cmake

git-svn-id: 9be72bd8b79bf6944680671de68cae08993c9086@1798 fa922fa7-2fde-0310-acd8-f43f465a7996

--- src/CMake/cuda/FindCuda.cmake
+++ src/CMake/cuda/FindCuda.cmake
@@ -84,8 +84,6 @@

 # FindCuda.cmake

-SET(CMAKE_BACKWARDS_COMPATIBILITY 2.2)
-
 INCLUDE(${CMAKE_SOURCE_DIR}/CMake/cuda/CudaDependency.cmake)

 ###############################################################################
@@ -129,8 +127,6 @@

 set(nvcc_flags ${nvcc_flags} -arch sm_${CUDA_ARCH} -DCUDA_ARCH=${CUDA_ARCH})
 add_definitions(-DCUDA_ARCH=${CUDA_ARCH})
-
-

 # user options
 SET(CUDA_BUILD_CUBIN FALSE CACHE BOOL "Generate and parse .cubin files in Device mode.")
@@ -278,7 +274,7 @@
 	STRING(SUBSTRING ${file} ${_begin} ${_stripped_file_length} stripped_file )

     # Add a custom target to generate a cpp file
-	SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated.cpp")
+	SET(generated_file  "${CMAKE_BINARY_DIR}/src/cuda/${stripped_file}_${cuda_target}_generated${CMAKE_CXX_OUTPUT_EXTENSION}")

     SET(generated_target "${stripped_file}_target")

@@ -371,7 +367,7 @@
            ${nvcc_flags}
            -DNVCC
            --keep
-           -cuda -o ${generated_file}
+           -c -o ${generated_file}
            ${CUDA_NVCC_INCLUDE_ARGS}
        COMMENT "Building NVCC ${source_file}: ${generated_file}"
       )
@@ -381,6 +377,13 @@
     # Add the generated file name to the source list.
     SET(target_srcs ${target_srcs} ${generated_file})

+	SET_SOURCE_FILES_PROPERTIES(
+		${generated_file}
+		PROPERTIES
+		EXTERNAL_OBJECT true # to say that "this is actually an object file, so it should not be compiled, only linked"
+		GENERATED true       # to say that "it is OK that the obj-files do not exist before build time"
+  		)
+
     ELSE(${file} MATCHES ".*\\.cu$")

     # Otherwise add the file name to the source list.


GLES2 render system: Fixed win32 GLES2+EGL lib find.

--- CMake/Packages/FindOpenGLES2.cmake
+++ CMake/Packages/FindOpenGLES2.cmake
@@ -31,7 +31,8 @@
       SET (OPENGLES2_gl_LIBRARY import32 CACHE STRING "OpenGL ES 2.x library for win32")
     ELSE(BORLAND)
 	  #MS compiler - todo - fix the following line:
-      SET (OPENGLES_gl_LIBRARY ${OGRE_SOURCE_DIR}/Dependencies/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32")
+      SET (OPENGLES2_gl_LIBRARY ${OGRE_DEPENDENCIES_DIR}/lib/release/libGLESv2.lib CACHE STRING "OpenGL ES 2.x library for win32")
+      SET (EGL_egl_LIBRARY      ${OGRE_DEPENDENCIES_DIR}/lib/release/libEGL.lib CACHE STRING "EGL library for win32")
     ENDIF(BORLAND)

   ENDIF (CYGWIN)


cmake: added VOTCA_TOOLS_HAS_SQLITE3 to FindVOTCA_TOOLS.cmake module

--- CMakeModules/FindVOTCA_TOOLS.cmake
+++ CMakeModules/FindVOTCA_TOOLS.cmake
@@ -4,6 +4,7 @@
 #  VOTCA_TOOLS_INCLUDE_DIRS - where to find votca/tools/version.h, etc.
 #  VOTCA_TOOLS_LIBRARIES    - List of libraries when using expat.
 #  VOTCA_TOOLS_FOUND        - True if expat found.
+#  VOTCA_TOOLS_HAS_SQLITE3  - True if votca tools was build with sqlite3 support
 #
 # Copyright 2009-2011 The VOTCA Development Team (http://www.votca.org)
 #
@@ -24,6 +25,14 @@

 pkg_check_modules(PC_VOTCA_TOOLS libvotca_tools)
 find_path(VOTCA_TOOLS_INCLUDE_DIR votca/tools/version.h HINTS ${PC_VOTCA_TOOLS_INCLUDE_DIRS})
+
+find_path(VOTCA_TOOLS_HAS_SQLITE3 votca/tools/database.h HINTS ${PC_VOTCA_TOOLS_INCLUDE_DIRS})
+if (VOTCA_TOOLS_HAS_SQLITE3)
+  set(VOTCA_TOOLS_HAS_SQLITE3 TRUE)
+else(VOTCA_TOOLS_HAS_SQLITE3)
+  set(VOTCA_TOOLS_HAS_SQLITE3 FALSE)
+endif(VOTCA_TOOLS_HAS_SQLITE3)
+
 find_library(VOTCA_TOOLS_LIBRARY NAMES votca_tools HINTS ${PC_VOTCA_TOOLS_LIBRARY_DIRS} )

 #add deps


Fixed an error where older Boost versions were no longer found properly.

--HG--
branch : v1-8

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -128,7 +128,7 @@
 set(Boost_ADDITIONAL_VERSIONS "1.51" "1.51.0" "1.50" "1.50.0" "1.49" "1.49.0" "1.48" "1.48.0" "1.47" "1.47.0" "1.46" "1.46.0" "1.45" "1.45.0" "1.44" "1.44.0" "1.42" "1.42.0" "1.41.0" "1.41" "1.40.0" "1.40")
 # Components that need linking (NB does not include header-only components like bind)
 set(OGRE_BOOST_COMPONENTS thread date_time)
-find_package(Boost QUIET)
+find_package(Boost COMPONENTS ${OGRE_BOOST_COMPONENTS} QUIET)
 if (NOT Boost_FOUND)
         if(Boost_USE_STATIC_LIBS)
                 set(Boost_USE_STATIC_LIBS OFF)


Small oversight: Make CMake recognise that Poco was found

--- CMake/Dependencies.cmake
+++ CMake/Dependencies.cmake
@@ -110,7 +110,7 @@

 # POCO
 find_package(POCO)
-macro_log_feature(Poco_FOUND "POCO" "POCO framework" "http://pocoproject.org/" FALSE "" "")
+macro_log_feature(POCO_FOUND "POCO" "POCO framework" "http://pocoproject.org/" FALSE "" "")


MRG: Merged from origin/develop.

MRG: Merged from origin/develop.

--- CMake/MinGWPackage.cmake
+++ CMake/MinGWPackage.cmake
@@ -1,6 +1,5 @@
 macro(package_mingw)
   cmake_parse_arguments(PACKAGE  "" "PREFIX_DIR;ARCH;MXEROOT;NEEDS_OTB_APPS" "SEARCHDIRS;PEFILES" ${ARGN} )
-
   if("${PACKAGE_ARCH}" STREQUAL "x86")
     set(MXE_BIN_DIR "${PACKAGE_MXEROOT}/usr/i686-w64-mingw32.shared/bin")
     set(MXE_OBJDUMP "${PACKAGE_MXEROOT}/usr/bin/i686-w64-mingw32.shared-objdump")
@@ -9,6 +8,8 @@
     set(MXE_OBJDUMP "${PACKAGE_MXEROOT}/usr/bin/x86_64-w64-mingw32.shared-objdump")
   endif()

+  file(GLOB MXE_GCC_LIB_DIR "${MXE_BIN_DIR}/gcc*")
+  list(APPEND PACKAGE_SEARCHDIRS ${MXE_GCC_LIB_DIR})
   list(APPEND PACKAGE_SEARCHDIRS ${MXE_BIN_DIR})
   list(APPEND PACKAGE_SEARCHDIRS "${MXE_BIN_DIR}/../qt/bin") #Qt
   list(APPEND PACKAGE_SEARCHDIRS "${MXE_BIN_DIR}/../qt/lib") #Qwt
@@ -33,7 +34,7 @@
     install(FILES ${Monteverdi_BINARY_DIR}/i18n/${APP_TS_FILENAME}.qm
       DESTINATION ${PACKAGE_PREFIX_DIR}/${Monteverdi_INSTALL_DATA_DIR}/i18n)
   endforeach()
-
+
   #dependency resolution based on copydlldeps.sh from mxe by Timothy Gu
   if(PACKAGE_NEEDS_OTB_APPS)
     file(GLOB otbapps_list ${OTB_MODULES_DIR}/../../../otb/applications/otbapp_*dll) # /lib/otb
@@ -58,37 +59,36 @@

 set(SYSTEM_DLLS
   msvc.*dll
-  USER32.dll
-  GDI32.dll
-  SHELL32.DLL
-  KERNEL32.dll
-  ADVAPI32.dll
-  CRYPT32.dll
-  WS2_32.dll
+  user32.dll
+  gdi32.dll
+  shell32.dll
+  kernel32.dll
+  advapi32.dll
+  crypt32.dll
+  ws2_32.dll
   wldap32.dll
   ole32.dll
-  OPENGL32.DLL
-  GLU32.DLL
-  COMDLG32.DLL
-  IMM32.DLL
-  OLEAUT32.dll
-  COMCTL32.DLL
-  WINMM.DLL
-
-  SHELL32.dll
-  WLDAP32.dll
-  OPENGL32.dll
-  GLU32.dll
+  opengl32.dll
+  glu32.dll
   comdlg32.dll
-  IMM32.dll
-  WINMM.dll
-  WINSPOOL.DRV)
+  imm32.dll
+  oleaut32.dll
+  comctl32.dll
+  winmm.dll
+  secur32.dll
+  libeay32.dll
+  shfolder.dll
+  ssleay32.dll
+  wsock32.dll
+  winspool.drv)

 ## http://www.cmake.org/Wiki/CMakeMacroListOperations
 macro(is_system_dll matched value)
   set(${matched})
+  string(TOLOWER ${value} value_)
   foreach (pattern ${SYSTEM_DLLS})
-    if(${value} MATCHES ${pattern})
+    string(TOLOWER ${pattern} pattern_)
+    if(${value_} MATCHES ${pattern_})
       set(${matched} TRUE)
     endif()
   endforeach()
@@ -195,4 +195,4 @@
       DESTINATION ${APP_OTBLIBS_DIR})
   endif()

-endfunction()+endfunction()


Update CTK Version

Update CTK Version

--- CMakeExternals/CTK.cmake
+++ CMakeExternals/CTK.cmake
@@ -15,7 +15,7 @@

   if(NOT DEFINED CTK_DIR)

-    set(revision_tag abca3189)
+    set(revision_tag 3efe86d5)
     #IF(${proj}_REVISION_TAG)
     #  SET(revision_tag ${${proj}_REVISION_TAG})
     #ENDIF()
@@ -74,10 +74,10 @@

     ExternalProject_Add(${proj}
       LIST_SEPARATOR ${sep}
-      #URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
-      #URL_MD5 3a3470976debc29e9c9d5aaae12eae1c
-      GIT_REPOSITORY https://github.com/commontk/CTK.git
-      GIT_TAG origin/master
+      URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz
+      URL_MD5 cbd771ea9718cb02e64085e8ddfdaa4d
+      #GIT_REPOSITORY https://github.com/commontk/CTK.git
+      #GIT_TAG origin/master
       UPDATE_COMMAND ""
       INSTALL_COMMAND ""
       CMAKE_GENERATOR ${gen}


CMake: Fix FindWaylandProtocol.cmake

CMake: Fix FindWaylandProtocol.cmake

Use the file name in find_package_standard_args to make FeatureTest show
it correctly as found package.

--- CMake/FindWaylandProtocols.cmake
+++ CMake/FindWaylandProtocols.cmake
@@ -35,5 +35,5 @@
 endif ()

 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(wlproto DEFAULT_MSG WLPROTO_PATH)
+find_package_handle_standard_args(WaylandProtocols DEFAULT_MSG WLPROTO_PATH WLPROTO_PATH)
 mark_as_advanced(WLPROTO_PATH)


Add comment into ctkMacroWrapPythonQt.cmake

--- CMake/ctkMacroWrapPythonQt.cmake
+++ CMake/ctkMacroWrapPythonQt.cmake
@@ -192,6 +192,7 @@

     IF(NOT skip_wrapping)
       # Skip wrapping if object has a virtual pure method
+      # "x3b" is the unicode for semicolon
       SET(regex "virtual[\\w\\n\\s\\*\\(\\)]+\\=[\\s\\n]*(0|NULL)[\\s\\n]*\\x3b")
       ctkMacroWrapPythonQt_reSearchFile(${PYTHON_EXECUTABLE} ${PYTHON_LIBRARY_PATH}
                                         ${regex} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE} is_matching)


cpack cleanup

cpack cleanup

--- CMakeModules/CPackSettings.cmake
+++ CMakeModules/CPackSettings.cmake
@@ -15,8 +15,6 @@
     ".pyo$"
     ".so$"
     ".dylib$"
-    ".md5$"
-    "/blueprint"
     ".DS_Store"
     ".tm_properties"
     "mkwebdocs.sh"


- correct name of debug library to IMPORTED_LOCATION_DEBUG

--- CMakeModules/FindCROSSGUID.cmake
+++ CMakeModules/FindCROSSGUID.cmake
@@ -2,6 +2,7 @@
 # Properties, Inc., University of Heidelberg, and University of
 # of Connecticut School of Medicine.
 # All rights reserved.
+

 # Locate library providing crossguid
@@ -26,7 +27,7 @@
 get_target_property(CROSSGUID_INCLUDE_DIR crossguid INTERFACE_INCLUDE_DIRECTORIES)
 get_target_property(CROSSGUID_LIBRARY crossguid IMPORTED_LOCATION_RELEASE)
 if (NOT CROSSGUID_LIBRARY)
-get_target_property(CROSSGUID_LIBRARY crossguid IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG)
+get_target_property(CROSSGUID_LIBRARY crossguid IMPORTED_LOCATION_DEBUG)
 endif()

 get_target_property(CROSSGUID_INTERFACE_LINK_LIBRARIES crossguid INTERFACE_LINK_LIBRARIES)


wrong argument parsing in TargetCopy

wrong argument parsing in TargetCopy

--- scripts/TargetCopyFiles.cmake
+++ scripts/TargetCopyFiles.cmake
@@ -13,29 +13,29 @@
 include(CMakeParseArguments)

 function(add_copy_files FILECOPIER_TARGET)
-  set(oneValueArgs DESTINATION GLOB FILES)
-  set(multiValueArgs REPLACE)
+  set(oneValueArgs DESTINATION GLOB)
+  set(multiValueArgs REPLACE FILES)
   cmake_parse_arguments(FILECOPIER "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )

-  if("${FILECOPIER_DESTINATION}" STREQUAL "")
+  if(NOT FILECOPIER_DESTINATION)
     set(FILECOPIER_DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
   endif()
-  if("${FILECOPIER_GLOB}" STREQUAL "" AND "${FILECOPIER_FILES}" STREQUAL "")
+  if(NOT FILECOPIER_GLOB AND NOT FILECOPIER_FILES)
     set(input_sources ${FILECOPIER_UNPARSED_ARGUMENTS})
-  elseif(NOT "${FILECOPIER_GLOB}" STREQUAL "" AND NOT "${FILECOPIER_FILES}" STREQUAL "")
+  elseif(FILECOPIER_GLOB AND FILECOPIER_FILES)
     message(FATAL_ERROR "copy_files takes one of GLOB or FILES, not both")
-  elseif(NOT "${FILECOPIER_FILES}" STREQUAL "")
+  elseif(FILECOPIER_FILES)
     set(input_sources ${FILECOPIER_FILES})
   else()
     file(GLOB input_sources ${FILECOPIER_GLOB})
   endif()
-  if("${FILECOPIER_TARGET}" STREQUAL "")
+  if(NOT FILECOPIER_TARGET)
     set(copy_target copy)
   else()
     set(copy_target ${FILECOPIER_TARGET})
   endif()

-  if(NOT "${FILECOPIER_REPLACE}" STREQUAL "")
+  if(FILECOPIER_REPLACE)
     list(LENGTH FILECOPIER_REPLACE replace_length)
     if(NOT ${replace_length} EQUAL 2)
       message(FATAL_ERROR "copy_files argument REPLACE takes two inputs")


Fix Windows debug build failing to link to correct OpenVDB debug library

Patch contributed by Grische.

Differential Revision: https://developer.blender.org/D8810

--- src/cmake/external_libs.cmake
+++ src/cmake/external_libs.cmake
@@ -475,6 +475,10 @@
 if(WITH_CYCLES_OPENVDB)
   if(CYCLES_STANDALONE_REPOSITORY)
     if(MSVC AND EXISTS ${_cycles_lib_dir})
+      set(OPENVDB_LIBRARY
+          optimized ${OPENVDB_ROOT_DIR}/lib/openvdb${CMAKE_STATIC_LIBRARY_SUFFIX}
+          debug ${OPENVDB_ROOT_DIR}/lib/openvdb_d${CMAKE_STATIC_LIBRARY_SUFFIX}
+      )
       set(BLOSC_LIBRARY
           optimized ${BLOSC_ROOT_DIR}/lib/libblosc.lib
           debug ${BLOSC_ROOT_DIR}/lib/libblosc_d.lib)


Update FW: rectified L/R swapping corrected with mirroring disabled

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

 # "full commit hash of device side binary"
-set(DEPTHAI_DEVICE_SIDE_COMMIT "7a8ff7440d48429e3f03f4d68b56706682d3c633")
+set(DEPTHAI_DEVICE_SIDE_COMMIT "6aff98a0227f54985d2bb7468693b8b6f63bcdbb")

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


px4fmu-v2 disable ulanding

px4fmu-v2 disable ulanding

--- cmake/configs/nuttx_px4fmu-v2_default.cmake
+++ cmake/configs/nuttx_px4fmu-v2_default.cmake
@@ -58,7 +58,7 @@
 	drivers/distance_sensor/srf02_i2c
 	drivers/distance_sensor/teraranger
 	drivers/distance_sensor/tfmini
-	drivers/distance_sensor/ulanding
+	#drivers/distance_sensor/ulanding
 	modules/sensors

 	#


[cmake] Make use of -Dshared=Off: prefer static libraries.

We will use this for release binaries to be as self-contained yet
distro-compatible as possible.

--- cmake/modules/SearchInstalledSoftware.cmake
+++ cmake/modules/SearchInstalledSoftware.cmake
@@ -21,7 +21,18 @@
   endif()
 endif()

-#---Check for Cocoa/Quartz graphics backend (MacOS X only)
+#---If -Dshared=Off, prefer static libraries-----------------------------------------
+if(NOT shared)
+  if(WINDOWS)
+    message(FATAL "Option \"shared=Off\" not supported on Windows!")
+  else()
+    message("Prefering static libraries.")
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ".a;${CMAKE_FIND_LIBRARY_SUFFIXES}")
+  endif()
+endif()
+
+
+#---Check for Cocoa/Quartz graphics backend (MacOS X only)---------------------------
 if(cocoa)
   if(APPLE)
     set(x11 OFF CACHE BOOL "Disabled because cocoa requested (${x11_description})" FORCE)


[fixed] to INCLUDE_DIRECTORIES before TRIBITS_ADD_LIBRARY

--- cmake/BOTG.cmake
+++ cmake/BOTG.cmake
@@ -194,6 +194,12 @@

     IF( enabled )

+        #set include directories
+        TRIBITS_INCLUDE_DIRECTORIES(
+            ${CMAKE_CURRENT_SOURCE_DIR}  #For C++
+            ${CMAKE_CURRENT_BINARY_DIR}  #For fortran modules/configured files
+        )
+
         #create list of sources
         SET( sources )
         FOREACH( source ${library_SOURCES} )
@@ -222,6 +228,8 @@
         TRIBITS_ADD_LIBRARY( ${name}
             SOURCES
                 "${sources}"
+            HEADERS
+                "${headers}"
             NOINSTALLHEADERS
                 "${headers}"
         )
@@ -231,11 +239,6 @@
             TARGET_LINK_LIBRARIES( ${name} ${link_to} )
         ENDFOREACH()

-        #set include directories
-        INCLUDE_DIRECTORIES(
-            ${CMAKE_CURRENT_SOURCE_DIR}  #For C++
-            ${CMAKE_CURRENT_BINARY_DIR}  #For fortran modules/configured files
-        )

     ENDIF()


CMake: mbed_add_cmake_directory_if_labels checks presence of CMakeLists.txt before adding subdirectory

--- cmake/util.cmake
+++ cmake/util.cmake
@@ -11,7 +11,9 @@
         # assumption: relative path, no need to check for absolute here
         set(path ${CMAKE_CURRENT_SOURCE_DIR}/${key})
         if (EXISTS ${path})
-            add_subdirectory(${path})
+            if (EXISTS  "${path}/CMakeLists.txt")
+                add_subdirectory(${path})
+            endif()
         endif()
     endforeach()
 endfunction()


BUG: setSlicerConfigVarList was included too early


Allow CPack generator to be set on the cmdline

Allow commandline Cpack generator setting arguments to override default so we are not forced to always build debs on rpm based systems or vise versa

--- src/toolbox/cmake/LStoreCommon.cmake
+++ src/toolbox/cmake/LStoreCommon.cmake
@@ -123,8 +123,12 @@
 # Below is used for building packages
 set(CPACK_PACKAGE_NAME "accre-${LSTORE_PROJECT_NAME}")
 set(CPACK_PACKAGE_VERSION "${LSTORE_PROJECT_VERSION}")
-set(CPACK_GENERATOR "RPM;DEB")
-set(CPACK_SOURCE_GENERATOR "RPM;DEB")
+if(NOT DEFINED CPACK_GENERATOR)
+    set(CPACK_GENERATOR "RPM;DEB")
+endif(NOT DEFINED CPACK_GENERATOR)
+if(NOT DEFINED CPACK_SOURCE_GENERATOR)
+    set(CPACK_SOURCE_GENERATOR "RPM;DEB")
+endif(NOT DEFINED CPACK_SOURCE_GENERATOR)
 set(CPACK_PACKAGE_RELEASE ${LSTORE_PROJECT_REVISION})
 set(CPACK_PACKAGE_CONTACT "Andrew Melo or Alan Tackett")
 set(CPACK_PACKAGE_VENDOR "Advanced Computing Center for Research and Education, Vanderbilt University")


bump

bump

--- VERSION.cmake
+++ VERSION.cmake
@@ -46,5 +46,5 @@

 SET(LIBSATSOLVER_MAJOR "0")
 SET(LIBSATSOLVER_MINOR "0")
-SET(LIBSATSOLVER_PATCH "32")
+SET(LIBSATSOLVER_PATCH "33")


builds specific branch of SIRF if CIL is built

--- version_config.cmake
+++ version_config.cmake
@@ -182,8 +182,11 @@
   set(DEFAULT_CCPi-Astra_TAG origin/master)

 else()
-  # set(DEFAULT_SIRF_TAG v2.0.0)
-  set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
+  if (BUILD_CIL OR BUILD_CIL_LITE)
+    set(DEFAULT_SIRF_TAG v2.0.0)
+  else()
+    set (DEFAULT_SIRF_TAG origin/add_to_sirf_classes)
+  endif()
   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
   set(DEFAULT_STIR_TAG 3a277f7a819f35a553a8d6097402ea25cf55a240)


updated STIR_TAG

updated STIR_TAG

need more recent version of STIR for subset code which is now on SIRF master

--- version_config.cmake
+++ version_config.cmake
@@ -127,7 +127,7 @@

   ## STIR
   set(DEFAULT_STIR_URL https://github.com/UCL/STIR )
-  set(DEFAULT_STIR_TAG 9ecbf0abd048cd0a8f19250f6cc7b4c199870c26)
+  set(DEFAULT_STIR_TAG 311e5252142e64ffb4de682a6963c90782dfeed4)

   ## Gadgetron
   set(DEFAULT_Gadgetron_URL https://github.com/gadgetron/gadgetron )


Bumping version to 1.3 for development

Bumping version to 1.3 for development

--- Version.cmake
+++ Version.cmake
@@ -9,7 +9,7 @@
 # Version info

 set(SimpleITK_VERSION_MAJOR 1)
-set(SimpleITK_VERSION_MINOR 2)
+set(SimpleITK_VERSION_MINOR 3)
 set(SimpleITK_VERSION_PATCH 0)
 #set(SimpleITK_VERSION_TWEAK "")


no dll on hdf5

no dll on hdf5

--- superbuild/Projects/win32/hdf5.cmake
+++ superbuild/Projects/win32/hdf5.cmake
@@ -33,11 +33,11 @@
   # the dlls instead of the libs. So setting the variables explicitly for
   # dependent projects.
   add_extra_cmake_args(
-    -DHDF5_C_LIBRARY:FILEPATH=${install_location}/lib/hdf5dll.lib
-    -DHDF5_HL_LIBRARY:FILEPATH=${install_location}/lib/hdf5_hldll.lib
+    -DHDF5_C_LIBRARY:FILEPATH=${install_location}/lib/hdf5.lib
+    -DHDF5_HL_LIBRARY:FILEPATH=${install_location}/lib/hdf5_hl.lib
     # This variable is for CGNS, since CGNS doesn't use standard find_package()
     # to find hdf5.
-    -DHDF5_LIBRARY:FILEPATH=${install_location}/lib/hdf5dll.lib
+    -DHDF5_LIBRARY:FILEPATH=${install_location}/lib/hdf5.lib
   )

   # On 32-bit Windows, H5public.h ends up redefining ssize_t. This patch ensures


Consistent function cases in the cmake code.

--- cmake/Compiler.cmake
+++ cmake/Compiler.cmake
@@ -3,7 +3,7 @@
 function(add_compile_options_if_supported)
     foreach(flag ${ARGN})
         set(option_var option_supported_${flag})
-        CHECK_CXX_COMPILER_FLAG(${flag} ${option_var})
+        check_cxx_compiler_flag(${flag} ${option_var})

         if( ${option_var} )
             add_compile_options(${flag})


Ensure *deployqt commands are available.

--- cmake/DeployQt.cmake
+++ cmake/DeployQt.cmake
@@ -28,13 +28,13 @@
 get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)

 find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")
-if(WINDEPLOYQT_EXECUTABLE)
-    message(STATUS "Found ${WINDEPLOYQT_EXECUTABLE}")
+if(WIN32 AND NOT WINDEPLOYQT_EXECUTABLE)
+    message(FATAL_ERROR "windeployqt not found")
 endif()

 find_program(MACDEPLOYQT_EXECUTABLE macdeployqt HINTS "${_qt_bin_dir}")
-if(MACDEPLOYQT_EXECUTABLE)
-    message(STATUS "Found ${MACDEPLOYQT_EXECUTABLE}")
+if(APPLE AND NOT MACDEPLOYQT_EXECUTABLE)
+    message(FATAL_ERROR "macdeployqt not found")
 endif()

 # Add commands that copy the required Qt files to the same directory as the


fixed find cuda for aarch64

fixed find cuda for aarch64

--- cmake/FindCUDA.cmake
+++ cmake/FindCUDA.cmake
@@ -619,6 +619,8 @@
   set(_cuda_target_cpu_arch_initial "${CUDA_TARGET_CPU_ARCH}")
 elseif(CUDA_VERSION VERSION_GREATER "5.0" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|ARM)")
   set(_cuda_target_cpu_arch_initial "ARM")
+elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|AARCH64)")
+  set(_cuda_target_cpu_arch_initial "AARCH64")
 else()
   set(_cuda_target_cpu_arch_initial "")
 endif()
@@ -642,6 +644,12 @@
     set(_cuda_target_triplet_initial "armv7-linux-androideabi")
   elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/armv7-linux-gnueabihf")
     set(_cuda_target_triplet_initial "armv7-linux-gnueabihf")
+  endif()
+elseif(CUDA_VERSION VERSION_GREATER "6.5" AND CMAKE_CROSSCOMPILING AND "${CUDA_TARGET_CPU_ARCH}" STREQUAL "AARCH64")
+  if("${CUDA_TARGET_OS_VARIANT}" STREQUAL "Android" AND EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux-androideabi")
+    set(_cuda_target_triplet_initial "aarch64-linux-androideabi")
+  elseif(EXISTS "${CUDA_TOOLKIT_ROOT_DIR}/targets/aarch64-linux-gnueabihf")
+    set(_cuda_target_triplet_initial "aarch64-linux-gnueabihf")
   endif()
 endif()
 set(CUDA_TARGET_TRIPLET "${_cuda_target_triplet_initial}" CACHE STRING "Specify the target triplet for which the input files must be compiled.")
@@ -1094,8 +1102,10 @@
     set(nvcc_flags ${nvcc_flags} -m32)
   endif()

-  if(CUDA_TARGET_CPU_ARCH)
-    set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH}")
+  if(CUDA_TARGET_CPU_ARCH AND CUDA_VERSION VERSION_LESS "7.0")
+    # CPU architecture is either ARM or X86. Patch AARCH64 to be ARM
+    string(REPLACE "AARCH64" "ARM" CUDA_TARGET_CPU_ARCH_patched ${CUDA_TARGET_CPU_ARCH})
+    set(nvcc_flags ${nvcc_flags} "--target-cpu-architecture=${CUDA_TARGET_CPU_ARCH_patched}")
   endif()

   if(CUDA_TARGET_OS_VARIANT AND CUDA_VERSION VERSION_LESS "7.0")


Fix "FindGLEW.cmake" to also look for library names with "glew" rather then "GLEW".

--- cmake/FindGLEW.cmake
+++ cmake/FindGLEW.cmake
@@ -4,13 +4,13 @@
 include(FindPackageHandleStandardArgs)

 find_path(GLEW_H_PATH NAMES GL/glew.h)
-find_library(GLEW_LIB NAMES GLEW libGLEW PATH_SUFFIXES dynamic)
-find_library(GLEW_LIB_DBG NAMES GLEW_d libGLEW_d PATH_SUFFIXES dynamic)
+find_library(GLEW_LIB NAMES GLEW libGLEW glew libglew PATH_SUFFIXES dynamic)
+find_library(GLEW_LIB_DBG NAMES GLEW_d libGLEW_d glew_d libglew_d PATH_SUFFIXES dynamic)
 mark_as_advanced(GLEW_H_PATH GLEW_LIB GLEW_LIB_DBG)

 if (WIN32 OR APPLE)
-    find_library(GLEW_LIB_STATIC NAMES GLEW libGLEW PATH_SUFFIXES static)
-    find_library(GLEW_LIB_STATIC_DBG NAMES GLEW_d libGLEW_d PATH_SUFFIXES static)
+    find_library(GLEW_LIB_STATIC NAMES GLEW libGLEW glew libglew PATH_SUFFIXES static)
+    find_library(GLEW_LIB_STATIC_DBG NAMES GLEW_d libGLEW_d glew_d libglew_d PATH_SUFFIXES static)
     mark_as_advanced(GLEW_LIB_STATIC GLEW_LIB_STATIC_DBG)
 endif()


Fix FindLLVM.cmake to use llvm-config (LLVM_CONFIG_EXEC) to set clang, clang++ binary paths

--- cmake/FindLLVM.cmake
+++ cmake/FindLLVM.cmake
@@ -47,14 +47,18 @@
       PATHS /opt/local/bin /opt/llvm/bin
   )

+  exec_program(${LLVM_CONFIG_EXEC} ARGS --bindir     OUTPUT_VARIABLE LLVM_BIN_DIR)
+
   find_program(LLVM_CLANG_EXEC
       NAMES clang
-      PATHS /opt/local/bin  /opt/llvm/bin
+      PATHS ${LLVM_BIN_DIR}
+      NO_DEFAULT_PATH
   )

   find_program(LLVM_CLANGXX_EXEC
       NAMES clang++
-      PATHS /opt/local/bin  /opt/llvm/bin
+      PATHS ${LLVM_BIN_DIR}
+      NO_DEFAULT_PATH
   )

   set(LLVM_FOUND TRUE)


Fix relative LD_PRELOAD path

Fix relative LD_PRELOAD path

--- cmake/provider.cmake
+++ cmake/provider.cmake
@@ -167,7 +167,8 @@

     if(PSM2.WRAPPER)
         INFO("PSM2 Wrapper library enabled. Use LD_PRELOAD to load libpmr_psm2_preload.so")
-        list(APPEND REQUIRED_EXPORTS "LD_PRELOAD=${CMAKE_INSTALL_PREFIX}/lib/libpmr_psm2_preload.so")
+        get_filename_component(LD_PRELOAD "${CMAKE_INSTALL_PREFIX}/lib/libpmr_psm2_preload.so" ABSOLUTE)
+        list(APPEND REQUIRED_EXPORTS "LD_PRELOAD=${LD_PRELOAD}")
         list(APPEND PSM2_CAPS "Wrapper")
     endif()


find make properly

find make properly

SVN-Revision: 161

--- package.cmake
+++ package.cmake
@@ -148,6 +148,7 @@
 set(CTEST_COMMAND "${CTEST_EXECUTABLE_NAME}")
 if (UNIX OR NOT arg_use_nmake)
   set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+  find_program(MAKE_COMMAND make DOC "make command")
   if (have_cygwin)
     # seeing errors building in parallel: pdb collision?
     set(CTEST_BUILD_COMMAND "${MAKE_COMMAND} -j2")


Bazel/CMake: make compilation db link symbolic

--- misc/bazel/cmake/setup.cmake
+++ misc/bazel/cmake/setup.cmake
@@ -21,5 +21,5 @@
 endforeach ()

 if (CMAKE_EXPORT_COMPILE_COMMANDS)
-    file(CREATE_LINK ${PROJECT_BINARY_DIR}/compile_commands.json ${PROJECT_SOURCE_DIR}/compile_commands.json)
+    file(CREATE_LINK ${PROJECT_BINARY_DIR}/compile_commands.json ${PROJECT_SOURCE_DIR}/compile_commands.json SYMBOLIC)
 endif ()


- Updated README.cmake (nitpicking).

- Updated README.cmake (nitpicking).

--- README.cmake
+++ README.cmake
@@ -39,12 +39,26 @@
 $ pwd
 liblscp-x.y.z
 $ cd build
-$ cmake -DCMAKE_BUILD_TYPE=debug ..
+$ cmake -DCMAKE_BUILD_TYPE=Debug ..

 3. Execute the build command. If you used the Makefiles generator (the default
    in Linux and other Unix systems) then execute make, gmake, or mingw32-make.
    If you generated a project file, use your IDE to build it.

+Configuration options
+=====================
+
+CMAKE_BUILD_TYPE=Release
+
+    Specifies the build type: size optimized or including debug symbols.
+
+CMAKE_INSTALL_PREFIX=/usr/local
+
+    Install directory prefix that will be used when you call 'make install'.
+
+For more information, please see:
+    https://cmake.org/cmake/help/v3.10/manual/cmake.1.html
+
 Compiling with make
 ===================


add STL flags only for C++ files

add STL flags only for C++ files

--- toolchains/gcc_compatibles_stl.cmake
+++ toolchains/gcc_compatibles_stl.cmake
@@ -19,17 +19,17 @@

 if(${USING_CLANG})
     if( ${TNUN_CPP_LIBRARY} STREQUAL "libc++" )
-        add_compile_options( -stdlib=libc++ )
+        add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-stdlib=libc++> )
         link_libraries( -stdlib=libc++ )
     else()
-        add_compile_options( -stdlib=libstdc++ )
+        add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-stdlib=libstdc++> )
         link_libraries( -stdlib=libstdc++ )
     endif()
 endif()

 if( ${USING_GCC} )
     if( ${TNUN_CPP_LIBRARY} STREQUAL "libc++" )
-        add_compile_options( -nostdinc++ -I${TNUN_LIBCPP_LOCATION} )
+        add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-nostdinc++ -I${TNUN_LIBCPP_LOCATION}> )
         link_libraries( -lc++ -lc++abi -lm -lc -lgcc )
     endif()
 endif()


Added a few more lines

Added a few more lines

--- toolchain/Prizm.cmake
+++ toolchain/Prizm.cmake
@@ -18,16 +18,16 @@
 SET(LINKER_SCRIPT "${BASE_DIR}/toolchain/prizm.x")
 SET(CMAKE_C_FLAGS "-Os -Wall -mb  -mhitachi -nostdlib -ffunction-sections -fdata-sections" CACHE STRING "" FORCE)
 SET(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE)
-SET(CMAKE_EXE_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib")
-SET(CMAKE_SHARED_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib")
-SET(CMAKE_SHARED_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib")
-SET(CMAKE_MODULE_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib")
-SET(CMAKE_CXX_LINK_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib")
+SET(CMAKE_EXE_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib" CACHE STRING "" FORCE)
+SET(CMAKE_SHARED_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib" CACHE STRING "" FORCE)
+SET(CMAKE_SHARED_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib" CACHE STRING "" FORCE)
+SET(CMAKE_MODULE_LINKER_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib" CACHE STRING "" FORCE)
+SET(CMAKE_CXX_LINK_FLAGS "-L${BASE_DIR}/lib -T${LINKER_SCRIPT} -Wl,-static -Wl,-gc-sections -nostdlib" CACHE STRING "" FORCE)

-SET(CMAKE_C_COMPILER_WORKS 1)
-SET(CMAKE_CXX_COMPILER_WORKS 1)
-SET(CMAKE_EXECUTABLE_SUFFIX ".bin")
+SET(CMAKE_C_COMPILER_WORKS 1 CACHE STRING "" FORCE)
+SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE STRING "" FORCE)
+SET(CMAKE_EXECUTABLE_SUFFIX ".bin" CACHE STRING "" FORCE)

 FUNCTION(makeg3a G3A_TARGET G3A_NAME G3A_UNSELECTED G3A_SELECTED)
   ADD_CUSTOM_TARGET(finalize-${G3A_NAME} ALL mkg3a -n basic:${G3A_NAME} -i uns:${G3A_UNSELECTED} -i sel:${G3A_SELECTED} ${G3A_TARGET} ${G3A_TARGET}.g3a DEPENDS ${G3A_TARGET})


cmake: Format SCO OpenServer note about FSU Pthreads library

--- platforms/scosv-gcc/platform.cmake
+++ platforms/scosv-gcc/platform.cmake
@@ -3,14 +3,17 @@
 set (PLIB_TIME_PROFILER_MODEL posix)
 set (PLIB_DIR_MODEL posix)

-set (PLIB_PLATFORM_LINK_LIBRARIES socket nsl gthreads malloc)
+set (PLIB_PLATFORM_LINK_LIBRARIES socket nsl gthreads)

 set (PLIB_PLATFORM_DEFINES
         -D_REENTRANT
         -D_SIMPLE_R
 )

-message (STATUS "You need a working port of FSU Pthreads in order to
-                 compile with multi-threading support. Please refer to
-                 http://moss.csc.ncsu.edu/~mueller/pthreads/ for more
-                 details.")
+message ("
+         You need a working port of FSU Pthreads in order to
+         compile with multi-threading support. Please refer to
+         http://moss.csc.ncsu.edu/~mueller/pthreads/ for more
+         details. Make sure that it is compiled with thread-safe
+         memory allocation (usually -DMALLOC macro definition).
+         ")


Remove glob_all_dirs from khronos.cmake (#224)

--- third_party/khronos.cmake
+++ third_party/khronos.cmake
@@ -17,8 +17,6 @@
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/SPIRV-Tools/source)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/SPIRV-Tools-Generated)
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/glslang/OGLCompilersDLL)
-
-glob_all_dirs()

 glob(sources
   PATH


Nagios Monitoring 7.8.0-rc1 Release Candidate 1

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

--- version.cmake
+++ version.cmake
@@ -6,6 +6,6 @@
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 8 )
 set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "closedown" )
-set ( HPCC_SEQUENCE 0 )
+set ( HPCC_MATURITY "rc" )
+set ( HPCC_SEQUENCE 1 )
 ###


Split off candidate-3.10.2 branch

Split off candidate-3.10.2 branch

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

--- version.cmake
+++ version.cmake
@@ -4,7 +4,7 @@
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 3 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 1 )
+set ( HPCC_POINT 3 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 1 )
 ###


Graph Control 4.0.0-rc5 Release Candidate 5

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


Split off 4.2.x branch

Split off 4.2.x branch

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

--- version.cmake
+++ version.cmake
@@ -3,9 +3,9 @@
 ###
 set ( HPCC_PROJECT "community" )
 set ( HPCC_MAJOR 4 )
-set ( HPCC_MINOR 1 )
-set ( HPCC_POINT 0 )
-set ( HPCC_MATURITY "trunk" )
+set ( HPCC_MINOR 2 )
+set ( HPCC_POINT 1 )
+set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 1 )
 ###
 IF ( ${HPCC_POINT} GREATER 65 )


Split off 7.10.62

Split off 7.10.62

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

--- version.cmake
+++ version.cmake
@@ -5,7 +5,7 @@
 set ( HPCC_PROJECT "nagios-monitoring" )
 set ( HPCC_MAJOR 7 )
 set ( HPCC_MINOR 10 )
-set ( HPCC_POINT 61 )
+set ( HPCC_POINT 63 )
 set ( HPCC_MATURITY "closedown" )
 set ( HPCC_SEQUENCE 0 )
 ###


cmake: convert python path to cmake path

--- tools/cmake/project.cmake
+++ tools/cmake/project.cmake
@@ -10,6 +10,7 @@
 # Internally, the Python interpreter is already set to 'python'. Re-set here
 # to be absolutely sure.
 set_default(PYTHON "python")
+file(TO_CMAKE_PATH ${PYTHON} PYTHON)
 idf_build_set_property(PYTHON ${PYTHON})

 # On processing, checking Python required modules can be turned off if it was


Prevents overwriting existing .torsion files.

--- Tools/CMake/torque3d.cmake
+++ Tools/CMake/torque3d.cmake
@@ -645,7 +645,9 @@
   endif()
 endif()

-CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion")
+if(NOT EXISTS "${projectOutDir}/${PROJECT_NAME}.torsion")
+    CONFIGURE_FILE("${cmakeDir}/template.torsion.in" "${projectOutDir}/${PROJECT_NAME}.torsion")
+endif()
 if(EXISTS "${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.tscript.in")
     CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/Templates/${TORQUE_TEMPLATE}/game/main.tscript.in" "${projectOutDir}/main.${TORQUE_SCRIPT_EXTENSION}")
 else()


modules: populate ${MAGNUM_LIBRARIES} before they are used.

MAGNUM_LIBRARIES are used in all Application classes. I don't know when
this got broken, but now it is fixed again.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -162,12 +162,22 @@
     set(MAGNUM_TARGET_DESKTOP_GLES 1)
 endif()

+# Dependent libraries and includes
+set(MAGNUM_INCLUDE_DIRS ${MAGNUM_INCLUDE_DIR}
+    ${MAGNUM_INCLUDE_DIR}/MagnumExternal/OpenGL
+    ${CORRADE_INCLUDE_DIR})
+set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARY}
+    ${CORRADE_UTILITY_LIBRARIES}
+    ${CORRADE_PLUGINMANAGER_LIBRARIES})
 if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
     find_package(OpenGL REQUIRED)
+    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGL_gl_LIBRARY})
 elseif(MAGNUM_TARGET_GLES2)
     find_package(OpenGLES2 REQUIRED)
+    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGLES2_LIBRARY})
 elseif(MAGNUM_TARGET_GLES3)
     find_package(OpenGLES3 REQUIRED)
+    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGLES3_LIBRARY})
 endif()

 # On Windows and in static builds, *Application libraries need to have
@@ -358,21 +368,6 @@
 find_package_handle_standard_args(Magnum
     REQUIRED_VARS MAGNUM_LIBRARY MAGNUM_INCLUDE_DIR
     HANDLE_COMPONENTS)
-
-# Dependent libraries and includes
-set(MAGNUM_INCLUDE_DIRS ${MAGNUM_INCLUDE_DIR}
-    ${MAGNUM_INCLUDE_DIR}/MagnumExternal/OpenGL
-    ${CORRADE_INCLUDE_DIR})
-set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARY}
-    ${CORRADE_UTILITY_LIBRARIES}
-    ${CORRADE_PLUGINMANAGER_LIBRARIES})
-if(NOT MAGNUM_TARGET_GLES OR MAGNUM_TARGET_DESKTOP_GLES)
-    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGL_gl_LIBRARY})
-elseif(MAGNUM_TARGET_GLES2)
-    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGLES2_LIBRARY})
-else()
-    set(MAGNUM_LIBRARIES ${MAGNUM_LIBRARIES} ${OPENGLES3_LIBRARY})
-endif()

 # Installation dirs
 include(CorradeLibSuffix)


modules: updated FindMagnum.cmake.

modules: updated FindMagnum.cmake.

--- modules/FindMagnum.cmake
+++ modules/FindMagnum.cmake
@@ -129,17 +129,30 @@
 #  MAGNUM_BINARY_INSTALL_DIR    - Binary installation directory
 #  MAGNUM_LIBRARY_INSTALL_DIR   - Library installation directory
 #  MAGNUM_DATA_INSTALL_DIR      - Data installation directory
-#  MAGNUM_PLUGINS_[DEBUG|RELEASE]_INSTALL_DIR - Plugin installation directory
-#  MAGNUM_PLUGINS_FONT_[DEBUG|RELEASE]_INSTALL_DIR - Font plugin installation
-#   directory
-#  MAGNUM_PLUGINS_FONTCONVERTER_[DEBUG|RELEASE]_INSTALL_DIR - Font converter
-#   plugin installation directory
-#  MAGNUM_PLUGINS_IMAGECONVERTER_[DEBUG|RELEASE]_INSTALL_DIR - Image converter
-#   plugin installation directory
-#  MAGNUM_PLUGINS_IMPORTER_[DEBUG|RELEASE]_INSTALL_DIR  - Importer plugin
+#  MAGNUM_PLUGINS_[DEBUG|RELEASE]_BINARY_INSTALL_DIR - Plugin binary
 #   installation directory
-#  MAGNUM_PLUGINS_AUDIOIMPORTER_[DEBUG|RELEASE]_INSTALL_DIR - Audio importer
-#   plugin installation directory
+#  MAGNUM_PLUGINS_[DEBUG|RELEASE]_LIBRARY_INSTALL_DIR - Plugin library
+#   installation directory
+#  MAGNUM_PLUGINS_FONT_[DEBUG|RELEASE]_BINARY_INSTALL_DIR - Font plugin binary
+#   installation directory
+#  MAGNUM_PLUGINS_FONT_[DEBUG|RELEASE]_LIBRARY_INSTALL_DIR - Font plugin
+#   library installation directory
+#  MAGNUM_PLUGINS_FONTCONVERTER_[DEBUG|RELEASE]_BINARY_INSTALL_DIR - Font
+#   converter plugin binary installation directory
+#  MAGNUM_PLUGINS_FONTCONVERTER_[DEBUG|RELEASE]_LIBRARY_INSTALL_DIR - Font
+#   converter plugin library installation directory
+#  MAGNUM_PLUGINS_IMAGECONVERTER_[DEBUG|RELEASE]_BINARY_INSTALL_DIR - Image
+#   converter plugin binary installation directory
+#  MAGNUM_PLUGINS_IMAGECONVERTER_[DEBUG|RELEASE]_LIBRARY_INSTALL_DIR - Image
+#   converter plugin library installation directory
+#  MAGNUM_PLUGINS_IMPORTER_[DEBUG|RELEASE]_BINARY_INSTALL_DIR  - Importer
+#   plugin binary installation directory
+#  MAGNUM_PLUGINS_IMPORTER_[DEBUG|RELEASE]_LIBRARY_INSTALL_DIR  - Importer
+#   plugin library installation directory
+#  MAGNUM_PLUGINS_AUDIOIMPORTER_[DEBUG|RELEASE]_BINARY_INSTALL_DIR - Audio
+#   importer plugin binary installation directory
+#  MAGNUM_PLUGINS_AUDIOIMPORTER_[DEBUG|RELEASE]_LIBRARY_INSTALL_DIR - Audio
+#   importer plugin library installation directory
 #  MAGNUM_INCLUDE_INSTALL_DIR   - Header installation directory
 #  MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR - Plugin header installation directory
 #
@@ -238,17 +251,24 @@
     # information to guess also build type of dynamic plugins
     if(MAGNUM_LIBRARY_DEBUG AND MAGNUM_LIBRARY_RELEASE)
         set(MAGNUM_LIBRARY ${MAGNUM_LIBRARY_RELEASE})
-        get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY_DEBUG} PATH)
+        get_filename_component(_MAGNUM_PLUGINS_DIR_PREFIX ${MAGNUM_LIBRARY_DEBUG} PATH)
         if(CMAKE_BUILD_TYPE STREQUAL "Debug")
             set(_MAGNUM_PLUGINS_DIR_SUFFIX "-d")
         endif()
     elseif(MAGNUM_LIBRARY_DEBUG)
         set(MAGNUM_LIBRARY ${MAGNUM_LIBRARY_DEBUG})
-        get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY_DEBUG} PATH)
+        get_filename_component(_MAGNUM_PLUGINS_DIR_PREFIX ${MAGNUM_LIBRARY_DEBUG} PATH)
         set(_MAGNUM_PLUGINS_DIR_SUFFIX "-d")
     elseif(MAGNUM_LIBRARY_RELEASE)
         set(MAGNUM_LIBRARY ${MAGNUM_LIBRARY_RELEASE})
-        get_filename_component(_MAGNUM_LIBRARY_PATH ${MAGNUM_LIBRARY_RELEASE} PATH)
+        get_filename_component(_MAGNUM_PLUGINS_DIR_PREFIX ${MAGNUM_LIBRARY_RELEASE} PATH)
+    endif()
+
+    # On DLL platforms the plugins are stored in bin/ instead of lib/, modify
+    # _MAGNUM_PLUGINS_DIR_PREFIX accordingly
+    if(CORRADE_TARGET_WINDOWS)
+        get_filename_component(_MAGNUM_PLUGINS_DIR_PREFIX ${_MAGNUM_PLUGINS_DIR_PREFIX} PATH)
+        set(_MAGNUM_PLUGINS_DIR_PREFIX ${_MAGNUM_PLUGINS_DIR_PREFIX}/bin)
     endif()

     if(MAGNUM_LIBRARY_RELEASE)
@@ -749,27 +769,37 @@
 set(MAGNUM_BINARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin)
 set(MAGNUM_LIBRARY_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX})
 set(MAGNUM_DATA_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/magnum)
-set(MAGNUM_PLUGINS_DEBUG_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
-set(MAGNUM_PLUGINS_RELEASE_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
-set(MAGNUM_PLUGINS_FONT_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fonts)
-set(MAGNUM_PLUGINS_FONT_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/fonts)
-set(MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/fontconverters)
-set(MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/fontconverters)
-set(MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/imageconverters)
-set(MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/imageconverters)
-set(MAGNUM_PLUGINS_IMPORTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/importers)
-set(MAGNUM_PLUGINS_IMPORTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/importers)
-set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_INSTALL_DIR}/audioimporters)
-set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_INSTALL_DIR}/audioimporters)
+set(MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_BINARY_INSTALL_DIR}/magnum-d)
+set(MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum-d)
+set(MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_BINARY_INSTALL_DIR}/magnum)
+set(MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_LIBRARY_INSTALL_DIR}/magnum)
+set(MAGNUM_PLUGINS_FONT_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR}/fonts)
+set(MAGNUM_PLUGINS_FONT_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR}/fonts)
+set(MAGNUM_PLUGINS_FONT_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR}/fonts)
+set(MAGNUM_PLUGINS_FONT_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR}/fonts)
+set(MAGNUM_PLUGINS_FONTCONVERTER_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR}/fontconverters)
+set(MAGNUM_PLUGINS_FONTCONVERTER_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR}/fontconverters)
+set(MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR}/imageconverters)
+set(MAGNUM_PLUGINS_IMAGECONVERTER_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR}/imageconverters)
+set(MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR}/imageconverters)
+set(MAGNUM_PLUGINS_IMAGECONVERTER_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR}/imageconverters)
+set(MAGNUM_PLUGINS_IMPORTER_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR}/importers)
+set(MAGNUM_PLUGINS_IMPORTER_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR}/importers)
+set(MAGNUM_PLUGINS_IMPORTER_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR}/importers)
+set(MAGNUM_PLUGINS_IMPORTER_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR}/importers)
+set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_BINARY_INSTALL_DIR}/audioimporters)
+set(MAGNUM_PLUGINS_AUDIOIMPORTER_DEBUG_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_DEBUG_LIBRARY_INSTALL_DIR}/audioimporters)
+set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_BINARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_BINARY_INSTALL_DIR}/audioimporters)
+set(MAGNUM_PLUGINS_AUDIOIMPORTER_RELEASE_LIBRARY_INSTALL_DIR ${MAGNUM_PLUGINS_RELEASE_LIBRARY_INSTALL_DIR}/audioimporters)
 set(MAGNUM_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/Magnum)
 set(MAGNUM_PLUGINS_INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/MagnumPlugins)

 # Get base plugin directory from main library location
-set(MAGNUM_PLUGINS_DEBUG_DIR ${_MAGNUM_LIBRARY_PATH}/magnum-d
+set(MAGNUM_PLUGINS_DEBUG_DIR ${_MAGNUM_PLUGINS_DIR_PREFIX}/magnum-d
     CACHE PATH "Base directory where to look for Magnum plugins for debug builds")
-set(MAGNUM_PLUGINS_RELEASE_DIR ${_MAGNUM_LIBRARY_PATH}/magnum
+set(MAGNUM_PLUGINS_RELEASE_DIR ${_MAGNUM_PLUGINS_DIR_PREFIX}/magnum
     CACHE PATH "Base directory where to look for Magnum plugins for release builds")
-set(MAGNUM_PLUGINS_DIR ${_MAGNUM_LIBRARY_PATH}/magnum${_MAGNUM_PLUGINS_DIR_SUFFIX}
+set(MAGNUM_PLUGINS_DIR ${_MAGNUM_PLUGINS_DIR_PREFIX}/magnum${_MAGNUM_PLUGINS_DIR_SUFFIX}
     CACHE PATH "Base directory where to look for Magnum plugins")

 # Plugin directories


CMake: fix up linking Boost and libbfd

CMake: fix up linking Boost and libbfd

--- CMakeOlxCommon.cmake
+++ CMakeOlxCommon.cmake
@@ -302,7 +302,7 @@

 IF(HASBFD)
 	ADD_DEFINITIONS("-DHASBFD")
-	SET(LIBS ${LIBS} bfd opcodes iberty)
+	SET(LIBS ${LIBS} dl bfd opcodes iberty)
 	INCLUDE_DIRECTORIES(/usr/include/libiberty)
 ENDIF(HASBFD)

@@ -316,8 +316,8 @@
 	# and this on newer CMake (>=2.6?)
 	#SET(LIBS ${LIBS} /usr/lib/libboost_signals.a /usr/lib/libboost_system.a)
 ELSE(BOOST_LINK_STATIC)
-	FIND_PACKAGE(Boost COMPONENTS signals REQUIRED)
-	SET(LIBS ${Boost_LIBRARIES})
+	FIND_PACKAGE(Boost COMPONENTS signals system REQUIRED)
+	SET(LIBS ${LIBS} ${Boost_LIBRARIES})
 ENDIF(BOOST_LINK_STATIC)

 IF(APPLE)


ENH: remove duplicates from list of files to download in MIDAS+CTest

SVN-Revision: 3263

--- Application/CMakeScript/MIDAS.cmake
+++ Application/CMakeScript/MIDAS.cmake
@@ -69,9 +69,8 @@

   # Substitute the downloaded file argument(s)
   foreach(arg ${ARGN})
-    if(arg MATCHES "MIDAS{[^}]*}")
-      string(REGEX MATCH "MIDAS{([^}]*)}" toReplace "${arg}")
-      string(REGEX REPLACE "MIDAS{([^}]*)}" "\\1" keyFile "${toReplace}")
+    if(arg MATCHES "^MIDAS{[^}]*}$")
+      string(REGEX REPLACE "^MIDAS{([^}]*)}$" "\\1" keyFile "${arg}")
       # Split up the checksum extension from the real filename
       string(REGEX MATCH "\\.[^\\.]*$" hash_alg "${keyFile}")
       string(REGEX REPLACE "\\.[^\\.]*$" "" base_file "${keyFile}")
@@ -126,15 +125,15 @@
 ")

       list(APPEND downloadScripts "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/download_${checksum}.cmake")
-      string(REGEX REPLACE toReplace "${MIDAS_DATA_DIR}/${base_file}" newArg "${arg}")
-      list(APPEND testArgs ${newArg})
-    else(arg MATCHES "MIDAS{[^}]*}")
+      list(APPEND testArgs "${MIDAS_DATA_DIR}/${base_file}")
+    else(arg MATCHES "^MIDAS{[^}]*}$")
       list(APPEND testArgs ${arg})
-    endif(arg MATCHES "MIDAS{[^}]*}")
+    endif(arg MATCHES "^MIDAS{[^}]*}$")
   endforeach(arg)

   file(WRITE "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake"
        "#This is an auto generated file -- do not edit\n\n")
+  list(REMOVE_DUPLICATES downloadScripts)
   foreach(downloadScript ${downloadScripts})
     file(APPEND "${MIDAS_DATA_DIR}/MIDAS_FetchScripts/${testName}_fetchData.cmake" "include(\"${downloadScript}\")\n")
   endforeach(downloadScript)
@@ -144,4 +143,4 @@
   # Finally, create the test
   add_test(${testName} ${testArgs})
   set_tests_properties(${testName} PROPERTIES DEPENDS ${testName}_fetchData)
-endfunction(midas_add_test)+endfunction(midas_add_test)


Fix finding IDL on Windows

Fix finding IDL on Windows


ENH: Add better support for internal expat for other projects

--- vtkCMakeOptions.cmake
+++ vtkCMakeOptions.cmake
@@ -95,6 +95,8 @@
 INCLUDE_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/jpeg)
 INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/tiff)
 INCLUDE_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/tiff)
+INCLUDE_DIRECTORIES(${VTK_SOURCE_DIR}/Utilities/expat)
+INCLUDE_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/expat)
 IF (NOT VTK_LIBRARY_PATH)
   LINK_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/png)
   LINK_DIRECTORIES(${VTK_BINARY_DIR}/Utilities/zlib)


The GCC visibility support is now in GenerateExportHeader.

Change-Id: Ieff70c952c516ad3e2d8be737a0c366eaa18b534

--- cmake/CompilerFlags.cmake
+++ cmake/CompilerFlags.cmake
@@ -22,32 +22,7 @@
       "-Wl,--fatal-warnings -Wl,--no-undefined -lc ${CMAKE_EXE_LINKER_FLAGS}")
   endif()

-  # Now check if we can use visibility to selectively export symbols
-  exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE
-    _gcc_version_info)
-  string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]"
-    _gcc_version "${_gcc_version_info}")
-  if(NOT _gcc_version)
-    string (REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0"
-      _gcc_version "${_gcc_version_info}")
-  endif()
-
-  # GCC visibility support, on by default and in testing.
-  check_cxx_compiler_flag(-fvisibility=hidden HAVE_GCC_VISIBILITY)
-  option(USE_COMPILER_VISIBILITY "Use GCC visibility support if available." ON)
-  mark_as_advanced(USE_COMPILER_VISIBILITY)
-
-  if(${_gcc_version} VERSION_GREATER 4.2.0 AND BUILD_SHARED_LIBS
-    AND HAVE_GCC_VISIBILITY AND USE_COMPILER_VISIBILITY
-    AND NOT MINGW AND NOT CYGWIN)
-    # Should only be set if GCC is newer than 4.2.0
-    set(ABI_CXX_FLAGS "-fvisibility=hidden -fvisibility-inlines-hidden")
-  else()
-    set(ABI_CXX_FLAGS "")
-  endif()
-
   # Set up the debug CXX_FLAGS for extra warnings
-  set(CMAKE_CXX_FLAGS "${ABI_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
     "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${CMAKE_CXX_FLAGS_WARN}")
   set(CMAKE_CXX_FLAGS_DEBUG


fixed cmake

fixed cmake

--- cmake/DetectOptions.cmake
+++ cmake/DetectOptions.cmake
@@ -122,7 +122,7 @@
 # SSC
 # SSC currently breaks the PGI compiler
 if(NOT (CMAKE_CXX_COMPILER_ID STREQUAL "PGI") AND NOT MSVC)
-    if(ZeroMQ_FOUND)
+    if(ADIOS2_HAVE_MPI)
         if(ADIOS2_USE_SSC STREQUAL AUTO)
             set(ADIOS2_HAVE_SSC TRUE)
         elseif(ADIOS2_USE_SSC)


Updated verilator definition

Updated verilator definition

--- cmake/FindVerilator.cmake
+++ cmake/FindVerilator.cmake
@@ -23,270 +23,96 @@
 #   VERILATOR_EXECUTABLE    - Verilator
 #   VERILATOR_FOUND         - true if Verilator found

-if (COMMAND _find_verilator)
+if (VERILATOR_FOUND)
     return()
 endif()

-function(verilator_target_compile_options target)
-    set(options "")
+find_package(PackageHandleStandardArgs REQUIRED)
+find_package(SystemC)

-    if (CMAKE_SYSTEM_NAME MATCHES CYGWIN)
-        list(APPEND options -std=gnu++11)
-    else()
-        list(APPEND options -std=c++11)
-    endif()
+find_program(VERILATOR_EXECUTABLE verilator
+    HINTS $ENV{VERILATOR_ROOT}
+    PATH_SUFFIXES bin
+    DOC "Path to the Verilator executable"
+)

-    list(APPEND options -fPIC)
+find_program(VERILATOR_COVERAGE_EXECUTABLE verilator_coverage
+    HINTS $ENV{VERILATOR_ROOT}
+    PATH_SUFFIXES bin
+    DOC "Path to the Verilator coverage executable"
+)

-    if (LTO)
-        list(APPEND options -flto)
-    endif()
+get_filename_component(VERILATOR_EXECUTABLE_DIR ${VERILATOR_EXECUTABLE}
+    DIRECTORY)

-    if (LOGIC_WARNINGS_INTO_ERRORS)
-        list(APPEND options -Werror)
-    endif()
+find_path(VERILATOR_INCLUDE_DIR verilated.h
+    HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_EXECUTABLE_DIR}/..
+    PATH_SUFFIXES include share/verilator/include
+    DOC "Path to the Verilator headers"
+)

-    if (CMAKE_BUILD_TYPE MATCHES "Release" OR NOT CMAKE_BUILD_TYPE)
-        list(APPEND options
-            -O2
-            -s
-            -DNDEBUG
-            -fdata-sections
-            -ffunction-sections
-        )
-    elseif (CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
-        list(APPEND options
-            -Os
-            -DNDEBUG
-            -fdata-sections
-            -ffunction-sections
-        )
-    elseif (CMAKE_BUILD_TYPE MATCHES "Coverage")
-        list(APPEND options
-            -O0
-            -g
-            --coverage
-        )
-    endif()
+mark_as_advanced(VERILATOR_EXECUTABLE)
+mark_as_advanced(VERILATOR_COVERAGE_EXECUTABLE)
+mark_as_advanced(VERILATOR_INCLUDE_DIR)

-    list(APPEND options
-        -fstrict-aliasing
-        -pedantic
-        -Wall
-        -Wcast-qual
-        -Wcomments
-        -Wconversion
-        -Wctor-dtor-privacy
-        -Wdisabled-optimization
-        -Wendif-labels
-        -Wenum-compare
-        -Wfloat-equal
-        -Wformat=2
-        -Wformat-nonliteral
-        -Winit-self
-        -Winvalid-pch
-        -Wlogical-op
-        -Wmissing-declarations
-        -Wmissing-include-dirs
-        -Wno-long-long
-        -Wnon-virtual-dtor
-        -Wold-style-cast
-        -Woverloaded-virtual
-        -Wpacked
-        -Wparentheses
-        -Wpointer-arith
-        #-Wredundant-decls
-        -Wshadow
-        -Wsign-conversion
-        -Wsign-promo
-        -Wstack-protector
-        -Wstrict-null-sentinel
-        -Wstrict-overflow=2
-        -Wsuggest-attribute=noreturn
-        -Wswitch-default
-        -Wswitch-enum
-        -Wundef
-        -Wuninitialized
-        -Wunknown-pragmas
-        -Wunused
-        -Wunused-function
-        -Wwrite-strings
+find_package_handle_standard_args(Verilator REQUIRED_VARS
+    VERILATOR_EXECUTABLE VERILATOR_COVERAGE_EXECUTABLE VERILATOR_INCLUDE_DIR)
+
+add_library(verilated STATIC
+    ${VERILATOR_INCLUDE_DIR}/verilated.cpp
+    ${VERILATOR_INCLUDE_DIR}/verilated_cov.cpp
+    ${VERILATOR_INCLUDE_DIR}/verilated_dpi.cpp
+    ${VERILATOR_INCLUDE_DIR}/verilated_vcd_c.cpp
+    ${VERILATOR_INCLUDE_DIR}/verilated_vcd_sc.cpp
+)
+
+set_source_files_properties(
+    ${VERILATOR_INCLUDE_DIR}/verilated_cov.cpp
+    PROPERTIES
+    COMPILE_DEFINITIONS "VM_COVERAGE=1"
+)
+
+target_link_libraries(verilated PRIVATE systemc)
+
+set_target_properties(verilated PROPERTIES
+    ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
+    LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
+)
+
+target_include_directories(verilated SYSTEM PRIVATE
+    ${VERILATOR_INCLUDE_DIR}
+    ${VERILATOR_INCLUDE_DIR}/vltstd
+    ${SYSTEMC_INCLUDE_DIRS}
+)
+
+if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
+    target_compile_options(verilated PRIVATE
+        -Wno-attributes
+        -Wno-cast-qual
+        -Wno-cast-equal
+        -Wno-float-equal
+        -Wno-suggest-override
+        -Wno-conversion
+        -Wno-unused-parameter
+        -Wno-effc++
+        -Wno-format
+        -Wno-format-nonliteral
+        -Wno-missing-declarations
+        -Wno-old-style-cast
+        -Wno-shadow
+        -Wno-sign-conversion
+        -Wno-strict-overflow
+        -Wno-suggest-attribute=noreturn
+        -Wno-suggest-final-methods
+        -Wno-suggest-final-types
+        -Wno-switch-default
+        -Wno-switch-enum
+        -Wno-undef
+        -Wno-inline
+        -Wno-variadic-macros
+        -Wno-suggest-attribute=format
+        -Wno-zero-as-null-pointer-constant
     )
-
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
-        list(APPEND options
-            -Wduplicated-cond
-            -Whsa
-            -Wignored-attributes
-            -Wmisleading-indentation
-            -Wnull-dereference
-            -Wplacement-new=2
-            -Wshift-negative-value
-            -Wshift-overflow=2
-            -Wvirtual-inheritance
-        )
-    endif()
-
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
-        list(APPEND options
-            -Wdouble-promotion
-            -Wsized-deallocation
-            -Wsuggest-override
-            -Wtrampolines
-            -Wvector-operation-performance
-            -Wzero-as-null-pointer-constant
-        )
-    endif()
-
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
-        list(APPEND options
-            -Wconditionally-supported
-            -Wdate-time
-            -Weffc++
-            -Wextra
-            -Winline
-            -Wopenmp-simd
-        )
-    endif()
-
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
-        list(APPEND options
-            -Wpedantic
-            -Wsuggest-attribute=format
-        )
-    endif()
-
-    if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
-        list(APPEND options
-            -Wnoexcept
-        )
-    endif()
-
-    target_compile_options(${target} PRIVATE ${options} ${ARGN})
-endfunction()
-
-function(_find_verilator)
-    find_package(PackageHandleStandardArgs REQUIRED)
-    find_package(SystemC)
-
-    find_program(VERILATOR_EXECUTABLE verilator
-        HINTS $ENV{VERILATOR_ROOT} /usr/local/bin
-        PATH_SUFFIXES bin
-        DOC "Path to the Verilator executable"
-    )
-
-   	if(VERILATOR_EXECUTABLE STREQUAL VERILATOR_EXECUTABLE-NOTFOUND)
-   		set(VERILATOR_FOUND FALSE PARENT_SCOPE)
-	else()
-	    find_program(VERILATOR_COVERAGE_EXECUTABLE verilator_coverage
-	        HINTS $ENV{VERILATOR_ROOT} /usr/local/bin
-	        PATH_SUFFIXES bin
-	        DOC "Path to the Verilator coverage executable"
-	    )
-
-	    get_filename_component(VERILATOR_EXECUTABLE_DIR ${VERILATOR_EXECUTABLE}
-	        DIRECTORY)
-
-	    find_path(VERILATOR_INCLUDE_DIR verilated.h
-	        HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_EXECUTABLE_DIR}/.. /usr/local
-	        PATH_SUFFIXES include share/verilator/include
-	        DOC "Path to the Verilator headers"
-	    )
-	   	if(VERILATOR_INCLUDE_DIR STREQUAL VERILATOR_INCLUDE_DIR-NOTFOUND)
-	    	message( FATAL_ERROR "verilator include files not found." )
-		endif()
-
-	    mark_as_advanced(VERILATOR_EXECUTABLE)
-	    mark_as_advanced(VERILATOR_COVERAGE_EXECUTABLE)
-	    mark_as_advanced(VERILATOR_INCLUDE_DIR)
-
-	    find_package_handle_standard_args(Verilator REQUIRED_VARS
-	        VERILATOR_EXECUTABLE VERILATOR_COVERAGE_EXECUTABLE VERILATOR_INCLUDE_DIR)
-
-	    if (WIN32)
-	        set(library_policy STATIC)
-	    else()
-	        set(library_policy SHARED)
-	    endif()
-
-	    add_library(verilated ${library_policy}
-	        ${VERILATOR_INCLUDE_DIR}/verilated.cpp
-	        ${VERILATOR_INCLUDE_DIR}/verilated_cov.cpp
-	        ${VERILATOR_INCLUDE_DIR}/verilated_dpi.cpp
-	        ${VERILATOR_INCLUDE_DIR}/verilated_vcd_c.cpp
-	        ${VERILATOR_INCLUDE_DIR}/verilated_vcd_sc.cpp
-	        ${CMAKE_CURRENT_LIST_DIR}/../src/verilator_callbacks.cpp
-	    )
-
-	    set_target_properties(verilated PROPERTIES
-	        ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
-	        LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
-	        RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
-	    )
-
-	    set_source_files_properties(
-	        ${VERILATOR_INCLUDE_DIR}/verilated.cpp
-	        PROPERTIES
-	            COMPILE_DEFINITIONS "VL_USER_STOP;VL_USER_FINISH"
-	    )
-
-	    set_source_files_properties(
-	        ${VERILATOR_INCLUDE_DIR}/verilated_cov.cpp
-	        PROPERTIES
-	            COMPILE_DEFINITIONS "VM_COVERAGE=1"
-	    )
-
-	    target_link_libraries(verilated PRIVATE systemc)
-
-	    set_target_properties(verilated PROPERTIES
-	        ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
-	        LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
-	    )
-
-	    target_include_directories(verilated SYSTEM PRIVATE
-	        ${VERILATOR_INCLUDE_DIR}
-	        ${VERILATOR_INCLUDE_DIR}/vltstd
-	        ${SYSTEMC_INCLUDE_DIRS}
-	    )
-
-	    if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
-	        verilator_target_compile_options(verilated PRIVATE
-	            -Wno-attributes
-	            -Wno-cast-qual
-	            -Wno-float-equal
-	            -Wno-suggest-override
-	            -Wno-conversion
-	            -Wno-unused-parameter
-	            -Wno-effc++
-	            -Wno-format
-	            -Wno-format-nonliteral
-	            -Wno-missing-declarations
-	            -Wno-old-style-cast
-	            -Wno-shadow
-	            -Wno-sign-conversion
-	            -Wno-strict-overflow
-	            -Wno-suggest-attribute=noreturn
-	            -Wno-suggest-final-methods
-	            -Wno-suggest-final-types
-	            -Wno-switch-default
-	            -Wno-switch-enum
-	            -Wno-undef
-	            -Wno-inline
-	            -Wno-variadic-macros
-	            -Wno-suggest-attribute=format
-	            -Wno-zero-as-null-pointer-constant
-	        )
-	    elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
-	        verilator_target_compile_options(verilated PRIVATE -Wno-everything)
-	    endif()
-
-	    set(VERILATOR_FOUND ${VERILATOR_FOUND} PARENT_SCOPE)
-	    set(VERILATOR_EXECUTABLE "${VERILATOR_EXECUTABLE}" PARENT_SCOPE)
-	    set(VERILATOR_INCLUDE_DIR "${VERILATOR_INCLUDE_DIR}" PARENT_SCOPE)
-	    set(VERILATOR_COVERAGE_EXECUTABLE "${VERILATOR_COVERAGE_EXECUTABLE}" PARENT_SCOPE)
-
-	endif()
-
-endfunction()
-
-_find_verilator()
+elseif (CMAKE_CXX_COMPILER_ID MATCHES Clang)
+    target_compile_options(verilated PRIVATE -Wno-everything)
+endif()


Updated XLink with MinGW fixes

Updated XLink with MinGW fixes

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4-master"
-    URL "https://github.com/luxonis/XLink/archive/09fcfc93ca7060b07fe21db7371fc83e04a257f3.tar.gz"
-    SHA1 "7c8a947e80aaab7ceeb615001349f44e4162af4a"
+    URL "https://github.com/luxonis/XLink/archive/1eaa307a3f0b5c390ee10c23daaf5fa45aa974e5.tar.gz"
+    SHA1 "a49bcb57db604e11fcfcf8fb6318b69c756735fe"
 )

 hunter_config(


Updated XLink

Updated XLink

--- cmake/Hunter/config.cmake
+++ cmake/Hunter/config.cmake
@@ -8,8 +8,8 @@
 hunter_config(
     XLink
     VERSION "luxonis-2021.4-master"
-    URL "https://github.com/luxonis/XLink/archive/eef5a51c608fef8e326c740f120b90a543e55b27.tar.gz"
-    SHA1 "9f3b7f04383331fb3a57a4d41bfeb265334776fa"
+    URL "https://github.com/luxonis/XLink/archive/93c6124f7a541a25cf296fea156296bc9ed2a24d.tar.gz"
+    SHA1 "d671cdf7935c5a1b1c408fd82d1f11630090eced"
 )

 hunter_config(


Fix cmake syntax error.

Fix cmake syntax error.

--- cmake/OpenSimMacros.cmake
+++ cmake/OpenSimMacros.cmake
@@ -355,7 +355,7 @@
         endif()
 	set(DEST_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR})
 	add_custom_command(OUTPUT ${DLLS}
-	                   COMMAND ${CMAKE_COMMAND -E make_directory ${DEST_DIR}
+	                   COMMAND ${CMAKE_COMMAND} -E make_directory ${DEST_DIR}
                            COMMAND ${CMAKE_COMMAND} -E copy ${DLLS} ${DEST_DIR}
                            COMMENT "Copying ${DLLS} to ${DEST_DIR}.")
         add_custom_target(Copy_${DEP_NAME}_DLLs ALL DEPENDS ${DLLS})


Set some more default compile flags.

Set some more default compile flags.

--- cmake/compile_flags.cmake
+++ cmake/compile_flags.cmake
@@ -8,10 +8,10 @@
                     /wd5027 /wd4710 /wd4668 /wd4711 /wd4548 /wd4868 /wd4571)
         set(debug /WX)
     elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
-        set(release -Wall -Wextra -pedantic -Wshadow)
+        set(release -Wall -Wextra -pedantic -Wshadow -Wabi)
         set(debug -Werror)
     elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
-        set(release -Weverything -Wno-system-headers -Wno-c++98-compat
+        set(release -Weverything -Wno-system-headers -Wabi -Wno-c++98-compat
                     -Wno-c++98-compat-pedantic -Wno-exit-time-destructors
                     -Wno-global-constructors -Wno-missing-prototypes
                     -Wno-padded -Wno-documentation-unknown-command)
@@ -22,8 +22,8 @@
                         "Detected id is '${CMAKE_CXX_COMPILER_ID}'.")
     endif()

-    target_compile_options(${target_name} PUBLIC ${release})
-    target_compile_options(${target_name} PUBLIC $<$<CONFIG:Debug>:${debug}>)
+    target_compile_options(${target_name} PRIVATE ${release})
+    target_compile_options(${target_name} PRIVATE $<$<CONFIG:Debug>:${debug}>)
 endfunction(enable_strict_warnings)

 # Disablee all warnings.
@@ -39,6 +39,25 @@
     endif()
 endfunction(disable_warnings)

+# Set the default compile flags.
+#
+# - target_name Name of the configured target.
+function(set_default_flags target_name)
+    if(${CMAKE_CXX_COMPILER_ID} STREQUAL MSVC)
+        set(flags /MP /GF /Za)
+    elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
+        set(flags -fpic)
+    elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL Clang)
+        set(flags -fpic)
+    else()
+        message(WARNING "Custom compiler flags not set.\n"
+                        "Your compiler is not supported.\n"
+                        "Detected id is '${CMAKE_CXX_COMPILER_ID}'.")
+    endif()
+
+    target_compile_options(${target_name} PRIVATE ${flags})
+endfunction(set_default_flags)
+
 # Set the required C++ standard version (ie. C++14).
 #
 # - target_name Name of the configured target.
@@ -53,4 +72,5 @@
 function(configure_compiler target_name)
     enable_strict_warnings(${target_name})
     set_cpp_standard(${target_name})
+    set_default_flags(${target_name})
 endfunction(configure_compiler)


Since pkg_check_pkgconfig now automatically converts its link flags to the
preferred CMake form using the cmake_link_flags macro, the special logic to
do this in the libLASi case may be removed/simplified.

svn path=/trunk/; revision=8179

--- cmake/modules/psttf.cmake
+++ cmake/modules/psttf.cmake
@@ -27,8 +27,6 @@
 #			    compile psttf device driver.
 # psttf_LINK_FLAGS     	  - list of LINK_FLAGS for dynamic psttf device driver.
 # psttf_RPATH	       	  - RPATH directory list for psttf device driver.
-# psttf_TARGETS	       	  - Full Name of libLASi so that cmake can figure out
-# 		       	    RPATH stuff in the build tree.
 # DRIVERS_LINK_FLAGS  	  - list of device LINK_FLAGS and TARGETS for case
 # 			    when ENABLE_DYNDRIVERS OFF.

@@ -49,27 +47,13 @@
 endif(PLD_psttf)

 if(PLD_psttf)
-  pkg_check_pkgconfig("lasi;pangoft2;pango" includedir libdir linkflags cflags _PSTTF)
+  pkg_check_pkgconfig(lasi includedir libdir linkflags cflags _PSTTF)
   if(linkflags)
     #blank-separated required.
     string(REGEX REPLACE ";" " " psttf_COMPILE_FLAGS "${cflags}")
-    set(psttf_LINK_FLAGS "${linkflags}")
+    set(psttf_LINK_FLAGS ${linkflags})
     set(psttf_RPATH ${libdir})
-    # Put libLASI pkg-config information into a form that
-    # target_link_libraries can interpret properly with respect to RPATH
-    # for the build tree.
-    find_library(psttf_TARGETS LASi ${psttf_RPATH})
-    if(NOT psttf_TARGETS)
-      message(FATAL_ERROR
-         "libLASi not in location specified by pkg-config."
-      )
-    endif(NOT psttf_TARGETS)
-    get_filename_component(psttf_RPATH ${psttf_TARGETS} PATH)
-    set(DRIVERS_LINK_FLAGS
-    ${DRIVERS_LINK_FLAGS}
-    ${psttf_LINK_FLAGS}
-    ${psttf_TARGETS}
-    )
+    list(APPEND DRIVERS_LINK_FLAGS ${psttf_LINK_FLAGS})
   else(linkflags)
     message("includedir = ${includedir}")
     message("libdir = ${libdir}")


cmake: qi_stage_cmake also installs the generated files:)

Nice, isn't it ?

--- cmake/qibuild/stage.cmake
+++ cmake/qibuild/stage.cmake
@@ -46,5 +46,11 @@
   file(COPY "${_module}Config.cmake"
        DESTINATION
        "${CMAKE_BINARY_DIR}/sdk/${QI_SDK_CMAKE_MODULES}/")
- #TODO: install
+
+  get_filename_component(_name ${CMAKE_CURRENT_SOURCE_DIR}/${_module} NAME)
+
+  install(FILES "${_module}Config.cmake"
+      DESTINATION
+      "${QI_SDK_CMAKE}/${_name}/"
+  )
 endfunction()


nxphlite-v3:incorperate master's led changes

--- cmake/configs/nuttx_nxphlite-v3_default.cmake
+++ cmake/configs/nuttx_nxphlite-v3_default.cmake
@@ -136,24 +136,27 @@
 	# Libraries
 	#
 	lib/controllib
-	lib/mathlib
-	lib/mathlib/math/filter
-	lib/rc
+	lib/conversion
+	lib/DriverFramework/framework
 	lib/ecl
 	lib/external_lgpl
 	lib/geo
 	lib/geo_lookup
-	lib/conversion
 	lib/launchdetection
-	lib/terrain_estimation
+	lib/led
+	lib/mathlib
+	lib/mathlib/math/filter
+	lib/rc
 	lib/runway_takeoff
 	lib/tailsitter_recovery
+	lib/terrain_estimation
 	lib/version
-	lib/DriverFramework/framework
+
+	#
+	# Platform
+	#
+	platforms/common
 	platforms/nuttx
-
-	# had to add for cmake, not sure why wasn't in original config
-	platforms/common
 	platforms/nuttx/px4_layer

 	#


Hard-code VeloView's VTK dir to Paraview's one

--- Superbuild/Projects/veloview.cmake
+++ Superbuild/Projects/veloview.cmake
@@ -6,4 +6,5 @@
     -DParaView_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build
     -DEIGEN_INCLUDE_DIR:PATH=<INSTALL_DIR>/include/eigen3
     -DPYTHONQT_DIR:PATH=<INSTALL_DIR>
+    -DVTK_DIR:PATH=${SuperBuild_BINARY_DIR}/paraview/src/paraview-build/VTK
 )


Allow CPack generator to be set on the cmdline

Allow commandline Cpack generator setting arguments to override default so we are not forced to always build debs on rpm based systems or vise versa

--- src/ibp/cmake/LStoreCommon.cmake
+++ src/ibp/cmake/LStoreCommon.cmake
@@ -123,8 +123,12 @@
 # Below is used for building packages
 set(CPACK_PACKAGE_NAME "accre-${LSTORE_PROJECT_NAME}")
 set(CPACK_PACKAGE_VERSION "${LSTORE_PROJECT_VERSION}")
-set(CPACK_GENERATOR "RPM;DEB")
-set(CPACK_SOURCE_GENERATOR "RPM;DEB")
+if(NOT DEFINED CPACK_GENERATOR)
+    set(CPACK_GENERATOR "RPM;DEB")
+endif(NOT DEFINED CPACK_GENERATOR)
+if(NOT DEFINED CPACK_SOURCE_GENERATOR)
+    set(CPACK_SOURCE_GENERATOR "RPM;DEB")
+endif(NOT DEFINED CPACK_SOURCE_GENERATOR)
 set(CPACK_PACKAGE_RELEASE ${LSTORE_PROJECT_REVISION})
 set(CPACK_PACKAGE_CONTACT "Andrew Melo or Alan Tackett")
 set(CPACK_PACKAGE_VENDOR "Advanced Computing Center for Research and Education, Vanderbilt University")


Add revision back to build name for now, add branch to xml as well

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

--- tests/run_testsuite.cmake
+++ tests/run_testsuite.cmake
@@ -281,7 +281,7 @@
   STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
   STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
   STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
-  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}")
+  SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}-r${_svn_WC_REVISION}")
 ENDIF()

 #
@@ -390,7 +390,7 @@
 ENDIF()
 FILE(GLOB _xml_files ${_path}/*.xml)
 EXECUTE_PROCESS(COMMAND sed -i -e
-  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"\\n\\tSVNRevision=\"${_svn_WC_REVISION}\"/g
+  s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"\\n\\tSVNBranch=\"${_branch}\"\\n\\tSVNRevision=\"${_svn_WC_REVISION}\"/g
   ${_xml_files}
   OUTPUT_QUIET RESULT_VARIABLE  _res
   )


Fixed directory path

Fixed directory path

--- CMakeModules/CodeCoverage.cmake
+++ CMakeModules/CodeCoverage.cmake
@@ -145,13 +145,13 @@
 	ADD_CUSTOM_TARGET(${_targetname}

 		# Cleanup lcov
-		${LCOV_PATH} --directory .. --zerocounters
+		${LCOV_PATH} --directory . --zerocounters

 		# Run tests
 		COMMAND ${test_command} ${ARGV3}

 		# Capturing lcov counters and generating report
-		COMMAND ${LCOV_PATH} --directory .. --capture --output-file ${coverage_info}
+		COMMAND ${LCOV_PATH} --directory . --capture --output-file ${coverage_info}
 		COMMAND ${LCOV_PATH} --remove ${coverage_info} 'tests/*' '/usr/*' ${LCOV_REMOVE_EXTRA} --output-file ${coverage_cleaned}
 		COMMAND ${GENHTML_PATH} -o ${_outputname} ${coverage_cleaned}
 		COMMAND ${CMAKE_COMMAND} -E remove ${coverage_info} ${coverage_cleaned}
@@ -201,4 +201,3 @@
 	)

 ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
-


Fixed bugs in FindSystemdJournal and extended it to detect the new libsystemd library

--- cmake/Modules/FindSystemdJournal.cmake
+++ cmake/Modules/FindSystemdJournal.cmake
@@ -17,17 +17,20 @@

   if (PKG_CONFIG_FOUND)
     pkg_check_modules(_LIBSYSTEMD_JOURNAL_PC QUIET "libsystemd-journal")
-    pkg_check_modules(LIBSYSTEMD_ID128 QUIET "libsystemd-id128")
+    pkg_check_modules(_LIBSYSTEMD_ID128_PC QUIET "libsystemd-id128")
+    pkg_check_modules(_LIBSYSTEMD_PC QUIET "libsystemd")
   endif (PKG_CONFIG_FOUND)

   find_path (LIBSYSTEMD_JOURNAL_INCLUDE_DIR systemd/sd-journal.h
     ${_LIBSYSTEMD_JOURNAL_PC_INCLUDE_DIRS}
+    ${_LIBSYSTEMD_PC_INCLUDE_DIRS}
     /usr/include
     /usr/local/include
   )
-
+
   find_path (LIBSYSTEMD_ID128_INCLUDE_DIR systemd/sd-id128.h
     ${_LIBSYSTEMD_ID128_PC_INCLUDE_DIRS}
+    ${_LIBSYSTEMD_PC_INCLUDE_DIRS}
     /usr/include
     /usr/local/include
   )
@@ -35,9 +38,16 @@
   find_library (LIBSYSTEMD_JOURNAL_LIBRARIES NAMES systemd-journal systemd-id128
     PATHS
     ${_LIBSYSTEMD_JOURNAL_PC_LIBDIR}
+    ${_LIBSYSTEMD_ID128_PC_LIBDIR}
   )

-
+  # at least on newer versions of debian the libraries have been merged
+  if (NOT LIBSYSTEMD_JOURNAL_LIBRARIES)
+    find_library (LIBSYSTEMD_JOURNAL_LIBRARIES NAMES systemd
+      PATHS
+      ${_LIBSYSTEMD_PC_LIBDIR}
+    )
+  endif (NOT LIBSYSTEMD_JOURNAL_LIBRARIES)

   if (LIBSYSTEMD_JOURNAL_INCLUDE_DIR AND LIBSYSTEMD_ID128_INCLUDE_DIR AND LIBSYSTEMD_JOURNAL_LIBRARIES)


Remove std=c++11 in CUDA project module.

--- cmake/TbagModule/TbagProjectCUDA.cmake
+++ cmake/TbagModule/TbagProjectCUDA.cmake
@@ -9,8 +9,8 @@

 if (CUDA_FOUND)
     cuda_include_directories (${TBAG_PROJECT_INCLUDE_DIRS})
-    if ("${CMAKE_CXX_STANDARD}" STREQUAL "11" AND NOT "${CUDA_NVCC_FLAGS}" MATCHES "[ ;]-std=c\\+\\+11[ ;]")
-        set (CUDA_NVCC_FLAGS "-std=c++11 ${CUDA_NVCC_FLAGS}")
-    endif ()
+    #if ("${CMAKE_CXX_STANDARD}" STREQUAL "11" AND NOT "${CUDA_NVCC_FLAGS}" MATCHES "-std=c\\+\\+11")
+    #    set (CUDA_NVCC_FLAGS "-std=c++11 ${CUDA_NVCC_FLAGS}")
+    #endif ()
 endif ()


do not use system for generated messages or configs (#182)

--- cmake/dynamic_reconfigure-macros.cmake
+++ cmake/dynamic_reconfigure-macros.cmake
@@ -113,7 +113,7 @@

     # make sure we can find generated messages and that they overlay all other includes
     # Use system to skip warnings from these includes
-    include_directories(SYSTEM BEFORE ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION})
+    include_directories(BEFORE ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION})
     # pass the include directory to catkin_package()
     list(APPEND ${PROJECT_NAME}_INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION})
     # ensure that the folder exists


build(cmake/modules): upgrade libs and drivers version to 13ec67ebd23417273275296813066e07cb85bc91

Signed-off-by: Leonardo Grasso <b1c1d8736f20db3fb6c1c66bb1455ed43909f0d8@leonardograsso.com>

--- cmake/modules/falcosecurity-libs.cmake
+++ cmake/modules/falcosecurity-libs.cmake
@@ -20,8 +20,8 @@
 # default below In case you want to test against another falcosecurity/libs version just pass the variable - ie., `cmake
 # -DFALCOSECURITY_LIBS_VERSION=dev ..`
 if(NOT FALCOSECURITY_LIBS_VERSION)
-  set(FALCOSECURITY_LIBS_VERSION "build/upgrade-deps")
-  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=087837c7d8c4a2756b2f2110e53eb8218c603d8dc8e98155a9d072ed1112502b")
+  set(FALCOSECURITY_LIBS_VERSION "13ec67ebd23417273275296813066e07cb85bc91")
+  set(FALCOSECURITY_LIBS_CHECKSUM "SHA256=c2cc1c17af98cef1fa958841da3cfc480774190b5cebc503faf4184cf2b2abfa")
 endif()

 # cd /path/to/build && cmake /path/to/source


Install debug libraries in the same location on Windows as on Linux.

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

--- CMake/BuildFunctions.cmake
+++ CMake/BuildFunctions.cmake
@@ -556,9 +556,9 @@

         INSTALL(TARGETS ${PROJECT_NAME}
                 CONFIGURATIONS Debug
-                RUNTIME DESTINATION lib/dbg
-                LIBRARY DESTINATION lib/dbg
-                ARCHIVE DESTINATION lib/dbg)
+                RUNTIME DESTINATION lib/debug
+                LIBRARY DESTINATION lib/debug
+                ARCHIVE DESTINATION lib/debug)

         INSTALL(TARGETS ${PROJECT_NAME}
                 CONFIGURATIONS DebugRT


Intall generated libraries

Intall generated libraries

Change-Id: I35a1f8ff41291d058a2d3cf423fb8327438d7520

--- CMake/modelLibraries.cmake
+++ CMake/modelLibraries.cmake
@@ -35,29 +35,31 @@

   find_package(PkgConfig)

+  ###############################################################
+  # Dependencies
+  ###############################################################
+
   set (GST_REQUIRED 1.3.3)

   set (JSONRPC_REQUIRED 0.0.6)
   set (SIGCPP_REQUIRED 2.0.10)
   set (GLIBMM_REQUIRED 2.37)

-  #gst-plugins dependencies
   pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0>=${GST_REQUIRED})

-  #server dependencies
   pkg_check_modules(JSONRPC REQUIRED libjsonrpc>=${JSONRPC_REQUIRED})
   pkg_check_modules(SIGCPP REQUIRED sigc++-2.0>=${SIGCPP_REQUIRED})
   pkg_check_modules(GLIBMM REQUIRED glibmm-2.4>=${GLIBMM_REQUIRED})

-  set (PARAM_SERVER_IMPL_LIB_EXTRA_INCLUDE_DIRS
-    ${PARAM_SERVER_IMPL_LIB_EXTRA_INCLUDE_DIRS}
-    ${PARAM_INTERFACE_LIB_EXTRA_INCLUDE_DIRS}
-  )
+  ###############################################################
+  # Interface library
+  ###############################################################

   set(GEN_FILES_DIR ${CMAKE_CURRENT_BINARY_DIR}/interface/generated-cpp)

   set(INTERFACE_TEMPLATES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/interface/templates/cpp_interface)

+  #Generate source for public interface files
   generate_sources (
     MODELS ${PARAM_MODELS}
     GEN_FILES_DIR ${GEN_FILES_DIR}
@@ -68,6 +70,7 @@

   set(INTERFACE_INTERNAL_TEMPLATES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/interface/templates/cpp_interface_internal)

+  #Generate source for internal interface files
   generate_sources (
     MODELS ${PARAM_MODELS}
     GEN_FILES_DIR ${GEN_FILES_DIR}
@@ -76,6 +79,7 @@
     HEADER_FILES_OUTPUT INTERFACE_INTERNAL_GENERATED_HEADERS
   )

+  #Generate source for internal interface files
   add_library (kms-core-interface
     ${PARAM_INTERFACE_LIB_EXTRA_SOURCES}
     ${PARAM_INTERFACE_LIB_EXTRA_HEADERS}
@@ -98,15 +102,36 @@
       ${PARAM_INTERFACE_LIB_EXTRA_INCLUDE_DIRS}
   )

-  set_property(TARGET kms-core-interface
-    PROPERTY  COMPILE_FLAGS "-fPIC"
-  )
-
-  set(MODEL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/interface)
+  set(CUSTOM_PREFIX "kurento")
+  set(INCLUDE_PREFIX "${CMAKE_INSTALL_INCLUDEDIR}/${CUSTOM_PREFIX}/modules/core")
+
+  set_property (TARGET kms-core-interface
+    PROPERTY PUBLIC_HEADER
+      ${PARAM_INTERFACE_LIB_EXTRA_HEADERS}
+      ${INTERFACE_GENERATED_HEADERS}
+  )
+
+  set_target_properties(kms-core-interface PROPERTIES
+    VERSION ${PROJECT_VERSION}
+    SOVERSION ${PROJECT_VERSION_MAJOR}
+    COMPILE_FLAGS "-fPIC"
+  )
+
+  install(TARGETS kms-core-interface
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    PUBLIC_HEADER DESTINATION ${INCLUDE_PREFIX}
+  )
+
+  ###############################################################
+  # Server implementation library
+  ###############################################################

   set(SERVER_INTERNAL_GEN_FILES_DIR ${CMAKE_CURRENT_BINARY_DIR}/implementation/generated-cpp)
   set(SERVER_INTERNAL_TEMPLATES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/implementation/templates/cpp_server_internal)

+  # Generate internal server files
   generate_sources (
     MODELS ${PARAM_MODELS}
     GEN_FILES_DIR ${SERVER_INTERNAL_GEN_FILES_DIR}
@@ -118,6 +143,7 @@
   set(MODULE_GEN_FILES_DIR ${CMAKE_CURRENT_BINARY_DIR}/implementation/generated-cpp)
   set(MODULE_TEMPLATES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/implementation/templates/cpp_module)

+  # Generate stub files
   generate_sources (
     MODELS ${PARAM_MODELS}
     GEN_FILES_DIR ${MODULE_GEN_FILES_DIR}
@@ -129,6 +155,7 @@
   set(SERVER_GEN_FILES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/implementation/generated-cpp)
   set(SERVER_TEMPLATES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/implementation/templates/cpp_server)

+  # Generate public server files
   # TODO: Add an option to not delete the code if already exists
   generate_sources (
     MODELS ${PARAM_MODELS}
@@ -159,6 +186,35 @@
     ${GSTREAMER_LIBRARIES}
     ${PARAM_SERVER_IMPL_LIB_EXTRA_LIBRARIES}
     kms-core-interface
+  )
+
+  set (SERVER_PUBLIC_HEADERS
+    ${PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS}
+    ${SERVER_GENERATED_HEADERS}
+  )
+
+  set_property (TARGET kms-core-impl
+    PROPERTY PUBLIC_HEADER
+      ${PARAM_SERVER_IMPL_LIB_EXTRA_HEADERS}
+      ${SERVER_GENERATED_HEADERS}
+  )
+
+  set_target_properties(kms-core-impl PROPERTIES
+    VERSION ${PROJECT_VERSION}
+    SOVERSION ${PROJECT_VERSION_MAJOR}
+  )
+
+  install(
+    TARGETS kms-core-impl
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+    PUBLIC_HEADER DESTINATION ${INCLUDE_PREFIX}
+  )
+
+  set (PARAM_SERVER_IMPL_LIB_EXTRA_INCLUDE_DIRS
+    ${PARAM_SERVER_IMPL_LIB_EXTRA_INCLUDE_DIRS}
+    ${PARAM_INTERFACE_LIB_EXTRA_INCLUDE_DIRS}
   )

   set_property (TARGET kms-core-impl
@@ -172,6 +228,9 @@
       ${CMAKE_CURRENT_BINARY_DIR}/interface/generated-cpp
   )

+  ###############################################################
+  # Server module
+  ###############################################################
   add_library (kms-core-module MODULE
     ${MODULE_GENERATED_SOURCES}
     ${MODULE_GENERATED_HEADERS}
@@ -195,4 +254,11 @@
       ${CMAKE_CURRENT_BINARY_DIR}/interface/generated-cpp
   )

+  install(
+    TARGETS kms-core-module
+    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CUSTOM_PREFIX}/modules
+    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CUSTOM_PREFIX}/modules
+  )
+
 endfunction()


CMake: only reformat text, move to clearer location

only cleanup,

--- CommonCompilerConfig.cmake
+++ CommonCompilerConfig.cmake
@@ -277,21 +277,6 @@

-#TODO: CMake automatically generates optimisation flags. Do we need this?
-	set(optimization_flags_cc ${optimization_flags_cc} -O2)
-	set(optimization_flags_cc -pipe ${optimization_flags_cc}) #TODO use -Ofast instead of -O3
-	set(optimization_flags_lt -O2 ${optimization_flags_lt})
-	if(NOT ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l")
-		set(optimization_flags_cc ${optimization_flags_cc} -mtune=generic)
-	endif()
-	if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND NOT MINGW)
-		set(optimization_flags_cc ${optimization_flags_cc} -fuse-ld=gold)
-		# NOTE -flto must go together in both cc and ld flags; also, it's presently incompatible
-		# with the -g option in at least some GNU compilers (saw in `man gcc` on Ubuntu)
-		set(optimization_flags_cc ${optimization_flags_cc} -fuse-linker-plugin -flto-report -flto) #TODO fix LTO for clang
-		set(optimization_flags_lt ${optimization_flags_lt} -flto) #TODO LTO for clang too
-	endif()
-
 	# LLVM Clang / Gnu GCC
 	set(cxx_flags_unoptimized ${cxx_flags_unoptimized} ${stdlib_cxx})

@@ -347,6 +332,26 @@
 			 RANLIB=gcc-ranlib)
 	ENDIF()

+
+        #
+        # set OPTIMIZATION flags
+	#
+	#TODO: CMake automatically generates optimisation flags. Do we need this? - "I think yes ~breznak"
+        set(optimization_flags_cc ${optimization_flags_cc} -O2)
+        set(optimization_flags_cc -pipe ${optimization_flags_cc}) #TODO use -Ofast instead of -O3
+        set(optimization_flags_lt -O2 ${optimization_flags_lt})
+        if(NOT ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "armv7l")
+                set(optimization_flags_cc ${optimization_flags_cc} -mtune=generic)
+        endif()
+        if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU" AND NOT MINGW)
+                set(optimization_flags_cc ${optimization_flags_cc} -fuse-ld=gold)
+                # NOTE -flto must go together in both cc and ld flags; also, it's presently incompatible
+                # with the -g option in at least some GNU compilers (saw in `man gcc` on Ubuntu)
+                set(optimization_flags_cc ${optimization_flags_cc} -fuse-linker-plugin -flto-report -flto) #TODO fix LTO for clang
+                set(optimization_flags_lt ${optimization_flags_lt} -flto) #TODO LTO for clang too
+        endif()
+
+
 	#
 	# Set up Debug vs. Release options
 	#


Switch off SSE when targeting iOS/iPhoneSimulator as well.

--- CMake/Modules/Urho3D-CMake-common.cmake
+++ CMake/Modules/Urho3D-CMake-common.cmake
@@ -59,15 +59,15 @@
     set (URHO3D_DEFAULT_64BIT ${URHO3D_DEFAULT_64BIT} CACHE INTERNAL "Default value for URHO3D_64BIT build option")
     # The 'ANDROID' CMake variable is already set by android.toolchain.cmake when it is being used for cross-compiling Android
     # When ANDROID is true and ARM is not then we are targeting Android on Intel Atom
-    string (REGEX MATCH "#define +__(arm|arm64|aarch64)__ +1" matched "${PREDEFINED_MACROS}")
-    if (matched)
+    string (REGEX MATCH "#define +__(arm|aarch64)__ +1" matched "${PREDEFINED_MACROS}")
+    if (matched OR IOS)     # Assume iOS is always on ARM for now
         set (ARM TRUE)
     else ()
         set (ARM FALSE)
     endif ()
     set (ARM ${ARM} CACHE INTERNAL "Targeting ARM platform")
-    # The other arm platform that Urho3D supports that is not Android is Raspberry Pi at the moment
-    if (NOT ANDROID AND ARM)
+    # The other arm platform that Urho3D supports that is not Android/iOS is Raspberry Pi at the moment
+    if (ARM AND NOT ANDROID AND NOT IOS)
         # Set the CMake variable here instead of in raspberrypi.toolchain.cmake because Raspberry Pi can be built natively too on the Raspberry-Pi device itself
         set (RPI TRUE CACHE INTERNAL "Setup build for Raspberry Pi platform")
     endif ()