Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
IHTACMakeCommon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IHTA
CMake
IHTACMakeCommon
Commits
f97781c7
Commit
f97781c7
authored
2 years ago
by
Pascal Palenda
Browse files
Options
Downloads
Patches
Plain Diff
Add output option for the test executable target
parent
0886a2e9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/IhtaAddLibrary.cmake
+17
-5
17 additions, 5 deletions
src/IhtaAddLibrary.cmake
with
17 additions
and
5 deletions
src/IhtaAddLibrary.cmake
+
17
−
5
View file @
f97781c7
...
...
@@ -73,7 +73,7 @@ include_guard ()
If not specified, the install expects the same include folder structure as in the
libraries include folder.
.. variable:: OUT_
VAR
.. variable:: OUT_
LIB
Variable name into which the library target name will be set.
...
...
@@ -99,6 +99,12 @@ include_guard ()
Default is `${CMAKE_CURRENT_SOURCE_DIR}/src`.
This should be given if TEST_INTERNALS is given and one wants to test the internals.
.. variable:: OUT_TEST
Variable name into which the test target name will be set.
This can be useful when further settings must be applied to the test target.
.. variable:: OBJECT_LIB_POSTFIX
Optionally specify a postfix for the object library if TEST_INTERNALS is specified.
...
...
@@ -117,7 +123,8 @@ macro (ihta_add_library)
INSTALL_INCLUDE_DIR
IDE_FOLDER
OBJECT_LIB_POSTFIX
OUT_VAR
OUT_LIB
OUT_TEST
)
set
(
multiValueArgs SOURCES TEST_SOURCES
)
cmake_parse_arguments
(
IHTA_ADD_LIB
"
${
options
}
"
"
${
oneValueArgs
}
"
"
${
multiValueArgs
}
"
${
ARGN
}
)
...
...
@@ -219,8 +226,8 @@ macro (ihta_add_library)
GroupSourcesByFolder
(
${
IHTA_ADD_LIB_TARGET
}
)
if
(
IHTA_ADD_LIB_TEST_SOURCES
)
set
(
IHTA_ADD_LIB_TEST_TARGET
${
IHTA_ADD_LIB_NAME
}
UnitTest
)
if
(
IHTA_ADD_LIB_TEST_INTERNALS
)
set
(
IHTA_ADD_LIB_TEST_TARGET
${
IHTA_ADD_LIB_NAME
}
UnitTest
)
ihta_add_test
(
NAME
${
IHTA_ADD_LIB_TEST_TARGET
}
IDE_FOLDER
${
IHTA_ADD_LIB_IDE_FOLDER
}
...
...
@@ -235,14 +242,19 @@ macro (ihta_add_library)
)
else
()
ihta_add_test
(
NAME
${
IHTA_ADD_LIB_TEST_TARGET
}
TEST_TARGET
${
IHTA_ADD_LIB_TARGET
}
IDE_FOLDER
${
IHTA_ADD_LIB_IDE_FOLDER
}
SOURCES
${
IHTA_ADD_LIB_TEST_SOURCES
}
)
endif
()
if
(
IHTA_ADD_LIB_OUT_TEST
)
set
(
${
IHTA_ADD_LIB_OUT_TEST
}
${
IHTA_ADD_LIB_TEST_TARGET
}
)
endif
()
endif
()
if
(
IHTA_ADD_LIB_OUT_
VAR
)
set
(
${
IHTA_ADD_LIB_OUT_
VAR
}
${
IHTA_ADD_LIB_TARGET
}
)
if
(
IHTA_ADD_LIB_OUT_
LIB
)
set
(
${
IHTA_ADD_LIB_OUT_
LIB
}
${
IHTA_ADD_LIB_TARGET
}
)
endif
()
endmacro
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment