SWDEV-316804 - Fix catch2 standalone build failure

project needs to be defined at the beginning of the cmake file.
This commit is contained in:
Maneesh Gupta
2022-01-06 12:02:12 +05:30
committed by GitHub
parent 2201b35f5e
commit 160a9dabe9
+1 -6
View File
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.16.8)
project(hiptests)
# Check if platform and compiler are set
if(HIP_PLATFORM STREQUAL "amd")
@@ -33,12 +34,6 @@ else()
cmake_path(SET CMAKE_C_COMPILER "${HIP_PATH}/bin/hipcc.bat")
endif()
if(NOT UNIX)
# In linux this reruns the cmake and fails with incorrect vars.
# so the project command is used only for windows
project(hiptests)
endif()
if(NOT DEFINED CATCH2_PATH)
if(DEFINED ENV{CATCH2_PATH})
set(CATCH2_PATH $ENV{CATCH2_PATH} CACHE STRING "Catch2 Path")