mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Fixed mixed line endings
This commit is contained in:
@@ -33,7 +33,7 @@ enable_testing()
|
|||||||
### Project options
|
### Project options
|
||||||
###
|
###
|
||||||
## Project stuff
|
## 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)
|
option(YAML_CPP_BUILD_CONTRIB "Enable contrib stuff in library" ON)
|
||||||
|
|
||||||
## Build options
|
## Build options
|
||||||
@@ -118,33 +118,33 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
### Project stuff
|
### Project stuff
|
||||||
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE Release)
|
set(CMAKE_BUILD_TYPE Release)
|
||||||
endif()
|
endif()
|
||||||
#
|
#
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
|
||||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
|
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
|
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os")
|
||||||
|
#
|
||||||
|
set(GCC_EXTRA_OPTIONS "")
|
||||||
#
|
#
|
||||||
set(GCC_EXTRA_OPTIONS "")
|
|
||||||
#
|
|
||||||
set(FLAG_TESTED "-Wextra")
|
set(FLAG_TESTED "-Wextra")
|
||||||
check_cxx_compiler_flag(${FLAG_TESTED} FLAG_WEXTRA)
|
check_cxx_compiler_flag(${FLAG_TESTED} FLAG_WEXTRA)
|
||||||
if(FLAG_WEXTRA)
|
if(FLAG_WEXTRA)
|
||||||
set(GCC_EXTRA_OPTIONS "${GCC_EXTRA_OPTIONS} ${FLAG_TESTED}")
|
set(GCC_EXTRA_OPTIONS "${GCC_EXTRA_OPTIONS} ${FLAG_TESTED}")
|
||||||
endif()
|
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
|
add_custom_target(debuggable $(MAKE) clean
|
||||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
|
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Debug ${CMAKE_SOURCE_DIR}
|
||||||
COMMENT "Adjusting settings for debug compilation"
|
COMMENT "Adjusting settings for debug compilation"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
add_custom_target(releasable $(MAKE) clean
|
add_custom_target(releasable $(MAKE) clean
|
||||||
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
|
COMMAND ${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE=Release ${CMAKE_SOURCE_DIR}
|
||||||
COMMENT "Adjusting settings for release compilation"
|
COMMENT "Adjusting settings for release compilation"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Microsoft VisualC++ specialities
|
# Microsoft VisualC++ specialities
|
||||||
|
@@ -1,28 +1,28 @@
|
|||||||
#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
#ifndef DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
||||||
#define 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
|
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__ >= 4) // GCC supports "pragma once" correctly since 3.4
|
||||||
#pragma once
|
#pragma once
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The following ifdef block is the standard way of creating macros which make exporting
|
// 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
|
// 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
|
// 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
|
// 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
|
// YAML_CPP_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||||
// defined with this macro as being exported.
|
// defined with this macro as being exported.
|
||||||
#undef YAML_CPP_API
|
#undef YAML_CPP_API
|
||||||
|
|
||||||
#ifdef YAML_CPP_DLL // Using or Building YAML-CPP DLL (definition defined manually)
|
#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)
|
#ifdef yaml_cpp_EXPORTS // Building YAML-CPP DLL (definition created by CMake or defined manually)
|
||||||
// #pragma message( "Defining YAML_CPP_API for DLL export" )
|
// #pragma message( "Defining YAML_CPP_API for DLL export" )
|
||||||
#define YAML_CPP_API __declspec(dllexport)
|
#define YAML_CPP_API __declspec(dllexport)
|
||||||
#else // yaml_cpp_EXPORTS
|
#else // yaml_cpp_EXPORTS
|
||||||
// #pragma message( "Defining YAML_CPP_API for DLL import" )
|
// #pragma message( "Defining YAML_CPP_API for DLL import" )
|
||||||
#define YAML_CPP_API __declspec(dllimport)
|
#define YAML_CPP_API __declspec(dllimport)
|
||||||
#endif // yaml_cpp_EXPORTS
|
#endif // yaml_cpp_EXPORTS
|
||||||
#else //YAML_CPP_DLL
|
#else //YAML_CPP_DLL
|
||||||
#define YAML_CPP_API
|
#define YAML_CPP_API
|
||||||
#endif // YAML_CPP_DLL
|
#endif // YAML_CPP_DLL
|
||||||
|
|
||||||
#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
#endif // DLL_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
||||||
|
Reference in New Issue
Block a user