Skip to content
Snippets Groups Projects
Select Git revision
  • baa1b22654830d78c1edb6ab35f35ceee089f6e5
  • master default protected
  • LUFA-170418
  • LUFA-151115
  • LUFA-140928
  • LUFA-140302
  • LUFA-130901
  • LUFA-130901-BETA
  • LUFA-130303
  • LUFA-120730
  • LUFA-120730-BETA
  • LUFA-120219
  • LUFA-120219-BETA
  • LUFA-111009
  • LUFA-111009-BETA
  • LUFA-110528
  • LUFA-110528-BETA
17 results

CDC.c

Blame
  • shared_settings.cmake 912 B
    # This file defines an interface library used to add common compile flags to all targets.
    
    add_library(shared_settings INTERFACE)
    
    # Warning flags
    target_compile_options(shared_settings INTERFACE
        -Wall
        -Wcast-align
        -Wcast-qual
        -Wextra
        -Wundef
        -Wuseless-cast
        -Wzero-as-null-pointer-constant
        -pedantic
    )
    
    # Speed flags
    target_compile_options(shared_settings INTERFACE -march=native -ffast-math)
    
    # Build type for profile generation
    target_compile_options(shared_settings INTERFACE $<$<CONFIG:ProfileGenerate>:
        -fprofile-generate
        -O3
        -DNDEBUG
    >)
    target_link_options(shared_settings INTERFACE $<$<CONFIG:ProfileGenerate>:-fprofile-generate>)
    
    # Build type for profile use
    target_compile_options(shared_settings INTERFACE $<$<CONFIG:ProfileUse>:
        -fprofile-use
        -O3
        -DNDEBUG
    >)
    target_link_options(shared_settings INTERFACE $<$<CONFIG:ProfileUse>:-fprofile-use>)