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

MSVC conformant preprocessor flags are not used in compile of conformant tests #408

Closed
diablodale opened this issue Feb 26, 2022 · 0 comments · Fixed by #409
Closed

MSVC conformant preprocessor flags are not used in compile of conformant tests #408

diablodale opened this issue Feb 26, 2022 · 0 comments · Fixed by #409

Comments

@diablodale
Copy link
Contributor

The desired MSVC conformant preprocessor flags like /Zc:preprocessor are not applied on compile of depthai-core conformant tests.
From what I understand, it is because INTERFACE is used below. It should be PRIVATE or PUBLIC instead. I recommend PRIVATE.

target_compile_options(${test_name}_conforming INTERFACE "/experimental:preprocessor")
else()
target_compile_options(${test_name}_conforming INTERFACE "/Zc:preprocessor")

Setup

  • Microsoft Windows [Version 10.0.19044.1526]
  • VS2019 v16.11.10
  • depthai-core develop 3a2961d

Repro

  1. cmake config and build for x64, shared, Debug with all tests and examples to be built

Result

After the config, inspect the makefiles or ninja.build or compile_commands.json.
The /Zc:preprocessor and /experimental:preprocessor do not appear on the cl.exe options for conformant tests

Expected

The /Zc:preprocessor and /experimental:preprocessor appear on the cl.exe options for conformant tests

diablodale added a commit to diablodale/depthai-core that referenced this issue Feb 27, 2022
@themarpe themarpe linked a pull request Mar 1, 2022 that will close this issue
@themarpe themarpe closed this as completed Mar 1, 2022
diablodale added a commit to diablodale/depthai-core that referenced this issue Mar 7, 2022
- update Flags.cmake with win32 defs and detecting
  compiler support for c++ standards
- fix luxonis#408
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

Successfully merging a pull request may close this issue.

2 participants