From d1976cfb65d5f32f8a78129186deff5c52145acf Mon Sep 17 00:00:00 2001 From: Elias Kosunen Date: Tue, 5 Jun 2018 11:56:11 +0300 Subject: [PATCH] Cleanups --- .travis.yml | 17 +++++++---------- appveyor.yml | 1 - include/fmt/format.h | 2 +- support/appveyor-build.py | 9 +-------- support/appveyor-test-upload.ps1 | 11 ----------- test/CMakeLists.txt | 2 +- 6 files changed, 10 insertions(+), 32 deletions(-) delete mode 120000 appveyor.yml delete mode 100644 support/appveyor-test-upload.ps1 diff --git a/.travis.yml b/.travis.yml index 1cdb9f5e..ff042e9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: - env: BUILD=Doc sudo: required # g++ 6 on Linux with C++14 - - env: CXX_COMPILER=g++-6 BUILD=Debug STANDARD=14 + - env: CXX=g++-6 BUILD=Debug STANDARD=14 compiler: gcc addons: apt: @@ -30,7 +30,7 @@ matrix: - ubuntu-toolchain-r-test packages: - g++-6 - - env: CXX_COMPILER=g++-6 BUILD=Release STANDARD=14 + - env: CXX=g++-6 BUILD=Release STANDARD=14 compiler: gcc addons: apt: @@ -47,7 +47,7 @@ matrix: compiler: clang os: osx # clang 6.0 on Linux with C++14 - - env: CXX_COMPILER=clang++-6.0 BUILD=Debug STANDARD=14 + - env: CXX=clang++-6.0 BUILD=Debug STANDARD=14 compiler: clang addons: apt: @@ -59,7 +59,7 @@ matrix: - llvm-toolchain-trusty - llvm-toolchain-trusty-6.0 # clang 4.0 on Linux with C++14 - - env: CXX_COMPILER=clang++-4.0 BUILD=Debug STANDARD=11 + - env: CXX=clang++-4.0 BUILD=Debug STANDARD=11 compiler: clang addons: apt: @@ -71,10 +71,10 @@ matrix: - llvm-toolchain-trusty - llvm-toolchain-trusty-4.0 # g++ 4.8 on Linux with C++11 - - env: CXX_COMPILER=g++-4.8 BUILD=Debug STANDARD=11 + - env: CXX=g++-4.8 BUILD=Debug STANDARD=11 compiler: gcc # g++ 4.4 on Linux with C++11 - - env: CXX_COMPILER=g++-4.4 BUILD=Debug STANDARD=11 + - env: CXX=g++-4.4 BUILD=Debug STANDARD=11 compiler: gcc addons: apt: @@ -118,13 +118,10 @@ matrix: - tree ./libs allow_failures: # Errors - - env: CXX_COMPILER=g++-4.8 BUILD=Debug STANDARD=11 - compiler: gcc - - env: CXX_COMPILER=g++-4.4 BUILD=Debug STANDARD=11 + - env: CXX=g++-4.4 BUILD=Debug STANDARD=11 compiler: gcc before_script: - - if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then export CXX=${CXX_COMPILER}; fi - if [[ "${BUILD}" != "Doc" ]]; then ${CXX} --version; fi script: diff --git a/appveyor.yml b/appveyor.yml deleted file mode 120000 index a053ea84..00000000 --- a/appveyor.yml +++ /dev/null @@ -1 +0,0 @@ -support/appveyor.yml \ No newline at end of file diff --git a/include/fmt/format.h b/include/fmt/format.h index 018f1aaf..8c56b18b 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -294,7 +294,7 @@ class fp { significand_type f; int e; - static constexpr int significand_size = sizeof(significand_type) * char_size; + static FMT_CONSTEXPR_DECL const int significand_size = sizeof(significand_type) * char_size; fp(uint64_t f, int e): f(f), e(e) {} diff --git a/support/appveyor-build.py b/support/appveyor-build.py index d7b61562..2cfcb03a 100644 --- a/support/appveyor-build.py +++ b/support/appveyor-build.py @@ -32,16 +32,9 @@ else: if platform == 'x64': generator += ' Win64' cmake_command.append('-G' + generator) - # build_command = ['msbuild', r'C:\projects\fmt\build\fmt.sln', '/m:4', - # r'/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"'] build_command = ['cmake', '--build', '.', '--config', config, '--', '/m:4'] - test_command = ['ctest', '-C', config, '-T', 'Test'] - with open('DartConfiguration.tcl', 'w+') as file: - pass + test_command = ['ctest', '-C', config] check_call(cmake_command) check_call(build_command) check_call(test_command) - -# Upload test results -# check_call([r'../support/appveyor-test-upload.ps1', '-configuration', config, '-jobid', jobid]) diff --git a/support/appveyor-test-upload.ps1 b/support/appveyor-test-upload.ps1 deleted file mode 100644 index 0a2eb7af..00000000 --- a/support/appveyor-test-upload.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -param ( - [Parameter(Mandatory=$true)][string]$configuration, - [Parameter(Mandatory=$true)][string]$jobid -) - -$XSLInputElement = New-Object System.Xml.Xsl.XslCompiledTransform -$XslInputElement.Load("https://raw.githubusercontent.com/rpavlik/jenkins-ctest-plugin/master/ctest-to-junit.xsl") -$file = $(ls Testing\*\Test.xml) | Select -first 1 -$XSLInputElement.Transform((Resolve-Path $file), (Join-Path (Resolve-Path .) "ctest-to-junit-results.xml")) -$wc = New-Object 'System.Net.WebClient' -$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$jobid", (Resolve-Path .\ctest-to-junit-results.xml)) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 78e952e2..5378c188 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -145,7 +145,7 @@ if (FMT_PEDANTIC) no-windows-h-test PRIVATE ${PROJECT_SOURCE_DIR}/include) target_compile_definitions(no-windows-h-test PRIVATE FMT_USE_WINDOWS_H=0) if (FMT_PEDANTIC) - target_compile_options(no-windows-h-test ${PEDANTIC_COMPILE_FLAGS}) + target_compile_options(no-windows-h-test PRIVATE ${PEDANTIC_COMPILE_FLAGS}) endif () target_include_directories(no-windows-h-test SYSTEM PUBLIC gtest gmock) endif ()