update
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
project(test_env)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
|
||||
add_executable(test_env main.cpp)
|
||||
target_link_libraries(test_env boost_system boost_filesystem)
|
||||
@@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
using namespace std;
|
||||
int main() {
|
||||
boost::filesystem::path keyStorePath;
|
||||
if (std::getenv("HOME") != nullptr) {
|
||||
keyStorePath = boost::filesystem::path(std::getenv("HOME")) / ".ndn";
|
||||
} else {
|
||||
keyStorePath = boost::filesystem::current_path() / ".ndn";
|
||||
}
|
||||
cout << keyStorePath.string() << endl;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user