Select Git revision
CMakeLists.txt
-
Stéphane Del Pino authored
git revision info is now computed in utils
Stéphane Del Pino authoredgit revision info is now computed in utils
CMakeLists.txt 1.28 KiB
cmake_minimum_required (VERSION 3.4)
if (${CMAKE_BINARY_DIR} MATCHES "^${CMAKE_SOURCE_DIR}")
if (NOT ${CMAKE_BINARY_DIR} MATCHES "^${CMAKE_SOURCE_DIR}/build")
message("")
message("##############################################")
message(" In-source building is not allowed! ")
message("##############################################")
message("")
message(" Run cmake outside from source directory ")
message(" or from ${CMAKE_SOURCE_DIR}/build")
message("")
message("----------------------------------------------")
message(" warning: remaining generated files!")
message(" ${CMAKE_BINARY_DIR}/CMakeCache.txt")
message(" ${CMAKE_BINARY_DIR}/CMakeFiles")
message("----------------------------------------------")
message("")
message(" Please remove remaining generated files ")
message(" and run cmake from an appropriate location")
message("")
message(FATAL_ERROR "\n** CMake aborted **")
endif()
endif()
project (Pastis)
list(APPEND CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -O3)
add_subdirectory(${CMAKE_SOURCE_DIR}/packages/kokkos)
add_subdirectory(utils)
include_directories(${Kokkos_INCLUDE_DIRS_RET})
include_directories(utils)
add_executable(pastis main.cpp)
target_link_libraries(pastis kokkos PastisUtils)