From 5acbced129024a38aec530f1bb9cd85b7568e05a Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 28 Jun 2016 16:44:09 +0900 Subject: Move intermediate file into intermediate dir (#5981) The intermediate file, cmake.definitions, is moved into the intermediate directory: bin/obj/OS.Arch.Conf/ The script won't emit error for not having the cmake results because some systems (Windows) do not use Cmake and users might use "skipnative". Fixes #5976 Signed-off-by: MyungJoo Ham --- definitionsconsistencycheck.cmake | 6 +++--- src/mscorlib/System.Private.CoreLib.csproj | 3 ++- src/scripts/check-definitions.py | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/definitionsconsistencycheck.cmake b/definitionsconsistencycheck.cmake index cc029bb799..51a70f7209 100644 --- a/definitionsconsistencycheck.cmake +++ b/definitionsconsistencycheck.cmake @@ -1,11 +1,11 @@ get_directory_property( DirDefs COMPILE_DEFINITIONS ) # Reset the definition file -file(WRITE cmake.definitions "") +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake.definitions "") foreach( d ${DirDefs} ) if($ENV{VERBOSE}) message( STATUS "Compiler Definition: " ${d} ) endif($ENV{VERBOSE}) - file(APPEND cmake.definitions ${d}) - file(APPEND cmake.definitions "\n") + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake.definitions ${d}) + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake.definitions "\n") endforeach() diff --git a/src/mscorlib/System.Private.CoreLib.csproj b/src/mscorlib/System.Private.CoreLib.csproj index 02719e3eba..6285e4a317 100644 --- a/src/mscorlib/System.Private.CoreLib.csproj +++ b/src/mscorlib/System.Private.CoreLib.csproj @@ -183,8 +183,9 @@ FEATURE_IMPLICIT_TLS;FEATURE_HIJACK + $(IntermediateOutputPath)\cmake.definitions - + diff --git a/src/scripts/check-definitions.py b/src/scripts/check-definitions.py index ace70786b9..59b309a3e6 100644 --- a/src/scripts/check-definitions.py +++ b/src/scripts/check-definitions.py @@ -33,7 +33,12 @@ debug = 0 # For the native part, return the sorted definition array. def loadDefinitionFile(filename): result = [] - f = open(filename, 'r') + try: + f = open(filename, 'r') + except: + sys.exit(0) + # if cmake was not used (because of skipnative or systems that do not use cmake), this script won't work. + for line in f: theLine = line.rstrip("\r\n").strip() if (len(theLine) > 0): -- cgit v1.2.3