Something went wrong on our end
-
Martin Beseda authoredMartin Beseda authored
CMakeLists.txt 1.86 KiB
cmake_minimum_required(VERSION 3.0)
project(4neuro)
#-------------------------------#
# Default installation location #
#-------------------------------#
# Linux: /usr/local
# Windows: c:/Program Files
#------------#
# Build type #
#------------#
# Default: Release
# Others: None, Debug
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RELEASE CACHE STRING
"Choose the type of build, options are: None Debug Release."
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
#--------------------------------#
# Setting C++ compiler flags #
#--------------------------------#
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall" )
#--------------------#
# Automatic settings #
#--------------------#
if(CMAKE_BUILD_TYPE MATCHES DEBUG)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
# Processing user variables
if (WITH_TIME_PROFILING)
add_definitions(-DTIME_PROFILING)
endif()
# C & CXX compilers
if (WIN32)
set (CMAKE_C_COMPILER gcc)
set (CMAKE_CXX_COMPILER g++)
endif()
# Write compiler variables to the file - to pass them to test script
file(APPEND compilers.env "export CXX=${CMAKE_CXX_COMPILER}\n")
file(APPEND compilers.env "export CC=${CMAKE_C_COMPILER}\n")
#----------------#
# User variables #
#----------------#
set(SRC_DIR src)
set(PROJECT_BINARY_DIR build)
#--------------------#
# Building libraries #
#--------------------#
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
add_subdirectory(${SRC_DIR} ${PROJECT_BINARY_DIR})
message ("Current directory:" ${PWD})
message ("SRC_DIR: " ${SRC_DIR})
message ("BUILD_DIR:" ${BUILD_DIR})
if (WIN32)
message ("Windows")
else ()
message ("Not Windows")
endif ()
#find_package(Boost COMPONENTS unit_test_framework REQUIRED)
IF (Boost_FOUND)
message("Boost DIR: " ${Boost_INCLUDE_DIR})
include_directories(${Boost_INCLUDE_DIR})
endif()