Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
58fd34c0
Commit
58fd34c0
authored
Jun 30, 2019
by
Tomaz Canabrava
Committed by
Daniel Agar
Jun 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract cmake logic to it's own file
parent
72fe1186
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
34 deletions
+32
-34
CMakeLists.txt
CMakeLists.txt
+2
-34
CompileOptions.cmake
cmake/CompileOptions.cmake
+30
-0
No files found.
CMakeLists.txt
View file @
58fd34c0
...
...
@@ -127,40 +127,8 @@ if(NOT QT_MKSPEC MATCHES "winrt")
)
endif
()
if
(
${
CMAKE_BUILD_TYPE
}
MATCHES
"Debug"
)
include
(
CTest
)
enable_testing
()
add_definitions
(
-DUNITTEST_BUILD
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
# clang and AppleClang
add_compile_options
(
-Wall
-Wextra
-Wno-address-of-packed-member
# ignore for mavlink
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
# GCC
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9
)
add_compile_options
(
-fdiagnostics-color=always
)
endif
()
add_compile_options
(
-Wall
-Wextra
)
elseif
(
WIN32
)
add_definitions
(
-D_USE_MATH_DEFINES
)
add_compile_options
(
/wd4244
# warning C4244: '=': conversion from 'double' to 'float', possible loss of data
)
endif
()
# Sets the default flags for compilation and linking.
include
(
CompileOptions
)
# TODO: get qtquick compiler working
#qtquick_compiler_add_resources(QGC_RESOURCES ${QGC_RESOURCES}
...
...
cmake/CompileOptions.cmake
0 → 100644
View file @
58fd34c0
if
(
${
CMAKE_BUILD_TYPE
}
MATCHES
"Debug"
)
include
(
CTest
)
enable_testing
()
add_definitions
(
-DUNITTEST_BUILD
)
endif
()
if
(
CMAKE_CXX_COMPILER_ID MATCHES
"Clang"
)
# clang and AppleClang
add_compile_options
(
-Wall
-Wextra
-Wno-address-of-packed-member
# ignore for mavlink
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
# GCC
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9
)
add_compile_options
(
-fdiagnostics-color=always
)
endif
()
add_compile_options
(
-Wall
-Wextra
)
elseif
(
WIN32
)
add_definitions
(
-D_USE_MATH_DEFINES
)
add_compile_options
(
/wd4244
# warning C4244: '=': conversion from 'double' to 'float', possible loss of data
)
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