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)
-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
-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)
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)
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)
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})
#######################################################################