diff options
author | MyungJoo Ham <myungjoo.ham@gmail.com> | 2016-06-28 16:44:09 +0900 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2016-06-28 09:44:09 +0200 |
commit | 5acbced129024a38aec530f1bb9cd85b7568e05a (patch) | |
tree | 26d1dc35f59b4dec10abb4236b155a1e29e10f30 | |
parent | 4f134e6e5faecfb184ac4859970b556149357e2d (diff) | |
download | coreclr-5acbced129024a38aec530f1bb9cd85b7568e05a.tar.gz coreclr-5acbced129024a38aec530f1bb9cd85b7568e05a.tar.bz2 coreclr-5acbced129024a38aec530f1bb9cd85b7568e05a.zip |
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 <myungjoo.ham@samsung.com>
-rw-r--r-- | definitionsconsistencycheck.cmake | 6 | ||||
-rw-r--r-- | src/mscorlib/System.Private.CoreLib.csproj | 3 | ||||
-rw-r--r-- | 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 @@ <Message Importance="High" Text="============" /> <PropertyGroup> <IgnoreDefineConstants>FEATURE_IMPLICIT_TLS;FEATURE_HIJACK</IgnoreDefineConstants> + <CMakeDefinitionSaveFile>$(IntermediateOutputPath)\cmake.definitions</CMakeDefinitionSaveFile> </PropertyGroup> - <Exec Command='python $(MSBuildThisFileDirectory)../scripts/check-definitions.py $(MSBuildThisFileDirectory)../../cmake.definitions "$(DefineConstants)" "$(IgnoreDefineConstants)" ' /> + <Exec Command='python $(MSBuildThisFileDirectory)..\scripts\check-definitions.py "$(CMakeDefinitionSaveFile)" "$(DefineConstants)" "$(IgnoreDefineConstants)" ' /> <Message Importance="High" Text="============" /> </Target> 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): |