Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply cmake-init 689c8a9a22a77848c15209fc155afc368e3b9b59
- Loading branch information
Showing
3 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
# Creates an export header similar to generate_export_header, but for templates. | ||
# The main difference is that for MSVC, templates must not get exported. | ||
# When the file ${export_file} is included in source code, the macro ${target_id}_TEMPLATE_API | ||
# may get used to define public visibility for templates on GCC and Clang platforms. | ||
function(generate_template_export_header target target_id export_file) | ||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC") | ||
configure_file(${PROJECT_SOURCE_DIR}/source/codegeneration/template_msvc_api.h.in ${CMAKE_CURRENT_BINARY_DIR}/${export_file}) | ||
else() | ||
configure_file(${PROJECT_SOURCE_DIR}/source/codegeneration/template_api.h.in ${CMAKE_CURRENT_BINARY_DIR}/${export_file}) | ||
endif() | ||
endfunction() |