Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Peter Stroia-Williams
CMake
Commits
d525754e
Commit
d525754e
authored
Dec 26, 2016
by
Gregor Jasny
Committed by
Brad King
Jan 26, 2017
Browse files
Xcode: Refactor RunCMake.Framework test to prepare for static frameworks
parent
45405f00
Changes
2
Hide whitespace changes
Inline
Side-by-side
Tests/RunCMake/CMakeLists.txt
View file @
d525754e
...
...
@@ -276,8 +276,7 @@ if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 3)
add_RunCMake_test
(
XcodeProject -DXCODE_VERSION=
${
XCODE_VERSION
}
)
endif
()
if
(
NOT XCODE
AND CMAKE_C_COMPILER_ID STREQUAL
"AppleClang"
if
(
CMAKE_C_COMPILER_ID STREQUAL
"AppleClang"
AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0
)
add_RunCMake_test
(
Framework
)
endif
()
...
...
Tests/RunCMake/Framework/RunCMakeTest.cmake
View file @
d525754e
include
(
RunCMake
)
# iOS
set
(
RunCMake_TEST_BINARY_DIR
${
RunCMake_BINARY_DIR
}
/iOSFrameworkLayout-build
)
set
(
RunCMake_TEST_NO_CLEAN 1
)
set
(
RunCMake_TEST_OPTIONS
"-DCMAKE_TOOLCHAIN_FILE=
${
RunCMake_SOURCE_DIR
}
/ios.cmake"
)
file
(
REMOVE_RECURSE
"
${
RunCMake_TEST_BINARY_DIR
}
"
)
file
(
MAKE_DIRECTORY
"
${
RunCMake_TEST_BINARY_DIR
}
"
)
run_cmake
(
FrameworkLayout
)
run_cmake_command
(
iOSFrameworkLayout-build
${
CMAKE_COMMAND
}
--build .
)
unset
(
RunCMake_TEST_BINARY_DIR
)
unset
(
RunCMake_TEST_NO_CLEAN
)
unset
(
RunCMake_TEST_OPTIONS
)
# OSX
set
(
RunCMake_TEST_BINARY_DIR
${
RunCMake_BINARY_DIR
}
/OSXFrameworkLayout-build
)
set
(
RunCMake_TEST_NO_CLEAN 1
)
set
(
RunCMake_TEST_OPTIONS
"-DCMAKE_TOOLCHAIN_FILE=
${
RunCMake_SOURCE_DIR
}
/osx.cmake"
)
file
(
REMOVE_RECURSE
"
${
RunCMake_TEST_BINARY_DIR
}
"
)
file
(
MAKE_DIRECTORY
"
${
RunCMake_TEST_BINARY_DIR
}
"
)
run_cmake
(
FrameworkLayout
)
run_cmake_command
(
OSXFrameworkLayout-build
${
CMAKE_COMMAND
}
--build .
)
unset
(
RunCMake_TEST_BINARY_DIR
)
unset
(
RunCMake_TEST_NO_CLEAN
)
unset
(
RunCMake_TEST_OPTIONS
)
function
(
framework_layout_test Name Toolchain
)
set
(
RunCMake_TEST_BINARY_DIR
${
RunCMake_BINARY_DIR
}
/
${
Toolchain
}
FrameworkLayout-build
)
set
(
RunCMake_TEST_NO_CLEAN 1
)
set
(
RunCMake_TEST_OPTIONS
"-DCMAKE_TOOLCHAIN_FILE=
${
RunCMake_SOURCE_DIR
}
/
${
Toolchain
}
.cmake"
)
file
(
REMOVE_RECURSE
"
${
RunCMake_TEST_BINARY_DIR
}
"
)
file
(
MAKE_DIRECTORY
"
${
RunCMake_TEST_BINARY_DIR
}
"
)
run_cmake
(
FrameworkLayout
)
run_cmake_command
(
${
Name
}
${
CMAKE_COMMAND
}
--build .
)
endfunction
()
# build check cannot cope with multi-configuration generators directory layout
if
(
NOT RunCMake_GENERATOR STREQUAL
"Xcode"
)
framework_layout_test
(
iOSFrameworkLayout-build ios
)
framework_layout_test
(
OSXFrameworkLayout-build osx
)
endif
()
Write
Preview
Supports
Markdown
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