Skip to content

Commit

Permalink
Merge pull request #38 from Scienza/dev-world
Browse files Browse the repository at this point in the history
Units library included as a submodule (but not included in CMakeLists…
  • Loading branch information
GabrielePisciotta authored Aug 5, 2018
2 parents 90d6d3c + 2cbea08 commit abfa57b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "googletest"]
path = external/googletest
url = git@github.com:google/googletest.git

[submodule "units"]
path = external/units
url = git@github.com:nholthaus/units.git
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ include_directories(
${PROJECT_SOURCE_DIR}/src/Basis
${PROJECT_SOURCE_DIR}/src/Potential
${PROJECT_SOURCE_DIR}/src/Solver
${PROJECT_SOURCE_DIR}/src/World

)

# Fetch all sources, creating ${SOURCES}
file(GLOB_RECURSE SOURCES ${SOURCE_DIR}/*.cpp)

# Create ${TESTS}, using test's main.cpp instead of ${SOURCE}'s one
set(TESTS ${SOURCES} src/Basis/Initializer.cpp src/Basis/Initializer.h)
list(REMOVE_ITEM TESTS ${SOURCE_DIR}/main.cpp)
Expand All @@ -50,20 +53,18 @@ list(APPEND TESTS
foreach(_source ${GOOGLETEST_SOURCES})
set_source_files_properties(${_source} PROPERTIES GENERATED 1)
endforeach()

add_library(googletest ${GOOGLETEST_SOURCES})

# Main executable
add_executable (
Schroedinger
${SOURCES}
src/Basis/Initializer.cpp src/Basis/Initializer.h)

${SOURCES})

# Test executable
add_executable(
unit_tests
${TESTS}
src/Basis/Initializer.cpp src/Basis/Initializer.h)
${TESTS})

add_dependencies(unit_tests googletest)
if (WIN32)
Expand All @@ -78,5 +79,3 @@ if (WIN32)
pthread
)
endif()
include(CTest)
enable_testing()
1 change: 1 addition & 0 deletions external/units
Submodule units added at 1477a1
4 changes: 1 addition & 3 deletions src/World/World.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
#define WORLD_H

class World
{

};
{};
#endif
3 changes: 0 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@
int main(int argc, char **argv) {

BasisManager::Builder b = BasisManager::Builder();
// BasisManager manager = BasisManager::getInstance();

BasisManager::getInstance()->addBase( b.addDiscrete(0, 5, 1)
.addContinuous(-5.0, 5.0, 0.01)
.build()
);

std::vector<Base> basis = BasisManager::getInstance()->getBasisList();
return 0;
}

0 comments on commit abfa57b

Please sign in to comment.