Browse Source

* improved pedantic flags

master
bergmann 6 years ago
parent
commit
9788629bf8
5 changed files with 26 additions and 9 deletions
  1. +1
    -1
      cmake/modules
  2. +7
    -4
      projects/helloworld/src/CMakeLists.txt
  3. +5
    -0
      projects/helloworld/test/CMakeLists.txt
  4. +8
    -4
      projects/libhelloworld/src/CMakeLists.txt
  5. +5
    -0
      projects/libhelloworld/test/CMakeLists.txt

+ 1
- 1
cmake/modules

@@ -1 +1 @@
Subproject commit 1e74005bc2f91434fecb2e5f698c21b73f7e3a13
Subproject commit 1a32531aef2deeebd5637b1873bc4e976628801c

+ 7
- 4
projects/helloworld/src/CMakeLists.txt View File

@@ -4,10 +4,6 @@ Include ( cotire OPTIONAL RESULT_VARIABLE HAS_COTIRE
Include ( pedantic OPTIONAL RESULT_VARIABLE HAS_PEDANTIC ) Include ( pedantic OPTIONAL RESULT_VARIABLE HAS_PEDANTIC )
Include ( strip_symbols OPTIONAL RESULT_VARIABLE HAS_STRIP_SYMBOLS ) Include ( strip_symbols OPTIONAL RESULT_VARIABLE HAS_STRIP_SYMBOLS )


If ( HAS_PEDANTIC )
Pedantic_Apply_Flags ( ALL )
EndIf ( )

Option ( HELLOWORLD_INSTALL_DEBUG Option ( HELLOWORLD_INSTALL_DEBUG
"Install the stripped debug informations of helloworld." "Install the stripped debug informations of helloworld."
OFF ) OFF )
@@ -51,6 +47,13 @@ Target_Link_Libraries ( helloworld


# Optimization #################################################################################### # Optimization ####################################################################################


# pedantic
If ( HAS_PEDANTIC )
Pedantic_Apply_Flags_Target ( helloworld-objects ALL )
Pedantic_Apply_Flags_Target ( helloworld ALL )
EndIf ( )

# cotire
If ( HAS_COTIRE ) If ( HAS_COTIRE )
Cotire ( helloworld-objects ) Cotire ( helloworld-objects )
Cotire ( helloworld ) Cotire ( helloworld )


+ 5
- 0
projects/helloworld/test/CMakeLists.txt View File

@@ -29,6 +29,11 @@ Target_Link_Libraries ( helloworld-test
helloworld-objects helloworld-objects
GTest::Main ) GTest::Main )


# pedantic
If ( HAS_PEDANTIC )
Pedantic_Apply_Flags_Target ( helloworld-test ALL )
EndIf ( )

# optimization # optimization
If ( HAS_COTIRE ) If ( HAS_COTIRE )
Cotire ( helloworld-test ) Cotire ( helloworld-test )


+ 8
- 4
projects/libhelloworld/src/CMakeLists.txt View File

@@ -4,10 +4,6 @@ Include ( cotire OPTIONAL RESULT_VARIABLE HAS_COTIRE
Include ( pedantic OPTIONAL RESULT_VARIABLE HAS_PEDANTIC ) Include ( pedantic OPTIONAL RESULT_VARIABLE HAS_PEDANTIC )
Include ( strip_symbols OPTIONAL RESULT_VARIABLE HAS_STRIP_SYMBOLS ) Include ( strip_symbols OPTIONAL RESULT_VARIABLE HAS_STRIP_SYMBOLS )


If ( HAS_PEDANTIC )
Pedantic_Apply_Flags ( ALL )
EndIf ( )

Option ( LIBHELLOWORLD_INSTALL_HEADER Option ( LIBHELLOWORLD_INSTALL_HEADER
"Install headers of libhelloworld." "Install headers of libhelloworld."
ON ) ON )
@@ -70,6 +66,14 @@ Target_Include_Directories ( libhelloworld-shared


# Optimization #################################################################################### # Optimization ####################################################################################


# pedantic
If ( HAS_PEDANTIC )
Pedantic_Apply_Flags_Target ( libhelloworld-objects ALL )
Pedantic_Apply_Flags_Target ( libhelloworld-static ALL )
Pedantic_Apply_Flags_Target ( libhelloworld-shared ALL )
EndIf ( )

# cotire
If ( HAS_COTIRE ) If ( HAS_COTIRE )
Cotire ( libhelloworld-objects ) Cotire ( libhelloworld-objects )
Cotire ( libhelloworld-static ) Cotire ( libhelloworld-static )


+ 5
- 0
projects/libhelloworld/test/CMakeLists.txt View File

@@ -29,6 +29,11 @@ Target_Link_Libraries ( libhelloworld-test
libhelloworld-objects libhelloworld-objects
GTest::Main ) GTest::Main )


# pedantic
If ( HAS_PEDANTIC )
Pedantic_Apply_Flags_Target ( libhelloworld-test ALL )
EndIf ( )

# optimization # optimization
If ( HAS_COTIRE ) If ( HAS_COTIRE )
Cotire ( libhelloworld-test ) Cotire ( libhelloworld-test )


Loading…
Cancel
Save