Skip to content

Commit fbd8164

Browse files
authored
Merge pull request #691 from jiazhang0/master
Fix cmake3 version check
2 parents 71747ab + b57accd commit fbd8164

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

psw/ae/aesm_service/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,22 +80,22 @@ $(APPNAME): $(CPPMICROSERVICES) source/build/CMakeCache.txt urts RDRAND
8080
$(CP) $(CPPMICROSERVICES) source/build/bin/
8181

8282
CMAKE_VERSION_MAJOR=$(shell cmake --version | head -n 1 | cut -d \ -f 3 | cut -d . -f 1)
83-
CMAKE_VERSION_MINOR=$(shell cmake --version | head -n 1 | cut -d \ -f 3 | cut -d . -f 2)
83+
CMAKE_VERSION_MINOR=$(shell cmake --version | head -n 1 | cut -d \ -f 3 | cut -d . -f 2 | xargs printf '%02d')
8484
CMAKE_VERSION=$(CMAKE_VERSION_MAJOR)$(CMAKE_VERSION_MINOR)
8585
CMAKE := $(HOME)/cache/bin/cmake
8686

8787
.PHONY: CPPMICROSERVICES
8888
$(CPPMICROSERVICES):
8989
mkdir -p $(CPPMICROSERVICES_DIR)/build
90-
ifeq ($(shell test $(CMAKE_VERSION) -lt 32 && echo 1), 1)
90+
ifeq ($(shell test $(CMAKE_VERSION) -lt 302 && echo 1), 1)
9191
$(CPPMICROSERVICES_DIR)/install_cmake.sh
9292
cd $(CPPMICROSERVICES_DIR)/build && $(CMAKE) -DCMAKE_COMMAND=$(CMAKE) $(CPPMICROSERVICES_CONFIG) ../ && $(MAKE) && $(MAKE) install
9393
else
9494
cd $(CPPMICROSERVICES_DIR)/build && cmake $(CPPMICROSERVICES_CONFIG) ../ && $(MAKE) && $(MAKE) install
9595
endif
9696

9797
source/build/CMakeCache.txt: $(CPPMICROSERVICES)
98-
ifeq ($(shell test $(CMAKE_VERSION) -lt 30 && echo 1), 1)
98+
ifeq ($(shell test $(CMAKE_VERSION) -lt 300 && echo 1), 1)
9999
mkdir -p source/build && cd source/build && $(CMAKE) -DCMAKE_COMMAND=$(CMAKE) $(AESM_CONFIG) ../
100100
else
101101
mkdir -p source/build && cd source/build && cmake $(AESM_CONFIG) ../

0 commit comments

Comments
 (0)