1
0
Fork 0

[C] Improved cmake files consistency

This commit is contained in:
seleznevae 2019-05-19 19:09:11 +03:00
parent e77e262a48
commit f223a12fed
7 changed files with 14 additions and 13 deletions

View File

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

View File

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

View File

@ -27,6 +27,10 @@ endif()
set(CMAKE_VERBOSE_MAKEFILE ON)
message(STATUS "libfort build options: "
" wchar support = ${FORT_ENABLE_WCHAR}; "
" build type = ${FORT_BUILD_TYPE}")
# ------------------------------------------------------------------------------
# Warnings
# ------------------------------------------------------------------------------
@ -59,8 +63,8 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ADDITIONAL_WARNINGS} -Wpedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ADDITIONAL_WARNINGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -std=c99 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -std=c++11")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif()
# ------------------------------------------------------------------------------

View File

@ -14,7 +14,7 @@ install:
before_build:
- mkdir build
- cd build
- cmake -G "Visual Studio 15 2017 Win64" ..
- cmake -DCMAKE_BUILD_TYPE=Debug --G "Visual Studio 15 2017 Win64" ..
- dir
build:

View File

@ -1,6 +1,5 @@
option(FORT_HAVE_WCHAR "Enable wchar support" ON)
message("FORT_HAVE_WCHAR in fort = ${FORT_HAVE_WCHAR}")
add_library(fort
fort.c)

View File

@ -1,7 +1,6 @@
option(FORT_HAVE_WCHAR "Enable wchar support" ON)
option(FORT_TEST_BUILD "Export some internal symbols for tests" ON)
message("FORT_HAVE_WCHAR in fort_dev = ${FORT_HAVE_WCHAR}")
add_library(fort_dev
fort_impl.c
vector.c

View File

@ -1,7 +1,6 @@
option(FORT_HAVE_WCHAR "Enable wchar support" ON)
option(FORT_TEST_BUILD "Export some internal symbols for tests" ON)
message("FORT_HAVE_WCHAR in tests = ${FORT_HAVE_WCHAR}")
add_executable(${PROJECT_NAME}_test_dev
main_test.c