Skip to content

Commit

Permalink
Reorganize code structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Michele Vascellari authored and Michele Vascellari committed Jan 12, 2018
1 parent 4a4efec commit 06b466d
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ cmake_minimum_required (VERSION 3.7)

project (PKP)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# include directories
include_directories ("/Users/vascella/.local/include")
include_directories ("./src")
link_directories ("/Users/vascella/.local/lib")

#set ( CMAKE_C_FLAGS "-std=gnu++11")
# add_definitions("-std=gnu++14")
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD 14)

# https://stackoverflow.com/questions/36078456/cmake-add-include-paths-to-clang
# generates the file compile_commands.json.
Expand All @@ -19,24 +24,26 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")

set(SOURCE_FILES model.cpp reactor.cpp SFOR.cpp C2SM.cpp ModelFactory.cpp)
# set(SOURCE_FILES model.cpp reactor.cpp SFOR.cpp C2SM.cpp ModelFactory.cpp)
# set(SOURCE_FILES src/*.cpp)
file(GLOB project_sources src/*.cpp)

add_library(pkp SHARED ${SOURCE_FILES})
add_library(pkp SHARED ${project_sources})

# test
add_executable(test.x test.cpp)
add_executable(test.x test/test.cpp)
target_link_libraries(test.x pkp gtest)

# test reactorT
add_executable(test_reactorT.x test_reactorT.cpp)
add_executable(test_reactorT.x test/test_reactorT.cpp)
target_link_libraries(test_reactorT.x pkp gtest)

# main
add_executable(main.x main.cpp)
add_executable(main.x test/main.cpp)
target_link_libraries(main.x pkp yaml-cpp)

# main
add_executable(test_factory.x test_factory.cpp)
add_executable(test_factory.x test/test_factory.cpp)
target_link_libraries(test_factory.x pkp)

#add_executable(test.x gtest.cpp)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 06b466d

Please sign in to comment.