File: local-build.rb.example

package info (click to toggle)
restinio 0.6.19%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 8,184 kB
  • sloc: cpp: 110,712; ruby: 2,612; makefile: 22; sh: 21
file content (64 lines) | stat: -rw-r--r-- 2,029 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
MxxRu::Cpp::composite_target do
  default_cpp_std = 'cpp14'
  cpp_std = ENV.fetch( 'RESTINIO_CPP_STD', default_cpp_std )

  if 'cpp20' == cpp_std
    toolset.force_cpp20
  elsif 'cpp17' == cpp_std
    toolset.force_cpp17
  elsif 'cpp14' == cpp_std
    toolset.force_cpp14
  else
    raise "Unsupported C++ standard: #{cpp_std}"
  end

  global_obj_placement MxxRu::Cpp::PrjAwareRuntimeSubdirObjPlacement.new(
    "target/#{cpp_std}", MxxRu::Cpp::PrjAwareRuntimeSubdirObjPlacement::USE_COMPILER_ID )
  default_runtime_mode( MxxRu::Cpp::RUNTIME_RELEASE )
  MxxRu::enable_show_brief

  if ENV.has_key?( 'FMT_ENFORCE_COMPILE_STRING' )
    global_define 'FMT_ENFORCE_COMPILE_STRING=1'
  end

#  global_define 'ASIO_USE_TS_EXECUTOR_AS_DEFAULT'

  if 'vc' == toolset.name
    global_compiler_option '/W3'
    global_define '_CRT_SECURE_NO_WARNINGS'
    global_define '_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS'
=begin
    global_compiler_option '/Zi'
    global_linker_option '/DEBUG'
    global_linker_option '/Profile'
=end
  end

  if 'gcc' == toolset.name
    global_compiler_option '-Wextra'
    global_compiler_option '-Wall'
    global_compiler_option '-Wno-noexcept-type'
    global_linker_option "-Wl,-rpath='$ORIGIN'"
  end

  if 'clang' == toolset.name
    global_linker_option "-Wl,-rpath='$ORIGIN'"

    global_compiler_option '-Weverything'
    global_compiler_option '-Wno-c++98-compat'
    global_compiler_option '-Wno-c++98-compat-pedantic'
    global_compiler_option '-Wno-padded'
    global_compiler_option '-Wno-missing-noreturn'
    global_compiler_option '-Wno-documentation-unknown-command'
    global_compiler_option '-Wno-documentation-deprecated-sync'
    global_compiler_option '-Wno-documentation'
    global_compiler_option '-Wno-weak-vtables'
    global_compiler_option '-Wno-missing-prototypes'
    global_compiler_option '-Wno-missing-variable-declarations'
    global_compiler_option '-Wno-exit-time-destructors'
    global_compiler_option '-Wno-global-constructors'
  end

end

# vim:ts=2:sw=2:expandtab