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
ae951af8
Commit
ae951af8
authored
Nov 30, 2012
by
Brad King
Committed by
Kitware Robot
Nov 30, 2012
Browse files
Options
Browse Files
Download
Plain Diff
Merge topic 'fix-cpack-tests'
587b7b6f
Tests: Use the right path to CPack value for running CPack tests
parents
d8c0a40d
587b7b6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
Tests/CMakeLists.txt
Tests/CMakeLists.txt
+0
-3
Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
+5
-6
Tests/CPackTestAllGenerators/RunCPack.cmake
Tests/CPackTestAllGenerators/RunCPack.cmake
+2
-6
No files found.
Tests/CMakeLists.txt
View file @
ae951af8
...
...
@@ -744,7 +744,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
# ACTIVE_CPACK_GENERATORS variable
# now contains the list of 'active generators'
set
(
CPackComponentsForAll_EXTRA_OPTIONS
)
set
(
CPackRun_CPackCommand
"-DCPackCommand=
${
CMAKE_CPACK_COMMAND
}
"
)
# set up list of CPack generators
list
(
APPEND GENLST
"ZIP"
)
if
(
APPLE
)
...
...
@@ -784,7 +783,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--graphviz=CPackComponentsForAll.dot
--test-command
${
CMAKE_CMAKE_COMMAND
}
"-DCPackComponentsForAll_BINARY_DIR:PATH=
${
CMake_BINARY_DIR
}
/Tests/CPackComponentsForAll/build
${
CPackGen
}
-
${
CPackComponentWay
}
"
"
${
CPackRun_CPackCommand
}
"
"
${
CPackRun_CPackGen
}
"
"
${
CPackRun_CPackComponentWay
}
"
-P
"
${
CMake_SOURCE_DIR
}
/Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake"
)
...
...
@@ -819,7 +817,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--test-command
${
CMAKE_CMAKE_COMMAND
}
-D dir=
${
CMake_BINARY_DIR
}
/Tests/CPackTestAllGenerators
-D cpack=
${
CMAKE_CPACK_COMMAND
}
-P
${
CMake_SOURCE_DIR
}
/Tests/CPackTestAllGenerators/RunCPack.cmake
)
list
(
APPEND TEST_BUILD_DIRS
"
${
CMake_BINARY_DIR
}
/Tests/CPackTestAllGenerators"
)
...
...
Tests/CPackComponentsForAll/RunCPackVerifyResult.cmake
View file @
ae951af8
...
...
@@ -9,11 +9,10 @@ endif()
if
(
NOT CPackGen
)
message
(
FATAL_ERROR
"CPackGen not set"
)
endif
()
get_filename_component
(
CPACK_LOCATION
${
CMAKE_COMMAND
}
PATH
)
set
(
CPackCommand
"
${
CPACK_LOCATION
}
/cpack"
)
message
(
"cpack =
${
CPackCommand
}
"
)
if
(
NOT CPackCommand
)
message
(
FATAL_ERROR
"CPackCommand not set"
)
message
(
"CMAKE_CPACK_COMMAND =
${
CMAKE_CPACK_COMMAND
}
"
)
if
(
NOT CMAKE_CPACK_COMMAND
)
message
(
FATAL_ERROR
"CMAKE_CPACK_COMMAND not set"
)
endif
()
if
(
NOT CPackComponentWay
)
...
...
@@ -92,7 +91,7 @@ endif()
message
(
"config_args =
${
config_args
}
"
)
message
(
"config_verbose =
${
config_verbose
}
"
)
execute_process
(
COMMAND
${
C
PackCommand
}
${
config_verbose
}
-G
${
CPackGen
}
${
config_args
}
execute_process
(
COMMAND
${
C
MAKE_CPACK_COMMAND
}
${
config_verbose
}
-G
${
CPackGen
}
${
config_args
}
RESULT_VARIABLE CPack_result
OUTPUT_VARIABLE CPack_output
ERROR_VARIABLE CPack_error
...
...
Tests/CPackTestAllGenerators/RunCPack.cmake
View file @
ae951af8
if
(
NOT DEFINED cpack
)
message
(
FATAL_ERROR
"cpack not defined"
)
endif
()
if
(
NOT DEFINED dir
)
message
(
FATAL_ERROR
"dir not defined"
)
endif
()
# Analyze 'cpack --help' output for list of available generators:
#
execute_process
(
COMMAND
${
cpack
}
--help
execute_process
(
COMMAND
${
CMAKE_CPACK_COMMAND
}
--help
RESULT_VARIABLE result
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr
...
...
@@ -43,7 +39,7 @@ message(STATUS "CPack generators='${generators}'")
foreach
(
g
${
generators
}
)
message
(
STATUS
"Calling cpack -G
${
g
}
..."
)
execute_process
(
COMMAND
${
cpack
}
-G
${
g
}
execute_process
(
COMMAND
${
CMAKE_CPACK_COMMAND
}
-G
${
g
}
RESULT_VARIABLE result
OUTPUT_VARIABLE stdout
ERROR_VARIABLE stderr
...
...
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