-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Add SimpleTpl to help test RPATH (#126)
Need to add unit tests for this yet.
- Loading branch information
1 parent
ae532ca
commit 42d1c48
Showing
9 changed files
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
TRIBITS_REPOSITORY_DEFINE_TPLS( | ||
MPI "${${PROJECT_NAME}_TRIBITS_DIR}/core/std_tpls/FindTPLMPI.cmake" PT | ||
HeaderOnlyTpl "cmake/tpls/" PT | ||
SimpleTpl "cmake/tpls/" ST | ||
) |
5 changes: 5 additions & 0 deletions
5
tribits/examples/TribitsExampleProject/cmake/tpls/FindTPLSimpleTpl.cmake
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,5 @@ | ||
TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( SimpleTpl | ||
REQUIRED_HEADERS SimpleTpl.hpp | ||
REQUIRED_LIBS_NAMES simpletpl | ||
MUST_FIND_ALL_HEADERS | ||
) |
1 change: 1 addition & 0 deletions
1
tribits/examples/TribitsExampleProject/packages/simple_cxx/cmake/Dependencies.cmake
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
TRIBITS_PACKAGE_DEFINE_DEPENDENCIES( | ||
LIB_REQUIRED_TPLS HeaderOnlyTpl | ||
LIB_OPTIONAL_TPLS SimpleTpl | ||
) |
1 change: 1 addition & 0 deletions
1
tribits/examples/TribitsExampleProject/packages/simple_cxx/cmake/SimpleCxx_config.h.in
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#cmakedefine HAVE_SIMPLECXX___INT64 | ||
|
||
#cmakedefine HAVE_SIMPLECXX_DEBUG | ||
#cmakedefine HAVE_SIMPLECXX_SIMPLETPL | ||
|
||
@SIMPLECXX_DEPRECATED_DECLARATIONS@ |
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,15 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) | ||
|
||
ADD_LIBRARY(simpletpl SimpleTpl.hpp SimpleTpl.cpp) | ||
|
||
INSTALL( | ||
TARGETS simpletpl | ||
RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" | ||
LIBRARY DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" | ||
ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" | ||
) | ||
|
||
INSTALL( | ||
FILES SimpleTpl.hpp | ||
DESTINATION "${CMAKE_INSTALL_PREFIX}/include" | ||
) |
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,6 @@ | ||
#include "SimpleTpl.hpp" | ||
|
||
double SimpleTpl::cube(const double &v) | ||
{ | ||
return v*v*v; | ||
} |
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,11 @@ | ||
#ifndef SIMPLE_TPL_HPP | ||
#define SIMPLE_TPL_HPP | ||
|
||
namespace SimpleTpl { | ||
|
||
/** \brief . */ | ||
double cube(const double &v); | ||
|
||
} // namespace SimpleTpl | ||
|
||
#endif // SIMPLE_TPL_HPP |