Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't compile on FreeBSD without help (Doctest) #5

Closed
nreilly opened this issue Mar 12, 2024 · 1 comment
Closed

Doesn't compile on FreeBSD without help (Doctest) #5

nreilly opened this issue Mar 12, 2024 · 1 comment

Comments

@nreilly
Copy link

nreilly commented Mar 12, 2024

Hello,

I'm trying to get this to compile on FreeBSD (having never used meson/C++/etc before) and have managed to get it to work if I add:

incdir = include_directories('/usr/local/include/doctest')

and modify the testrunner executable() to include the include_directories

executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 
              'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc',
       dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, simplesockets_dep,
              lua_dep],
       include_directories: incdir)

Is this something that can be added in a portable way? Maybe something like:

if host_machine.system() in ['freebsd']
  incdir = include_directories('/usr/local/include/doctest')
  executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc',
        dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, simplesockets_dep, lua_dep],
        include_directories: incdir)
else
  executable('testrunner', 'testrunner.cc', 'notifiers.cc', 'minicurl.cc', 'dnsmon.cc', 'record-types.cc', 'dnsmessages.cc', 'dns-storage.cc', 'netmon.cc', 'luabridge.cc',
        dependencies: [doctest_dep, curl_dep, json_dep, fmt_dep, cpphttplib, simplesockets_dep, lua_dep])
endif
@nreilly nreilly changed the title Doesn't compile on FreeBSD without help Doesn't compile on FreeBSD without help (Doctest) Mar 14, 2024
@nreilly
Copy link
Author

nreilly commented Mar 14, 2024

As testrunner has now been commented out of the standard meson.build file, this is no longer a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant