Skip to content

Commit

Permalink
check_configuration.cmake: remove COMPILE_LANGUAGE:CXX from set_commo…
Browse files Browse the repository at this point in the history
…n_compile_options (#317)

* Add Twitter and Readthedocs shields (#307) (#308)

* Add Twitter and Readthedocs shields

Signed-off-by: Pablo Garrido <[email protected]>

* Update

Signed-off-by: Pablo Garrido <[email protected]>

* Fix

Signed-off-by: Pablo Garrido <[email protected]>
(cherry picked from commit 8b78d22)

Co-authored-by: Pablo Garrido <[email protected]>

* check_configuration.cmake: remove COMPILE_LANGUAGE:CXX from set_common_compile_options

cmake version 3.10.2 fails with this error:
CMake Error at cmake/common/check_configuration.cmake:120 (target_compile_options):
  Error evaluating generator expression:

    $<COMPILE_LANGUAGE:CXX>

  $<COMPILE_LANGUAGE:...> Unknown language.

version 3.22.2 does not produce this error.

Signed-off-by: Beat Küng <[email protected]>

Co-authored-by: Pablo Garrido <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 5, 2022
1 parent 40194ae commit a2f7cb7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions cmake/common/check_configuration.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,11 @@ function(set_common_compile_options target)
target_compile_options(${target} PRIVATE -Wall
-Wextra
-Wshadow
$<$<COMPILE_LANGUAGE:CXX>:-Wnon-virtual-dtor>
-pedantic
-Wcast-align
-Wunused
$<$<COMPILE_LANGUAGE:CXX>:-Woverloaded-virtual>
-Wconversion
$<$<CXX_COMPILER_ID:GNU>:-Wlogical-op>
$<$<AND:$<CXX_COMPILER_ID:GNU>,$<COMPILE_LANGUAGE:CXX>>:-Wuseless-cast>
$<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast>
$<$<OR:$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6.0.0>>>,$<AND:$<C_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<C_COMPILER_VERSION>,6.0.0>>>>:-Wnull-dereference>
$<$<OR:$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,7.0.0>>>,$<AND:$<C_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<C_COMPILER_VERSION>,7.0.0>>>>:-Wduplicated-branches>
$<$<OR:$<AND:$<CXX_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<CXX_COMPILER_VERSION>,6.0.0>>>,$<AND:$<C_COMPILER_ID:GNU>,$<NOT:$<VERSION_LESS:$<C_COMPILER_VERSION>,6.0.0>>>>:-Wduplicated-cond>
Expand Down

0 comments on commit a2f7cb7

Please sign in to comment.