Skip to content

Commit

Permalink
Changes for v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Nov 26, 2024
1 parent f577c84 commit e9c914c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 40 deletions.
50 changes: 25 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
cmake_minimum_required(VERSION "3.12")

project("spackexample" VERSION 0.1.0)
project("spackexample" VERSION 0.2.0)

find_package(Boost
1.65.1
REQUIRED
filesystem
)

#find_package(Boost
# 1.65.1
# REQUIRED
# filesystem
# )
#
#find_package(yaml-cpp
# 0.7.0
# REQUIRED
# )

#add_library(spackexamplelib filesystem/filesystem.cpp fem/fem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp)
add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp)
#add_library(spackexamplelib filesystem/filesystem.cpp flatset/flatset.cpp yamlParser/yamlParser.cpp)

#set_target_properties(spackexamplelib
# PROPERTIES
# PUBLIC_HEADER filesystem/filesystem.hpp
# PUBLIC_HEADER fem/fem.hpp
# PUBLIC_HEADER flatset/flatset.hpp
# PUBLIC_HEADER yamlParser/yamlParser.hpp
# )
set_target_properties(spackexamplelib
PROPERTIES
PUBLIC_HEADER filesystem/filesystem.hpp
PUBLIC_HEADER flatset/flatset.hpp
PUBLIC_HEADER yamlParser/yamlParser.hpp
)

add_executable(spackexample main.cpp)
#target_link_libraries(spackexample spackexamplelib)
target_link_libraries(spackexample spackexamplelib)
target_link_libraries(spackexamplelib Boost::filesystem)
#target_link_libraries(spackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})

#target_include_directories(spackexamplelib
# PRIVATE
# ${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib
# PUBLIC
# $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib>
# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/spackexamplelib>
# )
target_include_directories(spackexamplelib
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/spackexamplelib>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/spackexamplelib>
)

# Create install targets
include(GNUInstallDirs)
install(TARGETS spackexample
#install(TARGETS spackexample spackexamplelib
install(TARGETS spackexample spackexamplelib
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand Down
30 changes: 15 additions & 15 deletions main.cpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
//#include "flatset/flatset.hpp"
//#include "filesystem/filesystem.hpp"
#include "flatset/flatset.hpp"
#include "filesystem/filesystem.hpp"
//#include "yamlParser/yamlParser.hpp"
#include <iostream>

int main(int argc, char *argv[])
{
std::cout << "Let's fight with CMake, Docker, and some dependencies!" << std::endl << std::endl;

// std::cout << "Modify a flat set using boost container" << std::endl;
// modifyAndPrintSets();
// std::cout << std::endl;
std::cout << "Modify a flat set using boost container" << std::endl;
modifyAndPrintSets();
std::cout << std::endl;

// std::cout << "Inspect the current directory using boost filesystem" << std::endl;
// inspectDirectory();
// std::cout << std::endl;
std::cout << "Inspect the current directory using boost filesystem" << std::endl;
inspectDirectory();
std::cout << std::endl;

// if ( argc == 2 )
// {
// const std::string yamlFile( argv[1] );
// std::cout << "Parse some yaml file with yaml-cpp" << std::endl;
// std::cout << " " << yamlFile << std::endl;
// parseConfig( yamlFile );
// }
//if ( argc == 2 )
//{
// const std::string yamlFile( argv[1] );
// std::cout << "Parse some yaml file with yaml-cpp" << std::endl;
// std::cout << " " << yamlFile << std::endl;
// parseConfig( yamlFile );
//}

return 0;
}
Expand Down

0 comments on commit e9c914c

Please sign in to comment.