[D] Deleted standard versions from cmake

This commit is contained in:
seleznevae 2019-05-19 19:54:26 +03:00
parent 69883dcf1e
commit dcfe9f2192
5 changed files with 21 additions and 11 deletions

View File

@ -27,7 +27,7 @@ main_task:
# Test build without optimizations and with asan # Test build without optimizations and with asan
- mkdir -p build - mkdir -p build
- cd build - cd build
- cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug - cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11
- cmake --build . --target all - cmake --build . --target all
- ls - ls
- ctest -VV - ctest -VV
@ -37,7 +37,7 @@ main_task:
# Test build without optimizations and with ubsan # Test build without optimizations and with ubsan
- mkdir -p build - mkdir -p build
- cd build - cd build
- cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug - cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11
- cmake --build . --target all - cmake --build . --target all
- ls - ls
- ctest -VV - ctest -VV
@ -47,7 +47,7 @@ main_task:
# Test without WCHAR support # Test without WCHAR support
- mkdir -p build - mkdir -p build
- cd build - cd build
- cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug - cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11
- cmake --build . --target all - cmake --build . --target all
- ls - ls
- ctest -VV - ctest -VV

View File

@ -191,7 +191,7 @@ script:
# Test build without optimizations and with asan # Test build without optimizations and with asan
- mkdir -p build - mkdir -p build
- cd build - cd build
- cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug - cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11
- cmake --build . --target all - cmake --build . --target all
- ls - ls
- ctest -VV - ctest -VV
@ -201,7 +201,7 @@ script:
- rm -r build/* - rm -r build/*
- mkdir -p build - mkdir -p build
- cd build - cd build
- cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug - cmake .. -DFORT_ENABLE_WCHAR=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11
- cmake --build . --target all - cmake --build . --target all
- ls - ls
- ctest -VV - ctest -VV
@ -212,7 +212,7 @@ script:
cd .. ; cd .. ;
rm -r build/* ; rm -r build/* ;
cd build ; cd build ;
cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug ; cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 ;
cmake --build . --target all ; cmake --build . --target all ;
ls ; ls ;
ctest -VV; ctest -VV;
@ -258,7 +258,7 @@ script:
cd .. ; cd .. ;
rm -r build/* ; rm -r build/* ;
cd build ; cd build ;
cmake .. -DFORT_BUILD_TYPE=coveralls -DCMAKE_BUILD_TYPE=Debug ; cmake .. -DFORT_BUILD_TYPE=coveralls -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 ;
cmake --build . --target all ; cmake --build . --target all ;
ls ; ls ;
./tests/libfort_test_dev ; ./tests/libfort_test_dev ;

View File

@ -31,6 +31,10 @@ message(STATUS "libfort build options: "
" wchar support = ${FORT_ENABLE_WCHAR}; " " wchar support = ${FORT_ENABLE_WCHAR}; "
" build type = ${FORT_BUILD_TYPE}") " build type = ${FORT_BUILD_TYPE}")
# for fort.hpp
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Warnings # Warnings
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -59,12 +63,8 @@ else()
-Wlogical-op") -Wlogical-op")
endif() endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_WARNINGS} -Wpedantic") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_WARNINGS} -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_WARNINGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_WARNINGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif() endif()
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------

View File

@ -614,6 +614,11 @@ struct ft_border_style {
/** /**
* @defgroup BasicStyles * @defgroup BasicStyles
* @name Built-in table border styles. * @name Built-in table border styles.
* @note Built-in border styles (FT_BASIC_STYLE, FT_BASIC2_STYLE ...) can be
* used as arguments for @ref ft_set_border_style and
* @ref ft_set_default_border_style, but their fields shouldn't be accessed
* directly because implementation doesn't guarantee that these objects are
* properly initialized.
* @{ * @{
*/ */
extern const struct ft_border_style *const FT_BASIC_STYLE; extern const struct ft_border_style *const FT_BASIC_STYLE;

View File

@ -614,6 +614,11 @@ struct ft_border_style {
/** /**
* @defgroup BasicStyles * @defgroup BasicStyles
* @name Built-in table border styles. * @name Built-in table border styles.
* @note Built-in border styles (FT_BASIC_STYLE, FT_BASIC2_STYLE ...) can be
* used as arguments for @ref ft_set_border_style and
* @ref ft_set_default_border_style, but their fields shouldn't be accessed
* directly because implementation doesn't guarantee that these objects are
* properly initialized.
* @{ * @{
*/ */
extern const struct ft_border_style *const FT_BASIC_STYLE; extern const struct ft_border_style *const FT_BASIC_STYLE;