Unverified Commit 9b416496 authored by Gabi Melman's avatar Gabi Melman Committed by GitHub

Merge pull request #1849 from concatime/cmake-library-type-option-flag

CMake: Replace custom SPDLOG_BUILD_SHARED by standard BUILD_SHARED_LIBS
parents 0fac3378 1b3438f5
...@@ -124,7 +124,7 @@ if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO) ...@@ -124,7 +124,7 @@ if(NOT SPDLOG_FMT_EXTERNAL AND NOT SPDLOG_FMT_EXTERNAL_HO)
list(APPEND SPDLOG_SRCS src/fmt.cpp) list(APPEND SPDLOG_SRCS src/fmt.cpp)
endif() endif()
if(SPDLOG_BUILD_SHARED) if(SPDLOG_BUILD_SHARED OR BUILD_SHARED_LIBS)
if(WIN32) if(WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc) list(APPEND SPDLOG_SRCS ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
......
...@@ -4,51 +4,51 @@ environment: ...@@ -4,51 +4,51 @@ environment:
matrix: matrix:
- GENERATOR: '"Visual Studio 14 2015"' - GENERATOR: '"Visual Studio 14 2015"'
BUILD_TYPE: Debug BUILD_TYPE: Debug
BUILD_SHARED: 'OFF'
WCHAR: 'OFF' WCHAR: 'OFF'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 14 2015"' - GENERATOR: '"Visual Studio 14 2015"'
BUILD_TYPE: Release BUILD_TYPE: Release
BUILD_SHARED: 'OFF'
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 14 2015 Win64"' - GENERATOR: '"Visual Studio 14 2015 Win64"'
BUILD_TYPE: Debug BUILD_TYPE: Debug
BUILD_SHARED: 'OFF'
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 14 2015 Win64"' - GENERATOR: '"Visual Studio 14 2015 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
BUILD_SHARED: 'OFF'
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Debug BUILD_TYPE: Debug
BUILD_SHARED: 'OFF'
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
BUILD_SHARED: 'OFF'
WCHAR: 'OFF' WCHAR: 'OFF'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'OFF'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
BUILD_SHARED: 'ON'
WCHAR: 'OFF' WCHAR: 'OFF'
WCHAR_FILES: 'OFF' WCHAR_FILES: 'OFF'
BUILD_SHARED: 'ON'
BUILD_EXAMPLE: 'ON' BUILD_EXAMPLE: 'ON'
- GENERATOR: '"Visual Studio 15 2017 Win64"' - GENERATOR: '"Visual Studio 15 2017 Win64"'
BUILD_TYPE: Release BUILD_TYPE: Release
BUILD_SHARED: 'ON'
WCHAR: 'ON' WCHAR: 'ON'
WCHAR_FILES: 'ON' WCHAR_FILES: 'ON'
BUILD_SHARED: 'ON'
BUILD_EXAMPLE: 'OFF' BUILD_EXAMPLE: 'OFF'
build_script: build_script:
- cmd: >- - cmd: >-
...@@ -60,7 +60,7 @@ build_script: ...@@ -60,7 +60,7 @@ build_script:
set PATH=%PATH%;C:\Program Files\Git\usr\bin set PATH=%PATH%;C:\Program Files\Git\usr\bin
cmake .. -G %GENERATOR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DSPDLOG_WCHAR_SUPPORT=%WCHAR% -DSPDLOG_WCHAR_FILENAMES=%WCHAR_FILES% -DSPDLOG_BUILD_SHARED=%BUILD_SHARED% -DSPDLOG_BUILD_EXAMPLE=%BUILD_EXAMPLE% -DSPDLOG_BUILD_EXAMPLE_HO=%BUILD_EXAMPLE% -DSPDLOG_BUILD_TESTS=ON -DSPDLOG_BUILD_TESTS_HO=OFF -DSPDLOG_BUILD_WARNINGS=ON cmake -G %GENERATOR% -D CMAKE_BUILD_TYPE=%BUILD_TYPE% -D BUILD_SHARED_LIBS=%BUILD_SHARED% -D SPDLOG_WCHAR_SUPPORT=%WCHAR% -D SPDLOG_WCHAR_FILENAMES=%WCHAR_FILES% -D SPDLOG_BUILD_EXAMPLE=%BUILD_EXAMPLE% -D SPDLOG_BUILD_EXAMPLE_HO=%BUILD_EXAMPLE% -D SPDLOG_BUILD_TESTS=ON -D SPDLOG_BUILD_TESTS_HO=OFF -D SPDLOG_BUILD_WARNINGS=ON ..
cmake --build . --config %BUILD_TYPE% cmake --build . --config %BUILD_TYPE%
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment