diff --git a/catch/unit/device/CMakeLists.txt b/catch/unit/device/CMakeLists.txt index 82b44ced5f..ed3fc0813e 100644 --- a/catch/unit/device/CMakeLists.txt +++ b/catch/unit/device/CMakeLists.txt @@ -30,7 +30,7 @@ set(TEST_SRC hipDriverGetVersion.cc ) -if(HIP_PLATFORM MATCHES "amd") +if(HIP_PLATFORM MATCHES "amd" AND BUILD_SHARED_LIBS) set(AMD_SRC hipGetProcAddressDevMgmt.cc) set(TEST_SRC ${TEST_SRC} ${AMD_SRC}) diff --git a/catch/unit/dynamicLoading/CMakeLists.txt b/catch/unit/dynamicLoading/CMakeLists.txt index 57a713370c..e16da4d177 100644 --- a/catch/unit/dynamicLoading/CMakeLists.txt +++ b/catch/unit/dynamicLoading/CMakeLists.txt @@ -17,7 +17,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -if(UNIX) +if(UNIX AND BUILD_SHARED_LIBS) set(TEST_SRC ${TEST_SRC} complex_loading_behavior.cc) set(AMD_TEST_SRC