Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Lasse Hinrichsen-Bischoff
dune-common
Commits
3cb196db
Commit
3cb196db
authored
11 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[CMake][release] White space changes.
Replace tabs by spaces.
parent
58d2e446
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/modules/DuneMacros.cmake
+50
-50
50 additions, 50 deletions
cmake/modules/DuneMacros.cmake
with
50 additions
and
50 deletions
cmake/modules/DuneMacros.cmake
+
50
−
50
View file @
3cb196db
...
...
@@ -89,9 +89,9 @@ endmacro(dune_module_to_uppercase _upper _module)
macro
(
find_dune_package module
)
if
(
NOT
${
module
}
_FOUND
)
if
(
NOT
(
${
module
}
_DIR OR
${
module
}
_ROOT OR
"
${
CMAKE_PREFIX_PATH
}
"
MATCHES
".*
${
module
}
.*"
))
"
${
CMAKE_PREFIX_PATH
}
"
MATCHES
".*
${
module
}
.*"
))
string
(
REPLACE
${
ProjectName
}
${
module
}
${
module
}
_DIR
${
PROJECT_BINARY_DIR
}
)
${
PROJECT_BINARY_DIR
}
)
endif
()
find_package
(
${
ARGV
}
NO_CMAKE_PACKAGE_REGISTRY
)
endif
(
NOT
${
module
}
_FOUND
)
...
...
@@ -101,41 +101,41 @@ macro(find_dune_package module)
unset
(
${
module
}
_FOUND
)
# use pkg-config
find_package
(
PkgConfig REQUIRED
)
pkg_check_modules
(
${
module
}
${
module
}
)
pkg_check_modules
(
${
module
}
${
module
}
)
if
(
NOT
${
module
}
_FOUND
)
message
(
FATAL_ERROR
"Could not find module
${
module
}
."
)
message
(
FATAL_ERROR
"Could not find module
${
module
}
."
)
endif
()
# compute the path to the libraries
if
(
${
module
}
_LIBRARIES
)
unset
(
_module_lib
)
foreach
(
lib
${${
module
}
_LIBRARIES
}
)
foreach
(
libdir
${${
module
}
_LIBRARY_DIRS
}
)
if
(
EXISTS
${
libdir
}
/lib
${
lib
}
.a
)
set
(
_module_lib
${
libdir
}
/lib
${
lib
}
.a
)
set
(
_module_lib_static
"STATIC"
)
endif
()
if
(
EXISTS
${
libdir
}
/lib
${
lib
}
.so
)
set
(
_module_lib
${
libdir
}
/lib
${
lib
}
.so
)
set
(
_module_lib_static
""
)
endif
()
if
(
_module_lib
)
#import library
add_library
(
${
lib
}
${
_module_lib_static
}
IMPORTED
)
set_property
(
TARGET
${
lib
}
APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG
)
set_target_properties
(
${
lib
}
PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_NOCONFIG
"CXX"
IMPORTED_LOCATION_NOCONFIG
"
${
_module_lib
}
"
)
break
()
endif
(
_module_lib
)
endforeach
(
libdir
${${
module
}
_LIBRARY_DIRS
}
)
foreach
(
libdir
${${
module
}
_LIBRARY_DIRS
}
)
if
(
EXISTS
${
libdir
}
/lib
${
lib
}
.a
)
set
(
_module_lib
${
libdir
}
/lib
${
lib
}
.a
)
set
(
_module_lib_static
"STATIC"
)
endif
()
if
(
EXISTS
${
libdir
}
/lib
${
lib
}
.so
)
set
(
_module_lib
${
libdir
}
/lib
${
lib
}
.so
)
set
(
_module_lib_static
""
)
endif
()
if
(
_module_lib
)
#import library
add_library
(
${
lib
}
${
_module_lib_static
}
IMPORTED
)
set_property
(
TARGET
${
lib
}
APPEND PROPERTY IMPORTED_CONFIGURATIONS NOCONFIG
)
set_target_properties
(
${
lib
}
PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_NOCONFIG
"CXX"
IMPORTED_LOCATION_NOCONFIG
"
${
_module_lib
}
"
)
break
()
endif
(
_module_lib
)
endforeach
(
libdir
${${
module
}
_LIBRARY_DIRS
}
)
endforeach
(
lib
${${
module
}
_LIBRARIES
}
)
endif
(
${
module
}
_LIBRARIES
)
if
(
NOT
${
module
}
_MODULE_PATH
)
if
(
${
module
}
_INCLUDE_DIRS
)
list
(
GET
${
module
}
_INCLUDE_DIRS 0 _dir
)
if
(
EXISTS
${
_dir
}
/../share/dune/cmake/modules
)
set
(
${
module
}
_MODULE_PATH
${
_dir
}
/../share/dune/cmake/modules
)
endif
(
EXISTS
${
_dir
}
/../share/dune/cmake/modules
)
list
(
GET
${
module
}
_INCLUDE_DIRS 0 _dir
)
if
(
EXISTS
${
_dir
}
/../share/dune/cmake/modules
)
set
(
${
module
}
_MODULE_PATH
${
_dir
}
/../share/dune/cmake/modules
)
endif
(
EXISTS
${
_dir
}
/../share/dune/cmake/modules
)
endif
(
${
module
}
_INCLUDE_DIRS
)
endif
(
NOT
${
module
}
_MODULE_PATH
)
unset
(
${
module
}
_FAKE_CMAKE_PKGCONFIG
)
...
...
@@ -144,16 +144,16 @@ macro(find_dune_package module)
# parse other module's dune.module file to generate variables for config.h
unset
(
${
module
}
_dune_module
)
foreach
(
_dune_module_file
${${
module
}
_PREFIX
}
/dune.module
${${
module
}
_PREFIX
}
/lib/dunecontrol/
${
module
}
/dune.module
)
${${
module
}
_PREFIX
}
/lib/dunecontrol/
${
module
}
/dune.module
)
if
(
EXISTS
${
_dune_module_file
}
)
get_filename_component
(
_dune_module_file_path
${
_dune_module_file
}
PATH
)
dune_module_information
(
${
_dune_module_file_path
}
)
# QUIET)
set
(
${
module
}
_dune_module 1
)
get_filename_component
(
_dune_module_file_path
${
_dune_module_file
}
PATH
)
dune_module_information
(
${
_dune_module_file_path
}
)
# QUIET)
set
(
${
module
}
_dune_module 1
)
endif
(
EXISTS
${
_dune_module_file
}
)
endforeach
()
if
(
NOT
${
module
}
_dune_module
)
message
(
FATAL_ERROR
"Could not find dune.module file for module
${
module
}
"
"in
${${
module
}
_PREFIX
}
,
${${
module
}
_PREFIX
}
/lib/dunecontrol/
${
module
}
/"
)
"in
${${
module
}
_PREFIX
}
,
${${
module
}
_PREFIX
}
/lib/dunecontrol/
${
module
}
/"
)
endif
(
NOT
${
module
}
_dune_module
)
endif
(
${
module
}
_FOUND
)
endmacro
(
find_dune_package module
)
...
...
@@ -361,29 +361,29 @@ macro(dune_create_dependency_tree)
list
(
APPEND NEW_ALL_DEPS
${
_mod
}
)
math
(
EXPR length
"
${
length
}
-1"
)
if
(
length GREATER 0
)
foreach
(
i RANGE
${
length
}
0 -1
)
list
(
GET ALL_DEPENDENCIES
${
i
}
_mod
)
if
(
NOT
${
_mod
}
_cmake_path_processed
)
set
(
${
_mod
}
_cmake_path_processed 1
)
if
(
${
_mod
}
_MODULE_PATH
)
list
(
INSERT _my_path 0
${${
_mod
}
_MODULE_PATH
}
)
endif
(
${
_mod
}
_MODULE_PATH
)
list
(
APPEND NEW_ALL_DEPS
${
_mod
}
)
endif
(
NOT
${
_mod
}
_cmake_path_processed
)
endforeach
(
i RANGE
${
length
}
0 -1
)
foreach
(
i RANGE
${
length
}
0 -1
)
list
(
GET ALL_DEPENDENCIES
${
i
}
_mod
)
if
(
NOT
${
_mod
}
_cmake_path_processed
)
set
(
${
_mod
}
_cmake_path_processed 1
)
if
(
${
_mod
}
_MODULE_PATH
)
list
(
INSERT _my_path 0
${${
_mod
}
_MODULE_PATH
}
)
endif
(
${
_mod
}
_MODULE_PATH
)
list
(
APPEND NEW_ALL_DEPS
${
_mod
}
)
endif
(
NOT
${
_mod
}
_cmake_path_processed
)
endforeach
(
i RANGE
${
length
}
0 -1
)
endif
(
length GREATER 0
)
list
(
LENGTH CMAKE_MODULE_PATH length
)
math
(
EXPR length
"
${
length
}
-1"
)
if
(
start EQUAL -1
)
list
(
APPEND CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake/modules
${
_my_path
}
)
list
(
APPEND CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/cmake/modules
${
_my_path
}
)
else
(
start EQUAL -1
)
if
(
start EQUAL
${
length
}
)
list
(
APPEND CMAKE_MODULE_PATH
${
_my_path
}
)
else
(
start EQUAL
${
length
}
)
if
(
_my_path
)
list
(
INSERT CMAKE_MODULE_PATH
${
start
}
${
_my_path
}
)
endif
(
_my_path
)
endif
(
start EQUAL
${
length
}
)
if
(
start EQUAL
${
length
}
)
list
(
APPEND CMAKE_MODULE_PATH
${
_my_path
}
)
else
(
start EQUAL
${
length
}
)
if
(
_my_path
)
list
(
INSERT CMAKE_MODULE_PATH
${
start
}
${
_my_path
}
)
endif
(
_my_path
)
endif
(
start EQUAL
${
length
}
)
endif
(
start EQUAL -1
)
endif
(
length GREATER 0
)
set
(
ALL_DEPENDENCIES
${
NEW_ALL_DEPS
}
)
...
...
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