Browse Source

Merges the lib and include dir

master
Joshua Moerman 10 years ago
parent
commit
26e0a2ccb7
  1. 2
      CMakeLists.txt
  2. 4
      include/CMakeLists.txt
  3. 2
      include/dummy.cpp
  4. 4
      lib/CMakeLists.txt
  5. 0
      lib/evolve.hpp
  6. 1
      lib/genome.hpp
  7. 1
      lib/utilities.hpp

2
CMakeLists.txt

@ -1,7 +1,6 @@
project(Genetics)
cmake_minimum_required(VERSION 2.8)
include_directories("${PROJECT_SOURCE_DIR}/include/")
add_definitions(-std=c++1y)
find_package(Boost REQUIRED COMPONENTS filesystem program_options serialization system)
@ -9,6 +8,5 @@ include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
set(libs ${libs} ${Boost_LIBRARIES})
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_subdirectory("include")
add_subdirectory("lib")
add_subdirectory("src")

4
include/CMakeLists.txt

@ -1,4 +0,0 @@
# Hack to show headers in Qt Creator
file(GLOB headers "*.hpp")
add_library(dummy ${headers} dummy.cpp)

2
include/dummy.cpp

@ -1,2 +0,0 @@
// Needed for the hack to show headers in Qt Creator
static int x = x;

4
lib/CMakeLists.txt

@ -1,4 +1,6 @@
file(GLOB sources "*.cpp")
add_library(common STATIC ${sources})
file(GLOB headers "*.hpp")
add_library(common ${headers} ${sources})
target_link_libraries(common ${libs})
target_include_directories(common INTERFACE ".")

0
include/evolve.hpp → lib/evolve.hpp

1
include/genome.hpp → lib/genome.hpp

@ -19,6 +19,7 @@ struct Gen {
kAdd,
kSub,
kMult,
kMod,
kDiv,
kPow,
kTypes

1
include/utilities.hpp → lib/utilities.hpp

@ -2,6 +2,7 @@
// I needed a safe division in order to avoid SIGFPE
int divi(int x, int y);
int modi(int x, int y);
// Integer power function
int powi(int base, int exp);