You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by ab...@apache.org on 2020/05/07 07:50:07 UTC

[celix] 02/02: Enabled cmake policy to get rid of warnings.

This is an automated email from the ASF dual-hosted git repository.

abroekhuis pushed a commit to branch feature/support_multiple_build_types
in repository https://gitbox.apache.org/repos/asf/celix.git

commit f86971ec795083e2cec9b0b843e3dcc2907a2490
Author: Alexander Broekhuis <al...@luminis.eu>
AuthorDate: Thu May 7 09:49:55 2020 +0200

    Enabled cmake policy to get rid of warnings.
    
    Added flags to be able to build release version on OSX.
---
 CMakeLists.txt | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 953522f..15732a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,9 +18,9 @@
 cmake_minimum_required (VERSION 3.2)
 cmake_policy(SET CMP0012 NEW)
 cmake_policy(SET CMP0042 NEW)
-#if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9.0")
-#   cmake_policy(SET CMP0068 NEW)
-#endif()
+if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.9.0")
+   cmake_policy(SET CMP0068 NEW)
+endif()
 
 project (Celix C CXX)
 
@@ -41,7 +41,6 @@ ELSE ()
     set(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -fPIC ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "-std=c++11 -fno-rtti ${CMAKE_CXX_FLAGS}")
     set(CMAKE_C_FLAGS "-Wall -Werror -Wno-nullability-completeness -Wno-expansion-to-defined ${CMAKE_C_FLAGS}")
-#    set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS "-Wall -Wextra -Weffc++ ${CMAKE_CXX_FLAGS}")
     set(CMAKE_C_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_C_FLAGS}")
     set(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG ${CMAKE_CXX_FLAGS}")