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
9eaf3755
Commit
9eaf3755
authored
Dec 17, 2013
by
Stephen Kelly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Export: Populate INTERFACE_COMPILE_FEATURES property.
parent
8ed59fc2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
1 deletion
+29
-1
Source/cmExportBuildFileGenerator.cxx
Source/cmExportBuildFileGenerator.cxx
+3
-0
Source/cmExportInstallFileGenerator.cxx
Source/cmExportInstallFileGenerator.cxx
+4
-0
Tests/ExportImport/Export/Interface/CMakeLists.txt
Tests/ExportImport/Export/Interface/CMakeLists.txt
+4
-1
Tests/ExportImport/Import/CMakeLists.txt
Tests/ExportImport/Import/CMakeLists.txt
+1
-0
Tests/ExportImport/Import/Interface/CMakeLists.txt
Tests/ExportImport/Import/Interface/CMakeLists.txt
+17
-0
No files found.
Source/cmExportBuildFileGenerator.cxx
View file @
9eaf3755
...
...
@@ -85,6 +85,9 @@ bool cmExportBuildFileGenerator::GenerateMainFile(std::ostream& os)
this
->
PopulateInterfaceProperty
(
"INTERFACE_AUTOUIC_OPTIONS"
,
te
,
cmGeneratorExpression
::
BuildInterface
,
properties
,
missingTargets
);
this
->
PopulateInterfaceProperty
(
"INTERFACE_COMPILE_FEATURES"
,
te
,
cmGeneratorExpression
::
BuildInterface
,
properties
,
missingTargets
);
this
->
PopulateInterfaceProperty
(
"INTERFACE_POSITION_INDEPENDENT_CODE"
,
te
,
properties
);
const
bool
newCMP0022Behavior
=
...
...
Source/cmExportInstallFileGenerator.cxx
View file @
9eaf3755
...
...
@@ -149,6 +149,10 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
te
,
cmGeneratorExpression
::
InstallInterface
,
properties
,
missingTargets
);
this
->
PopulateInterfaceProperty
(
"INTERFACE_COMPILE_FEATURES"
,
te
,
cmGeneratorExpression
::
InstallInterface
,
properties
,
missingTargets
);
const
bool
newCMP0022Behavior
=
te
->
GetPolicyStatusCMP0022
()
!=
cmPolicies
::
WARN
...
...
Tests/ExportImport/Export/Interface/CMakeLists.txt
View file @
9eaf3755
...
...
@@ -23,7 +23,10 @@ set_property(TARGET sharedlib PROPERTY INTERFACE_COMPILE_DEFINITIONS "SHAREDLIB_
add_library
(
sharediface INTERFACE
)
target_link_libraries
(
sharediface INTERFACE sharedlib
)
install
(
TARGETS headeronly sharediface
add_library
(
use_auto_type INTERFACE
)
target_compile_features
(
use_auto_type INTERFACE cxx_auto_type
)
install
(
TARGETS headeronly sharediface use_auto_type
EXPORT expInterface
)
install
(
TARGETS sharedlib
...
...
Tests/ExportImport/Import/CMakeLists.txt
View file @
9eaf3755
cmake_minimum_required
(
VERSION 2.7.20090711
)
cmake_policy
(
SET CMP0025 NEW
)
project
(
Import C CXX
)
# Import everything in a subdirectory.
...
...
Tests/ExportImport/Import/Interface/CMakeLists.txt
View file @
9eaf3755
...
...
@@ -40,6 +40,23 @@ macro(do_try_compile prefix)
if
(
NOT
${
prefix
}
IFACE_TRY_COMPILE
)
message
(
SEND_ERROR
"
${
prefix
}
try_compile with IMPORTED INTERFACE target failed!
\n\n
${
OUTPUT
}
"
)
endif
()
if
(
";
${
CMAKE_CXX_COMPILE_FEATURES
}
;"
MATCHES
";cxx_auto_type;"
)
set
(
CMAKE_REQUIRED_LIBRARIES
${
prefix
}
::use_auto_type
)
check_cxx_source_compiles
(
"
int main(int,char**)
{
auto value = 0;
return value;
}
"
${
prefix
}
IMPORTED_IFACE_CONSTEXPR
)
if
(
NOT
${
prefix
}
IMPORTED_IFACE_CONSTEXPR
)
message
(
SEND_ERROR
"
${
prefix
}
try_compile with IMPORTED INTERFACE target failed!
\n\n
${
OUTPUT
}
"
)
endif
()
endif
()
endmacro
()
do_try_compile
(
bld
)
...
...
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