Commit be61fe3b authored by damien's avatar damien
Browse files

Switching to CLion and CMake.

parent 4f0af463
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
<component name="CidrRootsConfiguration">
<excludeRoots>
<file path="$PROJECT_DIR$/CMakeFiles" />
<file path="$PROJECT_DIR$/cmake-build-debug/CMakeFiles" />
<file path="$PROJECT_DIR$/cmake-build-release/CMakeFiles" />
</excludeRoots>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/spell-qtl.iml" filepath="$PROJECT_DIR$/.idea/spell-qtl.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
cmake_minimum_required(VERSION 3.5)
project(spell_qtl)
#set(CMAKE_VERBOSE_MAKEFILE ON)
#set(CMAKE_CXX_STANDARD 11)
execute_process(
COMMAND bash -c "git rev-list --count `git rev-list --tags --max-count=1`..HEAD 2>/dev/null || echo 0"
OUTPUT_VARIABLE VERSION_PATCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND git tag
COMMAND tail -1
OUTPUT_VARIABLE LAST_TAG
OUTPUT_STRIP_TRAILING_WHITESPACE
)
STRING(REGEX MATCHALL "[0-9]+" VERSION "${LAST_TAG}")
MESSAGE(STATUS "LAST TAG ${LAST_TAG}")
MESSAGE(STATUS "VERSION ${VERSION}")
LIST(GET VERSION 0 VERSION_MAJOR)
LIST(GET VERSION 1 VERSION_MINOR)
set(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra -Wall -Wno-unused-parameter -pthread -fPIC")
add_definitions(-DEIGEN_NO_DEPRECATED_WARNING -DVERSION_MAJOR=\"${VERSION_MAJOR}\" -DVERSION_MINOR=\"${VERSION_MINOR}\" -DVERSION_PATCH=\"${VERSION_PATCH}\")
MESSAGE(STATUS "CXX FLAGS ${CMAKE_CXX_FLAGS}")
find_library(EXPAT_LIBRARY_NAMES expat)
find_path(EXPAT_INCLUDE_DIR expat.h HINTS /usr/include /usr/local/include /usr/include/expat/ /usr/local/include/expat/)
find_path(X2C_INCLUDE_DIR x2c.h HINTS /usr/include /usr/local/include /usr/include/x2c/ /usr/local/include/x2c/)
find_path(EIGEN_INCLUDE_DIR Eigen/Eigen HINTS /usr/include /usr/local/include /usr/include/eigen3/ /usr/local/include/eigen3/)
include_directories(AFTER 3rd-party/ThreadPool)
include_directories(AFTER include/ include/input/ include/bayes/ ${EIGEN_INCLUDE_DIR})
include_directories(SYSTEM ${EXPAT_INCLUDE_DIR} ${X2C_INCLUDE_DIR})
set(SPELL_PEDIGREE_SRC
src/static_data.cc
src/pedigree/main.cc
src/pedigree/cli.cc
)
set(SPELL_MARKER_SRC
src/input/read_mark.cc src/input/design.cc src/input/read_map.cc src/input/xml/xml_design.cc src/input/xml/xml_format.cc
src/static_data.cc
src/bayes/main.cc src/bayes/dispatch.cc src/bayes/jobs.cc src/bayes/cli.cc
)
set(SPELL_QTL_SRC
src/input/read_map.cc src/input/read_trait.cc src/input/read_settings.cc src/input/ld_matrices.cc src/input/xml/xml_format.cc src/input/xml/xml_settings.cc
src/static_data.cc src/main.cc src/beta_gamma.cc
src/computations/basic_data.cc src/computations/probabilities.cc src/computations/model.cc src/computations/frontends.cc
)
add_executable(spell_pedigree ${SPELL_PEDIGREE_SRC})
add_executable(spell_marker ${SPELL_MARKER_SRC})
add_executable(spell_qtl ${SPELL_QTL_SRC})
target_link_libraries(spell_marker expat dl)
target_link_libraries(spell_qtl expat dl)
set(CMAKE_EXE_LINKER_FLAGS "-rdynamic")
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
# Install script for directory: /home/damien/devel/spell-qtl
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr/local")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Install shared libraries without execute permission?
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
set(CMAKE_INSTALL_SO_NO_EXE "1")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "/home/damien/devel/spell-qtl/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
......@@ -1107,7 +1107,8 @@ struct model_manager {
std::vector<std::string>
split(const std::string& str, const std::string& regex)
{
return {std::sregex_token_iterator(str.begin(), str.end(), std::regex(regex), -1), std::sregex_token_iterator()};
std::regex re(regex);
return {std::sregex_token_iterator(str.begin(), str.end(), re, -1), std::sregex_token_iterator()};
}
void
......
#include "input.h"
#include "read_map.h"
#include "input/read_map.h"
namespace read_data {
......
#include "input.h"
#include "read_trait.h"
#include "input/read_trait.h"
#include "error.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment