[PAL] Select PAL targets in CMakeLists.txt

This commit is contained in:
Chia-Che Tsai
2019-09-22 23:01:26 -05:00
parent d03ec8bcfe
commit 3f1bf6f16a
+13 -2
View File
@@ -4,5 +4,16 @@ set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON)
project(graphene_pal)
add_subdirectory(src/host/Linux)
add_subdirectory(src/host/Linux-SGX)
if(NOT DEFINED SGX)
set(SGX $ENV{SGX})
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(${SGX})
message("PAL target: Linux SGX")
add_subdirectory(src/host/Linux-SGX)
else()
message("PAL target: Linux")
add_subdirectory(src/host/Linux)
endif()
endif()