diff --git a/Porthos/src/CMakeLists.txt b/Porthos/src/CMakeLists.txt index 0fd6e4efd06af8e03f016d5755a135f3f637eff8..748d6fc01a8bfb339fb5fd092db838e62c6cb72b 100644 --- a/Porthos/src/CMakeLists.txt +++ b/Porthos/src/CMakeLists.txt @@ -1,11 +1,14 @@ cmake_minimum_required (VERSION 3.0) -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) if(APPLE) - set(CMAKE_C_COMPILER "/usr/local/bin/gcc-9") - set(CMAKE_CXX_COMPILER "/usr/local/bin/g++-9") + set(CMAKE_C_COMPILER "/usr/local/bin/gcc-9") + set(CMAKE_CXX_COMPILER "/usr/local/bin/g++-9") endif() +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + project(Porthos) set(NAME "Porthos") @@ -24,13 +27,16 @@ target_link_libraries(Porthos-Protocols PUBLIC OpenMP::OpenMP_CXX ${OPENSSL_LIBRARIES}) -add_executable(Porthos3PC ${CMAKE_CURRENT_SOURCE_DIR}/example_neural_nets/mainResNet50.cpp) -target_link_libraries(Porthos3PC Porthos-Protocols) +macro (add_network _name) + add_executable(${_name} ${CMAKE_CURRENT_SOURCE_DIR}/example_neural_nets/main${_name}.cpp) + target_link_libraries(${_name} Porthos-Protocols) +endmacro() target_compile_options(Porthos-Protocols PUBLIC "-pthread;-Wall;-march=native;-msse4.1;-maes;-mpclmul;-mrdseed;-fpermissive;-fpic;-std=c++17;-w;-O3") -target_compile_options(Porthos3PC - PRIVATE "-pthread;-Wall;-march=native;-msse4.1;-maes;-mpclmul;-mrdseed;-fpermissive;-fpic;-std=c++17;-w;-O3") +add_network(DenseNet121) +add_network(ResNet50) +add_network(SqNetImgNet) diff --git a/Porthos/src/example_neural_nets/network_config.h b/Porthos/src/example_neural_nets/network_config.h index 3556c452b9f9bf21073cef0d4e5cb83f3745fb64..eff4a651fce5452cd9b5d0719433f8be89bd3b24 100644 --- a/Porthos/src/example_neural_nets/network_config.h +++ b/Porthos/src/example_neural_nets/network_config.h @@ -1,6 +1,6 @@ //Which network to run //New set of main files - choose which one to run -//#define F_RESNET50 -//#define F_DENSENET121 -//#define F_SQUEEZENET_IMAGENET +#define F_RESNET50 +#define F_DENSENET121 +#define F_SQUEEZENET_IMAGENET