]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix various cmake issues
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 25 May 2018 11:41:57 +0000 (12:41 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 25 May 2018 11:41:57 +0000 (12:41 +0100)
clang-plugin/CMakeLists.txt
contrib/lua-torch/decisiontree/CMakeLists.txt
contrib/lua-torch/torch7/CMakeLists.txt
contrib/lua-torch/torch7/cmake/TorchConfig.cmake.in
contrib/lua-torch/torch7/lib/TH/CMakeLists.txt

index eae7642353a6bce13cad67d2b266afc752a7d1ec..8b2def17ed770c5f266bfc29704e42d551da2cde 100644 (file)
@@ -4,7 +4,7 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
         MESSAGE(FATAL_ERROR "Cannot build clang plugin when compiler is not clang")
     endif ()
 
-    SET(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}")
+    LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}")
     ENABLE_LANGUAGE(CXX)
     FIND_PACKAGE(LLVM REQUIRED)
 
index 6434eddd989559a271030a445b553141e44dead9..b94b4deb234b54f5f499755c9923109ec94cb583 100644 (file)
@@ -1,7 +1,4 @@
-SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR})
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
-CMAKE_POLICY(VERSION 2.6)
+LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
 
 SET(src
    init.c
index 7519e85d7df41affa7cd7dada5275ee9e9717e51..1c3995dbeb22c5e50f349b51d32356fbd920f5f6 100644 (file)
@@ -1,14 +1,4 @@
-IF(APPLE)
-  CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
-  CMAKE_POLICY(VERSION 2.8.12)
-ELSE()
-  CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
-  CMAKE_POLICY(VERSION 2.8)
-ENDIF()
-
-SET(CMAKE_MODULE_PATH
-  "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
-  "${CMAKE_MODULE_PATH}")
+LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
 IF (NOT MSVC)
   IF (MINGW)
@@ -18,14 +8,6 @@ IF (NOT MSVC)
   ENDIF(MINGW)
 ENDIF(NOT MSVC)
 
-# Flags
-# When using MSVC
-IF(MSVC)
-  # we want to respect the standard, and we are bored of those **** .
-  ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE=1)
-ENDIF(MSVC)
-
-
 IF (WITH_OPENMP)
   FIND_PACKAGE(OpenMP)
   IF(OPENMP_FOUND)
index 3d85eb117f27d3cb5d981e5c977c420a2006aad3..bafa04f91188ec85399e7faf6feb9bde541af84e 100644 (file)
@@ -18,7 +18,7 @@ SET(Torch_INSTALL_CMAKE_RIDBUS "@Torch_INSTALL_CMAKE_RIDBUS@")
 FILE(RELATIVE_PATH Torch_INSTALL_LUA_PATH_SUBDIR "${Torch_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/lua")
 FILE(RELATIVE_PATH Torch_INSTALL_LUA_CPATH_SUBDIR "${Torch_INSTALL_PREFIX}" "${CMAKE_INSTALL_PREFIX}/lib")
 
-SET(CMAKE_MODULE_PATH "${Torch_INSTALL_PREFIX}/${Torch_INSTALL_CMAKE_SUBDIR}" "${CMAKE_MODULE_PATH}")
+LIST(APPEND CMAKE_MODULE_PATH "${Torch_INSTALL_PREFIX}/${Torch_INSTALL_CMAKE_SUBDIR}")
 SET(CMAKE_INSTALL_PREFIX "${Torch_INSTALL_PREFIX}") # override
 
 INCLUDE(TorchPathsInit)
index ef5bdd08ca31636d8dd189a5083dd4511211062f..b4f115f39d32efbd027750ffb03172151b8ce13e 100644 (file)
@@ -5,7 +5,7 @@ IF(POLICY CMP0026)
  CMAKE_POLICY(SET CMP0026 OLD)
 ENDIF()
 
-SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
+LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 SET(CMAKE_LIBRARY_PATH /usr/lib/x86_64-linux-gnu/ ${CMAKE_LIBRARY_PATH})
 
 #######################################################################