Skip to content

Commit 72c92c0

Browse files
committed
Remove ARCH and detect architecture from compiler
Issue#17 Change-Id: I86331d399157015dd746dad5c9d66716629613cd
1 parent e6c8949 commit 72c92c0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

Source/GmmLib/CMakeLists.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ if(CMAKE_CONFIGURATION_TYPES)
128128
endif()
129129

130130
set(GMMLIB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
131-
132-
if ("${ARCH}" MATCHES "64")
131+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
133132
set (GMMLIB_ARCH "64")
134133
else()
135134
set (GMMLIB_ARCH "32")
@@ -410,7 +409,7 @@ endforeach()
410409
###################################################################################
411410
add_library( ${GMM_LIB_DLL_NAME} SHARED igdgmm.rc ${UMD_SOURCES} ${UMD_HEADERS})
412411

413-
set_target_properties(${GMM_LIB_DLL_NAME} PROPERTIES OUTPUT_NAME "igdgmm${ARCH}")
412+
set_target_properties(${GMM_LIB_DLL_NAME} PROPERTIES OUTPUT_NAME "igdgmm${GMMLIB_ARCH}")
414413

415414
if(MSVC)
416415

@@ -519,12 +518,12 @@ bs_set_extra_target_properties(${GMM_LIB_DLL_NAME}
519518
GMM_LIB_DLL
520519
)
521520

522-
if("${ARCH}" MATCHES "64")
521+
if("${GMMLIB_ARCH}" MATCHES "64")
523522
bs_set_extra_target_properties(${GMM_LIB_DLL_NAME}
524523
_X64)
525524
endif()
526525

527-
if(ARCH EQUAL 32)
526+
if("${GMMLIB_ARCH}" MATCHES "32")
528527
#bs_set_extra_target_properties(igfx_gmmumd_ocl UNUSED_ISTDLIB_MT)
529528

530529
if((CMAKE_BUILD_TYPE STREQUAL "Release") OR (CMAKE_BUILD_TYPE STREQUAL "ReleaseInternal"))

Tools/bldsys/bs_init.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ endif()
4040

4141
# Ensure definitions for some variables that should be set by the overall build system.
4242
bs_set_if_undefined(PLATFORM "linux")
43-
bs_set_if_undefined(ARCH "64")
4443
bs_set_if_undefined(GFXGEN "9")
4544
bs_set_if_undefined(CXXFLAGS "-D_GLIBCXX_USE_CXX11_ABI=0")
4645

0 commit comments

Comments
 (0)