summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2020-03-02 13:22:58 -0500
committerAllen Winter <allen.winter@kdab.com>2020-03-02 13:22:58 -0500
commite4bf5c81d315104901cf2b4833b174e38694da52 (patch)
treef45b89724b6d5b2addcde72c9c513525dd9e148a /CMakeLists.txt
parent741867f9b80890c3e31cfc09f1871b89f8ec3e08 (diff)
downloadlibical-git-e4bf5c81d315104901cf2b4833b174e38694da52.tar.gz
CMakeLists.txt - enable_language(cxx) higher in the file
we were referencing CXX_variables without enabling cxx
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt42
1 files changed, 21 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9adec38a..47d54d61 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -118,6 +118,27 @@ set(PROJECT_URL "https://libical.github.io/libical/")
# library build types
set(LIBRARY_TYPE SHARED)
+########################################################
+
+option(WITH_CXX_BINDINGS "Build the C++ bindings." True)
+if(WITH_CXX_BINDINGS)
+ enable_language(CXX)
+ if(CMAKE_CXX_COMPILER)
+ add_definitions(-DWITH_CXX_BINDINGS)
+ else()
+ message(STATUS
+ "Warning: Building the C++ bindings is not possible since a C++ compiler could not be found. "
+ "Turning-off C++ bindings"
+ )
+ set(WITH_CXX_BINDINGS False)
+ endif()
+endif()
+add_feature_info(
+ "Option WITH_CXX_BINDINGS"
+ WITH_CXX_BINDINGS
+ "build the C++ bindings. Requires a C++ compiler"
+)
+
option(STATIC_ONLY "Build static libraries only.")
add_feature_info(
"Option STATIC_ONLY"
@@ -545,27 +566,6 @@ if(THREAD_SANITIZER)
endif()
endif()
-########################################################
-
-option(WITH_CXX_BINDINGS "Build the C++ bindings." True)
-if(WITH_CXX_BINDINGS)
- enable_language(CXX)
- if(CMAKE_CXX_COMPILER)
- add_definitions(-DWITH_CXX_BINDINGS)
- else()
- message(STATUS
- "Warning: Building the C++ bindings is not possible since a C++ compiler could not be found. "
- "Turning-off C++ bindings"
- )
- set(WITH_CXX_BINDINGS False)
- endif()
-endif()
-add_feature_info(
- "Option WITH_CXX_BINDINGS"
- WITH_CXX_BINDINGS
- "build the C++ bindings. Requires a C++ compiler"
-)
-
#some test programs need to know if we are using 32-bit time
if(SIZEOF_TIME_T EQUAL 4)
set(USE_32BIT_TIME_T TRUE)