From 0cdc7cfc7e173fc95413de2c33dfe74c458f0334 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Mon, 20 Jun 2016 12:38:11 -0700 Subject: [PATCH] Use COMPILE_FLAGS instead of add_compile_options The latter came with CMake 2.8.12, and CentOS comes with 2.8.11, so we need to use a more compatible method. Also bump the minimum required version now that it is properly known. --- src/libpsl-native/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libpsl-native/CMakeLists.txt b/src/libpsl-native/CMakeLists.txt index 3e77b46eed..9193d6fabf 100644 --- a/src/libpsl-native/CMakeLists.txt +++ b/src/libpsl-native/CMakeLists.txt @@ -1,7 +1,8 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 2.8.11) project(PSL-NATIVE) -add_compile_options(-std=c++11 -Wall -Werror) +# Can't use add_compile_options with 2.8.11 +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror") set(LIBRARY_OUTPUT_PATH "${PROJECT_SOURCE_DIR}/../powershell") # test in BUILD_DIR