about summary refs log tree commit diff homepage
path: root/cmake
diff options
context:
space:
mode:
authorMartin Nowack <m.nowack@imperial.ac.uk>2020-04-06 14:27:51 +0100
committerCristian Cadar <c.cadar@imperial.ac.uk>2020-11-04 15:14:47 +0000
commit7fbef46d4036390c8ed10943bc610916292ef67d (patch)
treed4eefb915e2dfd4ddff663f8bd3ff9bb0c188780 /cmake
parentbef9f39d033ea5c9600f39af7cfd213e01aab4c1 (diff)
downloadklee-7fbef46d4036390c8ed10943bc610916292ef67d.tar.gz
[cmake] Switch to "newer" cmake version 3.5.0
Ubuntu 16.04 supports cmake 3.5.0 as default.
Cmake 2.8.12 was the default in 14.04.

Use cmake 3 to simplify cmake files.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/klee_add_component.cmake13
1 files changed, 3 insertions, 10 deletions
diff --git a/cmake/klee_add_component.cmake b/cmake/klee_add_component.cmake
index ea1b30b2..4f9770ac 100644
--- a/cmake/klee_add_component.cmake
+++ b/cmake/klee_add_component.cmake
@@ -11,16 +11,9 @@ function(klee_add_component target_name)
   # Components are explicitly STATIC because we don't support building them
   # as shared libraries.
   add_library(${target_name} STATIC ${ARGN})
-  # Use of `PUBLIC` means these will propagate to targets that use this component.
-  if (("${CMAKE_VERSION}" VERSION_EQUAL "3.3") OR ("${CMAKE_VERSION}" VERSION_GREATER "3.3"))
-    # In newer CMakes we can make sure that the flags are only used when compiling C++
-    target_compile_options(${target_name} PUBLIC
-      $<$<COMPILE_LANGUAGE:CXX>:${KLEE_COMPONENT_CXX_FLAGS}>)
-  else()
-    # For older CMakes just live with the warnings we get for passing C++ only flags
-    # to the C compiler.
-    target_compile_options(${target_name} PUBLIC ${KLEE_COMPONENT_CXX_FLAGS})
-  endif()
+  # In newer CMakes we can make sure that the flags are only used when compiling C++
+  target_compile_options(${target_name} PUBLIC
+    $<$<COMPILE_LANGUAGE:CXX>:${KLEE_COMPONENT_CXX_FLAGS}>)
   target_include_directories(${target_name} PUBLIC ${KLEE_COMPONENT_EXTRA_INCLUDE_DIRS})
   target_compile_definitions(${target_name} PUBLIC ${KLEE_COMPONENT_CXX_DEFINES})
   target_link_libraries(${target_name} PUBLIC ${KLEE_COMPONENT_EXTRA_LIBRARIES})