1
0
mirror of https://github.com/upx/upx.git synced 2025-08-07 22:46:51 +08:00

cmake: update for MSVC_IDE

This commit is contained in:
Markus F.X.J. Oberhumer
2023-01-05 14:26:17 +01:00
parent 0cb0dbf6d8
commit 513b00a30e
2 changed files with 10 additions and 7 deletions

View File

@ -24,14 +24,16 @@ option(UPX_CONFIG_DISABLE_SELF_PACK_TEST "Do not test packing UPX with itself" O
# Disallow in-source builds. Note that you will still have to manually
# clean up a few files if you accidentally try an in-source build.
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(",${CMAKE_SOURCE_DIR}," STREQUAL ",${CMAKE_BINARY_DIR},")
message(FATAL_ERROR "ERROR: In-source builds are not allowed, please use an extra build dir.")
if(NOT MSVC_IDE)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
if(",${CMAKE_CURRENT_SOURCE_DIR}," STREQUAL ",${CMAKE_CURRENT_BINARY_DIR},")
message(FATAL_ERROR "ERROR: In-source builds are not allowed, please use an extra build dir.")
endif()
endif()
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# determine git revision
set(GITREV_SHORT "")

View File

@ -36,6 +36,7 @@ $(top_srcdir)/build/release/upx: PHONY
$(MAKE) -C $(top_srcdir) build/release
.PHONY: PHONY
.NOTPARALLEL:
#
# "make run-testsuite"