What are the possible values ​​for the LANGUAGE variable in CMAKE

I was unable to find a list of possible values ​​for the LANGUAGE variable on CMAKE.org or elsewhere. Will someone please list the values ​​that CMAKE recognizes? I need to specify Objective C ++.

+12
source share
2 answers

Update for CMake 3.16 and later: CMake added native support for Objective-C in version 3.16. The corresponding language strings are OBJCand OBJCXX. Thanks to the square headers for pointing this out .

Original answer: language support is platform dependent.

CMake C, CXX Fortran " " . . Modules/Platform.

, , LANGUAGE project enable_language, , CMake . , CMake, C C++. , , ( , , - ).

Objective-C: C Objective-C, . , C, Objective-C.

, angular . , CMake Objective-C , , , .

+7

CMakeDetermine<Language>Compiler.cmake, CMake.

enable_language() :

  1. ASM
  2. ASM-ATT
  3. ASM-MASM
  4. ASM-NASM
  5. C
  6. CSharp
  7. CUDA
  8. CXX
  9. Fortran
  10. Java
  11. OBJC ( C)
  12. OBJCXX ( C++)
  13. RC ( Windows)
  14. Swift

CMake 3.16

+7

Source: https://habr.com/ru/post/1546872/


All Articles