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
dc5bd4af
Commit
dc5bd4af
authored
Mar 17, 2011
by
Jesse Beder
Browse files
Fixed mixed line endings
parent
c67b41c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
48 deletions
+48
-48
CMakeLists.txt
CMakeLists.txt
+20
-20
include/yaml-cpp/dll.h
include/yaml-cpp/dll.h
+28
-28
No files found.
CMakeLists.txt
View file @
dc5bd4af
...
...
@@ -33,7 +33,7 @@ enable_testing()
### Project options
###
## Project stuff
option
(
YAML_CPP_BUILD_TOOLS
"Enable testing and parse tools"
ON
)
option
(
YAML_CPP_BUILD_TOOLS
"Enable testing and parse tools"
ON
)
option
(
YAML_CPP_BUILD_CONTRIB
"Enable contrib stuff in library"
ON
)
## Build options
...
...
@@ -118,33 +118,33 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif
()
### Project stuff
if
(
NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE Release
)
endif
()
#
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O2"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-O2 -g"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g"
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"-Os"
)
if
(
NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE Release
)
endif
()
#
set
(
CMAKE_CXX_FLAGS_RELEASE
"-O2"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"-O2 -g"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"-g"
)
set
(
CMAKE_CXX_FLAGS_MINSIZEREL
"-Os"
)
#
set
(
GCC_EXTRA_OPTIONS
""
)
#
set
(
GCC_EXTRA_OPTIONS
""
)
#
set
(
FLAG_TESTED
"-Wextra"
)
check_cxx_compiler_flag
(
${
FLAG_TESTED
}
FLAG_WEXTRA
)
if
(
FLAG_WEXTRA
)
set
(
GCC_EXTRA_OPTIONS
"
${
GCC_EXTRA_OPTIONS
}
${
FLAG_TESTED
}
"
)
endif
()
#
set
(
CMAKE_CXX_FLAGS
"-Wall
${
GCC_EXTRA_OPTIONS
}
-pedantic -Wno-long-long
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-Wall
${
GCC_EXTRA_OPTIONS
}
-pedantic -Wno-long-long
${
CMAKE_CXX_FLAGS
}
"
)
#
add_custom_target
(
debuggable $
(
MAKE
)
clean
COMMAND
${
CMAKE_COMMAND
}
-DCMAKE_BUILD_TYPE=Debug
${
CMAKE_SOURCE_DIR
}
COMMENT
"Adjusting settings for debug compilation"
VERBATIM
)
add_custom_target
(
releasable $
(
MAKE
)
clean
COMMAND
${
CMAKE_COMMAND
}
-DCMAKE_BUILD_TYPE=Release
${
CMAKE_SOURCE_DIR
}
COMMENT
"Adjusting settings for release compilation"
VERBATIM
)
add_custom_target
(
debuggable $
(
MAKE
)
clean
COMMAND
${
CMAKE_COMMAND
}
-DCMAKE_BUILD_TYPE=Debug
${
CMAKE_SOURCE_DIR
}
COMMENT
"Adjusting settings for debug compilation"
VERBATIM
)
add_custom_target
(
releasable $
(
MAKE
)
clean
COMMAND
${
CMAKE_COMMAND
}
-DCMAKE_BUILD_TYPE=Release
${
CMAKE_SOURCE_DIR
}
COMMENT
"Adjusting settings for release compilation"
VERBATIM
)
endif
()
# Microsoft VisualC++ specialities
...
...
include/yaml-cpp/dll.h
View file @
dc5bd4af
#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the yaml_cpp_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// YAML_CPP_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#undef YAML_CPP_API
#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined manually)
#ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake or defined manually)
// #pragma message( "Defining YAML_CPP_API for DLL export" )
#define YAML_CPP_API __declspec(dllexport)
#else // yaml_cpp_EXPORTS
// #pragma message( "Defining YAML_CPP_API for DLL import" )
#define YAML_CPP_API __declspec(dllimport)
#endif // yaml_cpp_EXPORTS
#else //YAML_CPP_DLL
#define YAML_CPP_API
#endif // YAML_CPP_DLL
#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#define DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the yaml_cpp_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// YAML_CPP_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
#undef YAML_CPP_API
#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined manually)
#ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake or defined manually)
// #pragma message( "Defining YAML_CPP_API for DLL export" )
#define YAML_CPP_API __declspec(dllexport)
#else // yaml_cpp_EXPORTS
// #pragma message( "Defining YAML_CPP_API for DLL import" )
#define YAML_CPP_API __declspec(dllimport)
#endif // yaml_cpp_EXPORTS
#else //YAML_CPP_DLL
#define YAML_CPP_API
#endif // YAML_CPP_DLL
#endif // DLL_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