check_configuration.cmake: remove COMPILE_LANGUAGE:CXX from set_common_compile_options (#317)

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

* Add Twitter and Readthedocs shields

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Update

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>

* Fix

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
(cherry picked from commit 8b78d229f9)

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>

* 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 <beat-kueng@gmx.net>

Co-authored-by: Pablo Garrido <pablogs9@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Beat Küng 2022-04-05 08:47:25 +02:00 committed by GitHub
parent 40194ae884
commit a2f7cb79fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -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>