Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
da1d9bac
Commit
da1d9bac
authored
Nov 26, 2012
by
Brad King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test find_path multiarch support (
#13742
)
parent
b96f6fc2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
0 deletions
+32
-0
Tests/CMakeOnly/CMakeLists.txt
Tests/CMakeOnly/CMakeLists.txt
+1
-0
Tests/CMakeOnly/find_path/CMakeLists.txt
Tests/CMakeOnly/find_path/CMakeLists.txt
+31
-0
Tests/CMakeOnly/find_path/include/arch/test1arch.h
Tests/CMakeOnly/find_path/include/arch/test1arch.h
+0
-0
Tests/CMakeOnly/find_path/include/test1.h
Tests/CMakeOnly/find_path/include/test1.h
+0
-0
No files found.
Tests/CMakeOnly/CMakeLists.txt
View file @
da1d9bac
...
...
@@ -32,6 +32,7 @@ add_CMakeOnly_test(SelectLibraryConfigurations)
add_CMakeOnly_test
(
TargetScope
)
add_CMakeOnly_test
(
find_library
)
add_CMakeOnly_test
(
find_path
)
add_test
(
CMakeOnly.ProjectInclude
${
CMAKE_CMAKE_COMMAND
}
-DTEST=ProjectInclude
...
...
Tests/CMakeOnly/find_path/CMakeLists.txt
0 → 100644
View file @
da1d9bac
cmake_minimum_required
(
VERSION 2.8
)
project
(
FindPathTest NONE
)
set
(
CMAKE_FIND_DEBUG_MODE 1
)
macro
(
test_find_path expected
)
unset
(
HDR CACHE
)
find_path
(
HDR
${
ARGN
}
NO_CMAKE_ENVIRONMENT_PATH
NO_SYSTEM_ENVIRONMENT_PATH
)
if
(
HDR
)
# Convert to relative path for comparison to expected location.
file
(
RELATIVE_PATH REL_HDR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
HDR
}
"
)
# Check and report failure.
if
(
NOT
"
${
REL_HDR
}
"
STREQUAL
"
${
expected
}
"
)
message
(
SEND_ERROR
"Header
${
expected
}
found as [
${
REL_HDR
}
]"
)
elseif
(
CMAKE_FIND_DEBUG_MODE
)
message
(
STATUS
"Header
${
expected
}
found as [
${
REL_HDR
}
]"
)
endif
()
else
()
message
(
SEND_ERROR
"Header
${
expected
}
NOT FOUND"
)
endif
()
endmacro
()
set
(
CMAKE_SYSTEM_PREFIX_PATH
${
CMAKE_CURRENT_SOURCE_DIR
}
)
set
(
CMAKE_LIBRARY_ARCHITECTURE arch
)
test_find_path
(
include NAMES test1.h
)
test_find_path
(
include/arch NAMES test1arch.h
)
Tests/CMakeOnly/find_path/include/arch/test1arch.h
0 → 100644
View file @
da1d9bac
Tests/CMakeOnly/find_path/include/test1.h
0 → 100644
View file @
da1d9bac
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