diff options
| author | Peter Korsgaard <peter@korsgaard.com> | 2021-01-04 09:05:42 +0100 |
|---|---|---|
| committer | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2021-01-04 09:14:20 +0100 |
| commit | 4d147d9630653e4c93a70a2a8026c323ed1042d2 (patch) | |
| tree | ceda37abf8603ae1846f6b4110ff7abe9ef11fc2 /thirdparty | |
| parent | 2519439d7d4d0e51abf479afe73f30b1c7c70530 (diff) | |
CMakeLists.txt: Don't require a C++ compiler
By default, CMake assumes that the project is using both C and C++. By
explicitly passing 'C' as argument of the project() macro, we tell CMake
that only C is used, which prevents CMake from erroring out if a C++
compiler doesn't exist.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
[Retrieved (and slightly updated by adding enable_language(CXX) if
WITH_ASTYLE is set) from:
https://git.buildroot.net/buildroot/tree/package/openjpeg/0003-CMakeLists.txt-Don-t-require-a-C-compiler.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Diffstat (limited to 'thirdparty')
| -rw-r--r-- | thirdparty/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index b0b229c8..ebdcd9d4 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -120,5 +120,6 @@ endif(BUILD_THIRDPARTY) #------------ IF (WITH_ASTYLE) + enable_language(CXX) ADD_SUBDIRECTORY(astyle) ENDIF(WITH_ASTYLE) |
