Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
3ea39444
Commit
3ea39444
authored
5 years ago
by
Antoine Regimbeau
Browse files
Options
Downloads
Patches
Plain Diff
Future work, improve the way otb check for flags and various compilation stuff
parent
2b4d56e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMake/OTBSetStandardCompilerFlags.cmake
+8
-0
8 additions, 0 deletions
CMake/OTBSetStandardCompilerFlags.cmake
CMake/OTB_CheckCCompilerFlag.cmake
+2
-0
2 additions, 0 deletions
CMake/OTB_CheckCCompilerFlag.cmake
CMake/OTB_CheckCXXCompilerFlag.cmake
+2
-0
2 additions, 0 deletions
CMake/OTB_CheckCXXCompilerFlag.cmake
with
12 additions
and
0 deletions
CMake/OTBSetStandardCompilerFlags.cmake
+
8
−
0
View file @
3ea39444
...
...
@@ -57,6 +57,8 @@ function(check_c_compiler_warning_flags c_flag_var)
set
(
local_c_flags
""
)
set
(
flag_list
"
${
ARGN
}
"
)
foreach
(
flag IN LISTS flag_list
)
# This could be replaced by a simple check_c_compiler_flag(<flag> <var>)
# https://cmake.org/cmake/help/v3.10/module/CheckCCompilerFlag.html?highlight=flags
OTB_CHECK_C_COMPILER_FLAG
(
${
flag
}
C_HAS_WARNING
${
flag
}
)
if
(
${
C_HAS_WARNING
${
flag
}}
)
set
(
local_c_flags
"
${
local_c_flags
}
${
flag
}
"
)
...
...
@@ -70,6 +72,8 @@ function(check_cxx_compiler_warning_flags cxx_flag_var)
set
(
local_cxx_flags
""
)
set
(
flag_list
"
${
ARGN
}
"
)
foreach
(
flag IN LISTS flag_list
)
# This could be replaced by a simple check_cxx_compiler_flag(<flag> <var>)
# https://cmake.org/cmake/help/v3.10/module/CheckCXXCompilerFlag.html?highlight=checkcxxcompilerflag
OTB_CHECK_CXX_COMPILER_FLAG
(
${
flag
}
CXX_HAS_WARNING
${
flag
}
)
if
(
${
CXX_HAS_WARNING
${
flag
}}
)
set
(
local_cxx_flags
"
${
local_cxx_flags
}
${
flag
}
"
)
...
...
@@ -215,6 +219,8 @@ macro(check_compiler_platform_flags)
# BUILD_SHARED_LIBS works as it would on other systems
if
(
NOT CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
)
if
(
BUILD_SHARED_LIBS
)
# TODO:
# OTB_LIBRARY_BUILD_TYPE is never used!
set
(
OTB_LIBRARY_BUILD_TYPE
"SHARED"
)
else
()
set
(
OTB_LIBRARY_BUILD_TYPE
"STATIC"
)
...
...
@@ -295,6 +301,8 @@ macro(check_compiler_platform_flags)
if
(
OTB_USE_SSE_FLAGS
)
message
(
STATUS
"SIMD extensions requested with OTB_USE_SSE_FLAGS=
${
OTB_USE_SSE_FLAGS
}
"
)
include
(
OTBCheckSSEFeatures
)
# This should be deleted as it can be done with cmake_host_system_information
# https://cmake.org/cmake/help/v3.10/command/cmake_host_system_information.html?highlight=sse
check_sse_features
(
OTB_SSE_FLAGS
)
if
(
OTB_SSE_FLAGS
)
message
(
STATUS
"Adding '
${
OTB_SSE_FLAGS
}
' to OTB_REQUIRED_CXX_FLAGS"
)
...
...
This diff is collapsed.
Click to expand it.
CMake/OTB_CheckCCompilerFlag.cmake
+
2
−
0
View file @
3ea39444
...
...
@@ -22,6 +22,8 @@
include
(
CheckCSourceCompiles
)
# This could be replaced by a simple check_c_compiler_flag(<flag> <var>)
# https://cmake.org/cmake/help/v3.10/module/CheckCCompilerFlag.html?highlight=flags
macro
(
OTB_CHECK_C_COMPILER_FLAG _FLAG _RESULT
)
set
(
SAFE_CMAKE_REQUIRED_DEFINITIONS
"
${
CMAKE_REQUIRED_DEFINITIONS
}
"
)
set
(
CMAKE_REQUIRED_DEFINITIONS
"
${
_FLAG
}
"
)
...
...
This diff is collapsed.
Click to expand it.
CMake/OTB_CheckCXXCompilerFlag.cmake
+
2
−
0
View file @
3ea39444
...
...
@@ -42,6 +42,8 @@
include
(
CheckCXXSourceCompiles
)
# This could be replaced by a simple check_cxx_compiler_flag(<flag> <var>)
# https://cmake.org/cmake/help/v3.10/module/CheckCXXCompilerFlag.html?highlight=checkcxxcompilerflag
macro
(
OTB_CHECK_CXX_COMPILER_FLAG _FLAG _RESULT
)
set
(
SAFE_CMAKE_REQUIRED_DEFINITIONS
"
${
CMAKE_REQUIRED_DEFINITIONS
}
"
)
set
(
CMAKE_REQUIRED_DEFINITIONS
"
${
_FLAG
}
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment