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
28831637
Commit
28831637
authored
Dec 09, 2013
by
Victor Zverovich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test compilation with default flags.
parent
8ca31c84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
CMakeLists.txt
CMakeLists.txt
+11
-3
No files found.
CMakeLists.txt
View file @
28831637
...
@@ -12,15 +12,17 @@ project(FORMAT)
...
@@ -12,15 +12,17 @@ project(FORMAT)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
check_cxx_compiler_flag
(
-std=c++11 HAVE_STD_CPP11_FLAG
)
check_cxx_compiler_flag
(
-std=c++11 HAVE_STD_CPP11_FLAG
)
if
(
HAVE_STD_CPP11_FLAG
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-std=c++11"
)
endif
()
add_library
(
format format.cc
)
add_library
(
format format.cc
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set_target_properties
(
format PROPERTIES COMPILE_FLAGS
set_target_properties
(
format PROPERTIES COMPILE_FLAGS
"-Wall -Wextra -pedantic"
)
"-Wall -Wextra -pedantic"
)
endif
()
endif
()
if
(
HAVE_STD_CPP11_FLAG
)
set_target_properties
(
format PROPERTIES COMPILE_FLAGS
"-std=c++11"
)
# Test compilation with default flags.
add_library
(
testformat format.cc
)
endif
()
add_subdirectory
(
doc
)
add_subdirectory
(
doc
)
...
@@ -47,6 +49,9 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
...
@@ -47,6 +49,9 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gtest/CMakeLists.txt)
"-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros"
)
"-Wall -Wextra -pedantic -Wno-long-long -Wno-variadic-macros"
)
endif
()
endif
()
add_test
(
format_test format_test
)
add_test
(
format_test format_test
)
if
(
HAVE_STD_CPP11_FLAG
)
set_target_properties
(
format_test PROPERTIES COMPILE_FLAGS
"-std=c++11"
)
endif
()
endif
()
endif
()
find_package
(
Boost
)
find_package
(
Boost
)
...
@@ -61,6 +66,9 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/format-benchmark/tinyformat_test.cpp)
...
@@ -61,6 +66,9 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/format-benchmark/tinyformat_test.cpp)
target_link_libraries
(
tinyformat_speed_test format
)
target_link_libraries
(
tinyformat_speed_test format
)
set_target_properties
(
tinyformat_speed_test PROPERTIES COMPILE_DEFINITIONS
set_target_properties
(
tinyformat_speed_test PROPERTIES COMPILE_DEFINITIONS
"SPEED_TEST;HAVE_FORMAT;_SCL_SECURE_NO_WARNINGS"
)
"SPEED_TEST;HAVE_FORMAT;_SCL_SECURE_NO_WARNINGS"
)
if
(
HAVE_STD_CPP11_FLAG
)
set_target_properties
(
tinyformat_speed_test PROPERTIES COMPILE_FLAGS
"-std=c++11"
)
endif
()
add_custom_target
(
speed_test
add_custom_target
(
speed_test
COMMAND @echo running speed tests...
COMMAND @echo running speed tests...
...
...
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