Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
fmt
Commits
8bc0adb9
Commit
8bc0adb9
authored
Apr 13, 2019
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of obsolete cmake stuff
parent
1763d0e7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
47 deletions
+10
-47
CMakeLists.txt
CMakeLists.txt
+8
-5
support/cmake/cxx14.cmake
support/cmake/cxx14.cmake
+1
-27
support/cmake/run-cmake.bat
support/cmake/run-cmake.bat
+0
-11
test/CMakeLists.txt
test/CMakeLists.txt
+1
-4
No files found.
CMakeLists.txt
View file @
8bc0adb9
...
...
@@ -34,7 +34,8 @@ if (MASTER_PROJECT AND NOT CMAKE_BUILD_TYPE)
endif
()
option
(
FMT_PEDANTIC
"Enable extra warnings and expensive tests."
OFF
)
option
(
FMT_WERROR
"Halt the compilation with an error on compiler warnings."
OFF
)
option
(
FMT_WERROR
"Halt the compilation with an error on compiler warnings."
OFF
)
# Options that control generation of various targets.
option
(
FMT_DOC
"Generate the doc target."
${
MASTER_PROJECT
}
)
...
...
@@ -95,7 +96,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
endif
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
set
(
PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion -Wno-sign-conversion
)
set
(
PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion
-Wno-sign-conversion
)
check_cxx_compiler_flag
(
-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING
)
if
(
HAS_NULLPTR_WARNING
)
set
(
PEDANTIC_COMPILE_FLAGS
${
PEDANTIC_COMPILE_FLAGS
}
...
...
@@ -244,7 +246,8 @@ if (FMT_INSTALL)
install
(
TARGETS
${
INSTALL_TARGETS
}
EXPORT
${
targets_export_name
}
DESTINATION
${
FMT_LIB_DIR
}
)
install
(
FILES $<TARGET_PDB_FILE:
${
INSTALL_TARGETS
}
> DESTINATION
${
FMT_LIB_DIR
}
OPTIONAL
)
install
(
FILES $<TARGET_PDB_FILE:
${
INSTALL_TARGETS
}
>
DESTINATION
${
FMT_LIB_DIR
}
OPTIONAL
)
install
(
FILES
${
FMT_HEADERS
}
DESTINATION
${
FMT_INC_DIR
}
)
install
(
FILES
"
${
pkgconfig
}
"
DESTINATION
"
${
FMT_PKGCONFIG_DIR
}
"
)
endif
()
...
...
support/cmake/cxx14.cmake
View file @
8bc0adb9
...
...
@@ -50,6 +50,7 @@ set(CMAKE_REQUIRED_FLAGS ${CXX_STANDARD_FLAG})
# Check if variadic templates are working and not affected by GCC bug 39653:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39653
# Can be removed once gcc 4.4 support is dropped.
check_cxx_source_compiles
(
"
template <class T, class ...Types>
struct S { typedef typename S<Types...>::type type; };
...
...
@@ -58,33 +59,6 @@ if (NOT SUPPORTS_VARIADIC_TEMPLATES)
set
(
SUPPORTS_VARIADIC_TEMPLATES OFF
)
endif
()
# Check if initializer lists are supported.
check_cxx_source_compiles
(
"
#include <initializer_list>
int main() {}"
SUPPORTS_INITIALIZER_LIST
)
if
(
NOT SUPPORTS_INITIALIZER_LIST
)
set
(
SUPPORTS_INITIALIZER_LIST OFF
)
endif
()
# Check if enum bases are available
check_cxx_source_compiles
(
"
enum C : char {A};
int main() {}"
SUPPORTS_ENUM_BASE
)
if
(
NOT SUPPORTS_ENUM_BASE
)
set
(
SUPPORTS_ENUM_BASE OFF
)
endif
()
# Check if type traits are available
check_cxx_source_compiles
(
"
#include <type_traits>
class C { void operator=(const C&); };
int main() { static_assert(!std::is_copy_assignable<C>::value,
\"\"
); }"
SUPPORTS_TYPE_TRAITS
)
if
(
NOT SUPPORTS_TYPE_TRAITS
)
set
(
SUPPORTS_TYPE_TRAITS OFF
)
endif
()
# Check if user-defined literals are available
check_cxx_source_compiles
(
"
void operator
\"\"
_udl(long double);
...
...
support/cmake/run-cmake.bat
deleted
100644 → 0
View file @
1763d0e7
@echo
on
rem This scripts configures build environment and runs CMake.
rem Use it instead of running CMake directly when building with
rem the Microsoft SDK toolchain rather than Visual Studio.
rem It is used in the same way as cmake, for example:
rem
rem run-cmake -G "Visual Studio 10 Win64" .
for
/F
"delims="
%%i
IN
(
'cmake "-DPRINT_PATH=1" -P
%~dp0
/FindSetEnv.cmake'
)
DO
set
setenv
=
%%i
if
NOT
"
%setenv%
"
==
""
call
"
%setenv%
"
cmake
%
*
test/CMakeLists.txt
View file @
8bc0adb9
...
...
@@ -17,7 +17,7 @@ else ()
target_compile_definitions
(
gmock PUBLIC GTEST_HAS_PTHREAD=0
)
endif
()
if
(
NOT SUPPORTS_VARIADIC_TEMPLATES
OR NOT SUPPORTS_INITIALIZER_LIST
)
if
(
NOT SUPPORTS_VARIADIC_TEMPLATES
)
target_compile_definitions
(
gmock PUBLIC GTEST_LANG_CXX11=0
)
endif
()
...
...
@@ -74,9 +74,6 @@ function(add_fmt_test name)
target_link_libraries
(
${
name
}
test-main
)
# Define if certain C++ features can be used.
target_compile_definitions
(
${
name
}
PRIVATE
FMT_USE_TYPE_TRAITS=$<BOOL:
${
SUPPORTS_TYPE_TRAITS
}
>
FMT_USE_ENUM_BASE=$<BOOL:
${
SUPPORTS_ENUM_BASE
}
>
)
if
(
FMT_PEDANTIC
)
target_compile_options
(
${
name
}
PRIVATE
${
PEDANTIC_COMPILE_FLAGS
}
)
endif
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment