CMake project restructuring.
This commit is contained in:
parent
8b069d8149
commit
9b49b8ebe7
16
.travis.yml
16
.travis.yml
@ -34,9 +34,13 @@ matrix:
|
|||||||
- *default_packages
|
- *default_packages
|
||||||
- g++-6
|
- g++-6
|
||||||
script:
|
script:
|
||||||
- git submodule init
|
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
|
||||||
- git submodule update
|
CMAKE_URL="http://www.cmake.org/files/v3.7/cmake-3.7.0-Linux-x86_64.tar.gz";
|
||||||
- mkdir build
|
mkdir cmake-bin && wget --quiet --no-check-certificate -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake-bin;
|
||||||
- cd build
|
export PATH=${PWD}/cmake-bin/bin:${PATH};
|
||||||
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DCMAKE_CXX_COMPILER=$_CXX
|
fi
|
||||||
- make -j3 && make -j3 run-tests
|
- git submodule update --recursive --init
|
||||||
|
- mkdir -p build/debug
|
||||||
|
- cd build/debug
|
||||||
|
- cmake ../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=$_CXX -DPLASP_BUILD_TESTS=ON
|
||||||
|
- make -j3 plasp-app && make -j3 run-tests
|
||||||
|
@ -1,20 +1,23 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(plasp CXX)
|
project(plasp CXX)
|
||||||
|
|
||||||
option(BUILD_TESTS "Build unit tests" OFF)
|
option(PLASP_BUILD_TESTS "Build unit tests" OFF)
|
||||||
|
|
||||||
find_package(Boost 1.55.0 COMPONENTS program_options iostreams system filesystem REQUIRED)
|
find_package(Boost 1.55.0 COMPONENTS program_options iostreams system filesystem REQUIRED)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wpedantic")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
add_definitions(-std=c++14)
|
|
||||||
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||||
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(apps)
|
add_subdirectory(app)
|
||||||
if(BUILD_TESTS)
|
if(PLASP_BUILD_TESTS)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif(BUILD_TESTS)
|
endif(PLASP_BUILD_TESTS)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
set(target plasp_app)
|
set(target plasp-app)
|
||||||
|
|
||||||
file(GLOB core_sources "*.cpp")
|
file(GLOB core_sources "*.cpp")
|
||||||
file(GLOB core_headers "*.h")
|
file(GLOB core_headers "*.h")
|
@ -1 +0,0 @@
|
|||||||
add_subdirectory(plasp-app)
|
|
Reference in New Issue
Block a user