Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
77cc5458
Commit
77cc5458
authored
Oct 18, 2011
by
Jesse Beder
Browse files
Couldn't get the copy command to work for yaml.h, so switched to configure_file
parent
e69f51ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
30 deletions
+21
-30
CMakeLists.txt
CMakeLists.txt
+10
-12
include/yaml-cpp/yaml-old-api.h
include/yaml-cpp/yaml-old-api.h
+0
-18
include/yaml-cpp/yaml.h.cmake
include/yaml-cpp/yaml.h.cmake
+11
-0
No files found.
CMakeLists.txt
View file @
77cc5458
...
...
@@ -52,6 +52,16 @@ option(APPLE_UNIVERSAL_BIN "Apple: Build universal binary" OFF)
option
(
MSVC_SHARED_RT
"MSVC: Build with shared runtime libs (/MD)"
ON
)
option
(
MSVC_STHREADED_RT
"MSVC: Build with single-threaded static runtime libs (/ML until VS .NET 2003)"
OFF
)
###
### Configure the main header
###
if
(
YAML_CPP_BUILD_OLD_API
)
set
(
API_DEFINE
"#define YAML_CPP_OLD_API"
)
else
()
set
(
API_DEFINE
"#undef YAML_CPP_OLD_API"
)
endif
()
configure_file
(
${
YAML_CPP_SOURCE_DIR
}
/include/yaml-cpp/yaml.h.cmake
${
YAML_CPP_SOURCE_DIR
}
/include/yaml-cpp/yaml.h @ONLY
)
###
### Sources, headers, directories and libs
...
...
@@ -79,22 +89,10 @@ if(YAML_CPP_BUILD_OLD_API)
list
(
APPEND public_headers
${
common_public_headers
}
${
old_api_public_headers
}
)
list
(
APPEND private_headers
${
common_private_headers
}
${
old_api_private_headers
}
)
add_definitions
(
-DYAML_CPP_OLD_API
)
ADD_CUSTOM_COMMAND
(
OUTPUT
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml.h
COMMAND
${
CMAKE_COMMAND
}
copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml-old-api.h
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml.h
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml-old-api.h
)
else
()
list
(
APPEND sources
${
common_sources
}
${
new_api_sources
}
)
list
(
APPEND public_headers
${
common_public_headers
}
${
new_api_public_headers
}
)
list
(
APPEND private_headers
${
common_private_headers
}
${
new_api_private_headers
}
)
ADD_CUSTOM_COMMAND
(
OUTPUT
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml.h
COMMAND
${
CMAKE_COMMAND
}
copy
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml-new-api.h
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml.h
DEPENDS
${
CMAKE_CURRENT_SOURCE_DIR
}
/include/yaml-cpp/yaml-new-api.h
)
endif
()
if
(
YAML_CPP_BUILD_CONTRIB
)
...
...
include/yaml-cpp/yaml-old-api.h
deleted
100644 → 0
View file @
e69f51ee
#ifndef YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4)) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
#include "yaml-cpp/parser.h"
#include "yaml-cpp/emitter.h"
#include "yaml-cpp/stlemitter.h"
#include "yaml-cpp/exceptions.h"
#include "yaml-cpp/old-api/node.h"
#include "yaml-cpp/old-api/stlnode.h"
#include "yaml-cpp/old-api/iterator.h"
#endif // YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66
include/yaml-cpp/yaml
-new-api.h
→
include/yaml-cpp/yaml
.h.cmake
View file @
77cc5458
...
...
@@ -5,12 +5,21 @@
#pragma once
#endif
@API_DEFINE@
#include "yaml-cpp/parser.h"
#include "yaml-cpp/emitter.h"
#include "yaml-cpp/stlemitter.h"
#include "yaml-cpp/exceptions.h"
#ifdef YAML_CPP_OLD_API
#include "yaml-cpp/old-api/node.h"
#include "yaml-cpp/old-api/stlnode.h"
#include "yaml-cpp/old-api/iterator.h"
#else
#include "yaml-cpp/node/node.h"
#include "yaml-cpp/node/impl.h"
#include "yaml-cpp/node/convert.h"
...
...
@@ -19,4 +28,6 @@
#include "yaml-cpp/node/parse.h"
#include "yaml-cpp/node/emit.h"
#endif // YAML_CPP_OLD_API
#endif // YAML_H_62B23520_7C8E_11DE_8A39_0800200C9A66
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment