Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chameleon
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
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
Chameleon
Commits
656001b6
Commit
656001b6
authored
10 years ago
by
PRUVOST Florent
Browse files
Options
Downloads
Patches
Plain Diff
add a function to test in FxT cmake Find
parent
d92b4790
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/morse/find/FindFXT.cmake
+32
-3
32 additions, 3 deletions
cmake_modules/morse/find/FindFXT.cmake
with
32 additions
and
3 deletions
cmake_modules/morse/find/FindFXT.cmake
+
32
−
3
View file @
656001b6
...
...
@@ -41,6 +41,9 @@
# (To distribute this file outside of Morse, substitute the full
# License text for the above reference.)
if
(
NOT FXT_FOUND
)
set
(
FXT_DIR
""
CACHE PATH
"Root directory of FXT library"
)
endif
()
# Optionally use pkg-config to detect include/library dirs (if pkg-config is available)
# -------------------------------------------------------------------------------------
...
...
@@ -197,6 +200,35 @@ if(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
list
(
REMOVE_DUPLICATES FXT_LIBRARY_DIRS
)
endif
()
if
(
FXT_LIBRARIES
)
# check a function to validate the find
set
(
CMAKE_REQUIRED_INCLUDES
"
${
FXT_INCLUDE_DIRS
}
"
)
set
(
CMAKE_REQUIRED_LIBRARIES
"
${
FXT_LIBRARIES
}
"
)
set
(
CMAKE_REQUIRED_FLAGS
"-L
${
FXT_LIBRARY_DIRS
}
"
)
unset
(
FXT_WORKS CACHE
)
include
(
CheckFunctionExists
)
check_function_exists
(
fut_keychange FXT_WORKS
)
mark_as_advanced
(
FXT_WORKS
)
if
(
NOT FXT_WORKS
)
if
(
FXT_FIND_REQUIRED
)
if
(
NOT FXT_FIND_QUIETLY
)
message
(
STATUS
"Looking for fxt : test of fut_keychange with fxt library fails"
)
message
(
STATUS
"FXT_LIBRARIES:
${
CMAKE_REQUIRED_LIBRARIES
}
"
)
message
(
STATUS
"FXT_LIBRARY_DIRS:
${
CMAKE_REQUIRED_FLAGS
}
"
)
message
(
STATUS
"FXT_INCLUDE_DIRS:
${
CMAKE_REQUIRED_INCLUDES
}
"
)
message
(
STATUS
"Check in CMakeFiles/CMakeError.log to figure out why it fails"
)
message
(
STATUS
"Looking for fxt : set FXT_LIBRARIES to NOTFOUND"
)
endif
()
set
(
FXT_LIBRARIES
"FXT_LIBRARIES-NOTFOUND"
)
endif
()
endif
()
set
(
CMAKE_REQUIRED_INCLUDES
)
set
(
CMAKE_REQUIRED_FLAGS
)
set
(
CMAKE_REQUIRED_LIBRARIES
)
endif
(
FXT_LIBRARIES
)
endif
(
NOT FXT_FOUND OR NOT FXT_LIBRARIES
)
...
...
@@ -205,6 +237,3 @@ endif(NOT FXT_FOUND OR NOT FXT_LIBRARIES)
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
FXT DEFAULT_MSG
FXT_LIBRARIES
)
#
# TODO: Add possibility to check for specific functions in the library
#
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