mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 04:40:56 -06:00
cmMakefile::EnableLanguage() now deduplicates the languages argument and emits an author warning listing the languages that were defined multiple times in a single call. Fixes: #23596
12 lines
282 B
CMake
12 lines
282 B
CMake
cmake_policy(SET CMP0057 NEW)
|
|
|
|
project(ProjectA C C C)
|
|
project(ProjectB C C CXX CXX)
|
|
|
|
get_property(langs GLOBAL PROPERTY ENABLED_LANGUAGES)
|
|
foreach(lang C CXX)
|
|
if(NOT lang IN_LIST langs)
|
|
message(FATAL_ERROR "Expected language '${lang}' to be enabled.")
|
|
endif()
|
|
endforeach()
|