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

Add COMPILE_FLAGS argument to SEMMacroBuildCLI #26

Closed
finetjul opened this issue Mar 25, 2014 · 1 comment
Closed

Add COMPILE_FLAGS argument to SEMMacroBuildCLI #26

finetjul opened this issue Mar 25, 2014 · 1 comment

Comments

@finetjul
Copy link
Member

Sometimes it might be useful to disable warnings when compiling a CLI.
The naive manual solution to call set_target_properties(${MODULE_NAME}Lib PROPERTIES COMPILE_FLAGS "-Wno-overloaded-virtual") fails because "-Dmain-=ModuleEntryPoint" is no longer defined.

@jcfr
Copy link
Member

jcfr commented Jul 8, 2016

I am closing this issue. CMake provides the following command to achieve what is described:

set_property(
  TARGET ${MODULE_NAME}Lib
  APPEND PROPERTY COMPILE_FLAGS "-Wno-overloaded-virtual"
  )

Using set_property specifying APPEND is the key.

See also https://cmake.org/cmake/help/v2.8.6/cmake.html#command:set_property

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

No branches or pull requests

2 participants