cmake: Add tests at configure time based on files matching "test/test_*.py"

This commit removes hard-coded list of tests by automatically adding
tests based on files matching "test/test_*.py" globbing expression.

--- cmake/UnitTests.cmake
+++ cmake/UnitTests.cmake
@@ -1,821 +1,10 @@
+file(GLOB filenames "${PROJECT_BINARY_DIR}/${PYTHONHOME}/test/test_*.py")
+list(SORT filenames)

-# Python code allowing to generate list of unittests reported below
-set(cmd "exec(\"")
-set(cmd "${cmd}import glob\\n")
-set(cmd "${cmd}import os\\n")
-set(cmd "${cmd}filenames = sorted(glob.glob('./${PYTHONHOME}/test/test_*.py'))\\n")
-set(cmd "${cmd}for filename in filenames:\\n")
-set(cmd "${cmd}  print('list(APPEND unittests \\\"%s\\\")' % os.path.splitext(os.path.basename(filename))[0])\\n")
-set(cmd "${cmd}print('Discovered %d tests' % len(filenames))\\n")
-set(cmd "${cmd}\")")
+foreach(filename IN LISTS filenames)
+  get_filename_component(unittest ${filename} NAME_WE)
+  list(APPEND unittests ${unittest})
+endforeach()

-add_custom_target(list_unittests
-    ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:python> -c "${cmd}"
-    DEPENDS python
-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
-    COMMENT "Display list of python unittests"
-    VERBATIM
-)
-
-# The following list has been generated and *manually* copied below building
-# the 'list_unittests' target.
-
-if(IS_PY2)
-
-list(APPEND unittests "test_abc")
-list(APPEND unittests "test_abstract_numbers")
-list(APPEND unittests "test_aepack")
-list(APPEND unittests "test_aifc")
-list(APPEND unittests "test_al")
-list(APPEND unittests "test___all__")
-list(APPEND unittests "test_anydbm")
-list(APPEND unittests "test_applesingle")
-list(APPEND unittests "test_argparse")
-list(APPEND unittests "test_array")
-list(APPEND unittests "test_ascii_formatd")
-list(APPEND unittests "test_ast")
-list(APPEND unittests "test_asynchat")
-list(APPEND unittests "test_asyncore")
-list(APPEND unittests "test_atexit")
-list(APPEND unittests "test_audioop")
-list(APPEND unittests "test_augassign")
-list(APPEND unittests "test_base64")
-list(APPEND unittests "test_bastion")
-list(APPEND unittests "test_bigaddrspace")
-list(APPEND unittests "test_bigmem")
-list(APPEND unittests "test_binascii")
-list(APPEND unittests "test_binhex")
-list(APPEND unittests "test_binop")
-list(APPEND unittests "test_bisect")
-list(APPEND unittests "test_bool")
-list(APPEND unittests "test_bsddb")
-list(APPEND unittests "test_bsddb185")
-list(APPEND unittests "test_bsddb3")
-list(APPEND unittests "test_buffer")
-list(APPEND unittests "test_bufio")
-list(APPEND unittests "test_builtin")
-list(APPEND unittests "test_bytes")
-list(APPEND unittests "test_bz2")
-list(APPEND unittests "test_calendar")
-list(APPEND unittests "test_call")
-list(APPEND unittests "test_capi")
-list(APPEND unittests "test_cd")
-list(APPEND unittests "test_cfgparser")
-list(APPEND unittests "test_cgi")
-list(APPEND unittests "test_charmapcodec")
-list(APPEND unittests "test_cl")
-list(APPEND unittests "test_class")
-list(APPEND unittests "test_cmath")
-list(APPEND unittests "test_cmd")
-list(APPEND unittests "test_cmd_line")
-list(APPEND unittests "test_cmd_line_script")
-list(APPEND unittests "test_code")
-list(APPEND unittests "test_codeccallbacks")
-list(APPEND unittests "test_codecencodings_cn")
-list(APPEND unittests "test_codecencodings_hk")
-list(APPEND unittests "test_codecencodings_iso2022")
-list(APPEND unittests "test_codecencodings_jp")
-list(APPEND unittests "test_codecencodings_kr")
-list(APPEND unittests "test_codecencodings_tw")
-list(APPEND unittests "test_codecmaps_cn")
-list(APPEND unittests "test_codecmaps_hk")
-list(APPEND unittests "test_codecmaps_jp")
-list(APPEND unittests "test_codecmaps_kr")
-list(APPEND unittests "test_codecmaps_tw")
-list(APPEND unittests "test_codecs")
-list(APPEND unittests "test_codeop")
-if(PY_VERSION_PATCH LESS 12)
-  list(APPEND unittests "test_coding")
-  list(APPEND unittests "test_pep263")
-else()
-  list(APPEND unittests "test_source_encoding")
-endif()
-list(APPEND unittests "test_coercion")
-list(APPEND unittests "test_collections")
-list(APPEND unittests "test_colorsys")
-list(APPEND unittests "test_commands")
-list(APPEND unittests "test_compare")
-list(APPEND unittests "test_compile")
-list(APPEND unittests "test_compileall")
-list(APPEND unittests "test_compiler")
-list(APPEND unittests "test_complex")
-list(APPEND unittests "test_complex_args")
-list(APPEND unittests "test_contains")
-list(APPEND unittests "test_contextlib")
-list(APPEND unittests "test_cookie")
-list(APPEND unittests "test_cookielib")
-list(APPEND unittests "test_copy")
-list(APPEND unittests "test_copy_reg")
-list(APPEND unittests "test_cpickle")
-list(APPEND unittests "test_cprofile")
-list(APPEND unittests "test_crypt")
-list(APPEND unittests "test_csv")
-list(APPEND unittests "test_ctypes")
-list(APPEND unittests "test_curses")
-list(APPEND unittests "test_datetime")
-list(APPEND unittests "test_dbm")
-list(APPEND unittests "test_decimal")
-list(APPEND unittests "test_decorators")
-list(APPEND unittests "test_defaultdict")
-list(APPEND unittests "test_deque")
-list(APPEND unittests "test_descr")
-list(APPEND unittests "test_descrtut")
-list(APPEND unittests "test_dict")
-list(APPEND unittests "test_dictcomps")
-list(APPEND unittests "test_dictviews")
-list(APPEND unittests "test_difflib")
-list(APPEND unittests "test_dircache")
-list(APPEND unittests "test_dis")
-list(APPEND unittests "test_distutils")
-list(APPEND unittests "test_dl")
-list(APPEND unittests "test_doctest")
-list(APPEND unittests "test_doctest2")
-list(APPEND unittests "test_docxmlrpc")
-list(APPEND unittests "test_dumbdbm")
-list(APPEND unittests "test_dummy_thread")
-list(APPEND unittests "test_dummy_threading")
-list(APPEND unittests "test_email")
-list(APPEND unittests "test_email_codecs")
-list(APPEND unittests "test_email_renamed")
-list(APPEND unittests "test_enumerate")
-list(APPEND unittests "test_eof")
-list(APPEND unittests "test_epoll")
-list(APPEND unittests "test_errno")
-list(APPEND unittests "test_exceptions")
-list(APPEND unittests "test_exception_variations")
-list(APPEND unittests "test_extcall")
-list(APPEND unittests "test_fcntl")
-list(APPEND unittests "test_file")
-list(APPEND unittests "test_file2k")
-list(APPEND unittests "test_filecmp")
-list(APPEND unittests "test_fileinput")
-list(APPEND unittests "test_fileio")
-list(APPEND unittests "test_float")
-list(APPEND unittests "test_fnmatch")
-list(APPEND unittests "test_fork1")
-list(APPEND unittests "test_format")
-list(APPEND unittests "test_fpformat")
-list(APPEND unittests "test_fractions")
-list(APPEND unittests "test_frozen")
-list(APPEND unittests "test_ftplib")
-list(APPEND unittests "test_funcattrs")
-list(APPEND unittests "test_functools")
-list(APPEND unittests "test___future__")
-list(APPEND unittests "test_future")
-list(APPEND unittests "test_future1")
-list(APPEND unittests "test_future2")
-list(APPEND unittests "test_future3")
-list(APPEND unittests "test_future4")
-list(APPEND unittests "test_future5")
-list(APPEND unittests "test_future_builtins")
-list(APPEND unittests "test_gc")
-list(APPEND unittests "test_gdb")
-list(APPEND unittests "test_gdbm")
-list(APPEND unittests "test_generators")
-list(APPEND unittests "test_genericpath")
-list(APPEND unittests "test_genexps")
-list(APPEND unittests "test_getargs")
-list(APPEND unittests "test_getargs2")
-list(APPEND unittests "test_getopt")
-list(APPEND unittests "test_gettext")
-list(APPEND unittests "test_gl")
-list(APPEND unittests "test_glob")
-list(APPEND unittests "test_global")
-list(APPEND unittests "test_grammar")
-list(APPEND unittests "test_grp")
-list(APPEND unittests "test_gzip")
-list(APPEND unittests "test_hash")
-list(APPEND unittests "test_hashlib")
-list(APPEND unittests "test_heapq")
-list(APPEND unittests "test_hmac")
-list(APPEND unittests "test_hotshot")
-list(APPEND unittests "test_htmllib")
-list(APPEND unittests "test_htmlparser")
-list(APPEND unittests "test_httplib")
-list(APPEND unittests "test_httpservers")
-list(APPEND unittests "test_imageop")
-list(APPEND unittests "test_imaplib")
-list(APPEND unittests "test_imgfile")
-list(APPEND unittests "test_imp")
-list(APPEND unittests "test_import")
-list(APPEND unittests "test_importhooks")
-list(APPEND unittests "test_importlib")
-list(APPEND unittests "test_index")
-list(APPEND unittests "test_inspect")
-list(APPEND unittests "test_int")
-list(APPEND unittests "test_int_literal")
-list(APPEND unittests "test_io")
-list(APPEND unittests "test_ioctl")
-list(APPEND unittests "test_isinstance")
-list(APPEND unittests "test_iter")
-list(APPEND unittests "test_iterlen")
-list(APPEND unittests "test_itertools")
-list(APPEND unittests "test_json")
-list(APPEND unittests "test_kqueue")
-list(APPEND unittests "test_largefile")
-list(APPEND unittests "test_lib2to3")
-list(APPEND unittests "test_linecache")
-list(APPEND unittests "test_linuxaudiodev")
-list(APPEND unittests "test_list")
-list(APPEND unittests "test__locale")
-list(APPEND unittests "test_locale")
-list(APPEND unittests "test_logging")
-list(APPEND unittests "test_long")
-list(APPEND unittests "test_longexp")
-list(APPEND unittests "test_long_future")
-list(APPEND unittests "test_macos")
-list(APPEND unittests "test_macostools")
-list(APPEND unittests "test_macpath")
-list(APPEND unittests "test_mailbox")
-list(APPEND unittests "test_marshal")
-list(APPEND unittests "test_math")
-list(APPEND unittests "test_md5")
-list(APPEND unittests "test_memoryio")
-list(APPEND unittests "test_memoryview")
-list(APPEND unittests "test_mhlib")
-list(APPEND unittests "test_mimetools")
-list(APPEND unittests "test_mimetypes")
-list(APPEND unittests "test_MimeWriter")
-list(APPEND unittests "test_minidom")
-list(APPEND unittests "test_mmap")
-list(APPEND unittests "test_module")
-list(APPEND unittests "test_modulefinder")
-list(APPEND unittests "test_msilib")
-list(APPEND unittests "test_multibytecodec")
-list(APPEND unittests "test_multibytecodec_support")
-list(APPEND unittests "test_multifile")
-list(APPEND unittests "test_multiprocessing")
-list(APPEND unittests "test_mutants")
-list(APPEND unittests "test_mutex")
-list(APPEND unittests "test_netrc")
-list(APPEND unittests "test_new")
-list(APPEND unittests "test_nis")
-list(APPEND unittests "test_normalization")
-list(APPEND unittests "test_ntpath")
-list(APPEND unittests "test_old_mailbox")
-list(APPEND unittests "test_opcodes")
-list(APPEND unittests "test_openpty")
-list(APPEND unittests "test_operator")
-list(APPEND unittests "test_optparse")
-list(APPEND unittests "test_os")
-list(APPEND unittests "test_ossaudiodev")
-list(APPEND unittests "test_parser")
-list(APPEND unittests "test_pdb")
-list(APPEND unittests "test_peepholer")
-list(APPEND unittests "test_pep247")
-list(APPEND unittests "test_pep277")
-if(PY_VERSION_PATCH LESS 12)
-  list(APPEND unittests "test_pep292")
-else()
-  list(APPEND unittests "test_string")
-endif()
-list(APPEND unittests "test_pep352")
-list(APPEND unittests "test_pickle")
-list(APPEND unittests "test_pickletools")
-list(APPEND unittests "test_pipes")
-list(APPEND unittests "test_pkg")
-list(APPEND unittests "test_pkgimport")
-list(APPEND unittests "test_pkgutil")
-list(APPEND unittests "test_platform")
-list(APPEND unittests "test_plistlib")
-list(APPEND unittests "test_poll")
-list(APPEND unittests "test_popen")
-list(APPEND unittests "test_popen2")
-list(APPEND unittests "test_poplib")
-list(APPEND unittests "test_posix")
-list(APPEND unittests "test_posixpath")
-list(APPEND unittests "test_pow")
-list(APPEND unittests "test_pprint")
-list(APPEND unittests "test_print")
-list(APPEND unittests "test_profile")
-list(APPEND unittests "test_property")
-list(APPEND unittests "test_pstats")
-list(APPEND unittests "test_pty")
-list(APPEND unittests "test_pwd")
-list(APPEND unittests "test_py3kwarn")
-list(APPEND unittests "test_pyclbr")
-list(APPEND unittests "test_py_compile")
-list(APPEND unittests "test_pydoc")
-list(APPEND unittests "test_pyexpat")
-list(APPEND unittests "test_queue")
-list(APPEND unittests "test_quopri")
-list(APPEND unittests "test_random")
-list(APPEND unittests "test_re")
-list(APPEND unittests "test_readline")
-list(APPEND unittests "test_repr")
-list(APPEND unittests "test_resource")
-list(APPEND unittests "test_rfc822")
-list(APPEND unittests "test_richcmp")
-list(APPEND unittests "test_rlcompleter")
-list(APPEND unittests "test_robotparser")
-list(APPEND unittests "test_runpy")
-list(APPEND unittests "test_sax")
-list(APPEND unittests "test_scope")
-list(APPEND unittests "test_scriptpackages")
-list(APPEND unittests "test_select")
-list(APPEND unittests "test_set")
-list(APPEND unittests "test_setcomps")
-list(APPEND unittests "test_sets")
-list(APPEND unittests "test_sgmllib")
-list(APPEND unittests "test_sha")
-list(APPEND unittests "test_shelve")
-list(APPEND unittests "test_shlex")
-list(APPEND unittests "test_shutil")
-list(APPEND unittests "test_signal")
-list(APPEND unittests "test_SimpleHTTPServer")
-list(APPEND unittests "test_site")
-list(APPEND unittests "test_slice")
-list(APPEND unittests "test_smtplib")
-list(APPEND unittests "test_smtpnet")
-list(APPEND unittests "test_socket")
-list(APPEND unittests "test_socketserver")
-list(APPEND unittests "test_softspace")
-list(APPEND unittests "test_sort")
-list(APPEND unittests "test_sqlite")
-list(APPEND unittests "test_ssl")
-list(APPEND unittests "test_startfile")
-list(APPEND unittests "test_str")
-list(APPEND unittests "test_strftime")
-list(APPEND unittests "test_string")
-list(APPEND unittests "test_StringIO")
-list(APPEND unittests "test_stringprep")
-list(APPEND unittests "test_strop")
-list(APPEND unittests "test_strptime")
-list(APPEND unittests "test_strtod")
-list(APPEND unittests "test_struct")
-list(APPEND unittests "test_structmembers")
-list(APPEND unittests "test_structseq")
-list(APPEND unittests "test_subprocess")
-list(APPEND unittests "test_sunaudiodev")
-list(APPEND unittests "test_sundry")
-list(APPEND unittests "test_support")
-list(APPEND unittests "test_symtable")
-list(APPEND unittests "test_syntax")
-list(APPEND unittests "test_sys")
-list(APPEND unittests "test_sysconfig")
-list(APPEND unittests "test_sys_setprofile")
-list(APPEND unittests "test_sys_settrace")
-list(APPEND unittests "test_tarfile")
-list(APPEND unittests "test_tcl")
-list(APPEND unittests "test_telnetlib")
-list(APPEND unittests "test_tempfile")
-list(APPEND unittests "test_textwrap")
-list(APPEND unittests "test_thread")
-list(APPEND unittests "test_threaded_import")
-list(APPEND unittests "test_threadedtempfile")
-list(APPEND unittests "test_threading")
-list(APPEND unittests "test_threading_local")
-list(APPEND unittests "test_threadsignals")
-list(APPEND unittests "test_time")
-list(APPEND unittests "test_timeout")
-list(APPEND unittests "test_tk")
-list(APPEND unittests "test_tokenize")
-list(APPEND unittests "test_trace")
-list(APPEND unittests "test_traceback")
-list(APPEND unittests "test_transformer")
-list(APPEND unittests "test_ttk_guionly")
-list(APPEND unittests "test_ttk_textonly")
-list(APPEND unittests "test_tuple")
-list(APPEND unittests "test_typechecks")
-list(APPEND unittests "test_types")
-list(APPEND unittests "test_ucn")
-list(APPEND unittests "test_unary")
-list(APPEND unittests "test_undocumented_details")
-list(APPEND unittests "test_unicode")
-list(APPEND unittests "test_unicodedata")
-list(APPEND unittests "test_unicode_file")
-list(APPEND unittests "test_unittest")
-list(APPEND unittests "test_univnewlines")
-list(APPEND unittests "test_univnewlines2k")
-list(APPEND unittests "test_unpack")
-list(APPEND unittests "test_urllib")
-list(APPEND unittests "test_urllib2")
-list(APPEND unittests "test_urllib2_localnet")
-list(APPEND unittests "test_urllib2net")
-list(APPEND unittests "test_urllibnet")
-list(APPEND unittests "test_urlparse")
-list(APPEND unittests "test_userdict")
-list(APPEND unittests "test_userlist")
-list(APPEND unittests "test_userstring")
-list(APPEND unittests "test_uu")
-list(APPEND unittests "test_uuid")
-list(APPEND unittests "test_wait3")
-list(APPEND unittests "test_wait4")
-list(APPEND unittests "test_warnings")
-list(APPEND unittests "test_wave")
-list(APPEND unittests "test_weakref")
-list(APPEND unittests "test_weakset")
-list(APPEND unittests "test_whichdb")
-list(APPEND unittests "test_winreg")
-list(APPEND unittests "test_winsound")
-list(APPEND unittests "test_with")
-list(APPEND unittests "test_wsgiref")
-list(APPEND unittests "test_xdrlib")
-list(APPEND unittests "test_xml_etree")
-list(APPEND unittests "test_xml_etree_c")
-list(APPEND unittests "test_xmllib")
-list(APPEND unittests "test_xmlrpc")
-list(APPEND unittests "test_xpickle")
-list(APPEND unittests "test_xrange")
-list(APPEND unittests "test_zipfile")
-list(APPEND unittests "test_zipfile64")
-list(APPEND unittests "test_zipimport")
-list(APPEND unittests "test_zipimport_support")
-list(APPEND unittests "test_zlib")
-
-else()
-
-list(APPEND unittests "test___all__")
-list(APPEND unittests "test___future__")
-list(APPEND unittests "test__locale")
-list(APPEND unittests "test__opcode")
-list(APPEND unittests "test__osx_support")
-list(APPEND unittests "test_abc")
-list(APPEND unittests "test_abstract_numbers")
-list(APPEND unittests "test_aifc")
-list(APPEND unittests "test_argparse")
-list(APPEND unittests "test_array")
-list(APPEND unittests "test_asdl_parser")
-list(APPEND unittests "test_ast")
-list(APPEND unittests "test_asynchat")
-list(APPEND unittests "test_asyncore")
-list(APPEND unittests "test_atexit")
-list(APPEND unittests "test_audioop")
-list(APPEND unittests "test_augassign")
-list(APPEND unittests "test_base64")
-list(APPEND unittests "test_bigaddrspace")
-list(APPEND unittests "test_bigmem")
-list(APPEND unittests "test_binascii")
-list(APPEND unittests "test_binhex")
-list(APPEND unittests "test_binop")
-list(APPEND unittests "test_bisect")
-list(APPEND unittests "test_bool")
-list(APPEND unittests "test_buffer")
-list(APPEND unittests "test_bufio")
-list(APPEND unittests "test_builtin")
-list(APPEND unittests "test_bytes")
-list(APPEND unittests "test_bz2")
-list(APPEND unittests "test_calendar")
-list(APPEND unittests "test_call")
-list(APPEND unittests "test_capi")
-list(APPEND unittests "test_cgi")
-list(APPEND unittests "test_cgitb")
-list(APPEND unittests "test_charmapcodec")
-list(APPEND unittests "test_class")
-list(APPEND unittests "test_cmath")
-list(APPEND unittests "test_cmd")
-list(APPEND unittests "test_cmd_line")
-list(APPEND unittests "test_cmd_line_script")
-list(APPEND unittests "test_code")
-list(APPEND unittests "test_code_module")
-list(APPEND unittests "test_codeccallbacks")
-list(APPEND unittests "test_codecencodings_cn")
-list(APPEND unittests "test_codecencodings_hk")
-list(APPEND unittests "test_codecencodings_iso2022")
-list(APPEND unittests "test_codecencodings_jp")
-list(APPEND unittests "test_codecencodings_kr")
-list(APPEND unittests "test_codecencodings_tw")
-list(APPEND unittests "test_codecmaps_cn")
-list(APPEND unittests "test_codecmaps_hk")
-list(APPEND unittests "test_codecmaps_jp")
-list(APPEND unittests "test_codecmaps_kr")
-list(APPEND unittests "test_codecmaps_tw")
-list(APPEND unittests "test_codecs")
-list(APPEND unittests "test_codeop")
-list(APPEND unittests "test_collections")
-list(APPEND unittests "test_colorsys")
-list(APPEND unittests "test_compare")
-list(APPEND unittests "test_compile")
-list(APPEND unittests "test_compileall")
-list(APPEND unittests "test_complex")
-list(APPEND unittests "test_concurrent_futures")
-list(APPEND unittests "test_configparser")
-list(APPEND unittests "test_contains")
-list(APPEND unittests "test_contextlib")
-list(APPEND unittests "test_copy")
-list(APPEND unittests "test_copyreg")
-list(APPEND unittests "test_coroutines")
-list(APPEND unittests "test_cprofile")
-list(APPEND unittests "test_crashers")
-list(APPEND unittests "test_crypt")
-list(APPEND unittests "test_csv")
-list(APPEND unittests "test_ctypes")
-list(APPEND unittests "test_curses")
-list(APPEND unittests "test_datetime")
-list(APPEND unittests "test_dbm")
-list(APPEND unittests "test_dbm_dumb")
-list(APPEND unittests "test_dbm_gnu")
-list(APPEND unittests "test_dbm_ndbm")
-list(APPEND unittests "test_decimal")
-list(APPEND unittests "test_decorators")
-list(APPEND unittests "test_defaultdict")
-list(APPEND unittests "test_deque")
-list(APPEND unittests "test_descr")
-list(APPEND unittests "test_descrtut")
-list(APPEND unittests "test_devpoll")
-list(APPEND unittests "test_dict")
-list(APPEND unittests "test_dictcomps")
-list(APPEND unittests "test_dictviews")
-list(APPEND unittests "test_difflib")
-list(APPEND unittests "test_dis")
-list(APPEND unittests "test_distutils")
-list(APPEND unittests "test_doctest")
-list(APPEND unittests "test_doctest2")
-list(APPEND unittests "test_docxmlrpc")
-list(APPEND unittests "test_dummy_thread")
-list(APPEND unittests "test_dummy_threading")
-list(APPEND unittests "test_dynamic")
-list(APPEND unittests "test_dynamicclassattribute")
-list(APPEND unittests "test_eintr")
-list(APPEND unittests "test_ensurepip")
-list(APPEND unittests "test_enum")
-list(APPEND unittests "test_enumerate")
-list(APPEND unittests "test_eof")
-list(APPEND unittests "test_epoll")
-list(APPEND unittests "test_errno")
-list(APPEND unittests "test_exception_variations")
-list(APPEND unittests "test_exceptions")
-list(APPEND unittests "test_extcall")
-list(APPEND unittests "test_faulthandler")
-list(APPEND unittests "test_fcntl")
-list(APPEND unittests "test_file")
-list(APPEND unittests "test_file_eintr")
-list(APPEND unittests "test_filecmp")
-list(APPEND unittests "test_fileinput")
-list(APPEND unittests "test_fileio")
-list(APPEND unittests "test_finalization")
-list(APPEND unittests "test_float")
-list(APPEND unittests "test_flufl")
-list(APPEND unittests "test_fnmatch")
-list(APPEND unittests "test_fork1")
-list(APPEND unittests "test_format")
-list(APPEND unittests "test_fractions")
-list(APPEND unittests "test_frame")
-list(APPEND unittests "test_ftplib")
-list(APPEND unittests "test_funcattrs")
-list(APPEND unittests "test_functools")
-list(APPEND unittests "test_future")
-list(APPEND unittests "test_future3")
-list(APPEND unittests "test_future4")
-list(APPEND unittests "test_future5")
-list(APPEND unittests "test_gc")
-list(APPEND unittests "test_gdb")
-list(APPEND unittests "test_generators")
-list(APPEND unittests "test_genericpath")
-list(APPEND unittests "test_genexps")
-list(APPEND unittests "test_getargs2")
-list(APPEND unittests "test_getopt")
-list(APPEND unittests "test_getpass")
-list(APPEND unittests "test_gettext")
-list(APPEND unittests "test_glob")
-list(APPEND unittests "test_global")
-list(APPEND unittests "test_grammar")
-list(APPEND unittests "test_grp")
-list(APPEND unittests "test_gzip")
-list(APPEND unittests "test_hash")
-list(APPEND unittests "test_hashlib")
-list(APPEND unittests "test_heapq")
-list(APPEND unittests "test_hmac")
-list(APPEND unittests "test_html")
-list(APPEND unittests "test_htmlparser")
-list(APPEND unittests "test_http_cookiejar")
-list(APPEND unittests "test_http_cookies")
-list(APPEND unittests "test_httplib")
-list(APPEND unittests "test_httpservers")
-list(APPEND unittests "test_idle")
-list(APPEND unittests "test_imaplib")
-list(APPEND unittests "test_imghdr")
-list(APPEND unittests "test_imp")
-list(APPEND unittests "test_index")
-list(APPEND unittests "test_inspect")
-list(APPEND unittests "test_int")
-list(APPEND unittests "test_int_literal")
-list(APPEND unittests "test_io")
-list(APPEND unittests "test_ioctl")
-list(APPEND unittests "test_ipaddress")
-list(APPEND unittests "test_isinstance")
-list(APPEND unittests "test_iter")
-list(APPEND unittests "test_iterlen")
-list(APPEND unittests "test_itertools")
-list(APPEND unittests "test_keyword")
-list(APPEND unittests "test_keywordonlyarg")
-list(APPEND unittests "test_kqueue")
-list(APPEND unittests "test_largefile")
-list(APPEND unittests "test_lib2to3")
-list(APPEND unittests "test_linecache")
-list(APPEND unittests "test_list")
-list(APPEND unittests "test_listcomps")
-list(APPEND unittests "test_locale")
-list(APPEND unittests "test_logging")
-list(APPEND unittests "test_long")
-list(APPEND unittests "test_longexp")
-list(APPEND unittests "test_lzma")
-list(APPEND unittests "test_macpath")
-list(APPEND unittests "test_macurl2path")
-list(APPEND unittests "test_mailbox")
-list(APPEND unittests "test_mailcap")
-list(APPEND unittests "test_marshal")
-list(APPEND unittests "test_math")
-list(APPEND unittests "test_memoryio")
-list(APPEND unittests "test_memoryview")
-list(APPEND unittests "test_metaclass")
-list(APPEND unittests "test_mimetypes")
-list(APPEND unittests "test_minidom")
-list(APPEND unittests "test_mmap")
-list(APPEND unittests "test_module")
-list(APPEND unittests "test_modulefinder")
-list(APPEND unittests "test_msilib")
-list(APPEND unittests "test_multibytecodec")
-list(APPEND unittests "test_multiprocessing_fork")
-list(APPEND unittests "test_multiprocessing_forkserver")
-list(APPEND unittests "test_multiprocessing_main_handling")
-list(APPEND unittests "test_multiprocessing_spawn")
-list(APPEND unittests "test_netrc")
-list(APPEND unittests "test_nis")
-list(APPEND unittests "test_nntplib")
-list(APPEND unittests "test_normalization")
-list(APPEND unittests "test_ntpath")
-list(APPEND unittests "test_numeric_tower")
-list(APPEND unittests "test_opcodes")
-list(APPEND unittests "test_openpty")
-list(APPEND unittests "test_operator")
-list(APPEND unittests "test_optparse")
-list(APPEND unittests "test_os")
-list(APPEND unittests "test_ossaudiodev")
-list(APPEND unittests "test_osx_env")
-list(APPEND unittests "test_parser")
-list(APPEND unittests "test_pathlib")
-list(APPEND unittests "test_pdb")
-list(APPEND unittests "test_peepholer")
-list(APPEND unittests "test_pep247")
-list(APPEND unittests "test_pep277")
-list(APPEND unittests "test_pep292")
-list(APPEND unittests "test_pep3120")
-list(APPEND unittests "test_pep3131")
-list(APPEND unittests "test_pep3151")
-list(APPEND unittests "test_pep352")
-list(APPEND unittests "test_pep380")
-list(APPEND unittests "test_pep479")
-list(APPEND unittests "test_pickle")
-list(APPEND unittests "test_pickletools")
-list(APPEND unittests "test_pipes")
-list(APPEND unittests "test_pkg")
-list(APPEND unittests "test_pkgimport")
-list(APPEND unittests "test_pkgutil")
-list(APPEND unittests "test_platform")
-list(APPEND unittests "test_plistlib")
-list(APPEND unittests "test_poll")
-list(APPEND unittests "test_popen")
-list(APPEND unittests "test_poplib")
-list(APPEND unittests "test_posix")
-list(APPEND unittests "test_posixpath")
-list(APPEND unittests "test_pow")
-list(APPEND unittests "test_pprint")
-list(APPEND unittests "test_print")
-list(APPEND unittests "test_profile")
-list(APPEND unittests "test_property")
-list(APPEND unittests "test_pstats")
-list(APPEND unittests "test_pty")
-list(APPEND unittests "test_pulldom")
-list(APPEND unittests "test_pwd")
-list(APPEND unittests "test_py_compile")
-list(APPEND unittests "test_pyclbr")
-list(APPEND unittests "test_pydoc")
-list(APPEND unittests "test_pyexpat")
-list(APPEND unittests "test_queue")
-list(APPEND unittests "test_quopri")
-list(APPEND unittests "test_raise")
-list(APPEND unittests "test_random")
-list(APPEND unittests "test_range")
-list(APPEND unittests "test_re")
-list(APPEND unittests "test_readline")
-list(APPEND unittests "test_regrtest")
-list(APPEND unittests "test_reprlib")
-list(APPEND unittests "test_resource")
-list(APPEND unittests "test_richcmp")
-list(APPEND unittests "test_rlcompleter")
-list(APPEND unittests "test_robotparser")
-list(APPEND unittests "test_runpy")
-list(APPEND unittests "test_sax")
-list(APPEND unittests "test_sched")
-list(APPEND unittests "test_scope")
-list(APPEND unittests "test_script_helper")
-list(APPEND unittests "test_select")
-list(APPEND unittests "test_selectors")
-list(APPEND unittests "test_set")
-list(APPEND unittests "test_setcomps")
-list(APPEND unittests "test_shelve")
-list(APPEND unittests "test_shlex")
-list(APPEND unittests "test_shutil")
-list(APPEND unittests "test_signal")
-list(APPEND unittests "test_site")
-list(APPEND unittests "test_slice")
-list(APPEND unittests "test_smtpd")
-list(APPEND unittests "test_smtplib")
-list(APPEND unittests "test_smtpnet")
-list(APPEND unittests "test_sndhdr")
-list(APPEND unittests "test_socket")
-list(APPEND unittests "test_socketserver")
-list(APPEND unittests "test_sort")
-list(APPEND unittests "test_source_encoding")
-list(APPEND unittests "test_spwd")
-list(APPEND unittests "test_sqlite")
-list(APPEND unittests "test_ssl")
-list(APPEND unittests "test_startfile")
-list(APPEND unittests "test_stat")
-list(APPEND unittests "test_statistics")
-list(APPEND unittests "test_strftime")
-list(APPEND unittests "test_string")
-list(APPEND unittests "test_stringprep")
-list(APPEND unittests "test_strlit")
-list(APPEND unittests "test_strptime")
-list(APPEND unittests "test_strtod")
-list(APPEND unittests "test_struct")
-list(APPEND unittests "test_structmembers")
-list(APPEND unittests "test_structseq")
-list(APPEND unittests "test_subprocess")
-list(APPEND unittests "test_sunau")
-list(APPEND unittests "test_sundry")
-list(APPEND unittests "test_super")
-list(APPEND unittests "test_support")
-list(APPEND unittests "test_symtable")
-list(APPEND unittests "test_syntax")
-list(APPEND unittests "test_sys")
-list(APPEND unittests "test_sys_setprofile")
-list(APPEND unittests "test_sys_settrace")
-list(APPEND unittests "test_sysconfig")
-list(APPEND unittests "test_syslog")
-list(APPEND unittests "test_tarfile")
-list(APPEND unittests "test_tcl")
-list(APPEND unittests "test_telnetlib")
-list(APPEND unittests "test_tempfile")
-list(APPEND unittests "test_textwrap")
-list(APPEND unittests "test_thread")
-list(APPEND unittests "test_threaded_import")
-list(APPEND unittests "test_threadedtempfile")
-list(APPEND unittests "test_threading")
-list(APPEND unittests "test_threading_local")
-list(APPEND unittests "test_threadsignals")
-list(APPEND unittests "test_time")
-list(APPEND unittests "test_timeit")
-list(APPEND unittests "test_timeout")
-list(APPEND unittests "test_tix")
-list(APPEND unittests "test_tk")
-list(APPEND unittests "test_tokenize")
-list(APPEND unittests "test_trace")
-list(APPEND unittests "test_traceback")
-list(APPEND unittests "test_tracemalloc")
-list(APPEND unittests "test_ttk_guionly")
-list(APPEND unittests "test_ttk_textonly")
-list(APPEND unittests "test_tuple")
-list(APPEND unittests "test_typechecks")
-list(APPEND unittests "test_types")
-list(APPEND unittests "test_typing")
-list(APPEND unittests "test_ucn")
-list(APPEND unittests "test_unary")
-list(APPEND unittests "test_unicode")
-list(APPEND unittests "test_unicode_file")
-list(APPEND unittests "test_unicodedata")
-list(APPEND unittests "test_unittest")
-list(APPEND unittests "test_univnewlines")
-list(APPEND unittests "test_unpack")
-list(APPEND unittests "test_unpack_ex")
-list(APPEND unittests "test_urllib")
-list(APPEND unittests "test_urllib2")
-list(APPEND unittests "test_urllib2_localnet")
-list(APPEND unittests "test_urllib2net")
-list(APPEND unittests "test_urllib_response")
-list(APPEND unittests "test_urllibnet")
-list(APPEND unittests "test_urlparse")
-list(APPEND unittests "test_userdict")
-list(APPEND unittests "test_userlist")
-list(APPEND unittests "test_userstring")
-list(APPEND unittests "test_uu")
-list(APPEND unittests "test_uuid")
-list(APPEND unittests "test_venv")
-list(APPEND unittests "test_wait3")
-list(APPEND unittests "test_wait4")
-list(APPEND unittests "test_wave")
-list(APPEND unittests "test_weakref")
-list(APPEND unittests "test_weakset")
-list(APPEND unittests "test_webbrowser")
-list(APPEND unittests "test_winreg")
-list(APPEND unittests "test_winsound")
-list(APPEND unittests "test_with")
-list(APPEND unittests "test_wsgiref")
-list(APPEND unittests "test_xdrlib")
-list(APPEND unittests "test_xml_dom_minicompat")
-list(APPEND unittests "test_xml_etree")
-list(APPEND unittests "test_xml_etree_c")
-list(APPEND unittests "test_xmlrpc")
-list(APPEND unittests "test_xmlrpc_net")
-list(APPEND unittests "test_zipapp")
-list(APPEND unittests "test_zipfile")
-list(APPEND unittests "test_zipfile64")
-list(APPEND unittests "test_zipimport")
-list(APPEND unittests "test_zipimport_support")
-list(APPEND unittests "test_zlib")
-
-endif()
-
-list(REMOVE_DUPLICATES unittests)
+list(LENGTH filenames testcount)
+message(STATUS "Discovered ${testcount} tests")


Handle changing of LLVM_ENABLE_FFI.

Handle changing of LLVM_ENABLE_FFI.

If someone first configure build with LLVM_ENABLE_FFI=1 and then turn it
off, the build will fail in lib/ExecutionEngine/Interpreter because
Interpreter will try still to #include <ffi/ffi.h>, but there are no
include_directories(${FFI_INCLUDE_DIR}) now.

This patch unset()'s HAVE_FFI_H and HAVE_FFI_FFI_H from cache file if
LLVM_ENABLE_FFI=0. This forces CMake to update config.h.

Patch by arrowdodger!

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

--- cmake/config-ix.cmake
+++ cmake/config-ix.cmake
@@ -271,6 +271,10 @@
   check_symbol_exists(ffi_call ${FFI_HEADER} HAVE_FFI_CALL)
   list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES ${FFI_INCLUDE_PATH})
   list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES ${FFI_LIBRARY_PATH})
+else()
+  unset(HAVE_FFI_FFI_H CACHE)
+  unset(HAVE_FFI_H CACHE)
+  unset(HAVE_FFI_CALL CACHE)
 endif( LLVM_ENABLE_FFI )

 # Define LLVM_MULTITHREADED if gcc atomic builtins exists.


Upgrade ios min version to 8

Upgrade ios min version to 8

Summary:
Version 8 is the first version to support the __thread
keyword, which is required for building lsan for
64-bit ios.

Reviewers: kubamracek, kcc, glider

Subscribers: mgorny, llvm-commits

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

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

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


fix build directory removed by git clone

--- cmake/nya_fetch.cmake
+++ cmake/nya_fetch.cmake
@@ -1,3 +1,5 @@
+option(FETCHCONTENT_UPDATES_DISCONNECTED "by default do not try to update the repo each time" ON)
+
 include(FetchContent)

 # FetchContent into ../folder_name
@@ -17,7 +19,6 @@
 		endif()

 		get_filename_component(FETCH_ROOT ${CMAKE_SOURCE_DIR}/../${FETCH_NAME}  ABSOLUTE)
-		get_filename_component(BINARY_DIR_NAME ${CMAKE_BINARY_DIR} NAME)

 		message("++ fetch: " ${FETCH_ROOT})

@@ -25,8 +26,7 @@
 				GIT_REPOSITORY ${ARGV0}
 				GIT_TAG        ${FETCH_TAG}
 				SOURCE_DIR     ${FETCH_ROOT}
-				BINARY_DIR     ${FETCH_ROOT}/${BINARY_DIR_NAME}
-				)
+		)
 		FetchContent_MakeAvailable(${FETCH_NAME})
 	endif()
 endmacro(nya_fetch)


Doxygen expects YES instead of ON

Doxygen expects YES instead of ON

--- cmake/Doxygen.cmake
+++ cmake/Doxygen.cmake
@@ -1,9 +1,9 @@
 function(enable_doxygen)
   option(ENABLE_DOXYGEN "Enable doxygen doc builds of source" OFF)
   if(ENABLE_DOXYGEN)
-    set(DOXYGEN_CALLER_GRAPH ON)
-    set(DOXYGEN_CALL_GRAPH ON)
-    set(DOXYGEN_EXTRACT_ALL ON)
+    set(DOXYGEN_CALLER_GRAPH YES)
+    set(DOXYGEN_CALL_GRAPH YES)
+    set(DOXYGEN_EXTRACT_ALL YES)
     find_package(Doxygen REQUIRED dot)
     doxygen_add_docs(doxygen-docs ${PROJECT_SOURCE_DIR})


Update FindCAF CMake script

Update FindCAF CMake script

--- cmake/FindCAF.cmake
+++ cmake/FindCAF.cmake
@@ -36,12 +36,14 @@
   if (CAF_ROOT_DIR)
     set(header_hints
         "${CAF_ROOT_DIR}/include"
-        "${CAF_ROOT_DIR}/../libcaf_${comp}")
+        "${CAF_ROOT_DIR}/libcaf_${comp}"
+        "${CAF_ROOT_DIR}/../libcaf_${comp}"
+        "${CAF_ROOT_DIR}/../../libcaf_${comp}")
   endif ()
   find_path(CAF_INCLUDE_DIR_${UPPERCOMP}
             NAMES
               ${HDRNAME}
-              HINTS
+            HINTS
               ${header_hints}
               /usr/include
               /usr/local/include
@@ -51,18 +53,28 @@
   mark_as_advanced(CAF_INCLUDE_DIR_${UPPERCOMP})
   if (NOT "${CAF_INCLUDE_DIR_${UPPERCOMP}}"
       STREQUAL "CAF_INCLUDE_DIR_${UPPERCOMP}-NOTFOUND")
-    # mark as found (set back to false in case library cannot be found)
+    # mark as found (set back to false when missing library or build header)
     set(CAF_${comp}_FOUND true)
-    # add to CAF_INCLUDE_DIRS only if path isn't already set
-    set(duplicate false)
-    foreach (p ${CAF_INCLUDE_DIRS})
-      if (${p} STREQUAL ${CAF_INCLUDE_DIR_${UPPERCOMP}})
-        set(duplicate true)
-      endif ()
-    endforeach ()
-    if (NOT duplicate)
-      set(CAF_INCLUDE_DIRS ${CAF_INCLUDE_DIRS} ${CAF_INCLUDE_DIR_${UPPERCOMP}})
+    # check for CMake-generated build header for the core component
+    if ("${comp}" STREQUAL "core")
+      find_path(caf_build_header_path
+                NAMES
+                  caf/detail/build_config.hpp
+                HINTS
+                  ${header_hints}
+                  /usr/include
+                  /usr/local/include
+                  /opt/local/include
+                  /sw/include
+                  ${CMAKE_INSTALL_PREFIX}/include)
+      if ("${caf_build_header_path}" STREQUAL "caf_build_header_path-NOTFOUND")
+        message(WARNING "Found all.hpp for CAF core, but not build_config.hpp")
+        set(CAF_${comp}_FOUND false)
+      else()
+        list(APPEND CAF_INCLUDE_DIRS "${caf_build_header_path}")
+      endif()
     endif()
+    list(APPEND CAF_INCLUDE_DIRS "${CAF_INCLUDE_DIR_${UPPERCOMP}}")
     # look for (.dll|.so|.dylib) file, again giving hints for non-installed CAFs
     # skip probe_event as it is header only
     if (NOT ${comp} STREQUAL "probe_event" AND NOT ${comp} STREQUAL "test")
@@ -90,6 +102,8 @@
   endif ()
 endforeach ()

+list(REMOVE_DUPLICATES CAF_INCLUDE_DIRS)
+
 # let CMake check whether all requested components have been found
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(CAF


also print libraries

also print libraries

--- cmake/FindGSL.cmake
+++ cmake/FindGSL.cmake
@@ -90,6 +90,7 @@
 											        message(STATUS "GSL_DEFINITIONS=${GSL_DEFINITIONS}")
 													        message(STATUS "GSL_INCLUDE_DIRS=${GSL_INCLUDE_DIRS}")
 															        message(STATUS "GSL_CFLAGS=${GSL_CFLAGS}")
+															        message(STATUS "GSL_LIBRARIES=${GSL_LIBRARIES}")
 																	      else( RET EQUAL 0 )
 	        set( GSL_FOUND FALSE )
 	      endif( RET EQUAL 0 )


Correctly check if env vars are set

Correctly check if env vars are set

Change-Id: I365da786c822e9395aec5c6b75753ba297da3f64

--- cmake/FindHIP.cmake
+++ cmake/FindHIP.cmake
@@ -615,23 +615,25 @@
     endif()
     if("${HIP_COMPILER}" STREQUAL "hcc")
         if("x${HCC_HOME}" STREQUAL "x")
-            if (DEFINED $ENV{ROCM_PATH})
-               set(HCC_HOME "$ENV{ROCM_PATH}/hcc")
-            elseif( DEFINED $ENV{HIP_PATH})
-               set(HCC_HOME "$ENV{HIP_PATH}/../hcc")
+            if (DEFINED ENV{ROCM_PATH})
+                set(HCC_HOME "$ENV{ROCM_PATH}/hcc")
+            elseif(DEFINED ENV{HIP_PATH})
+                set(HCC_HOME "$ENV{HIP_PATH}/../hcc")
             else()
-               set(HCC_HOME "/opt/rocm/hcc")
+                set(HCC_HOME "/opt/rocm/hcc")
             endif()
         endif()
         set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HCC_HOME} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
     elseif("${HIP_COMPILER}" STREQUAL "clang")
-       if("x${HIP_CLANG_PATH}" STREQUAL "x")
-            if (DEFINED $ENV{ROCM_PATH})
-            set(HIP_CLANG_PATH  "$ENV{ROCM_PATH}/llvm/bin")
-            elseif( DEFINED $ENV{HIP_PATH})
-                set(HIP_CLANG_PATH  "$ENV{HIP_PATH}/../llvm/bin")
+        if("x${HIP_CLANG_PATH}" STREQUAL "x")
+            if(DEFINED ENV{HIP_CLANG_PATH})
+                set(HIP_CLANG_PATH $ENV{HIP_CLANG_PATH})
+            elseif(DEFINED ENV{ROCM_PATH})
+                set(HIP_CLANG_PATH "$ENV{ROCM_PATH}/llvm/bin")
+            elseif(DEFINED ENV{HIP_PATH})
+                set(HIP_CLANG_PATH "$ENV{HIP_PATH}/../llvm/bin")
             else()
-                set(HIP_CLANG_PATH  "/opt/rocm/llvm/bin")
+                set(HIP_CLANG_PATH "/opt/rocm/llvm/bin")
             endif()
         endif()
         set(CMAKE_HIP_LINK_EXECUTABLE "${HIP_HIPCC_CMAKE_LINKER_HELPER} ${HIP_CLANG_PATH} ${HIP_CLANG_PARALLEL_BUILD_LINK_OPTIONS} <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")


Change Intel MKL library to not use ilp64 but lp64 instead

--- cmake/FindMKL.cmake
+++ cmake/FindMKL.cmake
@@ -20,7 +20,7 @@
   PATH_SUFFIXES include)

 find_library(MKL_IFACE_LIB
-  NAMES mkl_intel_ilp64 libmkl_intel_ilp64.a
+  NAMES mkl_intel_lp64 libmkl_intel_lp64.a
   PATHS $ENV{MKLROOT}/lib $ENV{MKLROOT}/lib/intel64 $ENV{INTEL}/mkl/lib/intel64)

 find_library(MKL_SEQ_LIB


Added macOS framework support to FindQwt.cmake

Except for KDE parts, project now buildable on macOS \o/

--- cmake/FindQwt.cmake
+++ cmake/FindQwt.cmake
@@ -29,6 +29,7 @@

 include( FindPackageHandleStandardArgs )

+find_library( QWT_LIBRARIES NAMES qwt qwt-qt5 HINTS ${QWT_ROOT}/lib )
 find_path(
   QWT_INCLUDE_DIRS
     NAMES qwt.h
@@ -38,14 +39,22 @@
       ${QWT_ROOT}/include/qwt
 )

-find_library( QWT_LIBRARIES NAMES qwt qwt-qt5 HINTS ${QWT_ROOT}/lib )
+if( QWT_LIBRARIES MATCHES ".*\.framework" )
+    set(QWT_INCLUDE_DIRS "${QWT_LIBRARIES}/Headers")
+endif()

 find_package_handle_standard_args(QWT REQUIRED_VARS QWT_LIBRARIES QWT_INCLUDE_DIRS)

+
 if( QWT_FOUND )
-  if( NOT TARGET Qwt::Qwt )
+if( NOT TARGET Qwt::Qwt )
     add_library( Qwt::Qwt UNKNOWN IMPORTED )
-    set_target_properties( Qwt::Qwt PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${QWT_INCLUDE_DIRS}" )
-    set_target_properties( Qwt::Qwt PROPERTIES IMPORTED_LOCATION "${QWT_LIBRARIES}" )
-  endif( NOT TARGET Qwt::Qwt )
+    if(APPLE)
+        set_target_properties( Qwt::Qwt PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${QWT_INCLUDE_DIRS}" )
+        set_target_properties( Qwt::Qwt PROPERTIES IMPORTED_LOCATION "${QWT_LIBRARIES}/qwt" )
+    else()
+        set_target_properties( Qwt::Qwt PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${QWT_INCLUDE_DIRS}" )
+        set_target_properties( Qwt::Qwt PROPERTIES IMPORTED_LOCATION "${QWT_LIBRARIES}" )
+    endif()
+    endif( NOT TARGET Qwt::Qwt )
 endif( QWT_FOUND )


Fix FindTBB.cmake for newer versions

Fix FindTBB.cmake for newer versions

TODO: should use TBB_DIR instead

--- cmake/FindTBB.cmake
+++ cmake/FindTBB.cmake
@@ -52,7 +52,7 @@
 # TBB_LIBRARIES, the libraries to link against to use TBB.
 # TBB_DEBUG_LIBRARIES, the libraries to link against to use TBB with debug symbols.
 # TBB_FOUND, If false, don't try to use TBB.
-# TBB_INTERFACE_VERSION, as defined in tbb/tbb_stddef.h
+# TBB_INTERFACE_VERSION, as defined in tbb/version.h

 if (WIN32)
@@ -278,7 +278,7 @@

 if (TBB_FOUND)
   set(TBB_INTERFACE_VERSION 0)
-  FILE(READ "${TBB_INCLUDE_DIRS}/tbb/tbb_stddef.h" _TBB_VERSION_CONTENTS)
+  FILE(READ "${TBB_INCLUDE_DIRS}/tbb/version.h" _TBB_VERSION_CONTENTS)
   STRING(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_TBB_VERSION_CONTENTS}")
   set(TBB_INTERFACE_VERSION "${TBB_INTERFACE_VERSION}")
 endif (TBB_FOUND)


CMake: Made the memleak lib copying it's own target, to avoid some where the lib was not copied on time.

--- cmake/memleak.cmake
+++ cmake/memleak.cmake
@@ -38,41 +38,42 @@
         else ()
     	    link_directories(${IVW_EXTENSIONS_DIR}/vld/lib/Win32)
         endif()
+
+        if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
+            set(arch "Win64")
+        else()
+            set(arch "Win32")
+        endif()
+
+        add_custom_target("copy-memleak-lib"
+           COMMAND ${CMAKE_COMMAND}  -E copy_if_different
+                ${IVW_EXTENSIONS_DIR}/vld/bin/${arch}/vld_x64.dll
+                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/vld_x64.dll
+
+            COMMAND ${CMAKE_COMMAND}  -E copy_if_different
+                ${IVW_EXTENSIONS_DIR}/vld/bin/${arch}/dbghelp.dll
+                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/dbghelp.dll
+
+            COMMAND ${CMAKE_COMMAND}  -E copy_if_different
+                ${IVW_EXTENSIONS_DIR}/vld/bin/${arch}/Microsoft.DTfW.DHL.manifest
+                ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/Microsoft.DTfW.DHL.manifest
+
+            DEPENDS
+                ${IVW_EXTENSIONS_DIR}/vld/bin/${arch}/vld_x64.dll
+                ${IVW_EXTENSIONS_DIR}/vld/bin/${arch}/dbghelp.dll
+                ${IVW_EXTENSIONS_DIR}/vld/bin/${arch}/Microsoft.DTfW.DHL.manifest
+
+            WORKING_DIRECTORY ${OUTPUT_DIR}
+            COMMENT "Copying memleak libs"
+            VERBATIM
+        )
+        set_target_properties("copy-memleak-lib" PROPERTIES FOLDER "unittests")
+
     endif()
 ENDIF()

-function(ivw_memleak_setup unittest_target)
+function(ivw_memleak_setup target)
 	if(WIN32 AND MSVC AND IVW_ENABLE_MSVC_MEMLEAK_TEST)
-        if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
-            add_custom_command(TARGET ${unittest_target} POST_BUILD
-                                COMMAND ${CMAKE_COMMAND}  -E copy_if_different
-                                    ${IVW_EXTENSIONS_DIR}/vld/bin/Win64/vld_x64.dll
-                                    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/vld_x64.dll)
-
-            add_custom_command(TARGET ${unittest_target} POST_BUILD
-                                COMMAND ${CMAKE_COMMAND}  -E copy_if_different
-                                    ${IVW_EXTENSIONS_DIR}/vld/bin/Win64/dbghelp.dll
-                                    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/dbghelp.dll)
-
-            add_custom_command(TARGET ${unittest_target} POST_BUILD
-                                COMMAND ${CMAKE_COMMAND}  -E copy_if_different
-                                    ${IVW_EXTENSIONS_DIR}/vld/bin/Win64/Microsoft.DTfW.DHL.manifest
-                                    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/Microsoft.DTfW.DHL.manifest)
-        else ()
-            add_custom_command(TARGET ${unittest_target} POST_BUILD
-                                COMMAND ${CMAKE_COMMAND}  -E copy_if_different
-                                    ${IVW_EXTENSIONS_DIR}/vld/bin/Win32/vld_x86.dll
-                                    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/vld_x86.dll)
-
-            add_custom_command(TARGET ${unittest_target} POST_BUILD
-                                COMMAND ${CMAKE_COMMAND}  -E copy_if_different
-                                    ${IVW_EXTENSIONS_DIR}/vld/bin/Win32/dbghelp.dll
-                                    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/dbghelp.dll)
-
-            add_custom_command(TARGET ${unittest_target} POST_BUILD
-                                COMMAND ${CMAKE_COMMAND}  -E copy_if_different
-                                    ${IVW_EXTENSIONS_DIR}/vld/bin/Win32/Microsoft.DTfW.DHL.manifest
-                                    ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(ConfigurationName)/Microsoft.DTfW.DHL.manifest)
-        endif()
+        add_dependencies(${target} copy-memleak-lib)
 	endif()
 endfunction()


Update ParaView and VeloView superbuild checkout paths

--- Superbuild/versions.cmake
+++ Superbuild/versions.cmake
@@ -28,11 +28,11 @@

 add_revision(paraview
   GIT_REPOSITORY git://github.com/patmarion/ParaView.git
-  GIT_TAG PythonQtPlugin)
+  GIT_TAG PythonQtPlugin-pv4.0)

-add_revision(velodyneviewer
-  GIT_REPOSITORY git://kwsource.kitwarein.com/miscellaneousprojectsuda/velodyneviewer.git
-  GIT_TAG pat-wip)
+add_revision(veloview
+    SOURCE_DIR ${CMAKE_SOURCE_DIR}/..
+    DOWNLOAD_COMMAND "")

 if (WIN32)
   add_revision(pcap


[CMake] Update Platform Specific Mingw script.

--- EMULATOR/PLATFORM/Mingw.cmake
+++ EMULATOR/PLATFORM/Mingw.cmake
@@ -0,0 +1,24 @@
+if(MINGW)
+
+Message("Compiling for Windows!")
+
+#Find libs
+find_package(SDL2 REQUIRED)
+find_package(OpenGL REQUIRED)
+find_package(GLEW REQUIRED)
+
+#We want to link GLEW statically
+set(GLEW_USE_STATIC_LIBS ON)
+
+#Setup project include directories
+include_directories(${GLEW_INCLUDE_DIR})
+include_directories(${SDL2_INCLUDE_DIR})
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-narrowing -std=c++11")
+set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wno-narrowing -std=c++11")
+set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wno-narrowing -std=c++11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-narrowing -std=c++11")
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wno-narrowing -std=c++11")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wno-narrowing -std=c++11")
+
+endif()


Coveralls script reset.

Coveralls script reset.

--- cmake/OpenMACoverallsCustomTarget.cmake
+++ cmake/OpenMACoverallsCustomTarget.cmake
@@ -9,8 +9,8 @@
   ADD_CUSTOM_TARGET(coveralls
     # Generate the output
     COMMAND ${CMAKE_COMMAND}
-      -DCOVERAGE_SRCS_PATH="${PROJECT_SOURCE_DIR}/Code"
-      -DCOVERAGE_SRCS_EXCLUDED="base/macros.h::base/nodeid.h::base/opaque.h::base/type_traits.h::IO/endianformat.h::base/bodyenums.h"
+      -DCOVERAGE_SRCS_PATH="${PROJECT_SOURCE_DIR}/modules"
+      -DCOVERAGE_SRCS_EXCLUDED=""
       -DCOVERALLS_OUTPUT_FILE="${COVERALLS_FILE}"
       -DCOV_PATH="${PROJECT_BINARY_DIR}"
       -DPROJECT_ROOT="${PROJECT_SOURCE_DIR}"


Only print verbose messages in FindMKL if they are supported

--- CMakeModules/FindMKL.cmake
+++ CMakeModules/FindMKL.cmake
@@ -167,10 +167,14 @@

 if(WIN32)
   set(ENV_LIBRARY_PATHS "$ENV{LIB}")
-  message(VERBOSE "MKL environment variable(LIB): ${ENV_LIBRARY_PATHS}")
+  if (${CMAKE_VERSION} VERSION_GREATER 3.14)
+    message(VERBOSE "MKL environment variable(LIB): ${ENV_LIBRARY_PATHS}")
+  endif()
 else()
   string(REGEX REPLACE ":" ";" ENV_LIBRARY_PATHS "$ENV{LIBRARY_PATH}")
-  message(VERBOSE "MKL environment variable(LIBRARY_PATH): ${ENV_LIBRARY_PATHS}")
+  if (${CMAKE_VERSION} VERSION_GREATER 3.14)
+    message(VERBOSE "MKL environment variable(LIBRARY_PATH): ${ENV_LIBRARY_PATHS}")
+  endif()
 endif()

 # Finds and creates libraries for MKL with the MKL:: prefix
@@ -225,7 +229,9 @@
         intel64
         intel64/gcc4.7)
     if(MKL_${mkl_args_NAME}_LINK_LIBRARY)
-      message(VERBOSE "MKL_${mkl_args_NAME}_LINK_LIBRARY: ${MKL_${mkl_args_NAME}_LINK_LIBRARY}")
+      if (CMAKE_VERSION VERSION_GREATER 3.14)
+        message(VERBOSE "MKL_${mkl_args_NAME}_LINK_LIBRARY: ${MKL_${mkl_args_NAME}_LINK_LIBRARY}")
+      endif()
       mark_as_advanced(MKL_${mkl_args_NAME}_LINK_LIBRARY)
     endif()
   endif()
@@ -252,7 +258,9 @@
         IntelSWTools/compilers_and_libraries/windows/tbb/lib/intel64/${msvc_dir}
         )
       if(MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY)
-        message(VERBOSE "MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY: ${MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY}")
+        if (CMAKE_VERSION VERSION_GREATER 3.14)
+          message(VERBOSE "MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY: ${MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY}")
+        endif()
         mark_as_advanced(MKL_${mkl_args_NAME}_STATIC_LINK_LIBRARY)
       endif()
     endif()


worked on #53 - windows forking possible however stdout is not captured yet

--- tests/test_execution_per_process_test.cmake
+++ tests/test_execution_per_process_test.cmake
@@ -22,7 +22,7 @@
     call("${test}"())
     ans(time)
     popd()
-
+
   endfunction()


Fixed name of target for curl-asio

Fixed name of target for curl-asio

--- ThirdPartyLibraries.cmake
+++ ThirdPartyLibraries.cmake
@@ -413,6 +413,7 @@
   PREFIX ${CURL_ASIO_PREFIX}
   DOWNLOAD_COMMAND
       ${GIT} clone --depth 1 https://github.com/QuentinFiard/curl-asio.git
+          ${CURL_ASIO_TARGET}
   CONFIGURE_COMMAND
       BOOST_ROOT=${BOOST_PREFIX} cmake <SOURCE_DIR>
       -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
@@ -433,7 +434,7 @@
   WORKING_DIRECTORY ${CURL_ASIO_PREFIX}/lib)
 add_include_directory(${CURL_ASIO_PREFIX}/include)
 add_link_directory(${CURL_ASIO_PREFIX}/lib)
-set_library(curl_asio libcurlasio boost_system libcurl)
+set_library(curl-asio libcurlasio boost_system curl)
 add_dependencies(${CURL_ASIO_TARGET} ${BOOST_TARGET})
 add_dependencies(${CURL_ASIO_TARGET} ${LIBCURL_TARGET})

@@ -661,8 +662,6 @@
       ./configure --prefix=${GMP_PREFIX} --enable-cxx CC=${CMAKE_C_COMPILER}
           CXX=${CMAKE_CXX_COMPILER} CFLAGS=${CMAKE_C_FLAGS}
           CXXFLAGS=${CMAKE_CXX_FLAGS} LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}
-  BUILD_COMMAND make -j${PROCESSOR_COUNT}
-  INSTALL_COMMAND make install
   BUILD_IN_SOURCE 1)
 add_dependencies(${GMP_TARGET} ${GNUTAR_TARGET})
 set_library(gmp gmp)
@@ -1142,7 +1141,7 @@
       cd <SOURCE_DIR> &&
       tar --strip-components 1 -xvf
           ${MAVEN_PREFIX}/download/apache-maven-3.1.1-src.tar.gz
-  CONFIGURE_COMMAND ""
+  CONFIGURE_COMMAND echo ""
   BUILD_COMMAND
       M2_HOME=${MAVEN_PREFIX}/build ${ANT}
   INSTALL_COMMAND


Bringing the Modules online

Bringing the Modules online

--- Tools/CMake/Modules.cmake
+++ Tools/CMake/Modules.cmake
@@ -20,30 +20,29 @@

 set(JASP_COMMON_MODULES
     "jaspDescriptives"
-    # "jaspAnova"
-    # "jaspFactor"
-    # "jaspFrequencies"
-    # "jaspRegression"
-    # "jaspTTests"
-    # "jaspMixedModels"
-)
+    "jaspAnova"
+    "jaspFactor"
+    "jaspFrequencies"
+    "jaspRegression"
+    "jaspTTests"
+    "jaspMixedModels")

 set(JASP_EXTRA_MODULES
-    # "jaspProphet"
-    # "jaspCircular"
-    # "jaspAudit"
-    # "jaspBain"
-    # "jaspNetwork"
-    # "jaspSem"
-    # "jaspMachineLearning"
-    # "jaspSummaryStatistics"
+    "jaspProphet"
+    "jaspCircular"
+    "jaspAudit"
+    "jaspBain"
+    "jaspNetwork"
+    "jaspSem"
+    "jaspMachineLearning"
+    "jaspSummaryStatistics"
     "jaspMetaAnalysis"
-    # "jaspDistributions"
-    # "jaspEquivalenceTTests"
-    # "jaspJags"
-    # "jaspReliability"
-    # "jaspVisualModeling"
-    # "jaspLearnBayes"
+    "jaspDistributions"
+    "jaspEquivalenceTTests"
+    "jaspJags"
+    "jaspReliability"
+    "jaspVisualModeling"
+    "jaspLearnBayes"
     # "jaspProcessControl"
 )


refined the bugfix for get methods

refined the bugfix for get methods

--- copasi/bindings/R/patch-swig-file.cmake
+++ copasi/bindings/R/patch-swig-file.cmake
@@ -39,9 +39,10 @@
 string(REPLACE "idx = pmatch(name, names(accessorFuns));" "idx = match(name, names(accessorFuns));" SOURCECODE "${SOURCECODE}" )

 # Prevents get(...) methods from falsely being categorizes as accessor functions by swig
-string(REPLACE "vaccessors = c('get', " "vaccessors = c(" SOURCECODE "${SOURCECODE}" )
-string(REPLACE "vaccessors = c('get'," "vaccessors = c(" SOURCECODE "${SOURCECODE}" )
-string(REPLACE "vaccessors = c('get')" "vaccessors = c()" SOURCECODE "${SOURCECODE}" )
+string(REGEX REPLACE "vaccessors = c\\('(get|set)[a-zA-Z0-9_]*'" "vaccessors = c(''" SOURCECODE "${SOURCECODE}" )
+string(REGEX REPLACE "vaccessors = c\\('([a-zA-Z0-9_]*)', ?'(get|set)[a-zA-Z0-9_]*'" "vaccessors = c('\\1'" SOURCECODE "${SOURCECODE}" )
+string(REGEX REPLACE "vaccessors = c\\('', ?" "vaccessors = c(" SOURCECODE "${SOURCECODE}" )
+string(REPLACE "vaccessors = c('')" "vaccessors = c()" SOURCECODE "${SOURCECODE}" )

 # remove enumFrom/ToInteger code
 SET(NEW_CODE "


Remove specific cray target

Remove specific cray target

--- compiler/cray.cmake
+++ compiler/cray.cmake
@@ -14,5 +14,5 @@
 set(TEST_BASE_FLAGS "-h noacc,noomp") # Unactivate OpenACC and OpenMP
 set(OPENACC_FLAGS "-h acc,noomp")     # flags to compile with OpenACC support
 set(OPENMP_FLAGS "-h noacc,omp")      # flags to compile with OpenMP support
-set(OMNI_TARGET "--target=Cray-linux-gnu") # Compilation of OMNI compiler
+set(OMNI_TARGET "")                   # Compilation of OMNI compiler
 set(COMPILER_MACRO "-D_CRAYFTN")      # predefined macro by compiler


[Config] Fixed the delivery directory of Python modules and libraries

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -497,7 +497,7 @@

     # Set the Python installation directory
     set (INSTALL_PY_LIB_DIR
-      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
+      ${INSTALL_LIB_DIR}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PROJECT_NAME}
       CACHE PATH "Installation directory for Python libraries")

     # Update the list of include directories for the project
@@ -1461,7 +1461,7 @@
   set (exec_prefix   ${prefix})
   set (bindir        ${exec_prefix}/bin)
   set (libdir        ${exec_prefix}/${LIBDIR})
-  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
+  set (pylibdir	     ${libdir}/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages/py${PACKAGE})
   set (libexecdir    ${exec_prefix}/libexec)
   set (sbindir       ${exec_prefix}/sbin)
   set (sysconfdir    ${prefix}/etc)


[Build] Suppressed wrong end-of-lines.

[Build] Suppressed wrong end-of-lines.

--- config/project_config_embeddable.cmake
+++ config/project_config_embeddable.cmake
@@ -1280,9 +1280,7 @@

   # Convenient message to the user/developer
   if (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)
-    install (CODE "message (\"On Unix-based platforms, run "
-	  "export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH "
-	  "once per session\")")
+    install (CODE "message (\"On Unix-based platforms, run export LD_LIBRARY_PATH=${INSTALL_LIB_DIR}:\$LD_LIBRARY_PATH once per session\")")
   endif (NOT CMAKE_INSTALL_RPATH_USE_LINK_PATH)

 endmacro (module_library_add_standard)


Document recent change of FindFLTK.cmake module.

--- config/FindFLTK.cmake
+++ config/FindFLTK.cmake
@@ -13,6 +13,7 @@
 #                            - Fix raising of error when FLTK not found by changing FLTK_REQUIRED to FLTK_FIND_REQUIRED.
 #                            - Change FLTK_IMAGES_LIBS to FLTK_IMAGES_LIBRARIES.
 #                            - Remove backwards compatible settings for CMake 1.4.
+# 14/11/2012 Andreas Schuh   - Set FLTK_INCLUDE_DIR to FLTK_INCLUDE_DIRS as used by FLTK 1.1.
 #
 # Find the native FLTK includes and library.  This is a hacked about version of
 # the FindFLTK.cmake module provided with CMake.


Squashed '3rdparty/github/cmake-utils/' changes from 0377618d..01f6628b

01f6628b inttypes recover fix

git-subtree-dir: 3rdparty/github/cmake-utils
git-subtree-split: 01f6628b385f6532d8b2c5ea533f198246a18017

--- cmake/MyPackageCheckCommonSizes.cmake
+++ cmake/MyPackageCheckCommonSizes.cmake
@@ -1,5 +1,23 @@
 MACRO (MYPACKAGECHECKCOMMONSIZES)
+  INCLUDE (CheckIncludeFile)
   INCLUDE (CheckTypeSize)
+
+  SET (CMAKE_EXTRA_INCLUDE_FILES_BACKUP ${CMAKE_EXTRA_INCLUDE_FILES}) # backup
+  SET (CMAKE_EXTRA_INCLUDE_FILES) # reset
+  CHECK_INCLUDE_FILE ("stdint.h"       HAVE_STDINT_H)
+  IF (HAVE_STDINT_H)
+    LIST (APPEND CMAKE_EXTRA_INCLUDE_FILES "stdint.h")
+  ENDIF ()
+  CHECK_INCLUDE_FILE ("inttypes.h"     HAVE_INTTYPES_H)
+  IF (HAVE_INTTYPES_H)
+    LIST (APPEND CMAKE_EXTRA_INCLUDE_FILES "inttypes.h")
+  ENDIF ()
+  CHECK_INCLUDE_FILE ("sys/inttypes.h" HAVE_SYS_INTTYPES_H)
+  IF (HAVE_SYS_INTTYPES_H)
+    LIST (APPEND CMAKE_EXTRA_INCLUDE_FILES "sys/inttypes.h")
+  ENDIF ()
+
+  CHECK_TYPE_SIZE("char" SIZEOF_CHAR)
   CHECK_TYPE_SIZE("short" SIZEOF_SHORT)
   CHECK_TYPE_SIZE("int" SIZEOF_INT)
   CHECK_TYPE_SIZE("long" SIZEOF_LONG)
@@ -7,6 +25,7 @@
   CHECK_TYPE_SIZE("float" SIZEOF_FLOAT)
   CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE)
   CHECK_TYPE_SIZE("long double" SIZEOF_LONG_DOUBLE)
+  CHECK_TYPE_SIZE("unsigned char" SIZEOF_UNSIGNED_CHAR)
   CHECK_TYPE_SIZE("unsigned short" SIZEOF_UNSIGNED_SHORT)
   CHECK_TYPE_SIZE("unsigned int" SIZEOF_UNSIGNED_INT)
   CHECK_TYPE_SIZE("unsigned long" SIZEOF_UNSIGNED_LONG)
@@ -17,6 +36,7 @@
   #
   FOREACH (_sign "" "u")
     FOREACH (_size 8 16 32 64)
+      MATH(EXPR  _sizeof "${_size} / 8")
       SET (_mytype    MYPACKAGE_${_sign}int${_size})
       STRING (TOUPPER ${_mytype} _MYTYPE)
       SET (_MYTYPEDEF ${_MYTYPE}_TYPEDEF)
@@ -32,7 +52,7 @@
         CHECK_TYPE_SIZE (${_type} ${_TYPE})
         IF (HAVE_${_TYPE})
           SET (HAVE_${_MYTYPE} TRUE)
-          SET (${_MYTYPE} ${${_TYPE}})
+          SET (SIZEOF_${_MYTYPE} ${${_TYPE}})
           SET (${_MYTYPEDEF} ${_type})
           BREAK ()
         ENDIF ()
@@ -41,16 +61,15 @@
         #
         # Try with C types
         #
-        FOREACH (_c "short" "int" "long" "long long")
+        FOREACH (_c "char" "short" "int" "long" "long long")
           IF ("${_sign}" STREQUAL "u")
             SET (_c "unsigned ${_c}")
           ENDIF ()
           STRING (TOUPPER ${_c} _C)
           STRING (REPLACE " " "_" _C "${_C}")
           IF (HAVE_SIZEOF_${_C})
-            IF (${SIZEOF_${_C}} EQUAL ${_size})
+            IF (${SIZEOF_${_C}} EQUAL ${_sizeof})
               SET (HAVE_${_MYTYPE} TRUE)
-              SET (${_MYTYPE} ${${_TYPE}})
               SET (${_MYTYPEDEF} ${_c})
               BREAK ()
             ENDIF ()
@@ -59,8 +78,9 @@
       ENDIF ()
       MARK_AS_ADVANCED (
         HAVE_${_MYTYPE}
-        ${_MYTYPE}
         ${_MYTYPEDEF})
     ENDFOREACH ()
   ENDFOREACH ()
+
+  SET (CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_BACKUP}) # restore
 ENDMACRO()


Fix BOOST_NO_CXX11_HDR_UNORDERED_MAP warning

When forcing CXX11 to off, I get the following warning with gcc <4.8:
```
/ssd/deal-git/bundled/boost-1.62.0/include/boost/config/stdlib/libstdcpp3.hpp:182:0: warning: "BOOST_NO_CXX11_HDR_UNORDERED_MAP" redefined
```
This change fixes this.

--- cmake/configure/configure_boost.cmake
+++ cmake/configure/configure_boost.cmake
@@ -38,7 +38,8 @@
   # [1] https://svn.boost.org/trac/boost/ticket/12755
   #
   IF( CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND
-      CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" )
+      CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.8" AND
+      DEAL_II_WITH_CXX11)
     LIST(APPEND BOOST_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
     LIST(APPEND BOOST_USER_DEFINITIONS "BOOST_NO_CXX11_HDR_UNORDERED_MAP")
   ENDIF()


Don't make PDBs by default in Release mode

Introduce the LLVM_ENABLE_PDB option so that users can request them
explicitly instead.

Add /OPT:REF and /OPT:ICF back, which /DEBUG disables by default.

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

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -353,11 +353,18 @@

   append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)

-  # Generate PDB even in release for profiling.
-  if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+  # Allow users to request PDBs in release mode. CMake offeres the
+  # RelWithDebInfo configuration, but it uses different optimization settings
+  # (/Ob1 vs /Ob2 or -O2 vs -O3). LLVM provides this flag so that users can get
+  # PDBs without changing codegen.
+  option(LLVM_ENABLE_PDB OFF)
+  if (LLVM_ENABLE_PDB AND uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
     append("/Zi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
-    append("/DEBUG" CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
-  endif (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+    # /DEBUG disables linker GC and ICF, but we want those in Release mode.
+    append("/DEBUG /OPT:REF /OPT:ICF"
+          CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS
+          CMAKE_SHARED_LINKER_FLAGS)
+  endif()

   # /Zc:strictStrings is incompatible with VS12's (Visual Studio 2013's)
   # debug mode headers. Instead of only enabling them in VS2013's debug mode,


cmake: don't set LLVM_COMPILER_IS_GCC_COMPATIBLE when using clang-cl

Tip-of-tree CMake has become clang-cl aware [1]. In this case,
CMAKE_CXX_COMPILER_ID will still be Clang, but MSVC will be true.

[1] See http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3d8356d4

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

--- cmake/modules/HandleLLVMOptions.cmake
+++ cmake/modules/HandleLLVMOptions.cmake
@@ -8,6 +8,8 @@

 if( CMAKE_COMPILER_IS_GNUCXX )
   set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
+elseif( MSVC )
+  set(LLVM_COMPILER_IS_GCC_COMPATIBLE OFF)
 elseif( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
   set(LLVM_COMPILER_IS_GCC_COMPATIBLE ON)
 endif()


Fix Chrome and Firefox on Windows

Fix Chrome and Firefox on Windows

Add standard "Program Files" location on Windows to find chrome.exe and firefox.exe

--- cmake/modules/RootConfiguration.cmake
+++ cmake/modules/RootConfiguration.cmake
@@ -422,12 +422,16 @@
 find_program(PERL_EXECUTABLE perl)
 set(perl ${PERL_EXECUTABLE})

-find_program(CHROME_EXECUTABLE NAMES chromium chromium-browser chrome chrome-browser Google\ Chrome)
+find_program(CHROME_EXECUTABLE NAMES chrome.exe chromium chromium-browser chrome chrome-browser Google\ Chrome
+             PATHS "$ENV{PROGRAMFILES}/Google/Chrome/Application"
+             "$ENV{PROGRAMFILES\(X86\)}/Google/Chrome/Application")
 if(CHROME_EXECUTABLE)
   set(chromeexe ${CHROME_EXECUTABLE})
 endif()

-find_program(FIREFOX_EXECUTABLE NAMES firefox firefox.exe)
+find_program(FIREFOX_EXECUTABLE NAMES firefox firefox.exe
+             PATHS "$ENV{PROGRAMFILES}/Mozilla Firefox"
+             "$ENV{PROGRAMFILES\(X86\)}/Mozilla Firefox")
 if(FIREFOX_EXECUTABLE)
   set(firefoxexe ${FIREFOX_EXECUTABLE})
 endif()


refs #4871 link against stdc++ instead of c

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -206,7 +206,7 @@
 function(set_targets_need_intel_libs)
   if (CMAKE_CXX_COMPILER_ID STREQUAL Intel)
     foreach(tgt ${ARGN})
-      target_link_libraries(${tgt} LINK_PUBLIC -Bstatic irc -Bdynamic c)
+      target_link_libraries(${tgt} LINK_PUBLIC -Bstatic irc -Bdynamic stdc++)
     endforeach(tgt)
   endif ()
 endfunction(set_targets_need_intel_libs)


reversing accidental merge

reversing accidental merge

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

--- cmake_modules/TokuSetupCompiler.cmake
+++ cmake_modules/TokuSetupCompiler.cmake
@@ -10,18 +10,13 @@

 ## preprocessor definitions we want everywhere
 add_c_defines(
+  _SVID_SOURCE
+  _XOPEN_SOURCE=600
   _FILE_OFFSET_BITS=64
   _LARGEFILE64_SOURCE
   __STDC_FORMAT_MACROS
   __STDC_LIMIT_MACROS
-  __LONG_LONG_SUPPORTED
-  )
-if (NOT CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
-  add_c_defines(
-    _SVID_SOURCE
-    _XOPEN_SOURCE=600
-    )
-endif ()
+  )

 ## add TOKU_PTHREAD_DEBUG for debug builds
 set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG TOKU_PTHREAD_DEBUG)
@@ -94,12 +89,6 @@
 if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
   set_cflags_if_supported(
     -Wpacked
-    )
-endif ()
-
-if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
-  set_cflags_if_supported(
-    -Wno-error=unused-but-set-variable
     )
 endif ()


UploadPPA bugfix

UploadPPA bugfix

--- UploadPPA.cmake
+++ UploadPPA.cmake
@@ -16,8 +16,9 @@
   message(STATUS "dput not found")
   return()
 endif()
-if(CMAKE_BINARY_DIR MATCHES "${CMAKE_SOURCE_DIR}")
-  message(STATUS "Build directory is a sub-directory of source, no PPA upload")
+if(CMAKE_BINARY_DIR MATCHES "${CMAKE_SOURCE_DIR}/")
+  message(STATUS "Build directory ${CMAKE_BINARY_DIR} is a sub-directory of "
+    "source directory ${CMAKE_SOURCE_DIR}, no PPA upload")
   return()
 endif()


Fix gperf cmake (thanks Matt Jones)

Fix gperf cmake (thanks Matt Jones)

--- Utilities.cmake
+++ Utilities.cmake
@@ -66,7 +66,7 @@
     efu_common)

   if(GPERF)
-    target_link_libraries(${exec_name} ${GPERFTOOLS_PROFILER})
+    target_link_libraries(${exec_name} PUBLIC ${GPERFTOOLS_PROFILER})
   endif()

   set_target_properties(${exec_name} PROPERTIES


Fix another cmake typo.

Fix another cmake typo.

--- cmake/external_rules.cmake
+++ cmake/external_rules.cmake
@@ -153,7 +153,7 @@
     if (CMAKE_BUILD_TYPE STREQUAL "Debug")
       set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS}
           --config Debug)
-    else
+    else()
       set(CMAKE_SUB_BUILD_OPTIONS ${CMAKE_SUB_BUILD_OPTIONS}
           --config Release)
     endif()


ENH: Update to latest version of ITK to support enum-classes

The newest sphinx examples need to newest ITK version to
support the  definitions.

--- Superbuild/External-ITK.cmake
+++ Superbuild/External-ITK.cmake
@@ -2,7 +2,7 @@
 # Get and build itk

 if(NOT ITK_TAG)
-  set(ITK_TAG "v5.0.0")
+  set(ITK_TAG "ddbaeae13c1711fcb3010b6e81b108cb10677875")
 endif()

 set(_vtk_args)


ENH: Update the SmoothingRecursiveYvvGaussianFilter remote module hash.

Update the `SmoothingRevursiveYvvGaussianFilter` remote module commit hash
to the latest commit.

--- Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
+++ Modules/Remote/SmoothingRecursiveYvvGaussianFilter.remote.cmake
@@ -3,5 +3,5 @@
   "GPU and CPU Young & Van Vliet Recursive Gaussian Smoothing Filter: https://hdl.handle.net/10380/3425"
   #UPSTREAM_REPO GIT_REPOSITORY ${git_protocol}://github.com/Inria-Asclepios/SmoothingRecursiveYvvGaussianFilter
   GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/SmoothingRecursiveYvvGaussianFilter.git
-  GIT_TAG f515ba80ca971027f5e3aafef4278d0b0f69d698
+  GIT_TAG 978da8a4a4c1d3739462f5607937119423a72825
   )


Replace - and / with _ in CMake compiler flag variables to avoid warnings.

In case of checking -Werror, this leads to false-negatives when checking
if the compiler understands the flag. This is because
CHECK_CXX_COMPILER_FLAG adds the CMake variable as a define to the
compiler arguments and defines containing a - are not valid, triggering
a compiler warning which in case of checking -Werror leads to a
compiler error. Hence the CMake macro thinks the compiler does not
understand the -Werror flag although it actually does.

Clearing the CMAKE_C(XX)_FLAGS_* variables also solves problems on
Windows where the -library=stlport4 flag (inherited from ITK) leads
to warnings (D9002 unknown option) triggering false-negatives.

--- CMake/mitkFunctionCheckCompilerFlags.cmake
+++ CMake/mitkFunctionCheckCompilerFlags.cmake
@@ -41,7 +41,7 @@
   # the cost of compiling the test each time the project is configured, the variable set by
   # the macro is added to the cache so that following invocation of the macro with
   # the same variable name skip the compilation step.
-  # For that same reason, ctkFunctionCheckCompilerFlags function appends a unique suffix to
+  # For that same reason, the mitkFunctionCheckCompilerFlags function appends a unique suffix to
   # the HAS_FLAG variable. This suffix is created using a 'clean version' of the flag to test.
   string(REGEX REPLACE "[, \\$\\+\\*\\{\\}\\(\\)\\#]" "" suffix ${CXX_FLAG_TO_TEST})
   CHECK_CXX_ACCEPTS_FLAG(${CXX_FLAG_TO_TEST} HAS_FLAG_${suffix})
@@ -58,13 +58,31 @@
     message(FATAL_ERROR "FLAG_TO_TEST shouldn't be empty")
   endif()

-  # Internally, the macro CMAKE_CXX_ACCEPTS_FLAG calls TRY_COMPILE. To avoid
+  # Clear all flags. If not, existing flags triggering warnings might lead to
+  # false-negatives when checking for certain compiler flags.
+  set(CMAKE_C_FLAGS )
+  set(CMAKE_C_FLAGS_DEBUG )
+  set(CMAKE_C_FLAGS_MINSIZEREL )
+  set(CMAKE_C_FLAGS_RELEASE )
+  set(CMAKE_C_FLAGS_RELWITHDEBINFO )
+  set(CMAKE_CXX_FLAGS )
+  set(CMAKE_CXX_FLAGS_DEBUG )
+  set(CMAKE_CXX_FLAGS_MINSIZEREL )
+  set(CMAKE_CXX_FLAGS_RELEASE )
+  set(CMAKE_CXX_FLAGS_RELWITHDEBINFO )
+
+  # Internally, the macro CMAKE_CXX_COMPILER_FLAG calls TRY_COMPILE. To avoid
   # the cost of compiling the test each time the project is configured, the variable set by
   # the macro is added to the cache so that following invocation of the macro with
   # the same variable name skip the compilation step.
-  # For that same reason, ctkFunctionCheckCompilerFlags function appends a unique suffix to
-  # the HAS_FLAG variable. This suffix is created using a 'clean version' of the flag to test.
-  string(REGEX REPLACE "[, \\$\\+\\*\\{\\}\\(\\)\\#]" "" suffix ${FLAG_TO_TEST})
+  # For that same reason, the mitkFunctionCheckCompilerFlags2 function appends a unique suffix to
+  # the HAS_CXX_FLAG and HAS_C_FLAG variable. This suffix is created using a 'clean version' of the
+  # flag to test. The value of HAS_C(XX)_FLAG_${suffix} additonally needs to be a valid
+  # pre-processor token because CHECK_CXX_COMPILER_FLAG adds it as a definition to the compiler
+  # arguments. An invalid token triggers compiler warnings, which in case of the "-Werror" flag
+  # leads to false-negative checks.
+  string(REGEX REPLACE "[/-]" "_" suffix ${FLAG_TO_TEST})
+  string(REGEX REPLACE "[, \\$\\+\\*\\{\\}\\(\\)\\#]" "" suffix ${suffix})
   CHECK_CXX_COMPILER_FLAG(${FLAG_TO_TEST} HAS_CXX_FLAG_${suffix})

   if(HAS_CXX_FLAG_${suffix})


hsa: check for clang -target amdgcn--amdhsa -nogpulib

--- cmake/HSA.cmake
+++ cmake/HSA.cmake
@@ -28,9 +28,20 @@
 else()
   message(STATUS "Trying HSA support in LLVM")
   # test that Clang supports the amdgcn--amdhsa target
+  message(CHECK_START "Check if Clang accepts -target amdgcn--amdhsa")
   custom_try_compile_clangxx("" "return 0;" RESULT "-target" "amdgcn--amdhsa" "-emit-llvm" "-S")
   if(RESULT)
-    message(FATAL_ERROR "LLVM support for amdgcn--amdhsa target is required")
+    message(CHECK_FAIL "no")
+    message(CHECK_START "Check if Clang accepts -target amdgcn--amdhsa -nogpulib")
+    custom_try_compile_clangxx("" "return 0;" RESULT "-target" "amdgcn--amdhsa" "-nogpulib" "-emit-llvm" "-S")
+    if(RESULT)
+      message(CHECK_FAIL "no")
+      message(FATAL_ERROR "LLVM support for amdgcn--amdhsa target is required")
+    else()
+      message(CHECK_PASS "yes")
+    endif()
+  else()
+    message(CHECK_PASS "yes")
   endif()
   # test that Clang supports the hsail64 target
   message(CHECK_START "Check if Clang accepts -target hsail64")


using global scope

using global scope

--- cmake/lib.cmake
+++ cmake/lib.cmake
@@ -21,6 +21,7 @@
 endif()

-set(ETHSTEALTH_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/include PARENT_SCOPE)
-set(ETHSTEALTH_LIBRARY ethcrypto)
-set(ETHSTEALTH_LIBRARIES ${ETHSTEALTH_LIBRARY})
+set(ETHSTEALTH_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include CACHE STRING "" FORCE)
+set(ETHSTEALTH_INCLUDE_DIRS ${ETHSTEALTH_INCLUDE_DIR} CACHE STRING "" FORCE)
+set(ETHSTEALTH_LIBRARY ethcrypto CACHE STRING "" FORCE)
+set(ETHSTEALTH_LIBRARIES ${ETHSTEALTH_LIBRARY} CACHE STRING "" FORCE)


core: cmake: FileSystem.cpp should be compiled as ObjectiveC++ on OSX and iOS

--- core/cmake/test.cmake
+++ core/cmake/test.cmake
@@ -280,6 +280,11 @@
       "-framework Foundation"
     )

+    set_source_files_properties(
+      "${CROSS_ROOT}/src/chr/FileSystem.cpp"
+      PROPERTIES COMPILE_FLAGS "-x objective-c++"
+    )
+
   elseif (PLATFORM MATCHES android AND RUN MATCHES APK)
     list(APPEND LIBRARIES
       log


Fix variable syntax.

Fix variable syntax.

--- cmake/CXXFeatureCheck.cmake
+++ cmake/CXXFeatureCheck.cmake
@@ -36,7 +36,7 @@
   else()
     if(NOT COMPILE_${FEATURE})
       message("-- Performing Test ${FEATURE} -- failed to compile")
-    elseif(COMPILE_${FEATURE} AND (CMAKE_CROSSCOMPILING AND NOT RUN_${FEATURE}))
+    elseif(COMPILE_${FEATURE} AND (${CMAKE_CROSSCOMPILING} AND NOT RUN_${FEATURE}))
       message("-- Performing Test ${FEATURE} -- compiled but failed to run, likely because CMAKE_CROSSCOMPILING is set")
     else()
       message("-- Performing Test ${FEATURE} -- compiled but failed to run")


FIXES: Fixed ImageMagick-6 detection with modified FindImageMagic.cmake file

The file I added was from Cmake 2.8 and didn't know how to detect ImageMagick-6 on Linux.

--- cmake/FindImageMagick.cmake
+++ cmake/FindImageMagick.cmake
@@ -108,8 +108,8 @@
     set (IMAGEMAGIC_REGLIB_PATH ${IM_BIN_PATH}/lib PARENT_SCOPE)

   else()
-
-#  message(WARNING "In FIND_REGISTRY:  LINUX_BUILD")
+
+    # No registry exists for Linux.  So, just set these to empty strings.
     set (IMAGEMAGIC_REG_PATH "" PARENT_SCOPE)
     set (IMAGEMAGIC_REGINCLUDE_PATH "" PARENT_SCOPE)
     set (IMAGEMAGIC_REGLIB_PATH "" PARENT_SCOPE)
@@ -130,8 +130,17 @@
       ${ImageMagick_INCLUDE_DIRS}
       ${IMAGEMAGIC_REGINCLUDE_PATH}
     PATH_SUFFIXES
-      ImageMagick
+      ImageMagick ImageMagick-6
     DOC "Path to the ImageMagick include dir."
+    )
+  FIND_PATH(ImageMagick_${component}_ARCH_INCLUDE_DIR
+    NAMES magick/magick-baseconfig.h
+    PATHS
+      ${ImageMagick_INCLUDE_DIRS}
+      ${IMAGEMAGIC_REGINCLUDE_PATH}
+    PATH_SUFFIXES
+      ImageMagick ImageMagick-6
+    DOC "Path to the ImageMagick arch-specific include dir."
     )
   FIND_LIBRARY(ImageMagick_${component}_LIBRARY
     NAMES ${ARGN}
@@ -141,11 +150,14 @@
     )

   IF(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
+
     SET(ImageMagick_${component}_FOUND TRUE PARENT_SCOPE)
-
     LIST(APPEND ImageMagick_INCLUDE_DIRS
       ${ImageMagick_${component}_INCLUDE_DIR}
       )
+    LIST(APPEND ImageMagick_${component}_INCLUDE_DIRS
+      ${ImageMagick_${component}_ARCH_INCLUDE_DIR}
+      )
     LIST(REMOVE_DUPLICATES ImageMagick_INCLUDE_DIRS)
     SET(ImageMagick_INCLUDE_DIRS ${ImageMagick_INCLUDE_DIRS} PARENT_SCOPE)

@@ -154,6 +166,7 @@
       )
     SET(ImageMagick_LIBRARIES ${ImageMagick_LIBRARIES} PARENT_SCOPE)
   ENDIF(ImageMagick_${component}_INCLUDE_DIR AND ImageMagick_${component}_LIBRARY)
+
 ENDFUNCTION(FIND_IMAGEMAGICK_API)

 FUNCTION(FIND_IMAGEMAGICK_EXE component)
@@ -197,15 +210,15 @@
     )
   IF(component STREQUAL "Magick++")
     FIND_IMAGEMAGICK_API(Magick++ Magick++.h
-      Magick++ CORE_RL_Magick++_
+      Magick++ CORE_RL_Magick++_ Magick++-6.Q16 Magick++-Q16 Magick++-6.Q8 Magick++-Q8 Magick++-6.Q16HDRI Magick++-Q16HDRI Magick++-6.Q8HDRI Magick++-Q8HDRI
       )
   ELSEIF(component STREQUAL "MagickWand")
     FIND_IMAGEMAGICK_API(MagickWand wand/MagickWand.h
-      Wand MagickWand CORE_RL_wand_
+      Wand MagickWand CORE_RL_wand_ MagickWand-6.Q16 MagickWand-Q16 MagickWand-6.Q8 MagickWand-Q8 MagickWand-6.Q16HDRI MagickWand-Q16HDRI MagickWand-6.Q8HDRI MagickWand-Q8HDRI
       )
   ELSEIF(component STREQUAL "MagickCore")
     FIND_IMAGEMAGICK_API(MagickCore magick/MagickCore.h
-      Magick MagickCore CORE_RL_magick_
+      Magick MagickCore CORE_RL_magick_ MagickCore-6.Q16 MagickCore-Q16 MagickCore-6.Q8 MagickCore-Q8 MagickCore-6.Q16HDRI MagickCore-Q16HDRI MagickCore-6.Q8HDRI MagickCore-Q8HDRI
       )
   ELSE(component STREQUAL "Magick++")
     IF(ImageMagick_EXECUTABLE_DIR)


cmake: fix typo

cmake: fix typo

--- cmake/OpenCVFindIPPIW.cmake
+++ cmake/OpenCVFindIPPIW.cmake
@@ -137,7 +137,7 @@

   # Package sources
   get_filename_component(__PATH "${IPPROOT}/../${IW_PACKAGE_SUBDIR}/" ABSOLUTE)
-  ippiw_setup("${_PATH}" 1)
+  ippiw_setup("${__PATH}" 1)
 endif()


cmake: print shields together with board

Currently only BOARD is printed when running CMake.

This commit prints shields together with board, if one or more shields
are specified.

Signed-off-by: Torsten Rasmussen <a7c5b1d5a1f41fce6edfa3f7c2392ae0c59deafe@nordicsemi.no>

--- cmake/app/boilerplate.cmake
+++ cmake/app/boilerplate.cmake
@@ -193,7 +193,7 @@
 # Check that BOARD has been provided, and that it has not changed.
 zephyr_check_cache(BOARD REQUIRED)

-message(STATUS "Board: ${BOARD}")
+set(BOARD_MESSAGE "Board: ${BOARD}")

 if(DEFINED ENV{ZEPHYR_BOARD_ALIASES})
   include($ENV{ZEPHYR_BOARD_ALIASES})
@@ -212,6 +212,12 @@

 # Check that SHIELD has not changed.
 zephyr_check_cache(SHIELD)
+
+if(SHIELD)
+  set(BOARD_MESSAGE "${BOARD_MESSAGE}, Shield(s): ${SHIELD}")
+endif()
+
+message(STATUS "${BOARD_MESSAGE}")

 # 'BOARD_ROOT' is a prioritized list of directories where boards may
 # be found. It always includes ${ZEPHYR_BASE} at the lowest priority.


cmake: use module name if no main is available

--- cmake/common/px4_base.cmake
+++ cmake/common/px4_base.cmake
@@ -305,7 +305,7 @@
 			COMPILE_DEFINITIONS PX4_MAIN=${MAIN}_app_main)
 		add_definitions(-DMODULE_NAME="${MAIN}")
 	else()
-		add_definitions(-DMODULE_NAME="unknown")
+		add_definitions(-DMODULE_NAME="${MODULE}")
 	endif()

 	if(INCLUDES)


- Updated of oneDNN to 2.3 + bugfixes (#33702)

--- cmake/external/mkldnn.cmake
+++ cmake/external/mkldnn.cmake
@@ -20,7 +20,7 @@
 SET(MKLDNN_INSTALL_DIR    ${THIRD_PARTY_PATH}/install/mkldnn)
 SET(MKLDNN_INC_DIR        "${MKLDNN_INSTALL_DIR}/include" CACHE PATH "mkldnn include directory." FORCE)
 SET(MKLDNN_REPOSITORY     ${GIT_URL}/oneapi-src/oneDNN.git)
-SET(MKLDNN_TAG            748528a2d3204b5f401c14a9aacdec16accd5ead)
+SET(MKLDNN_TAG            bbaf5d24dde1b6760435d5034d6f48feae7a30b9)

 # Introduce variables:


[CMake] Fix install rules for tools included in the framework

The logic for install rules was wrong for tools included in the framework if the framework build is disabled.

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

--- cmake/modules/AddLLDB.cmake
+++ cmake/modules/AddLLDB.cmake
@@ -142,7 +142,7 @@
     endif()
   endif()

-  if(ARG_GENERATE_INSTALL AND NOT ARG_INCLUDE_IN_FRAMEWORK)
+  if(ARG_GENERATE_INSTALL AND NOT (ARG_INCLUDE_IN_FRAMEWORK AND LLDB_BUILD_FRAMEWORK ))
     install(TARGETS ${name}
           COMPONENT ${name}
           RUNTIME DESTINATION bin)


build: allow specifying the component to `llvm_install_symlink`

Add an optional parameter to `llvm_install_symlink` which allows the symlink
installation to be placed into a specific component rather than the default
value.

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

--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1203,7 +1203,7 @@
 endfunction()

 function(llvm_install_symlink name dest)
-  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
+  cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
   foreach(path ${CMAKE_MODULE_PATH})
     if(EXISTS ${path}/LLVMInstallSymlink.cmake)
       set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake)
@@ -1211,10 +1211,14 @@
     endif()
   endforeach()

-  if(ARG_ALWAYS_GENERATE)
-    set(component ${dest})
-  else()
-    set(component ${name})
+  if(ARG_COMPONENT)
+    set(component ${ARG_COMPONENT})
+  else()
+    if(ARG_ALWAYS_GENERATE)
+      set(component ${dest})
+    else()
+      set(component ${name})
+    endif()
   endif()

   set(full_name ${name}${CMAKE_EXECUTABLE_SUFFIX})


opentar-9: review fixes.

opentar-9: review fixes.

--- cmake/tarantool_cpack.cmake
+++ cmake/tarantool_cpack.cmake
@@ -9,7 +9,12 @@
     set (CPACK_RPM_PACKAGE_RELEASE "8")
     set (CPACK_RPM_PACKAGE_LICENSE "BSD")
     set (CPACK_RPM_PACKAGE_VENDOR "MAIL.RU")
-    set (CPACK_RPM_PACKAGE_DESCRIPTION "Tarantool/Box - an efficient in-memory data store")
+    set (CPACK_RPM_PACKAGE_DESCRIPTION "
+Tarantool/Box, or simply Tarantool, is a high performance
+in-memory NoSQL database. It supports replication, online backup,
+stored procedures in Lua.")
+    set (CPACK_RPM_PACKAGE_SUMMARY "Tarantool/Box - an efficient in-memory data store")
+    set (CPACK_RPM_PACKAGE_GROUP "Databases")
     set (CPACK_RPM_POST_INSTALL_SCRIPT_FILE "${CMAKE_SOURCE_DIR}/cmake/rpm_post_install.sh")
     set (CPACK_SET_DESTDIR "ON")
     set (CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")


-update FindAutomoc4.cmake to include documentation, same as in kdelibs/cmake/modules/FindAutomoc4.cmake

Alex

svn path=/trunk/kdesupport/akonadi/; revision=905550

--- cmake/modules/FindAutomoc4.cmake
+++ cmake/modules/FindAutomoc4.cmake
@@ -3,19 +3,41 @@
 #
 #  AUTOMOC4_FOUND - automoc4 has been found
 #  AUTOMOC4_EXECUTABLE - the automoc4 tool
+#  AUTOMOC4_VERSION - the full version of automoc4
+#  AUTOMOC4_VERSION_MAJOR, AUTOMOC4_VERSION_MINOR, AUTOMOC4_VERSION_PATCH - AUTOMOC4_VERSION
+#                     broken into its components
 #
 # It also adds the following macros
 #  AUTOMOC4(<target> <SRCS_VAR>)
 #    Use this to run automoc4 on all files contained in the list <SRCS_VAR>.
 #
-#  AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h)
+#  AUTOMOC4_MOC_HEADERS(<target> header1.h header2.h ...)
 #    Use this to add more header files to be processed with automoc4.
+#
+#  AUTOMOC4_ADD_EXECUTABLE(<target_NAME> src1 src2 ...)
+#    This macro does the same as ADD_EXECUTABLE, but additionally
+#    adds automoc4 handling for all source files.
+#
+# AUTOMOC4_ADD_LIBRARY(<target_NAME> src1 src2 ...)
+#    This macro does the same as ADD_LIBRARY, but additionally
+#    adds automoc4 handling for all source files.
+
+# Internal helper macro, may change or be removed anytime:
+# _ADD_AUTOMOC4_TARGET(<target_NAME> <SRCS_VAR>)
+#
+# Since version 0.9.88:
+# The following two macros are only to be used for KDE4 projects
+# and do something which makes sure automoc4 works for KDE. Don't
+# use them anywhere else.
+# _AUTOMOC4_KDE4_PRE_TARGET_HANDLING(<target_NAME> <SRCS_VAR>)
+# _AUTOMOC4_KDE4_POST_TARGET_HANDLING(<target_NAME>)

-# Copyright (c) 2008, Alexander Neundorf, <neundorf@kde.org>
+# Copyright (c) 2008-2009, Alexander Neundorf, <neundorf@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+

 # check if we are inside KDESupport
 if("${KDESupport_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")


LuaJIT: Fix WITH_AMALG option failing during parallel builds

Addresses the "'fold_hash' undeclared" compile errors in https://github.com/luvit/luvi/issues/225

See also https://github.com/torch/luajit-rocks/issues/39

--- deps/luajit.cmake
+++ deps/luajit.cmake
@@ -306,6 +306,15 @@
 ELSE()
   IF(WITH_AMALG)
     add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${LUAJIT_DIR}/src/ljamalg.c ${DEPS})
+    # When using WITH_AMALG during a parallel build, its possible to run into
+    # false-positive "error: 'fold_hash' undeclared" compile errors due to a weird interaction
+    # when building two ljamalg.c at the same time.
+    #
+    # This adds a fake dependency from one to the other, forcing the build process to
+    # compile them sequentially rather than parallel.
+    #
+    # See https://github.com/torch/luajit-rocks/issues/39
+    add_dependencies(luajit luajit-5.1)
   ELSE()
     add_executable(luajit ${LUAJIT_DIR}/src/luajit.c ${SRC_LJCORE} ${DEPS})
   ENDIF()


boards: adafruit_trinket_m0: Set flash address

With the adafruit trinket m0, you must flash at 0x2000 due to a locked
UF2 bootloader.

Signed-off-by: Pushpal Sidhu <1bbf91bdb66f74b1ab0901158947c9d4636ee766@gmail.com>

--- boards/arm/adafruit_trinket_m0/board.cmake
+++ boards/arm/adafruit_trinket_m0/board.cmake
@@ -1,4 +1,6 @@
 # Copyright (c) 2018 Google LLC.
 # SPDX-License-Identifier: Apache-2.0

+board_runner_args(bossac "--offset=0x2000")
+
 include(${ZEPHYR_BASE}/boards/common/bossac.board.cmake)


PlottingGL: added dependency toward DataFrame module

--- modules/plottinggl/depends.cmake
+++ modules/plottinggl/depends.cmake
@@ -2,6 +2,7 @@
 # Dependencies for current module
 # List modules on the format "Inviwo<ModuleName>Module"
 set(dependencies
+	InviwoDataFrameModule
     InviwoPlottingModule
     InviwoOpenGLModule
     InviwoBaseGLModule


eigenpyConfig.cmake: find absolute library paths for all required libs

As cmake expects absolute library paths, while pkgconfig provides lib names only (together with
LIBRARY_DIRS), one needs to find the full library path.

This fixes 7854c0f.

--- eigenpyConfig.cmake
+++ eigenpyConfig.cmake
@@ -2,5 +2,13 @@

 message(STATUS "Loading eigenpy from PkgConfig")

-find_package(PkgConfig)
+find_package(PkgConfig REQUIRED)
 pkg_check_modules(eigenpy REQUIRED eigenpy)
+
+# find absolute library paths for all eigenpy_LIBRARIES
+set(libs ${eigenpy_LIBRARIES})
+set(eigenpy_LIBRARIES "")
+foreach(lib ${libs})
+  find_library(abs_lib_${lib} ${lib} HINTS ${eigenpy_LIBRARY_DIRS})
+  list(APPEND eigenpy_LIBRARIES "${abs_lib_${lib}}")
+endforeach()


Fix GDAL_DATA

Fix GDAL_DATA

--- cmake/DevBaseExternal.cmake
+++ cmake/DevBaseExternal.cmake
@@ -148,11 +148,11 @@
     find_program(GDAL_TRANSLATE gdal_translate
         HINTS ${GDAL_INCLUDE_DIR}/../bin
     )
-    # TODO This dir isn't correct. GDAL_DIRECTORY is not defined.
-    if(WIN32)
-        SET(GDAL_DATA ${GDAL_DIRECTORY}/data)
-    else()
-        SET(GDAL_DATA ${GDAL_DIRECTORY}/share/gdal)
+
+    set(GDAL_DATA ${GDAL_INCLUDE_DIR}/../share/gdal)
+
+    if(NOT EXISTS "${GDAL_DATA}")
+        message(FATAL_ERROR "GDal data dir not found")
     endif()

     include(CheckGDalLibrary)


[cmake] remove warning of unused option

[cmake] remove warning of unused option

--- cmake/ExternalInclude.cmake
+++ cmake/ExternalInclude.cmake
@@ -34,6 +34,7 @@
     -DCMAKE_MODULE_PATH=${CMAKE_MODULE_PATH}
     -DCMAKE_OBJECT_PATH_MAX=${CMAKE_OBJECT_PATH_MAX}
     -DCMAKE_MACOSX_RPATH=TRUE
+    --no-warn-unused-cli
     )


Added -extra-arg=-Wno-unknown-warning-option to clang-tidy

--- cmake/StaticAnalyzers.cmake
+++ cmake/StaticAnalyzers.cmake
@@ -13,7 +13,7 @@
 if(ENABLE_CLANG_TIDY)
   find_program(CLANGTIDY clang-tidy)
   if(CLANGTIDY)
-    set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY})
+    set(CMAKE_CXX_CLANG_TIDY ${CLANGTIDY} -extra-arg=-Wno-unknown-warning-option)
   else()
     message(SEND_ERROR "clang-tidy requested but executable not found")
   endif()


Remove guards

Remove guards

--- cmake/configs/default.cmake
+++ cmake/configs/default.cmake
@@ -1,11 +1,7 @@
 # Copyright (c) 2013-2014, Ruslan Baratov
 # All rights reserved.

-if(DEFINED HUNTER_CMAKE_CONFIG_CMAKE_)
-  return()
-else()
-  set(HUNTER_CMAKE_CONFIG_CMAKE_ 1)
-endif()
+# Do not place header guards here

 include(hunter_config)

@@ -15,15 +11,16 @@
 # NOTE: no names with spaces!

 hunter_config(Boost VERSION 1.55.0-patched-3)
-hunter_config(Comet VERSION 4.0.0)
 hunter_config(Clang VERSION 3.4.2)
 hunter_config(ClangToolsExtra VERSION 3.4.2)
+hunter_config(Comet VERSION 4.0.0)
 hunter_config(CppNetlib VERSION 0.10.1-hunter-3)
 hunter_config(CppNetlibUri VERSION 1.0.2-hunter)
 hunter_config(GTest VERSION 1.7.0-hunter-10)
 hunter_config(Igloo VERSION 1.1.1-hunter)
 hunter_config(IntSizeof VERSION 1.0.0)
 hunter_config(JsonSpirit VERSION 0.0.3-hunter)
+hunter_config(LLVM VERSION 3.4.2)
 hunter_config(LLVMCompilerRT VERSION 3.4.2)
 hunter_config(Leathers VERSION 0.1.4)
 hunter_config(OpenSSL VERSION 1.0.1h)
@@ -32,9 +29,3 @@
 hunter_config(Sugar VERSION 1.2.2)
 hunter_config(ZLIB VERSION 1.2.8-hunter CMAKE_ARGS ZLIB_BUILD_SHARED=OFF)
 hunter_config(ios_sim VERSION 1.8.2)
-
-# Clang build
-hunter_config(
-    LLVM
-    VERSION 3.4.2
-)


Add test to determine if a .lib is a static or a dll import library

--- cmake/modules/FindGSL.cmake
+++ cmake/modules/FindGSL.cmake
@@ -49,7 +49,11 @@
     endif( GSL_CBLAS_LIBRARY )

     set( GSL_LIBRARIES ${GSL_LIBRARY} ${GSL_CBLAS_LIBRARY} )
-    set( GSL_CFLAGS "-DGSL_DLL")
+    execute_process ( COMMAND lib /list ${GSL_LIBRARY} OUTPUT_VARIABLE content )
+    string( FIND ${content} ".dll" APOSITION )
+    if( NOT ("${APOSITION}" STREQUAL "-1") )
+      set( GSL_CFLAGS "-DGSL_DLL" )
+    endif()
   endif( GSL_INCLUDE_DIR )

   mark_as_advanced(


Refer the our local license file.

Refer the our local license file.

--- cmake/modules/FindGit.cmake
+++ cmake/modules/FindGit.cmake
@@ -11,7 +11,7 @@
 # Copyright 2010 Kitware, Inc.
 #
 # Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
+# see the COPYING-CMAKE-SCRIPTS file for details.
 #
 # This software is distributed WITHOUT ANY WARRANTY; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


doc: fix qi_install CMake API

doc: fix qi_install CMake API

Change-Id: I8b323ab3bd35121b89b109983faf083e3e5fe947
Reviewed-on: http://gerrit.aldebaran.lan:8080/246
Reviewed-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>
Tested-by: Cedric GESTES <ddb78fe00abb42f91254c16a0860e38eb0781789@aldebaran-robotics.com>

--- cmake/qibuild/install.cmake
+++ cmake/qibuild/install.cmake
@@ -22,7 +22,7 @@
 endfunction()

 #! Install application headers.
-# The destination will be <prefix>/include/
+# The destination will be **<prefix>/include/**
 #
 # \argn:                 A list of files : directories and globs on files are accepted.
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -39,7 +39,7 @@

 #! Install application data.
-# The destination will be: <prefix>/share/
+# The destination will be: **<prefix>/share/**
 #
 # \argn:                 A list of files : directories and globs on files are accepted.
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -55,7 +55,7 @@
 endfunction()

 #! Install application doc.
-# The destination will be: <prefix>/share/doc/
+# The destination will be: **<prefix>/share/doc/**
 #
 # \argn:                 A list of files : directories and globs on files are accepted.
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -72,6 +72,7 @@

 #! Install application configuration files.
+# The destination will be: **<prefix>/etc/**
 #
 # \argn:                 A list of files : directories and globs on files are accepted.
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -87,7 +88,7 @@
 endfunction()

 #! Install CMake module files.
-# The destination will be: <prefix>/share/cmake/
+# The destination will be: **<prefix>/share/cmake/**
 #
 # \argn:                 A list of files : directories and globs on files are accepted.
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -104,6 +105,12 @@

 #! install a target, that could be a program or a library.
+# The destination will be: **<prefix>/lib** or **<prefix>/bin**,
+# depending on the target and the platform:
+#
+# * Windows: ``*.dll``  and ``*.exe`` in ``bin``, ``*.lib`` in ``lib``
+# * Mac:     ``.dylib`` and ``.a`` in ``lib``, executables in ``bin``
+# * Linux :  ``.so``    and ``.a`` in ``lib``, executables in ``bin``
 #
 # \argn:                 A list of targets to install
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -148,7 +155,7 @@
 endfunction()

 #! install program (mostly script or user provided program). Do not use this function
-# to install a library or a program built by your project, prefer using qi_install_target.
+# to install a library or a program built by your project, prefer using :cmake:function:`qi_install_target`.
 #
 # \argn:                 A list of programs to install
 # \param: SUBFOLDER      An optional subfolder in which to put the files.
@@ -181,7 +188,7 @@

 #! install external library. Do not use this function
 # to install a library or a program built by your project,
-# prefer using qi_install_target.
+# prefer using :cmake:function:`qi_install_target`.
 #
 # \argn:                 A list of libraries to install
 # \param: SUBFOLDER      An optional subfolder in which to put the files.


cmake/qibuild: set version to 'next'

cmake/qibuild: set version to 'next'

Change-Id: I4d59d96f91385276f438cfc039148e608378a1bc

--- cmake/qibuild/version.cmake
+++ cmake/qibuild/version.cmake
@@ -1,4 +1,4 @@
 ## Copyright (c) 2012-2014 Aldebaran Robotics. All rights reserved.
 ## Use of this source code is governed by a BSD-style license that can be
 ## found in the COPYING file.
-set(QIBUILD_VERSION 3.5.3 CACHE STRING "qibuild version" FORCE)
+set(QIBUILD_VERSION next CACHE STRING "qibuild version" FORCE)


Add check of sys/stat.h

Add check of sys/stat.h

--- cmake/MyPackageCheckCommonIncludeFiles.cmake
+++ cmake/MyPackageCheckCommonIncludeFiles.cmake
@@ -7,6 +7,7 @@
   CHECK_INCLUDE_FILE ("stdint.h"     HAVE_STDINT_H)
   CHECK_INCLUDE_FILE ("sys/time.h"   HAVE_SYS_TIME_H)
   CHECK_INCLUDE_FILE ("sys/types.h"  HAVE_SYS_TYPES_H)
+  CHECK_INCLUDE_FILE ("sys/stat.h"   HAVE_SYS_STAT_H)
   CHECK_INCLUDE_FILE ("errno.h"      HAVE_ERRNO_H)
   CHECK_INCLUDE_FILE ("string.h"     HAVE_STRING_H)
   CHECK_INCLUDE_FILE ("unistd.h"     HAVE_UNISTD_H)


Registers IDL interfaces' subfolders with Ament.

--- rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
+++ rosidl_cmake/cmake/rosidl_generate_interfaces.cmake
@@ -153,8 +153,10 @@
     # register interfaces with the ament index
     set(_idl_files_lines)
     foreach(_idl_file ${_ARG_UNPARSED_ARGUMENTS})
+      get_filename_component(_interface_ns "${_idl_file}" DIRECTORY)
+      get_filename_component(_interface_ns "${_interface_ns}" NAME)
       get_filename_component(_interface_name "${_idl_file}" NAME)
-      list(APPEND _idl_files_lines "${_interface_name}")
+      list(APPEND _idl_files_lines "${_interface_ns}/${_interface_name}")
     endforeach()
     list(SORT _idl_files_lines)
     string(REPLACE ";" "\n" _idl_files_lines "${_idl_files_lines}")


Add Linker for debug mode

Add Linker for debug mode

--- cmake/PlatformMacOS.cmake
+++ cmake/PlatformMacOS.cmake
@@ -32,6 +32,7 @@

 set(MACOS_LINKER_FLAGS "-framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo")
 set(DEFAULT_LINKER_FLAGS_RELEASE ${MACOS_LINKER_FLAGS})
+set(DEFAULT_LINKER_FLAGS_DEBUG ${MACOS_LINKER_FLAGS})

 set(MACOS_COMPILE_FLAGS)
 set(DEFAULT_COMPILE_FLAGS ${MACOS_COMPILE_FLAGS})


Workaround with qt5_use_modules in CMake.

Travis CI uses CMake version 2.8.7.

--- cmake/UseDOGraphics.cmake
+++ cmake/UseDOGraphics.cmake
@@ -88,8 +88,12 @@
     # Static library
     add_library(DO_Graphics STATIC
                 ${DO_Graphics_FILES} ${DOGraphics_MOC_SOURCES})
-    qt5_use_modules(DO_Graphics Widgets OpenGL)
-    target_link_libraries(DO_Graphics ${OPENGL_LIBRARIES})
+    #qt5_use_modules(DO_Graphics Widgets OpenGL)
+    #target_link_libraries(DO_Graphics ${OPENGL_LIBRARIES})
+    target_link_libraries(DO_Graphics
+                          ${Qt5Widgets_LIBRARIES}
+                          ${Qt5OpenGL_LIBRARIES}
+                          ${OPENGL_LIBRARIES})
     do_set_specific_target_properties(DO_Graphics DO_STATIC) # See DOMacros.cmake for details
     set_property(TARGET DO_Graphics PROPERTY FOLDER "DO Modules")

@@ -97,8 +101,12 @@
     if (DO_BUILD_SHARED_LIBS)
       add_library(DO_Graphics_SHARED SHARED
                   ${DO_Graphics_FILES} ${DOGraphics_MOC_SOURCES})
-      qt5_use_modules(DO_Graphics_SHARED Widgets OpenGL)
-      target_link_libraries(DO_Graphics_SHARED ${OPENGL_LIBRARIES})
+      #qt5_use_modules(DO_Graphics_SHARED Widgets OpenGL)
+      #target_link_libraries(DO_Graphics_SHARED ${OPENGL_LIBRARIES})
+      target_link_libraries(DO_Graphics_SHARED
+                            ${Qt5Widgets_LIBRARIES}
+                            ${Qt5OpenGL_LIBRARIES}
+                            ${OPENGL_LIBRARIES})
       do_set_specific_target_properties(DO_Graphics_SHARED DO_EXPORTS)
       set_property(TARGET DO_Graphics_SHARED PROPERTY FOLDER "DO Modules")
     endif ()