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
7039d1fd
Commit
7039d1fd
authored
May 19, 2011
by
Brad King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CompileCommandOutput test for Make tools not supporting spaces
Use underscores instead of spaces for such Make tools.
parent
4268e3d7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
7 deletions
+16
-7
Tests/CMakeLists.txt
Tests/CMakeLists.txt
+3
-0
Tests/CompileCommandOutput/CMakeLists.txt
Tests/CompileCommandOutput/CMakeLists.txt
+6
-1
Tests/CompileCommandOutput/compile_command_output.cxx
Tests/CompileCommandOutput/compile_command_output.cxx
+2
-2
Tests/CompileCommandOutput/file with spaces.cxx
Tests/CompileCommandOutput/file with spaces.cxx
+1
-3
Tests/CompileCommandOutput/file with spaces.h
Tests/CompileCommandOutput/file with spaces.h
+0
-1
Tests/CompileCommandOutput/file_with_underscores.cxx
Tests/CompileCommandOutput/file_with_underscores.cxx
+3
-0
Tests/CompileCommandOutput/file_with_underscores.h
Tests/CompileCommandOutput/file_with_underscores.h
+1
-0
No files found.
Tests/CMakeLists.txt
View file @
7039d1fd
...
...
@@ -11,6 +11,7 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
--build-generator
${
CMAKE_TEST_GENERATOR
}
--build-makeprogram
${
CMAKE_TEST_MAKEPROGRAM
}
--build-project
${
proj
}
${${
NAME
}
_EXTRA_OPTIONS
}
--test-command
${
COMMAND
}
${
ARGN
}
)
LIST
(
APPEND TEST_BUILD_DIRS
"
${
CMake_BINARY_DIR
}
/Tests/
${
dir
}
"
)
ENDMACRO
(
ADD_TEST_MACRO
)
...
...
@@ -2037,6 +2038,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
ENDFOREACH
()
IF
(
TEST_CompileCommandOutput
)
SET
(
CompileCommandOutput_EXTRA_OPTIONS
--build-options -DMAKE_SUPPORTS_SPACES=
${
MAKE_IS_GNU
}
)
ADD_TEST_MACRO
(
CompileCommandOutput
"
${
CMake_BINARY_DIR
}
/Tests/CMakeLib/runcompilecommands"
)
ENDIF
()
...
...
Tests/CompileCommandOutput/CMakeLists.txt
View file @
7039d1fd
...
...
@@ -4,7 +4,12 @@ project (CompileCommandOutput CXX)
SET
(
CMAKE_EXPORT_COMPILE_COMMANDS ON
)
set
(
CMAKE_DEBUG_POSTFIX
"_test_debug_postfix"
)
ADD_LIBRARY
(
test1 STATIC
"file with spaces.cxx"
)
IF
(
MAKE_SUPPORTS_SPACES
)
SET
(
test1_srcs
"file with spaces.cxx"
)
ELSE
()
SET
(
test1_srcs
"file_with_underscores.cxx"
)
ENDIF
()
ADD_LIBRARY
(
test1 STATIC
${
test1_srcs
}
)
ADD_LIBRARY
(
test2 SHARED
"../CompileCommandOutput/relative.cxx"
)
INCLUDE_DIRECTORIES
(
${
CompileCommandOutput_SOURCE_DIR
}
/../../Source
)
ADD_EXECUTABLE
(
CompileCommandOutput compile_command_output.cxx
)
...
...
Tests/CompileCommandOutput/compile_command_output.cxx
View file @
7039d1fd
#include "file
with
spac
es.h"
#include "file
_
with
_underscor
es.h"
#include "relative.h"
int
main
(
int
argc
,
char
**
argv
)
{
file_with_
spac
es
();
file_with_
underscor
es
();
relative
();
return
0
;
}
Tests/CompileCommandOutput/file with spaces.cxx
View file @
7039d1fd
#include "file with spaces.h"
void
file_with_spaces
()
{}
#include "file_with_underscores.cxx"
Tests/CompileCommandOutput/file with spaces.h
deleted
100644 → 0
View file @
4268e3d7
void
file_with_spaces
();
Tests/CompileCommandOutput/file_with_underscores.cxx
0 → 100644
View file @
7039d1fd
#include "file_with_underscores.h"
void
file_with_underscores
()
{}
Tests/CompileCommandOutput/file_with_underscores.h
0 → 100644
View file @
7039d1fd
void
file_with_underscores
();
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