Victor/core/basic structure for cmake to work (#37)
* moving files and updating cmake to make it compilable
This commit is contained in:
parent
b264e13701
commit
7971d525df
@ -9,31 +9,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
|
||||
|
||||
add_library (
|
||||
azure-core
|
||||
src/http/az_http_request
|
||||
src/http/http_request
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
if(WARNINGS_AS_ERRORS)
|
||||
set(WARNINGS_AS_ERRORS_FLAG "/WX")
|
||||
endif()
|
||||
|
||||
target_compile_options(azure-core PRIVATE /Wall ${WARNINGS_AS_ERRORS_FLAG} /wd5031 /wd4668 /wd4820 /wd4255 /analyze)
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
if(WARNINGS_AS_ERRORS)
|
||||
set(WARNINGS_AS_ERRORS_FLAG "-Werror")
|
||||
endif()
|
||||
|
||||
target_compile_options(azure-core PRIVATE -Xclang -Wall -Wextra -pedantic ${WARNINGS_AS_ERRORS_FLAG} -Wdocumentation -Wdocumentation-unknown-command -Wcast-qual)
|
||||
else()
|
||||
if(WARNINGS_AS_ERRORS)
|
||||
set(WARNINGS_AS_ERRORS_FLAG "-Werror")
|
||||
endif()
|
||||
|
||||
target_compile_options(azure-core PRIVATE -Wall -Wextra -pedantic ${WARNINGS_AS_ERRORS_FLAG})
|
||||
endif()
|
||||
# compiler warning flags
|
||||
include(global_compile_options)
|
||||
|
||||
target_include_directories (azure-core PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc> $<INSTALL_INTERFACE:include/az_core>)
|
||||
target_include_directories (azure-core PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/internal> $<INSTALL_INTERFACE:include/az_core_internal>)
|
||||
|
||||
# make sure that users can consume the project as a library.
|
||||
add_library (azure::core ALIAS azure-core)
|
||||
|
||||
30
sdk/core/azure-core/inc/http/http.hpp
Normal file
30
sdk/core/azure-core/inc/http/http.hpp
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <internal/contract.hpp>
|
||||
|
||||
namespace azure
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
namespace http
|
||||
{
|
||||
|
||||
class http_request
|
||||
{
|
||||
|
||||
private:
|
||||
/* data */
|
||||
public:
|
||||
http_request();
|
||||
~http_request();
|
||||
};
|
||||
|
||||
http_request::http_request() {}
|
||||
http_request::~http_request() {}
|
||||
|
||||
} // namespace http
|
||||
} // namespace core
|
||||
} // namespace azure
|
||||
15
sdk/core/azure-core/src/http/http_request.cpp
Normal file
15
sdk/core/azure-core/src/http/http_request.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include <http/http.hpp>
|
||||
|
||||
namespace azure
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
namespace http
|
||||
{
|
||||
|
||||
} // namespace http
|
||||
} // namespace core
|
||||
} // namespace azure
|
||||
Loading…
Reference in New Issue
Block a user