diff --git a/CMakeLists.txt b/CMakeLists.txt index 1583687..22ccd6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,22 @@ -#Specify the version being used aswell as the language +#Specify the version being used as well as the language cmake_minimum_required(VERSION 2.8.11) #Name your project here -project(netMets) +project(netmets) #set the module directory set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}") #find the STIM library -find_package(STIM REQUIRED) +find_package(STIM) + +#if the STIM library isn't found, download it +if(NOT STIM_INCLUDE_DIRS) + file(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/stimlib) #remove the stimlib directory if it exists + set(STIM_GIT "https://git.stim.ee.uh.edu/codebase/stimlib.git") + execute_process(COMMAND git clone --depth 1 ${STIM_GIT} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + set(STIM_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/stimlib" CACHE TYPE PATH) +endif(NOT STIM_INCLUDE_DIRS) #find BOOST find_package(Boost REQUIRED) @@ -22,6 +30,7 @@ find_package(X11) #find the Approximate Nearest Neighbor Library find_package(ANN REQUIRED) +#build the executable in the binary directory on MS Visual Studio if ( MSVC ) SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${OUTPUT_DIRECTORY}") SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${OUTPUT_DIRECTORY}") diff --git a/main.cpp b/main.cpp index 0935ac2..257dd53 100644 --- a/main.cpp +++ b/main.cpp @@ -23,11 +23,14 @@ int main(int argc, char* argv[]) float sigma = atof(argv[3]); stim::network GT;stim::network T; // load obj files to 3D network class + + //load the ground truth and test case networks GT.load_obj(argv[1]); T.load_obj(argv[2]); // resample the loaded networks - stim::network resampled_GT;stim::network resampled_T; + stim::network resampled_GT; + stim::network resampled_T; resampled_GT = GT.resample(sigma * resample_rate); resampled_T = T.resample(sigma * resample_rate); -- libgit2 0.21.4