-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: enable exe target more applicable (#323)
* perf: enable exe target more applicable - Rename <target_name>_private to <target_name>_internal. - Make the internal target as a compiled object target to conform to the real situation. * make the internal target warned, hardened, sanitized and covered --------- Signed-off-by: msclock <msclock@qq.com>
- Loading branch information
Showing
8 changed files
with
78 additions
and
36 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,13 @@ | ||
#include "distribution.hpp" | ||
|
||
namespace exe { | ||
namespace distribution { | ||
bool is_debug() noexcept { | ||
#ifdef _DEBUG | ||
return true; | ||
#else | ||
return false; | ||
#endif | ||
} | ||
} // namespace distribution | ||
} // namespace exe |
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
31 changes: 21 additions & 10 deletions
31
template/src/[% if exe_target != '' %]{{ exe_target }}[% endif %]/CMakeLists.txt.jinja
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
13 changes: 13 additions & 0 deletions
13
template/src/[% if exe_target != '' %]{{ exe_target }}[% endif %]/src/distribution.cpp.jinja
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,13 @@ | ||
#include "distribution.hpp" | ||
|
||
namespace {{ exe_target }} { | ||
namespace distribution { | ||
bool is_debug() noexcept { | ||
#ifdef _DEBUG | ||
return true; | ||
#else | ||
return false; | ||
#endif | ||
} | ||
} // namespace distribution | ||
} // namespace {{ exe_target }} |
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